]> git.saurik.com Git - bison.git/blob - ChangeLog
doc: fixes.
[bison.git] / ChangeLog
1 2009-08-19 Akim Demaille <demaille@gostai.com>
2
3 doc: fixes.
4 * doc/bison.texinfo: Fix minor Texinfo errors.
5
6 2009-08-19 Akim Demaille <demaille@gostai.com>
7
8 doc: %initial-action to initialize yylloc.
9 Reported by Bill Allombert.
10 * doc/bison.texinfo: Set fill-column to 76.
11 (Location Type): Document the use of %initial-action to initialize
12 yylloc.
13
14 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
15
16 maint: update for gnulib's recent update-copyright changes
17 * gnulib: Update.
18 * .x-update-copyright (COPYING): Add as it's no longer implied
19 when .x-update-copyright is present.
20 * cfg.mk (update-copyright-local): Remove, now ignored.
21 (update-copyright): Declare update-b4-copyright as a dependency.
22
23 2009-08-17 Akim Demaille <demaille@gostai.com>
24
25 build: require gettext 0.17.
26
27 Suggested by Bruno Haible.
28 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
29 * configure.ac: require gettext 0.17 to ensure compatibility with
30 gnulib.
31
32 2009-08-17 Akim Demaille <demaille@gostai.com>
33
34 build: lower gettext requirements.
35
36 Bison was uselessly requiring the formatstring macros from
37 gettext, which resulted in mo files not being installed on systems
38 that perfectly supported Bison mo files. Lower the requirement.
39 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
40
41 * configure.ac: Require need-ngettext instead of
42 need-formatstring-macros.
43 Reported by Martin Jabocs.
44 Suggested by Bruno Haible.
45 * INSTALL: Restructure.
46 (Internationalization): New.
47
48 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
49
50 maint: fix use of copyright year intervals.
51 * gnulib: Update.
52 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
53 as now recommended in gnulib/NEWS.
54 * build-aux/update-b4-copyright: Fix.
55 * cfg.mk (update-copyright-env): Configure update-copyright.
56
57 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
58
59 Make it easier to write deterministic tests.
60 Continues Akim's work from his 2009-06-10 commits.
61 * src/reader.c (check_and_convert_grammar): Don't add any
62 symbols after the first symbols_do invocation.
63 * src/symtab.c (symbols_sorted): New static global.
64 (user_token_number_redeclaration): Update comments.
65 (symbol_from_uniqstr): If a new symbol is being created, assert
66 that symbols_sorted hasn't been allocated yet.
67 (symbols_free): Free symbols_sorted.
68 (symbols_cmp, symbols_cmp_qsort): New functions.
69 (symbols_do): Sort symbol_table into symbols_sorted on first
70 invocation.
71 * tests/input.at (Numbered tokens): Recombine tests now that the
72 output should be deterministic across multiple numbers.
73
74 2009-08-12 Akim Demaille <demaille@gostai.com>
75
76 distcheck: fix.
77
78 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
79
80 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
81
82 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
83
84 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
85
86 Miscellaneous code readability improvements.
87
88 * src/reader.c (reader): Move %define front-end variable
89 defaults and checking into...
90 (prepare_percent_define_front_end_variables): ... this new
91 function.
92
93 * src/scan-gram.l (INITIAL): For consistency with string
94 literals, don't store open quote on character literal. It's
95 discarded before returning anyway.
96 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
97 Make length test more readable, and make the character stored
98 for an empty literal more obvious while consistent with the
99 previous behavior.
100
101 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
102 USER_NUMBER_HAS_STRING_ALIAS throughout.
103 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
104 that is repeated in symtab.h. Improve argument names to make it
105 clear which side of the symbol-string alias pair is which.
106 (symbol_check_alias_consistency): Improve local variable names
107 for the same purpose.
108 * src/symtab.h (struct symbol): Make comments about aliases
109 clearer.
110 (symbol_make_alias): Improve comments and argument name.
111 * src/output.c (token_definitions_output): Update for rename to
112 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
113
114 2009-08-08 Alex Rozenman <rozenman@gmail.com>
115
116 Convert "misleading reference" messages to warnings.
117 * src/scan-code.l: New function 'show_sub_messages', more
118 factoring.
119 * tests/named-ref.at: Adjust tests.
120
121 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
122
123 maint: run "make update-copyright"
124
125 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
126
127 maint: make update-b4-copyright easier to use
128 * build-aux/update-b4-copyright: In warnings, report line
129 numbers rather than character positions.
130 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
131 that update-copyright runs it.
132 * gnulib: Update.
133
134 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
135
136 maint: clean up update-b4-copyright code
137 * build-aux/update-b4-copyright: Do not accept 2-digit
138 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
139 Don't accept a `[' in a b4_copyright argument.
140 Format code more consistently.
141 Don't assume b4*copyright never occurs.
142
143 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
144
145 maint: automate b4_copyright updates.
146 * Makefile.am (update-b4-copyright): New target rule.
147 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
148 * build-aux/update-b4-copyright: New.
149 * data/yacc.c: Remove stray characters around b4_copyright
150 invocations.
151
152 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
153
154 maint: automate annual package-wide copyright-year update.
155 * .x-update-copyright: New.
156 * Makefile.am (EXTRA_DIST): Remove maint.mk.
157 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
158 update-copyright. Remove gnumakefile, which is implied by
159 maintainer-makefile.
160 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
161 * gnulib: Update.
162 * maint.mk: Remove, now copied from gnulib.
163 * examples/extexi: Add missing "(C)" in copyright statement so
164 update-copyright can recognize it.
165 * src/LR0.h: Likewise.
166 * src/print.h: Likewise.
167 * src/print_graph.h: Likewise.
168 * src/gram.c: Add missing comma in copyright statement.
169 * src/gram.h: Likewise.
170
171 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
172
173 Fix "make distcheck".
174 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
175 of just calc.stamp.
176
177 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
178
179 Pacify "gcc -Wunused" for the input function from Flex.
180 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
181 and later.
182 * src/scan-code.l: Add "%option noinput", which I cannot find in
183 the Flex manual, but which Flex has supported since at least as
184 far back as 2.5.4. However, if any of our developers still use
185 Flex 2.5.4, they'll need to stop configuring with
186 --enable-gcc-warnings because "%option noinput" didn't work
187 correctly until Flex 2.5.6.
188 * src/scan-gram.l: Likewise.
189 * src/scan-skel.l: Likewise.
190
191 2009-07-31 Alex Rozenman <rozenman@gmail.com>
192
193 Fix --enable-gcc-warnings problems.
194 * src/reader.c: Adjust variable names.
195 * src/scan-code.l: Fix prototypes and adjust names.
196 * src/named-ref.c: Remove redundant "if".
197
198 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
199
200 Fix a --enable-gcc-warnings problem.
201 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
202 variable.
203
204 2009-07-24 Alex Rozenman <rozenman@gmail.com>
205
206 Fix some memory leaks.
207 * src/named-ref.c: Add a pointer check (named_ref_free).
208 * src/scan-code.l: New function (variant_table_free). Called in
209 code_scanner_free.
210 * src/symlist.c: Call to named_ref_free (symbol_list_free).
211
212 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
213
214 Warn about character literals not of length one.
215 * NEWS (2.5): Document.
216 * src/scan-gram.l (INITIAL): Remove comment that we don't check
217 the length.
218 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
219 * tests/input.at (Bad character literals): New test group.
220
221 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
222
223 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
224
225 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
226
227 Some M4 cleanup in the testsuite.
228 Suggested by Eric Blake at
229 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
230 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
231 complicate the code by distinguishing between a missing value
232 and an empty string value for an optional argument. This fix is
233 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
234 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
235 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
236 arguments are not needed because of the following changes.
237 Fix stale comments.
238 Bison developers should use GNU M4 and should not use
239 POSIXLY_CORRECT when building the test suite, so do not
240 complicate the code by avoiding $10 and above.
241 Do not quote an empty string value for an optional argument, and
242 do not distinguish between a missing value and an empty string
243 value.
244
245 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
246
247 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
248
249 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
250
251 Revert unnecessary column realignment in --help output.
252 Reported by Akim Demaille at
253 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
254 * src/getargs.c (usage): Here.
255
256 2009-07-04 Alex Rozenman <rozenman@gmail.com>
257
258 Alphabetical order in src/Makefile.am.
259 * src/Makefile.am: Adjust.
260
261 2009-07-04 Alex Rozenman <rozenman@gmail.com>
262
263 Style changes and factoring.
264 * src/named-ref.h: Add comments.
265 * src/parse-gram.y: Readability and style changes.
266 * src/reader.c: Factoring: assign_named_ref function.
267 * src/scan-code.l: Factoring and style changes. Rename
268 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
269 Use "unsigned" type for variant index. Improve readablity.
270 * src/scan-gram.l: Change error messages and add comments.
271 * src/symlist.h: symbol_list_null: New function decl.
272 * src/symlist.c: symbol_list_null: Implement here.
273 * tests/named-refs.at: Adjust for new error messages.
274
275 2009-06-29 Eric Blake <ebb9@byu.net>
276
277 scan-code: avoid compiler warnings
278 * src/scan-code.l (parse_named_ref): Use correct specifiers.
279
280 2009-06-29 Akim Demaille <demaille@gostai.com>
281
282 build: avoid concurrent extraction of calc++.
283 * examples/calc++/Makefile.am (calc.stamp): New.
284 Depend on it to create the sources of calc++ so that concurrent
285 builds don't launch several "extexi" in parallel.
286 Not only this is inefficient, this also builds incorrect sources
287 with several extractions mixed together.
288
289 2009-06-27 Alex Rozenman <rozenman@gmail.com>
290
291 Implement support for named symbol references.
292 * src/parse-gram.y: Add new syntax (named_ref.opt).
293 * src/reader.c: Store named refs in symbol lists.
294 * src/reader.h: New argument for symbol_append and
295 action_append functions.
296 * src/scan-code.h: Add new field (named_ref) into
297 code_props data structure. Keeps named ref of midrule
298 actions.
299 * src/scan-code.l: Support for named refs in semantic
300 action code. New function 'parse_named_ref'.
301 * src/scan-gram.l: Support bracketed id.
302 * src/symlist.c: Store named refs in symbol lists.
303 * src/symlist.h: New field in symbol list: named_ref.
304 * src/named-ref.h: New file, a struct for named_ref.
305 * src/named-ref.cp: New file, named_ref_new function.
306 * src/local.mk: Add two new files.
307 * tests/testsuite.at: Include new test group:
308 * tests/named-refs.at: this new file.
309
310 2009-06-25 Akim Demaille <demaille@gostai.com>
311
312 hash: check insertion for memory exhaustion.
313 * src/uniqstr.c (uniqstr_new): New.
314
315 2009-06-11 Akim Demaille <demaille@gostai.com>
316
317 style changes.
318 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
319 * src/print-xml.c: Style changes.
320 * tests/conflicts.at: Comment changes.
321
322 2009-06-11 Akim Demaille <demaille@gostai.com>
323
324 xml: beware of user strings used to give a %prec to rules.
325 * tests/conflicts.at (%prec with user strings): New.
326 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
327 XML output.
328
329 2009-06-11 Akim Demaille <demaille@gostai.com>
330
331 hash: check insertion for memory exhaustion.
332 * src/muscle-tab.c (muscle_insert, muscle_grow)
333 * src/state.c (state_hash_insert): Check the return value of
334 hash_insert.
335
336 2009-06-10 Akim Demaille <demaille@gostai.com>
337
338 deterministic test suite.
339 Some consistency checks on symbols are performed after all the
340 symbols were read, by an iteration over the symbol table. This
341 traversal is nondeterministic, which can be a problem for test
342 cases.
343 Avoid this.
344 Addresses another form of nondeterminism reported by Joel E. Denny.
345 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
346
347 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
348 test in two.
349 Use different file names for the three tests to make the
350 maintenance easier.
351
352 2009-06-10 Akim Demaille <demaille@gostai.com>
353
354 deterministic user-token-number redeclaration errors.
355 Address nondeterminism reported by Joel E. Denny.
356 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
357
358 * src/uniqstr.h: Comment changes.
359 * src/location.h (boundary_cmp, location_cmp): New.
360 * src/symtab.c (user_token_number_redeclaration): New.
361 (symbol_translation): Use it.
362 * tests/input.at (Numbered tokens): Adjust the expected output.
363
364 2009-05-25 Akim Demaille <demaille@gostai.com>
365
366 gnulib: update.
367 * gnulib: Update to latest.
368 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
369 * m4/.gitignore: Regen.
370 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
371 Call xalloc_die on hash_insert failures.
372 Requested by the new __warn_unused_result__ attribute of
373 hash_insert.
374
375 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
376
377 Convert multiple variable definition warnings to complaints.
378 * NEWS (2.5): Add a new entry for that change.
379 * doc/bison.texinfo (Decl Summary): Update %define entry.
380 (Bison Options): Update -D/--define/-F/--force-define entry.
381 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
382 * src/muscle_tab.h (muscle_percent_define_insert): Update
383 comments.
384 * tests/input.at (`%define errors'): Update.
385 (`%define, --define, --force-define'): Update.
386
387 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
388
389 -F/--force-define and relative %define/-D/--define priorities.
390 * NEWS (2.5): Add documentation to -D/--define entry.
391 * build-aux/cross-options.pl: Hard-code association of
392 --force-define with %define.
393 * doc/bison.texinfo (Decl Summary): In %define entry,
394 cross-reference command-line options.
395 (Bison Options): Add documentation to -D/--define entry.
396 (Option Cross Key): Widen column for --force-define row.
397 * src/getargs.c (usage): Document -F/--force-define. Realign
398 options in output.
399 (short_options, long_options, getargs): Parse -F/--force-define,
400 and update muscle_percent_define_insert invocation.
401 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
402 (muscle_percent_define_insert): Add argument with that type.
403 * src/muscle_tab.c (muscle_percent_define_insert): Implement
404 -F/--force-define behavior and priorities.
405 * src/parse-gram.y (prologue_declaration): Update
406 muscle_percent_define_insert invocations.
407 * tests/input.at (`%define, --define'): Rename to...
408 (`%define, --define, --force-define'): ... this and extend.
409
410 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Update some comments to make sense for -D.
413 * data/bison.m4 (b4_check_user_names): In header comments, say
414 "user occurrence" instead of "grammar occurrence".
415 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
416 (muscle_percent_code_grow): Likewise just for consistency.
417
418 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
419
420 * data/c++.m4: Update copyright year.
421
422 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
423
424 * data/c++.m4 (b4_namespace_close): Simplify slightly.
425
426 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
427
428 Handle a trailing `:' in a user-supplied C++ namespace better.
429 * data/c++.m4 (b4_namespace_close): Don't let it be printed
430 among the closing braces here. This fix might make the
431 generated code easier to debug, but otherwise it should be
432 insignificant because a trailing `:' is a C++ error already.
433
434 2009-05-19 Akim Demaille <demaille@gostai.com>
435
436 remove useless variable.
437 * src/getargs.c (skeleton_arg): Remove now useless variable.
438 Should help the compiler see that this printf-like call is sane.
439
440 2009-05-11 Akim Demaille <demaille@gostai.com>
441
442 doc: use C++ headers.
443 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
444 headers.
445
446 2009-05-05 Akim Demaille <demaille@gostai.com>
447
448 fix hexadecimal token number support.
449 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
450
451 2009-05-05 Akim Demaille <demaille@gostai.com>
452
453 tests: check token numbers.
454 * tests/input.at (Numbered tokens): New.
455
456 2009-05-04 Akim Demaille <demaille@gostai.com>
457
458 bison: catch bad symbol names.
459 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
460 * tests/input.at: Adjust.
461
462 2009-05-04 Akim Demaille <demaille@gostai.com>
463
464 space changes.
465 * src/scan-gram.l: Untabify to be robust to zealous editors.
466
467 2009-05-04 Akim Demaille <demaille@gostai.com>
468
469 identifiers: dashes are letters.
470 Dashes can now start identifiers (symbols and directives).
471
472 * src/scan-gram.l ({letter}): Add dash.
473 ({id}): Remove it.
474 * tests/input.at (Symbols): Adjust.
475 Remove stray comment.
476 * tests/regression.at (Invalid inputs): Adjust error message.
477 * doc/bison.texinfo (Symbols): Update.
478
479 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
480
481 Declare %code to be a permanent feature.
482 * NEWS (2.4.2): Here.
483 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
484 experimental.
485 (Decl Summary): Likewise.
486
487 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
488
489 Convert underscores to dashes in some %define variable names.
490 For now, just api.push-pull and lr.keep-unreachable-states.
491 Maintain old names for backward compatibility.
492 * NEWS (2.5): Document.
493 * data/c.m4 (b4_identification): Update comment.
494 * data/yacc.c: Update access.
495 * doc/bison.texinfo: Update.
496 * etc/bench.pl.in (bench_grammar): Update use.
497 * src/files.c (tr): Move to...
498 * src/getargs.c, src/getargs.h (tr): ... here because I can't
499 think of a better place to expose it. My logic is that, for all
500 uses of tr so far, command-line arguments can be involved, and
501 getargs.h is already included.
502 * src/main.c (main): Update access.
503 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
504 variable names to new variable names before assigning value.
505 * src/reader.c (reader): Update setting default.
506 * tests/calc.at: Update uses.
507 * tests/conflicts.at (Unreachable States After Conflict
508 Resolution): Update use.
509 * tests/input.at (%define enum variables): Update use.
510 (%define backward compatibility): New test group.
511 * tests/push.at: Update uses.
512 * tests/reduce.at: Update uses.
513 * tests/torture.at: Update uses.
514
515 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
516
517 Set all front-end %define defaults in one place.
518 * src/main.c (main): Move lr.keep_unreachable_states default...
519 * src/reader.c (reader): ... to here.
520
521 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Rename lr.default_reductions to lr.default-reductions.
524 * NEWS (2.5): Here.
525 * doc/bison.texinfo: Here.
526 * src/lalr.c (initialize_LA): Here.
527 * src/print.c (print_reductions): Here.
528 * src/reader.c (reader): Here.
529 * src/tables.c (action_row): Here.
530 * tests/input.at (%define enum variables): Here.
531 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
532
533 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
534
535 Pacify ./configure --enable-gcc-warnings.
536 * tests/input.at (Symbols): Prototype yyerror and yylex.
537
538 2009-04-21 Akim Demaille <demaille@gostai.com>
539
540 tests: check the use of dashes and periods in symbols.
541 * tests/input.at (Symbol): New test group.
542
543 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
544
545 Document how `%define "var" "value"' is not M4-friendly.
546 * src/parse-gram.y (variable): In comments here.
547
548 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
549
550 Add copyright updates missed during previous cherry pick.
551 * src/output.c: Here.
552 * src/parse-gram.y: Here.
553 * src/scan-gram.l: Here.
554
555 2009-04-20 Akim Demaille <demaille@gostai.com>
556
557 variables: accept dashes.
558 * src/scan-gram.l ({id}): Also accept dashes after the initial
559 letter.
560 ({directive}): Use {id}.
561 * src/parse-gram.y: Comment and formatting changes.
562 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
563 symbols.
564 * src/complain.h, src/complain.c (yacc_at): New.
565 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
566 symbol names.
567 * src/output.c (token_definitions_output): Do not #define token
568 names with dashes.
569
570 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
571
572 Clean up recent patches a little.
573 Reported by Akim Demaille.
574 * doc/bison.texinfo (Understanding): Fix typos.
575 * src/print.c (print_reductions): Don't use negated variable.
576
577 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
578
579 List accepted values for a %define enum variable with an invalid value.
580 Suggested by Akim Demaille at
581 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
582 * data/bison.m4 (_b4_percent_define_check_values): Implement.
583 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
584 * tests/input.at (%define lr.default_reductions invalid values): Merge
585 into...
586 (%define enum variables): ... here, and update output.
587
588 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 Rename "default rule" to "default reduction".
591 This includes changing variable names in code, changing
592 comments, and renaming %define lr.default_rules to %define
593 lr.default_reductions.
594 * NEWS (2.5): Update IELR documentation.
595 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
596 Adjust YYDEFACT and yydefact_ documentation.
597 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
598 and lr.type documentation. Make some other wording
599 improvements.
600 (Glossary): Adjust cross-references and Default Reduction
601 definition.
602 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
603 Remove a confusing comment pointed out by Akim Demaille.
604 (initialize_LA): Adjust code.
605 * src/print-xml.c (print_reductions): Adjust code.
606 * src/print.c (print_reductions): Adjust code.
607 * src/reader.c (reader): Adjust code.
608 * src/tables.c (action_row): Adjust code.
609 (token_actions): Adjust code.
610 * src/tables.h: Adjust YYDEFACT documentation.
611 * tests/input.at (%define lr.default_rules invalid values):
612 Rename test group to...
613 (%define lr.default_reductions invalid values): ... this, and
614 update grammar file and expected output.
615 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
616 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
617
618 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
619
620 Document %define lr.type and lr.default_rules.
621 * NEWS (2.5): Add an entry.
622 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
623 besides just LALR(1) and GLR(1).
624 * doc/bison.texinfo (Introduction): Likewise.
625 (Language and Grammar): Bison is no longer limited to LALR(1)
626 restrictions.
627 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
628 when trying to distinguish from GLR. Talk about LR(1) grammars
629 rather than LALR(1) grammars.
630 (Decl Summary): In %define api.push_pull entry, say it applies
631 to deterministic parsers in C rather than LALR(1) parsers in C.
632 Add lr.default_rules entry.
633 Add lr.type entry.
634 (Mystery Conflicts): Bison is no longer limited to LALR(1)
635 restrictions.
636 (Generalized LR Parsing): Same changes as for the previous GLR
637 section.
638 (Memory Management): Say deterministic rather than LALR(1).
639 (Understanding): Correct some bison output.
640 Index discussion of "accepting state".
641 Say deterministic rather than LALR(1).
642 (Bison Options): In --yacc entry, say deterministic rather than
643 LALR(1).
644 In --report, --graph, and --xml entries, just don't mention
645 LALR(1).
646 (C++ Parsers): Say deterministic rather than LALR(1).
647 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
648 (Glossary): Add Accepting State, Consistent State, Default Rule,
649 and IELR(1) definitions.
650 In Generalized LR (GLR) definition, make same changes as in
651 previous GLR sections.
652 In LALR(1) definition, say Bison uses LALR(1) by default rather
653 than implying Bison is limited to LALR(1).
654 (LocalWords): Add IELR.
655
656 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
657
658 Finish implementing %define lr.type.
659 Its value can be "LALR", "IELR", or "canonical LR".
660 * lib/timevar.def (TV_IELR_PHASE1): New var.
661 (TV_IELR_PHASE2): New var.
662 (TV_IELR_PHASE3): New var.
663 (TV_IELR_PHASE4): New var.
664 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
665 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
666 Sbitset.h, ielr.h, and ielr.c.
667 * src/getargs.h, src/getargs.c (enum trace, trace_args,
668 trace_types): Add trace_ielr.
669 * src/lalr.h, src/lalr.c (ngotos): Export it.
670 (F): Rename to...
671 (goto_follows): ... this, update all uses, and export it.
672 (set_goto_map): Export it.
673 (map_goto): Export it.
674 (compute_lookahead_tokens): Don't free goto_follows yet. Now
675 handled in ielr.
676 (initialize_LA): Export it. Move lookback allocation to...
677 (lalr): ... here because, for canonical LR, initialize_LA must
678 be invoked but lookback and much of the rest of LALR isn't
679 needed.
680 * main.c (main): Instead of lalr, invoke ielr, which invokes
681 lalr.
682 * src/reader.c (reader): Default lr.type to "LALR".
683 Default lr.default_rules to "accepting" if lr.type is "canonical
684 LR". Leave the default as "all" otherwise.
685 Check for a valid lr.type value.
686 * src/state.h, src/state.c (struct state_list): Add state_list
687 member.
688 (state_new): Initialize state_list member to NULL.
689 (state_new_isocore): New function, exported.
690 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
691 exercises all values of lr.type.
692 (GNU AWK Grammar): Rename test group to...
693 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
694 AT_TEST_EXISTING_GRAMMAR.
695 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
696 (GNU pic Grammar): Rename test group to...
697 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
698 AT_TEST_EXISTING_GRAMMAR.
699 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
700 all values of lr.type.
701 (Single State Split): New test groups using AT_TEST_LR_TYPE.
702 (Lane Split): Likewise.
703 (Complex Lane Split): Likewise.
704 (Split During Added Lookahead Propagation): Likewise.
705
706 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
707
708 Add new files for IELR and canonical LR implementation.
709 * src/AnnotationList.c: New.
710 * src/AnnotationList.h: New.
711 * src/InadequacyList.c: New.
712 * src/InadequacyList.h: New.
713 * src/Sbitset.c: New.
714 * src/Sbitset.h: New.
715 * src/ielr.c: New.
716 * src/ielr.h: New.
717
718 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
719
720 Implement %define lr.default_rules.
721 Its value describes the states that are permitted to contain
722 default rules: "all", "consistent", or "accepting".
723 * src/reader.c (reader): Default lr.default_rules to "all".
724 Check for a valid lr.default_rules value.
725 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
726 is "accepting", then only mark the accepting state as
727 consistent.
728 (initialize_LA): Tell state_lookahead_tokens_count whether
729 lr.default_rules is "accepting".
730 * src/tables.c (action_row): If lr.default_rules is not "all",
731 then disable default rules in inconsistent states.
732 * src/print.c (print_reductions): Use this opportunity to
733 perform some assertions about whether lr.default_rules was
734 obeyed correctly.
735 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
736 helps with checking the parser tables for a grammar.
737 * tests/input.at (%define lr.default_rules invalid values): New
738 test group.
739 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
740 AT_TEST_TABLES_AND_PARSE.
741 (`no %define lr.default_rules'): New test group generated by
742 AT_TEST_LR_DEFAULT_RULES.
743 (`%define lr.default_rules "all"'): Likewise.
744 (`%define lr.default_rules "consistent"'): Likewise.
745 (`%define lr.default_rules "accepting"'): Likewise.
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 2008-12-08 Akim Demaille <demaille@gostai.com>
764
765 Fix portability issue in the test suite.
766 * tests/local.at (AT_MATCHES_CHECK): New.
767 Based on Perl instead of Sed. Sed has too many portability
768 pitfalls, not ever Sed is GNU Sed.
769 * tests/actions.at (Fix user actions without a trailing semicolon):
770 Use it.
771
772 2008-12-07 Di-an Jan <dianj@freeshell.org>
773
774 Implement the FIXME that ends an user action with a semicolon
775 if it seems necessary.
776 * src/scan-code.l (flex rules section): Flag cpp directive from
777 any `#' to the first unescaped end-of-line. Semicolon is not
778 needed after `;', `{', '}', or cpp directives and is needed after
779 any other token (whitespaces and comments have no effect).
780 * tests/actions.at (Fix user actions without a trailing semicolon):
781 New test.
782 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
783 to make user actions complete statements.
784 Adjust column numbers in error messages.
785 * tests/regression.at (Fix user actions without a trailing semicolon):
786 Remove. Covered by new test.
787
788 2009-04-14 Akim Demaille <demaille@gostai.com>
789
790 doc: minor fixes.
791 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
792 (Table of Symbols): Remove duplicate entry for %debug.
793
794 2009-04-10 Eric Blake <ebb9@byu.net>
795
796 submodules: update to latest
797 * submodules/autoconf: Use latest upstream Autoconf.
798
799 2009-04-06 Eric Blake <ebb9@byu.net>
800
801 Work around autoconf 2.63b bug in testsuite.
802 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
803 autoconf bug related to # in test.
804
805 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
806
807 * NEWS (2.5): Describe new -D/--define feature.
808
809 2008-11-10 Akim Demaille <demaille@gostai.com>
810
811 --trace=muscles
812 * src/getargs.h, src/getargs.c (trace_muscle): New.
813 (trace_types, trace_args): Support it.
814 * src/output.c (output_skeleton): Use it.
815
816 2008-11-10 Akim Demaille <demaille@gostai.com>
817
818 muscles_output.
819 * src/output.c (muscles_output): New, extracted from...
820 (output_skeleton): here.
821 Adjust.
822
823 2008-11-21 Akim Demaille <demaille@gostai.com>
824
825 Display the changes in cross-options.texi.
826 * build-aux/cross-options.pl ($sep): New, to separate items.
827 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
828 the changes.
829
830 2008-11-20 Di-an Jan <dianj@freeshell.org>
831
832 Improves options in the manual.
833 * doc/bison.texinfo (-g, -x): Add space before argument.
834 (Option Cross Key): Implement FIXME: listing directives also.
835 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
836 (Short Option): Special case -d. Put arguments inside @option.
837 (Bison Directive): Add column, automatically extracted from
838 src/scan-gram.l (actual name passed as the first argument)
839 with special case for %define.
840 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
841 to build-aux/cross-options.pl.
842 * src/getargs.c (usage): Document limitations of cross-options.pl.
843 * src/scan-gram.l: Likewise.
844
845 2009-02-25 Akim Demaille <demaille@gostai.com>
846
847 Copyright years.
848 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
849
850 2008-12-08 Akim Demaille <demaille@gostai.com>
851
852 Install autoconf as a submodule to get m4sugar.
853 * .gitmodules: Add submodules/autoconf.
854 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
855 submodules/autoconf.
856
857 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 Simplify last patch slightly.
860 * src/getargs.c (getargs): Here.
861
862 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
863
864 Fix last warning from --enable-gcc-warnings.
865 * src/getargs.c (getargs): Don't assign const address to non-const
866 pointer.
867
868 2008-11-17 Di-an Jan <dianj@freeshell.org>
869
870 Handle --enable-gcc-warnings.
871 * src/getargs.c (command_line_location): Set parameters to void.
872
873 2008-11-11 Akim Demaille <demaille@gostai.com>
874
875 AT_FULL_COMPILE.
876 * tests/actions.at, tests/regression.at: Use it.
877
878 2008-11-07 Akim Demaille <demaille@gostai.com>
879
880 Pass command line location to skeleton_arg and language_argmatch.
881 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
882 The location argument is now mandatory.
883 Adjust all dependencies.
884 (getargs): Use command_line_location.
885
886 2008-11-07 Akim Demaille <demaille@gostai.com>
887
888 -D, --define.
889 * src/getargs.c (usage): Document -D.
890 Fix help string for --locations.
891 (command_line_location): New.
892 (short_options, long_options, getargs): Support -D, --define.
893 (getargs): Move -d support at the right place.
894 * doc/bison.texinfo (Bison Options): Update.
895 * tests/input.at (%define, --define): New.
896
897 2008-11-07 Akim Demaille <demaille@gostai.com>
898
899 Initialize the muscle table before parsing the command line.
900 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
901 (getargs): Define file_name.
902 * src/main.c (main): Initialize muscle_tab before calling
903 getargs.
904 * src/muscle_tab.c (muscle_init): No longer define file_name, as
905 its value is not available yet.
906
907 2008-11-09 Akim Demaille <demaille@gostai.com>
908
909 Require the generation of parse-gram.output.
910 * src/Makefile.am (YACC): Pass --report=all.
911
912 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
913
914 * NEWS (2.5): New stub.
915
916 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
917
918 Fix options documentation.
919 * build-aux/cross-options.pl: As in --help output, write optional
920 arguments as [=ARG] not =[ARG].
921 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
922
923 2008-11-07 Akim Demaille <demaille@gostai.com>
924
925 Fix --help.
926 * src/getargs.c (usage): Fix help string for -W.
927
928 2008-11-07 Akim Demaille <demaille@gostai.com>
929
930 Handle more general types of option arguments.
931 * build-aux/cross-options.pl: The argument ends at the first
932 space, not the first non-symbol character.
933 Use @var for each word appearing the argument description.
934
935 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
936
937 Remove spurious initial empty lines.
938 * data/location.cc: End the @output lines with an @.
939
940 2008-11-04 Akim Demaille <demaille@gostai.com>
941
942 Remove spurious initial empty lines.
943 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
944 * data/yacc.c: End the @output lines with an @.
945
946 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
947
948 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
949 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
950 requirements for a correct m4 are stricter.
951 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
952 * configure.ac: Update to use AC_PROG_GNU_M4.
953 Reported by Eric Blake.
954
955 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
956
957 Help with updating web manual.
958 * HACKING: Incorporate instructions from gnulib/doc/README.
959 * bootstrap.conf (gnulib_modules): Add gendocs.
960
961 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
962
963 Fix strange %define locations for default values.
964 Reported by Akim Demaille at
965 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
966 and discussed again starting at
967 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
968 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
969 because location information is bogus.
970 Use angle brackets to delimit fake file name because square brackets
971 look like underexpanded m4. Choose a better fake file name.
972 Use negative line numbers.
973 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
974 * src/location.c (location_print): If line for a boundary is negative,
975 only print that boundary's file name.
976 * src/location.h: Document that.
977 * tests/skeletons.at (%define Boolean variables: invalid skeleton
978 defaults): Update output.
979
980 2008-11-07 Akim Demaille <demaille@gostai.com>
981
982 Locations without columns for command line arguments.
983 * src/location.c (location_print): Don't display negative columns.
984 * src/location.h: Document this.
985
986 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
987
988 Add reminder about uploading public key to keys.gnupg.net.
989 * HACKING (Release Procedure): Here.
990
991 2009-03-31 Akim Demaille <demaille@gostai.com>
992
993 bootstrap: --help to stdout.
994 * bootstrap (usage): Don't send --help to stderr.
995 Use a here doc instead of a long string.
996
997 2009-03-31 Akim Demaille <demaille@gostai.com>
998
999 bootstrap: README-hacking no longer exists
1000 * bootstrap (checkout_only_file): Set to HACKING.
1001
1002 2009-03-26 Akim Demaille <demaille@gostai.com>
1003
1004 doc: merge HACKING and README-hacking.
1005 Two files is confusing.
1006 Reported by Alexandre Duret-Lutz.
1007
1008 * README-hacking: Merge into...
1009 * HACKING (Working from the repository): here.
1010
1011 2009-03-26 Akim Demaille <demaille@gostai.com>
1012
1013 doc: update README-hacking.
1014 * README-hacking: We now use git and git submodules.
1015 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1016
1017 2009-03-26 Akim Demaille <demaille@gostai.com>
1018
1019 lalr1.cc: avoid GCC 4.3 warnings.
1020 GCC 4.3 now warns about "a || b && c" and asks for explicit
1021 parentheses.
1022 Reported by Alexandre Duret-Lutz.
1023 * data/location.cc: Update copyright years.
1024 (Position::operator==): Use parens to make precedence explicit.
1025 Compare lines and columns first, as they are more likely to be
1026 different, and they are faster to compare.
1027
1028 2009-03-26 Akim Demaille <demaille@gostai.com>
1029
1030 gnulib: update.
1031 * gnulib: Update to latest.
1032 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1033 use +=.
1034
1035 2009-01-08 Akim Demaille <demaille@gostai.com>
1036
1037 Fix grep portability issues.
1038 Grep on Solaris does not support -q.
1039 Reported by Summum Bonum.
1040
1041 * NEWS: Add a stub for 2.4.2.
1042 * THANKS: Add Summum Bonum.
1043 * tests/atlocal.in (EGREP): New.
1044 (CC, CXX, XSLTPROC): Make it possible to override them via
1045 envvars.
1046 * tests/java.at: Use $EGREP instead of egrep.
1047 Use AT_CHECK's ignore instead of grep's -q.
1048
1049 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1050
1051 Version 2.4.1.
1052 * NEWS: Set version and date.
1053 * lib/Makefile.am: Update copyright year.
1054 * tests/atlocal.in: Update copyright year.
1055
1056 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1057
1058 Semicolon feature removal is not about future language support.
1059 * NEWS: The semicolon feature is no longer active for newer languages,
1060 so don't claim that it causes trouble for them.
1061
1062 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1063
1064 * gnulib: Update submodule to HEAD.
1065
1066 2008-12-09 Akim Demaille <demaille@gostai.com>
1067
1068 Update data/README.
1069 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1070
1071 2008-12-05 Eric Blake <ebb9@byu.net>
1072
1073 Build testsuite with newer autoconf.
1074 * tests/output.at (m4_expand): Don't override in newer autoconf,
1075 where the underlying implementation changed.
1076 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1077 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1078 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1079 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1080 since some of them contain unbalanced ')'.
1081
1082 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1083
1084 * NEWS: Clarify a little.
1085
1086 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1087
1088 * NEWS: Update for recent changes.
1089
1090 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1091
1092 Fix unexpanded macros in GLR defines file.
1093 Reported by Csaba Raduly at
1094 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1095 * THANKS (Csaba Raduly): Add.
1096 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1097 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1098 lexer in a separate module that includes the defines file.
1099 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1100 source.
1101 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1102 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1103 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1104 (AT_DATA_SOURCE_PROLOGUE): New.
1105 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1106 (AT_DATA_SOURCE): New.
1107 (AT_FULL_COMPILE): New, copied from master branch and extended to
1108 support an additional source file.
1109
1110 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1111
1112 Don't let maintainer-*-check targets force a version update.
1113 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1114 handled.
1115
1116 2008-11-17 Di-an Jan <dianj@freeshell.org>
1117
1118 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1119 Align menus. Adjust word wrapping. Use node names for menu names.
1120 (Examples): Don't abbreviate node names.
1121 (LocalWords): Remove abbreviations.
1122 (Copying): Make description a sentence.
1123 (Java Action Features): Remove period to match the rest of menu.
1124
1125 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1126
1127 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1128 * configure.ac: Adjust usage.
1129 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1130 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1131 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1132
1133 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1134
1135 Don't add a semicolon to actions for %skeleton or %language.
1136 It breaks Java test cases as reported by Akim Demaille.
1137 * src/scan-code.l: Implement.
1138
1139 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1140
1141 Clean up %skeleton and %language priority implementation.
1142 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1143 remove static qualifier because others will soon need to see it.
1144 (language_prio): Likewise.
1145 (getargs): Use command_line_prio rather than 0.
1146 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1147 enum fields.
1148 (skeleton_prio): Extern it.
1149 (language_prio): Extern it.
1150 * src/parse-gram.y: Use grammar_prio rather than 1.
1151
1152 2008-11-04 Akim Demaille <demaille@gostai.com>
1153
1154 * NEWS: Mention the trailing semicolon in action.
1155
1156 2008-11-04 Akim Demaille <demaille@gostai.com>
1157
1158 Reformat NEWS.
1159 * NEWS: Use more outline-mode markup.
1160 Suggested by Jim Meyering.
1161
1162 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1163
1164 Fix user actions without a trailing semicolon.
1165 Reported by Sergei Steshenko at
1166 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1167 * THANKS (Sergei Steshenko): Add.
1168 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1169 * tests/regression.at (Fix user actions without a trailing semicolon):
1170 New test case.
1171
1172 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1173
1174 Initiate further development.
1175 * NEWS: Create an empty section for new entries.
1176 * gnulib: Update submodule to HEAD.
1177
1178 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1179
1180 * NEWS: Version 2.4.
1181
1182 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1183
1184 Prepare for next release.
1185 * NEWS: Briefly mention changes since 2.3b.
1186 * README: Say GNU m4 1.4.6, which we've been requiring in release
1187 announcements already, not 1.4.3, which breaks the build.
1188
1189 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1190
1191 Say %language is experimental.
1192 We're thinking of extending it's effect on output file naming. See the
1193 thread at
1194 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1195 * NEWS: Say it's experimental.
1196 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1197 recommend it over %skeleton for now.
1198 (Bison Options): Likewise.
1199 (C++ Bison Interface): Use %skeleton not %language.
1200 (Calc++ Parser): Use %skeleton not %language.
1201 * src/getargs.c (usage): Say it's experimental.
1202
1203 2008-11-01 Di-an Jan <dianj@freeshell.org>
1204 Paolo Bonzini <bonzini@gnu.org>
1205
1206 Support all Java parser class modifiers.
1207 * data/java.m4 (b4_percent_define_get3): New.
1208 (b4_final_if, b4_strictfp_if): New.
1209 * data/lalr1.java (final, strictfp, extends, implements): Support.
1210 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1211 documentation.
1212 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1213 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1214 (AT_CHECK_JAVA_GREP): New.
1215 (Java parser class modifiers): New test.
1216 (Java parser class extends and implements): New test.
1217
1218 Model exception propagation better with throws and lex_throws.
1219 * data/java.m4 (b4_list2): New.
1220 (throws): Change default.
1221 * data/lalr1.java (yyaction): Add throws.
1222 (parse): Add lex_throws in addition to throws.
1223 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1224 * tests/java.at (Java throws specifications): New test.
1225
1226 Improve documentation for Java parsers.
1227 * doc/bison.texinfo (Java Parsers): Add subsections.
1228 Don't quote first argument of %define.
1229 (Java Bison Interface): Document output files. Move documentation
1230 of parser class and merge into Java Parser Interface. Document
1231 features that error out. Document directives with no effect.
1232 Move note about Javadoc higher.
1233 (Java Semantic Values): Explicitly mention stype.
1234 Document that generic types cannot be used.
1235 (Java Location Values): Use @deftypeivar. Document constructors.
1236 Correct return value for toString.
1237 (Java Parser Interface): List undocumented constants/fields.
1238 Move documentation of fields added by %parse-param closer to list
1239 of members. Document that token names are added as fields.
1240 Document constructors accurately. Remove error method.
1241 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1242 Interface. Describe %code lexer and yylex accutately.
1243 Remove documentation that does not match the code.
1244 (Java Action Features): New.
1245 (Java Differences): Add reference. Add item on semantic values.
1246 Add note about @{ ... @}. Clarify %% epilogue placement.
1247 (Java Declarations Summary): New.
1248
1249 Fix Java skeleton.
1250 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1251 (b4_remove_comma): Quote test argument.
1252 (b4_identification): Remove "bison" field.
1253 * tests/java.at (Java parser class and package names): New test.
1254 (Java %parse-param and %lex-param): New test.
1255 (Java stype, position_class and location_class): New test.
1256
1257 2008-10-31 Di-an Jan <dianj@freeshell.org>
1258
1259 * data/lalr1.jave: Update copyright years.
1260 (YYParser): Correct name of "generated from" file in Javadoc:
1261 use b4_file_name instead of @ofile@.
1262 (Location constructor): Correct Javadoc parameter name.
1263 (yylloc): Add missing opening m4 quote after b4_location_if.
1264 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1265 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1266 (YYParser constructor): Correct Javadoc parameter name.
1267
1268 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1269
1270 Always put auxiliary code files in the same dir as other output files.
1271 * src/files.c (compute_file_name_parts): When the user specifies
1272 --output but not --file-prefix, extract the directory prefix from the
1273 file prefix not from the grammar file name. This affects the location
1274 of files like location.hh generated by the C++ skeleton. The includes
1275 in the other output files require this fix.
1276 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1277 for expected output files.
1278 (Output files): Add a test for the above.
1279
1280 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1281
1282 * gnulib: Update submodule to HEAD.
1283
1284 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1285
1286 Update copyright year.
1287 * src/files.c: Here.
1288
1289 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1290
1291 Don't overwrite the input file.
1292 * src/files.c (output_file_name_check): Fatal error if using input file
1293 for output.
1294 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1295 argument.
1296 (Conflicting output files): Add test.
1297
1298 2008-10-28 Akim Demaille <demaille@gostai.com>
1299
1300 Space changes.
1301 * data/lalr1.cc: Formatting changes.
1302
1303 2008-10-28 Akim Demaille <demaille@gostai.com>
1304
1305 Don't define debugging functions when !YYDEBUG.
1306 * data/lalr1.cc (debug_stream, set_debug_stream)
1307 (debug_level_type, debug_level, set_debug_level): Don't
1308 declare them when YYDEBUG is not defined.
1309 The implementation are already YYDEBUG-aware.
1310
1311 2008-10-28 Akim Demaille <demaille@gostai.com>
1312
1313 Prefer "continue" for empty loop bodies.
1314 * etc/bench.pl.in: Use "continue" instead of {}.
1315
1316 2008-10-28 Akim Demaille <demaille@gostai.com>
1317
1318 Space and comments changes.
1319 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1320 * data/c.m4, data/lalr1.cc: Space changes.
1321
1322 2008-10-28 Akim Demaille <demaille@gostai.com>
1323
1324 Make gnulib a submodule.
1325 * gnulib: New.
1326 * .gitmodules (gnulib): New.
1327
1328 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1329
1330 Fix yyerror_range for user-defined location type in C++. Reported by
1331 Georg Sauthoff at
1332 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1333 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1334 * THANKS (Georg Sauthoff): Add.
1335
1336 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1337
1338 Update several administrative files mainly to facilitate releasing.
1339 * HACKING (Administrivia): Make the git-merge-changelog notes more
1340 helpful.
1341 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1342 (Release Procedure): Update for git and add numerous details that were
1343 previously missing.
1344 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1345 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1346 that announcements don't claim we bootstrapped with whatever bison
1347 happened to be in PATH. Add flex as a bootstrap tool.
1348 * Makefile.maint: Remove, previously replaced by maint.mk.
1349 * Makefile.cfg: Remove, and migrate settings to...
1350 * cfg.mk: ... here for the sake of `make announcement'.
1351 * bootstrap.conf (gnulib_modules): Add announce-gen.
1352 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1353 Berry.
1354
1355 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1356
1357 Small but important bugfixes for the Java skeleton.
1358 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1359 (yy_symbol_print): Call toString on yyvaluep.
1360
1361 2008-08-29 Akim Demaille <demaille@gostai.com>
1362
1363 Clarify UPDATED use.
1364 * doc/bison.texinfo: It refers to the last edition of this file,
1365 not to the release date of Bison.
1366 Reported by Joel E. Denny.
1367
1368 2008-08-29 Akim Demaille <demaille@gostai.com>
1369
1370 * README: Update FAQ pointer.
1371 Reported by Joel E. Denny.
1372
1373 2008-08-27 Eric Blake <ebb9@byu.net>
1374
1375 Resync m4sugar from autoconf.
1376 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1377 (m4_init): Adjust to latest m4.git changes.
1378 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1379 effects.
1380 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1381 (_m4_list_cmp): Reduce side effects.
1382
1383 2008-08-27 Akim Demaille <demaille@gostai.com>
1384
1385 Check yyerrok in calc.at.
1386 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1387 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1388 expected.
1389
1390 2008-08-27 Akim Demaille <demaille@gostai.com>
1391
1392 Support yyerrok in lalr1.cc.
1393 YYBACKUP is still to import back into lalr1.cc.
1394 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
1395
1396 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1397
1398 For maintainer-check*, don't recompile for a $(VERSION) update.
1399 * cfg.mk: New file.
1400 (_is-dist-target): Override the one in GNUmakefile.
1401 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1402
1403 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1404
1405 Update for recent change to gnulib.
1406 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1407 string.h now.
1408
1409 2008-08-15 Eric Blake <ebb9@byu.net>
1410
1411 Remaining m4sugar merge from autoconf.
1412 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1413 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1414 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1415 * src/output.c (output_skeleton): Tell m4 how to find it.
1416
1417 Partial m4sugar merge from autoconf: m4_map.
1418 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1419 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1420 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1421 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1422 for empty list.
1423 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1424 Likewise.
1425 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1426 declares it.
1427
1428 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1429
1430 Keep .version and PACKAGE_VERSION in sync.
1431 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1432 dependency, and add comments justifying this in more detail. Discussed
1433 starting at
1434 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1435
1436 2008-08-06 Eric Blake <ebb9@byu.net>
1437
1438 Partial m4sugar merge from autoconf: m4_shiftn.
1439 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1440 (m4_shift2, m4_shift3): New macros.
1441 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1442 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1443 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1444 * data/java.m4 (b4_remove_comma): Likewise.
1445
1446 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1447 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1448 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1449 (m4_init): Consolidate wrapped text into single m4_wrap.
1450 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1451 in wrapped text.
1452
1453 2008-08-05 Eric Blake <ebb9@byu.net>
1454
1455 Partial m4sugar merge from autoconf: builtins, version.m4.
1456 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1457 (m4_prepend): Remove, as it is unused and inherently quadratic,
1458 whereas m4_append is linear in newer m4.
1459 (m4_mkstemp): New builtin.
1460 (m4_symbols): Make rename conditional.
1461 (m4_version_prereq): Ensure fatal error if used in bison, which
1462 intentionally lacks version.m4.
1463
1464 Fix comments in m4sugar.
1465 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1466
1467 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1468
1469 Update for recent .gitignore fix in Gnulib.
1470 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1471 anchored .gitignore entries.
1472
1473 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 Set gnu or gnits strictness.
1476 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1477 development and gnits strictness for releases. Based on Eric Blake's
1478 suggestion at
1479 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1480
1481 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1482
1483 * NEWS: Clarify documentation of %language.
1484
1485 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1486
1487 Support usage of git-merge-changelog.
1488 * .gitattributes: New.
1489 * HACKING: Document usage of git-merge-changelog.
1490 * bootstrap: Install git-merge-changelog entries in .git/config
1491 if appropriate.
1492
1493 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1494
1495 Remove remaining dependence on CVS Id keyword.
1496 * ChangeLog: For the sake of people still using CVS, don't use dollars
1497 when mentioning Id.
1498 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1499 unusual anyway.
1500 * data/xslt/xml2dot.xsl: Likewise.
1501 * data/xslt/xml2text.xsl: Likewise.
1502 * data/xslt/xml2xhtml.xsl: Likewise.
1503 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1504 * doc/Makefile.am (neutralize): Remove, no longer needed.
1505 (.x.1): Don't use neutralize.
1506 (edit): Don't substitute for ID.
1507 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1508
1509 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1510
1511 Fix dependence on computed configure variables.
1512 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1513 $(top_srcdir)/configure.ac so that changes to computed variables, such
1514 as PACKAGE_VERSION, are seen.
1515 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1516
1517 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1518
1519 Update copyright dates for recent changes.
1520 * Makefile.am: Here.
1521 * src/Makefile.am: Here.
1522 * src/reduce.c: Here.
1523 * tests/reduce.at: Here.
1524
1525 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1526
1527 Use git-version-gen for version names between releases.
1528 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1529 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1530 * .prev-version: New.
1531 * .version.in: Remove.
1532 * ChangeLog: Remove the Id previously used for capturing the CVS
1533 revision.
1534 * GNUmakefile: Remove, now copied from Gnulib.
1535 * Makefile.am: Add code suggested by comments in
1536 build-aux/git-version-gen.
1537 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1538 .prev-version, and .version.
1539 * NEWS (2.3b+): Rename to...
1540 (?.?): ... this because we're dropping the "+" version naming scheme,
1541 but, in general, we still can't be sure of our next release name.
1542 * bootstrap: Add a quick hack to remove from .gitignore the
1543 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1544 entry. This should really be fixed in gnulib instead.
1545 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1546 * configure.ac (AC_INIT): Set version name by invoking
1547 build-aux/git-version-gen.
1548 (AC_CONFIG_FILES): Remove .version, now generated by
1549 build-aux/git-version-gen.
1550 * maint.mk: New, copied from coreutils.
1551 * doc/.cvsignore (bison.1): Add.
1552 * doc/.gitignore (/bison.1): Add.
1553 * doc/bison.1: Remove, generated.
1554 * src/.cvsignore (revision.c): Remove.
1555 * src/.gitignore (/revision.c): Remove.
1556 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1557 (BUILT_SOURCES): Remove revision.c.
1558 (revision.c): Remove.
1559 * src/getargs.c (version): Don't print revision after the VERSION.
1560 * src/revision.h: Remove.
1561
1562 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1563
1564 Fix untranslatable composition of sentences. Reported by Goran
1565 Uddeborg at
1566 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1567 * THANKS (Goran Uddeborg): Add.
1568 * src/reduce.c (reduce_print): Report the number of nonterminals and
1569 rules useless in the grammar in separate sentences.
1570 * tests/reduce.at (Useless Rules): Update output.
1571 (Reduced Automaton): Likewise.
1572 (Underivable Rules): Likewise.
1573 (Empty Language): Likewise.
1574
1575 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1576
1577 Fix some .gitignore and .cvsignore problems.
1578 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1579 (insert_vc_ignore): ... this new function, which prepends `/' to all
1580 .gitignore entries before passing them to insert_sorted_if_absent.
1581 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1582 .cvsignore files are maintained even though Bison developers run
1583 bootstrap while using Git.
1584 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1585 unneeded by Bison.
1586 (gnulib): Add.
1587 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1588 unneeded. Reported by Eric Blake.
1589 * lib/.gitignore (/*~): Add.
1590 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1591 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1592 Blake.
1593 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1594
1595 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1596
1597 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
1598 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
1599 * bootstrap.conf (gnulib_modules): Add unsetenv.
1600 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
1601 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
1602 (/setenv.m4): Add.
1603 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
1604 the first argument because it may become position-dependent, and unset
1605 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
1606 Add comments explaining these issues in more detail.
1607
1608 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 Add .gitignore everywhere based on .cvsignore.
1611 * .gitignore: New.
1612 * build-aux/.gitignore: New.
1613 * data/.gitignore: New.
1614 * doc/.gitignore: New.
1615 * etc/.gitignore: New.
1616 * examples/.gitignore: New.
1617 * examples/calc++/.gitignore: New.
1618 * lib/.gitignore: New.
1619 * m4/.gitignore: New.
1620 * po/.gitignore: New.
1621 * runtime-po/.gitignore: New.
1622 * src/.gitignore: New.
1623 * tests/.gitignore: New.
1624
1625 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1626
1627 * NEWS (2.3b+): New section, empty for now.
1628 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
1629
1630 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1631
1632 * NEWS (2.3b): Update release date since there has been a delay in
1633 getting the announcements and tarballs out.
1634
1635 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1636
1637 * NEWS: Version 2.3b.
1638 * configure.ac (AC_INIT): Likewise.
1639 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
1640
1641 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1642
1643 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
1644 been doing it for years.
1645 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
1646 (Release Procedure): Add FIXME about make alpha being unmaintained.
1647
1648 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
1649
1650 * data/yacc.c: Reformat m4 a little for readability.
1651 * src/lalr.c (build_relations): Correct comment.
1652
1653 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1654
1655 DJGPP specific issue.
1656 * djgpp/config.sed: Fixes required to run configure scripts generated
1657 by autoconf 2.62.
1658
1659 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1660
1661 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
1662 coordinator@translationproject.org.
1663
1664 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1665
1666 * THANKS: Add Eric Blake.
1667
1668 2008-04-23 Eric Blake <ebb9@byu.net>
1669
1670 Revert prior patch, by working around autoconf regression.
1671 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1672 ("Output file name: ("): Uncomment test.
1673 ("Output file name: )"): Likewise.
1674 Based on an idea from Noah Misch.
1675
1676 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1677
1678 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1679 2.61. Reported by Juan Manuel Guerrero at
1680 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1681 * tests/output.at ("Output file name: ("): Comment out test case for
1682 now.
1683 ("Output file name: )"): Likewise.
1684
1685 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1686
1687 * GNUmakefile: Update git-version-gen invocation so make dist
1688 succeeds.
1689
1690 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1691
1692 Update to the current gnulib CVS repository, and fix trigraph handling
1693 in Bison.
1694 * bootstrap: Update gnulib CVS repository URL.
1695 (symlink_to_dir): Encapsulate the code that guarantees the destination
1696 directory exists into...
1697 (check_dst_dir): ... this new function, and...
1698 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
1699 fail when copying files into lib/uniwidth/.
1700 * src/output.c (prepare_symbols): When writing yytname muscles, where
1701 symbol names will be encoded in C-string literals, tell quotearg to
1702 escape trigraphs. This used to be the default in gnulib.
1703 * tests/regression.at (Token definitions): Because of the change in
1704 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
1705 escapes trigraphs in symbol names. Thus, yytname no longer has
1706 trigraphs unnecessarily doubly escaped. Update test case output.
1707 Extend test case to be sure Bison's own error messages will no longer
1708 have trigraphs in symbol names unnecessarily escaped once.
1709
1710 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1711
1712 Fix make dist infinite loop reported by Juan Manuel Guerrero at
1713 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
1714 * .cvsignore: Add .version.
1715 * .version.in: New.
1716 * bootstrap.conf (gnulib_modules): Add git-version-gen.
1717 * configure.ac (AC_CONFIG_FILES): Add .version.
1718 * build-aux/.cvsignore: Add git-version-gen.
1719
1720 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1721
1722 * NEWS (2.3a+): Mention that -g now takes an argument.
1723 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
1724 consistency. Update the -g and -x entries now that they take
1725 arguments. Use brackets to indicate optional arguments.
1726 * src/getargs.c (usage): Explain the relationship between arguments of
1727 long and short options more completely. Document --defines and -d
1728 separately since the former takes an argument but, for POSIX Yacc, the
1729 latter does not.
1730 (short_options): Let -W take an optional argument like --warnings.
1731 (getargs): Sort cases.
1732
1733 2008-02-28 Akim Demaille <demaille@gostai.com>
1734
1735 * doc/bison.texinfo: Fix a few typos.
1736
1737 2008-02-28 Akim Demaille <akim@epita.fr>
1738
1739 * doc/bison.texinfo (Bison Options): Document -W.
1740 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
1741
1742 2008-02-28 Akim Demaille <akim@epita.fr>
1743
1744 * src/getargs.c (short_options): Split and sort for readability.
1745 -g and -x take optional arguments, just like their long options.
1746 * build-aux/cross-options.pl: Use /x to make the regexp easier to
1747 understand.
1748 Fix the handling of $opt which resulted in all the argument to be
1749 considered as optional.
1750
1751 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1752
1753 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
1754 say its interface is experimental.
1755 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1756 Java.
1757 (Bison Options): In the -L and --language entry, mention Java.
1758 (Java Bison Interface): Say the interface is experimental.
1759 * src/getargs.c (usage): Mention -L and --language.
1760
1761 * NEWS (2.3a+): Say the push parsing interface is experimental.
1762 * doc/bison.texinfo (Push Decl): Likewise.
1763 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1764 (Push Parser Function): Likewise.
1765 (Pull Parser Function): Likewise.
1766 (Parser Create Function): Likewise.
1767 (Parser Delete Function): Likewise.
1768 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1769 yypull_parse, and yypush_parse entries.
1770
1771 * NEWS (2.3a+): Mention XML support, and say the schema is
1772 experimental.
1773 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1774 * src/getargs.c (usage): Say the XML schema is experimental.
1775
1776 * NEWS (2.3a+): Say option instead of flag.
1777
1778 2008-02-21 Wojciech Polak <polak@gnu.org>
1779
1780 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1781 text.
1782
1783 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1784
1785 Fix impure push parser compile error reported by Bob Rossi at
1786 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1787 * data/yacc.c: Clean up whitespace in the output a little.
1788 (yypstate_allocated): Define for impure push parsers regardless of
1789 whether the pull interface is also requested.
1790 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1791 check impure push parsers without the pull interface.
1792
1793 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1794 yyerror takes arguments specified by %parse-param while yypstate_new
1795 does not.
1796 * doc/bison.texinfo (Parser Create Function): Document that
1797 yypstate_new returns 0 for multiple impure parser instances.
1798 * tests/push.at (Push Parsing: Multiple impure instances): Update
1799 expected stderr output.
1800
1801 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1802
1803 * runtime-po/POTFILES.in (push.c): Remove.
1804
1805 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1806
1807 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1808 * data/push.c: Rename to...
1809 * data/yacc.c: ... this, overwriting it.
1810 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1811 `%push-pull-parser' -> `%define api.push_pull "both"'.
1812 Remove old yacc.c tests, and update push.c tests to yacc.c.
1813
1814 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1815
1816 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1817 `"%code top" blocks' instead of `%code "top" blocks'.
1818 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1819 Clean up whitespace in the output a little.
1820
1821 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1822
1823 Fix documentation problems reported by Tim Josling at
1824 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1825 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1826 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1827 integers. Explain the effect of literal string aliases on error
1828 messages. Copy token 0 documentation from the C++ skeleton
1829 documentation.
1830
1831 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1832
1833 Accept a token number in a %left, %right, or %nonassoc for POSIX
1834 conformance. Reported by Tim Josling at
1835 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1836 * NEWS (2.3a+): Mention.
1837 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1838 and code numbers are treated by precedence declarations.
1839 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1840 of symbols.1.
1841 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1842 of symbol.
1843 (symbol.prec): New, just like symbol but allows INT.
1844 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1845 longer holds.
1846 * tests/regression.at (Token number in precedence declaration): New
1847 test case.
1848
1849 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1850
1851 DJGPP specific issues.
1852 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1853 be changed. Copyright timestamp adjusted.
1854 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1855 be changed. Copyright timestamp adjusted.
1856 * djgpp/config.site: Copyright timestamp adjusted.
1857 * djgpp/config_h.sed: Copyright timestamp adjusted.
1858 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1859 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1860 filename translation list.
1861 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1862 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1863 files shall be created. Before trying to use the temp dir where the
1864 environment variable points to check that the dir really exists. If
1865 not default to the cwd as temp dir. Copyright timestamp adjusted.
1866 * djgpp/subpipe.h: Copyright timestamp adjusted.
1867 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1868
1869 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1870
1871 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1872
1873 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1874
1875 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1876 Problem reported by Claudio Saavedra in
1877 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1878
1879 2008-01-05 Wojciech Polak <polak@gnu.org>
1880
1881 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1882 document's title with the input grammar file name.
1883
1884 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1885
1886 Automate regression testing of the XML/XSLT implementation. Discussed
1887 starting at
1888 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1889 * configure.ac (XSLTPROC): New substitution.
1890 * Makefile.am (maintainer-xml-check): New phony target invoking...
1891 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1892 invoking make maintainer-check with BISON_TEST_XML=1.
1893 * tests/atlocal.in (XSLTPROC): New.
1894 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1895 not to report reachable memory when Bison is expected to have a
1896 non-zero exit status and (2) to compare XML/XSLT output with --graph
1897 and --report=all output for every working grammar when
1898 BISON_TEST_XML=1.
1899 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1900 (AT_BISON_CHECK_XML): New.
1901 (AT_QUELL_VALGRIND): New.
1902 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1903 (AT_CHECK): ... don't redefine this since this was the old way to
1904 quell Valgrind.
1905 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1906 AT_BISON_CHECK invocations.
1907 * tests/c++.at: Likewise.
1908 * tests/calc.at: Likewise.
1909 * tests/conflicts.at: Likewise.
1910 * tests/cxx-type.at: Likewise.
1911 * tests/existing.at: Likewise.
1912 * tests/glr-regression.at: Likewise.
1913 * tests/headers.at: Likewise.
1914 * tests/input.at: Likewise.
1915 * tests/java.at: Likewise.
1916 * tests/output.at: Likewise.
1917 * tests/push.at: Likewise.
1918 * tests/reduce.at: Likewise.
1919 * tests/regression.at: Likewise.
1920 * tests/sets.at: Likewise.
1921 * tests/skeletons.at: Likewise.
1922 * tests/synclines.at: Likewise.
1923 * tests/torture.at: Likewise.
1924 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1925 tends to hang xsltproc.
1926 (Big horizontal): Likewise.
1927
1928 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1929
1930 In XML output, remove redundant class attribute on symbol element.
1931 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1932 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1933 look up a symbol to determine whether it's a nonterminal or terminal.
1934 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1935 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1936
1937 Add prec/assoc information to XML output.
1938 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1939 %prec, add a percent_prec attribute.
1940 * src/print-xml.c (print_grammar): For each terminal that has a
1941 precedence or associativity, add a prec or assoc attribute.
1942 (xml_indent): New.
1943 (xml_puts): Use xml_indent.
1944 (xml_printf): Use xml_indent.
1945 * src/print-xml.h (xml_indent): Prototype.
1946
1947 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1948 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1949
1950 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1951
1952 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1953 (bison:ruleByNumber): ... this for clarity.
1954 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1955 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1956 (xsl:template match="reduction"): Update.
1957 (xsl:template match="item"): Update.
1958 (xsl:template match="reduction"): Update.
1959
1960 In the XML output, don't print the list of rules where symbols appear.
1961 Compute it in XSLT instead. Discussed at
1962 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1963 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1964 (bison:ruleByRhs): New.
1965 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1966 bison:ruleByRhs.
1967 (xsl:template match="terminal/rule"): Remove.
1968 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1969 bison:ruleByRhs.
1970 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1971 Remove.
1972 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1973 bison:ruleByRhs and mode="number-link" for rule template.
1974 (xsl:template match="terminal/rule"): Remove.
1975 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1976 bison:ruleByRhs and mode="number-link" for rule template.
1977 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1978 Rewrite as...
1979 (xsl:template match="rule" mode="number-link"): ... this.
1980 * src/print-xml.c (print_grammar): Don't print the list of rules.
1981
1982 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1983
1984 Don't let --report affect XML output; always print all information.
1985 Discussed at
1986 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1987 * src/conflicts.c (log_resolution): Implement.
1988 * src/print-xml.c (print_core): Implement.
1989 (print_state): Implement.
1990 (print_xml): Implement.
1991
1992 * NEWS (2.3a+): Fix quotes.
1993 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1994 don't let %verbose clear the list specified by --report.
1995
1996 2007-11-26 Akim Demaille <akim@epita.fr>
1997
1998 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1999
2000 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 In the XML output, list useless and unused symbols and rules with the
2003 useful ones and add a "usefulness" attribute. Discussed starting at
2004 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2005 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2006 (grammar_rules_print_xml): Print all rules instead of just those
2007 useful in the grammar, and add a "usefulness" attribute.
2008 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2009 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2010 (print_grammar): Print all nonterminals instead of just useful ones,
2011 and add a "usefulness" attribute to nonterminals and terminals.
2012 (print_xml): Don't print a separate "reductions" or
2013 "rules-useless-in-parser" element.
2014 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2015 (reduce_xml): Remove.
2016 (reduce_token_unused_in_grammar): New.
2017 (reduce_nonterminal_useless_in_grammar): New.
2018 * src/reduce.h (reduce_xml): Remove prototype.
2019 (reduce_token_unused_in_grammar): Add prototype.
2020 (reduce_nonterminal_useless_in_grammar): Add prototype.
2021 * data/xslt/xml2text.xsl: Update for XML changes.
2022 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2023 * tests/reduce.at (Useless Terminals): Update output.
2024 (Useless Rules): Update output.
2025 (Reduced Automaton): Update output.
2026
2027 Say "Terminals unused in grammar" instead of "Unused terminals".
2028 * NEWS (2.3a+): Update.
2029 * doc/bison.texinfo (Understanding): Update example output.
2030 * src/reduce.c (reduce_output): Implement.
2031 * data/xslt/xml2text.xsl: Implement.
2032 * data/xslt/xml2xhtml.xsl: Implement.
2033
2034 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2035
2036 Accept --report-file=FILE to override the default `.output' filename.
2037 * NEWS (2.3a+): Mention.
2038 * doc/bison.texinfo (Bison Options): Add an entry.
2039 * src/files.c (compute_output_file_names): Don't override
2040 spec_verbose_file if already set.
2041 * src/getargs.c (usage): Document --report-file.
2042 (REPORT_FILE_OPTION): New anonymous enum member.
2043 (long_options): Add entry for it.
2044 (getargs): Add case for it setting spec_verbose_file.
2045
2046 * build-aux/cross-options.pl: Don't record a short option just because
2047 there's an arg.
2048 * doc/.cvsignore: Add yacc.1.
2049
2050 2007-11-14 Akim Demaille <akim@epita.fr>
2051
2052 * doc/yacc.1.in: New.
2053 * configure.ac, doc/Makefile.am: Adjust.
2054 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2055 config.h symbol.
2056 Use AC_SUBST for assignments too.
2057 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2058
2059 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2060
2061 * src/gram.c: Remove comments that duplicate comments in gram.h.
2062
2063 When reporting useless rules and nonterminals, say "useless in grammar"
2064 instead of "useless", and say "useless in parser" instead of "never
2065 reduced". Discussed starting at
2066 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2067 * NEWS (2.3a+): Mention this change.
2068 * data/xslt/xml2text.xsl: Update output text and expected input XML
2069 element names to match changes below.
2070 * data/xslt/xml2xhtml.xsl: Likewise.
2071 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2072 Contents: "Rules useless in parser due to conflicts".
2073 * doc/bison.texinfo (Decl Summary): Reword a little.
2074 (Understanding): Update example output for changes below.
2075 * src/gram.c: (rule_useful_p): Rename to...
2076 (rule_useful_in_grammar_p): ... this.
2077 (rule_useless_p): Rename to...
2078 (rule_useless_in_grammar_p): ... this.
2079 (rule_never_reduced_p): Rename to...
2080 (rule_useless_in_parser_p): ... this.
2081 (grammar_rules_print): Update for renames.
2082 (grammar_rules_print_xml): Update for renames.
2083 (grammar_rules_never_reduced_report): Rename to...
2084 (grammar_rules_useless_report): ... this since it is used for either
2085 kind of useless rule.
2086 * src/gram.h: Reword comments and update function names in prototypes.
2087 * src/main.c (main): Say "rule useless in parser due to conflicts".
2088 * src/print-xml.c (print_rules_never_reduced): Rename to...
2089 (print_rules_useless_in_parser): ... this, and rename output XML
2090 element "rules-never-reduced" to "rules-useless-in-parser".
2091 (print_xml): Update for rename.
2092 * src/print.c (print_results): Say "Rules useless in parser due to
2093 conflicts".
2094 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2095 (nonterminals_reduce): Say "nonterminal useless in grammar".
2096 (reduce_output): Say "Nonterminals useless in grammar".
2097 Say "Rules useless in grammar".
2098 (reduce_xml): Rename output XML element "useless" to
2099 "useless-in-grammar".
2100 (reduce_print): Don't report the count of grammatically useless rules
2101 as "rules never reduced" just because %yacc is specified.
2102 In the correct report of this count, say nonterminal(s) and rule(s)
2103 "useless in grammar".
2104 * tests/conflicts.at (S/R in initial): Update expected output.
2105 (Defaulted Conflicted Reduction): Likewise.
2106 (Unreachable States After Conflict Resolution): Likewise.
2107 * tests/existing.at (GNU pic Grammar): Likewise.
2108 * tests/reduce.at (Useless Nonterminals): Likewise.
2109 (Useless Rules): Likewise.
2110 (Reduced Automaton): Likewise.
2111 (Underivable Rules): Likewise.
2112 (Empty Language): Likewise.
2113
2114 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2115
2116 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2117 here document and before the EOF so that BSD's implementation of Bourne
2118 shell doesn't parse the delimiter as part of the here document.
2119 * doc/.cvsignore: Add cross-options.texi.
2120 * src/getargs.c (usage): Add a blank line after the warning categories.
2121
2122 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2123
2124 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2125
2126 2007-11-05 Akim Demaille <akim@epita.fr>
2127
2128 Remove Id: from bison.1.
2129 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2130 (perl -0777 -pi -e 's/\.PP\nId): New.
2131 (.x.1): Use it to ignore the version control revision.
2132
2133 2007-11-05 Akim Demaille <demaille@gostai.com>
2134
2135 * build-aux/Makefile.am: Ship cross-options.pl.
2136 * doc/Makefile.am: Always refer to cross-options.texi with
2137 $(srcdir).
2138 (MAINTAINERCLEANFILES): Add it.
2139
2140 2007-11-04 Akim Demaille <demaille@gostai.com>
2141
2142 Generate the long/short option cross-table.
2143 * build-aux/cross-options.pl: New.
2144 * doc/Makefile.am (cross-options.texi): New.
2145 * doc/bison.texinfo: Use it.
2146
2147 2007-11-04 Akim Demaille <demaille@gostai.com>
2148
2149 Generate bison.1 using help2man.
2150 * doc/common.x, doc/bison.x: New.
2151 * doc/Makefile.am (bison.1, .x.1): New.
2152 The code is taken from autoconf-2.61/man/Makefile.am.
2153 * configure.ac: Look for help2man.
2154
2155 2007-11-04 Akim Demaille <demaille@gostai.com>
2156
2157 Complete --help.
2158 * src/getargs.c (usage): Document -W, make it clear that -d,
2159 -g and -x have optional arguments.
2160
2161 2007-11-04 Akim Demaille <demaille@gostai.com>
2162
2163 Find sha1sum when named gsha1sum.
2164 * bootstrap (find_tool): New.
2165 ($SHA1SUM): New.
2166
2167 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2168
2169 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2170 at
2171 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2172 * NEWS (2.3a+): Mention.
2173 * data/bison.m4 (b4_pure_if): Don't define it here.
2174 * data/c.m4 (b4_identification): Depend on individual skeletons to
2175 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2176 values of the %define variables api.pure or api.push_pull. Define
2177 YYPURE, YYPUSH, and YYPULL accordingly.
2178 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2179 glr.cc has already defined b4_pure_flag.
2180 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2181 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2182 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2183 * doc/bison.texinfo (Pure Decl): Update.
2184 (Push Decl): Update.
2185 (Decl Summary): Add api.pure to %define entry.
2186 In %pure-parser entry, say it's deprecated and reference %define.
2187 (Pure Calling): Update.
2188 (Error Reporting): Update.
2189 (C++ Scanner Interface): Update.
2190 (How Can I Reset the Parser): Update.
2191 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2192 reference %define.
2193 * src/getargs.c (pure_parser): Remove global variable.
2194 * src/getargs.h (pure_parser): Remove extern.
2195 * src/output.c (prepare): Don't define pure_flag muscle.
2196 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2197 wrapper around `%define api.pure'.
2198 * tests/calc.at (Simple LALR Calculator): Update.
2199 (Simple GLR Calculator): Update.
2200 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2201 Update.
2202 (GLR: Resolve ambiguity, pure, locations): Update.
2203 (GLR: Merge conflicting parses, pure, no locations): Update.
2204 (GLR: Merge conflicting parses, pure, locations): Update.
2205 * tests/glr-regression.at (Uninitialized location when reporting
2206 ambiguity): Update
2207 * tests/input.at (Unused %define api.pure): New test case.
2208 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2209 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2210 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2211
2212 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2213
2214 %define push_pull -> %define api.push_pull. Discussed starting at
2215 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2216 * data/push.c: Expect the new name.
2217 * data/yacc.c: Likewise.
2218 * doc/bison.texinfo (Push Decl): Update.
2219 (Decl Summary): Update %define entry.
2220 (Push Parser Function): Update.
2221 (Pull Parser Function): Update.
2222 (Parser Create Function): Update.
2223 (Parser Delete Function): Update.
2224 * tests/calc.at (Simple LALR Calculator): Update.
2225 * tests/input.at (%define enum variables): Update.
2226 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2227 (Push Parsing: Multiple impure instances): Update.
2228 (Push Parsing: Unsupported Skeletons): Update.
2229 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2230 (Exploding the Stack Size with Malloc): Update.
2231
2232 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2233 other entries some.
2234
2235 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2236
2237 For the XML output's terminal element, rename @number to @token-number,
2238 and add @symbol-number. In the nonterminal element, rename @number to
2239 @symbol-number. Discussed starting at
2240 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2241 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2242 renames.
2243 (xsl:template match="nonterminal"): Likewise.
2244 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2245 (xsl:template match="nonterminal"): Likewise.
2246 * src/print-xml.c (print_grammar): Implement.
2247
2248 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2249
2250 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2251 2007-10-11 change, the child elements here are items not rules.
2252 (xsl:template match="item"): New.
2253 (xsl:template match="rule"): Update for new reduced itemset.
2254 (xsl:template match="point"): Remove.
2255 (xsl:template match="empty"): For consistency with --graph, don't
2256 output "/* empty */".
2257 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2258 line-wrap, don't pass a negative value as first-line-length since this
2259 won't work with the following changes.
2260 (xsl:template name="line-wrap"): Simplify slightly.
2261 (xsl:template name="ws-search"): Eliminate recursion.
2262 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2263 set next to an item whose dot is not at the end of the RHS even if it
2264 happens to be associated with the same rule.
2265
2266 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2267
2268 Add %define lr.keep_unreachable_states.
2269 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2270 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2271 * src/main.c (main): Implement it.
2272 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2273 Extend to test it, and fix a typo.
2274
2275 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2276
2277 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2278 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2279 the example .output text.
2280 * tests/regression.at (Extra lookahead sets in report): Improve wording
2281 of comments.
2282
2283 2007-10-17 Wojciech Polak <polak@gnu.org>
2284
2285 * src/print-xml.c (print_grammar): Renamed
2286 <terminal> and <nonterminal> attributes:
2287 "type" to "number" and "symbol" to "name".
2288 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2289 Use new attribute names.
2290 (xsl:template match="nonterminal"): Likewise.
2291 * data/xslt/xml2xhtml.xsl: Likewise.
2292
2293 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2294
2295 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2296 (Option Cross Key): Likewise.
2297
2298 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2299 next to an item whose dot is not at the end of the RHS even if it
2300 happens to be associated with the same rule.
2301 * src/print.c (print_core): Likewise.
2302 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2303 (Resolved SR Conflicts): Update output.
2304 * tests/regression.at (Extra lookahead sets in report): New test case.
2305
2306 2007-10-11 Wojciech Polak <polak@gnu.org>
2307
2308 * src/print-xml.c (print_core): Remove item set
2309 redundancy.
2310 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2311 Improve processing time. Suggested by Joel E. Denny.
2312 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2313 Write xsl:param "required" attribute as comment.
2314 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2315 (xsl:template match="rule"): Support new reduced itemset.
2316 (xsl:template match="point"): Remove.
2317 * data/xslt/xml2xhtml.xsl: Likewise.
2318
2319 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2320
2321 * src/getargs.c (version): Update copyright year.
2322
2323 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2324
2325 Make xml2dot.xsl and --graph produce the same output.
2326 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2327 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2328 escaped later.
2329 (xsl:template name="output-node"): Use the new escape template instead
2330 of the string-replace template directly.
2331 (xsl:template name="output-edge"): Likewise.
2332 (xsl:template name="escape"): New, escapes backslashes and newlines in
2333 addition to quotation marks.
2334 * src/graphviz.c (start_graph, output_node, output_edge): Add
2335 whitespace to output for legibility.
2336
2337 Make xml2text.xsl and --report produce the same output, and remove the
2338 XML "conflicts" element since a conflict summary is easily extracted
2339 from the automaton.
2340 * data/xslt/bison.xsl: New.
2341 (xsl:template match="state" mode="bison:count-conflicts): New.
2342 * data/xslt/xml2text.xsl: Import bison.xsl.
2343 (xsl:template match="bison-xml-report"): Instead of styling the
2344 "conflicts" element, style the "automaton" element with mode
2345 "conflicts". Unlike the former, the latter lists S/R and R/R
2346 conflicts for a state on the same line.
2347 (xsl:template match="conflicts"): Remove.
2348 (xsl:template match="conflict"): Remove.
2349 (xsl:template match="terminal"): Line-wrap the list of rules in which
2350 the terminal is used.
2351 (xsl:template match="nonterminal"): Likewise for nonterminals.
2352 (xsl:template match="automaton" mode="conflicts"): New.
2353 (xsl:template match="state" mode="conflicts"): New.
2354 (xsl:template name="line-wrap"): New.
2355 (xsl:template name="ws-search"): New.
2356 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2357 (xsl:template match="bison-xml-report"): Instead of styling the
2358 "conflicts" element, style the "automaton" element with mode
2359 "conflicts."
2360 (xsl:template match="conflicts"): Remove.
2361 (xsl:template match="conflict"): Remove.
2362 (xsl:template match="automaton" mode="conflicts"): New.
2363 (xsl:template match="state" mode="conflicts): New.
2364 * src/conflicts.c (conflicts_output_xml): Remove.
2365 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2366 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2367 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2368 the corresponding XSLT is easier. Also, never wrap between a word and
2369 the comma that follows it.
2370
2371 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2372
2373 Improve C++ namespace support. Discussed starting at
2374 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2375 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2376 b4_namespace_close): New macros that interpret the %define variable
2377 "namespace" so its value can contain "::" to indicate nested
2378 namespaces.
2379 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2380 the above macros.
2381 * data/lalr1.cc (b4_namespace): Likewise.
2382 * data/location.cc (b4_namespace): Likewise.
2383 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2384 inside a new table in the general %define entry. Document `%define
2385 namespace' there as well. Point the %name-prefix entry to it since it
2386 explains it more completely in the case of C++.
2387 (C++ Bison Interface): Mention `%define namespace' instead of
2388 %name-prefix.
2389 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2390 entry suffices.
2391 * tests/c++.at (Relative namespace references): New test case.
2392 (Absolute namespace references): New test case.
2393 (Syntactically invalid namespace references): New test case.
2394 * tests/input.at (C++ namespace reference errors): New test case.
2395
2396 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2397
2398 Add syncline support and location accessor to internal %define
2399 interfaces.
2400 * data/bison.m4 (b4_percent_define_get_loc): New.
2401 (b4_percent_define_get_syncline): New.
2402 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2403 (b4_percent_define_default): Record defining location as line 1 rather
2404 than 0 for the sake of synchronizing #line's, and define
2405 b4_percent_define_syncline(VARIABLE).
2406 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2407 * src/muscle_tab.c (muscle_syncline_grow): New.
2408 (muscle_code_grow): Use muscle_syncline_grow.
2409 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2410 define b4_percent_define_syncline(VARIABLE).
2411 (muscle_percent_define_get_loc): New.
2412 (muscle_percent_define_get_syncline): New.
2413 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2414 remove some unused variables.
2415 (muscle_percent_define_default): Record defining location as line 1
2416 rather than 0 for the sake of synchronizing #line's, and define
2417 b4_percent_define_syncline(VARIABLE).
2418 (muscle_percent_define_check_values): Use
2419 muscle_percent_define_get_loc.
2420 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2421 (muscle_percent_define_get_syncline): Prototype.
2422 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2423 defaults): Update output for location change.
2424 (Complaining during macro argument expansion): Extend to test
2425 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2426
2427 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2428
2429 Fix some error-reporting macro bugs.
2430 * data/bison.m4 (b4_cat): New.
2431 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2432 to stdout so they don't become arguments to other macros. Update
2433 comments and add examples.
2434 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2435 add examples.
2436 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2437 after printing the error directive so that M4 doesn't report subsequent
2438 problems that are induced by this problem.
2439 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2440 instead of just in them. Recognize @\n in both places. Both expand to
2441 the empty string. Needed by b4_cat.
2442 * tests/skeletons.at (Complaining during macro argument expansion):
2443 New test case.
2444 (Fatal errors make M4 exit immediately): New test case.
2445
2446 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2447
2448 Implement --print-datadir.
2449 * src/getargs.c (usage): Mention.
2450 (PRINT_DATADIR_OPTION): New anonymous enum member.
2451 (long_options): Add entry for it.
2452 (getargs): Add case for it calling compute_pkgdatadir.
2453 * src/output.c (output_skeleton): Encapsulate data directory
2454 computation from here...
2455 (prepare): ... and from here...
2456 (compute_pkgdatadir): ... into this new function.
2457 * src/output.h (compute_pkgdatadir): Prototype.
2458
2459 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2460
2461 * src/print-xml.c (escape_bufs): New static global variable
2462 replacing...
2463 (xml_escape_n): ... the static local variable buf here.
2464 (print_xml): Free memory for escape_bufs.
2465 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2466
2467 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2468
2469 Replace `%push-parser' and `%push-pull-parser' with
2470 `%define push_pull "push"' and `%define push_pull "both"'.
2471 `%define push_pull "pull"' is the default.
2472 * doc/bison.texinfo (Push Decl, Push Parser Function,
2473 Pull Parser Function, Parser Create Function, Parser Delete Function):
2474 Update declarations.
2475 (Decl Summary, Table of Symbols): Replace %push-parser and
2476 %push-pull-parser entries with a %define push_pull entry.
2477 * data/bison.m4 (b4_percent_define_check_values): New macro.
2478 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2479 definitions...
2480 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2481 definitions...
2482 * data/push.c: ... to here and compute them from the value of the
2483 %define variable push_pull.
2484 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2485 parsing requests here...
2486 * data/yacc.c: ... hack this to switch to push.c any time
2487 b4_use_push_pull_flag or the %define variable push_pull is set. This
2488 will go away when we mv push.c yacc.c.
2489 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2490 push parsing is not supported since unused %define variables are
2491 reported anyway.
2492 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2493 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2494 comments for consistency with b4_percent_define_check_values.
2495 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2496 muscles.
2497 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2498 Remove.
2499 (prologue_declaration): Remove %push-parser and %push-pull-parser
2500 rules.
2501 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2502 * tests/calc.at: Update declarations.
2503 * tests/input.at (%define enum variables): New test case.
2504 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2505 declaration.
2506 (Push Parsing: Multiple impure instances): Update declaration.
2507 (Push Parsing: Unsupported Skeletons): New test case.
2508 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2509 declaration.
2510 (Exploding the Stack Size with Malloc): Update declaration.
2511
2512 2007-09-24 Wojciech Polak <polak@gnu.org>
2513
2514 Add XSLT transformations.
2515
2516 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2517 * data/xslt/xml2text.xsl: Transform XML into plain text.
2518 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2519 * data/Makefile.am (xsltdir): New variable.
2520 (dist_xslt_DATA): Add xslt/*.xsl files.
2521
2522 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2523
2524 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2525 Problem reported by Wojciech Polak.
2526 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2527 (xml_printf): Undo change I made on 21 September; that is,
2528 indent 2 spaces, not 1.
2529
2530 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2531
2532 Pacify ./configure --enable-gcc-warnings.
2533 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2534 `char const *' instead of `char *'.
2535 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2536 local variable `sep'.
2537
2538 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2539
2540 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2541 elsewhere.
2542 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2543 (xml_printf): Indent just 1 space for level.
2544 (e_char, xlate_char): Remove.
2545 (xml_escape_string): Rewrite to avoid undefined behavior (used
2546 storage that was freed from the stack).
2547 (xml_escape_n): Don't bother checking for subscript error.
2548
2549 2007-09-21 Wojciech Polak <polak@gnu.org>
2550
2551 Add Bison XML Automaton Report.
2552
2553 Add support for an -x option to generate an XML report.
2554 It is not documented yet.
2555 * src/print-xml.c: New file.
2556 * src/print-xml.h: Likewise.
2557 * lib/timevar.def (TV_XML): New var.
2558 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2559 * src/conflicts.c: Include print-xml.h.
2560 (solved_conflicts_xml_obstack): New var.
2561 (log_resolution, conflicts_solve, conflicts_free):
2562 Add support for XML report.
2563 (conflicts_output_val): New function.
2564 * src/conflicts.h (conflicts_output_val): New decl.
2565 * src/files.c (spec_xml_file): New var.
2566 (compute_output_file_names, output_file_names_free): Add XML support.
2567 * src/files.h (spec_xml_file): New decl.
2568 * src/getargs.c (xml_flag): New var.
2569 (usage, short_options, long_options, getargs): Add XML support.
2570 * src/getargs.h (xml_flag): New decl.
2571 * src/gram.c: Include print-xml.h.
2572 (rule_lhs_print_xml, rule_rhs_print_xml):
2573 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2574 New functions.
2575 * src/gram.h: Declare external ones.
2576 * src/main.c: Include print-xml.h.
2577 (main): Add XML support.
2578 * src/reduce.c: Include print-xml.h.
2579 (reduce_xml): New function.
2580 * src/reduce.h: Declare it.
2581 * src/state.c: Include print-xml.h.
2582 (state_new): Add XML support.
2583 (state_rule_lookahead_tokens_print_xml): New function.
2584 * src/state.h: Declare it.
2585 (struct state): New member solved_conflicts_xml.
2586 * src/symtab.c (symbol_class_get_string): New function.
2587 * src/symtab.h: Declare it.
2588
2589 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2590
2591 * GNUmakefile: Switch to coreutils's version.
2592 * bootstrap: Likewise.
2593 * Makefile.cfg: Adjust to new GNUmakefile.
2594 * README-hacking: Likewise.
2595
2596 Import from gnulib:
2597
2598 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2599 Bruno Haible <bruno@clisp.org>
2600
2601 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2602 and is a script that invokes bison. Tighten the code. Add comments.
2603
2604 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
2605
2606 Spell "boolean" as "Boolean". Reported by Akim Demaille.
2607 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
2608 * doc/bison.texinfo (Decl Summary): Fix.
2609 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
2610 * tests/input.at (Boolean %define variables): Update output.
2611 * tests/skeletons.at (%define boolean variables: invalid skeleton
2612 defaults): Rename to...
2613 (%define Boolean variables: invalid skeleton defaults): ... this and
2614 update output.
2615
2616 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
2617
2618 In impure push mode, don't allow more than one yypstate to be allocated
2619 since multiple impure parsers would corrupt yynerrs.
2620 * data/push.c (yypstate_allocated): New static global variable
2621 initialized to 0.
2622 (yypull_parse): If yypstate_new returns 0, don't report it as memory
2623 exhaustion if yypstate_allocated is 1, but still return 2.
2624 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
2625 already 1. Otherwise, set it to 1.
2626 (yypstate_delete): Set it to 0.
2627 * tests/push.at (Push Parsing: Multiple impure instances): New test
2628 case.
2629
2630 2007-08-17 Bob Rossi <bob@brasko.net>
2631
2632 * doc/bison.texinfo (Push Decl): Document the push parser.
2633 (Table of Symbols): Ditto.
2634 (Pure Decl): Ditto.
2635 (Decl Summary): Ditto.
2636 (Multiple Parsers, Push Parser Function, Pull Parser Function,
2637 Parser Create Function, Parser Delete Function):
2638 Add new push parser symbols.
2639 (Table of Symbols): Document push-parser, push-pull-parser,
2640 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
2641
2642 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
2643
2644 Update to GPLv3.
2645 * doc/gpl-3.0.texi: New file.
2646 * doc/gpl.texi: Remove.
2647 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
2648 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
2649 * README-hacking, TODO, bootstrap, bootstrap.conf:
2650 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
2651 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
2652 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
2653 * data/lalr1.cc, data/lalr1.java, data/location.cc:
2654 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
2655 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
2656 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
2657 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
2658 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
2659 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
2660 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
2661 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
2662 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
2663 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
2664 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
2665 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
2666 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
2667 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
2668 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
2669 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2670 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2671 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2672 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2673 * src/complain.c, src/complain.h, src/conflicts.c:
2674 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2675 * src/files.h, src/flex-scanner.h, src/getargs.c:
2676 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2677 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2678 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2679 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2680 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2681 * src/print.c, src/print.h, src/print_graph.c:
2682 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2683 * src/reduce.h, src/relation.c, src/relation.h:
2684 * src/revision.h, src/scan-code.h, src/scan-code.l:
2685 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
2686 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
2687 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
2688 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
2689 * tests/Makefile.am, tests/actions.at, tests/c++.at:
2690 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
2691 * tests/existing.at, tests/glr-regression.at:
2692 * tests/headers.at, tests/input.at, tests/java.at:
2693 * tests/local.at, tests/output.at, tests/push.at:
2694 * tests/reduce.at, tests/regression.at, tests/sets.at:
2695 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
2696 * tests/torture.at:
2697 Update to GPLv3.
2698
2699 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2700
2701 Get rid of broken %no-parser, -n, and --no-parser implementation and
2702 documentation.
2703 * TODO: Don't mention them.
2704 * doc/bison.1: Likewise.
2705 * doc/bison.texinfo (Decl Summary): Likewise.
2706 (Bison Options): Likewise.
2707 (Option Cross Key): Likewise.
2708 * src/getargs.c (no_parser_flag): Remove global variable.
2709 (usage): Don't print description of -n and --no-parser.
2710 (long_options): Remove --no-parser entry here.
2711 (getargs): Remove -n case in the switch here.
2712 * src/getargs.h (no_parser_flag): Remove extern.
2713 * tests/regression.at (Web2c Actions): Remove comment that mentions
2714 --no-parser.
2715
2716 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2717
2718 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
2719 name user variables starting with `yy'. Just pass NULL instead of a
2720 dummy local &yylval to yypush_parse.
2721 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
2722 starting with `yy'.
2723
2724 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
2725
2726 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
2727 true since it's then always used regardless of whether yyoverflow is
2728 defined. Reported by Christian Burger at
2729 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
2730 * THANKS: Add Christian Burger.
2731
2732 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2733 node names: say "Decl Summary" not "Bison Declaration Summary".
2734
2735 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
2736
2737 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
2738 determine whether this function has already complained about an invalid
2739 value for a %define boolean variable, don't check whether Bison has
2740 ever examined the value. As written, the check was a tautology.
2741 Instead, record and check for this complaint using a separate muscle.
2742
2743 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2744
2745 Fix push parsing memory leak reported by Brandon Lucia at
2746 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
2747 * THANKS: Add Brandon Lucia.
2748 * data/push.c (yypstate_delete): Free the stack if it was reallocated
2749 but the parse never completed and thus freed it.
2750 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
2751 * tests/testsuite.at: Include push.at.
2752 * test/push.at: New.
2753 (Push Parsing: Memory Leak for Early Deletion): New test case.
2754
2755 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
2756
2757 Improve handling of multiple S/R conflicts in the same state and of S/R
2758 conflicts involving multiple reductions.
2759 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
2760 set for a state here or Bison will abort if it is reassigned on a
2761 later conflicted reduction in the same state.
2762 Similarly, don't finalize and assign the solved conflicts report here
2763 or it will be lost if it is reassigned on a later conflicted reduction
2764 in the same state.
2765 (set_conflicts): Instead, assign them both here after all S/R conflicts
2766 in the state have been fully examined.
2767 * src/print.c (shift_set): Rename to...
2768 (no_reduce_set): ... this.
2769 (print_reductions): Update for rename, and add %nonassoc error action
2770 tokens to no_reduce_set so that, when printing the first remaining
2771 reduction on an error action token, the reduction is enclosed in
2772 brackets.
2773 (print_results): Update for rename.
2774 * tests/conflicts.at (Solved conflicts report for multiple reductions
2775 in a state): New test case.
2776 (%nonassoc error actions for multiple reductions in a state): New test
2777 case.
2778
2779 * src/main.c (main): Don't depend on C99 features.
2780
2781 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2782
2783 * build-aux/.cvsignore: Add compile.
2784 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2785 uniwidth.
2786
2787 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 * bootstrap (slurp): Create target directories that don't exist.
2790 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2791
2792 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2793
2794 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2795 than item number.
2796 * closure.c (closure): Likewise.
2797 * state.h (reductions): Comment sorting of rules.
2798 (state): Comment sorting of items.
2799
2800 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2801
2802 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2803 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2804 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2805 definition in order to avoid Gnulib headers since we don't use config.h
2806 here.
2807 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2808 rather than AT_DATA so that config.h is included.
2809
2810 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2811
2812 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2813 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2814 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2815 and so that YYFPRINTF is guaranteed to be defined here.
2816
2817 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2818
2819 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2820 with...
2821 (muscle_percent_define_check_values): ... this more helpful function.
2822 Again, it's not used yet, but it will be.
2823 * src/muscle_tab.h: Likewise.
2824
2825 Improve some comments in parser table construction.
2826 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2827 (generate_states): Don't mention ruleset, which is internal to closure.
2828 * src/closure.c (closure): Explain sorting of core and itemset, which
2829 is required for this function to behave correctly.
2830 * src/closure.h (closure): Mention sorting.
2831
2832 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2835 move the check for disabled transitions to an aver since conflict
2836 resolution hasn't happened yet.
2837
2838 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2839 labels a state as inconsistent just because it has error transitions.
2840 The original form of this check appeared in revision 1.1 of lalr.c,
2841 which was committed on 1991-12-21. Now (at least), changing the
2842 consistency label on such a state appears to have no useful effect in
2843 any of the places it is examined, which I enumerate below. The key
2844 point to understanding each item in this enumeration is that a state
2845 with an error transition is labelled consistent in the first place only
2846 if it has no rules, so the check cannot matter for states that have
2847 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2848 to try to identify its conflicts, and a state must have *rules* to have
2849 conflicts. (2) Labelling a state as inconsistent will affect how
2850 action_row sets the default *rule* for the state. (3) Labelling a
2851 state as inconsistent will cause build_relations to add lookback edges
2852 to *rules* in that state.
2853 * src/state.h (struct state): Word the comment for member consistent
2854 more carefully.
2855
2856 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Don't depend on C99 features.
2859 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2860 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2861 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2862 * src/state.c (state_mark_reachable_states): Fix for-loop.
2863 (state_remove_unreachable_states): Fix for-loop.
2864
2865 Don't widen struct state with member reachable just to temporarily
2866 record reachability. Instead, use a local bitset.
2867 * src/state.h (struct state): Remove member.
2868 * src/state.c (state_new): Don't initialize it.
2869 (state_mark_reachable_states): Rename to...
2870 (state_record_reachable_states): ... this, and use bitset.
2871 (state_remove_unreachable_states): Use bitset.
2872
2873 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2874
2875 * src/Makefile.am (yacc): Quote target action commands properly so
2876 that the yacc script isn't corrupt. Reported by Hans Aberg at
2877 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2878
2879 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2880 the case of pure parsers. Reported by Frans Englich at
2881 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2882 * THANKS: Add Frans Englich.
2883
2884 * NEWS (2.3a+): In the %code entry, reference section `Bison
2885 Declaration Summary' from the manual now since the %code summary has
2886 moved there.
2887 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2888 in the rules section must be terminated by semicolons.
2889
2890 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2891
2892 Extend the front-end API for %define variables to more completely
2893 mirror the back-end. This will be useful in the future.
2894 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2895 Update comments to mention the new front-end counterparts of these
2896 macros.
2897 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2898 for muscle_string_decode and muscle_location_decode.
2899 (muscle_string_decode): New static function.
2900 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2901 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2902 functions.
2903 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2904 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2905 implementation more closely.
2906 (muscle_percent_define_invalid_value): New function.
2907 * src/muscle_tab.h (muscle_percent_define_get,
2908 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2909 Prototype.
2910
2911 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2912
2913 * NEWS (2.3a+): Mention yesterday's state-removal change.
2914 (2.3a): Remove the %language entry, which was added after 2.3a.
2915 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2916 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2917 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2918 tests/existing.at: Update copyright date.
2919
2920 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2921
2922 If conflict resolution makes states unreachable, remove those states,
2923 report rules that are then unused, and don't report conflicts in those
2924 states.
2925 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2926 New global function.
2927 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2928 function.
2929 * src/main.c (main): After conflict resolution, remove the unreachable
2930 states and update all data structures that reference states by number.
2931 * src/state.c (state_new): Initialize each state's reachable member to
2932 false.
2933 (state_mark_reachable_states): New static function.
2934 (state_remove_unreachable_states): New global function.
2935 * src/state.h (struct state): Add member bool reachable.
2936 (state_remove_unreachable_states): Prototype.
2937 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2938 New test case.
2939 * tests/existing.at (GNU pic Grammar): Update test case output now that
2940 an unused rule is discovered.
2941
2942 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2943
2944 Minor code cleanup in parser table construction.
2945 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2946 (new_itemsets, save_reductions): Update for rename to nitemset.
2947 * src/closure.c (nritemset): Rename to...
2948 (nitemset): ... this since the "r" appears to meaningless and isn't
2949 used in the comments.
2950 (closure): Update for rename.
2951 * src/closure.h (nritemset): Update extern to...
2952 (nitemset): ... this.
2953 * src/lalr.c (LA): Fix a typo in comments.
2954 * src/print.c (print_core): Update for rename to nitemset.
2955 * src/print_graph.c (print_graph): Likewise.
2956 * src/state.h: Fix some typos in header comments.
2957
2958 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2959
2960 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2961 still sticks to ASCII. Sorry!
2962
2963 * README-hacking: New file, taken mostly from coreutils, with changes
2964 for Bison. Contains much of the contents of:
2965 * README-cvs: Remove.
2966 * bootstrap: Sync from gnulib.
2967 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2968 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2969
2970 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2971
2972 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2973 Setzer.
2974 (Java Differences): Fix some typos.
2975 * THANKS: Add Sebastian Setzer.
2976
2977 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
2978
2979 * data/java.m4 (b4_single_class_if): Remove.
2980 (b4_abstract_if): Look at "%define abstract".
2981 (b4_lexer_if): New.
2982 (b4_union_name): Rename...
2983 (b4_yystype): ... to this. Map to "%define stype".
2984 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2985 b4_maybe_throws): Fix quoting.
2986 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2987 * data/lalr1.java (Lexer interface): Always define.
2988 (Lexer interface within parser class): Remove.
2989 (YYLexer class): New, used when "%code lexer" is present.
2990 (constructor): When "%code lexer" is used, pass %lex-param
2991 to the lexer constructor.
2992 (yylex, yyparse): Remove %lex-param from method invocations
2993 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2994
2995 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2996 abstract". Rename "%define union_name" to "%define stype".
2997 Rename method names according to previous patch.
2998 (Java Scanner Interface): Describe "%code lexer" instead of
2999 "%pure-parser" and "%define single_class".
3000 (Java Differences): Mention "%code lexer".
3001
3002 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3003 Include scanner here, using macros from tests/local.at.
3004 (AT_DATA_CALC_Y): Remove final argument.
3005 (_AT_CHECK_JAVA_CALC): Likewise.
3006 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3007 of %locations and %error-verbose.
3008 (main): Test with and without %lex-param.
3009 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3010 (AT_BISON_OPTION_POPDEFS): Pop it.
3011
3012 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3013
3014 DJGPP spefic issue. Inhibit the use of disallowed characters for
3015 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3016 and concern testsuite case 46.
3017 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3018 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3019 * djgpp/config.bat: Inhibit the use of disallowed characters.
3020
3021 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3022
3023 Miscellaneous %define and %code cleanup.
3024 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3025 values are interpreted.
3026 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3027 documentation a little more.
3028 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3029 muscle_percent_define_insert, muscle_percent_code_grow): New
3030 functions/macros.
3031 * src/muscle_tab.h (muscle_percent_define_insert,
3032 muscle_percent_code_grow): Prototype.
3033 * src/parse-gram.y (prologue_declaration): Use
3034 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3035 %define and %code directives.
3036
3037 Make it easy to share %define boolean variables between the front-end
3038 and back-end. Though not used yet, this will be useful in the future.
3039 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3040 Bison uses of names rather than just skeleton uses of names.
3041 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3042 b4_percent_define_skeleton_variables(VARIABLE) to
3043 b4_percent_define_bison_variables(VARIABLE).
3044 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3045 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3046 b4_percent_code_bison_qualifiers(QUALIFIER).
3047 (b4_check_user_names_wrap): Update for renames.
3048 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3049 muscle_percent_define_default): New functions mimicking
3050 b4_percent_define_flag_if and b4_percent_define_default.
3051
3052 For %define variables, report locations for invalid values and
3053 redefinitions.
3054 * data/bison.m4 (b4_percent_define_flag_if): Read
3055 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3056 value for VARIABLE.
3057 (b4_percent_define_default): Save a special location in
3058 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3059 must later be reported as invalid.
3060 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3061 functions.
3062 (muscle_percent_define_insert): Record the location of VARIABLE in
3063 muscle percent_define_loc(VARIABLE), and use it to report the previous
3064 location for a redefinition.
3065 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3066 (muscle_percent_define_default): Update like b4_percent_define_default.
3067 (muscle_grow_user_name_list): Rename to...
3068 (muscle_user_name_list_grow): ... this for consistency and use
3069 muscle_location_grow.
3070 * src/muscle_tab.h (muscle_location_grow): Prototype.
3071 * tests/input.at (%define errors): Update expected output.
3072 * tests/skeletons.at (%define boolean variables: invalid skeleton
3073 defaults): New test case.
3074
3075 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3076
3077 * src/print.c (lookahead_set, state_default_rule): Remove.
3078 (print_reductions): Replace state_default_rule invocation with
3079 equivalent use of yydefact, which was computed in token_actions in
3080 tables.c.
3081 (print_results): Don't allocate lookahead_set.
3082
3083 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3084
3085 * data/lalr1.java: Prefix all private members with yy.
3086
3087 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3088
3089 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3090 Sebastien Fricker at
3091 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3092 * THANKS: Add Sebastien Fricker.
3093 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3094 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3095 accept a variable number of arguments.
3096
3097 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3098
3099 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3100
3101 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3102
3103 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3104 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3105 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3106
3107 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3108
3109 Undo my 2007-02-07 change, switching back to the c-strcase module
3110 introduced in the 2007-02-03 change. Bruno Haible reported that
3111 the 2007-02-07 change would be dangerous in Turkish if we add a
3112 language whose name contains "i", since "i" is not lowercase "I"
3113 in Turkish.
3114 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3115 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3116 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3117 * m4/.cvsignore: Remove strcase.m4.
3118 * src/getargs.c: Revert 2007-02-07 change, as follows.
3119 Include c-strcase.h.
3120 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3121
3122 2007-02-11 Bruno Haible <bruno@clisp.org>
3123
3124 Enable the Java related testsuite tests when the only Java compiler
3125 found is a gcj < 4.3. Discussed at
3126 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3127 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3128
3129 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3130
3131 * data/Makefile.am: Update copyright date.
3132 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3133 yypstate_new returns NULL.
3134 (yypstate_new): Return NULL if malloc does.
3135 * src/reader.c (packgram): Move translation of rule actions from the
3136 beginning of packgram to...
3137 (check_and_convert_grammar): ... here right before packgram is invoked
3138 so it's easier to write more complete comments, and remove redundant
3139 code.
3140
3141 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3142
3143 As in semantic actions, make @$ in %initial-action, %destructor, and
3144 %printer imply %locations.
3145 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3146 scanning @$.
3147 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3148 (@$ in %initial-action implies %locations,
3149 @$ in %destructor implies %locations,
3150 @$ in %printer implies %locations): ... these new test cases.
3151
3152 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3153
3154 Undo most of the 2007-02-03 change, switching to the strcase module
3155 now that gnulib strcase has been fixed.
3156 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3157 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3158 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3159 * m4/.cvsignore: Add strcase.m4.
3160 * src/getargs.c: Revert 2007-02-03 change, as follows.
3161 Don't include c-strcase.h.
3162 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3163 strcasecmp has "unspecified behavior" outside the POSIX locale,
3164 but it works fine in practice if at least one argument is ASCII,
3165 as is the case in Bison.
3166
3167 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3168
3169 * tests/java.at: Skip tests if only one of javac/java is present.
3170 Reported by Joel E. Denny.
3171 * tests/atlocal.in: Adjust copyright years.
3172
3173 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3174
3175 * data/lalr1.java (Stack): Work around old verifiers that disallow
3176 access to the private fields of an inner class, from the outer class.
3177 We can make Stack's fields public because user code doesn't have access
3178 to the instance of Stack used by parse(). Reported by Paul Eggert.
3179
3180 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3181
3182 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3183 the right spot for these files?
3184 * bootstrap.conf (gnulib_modules): Add c-strcase.
3185 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3186 c-strncasecmp.c.
3187 * src/getargs.c: Include c-strcase.h.
3188 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3189 to avoid unspecified behavior.
3190
3191 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3192
3193 * doc/bison.texinfo (Decl Summary): Correct typo.
3194
3195 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3196
3197 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3198 Complain if the value does not match empty, "true" or "false".
3199 * data/c++.m4: Adjust default definitions of %define variables.
3200 * data/java.m4: Adjust default definitions of %define variables.
3201 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3202 to above behavior.
3203 * tests/input.at (Boolean %define variables): Test new behavior.
3204
3205 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3206
3207 * NEWS: Mention java.
3208 * TODO: Remove things that are done.
3209 * bootstrap.conf: Add javacomp-script and javaexec-script.
3210 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3211
3212 * data/Makefile.am: Add new files.
3213 * data/java-skel.m4: New.
3214 * data/java.m4: New.
3215 * data/lalr1.java: New.
3216
3217 * doc/bison.texinfo: Put "A Complete C++ Example" under
3218 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3219 under Other Languages.
3220
3221 * src/getargs.c (valid_languages): Add Java.
3222 * src/getargs.h (struct bison_language): Update size of string fields.
3223
3224 * tests/Makefile.am: Add java.at.
3225 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3226 * tests/java.at: New.
3227 * tests/testsuite.at: Include it.
3228
3229 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3230
3231 Clean up.
3232 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3233 at_directive_argv arguments so these no longer have to be global
3234 variables. Also, update the implementation for the following changes.
3235 (fail_for_at_directive_too_many_args,
3236 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3237 (at_directive_name): Remove as at_directive_argv[0] will be used for
3238 this now.
3239 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3240 for the directive name.
3241 (at_directive_argc, at_directive_argv): Make these local within
3242 skel_lex instead of global.
3243 (INITIAL): Update directive start action for above changes.
3244 (SC_AT_DIRECTIVE_ARG): Rename to...
3245 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3246 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3247 (scan_skel): Move yylex_destroy to...
3248 (skel_scanner_free): ... here.
3249 * tests/skeletons.at (installed skeleton file name): Rename to...
3250 (installed skeleton file names): ... this.
3251
3252 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3253
3254 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3255 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3256 Summary" not "Directives".
3257 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3258 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3259 since the former is now the more complete one.
3260 (Prologue Alternatives): Likewise and do the same for %defines.
3261 (Table of Symbols): Add summary of %code, add summary of %define, and
3262 move full %code documentation to...
3263 (Decl Summary): ... here for consistency with other entries in these
3264 sections.
3265 Move %define entry in order to keep this list alphabetized.
3266 Reword %define entry a little to put less emphasis on the skeleton
3267 concept, which most users shouldn't have to think about.
3268
3269 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3270
3271 Adjust to recent gnulib changes.
3272 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3273 Add string.h, string_.h, unistd_.h, wchar_.h.
3274 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3275 * src/system.h: Don't include <stpcpy.h>; this is now done by
3276 <string.h>.
3277
3278 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3279
3280 Simplify implementation of unqualified %code, implement macros for
3281 uniform treatment of boolean %define flags. Document %define.
3282 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3283 b4_percent_code_ifdef): New.
3284 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3285 * data/c++.m4: Define default value for global_tokens_and_yystype.
3286 * data/glr.cc: Likewise.
3287 * data/location.cc: Use b4_percent_define_flag_if.
3288
3289 * doc/bison.texinfo (Decl Summary): Document %define.
3290
3291 * src/parse-gram.y (Unqualified %code): Change muscle name to
3292 b4_percent_code().
3293 (content.opt): Default to empty.
3294
3295 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3296
3297 Implement support for relative and absolute skeleton file names.
3298 Discussed starting at
3299 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3300 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3301 (Bison Options): Document in --skeleton entry.
3302 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3303 full_skeleton can't necessarily hold all of pkgdatadir.
3304 If the specified skeleton file name contains a `/', don't prepend
3305 pkgdatadir.
3306 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3307 file name contains a `/', prepend the grammar file directory.
3308 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3309 * skeletons.at: New file.
3310 (relative skeleton file names): New test case.
3311 (installed skeleton file names): New test case.
3312 * tests/testsuite.at: Include skeletons.at.
3313
3314 * bootstrap: Update copyright to 2007.
3315
3316 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3317
3318 * bootstrap: Remove occurrences of .#bootmp from the files.
3319
3320 2007-01-17 Akim Demaille <akim@epita.fr>
3321
3322 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3323 nonterminals.
3324 Use per-type %printer.
3325
3326 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3327
3328 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3329 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3330 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3331 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3332 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3333 tests/glr-regression.at, tests/input.at, tests/local.at,
3334 tests/output.at, tests/torture.at: Update copyright to 2007.
3335
3336 2007-01-16 Akim Demaille <akim@epita.fr>
3337
3338 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3339 error code.
3340 (Calc++ Scanner): Exit with failure if we can't open the input
3341 file.
3342 Accept "-" standing for stdin.
3343 (Calc++ Top Level): Print the result only if the parsing was
3344 successful.
3345
3346 2007-01-16 Akim Demaille <akim@epita.fr>
3347
3348 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3349
3350 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3351 and Joel E. Denny <jdenny@ces.clemson.edu>
3352
3353 Clean up %define and %code implementation in M4 some. Most
3354 importantly, rename all related macros to be in the b4_percent_define
3355 and b4_percent_code namespaces. Also, complete support for `.' in
3356 %define variable names and %code qualifiers.
3357 * data/bison.m4 (b4_check_user_names): Check for special
3358 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3359 m4_foreach loops.
3360 (b4_get_percent_define, b4_get_percent_code): Rename to...
3361 (b4_percent_define_get, b4_percent_code_get): ... these.
3362 Extend documentation with examples.
3363 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3364 b4_percent_define_skeleton_variables and
3365 b4_percent_code_skeleton_qualifiers.
3366 Expect any value for the %define variable `foo' to be stored in the
3367 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3368 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3369 expect any unqualified %code blocks to be stored in a macro named
3370 `b4_percent_code_unqualified'.
3371 Use m4_indir so that %define variable names and %code qualifiers can
3372 contain `.', which is allowed by the grammar parser.
3373 (b4_percent_define_default): New macro to set a default value for a
3374 %define variable.
3375 (m4_wrap): Update wrapped code, and fix some underquoting.
3376 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3377 Expect grammar uses of %define variables and %code qualifiers to be
3378 defined in b4_percent_define_user_variables and
3379 b4_percent_code_user_qualifiers.
3380 * data/c++.m4: Use b4_percent_define_default rather than
3381 m4_define_default. Fix some underquoting. Skeleton usage of %define
3382 variable define_location_comparison now implies skeleton usage of
3383 %define variable filename_type.
3384 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3385 data/push.c, data/yacc.c: Update macro names.
3386 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3387 muscle names.
3388
3389 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3390
3391 DJGPP specific issues.
3392
3393 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3394 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3395
3396 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3397
3398 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3399 run parsers in all tests so that Valgrind is invoked during
3400 maintainer-check-valgrind.
3401 (Duplicate representation of merged trees): Free all semantic values.
3402 (Duplicated user destructor for lookahead): Likewise.
3403
3404 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3405
3406 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3407 command-line prefix.
3408 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3409 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3410 miss Valgrind messages.
3411 (Exploding the Stack Size with Malloc): Likewise.
3412
3413 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3414
3415 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3416 locals. Reported by Juan Manuel Guerrero at
3417 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3418 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3419 Fix some indentation also.
3420 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3421 explaining this issue.
3422
3423 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
3424 and Joel E. Denny <jdenny@ces.clemson.edu>
3425
3426 Simplify union and prologue handling, and escape union and lex/parse
3427 params with digraphs.
3428 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3429 values to the empty string since these are no longer guaranteed
3430 initialized by the front-end.
3431 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3432 braces around b4_user_stype since this is no longer done by the
3433 front-end.
3434 * src/files.c, src/files.h (pre_prologue_obstack,
3435 post_prologue_obstack): Remove.
3436 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3437 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3438 with digraphs. This fixes lex params and parse params.
3439 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3440 * src/output.c (prepare): Remove muscle insertion of the prologues.
3441 (output): Remove freeing of pre_prologue_obstack and
3442 post_prologue_obstack.
3443 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3444 than prologue_augment for prologue parsing so you don't need prologue
3445 obstacks.
3446 (grammar_declaration): For %union RHS, use `braceless' instead of
3447 "{...}" so that braces are already stripped and code is escaped with
3448 digraphs.
3449 * src/reader.c (prologue_augment): Remove.
3450 (reader): Remove initialization of pre_prologue_obstack and
3451 post_prologue_obstack.
3452 * src/reader.h (prologue_augment): Remove.
3453
3454 * data/c.m4: Remove stray parenthesis.
3455
3456 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 Remove quotes from variables names in %define directives and from
3459 qualifiers in %code directives, and restrict the characters that are
3460 allowed in them to M4-friendly ones. For %define, continue to support
3461 the quoted form as a deprecated feature. Discussed starting at
3462 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3463 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3464 %code.
3465 * doc/bison.texinfo (Prologue Alternatives): Update.
3466 (Decl Summary): In %defines entry, update mention of `%code requires'
3467 and `%code provides'.
3468 (C++ Location Values): Update %define uses.
3469 (Calc++ Parser Interface): Likewise.
3470 (Calc++ Parser): Likewise, and update `%code requires' uses.
3471 (Table of Symbols): Update %code documentation.
3472 * src/parse-gram.y (prologue_declaration): For %define variables, use
3473 `variable' instead of `STRING'.
3474 (grammar_declaration): For %code qualifiers, use `ID' instead of
3475 `STRING'.
3476 (variable): New nonterminal that takes an `ID' or a `STRING'.
3477 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3478 and %define uses.
3479 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3480 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3481 (%define errors): Update %define uses.
3482
3483 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3484
3485 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3486 instead of muscle_insert for %define values so that M4-special
3487 characters are replaced with digraphs.
3488 * tests/input.at (%define errors): Extend to check weird values.
3489
3490 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3491
3492 Instead of having skeletons declare all valid %define variables and
3493 %code qualifiers, provide macros that retrieve the associated values
3494 and build these lists automatically. Thus Bison will now warn when a
3495 variable or qualifier is not used by the skeleton in the current
3496 invocation regardless of whether it might sometimes be used by that
3497 skeleton in other invocations. Also, move all %define value macros to
3498 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3499 form, which is replaced by %code.
3500 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3501 (b4_check_user_names): ... this, and change the series of valid name
3502 arguments to a single list argument for names used in the skeleton
3503 similar to the existing list argument for names used in the grammar.
3504 Warn instead of complaining.
3505 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3506 values and %code code, to format %code code properly, and to build
3507 lists of all %define variables and %code qualifiers used in the
3508 skeleton: b4_skeleton_percent_define_variables and
3509 b4_skeleton_percent_code_qualifiers.
3510 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3511 Remove, and...
3512 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3513 the skeleton names lists can finish building first. In place of
3514 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3515 expect the lists b4_user_percent_define_variables and
3516 b4_user_percent_code_qualifiers.
3517 * data/c++.m4: Where setting default values for b4_parser_class_name,
3518 b4_location_type, b4_filename_type, b4_namespace, and
3519 b4_define_location_comparison, update their names to the
3520 b4_percent_define_ namespace.
3521 * data/glr.c: Don't use b4_check_percent_define_variables and
3522 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3523 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3524 (b4_parser_class_name, b4_namespace): Define these using
3525 b4_get_percent_define for parser_class_name and namespace.
3526 * data/location.cc: Use b4_get_percent_define.
3527 * data/push.c: Don't use b4_check_percent_define_variables and
3528 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3529 * data/yacc.c: Likewise, and don't call m4_exit in
3530 b4_use_push_for_pull_if or m4_wrap code will never execute.
3531 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3532 Rename to...
3533 (muscle_grow_user_name_list): ... this for consistency with the
3534 terminology used in bison.m4.
3535 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3536 %define variable names, and rename muscle used_percent_define_variables
3537 to user_percent_define_variables.
3538 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3539 user_percent_code_qualifiers.
3540 (content): Remove.
3541 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3542 {CODE} form is no longer accepted.
3543 * tests/input.at (Reject bad %code qualifiers): Rename to...
3544 (Reject unused %code qualifiers): ... this, and update test output.
3545 (%define error): Update test output.
3546
3547 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3548
3549 Check for unrecognized %define variables similar to checking for
3550 unrecognized %code qualifiers. Check for redefined %define variables.
3551 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3552 generalizes...
3553 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3554 (b4_check_percent_define_variables): New, also wraps it.
3555 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3556 variables using b4_check_percent_define_variables.
3557 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3558 all those exercised in the test suite and all those listed in the
3559 `Default values' section of c++.m4. Are there others?
3560 * data/push.c, data/yacc.c: Declare no valid %define variables.
3561 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3562 similar to muscle_find, but it works even when the muscle stores a
3563 const value.
3564 (muscle_grow_used_name_list): New function for constructing the used
3565 name list muscles that b4_check_for_unrecognized_names requires.
3566 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3567 %define'd more than once. Define the b4_used_percent_define_variables
3568 muscle with muscle_grow_used_name_list.
3569 (grammar_declaration): Abbreviate %code code with
3570 muscle_grow_used_name_list.
3571 * tests/input.at (%define errors): New.
3572
3573 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3574
3575 Provide warn_at, complain_at, and fatal_at function callbacks to the
3576 skeletons, and use this for %code qualifier complaints.
3577 * data/bison.m4 (b4_error_at): New, invoked by...
3578 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3579 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3580 @fatal_at(...@) directives.
3581 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3582 qualifiers in b4_used_percent_code_qualifiers and to use
3583 b4_complain_at.
3584 * src/location.c, src/location.h (boundary_set_from_string): New global
3585 function.
3586 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3587 function.
3588 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3589 to b4_used_percent_code_qualifiers.
3590 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3591 function.
3592 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3593 (lineno): Rename to...
3594 (out_lineno): ... this so I don't misunderstand it again.
3595 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
3596 here; these newlines are in the input but not the output file.
3597 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
3598 (at_directive_perform): ... this new static function, and add handling
3599 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
3600 directives.
3601 * tests/input.at (Reject bad %code qualifiers): Update test output with
3602 locations and extend.
3603
3604 * tests/output.at (Output file name: [, Output file name: ]): Remove
3605 bogus comment about these tests failing.
3606
3607 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3608
3609 Clean up b4_check_percent_code_qualifiers a little.
3610 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
3611 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
3612 documentation and add examples.
3613 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
3614 qualifiers here.
3615
3616 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3617
3618 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
3619 unreliable -- especially when they're hidden inside another macro.
3620 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
3621 data/c.m4: Remove m4_divert(-1).
3622 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3623 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
3624 m4_divert_push(0) and m4_divert_pop(0).
3625 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
3626 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
3627 pushed and popped by m4sugar, should be first on the stack.
3628
3629 Provide warn, complain, and fatal function callbacks to the skeletons.
3630 This provides more flexibility than m4_fatal, improves the error
3631 message format, and captures messages for translation. Discussed
3632 starting at
3633 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
3634 * data/bison.m4 (b4_error): New, invoked by...
3635 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
3636 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
3637 directives. Because these M4 macros might be called when the current
3638 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
3639 the previous removal of uses of m4_divert, which caused trouble.
3640 (b4_check_percent_code_qualifiers): Use b4_complain instead of
3641 m4_fatal to report unrecognized %code qualifiers.
3642 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
3643 push parser requests.
3644 * data/glr.c: Use b4_complain instead of m4_fatal to report
3645 non-deterministic push parser requests.
3646 Update @output usage to @output(...@) form.
3647 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
3648 report missing %defines. Update @output usage to @output(...@) form.
3649 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
3650 @output(...@) form.
3651 * src/main.c (main): Invoke skel_scanner_free.
3652 * src/scan-skel.h (skel_scanner_free): Prototype new function.
3653 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
3654 obstack_for_string from flex-scanner.h.
3655 (YY_DECL): Use to declare skel_lex static.
3656 (decode_at_digraphs): Remove; now handled in the new
3657 SC_AT_DIRECTIVE_ARG start condition.
3658 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
3659 functions.
3660 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
3661 at_directive_argv): New static globals.
3662 (INITIAL): Use fail_for_invalid_at.
3663 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
3664 recognize the start of a generalized `@directive(...@)' form and
3665 start...
3666 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
3667 directive args (using the new obstack_for_string), to decode the
3668 contained @ diagraphs, and to perform the directive. It recognizes
3669 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3670 @output(...@).
3671 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3672 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3673 `@,'.
3674 (scan_skel): Initialize obstack_for_string on the first call.
3675 (skel_scanner_free): New function to free obstack_for_string.
3676 * tests/input.at (Reject bad %code qualifiers): Update test output.
3677
3678 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3679
3680 Consolidate the 4 prologue alternative directives (%code, %requires,
3681 %provides, and %code-top) into a single %code directive with an
3682 optional qualifier field. Discussed at
3683 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3684 * NEWS (2.3a+): Rewrite the existing entry for the prologue
3685 alternatives.
3686 * doc/bison.texinfo (Prologue Alternatives): Update.
3687 (Decl Summary): Update to %code "requires" and %code "provides".
3688 (Calc++ Parser): Update to %code "requires".
3689 (Table of Symbols): Remove entries for %requires, %provides, and
3690 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
3691 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
3692 are replaced by b4_percent_code_provides and b4_percent_code_requires,
3693 which are skeleton-specific.
3694 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
3695 declare what %code qualifiers it supports and to complain if any other
3696 qualifiers were used in the grammar.
3697 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
3698 and b4_user_code([b4_percent_code_provides]) in place of
3699 b4_user_requires and b4_user_provides.
3700 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
3701 Add b4_user_code([b4_percent_code_top]) and
3702 b4_user_code([b4_percent_code]).
3703 Invoke b4_check_percent_code_qualifiers.
3704 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3705 PERCENT_REQUIRES): Remove.
3706 (grammar_declaration): Remove RHS's for %code-top, %provides, and
3707 %requires. Rewrite the %code RHS as the unqualified form defining the
3708 muscle b4_percent_code. Add another RHS for the qualified %code form,
3709 which defines muscles of the form b4_percent_code_QUALIFIER and the
3710 b4_used_percent_code_qualifiers muscle.
3711 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3712 PERCENT_REQUIRES): Remove.
3713 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
3714 %code "requires" and %code "provides".
3715 * tests/input.at (Reject bad %code qualifiers): New.
3716
3717 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3718
3719 Use the new code_props interface for destructors and printers.
3720 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
3721 printer_location members, and change the type of the destructor and
3722 printer members to code_props.
3723 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
3724 symbol_printer_get, semantic_type_destructor_set,
3725 semantic_type_printer_set, default_tagged_destructor_set,
3726 default_tagless_destructor_set, default_tagged_printer_set,
3727 default_tagless_printer_set): Use code_props in arguments and return
3728 types in place of char const * and location.
3729 (symbol_destructor_location_get, symbol_printer_location_get): Remove
3730 since the locations are now contained in the return of
3731 symbol_destructor_get and symbol_printer_get.
3732 * src/output.c (symbol_destructors_output, symbol_printers_output):
3733 Replace with...
3734 (symbol_code_props_output): ... this to eliminate duplicate code.
3735 (output_skeleton): Update to use symbol_code_props_output.
3736 * src/reader.c (symbol_should_be_used): Update use of
3737 symbol_destructor_get.
3738 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3739 Update uses of the various _destructor_set and _printer_set functions.
3740 * src/symtab.c: (default_tagged_destructor_location,
3741 default_tagless_destructor_location, default_tagged_printer_location,
3742 default_tagless_printer_location): Remove since we...
3743 (default_tagged_destructor, default_tagless_destructor,
3744 default_tagged_printer, default_tagless_printer): ... change the type
3745 of these to code_props.
3746 (symbol_new, semantic_type_new, symbol_destructor_set,
3747 semantic_type_destructor_set, symbol_destructor_get,
3748 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
3749 symbol_check_alias_consistency, default_tagged_destructor_set,
3750 default_tagless_destructor_set, default_tagged_printer_set,
3751 default_tagless_printer_set): Update.
3752 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
3753 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
3754 code_props members.
3755 (symbol_print): Use SYMBOL_CODE_PRINT.
3756
3757 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3758
3759 Use the new code_props interface for rule actions.
3760 * src/symlist.h (symbol_list): Replace action, action_location, and
3761 used members with a code_props action_props member.
3762 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3763 grammar_midrule_action, grammar_current_rule_merge_set,
3764 grammar_current_rule_symbol_append, packgram): Update.
3765 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3766 * src/scan-code.l (handle_action_dollar): Update.
3767 (translate_rule_action): Remove, no longer used.
3768 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3769
3770 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3771
3772 Use the new code_props interface in parse-gram.y.
3773 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3774 Update all uses of translate_* functions to use the new code_props
3775 interface and to use gram_scanner_last_string_free and
3776 code_scanner_last_string_free where possible.
3777 (grammar_declaration): symbol_list_destructor_set and
3778 symbol_list_printer_set now perform the translation, so don't do it
3779 here. Use gram_scanner_last_string_free where possible.
3780 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3781 translate_code): Remove, no longer used.
3782 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3783 symbol_list_printer_set): Perform code translation here rather than
3784 depending on the caller to do so.
3785
3786 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3787 * src/scan-gram.h (gram_last_string): Remove declaration.
3788 * src/scan-gram.l (last_string): Declare it static.
3789
3790 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3791
3792 Encapsulate code properties and related functionality for the various
3793 destructors, printers, and actions into a code_props structure and
3794 interface. This patch merely implements code_props in scan-code.h and
3795 scan-code.l. Future patches will rewrite other modules to use it.
3796 Discussed starting at
3797 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3798 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3799 consistently initialize const structs that have an empty location
3800 field.
3801 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3802 to ensure consistency.
3803 * src/scan-code.h (code_props): New structure.
3804 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3805 function, macro, and const global variable for initializing a
3806 code_props with no code.
3807 (code_props_plain_init, code_props_symbol_action_init,
3808 code_props_rule_action_init, code_props_translate_code): The rest of
3809 the new code_props functional interface. Among other things, the init
3810 functions set the code_props kind field so that
3811 code_props_translate_code will know whether to behave like
3812 translate_symbol_action, translate_rule_action, or translate_code.
3813 These old translate functions must remain until all other modules are
3814 updated to use the new code_props interface.
3815 (code_scanner_last_string_free): New function similar to
3816 gram_scanner_last_string_free.
3817 (code_scanner_free): Add documentation.
3818 * src/scan-code.l: Implement the new interface.
3819 (code_lex): Make it static, add a code_props* argument, and remove the
3820 rule argument.
3821 (last_string): New static global similar to the one in scan-gram.l.
3822 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3823 instead of rule.
3824 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3825 code_props since Bison may one day use this information for destructors
3826 and printers.
3827 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3828 (handle_action_dollar): Use symbol_list_n_get and set used flag
3829 directly since symbol_list_n_used_set is removed.
3830 (translate_action): Add a code_props* argument and remove the rule,
3831 action, and location arguments. Pass the code_props* on to code_lex.
3832 (translate_rule_action, translate_symbol_action, translate_code):
3833 Rewrite as wrappers around the new code_props interface.
3834 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3835 it would eventually need to break the encapsulation of code_props.
3836
3837 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3838
3839 * etc/.cvsignore: New.
3840
3841 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3842
3843 Add maintainer-push-check to run maintainer-check using push parsing in
3844 place of pull parsing where available.
3845 * Makefile.am (maintainer-push-check): New.
3846 * data/bison.m4 (b4_use_push_for_pull_if): New.
3847 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3848 appropriately based on their existing values.
3849 (yypush_parse): Don't print push-parser-specific diagnostics if push
3850 parsing is being used in place of pull parsing.
3851 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3852 push.c.
3853 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3854 variable, and insert b4_use_push_for_pull_flag into muscles.
3855 * tests/Makefile.am (maintainer-push-check): New.
3856
3857 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3858
3859 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3860 (whether successful or failed) so that yypush_parse can be invoked
3861 again to start a new parse using the same yypstate.
3862 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3863 check multiple yypull_parse invocations on the same yypstate. For pull
3864 mode, extend to check multiple yyparse invocations.
3865 (Exploding the Stack Size with Alloca): Extend to try with
3866 %push-pull-parser.
3867 (Exploding the Stack Size with Malloc): Likewise.
3868
3869 * tests/calc.at (Simple LALR Calculator): Don't specify
3870 %skeleton "push.c" since %push-pull-parser implies that now.
3871 * tests/headers.at (export YYLTYPE): Don't check for the push
3872 declarations. Otherwise, this test case can't be used to see if push
3873 mode can truly emulate pull mode.
3874 * tests/input.at (Torturing the Scanner): Likewise.
3875 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3876 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3877 AT_YACC_IF, which now includes the case of push mode since %skeleton
3878 need not be used for push mode. This will be more intuitive once
3879 push.c is renamed to yacc.c.
3880
3881 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3882
3883 For push mode, convert yyparse from a macro to a function, invoke yylex
3884 instead of passing a yylexp argument to yypull_parse, and don't
3885 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3886 Discussed starting at
3887 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3888 * data/bison.m4 (b4_pull_if): New.
3889 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3890 * data/push.c: Improve M4 quoting a little.
3891 (b4_generate_macro_args, b4_parenthesize): Remove.
3892 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3893 any time a pull parser is requested.
3894 Don't #define this as a wrapper around yypull_parse. Instead, when
3895 both push and pull are requested, make it a function that does that
3896 same thing.
3897 (yypull_parse): If there's a b4_prefix, #define this to
3898 b4_prefix[pull_parse] when both push and pull are requested.
3899 Don't define this as a function unless both push and pull are
3900 requested.
3901 Remove the yylexp argument and hard-code yylex invocation instead.
3902 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3903 %push-parser.
3904 * src/getargs.c (pull_parser): New global initialized to true.
3905 * getargs.h (pull_parser): extern it.
3906 * src/output.c (prepare): Insert pull_flag muscle.
3907 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3908 (prologue_declaration): Set both push_parser and pull_parser = true for
3909 %push-pull-parser. Set push_parser = true and pull_parser = false for
3910 %push-parser.
3911 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3912 %push-parser since there's no backward-compatibility concern here.
3913 Scan %push-pull-parser.
3914 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3915 instead of %push-parser.
3916 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3917 prototype it in the module that calls yyparse.
3918 * tests/input.at (Torturing the Scanner): Likewise.
3919 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3920
3921 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 Update etc/bench.pl. Optimize push mode a little (the yyn change
3924 deserves most of the credit).
3925 * Makefile.am (SUBDIRS): Add etc subdirectory.
3926 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3927 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3928 yytoken, yyval, and yyloc declarations to...
3929 (yyparse or yypush_parse): ... here to improve performance. For
3930 yypush_parse invocations after the first, be sure to assign yyn its old
3931 value again.
3932 (yypstate_new): Don't bother initializing the yyresult field since the
3933 initial value isn't used.
3934 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3935 remove the #define that, in push mode, set it to yyps->NAME.
3936 * etc/Makefile.am: New.
3937 * etc/bench.pl: Remove and build it instead from...
3938 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3939 "tests/bison" from the build directory by default rather than just
3940 invoking "bison" from $PATH.
3941 (calc_grammar): Update push parser code: don't declare yylval globally,
3942 don't define yyparse_wrapper, and don't #define yyparse.
3943 (bench_grammar): Update to check all working combinations of yacc.c,
3944 push.c, impure, pure, pull, and push.
3945
3946 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3947
3948 For push mode, add pull wrappers around yypush_parse.
3949 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3950 (yypull_parse): New function wrapping yypush_parse.
3951 (yyparse): New #define wrapping yypull_parse.
3952 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3953 is declared.
3954 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3955 prototype yylex in the module that calls yyparse, and don't prototype
3956 yyparse there. Otherwise, the yyparse expansion won't compile.
3957 * tests/input.at (Torturing the Scanner): Likewise.
3958
3959 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3960
3961 Enable push parsers to operate in impure mode. Thus, %push-parser no
3962 longer implies %pure-parser. The point of this change is to move
3963 towards being able to test the push parser code by running the entire
3964 test suite as if %push-parser had been declared.
3965 * data/push.c (yypush_parse): For impure mode, remove the
3966 yypushed_char, yypushed_val, and yypushed_loc arguments.
3967 Instead, declare these as local variables initialized to the global
3968 yychar, yylval, and yylloc.
3969 For the first yypush_parse invocation only, restore the initial values
3970 of these global variables when it's time to read a token since they
3971 have been overwritten.
3972 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3973 %push-parser.
3974 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3975 %pure-parser along with %push-parser since this test case was designed
3976 for pure push parsers.
3977 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3978 (AT_YACC_OR_PUSH_IF): New.
3979 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3980 add a note that it's still wrong for some cases (as it has been for a
3981 while).
3982 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3983 %push-parser no longer implies %pure-parser.
3984
3985 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3986
3987 Remove some unnecessary differences between the pull parser code and
3988 the push parser code. This patch enables yynerrs in push mode.
3989 * data/push.c: Reformat M4 a little.
3990 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3991 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3992 because push mode is on. Instead, if pure mode is on, move yynerrs
3993 to...
3994 (b4_declare_parser_state_variables): ... here.
3995 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3996 to yyps->NAME so it can be used in yypush_parse.
3997 (yypush_parse): Don't omit uses of yynerrs in push mode.
3998
3999 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4000
4001 Fix bug such that the first pushed token's value and location are
4002 sometimes overwritten (sometimes by %initial-action) before being used.
4003 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4004 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4005 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4006 more closely mimic the pull parser logic.
4007 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4008 time to read a token, which is after any initialization of yylval and
4009 yylloc.
4010 (gottoken): Rename label to...
4011 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4012 user namespace.
4013
4014 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4015
4016 Rearrange initialization of the parser state variables so that the
4017 skeleton doesn't have to have a copy for pull mode and another for push
4018 mode. This patch also fixes at least a bug such that yylloc was not
4019 initialized (with b4_location_initial_line and
4020 b4_location_initial_column) upon calling yypush_parse. However, that
4021 initialization now overwrites the first token's location;
4022 %initial-action assigning @$ already did the same thing, and both bugs
4023 will be fixed in a later patch.
4024 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4025 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4026 yyss, yyvs, yyls, and yystacksize.
4027 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4028 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4029 yylsp.
4030 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4031 yyps->NAME so it can be used in yypush_parse.
4032 (yyparse or yypush_parse): For yypush_parse, don't print the
4033 "Starting parse" diagnostic for invocations after the first.
4034 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4035 yypush_parse, only do it for the first invocation.
4036 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4037 initialization to occur in yypush_parse but only on the first
4038 invocation.
4039
4040 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4041
4042 * data/push.c: Add CPP guards around push parser declarations in both
4043 the header and the code file.
4044 In the code file, move the push parser declarations to the same place
4045 they appear in the header file.
4046 Clean up the M4 some, especially the inconsistent underquoting in
4047 some b4_c_function_def and b4_c_function_decl uses.
4048
4049 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4050
4051 Encapsulate the push parser state variables into an M4 macro so the
4052 push skeleton doesn't have to list them again for pull mode's yyparse.
4053 For push mode, remove yypush_parse's local equivalents of these
4054 variables to eliminate unnecessary copying between the two sets at
4055 run-time. This patch also fixes at least a bug related to multiple
4056 %initial-action invocations in push mode.
4057 * data/push.c (b4_declare_parser_variables): Rename to...
4058 (b4_declare_scanner_communication_variables): ... this for clarity and
4059 update both uses.
4060 (b4_declare_yyparse_variables): Remove and move its contents to the one
4061 spot where it was invoked.
4062 (b4_declare_parser_state_variables): New macro containing the parser
4063 state variables required by push mode.
4064 (struct yypstate): Replace all fields but yynew with
4065 b4_declare_parser_state_variables.
4066 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4067 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4068 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4069 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4070 parser state variable declarations with
4071 b4_declare_parser_state_variables.
4072 Don't initialize parser state variables when calling yypush_parse since
4073 yypstate_new already does that.
4074 Invoke the user's initial action only upon the first yypush_parse
4075 invocation.
4076 Remove all code that copies between the local parser state variables
4077 and the yypstate.
4078
4079 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4080
4081 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4082 prevent a name collision in a future patch where these names will
4083 sometimes be #define'd.
4084 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4085 since it no longer has the same name as the existing argument.
4086 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4087
4088 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4089 and Joel E. Denny <jdenny@ces.clemson.edu>
4090
4091 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4092 that the argument is case-insensitive, and there's no `=' here.
4093 For the %skeleton entry, mention that %language is better.
4094 (Bison Options): Likewise for --language and --skeleton. Move the
4095 --skeleton entry so that the `Tuning the parser' section is sorted
4096 alphabetically on long options.
4097 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4098 %language directive in detail here; cross-reference the %language
4099 documentation instead.
4100 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4101 `%require "2.3b"' so that the example is always up-to-date.
4102 (Table of Symbols): Add entries for %language and %skeleton.
4103 * examples/extexi (normalize): Instead of replacing every %require
4104 argument with the current Bison version, just substitute for
4105 `@value{VERSION}'. This guarantees that we're testing what actually
4106 appears in the documentation.
4107 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4108 rather than `@VERSION@'.
4109
4110 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4111
4112 * NEWS: Reword the %language news a bit, and put it earlier.
4113
4114 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4115 Rewrite to simplify the logic.
4116 (language_argmatch): Likewise.
4117 (program_name): We now own this var.
4118 * src/getargs.h (struct bison_language): Use char[] rather than
4119 const char *.
4120
4121 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4122 Java is supported.
4123 * src/complain.c (program_name): Remove decl; no longer needed.
4124 * src/main.c (program_name): Remove; now belongs to getargs.
4125
4126 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4127
4128 * NEWS: Document %language.
4129
4130 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4131
4132 * data/c-skel.m4, data/c++-skel.m4: New files.
4133 * data/glr.c: Complain on push parsers.
4134
4135 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4136 over %skeleton.
4137 (Decl Summary): Document %language and %skeleton.
4138 (Command line): Document -L.
4139
4140 * examples/extexi: Rewrite %require directive.
4141 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4142
4143 * src/files.c (compute_exts_from_gc): Look in language structure
4144 for .y extension.
4145 (compute_file_name_parts): Check whether .tab should be added.
4146 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4147 (language, skeleton_arg, language_argmatch): New.
4148 (long_options): Add --language.
4149 (getargs): Use skeleton_arg, add -L/--language.
4150 * src/getargs.h: Include location.h.
4151 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4152 * src/output.c (prepare): Pick default skeleton from struct language.
4153 Don't dispatch C skeletons here.
4154 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4155 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4156 * src/scan-gram.l ("%language"): New rule.
4157
4158 * tests/calc.at: Test %skeleton and %language.
4159 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4160 (AT_GLR_IF): Look for %skeleton "glr.cc".
4161 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4162 (AT_YACC_IF): Reject %language.
4163
4164 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4165
4166 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4167 since it wasn't used; only the typedef name 'semantic_type' is needed.
4168 Also, omit trailing white space.
4169
4170 * bootstrap: Sync from coreutils.
4171 (gnulib_extra_files): Add build-aux/announce.gen.
4172 (slurp): Adjust .gitignore files like .cvsignore files.
4173 * build-aux/announce-gen: Remove from CVS, since bootstrap
4174 now creates this.
4175
4176 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4177
4178 Make %push-parser imply %pure-parser. This fixes several bugs; see
4179 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4180 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4181 pure_parser = true.
4182 * data/push.c: Don't bother testing b4_push_if when deciding whether
4183 to expand b4_declare_parser_variables globally.
4184 (yypush_parse): Likewise in here.
4185
4186 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4187 (yy_reduce_print): Reformat M4 for readability.
4188
4189 2006-12-15 Bob Rossi <bob@brasko.net>
4190 and Joel Denny <jdenny@ces.clemson.edu>
4191
4192 * data/push.c (yypstate): Add typedef, and update all uses of
4193 struct yypstate to just yypstate.
4194 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4195
4196 2006-12-14 Bob Rossi <bob@brasko.net>
4197
4198 * data/push.c (yypush_parse): Declare prototype regardless of
4199 %locations option.
4200
4201 2006-12-14 Bob Rossi <bob@brasko.net>
4202
4203 * data/push.c (yyparse): Remove the prototype and the #define when in
4204 push-parser mode.
4205
4206 2006-12-13 Bob Rossi <bob@brasko.net>
4207
4208 * data/push.c (yypstate_init): Rename to...
4209 (yypstate_new): ... this and use b4_c_function_def.
4210 (yypstate_delete): New.
4211 (yypush_parse): Change parameters yynval and yynlloc to be const.
4212 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4213 yypstate_delete functions.
4214
4215 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4216
4217 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4218 strange test case titles. Reported by Bob Rossi.
4219
4220 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4221
4222 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4223 of potential ambiguities in GLR grammers.
4224
4225 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4226
4227 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4228 `bison ', use m4_index instead of m4_substr since chopping up a string
4229 containing M4-special characters causes problems here.
4230
4231 Fix a couple of bugs related to special characters in user-specified
4232 file names, and make it easier for skeletons to compute output file
4233 names with the same file name prefix as Bison-computed output file
4234 names.
4235 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4236 b4_parser_file_name and b4_spec_defines_file instead of
4237 @output_parser_name@ and @output_header_name@, which are now redundant.
4238 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4239 b4_parser_file_name, b4_spec_defines_file, and the new
4240 @basename(FILENAME@) instead of @output_parser_name@ and
4241 @output_header_name@, which inappropriately escaped the file names as
4242 C string literals.
4243 * src/files.c (all_but_ext): Remove static qualifier.
4244 (compute_output_file_names): Move `free (all_but_ext)' to...
4245 (output_file_names_free): ... here since all_but_ext is needed later.
4246 * src/files.h (all_but_ext): Extern.
4247 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4248 exactly what MUSCLE_INSERT_STRING used to do.
4249 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4250 characters are escaped properly.
4251 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4252 all_but_ext.
4253 For pkgdatadir muscle, maintain previous functionality by using
4254 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4255 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4256 digraphs would never be expanded. Hopefully no one has M4-special
4257 characters in his Bison installation path.
4258 * src/scan-skel.l: Don't parse @output_header_name@ and
4259 @output_parser_name@ anymore since they're now redundant.
4260 In @output, use decode_at_digraphs.
4261 Parse a new @basename command that invokes last_component.
4262 (decode_at_digraphs): New.
4263 (BASE_QPUTS): Remove unused.
4264 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4265 (Output file name): New tests.
4266
4267 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4268
4269 Warn about output files that are generated by the skeletons and that
4270 conflict with other output files.
4271 * data/glr.c: Don't generate the header file here when glr.cc does.
4272 * src/files.c (file_names, file_names_count): New static globals.
4273 (compute_output_file_names): Invoke output_file_name_check for files
4274 not generated by the skeletons and remove existing checks.
4275 (output_file_name_check): New function that warns about conflicting
4276 output file names.
4277 (output_file_names_free): Free file_names.
4278 * src/files.h (output_file_name_check): Declare.
4279 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4280 the skeletons.
4281 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4282 (Conflicting output files): New tests.
4283
4284 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4285
4286 * doc/bison.texinfo: Fix a couple of typos.
4287
4288 2006-12-08 Bob Rossi <bob@brasko.net>
4289
4290 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4291 Rename to...
4292 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4293 update all uses.
4294 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4295 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4296 local pv.
4297 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4298 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4299
4300 2006-12-07 Bob Rossi <bob@brasko.net>
4301 and Joel Denny <jdenny@ces.clemson.edu>
4302
4303 * data/push.c (yypvarsinit): Change return type from void* to struct
4304 yypvars*. No longer cast to void* on return.
4305 (struct yypvars): Remove yylen since it need not be remembered between
4306 yypushparse invocations.
4307 (yypushparse): Don't copy between yylen and pv->yylen.
4308
4309 2006-12-05 Bob Rossi <bob@brasko.net>
4310
4311 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4312 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4313 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4314 (struct yypvars): Remove b4_declare_parser_variables.
4315 (yypvarsinit): Remove init code for removed variables.
4316 (global scope): Do not declare b4_declare_parser_variables if
4317 push or pure mode.
4318 (yypushparse): Add b4_declare_parser_variables.
4319 Init new local variables, and remove init code for removed
4320 yypvars variables.
4321 (yyparse): Delete.
4322 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4323 and yyparse for other modes.
4324 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4325 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4326 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4327 (AT_PURE_LEX_IF): True if pure or push parser.
4328
4329 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4330
4331 Document Yacc prologue alternatives and default %destructor's and
4332 %printer's as experimental. Don't mention Java yet. Discussed at
4333 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4334 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4335 (2.3a): Annotate this entry to say the old forms of these features were
4336 also experimental.
4337 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4338 Table of Symbols): Say they're experimental. Comment out any mention
4339 of Java (we'll want this back eventually).
4340
4341 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4342
4343 Support a file name argument to %defines. Deprecate `=' in
4344 %file-prefix, %name-prefix, and %output. Discussed at
4345 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4346 * NEWS (2.3a+): Mention.
4347 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4348 form of %defines, and remove `=' from entries for %file-prefix,
4349 %name-prefix, and %output.
4350 * src/parse-gram.y (prologue_declaration): Implement.
4351 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4352 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4353 all but one occurrence of %name-prefix.
4354 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4355 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4356 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4357 occurrence of each of %file-prefix and %output. Add check for %defines
4358 with argument.
4359 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4360 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4361 Remove the `=' from %output.
4362
4363 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4364
4365 Don't escape $ in test case titles since Autoconf 2.61 now does that
4366 correctly.
4367 * tests/actions.at (Default %printer and %destructor are not for error
4368 or $undefined): Here.
4369 (Default %printer and %destructor are not for $accept): Here.
4370 * tests/input.at (Invalid $n and @n): Here.
4371
4372 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4373
4374 Rename <!> to <>. Discussed starting at
4375 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4376 * NEWS (2.3a+): Update.
4377 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
4378 Update.
4379 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4380 * src/scan-gram.l (INITIAL): Implement.
4381 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4382 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4383 comment.
4384 * tests/actions.at (Default tagless %printer and %destructor,
4385 Default tagged and per-type %printer and %destructor,
4386 Default %printer and %destructor are not for error or $undefined,
4387 Default %printer and %destructor are not for $accept,
4388 Default %printer and %destructor for mid-rule values): Update.
4389 * tests/input.at (Default %printer and %destructor redeclared,
4390 Unused values with default %destructor): Update.
4391
4392 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4393
4394 Don't let %prec take a nonterminal.
4395 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4396 token.
4397 * tests/input.at (%prec takes a token): New test checking that %prec
4398 won't take a nonterminal.
4399
4400 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4401
4402 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4403 it was double-quoted.
4404 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4405 grammar is maintained with Bison's highest standards.
4406 * src/getargs.c: Fix some typos in Doxygen comments.
4407
4408 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4409
4410 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4411 later. Reported by Paul Eggert in
4412 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4413 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4414 * src/scan-code.l (translate_action): Don't bother invoking
4415 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4416 (code_scanner_free): Instead of invoking
4417 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4418 which frees more.
4419 * src/scan-gram.l (gram_scanner_free): Likewise.
4420 * src/scan-skel.l (scan_skel): Likewise.
4421
4422 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4423
4424 * src/files.c (tr): Change return type to void.
4425 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4426 has been called previously for the same key.
4427 (muscle_find): Return storage instead of value so that
4428 --enable-gcc-warnings doesn't produce warnings that the return discards
4429 const. aver that the value and storage are the same since storage
4430 could potentially be NULL when value is not.
4431 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4432 same as 0.
4433
4434 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4435
4436 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4437 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4438 us a slightly cleaner distribution, and also works.
4439 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4440 gnulib changes.
4441
4442 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4443 and Paul Eggert <eggert@cs.ucla.edu>
4444
4445 Don't let Bison leak memory except when it complains.
4446 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4447 (spec_defines_file, dir_prefix): Now char *, not const char *,
4448 since they are freed.
4449 * src/files.c: Likewise.
4450 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4451 Likewise.
4452 (tr): Now operates in-place. All uses changed.
4453 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4454 values.
4455 (compute_file_name_parts, compute_output_file_names): Don't store
4456 read-only data in variables that will be freed.
4457 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4458 src_extension, and header_extension.
4459 (output_file_names_free): New public function to free
4460 spec_verbose_file, spec_graph_file, spec_defines_file,
4461 parser_file_name, and dir_prefix.
4462 * src/getargs.c (getargs): Don't store read-only data in variables that
4463 will be freed.
4464 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4465 (which previously existed but was unused), and quotearg_free.
4466 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4467 * src/muscle_tab.c: Likewise.
4468 (muscle_entry): Make the value char const *,
4469 and add a new storage member that is char * and can be freed.
4470 (muscle_entry_free): New private function.
4471 (muscle_init): Use it instead of free.
4472 (muscle_insert, muscle_grow): Update and use new storage member.
4473 (muscle_code_grow): Free the string passed to muscle_grow
4474 since it's not needed anymore.
4475 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4476 add a new `char *code' member.
4477 ("{...}"): Declare semantic type as code.
4478 * src/scan-code.h (translate_rule_action):
4479 (translate_symbol_action, translate_code, translate_action): Return
4480 `char const *' rather than `char *' since external code should not free
4481 these strings.
4482 * src/scan-code.l: Likewise.
4483 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4484 which is "{...}" in the parser.
4485 * tests/Makefile.am (maintainer-check-valgrind): Set
4486 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4487 Valgrind.
4488 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4489 complain.
4490 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4491 expecting a non-zero exit status sets --leak-check=summary and
4492 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4493 this case, and we don't want to hear about it.
4494
4495 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4496
4497 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4498 instead of from the template, to simplify configuration a bit.
4499 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4500 and m4/wint_t.m4, as they are needed with the latest gnulib.
4501
4502 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4503
4504 Disable unset/unused mid-rule value warnings by default, and recognize
4505 --warnings=midrule-values to enable them. Discussed starting at
4506 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4507 * NEWS (2.3a+): Mention.
4508 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4509 warnings): Add entry for midrule-values subargument.
4510 * src/reader.c (symbol_should_be_used): Don't return true just because
4511 the value is a set/used mid-rule value unless
4512 --warnings=midrule-values was specified.
4513 * tests/input.at (Unused values, Unused values before symbol
4514 declarations): Run tests with and without --warnings=midrule-values.
4515
4516 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4517 than LIST_FREE directly.
4518
4519 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Finish implementing --warnings=error, which should not be implied by
4522 --warnings=all (or by its synonyms -W and --warnings without
4523 subarguments).
4524 * src/complain.c (set_warning_issued): New function to report that
4525 warnings are being treated as errors and to record an error if so.
4526 Invoke...
4527 (warn_at, warn): ... here.
4528 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4529 "error - warnings are errors" does not appear above "all - all of the
4530 above".
4531 (getargs): For -W and --warnings without subarguments, don't let
4532 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4533 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4534
4535 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4536
4537 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4538 empty subargument list. For example: `bison --warnings= parser.y'.
4539
4540 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4541
4542 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4543 the parser header file so that gcc doesn't warn.
4544
4545 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4546
4547 Split the default %destructor/%printer into two kinds: <*> and <!>.
4548 Discussed starting at
4549 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4550 * NEWS (2.3a+): Mention.
4551 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4552 previous change today related to mid-rules.
4553 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
4554 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
4555 (TYPE_TAG_ANY): Add as <*>.
4556 (TYPE_TAG_NONE): Add as <!>.
4557 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4558 for <*> and <!>.
4559 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4560 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4561 * src/symlist.c (symbol_list_default_new): Split into tagged and
4562 tagless versions.
4563 (symbol_list_destructor_set, symbol_list_printer_set): Split
4564 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4565 SYMLIST_DEFAULT_TAGLESS.
4566 * src/symlist.h: Update symbol_list_default*_new prototypes.
4567 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4568 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4569 * src/symtab.c (default_destructor, default_destructor_location,
4570 default_printer, default_printer_location): Split each into tagged and
4571 tagless versions.
4572 (symbol_destructor_get, symbol_destructor_location_get,
4573 symbol_printer_get, symbol_printer_location_get): Implement tagged
4574 default and tagless default cases.
4575 (default_destructor_set, default_printer_set): Split each into tagged
4576 and tagless versions.
4577 * src/symtab.h: Update prototypes.
4578 * tests/actions.at (Default %printer and %destructor): Rename to...
4579 (Default tagless %printer and %destructor): ... this, and extend.
4580 (Per-type %printer and %destructor): Rename to...
4581 (Default tagged and per-type %printer and %destructor): ... this, and
4582 extend.
4583 (Default %printer and %destructor for user-defined end token): Extend.
4584 (Default %printer and %destructor are not for error or $undefined):
4585 Update.
4586 (Default %printer and %destructor are not for $accept): Update.
4587 (Default %printer and %destructor for mid-rule values): Extend.
4588 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4589 (Unused values with default %destructor): Extend.
4590
4591 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4592
4593 Don't apply the default %destructor/%printer to an unreferenced midrule
4594 value. Mentioned at
4595 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
4596 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
4597 like $@n instead of just @n so that the default %destructor/%printer
4598 logic doesn't see them as user-defined symbols.
4599 (symbol_is_dummy): Check for both forms of the name.
4600 * src/reader.c (packgram): Remove the `$' from each midrule symbol
4601 name for which the midrule value is referenced in any action.
4602 * tests/actions.at (Default %printer and %destructor for mid-rule
4603 values): New test.
4604 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
4605 for change to dummy symbol names.
4606
4607 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4608
4609 Warn about unset midrule $$ if the corresponding $n is used.
4610 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
4611 $n usage.
4612 (packgram): Before invoking grammar_rule_check on any rule, make sure
4613 all actions have already been scanned in order to set `used' flags.
4614 Otherwise, checking that a midrule's $$ is set will not always work
4615 properly because the midrule check must forward-reference the midrule's
4616 parent rule.
4617 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
4618 warning.
4619
4620 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4621
4622 More improvements to the documentation of the prologue alternatives:
4623 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
4624 Bison manual.
4625 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
4626 some text to clarify the relative importance of the new directives and
4627 to show how these directives may be viewed as code labels.
4628
4629 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
4630
4631 Similar to the recently removed %before-header, add %code-top as the
4632 alternative to the pre-prologue. Mentioned at
4633 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
4634 Also, let the prologue alternatives appear in the grammar section.
4635 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
4636 (prologue_declaration): Move the existing prologue alternatives to...
4637 (grammar_declaration): ... here and add %code-top.
4638 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
4639
4640 Clean up and extend documentation for the prologue alternatives.
4641 * NEWS (2.3a+): Describe prologue alternatives.
4642 * doc/bison.texinfo (Prologue): Move discussion of prologue
4643 alternatives to...
4644 (Prologue Alternatives): ... this new section, and extend it to discuss
4645 all 4 directives in detail.
4646 (Table of Symbols): Clean up discussion of prologue alternatives and
4647 add %code-top.
4648
4649 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4650
4651 DJGPP specific issues.
4652
4653 * djgpp/config.bat: config.hin has been moved to lib. Adjust
4654 config.bat accordingly.
4655 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
4656 * djgpp/config.site: Likewise.
4657
4658 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
4659
4660 Replace %*-header with %provides, %requires, %code. See discussion at
4661 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
4662
4663 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
4664 (b4_user_start_header): Remove.
4665 * data/glr.c: Use new macros instead of b4_*start_header
4666 and b4_*end_header.
4667 * data/glr.cc: Likewise.
4668 * data/lalr1.cc: Likewise.
4669 * data/push.c: Likewise.
4670 * data/yacc.c: Likewise.
4671
4672 * doc/bison.texinfo: Remove %before-header, rename
4673 %{start,end,after}-header to %requires, %provides, %code.
4674
4675 * src/parse-gram.y: Likewise (also rename token names accordingly).
4676 * src/scan-gram.l: Likewise.
4677 * tests/actions.at: Likewise.
4678
4679 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4680
4681 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4682 Problem reported by Joel E. Denny.
4683
4684 2006-10-14 Jim Meyering <jim@meyering.net>
4685
4686 (Sync from coreutils.)
4687 Work also when the working directory (with e.g. coreutils sources)
4688 is version controlled with git, rather than CVS.
4689 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4690 rather than CVS.
4691 In messages and comments, say e.g., "checked-out sources",
4692 rather than "CVS sources".
4693 (version_controlled_file): New function. Work for git as well as
4694 for CVS. Don't use grep's -q option.
4695 (slurp): Call it here, in place of CVS-specific code.
4696
4697 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
4698
4699 Fix testsuite for ./configure --enable-gcc-warnings:
4700 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
4701 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
4702 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
4703 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
4704 * test/regression.at (Diagnostic that expects two alternatives):
4705 Likewise.
4706
4707 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4708
4709 * bootstrap.conf (gnulib_modules): Add config-h.
4710 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
4711 worry about HAVE_CONFIG_H.
4712 * lib/abitset.c: Likewise.
4713 * lib/bitset.c: Likewise.
4714 * lib/bitset_stats.c: Likewise.
4715 * lib/bitsetv-print.c: Likewise.
4716 * lib/bitsetv.c: Likewise.
4717 * lib/ebitset.c: Likewise.
4718 * lib/get-errno.c: Likewise.
4719 * lib/lbitset.c: Likewise.
4720 * lib/subpipe.c: Likewise.
4721 * lib/timevar.c: Likewise.
4722 * lib/vbitset.c: Likewise.
4723 * lib/bitset.c: Include "bitset.h" first, to test interface.
4724 * lib/bitset_stats.c: Include "bitset_stats.h" first.
4725 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
4726 * lib/bitsetv.c: Include "bitsetv.h" first.
4727 * lib/get-errno.c: Include "get-errno.h" first.
4728 * m4/.cvsignore: Add config-h.m4.
4729 * tests/actions.at (Default %printer and %destructor for ...):
4730 Adjust expected line numbers in output to reflect removal of #if
4731 HAVE_CONFIG_H lines.
4732 * tests/glr-regression.at (Missed %merge type warnings when ...):
4733 Likewise.
4734 * tests/regression.at (Braced code in declaration in rules section):
4735 Likewise.
4736 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
4737 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
4738 Include <config.h> unconditionally.
4739
4740 * bootstrap: Sync from coreutils, as follows:
4741
4742 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4745 variable was sometimes used without being initialized. This
4746 messed up the installation of the INSTALL file in some cases.
4747
4748 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4749
4750 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4751 --copy. Inspired by a suggestion from Bruno Haible.
4752
4753 2006-10-03 Jim Meyering <jim@meyering.net>
4754
4755 * bootstrap: Undo last change to this file, since now gnulib-tool
4756 sticks with the automake default in generating dependencies.
4757
4758 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4759
4760 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
4761 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4762
4763 * doc/bison.1: Add copyright notice.
4764
4765 * data/glr.c: Don't include <stdarg.h>; not used.
4766
4767 * NEWS: The -g and --graph options now output graphs in Graphviz
4768 DOT format, not VCG format.
4769 * doc/bison.1: Likewise.
4770 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
4771 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4772 of this change in
4773 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
4774 * TODO: Remove Graphviz entry.
4775 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4776 remove vcg.c, vcg.h, vcg_defaults.h.
4777 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4778 * src/graphviz.c, src/graphviz.h: New files.
4779 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4780 * src/files.h: Make comment more generic.
4781 * src/main.c (main): Likewise.
4782 * src/print_graph.h: Likewise.
4783 * src/getargs.c (usage): Make usage description more generic.
4784 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4785 (static_graph, fgraph): Remove. All uses changed to pass
4786 arguments instead of sharing a static var.
4787 (print_core, print_actions, print_state, print_graph):
4788 Output graphviz format rather than VCG format.
4789 * tests/.cvsignore: Remove *.vcg; add *.dot.
4790 * tests/output.at: Expect *.dot files, not *.vcg files.
4791
4792 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4793 accommodates the 2006-10-08 change.
4794
4795 2006-10-11 Bob Rossi <bob@brasko.net>
4796
4797 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4798 (b4_yyssa, b4_yyerror_range): New macros.
4799 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4800 (yypvarsinit): Remove init of removed fields.
4801 (yypushparse): Remove use of removed fields; use new macros instead.
4802
4803 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4804
4805 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4806 in a push parser. Reindent slightly to match yacc.c better.
4807
4808 2006-10-11 Bob Rossi <bob@brasko.net>
4809
4810 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4811 yymsg_alloc fields.
4812 (yypvarsinit, yypushparse): Remove init of removed fields.
4813 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
4814
4815 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4816
4817 * THANKS: Add Paolo Bonzini and Bob Rossi.
4818
4819 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
4820
4821 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4822 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4823 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4824 b4_define_user_cde and uses): Remove.
4825 (b4_comment, b4_prefix, b4_sync_start): New.
4826 * data/bison.m4: New file, with most of the content removed from c.m4.
4827 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4828 * src/output.c (output_skeleton): Pass bison.m4.
4829 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4830 only if specified.
4831
4832 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4833
4834 Fix test failure reported by Tom Lane in
4835 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4836 and try to make such failures easier to catch in the future.
4837 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4838 that's now the caller's responsibility.
4839 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4840 Set yychar = YYEOF if it's negative.
4841 * tests/actions.at (yylex): Abort if asked to read past EOF.
4842 * tests/conflicts.at (yylex): Likewise.
4843 * tests/cxx-type.at (yylex): Likewise.
4844 * tests/glr-regression.at (yylex): Likewise.
4845 * tests/input.at (yylex): Likewise.
4846 * tests/regression.at (yylex): Likewise.
4847 * tests/torture.at (yylex): Likewise.
4848
4849 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4850
4851 Fix problems with translating English-language diagnostics.
4852 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4853 respect to bison-runtime pot generation. The YY_ stuff
4854 wasn't being captured.
4855 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4856 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4857 * runtime-po/POTFILES.in: Add data/push.c.
4858
4859 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4860
4861 Merge bootstrap changes from coreutils.
4862
4863 2006-09-28 Jim Meyering <jim@meyering.net>
4864
4865 Automatically generated dependencies are important even
4866 when all of the sources in a directory come from gnulib.
4867 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4868 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4869
4870 2006-09-23 Jim Meyering <jim@meyering.net>
4871
4872 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4873
4874 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4875
4876 * bootstrap: Add support for --force.
4877 (usage): New function. Describe usage less tersely.
4878 (CVS_only_file): New var.
4879
4880 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4881
4882 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4883 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4884 Adjust white space and comments to match GNU style better.
4885
4886 2006-09-20 Bob Rossi <bob@brasko.net>
4887
4888 * data/push.c (yyresult_get): Remove function.
4889 (YYPUSH_MORE): Add #define.
4890 (yypushparse): Modify return value.
4891
4892 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4893
4894 * stamp-h.in: Remove; no longer needed.
4895 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4896 Remove config.h, config.hin, intl (no longer created).
4897 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4898 stamp-h1.
4899
4900 Sync bootstrap from coreutils, as follows:
4901
4902 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4903
4904 * bootstrap (symlink_to_gnulib): New function.
4905 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4906 to copies-of-gnulib.
4907 (cp_mark_as_generated, slurp, gnulib_files):
4908 Avoid making a copy if it's the same as the old version.
4909 (gnulib_files): Add support for this variable (used by Bison).
4910
4911 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4912
4913 * src/getargs.c (usage): Rework to use conventions similar to
4914 coreutils, to make translation a bit easier and the code a bit
4915 smaller. Problem reported by Tim Van Holder.
4916
4917 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4918
4919 Use some of gnulib's new modules, taken from coreutils.
4920
4921 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4922 * bootstrap.conf: New file.
4923 (gnulib_modules): Add configmake, inttypes, unistd.
4924 (XGETTEXT_OPTIONS): Add complain, complain_at,
4925 fatal, fatal_at, warn, warn_at, unexpected_end.
4926 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4927 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4928 (gl_EARLY): Add.
4929 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4930 (gl_INIT): Add
4931 (GNULIB_AUTOCONF_SNIPPET): Remove.
4932 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4933 the pickiest.
4934 * lib/.cvsignore: Add inttypes_.h.
4935 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4936 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4937 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4938 no-longer-necessary initializations.
4939 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4940 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4941 use the unistd module.
4942 * src/system.h: Likewise.
4943 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4944 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4945 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4946 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4947 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4948 * src/system.h: Include inttypes.h unconditionally, now that we
4949 use the inttypes module. Don't bother to include stdint.h, since
4950 inttypes.h now does that for us.
4951 (LOCALEDIR): Remove, now that we use the configmake module.
4952 * src/getargs.c: Include configmake.h.
4953 * src/main.c: Likewise.
4954 * src/output.c: Likewise.
4955 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4956 not from $abs_top_builddir, since config.h moved.
4957
4958
4959 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4960 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4961
4962 * src/parse-gram.y (symbol_declaration): Don't put statements
4963 before declarations; it's not portable to C89.
4964 * src/scan-code.l (handle_action_at): Likewise.
4965
4966 * src/scan-code.l: Always initialize braces_level; the old code
4967 left it uninitialized and therefore had undefined behavior.
4968
4969 Don't attempt to redefine 'assert', since it runs afoul of
4970 systems where standard headers (mistakenly) include <assert.h>.
4971 Instead, define and use our own alternative, called 'aver'.
4972 * src/reader.c: Don't include assert.h, since we no longer
4973 use assert.
4974 * src/scan-code.l: Likewise.
4975 * src/system.h (assert): Remove, replacing with....
4976 (aver): New function, taking a bool arg. All uses changed.
4977 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4978 not merely an integer.
4979
4980 2006-09-15 Bob Rossi <bob@brasko.net>
4981
4982 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4983 * data/c.m4 (YYPUSH): New.
4984 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4985 * src/getargs.c (push_parser): New var.
4986 * src/getargs.h (push_parser): New declaration.
4987 * src/output.c (prepare): Add macro insertion of `push_flag'.
4988 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4989 (prologue_declaration): Parse %push-parser.
4990 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4991 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4992 list of removed lines from the traces observed.
4993 (AT_CHECK_CALC_LALR): Added push parser tests.
4994
4995 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4996
4997 * NEWS: Version 2.3a.
4998 * configure.ac (AC_INIT): Likewise.
4999
5000 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5001 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5002 due to header ordering dependencies. I don't know why the #define
5003 was there.
5004
5005 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5006 runtime cost when YYDEBUG is not defined, and so that some tests
5007 that used to fail now work. Problem and initial suggestion by
5008 Paolo Bonzini.
5009 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5010 * data/glr.cc (b4_parser_class_name):
5011 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5012 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5013 (yydebug_) [YYDEBUG]: New member.
5014 (yycdebug_): Now defined only if YYDEBUG.
5015 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5016 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5017 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5018 if YYYDEBUG.
5019 (debug_stream, set_debug_stream, debug_level, set_debug_level):
5020 Define only if YYDEBUG.
5021 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5022 set_debug_level.
5023 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5024 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5025 AT_CHECK_CALC_GLR_CC that are working now.
5026
5027 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5028
5029 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5030 We don't need them in glr.cc, and glr.c defines them.
5031 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5032 assumes that defining it to anything is the same as defining
5033 it to 1. Problem reported by Paolo Bonzini.
5034
5035 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5036
5037 * data/c.m4 (b4_null, b4_case): Define.
5038 * src/output.c (prepare_symbols): Use b4_null.
5039 (user_actions_output): Use b4_case.
5040
5041 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5042
5043 * data/glr.c (b4_shared_declarations): Put start-header first,
5044 before any #includes that we generate, so that feature-test
5045 macros work. Problem reported by Michael Deutschmann in
5046 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5047 * data/lalr1.cc: Likewise.
5048 * doc/bison.texinfo (Prologue): Document that feature-test macros
5049 should be defined before any Bison declarations.
5050 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5051 that depend on location.hh after, not before, Bison decls, since
5052 we now include location.hh after the first user prologue.
5053
5054 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5055 Sander Brandenburg in
5056 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5057 Also, fix minor white space and comment issues.
5058 (Prologue): Mention that it's better to define feature-test macros
5059 before Bison declarations. Problem reported by Michael Deutschmann.
5060
5061 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5062 by Jim Meyering.
5063 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5064 This adjusts to recent gnulib changes.
5065
5066 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5067
5068 Finish implementation of per-type %destructor/%printer. Discussed
5069 starting at
5070 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5071 and
5072 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5073 * NEWS (2.3+): Add a description of this feature to the default
5074 %destructor/%printer description.
5075 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5076 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5077 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5078 list node contains a semantic type.
5079 * src/symtab.c, src/symtab.h: Extend with a table that associates
5080 semantic types with their %destructor's and %printer's.
5081 (semantic_type_from_uniqstr, semantic_type_get,
5082 semantic_type_destructor_set, semantic_type_printer_set): New functions
5083 composing the public interface of that table.
5084 (symbol_destructor_get, symbol_destructor_location_get,
5085 symbol_printer_get, symbol_printer_location_get): If there's no
5086 per-symbol %destructor/%printer, look up the per-type before trying
5087 the default.
5088 * tests/actions.at (Per-type %printer and %destructor): New test case.
5089 * tests/input.at (Default %printer and %destructor redeclared):
5090 Extend to check that multiple occurrences of %symbol-default in a
5091 single %destructor/%printer declaration is an error.
5092 (Per-type %printer and %destructor redeclared, Unused values with
5093 per-type %destructor): New test cases.
5094
5095 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5096
5097 Require default %destructor/%printer to be declared using
5098 %symbol-default instead of an empty symbol list, and start working on
5099 new per-type %destructor/%printer. Discussed at
5100 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5101 * NEWS (2.3+): Add %symbol-default to example.
5102 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5103 (Table of Symbols): Add entry for %symbol-default.
5104 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5105 (generic_symlist, generic_symlist_item): New nonterminals for creating
5106 a list in which each item is a symbol, semantic type, or
5107 %symbol-default.
5108 (grammar_declaration): Use generic_symlist in %destructor and %printer
5109 declarations instead of symbols.1 or an empty list.
5110 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5111 for changes to symbol_list.
5112 * src/reader.c: Update for changes to symbol_list.
5113 * src/scan-code.l: Likewise.
5114 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5115 * src/symlist.c, src/symlist.h: Extend such that a list node may
5116 represent a semantic type or a %symbol-default in addition to just an
5117 ordinary symbol. Add switched functions for setting %destructor's and
5118 %printer's.
5119 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5120 %destructor/%printer declarations.
5121
5122 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5123
5124 Whether the default %destructor/%printer applies to a particular symbol
5125 isn't a question of whether the user *declares* that symbol (in %token,
5126 for example). It's a question of whether the user by any means
5127 *defines* the symbol at all (by simply using a char token, for
5128 example). $end is defined by Bison whereas any other token with token
5129 number 0 is defined by the user. The error token is always defined by
5130 Bison regardless of whether the user declares it with %token, but we
5131 may one day let the user define error as a nonterminal instead.
5132 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5133 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5134 the meaning of "user-defined".
5135 * tests/actions.at (Default %printer and %destructor for user-declared
5136 end token): Rename to...
5137 (Default %printer and %destructor for user-defined end token): ...
5138 this.
5139
5140 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5141 computation of whether to apply the default, don't maintain a list of
5142 every Bison-defined symbol. Instead, just check for a first character
5143 of '$', which a user symbol cannot have, and check for the error token.
5144
5145 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5146
5147 Don't apply the default %destructor or %printer to the error token,
5148 $undefined, or $accept. This change fits the general rule that the
5149 default %destructor and %printer are only for user-declared symbols,
5150 and it solves several difficulties that are described in the new test
5151 cases listed below.
5152 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5153 * tests/actions.at (Default %printer and %destructor are not for error
5154 or $undefined, Default %printer and %destructor are not for $accept):
5155 New test cases.
5156
5157 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5158
5159 Allow %start after the first rule.
5160 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5161 when parsing the first rule.
5162 (check_and_convert_grammar): Search for it here after all grammar
5163 declarations have been parsed. Skip midrules, which have dummy LHS
5164 nonterminals.
5165 * src/symtab.c (symbol_is_dummy): New function.
5166 * src/symtab.h (symbol_is_dummy): Declare it.
5167 * tests/input.at (%start after first rule): New test.
5168
5169 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5170
5171 Redo some of the previous commit: add back the ability to use
5172 non-aliased/undeclared string literals since it might be useful to
5173 those declaring %token-table.
5174 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5175 commit: don't worry about complaints from symbols_pack.
5176 * src/symtab.c (symbol_new, symbol_class_set,
5177 symbol_check_alias_consistency): Undo changes in previous commit: count
5178 each string literal as a new symbol and token, assign it a symbol
5179 number, and don't complain about non-aliased string literals.
5180 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5181 and token counts but does still set aliased tokens to the same number,
5182 symbol_pack_processor now leaves empty slots in the symbols array.
5183 Remove those slots.
5184 * tests/regression.at (Undeclared string literal): Remove test case
5185 added in previous commit since non-aliased string literals are allowed
5186 again.
5187 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5188 remove unnecessary string literal declarations.
5189 * tests/sets.at (Firsts): Likewise.
5190
5191 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5192
5193 Don't allow an undeclared string literal, but allow a string literal to
5194 be used before its declaration.
5195 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5196 symbols_pack complained.
5197 * src/symtab.c (symbol_new): Don't count a string literal as a new
5198 symbol.
5199 (symbol_class_set): Don't count a string literal as a new token, and
5200 don't assign it a symbol number since symbol_make_alias does that.
5201 (symbol_make_alias): It's not necessary to decrement the symbol and
5202 token counts anymore. Don't assume that an alias declaration occurs
5203 before any uses of the identifier or string, and thus don't assert that
5204 one of them has the highest symbol number so far.
5205 (symbol_check_alias_consistency): Complain if there's a string literal
5206 that wasn't declared as an alias.
5207 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5208 symbol_pack asserts that every token has been assigned a symbol number
5209 although undeclared string literals have not.
5210 * tests/regression.at (String alias declared after use, Undeclared
5211 string literal): New test cases.
5212 (Characters Escapes, Web2c Actions): Declare string literals as
5213 aliases.
5214 * tests/sets.at (Firsts): Likewise.
5215
5216 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5217
5218 In the grammar scanner, STRING_FINISH unclosed constructs and return
5219 them to the parser in order to improve error messages.
5220 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5221 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5222 * tests/input.at (Unclosed constructs): New test case.
5223 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5224 seen.
5225
5226 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5227 unused global.
5228
5229 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5230
5231 Handle string aliases for character tokens correctly.
5232 * src/symtab.c (symbol_user_token_number_set): If the token has an
5233 alias, check and set its alias's user token number instead of its own,
5234 which is set to indicate the alias. Previously, every occurrence of
5235 the character token in the grammar overwrote that alias indicator with
5236 the character code.
5237 * tests/input.at (String aliases for character tokens): New test.
5238
5239 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5240
5241 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5242
5243 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5244
5245 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5246 to prevent failures when building on older platforms.
5247 Check for autopoint failure.
5248 Set XGETTEXT_OPTIONS to values that check for C format strings,
5249 so that translators are warned about them (this also helps
5250 prevent core dumps).
5251
5252 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5253 function, since it simplifies our code a bit.
5254
5255 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5256 rather than -W, so we don't get bogus warnings about sign comparisons.
5257 Add -Wpointer-arith, since that warning is useful (it reports code
5258 that does not conform to C89 and that some compilers reject).
5259 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5260 since it's no longer needed.
5261
5262 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5263
5264 Clean up scanners a bit.
5265 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5266 definitions so gcc won't warn when obstack_for_string is unused.
5267 * src/scan-code.l: config.h and system.h are already #include'd by
5268 scan-code-c.c, so get rid of them here.
5269 * src/scan-gram.l: Likewise.
5270 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5271 definitions rather than duplicating the rest of it.
5272 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5273
5274 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5275
5276 Suppress signed/unsigned comparison warnings for yycheck.
5277 * data/c.m4 (b4_safest_int_type): New macro.
5278 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5279 a signed int type, cast it to b4_safest_int_type first.
5280 * data/yacc.c: Likewise.
5281 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5282 also overwritten.
5283
5284 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5285
5286 * doc/bison.texinfo: Fix some typos.
5287
5288 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5289
5290 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5291 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5292
5293 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5294 the latest gnulib does this a different way.
5295 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5296 translation was patched, so stop omitting it.
5297
5298 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5299
5300 Enable declaration of default %printer/%destructor. Make the parser
5301 use these for all user-declared grammar symbols for which the user does
5302 not declare a specific %printer/%destructor. Thus, the parser uses it
5303 for token 0 if the user declares it but not if Bison generates it as
5304 $end. Discussed starting at
5305 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5306 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5307 and
5308 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5309 * NEWS (2.3+): Mention.
5310 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5311 declare a %destructor for a mid-rule's semantic value. It's just
5312 impossible to declare one specific to it.
5313 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5314 code. Describe default %destructor form.
5315 * src/parse-gram.y (grammar_declaration): Parse default
5316 %printer/%destructor declarations.
5317 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5318 and symbol_destructor_location_get rather than accessing the destructor
5319 and destructor_location members of struct symbol.
5320 (symbol_printers_output): Likewise but for %printer's.
5321 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5322 again.
5323 * src/symtab.c (default_destructor, default_destructor_location,
5324 default_printer, default_printer_location): New static global
5325 variables to record the default %destructor and %printer.
5326 (symbol_destructor_get, symbol_destructor_location_get,
5327 symbol_printer_get, symbol_printer_location_get): New functions to
5328 compute the appropriate %destructor and %printer for a symbol.
5329 (default_destructor_set, default_printer_set): New functions to set the
5330 default %destructor and %printer.
5331 * src/symtab.h: Prototype all those new functions.
5332 * tests/actions.at (Default %printer and %destructor): New test to
5333 check that the right %printer and %destructor are called, that they're
5334 not called for $end, and that $$ and @$ work correctly.
5335 (Default %printer and %destructor for user-declared end token): New
5336 test to check that the default %printer and %destructor are called for
5337 a user-declared end token.
5338 * tests/input.at (Default %printer and %destructor redeclared, Unused
5339 values with default %destructor): New tests to check related grammar
5340 warnings and errors.
5341
5342 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5343
5344 Clean up handling of %destructor for the end token (token 0).
5345 Discussed starting at
5346 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5347 and
5348 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5349
5350 Make the skeletons consistent in how they pop the end token and invoke
5351 its %destructor.
5352 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5353 state, which has token number 0, since this would invoke the
5354 %destructor for the end token.
5355 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5356 until after shifting the end token, or else it won't be popped.
5357 * data/yacc.c (yyparse): Likewise.
5358
5359 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5360 it's the end token. Upon termination, destroy an unshifted lookahead
5361 even when it's the end token.
5362 * data/lalr1.cc (yy::parser::parse): Likewise.
5363 * data/yacc.c (yyparse): Likewise.
5364
5365 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5366 value warnings for the end token when the user gives the end token a
5367 %destructor.
5368
5369 * tests/actions.at (Printers and Destructors): Test all the above.
5370
5371 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5372
5373 Update to latest gnulib and gettext versions.
5374 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5375 Add fopen-safer.
5376 (gnulib_files): Add m4/warning.m4. Don't worry about files
5377 overwritten by autopoint.
5378 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5379 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5380 rejects them.
5381 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5382 so that we can remove the intl files at a better time.
5383 (intl_files_to_remove): Remove aclocal.m4, since it gets
5384 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5385 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5386 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5387 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5388 Remove datarootdir hack; no longer needed.
5389 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5390 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5391 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5392 strdup.h.
5393 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5394 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5395
5396 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5397
5398 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5399 it with --assume-autoconf='latest-stable'.
5400
5401 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5402
5403 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5404 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5405 YYSTYPE' and `{'.
5406 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5407 those from muscle_tab.c since the old ones are misleading.
5408
5409 2006-07-13 Akim Demaille <akim@epita.fr>
5410
5411 Support %define "KEY" {VALUE}.
5412 * src/scan-code.h, src/scan-code.l (translate_action)
5413 (translate_rule_action, translate_symbol_action, translate_code):
5414 Return char *, not const char *.
5415 * src/parse-gram.y (declaration): Rename as...
5416 (prologue_declaration): this.
5417 (string_content): Remove this nonterminal, use STRING.
5418 (braceless, content, content.opt): New nonterminal.
5419 Use them.
5420 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5421 as value.
5422 * src/scan-gram.l (getargs.h): Don't include it.
5423
5424 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5425
5426 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5427 rather than a for-loop that declares a local bool variable. This
5428 should work around a compatibility problem with a Cray x1e C++
5429 compiler reported by Hung Nguyen in
5430 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5431 The for-loop was introduced in the 2004-11-17 change but I don't
5432 know why it was needed.
5433
5434 2006-07-12 Akim Demaille <akim@epita.fr>
5435
5436 * data/c.m4: Comment changes.
5437
5438 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
5439
5440 * src/complain.c (error_message, ERROR_MESSAGE): New.
5441 To factor...
5442 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5443 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5444
5445 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5446
5447 * NEWS: Instead of %union, you can define and use your own union type
5448 YYSTYPE if your grammar contains at least one <type> tag.
5449 Your YYSTYPE need not be a macro; it can be a typedef.
5450 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5451 (Union Decl, Decl Summary): Document this.
5452 * data/glr.c (YYSTYPE): Implement this.
5453 * data/glr.cc (YYSTYPE): Likewise.
5454 * data/lalr1.cc (YYSTYPE): Likewise.
5455 * data/yacc.c (YYSTYPE): Likewise.
5456 * src/output.c (prepare): Output tag_seen_flag.
5457 * src/parse-gram.y (declaration, grammar_declaration):
5458 Use 'union_seen' rather than 'typed' to determine whether
5459 %union has been seen, since grammars can now be typed without
5460 %union.
5461 (symbol_declaration, type.opt, symbol_def):
5462 Keep track of whether a tag has been seen.
5463 * src/reader.c (union_seen, tag_seen): New vars.
5464 (typed): remove.
5465 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5466 * src/scan-code.l (untyped_var_seen): New variable.
5467 (handle_action_dollar): Adjust to above changes.
5468 (handle_action_dollar, handle_action_at):
5469 Improve overflow checking for outlandish numbers.
5470 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5471 avoid new diagnostics generated by above changes.
5472 * tests/regression.at (YYSTYPE typedef): Add test to check
5473 for type tags without %union.
5474
5475 * src/symlist.c (symbol_list_length): Return int, not unsigned
5476 int, since callers expect int. This may need to get revisited
5477 once we have proper integer overflow checking.
5478
5479 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5480 object is now static.
5481
5482 * src/getargs.c (flags_argmatch): Return void, not int,
5483 to pacify ./configure --enable-gcc-warnings.
5484
5485 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5486 since last_string is already defined to FLEX_PREFIX (last_string).
5487
5488 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5489
5490 Implement --warnings/-W.
5491 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5492 replaced by...
5493 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5494 Adjust callers.
5495 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5496 (warnings_args, warnings_types): New.
5497 (getargs, short_options, long_options): Accept -W/--warnings.
5498 Sort the options by alphabetical order, upper case letter right
5499 before its lower case.
5500
5501 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5502
5503 Change %merge result type clash warnings to errors. Discussed at
5504 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5505 * src/reader.c (record_merge_function_type): Use complain_at.
5506 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5507 declared later): Update test case results.
5508
5509 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5510
5511 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5512 to be in alphabetical order.
5513 (trace_args): Spelling fixes.
5514
5515 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5516
5517 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5518 so they don't collide with user-defined macros.
5519 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5520 this was never guaranteed, and now that we're using gnulib stdint,
5521 which defines int_fast16_t to long int, the problem is exposed.
5522
5523 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5524
5525 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5526 need the full POSIX semantics (and weren't implementing them
5527 anyway).
5528
5529 Adjust to Autoconf 2.60 and today's gnulib.
5530 * bootstrap (gnulib_modules): Add stdint.
5531 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5532 no longer copies it.
5533 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5534 since stdint needs the former and wcwidth (which is now required
5535 by mbswidth) needs the latter.
5536 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5537 work around a compatibility glitch between gettext 0.14.6 and
5538 Autoconf 2.60.
5539 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5540 Do not check for uintptr_t, since new stdint module does the right
5541 thing.
5542 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5543 Add stdint.h, stdint_.h, wcwidth.h.
5544 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5545 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5546 stdint.m4, wchar_t.m4, wcwidth.m4.
5547 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5548 usual order for ../lib/*.h files.
5549 (file_name_split): Use last_component, not base_name, to adjust
5550 to gnulib changes.
5551 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5552 for ../lib/*.h files.
5553 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5554 Define unconditionally, since we now assume the stdint module.
5555 * src/scan-skel.l: Include <dirname.h>.
5556 (BASE_QPUTS): Use last_component, not base_name.
5557 * src/system.h: Include <unlocked-io.h> in the usual order
5558 for ../lib/*.h files. Include <stdint.h> unconditionally,
5559 since we now use the stdint module.
5560 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5561 HAVE_UINTPTR_T, since we now use the stdint module.
5562 (base_name): Remove decl, since files now include <dirname.h>
5563 to get the decl.
5564
5565 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5566
5567 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5568 New, default to 1.
5569 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5570 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5571 default.
5572 * tests/calc.at: Adjust.
5573
5574 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5575
5576 * data/c.m4 (b4_basename): New.
5577 (b4_syncline): Also output the location of its invocation (from
5578 the skeleton).
5579 (b4_user_action, b4_define_user_action, b4_user_actions)
5580 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5581 (b4_user_stype): New.
5582 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5583
5584 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5585
5586 In the grammar file, the first column is 1 not 0 on the first line as
5587 on every other line.
5588 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5589 * tests/input.at (Torturing the Scanner): Update output.
5590
5591 * src/scan-gram.l (scanner_cursor): Declare it static.
5592
5593 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5594
5595 In warnings, say "previous declaration" rather than "first
5596 declaration".
5597 * src/symtab.c (redeclaration): Do that here.
5598 * src/reader.c (record_merge_function_type): In the case of a result
5599 type clash, report the previous declaration rather than the very first
5600 one in the grammar file.
5601 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5602 declared later): Add a third declaration to check this behavior.
5603 * tests/input.at (Incompatible Aliases): Update output.
5604
5605 2006-06-27 Akim Demaille <akim@epita.fr>
5606
5607 * doc/Doxyfile.in: New.
5608 * doc/Makefile.am: Use it.
5609 * src/lalr.h, src/symtab.h: Initial doxygenation.
5610
5611 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5612
5613 Don't miss %merge result type warnings just because the LHS types are
5614 declared after the %merge. This continues the effort of the previous
5615 patch.
5616 * src/reader.c (get_merge_function): Don't set the merger type yet.
5617 (record_merge_function_type): New function for setting the merger type
5618 and checking for clashes.
5619 (grammar_current_rule_merge_set): Set the location of the %merge for
5620 the current rule.
5621 (packgram): Invoke record_merge_function_type for each rule now that
5622 all symbol type declarations have been parsed.
5623 * src/reader.h (merger_list.type_declaration_location): New member
5624 storing the location of the first %merge from which the type for this
5625 merging function was derived.
5626 * src/symlist.h (symbol_list.merger_declaration_location): New member
5627 storing the location of a rule's %merge, if any.
5628 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5629 declared later): New test to catch the error fixed by the above patch.
5630
5631 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5632
5633 Get action warnings (grammar_rule_check) right even when symbol
5634 declarations appear after the rules. Discussed at
5635 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
5636 and
5637 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
5638 Don't mistake the type of $$ in a midrule to be that of its parent
5639 rule's $$.
5640 * src/reader.c (grammar_current_rule_end): Don't invoke
5641 grammar_rule_check yet since not all symbol declarations may have been
5642 parsed yet.
5643 (grammar_midrule_action): Likewise.
5644 Don't record whether the midrule's $$ has been used yet since actions
5645 haven't been translated yet.
5646 Record the midrule's parent rule and its RHS index within the parent
5647 rule.
5648 (grammar_current_rule_action_append): Don't translate the action yet
5649 since not all symbol declarations may have been parsed yet and, thus,
5650 warnings about types for $$, $n, @$, and @n can't be reported yet.
5651 (packgram): Translate the action and invoke grammar_rule_check now that
5652 all symbol declarations have been parsed.
5653 * src/scan-code.l (handle_action_dollar): Now that this is invoked
5654 after parsing the entire grammar file, the symbol list here in the case
5655 of a midrule is actually the midrule's empty RHS, so reference its
5656 parent rule's RHS where necessary.
5657 On the other hand, now that you can already know it's a midrule, you
5658 aren't forced to think $$ has the same type as its parent rule's $$.
5659 (handle_action_at): In the case of a midrule, reference the parent rule
5660 where necessary.
5661 * src/symlist.c (symbol_list_new): Initialize new midrule-related
5662 members.
5663 (symbol_list_length): Now that this is invoked after all rules have
5664 been parsed, a NULL symbol (rather than a NULL symbol list node)
5665 terminates a rule. symbol_list_print already does this correctly.
5666 * src/symlist.h (symbol_list.midrule_parent_rule,
5667 symbol_list.midrule_parent_rhs_index): New members so that midrules can
5668 remember their relationships with their parents.
5669 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5670 fixed by the above patch.
5671 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5672 implementing...
5673 (Unused values): ... this old test case and...
5674 (Unused values before symbol declarations): ... this new test case.
5675 This one is the same as `Unused values' except that all symbol
5676 declarations appear after the rules in order to catch the rest of the
5677 errors fixed by the above patch.
5678
5679 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5680
5681 More cleanup.
5682 * src/reader.c (current_rule): Declare it static since it's no longer
5683 used outside this file.
5684 (grammar_current_rule_action_append): Remove redundant arguments from
5685 translate_rule_action invocation.
5686 * src/reader.h (current_rule): Remove this unused extern.
5687 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
5688 * src/scan-code.l (translate_rule_action): Likewise.
5689
5690 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
5691
5692 Clean up yesterday's patch.
5693 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
5694 to...
5695 * src/reader.c (grammar_current_rule_action_append): ... here for
5696 consistency with grammar_current_rule_symbol_append.
5697 * tests/regression.at (Braced code in declaration in rules section):
5698 Make yyerror and yylex static as usual.
5699
5700 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
5701
5702 Fix bug that mistakes braced code in a declaration in the rules section
5703 to be a rule action. Mentioned at
5704 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
5705 * src/scan-gram.l: Move midrule action detection from the start of the
5706 scanning of any braced code to...
5707 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
5708 action. For readability, use $2 and @2 rather than the equivalent
5709 global variables.
5710 * tests/regression.at (Braced code in declaration in rules section):
5711 New test to catch the error fixed by the above patch.
5712
5713 Work on code readability some.
5714 * src/scan-code.l (current_rule): Get rid of this misleading and
5715 redundant declaration: it's actually extern'ed in reader.h.
5716 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
5717 translate_action): Add a rule argument and use it instead of the global
5718 current_rule.
5719 (translate_rule_action): This already receives current_rule through an
5720 argument, so pass it on to translate_action instead of assigning
5721 current_rule to current_rule.
5722 (translate_symbol_action, translate_code): Pass rule = NULL to
5723 translate_action.
5724
5725 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
5726
5727 Rename %before-definitions to %start-header and %after-definitions to
5728 %end-header. Don't use these declarations to separate pre-prologue
5729 blocks from post-prologue blocks. Add new order-independent
5730 declarations %before-header and %after-header as alternatives to the
5731 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
5732 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
5733 * NEWS (2.3+): Update for these changes.
5734 * data/glr.c (b4_before_definitions): Update to...
5735 (b4_start_header): ... this.
5736 (b4_after_definitions): Update to...
5737 (b4_end_header): ... this.
5738 * data/glr.cc: Likewise.
5739 * data/lalr1.cc: Likewise.
5740 * data/yacc.c: Likewise.
5741 * doc/bison.texinfo (The prologue): Update names, and replace remaining
5742 prologue blocks with %*-header declarations.
5743 (Calc++ Parser): Likewise.
5744 (Decl Summary): Update names.
5745 (Table of Symbols): Update description.
5746 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
5747 (PERCENT_END_HEADER): ... this.
5748 (PERCENT_BEFORE_DEFINITIONS): Update to...
5749 (PERCENT_START_HEADER): ... this.
5750 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5751 (declaration): Update token names and m4 macro names.
5752 When parsing %end-header and %start-header, invoke translate_code
5753 before muscle_code_grow, and no longer set global booleans to remember
5754 whether these declarations have been seen.
5755 Parse new %after-header and %before-header.
5756 * src/reader.c (before_definitions, after_definitions): Remove.
5757 (prologue_augment): Accept a new bool argument to specify whether to
5758 augment the pre-prologue or post-prologue.
5759 * src/reader.h (before_definitions, after_definitions): Remove these
5760 extern's.
5761 (prologue_augment): Add new bool argument.
5762 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5763 (PERCENT_END_HEADER): ... this.
5764 (PERCENT_BEFORE_DEFINITIONS): Update to...
5765 (PERCENT_START_HEADER): ... this.
5766 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5767 * tests/actions.at (Printers and Destructors): Update names.
5768
5769 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Add comparison operators for C++ location classes. Discussed at
5772 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5773 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5774 declaration indicating whether filename_type has an operator==. If
5775 filename_type is `std::string', it defaults to `1', `0' otherwise.
5776 * data/location.cc: Iff b4_define_location_comparison is `1', add
5777 operator== and operator!= for class position and for class location.
5778
5779 Some minor fixes.
5780 * src/scan-action.l: Remove unused file.
5781 * src/symtab.c (symbol_printer_set): Use printer_location not
5782 destructor_location.
5783 * src/symtab.h (struct symbol): Replace incorrect source comment for
5784 printer members.
5785 * tests/input.at (Incompatible Aliases): Update output with correct
5786 printer location.
5787
5788 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5789
5790 Don't put the pre-prologue in the header file. For the yacc.c code
5791 file and the glr.c header and code files, move the pre-prologue before
5792 the token definitions. Add new %before-definitions and
5793 %after-definitions to declare code that will go in both the header file
5794 and code file. Discussed at
5795 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5796 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5797 and
5798 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5799 * NEWS (2.3+): Describe these changes.
5800 * data/glr.c (b4_pre_prologue): Move from within to before...
5801 (b4_shared_declarations): ... this.
5802 Add new b4_before_definitions before b4_token_enums.
5803 Add new b4_after_definitions at the end.
5804 * data/glr.cc (b4_pre_prologue): Replace with...
5805 (b4_before_definitions): ... this in the header file.
5806 (b4_after_definitions): New near the end of the header file.
5807 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5808 code file right before including the header file.
5809 (b4_before_definitions): New in the previous position of
5810 b4_pre_prologue in the header file.
5811 (b4_after_definitions): New near the end of the header file.
5812 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5813 (b4_token_enums_defines): In the code file, move to right before
5814 YYSTYPE for consistency with the header file.
5815 (b4_before_definitions): New right before b4_token_enums_defines in
5816 both the header and code file.
5817 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5818 header and code file.
5819 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5820 of prologues for %union dependencies.
5821 (Decl Summary): In %defines description, mention the effect of
5822 %before-definitions and %after-definitions on the header file.
5823 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5824 than in the pre-prologue so that make check succeeds.
5825 (Table of Symbols): Add entries for %before-definitions and
5826 %after-definitions.
5827 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5828 %before-definitions.
5829 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5830 (declaration): Parse those declarations and append to
5831 b4_before_definitions and b4_after_definitions, respectively.
5832 * src/reader.c (before_definitions, after_definitions): New bools to
5833 track whether those declarations have been seen.
5834 (prologue_augment): Add to the post-prologue if %union,
5835 %before-definitions, or %after-definitions has been seen.
5836 * src/reader.h (before_definitions, after_definitions): New extern's.
5837 * src/scan-gram.l: Scan the new declarations.
5838 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5839 prologue block in a %before-definitions or a %after-definitions based
5840 on whether the %union is declared.
5841 * tests/regression.at (Early token definitions with --yacc, Early token
5842 definitions without --yacc): Move tests for token definitions into the
5843 post-prologue since token names are no longer defined in the
5844 pre-prologue.
5845
5846 2006-06-20 Akim Demaille <akim@epita.fr>
5847
5848 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5849 (symbol_get): Use it.
5850 * src/parse-gram.y: Use it.
5851
5852 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5853
5854 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5855 build succeeds when configured with --enable-gcc-warnings.
5856
5857 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5858
5859 * src/parse-gram.y (char_name): New function.
5860 (CHAR, STRING, string_content): For %printer, properly escape.
5861 (ID): Prefer fputs to fprintf.
5862 (id): Reindent to be consistent with other rules.
5863 Properly quote char.
5864
5865 The Translation Project changed its way of publishing translations
5866 to maintainers. I haven't received any responses to my request
5867 for supporting the old way, or for documenting the new way. I
5868 have modified 'bootstrap' to use screen scraping
5869 (in this case, HTML scraping). This is unreliable and inelegant,
5870 but I don't see any better way. Yuck.
5871 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5872 (get_translations): New function, which uses HTML scraping to
5873 deduce locations of latest translations.
5874 Use this function to grab both bison and bison-runtime .po files.
5875 Don't bother priming the pump for the runtime-po domain any more,
5876 as it's now translated better than bison is.
5877
5878 2006-06-19 Akim Demaille <akim@epita.fr>
5879
5880 * src/scan-gram.l: No longer "parse" things after `%union' until
5881 `{'. Rather, return a single "%union" token.
5882 No longer make symbols: return strings, and leave the conversion
5883 to symbols to the parser.
5884 (SC_PRE_CODE, token_type): Remove.
5885 * src/parse-gram.y (%union): New field `character'.
5886 Sort tokens.
5887 (CHAR): New token.
5888 (ID, ID_COLON): Now that the scanner no longer makes them
5889 identifiers, adjust all uses to invoke symbol_get.
5890 (id_colon): New, wraps the conversion from string to symbol.
5891 (%union): Accept a possible union_name.
5892 (symbol): Now can be a char.
5893 * data/c.m4 (b4_union_name): Leave a default value.
5894 * data/glr.c, data/yacc.c: Use it.
5895
5896 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5897
5898 For associating token numbers with token names for "yacc.c", don't use
5899 #define statements unless `--yacc' is specified; always use enum
5900 yytokentype. Most important discussions start at:
5901 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5902 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5903 and
5904 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5905 * NEWS (2.3+): Mention.
5906 * data/c.m4 (b4_yacc_if): New.
5907 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5908 token #define's.
5909 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5910 on token name definitions.
5911 * src/getargs.c (usage): Capitalize `Yacc' in English.
5912 * src/output.c (prepare): Define b4_yacc_flag.
5913 * tests/regression.at (Early token definitions): Test that tokens names
5914 are defined before the pre-prologue not just before the post-prologue.
5915 Remove this test case and copy to...
5916 (Early token definitions with --yacc): ... this to test #define's.
5917 (Early token definitions without --yacc): ... and this to test enums.
5918
5919 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * NEWS: Reword the post-2.3 change to not be so optimistic about
5922 removing the old "look-ahead" spelling.
5923 Update previous look-ahead/lookahead change reports.
5924 * REFERENCES: look-ahead -> lookahead (since that's
5925 what he actually wrote).
5926 * doc/refcard.tex: look ahead -> lookahead,
5927 look-ahead -> lookahead
5928
5929 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5930
5931 For consistency, use `lookahead' instead of `look-ahead' or
5932 `look_ahead'. Discussed starting at
5933 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5934 and then at
5935 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5936 * NEWS: For the next release, note the change to `--report'.
5937 * TODO, doc/bison.1: Update English.
5938 * doc/bison.texinfo: Update English.
5939 (Understanding Your Parser, Bison Options): Document as
5940 `--report=lookahead' rather than `--report=look-ahead'.
5941 * src/conflicts.c: Update English in comments.
5942 (lookahead_set): Rename from look_ahead_set.
5943 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5944 (resolve_sr_conflict): Rename local look_ahead_tokens to
5945 lookahead_tokens, and update other uses.
5946 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5947 count_rr_conflicts, conflicts_free): Update uses.
5948 * src/getargs.c (report_args): Move "lookahead" before alternate
5949 spellings.
5950 (report_types): Update uses.
5951 (usage): For `--report' usage description, state `lookahead' spelling
5952 rather than `look-ahead'.
5953 * src/getargs.h (report.report_lookahead_tokens): Rename from
5954 report_look_ahead_tokens.
5955 * src/lalr.c: Update English in comments.
5956 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5957 (state_lookahead_tokens_count): Rename from
5958 state_look_ahead_tokens_count.
5959 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5960 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5961 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5962 Update other uses.
5963 Update English in output.
5964 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5965 * src/print.c: Update English in comments.
5966 (lookahead_set): Rename from look_ahead_set.
5967 (print_reduction): Rename argument lookahead_token from
5968 look_ahead_token.
5969 (print_core, state_default_rule, print_reductions, print_results):
5970 Update uses.
5971 * src/print_graph.c: Update English in comments.
5972 (print_core): Update uses.
5973 * src/state.c: Update English in comments.
5974 (reductions_new): Update uses.
5975 (state_rule_lookahead_tokens_print): Rename from
5976 state_rule_look_ahead_tokens_print, and update other uses.
5977 * src/state.h: Update English in comments.
5978 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5979 (state_rule_lookahead_tokens_print): Rename from
5980 state_rule_look_ahead_tokens_print.
5981 * src/tables.c: Update English in comments.
5982 (conflict_row, action_row): Update uses.
5983 * tests/glr-regression.at
5984 (Incorrect lookahead during deterministic GLR,
5985 Incorrect lookahead during nondeterministic GLR): Rename
5986 print_look_ahead to print_lookahead.
5987 * tests/torture.at: Update English in comments.
5988 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5989 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5990 (Many lookahead tokens): Update uses.
5991 * data/glr.c: Update English in comments.
5992 * lalr1.cc: Likewise.
5993 * yacc.c: Likewise.
5994 * src/conflicts.h: Likewise.
5995 * src/lalr.h: Likewise.
5996 * src/main.c: Likewise.
5997 * src/output.c: Likewise.
5998 * src/parse-gram.c: Likewise.
5999 * src/tables.h: Likewise.
6000 * tests/calc.at: Likewise.
6001
6002 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6003
6004 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6005
6006 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6007
6008 * TODO: Add request from Nelson H. F. Beebe to be able to install
6009 Bison without installing the yacc script.
6010
6011 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6012
6013 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6014 and yytext if they're already #define'd.
6015 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6016 * src/scan-code-c.c: ... here.
6017 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6018 <config.h>.
6019
6020 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6021
6022 Get Bison to build again when configured with --enable-gcc-warnings.
6023 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6024 missing #include's.
6025 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6026 loc argument as it shadows a global.
6027 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6028 invocation.
6029
6030 * src/.cvsignore: Add scan-code.c.
6031
6032 2006-06-07 Akim Demaille <akim@epita.fr>
6033
6034 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6035 to...
6036 * src/scan-code.l: here.
6037 * tests/input.at (Torturing the Scanner): Fix another location
6038 error.
6039
6040 2006-06-07 Akim Demaille <akim@epita.fr>
6041
6042 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6043
6044 2006-06-06 Akim Demaille <akim@epita.fr>
6045
6046 Extract the parsing of user actions from the grammar scanner.
6047 As a consequence, the relation between the grammar scanner and
6048 parser is much simpler. We can also split "composite tokens" back
6049 into simple tokens.
6050 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6051 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6052 rename as...
6053 * src/location.h, src/location.c (add_column_width)
6054 (location_compute): these.
6055 Fix the column count: the initial column is 0.
6056 (location_print): Be robust to ending column being 0.
6057 * src/location.h (boundary_set): New.
6058 * src/main.c: Adjust to scanner_free being renamed as
6059 gram_scanner_free.
6060 * src/output.c: Include scan-code.h.
6061 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6062 Use boundary_set.
6063 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6064 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6065 which is now, again, a separate token.
6066 Adjust all dependencies.
6067 Whereever actions with $ and @ are used, use translate_code.
6068 (action): Remove this nonterminal which is now useless.
6069 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6070 (grammar_current_rule_action_append): Use translate_code.
6071 (packgram): Bound check ruleno, itemno, and rule_length.
6072 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6073 (last_string, last_braced_code_loc, max_left_semantic_context)
6074 (scanner_initialize, scanner_free, scanner_last_string_free)
6075 (gram_out, gram_lineno, YY_DECL_): Move to...
6076 * src/scan-gram.h: this new file.
6077 (YY_DECL): Rename as...
6078 (GRAM_DECL): this.
6079 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6080 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6081 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6082 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6083 Move these declarations, and...
6084 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6085 these to...
6086 * src/flex-scanner.h: this new file.
6087 * src/scan-gram.l (rule_length, rule_length_overflow)
6088 (increment_rule_length): Remove.
6089 (last_braced_code_loc): Rename as...
6090 (gram_last_braced_code_loc): this.
6091 Adjust to the changes of the parser.
6092 Move all the handling of $ and @ into...
6093 * src/scan-code.l: here.
6094 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6095 (handle_action_dollar, handle_action_at): Move to...
6096 * src/scan-code.l: here.
6097 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6098 scan-code.h, scan-code-c.c, scan-gram.h.
6099 (EXTRA_bison_SOURCES): Add scan-code.l.
6100 (BUILT_SOURCES): Add scan-code.c.
6101 (yacc): Be robust to white spaces.
6102
6103 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6104 * tests/regression.at: Adjust the column numbers.
6105 * tests/regression.at: Adjust the error message.
6106
6107 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6108
6109 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6110 Use Akim's wording from
6111 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6112
6113 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6114
6115 Between Bison releases, manually append `+' to the previous Bison
6116 release number, and use that as a signal to automatically print the
6117 ChangeLog's CVS Id keyword from --version. Discussed starting at
6118 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6119 * ChangeLog: Add Id header.
6120 * configure.ac (AC_INIT): Append `+' to `2.3'.
6121 * src/.cvsignore: Add revision.c.
6122 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6123 (BUILT_SOURCES): Add revision.c.
6124 (revision.c): New target rule. This file defines a new global variable
6125 named revision. It initializes it with either the Id from ChangeLog
6126 or, if VERSION doesn't contain `+', with the empty string.
6127 * src/getargs.c (version): Print the value of revision.
6128 * src/revision.h: Extern revision.
6129
6130 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6131
6132 * NEWS: Version 2.3.
6133 * configure.ac (AC_INIT): Likewise.
6134
6135 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6136
6137 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6138 with no arguments, not as an object-like macro. This is for
6139 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6140 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6141 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6142 Document this.
6143
6144 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6145
6146 * src/getargs.c (usage): Back out yesterday's modification of the
6147 --help output so that we don't have to wait for translation before
6148 releasing 2.3.
6149
6150 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6151
6152 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6153 Problem reported by Akim Demaille.
6154
6155 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6156
6157 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6158
6159 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6160
6161 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6162 generated source code. Problem reported by Frans Englich in
6163 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6164
6165 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6166
6167 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6168 shell, not within 'make', so that 'make' by an ordinary builder
6169 (using GNU make) does not worry about configuring gzip. This also
6170 works around a bug reported independently by Keith Thompson and by
6171 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6172 stderr rather than stdout, messing up the build logs.
6173
6174 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6177 to make sure that YYID will never be unused. This fixes a 'make
6178 maintainer-check' failure caused by the recent changes to the 'Trivial
6179 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6180 not used.
6181 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6182
6183 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6184
6185 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6186 state before an empty RHS is always resolved here. Only the location
6187 of that state is guaranteed to be resolved, and that's enough. This
6188 fixes the remaining bug reported by Derek M. Jones in
6189 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6190 * tests/glr-regression.at (Uninitialized location when reporting
6191 ambiguity): Test the above case.
6192 Also, the embedded comments in this test case claim it checks the case
6193 of an empty RHS that has inherited the initial location. However, the
6194 corresponding LHS was already resolved, so yyresolveLocations didn't
6195 actually have reason to modify it. Fix this by forcing
6196 nondeterministic operation at the beginning of the parse.
6197
6198 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6199
6200 * data/c.m4 (b4_yy_symbol_print_generate):
6201 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6202 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6203 of the bugs reported today by Derek M Jones in
6204 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6205 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6206 defined to be a type name without parens or brackets.
6207 (Location Type): Similarly for YYLTYPE.
6208 * tests/regression.at (Trivial grammars): Put in a test for this
6209 bug that will be caught by 'make maintainer-check' (though not,
6210 alas, by 'make check' unless your compiler is picky).
6211
6212 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6213
6214 * NEWS: Version 2.2.
6215 * configure.ac (AC_INIT): Likewise.
6216
6217 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6218
6219 * data/glr.c (yyreportTree): Make room in yystates for the state
6220 preceding the RHS. This fixes the segmentation fault reported by Derek
6221 M. Jones in
6222 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6223 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6224 to the user. Reported for yyreportTree by Derek M. Jones later in the
6225 same thread.
6226 * THANKS: Add Derek M. Jones.
6227 Update my email address.
6228 Fix typo in Steve Murphy's name.
6229
6230 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6231
6232 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6233 checking against YYLAST that caused the parser to miss a potential
6234 alternative in its diagnostic.
6235 Problem reported by Maria Jose Moron Fernandez in
6236 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6237 * data/lalr1.cc (yysyntax_error_): Likewise.
6238 * data/yacc.c (yysyntax_error): Likewise.
6239 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6240 tokens, in case we run into an older C compiler.
6241 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6242 Use them to check for the off-by-one error fixed above.
6243
6244 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6245 YYSIZE_T, not size_t.
6246 * tests/regression.at (Trivial grammars): New test, to catch
6247 the error fixed by the above patch.
6248
6249 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6250
6251 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6252 scheme.
6253 Reported by Steve Murphy.
6254
6255 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6256
6257 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6258 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6259
6260 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6261
6262 Implement --trace=m4.
6263 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6264 * src/output.c (output_skeleton): When set, pass -dV to m4.
6265
6266 Factor the handling of flags in m4.
6267 * src/output.c (prepare): Rename the muscle names debug, defines,
6268 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6269 * data/c.m4: Adjust.
6270 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6271 Use b4_define_flag_if to define other b4_FLAG_if macros.
6272 (b4_location_if): As a consequence, rename as...
6273 (b4_locations_if): this, for consistency.
6274 Adjust all the skeletons.
6275
6276 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6277
6278 * etc/bench.pm: Shorten bench names.
6279
6280 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6281
6282 * src/output.h, src/output.c (error_verbose): Move to...
6283 * src/getargs.h, src/getargs.c: here.
6284 Sort the flags.
6285 Adjust dependencies.
6286
6287 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6288
6289 * data/c.m4 (b4_copyright): Put the special exception for Bison
6290 skeletons here, so we don't have to put it in each skeleton. All
6291 uses changed. Suggested by Akim Demaille. Also, wrap the
6292 copyright notice, in case it is longer than 80 columns. Replace
6293 comma by newline after title.
6294
6295 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6296
6297 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6298 incompatibility, not a bug. Mention that it wasn't fixed as of
6299 flex 2.5.33.
6300
6301 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6302
6303 * examples/extexi: Enforce the precedence of concatenation over
6304 >>.
6305 Reported by Tommy Nordgren.
6306
6307 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6308
6309 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6310 with the member "token".
6311 Reported by Martin Nylin.
6312
6313 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6314
6315 * data/glr.c: Switch to Bison 2.2 special-exception language in
6316 the copyright notice. Use more-regular format for titles and
6317 copyright notices.
6318 * data/glr.cc: Likewise.
6319 * data/location.cc: Likewise.
6320 * data/yacc.cc: Likewise.
6321 * doc/bison.texinfo (Conditions): Document this.
6322 * NEWS: likewise. Upgrade version to 2.2.
6323
6324 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6325
6326 * data/glr.cc: Remove dead code.
6327
6328 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6329
6330 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6331 that variable and the line breaks the bootstrap. Problem reported
6332 by Juan M. Guerrero.
6333
6334 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6335
6336 * doc/bison.texinfo (Multiple start-symbols): New.
6337
6338 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6339
6340 * etc/README, etc/bench.pl: New.
6341
6342 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6343
6344 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6345 rule.
6346 Reported by Mickael Labau.
6347 * tests/input.at (Torturing the Scanner): Test it.
6348
6349 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6350
6351 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6352 Problem reported by Bob Rossi.
6353
6354 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6355
6356 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6357 and didn't really work.
6358 For the index, use @ifnotinfo, not @iftex.
6359 Minor cleanups of spacing and terminology.
6360
6361 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6362
6363 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6364 of AT_NAME_PREFIX when %name-prefix is not used.
6365
6366 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6367
6368 Apply --prefix to C++ skeletons too: they change the namespace.
6369 The test suite already exercize these cases.
6370 * data/c++.m4 (b4_namespace): New.
6371 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6372 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6373 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6374 * doc/bison.texinfo: Document it.
6375 (Option Cross Key): Use @multitable in all formats. It looks
6376 nicer, even in TeX outputs.
6377 (Rules): Use the same code whatever the output type is.
6378 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6379 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6380 * tests/calc.at: Use it, instead of hard coding `yy'.
6381
6382 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6383
6384 * TODO: Remove dead items.
6385
6386 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6387
6388 * doc/FAQ: Remove, merged into...
6389 * doc/bison.texinfo (FAQ): this.
6390 * doc/Makefile.am (EXTRA_DIST): Adjust.
6391
6392 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6393
6394 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6395 even if empty.
6396 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6397 * doc/bison.texinfo (Calc++ Scanner): Use it.
6398
6399 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6400
6401 Fix two nits reported by twlevo, plus one more that I discovered.
6402
6403 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6404 this is the usual Bison style.
6405 * src/location.h (location_print): Likewise.
6406
6407 * src/reader.h (token_name): Likewise.
6408
6409 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 Fix some nits reported by twlevo.
6412 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6413 and "POSIX". Use more-modern syntax for URLs. Mention C++
6414 and ask for Java. Don't hardwire OS version numbers. Add
6415 copyright notice.
6416 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6417 * src/conflicts.c (solved_conflicts_obstack): Now static.
6418
6419 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6420
6421 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6422 page. Say "you can use it" not "you may use it" as on the web page;
6423 we're describing capabilities not granting permission.
6424
6425 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6426
6427 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6428 shadowing warnings. Use usual patter for iterating through RHS.
6429 * tests/glr-regression.at
6430 (Uninitialized location when reporting ambiguity):
6431 Modify yylex so that it uses its argument, rather than trying
6432 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6433 const char -> char const.
6434
6435 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6436 Don't use tabs inside commands; it messes up 'ps'.
6437 Problem reported by twlevo.
6438
6439 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6440
6441 * tests/glr-regression.at (Uninitialized location when reporting
6442 ambiguity): New test case.
6443 * data/glr.c (yyresolveLocations): New function, which uses
6444 YYLLOC_DEFAULT.
6445 (yyresolveValue): Invoke yyresolveLocations before reporting an
6446 ambiguity.
6447 * doc/bison.texinfo (Default Action for Locations): Note
6448 YYLLOC_DEFAULT's usage for ambiguity locations.
6449 (GLR Semantic Actions): Cross-reference those notes.
6450
6451 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6452
6453 * tests/glr-regression.at (Leaked semantic values when reporting
6454 ambiguity): Remove unnecessary union and type declarations.
6455 (Leaked lookahead after nondeterministic parse syntax error): New test
6456 case.
6457 * data/glr.c (yyparse): Check for zero stacks remaining before
6458 attempting to shift the lookahead so that you don't lose it.
6459
6460 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6461
6462 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6463 * tests/glr-regression.at (Leaked semantic values when reporting
6464 ambiguity): New test case.
6465 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6466 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6467 now unnecessary yystackp parameter.
6468 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6469 destructors can be called.
6470
6471 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6472 in existing testcases.
6473
6474 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6475
6476 Don't leak semantic values for parent RHS when a user action cuts the
6477 parser, and clean up related code a bit.
6478 * tests/glr-regression.at (Leaked merged semantic value if user action
6479 cuts parse): Rename to...
6480 (Leaked semantic values if user action cuts parse): ... this. Add check
6481 for leaked parent RHS values.
6482 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6483 between an unresolved state (non-empty chain of semantic options) and
6484 an incomplete one (signaled by an empty chain).
6485 (yyresolveStates): Document the interface. Move all manipulation of a
6486 successfully or unsuccessfully resolved yyGLRState to...
6487 (yyresolveValue): ... here so that yyresolveValue always leaves a
6488 yyGLRState with consistent data and thus is easier to understand.
6489 Remove the yyvalp and yylocp parameters since they are always just
6490 taken from the yys parameter. When reporting a discarded merged value
6491 in debugging output, note that it is incompletely merged. Document the
6492 interface.
6493 (yyresolveAction): If resolving any of the RHS states fails, destroy
6494 them all rather than leaking them. Thus, as long as user actions are
6495 written to clean up the RHS correctly, yyresolveAction always cleans up
6496 the RHS of a semantic option. Document the interface.
6497
6498 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6499
6500 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6501 led to a segmentation fault in GNU Pascal. Problem reported
6502 by Waldek Hebisch.
6503
6504 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6505
6506 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6507 mid-rule action inside a nonterminal symbol in order to declare a
6508 destructor for its semantic value.
6509
6510 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6511
6512 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6513 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6514 __cplusplus && ! defined _STDLIB_H && !
6515 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6516 defined free))]: Include <stdlib.h> rather than rolling our own
6517 declarations of malloc and free, to avoid problems with
6518 incompatible declarations (using 'throw') C++'s stdlib.h. This
6519 should fix Debian bug 340012
6520 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6521 reported by Guillaume Melquiond.
6522
6523 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6524
6525 * NEWS: Clarify symbols versus types in unused-value warnings.
6526
6527 * configure.ac (AC_INIT): Bump version number.
6528
6529 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6530
6531 * NEWS: Version 2.1a.
6532 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6533 since C99 requires this.
6534
6535 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6536
6537 * m4/c-working.m4: New file.
6538 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6539
6540 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6541
6542 * Makefile.maint: Merge from coreutils.
6543
6544 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6545
6546 More portability fixes for problems summarized by Nelson H. F. Beebe.
6547
6548 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6549 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6550 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6551 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6552 messes up because C++ code is compiled in 32-bit mode but linked
6553 in 64-bit mode.
6554
6555 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6556
6557 More portability fixes for problems summarized by Nelson H. F. Beebe.
6558
6559 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6560 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6561
6562 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6563 nodist_PROGRAMS, since we don't need to actually compile the
6564 example if we're just doing a plain 'make'. This avoids bothering
6565 the installer unnecessarily about problems due to weird C++
6566 compilers.
6567
6568 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6569
6570 More portability fixes for problems summarized by Nelson H. F. Beebe.
6571
6572 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6573 than #include "...", and compile with -I'.'. The old method was
6574 not portable, according to Posix and the C standard, and it does
6575 not work with Sun C 5.7, where previous #line directives affect
6576 the working directory used in later #include "..." directives.
6577
6578 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6579
6580 Various DJGGP specific issues in /djgpp
6581
6582 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6583
6584 More portability fixes for problems summarized by Nelson H. F. Beebe.
6585
6586 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6587 '#include <map>' works and that you can apply ++ to iterators.
6588
6589 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6590
6591 Work around portability problems summarized by Nelson H. F. Beebe in
6592 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6593
6594 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6595 that '#include <string>' works.
6596
6597 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
6598 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
6599 "warning: sorry: semantics of inline function static data `const
6600 unsigned char translate_table[262]' are wrong (you'll wind up with
6601 multiple copies)".
6602
6603 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
6604 or, xor to not_, and_, or_, and xor_, respectively. This works
6605 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
6606 random system header somewhere that includes the equivalent of
6607 <iso646.h>.
6608
6609 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
6610 -E" works; it apparently doesn't work with PathScale EKO Compiler
6611 Suite Version 2.0.
6612
6613 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
6614
6615 During deterministic GLR operation, user actions should be able to
6616 influence the parse by changing yychar. To make this easier to fix and
6617 to make glr.c easier to evolve in general, don't maintain yytoken in
6618 parallel with yychar; just compute yytoken when needed.
6619 * tests/glr-regression.at (Incorrect lookahead during deterministic
6620 GLR): Check that setting yychar in a user action has the intended
6621 effect.
6622 * data/glr.c (yyGLRStack): Remove yytokenp member.
6623 (yyclearin): Don't set *yytokenp.
6624 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
6625 yychar rather than *yytokenp to determine the current lookahead.
6626 Compute yytoken locally when needed.
6627 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
6628 point to.
6629
6630 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
6631 after `--report' documentation.
6632
6633 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6634
6635 * src/parse-gram.y (grammar_declaration): Location of printer
6636 symbol is @1, not list->location. Bug reported by twlevo.
6637 * tests/input.at (Incompatible Aliases): Adjust to above change.
6638
6639 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
6640
6641 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
6642 all the test at once. This makes the output easier to read in the
6643 normal case.
6644
6645 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
6646 got from <http://bro-ids.org/download.html>. The bug is that
6647 when two actions appeared in succession, the second one was
6648 scanned before the first one was added to the grammar rule
6649 as a midrule action. Bison then output the incorrect warning
6650 "parse.y:905.17-906.36: warning: unused value: $3".
6651 * src/parse-gram.y (BRACED_CODE, action): These are no longer
6652 associated with a value.
6653 (rhs): Don't invoke grammar_current_rule_action_append.
6654 (action): Invoke it here instead.
6655 * src/reader.c (grammar_midrule_action): Now extern.
6656 (grammar_current_rule_action_append): Don't invoke
6657 grammar_midrule_action; that is now the scanner's job.
6658 * src/reader.h (last_string, last_braced_code_loc):
6659 (grammar_midrule_action): New decls.
6660 * src/scan-gram.l (last_string): Now extern, sigh.
6661 (last_braced_code_loc): New extern variable.
6662 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
6663 rule already has an action.
6664 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
6665 * tests/input.at (AT_CHECK_UNUSED_VALUES):
6666 Add some tests to check that the above changes fixed the bug.
6667
6668 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
6669
6670 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6671 All used changed. Check whether the symbol has a destructor,
6672 not whether it is typed.
6673 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6674 that the values are still reported as unused. All line numbers
6675 adjusted.
6676
6677 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6678
6679 Work around a bug in bro 0.8, which underparenthesizes its
6680 definition of YYLLOC_DEFAULT.
6681 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6682 their arguments.
6683 * data/lalr1.cc: Likewise.
6684 * data/yacc.cc: Likewise.
6685
6686 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
6687
6688 Work around a bug in Pike 7.0, and give the Pike folks a
6689 better way to override the usual int widths.
6690 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
6691 user can override the types.
6692 (short): #undef, to work around a bug in Pike 7.0.
6693 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
6694 (union yyalloc.yyss): Use yytype_int16 rather than short.
6695 All uses changed.
6696 (yysigned_char): Remove.
6697 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
6698 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
6699 * tests/regression.at (Web2c Actions): Adjust to above changes.
6700
6701 * src/reader.c (check_and_convert_grammar): New function.
6702 (reader): Close the input file even if something went wrong during
6703 parsing. Minor file descriptor leak reported by twlevo.
6704
6705 * src/assoc.c (assoc_to_string): Use a default: abort (); case
6706 to pacify gcc -Wswitch-default.
6707 * src/scan-gram.l (adjust_location): Use a default: break; case
6708 to pacify gcc -Wswitch-default.
6709 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
6710 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6711 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6712 Move these decls to scan-skel.l, since they don't need to be
6713 visible elsewhere.
6714 * src/scan-skel.l: Accept the above decls.
6715 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
6716 is used.
6717
6718 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
6719
6720 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6721 since we don't want to insist on a version number at the start
6722 of the changelog every time.
6723 * Makefile.maint: Sync from coreutils a bit better.
6724 (sc_trailing_blank): Renamed from sc_trailing_space.
6725 All uses changed.
6726 (sc_no_if_have_config_h, sc_require_config_h):
6727 (sc_prohibit_assert_without_use): New rules.
6728 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
6729 (sc_dd_max_sym_length): Fix leading spaces in rule.
6730 (sc_system_h_headers): Prefix with @.
6731 (sc_useless_cpp_parens, m4-check): Output line numbers.
6732 (changelog-check): Allow version only in head.
6733 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
6734 satisfy new Makefile.maint rule.
6735 * data/glr.c: Likewise.
6736 * data/glr.cc: Likewise.
6737 * data/lalr1.cc: Likewise.
6738 * data/yacc.c: Likewise.
6739 * lib/ebitsetv.c: Likewise.
6740 * lib/lbitset.c: Likewise.
6741 * lib/subpipe.c: Likewise.
6742 * lib/timevar.c: Likewise.
6743 * src/system.h: Likewise.
6744 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
6745 * djgpp/Makefile.maint: Add copyright notice.
6746 * djgpp/README.in: Likewise.
6747 * djgpp/config.bat: Likewise.
6748 * djgpp/config.site: Likewise.
6749 * djgpp/config_h.sed: Likewise.
6750 * djgpp/djunpack.bat: Likewise.
6751 * djgpp/config.sed: Fix copyright notice to match standard format.
6752 * djgpp/subpipe.h: Likewise.
6753 * lib/bitsetv-print.c: Likewise.
6754 * lib/bitsetv.c: Likewise.
6755 * lib/subpipe.h: Likewise.
6756 * lib/timevar.c: Likewise.
6757 * lib/timevar.h: Likewise.
6758 * djgpp/subpipe.c: Use standard recipe for config.h.
6759 * lib/abitset.c: Likewise.
6760 * lib/bitset.c: Likewise.
6761 * lib/bitset_stats.c: Likewise.
6762 * lib/bitsetv-print.c: Likewise.
6763 * lib/bitsetv.c: Likewise.
6764 * lib/ebitsetv.c: Likewise.
6765 * lib/get-errno.c: Likewise.
6766 * lib/lbitset.c: Likewise.
6767 * lib/subpipe.c: Likewise.
6768 * lib/timevar.c: Likewise.
6769 * lib/vbitset.c: Likewise.
6770 * tests/local.at: Likewise.
6771 * src/scan-gram.l: Don't include verify.h, since system.h does
6772 that for us.
6773 * .x-sc_require_config_h: New file.
6774 * .x-sc_unmarked_diagnostics: New file.
6775
6776 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6777
6778 Be a bit more systematic about using 'abort'.
6779 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6780 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6781 Put 'default: abort ();' before some other case, to satisfy older
6782 pedantic compilers.
6783 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6784 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6785 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6786 * src/conflicts.c (resolve_sr_conflict): Likewise.
6787 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6788 (get_decision_str, get_orientation_str, get_node_alignment_str):
6789 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6790 (get_linestyle_str, get_arrowstyle_str): Likewise.
6791 * src/conflicts.c (resolve_sr_conflict):
6792 Use a default case rather than one for the one remaining enum
6793 value, to catch invalid enum values as well.
6794 * src/lalr.c (set_goto_map, map_goto):
6795 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6796 * src/nullable.c (nullable_compute, token_definitions_output):
6797 Likewise.
6798 * src/reader.c (packgram, reader): Likewise.
6799 * src/state.c (transitions_to, state_new, state_reduction_find):
6800 Likewise.
6801 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6802 (symbol_pack): Likewise.
6803 * src/tables.c (conflict_row, pack_vector): Likewise.
6804 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6805 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
6806 * src/system.h: Don't include <assert.h>.
6807 (assert): New macro.
6808
6809 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6810 (Destructor Decl, Parser Function, Pure Calling):
6811 Describe rules for braces inside C code more carefully.
6812
6813 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6814
6815 Fix some porting glitches found by Nelson H. F. Beebe.
6816 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6817 compilers that don't understand that abort () does not return.
6818 * src/state.c (transitions_to): Likewise.
6819 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6820 that '#include <cstdlib>' works.
6821 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6822 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6823 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6824 for the benefit of some pre-C99 compilers.
6825
6826 * bootstrap: Undo changes to gnulib files that autoreconf made.
6827
6828 Minor fixups to get 'make maintainer-check' to work.
6829 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6830 with the new verify.h implementation.
6831 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6832 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6833 * data/yacc.c (YYUSE): Likewise.
6834 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6835 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6836 * src/parse-gram.y (declaration): Don't pass a string constant
6837 to a function that expects char *, since GCC might complain
6838 about the constant value.
6839 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6840 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6841 before #defining them.
6842 * tests/glr-regression.at
6843 (Incorrectly initialized location for empty right-hand side in GLR):
6844 In yyerror, use the msg arg.
6845 (Corrupted semantic options if user action cuts parse):
6846 (Incorrect lookahead during deterministic GLR):
6847 (Incorrect lookahead during nondeterministic GLR):
6848 Don't name a local var 'index'; it shadows string.h's 'index'.
6849
6850 2006-01-19 Akim Demaille <akim@epita.fr>
6851
6852 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6853 location, not just parts of it.
6854
6855 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * NEWS: Document the fact that multiple %unions are now allowed.
6858 * doc/bison.texinfo (Union Decl): Likewise.
6859 * TODO: This feature is now implemented, so remove it from
6860 the wishlist.
6861
6862 * Makefile.maint: Merge with coreutils Makefile.maint.
6863 (CVS_LIST): Use build-aux version if available.
6864 (VERSION_REGEXP): New macro.
6865 (syntax-check-rules): Add sc_no_if_have_config_h,
6866 sc_prohibit_assert_without_use, sc_require_config_h,
6867 sc_useless_cpp_parens.
6868 (sc_obsolete_symbols): Check for O_NDELAY.
6869 (sc_dd_max_sym_length): Track coreutils.
6870 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6871 (sc_useless_cpp_parens): New rule.
6872 (news-date-check): Look for version or today's date.
6873 (changelog-check): Don't require version number near head.
6874 (copyright-check): Use current year instead of hardwiring 2005.
6875 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6876 (announcement): Add --gpg-key-ID.
6877
6878 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6879 with "file system".
6880
6881 Avoid undefined behavior that addressed just before the start of an
6882 array. Problem reported by twlevo.
6883 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6884 * src/lalr.c (build_relations): Rely on new sentinel.
6885 * src/gram.c (gram_free): Adjust to new sentinel.
6886
6887 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6888
6889 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6890 yylookaheadNeeds. All uses updated.
6891 (yysplitStack): Rename local yynewLookaheadStatuses to
6892 yynewLookaheadNeeds.
6893 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6894 GLR): In comments, change `lookahead status' to `lookahead need'.
6895
6896 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6897
6898 * data/glr.c (yysplitStack): A little stylistic rewrite.
6899
6900 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6901
6902 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6903
6904 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6905
6906 * doc/bison.texinfo: Fix some typos.
6907 (GLR Semantic Actions): New subsection discussing special
6908 considerations because GLR semantic actions might be deferred.
6909 (Actions): Mention look-ahead usage of yylval.
6910 (Actions and Locations): Mention look-ahead usage of yylloc.
6911 (Special Features for Use in Actions): Add YYEOF entry and mention it
6912 in the yychar entry.
6913 In the yychar entry, remove mention of the local yychar case (pure
6914 parser) since this is irrelevant information when writing semantic
6915 actions and since it's already discussed in `Table of Symbols' where
6916 yychar is otherwise described as an external variable.
6917 In the yychar entry, don't call it the `current' look-ahead since it
6918 isn't when semantic actions are deferred.
6919 In the yychar and yyclearin entries, add note about deferred semantic
6920 actions.
6921 Add yylloc and yylval entries discussing look-ahead usage.
6922 (Look-Ahead Tokens): When discussing yychar, don't call it the
6923 `current' look-ahead, and do mention yylval and yylloc.
6924 (Error Recovery): Cross-reference `Action Features' when mentioning
6925 yyclearin.
6926 (Table of Symbols): In the yychar entry, don't call it the `current'
6927 look-ahead.
6928 In the yylloc and yylval entries, mention look-ahead usage.
6929
6930 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6931
6932 * tests/glr-regression.at: Update copyright year to 2006.
6933
6934 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6935
6936 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6937 use during nondeterministic operation to track which stacks have
6938 actually needed the current lookahead.
6939 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6940 Allocate, deallocate, resize, and otherwise shuffle space for
6941 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6942 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6943 appropriately during nondeterministic operation.
6944 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6945 members to store the current lookahead to be used by the deferred
6946 user action.
6947 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6948 from which the RHS is taken. Set the lookahead members of the new
6949 yySemanticOption according to the lookahead status for stack yyk.
6950 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6951 yyaddDeferredAction.
6952 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6953 members of yySemanticOption before invoking yyuserAction, and then set
6954 them back to their current values afterward.
6955 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6956 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6957 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6958 titles for consistency.
6959 (Leaked merged semantic value if user action cuts parse): In order to
6960 suppress lint warnings, use arguments in merge function, and assign
6961 char value < 128 in main.
6962 (Incorrect lookahead during deterministic GLR): New test case.
6963 (Incorrect lookahead during nondeterministic GLR): New test case.
6964
6965 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6966
6967 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
6968 !yyvaluep as signal that no semantic value is available to print.
6969 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6970 to print a semantic value.
6971
6972 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6973
6974 * tests/glr-regression.at: For consistency with my newer test cases,
6975 don't thank myself.
6976
6977 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6978
6979 * data/glr.c (yyresolveValue): When merging semantic options, if at
6980 least one user action succeeds but a later one cuts the parse, then
6981 destroy the semantic value before returning rather than leaking it.
6982 (yyresolveStates): If a user action cuts the parse and thus
6983 yyresolveValue fails, ignore the (unset) semantic value rather than
6984 corrupting the yyGLRState, and empty the semantic options list since
6985 the user actions should have called all necessary destructors.
6986 Simplify code with YYCHK.
6987 * tests/glr-regression.at (Corrupted semantic options if user action
6988 cuts parse): New test case.
6989 (Undesirable destructors if user action cuts parse): New test case.
6990 Before applying any of this patch, this test case never actually failed
6991 for me... but only because the corrupted semantic options usually
6992 masked this bug.
6993 (Leaked merged semantic value if user action cuts parse): New test
6994 case.
6995
6996 2006-01-05 Akim Demaille <akim@epita.fr>
6997
6998 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6999
7000 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7001
7002 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7003 _MSC_VER. Problem reported by Cenzato Marco.
7004 (b4_c_function_def): Use it.
7005 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7006 b4_c_modern.
7007 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7008 than rolling our own.
7009
7010 2006-01-04 Akim Demaille <akim@epita.fr>
7011
7012 Also warn about non-used mid-rule values.
7013 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7014 member.
7015 (symbol_list_new): Adjust.
7016 * src/reader.c (symbol_typed_p): New.
7017 (grammar_rule_check): Use it.
7018 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7019 Check its rule.
7020 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
7021 Use it.
7022 * tests/actions.at (Exotic Dollars): Adjust.
7023
7024 2006-01-04 Akim Demaille <akim@epita.fr>
7025
7026 * src/reader.c (grammar_midrule_action): If $$ is set in a
7027 mid-rule, move the `used' bit to its lhs.
7028 * tests/input.at (Unused values): New.
7029 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7030
7031 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7032
7033 * doc/bison.texinfo (Bison Options): Say more accurately what
7034 --yacc does.
7035 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7036 about declarations in the grammar when in Yacc mode, as POSIX does
7037 not require a diagnostic when the grammar uses extensions.
7038
7039 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7040
7041 Warn about dubious constructions like "%token T T".
7042 Reported by twlevo.
7043 * src/symtab.h (struct symbol.declared): New member.
7044 * src/symtab.c (symbol_new): Initialize it to false.
7045 (symbol_class_set): New arg DECLARING, specifying whether
7046 this is a declaration that we want to warn about, if there
7047 is more than one of them. All uses changed.
7048
7049 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7050 Allow multiple %union directives, whose contents concatenate.
7051 * src/parse-gram.y (grammar_declaration): Likewise.
7052 Use muscle_code_grow, so that we don't need stype_line any more.
7053 All uses changed.
7054
7055 * src/muscle_tab.c (muscle_grow): Fix comment.
7056
7057 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7058 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7059 Update copyright year to 2006.
7060
7061 2006-01-03 Akim Demaille <akim@epita.fr>
7062
7063 Have glr.cc pass (some of) the calc.at tests.
7064 * data/glr.cc (b4_parse_param_orig): New.
7065 (b4_parse_param): Improve its definition, and bound it more
7066 clearly in the skeleton.
7067 (b4_epilogue): Append, instead of prepending, in order to keep
7068 #line consistency.
7069 Simplify the generation of auxiliary functions: locations and
7070 purity are mandated.
7071 (b4_global_tokens_and_yystype): Honor it.
7072 * data/location.cc (c++.m4): Don't include it.
7073 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7074 and AT_SKEL_CC_IF.
7075 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7076 AT_LALR1_CC_IF.
7077 Be sure to initialize the first position's filename.
7078 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7079 mandated anyway.
7080 (AT_CHECK_CALC_GLR_CC): New.
7081 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7082
7083 2006-01-02 Akim Demaille <akim@epita.fr>
7084
7085 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7086 c.m4.
7087 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7088 * data/glr.cc: Do not include stack.hh.
7089
7090 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7091
7092 * data/glr.c: Reformat whitespace with tabs.
7093 (b4_lpure_formals): Remove this unused m4 macro.
7094 * tests/cxx-type.at: Reformat whitespace with tabs.
7095 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7096 since it's a member. Rename type to isNterm for clarity.
7097
7098 2005-12-29 Akim <akim@sulaco.local>
7099
7100 Let glr.cc catch up with symbol_value_print.
7101 * data/glr.cc (b4_yysymprint_generate): Replace by...
7102 (b4_yy_symbol_print_generate): this.
7103 (yy_symbol_print, yy_symbol_value_print): Declare them.
7104
7105 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7106
7107 * src/location.h (boundary): Note that a line or column equal
7108 to INT_MAX indicates an overflow.
7109 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7110 (rule_length_overflow, increment_rule_length, add_column_width):
7111 New functions.
7112 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7113 (<SC_BRACED_CODE>"}"):
7114 Use increment_rule_length rather than incrementing it by hand.
7115 (adjust_location, handle_syncline): Diagnose overflow.
7116 (handle_action_dollar, handle_action_at):
7117 Fix bug with monstrosities like $-2147483648.
7118 Remove now-unnecessary checks.
7119 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7120 (convert_ucn_to_byte): Verify assumptions.
7121 (handle_syncline): New arg LOC. All callers changed.
7122 Don't store through a value derived from char const * pointer.
7123
7124 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7125 GCC warnings.
7126
7127 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7128
7129 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7130 Remove unnecessary forward static decls.
7131
7132 2005-12-27 Akim Demaille <akim@epita.fr>
7133
7134 * src/reader.c (grammar_current_rule_check): Also check that $$
7135 is used.
7136 Take the rule to check as argument, hence rename as...
7137 (grammar_rule_check): this.
7138 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7139 Rename as...
7140 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7141 (grammar_midrule_action, grammar_symbol_append): Now static.
7142 * tests/torture.at (input): Don't rely on the default action
7143 being always performed.
7144 * tests/calc.at: "Set" $$ even when the action is "cut" with
7145 YYERROR or other.
7146 * tests/actions.at (Exotic Dollars): Instead of using unused
7147 values, check that the warning is issued.
7148
7149 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7150
7151 * NEWS: Improve wording for unused-value warnings.
7152
7153 2005-12-22 Akim Demaille <akim@epita.fr>
7154
7155 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7156 (b4_yysymprint_generate): Rename as...
7157 (b4_yy_symbol_print_generate): this.
7158 Generate yy_symbol_print instead of yysymprint.
7159 Generate also yy_symbol_value_print, and use it.
7160
7161 2005-12-22 Akim Demaille <akim@epita.fr>
7162
7163 * NEWS: Warn about unused values.
7164 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7165 a `used' member.
7166 (symbol_list_n_get, symbol_list_n_used_set): New.
7167 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7168 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7169 * src/reader.c (grammar_current_rule_check): Check that values are
7170 used.
7171 * src/symtab.c (symbol_print): Accept 0.
7172 * tests/existing.at: Remove the type information.
7173 Empty the actions.
7174 Remove useless actions (beware of mid-rule actions: perl -000
7175 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7176 * tests/actions.at (Exotic Dollars): Use unused values.
7177 * tests/calc.at: Likewise.
7178 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7179 Likewise.
7180
7181 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7182 rule_useful_p.
7183
7184 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7185
7186 Undo 2005-12-01 tentative license wording change. The wording is
7187 still being reviewed by the lawyers, and we don't want to wait for
7188 them before publishing a test release. For now, revert to the
7189 previous wording.
7190 * NEWS: Undo 2005-12-01 change.
7191 * data/glr.c: Revert to previous license wording.
7192 * data/glr.cc: Likewise.
7193 * data/lalr1.cc: Likewise.
7194 * data/location.cc: Likewise.
7195 * data/yacc.c: Likewise.
7196
7197 * NEWS: Reword %destructor vs YYABORT etc.
7198 * data/glr.c: Use American spacing, for consistency.
7199 * data/glr.cc: Likewise.
7200 * data/lalr1.cc: Likewise.
7201 * data/yacc.c: Likewise.
7202 * data/yacc.c: Reformat comments slightly.
7203 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7204 for consistency. Fix some spelling errors and reword recently-included
7205 text slightly.
7206 * tests/cxx-type.at: Cast results of malloc, for C++.
7207
7208 2005-12-21 Joel E. Denny <address@hidden>
7209
7210 * tests/cxx-type.at: Construct a tree, count the parents of shared
7211 nodes, and free each node once and only once. Previously, the memory
7212 for semantic values was leaked instead.
7213
7214 2005-12-21 Joel E. Denny <address@hidden>
7215
7216 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7217 (yylval, yylloc): If pure, #define to yystackp->yyval and
7218 yystackp->yyloc similar to yychar and yynerrs.
7219 (yyparse): If pure, remove local yylval and yylloc. Add local
7220 yystackp to accommodate pure definitions of yylval and yylloc.
7221 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7222 yylvalp and yyllocp to &yylval and &yylloc.
7223 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7224 namespace. Previously, nerrs and char were missing, but lval and lloc
7225 weren't necessary.
7226 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7227 yylvalp and yyllocp parameters since, if pure, these are now always
7228 accessible through yystackp. If not pure, they are still accessible
7229 globally.
7230 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7231 `if (YYID (N))' to pacify lint.
7232
7233 2005-12-21 Akim Demaille <akim@epita.fr>
7234
7235 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7236 destroy the RHS symbols of a rule.
7237 * data/yacc.c (yylen): Initialize to 0.
7238 Keep its value to the number of items to possibly shift.
7239 In particular, a regular successful parse that ends on YYFINAL by
7240 a (internal) YYACCEPT must not have yylen != 0.
7241 (yyerrorlab, yyreturn): Pop the RHS.
7242 Reorder a bit to emphasize the `shifting' bits of code.
7243 (YYPOPSTACK): Now accept a number of items to pop.
7244 * data/lalr1.cc: Likewise.
7245 * data/glr.c: Formatting changes.
7246 Use goto instead of fall through.
7247 * doc/bison.texinfo (Destructor Decl): Complete.
7248
7249 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7250
7251 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7252 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7253 * djgpp/config.bat: Replace every occurence of the file name
7254 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7255 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7256 * djgpp/config.sed: Replace every occurence of the file name
7257 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7258 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7259 * djgpp/djunpack.bat: DJGPP specific file.
7260 * djgpp/fnchange.lst: DJGPP specific file.
7261 * djgpp/README.in: Add new information about how to unpack the bison
7262 source on MSDOS and other systems which have 8.3 file name restrictions
7263 using djunpack.bat and fnchange.lst.
7264
7265 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7266
7267 * bootstrap (build_cvs_prefix): Remove; unused.
7268 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7269 when getting gnulib.
7270
7271 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7272
7273 * data/glr.c: Reorder typedef declarations for structs to match order
7274 of struct declarations.
7275 Rename yystack everywhere to yystackp except in yyparse where it's not
7276 a pointer.
7277 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7278 consistency.
7279 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7280 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7281 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7282 lint.
7283
7284 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7285
7286 * tests/sets.at (Accept): Fix typos in regular expression used to
7287 sed out the final state number.
7288
7289 Work around portability problem on Solaris 10: flex-generated
7290 files include <stdio.h> before <config.h>, which messes up
7291 because the latter defines __EXTENSIONS__. Address the problem
7292 by creating two new little files that include <config.h> first,
7293 then include the flex-generated files. Rewrite everyone else
7294 to include <config.h> first, as well.
7295 * lib/timevar.c: Always include "config.h".
7296 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7297 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7298 (EXTRA_bison_SOURCES): New macro.
7299 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7300 * src/system.h: Don't include config.h.
7301 * src/LR0.c: Include <config.h> first.
7302 * src/assoc.c: Likewise.
7303 * src/closure.c: Likewise.
7304 * src/complain.c: Likewise.
7305 * src/conflicts.c: Likewise.
7306 * src/derives.c: Likewise.
7307 * src/files.c: Likewise.
7308 * src/getargs.c: Likewise.
7309 * src/gram.c: Likewise.
7310 * src/lalr.c: Likewise.
7311 * src/location.c: Likewise.
7312 * src/main.c: Likewise.
7313 * src/muscle_tab.c: Likewise.
7314 * src/nullable.c: Likewise.
7315 * src/output.c: Likewise.
7316 * src/parse-gram.y: Likewise.
7317 * src/print.c: Likewise.
7318 * src/print_graph.c: Likewise.
7319 * src/reader.c: Likewise.
7320 * src/reduce.c: Likewise.
7321 * src/relation.c: Likewise.
7322 * src/state.c: Likewise.
7323 * src/symlist.c: Likewise.
7324 * src/symtab.c: Likewise.
7325 * src/tables.c: Likewise.
7326 * src/uniqstr.c: Likewise.
7327 * src/vcg.c: Likewise.
7328
7329 * src/parse-gram.y: Fix minor problems uncovered by lint.
7330 (current_lhs, current_lhs_location): Now static.
7331 (current_assoc): Remove unused variable.
7332
7333 Cleanups so that Bison-generated parsers have less lint.
7334 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7335 Prepend /*ARGSUSED*/, for lint's sake.
7336 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7337 definition if 'lint' is defined.
7338 (YYID): New macro (or function, if lint).
7339 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7340 * data/yacc.c: Likewise.
7341 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7342 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7343 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7344 is C++ only.
7345 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7346 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7347 Use YYID(0) rather than 0, for lint.
7348 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7349 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7350
7351 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7352
7353 * tests/glr-regression.at
7354 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7355 Close memory leak reported by twlevo.
7356
7357 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7358
7359 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7360 all stacks.
7361 (yyparse): Iterate another stack in order to call user destructors.
7362 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7363 New test case.
7364 (Duplicated user destructor for lookahead): This test now is expected
7365 to succeed.
7366
7367 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7368
7369 * NEWS: Document the following change.
7370 * data/yacc.c: Say "parser skeleton" rather than "file", since
7371 it's no longer just a file.
7372 * data/glr.c: Grant a special exception for C GLR parsers, that
7373 reads like the already-existing exception for C LALR(1) parsers.
7374 * data/glr.cc: Likewise.
7375 * data/lalr1.cc: Likewise.
7376 * data/location.cc: Likewise.
7377 * data/yacc.c: Reword the "written by" statement to clarify that
7378 it was the parser skeleton, not the entire output file.
7379 * data/glr.c: Written by Paul Hilfinger.
7380 * data/glr.cc: Written by Akim Demaille.
7381 * data/lalr1.cc: Likewise.
7382
7383 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7384
7385 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7386 Fix typos in previous change that broke 'make check'.
7387 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7388 supported in C.
7389 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7390 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7391 We can revert this once things settle down.
7392
7393 * src/conflicts.c (conflicts_print): Don't print file name twice
7394 when %expect fails because there were no conflicts.
7395 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7396 change.
7397 * tests/conflicts.at (%expect not enough, %expect too much):
7398 (%expect with reduce conflicts): Adjust to new behavior.
7399
7400 2005-11-18 Akim Demaille <akim@epita.fr>
7401
7402 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7403 errors.
7404 * NEWS: Document this.
7405 * doc/bison.texinfo (Expect Decl): Likewise.
7406
7407 2005-11-16 Akim Demaille <akim@epita.fr>
7408
7409 Generalize the display of semantic values and locations in traces.
7410 * data/glr.c (yy_reduce_print): Fix indices (again).
7411 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7412 literal integers.
7413 * data/lalr1.cc (yyreduce_print): Rename as...
7414 (yy_reduce_print): this.
7415 Display values and locations.
7416 * data/yacc.c (yy_reduce_print): Likewise.
7417 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7418 (yysymprint): Move higher to be visible from yy_reduce_print).
7419 (yyparse): Adjust.
7420 * tests/calc.at: Adjust the expected length of the traces.
7421
7422 2005-11-14 Akim Demaille <akim@epita.fr>
7423
7424 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7425 from 1 to N, while values and location start at 0.
7426 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7427
7428 2005-11-14 Akim Demaille <akim@epita.fr>
7429
7430 * data/glr.c (yy_reduce_print): Fix the $ number.
7431
7432 2005-11-14 Akim Demaille <akim@epita.fr>
7433
7434 "Use" parse parameters.
7435 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7436 * data/glr.c, data/glr.cc: Use them.
7437 * data/glr.c (YYUSE): Have a C++ definition that supports
7438 non-pointer types.
7439
7440 2005-11-14 Akim Demaille <akim@epita.fr>
7441
7442 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7443
7444 2005-11-14 Akim Demaille <akim@epita.fr>
7445
7446 * data/glr.cc: New.
7447 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
7448
7449 2005-11-12 Akim Demaille <akim@epita.fr>
7450
7451 Let position and location be PODs.
7452 * data/location.cc (position::initialize, location::initialize): New.
7453 (position::position, location::location): Define only if
7454 b4_location_constructors is defined.
7455 * data/lalr1.cc (b4_location_constructors): Define it for backward
7456 compatibility.
7457 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7458
7459 2005-11-12 Akim Demaille <akim@epita.fr>
7460
7461 * data/lalr1.cc: Move the body of the ctor and dtor into the
7462 parser file (instead of the header).
7463 Wrap the implementations in a "namespace yy".
7464
7465 2005-11-12 Akim Demaille <akim@epita.fr>
7466
7467 Have glr.c include its header file when created.
7468 * data/glr.c (b4_shared_declarations): New.
7469 Output them verbatim in the parser if !%defines, otherwise
7470 output then in the header file, and include it instead.
7471
7472 2005-11-11 Akim Demaille <akim@epita.fr>
7473
7474 * data/glr.c: Comment changes.
7475
7476 2005-11-11 Akim Demaille <akim@epita.fr>
7477
7478 When yydebug, report semantic and location values for reductions.
7479 * data/glr.c (yy_reduce_print): Report the semantic values and the
7480 locations.
7481 (YY_REDUCE_PRINT): Adjust.
7482 (yyglrReduce): Use them.
7483 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7484 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7485 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7486 traces.
7487
7488 2005-11-10 Akim Demaille <akim@epita.fr>
7489
7490 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7491 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7492 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7493
7494 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7495
7496 * m4/cxx.m4, examples/Makefile.am: Don't build
7497 examples/calc++ if no C++ compiler is available. (trivial change)
7498
7499 2005-11-09 Akim Demaille <akim@epita.fr>
7500
7501 * src/scan-skel.l: Use a couple of asserts.
7502
7503 2005-11-03 Akim Demaille <akim@epita.fr>
7504
7505 In some (weird) cases, the final state number is incorrect.
7506 Reported by Alexandre Duret-Lutz.
7507 * src/LR0.c (state_list_append): Remove the computation of
7508 final_state.
7509 (save_reductions): Do it here.
7510 (get_state): Alpha conversion.
7511 (generate_states): Use a for loop.
7512 * src/gram.h (item_number_is_rule_number)
7513 (item_number_is_symbol_number): New.
7514 * src/state.c: Use assert.
7515 * src/system.h: Include assert.h.
7516 * tests/sets.at (Accept): New.
7517
7518 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7519
7520 * data/glr.c (yyfill): Adjust comment.
7521 (yyresolveAction): Initialize default location properly
7522 for empty right-hand sides.
7523 (yydoAction): Ditto.
7524 Add comment explaining apparently dead code.
7525 * tests/glr-regression.at
7526 (Incorrectly initialized location for empty right-hand side in GLR):
7527 New test.
7528
7529 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7530
7531 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7532 gnulib when interrupted. This fixes some race conditions and
7533 works around some portability problems (one noted by Paul
7534 Hilfinger).
7535
7536 2005-10-22 Akim <akim@epita.fr>
7537
7538 * Makefile.cfg: Adjust to config -> build-aux.
7539 Reported by twledo.
7540
7541 2005-10-21 Akim Demaille <akim@epita.fr>
7542
7543 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7544 the %parse-params.
7545 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7546 * data/yacc.c (b4_Pure_if): Rename as...
7547 (b4_yacc_pure_if): this.
7548 (YY_SYMBOL_PRINT, yyparse): Adjust.
7549 * doc/bison.texinfo: Formatting changes.
7550
7551 2005-10-21 Akim Demaille <akim@epita.fr>
7552
7553 Finish the transition config -> build-aux.
7554 * configure.ac, Makefile.am: Use build-aux.
7555 * config/prev-version, config/announce-gen, config/Makefile.am:
7556 Move to...
7557 * build-aux/prev-version, build-aux/announce-gen,
7558 * build-aux/Makefile.am: here.
7559
7560 2005-10-14 Akim Demaille <akim@epita.fr>
7561
7562 * examples/calc++/test: Use set -x only when VERBOSE.
7563
7564 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7565
7566 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7567 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7568
7569 2005-10-13 Akim Demaille <akim@epita.fr>
7570
7571 * src/scan-skel.l: Output the base name parts of the parser and
7572 header file names.
7573 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7574 additional checks.
7575 Use this to exercise C++ outputs in subdirs.
7576 Reported by Oleg Smolsky.
7577
7578 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7579
7580 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7581 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7582 Problem reported by John P. Hartmann.
7583 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7584 already defined it.
7585
7586 2005-10-12 Akim Demaille <akim@epita.fr>
7587
7588 * src/parse-gram.y (version_check): Exit 63 to please missing
7589 (stands for "version mismatch).
7590 * tests/input.at, doc/bison.texinfo: Adjust.
7591
7592 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7593
7594 Work around portability problems with Visual Age C compiler
7595 (xlc and xlC_r) reported by John P. Hartmann.
7596 * data/location.cc (initial_column, initial_line): Remove.
7597 All uses replaced by 0 and 1.
7598 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
7599 that xlc complains about.
7600 * src/scan-skel.l (skel_wrap): Likewise.
7601 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
7602 as __STDC__.
7603 * data/yacc.c (YYMODERN_C): New macro, which also looks at
7604 __STDC_VERSION__. Use it everywhere instead of looking at
7605 __STDC__ and __cplusplus.
7606
7607 2005-10-10 Akim Demaille <akim@epita.fr>
7608
7609 * examples/calc++/test: Be quiet unless VERBOSE.
7610
7611 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
7612
7613 * data/c.m4 (yydestruct, yysymprint):
7614 Use YYUSE instead of casting to void.
7615 * data/glr.c (YYUSE): New macro.
7616 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7617 Use it instead of rolling our own.
7618 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7619 (YYCHK1):
7620 Use /*CONSTCOND*/ to suppress lint warnings.
7621 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7622 (YY_STACK_PRINT): Use 'false' not '0'.
7623 (YYUSE): New macro.
7624 (yysymprint_, yydestruct_): Use it instead of rolling our own.
7625 * data/yacc.c (YYUSE): New macro.
7626 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
7627 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
7628 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
7629
7630
7631 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
7632 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
7633
7634 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7635
7636 Undo the parts of the unlocked-I/O change that substituted
7637 putc or puts for printf. This might hurt performance a bit,
7638 but some people prefer the printf style.
7639 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
7640 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
7641 All uses replaced by YYFPRINTF and YYDPRINTF.
7642 * data/yacc.c: Likewise.
7643 * lib/bitset.c (bitset_print): Likewise.
7644 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
7645 putc and puts.
7646 * lib/lbitset.c (debug_lbitset): Likewise.
7647 * src/closure.c (print_firsts, print_fderives): Likewise.
7648 * src/gram.c (grammar_dump): Likewise.
7649 * src/lalr.c (look_ahead_tokens_print): Likewise.
7650 * src/output.c (escaped_output): Likewise.
7651 (user_actions_output): Break apart two printfs.
7652 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
7653 * src/reduce.c (reduce_print): Likewise.
7654 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7655 * src/system.h: Include unlocked-io.h rathe than stdio.h.
7656
7657 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7658 Use assignments rather than casts-to-void to suppress
7659 unused-variable warnings. This pacifies 'lint'.
7660 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
7661 unused-variable warnings.
7662
7663 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7664
7665 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7666
7667 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
7668
7669 Use unlocked I/O for a minor performance improvement on hosts like
7670 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7671 is to use the gnlib unlocked-io module, and to prefer putc and
7672 puts to printf when either will work (since the latter doesn't
7673 come in an unlocked flavor).
7674 * bootstrap (gnulib_modules): Add unlocked-io.
7675 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7676 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7677 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7678 and similarly for puts and putc and printf.
7679 * data/yacc.c: Likewise.
7680 * lib/bitset.c (bitset_print): Likewise.
7681 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7682 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7683 to printf.
7684 * lib/lbitset.c (debug_lbitset): Likewise.
7685 * src/closure.c (print_firsts, print_fderives): Likewise.
7686 * src/gram.c (grammar_dump): Likewise.
7687 * src/lalr.c (look_ahead_tokens_print): Likewise.
7688 * src/output.c (escaped_output): Likewise.
7689 (user_actions_output): Coalesce two printfs.
7690 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
7691 * src/reduce.c (reduce_print): Likewise.
7692 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7693 * src/system.h: Include unlocked-io.h rather than stdio.h.
7694
7695 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
7696 this confuses xgettext.
7697
7698 2005-10-02 Akim Demaille <akim@epita.fr>
7699
7700 * bootstrap (gnulib_modules): Add strverscmp.
7701 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
7702 * m4/.cvsignore: Add strverscmp.m4.
7703 * src/parse-gram.y (%require): New token, new rule.
7704 (version_check): New.
7705 * src/scan-gram.l (%require): Adjust.
7706 * tests/input.at (AT_REQUIRE): New.
7707 Use it.
7708 * doc/bison.texinfo (Require Decl): New.
7709 (Calc++ Parser): Use %require.
7710
7711 2005-10-02 Akim Demaille <akim@epita.fr>
7712
7713 * data/location.cc: New.
7714
7715 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
7716 Akim Demaille <akim@epita.fr>
7717
7718 Make sure -odir/foo.cc creates dir/location.hh etc.
7719 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
7720 (spec_file_prefix, spec_verbose_file, spec_graph_file)
7721 (spec_defines_file): Now const.
7722 (dir_prefix): New.
7723 (short_base_name): Remove.
7724 * src/files.c: Adjust.
7725 (dirname.h): Include.
7726 (base_name): Don't prototype it.
7727 (finput): Remove, duplicates gram_in.
7728 (full_base_name, short_base_name): Replace by...
7729 (all_but_ext, all_but_tab_ext): these.
7730 (compute_base_names): Rename as...
7731 (compute_file_name_parts): this.
7732 Update to compute the new variables, including dir_prefix.
7733 Adjust dependencies.
7734 * src/output.c (prepare): Output them.
7735 * src/reader.c: Adjust to use gram_in, not finput.
7736 * src/scan-skel.l (@dir_prefix@): New.
7737
7738 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7739
7740 * lib/subpipe.c: New function end_of_output_subpipe() added
7741 to allow support for non-posix systems. This is a no-op function
7742 for posix systems.
7743
7744 * lib/subpipe.h: New function end_of_output_subpipe() added
7745 to allow support for non-posix systems. This is a no-op function
7746 for posix systems.
7747
7748 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
7749 handle the lack of pipe/fork functionality on non-posix systems.
7750
7751 * djgpp/Makefile.maint: DJGPP specific file.
7752
7753 * djgpp/README.in: DJGPP specific file.
7754
7755 * djgpp/config.bat: DJGPP specific configuration file.
7756
7757 * djgpp/config.sed: DJGPP specific configuration file.
7758
7759 * djgpp/config.site: DJGPP specific configuration file.
7760
7761 * djgpp/config_h.sed: DJGPP specific configuration file.
7762
7763 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7764
7765 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7766
7767 2005-10-02 Akim Demaille <akim@epita.fr>
7768
7769 * data/location.cc: New, extract from...
7770 * data/lalr1.cc: here.
7771 (location.hh): Include it after the user prologue, in case the
7772 filename type is defined by the user.
7773 Forward declation location and position before the pre-prologue.
7774 (yyresult_): Rename as...
7775 (yyresult): this, it's a local variable, not an attribute.
7776 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7777
7778 2005-10-01 Akim Demaille <akim@epita.fr>
7779
7780 * examples/extexi: Restore the #line generation.
7781
7782 2005-09-30 Akim Demaille <akim@epita.fr>,
7783 Alexandre Duret-Lutz <adl@gnu.org>
7784
7785 Move the token type and YYSTYPE in the parser class.
7786 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7787 (parser::token): New, from the moved free definition of tokens.
7788 (parser::semantic_value): Now a full definition instead of an
7789 indirection to YYSTYPE.
7790 (b4_post_prologue): No longer included in the header file, but
7791 in the implementation file.
7792 * doc/bison.texi (C+ Language Interface): Update.
7793 * src/parse-gram.y: Support unary %define.
7794 * tests/actions.at: Define global_tokens_and_yystype for backward
7795 compatibility until we update the tests.
7796 * tests/calc.at: Idem.
7797 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7798 to simplify the code.
7799
7800 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7801
7802 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7803 Ah, the good old days! Problem reported by Peter Klein.
7804 * bootstrap (gnulib_modules): Add strerror, strtoul.
7805 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7806 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7807
7808 2005-09-29 Akim Demaille <akim@epita.fr>
7809
7810 * data/c.m4 (b4_error_verbose_if): New.
7811 * data/lalr1.cc: Use it.
7812 (YYERROR_VERBOSE_IF): Remove.
7813 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7814 parser members, replaced by...
7815 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7816 local variables.
7817 (yysyntax_error_): Takes the state number as argument.
7818 (yyreduce_print_): Use the argument yyrule, not the former
7819 attribute yyn_.
7820
7821 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7822
7823 * bootstrap (gnulib_modules): Add verify.
7824 * lib/.cvsignore: Add verify.h.
7825 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7826 * src/system.h (verify): Remove.
7827 Include verify.h instead.
7828 * src/tables.c (tables_generate): Use new API for 'verify'.
7829
7830 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7831
7832 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7833 local variables whose names begin with 'yy'.
7834 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7835 Trivial changes from Joel E. Denny.
7836
7837 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7838 it itself.
7839 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7840 don't use alloca any more.
7841
7842 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7843 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
7844 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
7845 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7846 to match yacc.c, to test more hosts.
7847
7848 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7849
7850 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7851 doesn't affect behavior.
7852 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7853 Solaris, AIX, MSC.
7854 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7855 This works a bit better with glibc, if user code has already included
7856 stdlib.h.
7857 * doc/bison.texinfo (Bison Parser): Document that users can't
7858 arbitrarily use malloc and free for other purposes. Document
7859 that <alloca.h> and <malloc.h> might be included.
7860 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7861 user must declare alloca.
7862
7863 * HACKING (release): Forwarn the Translation Project about
7864 stable releses.
7865
7866 2005-09-20 Akim Demaille <akim@epita.fr>
7867
7868 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7869
7870 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7871
7872 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7873 (YYSTACK_ALLOC_MAXIMUM): Use it.
7874 (yysyntax_error): New function.
7875 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7876 multiple syntax errors are reported, and alloca is being used.
7877 Instead, reallocate buffers twice as big each time, so that
7878 we waste at most half the allocated memory. Start with a small
7879 (128-byte) buffer that will suffice in most cases anyway.
7880 Use yysyntax_error to do most of the work.
7881
7882 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7883 yynerrs is the number of errors reported, not the number of
7884 errors encountered.
7885
7886 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7887 Mark it as expected to fail.
7888 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7889 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7890 Don't start user-code symbols with "yy", to avoid name space problems.
7891
7892 2005-09-19 Akim Demaille <akim@epita.fr>
7893
7894 Remove the traits, failed experiment.
7895 It never proved useful, and anyway because of the current
7896 definition, it was not possible to have several specialization of
7897 this traits, making it useless.
7898 * data/lalr1.cc (yy:traits): Remove.
7899 Inline its definitions in the parser class.
7900
7901 2005-09-19 Akim Demaille <akim@epita.fr>
7902
7903 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7904 least Mac OSX with a /usr/local install of gettext.
7905
7906 2005-09-19 Akim Demaille <akim@epita.fr>
7907
7908 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7909 and yytoken for similarity with the other skeletons.
7910
7911 2005-09-19 Akim Demaille <akim@epita.fr>
7912
7913 * NEWS, configure.ac: update version number to 2.1a.
7914
7915 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7916
7917 * NEWS: Version 2.1.
7918
7919 * NEWS: Remove notice of yytname change, since it was never in an
7920 official release.
7921 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7922 diagnostic.
7923 * src/output.c (prepare): Likewise.
7924 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7925 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7926 is not defined. This is an awful hack, but it's enough for now.
7927 All callers changed.
7928 * tests/glr-regression-at (make_value): Args are const pointers now,
7929 to avoid GCC warning.
7930 (Duplicated user destructor for lookahead): New test. Currently
7931 skipped. It fails on my host but I'm not sure it'll always fail.
7932
7933 2005-09-16 Akim Demaille <akim@epita.fr>
7934
7935 * src/symtab.h (struct symbol): Declare the printer and destructor
7936 as const, to avoid accidental calls to free.
7937 (symbol_destructor_set, symbol_printer_set): Adjust.
7938 * src/symtab.c: Adjust.
7939
7940 2005-09-16 Akim Demaille <akim@epita.fr>
7941
7942 * data/c.m4 (b4_token_enums): New.
7943 (b4_token_defines): Rename as...
7944 (b4_token_enums_defines): this.
7945 (b4_token_defines): New, output only the #defines.
7946 * data/yacc.c, data/glr.c: Adjust.
7947 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7948 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7949 as default values.
7950
7951 2005-09-16 Akim Demaille <akim@epita.fr>
7952
7953 * data/lalr1.cc (yylex_): Remove, inline its code.
7954 (yyreport_syntax_error_): Remove, replaced by...
7955 (yysyntax_error_): this which returns a string and leaves to the
7956 caller the call to the users' error function.
7957 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7958 Move from members of the parser object...
7959 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7960 to local variables of the parse function.
7961
7962 2005-09-16 Akim Demaille <akim@epita.fr>
7963
7964 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7965 since it's in Bison's name space.
7966
7967 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7968
7969 * data/glr.c (yyresolveValue): Add default case to pacify
7970 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7971
7972 * NEWS: Document when yyparse started to return 2.
7973 * doc/bison.texinfo (Parser Function): Document when yyparse
7974 returns 2.
7975
7976 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7977 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7978 changed.
7979 (class position): file_name -> filename (reverting). All uses changed.
7980
7981 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7982
7983 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7984 do anything if $@ exists. This reverts part of the 2005-07-07
7985 patch.
7986
7987 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7988
7989 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7990 contains obsolete information and isn't worth distributing as a
7991 separate file anyway.
7992 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7993 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7994 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7995 (yyparse): Abort if user code uses longjmp to throw an unexpected
7996 value.
7997
7998 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7999
8000 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8001 Suggested by twlevo@xs4all.nl.
8002
8003 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8004 This avoids a diagnostic from gcc -Wswitch-enum.
8005 Problem reported by twlevo@xs4all.nl.
8006
8007 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8008 standards. Use "file name" or "file" or "name", depending on
8009 the context.
8010 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8011 not to hack/foo.tab.c.
8012 (Calc++ Top Level): 2nd arg of main is not const.
8013 * data/glr.c: b4_filename -> b4_file_name.
8014 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8015 All uses changed.
8016 (class position): filename -> file_name. All uses changed.
8017 * data/yacc.c: b4_filename -> b4_file_name.
8018 * lib/bitset.h: filename -> file_name in local vars.
8019 * lib/bitset_stats.c: Likewise.
8020 * src/files.c: Likewise.
8021 * src/scan-skel.l ("@output ".*\n): Likewise.
8022 * src/files.c (file_name_split): Renamed from filename_split.
8023 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8024
8025 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8026
8027 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8028 to accommodate latest gnulib.
8029
8030 * tests/glr-regression.at (Duplicate representation of merged trees):
8031 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8032
8033 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8034 needed.
8035
8036 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8037
8038 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8039 All uses changed. Invoke user destructor after an error during a
8040 split parse (trivial change from Joel E. Denny).
8041
8042 * tests/glr-regression.at
8043 (User destructor after an error during a split parse): New test case.
8044 Problem reported by Joel E. Denny in:
8045 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8046
8047 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8048
8049 * README-cvs: Give URLs for recommended tools.
8050 Mention Gzip version problem, and bootstrapping issues.
8051 Remove troubleshooting section, as it's somewhat obsolete.
8052
8053 * bootstrap (no_cache): New var, to accommodate different wget
8054 variants. Use it instead of '-C off'. Problem reported by
8055 twlevo@xs4all.nl.
8056
8057 * data/glr.c (yydestroyStackItem): New function.
8058 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8059 debugging information. Problem reported by Joel E. Denny.
8060
8061 2005-08-25 Akim Demaille <akim@epita.fr>
8062
8063 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8064
8065 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8066
8067 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8068 Don't invoke destructor on unresolved entries.
8069 * tests/glr-regression.at
8070 (User destructor for unresolved GLR semantic value): New test case.
8071 Problem reported by Joel E. Denny in:
8072 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8073
8074 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8075
8076 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8077 Add strnlen.c.
8078 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8079 lib-prefix.m4, po.m4.
8080
8081 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8082 in yydestruct diagnostic, since it might not be an error.
8083 Problem reported by Joel Denny near end of
8084 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8085 * data/lalr1.cc (yyerturn): Likewise.
8086 * data/yacc.c (yyreturn): Likewise.
8087 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8088
8089 * src/files.c: Remove obsolete FIXME comment.
8090
8091 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8092 with the other templates, and to fix bogus run-on messages such
8093 as the one reported at the end of
8094 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8095 All callers changed to avoid the newline.
8096 (yyprocessOneStack): Output two lines rather than one, to accommodate
8097 the above change. This changes the debug output format slightly.
8098
8099 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8100 reported by Joel E. Denny in
8101 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8102 (trivial change).
8103 * tests/glr-regression.at (Duplicate representation of merged trees):
8104 New test, from Joel E. Denny in:
8105 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8106 * THANKS: Add Joel E. Denny.
8107
8108 * configure.ac (AC_INIT): Bump to 2.0c.
8109
8110 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8111
8112 * NEWS: Version 2.0b.
8113
8114 * Makefile.am (SUBDIRS): Put examples before tests, so that
8115 "make check" doesn't finish with "All 1 tests passed".
8116
8117 * tests/regression.at (Token definitions): Don't rely on
8118 AT_PARSER_CHECK for data that contains backslashes. It currently
8119 uses 'echo', and 'echo' isn't portable if its argument contains
8120 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8121 that the byte '\0xff' is not printable in the C locale; it is,
8122 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8123 not printable, so use '\0x81' to test.
8124
8125 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8126 version of GCC, since the macro is used with non-GCC compilers.
8127
8128 Fix core dump reported by Pablo De Napoli in
8129 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8130 * tests/regression.at (Invalid inputs with {}): New test.
8131 * src/parse-gram.y (token_name): Translate type before using
8132 it as an index.
8133
8134 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8135 the user's name space. All uses changed to __attribute__
8136 ((__unused__)).
8137 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8138 Add __attribute__ ((__noreturn__)).
8139
8140 * etc/clcommit: Remove. We weren't using it, and it failed
8141 "make maintainer-distcheck".
8142 * Makefile.maint: Merge from coreutils.
8143 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8144 (syntax-check-rules): Change list of rules as described below.
8145 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8146 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8147 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8148 (sc_trailing_space): New rules.
8149 (sc_xalloc_h_in_src): Remove.
8150 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8151 (sc_space_tab, sc_error_exit_success, sc_changelog):
8152 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8153 (makefile-check, po-check, author_mark_check):
8154 (makefile_path_separator_check, copyright-check):
8155 Use grep -n, to make it easier to find violations.
8156 Use CVS_LIST and CVS_LIST_EXCEPT.
8157 (header_regexp, h_re): Remove.
8158 (dd_c): New macro.
8159 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8160 (my-distcheck): Use more-modern GCC flags.
8161 (signatures, %.asc): Remove.
8162 (rel-files, announcement): Remove signatures.
8163 Restore old updating code, even though we don't use it, so
8164 that we're the same as coreutils.
8165 (alpha, beta, major): Depend on news-date-check.
8166 Make the upload commands.
8167
8168 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8169 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8170 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8171 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8172 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8173 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8174 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8175 * tests/sets.at: Likewise.
8176
8177 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8178 we comment out the Autoconf version number.
8179 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8180 it's error-prone and "make maintainer-distcheck" rejects it.
8181
8182 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8183 Indent calls to "error" to pacify "make maintainer-distcheck",
8184 when the calls are not intended to be translated.
8185 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8186
8187 * src/Makefile.am (DEFS): Use +=, to pacify
8188 "make maintainer-distcheck".
8189 (bison_SOURCES): Add scan-skel.h.
8190 (sc_tight_scope): New rule, from coreutils.
8191
8192 * src/files.c (src_extension, header_extension):
8193 Now static, not extern.
8194 * src/getargs.c (short_options): Likewise.
8195 * src/muscle_tab.c (muscle_table): Likewise.
8196 * src/parse-gram.y (current_class, current_type, current_prec):
8197 Likewise.
8198 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8199 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8200 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8201 void, to avoid warning when NLS is disabled.
8202 * src/output.c: Include scan-skel.h.
8203 (scan_skel): Remove decl, since scan-skel.h does this.
8204 (output_skeleton):
8205 Indent calls to "error" to pacify "make maintainer-distcheck".
8206 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8207 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8208 "make maintainer-distcheck".
8209 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8210 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8211 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8212 (skel_lex_destroy, scan_skel): Move these decls to...
8213 * src/scan-skel.h: New file.
8214 * src/uniqstr.c (uniqstr_assert):
8215 Indent calls to "error" to pacify "make maintainer-distcheck".
8216
8217 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8218 not @VAR@.
8219
8220 * tests/torture.at: Revamp to avoid misuse of atoi that
8221 "make maintainer-distcheck" complained about.
8222
8223 * examples/extexi (message): Don't print a message more than once,
8224 and omit line-number decoration that makes Emacs compile think
8225 that informative messages are worth worrying about.
8226
8227 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8228
8229 * configure.ac: Update version number.
8230
8231 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8232 accidentally.
8233 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8234 autogenerated by the maintainer.
8235 * examples/calc++/.cvsignore: Add *.yy.
8236
8237 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8238 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8239 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8240
8241 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8242
8243 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8244 from maintainer-distcheck about casting the argument of 'free'.
8245
8246 * NEWS: Mention recent yytname changes.
8247 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8248
8249 * bootstrap: For translations that have not yet been upgraded to
8250 the new runtime-po domain, prime the pump by extracting the
8251 relevant strings from the obsolete translations. This code can be
8252 removed once the bison-runtime domain has been translated by each
8253 team.
8254
8255 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8256 now that token names are already quoted.
8257
8258 Fix problem reported by Anthony Heading.
8259 * data/glr.c (YYTOKEN_TABLE): New macro.
8260 (yytname): Define if YYTOKEN_TABLE.
8261 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8262 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8263 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8264 * src/output.c (prepare_symbols): Output token_table_flag.
8265
8266 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8267
8268 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8269 again if the first call fails.
8270
8271 * data/glr.c (yytnamerr): New function.
8272 (yyreportSyntaxError): Use it to dequote most string literals.
8273 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8274 with other skeletons. All uses changed.
8275 (yytnameerr_): New function.
8276 (yyreport_syntax_error): Use it to dequote most string literals.
8277 * data/yacc.c (yytnamerr): New function.
8278 (yyerrlab): Use it to decode most string literals.
8279 * doc/bison.texinfo (Decl Summary, Calling Convention):
8280 Clarify quoting convention of yytname.
8281 * src/output.c (prepare_symbols): Quote all names. This undoes
8282 the 2005-04-17 change, which is now accomplished (mostly) via
8283 changes in the parsers as described above.
8284 * tests/regression.at (Token definitions, Web2c Actions):
8285 Undo most 2005-04-17 change here, too.
8286
8287 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 Fix more problems reported by twlevo@xs4all.nl.
8290 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8291 remove trailing spaces. This loses the exit status of ./types,
8292 and isn't needed since ./types shouldn't be emitting trailing
8293 spaces.
8294 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8295 as the stack isn't valid in that case.
8296
8297 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8298 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8299 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8300 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8301 is used.
8302 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8303 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8304 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8305 Likewise.
8306
8307 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8308 overly-picky compilers that reject 'char *foo = "bar";'.
8309
8310 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8311 to FILE * parameter, not to stderr. This fixes a typo introduced
8312 in the 2005-07-12 change.
8313
8314 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8315 warnings from GCC 4.
8316
8317 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8318 (yyglrShiftDefer, yysplitStack):
8319 Remove unused parameters b4_pure_formals. All uses changed.
8320 (yyglrShift): Remove unused parameters b4_user_formals.
8321 All uses changed.
8322 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8323
8324 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8325
8326 Destructor cleanups and regularization among the three skeletons.
8327 * NEWS: Document the behavior changes.
8328 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8329 stack before failing, as the cleanup code will do it for us now.
8330 * data/lalr1.cc (yyerrlab): Likewise.
8331 * data/glr.c (yyparse): Pop everything off the stack before
8332 freeing it, so that destructors get called properly.
8333 * data/lalr1.cc (yyreturn): Likewise.
8334 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8335 This is more consistent.
8336 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8337 why destructors might be called. 1.875 -> 2.1.
8338 (Destructor Decl, Decl Summary, Table of Symbols):
8339 Some English-language cleanups for %destructor.
8340 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8341 Add output line for destructor of start symbol.
8342 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8343 because of that same extra output line.
8344
8345 * NEWS: Document minor wording changes in diagnostics of
8346 Bison-generated parsers.
8347 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8348 Remove unused formals. All uses changed.
8349 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8350 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8351 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8352 Rename yyoverflowab to yyexhaustedlab.
8353 When memory exhaustion occurs during syntax-error reporting,
8354 report it separately rather than in a single diagnostic; this
8355 eases translation.
8356 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8357 (Memory Exhausted): Renamed from Parser Stack Overflow.
8358 Revamp wording slightly to prefer "memory exhaustion".
8359 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8360
8361 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8362
8363 Add i18n support to the GLR skeleton. Partially fix the C++
8364 skeleton; a C++ expert needs to finish this. Remove debugging
8365 msgids; there's little point to having them translated, since they
8366 can be understood only by someone who can read the
8367 (English-language) source code.
8368
8369 Generate runtime-po/bison-runtime.pot automatically, so that we
8370 don't have to worry about garbage getting in that file. We'll
8371 make sure after the next official release that old msgids don't
8372 get lost. See
8373 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8374
8375 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8376 Now auto-generated.
8377 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8378 Fix typos in explanations of the runtime file.
8379 * bootstrap: Change gettext keyword from YYI18N to YY_.
8380 Use standard Makefile.in.in in runtime-po, since we'll arrange
8381 for backward-compatible bison-runtime.po files in a different way.
8382 * data/glr.c (YY_): New macro, from yacc.c.
8383 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8384 Translate messages intended for users.
8385 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8386 the wording in the other skeletons. We don't know that the memory
8387 is virtual.
8388 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8389 Use same method that yacc.c uses.
8390 Don't translate debugging messages.
8391 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8392 it doesn't work (yet), and requires C++ expertise to fix.
8393 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8394 Move defn to a more logical place, to be consistent with other
8395 skeletons.
8396 Don't translate debugging messages.
8397 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8398 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8399 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8400 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8401
8402 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8403 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8404 void, not int.
8405 * tests/glr-regression.at (Badly Collapsed GLR States):
8406 Likewise.
8407 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8408 yylex should return 0 at EOF rather than aborting.
8409
8410 Improve tests for stack overflow in GLR parser.
8411 Problem reported by twlevo@xs4all.nl.
8412 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8413 All uses removed.
8414 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8415 can handle the problem.
8416 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8417 (yyparse): New local variable yyresult to record the result.
8418 Use result of setjmp to set it, rather than storing itinto
8419 struct.
8420 (yyDone): Remove label.
8421 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8422 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8423 if YYABORT is used).
8424 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8425 yyparse status; put status > 1 into diagnostic.
8426 Check that status==2 works.
8427 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8428 Use exit status 3 for failure to open (which shouldn't happen).
8429
8430 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8433 1 on syntax error; just let yyparse do its thing.
8434 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8435 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8436 (Exploding the Stack Size with Alloca):
8437 (Exploding the Stack Size with Malloc):
8438 Expect exit status 2, not 1, since the parser is supposed to blow
8439 its stack. Problem reported by twlevo@xs4all.nl.
8440
8441 * data/glr.c (yyparse): Don't assume that the initial calls
8442 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8443 Print a stack-overflow message and fail instead.
8444 Initialize the line-number information before creating the stack,
8445 so that the stack-overflow message can report line zero safely.
8446
8447 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8448
8449 Fix problems reported by twlevo@xs4all.nl.
8450 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8451 (yyuserMerge): Provide a default case if b4_mergers is empty.
8452 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8453 * tests/glr-regression.at
8454 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8455 Add casts to pacify C++ compilers.
8456 * tests/glr-regression.at (Improper merging of GLR delayed action
8457 sets): Declare yylex before using it.
8458 * tests/Makefile.am (maintainer-check-g++): Fix a stray
8459 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8460 test for valgrind; valgrind is independent of g++.
8461 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8462 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8463 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8464 Use a destructor, so that we can expand the stack. Change
8465 YYSTYPE to char * so that we can free it. Cast result of malloc.
8466
8467 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8468
8469 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8470 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8471
8472 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8473
8474 * PACKAGING: New file, suggested by Bruno Haible and taken from
8475 similar wording in gettext's PACKAGING file.
8476 * NEWS: Mention PACKAGING.
8477 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8478
8479 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 * NEWS: Document recent i18n improvements.
8482 * bootstrap: Get runtime translations into runtime-po.
8483 Create runtime-po files automatically, if possible.
8484 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8485 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8486 does not infringe on the user's name space.
8487 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8488 * doc/bison.texinfo (Internationalization): Revamp the English
8489 and Texinfo syntax a bit, to try to make it clearer.
8490 (Bison Options, Option Cross Key): Mention --print-localedir.
8491 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8492 YYENABLE_NLS. Quote a bit more.
8493 * runtime-po/.cvsignore: New file.
8494 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8495 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8496 * runtime-po/quot.sed: Likewise.
8497 * runtime-po/boldquot.sed: Likewise.
8498 * runtime-po/en@quot.header: Likewise.
8499 * runtime-po/en@boldquot.header: Likewise.
8500 * runtime-po/insert-header.sin: Likewise.
8501 * runtime-po/remove-potcdate.sin: Likewise.
8502 * runtime-po/Makevars: Likewise.
8503 * runtime-po/LINGUAS: Likewise.
8504 * runtime-po/de.po: Likewise; we will rely on the translation project
8505 to maintain this, so "bootstrap" should get it.
8506 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
8507 its value.
8508 * src/main.c (main): Bind the bison-runtime domain, too.
8509
8510 2005-07-12 Bruno Haible <bruno@clisp.org>
8511
8512 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8513 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8514 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8515 * runtime-po: New directory.
8516 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8517 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8518 * runtime-po/Rules-quot: New file, copied from po/.
8519 * runtime-po/quot.sed: Likewise.
8520 * runtime-po/boldquot.sed: Likewise.
8521 * runtime-po/en@quot.header: Likewise.
8522 * runtime-po/en@boldquot.header: Likewise.
8523 * runtime-po/insert-header.sin: Likewise.
8524 * runtime-po/remove-potcdate.sin: Likewise.
8525 * runtime-po/Makevars: New file.
8526 * runtime-po/POTFILES.in: New file.
8527 * runtime-po/LINGUAS: New file.
8528 * runtime-po/bison-runtime.pot: New file.
8529 * runtime-po/de.po: New file.
8530 * m4/bison.m4: New file.
8531 * Makefile.am (SUBDIRS): Add runtime-po.
8532 (aclocaldir, aclocal_DATA): New variables.
8533 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8534 Define aclocaldir.
8535 * src/getargs.c (usage): Document --print-localedir option.
8536 (PRINT_LOCALEDIR_OPTION): New enum item.
8537 (long_options): Add --print-localedir option.
8538 (getargs): Handle --print-localedir option.
8539 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8540 (Internationalization): New section.
8541
8542 2005-07-12 Akim Demaille <akim@epita.fr>
8543
8544 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8545 for consistency with the rest of the code.
8546 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8547 Add separators.
8548
8549 2005-07-12 Akim Demaille <akim@epita.fr>
8550
8551 * src/parse-gram.y: Use %printer instead of YYPRINT.
8552
8553 2005-07-12 Akim Demaille <akim@epita.fr>
8554
8555 * src/symtab.h, src/symtab.c (symbol_print): New.
8556 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8557 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8558
8559 2005-07-12 Akim Demaille <akim@epita.fr>
8560
8561 * data/glr.c (b4_syncline): Fix (swap) the definitions of
8562 b4_at_dollar and b4_dollar_dollar.
8563
8564 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8565
8566 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8567 and Pennello's paper.
8568
8569 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8570
8571 * data/yacc.c (yyparse): Undo previous patch. Instead,
8572 set yylsp[0] and yyvsp[0] only if the initial action
8573 sets yylloc and yylval, respectively.
8574
8575 * data/yacc.c (yyparse): In the initial action, set
8576 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8577 This avoids the use of undefined variables if the initial
8578 action does not set yylloc and/or yylval.
8579
8580 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8581
8582 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8583 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8584 Remove from CVS. These files are automatically generated.
8585 * examples/extexi: Clarify that this file is now part of Bison,
8586 not GNU M4, and that it works with any POSIX-compatible Awk.
8587 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8588 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8589 so that we also get calc++-parser.yy. Geneate it.
8590 Use $(AWK), not gawk, since any conforming Awk will do.
8591 Put comment before action, since older 'make' can't handle comment
8592 in action.
8593 $(BUILT_SOURCES): List all built sources, not just some of them.
8594 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
8595 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
8596 $($(calc_sources_generated)): Remove unnecessary test for existence
8597 of target. (This had a shell syntax error anyway; a stray "x".)
8598 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
8599 calc++-parser.yy.
8600 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
8601
8602 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
8603 implied by the other modules.
8604
8605 2005-07-06 Akim Demaille <akim@epita.fr>
8606
8607 Bind examples/calc++ to the package.
8608 * examples/calc++/Makefile: Remove, replaced by...
8609 * examples/calc++/Makefile.am: ... this new file.
8610 * examples/calc++/test: Remove input.
8611 * examples/calc++/compile: Remove.
8612 * examples/Makefile.am: New.
8613 * configure.ac, Makefile.am: Adjust.
8614 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
8615
8616 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
8617
8618 * data/glr.c (yyFail): Drastically simplify; since the format argument
8619 never had any % directives, we can simply pass it to yyerror.
8620 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
8621 be modified later, as that is the usual style in glr.c.
8622 Problems reported by Paul Hilfinger.
8623
8624 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
8625 and size overflow errors.
8626 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
8627 in case the user prolog sets feature-test macros like _GNU_SOURCE.
8628 (YYSIZEMAX): New macro.
8629 (yystpcpy): New function, taken from yacc.c.
8630 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
8631 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
8632 so that we don't have to maintain their signatures.
8633 (yyFail): Check for buffer overflow, by using vsnprintf rather
8634 than vsprintf. Allocate a bigger buffer if possible.
8635 Report an error if buffer allocation fails.
8636 (yyStackOverflow): New function.
8637 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
8638 the initialization was successful. It might fail if storage was
8639 exhausted.
8640 (yyexpandGLRStack): Add more checks for storage allocation failure.
8641 Use yyStackOverflow to report failures.
8642 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
8643 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
8644 Don't assume stack number fits in int.
8645 (yysplitStack): Check for storage allocation failure.
8646 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
8647 can print diagnostics on storage allocation failure. All callers
8648 changed.
8649 (yyresolveValue): Use yybool for boolean.
8650 (yyreportSyntaxError): Check for size-calculation overflow.
8651 This code is taken from yacc.c.
8652 (yyparse): Check for storage allocation errors when allocating
8653 the initial stack.
8654
8655 2005-07-05 Akim Demaille <akim@epita.fr>
8656
8657 Extract calc++ from the documentation.
8658 * doc/bison.texinfo (Calc++): Add the extraction marks.
8659 * examples/extexi: New, from the aborted GNU Programming 2E.
8660 Separate the different paragraph of a file with empty lines.
8661 * examples/Makefile: Use it to extract the whole calc++ example.
8662
8663 2005-06-24 Akim Demaille <akim@epita.fr>
8664
8665 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
8666 class typedefs.
8667
8668 2005-06-22 Akim Demaille <akim@epita.fr>
8669
8670 * doc/bison.texinfo (C++ Language Interface): First stab.
8671 (C++ Parsers): Remove.
8672
8673 2005-06-22 Akim Demaille <akim@epita.fr>
8674
8675 * data/lalr1.cc (yylex_): Honor %lex-param.
8676
8677 2005-06-22 Akim Demaille <akim@epita.fr>
8678
8679 Start a set of simple examples.
8680 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8681 * examples/calc++/calc++-driver.hh,
8682 * examples/calc++/calc++-parser.yy,
8683 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8684 * examples/calc++/compile, examples/calc++/test: New.
8685
8686 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
8687
8688 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
8689 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
8690 which stems from the 2005-05-27 patch.
8691
8692 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8693
8694 * data/glr.c: Modify treatment of unused parameters to permit use
8695 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
8696
8697 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
8698
8699 Fix infringement on user name space reported by Janos Zoltan Szabo.
8700 * data/yacc.c (yyparse): strlen -> yystrlen.
8701
8702 2005-05-30 Akim Demaille <akim@epita.fr>
8703
8704 * data/lalr1.cc (_): New.
8705 Translate the various messages.
8706
8707 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
8708
8709 Fix infringement on user name space reported by Bruno Haible.
8710 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
8711 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
8712 the user's name space.
8713 (alloca): Include <stdlib.h> to get it, if it's not built in.
8714 (YYMALLOC, YYFREE): Define only if needed.
8715 (malloc, free): Declare, but only if needed, as this infringes on
8716 the user name space.
8717
8718 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
8719
8720 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
8721 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
8722 with %d format.
8723 * lib/ebitset.c (min, max): Undef before defining.
8724 * lib/vbitset.c (min, max): Likewise.
8725 * lib/subpipe.c (create_subpipe): Save local variables in case
8726 vfork clobbers them.
8727
8728 2005-05-24 Bruno Haible <bruno@clisp.org>
8729
8730 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
8731 error message syntax used by gcc-4.0.
8732
8733 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
8734
8735 * README: Mention m4 1.4.3. Remove obsolete advice about
8736 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
8737
8738 * bootstrap: Remove workaround for problem I encountered with
8739 gettext 0.14.1; it seems to be fixed now.
8740
8741 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
8742
8743 * NEWS: Version 2.0a.
8744
8745 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
8746 the previous change.
8747
8748 Various maintainer cleanups.
8749 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
8750 conftest*, for benefit of CVS commands run at the same time as
8751 "configure". Add build-aux, since "bootstrap" now creates it and
8752 its subfiles.
8753 * Makefile.cfg (move_if_change): Remove.
8754 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
8755 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
8756 (po_repo, do-po-update, po-update, wget_files, get-targets):
8757 (config.guess-url_prefix, config.sub-url_prefix):
8758 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
8759 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
8760 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
8761 Remove.
8762 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8763 this is now the recommended name.
8764 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8765 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8766 ylwrap. These files now go into build-aux.
8767 * config/move-if-change: Remove.
8768 * config/prev-version.txt: Bump from 1.75 to 2.0.
8769
8770 * bootstrap: Add stdio-safer, unistd-safer modules.
8771 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8772 we don't need it).
8773 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8774 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8775 * lib/subpipe.c: Include "unistd-safer.h".
8776 (create_subpipe): Make sure all the newly-created
8777 file descriptors are > 2, so that diagnostics don't
8778 get sent down them (which might cause Bison to hang, in theory).
8779 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8780 * src/files.c (xfopen): Use fopen_safer, not fopen.
8781
8782 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8783 yesterday's yacc.c fix.
8784
8785 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8786
8787 * data/glr.c, data/lalr1.cc: Update copyright date.
8788
8789 Fix a destructor bug reported by Wolfgang Spraul in
8790 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8791 * data/yacc.c (yyabortlab): Don't call destructor, and
8792 don't set yychar to EMPTY.
8793 (yyoverflowlab): Don't call destructor.
8794 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8795 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8796 since we no longer output the message "discarding lookahead token
8797 end of input ()".
8798
8799 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8800
8801 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8802 fix a small glitch in debugging output.
8803 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8804 after YY_SYMBOL_PRINT where needed.
8805
8806 (struct yyGLRState): Add some comments.
8807 (struct yySemanticOption): Add some comments.
8808 (union yyGLRStackItem): Add comment.
8809
8810 (yymergeOptionSets): Correct this to properly perform the union,
8811 avoiding infinite reported by Michael Rosien.
8812 Update comment.
8813
8814 * tests/glr-regression.at: Add test for GLR merging error reported
8815 by M. Rosien.
8816
8817 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8818
8819 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8820 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8821 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8822 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8823 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8824 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8825 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8826 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8827 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8828 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8829 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8830 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8831 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8832 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8833 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8834 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8835 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8836 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8837 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8838 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8839 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8840 src/output.h, src/parse-gram.c, src/parse-gram.h,
8841 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8842 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8843 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8844 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8845 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8846 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8847 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8848 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8849 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8850 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8851 tests/reduce.at, tests/regression.at, tests/sets.at,
8852 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8853 Update FSF postal mail address.
8854
8855 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8856
8857 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8858 Problem reported by Ralf Menzel.
8859
8860 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8861
8862 * tests/actions.at: Test that stack overflow invokes destructors.
8863 From Marcus Holland-Moritz.
8864 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8865 from here....
8866 (yyreturn): to here. That way, destructors are called properly
8867 even if the stack overflows, or the user calls YYACCEPT or
8868 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8869 (yyoverflowlab): Destroy the lookahead.
8870
8871 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8872
8873 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8874
8875 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8876
8877 * NEWS: Bison-generated C parsers no longer quote literal strings
8878 associated with tokens.
8879 * src/output.c (prepare_symbols): Don't escape strings,
8880 since users don't want to see C escapes.
8881 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8882 in diagnostics.
8883 * tests/input.at (Torturing the Scanner): Likewise.
8884 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8885
8886 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8887
8888 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8889 the data size is known to be too small and we can't increase it.
8890 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8891
8892 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8893
8894 * src/parse-gram.y: Include quotearg.h.
8895 (string_as_id): Quote $1 before using it as a key, since the
8896 lexer no longer quotes it for us.
8897 (string_content): Don't strip quotes, since lexer no longer
8898 quotes it for us.
8899 * src/scan-gram.l: Include quotearg.h.
8900 ("\""): Omit quote.
8901 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8902 a key, since the rest of the lexer doesn't quote it.
8903 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8904 * tests/regression.at (Token definitions): Check for backslashes
8905 in token strings.
8906
8907 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8908 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8909 (yyparse): Revamp code to generate long syntax error message, to
8910 make it easier to translate, and to avoid problems with arithmetic
8911 overflow. Change "virtual memory" to "memory" in diagnostic, since
8912 we don't know whether the memory is virtual.
8913
8914 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 * NEWS: Bison-generated C parsers now use the _ macro to
8917 translate strings.
8918 * data/yacc.c (_) [!defined _]: New macro.
8919 All English strings wrapped inside this macro.
8920 * doc/bison.texinfo (Bison Parser): Document _.
8921 * po/POTFILES.in: Include src/parse-gram.c, since it now
8922 includes translateable strings that parse-gram.y doesn't.
8923
8924 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8925
8926 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8927 reverting the 2004-10-11 change to this function.
8928 (symbol_check_alias_consistency): Don't call symbol_type_set
8929 if the type name is already correct.
8930 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8931
8932 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8933
8934 * tests/regression.at (Token definitions): Don't use a token named
8935 c, as that generates a "#define c ..." that runs afoul of buggy
8936 stdlib.h that uses the identifier c as a member of struct
8937 drand48_data. Problem reported by Horst Wente.
8938
8939 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8940
8941 * bootstrap: Change translation URL from
8942 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8943 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8944 redirection glitches. Problem reported by twlevo@xs4all.nl.
8945
8946 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8947
8948 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8949 after operands; POSIX says this isn't portable for the c99 command.
8950
8951 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8952
8953 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8954 immediately if a data overrun has occurred; this may help us track
8955 down what may be a spurious failure on MacOS.
8956
8957 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8958
8959 Respond to problems reported by twlevo@xs4all.nl.
8960
8961 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8962
8963 * src/vcg.h: Comment fix.
8964 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8965 (G_CMAX): Change to -1 instead of INT_MAX.
8966
8967 * data/yacc.c (yyparse): Omit spaces before #line.
8968
8969 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8970
8971 * src/tables.c (state_number_to_vector_number): Put it inside an
8972 "#if 0", since it's not currently used. Problem reported by
8973 Roland McGrath.
8974
8975 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8976
8977 * src/output.c (escaped_output): Renamed from
8978 escaped_file_name_output, since we now use it for symbol tags as
8979 well. All uses changed.
8980 (symbol_destructors_output, symbol_printers_output):
8981 Escape symbol tags too.
8982 Problem reported by Matyas Forstner in
8983 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8984
8985 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8986 not needed.
8987 * src/output.c (user_actions_output, token_definitions_output,
8988 symbol_destructors_output, symbol_printers_output): Likewise.
8989 * src/reader.c (prologue_augment): Likewise.
8990 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8991
8992 * src/vcg.c (output_edge): Don't quote linestyle arg.
8993 Problem reported by twlevo@xs4all.nl.
8994
8995 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8996
8997 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8998 example, reported by Derek M Jones. Also, make the example even
8999 more outrageous, to better illustrate how bad the problem is.
9000
9001 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9002
9003 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9004 putsym. Typo reported by Sebastian Piping.
9005
9006 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9007
9008 * doc/bison.texinfo (Language and Grammar): some -> same
9009 (Epilogue): int he -> in the
9010 Typos reported by Sebastian Piping via Justin Pence.
9011
9012 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9013
9014 * tests/glr-regression.at (Improper handling of embedded actions
9015 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9016 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9017 with dollar signs in test names.
9018 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9019 for a similar reason.
9020
9021 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9024 wants to redefine G_VIEW.
9025
9026 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9027
9028 * src/vcg.c (get_view_str): Remove case for normal_view.
9029 Problem reported by twlevo@xs4all.nl.
9030
9031 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9032
9033 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9034 Problem reported by twlevo@xs4all.nl.
9035
9036 * doc/bison.texinfo: Change @dircategory from "GNU programming
9037 tools" to "Software development". Requested by Richard Stallman
9038 via Karl Berry.
9039
9040 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9041
9042 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9043 Problem reported by twlevo@xs4all.nl.
9044
9045 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9048 keyword; it's not needed with modern compilers, and it doesn't
9049 affect correctness with older compilers. Suggested by
9050 twlevo@xs4all.nl.
9051
9052 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9053
9054 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9055 gcc -Wswitch-default.
9056 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9057 * data/yacc.c (yyparse): Likewise.
9058
9059 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9060
9061 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9062 already. Let config.h define any nonstandard values.
9063
9064 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9065
9066 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9067 for the benefit of slower hosts. Problem reported by
9068 Nelson H. F. Beebe.
9069
9070 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9071
9072 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9073 being defined and not used.
9074 * data/lalr1.cc (yyparse): Likewise.
9075 Use "if (false)" rather than "if (0)".
9076
9077 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9078
9079 * TODO: Mention that we should allow NUL bytes in tokens.
9080
9081 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9082
9083 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9084 Problem reported by Hans Aberg.
9085
9086 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9087
9088 * src/getargs.c (version): Happy new year; update overall
9089 program copyright date from 2004 to 2005.
9090
9091 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9092 Problem reported by Hans Aberg.
9093 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9094 (Output file names.): Add a test for the case when standard output
9095 is closed.
9096
9097 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9098
9099 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9100 to fix an oversight in the Bison 2.0 manual.
9101
9102 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9103
9104 * NEWS: Version 2.0. Reformat the existing news items since
9105 1.875, so that related items are grouped together.
9106 * configure.ac (AC_INIT): Bump version to 2.0.
9107 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9108
9109 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9110 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9111 otherwise, we're not testing alloca. Unfortunately there's no
9112 simple way to consult HAVE_ALLOCA here.
9113
9114 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9115 for yymsg, too.
9116
9117 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9118 hand. This avoids a warning about comparing int to size_t when
9119 GCC warnings are enabled.
9120
9121 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9122
9123 * NEWS: Bison-generated parsers no longer default to using the
9124 alloca function (when available) to extend the parser stack, due
9125 to widespread problems in unchecked stack-overflow detection.
9126 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9127 responsibility to set it to a positive value. This lets the user
9128 specify a value that is not a preprocessor constant.
9129 * data/yacc.c (YYMAXDEPTH): Likewise.
9130 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9131 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9132 to be a compile-time constant. However, explain the constraints on it.
9133 Also, explain the constraints on YYINITDEPTH.
9134 (Table of Symbols): Explain that alloca is no longer the default.
9135 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9136 to 1.
9137
9138 * doc/bison.texinfo (Location Default Action): Mention that n must
9139 be zero when k is zero. Suggested by Frank Heckenbach.
9140
9141 2004-12-22 Akim Demaille <akim@epita.fr>
9142
9143 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9144 (parser::state_type, parser::semantic_type, parser::location_type):
9145 Private, not public.
9146 (parser::parse): Return ints, not bool.
9147 Returning a bool introduces a problem: 0 corresponds to false, and
9148 it seems weird to return false on success. Returning true changes
9149 the conventions for yyparse.
9150 Alternatively we could return void and send an exception.
9151 There is no clear consensus (yet?).
9152 (state_stack, semantic_stack, location_stack): Rename as...
9153 (state_stack_type, semantic_stack_type, location_stack_type): these.
9154 Private, not public.
9155 * tests/c++.at: New.
9156 * tests/testsuite.at, tests/Makefile.am: Adjust.
9157
9158 2004-12-21 Akim Demaille <akim@epita.fr>
9159
9160 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9161
9162 2004-12-21 Akim Demaille <akim@epita.fr>
9163
9164 Don't impose std::string for filenames.
9165
9166 * data/lalr1.cc (b4_filename_type): New.
9167 (position::filename): Use it.
9168 (parser.hh): Move the inclusion of stack.hh and location.hh below
9169 the user code, so that needed headers for the filename type can be
9170 included first.
9171 Forward declare them before the user code.
9172 * tests/Makefile.am (check-local, installcheck-local): Pass
9173 TESTSUITEFLAGS to the TESTSUITE.
9174
9175 2004-12-20 Akim Demaille <akim@epita.fr>
9176
9177 Use more STL like names: my_class instead of MyClass.
9178
9179 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9180 (SemanticStack, SemanticType, StateStack, StateType)
9181 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9182 (Parser::value): Rename as...
9183 (location_stack, location_type, rhs_number_type, semantic_stack)
9184 (semantic_type, state_stack, state_type, token_number_type, stack)
9185 (slice, traits, parser::yylloc, parser::yylval): these.
9186
9187 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9188
9189 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9190
9191 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9192 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9193
9194 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9195
9196 Remove uses of 'short int' and 'unsigned short int'. This raises
9197 some arbitrary limits. It uses more memory but nowadays that's
9198 not much of an issue.
9199
9200 This change does not affect the generated parsers; that's a different
9201 task, as some users will want to conserve memory there.
9202
9203 Ideally we should use size_t to represent all object counts, and
9204 something like ptrdiff_t to represent signed differences of object
9205 counts; but that will require more code-cleanup than I have the
9206 time to do right now.
9207
9208 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9209 Use size_t, not int or short int, to count objects.
9210 * src/closure.c (nritemset, closure): Likewise.
9211 * src/closure.h (nritemset, closure): Likewise.
9212 * src/nullable.c (nullable_compute): Likewise.
9213 * src/print.c (print_core): Likewise.
9214 * src/print_graph.c (print_core): Likewise.
9215 * src/state.c (state_compare, state_hash): Likewise.
9216 * src/state.h (struct state): Likewise.
9217 * src/tables.c (default_goto, goto_actions): Likewise.
9218
9219 * src/gram.h (rule_number, rule): Use int, not short int.
9220 * src/output.c (prepare_rules): Likewise.
9221 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9222 errs, reductions): Likewise.
9223 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9224 Likewise.
9225 * src/tables.c (vector_number, tally, action_number,
9226 ACTION_NUMBER_MINIMUM): Likewise.
9227 * src/output.c (muscle_insert_short_int_table): Remove.
9228
9229 2004-12-17 Akim Demaille <akim@epita.fr>
9230
9231 * data/lalr1.cc: Extensive Doxygenation.
9232 (error_): Rename as...
9233 (error): this, since it is visible to the user.
9234 Adjust callers.
9235 (Parser::message): Now an automatic variable from...
9236 (Parser::yyreport_syntax_error_): here.
9237 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9238 Parser::error.
9239 * tests/input.at: Escape $.
9240
9241 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9242
9243 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9244 Parenthesize rhs to avoid obscure problems with mistakes like
9245 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9246 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9247 b4_rhs_location): Likewise.
9248 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9249 b4_rhs_location): Likewise.
9250
9251 2004-12-16 Akim Demaille <akim@epita.fr>
9252
9253 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9254 yacc.c: be sure to stay within yycheck_.
9255 * tests/actions.at: Re-enable C++ tests.
9256
9257 2004-12-16 Akim Demaille <akim@epita.fr>
9258
9259 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9260 real.
9261
9262 2004-12-16 Akim Demaille <akim@epita.fr>
9263
9264 Use #define to handle the %name-prefix.
9265
9266 * data/glr.c, data/yacc.c: Comment changes.
9267 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9268 so that one can refer to yylex in the parser file, and have it
9269 renamed, as is the case with other skeletons.
9270
9271 2004-12-16 Akim Demaille <akim@epita.fr>
9272
9273 Move lalr1.cc internals into yy*.
9274
9275 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9276 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9277 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9278 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9279 (empty_, final_, terror_, errcode_, ntokens_)
9280 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9281 (looka_, ilooka_, error_range_, nerrs_):
9282 Rename as...
9283 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9284 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9285 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9286 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9287 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9288 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9289 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9290 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9291 these.
9292
9293 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9294
9295 Fix some problems reported by twlevo at xs4all.
9296 * src/symtab.c (symbol_new): Report an error if the input grammar
9297 contains too many symbols. This is better than calling abort() later.
9298 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9299 (struct node, struct graph):
9300 Rename member expand to stretch. All uses changed.
9301 (struct graph): Remove member layoutalgorithm. All uses removed.
9302 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9303 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9304 All uses changed.
9305 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9306
9307 2004-12-15 Akim Demaille <akim@epita.fr>
9308
9309 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9310 Add more Doxygen comments.
9311 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9312 (report_syntax_error_, translate_): Rename as...
9313 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9314 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9315
9316 2004-12-15 Akim Demaille <akim@epita.fr>
9317
9318 * data/lalr1.cc (lex_): Rename as...
9319 (yylex_): this.
9320 Move the trace here.
9321 Take the %name-prefix into account.
9322 Reported by Alexandre Duret-Lutz.
9323
9324 2004-12-15 Akim Demaille <akim@epita.fr>
9325
9326 Simplify the C++ parser constructor.
9327
9328 * data/lalr1.cc (debug_): Rename as...
9329 (yydebug_): so that the parser's internals are always in the yy*
9330 pseudo namespace.
9331 Adjust uses.
9332 (b4_parse_param_decl): Remove the leading comma as it is now only
9333 called as unique argument list.
9334 (Parser::Parser): Remove the constructor accepting a location and
9335 an initial debugging level.
9336 Remove from the other ctor the argument for the debugging level.
9337 (debug_level_type, debug_level, set_debug_level): New.
9338
9339 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9340 constructor calls.
9341
9342 2004-12-15 Akim Demaille <akim@epita.fr>
9343
9344 Remove b4_root related material: failure experiment
9345 (which goal was to allow to derive from a class).
9346
9347 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9348 definitions and uses.
9349
9350 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9351
9352 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9353 not 2, since it's not portable to subtract 1 from the start of an
9354 array. The new item 0 is never set or used. All uses changed.
9355
9356 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9357 the default definition of YYLLOC_DEFAULT. Problem reported
9358 by Frank Heckenbach.
9359
9360 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9361
9362 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9363 the normal case and one for the error case. Just use the
9364 first one uniformly. Problem reported by Frank Heckenbach.
9365 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9366 use exactly the same macro in both places.
9367 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9368 so that the normal-case YYRHSLOC works for the error case too.
9369 All uses changed.
9370 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9371 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9372 * doc/bison.texinfo (Location Default Action): Don't claim that
9373 we have an array of locations. Use the same macro for both glr
9374 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9375 the index is 0.
9376
9377 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9378
9379 * HACKING: Update email addresses to send announcements to.
9380
9381 * configure.ac (AC_INIT): Bump version to 1.875f.
9382
9383 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9384
9385 * NEWS: Version 1.875e.
9386 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9387
9388 * src/scan-skel.l: Include "complain.h", for "fatal".
9389
9390 * src/relation.h (relation_print, relation_digraph):
9391 Relation sizes are of type relation_node, not size_t (this is
9392 merely a doc fix, since the two types are equivalent).
9393 (relation_transpose): Relation sizes are of type relation_node,
9394 not int.
9395 * src/relation.c: Likewise.
9396 (top, infinity): Now of type relation_node, not int.
9397 (traverse, relation_transpose): Use relation_node, not int.
9398
9399 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9400 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9401 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9402
9403 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
9404 specifying whether the test should be skipped. Use it tp
9405 specify that the [%defines %skeleton "lalr1.cc"] tests currently
9406 fail on some hosts, and should be skipped.
9407
9408 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9409
9410 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9411 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9412 unless otherwise specified below.
9413
9414 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9415 to allocate kernel_base, kernel_items, kernel_size, since
9416 they needn't be initialized to 0.
9417 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9418 * src/closure.c (new_closure): Likewise, for itemset.
9419 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9420 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9421 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9422 (build_relations): Likewise for edge, states1, includes.
9423 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9424 * src/reader.c (packgram): Likewise, for ritem, rules.
9425 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9426 * src/relation.c (relation_digraph): Likewise for VERTICES.
9427 (relation_transpose): Likewise for new_R, end_R.
9428 * src/symtab.c (symbols_token_translations_init): Likewise for
9429 token_translations.
9430 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9431 (token_actions): Likewise for yydefact, actrow, conflrow,
9432 conflict_list.
9433 (save_column): Likewise for froms[symno], tos[symno].
9434 (goto_actions): Likewise for state_count.
9435 (pack_table): Likewise for base, pos, check.
9436 (tables_generate): Likewise for width.
9437
9438 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9439 for initial core. Just have a separate core, so we needn't worry
9440 about whether kernel_size and kernel_base are initialized.
9441
9442 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9443 kernel_size, kernel_items): Remove unnecessary initialization.
9444 * src/conflicts.c (conflicts): Likewise.
9445 * src/derives.c (derives): Likewise.
9446 * src/muscle_tablc (muscle_insert): Likewise.
9447 * src/relation.c (relation_digraph): Likewise.
9448 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9449 conflrow, conflict_table, conflict_list, table, check):
9450 Likewise.
9451
9452 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9453 This is because all callers pass unsigned int.
9454 * src/closure.h (new_closure): Likewise.
9455
9456 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9457 (build_relations): Initialize includes[i] in all cases.
9458 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9459 and rules[ruleno].precsym. Initialize members in order.
9460 * src/relation.c (relation_transpose): Always initialize new_R[i]
9461 and end_R[i].
9462 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9463
9464 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9465 conflict_list[0] was always 0, but now it isn't initialized.
9466
9467 * src/table.c (table_grow): When conflict_table grew, the grown
9468 area wasn't cleared. Fix this.
9469
9470 * lib/.cvsignore: Add strdup.c, strdup.h.
9471 * m4/.cvsignore: Add strdup.m4.
9472
9473 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9474
9475 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9476 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9477 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9478 ngotos + 1 without checking for overflow.
9479 (build_relations): Use END_NODE, not -1, to denote end of edges.
9480 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9481 build_relations): Use goto_number, not int, for goto numbers.
9482 * src/tables.c (save_column, default_goto): Likewise.
9483
9484 2004-11-23 Akim Demaille <akim@epita.fr>
9485
9486 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9487 of #defining from yystype.
9488 Don't typedef yystype, C++ does not need it.
9489 This lets it possible to forward declare it as union.
9490
9491 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9492
9493 * bootstrap (gnulib_modules): Add extensions.
9494 Problem reported by Jim Meyering.
9495
9496 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9497
9498 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9499 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9500 src/system.h, src/tables.c: XFREE -> free, to accommodate
9501 recent change to gnulib xalloc.h.
9502 Problem reported by Jim Meyering.
9503
9504 2004-11-17 Akim Demaille <akim@epita.fr>
9505
9506 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9507
9508 2004-11-17 Akim Demaille <akim@epita.fr>,
9509 Alexandre Duret-Lutz <adl@gnu.org>
9510
9511 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9512 changes.
9513 (YYCDEBUG): Adjust.
9514 Use it instead of cdebug_.
9515 (Parser::debug_stream, Parser::set_debug_stream): New.
9516 (Parser::symprint_): Define cdebug_ for temporary backward
9517 compatibility.
9518 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9519 debug_stream ().
9520
9521 2004-11-17 Akim Demaille <akim@epita.fr>
9522
9523 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9524 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9525 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9526 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9527
9528 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9529
9530 * data/glr.c (yyloc_default): Remove; not used.
9531 Problem reported by Frank Heckenbach.
9532
9533 2004-10-25 Akim Demaille <akim@epita.fr>
9534
9535 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9536 Introduce another definition to address simple location arrays.
9537 (yyGLRStack): New member: yyerror_range.
9538 (yyrecoverSyntaxError, yyparse): Update it.
9539 (yyrecoverSyntaxError): Use it when shifting the error token to
9540 have an accurate range, equivalent to the one computed by both
9541 yacc.c and lalr1.cc.
9542 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9543 that column numbers start at column 0, as per GNU Coding
9544 Standards, the others tests, and the doc.
9545 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9546 Adjust to the above change (first column is 0).
9547 And adjust the location of the "<error>", now covering the whole
9548 line.
9549
9550 2004-10-22 Akim Demaille <akim@epita.fr>
9551 and Paul Eggert <eggert@cs.ucla.edu>
9552
9553 Remove some arbitrary limits on goto numbers and relations.
9554 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9555 initial values, since they're never used.
9556 (set_goto_map): ngotos is now unsigned, so test for overflow
9557 by seeing whether it wraps around to zero.
9558 * src/lalr.h (goto_number): Now size_t, not short int.
9559 (GOTO_NUMBER_MAXIMUM): Remove.
9560 * src/relation.c (relation_print, traverse, relation_transpose):
9561 Check for END_NODE rather than looking at sign.
9562 * src/relation.h (END_NODE): New macro.
9563 (relation_node): Now size_t, not short int.
9564
9565 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9566
9567 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9568 keyword, not an identifier. Problem reported by Baron Schwartz in
9569 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9570
9571 2004-10-11 Akim Demaille <akim@epita.fr>
9572
9573 * src/symtab.c (symbol_check_alias_consistency): Also check
9574 type names, destructors, and printers.
9575 Reported by Alexandre Duret-Lutz.
9576 Recode the handling of associativity and precedence in terms
9577 of symbol_precedence_set.
9578 Accept no redeclaration at all, not even equal to the previous
9579 value.
9580 (redeclaration): New.
9581 Use it to factor redeclaration complaints.
9582 (symbol_make_alias): Don't set the type of the alias, let
9583 symbol_check_alias_consistency do it as for other features.
9584 * src/symtab.h (symbol): Add new member prec_location, and
9585 type_location.
9586 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9587 * tests/input.at (Incompatible Aliases): New.
9588
9589 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9590
9591 .cvsignore fixes to accommodate gnulib changes,
9592 and the practice of naming build directories "_build".
9593 * .cvsignore: Add "_*". Sort.
9594 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
9595 * m4/.cvsignore: Add "*_gl.m4".
9596
9597 2004-10-06 Akim Demaille <akim@epita.fr>
9598
9599 * src/parse-gram.y (add_param): Fix the truncation of trailing
9600 spaces.
9601
9602 2004-10-05 Akim Demaille <akim@epita.fr>
9603
9604 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
9605 whether the reducion was empty or not. This leaves room to
9606 improve the use of YYLLOC_DEFAULT in such a case.
9607 lalr1.cc is still experimental, so changing this is acceptable.
9608 And finally, there are probably not many users who changed the
9609 handling of locations in GLR, so changing is admissible too.
9610
9611 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
9612 empty reduction, set @$ to an empty location ending the previously
9613 stacked symbol.
9614 Adjust uses to make sure the code is triggered on empty
9615 reductions.
9616 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
9617 expected output: empty reductions have empty locations.
9618
9619 2004-09-29 Akim Demaille <akim@epita.fr>
9620
9621 * data/lalr1.cc: Move towards a more standard C++ coding style
9622 for templates: Class < T > -> Class<T>.
9623
9624 2004-09-29 Akim Demaille <akim@epita.fr>
9625
9626 * data/lalr1.cc: Reinstall the former ctor, for sake of
9627 compatibility, but warn it will be removed.
9628 Move towards a more standard C++ coding style (i.e., type *var ->
9629 type* var).
9630
9631 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
9632
9633 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
9634 since it's less likely to work if NULs are involved in the future.
9635
9636 2004-09-27 Akim Demaille <akim@epita.fr>
9637
9638 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
9639
9640 2004-09-27 Akim Demaille <akim@epita.fr>
9641
9642 * data/lalr1.cc (b4_parse_param_decl_1): New.
9643 (b4_parse_param_decl): Use it to have different names between attribute
9644 and argument names.
9645 (b4_cc_constructor_call): Likewise.
9646
9647 2004-09-24 Akim Demaille <akim@epita.fr>
9648
9649 * src/parse-gram.y (add_param): Strip the leading and trailing
9650 blanks from a formal argument declaration.
9651 (YY_LOCATION_PRINT): New.
9652
9653 2004-09-24 Akim Demaille <akim@epita.fr>
9654
9655 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
9656 after the location.
9657
9658 2004-09-24 Akim Demaille <akim@epita.fr>
9659
9660 * doc/bison.texinfo (Table of Symbols): Sort.
9661
9662 2004-09-21 Akim Demaille <akim@epita.fr>
9663
9664 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
9665 the useless parentheses.
9666 Suggested by Paul Eggert.
9667
9668 2004-09-20 Akim Demaille <akim@epita.fr>
9669
9670 Let the initial-action act on the look-ahead, and use it for the
9671 "initial push" (corresponding to an hypothetical beginning-of-file).
9672 And let lalr1.cc honor %initial-action.
9673
9674 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9675 example.
9676 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9677 (Parser::Parser): Remove the ctor that used to initialize it.
9678 (Parser::parse): Like in the other skeletons, issue the "starting
9679 parse" message before any action.
9680 Honor %initial-action.
9681 Initialize the stacks with the lookahead.
9682 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9683 look-ahead.
9684 Push them in the stacks.
9685 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
9686
9687 2004-09-20 Akim Demaille <akim@epita.fr>
9688
9689 * doc/bison.texinfo (Initial Action Decl): New.
9690
9691 2004-09-20 Akim Demaille <akim@epita.fr>
9692
9693 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
9694 clearer criterion to define it.
9695 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
9696 When reducing on an empty RHS, use the latest stacked location as
9697 location.
9698 yylloc is not always available.
9699 * data/glr.c: Likewise.
9700 Also, honor initial-actions.
9701
9702 2004-09-20 Akim Demaille <akim@epita.fr>
9703
9704 * data/yacc.c (YY_LOCATION_PRINT): New.
9705 Define when we know YYLTYPE's structure, i.e., when the default
9706 YYLLOC_DEFAULT is used.
9707 * data/c.m4 (b4_yysymprint_generate): Use it.
9708 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
9709 value of the result.
9710 (error_start_): Replace with...
9711 (error_range_): this location array.
9712 This allows to replace code relying on the implementation of
9713 locations by portable code.
9714 * data/yacc.c (yylerrsp): Replace with...
9715 (yyerror_range): this.
9716 Every time a token is popped, update yyerror_range[0], to have an
9717 accurate location for the error token.
9718 * data/glr.c (YY_LOCATION_PRINT): New.
9719 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
9720 deference a pointer.
9721 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
9722 report the location in %printers.
9723
9724 * src/scan-skel.l: Instead of abort, report error messages to ease
9725 understanding skeleton scanning failures.
9726
9727 2004-09-16 Akim Demaille <akim@epita.fr>
9728
9729 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
9730 (iterator, const_iterator): these, to be more in the C++ spirit.
9731 Also, return reverse iterators so that when displaying the stack
9732 we display its bottom first.
9733 (Parser::stack_print_, Parser::reduce_print_): Match the messages
9734 from yacc.c.
9735 We should probably use vector here though.
9736
9737 2004-09-16 Akim Demaille <akim@epita.fr>
9738
9739 Have more complete shift traces.
9740
9741 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
9742 to report Shifts instead of ad hoc YYDPRINTF invocations,
9743 including for the error token.
9744 * data/lalr1.cc (symprint_): Output the location.
9745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
9746 output the location within the %printer.
9747 Activate GLR tests, at least to make sure they compile properly.
9748 They still don't pass though.
9749 * tests/calc.at: Adjust expect verbose output, since now "Entering
9750 state..." is on a different line than the "Shifting" message.
9751
9752 2004-09-08 Akim Demaille <akim@epita.fr>
9753
9754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
9755 Bison directive from the Bison file to the invocation of this
9756 macro, so that these directives are passed to
9757 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
9758 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
9759 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
9760 the extra Bison directives instead of the whole series.
9761 Change the grammar so that there are recoverable errors, and
9762 unrecoverable errors. Now we can have the parser give up before
9763 consuming the whole input. As a result we now can observe that
9764 the lookahead is freed when needed.
9765 Change the parser source to parse argv[1] instead of a hard coded
9766 string.
9767 Simplify yylex, and give a value and location to EOF.
9768 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9769 passed directives already coded in the file.
9770 Add some tests to check the location of "error".
9771 For some tests, the C++ parser is correct, and not yacc.c.
9772 For other tests, they provide different, but unsatisfying, values,
9773 so keep the C++ value so that at least one parser is "correct"
9774 according to the test suite.
9775 (Actions after errors): Remove, this is subsumed by the
9776 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9777
9778 2004-09-06 Akim Demaille <akim@epita.fr>
9779
9780 * data/lalr1.cc: Adjust the indentation of the labels.
9781 (Parser::pop): New.
9782 Use it.
9783
9784 2004-09-06 Akim Demaille <akim@epita.fr>
9785
9786 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9787 argument, an informative message.
9788 Call YY_SYMBOL_PRINT.
9789 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9790 * data/lalr1.cc (destruct_): Likewise.
9791 In addition, no longer depend on b4_yysymprint_generate and
9792 b4_yydestruct_generate to generate these functions, do it "by
9793 hand".
9794
9795 2004-09-03 Akim Demaille <akim@epita.fr>
9796
9797 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9798 invoked, yydestruct the lookahead.
9799 * tests/calc.at (Calculator $1): Update the expected lengths of
9800 traces: there is an added line for the discarded lookahead.
9801 * doc/bison.texinfo (Destructor Decl): Some rewording.
9802 Define "discarded" symbols.
9803
9804 2004-09-02 Akim Demaille <akim@epita.fr>
9805
9806 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9807
9808 2004-09-02 Akim Demaille <akim@epita.fr>
9809
9810 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9811 (YYDSYMPRINTF): Rename as...
9812 (YY_SYMBOL_PRINT): this.
9813 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9814 two.
9815 Use it instead of direct symprint_ calls.
9816 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9817 one.
9818
9819 2004-09-02 Akim Demaille <akim@epita.fr>
9820
9821 * data/lalr1.cc (b4_yysymprint_generate): New.
9822 (symprint_): New member function, defined when YYDEBUG.
9823 Use it consistently instead of token/nterm debugging output by
9824 hand.
9825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9826 %printer calls to use cdebug_ when using lalr1.cc.
9827
9828 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9829
9830 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9831 with #ifdef YYDEBUG.
9832
9833 2004-08-26 Akim Demaille <akim@epita.fr>
9834
9835 * doc/bison.texinfo (Implementing Loops): Rename as...
9836 (Implementing Gotos/Loops): this.
9837
9838 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9839
9840 Adjust to latest gnulib.
9841 * bootstrap (gnulib_modules): Add xalloc-die.
9842 Set LC_ALL=C so that file names sort consistently.
9843 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9844 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9845 uintmax_t.m4, ulonglong.m4.
9846 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9847 po.m4 since we are now using _gl.m4 instead.
9848
9849 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9850
9851 * src/scan-action.l: Remove. Scanning of semantic actions is
9852 handled in scan-gram.l.
9853
9854 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9855
9856 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9857
9858 * src/location.h (struct): The file member is a uniqstr.
9859 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9860
9861 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9862
9863 Fix bug with non-%union parsers that have printers or destructors,
9864 which led to a Bison core dump. Reported by Peter Fales in
9865 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
9866
9867 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9868 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9869 not to our own type.
9870 * src/output.c (symbol_destructors_output, symbol_printers_output):
9871 Don't assume %union.
9872 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9873 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9874 UNION-FLAG. All callers changed.
9875 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9876 Use type char, not unsigned int, when declaring an array of char;
9877 this lets us remove a cast.
9878 (Printers and Destructors): Add non-%union test cases.
9879
9880 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9881
9882 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9883 GLR writeups. E.g., avoid frenchspacing and the future tense,
9884 change "lookahead" to "look-ahead", and change "wrt" to "with
9885 respect to".
9886
9887 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9888
9889 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9890 New sections, split off from the GLR Parsers section. Put the new
9891 Simple GLR Parser near the start of the GLR section, for clarity.
9892 Rewrite connective text.
9893
9894 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
9895
9896 * doc/bison.texinfo (Simple GLR Parsers): New section.
9897
9898 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9899
9900 * NEWS, TODO, doc/bison.texinfo:
9901 Use "look-ahead" instead of "lookahead", to be consistent.
9902 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9903 while we're fixing "look-ahead".
9904 * src/conflicts.c (shift_set): Renamed from shiftset.
9905 (look_ahead_set): Renamed from lookaheadset.
9906 * src/print.c: Likewise.
9907 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9908 name for "lookahead".
9909 (report_types, usage): Likewise.
9910 * src/getargs.h (report_look_ahead_tokens): Renamed from
9911 report_lookaheads.
9912 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9913 compute_lookaheads.
9914 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9915 (look_ahead_tokens_print): Renamed from lookaheads_print.
9916 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9917 state_rule_lookaheads_print.
9918 * src/state.h: Likewise.
9919 (reductions.look_ahead_tokens): Renamed from lookaheads.
9920 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9921 AT_DATA_LOOKAHEADS_GRAMMAR.
9922
9923 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9924
9925 * README: Update location of patched M4 distribution.
9926
9927 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9928
9929 Don't assume the C++ compiler takes the same arguments as the C compiler
9930 (trivial change).
9931 * configure.ac (O0CXXFLAGS): New var.
9932 * tests/atlocal.in (CXXFLAGS): Use it.
9933
9934 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9935
9936 Fix some "make check" problems with C++ reported by
9937 Albert Chin-A-Young for Tru64 C++ in this thread:
9938 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9939
9940 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9941 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9942 Output to a .cc file for C++, not to a .c file.
9943 * tests/calc.at (AT_CHECK_CALC): Likewise.
9944 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9945 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9946
9947 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9948
9949 * tests/calc.at, tests/actions.at: Workaround for SGI
9950 C++ compiler. (trivial change)
9951
9952 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 Spent a few hours checking out which prerequisite versions the
9955 current sources actually require. I went all the way back to
9956 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9957 a seemingly endless set of combinations of versions more recent
9958 than that. The bottom line is that the current sources require
9959 fairly recent versions of the build tools, and it'll be some work
9960 to change this.
9961 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9962 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9963 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9964 Add comments explaining why those particular versions are
9965 currently needed.
9966
9967 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9968 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
9969 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
9970
9971 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9972 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9973
9974 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9975
9976 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9977 0.11.5. Suggested by Bruno Haible.
9978 * bootstrap: Remove gettext version checking.
9979
9980 * doc/bison.texinfo (Decl Summary): Also mention that %union
9981 can depend on prerequisite types. Problem reported by Tim
9982 Van Holder.
9983
9984 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9985
9986 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9987 * README-alpha: Don't tell people not to package this.
9988
9989 * bootstrap: Don't assume $(...) works; use `...` instead.
9990 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9991 gettext better.
9992
9993 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9994 put into the -d output file, and mention what to do if YYSTYPE is
9995 defined as a macro.
9996
9997 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9998
9999 Undo change made earlier today: it caused autopoint to not bring
10000 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10001 autopoint's.
10002
10003 * bootstrap: Check that gettext version matches what's in
10004 configure.ac. Warn users to ignore robots.txt ERROR 404.
10005 * bootstrap: Undo today's earlier change (logged below).
10006 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
10007
10008 The gettext version checking is causing more trouble than it's
10009 curing; remove it. Problem reported by Paul Hilfinger.
10010
10011 * bootstrap: Issue a warning that one can expect a message
10012 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10013 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10014
10015 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10016
10017 Ensure that the C++ compiler used for testing actually works on a
10018 simple test program; if not, skip the C++-related tests. Problem
10019 reported by Vin Shelton in:
10020 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
10021
10022 * m4/cxx.m4: New file.
10023 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10024 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10025 * tests/local.at (AT_COMPILE_CXX): Use it.
10026
10027 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10028
10029 * data/glr.c (yylloc): Output this macro even if locations are not
10030 being generated, as the GLR parser needs it even in that case.
10031 Problem reported by Troy A. Johnson
10032 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10033
10034 * configure.ac (AC_INIT): Update to 1.875e.
10035
10036 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10037
10038 * NEWS: Version 1.875d.
10039 * configure.ac (AC_INIT): Likewise.
10040 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10041
10042 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10043 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10044 lalr1.cc runs afoul of the first, and the last two are no longer
10045 supported by GCC 3.4.0.
10046 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10047 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10048
10049 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10050
10051 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10052 unsigned int, for compatibility with latest gnulib hash module.
10053 * src/state.c (state_hash, state_hasher): Likewise.
10054 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10055 * src/uniqstr.c (hash_uniqstr): Likewise.
10056
10057 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10058
10059 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10060
10061 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10062 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10063 character and string literals.
10064 (unexpected_end): New function.
10065 (unexpected_eof): Use it.
10066 (unexpected_newline): New function.
10067 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10068 actions.
10069
10070 * NEWS: Document %expect-rr.
10071
10072 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10073 Fix typo by replacing $1 with $option.
10074 Remove more 'intl'-related files.
10075 Don't DEFUN AM_INTL_SUBDIR twice.
10076
10077 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10078 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10079 strtoul.c.
10080 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10081 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10082 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10083 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10084 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10085 * src/.cvsignore: Add *.output.
10086
10087 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10088 gets copied to the output file.
10089
10090 2004-04-28 Paul Eggert <eggert@twinsun.com>
10091
10092 Get files from the gnulib and po repositories, instead of relying
10093 on them being in our CVS. Upgrade to latest versions of gnulib
10094 and Automake.
10095
10096 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10097 * bootstrap: Bootstrap from gnulib and po repositories.
10098 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10099 * README-cvs: Document these changes. Remove version numbers from
10100 mentions of build tools, since they change so often. Mention Flex.
10101
10102 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10103 (gl_USE_SYSTEM_EXTENSIONS): Add.
10104 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10105 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10106 does this for us.
10107 (AC_ISC_POSIX): Remove; we no longer support this
10108 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10109 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10110 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10111 Do not check for C89 headers, except for locale.h which is used
10112 by the Yacc library and must port to K&R hosts.
10113 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10114 Do not check for C89 functions, except for setlocale which is
10115 used by the Yacc library.
10116 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10117 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10118 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10119 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10120 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10121 AM_GNU_GETTEXT): Remove; now done by:
10122 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10123 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10124 for us.
10125
10126 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10127 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10128 Define to empty, as gnulib.mk will do the rest for us.
10129 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10130 for us.
10131 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10132 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10133
10134 * src/files.c: Include gnulib's xstrndup.h.
10135
10136 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10137 (REALLOC): Use xnrealloc, for likewise.
10138 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10139 (strnlen, memrchr): Remove decls; functions no longer used.
10140 Include <stpcpy.h>.
10141
10142 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10143 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10144 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10145 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10146 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10147 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10148 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10149 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10150 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10151 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10152 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10153 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10154 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10155 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10156 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10157 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10158 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10159 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10160 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10161 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10162 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10163 Remove, as these files are now generated automatically
10164 by bootstrap or automake.
10165
10166 * po/ChangeLog: Remove: all but one entry was a duplicate
10167 of this file, and I moved that 2000-11-02 entry here.
10168
10169 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10170 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10171 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10172 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10173 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10174 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10175 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10176 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10177 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10178 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10179 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10180 xstrndup.h.
10181 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10182 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10183 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10184 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10185 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10186 * src/.cvsignore: Remove *_.c.
10187
10188
10189 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10190 support it. (The latest stable gzip doesn't.)
10191
10192 2004-04-27 Paul Eggert <eggert@twinsun.com>
10193
10194 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10195 case, as stos_ is now used by destructors due to the 2004-02-09
10196 change.
10197
10198 Remove more K&R C support.
10199 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10200 * lib/subpipe.c (errno): Remove decl.
10201 Include <stdlib.h> unconditionally.
10202 (EXIT_FAILURE): Remove macro.
10203 * src/complain.c (vfprintf, strerror): Remove.
10204 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10205 unconditionally.
10206 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10207 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10208 (strchr, strspn, memchr): Remove decls.
10209 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10210 unconditionally. Do not declare perror.
10211 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10212 unconditionally.
10213
10214 * src/complain.c (_): Remove useless defn, as system.h defines this.
10215
10216 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10217 with latest obstack.h.
10218 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10219 to procedure types, as obstack.h now does that for us.
10220 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10221
10222 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10223 so that this include file can stand alone.
10224 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10225 does this now. Include subpipe.h first after config.h, to
10226 test whether it can stand alone.
10227
10228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10229 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10230 unused declaration.
10231
10232 * tests/synclines.at (%union synch line): Put a dummy member in
10233 the union, because empty unions aren't allowed in C. Caught
10234 by GCC 3.4.0.
10235
10236 2004-04-13 Jim Meyering <jim@meyering.net>
10237
10238 * src/conflicts.c (conflicts_print): Correct format string typo:
10239 use `%%' to produce literal `%'. (trivial change)
10240
10241 2004-03-30 Paul Eggert <eggert@twinsun.com>
10242
10243 * src/getargs.c (version): Update copyright year to 2004.
10244
10245 * data/c.m4 (b4_int_type): Use 'short int' rather than
10246 'short', and similarly for 'long', 'unsigned', etc.
10247 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10248 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10249 yy_yypstack, yydumpstack): Likewise.
10250 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10251 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10252 Likewise.
10253 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10254 yy_stack_print, yyparse): Likewise.
10255 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10256 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10257 * lib/bitset.c (bitset_print): Likewise.
10258 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10259 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10260 * lib/bitsetv.c (bitsetv_dump): Likewise.
10261 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10262 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10263 Likewise.
10264 * src/LR0.c (allocate_itemsets): Likewise.
10265 * src/gram.h (rule_number, rule): Likewise.
10266 * src/lalr.h (goto_number): Likewise.
10267 * src/nullable.c (nullable_compute): Likewise.
10268 * src/output.c (prepare_rules): Likewise.
10269 * src/relation.c (relation_print, relation_digraph): Likewise.
10270 * src/relation.h (relation_node): Likewise.
10271 * src/state.h (state_number, transitions, errs, reductions,
10272 struct state): Likewise.
10273 * src/symtab.h (symbol_number, struct symbol): Likewise.
10274 * src/tables.c (vector_number, tally, action_number,
10275 default_goto, goto_actions): Likewise.
10276 * tests/existing.at (GNU Cim Grammar): Likewise.
10277 * tests/regression.at (Web2c Actions): Likewise.
10278
10279 * src/output.c (muscle_insert_short_int_table): Renamed from
10280 muscle_insert_short_table. All uses changed.
10281
10282 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10283
10284 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10285 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10286 Add %expect-rr rule.
10287
10288 * src/scan-gram.l: Recognize %expect-rr.
10289
10290 * src/conflicts.h (expected_sr_conflicts): Rename from
10291 expected_conflicts.
10292 (expected_rr_conflicts): Declare.
10293
10294 * src/conflicts.c (expected_sr_conflicts): Rename from
10295 expected_conflicts.
10296 (expected_rr_conflicts): Define.
10297 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10298 for GLR parsers.
10299 Use expected_sr_conflicts in place of expected_conflicts.
10300 Warn if expected_rr_conflicts used in non-GLR parser.
10301
10302 * doc/bison.texinfo: Add documentation for %expect-rr.
10303
10304 2004-03-08 Paul Eggert <eggert@gnu.org>
10305
10306 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10307 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10308
10309 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10310 in lalr1.cc.
10311 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10312 * src/scan-gram.l (scan_integer): New function.
10313 ({int}): Use it.
10314 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10315 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10316 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10317 Say "long int", not "long", for uniformity with GNU style.
10318
10319 2004-02-25 Paul Eggert <eggert@twinsun.com>
10320
10321 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10322 compilers. This fixes a problem with Intel's C++ compiler being
10323 chatty, reported by Guido Trentalancia in
10324 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10325
10326 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10327
10328 Support %destructor and merge error locations in lalr1.cc.
10329
10330 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10331 (Parser::stos_): Define unconditionally.
10332 (Parser::destruct_): New method. Generate its body with
10333 b4_yydestruct_generate.
10334 (Parser::error_start_): New attribute.
10335 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10336 token which are discarded.
10337 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10338 error_start_ when erroneous token are discarded.
10339 (Parser::parse) <yyerrlab1>: Compute the location of the error
10340 token so that it covers all the discarded tokens.
10341 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10342 it can be called with `%skeleton "lalr1.cc"', and do that.
10343
10344 2004-02-02 Paul Eggert <eggert@twinsun.com>
10345
10346 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10347 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10348 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10349 There's no need to mention top_builddir since Automake does that
10350 for us.
10351 (INCLUDES): Remove, as Automake says it's obsolescent.
10352 Contents migrated into AM_CPPFLAGS as described above.
10353 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10354
10355 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10356
10357 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10358 (yyreportSyntaxError): Handle case where lookahead token is
10359 YYEMPTY.
10360
10361 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10362
10363 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10364 resulting parsers are compilable with C++.
10365
10366 2003-12-23 Paul Eggert <eggert@twinsun.com>
10367
10368 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10369 * src/output.c (output_skeleton): Rename local var.
10370 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10371 Bison tokens, as this runs afoul of the 2003-10-07 change that
10372 disallowed NUL bytes in character constants or string literals.
10373
10374 * tests/local.at: Require Autoconf 2.59's Autotest.
10375 * tests/testsuite.at: Don't include local.at, since we now assume
10376 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10377 including it.
10378 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10379 multiple inclusion warnings.
10380
10381 2003-12-02 Akim Demaille <akim@epita.fr>
10382
10383 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10384 conditions.
10385 From Bruno Haible.
10386
10387 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10388
10389 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10390
10391 2003-10-07 Paul Eggert <eggert@twinsun.com>
10392
10393 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10394 if testsuite doesn't exist.
10395
10396 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10397 literals, unfortunately.
10398 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10399 Complain about NUL bytes in character constants or string literals.
10400
10401 2003-10-05 Paul Eggert <eggert@twinsun.com>
10402
10403 * NEWS: Don't document %no-default-prec, as it's still
10404 too experimental.
10405 * doc/bison.texinfo: Document %no-default-prec only if
10406 the defaultprec flag is set. Normally it's not.
10407
10408 2003-10-04 Paul Eggert <eggert@twinsun.com>
10409
10410 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10411 non-modifiable lvalue, instead of a modifiable one.
10412 * doc/bison.texinfo (Actions): Document that $$ can
10413 be assigned to. Do not claim that $$ and $N are
10414 array element references: user code should not rely on this.
10415
10416 2003-10-01 Paul Eggert <eggert@twinsun.com>
10417
10418 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10419 (grammar_declaration): Use it.
10420 * src/scan-gram.l: New token %no-default-prec.
10421 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10422 * NEWS, doc/bison.texinfo: Document the above.
10423
10424 2003-10-01 Akim Demaille <akim@epita.fr>
10425
10426 VCG no longer supports long_straight_phase.
10427
10428 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10429 * src/print_graph.c (print_graph): Adjust.
10430
10431 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
10432 and Paul Eggert <eggert@twinsun.com>
10433
10434 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10435 Table of Symbols): Document %default-prec.
10436 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10437 (grammar_declaration): Set default_prec on %default-prec.
10438 * src/scan-gram.l (%default-prec): New token.
10439 * src/reader.h (default_prec): New flag.
10440 * src/reader.c: Likewise.
10441 (packgram): Handle it.
10442 * tests/conflicts.at (%default-prec without %prec,
10443 %default-prec with %prec, %default-prec 1): New tests.
10444
10445 2003-09-30 Paul Eggert <eggert@twinsun.com>
10446
10447 * tests/testsuite.at: Include local.at, not input.at, fixing
10448 a typo in the 2003-08-25 patch.
10449
10450 2003-08-27 Akim Demaille <akim@epita.fr>
10451
10452 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10453 GCC warnings.
10454
10455 2003-08-26 Akim Demaille <akim@epita.fr>
10456
10457 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10458 "<\#" to avoid magic from Gnus when posting parts of this script.
10459
10460 2003-08-26 Akim Demaille <akim@epita.fr>
10461
10462 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10463 (Parser::parse): here.
10464 Adjust: nerrs and errstatus is now replaced by...
10465 (Parser::nerrs_, Parser::errstatus_): New.
10466
10467 2003-08-25 Akim Demaille <akim@epita.fr>
10468
10469 * config/announce-gen, Makefile.cfg: New.
10470 * Makefile.am: Adjust.
10471 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10472 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10473
10474 2003-08-25 Akim Demaille <akim@epita.fr>
10475
10476 When reducing initial empty rules, Bison parser read an initial
10477 location that is not defined. This results in garbage, and that
10478 affects Bison's own parser. Therefore we need (i) to extend Bison
10479 to support a means to initialize this location, and (ii) to use
10480 this CVS Bison to fix CVS Bison's parser.
10481
10482 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10483 with...
10484 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10485 * src/parse-gram.y: Adjust.
10486 (%initial-action): New.
10487 (%error-verbose): Since we require CVS Bison, there is no reason
10488 not to use it.
10489 * src/scan-gram.l: Adjust.
10490 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10491 * data/yacc.c (yyparse): Use b4_initial_action.
10492
10493 2003-08-25 Akim Demaille <akim@epita.fr>
10494
10495 * doc/bison.texinfo: Don't promote stdout for error messages.
10496
10497 2003-08-25 Akim Demaille <akim@epita.fr>
10498
10499 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10500 From Alexandre Duret-Lutz.
10501
10502 2003-08-25 Akim Demaille <akim@epita.fr>
10503
10504 Version 1.875c.
10505
10506 2003-08-25 Akim Demaille <akim@epita.fr>
10507
10508 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10509 Use them.
10510
10511 2003-08-25 Akim Demaille <akim@epita.fr>
10512
10513 * data/lalr1.cc (Parser::reduce_print_): New.
10514 Use it.
10515
10516 2003-08-25 Akim Demaille <akim@epita.fr>
10517
10518 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10519 error recovery loops. This patch is based on
10520 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
10521 Also, augment the similarity between lalr1.cc and yacc.c.
10522 Note: the locations of error recovery rules are not correct yet.
10523
10524 * data/lalr1.cc: Comment changes to augment the similarity between
10525 lalr1.cc and yacc.c.
10526 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10527 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10528 yyerrlab), when hitting EOF, pop the whole stack here instead of
10529 merely falling thru the default error handling mechanism.
10530 (yyerrorlab): New label, with the old contents of YYERROR,
10531 plus the following change: pop the stack of rhs corresponding
10532 to the production that invoked YYERROR. That is how Yacc
10533 behaves (required by POSIX).
10534 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10535 fail.
10536
10537 2003-08-25 Akim Demaille <akim@epita.fr>
10538
10539 Tune local.at so that people can "autom4te -l autotest calc.at -o
10540 calc" for instance, to extract a sub test suite.
10541
10542 * tests/testsuite.at: Move the initialization, Autotest version
10543 requirement, and AT_TESTED invocation into...
10544 * tests/local.at: here.
10545 * tests/testsuite.at: Include it for compatibility with Autoconf
10546 2.57.
10547 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10548 be ignore.
10549
10550 2003-08-04 Paul Eggert <eggert@twinsun.com>
10551
10552 Rework code slightly to avoid gcc -Wtraditional warnings.
10553 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10554 The returned value is now stored in *YY0. All callers changed.
10555 * src/output.c (merge_output): Adjust to the above change.
10556
10557 2003-07-26 Paul Eggert <eggert@twinsun.com>
10558
10559 * data/glr.c (YYASSERT): New macro.
10560 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10561 yyresolveStates, yyprocessOneStack):
10562 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10563 Derived from a suggestion by Frank Heckenbach.
10564
10565 2003-07-25 Paul Eggert <eggert@twinsun.com>
10566
10567 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10568 for portability to K&R C (after ansi2knr, presumably). See
10569 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
10570 by Frank Heckenbach, though I have omitted the structure-initialization
10571 part of his glr-knr.diff patch since I recall that the Portable
10572 C Compiler didn't require that change.
10573
10574 Let the user specify how to allocate and free memory.
10575 Derived from a suggestion by Frank Heckenbach in
10576 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
10577 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10578 All uses of free, malloc, realloc changed to use these macros,
10579 and unnecessary casts removed.
10580 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10581
10582 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10583
10584 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10585 use s.empty() rather than s == "" to test for empty string; see
10586 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
10587 (trivial change)
10588
10589 2003-06-25 Akim Demaille <akim@epita.fr>
10590
10591 * config/depcomp, config/install-sh: Update from masters.
10592
10593 2003-06-20 Paul Eggert <eggert@twinsun.com>
10594
10595 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
10596 and return properly parenthesized result.
10597 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10598 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10599 Remove unnecessary parentheses from uses.
10600 * doc/bison.texinfo (Location Default Action): Describe the
10601 conventions for parentheses.
10602
10603 2003-06-19 Paul Eggert <eggert@twinsun.com>
10604
10605 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
10606 yyreportTree): Do not assume that size_t is the same width as int,
10607 when printing sizes. Print sizes using an unsigned format.
10608 Problem reported by Frank Heckenbach in
10609 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
10610
10611 Port to Forte Developer 7 C compiler.
10612 * data/glr.c (struct YYLTYPE): If locations are not being used,
10613 declare a single dummy member, as empty structs do not conform
10614 to the C standard.
10615 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
10616 the Forte Developer 7 C compiler complains that end-of-loop
10617 code is not reached.
10618
10619 2003-06-17 Paul Eggert <eggert@twinsun.com>
10620
10621 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
10622 avoid warnings from picky compilers about redefinition of PARAMS.
10623
10624 2003-06-17 Paul Eggert <eggert@twinsun.com>
10625
10626 Version 1.875b.
10627
10628 * NEWS: Document 1.875b.
10629
10630 * lib/bbitset.h: Do not include config.h; that's the includer's job.
10631 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
10632 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
10633 Don't use 'index' in comments, as it's a builtin fn on some hosts.
10634 * lib/bitset_stats.c: Include gettext.h unconditionally, as
10635 per recent gettext manual's suggestion.
10636 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
10637 Use prototypes, not old-style definitions.
10638 * lib/lbitset.c (lbitset_unused_clear): Likewise.
10639 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
10640 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
10641 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
10642 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
10643 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
10644 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
10645 vbitset_or_and_cmp, vbitset_copy): Likewise.
10646
10647 * lib/libiberty.h: Do not include config.h; that's the includer's job.
10648 Do not include <stdlib.h>.
10649 (PARAMS): Define unconditionally for C89.
10650 (ATTRIBUTE_NORETURN): Remove.
10651 (ATTRIBUTE_UNUSED): Define unconditionally.
10652
10653 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
10654 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
10655 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
10656 * lib/vbitset.c, lib/vbitset.h: New files.
10657 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10658 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
10659 from libbitset.
10660
10661 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
10662 `How Can I Reset @code{yyparse}', since texinfo does not allow
10663 arbitrary @ in node names.
10664
10665 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
10666 shouldn't be needed according to the gettext 0.12.1 documentation
10667 but which seem to be needed anyway: codeset.m4 glibc21.m4
10668 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
10669 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
10670 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
10671
10672 * lib/.cvsignore: Add stdbool.h.
10673 * m4/.cvsignore: Add nls.m4, po.m4.
10674
10675 Upgrade to CVS gnulib.
10676 * stdbool_.h: File renamed from stdbool.h.in.
10677 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10678 AC_HEADER_STDBOOL.
10679 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10680 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10681 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10682 (MOSTLYCLEANFILES): New var.
10683 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10684 (stdbool.h): New rule.
10685 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
10686 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
10687 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
10688 m4/quote.m4: Upgrade to today's gnulib.
10689
10690 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
10691 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
10692 the tests right now.
10693 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
10694 yyerror are declared before use; C99 requires this.
10695
10696 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10697
10698 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
10699 first.
10700 (yyrecoverSyntaxError): Correct the logic for setting and testing
10701 yyerrState.
10702 Correct comment on handling EOF.
10703 Allow states with only a default reduction, rather than failing
10704 (I can't quite reconstruct why these were not allowed before).
10705
10706 Fixes to avoid problem that $-N rules in GLR parsers can cause
10707 buffer overruns, corrupting state.
10708
10709 * src/output.c (prepare_rules): Output max_left_semantic_context
10710 definition.
10711 * src/reader.h (max_left_semantic_context): New variable declaration.
10712 * src/scan-gram.l (max_left_semantic_context): Define.
10713 (handle_action_dollar): Update max_left_semantic_context.
10714 * data/glr.c (YYMAXLEFT): New definition.
10715 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
10716 (yyresolveAction): Ditto.
10717
10718 Fixes to problems with location handling in GLR parsers reported by
10719 Frank Heckenbach (2003/06/05).
10720
10721 * data/glr.c (YYLTYPE): Make trivial if locations not used.
10722 (YYRHSLOC): Add parentheses, and define only if locations used.
10723 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
10724 locations not used.
10725 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
10726 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
10727
10728 * tests/cxx-type.at: Exercise location information; update tests
10729 to differentiate output with and without locations.
10730 Remove forward declarations of yylex and yyerror---caused errors
10731 because default YYLTYPE not yet defined.
10732 Change semantic actions to compute strings, rather than printing
10733 them directly (to test proper passing of semantics values). Change
10734 output to prefix notation and update test data and expected results.
10735 (yylex): Track locations.
10736 (stmtMerge): Return value rather than printing, and include arguments
10737 in value.
10738
10739 2003-06-03 Paul Eggert <eggert@twinsun.com>
10740
10741 Avoid warnings generated by GCC 2.95.4 when Bison is
10742 configured with --enable-gcc-warnings.
10743 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
10744 yy::]b4_parser_class_name[::translate_,
10745 yy::Stack::operator[] (unsigned),
10746 yy::Stack::operator[] (unsigned) const,
10747 yy::Slice::operator[] (unsigned),
10748 yy::Slice::operator[] (unsigned) const):
10749 Rename local vars to avoid warnings.
10750 * tests/glr-regression.at (Improper handling of embedded actions
10751 and $-N in GLR parsers): Remove unused local variable from yylex.
10752 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
10753 (void) as arg when not pure, since we now assume C89 when building
10754 Bison. Pacify GCC by using parameter.
10755
10756 2003-06-02 Paul Eggert <eggert@twinsun.com>
10757
10758 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
10759 yy::Location::lines, yy::Location::columns): Rename arguments
10760 to avoid shadowing; this removes a warning generated by GCC 3.3.
10761
10762 2003-06-01 Paul Eggert <eggert@twinsun.com>
10763
10764 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10765 to g++, as GCC 3.3 complains if you do it.
10766 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10767 everything that WARNING_CFLAGS has, except omit warnings
10768 not suitable for C++.
10769 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10770 * tests/atlocal.in (CXXFLAGS): New var.
10771 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10772
10773 Fix a GLR parser bug I reported in February; see
10774 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
10775 The problem was that GLR parsers did not conform to the C standard,
10776 because actions like { $1 = $2 + $3; } expanded to expressions
10777 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10778 to a local variable. The C standard says that expressions
10779 like (var = f ()) + (var = f ()) have undefined behavior.
10780 Another problem was that GCC sometimes issues warnings that
10781 yyfill and its parameters are unused.
10782
10783 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10784 as possibly unused.
10785 (yyfill): New function.
10786 (YYFILL): Use it.
10787 (yyuserAction): Change type of yynormal to bool, so that it matches
10788 the new yyfill signature. Mark it as possibly unused.
10789
10790
10791 Follow up on a bug I reported in February, where a Bison-generated
10792 parser can loop. Provide a test case and a fix for yacc.c. I
10793 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10794 The original bug report is in:
10795 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
10796
10797 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10798 macro's size was becoming unwieldy.
10799 (yyerrlab): Do not discard an empty lookahead symbol, as this
10800 might destroy garbage.
10801 (yyerrorlab): New label, with the old contents of YYERROR,
10802 plus the following change: pop the stack of rhs corresponding
10803 to the production that invoked YYERROR. That is how Yacc
10804 behaves, and POSIX requires this behavior.
10805 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10806 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10807 Define 'alarm' to do nothing if unistd.h is not available.
10808 Add a new rule "exp: '-' error;" to test the above change to
10809 data/yacc.c. Use 'alarm' to abort any test taking longer than
10810 10 seconds, as it's probably looping.
10811 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10812 Also, the new yacc.c generates two fewer diagnostics for an
10813 existing test.
10814
10815 2003-05-24 Paul Eggert <eggert@twinsun.com>
10816
10817 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10818 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10819 This fixes a problem reported by John Bowman when the Compaq/HP
10820 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10821 -ansi -Wall -gall).
10822 * data/yacc.c (union yyalloc): Likewise.
10823 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
10824
10825 Switch from 'int' to 'bool' where that makes sense.
10826
10827 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10828 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10829 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10830 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10831 Return or accept bool, not int. All callers changed.
10832 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10833 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10834 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10835 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10836 bitset_or_and_cmp_): Likewise.
10837 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10838 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10839 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10840 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10841 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10842 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10843 bitset_stats_or_and_cmp): Likewise.
10844 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10845 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10846 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10847 ebitset_xor_cmp): Likewise.
10848 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10849 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10850 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10851 lbitset_xor_cmp): Likewise.
10852 * lib/bbitset.h: Include <stdbool.h>.
10853 (struct bitset_vtable): The following members now return bool, not
10854 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10855 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10856 or_and_cmp).
10857 * src/conflicts.c (count_rr_conflicts): Likewise.
10858 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10859 All uses changed.
10860 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10861 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10862 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10863 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10864 graph_flag): Likewise.
10865 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10866 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10867 graph_flag): Likewise.
10868 * src/output.c (error_verbose): Likewise.
10869 * src/output.h (error_verbose): Likewise.
10870 * src/reader.c (start_flag, typed): Likewise.
10871 * src/reader.h (typed): Likewise.
10872 * src/getargs.c (LOCATIONS_OPTION): New constant.
10873 (long_options, getargs): Use it.
10874 * src/lalr.c (build_relations): Use bool, not int.
10875 * src/nullable.c (nullable_compute): Likewise.
10876 * src/print.c (print_reductions): Likewise.
10877 * src/tables.c (action_row, pack_vector): Likewise.
10878 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10879 * src/output.c (prepare): Use it.
10880 * src/output.c (token_definitions_output,
10881 symbol_destructors_output, symbol_destructors_output): Use string,
10882 not boolean integer, to keep track of whether to output separator.
10883 * src/print_graph.c (print_core): Likewise.
10884 * src/state.c (state_rule_lookaheads_print): Likewise.
10885
10886 * config/install-sh: Sync from automake 1.7.5.
10887
10888 2003-05-14 Paul Eggert <eggert@twinsun.com>
10889
10890 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10891 semicolon after a grammar declaration, in the interest of possible
10892 future changes to the Bison input language.
10893 Do not allow a stray semicolon at the start of the grammar.
10894 (rhses.1): Allow one or more semicolons after any rule, including
10895 just before "|" as required by POSIX.
10896 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10897 grammar.
10898
10899 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10900
10901 %parse-param support for lalr1.cc.
10902
10903 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10904 b4_cc_constructor_calls, b4_cc_constructor_call,
10905 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10906 definitions.
10907 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10908 parse-param arguments.
10909 (yy::b4_parser_class_name): Declare instance variables to
10910 hold parse-param arguments.
10911 * tests/calc.at: s/value/semantic_value/ because value clashes
10912 with a member of yy::b4_parser_class_name. Adjust C++ code
10913 to handle %parse-param. Enable %parse-param test in C++.
10914
10915 2003-05-12 Paul Eggert <eggert@twinsun.com>
10916
10917 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10918 English a bit. Fix fclose typo. Change "const char" to "char
10919 const", and use ANSI C rather than K&R for "main". Suggest
10920 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10921 and suggest yy_switch_to_buffer.
10922
10923 2003-05-05 Paul Eggert <eggert@twinsun.com>
10924
10925 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10926 C89. This avoids a diagnostic on compilers that define __STDC__
10927 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
10928 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10929
10930 2003-05-03 Paul Eggert <eggert@twinsun.com>
10931
10932 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10933 Do not overrun array bounds.
10934 This should fix a bug reported today by Olatunji Oluwabukunmi in
10935 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
10936
10937 2003-04-29 Akim Demaille <akim@epita.fr>
10938
10939 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10940 * src/getargs.c, src/getargs.h: here, as bool, not int.
10941 (nondeterministic_parser): New.
10942 * src/parse-gram.y, src/scan-gram.l: Support
10943 %nondeterministic-parser.
10944 * src/output.c (prepare): Use nondeterministic_parser instead
10945 of glr_parser where appropriate.
10946 * src/tables.c (conflict_row, action_row, save_row)
10947 (token_actions, token_actions, pack_vector): Ditto.
10948
10949 2003-04-29 Akim Demaille <akim@epita.fr>
10950
10951 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10952
10953 2003-04-29 Akim Demaille <akim@epita.fr>
10954
10955 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10956 with %pure-parser and %locations to exercise the patch from Yakov
10957 Markovitch below.
10958
10959 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10960
10961 * data/yacc.c: (b4_lex_param): Corrected for the case where
10962 %lex-param is provided and %pure-parser isn't.
10963
10964 2003-04-27 Paul Eggert <eggert@twinsun.com>
10965
10966 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
10967 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
10968 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10969 if it is not defined.
10970 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10971
10972 2003-04-26 Paul Eggert <eggert@twinsun.com>
10973
10974 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10975 Declare to be of type suitable for the ninf value itself, not of
10976 type suitable for the corresponding table, since the latter might
10977 be unsigned but the ninf value might be negative. This fixes a
10978 bug reported by Alexandre Duret-Lutz in
10979 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
10980
10981 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10982 invokes it. We shouldn't invoke it twice because it will attempt
10983 to put error.o in the archive twice. This fixes a glitch reported
10984 by Martin Mokrejs in
10985 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10986
10987 2003-04-21 Paul Eggert <eggert@twinsun.com>
10988
10989 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10990 to gnulib.
10991
10992 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10993
10994 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10995 Fix obvious typo that results in uncompilable GLR parsers
10996 when both %pure-parser and %locations are used. (trivial change)
10997
10998 2003-04-17 Paul Eggert <eggert@twinsun.com>
10999
11000 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11001 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11002 Do not insert the expected token via unput, as this runs afoul
11003 of a POSIX-compatibility bug in flex 2.5.31.
11004 All uses changed to BEGIN the parent state,
11005 since we no longer insert the expected token via unput.
11006 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11007 that is no longer emitted after the above change.
11008
11009 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11010 the first one. This change is from Paul Hilfinger, and it fixes
11011 regression reported by Werner Lemberg in
11012 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
11013
11014 (resolve_sr_conflict): Don't invoke state_errs_set
11015 unless one or more tokens have been explicitly made errors.
11016 Otherwise, the above change causes Bison to abort.
11017
11018 * tests/existing.at (GNU pic Grammar): New test case, taken from
11019 Lemberg's email.
11020
11021 2003-03-31 Akim Demaille <akim@epita.fr>
11022
11023 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11024
11025 2003-03-31 Akim Demaille <akim@epita.fr>
11026
11027 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11028 output.
11029
11030 2003-03-31 Akim Demaille <akim@epita.fr>
11031
11032 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11033 From Paul Hilfinger.
11034
11035 2003-03-29 Akim Demaille <akim@epita.fr>
11036
11037 * m4/error.m4: Do not put under dynamic conditions some code which
11038 expansion is under static control.
11039
11040 2003-03-29 Akim Demaille <akim@epita.fr>
11041
11042 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11043
11044 2003-03-29 Akim Demaille <akim@epita.fr>
11045
11046 * doc/bison.texinfo (Strings are Destroyed): New.
11047
11048 2003-03-13 Paul Eggert <eggert@twinsun.com>
11049
11050 * .cvsignore: Add configure.lineno.
11051 * src/.cvsignore: Add yacc.
11052 * tests/.cvsignore: Add testsuite.log.
11053 * doc/fdl.texi: Sync with latest FSF version.
11054
11055 2003-03-12 Paul Eggert <eggert@twinsun.com>
11056
11057 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11058 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11059 cursor, instead of leaving it undefined. This fixes a bug
11060 reported by Tim Van Holder in
11061 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11062 * tests/input.at (Torturing the Scanner): Test the scanner on
11063 an empty input file, which was Tim Van Holder's test case.
11064
11065 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11066 <sys/resource.h> can be included, include sys/time.h and
11067 sys/times.h first, if available. This works around the SunOS
11068 4.1.4 porting bug reported by Bruce Becker in
11069 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11070
11071 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11072 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11073 AC_HEADER_SYS_WAIT.
11074
11075 Merge changes from gnulib. This was prompted because the CVS
11076 snapshot didn't build on Solaris 7 due to strnlen problems.
11077
11078 These changes need to be merged back into gnulib:
11079 * lib/hash.c: Include <stdbool.h> unconditionally.
11080 * m4/onceonly.m4 (m4_quote): New macro.
11081 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11082 Quote AC_FOREACH variable-expansions properly.
11083 The 2003-01-03 obstack.h change also needs merging.
11084 {end of changes requiring merging}
11085
11086 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11087 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11088 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11089 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11090 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11091 New files, imported from gnulib.
11092 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11093 above.
11094
11095 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11096 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11097 gnulib sources.
11098
11099 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11100 Add.
11101 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11102 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11103 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11104 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11105 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11106 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11107 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11108 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11109 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11110 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11111 (jm_PREREQ_ARGMATCH): Remove.
11112 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11113 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11114
11115 * src/system.h: Include <stdbool.h> unconditionally.
11116
11117 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11118 assuming at least C89 in the bitset code for some time now.
11119
11120 2003-03-03 Akim Demaille <akim@epita.fr>
11121
11122 * ro.po: New.
11123
11124 2003-03-02 Akim Demaille <akim@epita.fr>
11125
11126 * doc/bison.texinfo (Table of Symbols): Reactivate the
11127 documentation for %lex-param, and %parse-param.
11128
11129 2003-03-02 Akim Demaille <akim@epita.fr>
11130
11131 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11132 generate verbose error messages.
11133 Use the number of tokens as an upper bound in yytname, as it
11134 cannot be a non terminal.
11135
11136 2003-03-02 Akim Demaille <akim@epita.fr>
11137
11138 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11139 message.
11140
11141 2003-03-02 Akim Demaille <akim@epita.fr>
11142
11143 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11144 Use them to exercise yycheck overrun.
11145 Based on Andrew Suffield's grammar.
11146
11147 2003-03-02 Akim Demaille <akim@epita.fr>
11148
11149 Create tests/local.at for Bison generic testing macros.
11150
11151 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11152 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11153 This new file.
11154 * tests/calc.at (AT_CHECK_CALC): Adjust.
11155 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11156 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11157 * tests/local.at: here.
11158 (AT_COMPILE_CXX): Tags the tests using it as c++.
11159 Ignore the test if CXX is not functional.
11160
11161 2003-03-01 Paul Eggert <eggert@twinsun.com>
11162
11163 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11164 not loc->end, since loc->end might contain garbage and this leads
11165 to undefined behavior on some platforms.
11166 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11167 depend on *loc, so that the reader doesn't give the the false
11168 impression that *loc is initialized.
11169 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11170 does not survive the return.
11171
11172 2003-03-01 Akim Demaille <akim@epita.fr>
11173
11174 * src/scan-gram.l (code_start): Always initialize it when entering
11175 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11176 yylex invocation. An alternative would be making it static, but
11177 then it starts with the second %%'s beginning, instead of its end.
11178
11179 2003-02-28 Paul Eggert <eggert@twinsun.com>
11180
11181 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11182 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11183 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11184
11185 2003-02-26 Paul Eggert <eggert@twinsun.com>
11186
11187 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11188 Remove Sequent/Pyramid discussion (nobody uses them any more).
11189 Merge VMS and MS-DOS discussion; these ports may well be dead
11190 but let's keep mentioning them for now. Put <> around email
11191 addresses. Add copyright notice.
11192
11193 2003-02-24 Paul Eggert <eggert@twinsun.com>
11194
11195 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11196 to avoid collision with flex use of yylineno.
11197 Problem reported by Bruce Lilly in
11198 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11199 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11200 * data/yacc.c (yy_reduce_print): Likewise.
11201
11202 * config/depcomp: Sync with Automake 1.7.3.
11203
11204 2003-02-21 Akim Demaille <akim@epita.fr>
11205
11206 * data/lalr1.cc: Use temporary variables instead of casts to
11207 change integer types.
11208 Suggested by Paul Eggert.
11209
11210 2003-02-21 Akim Demaille <akim@epita.fr>
11211
11212 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11213 to avoid confusions with lalr1.cc's notion of Position.
11214 Suggested by Paul Eggert.
11215
11216 2003-02-20 Akim Demaille <akim@epita.fr>
11217
11218 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11219 before initial_columns.
11220 (location.hh): Use consistent variable names when defining the
11221 operator<<.
11222 Use "last" so that we subtract from Positions, not from unsigned.
11223
11224 2003-02-20 Akim Demaille <akim@epita.fr>
11225
11226 * data/lalr1.cc (position.hh): New subfile, including the extended
11227 and Doxygen'ed documentation of class Position.
11228 (location.hh): Use it.
11229 Document a` la Doxygen.
11230 With the help of Benoit Perrot.
11231
11232 2003-02-20 Akim Demaille <akim@epita.fr>
11233
11234 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11235 AT_YACC_IF.
11236 Redefine AT_YYERROR_SEES_LOC_IF using it.
11237 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11238 not defined.
11239 Don't use the location in yy::Parser::error_ and
11240 yy::Parser::print_ when not %locations.
11241 Activate more lalr1.cc tests.
11242
11243 2003-02-19 Akim Demaille <akim@epita.fr>
11244
11245 * data/lalr1.cc: When displaying a line number, be sure to make it
11246 an int.
11247
11248 2003-02-19 Akim Demaille <akim@epita.fr>
11249
11250 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11251 Remove, useless.
11252 (YYABORT, YYACCEPT, YYERROR): New.
11253 * tests/calc.at: Renable the lalr1.cc test.
11254
11255 2003-02-19 Akim Demaille <akim@epita.fr>
11256
11257 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11258 error recovery, mixing with/without pops and discarding of the
11259 lookahead.
11260 Exercise YYERROR.
11261 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11262
11263 2003-02-17 Paul Eggert <eggert@twinsun.com>
11264
11265 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11266 * tests/testsuite.at (AT_COMPILE): Use them.
11267 This fixes the testsuite problem reported by Robert Lentz in
11268 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11269
11270 2003-02-12 Paul Eggert <eggert@twinsun.com>
11271
11272 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11273 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11274 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11275 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11276 Check for malloc failure, for consistency with yacc.c.
11277 (yytname_size): Remove, for consistency with yacc.c.
11278
11279 The bug still remains in data/lalr1.cc, as I didn't have time
11280 to fix it there.
11281
11282 2003-02-06 Akim Demaille <akim@epita.fr>
11283
11284 * configure.ac (GXX): Rename as...
11285 (CXX): this, to keep the original Autoconf semantics.
11286 Require 2.57.
11287 * data/lalr1.cc: Fix b4_copyright invocations.
11288 If YYDEBUG is not defined, don't depend upon name_ being defined.
11289 (location.hh): Include string and iostream.
11290 (Position::filename): New member.
11291 (Position::Position ()): New.
11292 (operator<< (Position)): New.
11293 (operator- (Position, int)): New.
11294 (Location::first, Location::last): Rename as...
11295 (Location::begin, Location::end): these, to mock the conventional
11296 iterator names.
11297 (operator<< (Location)): New.
11298 * tests/atlocal.in (CXX): New.
11299 * tests/testsuite.at (AT_COMPILE_CXX): New.
11300 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11301 locations in a more synthetic way.
11302 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11303 lalr1.cc is used.
11304 Adjust the C locations to match those from Emacs: first column is
11305 column 0.
11306 Change all the expected results.
11307 Conform to the GCS: simplify the locations when applicable.
11308 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11309 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11310 these CPP macros with the m4 macros new defined by...
11311 (AT_CHECK_PUSHDEFS): this, i.e.:
11312 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11313 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11314 New macros.
11315 (AT_CHECK_POPDEFS): Undefine them.
11316 (AT_CHECK_CALC_LALR1_CC): New.
11317 Use it for the first lalr1.cc test.
11318
11319 2003-02-04 Akim Demaille <akim@epita.fr>
11320
11321 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11322 Location as is defined.
11323
11324 2003-02-04 Akim Demaille <akim@epita.fr>
11325
11326 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11327 name_ being defined.
11328
11329 2003-02-03 Paul Eggert <eggert@twinsun.com>
11330
11331 * src/gram.h (start_symbol): Remove unused decl.
11332
11333 Use more-consistent naming conventions for local vars.
11334
11335 * src/derives.c (derives_compute): Change type of local var from
11336 int to rule_number.
11337 * src/gram.c (grammar_rules_partial_print): Likewise.
11338 * src/print.c (print_core): Likewise.
11339 * src/reduce.c (reduce_grammar_tables): Likewise.
11340
11341 * src/gram.c (grammar_dump): Change name of item_number *
11342 local var from r to rp.
11343 * src/nullable.c (nullable_compute): Likewise.
11344
11345 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11346
11347 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11348 for symbol or symbol_number var.
11349 * src/reader.c (grammar_start_symbol_set): Likewise.
11350 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11351 Likewise.
11352 * src/state.c (transitions_to): Likewise.
11353 * src/state.h: Likewise.
11354 * src/tables.c (symbol_number_to_vector_number): Likewise.
11355
11356 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11357 char * var.
11358
11359 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11360 var.
11361
11362 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11363 var.
11364
11365 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11366 Use str, not s, for char * var. Use ch, not c, for character var.
11367 Use size for size var.
11368
11369 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11370 char * var.
11371 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11372 uniqstr var.
11373 * src/uniqstr.h: Likewise.
11374
11375 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11376 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11377 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11378 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11379 param to have same name as that of enum, so that we don't use
11380 "s" to stand for a non-state.
11381
11382 2003-02-02 Akim Demaille <akim@epita.fr>
11383
11384 * src/scan-skel.l: Scan more than one inert character per yylex
11385 invocation.
11386
11387 2003-02-01 Paul Eggert <eggert@twinsun.com>
11388
11389 Version 1.875a.
11390
11391 * po/LINGUAS: Add ms.
11392
11393 2003-01-30 Akim Demaille <akim@epita.fr>
11394
11395 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11396
11397 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11398
11399 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11400 of $1.
11401
11402 Changes in response to error report by S. Eken: GLR mode does not
11403 handle negative $ indices or $ indices in embedded rules correctly.
11404 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
11405
11406 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11407 (b4_rhs_location): Ditto.
11408 (yyfill): New function to copy from stack tree into array
11409 incrementally.
11410 (yyuserAction): Modify to allow incremental move of semantic values
11411 to rhs array when in GLR mode.
11412 Define YYFILL to use in user-defined actions to fill semantic array
11413 as needed.
11414 Remove dummy use of yystack, as there is now a guaranteed use.
11415 (yydoAction): Modify to allow incremental move of semantic values
11416 to rhs array when in GLR mode.
11417 (yyresolveAction): Ditto.
11418 (yyglrShiftDefer): Update comment.
11419 (yyresolveStates): Use X == NULL for pointers, not !X.
11420 (yyglrReduce): Ditto.
11421 (yydoAction): Ditto
11422
11423 * tests/glr-regr1.at: Rename to ...
11424 * tests/glr-regression.at: Add new regression test for the problems
11425 described above (adapted from S. Eken).
11426 Update copyright notice.
11427 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11428 * tests/Makefile.am: Ditto.
11429
11430 2003-01-28 Paul Eggert <eggert@twinsun.com>
11431
11432 * data/lalr1.cc: Do not use @output_header_name@ unless
11433 b4_defines_flag is set. This fixes two bugs reported by
11434 Tim Van Holder in
11435 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11436 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
11437
11438 2003-01-21 Paul Eggert <eggert@twinsun.com>
11439
11440 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11441 we don't need to worry about yyerrlab1 being reported as an
11442 "unused label" by non-GCC C compilers. The downside is that if
11443 locations are used then a couple of statements are duplicated each
11444 time YYERROR is invoked, but the upside is that the warnings
11445 should vanish.
11446 (yyerrlab1): Move code to YERROR.
11447 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11448 This reverts some of the 2002-12-27 change.
11449
11450 2003-01-17 Paul Eggert <eggert@twinsun.com>
11451
11452 * src/output.c (symbol_printers_output): Fix typo that led
11453 to core dump. Problem reported by Antonio Rus in
11454 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
11455
11456 2003-01-13 Akim Demaille <akim@epita.fr>,
11457 Quoc Peyrot <chojin@lrde.epita.fr>,
11458 Robert Anisko <anisko_r@lrde.epita.fr>
11459
11460 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11461 when the stacks contain one element, as the loop would otherwise
11462 free the last state, and then use the top state (the one we just
11463 popped). This means that the initial elements will not be freed
11464 explicitly, as is the case in yacc.c; it is not a problem, as
11465 these elements have fake values.
11466
11467 2003-01-11 Paul Eggert <eggert@twinsun.com>
11468
11469 * NEWS: %expect-violations are now just warnings, reverting
11470 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11471 bootstrapping problem reported by Matthias Klose; see
11472 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
11473 * src/conflicts.c (conflicts_print): Likewise.
11474 * tests/conflicts.at (%expect not enough, %expect too much,
11475 %expect with reduce conflicts): Likewise.
11476 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11477 that the warning is enabled if the number of conflicts changes
11478 (not necessarily increases).
11479
11480 * src/getargs.c (version): Update copyright year.
11481
11482 2003-01-09 Akim Demaille <akim@epita.fr>
11483
11484 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11485
11486 2003-01-08 Paul Eggert <eggert@twinsun.com>
11487
11488 * Makefile.maint (WGETFLAGS):
11489 New macro, containing "-C off" to disable proxy caches.
11490 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11491 (rel-check): Use $(WGET) instead of wget.
11492
11493 2003-01-06 Paul Eggert <eggert@twinsun.com>
11494
11495 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11496 the GLR paper of Scott, Johnstone and Hussain.
11497
11498 2003-01-04 Paul Eggert <eggert@twinsun.com>
11499
11500 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11501 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11502 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11503 (EXTRA_LIBRARIES): New var, for liby.a.
11504 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11505 (EXTRA_SCRIPTS): New var, for yacc.
11506
11507 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11508 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11509 Problem reported by Nelson H. F. Beebe.
11510
11511 2003-01-03 Paul Eggert <eggert@twinsun.com>
11512
11513 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11514 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11515 when compiling Bison 1.875's `bitset bset = obstack_alloc
11516 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11517
11518 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11519 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11520 grow to a huge size with typical invocation.
11521
11522 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11523 Use the pattern recommended by Autoconf 2.57, except also protect
11524 against double-definition.
11525 * src/system.h: Likewise.
11526 Portability issues reported by Nelson H. F. Beebe.
11527
11528 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11529 All uses changed. Provide a definition in both C and C++.
11530 (yytrue, yyfalse): Define even if defined (__cplusplus).
11531
11532 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11533 Reported by Nelson H. F. Beebe.
11534
11535 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11536
11537 2003-01-02 Paul Eggert <eggert@twinsun.com>
11538
11539 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11540 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11541 Bug reported by Nelson H. F. Beebe.
11542
11543 2003-01-01 Paul Eggert <eggert@twinsun.com>
11544
11545 * Version 1.875.
11546
11547 2002-12-30 Paul Eggert <eggert@twinsun.com>
11548
11549 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11550 Moved here from...
11551 (<INITIAL>","): Here. This causes stray "," to be treated
11552 more uniformly.
11553
11554 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
11555 last brace in braced code when not in Yacc mode, for compatibility
11556 with Bison 1.35. This resurrects the 2001-12-15 patch to
11557 src/reader.c.
11558
11559 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11560 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11561
11562 2002-12-28 Paul Eggert <eggert@twinsun.com>
11563
11564 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11565 that of SYM's type. This fixes Debian bug 168069, reported by
11566 Thomas Olsson.
11567
11568 2002-12-28 Paul Eggert <eggert@twinsun.com>
11569
11570 Version 1.75f.
11571
11572 Switch back to the Yacc style of conflict reports, undoing some
11573 of the 2002-07-30 change.
11574 * doc/bison.texinfo (Understanding): Use Yacc style for
11575 conflict reports. Also, use new way of locating rules.
11576 * src/conflicts.c (conflict_report):
11577 Renamed from conflict_report_yacc, removing the old
11578 'conflict_report'. Translate the entire conflict report at once,
11579 so that we don't assume that "," has the same interpretation in
11580 all languages.
11581 (conflicts_output): Use Yacc-style conflict report for each state,
11582 instead of our more-complicated style.
11583 (conflicts_print): Use Yacc-style conflict report, except print
11584 the input file name when not emulating Yacc.
11585 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11586 Conflicted Reduction, %expect not enough, %expect too much,
11587 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11588 * tests/existing.at (GNU Cim Grammar): Likewise.
11589 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11590
11591 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11592 fatal): Don't invoke fflush; it's not needed and it might even be
11593 harmful for stdout, as stdout might not be open.
11594 * src/reduce.c (reduce_print): Likewise.
11595
11596 2002-12-27 Paul Eggert <eggert@twinsun.com>
11597
11598 Fix a bug where error locations were not being recorded correctly.
11599 This problem was originally reported by Paul Hilfinger in
11600 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
11601
11602 * data/yacc.c (yyparse): New local var yylerrsp, to record the
11603 top of the location stack's error locations.
11604 (yyerrlab): Set it. When discarding a token, push its location
11605 onto yylerrsp so that we don't lose track of the error's end.
11606 (yyerrlab1): Now is only the target of YYERROR, so that we can
11607 properly record the location of the action that failed. For GCC
11608 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
11609 GCC warning about yyerrlab1 being unused if YYERROR is unused.
11610 (yyerrlab2): New label, which yyerrlab now falls through to.
11611 Compute the error's location by applying YYLLOC_DEFAULT to
11612 the locations of all the symbols that went into the error.
11613 * doc/bison.texinfo (Location Default Action): Mention that
11614 YYLLOC_DEFAULT is also invoked for syntax errors.
11615 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11616 Error locations include the locations of all the tokens that were
11617 discarded, not just the last token.
11618
11619 2002-12-26 Paul Eggert <eggert@twinsun.com>
11620
11621 * src/files.c: Include quote.h.
11622 (compute_output_file_names): Warn if we detect conflicting
11623 outputs to the same file. This should catch the misunderstanding
11624 exemplified by Debian Bug 165349, reported by Bruce Stephens..
11625
11626 * src/conflicts.c (conflicts_print): If the user specifies
11627 "%expect N", report an error if there are any reduce/reduce
11628 conflicts. This is what the manual says should happen.
11629 This fixes Debian bug 130890, reported by Anthony DeRobertis.
11630 * tests/conflicts.at (%expect with reduce conflicts): New test.
11631
11632 Don't use m4_include on relative file names, as it doesn't work as
11633 desired if there happens to be a file with that name under ".".
11634
11635 * m4sugar/version.m4: Remove; it was included but it wasn't used.
11636 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
11637 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
11638 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
11639 * src/output.c (output_skeleton): Use full path names when
11640 specifying a file to include; don't rely on include path, as
11641 it's unreliable when the working file contains a file with
11642 that name.
11643
11644 2002-12-25 Paul Eggert <eggert@twinsun.com>
11645
11646 Remove obsolete references to bison.simple and bison.hairy.
11647 Problem mentioned by Aubin Mahe in
11648 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
11649 * data/glr.c: Comment fix.
11650 * doc/bison.1: Remove references. Also, mention "yacc".
11651
11652 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
11653 with -g option.
11654
11655 * src/parse-gram.y (declaration): Use enum "report_states" rather
11656 than its numeric value 1.
11657
11658 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
11659 opening a new one. This fixes Debian bug 165349, reported by
11660 Bruce Stephens.
11661
11662 2002-12-24 Paul Eggert <eggert@twinsun.com>
11663
11664 Version 1.75e.
11665
11666 * Makefile.maint (cvs-update): Don't assume that the shell
11667 supports $(...), as Solaris sh doesn't.
11668
11669 * src/parse-gram.y (lloc_default): Remove test for empty
11670 nonterminals at the end, since it didn't change the result.
11671
11672 2002-12-24 Paul Eggert <eggert@twinsun.com>
11673
11674 If the user does not define YYSTYPE as a macro, Bison now declares it
11675 using typedef instead of defining it as a macro. POSIX requires this.
11676 For consistency, YYLTYPE is also declared instead of defined.
11677
11678 %union directives can now have a tag before the `{', e.g., the
11679 directive `%union foo {...}' now generates the C code
11680 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11681 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11682 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11683 instead of `yyltype'.
11684
11685 `yystype' and `yyltype' are now obsolescent macros instead of being
11686 typedefs or tags; they are no longer documented and will be
11687 withdrawn in a future release.
11688
11689 * data/glr.c (b4_location_type): Remove.
11690 (YYSTYPE): Renamed from yystype.
11691 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
11692 (struct YYLTYPE): Renamed from struct yyltype.
11693 (YYLTYPE): Renamed from yyltype.
11694 (yyltype, yystype): New (and obsolescent) macros,
11695 for backward compatibility.
11696 * data/yacc.c: Likewise.
11697
11698 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
11699 does not specify a union tag. This is for compatibility with
11700 Solaris 9 yacc.
11701
11702 * src/parse-gram.y (add_param): 2nd arg is now char * not char
11703 const *, since it is now modified by stripping surrounding { }.
11704 (current_braced_code): Remove.
11705 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
11706 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
11707 trailing " {...}". Now of type <chars>.
11708 (grammar_declaration): Adjust to bundled tokens.
11709 (code_content): Remove; stripping is now done by add_param.
11710 (print_token_value): Print contents of bundled tokens.
11711 (token_name): New function.
11712
11713 * src/reader.h (braced_code, current_braced_code): Remove.
11714 (token_name): New decl.
11715
11716 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
11717 token_type, not braced_code code_kind. All uses changed.
11718 (SC_PRE_CODE): New state, for scanning after a keyword that
11719 has (or usually has) an immediately-following braced code.
11720 (token_type): New local var, to keep track of which token type
11721 to return when scanning braced code.
11722 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
11723 <INITIAL>"%parse-param", <INITIAL>"%printer",
11724 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
11725 instead of returning a token type immediately.
11726 (<INITIAL>"{"): Set token type.
11727 (<SC_BRACED_CODE>"}"): Use it.
11728 (handle_action_dollar, handle_action_at): Now returns bool
11729 indicating success. Fail if ! current_rule; this prevents a core dump.
11730 (handle_symbol_code_dollar, handle_symbol_code_at):
11731 Remove; merge body into caller.
11732 (handle_dollar, handle_at): Complain in invalid contexts.
11733
11734 * NEWS, doc/bison.texinfo: Document the above.
11735 * NEWS: Fix years and program names in copyright notice.
11736
11737 2002-12-17 Paul Eggert <eggert@twinsun.com>
11738
11739 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
11740 Reporting, Table of Symbols): Omit mentions of %lex-param and
11741 %parse-param from the documentation for now.
11742
11743 2002-12-15 Paul Eggert <eggert@twinsun.com>
11744
11745 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
11746 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
11747 lookahead symbol, and which sets yychar in parser actions) and it
11748 disagreed with the Bison documentation. Bug
11749 reported by Andrew Walrond.
11750
11751 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
11752 as the caller now does that.
11753 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
11754 (YYEMPTY): Parenthesize right hand side, since others use it.
11755 (yyparse): Don't assume that our generated code is the only code
11756 that sets yychar.
11757
11758 2002-12-13 Paul Eggert <eggert@twinsun.com>
11759
11760 Version 1.75d.
11761
11762 POSIX requires a "yacc" command.
11763 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11764 (MOSTLYCLEANFILES): Add yacc.
11765 (yacc): New rule.
11766 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
11767 as an alias for bison y.
11768
11769 * po/LINGUAS: Add da.
11770
11771 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11772 problem with latest <getopt.h>.
11773 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11774
11775 * doc/fdl.texi: Upgrade to 1.2.
11776 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11777 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11778 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11779 gnulib.
11780 * config/install-sh: Sync with autotools.
11781
11782 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
11783 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11784 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11785 locations are requested.
11786 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11787 locations are requested.
11788
11789 2002-12-12 Paul Eggert <eggert@twinsun.com>
11790
11791 Remove unportable casts and storage allocation tricks.
11792 While we're at it, remove almost all casts, since they
11793 usually aren't needed and are a sign of trouble.
11794
11795 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11796
11797 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11798 the pointer DSET returned by malloc; this isn't portable.
11799 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11800 Similarly for DERIVES.
11801 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11802 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11803 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11804
11805 * src/derives.c (derives_compute): Do not bother invoking
11806 int_of_rule_number, since rule numbers are integers.
11807
11808 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11809 rather than XMALLOC (char, N).
11810
11811 * src/files.c (filename_split): Rewrite to avoid cast.
11812
11813 * src/gram.h (symbol_number_as_item_number,
11814 item_number_as_symbol_number, rule_number_as_item_number,
11815 item_number_as_rule_number):
11816 Now inline functions rather than macros, to avoid casts.
11817 * src/state.h (state_number_as_int): Likewise.
11818 * src/tables.c (state_number_to_vector_number,
11819 symbol_number_to_vector_number): Likewise.
11820
11821 * src/gram.h (int_of_rule_number): Remove; no longer used.
11822
11823 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11824 since the resulting storage is always stored into.
11825
11826 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11827 where it's needed.
11828
11829 * src/muscle_tab.c (muscle_m4_output):
11830 Now inline. Return bool, not int.
11831 * src/state.c (state_compare): Likewise.
11832 * src/symtab.c (symbol_check_defined,
11833 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11834 hash_compare_symbol, hash_symbol):
11835 Likewise.
11836 * src/uniqstr.c (uniqstr_print): Likewise.
11837 * src/muscle_tab.c (muscle_m4_output_processor):
11838 New function, to avoid casts.
11839 * src/state.c (state_comparator, stage_hasher): Likewise.
11840 * src/symtab.c (symbol_check_defined_processor,
11841 symbol_check_alias_consistency_processor, symbol_pack_processor,
11842 symbol_translation_processor, hash_symbol_comparator,
11843 hash_symbol_hasher): Likewise.
11844 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11845 * src/muscle_tab.c (muscles_m4_output):
11846 Use new functions instead of casting old functions unportably.
11847 * src/state.c (state_hash_new): Likewise.
11848 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11849 symbols_token_translations_init):
11850 Likewise.
11851 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11852
11853 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11854 var instead of casting to long, to avoid casts.
11855 (prepare_states): Use MALLOC rather than alloca, so that we don't
11856 have to worry about alloca.
11857 * src/state.c (state_hash_lookup): Likewise.
11858
11859 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11860 local var instead of casting to unsigned char, to avoid casts.
11861
11862 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11863 STATE_ALLOC): Remove.
11864 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11865 rather than calloc, and use offsetof to avoid allocating slightly
11866 too much storage.
11867 (state_new): Initialize all members.
11868
11869 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11870
11871 * src/symtab.c (symbol_free): Remove; unused.
11872 (symbol_get): Remove cast in lhs of assignment.
11873 (symbols_do): Now static. Accept generic arguments, not
11874 hashing-related ones.
11875
11876 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11877 (symbol_processor): Remove.
11878 (symbols_do): Remove decl; now static.
11879
11880 * src/system.h (alloca): Remove; decl no longer needed.
11881 (<stddef.h>): Include, for offsetof.
11882 (<inttypes.>, <stdint.h>): Include if available.
11883 (uintptr_t): New type, if system lacks it.
11884 (CALLOC, MALLOC, REALLOC): New macros.
11885 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11886 new macros.
11887
11888 * src/tables.c (table_size): Now int, to pacify GCC.
11889 (table_grow, table_ninf_remap): Use signed table size.
11890 (save_row): Don't bother initializing locals when not needed.
11891 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11892 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11893
11894 * src/vcg.h: Correct misspellings.
11895
11896 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11897
11898
11899 * src/getargs.c (getargs): Don't assume EOF == -1.
11900
11901 2002-12-09 Paul Eggert <eggert@twinsun.com>
11902
11903 Change identifier spellings to avoid collisions with names
11904 that are reserved by POSIX.
11905
11906 Don't use names ending in _t, since POSIX reserves them.
11907 For consistency, remove _e and _s endings -- they're weren't
11908 needed to remove ambiguity. All uses changed.
11909 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11910 turn was just renamed from struniq_t.
11911 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11912 which in turn was just renamed from struniq_processor_t.
11913 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11914 in turn was renamed from hash_compare_struniq_t.
11915 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11916 (state_list): Renamed from state_list_t.
11917 * src/assoc.h (assoc): Renamed from assoc_t.
11918 * src/conflicts.c (enum conflict_resolution): Renamed from
11919 enum conflict_resolution_e.
11920 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11921 (rule_list): Renamed from rule_list_t.
11922 * src/getargs.h (enum trace): Renamed from enum trace_e.
11923 (enum report): Renamed from enum report_e.
11924 * src/gram.h (item_number): Renamed from item_number_t.
11925 (rule_number): Renamed from rule_number_t.
11926 (struct rule_s): Remove the "rule_s" part; not used.
11927 (rule): Renamed from rule_t.
11928 (rule_filter): Renamed from rule_filter_t.
11929 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11930 (goto_list): Renamed from goto_list_t.
11931 * src/lalr.h (goto_number): Renamed from goto_number_t.
11932 * src/location.h (location): Renamed from location_t.
11933 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11934 and moved here from:
11935 * src/muscle_tab.h (muscle_entry_t): here.
11936 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11937 (rule_list): Renamed from rule_list_t.
11938 * src/print_graph.c (static_graph): Renamed from graph.
11939 * src/reader.h (braced_code): Renamed from braced_code_t.
11940 Remove brace_code_e tag.
11941 * src/relation.h (relation_node): Renamed from relation_node_t.
11942 (relation_nodes): Renamed from relation_nodes_t.
11943 (relation): Renamed from relation_t.
11944 * src/state.h (state_number): Renamed from state_number_t.
11945 (struct state): Renamed from struct state_s.
11946 (state): Renamed from state_t.
11947 (transitions): Renamed from transitions_t. Unused (and
11948 misspelled) transtion_s tag removed.
11949 (errs): Renamed from errs_t. Unused errs_s tag removed.
11950 (reductions): Renamed from reductions_t. Unused tag
11951 reductions_s removed.
11952 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11953 (struct symbol_list): Renamed from struct symbol_list_s.
11954 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11955 (struct symbol): Renamed from struct symbol_s.
11956 (symbol): Renamed from symbol_t.
11957 * src/tables.c (vector_number): Renamed from vector_number_t.
11958 (action_number): Renamed from action_t.
11959 * src/tables.h (base_number): Renamed from base_t.
11960 * src/vcg.h (enum color): Renamed from enum color_e.
11961 (enum textmode): Renamed from enum textmode_e.
11962 (enum shape): Renamed from enum shape_e.
11963 (struct colorentry): Renamed from struct colorentry_s.
11964 (struct classname): Renamed from struct classname_s.
11965 (struct infoname): Renamed from struct infoname_s.
11966 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11967 (enum decision): Renamed from enum decision_e.
11968 (enum orientation): Renamed from enum orientation_e.
11969 (enum alignment): Renamed from enum alignment_e.
11970 (enum arrow_mode): Renamed from enum arrow_mode_e.
11971 (enum crossing_type): Renamed from enum crossing_type_e.
11972 (enum view): Renamed from enum view_e.
11973 (struct node): Renamed from struct node_s.
11974 (node): Renamed from node_t.
11975 (enum linestyle): Renamed from enum linestyle_e.
11976 (enum arrowstyle): Renamed from enum arrowstyle_e.
11977 (struct edge): Renamed from struct edge.
11978 (edge): Renamed from edge_t.
11979 (struct graph): Renamed from struct graph_s.
11980 (graph): Renamed from graph_t.
11981 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11982 Rename value_t -> value.
11983 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11984 value_t_as_yystype -> value_as_yystype.
11985
11986 Don't include <errno.h> in the mainstream code, since it
11987 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11988 * lib/get-errno.c, lib/get-errno.h: New files.
11989 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11990 get-errno.c.
11991 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11992 * src/output.c (output_skeleton): Likewise.
11993 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11994 instead of errno.
11995 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11996 Likewise.
11997 (handle_action_dollar, handle_action_at): Likewise.
11998 * src/system.h: Do not include <errno.h>.
11999 (TAB_EXT): Renamed from EXT_TAB.
12000 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12001
12002 Avoid str[a-z]*, since <string.h> reserves that name space.
12003 Change all instances of "struniq" in names to "uniqstr", and
12004 likewise for "STRUNIQ" and "UNIQSTR".
12005 * src/uniqstr.c: Renamed from src/struniq.c.
12006 * src/uniqstr.h: Renamed from src/struniq.h.
12007 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12008 * src/files.c (strsuffix): Remove; unused.
12009 (concat2): Renamed from stringappend. Now static.
12010 * src/files.h (strsuffix, stringappend): Remove; unused.
12011 * src/parse-gram.y (<chars>): Renamed from <string>.
12012 (<uniqstr>): Renamed from <struniq>.
12013 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12014 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12015 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12016 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12017 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12018 (N_EXPAND): Renamed from N_STRETCH.
12019
12020 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
12021 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12022 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12023 Remove; unused.
12024 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12025 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12026 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12027 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12028 (BASE_MAXIMUM): Renamed from BASE_MAX.
12029 (BASE_MINIMUM): Renamed from BASE_MIN.
12030 (ACTION_MAX): Remove; unused.
12031 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12032 Unnecessary casts removed from above defines.
12033
12034
12035 Fix misspelling in names.
12036 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12037 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12038 G_NODE_ALIGNEMENT.
12039
12040
12041 * lib/timevar.c (timevar_report): Renamed from time_report,
12042 for consistency with other names.
12043 * lib/timevar.h (timevar_report): New decl.
12044 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12045
12046
12047 Sort include-file uses.
12048
12049 Reorder all include files under src to be in the order "system.h".
12050 then the ../lib include files in angle brackets (alphabetized),
12051 then the . include files in double-quotes (alphabetized). Fix
12052 dependency breakages encountered in this process, as follows:
12053 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12054 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12055 * src/state.h: Include "symtab.h".
12056
12057 2002-12-08 Paul Eggert <eggert@twinsun.com>
12058
12059 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12060 since this causes problems when __file__ contains character
12061 sequences like "@" that are treated specially by src/scan-skel.l.
12062 Instead, just use the file's basename. This fixes the bug
12063 reported by Martin Mokrejs in
12064 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12065
12066 2002-12-06 Paul Eggert <eggert@twinsun.com>
12067
12068 Add support for rules that do not have trailing semicolons, as
12069 POSIX requires. Improve the quality of locations in Bison
12070 diagnostics.
12071
12072 * src/location.c: Include <quotearg.h>.
12073 (empty_location): Now const.
12074 (location_print): New function. Follow the recommendation of the
12075 GNU Coding Standards for locations that span file boundaries.
12076 * src/location.h: Do not include <quotearg.h>; no longer needed.
12077 (boundary): New type.
12078 (location_t): Use it. This allows locations to span file boundaries.
12079 All member uses changed: file -> start.file or end.file (as needed),
12080 first_line -> start.line, first_column -> start.column,
12081 last_line -> end.line, last_column -> end.column.
12082 (equal_boundaries): New function.
12083 (LOCATION_RESET, LOCATION_STEP): Remove.
12084 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12085 (empty_location): Now const.
12086 (location_print): New decl.
12087 * src/parse-gram.y (lloc_default): New function, which handles
12088 empty locations more accurately.
12089 (YYLLOC_DEFAULT): Use it.
12090 (%token COLON): Remove.
12091 (%token ID_COLON): New token.
12092 (rules): Use it.
12093 (declarations, rules): Remove trailing semicolon.
12094 (declaration, rules_or_grammar_declaration):
12095 Allow empty (";") declaration.
12096 (symbol_def): Remove empty actions; no longer needed.
12097 (rules_or_grammar_declaration): Remove trailing semicolon.
12098 (semi_colon.opt): Remove.
12099 * src/reader.h: Include location.h.
12100 (scanner_cursor): New decl.
12101 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12102 rolling our own.
12103 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12104 of *loc.
12105 (STEP): Remove. No longer needed, now that adjust_location does
12106 the work. All uses removed.
12107 (scanner_cursor): New var.
12108 (adjust_location): Renamed from extend_location. It now sets
12109 *loc and adjusts the scanner cursor. All uses changed.
12110 Don't bother testing for CR.
12111 (handle_syncline): Remove location arg; now updates scanner cursor.
12112 All callers changed.
12113 (unexpected_end_of_file): Now accepts start boundary of token or
12114 comment, not location. All callers changed. Update scanner cursor,
12115 not the location.
12116 (SC_AFTER_IDENTIFIER): New state.
12117 (context_state): Renamed from c_context. All uses changed.
12118 (id_loc, code_start, token_start): New local vars.
12119 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12120 processing of Yacc white space and equivalents here.
12121 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12122 instead of returning ID immediately, since we need to search for
12123 a subsequent colon.
12124 (<INITIAL>"'", "\""): Save token_start.
12125 (<INITIAL>"%{", "{", "%%"): Save code_start.
12126 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12127 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12128 BEGIN context_state at end, not INITIAL.
12129 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12130 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12131 Return correct token start.
12132 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12133 the start of a character, string or multiline comment is found.
12134 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12135 Reduction): Adjust reported locations to match the more-precise
12136 results now expected.
12137 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12138 * tests/reduce.at (Useless Rules, Reduced Automaton,
12139 Underivable Rules): Likewise.
12140 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12141 or "|"' now that so many other tokens are allowed by the new grammar.
12142
12143 * src/complain.h (current_file): Remove duplicate decl;
12144 current_file is now owned by files.h.
12145 * src/complain.c, src/scan-gram.l: Include files.h.
12146
12147 2002-12-06 Paul Eggert <eggert@twinsun.com>
12148
12149 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12150 promotes to int; it might be unsigned int.
12151 * data/yacc.c (yy_reduce_print): Likewise.
12152
12153 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12154 be #defined in the prologue, not in the Bison declarations.
12155 This fixes Debian Bug 102878, reported by Shaul Karl.
12156
12157 2002-12-02 Paul Eggert <eggert@twinsun.com>
12158
12159 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12160 * lib/strtoul.c: New file, from gnulib.
12161 This fixes a porting bug reported by Peter Klein in
12162 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12163
12164 2002-11-30 Paul Eggert <eggert@twinsun.com>
12165
12166 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12167 and put only a forward declaration in the prologue. This is for
12168 consistency with the other scanner helper functions.
12169
12170 Type clashes now generate warnings, not errors, since it
12171 appears that POSIX may allow some grammars with type clashes.
12172 * src/reader.c (grammar_current_rule_check): Warn about
12173 type clashes instead of complaining.
12174 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12175
12176 Add Yacc library, since POSIX requires it.
12177 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12178 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12179 * lib/main.c, lib/yyerror.c: New files.
12180
12181 gram_error can be static; it need not be extern.
12182 * src/reader.h (gram_error): Remove decl.
12183 * src/parse-gram.y (gram_error): Now static. Add static decl.
12184 (print_token_value): Omit parameter names from forward decl,
12185 for consistency.
12186
12187 2002-11-29 Paul Eggert <eggert@twinsun.com>
12188
12189 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12190 be declared before being used. E.g., one should typically
12191 declare them in the prologue. Use GNU coding style in examples.
12192 Put "const" consistently after the type it modifies. Mention
12193 that C99 supports "inline". Mention that yyerror traditionally
12194 returns "int".
12195
12196 %parse-param and %lex-param now take just one argument, the
12197 declaration; the argument name is deduced from the declaration.
12198
12199 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12200 Reporting, Table of Symbols): Document this.
12201 * src/parse-gram.y (add_param): New function.
12202 (COMMA): Remove.
12203 (declaration): Implement new rule for %parse-param and %lex-param.
12204 * src/scan-gram.l: "," now elicits a warning, rather than being
12205 a token; this is more compatible with byacc.
12206 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12207
12208 2002-11-27 Paul Eggert <eggert@twinsun.com>
12209
12210 Rename identifiers to avoid real and potential collisions.
12211
12212 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12213 to avoid collision with lex macro described by Bruce Lilly in
12214 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12215 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12216 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12217 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12218 All uses changed.
12219 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12220 The name "yycontrol" violates the name space rules, and this stuff
12221 wasn't being used anyway.
12222 (input): Remove action; this stuff wasn't being used.
12223 (gram_error): Rename local variable yylloc -> loc.
12224 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12225 (YY_DECL): Don't use "yy" at start of local variables.
12226 All uses changed, e.g., yylloc -> loc.
12227 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12228 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12229 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12230 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12231
12232 * src/parse-gram.y (gram_error): loc is now const *.
12233 * src/reader.h (gram_error): Likewise.
12234
12235 2002-11-24 Paul Eggert <eggert@twinsun.com>
12236
12237 Version 1.75c.
12238
12239 * tests/actions.at (Actions after errors): Use an output format
12240 more similar to that of the Printers and Destructors test.
12241 Test the position of the ';' token too.
12242 (Printers and Destructors): Likewise.
12243 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12244 unnecessarily alarming people when the test fails.
12245
12246 * data/yacc.c (yyerrlab1): Move this label down, so that the
12247 parser does not discard the lookahead token if the user code
12248 invokes YYERROR. This change is required for POSIX conformance.
12249
12250 * lib/error.c: Sync with gnulib.
12251
12252 2002-11-22 Paul Eggert <eggert@twinsun.com>
12253
12254 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12255 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12256 * lib/xmalloc.c: Likewise.
12257
12258 2002-11-20 Paul Eggert <eggert@twinsun.com>
12259
12260 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12261
12262 2002-11-20 Paul Eggert <eggert@twinsun.com>
12263
12264 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12265 should use `if (! x) abort ();' rather than `assert (x);', and
12266 anyway it's one less thing to worry about configuring.
12267
12268 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12269 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12270 and replace all instances of assert with abort.
12271 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12272 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12273
12274 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12275 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12276 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12277 hash_find_entry, hash_rehash, hash_insert): Likewise.
12278 * src/conflicts.c (resolve_sr_conflict): Likewise.
12279 * src/lalr.c (set_goto_map, map_goto): Likewise.
12280 * src/nullable.c (nullable_compute): Likewise.
12281 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12282 * src/reader.c (packgram, reader): Likewise.
12283 * src/state.c (state_new, state_free, state_transitions_set,
12284 state_reduction_find): Likewise.
12285 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12286 symbol_pack): Likewise.
12287 * src/tables.c (conflict_row, pack_vector): Likewise.
12288 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12289 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12290 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12291 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12292
12293 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12294 (ARGMATCH_CONSTRAINT): New macro.
12295 (ARGMATCH_ASSERT): Use it.
12296
12297 * src/system.h (verify): New macro.
12298 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12299 rather than assert.
12300 * src/tables.c (tables_generate): Likewise.
12301
12302 * src/struniq.c (struniq_assert): Now returns void, and aborts
12303 if the assertion is false.
12304 (struniq_assert_p): Remove.
12305 * src/struniq.h: Likewise.
12306
12307 2002-11-18 Paul Eggert <eggert@twinsun.com>
12308
12309 * data/glr.c (yygetLRActions): Replace `yyindex' with
12310 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12311 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12312 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12313
12314 2002-11-18 Akim Demaille <akim@epita.fr>
12315
12316 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12317 space.
12318 From Tim Van Holder.
12319
12320 2002-11-17 Paul Eggert <eggert@twinsun.com>
12321
12322 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12323 to "SyntaxError" for consistency with my 2002-11-15 change.
12324
12325 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12326 not define to {}, since this breaks the common use of `YYDPRINTF
12327 ((...));' if a single statement is desired (e.g. before `else').
12328 Work around GCC warnings by surrounding corresponding calls with
12329 {} if needed.
12330 (yyhasResolvedValue): Remove unused function.
12331 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12332 loop body.
12333 (yyreportSyntaxError): Renamed from yyreportParseError.
12334 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12335 All uses changed.
12336 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12337 extern when possible. Remove unused initializations.
12338
12339 2002-11-16 Akim Demaille <akim@epita.fr>
12340
12341 Augment the similarity between GLR and LALR traces.
12342
12343 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12344 (YY_REDUCE_PRINT): New.
12345 (yyparse): Use them.
12346 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12347 YYDPRINT here.
12348 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12349 state reached after the reduction/recovery, since...
12350 (yyparse, yyprocessOneStack): Report the state we are entering in.
12351
12352 2002-11-16 Akim Demaille <akim@epita.fr>
12353
12354 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12355 Add support for --trace=skeleton.
12356 * src/scan-skel.l: %option debug.
12357 Scan strings of non-@ or \n instead of character by character.
12358 (scan_skel): Handle trace_skeleton.
12359 (QPUTS): New.
12360 (@output_parser_name@, @output_header_name@): ``Restore'' their
12361 support (used to be M4 macros).
12362 * data/yacc.c: Quote larger chunks, a la glr.c.
12363 * data/lalr1.cc: Likewise.
12364 The header guards are no longer available, so use some other
12365 string than `YYLSP_NEEDED'.
12366
12367 2002-11-16 Akim Demaille <akim@epita.fr>
12368
12369 Make the ``Printers and Destructors'' test more verbose, taking
12370 `yacc.c''s behavior as (possibly wrong) reference.
12371
12372 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12373 instead of fprint on stdout.
12374 Set and report the last_line of the symbols.
12375 Consistently display values and locations.
12376
12377 2002-11-16 Paul Eggert <eggert@twinsun.com>
12378
12379 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12380
12381 2002-11-15 Paul Eggert <eggert@twinsun.com>
12382
12383 * tests/actions.at (Actions after errors): New test case.
12384
12385 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12386 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12387 tests/action.at, tests/calc.at, tests/conflicts.at,
12388 tests/cxx-type.at, tests/regression.at:
12389 "parse error" -> "syntax error" for POSIX compatibility.
12390 "parsing stack overflow..." -> "parser stack overflow" so
12391 that code matches Bison documentation.
12392
12393 2002-11-15 Akim Demaille <akim@epita.fr>
12394
12395 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12396 take two BRACED_CODE, not two string_content.
12397 Free the scanner's obstack when we are done.
12398 (code_content): New.
12399 * tests/calc.at: Adjust.
12400 * doc/bison.texinfo: Adjust.
12401 Also, make sure to include the `,' for these declarations.
12402
12403 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12404
12405 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12406 definition; avoids potential autoreconf problems.
12407
12408 2002-11-15 Akim Demaille <akim@epita.fr>
12409
12410 Always check the value returned by yyparse.
12411
12412 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12413 returned by yyparse.
12414 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12415 Adjust calls.
12416 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12417 returned by yyparse.
12418
12419 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12420
12421 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12422 on input.at test.
12423
12424 2002-11-14 Paul Eggert <eggert@twinsun.com>
12425
12426 * src/output.c (output_skeleton): Call xfopen instead of
12427 duplicating xfopen's body.
12428
12429 Fix bugs reported by Nelson H. F. Beebe in
12430 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
12431
12432 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12433 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12434 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12435 file twice in the grammar, as an extra check.
12436
12437 * tests/input.at (Torturing the Scanner): Surround the
12438 backslash-newline tests with "#if 0", to make it less likely that
12439 we'll run into compiler bugs. Bring back solitary \ inside
12440 comment, but add a closing comment to work around HP C bug. Don't
12441 test backslash-newline in C character constant.
12442
12443 2002-11-14 Akim Demaille <akim@epita.fr>
12444
12445 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12446 status of the compiler.
12447 Calling `exit 1' is no longer needed.
12448 Reported by Nelson H. F. Beebe.
12449
12450 2002-11-14 Akim Demaille <akim@epita.fr>
12451
12452 * tests/atlocal.in (CPPFLAGS): We have config.h.
12453 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12454 New.
12455 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12456 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12457 * tests/regression.at, tests/torture.at: Use them for all the
12458 grammars that are to be compiled.
12459 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12460 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12461 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12462
12463 2002-11-14 Akim Demaille <akim@epita.fr>
12464
12465 * doc/bison.texinfo: Various formatting changes (alignments in
12466 samples, additional @group/@end group, GCS in samples.
12467 Use @deffn instead of simple @table to define the directives,
12468 macros, variables etc.
12469
12470 2002-11-13 Paul Eggert <eggert@twinsun.com>
12471
12472 Fix some bugs reported by Albert Chin-A-Young in
12473 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
12474
12475 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
12476 -o c"; the HP C compiler chatters during compilation.
12477 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12478 * tests/headers.at (export YYLTYPE): Likewise.
12479
12480 * tests/input.at (Torturing the Scanner): Remove lines containing
12481 solitary backslashes, as they tickle a bug in the HP C compiler.
12482
12483 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12484 comments, since they're not portable. Use GNU coding style.
12485
12486 2002-11-13 Akim Demaille <akim@epita.fr>
12487
12488 * data/yacc.c: Leave bigger chunks of quoted text.
12489 (YYDSYMPRINTF): New.
12490 Use it to report symbol activities.
12491 * data/glr.c (YYDSYMPRINTF): New.
12492 Use it.
12493
12494 2002-11-12 Paul Eggert <eggert@twinsun.com>
12495
12496 Version 1.75b.
12497
12498 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12499 (yyglrReduce): Return yyok, not 0.
12500 This should avoid the enumerated-type warnings reported
12501 by Nelson H. F. Beebe in
12502 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
12503
12504 * lib/bbitset.h (BITSET_INLINE): Remove.
12505 * lib/bitset.h [! BITSET_INLINE]: Remove.
12506 (bitset_set, bitset_reset, bitset_test): Rename local vars
12507 to avoid shadowing warnings by GCC.
12508
12509 * data/glr.c (inline): Remove #define. It's the user's
12510 responsibility to #define it away, just like 'const'.
12511 This fixes one of the bugs reported by Nelson H. F. Beebe in
12512 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
12513
12514 * Makefile.maint (po-check): Scan .l and .y files instead of the
12515 .c and the .h files that they generate. This fixes the bug
12516 reported by Tim Van Holder in:
12517 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
12518 Look for N_ as well as for _. Try to avoid matching #define for
12519 N_ and _.
12520 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12521 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12522 * src/scan-gram.l: Revamp regular expressions so that " and '
12523 do not confuse xgettext.
12524
12525 * src/struniq.h (struniq_new): Do not declare the return type
12526 to be 'const'; this violates the C standard.
12527 * src/struniq.c (struniq_new): Likewise.
12528
12529 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12530
12531 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12532 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12533 linker.
12534
12535 2002-11-12 Akim Demaille <akim@epita.fr>
12536
12537 * Makefile.maint: Sync with Autoconf:
12538 (local_updates): New.
12539
12540 2002-11-12 Akim Demaille <akim@epita.fr>
12541
12542 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12543
12544 2002-11-12 Akim Demaille <akim@epita.fr>
12545
12546 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12547 locations.
12548
12549 2002-11-12 Akim Demaille <akim@epita.fr>
12550
12551 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12552 not yyvalue.
12553
12554 2002-11-12 Akim Demaille <akim@epita.fr>
12555
12556 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12557 Use it to test the GLR parser.
12558
12559 2002-11-12 Akim Demaille <akim@epita.fr>
12560
12561 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12562 defines it.
12563 * data/glr.c (yystos): New.
12564 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12565 (YYDSYMPRINT): New.
12566 (yyval): Don't define it, it is handled via M4.
12567 (yyrecoverParseError): Free verbosely the discarded symbols.
12568 * data/yacc.c (yysymprint): Remove, rather...
12569 (b4_yysymprint_generate): invoke.
12570 * data/c.m4 (b4_yysymprint_generate): New.
12571 Accept pointers as arguments, as opposed to the version from
12572 yacc.c.
12573 (b4_yydestruct_generate): Likewise.
12574 * tests/cations.at (Printers and Destructors): Use Bison directives
12575 instead of CPP macros.
12576 Don't rely on internal details.
12577
12578 2002-11-12 Akim Demaille <akim@epita.fr>
12579
12580 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12581 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12582 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12583 it against YYEMPTY and so forth), work on yytoken (i.e., set
12584 it to YYEMPTY etc.).
12585 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12586 (b4_symbol_actions): Remove.
12587 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12588 for 0, end-of-input.
12589
12590 2002-11-12 Akim Demaille <akim@epita.fr>
12591
12592 * doc/bison.texinfo (Destructor Decl): New.
12593
12594 2002-11-12 Akim Demaille <akim@epita.fr>
12595
12596 * src/tables.c (tables_generate): Use free for pointers that
12597 cannot be NULL, not XFREE.
12598 (pack_vector): Use assert, not fatal, for bound violations.
12599 * src/state.c (state_new): Likewise.
12600 * src/reader.c (reader): Likewise.
12601 * src/lalr.c (set_goto_map): Likewise.
12602 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
12603 the file name.
12604
12605 2002-11-12 Akim Demaille <akim@epita.fr>
12606
12607 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
12608 Restore.
12609 * src/scan-gram.l (last_string): Is global to the file, not to
12610 yylex.
12611 * src/parse-gram.y (input): Don't append the epilogue here,
12612 (epilogue.opt): do it here, and free the scanner's obstack.
12613 * src/reader.c (epilogue_set): Rename as...
12614 (epilogue_augment): this.
12615 * data/c.m4 (b4_epilogue): Defaults to empty.
12616
12617 2002-11-12 Akim Demaille <akim@epita.fr>
12618
12619 * src/getargs.c (long_options): Remove duplicates.
12620 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
12621 Remove.
12622 * doc/bison.rnh: Remove.
12623 * doc/bison.texinfo (VMS Invocation): Remove.
12624
12625 2002-11-12 Akim Demaille <akim@epita.fr>
12626
12627 * src/struniq.h, src/struniq.c (struniq_t): Is const.
12628 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
12629
12630 Use struniq for symbols.
12631
12632 * src/symtab.h (symbol_t): The tag member is a struniq.
12633 (symbol_type_set): Adjust.
12634 * src/symtab.c (symbol_new): Takes a struniq.
12635 (symbol_free): Don't free the tag member.
12636 (hash_compare_symbol_t, hash_symbol_t): Rename as...
12637 (hash_compare_symbol, hash_symbol): these.
12638 Use the fact that tags as struniqs.
12639 (symbol_get): Use struniq_new.
12640 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
12641 Returns a strniq.
12642 * src/reader.h (merger_list, grammar_currentmerge_set): The name
12643 and type members are struniqs.
12644 * src/reader.c (get_merge_function)
12645 (grammar_current_rule_merge_set): Adjust.
12646 (TYPE, current_type): Are struniq.
12647
12648 Use struniq for file names.
12649
12650 * src/files.h, src/files.c (infile): Split into...
12651 (grammar_file, current_file): these.
12652 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
12653 * src/reduce.c (reduce_print): Likewise.
12654 * src/getargs.c (getargs): Likewise.
12655 * src/complain.h, src/complain.c: Likewise.
12656 * src/main.c (main): Call struniqs_new early enough to use it for
12657 file names.
12658 Don't free the input file name.
12659
12660 2002-11-12 Akim Demaille <akim@epita.fr>
12661
12662 * src/symtab.c (symbol_free): Remove dead deactivated code:
12663 type_name are properly removed.
12664 Don't use XFREE to free items that cannot be NULL.
12665 * src/struniq.h, src/struniq.c: New.
12666 * src/main.c (main): Initialize/free struniqs.
12667 * src/parse-gram.y (%union): Add astruniq member.
12668 (yyprint): Adjust.
12669 * src/scan-gram.l (<{tag}>): Return a struniq.
12670 Free the obstack bit that used to store it.
12671 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12672
12673 2002-11-11 Paul Eggert <eggert@twinsun.com>
12674
12675 Revamp to fix many (but not all) of the C- and M4-related quoting
12676 problems. Among other things, this fixes the Bison bug reported
12677 by Jan Hubicka when processing the Bash grammar; see:
12678 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
12679
12680 Use new @ escapes consistently. Represent brackets with @{ and @}
12681 rather than @<:@ and @:>@, since this works a bit better with dumb
12682 editors like vi. Represent @ with @@, since @ is now consistently
12683 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12684 __ofile__, to avoid unexpected expansions. Similarly, use @output
12685 rather than #output.
12686
12687 * data/c.m4 (b4_copyright): Omit file name from comment, since
12688 the file name could contain "*/".
12689 (b4_synclines_flag): Don't quote the 2nd argument; it should already
12690 be quoted. All uses changed.
12691
12692 * data/glr.c: Use new @ escapes consistently.
12693 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
12694 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
12695 Remove, since they couldn't handle arbitrary characters in file
12696 names.
12697 * data/lalr1.cc: Likewise.
12698 * data/yacc.c: Likewise.
12699
12700 * src/files.c (output_infix): Remove; all uses removed.
12701 * src/files.h: Likewise.
12702
12703 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
12704 mishandled funny characters in file names, and anyway it isn't
12705 needed any more.
12706 * data/yacc.c: Likewise.
12707 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
12708
12709 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
12710 * data/yacc.c: Likewise.
12711
12712 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
12713 strings now.
12714 (muscle_init): Quote filename as a C string.
12715 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
12716 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
12717 * src/output.c (escaped_file_name_output): New function.
12718 (prepare_symbols): Quote tokens for M4.
12719 (prepare): Don't insert output_infix, output_prefix,
12720 output_parser_name, output_header_name; this is now down by scan-skel.
12721 Insert skeleton as a C string.
12722
12723 * src/output.c (user_actions_output, symbol_destructors_output,
12724 symbol_printers_output): Quote filenames for C and M4.
12725 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12726
12727 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
12728 escapes other than \\ and \'; this simplifies the code.
12729 (<SC_STRING>): Likewise, for \\ and \".
12730 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
12731 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
12732 Use new escapes @{ and @} for [ and ].
12733
12734 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
12735 them with auto vars.
12736 Switch to new escape scheme, where @ is the escape character uniformly.
12737 Abort if a stray escape character is found. Avoid unbounded input
12738 buffer when parsing non-escaped text.
12739
12740 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
12741 __oline__, #output, $@, and @{ do not have unintended meanings.
12742
12743 2002-11-09 Paul Eggert <eggert@twinsun.com>
12744
12745 Fix the test failure due to GCC warnings described in
12746 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
12747 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
12748 evaluate to 0 if it's impossible for NINF to be in the respective
12749 table.
12750 (yygetLRActions, yyrecoverParseError): Use them.
12751
12752 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
12753 counted in the token inserted at end of file. Now takes
12754 location_t *, not location_t, so that the location can be
12755 adjusted. All uses changed.
12756
12757 * tests/regression.at (Invalid inputs): Adjust wording in
12758 diagnostic to match the new behavior.
12759
12760 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
12761 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12762 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12763 abort ();'. This reduces the runtime of the "Many lookaheads"
12764 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12765 GCC 3.2.
12766
12767 2002-11-07 Paul Eggert <eggert@twinsun.com>
12768
12769 * src/parse-gram.y (CHARACTER): Remove unused token.
12770 All uses removed.
12771
12772 * src/scan-gram.l: Remove stack option. We no longer use the
12773 stack, since the stack was never deeper than 1; instead, use the
12774 new auto var c_context to record the stacked value.
12775
12776 Remove nounput option. At an unexpected end of file, we now unput
12777 the minimal input necessary to end cleanly; this simplifies the
12778 code.
12779
12780 Avoid unbounded token sizes where this is easy.
12781
12782 (unexpected_end_of_file): New function.
12783 Use it to systematize the error message on unexpected EOF.
12784 (last-string): Now auto, not static.
12785 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12786 (scanner_last_string_free): Remove; not used.
12787 (percent_percent_count): Move decl to just before use.
12788 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12789 not the (never otherwised-used) CHARACTER.
12790
12791 2002-11-07 Akim Demaille <akim@epita.fr>
12792
12793 Let yyerror always receive the msg as last argument, so that
12794 yyerror can be variadic.
12795
12796 * data/yacc.c (b4_yyerror_args): New.
12797 Use it when calling yyerror.
12798 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12799 Use it when calling yyerror.
12800 * doc/bison.texinfo (Error Reporting): Adjust.
12801 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12802 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12803
12804 2002-11-06 Akim Demaille <akim@epita.fr>
12805
12806 #line should have quoted strings.
12807 Ideally, this should be done by m4_quotearg.
12808
12809 * src/scan-skel.l: Include quotearg.h.
12810 Quote __ofile__.
12811 * src/output.c (symbol_printers_output)
12812 (symbol_destructors_output): Quote the file name.
12813
12814 2002-11-06 Akim Demaille <akim@epita.fr>
12815
12816 * tests/regression.at (Invalid inputs): Adjust to the recent
12817 messages.
12818
12819 2002-11-06 Akim Demaille <akim@epita.fr>
12820
12821 Restore --no-lines.
12822 Reported by Jim Kent.
12823
12824 * data/c.m4 (b4_syncline): New.
12825 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12826 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12827 * src/output.c (user_actions_output): Likewise.
12828 (prepare): Define 'b4_synclines_flag'.
12829 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
12830
12831 2002-11-06 Akim Demaille <akim@epita.fr>
12832
12833 * src/main.c (main): Free `infile'.
12834 * src/scan-gram.l (handle_syncline): New.
12835 Recognize `#line'.
12836 * src/output.c (user_actions_output, symbol_destructors_output)
12837 (symbol_printers_output): Use the location's file name, not
12838 infile.
12839 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12840
12841 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12842
12843 * src/tables.c (matching_state): Don't allow states to match if
12844 either has GLR conflict entries.
12845
12846 2002-11-05 Paul Eggert <eggert@twinsun.com>
12847
12848 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12849 "integer out of range" rather than "invalid value".
12850 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12851 accordingly.
12852
12853 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12854 Also, remove one static variable in the scanner.
12855
12856 * src/scan-gram.l (braces_level): Now auto, not static.
12857 Initialize to zero if the compiler is being picky.
12858 (INITIAL): Clear braces_level instead of incrementing it.
12859 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12860 as POSIX 1003.1-2001 requires.
12861 * src/system.h (IF_LINT): New macro, taken from coreutils.
12862 * configure.ac: Define "lint" if --enable-gcc-warnings.
12863
12864 2002-11-05 Akim Demaille <akim@epita.fr>
12865
12866 * src/scan-gram.l: When it starts with `%', complain about the
12867 whole directive, not just that `invalid character: %'.
12868
12869 2002-11-04 Akim Demaille <akim@epita.fr>
12870
12871 * Makefile.maint: Update from Autoconf.
12872 (update, cvs-update, po-update, do-po-update): New.
12873
12874 2002-11-04 Akim Demaille <akim@epita.fr>
12875
12876 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12877 and yyerror.
12878 Have yyerror `use' its arguments.
12879 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12880 returns true when location & yacc & pure & parse-param.
12881 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12882
12883 2002-11-04 Akim Demaille <akim@epita.fr>
12884
12885 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12886 clashes.
12887 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12888 font-lock-mode.
12889 Use complain_at.
12890 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12891 slot 0.
12892
12893 2002-11-03 Paul Eggert <eggert@twinsun.com>
12894
12895 * src/reader.c (get_merge_function, grammar_current_rule_check):
12896 Use consistent diagnostics for reporting type name clashes.
12897 Quote the types with <>, for consistency with Yacc.
12898 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12899
12900 2002-11-03 Akim Demaille <akim@epita.fr>
12901
12902 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12903 New.
12904 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12905 (b4_parse_param): Remove.
12906 Use b4_identification.
12907 Propagate b4_pure_args where needed to pass them to yyerror.
12908 * data/glr.m4 (b4_parse_param): Remove.
12909 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12910 (b4_lpure_formals): New.
12911 Use b4_identification.
12912 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12913 b4_user_formals and b4_user_args.
12914 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12915 (yyreportAmbiguity): When using a pure parser, also need
12916 the location, and the parse-params.
12917 Adjust callers.
12918 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12919 When using a pure parser, also need the parse-params.
12920 Adjust callers.
12921 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12922 (%pure-parser + %parse-param) LALR and GLR parsers.
12923 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12924 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12925 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12926 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12927 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12928 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12929 * doc/bison.texinfo: Untabify the whole file.
12930 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12931 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12932 (Error Reporting): Adjust to these new directives.
12933 Document %error-verbose, deprecate YYERROR_VERBOSE.
12934
12935 2002-11-03 Akim Demaille <akim@epita.fr>
12936
12937 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12938 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12939 command line options.
12940 * tests/cxx-type.at: Formatting changes.
12941
12942 2002-11-03 Paul Eggert <eggert@twinsun.com>
12943
12944 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12945 to count columns correctly, and to check for invalid inputs.
12946
12947 Use mbsnwidth to count columns correctly. Account for tabs, too.
12948 Include mbswidth.h.
12949 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12950 (extend_location): New function.
12951 (YY_LINES): Remove.
12952
12953 Handle CRLF in C code rather than in Lex code.
12954 (YY_INPUT): New macro.
12955 (no_cr_read): New function.
12956
12957 Scan UCNs, even though we don't fully handle them yet.
12958 (convert_ucn_to_byte): New function.
12959
12960 Handle backslash-newline correctly in C code.
12961 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12962 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12963 all uses changed.
12964 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12965 Use {splice} wherever C allows backslash-newline.
12966 YY_STEP after space, newline, vertical-tab.
12967 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
12968
12969 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12970
12971 ({int}, handle_action_dollar, handle_action_at): Check for integer
12972 overflow.
12973
12974 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12975
12976 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12977 as well as \000. Check for UCHAR_MAX, not 255.
12978 Allow \x with an arbitrary positive number of digits, as in C.
12979 Check for overflow here.
12980 Allow \? and UCNs, for compatibility with C.
12981
12982 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12983 with quote slot used by complain_at.
12984
12985 * tests/input.at: Add tests for backslash-newline, m4 quotes
12986 in symbols, long literals, and funny escapes in strings.
12987
12988 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12989 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12990 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12991 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12992 * m4/mbswidth.m4: New file, from GNU coreutils.
12993
12994 * doc/bison.texinfo (Grammar Outline): Document // comments.
12995 (Symbols): Document that trigraphs have no special meaning in Bison,
12996 nor is backslash-newline allowed.
12997 (Actions): Document that trigraphs have no special meaning.
12998
12999 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13000 no longer used.
13001
13002 2002-11-02 Paul Eggert <eggert@twinsun.com>
13003
13004 * src/reader.c: Don't include quote.h; not needed.
13005 (get_merge_function): Reword warning to be consistent with
13006 type clash diagnostic in grammar_current_rule_check.
13007
13008 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13009 bug in trigraph handling.
13010
13011 * src/output.c (prepare_symbols): When printing token names,
13012 escape "[" as "@<:@" and likewise for "]".
13013
13014 * src/system.h (errno): Remove declaration, as we are now
13015 assuming C89 or better, and C89 guarantees errno.
13016
13017 2002-10-30 Paul Eggert <eggert@twinsun.com>
13018
13019 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
13020 Check for close failures.
13021 * src/files.h (xfclose): Return void, not int, since it always
13022 returned zero.
13023 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13024 indicates one.
13025 * src/output.c (output_skeleton): Use xfclose rather than fclose
13026 and ferror. xfclose now checks ferror.
13027
13028 * data/glr.c (YYLEFTMOST_STATE): Remove.
13029 (yyreportTree): Use a stack-based leftmost state. This avoids
13030 our continuing battles with bogus warnings about initializers.
13031
13032 2002-10-30 Akim Demaille <akim@epita.fr>
13033
13034 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13035 #if.
13036
13037 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13038
13039 * tests/glr-regr1.at: New test for reported regressions.
13040 * tests/testsuite.at: Add glr-regr1.at test.
13041 * tests/Makefile.am: Add glr-regr1.at test.
13042
13043 2002-10-24 Paul Eggert <eggert@twinsun.com>
13044
13045 Version 1.75a.
13046
13047 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13048 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13049 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13050 Don't assume strdup exists; POSIX says its an XSI extension.
13051 Check for buffer overflow on input.
13052
13053 2002-10-24 Akim Demaille <akim@epita.fr>
13054
13055 * src/output.c (output_skeleton): Don't disable M4sugar comments
13056 too soon: it results in comments being expanded.
13057 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13058 first output.
13059
13060 2002-10-24 Akim Demaille <akim@epita.fr>
13061
13062 * data/yacc.c (m4_int_type): New.
13063 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13064 char' as only yacc.c wants K&R portability.
13065 * data/glr.c (yysigned_char): Remove.
13066 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13067 Reported by Quoc Peyrot.
13068
13069 2002-10-23 Paul Eggert <eggert@twinsun.com>
13070
13071 * src/main.c (main): With --trace=time, report times even if a
13072 non-fatal error occurs. Formerly, the times were reported in some
13073 such cases but not in others.
13074 * src/reader.c (reader): Just return if a complaint has been issued,
13075 instead of exiting, so that 'main' can report times.
13076
13077 2002-10-22 Akim Demaille <akim@epita.fr>
13078
13079 * src/system.h: Include sys/types.
13080 Reported by Bert Deknuydt.
13081
13082 2002-10-23 Paul Eggert <eggert@twinsun.com>
13083
13084 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13085 Suggested by Art Haas.
13086
13087 2002-10-22 Paul Eggert <eggert@twinsun.com>
13088
13089 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13090 decl; not needed any more.
13091 * src/main.c (main): Use return to exit, undoing yesterday's change.
13092 The last OS that we could find where this wouldn't work is
13093 SunOS 3.5, and that's too old to worry about now.
13094
13095 * data/glr.c (struct yyltype): Define members even when not
13096 doing locations. This is more consistent with yacc.c, and it
13097 works around the following bug reports:
13098 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13099 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13100
13101 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13102 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13103 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13104
13105 2002-10-22 Akim Demaille <akim@epita.fr>
13106
13107 * data/README: New.
13108
13109 2002-10-21 Paul Eggert <eggert@twinsun.com>
13110
13111 Be consistent about 'bool'; the old code used an enum in one
13112 module and an int in another, and this violates the C standard.
13113 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13114 * configure.ac (AC_HEADER_STDBOOL): Add.
13115 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13116 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13117 * src/symtab.c (hash_compare_symbol_t): Likewise.
13118 * src/system.h (bool, false, true): Use a definition consistent
13119 with ../lib/hash.c. All uses changed.
13120
13121 * src/complain.c (warning_issued): Renamed from warn_message_count,
13122 so that we needn't worry about integer overflow (!).
13123 Now of type bool. All uses changed.
13124 (complaint_issued): Renamed from complain_message_count; likewise.
13125
13126 * src/main.c (main): Use exit to exit with failure.
13127
13128 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13129 rather than 1 and 0.
13130 * src/main.c (main): Likewise.
13131 * src/getargs.c (getargs): Likewise.
13132 * src/reader.c (reader): Likewise.
13133
13134 * src/getarg.c (getargs): Remove duplicate code for
13135 "Try `bison --help'".
13136
13137 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13138 What was that "2" for?
13139
13140 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13141 * src/getargs.c (usage): Likewise.
13142
13143 * src/getargs.c (getargs): When there are too few operands, report
13144 the last one. When there are too many, report the first extra
13145 one. This is how diffutils does it.
13146
13147 2002-10-20 Paul Eggert <eggert@twinsun.com>
13148
13149 Remove K&R vestiges.
13150 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13151 * src/complain.c (VA_START): Remove. Assume prototypes.
13152 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13153 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13154 fatal): Assume prototypes.
13155 * src/complain.h: Assume prototypes.
13156 * src/system.h (PARAMS): Remove.
13157 Include <limits.h> unconditionally, since it's guaranteeed even
13158 for a freestanding C89 compiler.
13159 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13160 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13161
13162 2002-10-20 Akim Demaille <akim@epita.fr>
13163
13164 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13165 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13166 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13167 (yyresolveStates, yyresolveAction, yyresolveStack)
13168 (yyprocessOneStack): Use them.
13169 (yy_reduce_print): New.
13170 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13171
13172 2002-10-20 Akim Demaille <akim@epita.fr>
13173
13174 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13175 arguments and output `void'.
13176 (b4_c_function): Rename as...
13177 (b4_c_function_def): this.
13178 (b4_c_function_decl, b4_c_ansi_function_def)
13179 (b4_c_ansi_function_decl): New.
13180 Change the interpretation of the arguments: before `int, foo', now
13181 `int foo, foo'.
13182 * data/yacc.c (yyparse): Prototype and define thanks to these.
13183 Adjust b4_c_function_def uses.
13184 * data/glr.c (yyparse): Likewise, but ANSI only.
13185
13186 2002-10-20 Akim Demaille <akim@epita.fr>
13187
13188 * src/output.c (prepare): Move the definition of `tokens_number',
13189 `nterms_number', `undef_token_number', `user_token_number_max'
13190 to...
13191 (prepare_tokens): Here.
13192 (prepare_tokens): Rename as...
13193 (prepare_symbols): this.
13194 (prepare): Move the definition of `rules_number' to...
13195 (prepare_rules): here.
13196 (prepare): Move the definition of `last', `final_state_number',
13197 `states_number' to...
13198 (prepare_states): here.
13199 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13200
13201 2002-10-20 Akim Demaille <akim@epita.fr>
13202
13203 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13204
13205 2002-10-20 Akim Demaille <akim@epita.fr>
13206
13207 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13208 * data/c.m4: here.
13209
13210 2002-10-20 Akim Demaille <akim@epita.fr>
13211
13212 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13213 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13214 `pair'.
13215 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13216 `name' to...
13217 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13218 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13219 These.
13220
13221 2002-10-19 Paul Eggert <eggert@twinsun.com>
13222
13223 Do not create a temporary file, as that involves security and
13224 cleanup headaches. Instead, use a pair of pipes.
13225 Derived from a suggestion by Florian Krohm.
13226 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13227 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13228 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13229 (BISON_PREREQ_SUBPIPE): Add.
13230 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13231 Add subpipe.h, subpipe.c.
13232 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13233 * po/POTFILES.in: Add lib/subpipe.c.
13234 * src/output.c: Include "subpipe.h".
13235 (m4_invoke): Remove decl.
13236 (scan_skel): New decl.
13237 (output_skeleton): Use pipe rather than temporary file for m4 input.
13238 Check that m4sugar.m4 is readable, to avoid deadlock.
13239 Check for pipe I/O error.
13240 * src/scan-skel.l (readpipe): Remove decl.
13241 (scan_skel): New function, to be used in place of m4_invoke.
13242 Read from stream rather than file.
13243
13244 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13245 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13246 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13247 this generates a more-accurate value anyway.
13248
13249 * lib/timevar.c (timervar_accumulate): Rename locals to
13250 avoid confusion with similarly-named more-global.
13251 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13252
13253 * src/output.c (prepare): Use xstrdup to convert char const *
13254 to char *, to avoid GCC warning.
13255
13256 2002-10-19 Akim Demaille <akim@epita.fr>
13257
13258 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13259 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13260 Use them to have `calc.y' ready for %pure-parser.
13261 * data/yacc.c (YYLEX): Pass a yylex return type to
13262 b4_c_function_call.
13263
13264 2002-10-19 Akim Demaille <akim@epita.fr>
13265
13266 Prototype support of %lex-param and %parse-param.
13267
13268 * src/parse-gram.y: Add the definition of the %lex-param and
13269 %parse-param tokens, plus their rules.
13270 Drop the `_' version of %glr-parser.
13271 Add the "," token.
13272 * src/scan-gram.l (INITIAL): Scan them.
13273 * src/muscle_tab.c: Comment changes.
13274 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13275 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13276 (muscle_entry_s): The `value' member is no longer const.
13277 Adjust all dependencies.
13278 * src/muscle_tab.c (muscle_init): Adjust: use
13279 MUSCLE_INSERT_STRING.
13280 Initialize the obstack earlier.
13281 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13282 (muscle_pair_list_grow): New.
13283 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13284 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13285 * tests/calc.at: Use %locations, not --locations.
13286 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13287
13288 2002-10-19 Akim Demaille <akim@epita.fr>
13289
13290 * src/getargs.c (usage): Take status as argument and exit
13291 accordingly.
13292 Report the traditional `Try ... --help' message when status != 0.
13293 (usage, version): Don't take a FILE * as arg, it is pointless.
13294 (getargs): When there is an incorrect number of arguments, make it
13295 an error, and report it GNUlically thanks to `usage ()'.
13296
13297 2002-10-18 Paul Eggert <eggert@twinsun.com>
13298
13299 * data/glr.c (yyreportParseError): Don't assume that sprintf
13300 yields the length of the printed string, as this is not true
13301 on SunOS 4.1.4. Reported by Peter Klein.
13302
13303 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13304 * tests/conflicts.at (%nonassoc and eof): Likewise.
13305 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13306
13307 2002-10-17 Akim Demaille <akim@epita.fr>
13308
13309 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13310 * src/getargs.c (trace_types, trace_args): Adjust.
13311 * src/reader.c (grammar_current_rule_prec_set)
13312 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13313 Standardize error messages.
13314 And s/@prec/%prec/!
13315 (reader): Use trace_flag to enable scanner/parser debugging,
13316 instead of an adhoc scheme.
13317 * src/scan-gram.l: Remove trailing debugging code.
13318
13319 2002-10-16 Paul Eggert <eggert@twinsun.com>
13320
13321 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13322 MUSCLE_TAB_H.
13323
13324 * NEWS: Officially drop support for building Bison with K&R C,
13325 since it didn't work anyway and it's not worth worrying about.
13326 * Makefile.maint (wget_files): Remove ansi2knr.c.
13327 (ansi2knr.c-url_prefix): Remove.
13328 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13329 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13330 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13331
13332 2002-10-15 Paul Eggert <eggert@twinsun.com>
13333
13334 Stop using the "enum_" trick for K&R-style function definitions;
13335 it confused me, and I was the author! Instead, assume that people
13336 who want to use K&R C compilers (when using these modules in GCC,
13337 perhaps?) will run ansi2knr.
13338
13339 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13340 All uses of "enum_" changed to "enum ".
13341 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13342 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13343
13344 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13345 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13346 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13347 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13348 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13349 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13350 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13351 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13352 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13353 Use function prototypes; this removes the need for declaring
13354 static functions simply to provide their prototypes.
13355 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13356 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13357 bitset_count_, bitset_create, bitset_dump, bitset_first,
13358 bitset_free, bitset_init, bitset_last, bitset_next,
13359 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13360 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13361 bitset_print, bitset_release_memory, bitset_toggle_,
13362 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13363 debug_bitset): Likewise.
13364 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13365 * lib/bitset_stats.c (bitset_log_histogram_print,
13366 bitset_percent_histogram_print, bitset_stats_and,
13367 bitset_stats_and_cmp, bitset_stats_and_or,
13368 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13369 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13370 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13371 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13372 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13373 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13374 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13375 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13376 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13377 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13378 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13379 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13380 bitset_stats_zero): Likewise.
13381 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13382 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13383 bitsetv_dump, debug_bitsetv): Likewise.
13384 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13385 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13386 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13387 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13388 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13389 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13390 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13391 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13392 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13393 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13394 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13395 Likewise.
13396 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13397 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13398 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13399 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13400 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13401 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13402 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13403 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13404 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13405 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13406 lbitset_xor_cmp, lbitset_zero): Likewise.
13407
13408 2002-10-14 Akim Demaille <akim@epita.fr>
13409
13410 Version 1.75.
13411
13412 2002-10-14 Akim Demaille <akim@epita.fr>
13413
13414 * tests/Makefile.am (maintainer-check-posix): New.
13415
13416 2002-10-14 Akim Demaille <akim@epita.fr>
13417
13418 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13419 member.
13420
13421 2002-10-14 Akim Demaille <akim@epita.fr>
13422
13423 * src/tables.c (table_ninf_remap): base -> tab.
13424 Reported by Matt Rosing.
13425
13426 2002-10-14 Paul Eggert <eggert@twinsun.com>
13427
13428 * tests/action.at, tests/calc.at, tests/conflicts.at,
13429 tests/cxx-type.at, tests/headers.at, tests/input.at,
13430 tests/regression.at, tests/synclines.at, tests/torture.at:
13431 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13432 so that the tests still work even if POSIXLY_CORRECT is set.
13433 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
13434
13435 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13436 for portability to K&R hosts. Fix typo: signed char is guaranteed
13437 only to 127, not to 128.
13438 * data/glr.c (yysigned_char): New type.
13439 * data/yacc.c (yysigned_char): Likewise.
13440 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13441
13442 2002-10-13 Paul Eggert <eggert@twinsun.com>
13443
13444 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13445 true due to limited range of data type" warning from GCC.
13446
13447 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13448 by wrapping enum yytokentype's definition inside #ifndef
13449 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13450
13451 2002-10-13 Akim Demaille <akim@epita.fr>
13452
13453 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13454 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13455
13456 2002-10-13 Akim Demaille <akim@epita.fr>
13457
13458 * Makefile.maint: Update from Autoconf 2.54.
13459 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13460
13461 2002-10-13 Akim Demaille <akim@epita.fr>
13462
13463 * src/print.c (print_state): Separate the list of solved conflicts
13464 from the other items.
13465 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13466
13467 2002-10-13 Akim Demaille <akim@epita.fr>
13468
13469 Let nondeterministic skeletons be usable with deterministic
13470 tables.
13471
13472 With the patch, GAWK compiled by GCC without -O2 passes its test
13473 suite using a GLR parser driven by LALR tables. It fails with -O2
13474 because `struct stat' gives two different answers on my machine:
13475 88 (definition of an auto var) and later 96 (memset on this var).
13476 Hence the stack is badly corrumpted. The headers inclusion is to
13477 blame: if I move the awk.h inclusion before GLR's system header
13478 inclusion, the two struct stat have the same size.
13479
13480 * src/tables.c (pack_table): Always create conflict_table.
13481 (token_actions): Always create conflict_list.
13482 * data/glr.c (YYFLAG): Remove, unused.
13483
13484 2002-10-13 Akim Demaille <akim@epita.fr>
13485
13486 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13487 (O0FLAGS): New.
13488 (VALGRIND, GXX): New.
13489 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13490 * tests/bison.in: Run $PREBISON a pre-command.
13491 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13492 (maintainer-check-g++): New.
13493 * Makefile.am (maintainer-check): New.
13494
13495 2002-10-13 Akim Demaille <akim@epita.fr>
13496
13497 * data/glr.c: Formatting changes.
13498 Tweak some trace messages to match yacc.c's.
13499
13500 2002-10-13 Akim Demaille <akim@epita.fr>
13501
13502 GLR parsers sometimes raise parse errors instead of performing the
13503 default reduction.
13504 Reported by Charles-Henry de Boysson.
13505
13506 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
13507 check the length of the traces when %glr.
13508 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13509 GLR's traces.
13510 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13511 Test GLR parsers.
13512 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13513 (yyltype): Remove the yy prefix from the member names.
13514 (yytable): Complete its comment.
13515 (yygetLRActions): Map error action number from YYTABLE from
13516 YYTABLE_NINF to 0.
13517 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13518 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13519 not satisfying as we could compare an YYACTION computed from
13520 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13521 only value for error actions.
13522 (yyreportParseError): In verbose parse error messages, don't issue
13523 `error' in the list of expected tokens.
13524 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13525 next action to perform to match glr.c's decoding.
13526 (yytable): Complete its comment.
13527
13528 2002-10-13 Paul Eggert <eggert@twinsun.com>
13529
13530 Fix problem reported by Henrik Grubbstroem in
13531 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
13532 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13533 because the Bison parser reads the second action before reducing
13534 the first one.
13535 * src/scan-gram.l (rule_length): New static var.
13536 Use it to keep track of the rule length in the scanner, since
13537 we can't expect the parser to be in lock-step sync with the scanner.
13538 (handle_action_dollar, handle_action_at): Use this var.
13539 * tests/actions.at (Exotic Dollars): Test for the problem.
13540
13541 2002-10-12 Paul Eggert <eggert@twinsun.com>
13542
13543 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13544 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13545 Include <sys/time.h> when checking for clock_t and struct tms.
13546 Use same include order as source.
13547 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
13548 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
13549
13550 * lib/timevar.c: Update copyright date and clarify comments.
13551 (get_time) [IN_GCC]: Keep the GCC version for reference.
13552
13553 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13554 GCC version as of today, then merge Bison's changes.
13555 Change "GCC" to "Bison" in copyright notice. timevar.def's
13556 author is Akim, so change that too.
13557
13558 * src/reader.c (grammar_current_rule_check):
13559 Don't worry about the default action if $$ is untyped.
13560 Prevents bogus warnings reported by Jim Gifford in
13561 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
13562
13563 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13564 * data/glr.c, data/lalr1.cc, data/yacc.c:
13565 Output token definitions before the first part of user declarations.
13566 Fixes compatibility problem reported by Jim Gifford for kbd in
13567 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
13568
13569 2002-10-11 Paul Eggert <eggert@twinsun.com>
13570
13571 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13572 (yyparse): here. This undoes some of the 2002-07-25 change.
13573 Compatibility problem reported by Ralf S. Engelschall with
13574 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13575
13576 2002-10-11 Akim Demaille <akim@epita.fr>
13577
13578 * tests/regression.at Characters Escapes): New.
13579 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13580 characters.
13581 Reported by Jan Nieuwenhuizen.
13582
13583 2002-10-11 Akim Demaille <akim@epita.fr>
13584
13585 * po/id.po: New.
13586
13587 2002-10-10 Paul Eggert <eggert@twinsun.com>
13588
13589 Portability fixes for bitsets; this also avoids several GCC
13590 warnings.
13591
13592 * lib/abitset.c: Include <stddef.h>, for offsetof.
13593 * lib/lbitset.c: Likewise.
13594
13595 * lib/abitset.c (abitset_bytes): Return a size that is aligned
13596 properly for vectors of objects. Do not assume that adding a
13597 header size to a multiple of a word size yields a value that is
13598 properly aligned for the whole union.
13599 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13600
13601 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
13602 unique names for structures.
13603 * lib/ebitset.c (ebitset_bytes): Likewise.
13604 * lib/lbitset.c (lbitset_bytes): Likewise.
13605
13606 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
13607 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
13608 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
13609 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
13610 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
13611 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
13612 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
13613 to improve the type-checking that GCC can do.
13614 * lib/bitset.c (bitset_op4_cmp): Likewise.
13615 * lib/bitset_stats.c (bitset_stats_count,
13616 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
13617 bitset_stats_copy, bitset_stats_disjoint_p,
13618 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
13619 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
13620 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
13621 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
13622 bitset_stats_and_or_cmp, bitset_stats_andn_or,
13623 bitset_stats_andn_or_cmp, bitset_stats_or_and,
13624 bitset_stats_or_and_cmp): Likewise.
13625 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
13626 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
13627 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
13628 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
13629
13630 * lib/abitset.h: Include bitset.h, not bbitset.h.
13631 * lib/ebitset.h: Likewise.
13632 * lib/lbitset.h: Likewise.
13633
13634 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
13635 All instances of parameters of type enum bitset_opts are now of
13636 type enum_bitset_opts, to conform to the C Standard, and similarly
13637 for enum_bitset_type.
13638 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13639 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13640
13641 Do not use "struct bitset_struct" to mean different things in
13642 different modules. Not only is this confusing, it violates
13643 the C Standard, which requires that structure types in different
13644 modules must be compatible if one is to be passed to the other.
13645 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
13646 All instances of "struct bitset_struct *" replaced with "bitset".
13647 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
13648 (union bitset_union, struct abitset_struct, struct ebitset_struct,
13649 struct lbitset_struct, struct bitset_stats_struct): New types.
13650 All uses of struct bitset_struct changed to union bitset_union,
13651 etc.
13652 * lib/abitset.c (struct abitset_struct, abitset,
13653 struct bitset_struct): Remove.
13654 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
13655 struct bitset_struct): Remove.
13656 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
13657 bitset_struct): Remove.
13658 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
13659 Likewise.
13660
13661 Do not call a function of type T using a call that assumes the
13662 function is of a different type U. Standard C requires that a
13663 function must be called with a type that is compatible with its
13664 definition.
13665 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13666 New decls.
13667 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13668 New functions.
13669 * lib/ebitset.c (PFV): Remove.
13670 * lib/lbitset.c (PFV): Likewise.
13671 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13672 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13673 decls.
13674 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13675 (ebitset_vtable): Use them.
13676 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13677 lbitset_xor): New functions.
13678 (lbitset_vtable): Use them.
13679
13680 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13681 Declare.
13682
13683 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13684 GCC warning.
13685 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
13686 Use offsetof, for simplicity.
13687
13688 2002-10-06 Paul Eggert <eggert@twinsun.com>
13689
13690 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
13691 the same width as int. This reapplies a hunk of the 2002-08-12 patch
13692 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
13693 which was inadvertently undone by the 2002-09-30 patch.
13694 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
13695 the same width as int.
13696
13697 2002-10-04 Paul Eggert <eggert@twinsun.com>
13698
13699 Version 1.50.
13700
13701 * configure.ac (AC_INIT), NEWS: Increment version number.
13702
13703 * doc/bison.texinfo: Minor spelling, grammar, and white space
13704 fixes.
13705 (Symbols): Mention that any negative value returned from yylex
13706 signifies end-of-input. Warn about negative chars. Mention
13707 the portable Standard C character set.
13708
13709 The GNU coding standard says CFLAGS and YFLAGS are reserved
13710 for the installer to set.
13711 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
13712 * src/Makefile.am (AM_CFLAGS): Likewise.
13713 (AM_YFLAGS): Renamed from YFLAGS.
13714
13715 Fix some MAX and MIN problems.
13716 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
13717 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
13718 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
13719 * src/reader.c (reader): Use it.
13720
13721 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
13722 POSIX 1003.1-2001 has removed fgrep.
13723
13724 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
13725
13726 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
13727 interpreted as signed.
13728 * lib/ebitset.c (ebitset_list): Fix bug.
13729
13730 2002-10-01 Paul Eggert <eggert@twinsun.com>
13731
13732 More fixes for 64-bit hosts and large bitsets.
13733
13734 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
13735 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
13736 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
13737 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
13738 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
13739 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
13740 bitset_count_): Likewise.
13741 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
13742 bitset_first, bitset_last): Likewise.
13743 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
13744 bitset_stats_list_reverse, bitset_stats_size,
13745 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
13746 Likewise.
13747 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13748 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13749 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13750 bitsetv_reflexive_transitive_closure): Likewise.
13751 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
13752 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
13753 Likewise.
13754 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
13755 Likewise.
13756
13757 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
13758 Use size_t, not unsigned int, to count bytes.
13759 * lib/abitset.h (abitset_bytes): Likewise.
13760 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
13761 Likewise.
13762 * lib/bitset.h (bitset_bytes): Likewise.
13763 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13764 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13765 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13766 * lib/ebitset.c (ebitset_bytes): Likewise.
13767 * lib/ebitset.h (ebitset_bytes): Likewise.
13768 * lib/lbitset.c (lbitset_bytes): Likewise.
13769 * lib/lbitset.h (lbitset_bytes): Likewise.
13770
13771 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13772 abitset_subset_p, abitset_disjoint_p, abitset_and,
13773 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13774 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13775 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13776 abitset_or_and, abitset_or_and_cmp):
13777 Use bitset_windex instead of unsigned int.
13778 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13779 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13780 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13781 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13782 Likewise.
13783 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
13784
13785 * lib/bitset.c (bitset_print):
13786 Use proper printf formats for widths of integer types.
13787 * lib/bitset_stats.c (bitset_percent_histogram_print,
13788 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13789 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13790 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13791 * lib/lbitset.c (lbitset_bytes): Likewise.
13792
13793 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13794 BITSET_SIZE_MAX): New macros.
13795 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13796 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13797 to BITSET_WINDEX_MAX.
13798
13799 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13800 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13801 since we now return the bitset_bindex type (not int).
13802
13803 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13804 when computing sizes.
13805 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13806
13807 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13808 and avoid cast to unsigned.
13809
13810 2002-09-30 Akim Demaille <akim@epita.fr>
13811
13812 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13813 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13814 Updates from Michael Hayes.
13815
13816 2002-09-30 Art Haas <ahaas@neosoft.com>
13817
13818 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13819 invocations.
13820 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13821 defined.
13822
13823 2002-09-27 Akim Demaille <akim@epita.fr>
13824
13825 Version 1.49c.
13826
13827 2002-09-27 Akim Demaille <akim@epita.fr>
13828
13829 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13830 (Because of AC_LIBSOURCE).
13831
13832 2002-09-27 Akim Demaille <akim@epita.fr>
13833
13834 Playing with Autoscan.
13835
13836 * configure.ac: Remove the old LIBOBJ tweaks.
13837 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13838 * lib/strrchr.c: New.
13839 * lib/strtol.c: New, from the Coreutils 4.5.1.
13840
13841 2002-09-27 Akim Demaille <akim@epita.fr>
13842
13843 Playing with Autoscan.
13844
13845 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13846 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13847 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13848 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13849 Coreutils 4.5.1.
13850
13851 2002-09-24 Akim Demaille <akim@epita.fr>
13852
13853 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13854 (Frequently Asked Questions, Parser Stack Overflow): New.
13855
13856 2002-09-13 Akim Demaille <akim@epita.fr>
13857
13858 Playing with autoscan.
13859
13860 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13861 * src/files.c (skeleton_find): Remove, unused.
13862 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13863 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13864
13865 2002-09-13 Akim Demaille <akim@epita.fr>
13866
13867 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13868 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13869
13870 2002-09-13 Akim Demaille <akim@epita.fr>
13871
13872 * configure.ac: Require 2.54.
13873 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13874 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13875 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13876 Remove, provided by Autoconf macros.
13877
13878 2002-09-12 Akim Demaille <akim@epita.fr>
13879
13880 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13881
13882 2002-09-12 Akim Demaille <akim@epita.fr>
13883
13884 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13885 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13886 Reported by Martin Mokrejs.
13887
13888 2002-09-10 Akim Demaille <akim@epita.fr>
13889
13890 * src/parse-gram.y: Associate a human readable string to each
13891 token type.
13892 * tests/regression.at (Invalid inputs): Adjust.
13893
13894 2002-09-10 Gary V. Vaughan <gary@gnu.org>
13895
13896 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13897 with an Autoconf-2.5x style configure.ac.
13898
13899 2002-09-06 Paul Eggert <eggert@twinsun.com>
13900
13901 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13902 exception applies only to yacc.c. This is a modification of a
13903 patch originally suggested by Akim Demaille.
13904
13905 2002-09-06 Akim Demaille <akim@epita.fr>
13906
13907 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13908 here to...
13909 * data/yacc.c: here.
13910
13911 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13912 LocationType.
13913 (b4_ltype): Default to yy::Location from location.hh.
13914
13915 2002-09-04 Jim Meyering <jim@meyering.net>
13916
13917 * data/yacc.c: Guard the declaration of yytoknum also with
13918 `#ifdef YYPRINT', so it is declared only when used.
13919
13920 2002-09-04 Akim Demaille <akim@epita.fr>
13921
13922 * configure.in: Rename as...
13923 * configure.ac: this.
13924 Bump to 1.49c.
13925
13926 2002-09-04 Akim Demaille <akim@epita.fr>
13927
13928 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13929 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13930 translate maintainer only messages.
13931
13932 2002-08-12 Paul Eggert <eggert@twinsun.com>
13933
13934 Version 1.49b.
13935
13936 * Makefile.am (SUBDIRS): Remove intl.
13937 (DISTCLEANFILES): Remove.
13938 * NEWS: Mention that GNU M4 is now required. Clarify what is
13939 meant by "larger grammars". Mention the pt_BR translation.
13940 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13941 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13942 Bump version from 0.11.2 to 0.11.5.
13943 (BISON_PREREQ_STAGE): Remove.
13944 (AM_GNU_GETTEXT): Use external gettext.
13945 (AC_OUTPUT): Remove intl/Makefile.
13946
13947 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13948
13949 * data/glr.c: Include string.h, for strlen.
13950 (yyreportParseError): Use size_t for yysize.
13951 (yy_yypstack): No longer nested inside yypstates, as nested
13952 functions are not portable. Do not assume size_t is the
13953 same width as int.
13954 (yypstates): Do not assume that ptrdiff_t is the same width
13955 as int, and similarly for yyposn and YYINDEX.
13956
13957 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13958
13959 * lib/Makefile.am (INCLUDES): Do not include from the intl
13960 directory, which has been removed.
13961 * src/Makefile.am (INCLUDES): Likewise.
13962
13963 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13964 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13965 New vars.
13966
13967 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13968 * tests/Makefile.am (EXTRA_DIST): Likewise.
13969
13970 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13971 Do not assume that bitset_windex is the same width as unsigned.
13972
13973 * lib/abitset.c (abitset_unused_clear): Do not assume that
13974 bitset_word is the same width as int.
13975 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13976 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13977 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13978 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13979 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13980
13981 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13982 portability to one's complement hosts!).
13983 * lib/ebitset.c (ebitset_op1): Likewise.
13984 * lib/lbitset.c (lbitset_op1): Likewise.
13985
13986 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13987 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13988 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13989 Sync with fileutils.
13990 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13991 lib/gettext.h: Sync with diffutils.
13992
13993 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13994 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13995
13996 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13997 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13998 check for void *.
13999
14000 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14001 size_t; the old version tried to do this but casted improperly.
14002 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14003 (bitset_test): Now returns int, not unsigned long.
14004
14005 * lib/bitset_stats.c: Include "gettext.h".
14006 (_): New macro.
14007 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14008 name locals "index", as it generates unnecessary warnings on some
14009 hosts that have an "index" function.
14010
14011 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14012 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14013 they need translation.
14014 * src/LR0.c (state_list_append, new_itemsets, get_state,
14015 append_states, generate_states): Likewise.
14016 * src/assoc.c (assoc_to_string): Likewise.
14017 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14018 * src/gram.c (grammar_dump): Likewise.
14019 * src/injections.c (injections_compute): Likewise.
14020 * src/lalr.c (lookaheads_print): Likewise.
14021 * src/relation.c (relation_transpose): Likewise.
14022 * src/scan-gram.l: Likewise.
14023 * src/tables.c (table_grow, pack_vector): Likewise.
14024
14025 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14026 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14027 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14028 * m4/mbstate_t.m4: Sync with fileutils.
14029 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14030
14031 * po/LINGUAS: Add pt_BR.
14032 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14033 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14034 lib/timevar.c.
14035 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14036 manual recommends.
14037 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14038
14039 * src/complain.c (strerror_r): Remove decl; not needed.
14040 (strerror): Use same pattern as ../lib/error.c.
14041
14042 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14043
14044 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14045
14046 * src/main.c (main): Cast result of bindtextdomain and textdomain
14047 to void, to avoid a GCC warning when --disable-nls is in effect.
14048
14049 * src/scan-gram.l: Use strings rather than escapes when possible,
14050 to minimize the number of warnings from xgettext.
14051 (handle_action_dollar, handle_action_at): Don't use isdigit,
14052 as it mishandles negative chars and it may not work as expected
14053 outside the C locale.
14054
14055 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14056 this is a GCC extension and is not portable to other compilers.
14057
14058 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14059 Do not include <ctype.h>; no longer needed.
14060 Do not include <malloc.h>; no longer needed (and generates
14061 warnings on OpenBSD 3.0).
14062
14063 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14064 it's not portable.
14065
14066 * tests/regression.at: Do not use 'cc -c input.c -o input';
14067 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14068
14069 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14070 exit status as failure, not just exit status 1. Sun C exits
14071 with status 2 sometimes.
14072
14073 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14074 Use it for the two large tests.
14075
14076 2002-08-02 Akim Demaille <akim@epita.fr>
14077
14078 * src/conflicts.c (conflicts_output): Don't output rules never
14079 reduced here, since anyway that computation doesn't work.
14080 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14081 (rule_useless_p, rule_never_reduced_p): New.
14082 (grammar_rules_partial_print): Use a filter instead of a range.
14083 Display the title only if needed.
14084 (grammar_rules_print): Adjust.
14085 (grammar_rules_never_reduced_report): New.
14086 * src/tables.c (action_row): Move the computation of rules never
14087 reduced to...
14088 (token_actions): here.
14089 * src/main.c (main): Make the parser before making the report, so
14090 that rules never reduced are computed.
14091 Call grammar_rules_never_reduced_report.
14092 * src/print.c (print_results): Report rules never reduced.
14093 * tests/conflicts.at, tests/reduce.at: Adjust.
14094
14095 2002-08-01 Akim Demaille <akim@epita.fr>
14096
14097 Instead of attaching lookaheads and duplicating the rules being
14098 reduced by a state, attach the lookaheads to the reductions.
14099
14100 * src/state.h (state_t): Remove the `lookaheads',
14101 `lookaheads_rule' member.
14102 (reductions_t): Add a `lookaheads' member.
14103 Use a regular array for the `rules'.
14104 * src/state.c (reductions_new): Initialize the lookaheads member
14105 to 0.
14106 (state_rule_lookaheads_print): Adjust.
14107 * src/state.h, src/state.c (state_reductions_find): New.
14108 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14109 (count_rr_conflicts): Adjust.
14110 * src/lalr.c (LArule): Remove.
14111 (add_lookback_edge): Adjust.
14112 (state_lookaheads_count): New.
14113 (states_lookaheads_initialize): Merge into...
14114 (initialize_LA): this.
14115 (lalr_free): Adjust.
14116 * src/main.c (main): Don't free nullable and derives too early: it
14117 is used by --verbose.
14118 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14119
14120 2002-08-01 Akim Demaille <akim@epita.fr>
14121
14122 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14123 `rule_number_t**'.
14124 (set_derives, free_derives): Rename as...
14125 (derives_compute, derives_free): this.
14126 Adjust all dependencies.
14127 * src/nullable.c (set_nullable, free_nullable): Rename as...
14128 (nullable_compute, nullable_free): these.
14129 (rule_list_t): Store rule_t *, not rule_number_t.
14130 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14131 pointers, instead of their numbers.
14132 * src/main.c (main): Call nullable_free, and derives_free earlier,
14133 as they were lo longer used.
14134
14135 2002-08-01 Akim Demaille <akim@epita.fr>
14136
14137 * lib/timevar.c (get_time): Include children time.
14138 * src/lalr.h (LA, LArule): Don't export them: used with the
14139 state_t.
14140 * src/lalr.c (LA, LArule): Static.
14141 * src/lalr.h, src/lalr.c (lalr_free): New.
14142 * src/main.c (main): Call it.
14143 * src/tables.c (pack_vector): Check whether loc is >= to the
14144 table_size, not >.
14145 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14146 (tables_generate): do it, since that's also it which allocates
14147 them.
14148 Don't free LA and LArule, main does.
14149
14150 2002-07-31 Akim Demaille <akim@epita.fr>
14151
14152 Separate parser tables computation and output.
14153
14154 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14155 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14156 (yydefgoto, yydefact, high): Move to...
14157 * src/tables.h, src/tables.c: here.
14158 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14159 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14160 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14161 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14162 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14163 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14164 (action_row, save_row, token_actions, save_column, default_goto)
14165 (goto_actions, sort_actions, matching_state, pack_vector)
14166 (table_ninf_remap, pack_table, prepare_actions): Move to...
14167 * src/tables.c: here.
14168 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14169 * src/output.c (token_actions, output_base, output_conflicts)
14170 (output_check): Merge into...
14171 (prepare_actions): this.
14172 (actions_output): Rename as...
14173 (user_actions_output): this.
14174 * src/main.c (main): Call tables_generate and tables_free.
14175
14176 2002-07-31 Akim Demaille <akim@epita.fr>
14177
14178 Steal GCC's --time-report support.
14179
14180 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14181 stolen/adjusted from GCC.
14182 * m4/stage.m4: Remove time related checks.
14183 * m4/timevar.m4: New.
14184 * configure.in: Adjust.
14185 * src/system.h: Adjust to using timevar.h.
14186 * src/getargs.h, src/getargs.c: Support trace_time for
14187 --trace=time.
14188 * src/main.c (stage): Remove.
14189 (main): Replace `stage' invocations with timevar calls.
14190 * src/output.c: Insert pertinent timevar calls.
14191
14192 2002-07-31 Akim Demaille <akim@epita.fr>
14193
14194 Let --trace have arguments.
14195
14196 * src/getargs.h (enum trace_e): New.
14197 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14198 (long_options, short_options): --trace/-T takes an optional
14199 argument.
14200 Change all the uses of trace_flag to reflect the new flags.
14201 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14202
14203 Strengthen `stage' portability.
14204
14205 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14206 * configure.in: Use it.
14207 Don't check for malloc.h and sys/times.h.
14208 * src/system.h: Include them when appropriate.
14209 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14210 times and struct tms are available.
14211
14212 2002-07-30 Akim Demaille <akim@epita.fr>
14213
14214 In verbose parse error message, don't report `error' as an
14215 expected token.
14216 * tests/actions.at (Printers and Destructors): Adjust.
14217 * tests/calc.at (Calculator $1): Adjust.
14218 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14219 error message, do not report the parser accepts the error token in
14220 that state.
14221
14222 2002-07-30 Akim Demaille <akim@epita.fr>
14223
14224 Normalize conflict related messages.
14225
14226 * src/complain.h, src/complain.c (warn, complain): New.
14227 * src/conflicts.c (conflicts_print): Use them.
14228 (conflict_report_yacc): New, extracted from...
14229 (conflicts_print): here.
14230 * tests/conflicts.at, tests/existing.at: Adjust.
14231
14232 2002-07-30 Akim Demaille <akim@epita.fr>
14233
14234 Report rules which are never reduced by the parser: those hidden
14235 by conflicts.
14236
14237 * src/LR0.c (save_reductions): Don't make the final state too
14238 different: save its reduction (accept) instead of having a state
14239 without any action (no shift or goto, no reduce).
14240 Note: the final state is now a ``regular'' state, i.e., the
14241 parsers now contain `reduce 0' as default reduction.
14242 Nevertheless, since they decide to `accept' when yystate =
14243 final_state, they still will not reduce rule 0.
14244 * src/print.c (print_actions, print_reduction): Adjust.
14245 * src/output.c (action_row): Track reduced rules.
14246 (token_actions): Report rules never reduced.
14247 * tests/conflicts.at, tests/regression.at: Adjust.
14248
14249 2002-07-30 Akim Demaille <akim@epita.fr>
14250
14251 `stage' was accidently included in a previous patch.
14252 Initiate its autoconfiscation.
14253
14254 * configure.in: Look for malloc.h and sys/times.h.
14255 * src/main.c (stage): Adjust.
14256 Report only when trace_flag.
14257
14258 2002-07-29 Akim Demaille <akim@epita.fr>
14259
14260 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14261 state_number_t.
14262 (errs_t): symbol_t*, not symbol_number_t.
14263 (reductions_t): rule_t*, not rule_number_t.
14264 (FOR_EACH_SHIFT): New.
14265 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14266 * src/print.c, src/print_graph.c: Adjust.
14267
14268 2002-07-29 Akim Demaille <akim@epita.fr>
14269
14270 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14271
14272 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14273 (endtoken, accept): these.
14274 * src/reader.c (reader): Set endtoken's default tag to "$end".
14275 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14276 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14277 Adjust.
14278
14279 2002-07-29 Akim Demaille <akim@epita.fr>
14280
14281 * src/reduce.c (reduce_grammar): When the language is empty,
14282 complain about the start symbol, not the axiom.
14283 Use its location.
14284 * tests/reduce.at (Empty Language): New.
14285
14286 2002-07-26 Akim Demaille <akim@epita.fr>
14287
14288 * src/reader.h, src/reader.c (gram_error): ... can't get
14289 yycontrol without making too strong assumptions on the parser
14290 itself.
14291 * src/output.c (prepare_tokens): Use the real 0th value of
14292 token_translations instead of `0'.
14293 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14294 visible here.
14295 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14296 for the time being: %locations ought to provide it to yyerror.
14297
14298 2002-07-25 Akim Demaille <akim@epita.fr>
14299
14300 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14301 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14302 * tests/regression.at (Web2c Actions): Adjust.
14303
14304 2002-07-25 Akim Demaille <akim@epita.fr>
14305
14306 Stop storing rules from 1 to nrules + 1.
14307
14308 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14309 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14310 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14311 Iterate from 0 to nrules.
14312 Use rule_number_as_item_number and item_number_as_rule_number.
14313 Adjust to `derive' now containing possibly 0.
14314 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14315 Handle the `- 1' part in rule numbers from/to item numbers.
14316 * src/conflicts.c (log_resolution): Fix the message which reversed
14317 shift and reduce.
14318 * src/output.c (action_row): Initialize default_rule to -1.
14319 (token_actions): Adjust.
14320 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14321 expected output.
14322 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14323
14324 2002-07-25 Akim Demaille <akim@epita.fr>
14325
14326 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14327 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14328 (b4_c_knr_arg_decl): New.
14329 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14330 yyreport_parse_error.
14331
14332 2002-07-25 Akim Demaille <akim@epita.fr>
14333
14334 * data/yacc.c (yyreport_parse_error): New, extracted from...
14335 (yyparse): here.
14336 (yydestruct, yysymprint): Move above yyparse.
14337 Be K&R compliant.
14338
14339 2002-07-25 Akim Demaille <akim@epita.fr>
14340
14341 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14342 replace...
14343 (b4_sint_type, b4_uint_type): these.
14344 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14345 * tests/regression.at (Web2c Actions): Adjust.
14346
14347 2002-07-25 Akim Demaille <akim@epita.fr>
14348
14349 * src/gram.h (TIEM_NUMBER_MAX): New.
14350 (item_number_of_rule_number, rule_number_of_item_number): Rename
14351 as...
14352 (rule_number_as_item_number, item_number_as_rule_number): these.
14353 Adjust dependencies.
14354 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14355 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14356 (symbol_number_to_vector_number): New.
14357 (order): Of vector_number_t* type.
14358 (base_t, BASE_MAX, BASE_MIN): New.
14359 (froms, tos, width, pos, check): Of base_t type.
14360 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14361 (actrow): Of action_number_t type.
14362 (conflrow): Of unsigned int type.
14363 (table_ninf, base_ninf): New.
14364 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14365 (muscle_insert_int_table, muscle_insert_base_table)
14366 (muscle_insert_rule_number_table): New.
14367 (prepare_tokens): Output `toknum' as int_table.
14368 (action_row): Returns a rule_number_t.
14369 Use ACTION_MIN, not SHRT_MIN.
14370 (token_actions): yydefact is rule_number_t*.
14371 (table_ninf_remap): New.
14372 (pack_table): Use it for `base' and `table'.
14373 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14374 replaced with...
14375 (YYPACT_NINF, YYTABLE_NINF): these.
14376 (yypact, yytable): Compute their types instead of hard-coded
14377 `short'.
14378 * tests/regression.at (Web2c Actions): Adjust.
14379
14380 2002-07-19 Akim Demaille <akim@epita.fr>
14381
14382 * src/scan-gram.l (id): Can start with an underscore.
14383
14384 2002-07-16 Akim Demaille <akim@epita.fr>
14385
14386 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14387 Adjust all former `associativity' dependencies.
14388 * src/symtab.c (symbol_new): Default associativity is `undef', not
14389 `right'.
14390 (symbol_check_alias_consistence): Adjust.
14391
14392 2002-07-09 Akim Demaille <akim@epita.fr>
14393
14394 * doc/bison.texinfo: Properly set the ``header'' part.
14395 Use @dircategory ``GNU programming tools'' as per Texinfo's
14396 documentation.
14397 Use @copying.
14398
14399 2002-07-09 Akim Demaille <akim@epita.fr>
14400
14401 * lib/quotearg.h: Protect against multiple inclusions.
14402 * src/location.h (location_t): Add a `file' member.
14403 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14404 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14405 `error_one_per_line' support.
14406
14407 2002-07-09 Akim Demaille <akim@epita.fr>
14408
14409 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14410 * src/reader.c (lineno): Remove.
14411 Adjust all dependencies.
14412 (get_merge_function): Take a location and use complain_at.
14413 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14414 * tests/regression.at (Invalid inputs, Mixing %token styles):
14415 Adjust.
14416
14417 2002-07-09 Akim Demaille <akim@epita.fr>
14418
14419 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14420 recovery rule, and forbid extensions when --yacc.
14421 (gram_error): Use complain_at.
14422 * src/reader.c (reader): Exit if there were parse errors.
14423
14424 2002-07-09 Akim Demaille <akim@epita.fr>
14425
14426 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14427 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14428 Reported by R Blake <blakers@mac.com>.
14429
14430 2002-07-09 Akim Demaille <akim@epita.fr>
14431
14432 * data/yacc.c: Output the copyright notive in the header.
14433
14434 2002-07-03 Akim Demaille <akim@epita.fr>
14435
14436 * src/output.c (froms, tos): Are state_number_t.
14437 (save_column): sp, sp1, and sp2 are state_number_t.
14438 (prepare): Rename `final' as `final_state_number', `nnts' as
14439 `nterms_number', `nrules' as `rules_number', `nstates' as
14440 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14441 unused.
14442 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14443 * data/lalr1.cc (nsym_): Remove, unused.
14444
14445 2002-07-03 Akim Demaille <akim@epita.fr>
14446
14447 * src/lalr.h, src/lalr.c (goto_number_t): New.
14448 * src/lalr.c (goto_list_t): New.
14449 Propagate them.
14450 * src/nullable.c (rule_list_t): New.
14451 Propagate.
14452 * src/types.h: Remove.
14453
14454 2002-07-03 Akim Demaille <akim@epita.fr>
14455
14456 * src/closure.c (print_fderives): Use rule_rhs_print.
14457 * src/derives.c (print_derives): Use rule_rhs_print.
14458 (rule_list_t): New, replaces `shorts'.
14459 (set_derives): Add comments.
14460 * tests/sets.at (Nullable, Firsts): Adjust.
14461
14462 2002-07-03 Akim Demaille <akim@epita.fr>
14463
14464 * src/output.c (prepare_actions): Free `tally' and `width'.
14465 (prepare_actions): Allocate and free `order'.
14466 * src/symtab.c (symbols_free): Free `symbols'.
14467 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14468 * src/output.c (m4_invoke): Move to...
14469 * src/scan-skel.l: here.
14470 (<<EOF>>): Close yyout, and free its name.
14471
14472 2002-07-03 Akim Demaille <akim@epita.fr>
14473
14474 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14475
14476 * src/LR0.c (new_state): Merge into...
14477 (state_list_append): this.
14478 (new_states): Merge into...
14479 (generate_states): here.
14480 (set_states): Don't ensure a proper `errs' state member here, do it...
14481 * src/conflicts.c (conflicts_solve): here.
14482 * src/state.h, src/state.c: Comment changes.
14483 (state_t): Rename member `shifts' as `transitions'.
14484 Adjust all dependencies.
14485 (errs_new): For consistency, also take the values as argument.
14486 (errs_dup): Remove.
14487 (state_errs_set): New.
14488 (state_reductions_set, state_transitions_set): Assert that no
14489 previous value was assigned.
14490 (state_free): New.
14491 (states_free): Use it.
14492 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14493 temporary storage: use `errs' and `nerrs' as elsewhere.
14494 (set_conflicts): Allocate and free this `errs'.
14495
14496 2002-07-02 Akim Demaille <akim@epita.fr>
14497
14498 * lib/libiberty.h: New.
14499 * lib: Update the bitset implementation from upstream.
14500 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14501 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14502 * src/main.c: Adjust bitset stats calls.
14503
14504 2002-07-01 Paul Eggert <eggert@twinsun.com>
14505
14506 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14507 char, so that negative chars don't collide with $.
14508
14509 2002-06-30 Akim Demaille <akim@epita.fr>
14510
14511 Have the GLR tests be `warning' checked, and fix the warnings.
14512
14513 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14514 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14515 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14516 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14517 (yyaddDeferredAction): static.
14518 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14519 (yyreportParseError): yyprefix is const.
14520 yytokenp is used only when verbose.
14521 (yy__GNUC__): Replace with __GNUC__.
14522 (yypdumpstack): yyi is size_t.
14523 (yypreference): Un-yy local variables and arguments, to avoid
14524 clashes with `yyr1'. Anyway, we are not in the user name space.
14525 (yytname_size): be an int, as is compared with ints.
14526 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14527 Use them.
14528 * tests/cxx-gram.at: Use quotation to protect $1.
14529 Use AT_COMPILE to enable warnings hunts.
14530 Prototype yylex and yyerror.
14531 `Use' argc.
14532 Include `string.h', not `strings.h'.
14533 Produce and prototype stmtMerge only when used.
14534 yylex takes a location.
14535
14536 2002-06-30 Akim Demaille <akim@epita.fr>
14537
14538 We spend a lot of time in quotearg, in particular when --verbose.
14539
14540 * src/symtab.c (symbol_get): Store a quoted version of the key.
14541 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14542 Adjust all callers.
14543
14544 2002-06-30 Akim Demaille <akim@epita.fr>
14545
14546 * src/state.h (reductions_t): Rename member `nreds' as num.
14547 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14548 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14549
14550 2002-06-30 Akim Demaille <akim@epita.fr>
14551
14552 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14553 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14554 (shifts_to): Rename as...
14555 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14556 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14557 (TRANSITION_IS_DISABLED, transitions_to): these.
14558
14559 2002-06-30 Akim Demaille <akim@epita.fr>
14560
14561 * src/print.c (print_shifts, print_gotos): Merge into...
14562 (print_transitions): this.
14563 (print_transitions, print_errs, print_reductions): Align the
14564 lookaheads columns.
14565 (print_core, print_transitions, print_errs, print_state,
14566 print_grammar): Output empty lines separator before, not after.
14567 (state_default_rule_compute): Rename as...
14568 (state_default_rule): this.
14569 * tests/conflicts.at (Defaulted Conflicted Reduction),
14570 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14571 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14572
14573 2002-06-30 Akim Demaille <akim@epita.fr>
14574
14575 Display items as we display rules.
14576
14577 * src/gram.h, src/gram.c (rule_lhs_print): New.
14578 * src/gram.c (grammar_rules_partial_print): Use it.
14579 * src/print.c (print_core): Likewise.
14580 * tests/conflicts.at (Defaulted Conflicted Reduction),
14581 (Unresolved SR Conflicts): Adjust.
14582 (Unresolved SR Conflicts): Adjust and rename as...
14583 (Resolved SR Conflicts): this, as was meant.
14584 * tests/regression.at (Web2c Report): Adjust.
14585
14586 2002-06-30 Akim Demaille <akim@epita.fr>
14587
14588 * src/print.c (state_default_rule_compute): New, extracted from...
14589 (print_reductions): here.
14590 Pessimize, but clarify the code.
14591 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14592
14593 2002-06-30 Akim Demaille <akim@epita.fr>
14594
14595 * src/output.c (action_row): Let default_rule be always a rule
14596 number.
14597
14598 2002-06-30 Akim Demaille <akim@epita.fr>
14599
14600 * src/closure.c (print_firsts, print_fderives, closure):
14601 Use BITSET_EXECUTE.
14602 * src/lalr.c (lookaheads_print): Likewise.
14603 * src/state.c (state_rule_lookaheads_print): Likewise.
14604 * src/print_graph.c (print_core): Likewise.
14605 * src/print.c (print_reductions): Likewise.
14606 * src/output.c (action_row): Likewise.
14607 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
14608
14609 2002-06-30 Akim Demaille <akim@epita.fr>
14610
14611 * src/print_graph.c: Use report_flag.
14612
14613 2002-06-30 Akim Demaille <akim@epita.fr>
14614
14615 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
14616 to...
14617 * src/relation.h, src/relation.c (traverse, relation_digraph)
14618 (relation_print, relation_transpose): New.
14619
14620 2002-06-30 Akim Demaille <akim@epita.fr>
14621
14622 * src/state.h, src/state.c (shifts_to): New.
14623 * src/lalr.c (build_relations): Use it.
14624
14625 2002-06-30 Akim Demaille <akim@epita.fr>
14626
14627 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
14628 (item_number_of_rule_number, rule_number_of_item_number): New.
14629 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
14630 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14631 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
14632 Propagate their use.
14633 Much remains to be done, in particular wrt `shorts' from types.h.
14634
14635 2002-06-30 Akim Demaille <akim@epita.fr>
14636
14637 * src/symtab.c (symbol_new): Initialize the `printer' member.
14638
14639 2002-06-30 Akim Demaille <akim@epita.fr>
14640
14641 * src/LR0.c (save_reductions): Remove, replaced by...
14642 * src/state.h, src/state.c (state_reductions_set): New.
14643 (reductions, errs): Rename as...
14644 (reductions_t, errs_t): these.
14645 Adjust all dependencies.
14646
14647 2002-06-30 Akim Demaille <akim@epita.fr>
14648
14649 * src/LR0.c (state_list_t, state_list_append): New.
14650 (first_state, last_state): Now symbol_list_t.
14651 (this_state): Remove.
14652 (new_itemsets, append_states, save_reductions): Take a state_t as
14653 argument.
14654 (set_states, generate_states): Adjust.
14655 (save_shifts): Remove, replaced by...
14656 * src/state.h, src/state.c (state_shifts_set): New.
14657 (shifts): Rename as...
14658 (shifts_t): this.
14659 Adjust all dependencies.
14660 * src/state.h (state_t): Remove the `next' member.
14661
14662 2002-06-30 Akim Demaille <akim@epita.fr>
14663
14664 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
14665 escaped in slot 0.
14666
14667 2002-06-30 Akim Demaille <akim@epita.fr>
14668
14669 Use hash.h for the state hash table.
14670
14671 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14672 (allocate_storage): Use state_hash_new.
14673 (free_storage): Use state_hash_free.
14674 (new_state, get_state): Adjust.
14675 * src/lalr.h, src/lalr.c (states): Move to...
14676 * src/states.h (state_t): Remove the `link' member, no longer
14677 used.
14678 * src/states.h, src/states.c: here.
14679 (state_hash_new, state_hash_free, state_hash_lookup)
14680 (state_hash_insert, states_free): New.
14681 * src/states.c (state_table, state_compare, state_hash): New.
14682 * src/output.c (output_actions): Do not free states now, since we
14683 still need to know the final_state number in `prepare', called
14684 afterwards. Do it...
14685 * src/main.c (main): here: call states_free after `output'.
14686
14687 2002-06-30 Akim Demaille <akim@epita.fr>
14688
14689 * src/state.h, src/state.c (state_new): New, extracted from...
14690 * src/LR0.c (new_state): here.
14691 * src/state.h (STATE_ALLOC): Move to...
14692 * src/state.c: here.
14693 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
14694 * src/state.h, src/state.c: here.
14695
14696 2002-06-30 Akim Demaille <akim@epita.fr>
14697
14698 * src/reader.c (gensym): Rename as...
14699 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
14700 (getsym): Rename as...
14701 (symbol_get): this.
14702
14703 2002-06-30 Akim Demaille <akim@epita.fr>
14704
14705 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
14706 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
14707 * src/output.c, src/print.c, src/print_graph.c: Propagate.
14708 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
14709
14710 2002-06-30 Akim Demaille <akim@epita.fr>
14711
14712 Make the test suite pass with warnings checked.
14713
14714 * tests/actions.at (Printers and Destructors): Improve.
14715 Avoid unsigned vs. signed issues.
14716 * tests/calc.at: Don't exercise the scanner here, do it...
14717 * tests/input.at (Torturing the Scanner): here.
14718
14719 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14720
14721 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
14722 reorganize first lines parallel to yacc.c.
14723
14724 2002-06-28 Akim Demaille <akim@epita.fr>
14725
14726 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
14727 (b4_token_enum, b4_token_defines): New, factored from...
14728 * data/lalr1.cc, data/yacc.c, glr.c: here.
14729
14730 2002-06-28 Akim Demaille <akim@epita.fr>
14731
14732 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
14733 unused variables.
14734 * src/output.c (merger_output): static.
14735
14736 2002-06-28 Akim Demaille <akim@epita.fr>
14737
14738 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
14739 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
14740 pacify GCC.
14741 * src/output.c (save_row): Initialize all the variables to pacify GCC.
14742
14743 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14744
14745 Accumulated changelog for new GLR parsing features.
14746
14747 * src/conflicts.c (count_total_conflicts): Change name to
14748 conflicts_total_count.
14749 * src/conflicts.h: Ditto.
14750 * src/output.c (token_actions): Use the new name.
14751 (output_conflicts): Change conflp => conflict_list_heads, and
14752 confl => conflict_list for better readability.
14753 * data/glr.c: Use the new names.
14754 * NEWS: Add self to GLR announcement.
14755
14756 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
14757
14758 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
14759 Akim Demaille.
14760
14761 * data/bison.glr: Change name to glr.c
14762 * data/glr.c: Renamed from bison.glr.
14763 * data/Makefile.am: Add glr.c
14764
14765 * src/getargs.c:
14766
14767 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
14768 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
14769
14770 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14771
14772 * data/bison.glr: Be sure to restore the
14773 current #line when returning to the skeleton contents after having
14774 exposed the input file's #line.
14775
14776 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14777
14778 * data/bison.glr: Bring up to date with changes to bison.simple.
14779
14780 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14781
14782 * data/bison.glr: Correct definitions that use b4_prefix.
14783 Various reformatting.
14784 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14785 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14786 yytokenp argument; now part of stack.
14787 (yychar): Define to behave as documented.
14788 (yyclearin): Ditto.
14789
14790 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14791
14792 * src/reader.h: Add declaration for free_merger_functions.
14793
14794 * src/reader.c (merge_functions): New variable.
14795 (get_merge_function): New function.
14796 (free_merger_functions): New function.
14797 (readgram): Check for %prec that is not followed by a symbol.
14798 Handle %dprec and %merge declarations.
14799 (packgram): Initialize dprec and merger fields in rules array.
14800
14801 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14802 conflict_list_cnt, conflict_list_free): New variables.
14803 (table_grow): Also grow conflict_table.
14804 (prepare_rules): Output dprec and merger tables.
14805 (conflict_row): New function.
14806 (action_row): Output conflict lists for GLR parser. Don't use
14807 default reduction in conflicted states for GLR parser so that there
14808 are spaces for the conflict lists.
14809 (save_row): Also save conflict information.
14810 (token_actions): Allocate conflict list.
14811 (merger_output): New function.
14812 (pack_vector): Pack conflict table, too.
14813 (output_conflicts): New function to output yyconflp and yyconfl.
14814 (output_check): Allocate conflict_tos.
14815 (output_actions): Output conflict tables, also.
14816 (output_skeleton): Output b4_mergers definition.
14817 (prepare): Output b4_max_rhs_length definition.
14818 Use 'bison.glr' as default skeleton for GLR parsers.
14819
14820 * src/gram.c (glr_parser): New flag.
14821 (grammar_free): Call free_merger_functions.
14822
14823 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14824 all pairs of conflicting reductions, rather than just all tokens
14825 causing conflicts. Needed to size conflict tables.
14826 (conflicts_output): Modify call to count_rr_conflicts for new
14827 interface.
14828 (conflicts_print): Ditto.
14829 (count_total_conflicts): New function.
14830
14831 * src/reader.h (merger_list): New type.
14832 (merge_functions): New variable.
14833
14834 * src/lex.h (tok_dprec, tok_merge): New token types.
14835
14836 * src/gram.h (rule_s): Add dprec and merger fields.
14837 (glr_parser): New flag.
14838
14839 * src/conflicts.h (count_total_conflicts): New function.
14840
14841 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14842
14843 * doc/bison.texinfo (Generalized LR Parsing): New section.
14844 (GLR Parsers): New section.
14845 (Language and Grammar): Mention GLR parsing.
14846 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14847 Correct typo ("tge" -> "the").
14848
14849 * data/bison.glr: New skeleton for GLR parsing.
14850
14851 * tests/cxx-gram.at: New tests for GLR parsing.
14852
14853 * tests/testsuite.at: Include cxx-gram.at.
14854
14855 * tests/Makefile.am: Add cxx-gram.at.
14856
14857 * src/parse-gram.y:
14858
14859 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14860
14861 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
14862
14863 2002-06-27 Akim Demaille <akim@epita.fr>
14864
14865 * src/options.h, src/options.c: Remove.
14866 * src/getargs.c (short_options, long_options): New.
14867
14868 2002-06-27 Akim Demaille <akim@epita.fr>
14869
14870 * data/bison.simple, data/bison.c++: Rename as...
14871 * data/yacc.c, data/lalr1.cc: these.
14872 * doc/bison.texinfo (Environment Variables): Remove.
14873
14874 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14875
14876 * src/getargs.c (report_argmatch): Initialize strtok().
14877
14878 2002-06-20 Akim Demaille <akim@epita.fr>
14879
14880 * data/bison.simple (b4_symbol_actions): New, replaces...
14881 (b4_symbol_destructor, b4_symbol_printer): these.
14882 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14883 user token numbers.
14884
14885 2002-06-20 Akim Demaille <akim@epita.fr>
14886
14887 * data/bison.simple (yydestructor): Rename as...
14888 (yydestruct): this.
14889
14890 2002-06-20 Akim Demaille <akim@epita.fr>
14891
14892 * src/symtab.h, src/symtab.c (symbol_type_set)
14893 (symbol_destructor_set, symbol_precedence_set): The location is
14894 the last argument.
14895 Adjust all callers.
14896
14897 2002-06-20 Akim Demaille <akim@epita.fr>
14898
14899 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14900 internals.
14901 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14902 Takes a location.
14903 * src/symtab.h, src/symtab.c (symbol_class_set)
14904 (symbol_user_token_number_set): Likewise.
14905 Adjust all callers.
14906 Promote complain_at.
14907 * tests/input.at (Type Clashes): Adjust.
14908
14909 2002-06-20 Akim Demaille <akim@epita.fr>
14910
14911 * data/bison.simple (YYLEX): Fix the declaration when
14912 %pure-parser.
14913
14914 2002-06-20 Akim Demaille <akim@epita.fr>
14915
14916 * data/bison.simple (yysymprint): Don't print the token number,
14917 just its name.
14918 * tests/actions.at (Destructors): Rename as...
14919 (Printers and Destructors): this.
14920 Also exercise %printer.
14921
14922 2002-06-20 Akim Demaille <akim@epita.fr>
14923
14924 * data/bison.simple (YYDSYMPRINT): New.
14925 Use it to remove many of the #if YYDEBUG/if (yydebug).
14926
14927 2002-06-20 Akim Demaille <akim@epita.fr>
14928
14929 * src/symtab.h, src/symtab.c (symbol_t): printer and
14930 printer_location are new members.
14931 (symbol_printer_set): New.
14932 * src/parse-gram.y (PERCENT_PRINTER): New token.
14933 Handle its associated rule.
14934 * src/scan-gram.l: Adjust.
14935 (handle_destructor_at, handle_destructor_dollar): Rename as...
14936 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14937 * src/output.c (symbol_printers_output): New.
14938 (output_skeleton): Call it.
14939 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14940 since there are already many grammar files with a user `yyprint'.
14941 Replace the calls to YYPRINT to calls to yysymprint.
14942 * tests/calc.at: Adjust.
14943 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14944 taking advantage of parser very internal details (stack size!).
14945
14946 2002-06-20 Akim Demaille <akim@epita.fr>
14947
14948 * src/scan-gram.l: Complete the scanner with the missing patterns
14949 to pacify Flex.
14950 Use `quote' and `symbol_tag_get' where appropriate.
14951
14952 2002-06-19 Akim Demaille <akim@epita.fr>
14953
14954 * tests/actions.at (Destructors): Augment to test locations.
14955 * data/bison.simple (yydestructor): Pass it the current location
14956 if locations are enabled.
14957 Prototype only when __STDC__ or C++.
14958 Change the argument names to move into the yy name space: there is
14959 user code here.
14960
14961 2002-06-19 Akim Demaille <akim@epita.fr>
14962
14963 * data/bison.simple (b4_pure_if): New.
14964 Use it instead of #ifdef YYPURE.
14965
14966 2002-06-19 Akim Demaille <akim@epita.fr>
14967
14968 * data/bison.simple (b4_location_if): New.
14969 Use it instead of #ifdef YYLSP_NEEDED.
14970
14971 2002-06-19 Akim Demaille <akim@epita.fr>
14972
14973 Prepare @$ in %destructor, but currently don't bind it in the
14974 skeleton, as %location use is not cleaned up yet.
14975
14976 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14977 (handle_action_at): New.
14978 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14979 a braced_code_t and a location as additional arguments.
14980 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14981 unquote one when outputting `b4_dollar_dollar'.
14982 Adjust callers.
14983 * data/bison.simple (b4_eval): Remove.
14984 (b4_symbol_destructor): Adjust.
14985 * tests/input.at (Invalid @n): Adjust.
14986
14987 2002-06-19 Zack Weinberg <zack@codesourcery.com>
14988
14989 * doc/bison.texinfo: Document ability to have multiple
14990 prologue sections.
14991
14992 2002-06-18 Akim Demaille <akim@epita.fr>
14993
14994 * src/files.c (compute_base_names): When computing the output file
14995 names from the input file name, strip the directory part.
14996
14997 2002-06-18 Akim Demaille <akim@epita.fr>
14998
14999 * data/bison.simple.new: Comment changes.
15000 Reported by Andreas Schwab.
15001
15002 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15003
15004 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15005 there are no `label `yyoverflowlab' defined but not used' warnings
15006 when yyoverflow is defined.
15007
15008 2002-06-18 Akim Demaille <akim@epita.fr>
15009
15010 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15011 new member.
15012 (symbol_destructor_set): Adjust.
15013 * src/output.c (symbol_destructors_output): Output the destructor
15014 locations.
15015 Output the symbol name.
15016 * data/bison.simple (b4_symbol_destructor): Adjust.
15017
15018 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15019 and Akim Demaille <akim@epita.fr>
15020
15021 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15022 what's left on the stack when the error recovery hits EOF.
15023 * tests/actions.at (Destructors): Complete to exercise this case.
15024
15025 2002-06-17 Akim Demaille <akim@epita.fr>
15026
15027 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15028 arguments is really empty, not only equal to `[]'.
15029 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15030 member.
15031 (symbol_destructor_set): New.
15032 * src/output.c (symbol_destructors_output): New.
15033 * src/reader.h (brace_code_t, current_braced_code): New.
15034 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15035 (handle_dollar): Rename as...
15036 (handle_action_dollar): this.
15037 (handle_destructor_dollar): New.
15038 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15039 (grammar_declaration): Use it.
15040 * data/bison.simple (yystos): Is always defined.
15041 (yydestructor): New.
15042 * tests/actions.at (Destructors): New.
15043 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15044
15045 2002-06-17 Akim Demaille <akim@epita.fr>
15046
15047 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15048 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15049 rule_length only when needed.
15050 * src/output.c (actions_output, token_definitions_output): Output
15051 the full M4 block.
15052 * src/symtab.c: Don't access directly to the symbol tag, use
15053 symbol_tag_get.
15054 * src/parse-gram.y: Use symbol_list_free.
15055
15056 2002-06-17 Akim Demaille <akim@epita.fr>
15057
15058 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15059 (symbol_list_prepend, get_type_name): Move to...
15060 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15061 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15062 Adjust all callers.
15063 (symbol_list_free): New.
15064 * src/scan-gram.l (handle_dollar): Takes a location.
15065 * tests/input.at (Invalid $n): Adjust.
15066
15067 2002-06-17 Akim Demaille <akim@epita.fr>
15068
15069 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15070 (symbol_list_prepend): New.
15071 * src/parse-gram.y (%union): `list' is a new member.
15072 (symbols.1): New, replaces...
15073 (terms_to_prec.1, nterms_to_type.1): these.
15074 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15075 Take a location as additional argument.
15076 Adjust all callers.
15077
15078 2002-06-15 Akim Demaille <akim@epita.fr>
15079
15080 * src/parse-gram.y: Move %token in the declaration section so that
15081 we don't depend upon CVS Bison.
15082
15083 2002-06-15 Akim Demaille <akim@epita.fr>
15084
15085 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15086 * src/print.c (print_core): Use it.
15087
15088 2002-06-15 Akim Demaille <akim@epita.fr>
15089
15090 * src/conflicts.c (log_resolution): Accept the rule involved in
15091 the sr conflicts instead of the lookahead number that points to
15092 that rule.
15093 (flush_reduce): Accept the current lookahead vector as argument,
15094 instead of the index in LA.
15095 (resolve_sr_conflict): Accept the current number of lookahead
15096 bitset to consider for the STATE, instead of the index in LA.
15097 (set_conflicts): Adjust.
15098 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15099
15100 2002-06-15 Akim Demaille <akim@epita.fr>
15101
15102 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15103 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15104 Adjust all dependencies.
15105 * src/lalr.c (initialize_lookaheads): Split into...
15106 (states_lookaheads_count, states_lookaheads_initialize): these.
15107 (lalr): Adjust.
15108
15109 2002-06-15 Akim Demaille <akim@epita.fr>
15110
15111 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15112 out of...
15113 (grammar_rules_print): here.
15114 * src/reduce.c (reduce_output): Use it.
15115 * tests/reduce.at (Useless Rules, Reduced Automaton)
15116 (Underivable Rules): Adjust.
15117
15118 2002-06-15 Akim Demaille <akim@epita.fr>
15119
15120 Copy BYacc's nice way to report the grammar.
15121
15122 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15123 New.
15124 Don't print the rules' location, it is confusing and useless.
15125 (rule_print): Use grammar_rhs_print.
15126 * src/print.c (print_grammar): Use grammar_rules_print.
15127
15128 2002-06-15 Akim Demaille <akim@epita.fr>
15129
15130 Complete and rationalize `useless thing' warnings.
15131
15132 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15133 (symbol_tag_print): New.
15134 Use them everywhere in place of accessing directly the tag member.
15135 * src/gram.h, src/gram.c (rule_print): New.
15136 Use it where a rule used to be printed `by hand'.
15137 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15138 (reduce_grammar_tables): Report the useless rules.
15139 (reduce_print): Useless things are a warning, not an error.
15140 Report it as such.
15141 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15142 (Reduced Automaton, Underivable Rules): Adjust.
15143 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15144 * tests/conflicts.at (Unresolved SR Conflicts)
15145 (Solved SR Conflicts): Adjust.
15146
15147 2002-06-15 Akim Demaille <akim@epita.fr>
15148
15149 Let symbols have a location.
15150
15151 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15152 (getsym): Adjust.
15153 Adjust all callers.
15154 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15155 Use location_t, not int.
15156 * src/symtab.c (symbol_check_defined): Take advantage of the
15157 location.
15158 * tests/regression.at (Invalid inputs): Adjust.
15159
15160 2002-06-15 Akim Demaille <akim@epita.fr>
15161
15162 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15163 (input): Don't try to initialize yylloc here, do it in the
15164 scanner.
15165 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15166 * src/gram.h (rule_t): Change line and action_line into location
15167 and action_location, of location_t type.
15168 Adjust all dependencies.
15169 * src/location.h, src/location.c (empty_location): New.
15170 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15171 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15172 (grammar_current_rule_symbol_append)
15173 (grammar_current_rule_action_append): Expect a location as argument.
15174 * src/reader.c (grammar_midrule_action): Adjust to attach an
15175 action's location as dummy symbol location.
15176 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15177 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15178 the line numbers.
15179
15180 2002-06-14 Akim Demaille <akim@epita.fr>
15181
15182 Grammar declarations may be found in the grammar section.
15183
15184 * src/parse-gram.y (rules_or_grammar_declaration): New.
15185 (declarations): Each declaration may end with a semicolon, not
15186 just...
15187 (grammar_declaration): `"%union"'.
15188 (grammar): Branch to rules_or_grammar_declaration.
15189
15190 2002-06-14 Akim Demaille <akim@epita.fr>
15191
15192 * src/main.c (main): Invoke scanner_free.
15193
15194 2002-06-14 Akim Demaille <akim@epita.fr>
15195
15196 * src/output.c (m4_invoke): Extracted from...
15197 (output_skeleton): here.
15198 Free tempfile.
15199
15200 2002-06-14 Akim Demaille <akim@epita.fr>
15201
15202 * src/parse-gram.y (directives, directive, gram)
15203 (grammar_directives, precedence_directives, precedence_directive):
15204 Rename as...
15205 (declarations, declaration, grammar, grammar_declaration)
15206 (precedence_declaration, precedence_declarator): these.
15207 (symbol_declaration): New.
15208
15209 2002-06-14 Akim Demaille <akim@epita.fr>
15210
15211 * src/files.c (action_obstack): Remove, unused.
15212 (output_obstack): Remove it, and all its dependencies, as it is no
15213 longer needed.
15214 * src/reader.c (epilogue_set): Build the epilogue in the
15215 muscle_obstack.
15216 * src/output.h, src/output.c (muscle_obstack): Move to...
15217 * src/muscle_tab.h, src/muscle_tab.h: here.
15218 (muscle_init): Initialize muscle_obstack.
15219 (muscle_free): New.
15220 * src/main.c (main): Call it.
15221
15222 2002-06-14 Akim Demaille <akim@epita.fr>
15223
15224 * src/location.h: New, extracted from...
15225 * src/reader.h: here.
15226 * src/Makefile.am (noinst_HEADERS): Merge into
15227 (bison_SOURCES): this.
15228 Add location.h.
15229 * src/parse-gram.y: Use location_t instead of Bison's.
15230 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15231 Use location_t instead of ints.
15232
15233 2002-06-14 Akim Demaille <akim@epita.fr>
15234
15235 * data/bison.simple, data/bison.c++: Be sure to restore the
15236 current #line when returning to the skeleton contents after having
15237 exposed the input file's #line.
15238
15239 2002-06-12 Akim Demaille <akim@epita.fr>
15240
15241 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15242 eager.
15243 * tests/actions.at (Exotic Dollars): New.
15244
15245 2002-06-12 Akim Demaille <akim@epita.fr>
15246
15247 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15248 ['"/] too eagerly.
15249 * tests/input.at (Torturing the Scanner): New.
15250
15251 2002-06-11 Akim Demaille <akim@epita.fr>
15252
15253 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15254 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15255 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15256 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15257 * src/reader.c (reader): Use it.
15258
15259 2002-06-11 Akim Demaille <akim@epita.fr>
15260
15261 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15262 Adjust all callers.
15263 (scanner_last_string_free): New.
15264
15265 2002-06-11 Akim Demaille <akim@epita.fr>
15266
15267 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15268 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15269 (last_string, YY_OBS_FREE): New.
15270 Use them when returning an ID.
15271
15272 2002-06-11 Akim Demaille <akim@epita.fr>
15273
15274 Have Bison grammars parsed by a Bison grammar.
15275
15276 * src/reader.c, src/reader.h (prologue_augment): New.
15277 * src/reader.c (copy_definition): Remove.
15278
15279 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15280 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15281 (grammar_current_rule_prec_set, grammar_current_rule_check)
15282 (grammar_current_rule_symbol_append)
15283 (grammar_current_rule_action_append): Export.
15284 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15285 (symbol_list_action_append): Remove.
15286 Hook the routines from reader.
15287 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15288 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15289
15290 * src/reader.c (read_declarations): Remove, unused.
15291
15292 * src/parse-gram.y: Handle the epilogue.
15293 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15294 (grammar_start_symbol_set): this.
15295 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15296 * src/reader.c (readgram): Remove, unused.
15297 (reader): Adjust to insert eoftoken and axiom where appropriate.
15298
15299 * src/reader.c (copy_dollar): Replace with...
15300 * src/scan-gram.h (handle_dollar): this.
15301 * src/parse-gram.y: Remove `%thong'.
15302
15303 * src/reader.c (copy_at): Replace with...
15304 * src/scan-gram.h (handle_at): this.
15305
15306 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15307 New.
15308
15309 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15310 time being.
15311
15312 * src/reader.h, src/reader.c (grammar_rule_end): New.
15313
15314 * src/parse.y (current_type, current_class): New.
15315 Implement `%nterm', `%token' support.
15316 Merge `%term' into `%token'.
15317 (string_as_id): New.
15318 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15319 type name.
15320
15321 * src/parse-gram.y: Be sure to handle properly the beginning of
15322 rules.
15323
15324 * src/parse-gram.y: Handle %type.
15325 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15326
15327 * src/parse-gram.y: More directives support.
15328 * src/options.c: No longer handle source directives.
15329
15330 * src/parse-gram.y: Fix %output.
15331
15332 * src/parse-gram.y: Handle %union.
15333 Use the prologue locations.
15334 * src/reader.c (parse_union_decl): Remove.
15335
15336 * src/reader.h, src/reader.c (epilogue_set): New.
15337 * src/parse-gram.y: Use it.
15338
15339 * data/bison.simple, data/bison.c++: b4_stype is now either not
15340 defined, then default to int, or to the contents of %union,
15341 without `union' itself.
15342 Adjust.
15343 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15344
15345 * src/output.c (actions_output): Don't output braces, as they are
15346 already handled by the scanner.
15347
15348 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15349 characters to themselves.
15350
15351 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15352 that the epilogue has a proper #line.
15353
15354 * src/parse-gram.y: Handle precedence/associativity.
15355
15356 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15357 a terminal.
15358 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15359 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15360 at all to define terminals that cannot be emitted.
15361
15362 * src/scan-gram.l: Escape M4 characters.
15363
15364 * src/scan-gram.l: Working properly with escapes in user
15365 strings/characters.
15366
15367 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15368 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15369 grammar.
15370 Use more modest sizes, as for the time being the parser does not
15371 release memory, and therefore the process swallows a huge amount
15372 of memory.
15373
15374 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15375 stricter %token grammar.
15376
15377 * src/symtab.h (associativity): Add `undef_assoc'.
15378 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15379 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15380
15381 * tests/regression.at (Invalid %directive): Remove, as it is now
15382 meaningless.
15383 (Invalid inputs): Adjust to the new error messages.
15384 (Token definitions): The new grammar doesn't allow too many
15385 eccentricities.
15386
15387 * src/lex.h, src/lex.c: Remove.
15388 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15389 (copy_character, copy_string2, copy_string, copy_identifier)
15390 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15391 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15392 (parse_action): Remove.
15393 * po/POTFILES.in: Adjust.
15394
15395 2002-06-11 Akim Demaille <akim@epita.fr>
15396
15397 * src/reader.c (parse_action): Don't store directly into the
15398 rule's action member: return the action as a string.
15399 Don't require `rule_length' as an argument: compute it.
15400 (grammar_current_rule_symbol_append)
15401 (grammar_current_rule_action_append): New, eved out from
15402 (readgram): here.
15403 Remove `action_flag', `rulelength', unused now.
15404
15405 2002-06-11 Akim Demaille <akim@epita.fr>
15406
15407 * src/reader.c (grammar_current_rule_prec_set).
15408 (grammar_current_rule_check): New, eved out from...
15409 (readgram): here.
15410 Remove `xaction', `first_rhs': useless.
15411 * tests/input.at (Type clashes): New.
15412 * tests/existing.at (GNU Cim Grammar): Adjust.
15413
15414 2002-06-11 Akim Demaille <akim@epita.fr>
15415
15416 * src/reader.c (grammar_midrule_action): New, Eved out from
15417 (readgram): here.
15418
15419 2002-06-11 Akim Demaille <akim@epita.fr>
15420
15421 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15422 New.
15423 (readgram): Use them as replacement of inlined code, crule and
15424 crule1.
15425
15426 2002-06-11 Akim Demaille <akim@epita.fr>
15427
15428 * src/reader.c (grammar_end, grammar_symbol_append): New.
15429 (readgram): Use them.
15430 Make the use of `p' as local as possible.
15431
15432 2002-06-10 Akim Demaille <akim@epita.fr>
15433
15434 GCJ's parser requires the tokens to be defined before the prologue.
15435
15436 * data/bison.simple: Output the token definition before the user's
15437 prologue.
15438 * tests/regression.at (Braces parsing, Duplicate string)
15439 (Mixing %token styles): Check the output from bison.
15440 (Early token definitions): New.
15441
15442 2002-06-10 Akim Demaille <akim@epita.fr>
15443
15444 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15445 assigning twice the same user number to a token, so that we can
15446 use it in...
15447 * src/lex.c (lex): here.
15448 Also use `symbol_class_set' instead of hand written code.
15449 * src/reader.c (parse_assoc_decl): Likewise.
15450
15451 2002-06-10 Akim Demaille <akim@epita.fr>
15452
15453 * src/symtab.c, src/symtab.c (symbol_class_set)
15454 (symbol_user_token_number_set): New.
15455 * src/reader.c (parse_token_decl): Use them.
15456 Use a switch instead of ifs.
15457 Use a single argument.
15458
15459 2002-06-10 Akim Demaille <akim@epita.fr>
15460
15461 Remove `%thong' support as it is undocumented, unused, duplicates
15462 `%token's job, and creates useless e-mail traffic with people who
15463 want to know what it is, why it is undocumented, unused, and
15464 duplicates `%token's job.
15465
15466 * src/reader.c (parse_thong_decl): Remove.
15467 * src/options.c (option_table): Remove "thong".
15468 * src/lex.h (tok_thong): Remove.
15469
15470 2002-06-10 Akim Demaille <akim@epita.fr>
15471
15472 * src/symtab.c, src/symtab.c (symbol_type_set)
15473 (symbol_precedence_set): New.
15474 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15475 (value_components_used): Remove, unused.
15476
15477 2002-06-09 Akim Demaille <akim@epita.fr>
15478
15479 Move symbols handling code out of the reader.
15480
15481 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15482 (axiom): Move to...
15483 * src/symtab.h, src/symtab.c: here.
15484
15485 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15486 * src/reader.c (startval): Rename as...
15487 * src/symtab.h, src/symtab.c (startsymbol): this.
15488 * src/reader.c: Adjust.
15489
15490 * src/reader.c (symbol_check_defined, symbol_make_alias)
15491 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15492 (token_translations_init)
15493 Move to...
15494 * src/symtab.c: here.
15495 * src/reader.c (packsymbols): Move to...
15496 * src/symtab.h, src/symtab.c (symbols_pack): here.
15497 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15498 argument.
15499
15500 2002-06-03 Akim Demaille <akim@epita.fr>
15501
15502 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15503 then statements.
15504
15505 2002-06-03 Akim Demaille <akim@epita.fr>
15506
15507 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15508 structs with non literals.
15509 * src/scan-skel.l: never-interactive.
15510 * src/conflicts.c (enum conflict_resolution_e): No trailing
15511 comma.
15512 * src/getargs.c (usage): Split long literal strings.
15513 Reported by Hans Aberg.
15514
15515 2002-05-28 Akim Demaille <akim@epita.fr>
15516
15517 * data/bison.c++: Use C++ ostreams.
15518 (cdebug_): New member.
15519
15520 2002-05-28 Akim Demaille <akim@epita.fr>
15521
15522 * src/output.c (output_skeleton): Be sure to allocate enough room
15523 for `/' _and_ for `\0' in full_skeleton.
15524
15525 2002-05-28 Akim Demaille <akim@epita.fr>
15526
15527 * data/bison.c++: Catch up with bison.simple:
15528 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15529 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15530 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15531 and popping traces.
15532
15533 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15534
15535 * src/output.c (output_skeleton): Put an explicit path in front of
15536 the skeleton file name, rather than relying on the -I directory,
15537 to partially alleviate effects of having a skeleton file lying around
15538 in the current directory.
15539
15540 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15541
15542 * src/conflicts.c (log_resolution): Correct typo:
15543 obstack_printf should be obstack_fgrow1.
15544
15545 2002-05-26 Akim Demaille <akim@epita.fr>
15546
15547 * src/state.h (state_t): `solved_conflicts' is a new member.
15548 * src/LR0.c (new_state): Set it to 0.
15549 * src/conflicts.h, src/conflicts.c (print_conflicts)
15550 (free_conflicts, solve_conflicts): Rename as...
15551 (conflicts_print, conflicts_free, conflicts_solve): these.
15552 Adjust callers.
15553 * src/conflicts.c (enum conflict_resolution_e)
15554 (solved_conflicts_obstack): New, used by...
15555 (log_resolution): this.
15556 Adjust to attach the conflict resolution to each state.
15557 Complete the description with the precedence/associativity
15558 information.
15559 (resolve_sr_conflict): Adjust.
15560 * src/print.c (print_state): Output its solved_conflicts.
15561 * tests/conflicts.at (Unresolved SR Conflicts)
15562 (Solved SR Conflicts): Exercise --report=all.
15563
15564 2002-05-26 Akim Demaille <akim@epita.fr>
15565
15566 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15567 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15568 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15569 (token_number_t, item_number_as_token_number)
15570 (token_number_as_item_number, muscle_insert_token_number_table):
15571 Rename as...
15572 (symbol_number_t, item_number_as_symbol_number)
15573 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15574 these, since it is more appropriate.
15575
15576 2002-05-26 Akim Demaille <akim@epita.fr>
15577
15578 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15579 `Error:' lines.
15580 * data/bison.simple (yystos) [YYDEBUG]: New.
15581 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15582 error recovery.
15583 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15584
15585 2002-05-25 Akim Demaille <akim@epita.fr>
15586
15587 * doc/bison.texinfo (Debugging): Split into...
15588 (Tracing): this new section, its former contents, and...
15589 (Understanding): this new section.
15590 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15591 by...
15592 (report_flag): this.
15593 Adjust all dependencies.
15594 (report_args, report_types, report_argmatch): New.
15595 (usage, getargs): Report/support -r, --report.
15596 * src/options.h
15597 (struct option_table_struct): Rename as..,
15598 (struct option_table_s): this.
15599 Rename the `set_flag' member to `flag' to match with getopt_long's
15600 struct.
15601 * src/options.c (option_table): Split verbose into an entry for
15602 %verbose, and another for --verbose.
15603 Support --report/-r, so remove -r from the obsolete --raw.
15604 * src/print.c: Attach full item sets and lookaheads reports to
15605 report_flag instead of trace_flag.
15606 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
15607
15608 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15609 and Paul Eggert <eggert@twinsun.com>
15610
15611 * data/bison.simple (yyparse): Correct error handling to conform to
15612 POSIX and yacc. Specifically, after syntax error is discovered,
15613 do not reduce further before shifting the error token.
15614 Clean up the code a bit by removing the labels yyerrdefault,
15615 yyerrhandle, yyerrpop.
15616 * NEWS: Document the above.
15617
15618 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15619
15620 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
15621 type; it isn't always big enough, since it doesn't necessarily
15622 include non-terminals.
15623 (yytranslate): Expand definition of yy_token_number_type, so that
15624 the latter can be removed.
15625 (yy_token_number_type): Remove, only one use.
15626 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
15627 don't use TokenNumberType as element type.
15628
15629 * tests/regression.at: Modify expected output to agree with change
15630 to yyr1 and yytranslate.
15631
15632 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
15633
15634 * src/reader.c (parse_action): Use copy_character instead of
15635 obstack_1grow.
15636
15637 2002-05-13 Akim Demaille <akim@epita.fr>
15638
15639 * tests/regression.at (Token definitions): Prototype yylex and
15640 yyerror.
15641
15642 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15643
15644 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
15645 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
15646 32-bit arithmetic.
15647 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
15648
15649 2002-05-07 Akim Demaille <akim@epita.fr>
15650
15651 * tests/synclines.at: Be sure to prototype yylex and yyerror to
15652 avoid GCC warnings.
15653
15654 2002-05-07 Akim Demaille <akim@epita.fr>
15655
15656 Kill GCC warnings.
15657
15658 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
15659 over the RHS of each rule.
15660 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
15661 * src/state.h (state_t): Member `nitems' is unsigned short.
15662 * src/LR0.c (get_state): Adjust.
15663 * src/reader.c (packgram): Likewise.
15664 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
15665 `Type'.
15666 (muscle_insert_int_table): Remove, unused.
15667 (prepare_rules): Remove `max'.
15668
15669 2002-05-06 Akim Demaille <akim@epita.fr>
15670
15671 * src/closure.c (print_firsts): Display of the symbol tags.
15672 (bitmatrix_print): Move to...
15673 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15674 here.
15675 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15676
15677 2002-05-06 Akim Demaille <akim@epita.fr>
15678
15679 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15680 hash_do_for_each.
15681
15682 2002-05-06 Akim Demaille <akim@epita.fr>
15683
15684 * src/LR0.c (new_state, get_state): Instead of using the global
15685 `kernel_size' and `kernel_base', have two new arguments:
15686 `core_size' and `core'.
15687 Adjust callers.
15688
15689 2002-05-06 Akim Demaille <akim@epita.fr>
15690
15691 * src/reader.c (packgram): No longer end `ritem' with a 0
15692 sentinel: it is not used.
15693
15694 2002-05-05 Akim Demaille <akim@epita.fr>
15695
15696 New experimental feature: display the lookaheads in the report and
15697 graph.
15698
15699 * src/print (print_core): When --trace-flag, display the rules
15700 lookaheads.
15701 * src/print_graph.c (print_core): Likewise.
15702 Swap the arguments.
15703 Adjust caller.
15704
15705 2002-05-05 Akim Demaille <akim@epita.fr>
15706
15707 * tests/torture.at (Many lookaheads): New test.
15708
15709 2002-05-05 Akim Demaille <akim@epita.fr>
15710
15711 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
15712 (GENERATE_MUSCLE_INSERT_TABLE): this.
15713 (output_int_table, output_unsigned_int_table, output_short_table)
15714 (output_token_number_table, output_item_number_table): Replace with...
15715 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
15716 (muscle_insert_short_table, muscle_insert_token_number_table)
15717 (muscle_insert_item_number_table): these.
15718 Adjust all callers.
15719 (prepare_tokens): Don't free `translations', since...
15720 * src/reader.h, src/reader.c (grammar_free): do it.
15721 Move to...
15722 * src/gram.h, src/gram.c (grammar_free): here.
15723 * data/bison.simple, data/bison.c++: b4_token_number_max is now
15724 b4_translate_max.
15725
15726 2002-05-05 Akim Demaille <akim@epita.fr>
15727
15728 * src/output.c (output_unsigned_int_table): New.
15729 (prepare_rules): `i' is unsigned.
15730 `prhs', `rline', `r2' are unsigned int.
15731 Rename muscle `rhs_number_max' as `rhs_max'.
15732 Output muscles `prhs_max', `rline_max', and `r2_max'.
15733 Free rline and r1.
15734 * data/bison.simple, data/bison.c++: Adjust to use these muscles
15735 to compute types instead of constant types.
15736 * tests/regression.at (Web2c Actions): Adjust.
15737
15738 2002-05-04 Akim Demaille <akim@epita.fr>
15739
15740 * src/symtab.h (SALIAS, SUNDEF): Rename as...
15741 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
15742 Adjust dependencies.
15743 * src/output.c (token_definitions_output): Be sure not to output a
15744 `#define 'a'' when fed with `%token 'a' "a"'.
15745 * tests/regression.at (Token definitions): New.
15746
15747 2002-05-03 Paul Eggert <eggert@twinsun.com>
15748
15749 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
15750 for K&R C.
15751
15752 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
15753
15754 * Makefile.am (SUBDIRS): Remove intl.
15755 (EXTRA_DIST): Add config/config.rpath.
15756
15757 2002-05-03 Akim Demaille <akim@epita.fr>
15758
15759 * data/bison.simple (m4_if): Don't output empty enums.
15760 And actually, output valid enum definitions :(.
15761
15762 2002-05-03 Akim Demaille <akim@epita.fr>
15763
15764 * configure.bat: Remove, completely obsolete.
15765 * Makefile.am (EXTRA_DIST): Adjust.
15766 Don't distribute config.rpath...
15767 * config/Makefile.am (EXTRA_DIST): Do it.
15768
15769 2002-05-03 Akim Demaille <akim@epita.fr>
15770
15771 * configure.in (GETTEXT_VERSION): New.
15772 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15773
15774 2002-05-03 Akim Demaille <akim@epita.fr>
15775
15776 * data/bison.simple (b4_token_enum): New.
15777 (b4_token_defines): Use it to output tokens both as #define and
15778 enums.
15779 Suggested by Paul Eggert.
15780 * src/output.c (token_definitions_output): Don't output spurious
15781 white spaces.
15782
15783 2002-05-03 Akim Demaille <akim@epita.fr>
15784
15785 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15786
15787 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
15788
15789 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15790 Update the stack class, give a try to deque as the default container.
15791
15792 2002-05-02 Akim Demaille <akim@epita.fr>
15793
15794 * data/bison.simple (yyparse): Do not implement @$ = @1.
15795 (YYLLOC_DEFAULT): Adjust to do it.
15796 * doc/bison.texinfo (Location Default Action): Fix.
15797
15798 2002-05-02 Akim Demaille <akim@epita.fr>
15799
15800 * src/reader.c (parse_braces): Merge into...
15801 (parse_action): this.
15802
15803 2002-05-02 Akim Demaille <akim@epita.fr>
15804
15805 * configure.in (ALL_LINGUAS): Remove.
15806 * po/LINGUAS, hr.po: New.
15807
15808 2002-05-02 Akim Demaille <akim@epita.fr>
15809
15810 Remove the so called hairy (semantic) parsers.
15811
15812 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15813 * src/gram.h, src/gram.c (semantic_parser): Remove.
15814 (rule_t): Remove the guard and guard_line members.
15815 * src/lex.h (token_t): remove tok_guard.
15816 * src/options.c (option_table): Remove %guard and %semantic_parser
15817 support.
15818 * src/output.c, src/output.h (guards_output): Remove.
15819 (prepare): Adjust.
15820 (token_definitions_output): Don't output the `T'
15821 tokens (???).
15822 (output_skeleton): Don't output the guards.
15823 * src/files.c, src/files.c (attrsfile): Remove.
15824 * src/reader.c (symbol_list): Remove the guard and guard_line
15825 members.
15826 Adjust dependencies.
15827 (parse_guard): Remove.
15828 * data/bison.hairy: Remove.
15829 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15830 BISON_HAIRY.
15831
15832 2002-05-02 Akim Demaille <akim@epita.fr>
15833
15834 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15835 (parse_guard): Rename the formal argument `stack_offset' as
15836 `rule_length', which is more readable.
15837 Adjust callers.
15838 (copy_at, copy_dollar): Instead of outputting the hard coded
15839 values of $$, $n and so forth, output invocation to b4_lhs_value,
15840 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
15841 Note: this patch partially drops `semantic-parser' support: it
15842 always does `rule_length - n', where semantic parsers ought to
15843 always use `-n'.
15844 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15845 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15846
15847 2002-05-02 Akim Demaille <akim@epita.fr>
15848
15849 * configure.in (AC_INIT): Bump to 1.49b.
15850 (AM_INIT_AUTOMAKE): Short invocation.
15851
15852 2002-05-02 Akim Demaille <akim@epita.fr>
15853
15854 Version 1.49a.
15855
15856 2002-05-01 Akim Demaille <akim@epita.fr>
15857
15858 * src/skeleton.h: Remove.
15859
15860 2002-05-01 Akim Demaille <akim@epita.fr>
15861
15862 * src/skeleton.h: Fix the #endif.
15863 Reported by Magnus Fromreide.
15864
15865 2002-04-26 Paul Eggert <eggert@twinsun.com>
15866
15867 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15868 Define if we define YYSTYPE and YYLTYPE, respectively.
15869 (YYCOPY): Fix [] quoting problem in the non-GCC case.
15870
15871 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
15872
15873 * src/scan-skel.l: Postprocess quadrigraphs.
15874
15875 * src/reader.c (copy_character): New function, used to output
15876 single characters while replacing `[' and `]' with quadrigraphs, to
15877 avoid troubles with M4 quotes.
15878 (copy_comment): Output characters with copy_character.
15879 (read_additionnal_code): Likewise.
15880 (copy_string2): Likewise.
15881 (copy_definition): Likewise.
15882
15883 * tests/calc.at: Exercise M4 quoting.
15884
15885 2002-04-25 Akim Demaille <akim@epita.fr>
15886
15887 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15888 between `!' and the command.
15889 Reported by Paul Eggert.
15890
15891 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
15892
15893 * tests/calc.at: Exercise prologue splitting.
15894
15895 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15896 `b4_post_prologue' instead of `b4_prologue'.
15897
15898 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15899 muscles.
15900 (output): Free pre_prologue_obstack and post_prologue_obstack.
15901 * src/files.h, src/files.c (attrs_obstack): Remove.
15902 (pre_prologue_obstack, post_prologue_obstack): New.
15903 * src/reader.c (copy_definition): Add a parameter to specify the
15904 obstack to fill, instead of using attrs_obstack unconditionally.
15905 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15906 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15907
15908 2002-04-23 Paul Eggert <eggert@twinsun.com>
15909
15910 * data/bison.simple: Remove unnecessary commentary and white
15911 space differences from 1_29-branch.
15912 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15913
15914 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15915 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15916 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15917 constructors or destructors.
15918
15919 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15920
15921 2002-04-23 Akim Demaille <akim@epita.fr>
15922
15923 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15924 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15925 location with columns.
15926 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15927 All reported by Paul Eggert.
15928
15929 2002-04-22 Akim Demaille <akim@epita.fr>
15930
15931 * src/reduce.c (dump_grammar): Move to...
15932 * src/gram.h, src/gram.c (grammar_dump): here.
15933 Be sure to separate long item numbers.
15934 Don't read the members of a rule's prec if its nil.
15935
15936 2002-04-22 Akim Demaille <akim@epita.fr>
15937
15938 * src/output.c (table_size, table_grow): New.
15939 (MAXTABLE): Remove, replace uses with table_size.
15940 (pack_vector): Instead of dying when the table is too big, grow it.
15941
15942 2002-04-22 Akim Demaille <akim@epita.fr>
15943
15944 * data/bison.simple (yyr1): Its type is that of a token number.
15945 * data/bison.c++ (r1_): Likewise.
15946 * tests/regression.at (Web2c Actions): Adjust.
15947
15948 2002-04-22 Akim Demaille <akim@epita.fr>
15949
15950 * src/reader.c (token_translations_init): 256 is now the default
15951 value for the error token, i.e., it will be assigned another
15952 number if the user assigned 256 to one of her tokens.
15953 (reader): Don't force 256 to error.
15954 * doc/bison.texinfo (Symbols): Adjust.
15955 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15956 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15957 etc. instead of 10, 20, 30 (which was used to `jump' over error
15958 (256) and undefined (2)).
15959
15960 2002-04-22 Akim Demaille <akim@epita.fr>
15961
15962 Propagate more token_number_t.
15963
15964 * src/gram.h (token_number_as_item_number)
15965 (item_number_as_token_number): New.
15966 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15967 Use it to create output_item_number_table and
15968 output_token_number_table.
15969 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15970 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15971 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15972 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15973
15974 2002-04-22 Akim Demaille <akim@epita.fr>
15975
15976 * src/output.h, src/output.c (get_lines_number): Remove.
15977
15978 2002-04-19 Akim Demaille <akim@epita.fr>
15979
15980 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15981 as Lex/Flex'.
15982 (Debugging): More details about enabling the debugging features.
15983 (Table of Symbols): Describe $$, $n, @$, and @n.
15984 Suggested by Tim Josling.
15985
15986 2002-04-19 Akim Demaille <akim@epita.fr>
15987
15988 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15989
15990 2002-04-10 Akim Demaille <akim@epita.fr>
15991
15992 * src/system.h: Rely on HAVE_LIMITS_H.
15993 Suggested by Paul Eggert.
15994
15995 2002-04-09 Akim Demaille <akim@epita.fr>
15996
15997 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15998 full stderr, and strip it according to the bison options, instead
15999 of composing the error message from different bits.
16000 This makes it easier to check for several error messages.
16001 Adjust all the invocations.
16002 Add an invocation exercising the error token.
16003 Add an invocation demonstrating a stupid error message.
16004 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16005 Adjust the tests.
16006 Error message are for stderr, not stdout.
16007
16008 2002-04-09 Akim Demaille <akim@epita.fr>
16009
16010 * src/gram.h, src/gram.c (error_token_number): Remove, use
16011 errtoken->number.
16012 * src/reader.c (reader): Don't specify the user token number (2)
16013 for $undefined, as it uselessly prevents using it.
16014 * src/gram.h (token_number_t): Move to...
16015 * src/symtab.h: here.
16016 (state_t.number): Is a token_number_t.
16017 * src/print.c, src/reader.c: Use undeftoken->number instead of
16018 hard coded 2.
16019 (Even though this 2 is not the same as above: the number of the
16020 undeftoken remains being 2, it is its user token number which
16021 might not be 2).
16022 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16023 `user_token_number_max'.
16024 Output `undef_token_number'.
16025 * data/bison.simple, data/bison.c++: Use them.
16026 Be sure to map invalid yylex return values to
16027 `undef_token_number'. This saves us from gratuitous SEGV.
16028
16029 * tests/conflicts.at (Solved SR Conflicts)
16030 (Unresolved SR Conflicts): Adjust.
16031 * tests/regression.at (Web2c Actions): Adjust.
16032
16033 2002-04-08 Akim Demaille <akim@epita.fr>
16034
16035 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16036 Adding #line.
16037 Remove the duplicate `typedefs'.
16038 (RhsNumberType): Fix the declaration and various other typos.
16039 Use __ofile__.
16040 * data/bison.simple: Use __ofile__.
16041 * src/scan-skel.l: Handle __ofile__.
16042
16043 2002-04-08 Akim Demaille <akim@epita.fr>
16044
16045 * src/gram.h (item_number_t): New, the type of item numbers in
16046 RITEM. Note that it must be able to code symbol numbers as
16047 positive number, and the negation of rule numbers as negative
16048 numbers.
16049 Adjust all dependencies (pretty many).
16050 * src/reduce.c (rule): Remove this `short *' pointer: use
16051 item_number_t.
16052 * src/system.h (MINSHORT, MAXSHORT): Remove.
16053 Include `limits.h'.
16054 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16055 (shortcpy): Remove.
16056 (MAXTABLE): Move to...
16057 * src/output.c (MAXTABLE): here.
16058 (prepare_rules): Use output_int_table to output rhs.
16059 * data/bison.simple, data/bison.c++: Adjust.
16060 * tests/torture.at (Big triangle): Move the limit from 254 to
16061 500.
16062 * tests/regression.at (Web2c Actions): Ajust.
16063
16064 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16065 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16066 passes, but produces negative #line number, once fixed, GCC is
16067 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16068 C), it passes.
16069 * src/state.h (state_h): Code input lines on ints, not shorts.
16070
16071 2002-04-08 Akim Demaille <akim@epita.fr>
16072
16073 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16074 and then the grammar.
16075
16076 2002-04-08 Akim Demaille <akim@epita.fr>
16077
16078 * src/system.h: No longer using strndup.
16079
16080 2002-04-07 Akim Demaille <akim@epita.fr>
16081
16082 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16083 * src/output.c (output_table_data): Return the longest number.
16084 (prepare_tokens): Output `token_number_max').
16085 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16086 New.
16087 Use them to define yy_token_number_type/TokenNumberType.
16088 Use this type for yytranslate.
16089 * tests/torture.at (Big triangle): Push the limit from 124 to
16090 253.
16091 * tests/regression.at (Web2c Actions): Adjust.
16092
16093 2002-04-07 Akim Demaille <akim@epita.fr>
16094
16095 * tests/torture.at (Big triangle): New.
16096 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16097 * tests/existing.at: here.
16098
16099 2002-04-07 Akim Demaille <akim@epita.fr>
16100
16101 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16102 nritems.
16103 Adjust dependencies.
16104
16105 2002-04-07 Akim Demaille <akim@epita.fr>
16106
16107 * src/reader.c: Normalize increments to prefix form.
16108
16109 2002-04-07 Akim Demaille <akim@epita.fr>
16110
16111 * src/reader.c, symtab.c: Remove debugging code.
16112
16113 2002-04-07 Akim Demaille <akim@epita.fr>
16114
16115 Rename all the `bucket's as `symbol_t'.
16116
16117 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16118 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16119 * src/symtab.c, src/symtab.h (bucket): Rename as...
16120 (symbol_t): this.
16121 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16122 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16123 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16124 (buckets_new, buckets_free, buckets_do): Rename as...
16125 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16126 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16127 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16128 (symbols_new, symbols_free, symbols_do): these.
16129
16130 2002-04-07 Akim Demaille <akim@epita.fr>
16131
16132 Use lib/hash for the symbol table.
16133
16134 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16135 EOF.
16136 * src/lex.c (lex): Set the `number' member of new terminals.
16137 * src/reader.c (bucket_check_defined, bucket_make_alias)
16138 (bucket_check_alias_consistence, bucket_translation): New.
16139 (reader, grammar_free, readgram, token_translations_init)
16140 (packsymbols): Adjust.
16141 (reader): Number the predefined tokens.
16142 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16143 for predefined tokens.
16144 * src/symtab.h (bucket): Remove all the hash table related
16145 members.
16146 * src/symtab.c (symtab): Replace by...
16147 (bucket_table): this.
16148 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16149 (buckets_new, buckets_do): New.
16150
16151 2002-04-07 Akim Demaille <akim@epita.fr>
16152
16153 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16154 (start_symbol, max_user_token_number, semantic_parser)
16155 (error_token_number): Initialize.
16156 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16157 Initialize.
16158 (reader): Don't.
16159 (errtoken, eoftoken, undeftoken, axiom): Extern.
16160
16161 2002-04-07 Akim Demaille <akim@epita.fr>
16162
16163 * src/gram.h (rule_s): prec and precsym are now pointers
16164 to the bucket giving the priority/associativity.
16165 Member `associativity' removed: useless.
16166 * src/reduce.c, src/conflicts.c: Adjust.
16167
16168 2002-04-07 Akim Demaille <akim@epita.fr>
16169
16170 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16171 Properly escape the symbols' TAG when outputting them.
16172
16173 2002-04-07 Akim Demaille <akim@epita.fr>
16174
16175 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16176
16177 2002-04-07 Akim Demaille <akim@epita.fr>
16178
16179 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16180 (LArule): this, which is an array to rule_t*.
16181 * src/print.c, src/conflicts.c: Adjust.
16182
16183 2002-04-07 Akim Demaille <akim@epita.fr>
16184
16185 * src/gram.h (rule_t): Rename `number' as `user_number'.
16186 `number' is a new member.
16187 Adjust dependencies.
16188 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16189
16190 2002-04-07 Akim Demaille <akim@epita.fr>
16191
16192 As a result of the previous patch, it is no longer needed
16193 to reorder ritem itself.
16194
16195 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16196
16197 2002-04-07 Akim Demaille <akim@epita.fr>
16198
16199 Be sure never to walk through RITEMS, but use only data related to
16200 the rules themselves. RITEMS should be banished.
16201
16202 * src/output.c (output_token_translations): Rename as...
16203 (prepare_tokens): this.
16204 In addition to `translate', prepare the muscles `tname' and
16205 `toknum', which were handled by...
16206 (output_rule_data): this.
16207 Remove, and move the remainder of its outputs into...
16208 (prepare_rules): this new routines, which also merges content from
16209 (output_gram): this.
16210 (prepare_rules): Be sure never to walk through RITEMS.
16211 (output_stos): Rename as...
16212 (prepare_stos): this.
16213 (output): Always invoke prepare_states, after all, just don't use it
16214 in the output if you don't need it.
16215
16216 2002-04-07 Akim Demaille <akim@epita.fr>
16217
16218 * src/LR0.c (new_state): Display `nstates' as the name of the
16219 newly created state.
16220 Adjust to initialize first_state and last_state if needed.
16221 Be sure to distinguish the initial from the final state.
16222 (new_states): Create the itemset of the initial state, and use
16223 new_state.
16224 * src/closure.c (closure): Now that the initial state has its
16225 items properly set, there is no need for a special case when
16226 creating `ruleset'.
16227
16228 As a result, now the rule 0, reducing to $axiom, is visible in the
16229 outputs. Adjust the test suite.
16230
16231 * tests/conflicts.at (Solved SR Conflicts)
16232 (Unresolved SR Conflicts): Adjust.
16233 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16234 * tests/conflicts.at (S/R in initial): New.
16235
16236 2002-04-07 Akim Demaille <akim@epita.fr>
16237
16238 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16239 the RHS of the rules.
16240 * src/output.c (output_gram): Likewise.
16241
16242 2002-04-07 Akim Demaille <akim@epita.fr>
16243
16244 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16245 bucket.
16246 Adjust all dependencies.
16247 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16248 `number' of the buckets too.
16249 * src/gram.h: Include `symtab.h'.
16250 (associativity): Move to...
16251 * src/symtab.h: here.
16252 No longer include `gram.h'.
16253
16254 2002-04-07 Akim Demaille <akim@epita.fr>
16255
16256 * src/gram.h, src/gram.c (rules_rhs_length): New.
16257 (ritem_longest_rhs): Use it.
16258 * src/gram.h (rule_t): `number' is a new member.
16259 * src/reader.c (packgram): Set it.
16260 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16261 the end of `rules', and count them out of `nrules'.
16262 (reduce_output, dump_grammar): Adjust.
16263 * src/print.c (print_grammar): It is no longer needed to check for
16264 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16265 * tests/reduce.at (Reduced Automaton): New test.
16266
16267 2002-04-07 Akim Demaille <akim@epita.fr>
16268
16269 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16270 lacking `+ 1' to nrules, Bison reported as useless a token if it
16271 was used solely to set the precedence of the last rule...
16272
16273 2002-04-07 Akim Demaille <akim@epita.fr>
16274
16275 * data/bison.c++, data/bison.simple: Don't output the current file
16276 name in #line, to avoid useless diffs between two identical
16277 outputs under different names.
16278
16279 2002-04-07 Akim Demaille <akim@epita.fr>
16280
16281 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16282 Normalize loops to using `< nrules + 1', not `<= nrules'.
16283
16284 2002-04-07 Akim Demaille <akim@epita.fr>
16285
16286 * TODO: Update.
16287
16288 2002-04-07 Akim Demaille <akim@epita.fr>
16289
16290 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16291 bucket.value as bucket.number.
16292
16293 2002-04-07 Akim Demaille <akim@epita.fr>
16294
16295 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16296 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16297 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16298 RHS, instead of being an index in RITEMS.
16299
16300 2002-04-04 Paul Eggert <eggert@twinsun.com>
16301
16302 * doc/bison.texinfo: Update copyright date.
16303 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16304 (Symbols): Warn about running Bison in one character set,
16305 but compiling and/or running in an incompatible one.
16306 Warn about character code 256, too.
16307
16308 2002-04-03 Paul Eggert <eggert@twinsun.com>
16309
16310 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16311 YYERROR_VERBOSE is nonzero, not whether it is defined.
16312
16313 Merge changes from bison-1_29-branch.
16314
16315 2002-03-20 Paul Eggert <eggert@twinsun.com>
16316
16317 Merge fixes from Debian bison_1.34-1.diff.
16318
16319 * configure.in (AC_PREREQ): 2.53.
16320
16321 2002-03-20 Akim Demaille <akim@epita.fr>
16322
16323 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16324
16325 2002-03-19 Paul Eggert <eggert@twinsun.com>
16326
16327 * src/bison.simple (YYCOPY): New macro.
16328 (YYSTACK_RELOCATE): Use it.
16329 Remove Type arg; no longer needed. All callers changed.
16330 (yymemcpy): Remove; no longer needed.
16331
16332 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16333 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16334
16335 2002-03-19 Akim Demaille <akim@epita.fr>
16336
16337 Test and fix the #line outputs.
16338
16339 * tests/atlocal.at (GCC): New.
16340 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16341 (Prologue synch line, %union synch line, Postprologue synch line)
16342 (Action synch line, Epilogue synch line): New tests.
16343 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16344 * data/bison.simple, data/bison.c++: Use it.
16345
16346 2002-03-19 Akim Demaille <akim@epita.fr>
16347
16348 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16349 (Solved SR Conflicts, %expect not enough, %expect right)
16350 (%expect too much): Move to...
16351 * tests/conflicts.at: this new file.
16352
16353 2002-03-19 Akim Demaille <akim@epita.fr>
16354
16355 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16356 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16357 that we can move to enums for instance.
16358 * src/output.c (token_definitions_output): Output a list of
16359 `token-name, token-number' instead of the #define.
16360 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16361
16362 2002-03-14 Akim Demaille <akim@epita.fr>
16363
16364 Use Gettext 0.11.1.
16365
16366 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
16367
16368 * data/bison.c++: Make the user able to add members to the generated
16369 parser by subclassing.
16370
16371 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
16372
16373 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16374 a character.
16375 Reported by Nicolas Tisserand and Nicolas Burrus.
16376
16377 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16378
16379 * src/reader.c: Warn about lacking semi-colons, do not complain.
16380
16381 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16382
16383 * data/bison.c++: Remove a debug line.
16384
16385 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16386
16387 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16388 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16389 provide a default implementation.
16390
16391 2002-03-04 Akim Demaille <akim@epita.fr>
16392
16393 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16394 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16395 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16396 * tests/semantic.at (Parsing Guards): Similarly.
16397 * src/reader.at (readgram): Complain if the last rule is not ended
16398 with a semi-colon.
16399
16400 2002-03-04 Akim Demaille <akim@epita.fr>
16401
16402 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16403 * src/closure.c: here.
16404 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16405 RTC.
16406 * src/warshall.h, src/warshall.c: Remove.
16407 * tests/sets.at (Broken Closure): Adjust.
16408
16409 2002-03-04 Akim Demaille <akim@epita.fr>
16410
16411 * src/output.c (output_skeleton): tempdir is const.
16412 bytes_read is unused.
16413
16414 2002-03-04 Akim Demaille <akim@epita.fr>
16415
16416 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16417 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16418 Update.
16419 From Michael Hayes.
16420
16421 2002-03-04 Akim Demaille <akim@epita.fr>
16422
16423 * src/closure.c (closure): `r' is unused.
16424
16425 2002-03-04 Akim Demaille <akim@epita.fr>
16426
16427 * tests/sets.at (Broken Closure): Add the ending `;'.
16428 * src/reader.at (readgram): Complain if a rule is not ended with a
16429 semi-colon.
16430
16431 2002-03-04 Akim Demaille <akim@epita.fr>
16432
16433 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16434 (count_sr_conflicts): Use bitset_count.
16435 * src/reduce.c (inaccessable_symbols): Ditto.
16436 (bits_size): Remove.
16437 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16438
16439 2002-03-04 Akim Demaille <akim@epita.fr>
16440
16441 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16442 * src/reduce.c: Remove the `bitset_zero's following the
16443 `bitset_create's, as now it is performed by the latter.
16444
16445 2002-03-04 Akim Demaille <akim@epita.fr>
16446
16447 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16448 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16449 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16450 latest sources from Michael.
16451
16452 2002-03-04 Akim Demaille <akim@epita.fr>
16453
16454 * src/output.c (output): Don't free the grammar.
16455 * src/reader.c (grammar_free): New.
16456 * src/main.c (main): Call it and don't free symtab here.
16457
16458 2002-03-04 Akim Demaille <akim@epita.fr>
16459
16460 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16461 before returning.
16462 Reported by Benoit Perrot.
16463
16464 2002-03-04 Akim Demaille <akim@epita.fr>
16465
16466 Use bitset operations when possible, not loops over bits.
16467
16468 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16469 bitset_or.
16470 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16471 * src/reduce.c (useless_nonterminals): Formatting changes.
16472 * src/warshall.c (TC): Use bitset_or.
16473
16474 2002-03-04 Akim Demaille <akim@epita.fr>
16475
16476 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16477 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16478 Ditto.
16479
16480 2002-03-04 Akim Demaille <akim@epita.fr>
16481
16482 * src/lalr.c (F): Now a bitset*.
16483 Adjust all dependencies.
16484
16485 2002-03-04 Akim Demaille <akim@epita.fr>
16486
16487 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16488 Adjust all dependencies.
16489
16490 2002-03-04 Akim Demaille <akim@epita.fr>
16491
16492 * src/L0.c, src/LR0.h (nstates): Be size_t.
16493 Adjust comparisons (signed vs unsigned).
16494 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16495 bitset*.
16496 Adjust all dependencies.
16497
16498 2002-03-04 Akim Demaille <akim@epita.fr>
16499
16500 * src/closure.c (firsts): Now, also a bitset.
16501 Adjust all dependencies.
16502 (varsetsize): Remove, now unused.
16503 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16504
16505 2002-03-04 Akim Demaille <akim@epita.fr>
16506
16507 * src/print.c: Convert to use bitset.h, not hand coded iterations
16508 over ints.
16509
16510 2002-03-04 Akim Demaille <akim@epita.fr>
16511
16512 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16513
16514 2002-03-04 Akim Demaille <akim@epita.fr>
16515
16516 * src/closure.c (ruleset): Be a bitset.
16517 (rulesetsize): Remove.
16518
16519 2002-03-04 Akim Demaille <akim@epita.fr>
16520
16521 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16522 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16523 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16524 * src/closure.c (fderives): Be an array of bitsets.
16525
16526 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
16527
16528 * data/bison.c++: Merge the two generated headers. Insert a copyright
16529 notice in each output file.
16530
16531 2002-02-28 Akim Demaille <akim@epita.fr>
16532
16533 * data/bison.c++: Copy the prologue of bison.simple to fetch
16534 useful M4 definitions, such as b4_header_guard.
16535
16536 2002-02-25 Akim Demaille <akim@epita.fr>
16537
16538 * src/getargs.c (version): Give the name of the authors, and use a
16539 translator friendly scheme for the bgr
16540 copyright notice.
16541
16542 2002-02-25 Akim Demaille <akim@epita.fr>
16543
16544 * src/output.c (header_output): Remove, now handled completely via
16545 M4.
16546
16547 2002-02-25 Akim Demaille <akim@epita.fr>
16548
16549 * m4/m4.m4: New, from CVS Autoconf.
16550 * configure.in: Invoke it.
16551 * src/output.c (output_skeleton): Use its result instead of the
16552 hard coded name.
16553
16554 2002-02-25 Akim Demaille <akim@epita.fr>
16555
16556 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16557 Fileutils 4.1.5.
16558 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16559 * src/output.c (output_skeleton): Use mkstemp to create a real
16560 temporary file.
16561 Move the filling of `skeleton' and its muscle to...
16562 (prepare): here.
16563 (output): Move the definition of the prologue muscle to...
16564 (prepare): here.
16565 * src/system.h (DEFAULT_TMPDIR): New.
16566
16567 2002-02-14 Paul Eggert <eggert@twinsun.com>
16568
16569 Remove the support for C++ namespace cleanliness; it was
16570 causing more problems than it was curing, since it didn't work
16571 properly on some nonstandard C++ compilers. This can wait
16572 for a proper C++ parser.
16573
16574 * NEWS: Document this.
16575 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16576 of C++, as it's treated like C now.
16577 * src/bison.simple (YYSTD): Remove.
16578 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16579 Treat C++ just like Standard C instead of trying to support
16580 namespace cleanliness.
16581
16582 2002-02-14 Akim Demaille <akim@epita.fr>
16583
16584 * tests/regression.at (else): Adjust to Andreas' change.
16585
16586 2002-02-14 Akim Demaille <akim@epita.fr>
16587
16588 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16589
16590 2002-02-13 Andreas Schwab <schwab@suse.de>
16591
16592 * src/output.c (output_rule_data): Don't output NULL, it might
16593 not be defined yet.
16594
16595 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
16596
16597 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
16598 (Copyright notice): Update.
16599
16600 2002-02-11 Akim Demaille <akim@epita.fr>
16601
16602 * tests/regression.at (%nonassoc and eof): Don't include
16603 nonportable headers.
16604
16605 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
16606
16607 * data/bison.c++: Correct error recovery. Make the user able to
16608 initialize the starting location.
16609
16610 2002-02-07 Akim Demaille <akim@epita.fr>
16611
16612 * tests/input.at: New.
16613
16614 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16615
16616 * data/bison.c++: Replace some direct m4 expansions by constants. Be
16617 more consistent when naming methods and variables. Put preprocessor
16618 directives around tables only needed for debugging.
16619
16620 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16621
16622 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
16623 C++ parsers.
16624 (yy::b4_name::parse): Use print_.
16625
16626 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16627
16628 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
16629
16630 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16631
16632 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
16633 C++ parsers.
16634 (yy::b4_name::parse): Build verbose error messages, and use error_.
16635
16636 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16637
16638 * data/bison.c++: Fix m4 quoting in comments.
16639
16640 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16641
16642 * data/bison.c++: Adjust the parser code. Fix some muscles that were
16643 not expanded by m4.
16644
16645 2002-02-05 Akim Demaille <akim@epita.fr>
16646
16647 * data/bison.c++: Adjust to the M4 back end.
16648 More is certainly needed.
16649
16650 2002-02-05 Akim Demaille <akim@epita.fr>
16651
16652 Give a try to M4 as a back end.
16653
16654 * lib/readpipe.c: New, from wdiff.
16655 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
16656 BISON_HAIRY.
16657 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
16658 specific values. Now it is m4 that performs the lookup.
16659 * src/parse-skel.y: Remove.
16660 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
16661 * src/output.c (actions_output, guards_output)
16662 (token_definitions_output): No longer keeps track of the output
16663 line number, hence remove the second argument.
16664 (guards_output): Check against the guard member of a rule, not the
16665 action member.
16666 Adjust callers.
16667 (output_skeleton): Don't look for the skeleton location, let m4 do
16668 that.
16669 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16670 file will be used.
16671 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16672 (prepare): Given that for the time being changesyntax is not
16673 usable in M4, rename the muscles using `-' to `_'.
16674 Define `defines_flag', `output_parser_name' and `output_header_name'.
16675 * src/output.h (actions_output, guards_output)
16676 (token_definitions_output): Adjust prototypes.
16677 * src/scan-skel.l: Instead of scanning the skeletons, it now
16678 processes the output of m4: `__oline__' and `#output'.
16679 * data/bison.simple: Adjust to be used by M4(sugar).
16680 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16681 to date.
16682 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16683 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16684 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
16685 shamelessly stolen from CVS Autoconf.
16686
16687 2002-02-05 Akim Demaille <akim@epita.fr>
16688
16689 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
16690 * configure.in: Check for the declarations of free and malloc.
16691 * src/muscle_tab.c: Adjust.
16692
16693 2002-02-05 Akim Demaille <akim@epita.fr>
16694
16695 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
16696 which have no values.
16697
16698 2002-02-05 Akim Demaille <akim@epita.fr>
16699
16700 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
16701 * data/: here.
16702
16703 2002-01-29 Paul Eggert <eggert@twinsun.com>
16704
16705 * src/bison.simple (YYSIZE_T): Do not define merely because
16706 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
16707 On some platforms, <alloca.h> does not declare YYSTD (size_t).
16708
16709 2002-01-27 Akim Demaille <akim@epita.fr>
16710
16711 Fix `%nonassoc and eof'.
16712
16713 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
16714 which were not properly copied! Replace
16715 memcpy (res->errs, src->errs, src->nerrs);
16716 with
16717 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16718 !!!
16719 * tests/regression.at (%nonassoc and eof): Adjust to newest
16720 Autotest: `.' is not in the PATH.
16721
16722 2002-01-27 Akim Demaille <akim@epita.fr>
16723
16724 * tests/sets.at (AT_EXTRACT_SETS): New.
16725 (Nullable): Use it.
16726 (Firsts): New.
16727
16728 2002-01-26 Akim Demaille <akim@epita.fr>
16729
16730 * tests/actions.at, tests/calc.at, tests/headers.at,
16731 * tests/torture.at: Adjust to the newest Autotest which no longer
16732 forces `.' in the PATH.
16733
16734 2002-01-25 Akim Demaille <akim@epita.fr>
16735
16736 * tests/regression.at (%nonassoc and eof): New.
16737 Suggested by Robert Anisko.
16738
16739 2002-01-24 Akim Demaille <akim@epita.fr>
16740
16741 Bison dumps core when trying to complain about broken input files.
16742 Reported by Cris van Pelt.
16743
16744 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
16745 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
16746 into...
16747 (Invalid inputs): Strengthen: exercise parse_percent_token.
16748
16749 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
16750
16751 * src/Makefile.am: Add bison.c++.
16752 * src/bison.c++: New skeleton.
16753
16754 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
16755
16756 * po/it.po: New.
16757
16758 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
16759
16760 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
16761
16762 2002-01-20 Marc Autret <marc@gnu.org>
16763
16764 * src/files.c (compute_output_file_names): Fix
16765
16766 2002-01-20 Marc Autret <marc@gnu.org>
16767
16768 * tests/output.at: New test.
16769 * src/files.c (compute_base_names): Don't map extensions when
16770 the YACC flag is set, use defaults.
16771 Reported by Evgeny Stambulchik.
16772
16773 2002-01-20 Marc Autret <marc@gnu.org>
16774
16775 * src/system.h: Need to define __attribute__ away for non-GCC
16776 compilers as well (i.e., the vendor C compiler).
16777 Suggested by Albert Chin-A-Young.
16778
16779 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16780
16781 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16782 canonical definition.
16783 * src/system.h: Use the canonical definition for PARAMS (avoids
16784 a conflict with the macro from lib/hash.h).
16785
16786 2002-01-11 Akim Demaille <akim@epita.fr>
16787
16788 * configure.in: Use AC_FUNC_STRNLEN.
16789 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
16790
16791 2002-01-09 Akim Demaille <akim@epita.fr>
16792
16793 * src/files.c, src/files.h (output_infix): New.
16794 (tab_extension): Remove.
16795 (compute_base_names): Compute the former, drop the latter.
16796 * src/output.c (prepare): Insert the muscles `output-infix', and
16797 `output-suffix'.
16798 * src/parse-skel.y (string, string.1): New.
16799 (section.header): Use it.
16800 (section.yacc): Remove.
16801 (prefix): Remove too.
16802 * src/scan-skel.l: Adjust.
16803 * src/bison.simple, src/bison.hairy: Adjust.
16804
16805 2002-01-09 Akim Demaille <akim@epita.fr>
16806
16807 * configure.in (WERROR_CFLAGS): Compute it.
16808 * src/Makefile.am (CFLAGS): Pass it.
16809 * tests/atlocal.in (CFLAGS): Idem.
16810 * src/files.c: Fix a few warnings.
16811 (get_extension_index): Remove, unused.
16812
16813 2002-01-08 Akim Demaille <akim@epita.fr>
16814
16815 * src/getargs.c (AS_FILE_NAME): New.
16816 (getargs): Use it to convert DOSish file names.
16817 * src/files.c (base_name): Rename as full_base_name to avoid
16818 clashes with `base_name ()'.
16819 (filename_split): New.
16820 (compute_base_names): N-th rewrite, using filename_split.
16821
16822 2002-01-08 Akim Demaille <akim@epita.fr>
16823
16824 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16825 New, stolen from the Fileutils 4.1.
16826 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16827 * configure.in: Check for the presence of memrchr, and of its
16828 prototype.
16829
16830 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16831
16832 * lib/hash.h (__P): Added definition for this macro.
16833 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16834 BUILT_SOURCES, to ensure they are generated first.
16835 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16836 %error-verbose to allow bootstrapping with bison 1.30x.
16837
16838 2002-01-06 Akim Demaille <akim@epita.fr>
16839
16840 * src/reader.c (parse_braces): Don't fetch the next char, the
16841 convention is to fetch on entry.
16842 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16843 'switch' without a following semicolon.
16844 * tests/regression.at (braces parsing): New.
16845
16846 2002-01-06 Akim Demaille <akim@epita.fr>
16847
16848 Bison is dead wrong in its RR conflict reports.
16849
16850 * tests/torture.at (GNU Cim Grammar): New.
16851 * src/conflicts.c (count_rr_conflicts): Fix.
16852
16853 2002-01-06 Akim Demaille <akim@epita.fr>
16854
16855 Creating package.m4 from configure.ac causes too many problems.
16856
16857 * tests/Makefile.am (package.m4): Create it by hand,
16858 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16859
16860 2002-01-06 Akim Demaille <akim@epita.fr>
16861
16862 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16863 skeleton.h.
16864
16865 2002-01-04 Paul Eggert <eggert@twinsun.com>
16866
16867 * doc/bison.texinfo (Debugging):
16868 Remove YYSTDERR; it's no longer defined or used.
16869 Also, s/cstdio.h/cstdio/.
16870
16871 2002-01-03 Akim Demaille <akim@epita.fr>
16872
16873 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16874
16875 2002-01-03 Akim Demaille <akim@epita.fr>
16876
16877 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16878 tracing code to --trace, wait for a better --trace option, with
16879 args.
16880
16881 2002-01-03 Akim Demaille <akim@epita.fr>
16882
16883 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16884 The ISO C++ standard is extremely clear about it: stderr is
16885 considered a macro, not a regular symbol (see table 94 `Header
16886 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16887 Therefore std:: does not apply to it. It still does with fprintf.
16888 Also, s/cstdio.h/cstdio/.
16889
16890 2002-01-03 Akim Demaille <akim@epita.fr>
16891
16892 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16893 for non system headers.
16894
16895 2002-01-02 Akim Demaille <akim@epita.fr>
16896
16897 Equip the skeleton chain with location tracking, runtime trace,
16898 pure parser and scanner.
16899
16900 * src/parse-skel.y: Request a pure parser, locations, and prefix
16901 renaming.
16902 (%union): Having several members with the same type does not help
16903 type mismatches, simplify.
16904 (YYPRINT, yyprint): New.
16905 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16906 (skel_error): this.
16907 Handle locations.
16908 * src/scan-skel.l: Adjust to these changes.
16909 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16910 (LOCATION_PRINT, skel_control_t): New.
16911
16912 2001-12-30 Akim Demaille <akim@epita.fr>
16913
16914 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16915 replace `gb' with BLANKS.
16916 * src/scan-skel.l: Adjust.
16917
16918 2001-12-30 Akim Demaille <akim@epita.fr>
16919
16920 * src/system.h: We don't need nor want bcopy.
16921 Throw away MS-DOS crap: we don't need getpid.
16922 * configure.in: We don't need strndup. It was even causing
16923 problems: because Flex includes the headers *before* us,
16924 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16925 not visible.
16926 * lib/xstrndup.c: New.
16927 * src/scan-skel.l: Use it.
16928 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16929 * src/parse-skel.y: Use %directives instead of #defines.
16930
16931 2001-12-30 Akim Demaille <akim@epita.fr>
16932
16933 * src/skeleton.h: New.
16934 * src/output.c (output_parser, output_master_parser): Remove, dead
16935 code.
16936 * src/output.h (get_lines_number, actions_output, guards_output)
16937 (token_definitions_output): Prototype them.
16938 * src/parse-skel.y: Add the license notice.
16939 Include output.h and skeleton.h.
16940 (process_skeleton): Returns void, and takes a single parameter.
16941 * src/scan-skel.l: Add the license notice.
16942 Include skeleton.h.
16943 Don't use %option yylineno: it seems that then Flex imagines
16944 REJECT has been used, and therefore it won't reallocate its
16945 buffers (which makes no other sense to me than a bug). It results
16946 in warnings for `unused: yy_flex_realloc'.
16947
16948 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
16949
16950 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16951 (MUSCLE_INSERT_PREFIX): ...to there.
16952 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16953 (MUSCLE_INSERT_PREFIX): Move from here...
16954
16955 * src/bison.hairy: Add a section directive. Put braces around muscle
16956 names. This parser skeleton is still broken, but Bison should not
16957 choke on a bad muscle 'syntax'.
16958 * src/bison.simple: Add a section directive. Put braces around muscle
16959 names.
16960
16961 * src/files.h (strsuffix, stringappend): Add declarations.
16962 (tab_extension): Add declaration.
16963 (short_base_name): Add declaration.
16964
16965 * src/files.c (strsuffix, stringappend): No longer static. These
16966 functions are used in the skeleton parser.
16967 (tab_extension): New.
16968 (compute_base_names): Use the computations done in this function
16969 to guess if the generated parsers should have '.tab' in their
16970 names.
16971 (short_base_name): No longer static.
16972
16973 * src/output.c (output_skeleton): New.
16974 (output): Disable call to output_master_parser, and give a try to
16975 a new skeleton handling system.
16976 (guards_output, actions_output): No longer static.
16977 (token_definitions_output, get_lines_number): No longer static.
16978
16979 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16980
16981 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
16982 parse-skel.y.
16983
16984 * src/parse-skel.y: New file.
16985 * src/scan-skel.l: New file.
16986
16987 2001-12-29 Akim Demaille <akim@epita.fr>
16988
16989 %name-prefix is broken.
16990
16991 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16992 Adjust all dependencies.
16993 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16994 %name-prefix.
16995
16996 Renaming yylval but not yylloc is not consistent. Now we do.
16997
16998 * src/bison.simple: Prefix yylloc if used.
16999 * doc/bison.texinfo (Decl Summary): Document that.
17000
17001 2001-12-29 Akim Demaille <akim@epita.fr>
17002
17003 * doc/bison.texinfo: Promote `%long-directive' over
17004 `%long_directive'.
17005 Remove all references to fixed-output-files, yacc is enough.
17006
17007 2001-12-29 Akim Demaille <akim@epita.fr>
17008
17009 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17010 user prologue. These are defaults.
17011 * tests/actions.at (Mid-rule actions): Make sure the user can
17012 define YYDEBUG and YYERROR_VERBOSE.
17013
17014 2001-12-29 Akim Demaille <akim@epita.fr>
17015
17016 * src/output.c (header_output): Don't forget to export YYLTYPE and
17017 yylloc.
17018 * tests/headers.at (export YYLTYPE): New, make sure it does.
17019 * tests/regression.at (%union and --defines, Invalid CPP headers):
17020 Move to...
17021 * tests/headers.at: here.
17022
17023 2001-12-29 Akim Demaille <akim@epita.fr>
17024
17025 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17026
17027 2001-12-29 Akim Demaille <akim@epita.fr>
17028
17029 * tests/actions.at (Mid-rule actions): Output on a single line
17030 instead of several.
17031
17032 2001-12-29 Akim Demaille <akim@epita.fr>
17033
17034 * doc/bison.texinfo: Formatting changes.
17035
17036 2001-12-29 Akim Demaille <akim@epita.fr>
17037
17038 Don't store the token defs in a muscle, just be ready to output it
17039 on command. Now possible via `symbols'. Fixes a memory leak.
17040
17041 * src/output.c (token_definitions_output): New.
17042 (output_parser, header_output): Use it.
17043 * src/reader.c (symbols_save): Remove.
17044
17045 2001-12-29 Akim Demaille <akim@epita.fr>
17046
17047 * src/bison.simple: Do not provide a default for YYSTYPE and
17048 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17049 default.
17050
17051 2001-12-29 Akim Demaille <akim@epita.fr>
17052
17053 Mid-rule actions are simply... ignored!
17054
17055 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17056 the empty-rule associated to the dummy symbol, not to the host
17057 rule.
17058 * tests/actions.at (Mid-rule actions): New.
17059
17060 2001-12-29 Akim Demaille <akim@epita.fr>
17061
17062 Memory leak.
17063
17064 * src/reader.c (reader): Free grammar.
17065
17066 2001-12-29 Akim Demaille <akim@epita.fr>
17067
17068 Memory leak.
17069
17070 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17071 since it allocates it for each state, although only one is needed.
17072 (allocate_storage): Do it here.
17073
17074 2001-12-29 Akim Demaille <akim@epita.fr>
17075
17076 * src/options.h, src/options.c (create_long_option_table): Rename
17077 as...
17078 (long_option_table_new): this, with a clearer prototype.
17079 (percent_table): Remove, unused,
17080 * src/getargs.c (getargs): Adjust.
17081
17082 2001-12-29 Akim Demaille <akim@epita.fr>
17083
17084 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17085 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17086 as states.
17087
17088 2001-12-29 Akim Demaille <akim@epita.fr>
17089
17090 * src/lalr.c (build_relations): Rename `states' as `states1'.
17091 Sorry, I don't understand exactly what it is, no better name...
17092
17093 2001-12-29 Akim Demaille <akim@epita.fr>
17094
17095 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17096 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17097 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17098 as rules.
17099
17100 2001-12-29 Akim Demaille <akim@epita.fr>
17101
17102 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17103 ago.
17104
17105 2001-12-29 Akim Demaille <akim@epita.fr>
17106
17107 * src/reader.c, src/reader.h (user_toknums): Remove.
17108 Adjust all users to use symbols[i]->user_token_number.
17109
17110 2001-12-29 Akim Demaille <akim@epita.fr>
17111
17112 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17113 Adjust all users to use symbols[i]->prec or ->assoc.
17114
17115 2001-12-29 Akim Demaille <akim@epita.fr>
17116
17117 * src/reader.c, src/reader.h (tags): Remove.
17118 Adjust all users to use symbols[i]->tag.
17119
17120 2001-12-29 Akim Demaille <akim@epita.fr>
17121
17122 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17123 and rule_table.
17124 * src/reader.c (packsymbols): Fill this table.
17125 Drop sprec.
17126 * src/conflicts.c (resolve_sr_conflict): Adjust.
17127 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17128 single table.
17129 Use symbols[i]->tag instead of tags[i].
17130
17131 2001-12-29 Akim Demaille <akim@epita.fr>
17132
17133 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17134 In addition, put a comment in there, to replace...
17135 * tests/regression.at (%union and C comments): Remove.
17136
17137 2001-12-29 Akim Demaille <akim@epita.fr>
17138
17139 * tests/regression.at (Web2c Actions): Blindly move the actual
17140 output as expected output. The contents *seem* right to me, but I
17141 can't pretend reading perfectly parser tables... Nonetheless, all
17142 the other tests pass correctly, the table look OK, even though the
17143 presence of `$axiom' is to be noted: AFAICS it is useless (but
17144 harmless).
17145
17146 2001-12-29 Akim Demaille <akim@epita.fr>
17147
17148 * src/reader.c (readgram): Don't add the rule 0 if there were no
17149 rules read. In other words, add it _after_ having performed
17150 grammar sanity checks.
17151 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17152
17153 2001-12-29 Akim Demaille <akim@epita.fr>
17154
17155 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17156 visible, and some states have now a different number.
17157
17158 2001-12-29 Akim Demaille <akim@epita.fr>
17159
17160 * src/reader.c (readgram): Bind the initial rule's lineno to that
17161 of the first rule.
17162 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17163 (Solved SR Conflicts): Adjust rule 0's line number.
17164
17165 2001-12-29 Akim Demaille <akim@epita.fr>
17166
17167 Fix the `GAWK Grammar' failure.
17168
17169 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17170 the reductions of the first state which was mistakenly confused
17171 with the final state because precisely final_state was initialized
17172 to 0.
17173 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17174 now noticed by Bison.
17175 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17176 have a reduction on $default.
17177
17178 2001-12-29 Akim Demaille <akim@epita.fr>
17179
17180 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17181 rule line numbers.
17182 * src/closure.c (print_closure): Likewise.
17183 * src/derives.c (print_derives): Likewise.
17184 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17185 now.
17186
17187 2001-12-29 Akim Demaille <akim@epita.fr>
17188
17189 * src/lalr.c (lookaheads_print): New.
17190 (lalr): Call it when --trace-flag.
17191 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17192 are dumped.
17193
17194 2001-12-29 Akim Demaille <akim@epita.fr>
17195
17196 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17197 when walking through ritem, even via rule->rhs.
17198 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17199 (useful_production, useless_nonterminals): Likewise.
17200 (reduce_grammar_tables): Likewise, plus update nritems.
17201 * src/nullable.c (set_nullable): Likewise.
17202 * src/lalr.c (build_relations): Likewise.
17203 * tests/sets.at (Nullable): Adjust.
17204 Fortunately, now, the $axiom is no longer nullable.
17205
17206 2001-12-29 Akim Demaille <akim@epita.fr>
17207
17208 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17209 the 0-sentinel.
17210 * src/gram.c (ritem_longest_rhs): Likewise.
17211 * src/reduce.c (nonterminals_reduce): Likewise.
17212 * src/print_graph.c (print_graph): Likewise.
17213 * src/output.c (output_rule_data): Likewise.
17214 * src/nullable.c (set_nullable): Likewise.
17215
17216 2001-12-29 Akim Demaille <akim@epita.fr>
17217
17218 * src/output.c: Comment changes.
17219
17220 2001-12-27 Paul Eggert <eggert@twinsun.com>
17221
17222 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17223 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17224 Sparc, as they were causing more porting problems than the
17225 (minor) performance improvement was worth.
17226
17227 Also, catch up with 1.31's YYSTD.
17228
17229 2001-12-27 Akim Demaille <akim@epita.fr>
17230
17231 * src/output.c (output_gram): Rely on nritems, not the
17232 0-sentinel. See below.
17233 Use -1 as separator, not 0.
17234 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17235 Rely on -1 as separator in yyrhs, instead of 0.
17236 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17237 twice `Now at end of input', therefore there are two lines less to
17238 expect.
17239
17240 2001-12-27 Akim Demaille <akim@epita.fr>
17241
17242 * tests/regression.at (Unresolved SR Conflicts):
17243 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17244 below.
17245
17246 2001-12-27 Akim Demaille <akim@epita.fr>
17247
17248 * src/LR0.c (new_state): Recognize the final state by the fact it
17249 is reached by eoftoken.
17250 (insert_start_shifting_state, insert_eof_shifting_state)
17251 (insert_accepting_state, augment_automaton): Remove, since now
17252 these states are automatically computed from the initial state.
17253 (generate_states): Adjust.
17254 * src/print.c: When reporting a rule number to the user, substract
17255 1, so that the axiom rule is rule 0, and the first user rule is 1.
17256 * src/reduce.c: Likewise.
17257 * src/print_graph.c (print_core): For the time being, just as for
17258 the report, depend upon --trace-flags to dump the full set of
17259 items.
17260 * src/reader.c (readgram): Once the grammar read, insert the rule
17261 0: `$axiom: START-SYMBOL $'.
17262 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17263 number of the states has changed (the final state is no longer
17264 necessarily the last), catch up.
17265
17266 2001-12-27 Akim Demaille <akim@epita.fr>
17267
17268 Try to make the use of the eoftoken valid. Given that its value
17269 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17270 is used instead of > 0 where appropriate, (ii), depend upon nritems
17271 instead of the 0-sentinel.
17272
17273 * src/gram.h, src/gram.c (nritems): New.
17274 Expected to be duplication of nitems, but for the time being...
17275 * src/reader.c (packgram): Assert nritems and nitems are equal.
17276 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17277 * src/closure.c (print_closure, print_fderives): Likewise.
17278 * src/gram.c (ritem_print): Likewise.
17279 * src/print.c (print_core, print_grammar): Likewise.
17280 * src/print_graph.c: Likewise.
17281
17282 2001-12-27 Akim Demaille <akim@epita.fr>
17283
17284 * src/main.c (main): If there are complains after grammar
17285 reductions, then output the report anyway if requested, then die.
17286 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17287 * src/reader.c (eoftoken): New.
17288 (parse_token_decl): If the token being defined has value `0', it
17289 is the eoftoken.
17290 (packsymbols): No longer hack `tags' to insert `$' by hand.
17291 Be sure to preserve the value of the eoftoken.
17292 (reader): Make sure eoftoken is defined.
17293 Initialize nsyms to 0: now eoftoken is created just like the others.
17294 * src/print.c (print_grammar): Don't special case the eof token.
17295 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17296 lie anyway, albeit pleasant.
17297 * tests/calc.at: Exercise error messages with eoftoken.
17298 Change the grammar so that empty input is invalid.
17299 Adjust expectations.
17300 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17301
17302 2001-12-27 Akim Demaille <akim@epita.fr>
17303
17304 * configure.in: Check the protos of strchr ans strspn.
17305 Replace strchr if needed.
17306 * src/system.h: Provide the protos of strchr, strspn and memchr if
17307 missing.
17308 * lib/strchr.c: New.
17309 * src/reader.c (symbols_save): Use strchr.
17310
17311 2001-12-27 Akim Demaille <akim@epita.fr>
17312
17313 * src/print.c, src/print_graph.c (escape): New.
17314 Use it to quote the TAGS outputs.
17315 * src/print_graph.c (print_state): Now errors are in red, and
17316 reductions in green.
17317 Prefer high to wide: output the state number on a line of its own.
17318
17319 2001-12-27 Akim Demaille <akim@epita.fr>
17320
17321 * src/state.h, src/state.c (reductions_new): New.
17322 * src/LR0.c (set_state_table): Let all the states have a
17323 `reductions', even if reduced to 0.
17324 (save_reductions): Adjust.
17325 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17326 * src/print.c (print_reductions, print_actions): Adjust.
17327 * src/output.c (action_row): Adjust.
17328
17329 2001-12-27 Akim Demaille <akim@epita.fr>
17330
17331 * src/state.h, src/state.c (errs_new, errs_dup): New.
17332 * src/LR0.c (set_state_table): Let all the states have an errs,
17333 even if reduced to 0.
17334 * src/print.c (print_errs, print_reductions): Adjust.
17335 * src/output.c (output_actions, action_row): Adjust.
17336 * src/conflicts.c (resolve_sr_conflict): Adjust.
17337
17338 2001-12-27 Akim Demaille <akim@epita.fr>
17339
17340 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17341
17342 2001-12-27 Akim Demaille <akim@epita.fr>
17343
17344 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17345 * src/print.c: here.
17346 (lookaheadset, shiftset): New, used as additional storage by
17347 print_reductions.
17348 (print_results): Adjust.
17349 (print_shifts, print_gotos, print_errs): New, extracted from...
17350 (print_actions): here.
17351 * src/print_graph.c (print_actions): Remove dead code.
17352
17353 2001-12-27 Akim Demaille <akim@epita.fr>
17354
17355 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17356 `$n' and `@n'.
17357
17358 2001-12-27 Akim Demaille <akim@epita.fr>
17359
17360 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17361 (build_relations): Adjust.
17362
17363 2001-12-27 Akim Demaille <akim@epita.fr>
17364
17365 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17366 duplication.
17367
17368 2001-12-27 Akim Demaille <akim@epita.fr>
17369
17370 * src/reader.c (packgram): Catch nitems overflows.
17371
17372 2001-12-27 Akim Demaille <akim@epita.fr>
17373
17374 * src/files.c, src/files.h (guard_obstack): Remove.
17375 * src/output.c (output): Adjust.
17376 * src/reader.c (parse_braces): New, factoring...
17377 (copy_action, copy_guard): these two which are renamed as...
17378 (parse_action, parse_guard): these.
17379 As a voluntary consequence, using braces around guards is now
17380 mandatory.
17381
17382 2001-12-27 Akim Demaille <akim@epita.fr>
17383
17384 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17385 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17386 members.
17387 (symbol_list_new): Adjust.
17388 (copy_action): action_line is the first line, not the last.
17389 (copy_guard): Just as for actions, store the `action' only, not
17390 the switch/case/break flesh.
17391 Don't parse the user action that might follow the guard, let...
17392 (readgram): do it, i.e., now, there can be an action after a
17393 guard.
17394 In other words the guard is just explicitly optional.
17395 (packgram): Adjust.
17396 * src/output.c (guards_output): New.
17397 (output_parser): Call it when needed.
17398 (output): Also free the guard and attrs obstacks.
17399 * src/files.c, src/files.h (obstack_save): Remove.
17400 (output_files): Remove.
17401 As a result, if one needs the former `.act' file, using an
17402 appropriate skeleton which requires actions and guards is now
17403 required.
17404 * src/main.c (main): Adjust.
17405 * tests/semantic.at: New.
17406 * tests/regression.at: Use `input.y' as input file name.
17407 Avoid 8+3 problems by requiring input.c when the test needs the
17408 parser.
17409
17410 2001-12-27 Akim Demaille <akim@epita.fr>
17411
17412 * src/reader.c (symbol_list_new): Be sure to initialize all the
17413 fields.
17414
17415 2001-12-27 Akim Demaille <akim@epita.fr>
17416
17417 All the hacks using a final pseudo state are now useless.
17418
17419 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17420 * src/lalr.c (nLA): New.
17421 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17422 instead of lookaheadsp from the pseudo state (nstate + 1).
17423
17424 2001-12-27 Akim Demaille <akim@epita.fr>
17425
17426 * src/output.c (action_row, token_actions): Use a state_t instead
17427 of a integer, and nlookaheads instead of the following state's
17428 lookaheadsp.
17429
17430 2001-12-27 Akim Demaille <akim@epita.fr>
17431
17432 * src/conflicts.c (log_resolution, flush_shift)
17433 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17434 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17435 (conflicts_print, print_reductions): Use a state_t instead of an
17436 integer when referring to a state.
17437 As much as possible, depend upon nlookaheads, instead of the
17438 `lookaheadsp' member of the following state (since lookaheads of
17439 successive states are successive, the difference between state n + 1
17440 and n served as the number of lookaheads for state n).
17441 * src/lalr.c (add_lookback_edge): Likewise.
17442 * src/print.c (print_core, print_actions, print_state)
17443 (print_results): Likewise.
17444 * src/print_graph.c (print_core, print_actions, print_state)
17445 (print_graph): Likewise.
17446 * src/conflicts.h: Adjust.
17447
17448 2001-12-27 Akim Demaille <akim@epita.fr>
17449
17450 * src/bison.hairy: Formatting/comment changes.
17451 ANSIfy.
17452 Remove `register' indications.
17453 Add plenty of `static'.
17454
17455 2001-12-27 Akim Demaille <akim@epita.fr>
17456
17457 * src/output.c (prepare): Drop the muscle `ntbase' which
17458 duplicates ntokens.
17459 * src/bison.simple: Formatting/comment changes.
17460 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17461 is an undocumented synonym.
17462
17463 2001-12-22 Akim Demaille <akim@epita.fr>
17464
17465 * src/output.c (output_table_data): Change the prototype to use
17466 `int' for array ranges: some invocations do pass an int, not a
17467 short.
17468 Reported by Wayne Green.
17469
17470 2001-12-22 Akim Demaille <akim@epita.fr>
17471
17472 Some actions of web2c.y are improperly triggered.
17473 Reported by Mike Castle.
17474
17475 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17476 * tests/regression.at (Web2c): Rename as...
17477 (Web2c Report): this.
17478 (Web2c Actions): New.
17479
17480 2001-12-22 Akim Demaille <akim@epita.fr>
17481
17482 Reductions in web2c.y are improperly reported.
17483 Reported by Mike Castle.
17484
17485 * src/conflicts.c (print_reductions): Fix.
17486 * tests/regression.at (Web2c): New.
17487
17488 2001-12-18 Akim Demaille <akim@epita.fr>
17489
17490 Some host fail on `assert (!"foo")', which expands to
17491 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17492 Reported by Nelson Beebee.
17493
17494 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17495 `#define it_succeeded 0' and `assert (it_succeeded)'.
17496
17497 2001-12-17 Marc Autret <autret_m@epita.fr>
17498
17499 * src/bison.simple: Don't hard code the skeleton line and filename.
17500 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17501 New line counter 'skeleton_line' (skeleton-line muscle).
17502
17503 2001-12-17 Paul Eggert <eggert@twinsun.com>
17504
17505 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17506 YYDEBUG must be defined to a nonzero value.
17507
17508 * src/bison.simple (yytname): Do not assume that the user defines
17509 YYDEBUG to a properly parenthesized expression.
17510
17511 2001-12-17 Akim Demaille <akim@epita.fr>
17512
17513 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17514 nlookaheads is a new member.
17515 Adjust all users.
17516 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17517 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17518 state.
17519
17520 2001-12-17 Akim Demaille <akim@epita.fr>
17521
17522 * src/files.h, src/files.c (open_files, close_files): Remove.
17523 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17524 let...
17525 * src/reader.c (reader): Do it.
17526
17527 2001-12-17 Akim Demaille <akim@epita.fr>
17528
17529 * src/conflicts.c (print_reductions): Formatting changes.
17530
17531 2001-12-17 Akim Demaille <akim@epita.fr>
17532
17533 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17534 (flush_reduce): New.
17535 (resolve_sr_conflict): Adjust.
17536
17537 2001-12-17 Akim Demaille <akim@epita.fr>
17538
17539 * src/output.c (output_obstack): Be static and rename as...
17540 (format_obstack): this, to avoid any confusion with files.c's
17541 output_obstack.
17542 * src/reader.h (muscle_obstack): Move to...
17543 * src/output.h: here, since it's defined in output.c.
17544
17545 2001-12-17 Akim Demaille <akim@epita.fr>
17546
17547 * src/output.c (action_row, save_column, default_goto)
17548 (sort_actions, matching_state, pack_vector): Better variable
17549 locality.
17550
17551 2001-12-17 Akim Demaille <akim@epita.fr>
17552
17553 * src/output.c: Various formatting changes.
17554
17555 2001-12-17 Akim Demaille <akim@epita.fr>
17556
17557 * src/files.c (output_files): Free the output_obstack.
17558 * src/main.c (main): Call print and print_graph conditionally.
17559 * src/print.c (print): Work unconditionally.
17560 * src/print_graph.c (print_graph): Work unconditionally.
17561 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17562
17563 2001-12-16 Marc Autret <autret_m@epita.fr>
17564
17565 * src/output.c (actions_output): Fix. When we use %no-lines,
17566 there is one less line per action.
17567
17568 2001-12-16 Marc Autret <autret_m@epita.fr>
17569
17570 * src/bison.simple: Remove a useless #line directive.
17571 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17572 * src/output.c (get_lines_number): New.
17573 (output_parser): Adjust, now takes care about the lines of a
17574 output muscles.
17575 Fix line numbering.
17576 (actions_output): Computes the number of lines taken by actions.
17577 (output_master_parser): Insert new skeleton which is the name of
17578 the output parser file name.
17579
17580 2001-12-15 Marc Autret <autret_m@epita.fr>
17581
17582 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17583
17584 2001-12-15 Marc Autret <autret_m@epita.fr>
17585
17586 * src/output.c (output_gram): Keep track of the hairy one.
17587
17588 2001-12-15 Akim Demaille <akim@epita.fr>
17589
17590 Make `make distcheck' work.
17591
17592 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17593 system.h which uses libgettext.h.
17594
17595 2001-12-15 Akim Demaille <akim@epita.fr>
17596
17597 * src/nullable.c (set_nullable): Useless rules must be skipped,
17598 otherwise, since we range over their symbols, we might look at a
17599 nonterminal which no longer ``exists'', i.e., it is not counted in
17600 `nvars', hence we overflow our arrays.
17601
17602 2001-12-15 Akim Demaille <akim@epita.fr>
17603
17604 The header can also be produced directly, without any obstack!
17605 Yahoo!
17606
17607 * src/files.c, src/files.h (defines_obstack): Remove.
17608 (compute_header_macro): Global.
17609 (defines_obstack_save): Remove.
17610 * src/reader.c (parse_union_decl): No longer output to
17611 defines_obstack: its content can be found in the `stype' muscle
17612 anyway.
17613 (output_token_translations): Merge into...
17614 (symbols_output): this.
17615 Rename as...
17616 (symbols_save): this.
17617 (reader): Adjust.
17618 * src/output.c (header_output): New.
17619 (output): Call it.
17620
17621 2001-12-15 Akim Demaille <akim@epita.fr>
17622
17623 * src/reader.c (parse_union_decl): Instead of handling two obstack
17624 simultaneously, use one to define the `stype' muscle, and use the
17625 value of the latter to fill defines_obstack.
17626 (copy_comment): Remove.
17627 (copy_comment2): Work for a single obstack.
17628 Rename as...
17629 (copy_comment): this.
17630
17631 2001-12-15 Akim Demaille <akim@epita.fr>
17632
17633 * src/lex.c, src/lex.h (xgetc): No longer static.
17634 * src/reader.c (parse_union_decl): Revamp.
17635
17636 2001-12-15 Akim Demaille <akim@epita.fr>
17637
17638 Still making progress in separating Bison into (i) input, (ii)
17639 process, (iii) output: now we can directly output the parser file
17640 without using table_obstack at all.
17641
17642 * src/files.c, src/files.h (table_obstack): Bye bye.
17643 (parser_file_name): New.
17644 * src/files.c (compute_output_file_names): Compute it.
17645 * src/output.c (actions_output, output_parser)
17646 (output_master_parser): To a file instead of an obstack.
17647
17648 2001-12-15 Akim Demaille <akim@epita.fr>
17649
17650 Attach actions to rules, instead of pre-outputting them to
17651 actions_obstack.
17652
17653 * src/gram.h (rule_t): action and action_line are new members.
17654 * src/reader.c (symbol_list): Likewise.
17655 (copy_action): Save the actions within the rule.
17656 (packgram): Save them in rule_table.
17657 * src/output.c (actions_output): New.
17658 (output_parser): Use it on `%%actions'.
17659 (output_rule_data): Don't free rule_table.
17660 (output): Do it.
17661 (prepare): Don't save the `action' muscle.
17662 * src/bison.simple: s/%%action/%%actions/.
17663
17664 2001-12-15 Akim Demaille <akim@epita.fr>
17665
17666 * src/reader.c (copy_action): When --yacc, don't append a `;'
17667 to the user action: let it fail if lacking.
17668 Suggested by Arnold Robbins and Tom Tromey.
17669
17670 2001-12-14 Akim Demaille <akim@epita.fr>
17671
17672 * src/lex.c (literalchar): Simply return the char you decoded, non
17673 longer mess around with obstacks and int pointers.
17674 Adjust all callers.
17675
17676 2001-12-14 Akim Demaille <akim@epita.fr>
17677
17678 * src/lex.c (literalchar): Don't escape the special characters,
17679 just decode them, and keep them as char (before, eol was output as
17680 the 2 char string `\n' etc.).
17681 * src/output.c (output_rule_data): Use quotearg to output the
17682 token strings.
17683
17684 2001-12-13 Paul Eggert <eggert@twinsun.com>
17685
17686 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
17687 Do not infringe on the global user namespace when using C++.
17688 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
17689 All uses of `fprintf' and `stderr' changed.
17690
17691 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
17692
17693 2001-12-13 Akim Demaille <akim@epita.fr>
17694
17695 The computation of nullable is broken: it doesn't handle empty
17696 RHS's properly.
17697
17698 * tests/torture.at (GNU AWK Grammar): New.
17699 * tests/sets.at (Nullable): New.
17700 * src/nullable.c (set_nullable): Instead of blindly looping over
17701 `ritems', loop over the rules, and then over their rhs's.
17702
17703 Work around Autotest bugs.
17704
17705 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
17706 frame, because Autotest understand lines starting with a `+' as
17707 traces from the shell. Then, they are not processed properly.
17708 Admittedly an Autotest bug, but we don't have time to wait for
17709 Autotest to catch up.
17710 * tests/regression.at (Broken Closure): Adjust to the new table
17711 frames.
17712 Move to...
17713 * tests/sets.at: here.
17714
17715 2001-12-13 Akim Demaille <akim@epita.fr>
17716
17717 * src/closure.c (closure): Use nrules instead of playing tricks
17718 with BITS_PER_WORD.
17719
17720 2001-12-13 Akim Demaille <akim@epita.fr>
17721
17722 * src/print.c (print_actions): Output the handling of `$' as the
17723 traces do: shifting the token EOF. Before EOF was treated as a
17724 nonterminal.
17725 * tests/regression.at: Adjust some tests.
17726 * src/print_graph.c (print_core): Complete the set of items via
17727 closure. The next-to-final and final states are still unsatisfying,
17728 but that's to be addressed elsewhere.
17729 No longer output the rule numbers, but do output the state number.
17730 A single loop for the shifts + gotos is enough, but picked a
17731 distinct color for each.
17732 (print_graph): Initialize and finalize closure.
17733
17734 2001-12-13 Akim Demaille <akim@epita.fr>
17735
17736 * src/reader.c (readgram): Remove dead code, an strip useless
17737 braces.
17738 (get_type): Remove, unused.
17739
17740 2001-12-12 Akim Demaille <akim@epita.fr>
17741
17742 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
17743 on that of lib/error.c.
17744
17745 2001-12-12 Akim Demaille <akim@epita.fr>
17746
17747 Some hosts don't like `/' in includes.
17748
17749 * src/system.h: Include libgettext.h without qualifying the path.
17750 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
17751 $(top_srcdir).
17752
17753 2001-12-11 Marc Autret <autret_m@epita.fr>
17754
17755 * src/output.c (output_parser): Remove useless muscle.
17756
17757 2001-12-11 Marc Autret <autret_m@epita.fr>
17758
17759 * src/bison.simple: Remove #line just before %%epilogue. It
17760 is now handled in ...
17761 * src/reader.c (read_additionnal_code): Add the output of a
17762 #line for the epilogue.
17763
17764 2001-12-10 Marc Autret <autret_m@epita.fr>
17765
17766 * src/reader.c (copy_definition): Re-use CPP-outed code which
17767 replace precedent remove.
17768 * src/bison.simple: Remove #line before %%prologue because
17769 %%input-line is wrong at this time.
17770
17771 2001-12-10 Marc Autret <autret_m@epita.fr>
17772
17773 * src/reader.c (symbols_output): Clean up.
17774 * src/output.c (output_gram, output): Clean up.
17775
17776 2001-12-10 Akim Demaille <akim@epita.fr>
17777
17778 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17779 * src/LR0.c (set_state_table): here.
17780 * src/lalr.c (lalr): Call it.
17781
17782 2001-12-10 Akim Demaille <akim@epita.fr>
17783
17784 * src/state.h (shifts): Remove the `number' member: shifts are
17785 attached to state, hence no longer need to be labelled with a
17786 state number.
17787
17788 2001-12-10 Akim Demaille <akim@epita.fr>
17789
17790 Now that states have a complete set of members, the linked list of
17791 shifts is useless: just fill directly the state's shifts member.
17792
17793 * src/state.h (shifts): Remove the `next' member.
17794 * src/LR0.c (first_state, last_state): Remove.
17795 Adjust the callers.
17796 (augment_automaton): Don't look for the shifts that must be added
17797 a shift on EOF: it is those of the state we looked for! But now,
17798 since shifts are attached, it is no longer needed to looking
17799 merely by its id: its number.
17800
17801 2001-12-10 Akim Demaille <akim@epita.fr>
17802
17803 * src/LR0.c (augment_automaton): Better variable locality.
17804 Remove an impossible branch: if there is a state corresponding to
17805 the start symbol being shifted, then there is shift for the start
17806 symbol from the initial state.
17807
17808 2001-12-10 Akim Demaille <akim@epita.fr>
17809
17810 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17811 only when appropriate: when insert_start_shifting_state' is not
17812 invoked.
17813 * tests/regression.at (Rule Line Numbers): Adjust.
17814
17815 2001-12-10 Akim Demaille <akim@epita.fr>
17816
17817 * src/LR0.c (augment_automaton): Now that all states have shifts,
17818 merge the two cases addition shifts to the initial state.
17819
17820 2001-12-10 Akim Demaille <akim@epita.fr>
17821
17822 * src/lalr.c (set_state_table): Move to...
17823 * src/LR0.c: here.
17824 * src/lalr.c (lalr): Don't call it...
17825 * src/LR0.c (generate_states): do it.
17826 * src/LR0.h (first_state): Remove, only the table is used.
17827
17828 2001-12-10 Akim Demaille <akim@epita.fr>
17829
17830 * src/LR0.h (first_shift, first_reduction): Remove.
17831 * src/lalr.c: Don't use first_shift: find shifts through the
17832 states.
17833
17834 2001-12-10 Akim Demaille <akim@epita.fr>
17835
17836 * src/LR0.c: Attach shifts to states as soon as they are
17837 computed.
17838 * src/lalr.c (set_state_table): Instead of assigning shifts to
17839 state, just assert that the mapping was properly done.
17840
17841 2001-12-10 Akim Demaille <akim@epita.fr>
17842
17843 * src/LR0.c (insert_start_shift): Rename as...
17844 (insert_start_shifting_state): this.
17845 (insert_eof_shifting_state, insert_accepting_state): New.
17846 (augment_automaton): Adjust.
17847 Better locality of the variables.
17848 When looking if the start_symbol is shifted from the initial
17849 state, using `while (... symbol != start_symbol ...)' sounds
17850 better than `while (... symbol < start_symbol ...)': If fail
17851 to see how the order between symbols could be relevant!
17852
17853 2001-12-10 Akim Demaille <akim@epita.fr>
17854
17855 * src/getargs.h: Don't declare `spec_name_prefix' and
17856 `spec_file_prefix', declared by src/files.h.
17857 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17858 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17859 * src/output.c (prepare): Adjust.
17860 * src/reader.c (symbols_output): Likewise.
17861 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17862
17863 2001-12-10 Akim Demaille <akim@epita.fr>
17864
17865 * src/muscle_tab.c (muscle_init): NULL is a better default than
17866 `"0"'.
17867
17868 2001-12-10 Akim Demaille <akim@epita.fr>
17869
17870 * src/reader.c (reader): Calling symbols_output once is enough.
17871
17872 2001-12-10 Akim Demaille <akim@epita.fr>
17873
17874 Now that states have a complete set of members, the linked list of
17875 reductions is useless: just fill directly the state's reductions
17876 member.
17877
17878 * src/state.h (struct reductions): Remove member `number' and
17879 `next'.
17880 * src/LR0.c (first_reduction, last_reduction): Remove.
17881 (save_reductions): Don't link the new reductions, store them in
17882 this_state.
17883 * src/lalr.c (set_state_table): No need to attach reductions to
17884 states, it's already done.
17885 * src/output.c (output_actions): No longer free the shifts, then
17886 the reductions, then the states: free all the states and their
17887 members.
17888
17889 2001-12-10 Akim Demaille <akim@epita.fr>
17890
17891 * src/options.c (OPTN, DRTV, BOTH): New.
17892 (option_table): Use them.
17893
17894 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17895 the job of system.h.
17896 * src/options.c: Don't include stdio.h and xalloc.h for the same
17897 reasons.
17898
17899 2001-12-10 Akim Demaille <akim@epita.fr>
17900
17901 * src/output.c (output, prepare): Make sure the values of the
17902 muscles `action' and `prologue' are 0-terminated.
17903
17904 2001-12-10 Akim Demaille <akim@epita.fr>
17905
17906 Clean up GCC warnings.
17907
17908 * src/reader.c (copy_action): `buf' is not used.
17909 (parse_skel_decl): Be static.
17910 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17911 * src/options.h (create_long_option_table): Have a real prototype.
17912 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17913 (hash_delete_at): Return const void *.
17914 Adjust casts to preserve the const.
17915
17916 2001-12-10 Akim Demaille <akim@epita.fr>
17917
17918 * configure.in: Require 2.52g.
17919 M4 is not needed, but AUTOM4TE is.
17920 * m4/m4.m4: Remove.
17921 * tests/Makefile.am: Adjust.
17922
17923 2001-12-10 Akim Demaille <akim@epita.fr>
17924
17925 One structure for states is enough, even though theoretically
17926 there are LR(0) states and LALR(1) states.
17927
17928 * src/lalr.h (state_t): Remove.
17929 (state_table): Be state_t **, not state_t *.
17930 * src/state.h (core, CORE_ALLOC): Rename as...
17931 (state_t, STATE_ALLOC): this.
17932 Add the LALR(1) members: shifts, reductions, errs.
17933 * src/LR0.c (state_table): Rename as...
17934 (state_hash): this, to avoid name clashes with the global
17935 `state_table'.
17936 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17937 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17938
17939 2001-12-10 Akim Demaille <akim@epita.fr>
17940
17941 Bison dumps core on bash.y.
17942 Reported by Pascal Bart.
17943
17944 * src/warshall.c (bitmatrix_print): New.
17945 (TC): Use it.
17946 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
17947 j must be the outer loop.
17948 * tests/regression.at (Broken Closure): New.
17949
17950 2001-12-05 Akim Demaille <akim@epita.fr>
17951
17952 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17953 its argument.
17954 Reported by Peter Hamorsky.
17955
17956 2001-12-05 Akim Demaille <akim@epita.fr>
17957
17958 * src/conflicts.c (err_table): Remove.
17959 (resolve_sr_conflict): Adjust.
17960 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17961 Rename as...
17962 (state_t.reductions, state_t.shifts): this.
17963
17964 2001-12-05 Akim Demaille <akim@epita.fr>
17965
17966 * src/reduce.c (reduce_grammar_tables): No longer disable the
17967 removal of useless rules via CPP but via `if (0)', so that the
17968 compiler still check the code is valid.
17969 For instance, it should have noticed `rline' no longer exists: use
17970 the `line' member of rule_t.
17971 * src/gram.c (dummy, rline): Remove, unused.
17972
17973 2001-12-05 Akim Demaille <akim@epita.fr>
17974
17975 * src/output.c (pack_vector): Use assert, not berror.
17976 * src/main.c (berror): Remove, unused.
17977
17978 2001-12-05 Akim Demaille <akim@epita.fr>
17979
17980 New experimental feature: if --verbose --trace output all the
17981 items of a state, not only its kernel.
17982
17983 * src/print.c (print_core): If `trace_flag', then invoke closure
17984 before outputting the items of the state (print_core is no longer
17985 a correct name them).
17986 (print_results): Invoke new_closure/free_closure if needed.
17987
17988 2001-12-05 Akim Demaille <akim@epita.fr>
17989
17990 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17991 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17992 (nitemset): for consistency with the rest of the project.
17993
17994 2001-12-05 Akim Demaille <akim@epita.fr>
17995
17996 * src/closure.c (print_closure): Improve.
17997 (closure): Use it for printing input and output.
17998
17999 2001-12-05 Akim Demaille <akim@epita.fr>
18000
18001 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18002 indexed by nonterminals.
18003
18004 2001-12-05 Akim Demaille <akim@epita.fr>
18005
18006 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18007 what it was!).
18008 * src/warshall.h: Remove accidental duplication of the content.
18009
18010 2001-12-05 Akim Demaille <akim@epita.fr>
18011
18012 * src/closure.c (set_fderives): De-obfuscate.
18013
18014 2001-12-05 Akim Demaille <akim@epita.fr>
18015
18016 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18017
18018 2001-12-05 Akim Demaille <akim@epita.fr>
18019
18020 * src/closure.c (set_firsts): De-obfuscate.
18021
18022 2001-12-05 Akim Demaille <akim@epita.fr>
18023
18024 * src/output.c (action_row): De-obfuscate
18025 using the good o' techniques: arrays not pointers, variable
18026 locality, BITISSET, RESETBIT etc.
18027
18028 2001-12-05 Akim Demaille <akim@epita.fr>
18029
18030 Pessimize the code to simplify it: from now on, all the states
18031 have a valid SHIFTS, which NSHIFTS is possibly 0.
18032
18033 * src/LR0.c (shifts_new): Be global and move to..
18034 * src/state.c, src/state.h: here.
18035 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18036 * src/print_graph: Adjust.
18037
18038 2001-12-05 Akim Demaille <akim@epita.fr>
18039
18040 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18041 * src/conflicts.c: Use it.
18042 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18043 incorrectly ``simplified''.
18044
18045 2001-12-05 Akim Demaille <akim@epita.fr>
18046
18047 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18048 using the good o' techniques: arrays not pointers, variable
18049 locality, BITISSET, RESETBIT etc.
18050
18051 2001-12-05 Akim Demaille <akim@epita.fr>
18052
18053 * src/state.h (SHIFT_SYMBOL): New.
18054 * src/conflicts.c: Use it to deobfuscate.
18055
18056 2001-12-05 Akim Demaille <akim@epita.fr>
18057
18058 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18059 (print_reductions): De-obfuscate using the good o' techniques:
18060 arrays not pointers, variable locality, BITISSET.
18061
18062 2001-12-05 Akim Demaille <akim@epita.fr>
18063
18064 * src/conflicts.c (print_reductions): Arrays, not pointers.
18065 Use BITISSET.
18066
18067 2001-12-05 Akim Demaille <akim@epita.fr>
18068
18069 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18070
18071 2001-12-05 Akim Demaille <akim@epita.fr>
18072
18073 * src/conflicts.c (print_reductions): Improve variable locality.
18074
18075 2001-12-05 Akim Demaille <akim@epita.fr>
18076
18077 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18078
18079 2001-12-05 Akim Demaille <akim@epita.fr>
18080
18081 * src/conflicts.c (print_reductions): Improve variable locality.
18082
18083 2001-12-05 Akim Demaille <akim@epita.fr>
18084
18085 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18086 * src/lalr.c: Use them.
18087
18088 2001-12-05 Akim Demaille <akim@epita.fr>
18089
18090 * src/LR0.c (augment_automaton): Formatting changes.
18091 Better variable locality.
18092
18093 2001-12-05 Akim Demaille <akim@epita.fr>
18094
18095 * src/lalr.c (matrix_print): New.
18096 (transpose): Use it.
18097 Use arrays instead of pointers.
18098
18099 2001-12-05 Akim Demaille <akim@epita.fr>
18100
18101 * src/lalr.c (maxrhs): Move to...
18102 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18103 * src/lalr.c (build_relations): Adjust.
18104
18105 2001-12-05 Akim Demaille <akim@epita.fr>
18106
18107 * src/lalr.c (transpose): Free the memory allocated to the
18108 argument, as it is replaced by the results by the unique caller.
18109 (build_relations): Merely invoke transpose: it handles the memory
18110 deallocation.
18111 Improve variable locality.
18112 Avoid variables used as mere abbreviations.
18113 (compute_lookaheads): Use arrays instead of pointers.
18114
18115 2001-12-05 Akim Demaille <akim@epita.fr>
18116
18117 * src/lalr.c (initialize_F): Improve variable locality.
18118 Avoid variables used as mere abbreviations.
18119
18120 2001-12-05 Akim Demaille <akim@epita.fr>
18121
18122 * src/derives.c (print_derives): Display the ruleno.
18123 * src/lalr.c (initialize_F, transpose): Better variable locality
18124 to improve readability.
18125 Avoid variables used as mere abbreviations.
18126
18127 2001-12-05 Akim Demaille <akim@epita.fr>
18128
18129 * src/lalr.c (traverse): Use arrays instead of pointers.
18130
18131 2001-12-05 Akim Demaille <akim@epita.fr>
18132
18133 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18134 the handling of squeue.
18135 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18136
18137 2001-12-05 Akim Demaille <akim@epita.fr>
18138
18139 Because useless nonterminals are now kept alive (instead of being
18140 `destroyed'), we now sometimes examine them, and store information
18141 related to them. Hence we need to know their number, and adjust
18142 memory allocations.
18143
18144 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18145 static.
18146 * src/LR0.c (allocate_itemsets): The memory allocated to
18147 `symbol_count' was used for two different purpose: once to count
18148 the number of occurrences of each symbol, and later reassigned to
18149 `shift_symbol', containing the symbol that can be shifted from a
18150 given state.
18151 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18152 only, and...
18153 (new_itemsets): Allocate `shift_symbol' here.
18154 (allocate_itemsets): symbol_count includes useless nonterminals.
18155 Make room for them.
18156 (free_storage): Use `free', not `XFREE', for pointers that cannot
18157 be null.
18158
18159 2001-12-05 Akim Demaille <akim@epita.fr>
18160
18161 * src/nullable.c (set_nullable): Deobfuscate the handling of
18162 ritem.
18163 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18164
18165 2001-12-05 Akim Demaille <akim@epita.fr>
18166
18167 * src/gram.c, src/gram.h (ritem_print): New.
18168 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18169 (This useless function was defined only to work around VMS linkers
18170 that can't handle compilation units with variables only).
18171 * src/reduce.c (dump_grammar): Use it to trace the construction of
18172 ritem.
18173
18174 2001-12-04 Paul Eggert <eggert@twinsun.com>
18175
18176 * src/bison.simple (union yyalloc): Change member names
18177 to be the same as the stack names.
18178 (yyparse): yyptr is now union yyalloc *, not char *.
18179 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18180 and may generate better code on some machines.
18181 (yystpcpy): Use prototype if __STDC__ is defined, not just
18182 if __cplusplus is defined.
18183
18184 2001-11-30 Akim Demaille <akim@epita.fr>
18185
18186 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18187 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18188 Gettext doesn't compile cleanly, and dies with -Werror.
18189 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18190 Include WARNING_CFLAGS here.
18191 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18192 before being defined.
18193
18194 2001-11-27 Paul Eggert <eggert@twinsun.com>
18195
18196 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18197 First arg is int, not unsigned.
18198 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18199 (SIZE_MAX, UINT_MAX): New macros.
18200 (quotearg_n_options): Abort if N is negative.
18201 Avoid overflow check on hosts where size_t is 64 bits and int
18202 is 32 bits, as overflow is impossible there.
18203 Fix off-by-one typo that caused unnecessary reallocation.
18204
18205 2001-11-29 Paul Eggert <eggert@twinsun.com>
18206
18207 Name space cleanup in generated parser.
18208
18209 * doc/bison.texinfo (Bison Parser): Discuss system headers
18210 and their effect on the user name space.
18211
18212 * src/bison.simple:
18213 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18214 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18215 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18216
18217 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18218 on user names when possible.
18219
18220 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18221 Simplify test for whather <alloca.h> exists.
18222
18223 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18224
18225 (<stdio.h>): Include if YYDEBUG.
18226
18227 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18228 ! defined (yyoverflow) && ! defined (yymemcpy).
18229
18230 (yymemcpy, yyparse): Rename local variables as needed so that
18231 they all begin with 'yy'.
18232
18233 (yystrlen, yystpcpy): New functions.
18234
18235 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18236 All uses changed.
18237
18238 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18239 instead of relying on string.h functions. Use YYSTACK_ALLOC
18240 and YYSTACK_FREE instead of malloc and free.
18241
18242 2001-11-30 Akim Demaille <akim@epita.fr>
18243
18244 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18245 before their first uses.
18246 (YYBISON, YYPURE): Move to the top of the output.
18247
18248 2001-11-30 Akim Demaille <akim@epita.fr>
18249
18250 * tests/reduce.at (Useless Nonterminals): Fix.
18251
18252 2001-11-30 Akim Demaille <akim@epita.fr>
18253
18254 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18255 if body instead of `;' to pacify GCC's warnings.
18256
18257 2001-11-30 Akim Demaille <akim@epita.fr>
18258
18259 Instead of mapping the LHS of unused rules to -1, keep the LHS
18260 valid, but flag the rules as invalid.
18261
18262 * src/gram.h (rule_t): `useful' is a new member.
18263 * src/print.c (print_grammar): Adjust.
18264 * src/derives.c (set_derives): Likewise.
18265 * src/reader.c (packgram, reduce_output): Likewise.
18266 * src/reduce.c (reduce_grammar_tables): Likewise.
18267 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18268
18269 2001-11-30 Akim Demaille <akim@epita.fr>
18270
18271 * src/reduce.c (reduce_output): Formatting changes.
18272 * src/print.c (print_results, print_grammar): Likewise.
18273 * tests/regression.at (Rule Line Numbers)
18274 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18275
18276 2001-11-30 Akim Demaille <akim@epita.fr>
18277
18278 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18279 useless nonterminals, move them at the end of the symbol arrays.
18280 (reduce_output): Adjust.
18281 * tests/reduce.at (Useless Nonterminals): Adjust.
18282
18283 2001-11-30 Akim Demaille <akim@epita.fr>
18284
18285 * src/reduce.c: Various comment/formatting changes.
18286 (nonterminals_reduce): New, extracted from...
18287 (reduce_grammar_tables): here.
18288 (reduce_grammar): Call nonterminals_reduce.
18289
18290 2001-11-29 Paul Eggert <eggert@twinsun.com>
18291
18292 * src/bison.simple (YYSTACK_REALLOC): Remove.
18293 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18294 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18295 New macros.
18296 (union yyalloc): New type.
18297 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18298 an arbitrary restriction on hosts where size_t is wider than int.
18299
18300 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18301 a parser stack overflow. Allocate just one block of memory for all
18302 three stacks, instead of allocating three blocks; this typically is
18303 faster and reduces fragmentation.
18304
18305 Do not limit the number of items in the stack to a value that fits
18306 in 'int', as this is an arbitrary limit on hosts with 64-bit
18307 size_t and 32-bit int.
18308
18309 2001-11-29 Marc Autret <autret_m@epita.fr>
18310
18311 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18312 of defining YYERROR_VERBOSE.
18313 [AT_DATA]: $4 is now out of C declarations in the prologue.
18314
18315 2001-11-28 Marc Autret <autret_m@epita.fr>
18316
18317 * src/reader.c (parse_dquoted_param): New.
18318 (parse_skel_decl): Use it.
18319 * src/lex.h: Add its prototype.
18320 * src/lex.c (literalchar): Become not static.
18321
18322 2001-11-28 Marc Autret <autret_m@epita.fr>
18323
18324 * src/output.h: And put its extern declaration here.
18325 * src/output.c (error_verbose): Define here.
18326 (prepare): Echo name modification.
18327 * src/getargs.h: Clean its extern declaration.
18328 * src/getargs.c (error_verbose_flag): Remove.
18329 (getargs): Remove case 'e'.
18330 * src/options.c (option_table): 'error-verbose' is now seen as simple
18331 percent option.
18332 Include output.h.
18333
18334 * src/reader.c (read_declarations): Remove case tok_include.
18335 (parse_include_decl): Remove.
18336 * src/lex.h (token_t): Remove tok_include.
18337 * src/options.c (option_table): 'include' is now a simple command line
18338 option.
18339
18340 2001-11-28 Marc Autret <autret_m@epita.fr>
18341
18342 * src/bison.simple: Adjust muscle names.
18343 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18344 * src/output.c (prepare): s/_/-/ for the muscles names.
18345 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18346
18347 2001-11-28 Marc Autret <autret_m@epita.fr>
18348
18349 * src/bison.simple: Fix debug.
18350 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18351
18352 2001-11-28 Akim Demaille <akim@epita.fr>
18353
18354 * src/LR0.c (shifts_new): New.
18355 (save_shifts, insert_start_shift, augment_automaton): Use it.
18356
18357 2001-11-28 Akim Demaille <akim@epita.fr>
18358
18359 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18360 keep ruleno only.
18361
18362 2001-11-28 Akim Demaille <akim@epita.fr>
18363
18364 * src/closure.c (closure): Instead of looping over word in array
18365 then bits in words, loop over bits in array.
18366
18367 2001-11-28 Akim Demaille <akim@epita.fr>
18368
18369 * src/closure.c (closure): No longer optimize the special case
18370 where all the bits of `ruleset[r]' are set to 0, to make the code
18371 clearer.
18372
18373 2001-11-28 Akim Demaille <akim@epita.fr>
18374
18375 * src/closure.c (closure): `r' and `c' are new variables, used to
18376 de-obfuscate accesses to RULESET and CORE.
18377
18378 2001-11-28 Akim Demaille <akim@epita.fr>
18379
18380 * src/reduce.c (reduce_print): Use ngettext.
18381 (dump_grammar): Improve the trace accuracy.
18382
18383 2001-11-28 Akim Demaille <akim@epita.fr>
18384
18385 * src/reduce.c (dump_grammar): Don't translate trace messages.
18386
18387 2001-11-28 Akim Demaille <akim@epita.fr>
18388
18389 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18390 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18391 as all tags are free'ed afterwards.
18392 From Enrico Scholz.
18393
18394 2001-11-27 Paul Eggert <eggert@twinsun.com>
18395
18396 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18397 use alloca when we didn't want to, and vice versa.
18398
18399 2001-11-27 Marc Autret <autret_m@epita.fr>
18400
18401 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18402 initialization.
18403 * src/output.c (prepare): Remove its update.
18404
18405 2001-11-27 Marc Autret <autret_m@epita.fr>
18406
18407 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18408 Use %error-verbose.
18409
18410 2001-11-27 Marc Autret <autret_m@epita.fr>
18411
18412 * src/bison.simple: Remove YYERROR_VERBOSE using.
18413 Use %%error_verbose.
18414 (yyparse): Likewise.
18415 * src/output.c (prepare): Give its final value.
18416 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18417 * src/getargs.h: Add its extern declaration.
18418 * src/getargs.c (error_verbose_flag): New int.
18419 (getargs): Update to catch new case.
18420 * src/options.c (option_table): 'error-verbose' is a new option.
18421 (shortopts): Update.
18422
18423 2001-11-27 Akim Demaille <akim@epita.fr>
18424
18425 * src/system.h: Use intl/libgettext.h.
18426 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18427
18428 2001-11-27 Akim Demaille <akim@epita.fr>
18429
18430 * tests/torture.at (Exploding the Stack Size with Malloc):
18431 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18432
18433 2001-11-27 Akim Demaille <akim@epita.fr>
18434
18435 * src/files.c: Include error.h.
18436 Reported by Hans Aberg.
18437
18438 2001-11-26 Marc Autret <autret_m@epita.fr>
18439
18440 * src/reader.c (parse_include_decl): New, not yet implemented.
18441 (read_declarations): Add case tok_include.
18442 * src/getargs.h (include): Add its extern definition.
18443 * src/getargs.c (include): New const char *.
18444 (getargs): Add case '-I'.
18445 * src/options.c (option_table): Add include as command line and
18446 percent option.
18447 * src/lex.h (token_t): Add tok_include.
18448
18449 2001-11-26 Akim Demaille <akim@epita.fr>
18450
18451 * src/reader.c (readgram): Make sure rules for mid-rule actions
18452 have a lineno equal to that of their host rule.
18453 Reported by Hans Aberg.
18454 * tests/regression.at (Rule Line Numbers): New.
18455
18456 2001-11-26 Akim Demaille <akim@epita.fr>
18457
18458 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18459 size_ts.
18460
18461 2001-11-26 Akim Demaille <akim@epita.fr>
18462
18463 * src/complain.c, src/complain.h (error): Remove, provided by
18464 lib/error.[ch].
18465
18466 2001-11-26 Akim Demaille <akim@epita.fr>
18467
18468 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18469 issue an error message.
18470 * tests/regression.at (Invalid %directive): New.
18471 Reported by Hans Aberg.
18472
18473 2001-11-26 Akim Demaille <akim@epita.fr>
18474
18475 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18476 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18477
18478 2001-11-26 Akim Demaille <akim@epita.fr>
18479
18480 * src/conflicts.c (conflicts_print): Don't complain at all when
18481 there are no reduce/reduce conflicts, and as many shift/reduce
18482 conflicts as expected.
18483 * tests/regression.at (%expect right): Adjust.
18484
18485 2001-11-23 Akim Demaille <akim@epita.fr>
18486
18487 * lib/alloca.c: Update, from fileutils.
18488
18489 2001-11-23 Akim Demaille <akim@epita.fr>
18490
18491 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18492
18493 2001-11-23 Akim Demaille <akim@epita.fr>
18494
18495 * src/system.h: Include alloca.h.
18496 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18497
18498 2001-11-23 Akim Demaille <akim@epita.fr>
18499
18500 * src/print_graph.c (print_actions): Remove `rule', unused.
18501 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18502 pacify GCC's signed < unsigned warnings.
18503 * src/closure.c (itemsetsize): Likewise.
18504 * src/reader.c (symbol_list_new): Static.
18505
18506 2001-11-23 Akim Demaille <akim@epita.fr>
18507
18508 Attaching lineno to buckets is stupid, since only one copy of each
18509 symbol is kept, only the line of the first occurrence is kept too.
18510
18511 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18512 * src/reader.c (rline_allocated): Remove, unused.
18513 (symbol_list): Have a `line' member.
18514 (symbol_list_new): New.
18515 (readgram): Use it.
18516 * src/print.c (print_grammar): Output the rule line numbers.
18517 * tests/regression.at (Solved SR Conflicts)
18518 (Unresolved SR Conflicts): Adjust.
18519 Reported by Hans Aberg.
18520
18521 2001-11-22 Marc Autret <autret_m@epita.fr>
18522
18523 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18524
18525 2001-11-22 Marc Autret <autret_m@epita.fr>
18526
18527 * src/muscle_tab.c (muscle_init): Remove initialization of
18528 skeleton muscle.
18529 * src/output.c (output_master_parser): Do it here.
18530
18531 2001-11-20 Akim Demaille <akim@epita.fr>
18532
18533 * po/sv.po: New.
18534 * configure.in (ALL_LINGUAS): Adjust.
18535 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18536 longer contains strings to translate.
18537
18538 2001-11-19 Akim Demaille <akim@epita.fr>
18539
18540 * src/conflicts.c (conflicts_print): Add a missing \n.
18541
18542 2001-11-19 Akim Demaille <akim@epita.fr>
18543
18544 * src/nullable.c (nullable_print): New.
18545 (set_nullable): Call it when tracing.
18546 Better locality of variables.
18547
18548 2001-11-19 Akim Demaille <akim@epita.fr>
18549
18550 * src/print.c (print_actions): Better locality of variables.
18551
18552 2001-11-19 Akim Demaille <akim@epita.fr>
18553
18554 * src/derives.c (print_derives): Fix and enrich.
18555 * src/closure.c (print_fderives): Likewise.
18556
18557 2001-11-19 Akim Demaille <akim@epita.fr>
18558
18559 * src/closure.c (itemsetend): Remove, replaced with...
18560 (itemsetsize): new.
18561
18562 2001-11-19 Akim Demaille <akim@epita.fr>
18563
18564 * src/LR0.c (kernel_end): Remove, replaced with...
18565 (kernel_size): new.
18566
18567 2001-11-19 Akim Demaille <akim@epita.fr>
18568
18569 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18570 to clarify.
18571
18572 2001-11-19 Akim Demaille <akim@epita.fr>
18573
18574 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18575
18576 2001-11-19 Akim Demaille <akim@epita.fr>
18577
18578 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18579 trace messages.
18580 * src/LR0.c: Likewise.
18581 (allocate_itemsets): Use arrays instead of pointers to clarify.
18582
18583 2001-11-19 Akim Demaille <akim@epita.fr>
18584
18585 * src/getargs.c (statistics_flag): Replace with...
18586 (trace_flag): New.
18587 (longopts): Accept --trace instead of --statistics.
18588 * src/getargs.h, src/options.c: Adjust.
18589 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18590 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18591
18592 2001-11-19 Akim Demaille <akim@epita.fr>
18593
18594 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
18595 pointers to clarify the code.
18596 (save_reductions, save_shifts): Factor common parts of alternatives.
18597
18598 2001-11-19 Akim Demaille <akim@epita.fr>
18599
18600 * src/LR0.c (new_state, get_state): Complete TRACE code.
18601 * src/closure.c: Include `reader.h' to get `tags', needed by the
18602 trace code.
18603 Rename the conditional DEBUG as TRACE.
18604 Output consistently TRACEs to stderr, not stdout.
18605 * src/derives.c: Likewise.
18606 * src/reduce.c: (inaccessable_symbols): Using if is better style
18607 than goto.
18608 Use `#if TRACE' instead of `#if 0' for tracing code.
18609
18610 2001-11-19 Akim Demaille <akim@epita.fr>
18611
18612 * src/system.h (LIST_FREE, shortcpy): New.
18613 * src/LR0.c: Use them.
18614 * src/output.c (free_itemsets, free_reductions, free_shifts):
18615 Remove, replaced by LIST_FREE.
18616
18617 2001-11-19 Akim Demaille <akim@epita.fr>
18618
18619 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
18620 (REDUCTIONS_ALLOC): New.
18621 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
18622 allocation.
18623
18624 2001-11-19 Akim Demaille <akim@epita.fr>
18625
18626 * src/LR0.c (new_state): Complete trace code.
18627 * src/nullable.c (set_nullable): Don't translate traces.
18628
18629 2001-11-19 Akim Demaille <akim@epita.fr>
18630
18631 * src/print_graph.c (print_core): Better locality of variables.
18632 * src/print.c (print_core): Likewise.
18633
18634 2001-11-19 Akim Demaille <akim@epita.fr>
18635
18636 * src/vcg.c: You do the output, so you are responsible of the
18637 handling of VCG syntax, in particular: use quotearg.
18638 * src/print_graph.c: Don't.
18639 (print_actions): Don't output the actions as part of the nodes,
18640 since that's the job of the edges.
18641 (print_state): Don't output by hand: fill the node description,
18642 and ask for its output.
18643
18644 2001-11-19 Akim Demaille <akim@epita.fr>
18645
18646 * src/bison.simple (yyparse): When verbosely reporting an error,
18647 no longer put additional quotes around token names.
18648 * tests/calc.at: Adjust.
18649
18650 2001-11-19 Akim Demaille <akim@epita.fr>
18651
18652 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
18653 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
18654 * src/output.c: Adjust.
18655
18656 2001-11-19 Akim Demaille <akim@epita.fr>
18657
18658 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
18659 (rule_t): this.
18660 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
18661
18662 2001-11-19 Akim Demaille <akim@epita.fr>
18663
18664 * src/gram.h (rule_t): New.
18665 (rule_table): New.
18666 (rrhs, rlhs): Remove, part of state_t.
18667 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
18668 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18669 * src/reader.c, src/reduce.c: Adjust.
18670
18671 2001-11-19 Akim Demaille <akim@epita.fr>
18672
18673 * src/reader.c (symbols_output): New, extracted from...
18674 (packsymbols): Here.
18675 (reader): Call it.
18676
18677 2001-11-19 Akim Demaille <akim@epita.fr>
18678
18679 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18680 (maxrhs): this new function.
18681
18682 2001-11-19 Akim Demaille <akim@epita.fr>
18683
18684 * src/lalr.c (F): New macro to access the variable F.
18685 Adjust.
18686
18687 2001-11-19 Akim Demaille <akim@epita.fr>
18688
18689 * src/lalr.h (LA): New macro to access the variable LA.
18690 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18691 * src/lalr.c: Adjust.
18692
18693 2001-11-19 Akim Demaille <akim@epita.fr>
18694
18695 * src/lalr.c (initialize_LA): Only initialize LA. Let...
18696 (set_state_table): handle the `lookaheads' members.
18697
18698 2001-11-19 Akim Demaille <akim@epita.fr>
18699
18700 * src/lalr.h (lookaheads): Removed array, whose contents is now
18701 a member of...
18702 (state_t): this structure.
18703 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18704 Adjust.
18705
18706 2001-11-19 Akim Demaille <akim@epita.fr>
18707
18708 * src/lalr.h (consistent): Removed array, whose contents is now
18709 a member of...
18710 (state_t): this structure.
18711 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18712 Adjust.
18713
18714 2001-11-19 Akim Demaille <akim@epita.fr>
18715
18716 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
18717 contents are now members of...
18718 (state_t): this structure.
18719 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18720 Adjust.
18721
18722 2001-11-19 Akim Demaille <akim@epita.fr>
18723
18724 * src/lalr.h (state_t): New.
18725 (state_table): Be a state_t * instead of a core **.
18726 (accessing_symbol): Remove, part of state_t.
18727 * src/lalr.c: Adjust.
18728 (set_accessing_symbol): Merge into...
18729 (set_state_table): this.
18730 * src/print_graph.c, src/conflicts.c: Adjust.
18731
18732 2001-11-14 Akim Demaille <akim@epita.fr>
18733
18734 * tests/calc.at, tests/output.at, tests/regression.at,
18735 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
18736 now the tests are run in private dirs, therefore AC_CLEANUP and
18737 family can be simplified to 0-ary.
18738 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
18739 use abs. path to find config.h.
18740 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
18741 stderr, there can be way too much random noise.
18742 Instead pass -Werror to GCC and rely on the exit status.
18743 Reported by Wolfram Wagner.
18744
18745 2001-11-14 Akim Demaille <akim@epita.fr>
18746
18747 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
18748 defined only if yyoverflow is defined, to avoid `warning: unused
18749 variable `yyvs1''.
18750 Reported by The Test Suite.
18751
18752 2001-11-14 Akim Demaille <akim@epita.fr>
18753
18754 * src/print.c: Include reduce.h.
18755 Reported by Hans Aberg.
18756
18757 2001-11-14 Akim Demaille <akim@epita.fr>
18758
18759 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
18760 Revert a previous patch: these are really const.
18761 * src/conflicts.c (conflict_report): Additional useless pair of
18762 braces to pacify GCC's warnings for `if () if () {} else {}'.
18763 * src/lex.c (parse_percent_token): Replace equal_offset with
18764 arg_offset.
18765 arg is const.
18766 Be sure to strdup `arg' when used, since there is no reason for
18767 token_buffer not to change.
18768
18769 2001-11-14 Akim Demaille <akim@epita.fr>
18770
18771 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18772 definition.
18773 * src/main.c (main): Use them.
18774 Suggested by Hans Aberg.
18775
18776 2001-11-12 Akim Demaille <akim@epita.fr>
18777
18778 * src/system.h (ngettext): Now that we use ngettext, be sure to
18779 provide a default definition when NLS are not used.
18780
18781 2001-11-12 Akim Demaille <akim@epita.fr>
18782
18783 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18784 Use @kbd to denote user input.
18785 (Language and Grammar): ANSIfy the example.
18786 Adjust its layout for info/notinfo.
18787 (Location Tracking Calc): Output error messages to stderr.
18788 Output locations in a more GNUtically correct way.
18789 Fix a couple of Englishos.
18790 Adjust @group/@end group pairs.
18791
18792 2001-11-12 Akim Demaille <akim@epita.fr>
18793
18794 %expect was not functioning at all.
18795
18796 * src/conflicts.c (expected_conflicts): Set to -1.
18797 (conflict_report): Use ngettext.
18798 (conflicts_print): Check %expect and make its violation an error.
18799 * doc/bison.texinfo (Expect Decl): Adjust.
18800 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18801 * tests/regression.at (%expect not enough, %expect right)
18802 (%expect too much): New.
18803
18804 2001-11-12 Akim Demaille <akim@epita.fr>
18805
18806 * tests/regression.at (Conflicts): Rename as...
18807 (Unresolved SR Conflicts): this.
18808 (Solved SR Conflicts): New.
18809
18810 2001-11-12 Akim Demaille <akim@epita.fr>
18811
18812 * src/reduce.c (print_results): Rename as...
18813 (reduce_output): This.
18814 Output to OUT, passed as argument, instead of output_obstack.
18815 (dump_grammar): Likewise.
18816 (reduce_free): New.
18817 Also free V1.
18818 (reduce_grammar): No longer call reduce_output, since...
18819 * src/print.c (print_results): do it.
18820 * src/main.c (main): Call reduce_free;
18821
18822 2001-11-12 Akim Demaille <akim@epita.fr>
18823
18824 * src/conflicts.c (print_reductions): Accept OUT as argument.
18825 Output to it, not to output_obstack.
18826 * src/print.c (print_actions): Adjust.
18827
18828 2001-11-12 Akim Demaille <akim@epita.fr>
18829
18830 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18831 the result instead of using...
18832 (src_total, rrc_total, src_count, rrc_count): Remove.
18833 (any_conflicts): Remove.
18834 (print_conflicts): Split into...
18835 (conflicts_print, conflicts_output): New.
18836 * src/conflicts.h: Adjust.
18837 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
18838 * src/print.c (print_grammar): Issue `\n' between two rules.
18839 * tests/regression.at (Conflicts): New.
18840 Reported by Tom Lane.
18841
18842 2001-11-12 Akim Demaille <akim@epita.fr>
18843
18844 * tests/regression.at (Invalid input): Remove, duplicate with
18845 ``Invalid input: 1''.
18846
18847 2001-11-12 Akim Demaille <akim@epita.fr>
18848
18849 * tests/torture.at (AT_DATA_STACK_TORTURE)
18850 (Exploding the Stack Size with Alloca)
18851 (Exploding the Stack Size with Malloc): New.
18852
18853 2001-11-12 Akim Demaille <akim@epita.fr>
18854
18855 * src/bison.simple (YYSTACK_REALLOC): New.
18856 (yyparse) [!yyoverflow]: Use it and free the old stack.
18857 Reported by Per Allansson.
18858
18859 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
18860
18861 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18862 define CPP macro, which substitute YYSTYPE by yystype.
18863 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18864 with yyltype/YYLTYPE. This allows inclusion of the generated
18865 header within the parser if the compiler, such as GGC, accepts
18866 multiple equivalent #defines.
18867 From Akim.
18868
18869 2001-11-05 Akim Demaille <akim@epita.fr>
18870
18871 * src/reader.c (symbols_output): New, extracted from...
18872 (packsymbols): here.
18873 (reader): Adjust.
18874
18875 2001-11-05 Akim Demaille <akim@epita.fr>
18876
18877 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18878
18879 2001-11-05 Akim Demaille <akim@epita.fr>
18880
18881 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18882 pattern.
18883
18884 2001-11-05 Akim Demaille <akim@epita.fr>
18885
18886 * src/options.h (struct option_table_struct): set_flags is void*.
18887 * src/options.c (longopts): Support `--output' and `%output'.
18888 (usage): Adjust.
18889 * src/lex.h (tok_setopt): Remove, replaced with...
18890 (tok_intopt, tok_stropt): these new guys.
18891 * src/lex.c (getopt.h): Not needed.
18892 (token_buffer, unlexed_token_buffer): Not const.
18893 (percent_table): Promote `-' over `_' in directive names.
18894 Active `%name-prefix', `file-prefix', and `output'.
18895 (parse_percent_token): Accept possible arguments to directives.
18896 Promote `-' over `_' in directive names.
18897
18898 2001-11-04 Akim Demaille <akim@epita.fr>
18899
18900 * doc/bison.texinfo (Decl Summary): Split the list into
18901 `directives for grammars' and `directives for bison'.
18902 Sort'em.
18903 Add description of `%name-prefix', `file-prefix', and `output'.
18904 Promote `-' over `_' in directive names.
18905 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18906 Simplify the description of `--name-prefix'.
18907 Promote `-' over `_' in directive names.
18908 Promote `--output' over `--output-file'.
18909 Fix the description of `--defines'.
18910 * tests/output.at: Exercise %file-prefix and %output.
18911
18912 2001-11-02 Akim Demaille <akim@epita.fr>
18913
18914 * doc/refcard.tex: Update.
18915
18916 2001-11-02 Akim Demaille <akim@epita.fr>
18917
18918 * src/symtab.h (SUNDEF): New.
18919 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18920 stand for `uninitialized', instead of 0.
18921 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18922 * src/lex.c (lex): Adjust.
18923
18924 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18925 Number it 0.
18926 Let yylex return it instead of a plain 0.
18927 Reported by Dick Streefland.
18928
18929 2001-11-02 Akim Demaille <akim@epita.fr>
18930
18931 * tests/regression.at (Mixing %token styles): New test.
18932
18933 2001-11-02 Akim Demaille <akim@epita.fr>
18934
18935 * src/reader.c (parse_thong_decl): Formatting changes.
18936 (token_translations_init): New, extracted from...
18937 (packsymbols): Here.
18938 Adjust.
18939
18940 2001-11-01 Akim Demaille <akim@epita.fr>
18941
18942 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18943 Check that `9foo.y' produces correct cpp guards.
18944 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18945 guards.
18946 Reported by Wwp.
18947
18948 2001-11-01 Akim Demaille <akim@epita.fr>
18949
18950 * tests/regression.at (Invalid input: 2): New.
18951 * src/lex.c (unlexed_token_buffer): New.
18952 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18953 too.
18954 Reported by Wwp.
18955
18956 2001-11-01 Akim Demaille <akim@epita.fr>
18957
18958 * tests/calc.at: Catch up with 1.30.
18959 * configure.in: Bump to 1.49a.
18960 Adjust to newer Autotest.
18961
18962 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
18963
18964 * src/conflicts.c: Move global variables rrc_total and src_total ...
18965 (print_conflicts): here.
18966 * src/output.c (output): Free global variable user_toknums.
18967 * src/lex.c (token_obstack): Become static.
18968
18969 2001-10-18 Akim Demaille <akim@epita.fr>
18970
18971 * tests/atlocal.in (GCC): Add.
18972 * tests/calc.at: s/m4_match/m4_bmatch/.
18973 s/m4_patsubst/m4_bpatsubst/.
18974 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18975 * configure.in: AC_SUBST(GCC).
18976
18977 2001-10-14 Marc Autret <autret_m@epita.fr>
18978
18979 * src/options.c (create_long_option_table): Fix.
18980
18981 2001-10-10 Akim Demaille <akim@epita.fr>
18982
18983 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18984
18985 2001-10-04 Akim Demaille <akim@epita.fr>
18986
18987 * src/reader.c (parse_union_decl): Push the caracters in
18988 union_obstack, not attrs_obstack.
18989
18990 2001-10-04 Akim Demaille <akim@epita.fr>
18991
18992 Merge in the branch 1.29.
18993
18994 * src/reader.c (packsymbols): Use a temporary obstack for
18995 `%%tokendef', since output_stack is already used elsewhere.
18996
18997 2001-10-02 Akim Demaille <akim@epita.fr>
18998
18999 Bump 1.29d.
19000
19001 2001-10-02 Akim Demaille <akim@epita.fr>
19002
19003 Version 1.29c.
19004
19005 2001-10-02 Akim Demaille <akim@epita.fr>
19006
19007 * tests/regression.at (Invalid CPP headers): New.
19008 From Alexander Belopolsky.
19009 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19010
19011 2001-10-02 Akim Demaille <akim@epita.fr>
19012
19013 * tests/regression.at (Invalid input): New.
19014 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19015 Reported by Shura.
19016
19017 2001-10-02 Akim Demaille <akim@epita.fr>
19018
19019 * tests/calc.at: Now that --debug works, the tests must be adjusted.
19020
19021 2001-10-02 Akim Demaille <akim@epita.fr>
19022
19023 * src/output.c (output_parser): Assert `skeleton'.
19024 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19025 systems.
19026 From Shura.
19027
19028 2001-10-01 Marc Autret <autret_m@epita.fr>
19029
19030 * src/lex.h: Echo modifications.
19031 * src/lex.c (unlex): Parameter is now token_t.
19032 From Hans Aberg.
19033
19034 2001-10-01 Marc Autret <autret_m@epita.fr>
19035
19036 * src/main.c: Include lex.h.
19037 From Hans Aberg.
19038
19039 2001-09-29 Akim Demaille <akim@epita.fr>
19040
19041 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19042
19043 2001-09-28 Akim Demaille <akim@epita.fr>
19044
19045 * tests/testsuite.at: Update to newer Autotest.
19046 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19047
19048 2001-09-27 Akim Demaille <akim@epita.fr>
19049
19050 Position independent wrapper.
19051
19052 * tests/bison: Remove.
19053 * tests/bison.in: New.
19054 * configure.in: Adjust.
19055
19056 2001-09-27 Paul Eggert <eggert@twinsun.com>
19057
19058 Port quotearg fixes from tar 1.13.24.
19059
19060 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19061 tm to be declared.
19062 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19063 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19064
19065 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19066 * m4/mbrtowc.m4: New file.
19067 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19068 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19069
19070 2001-09-27 Akim Demaille <akim@epita.fr>
19071
19072 Bump to 1.29c.
19073
19074 2001-09-27 Akim Demaille <akim@epita.fr>
19075
19076 Version 1.29b.
19077
19078 2001-09-25 Akim Demaille <akim@epita.fr>
19079
19080 * src/system.h: Include `xalloc.h'.
19081 Remove it from the C files.
19082 * src/files.c (output_files): Free the obstacks.
19083 * src/lex.c (init_lex): Rename as...
19084 (lex_init): this.
19085 (lex_free): New.
19086 * src/main.c (main): Use it.
19087
19088 2001-09-24 Marc Autret <autret_m@epita.fr>
19089
19090 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19091 to output informations in fout (FILE*).
19092 (open_graph, close_graph): Likewise.
19093 (output_graph, output_edge, output_node): Likewise.
19094 * src/vcg.h: Update function prototypes.
19095 * src/print_graph.c (print_graph): Open output graph file.
19096 (print_actions): Adjust.
19097 * src/files.h: Remove extern declaration.
19098 * src/files.c: Remove graph_obstack declaration.
19099 (open_files): Remove graph_obstack initialization.
19100 (output_files): Remove graph_obstack saving.
19101
19102 2001-09-24 Marc Autret <autret_m@epita.fr>
19103
19104 * src/files.c (compute_output_file_names): Fix.
19105
19106 2001-09-24 Marc Autret <autret_m@epita.fr>,
19107 Akim Demaille <akim@epita.fr>
19108
19109 * src/reader.c (reader): Remove call to free_symtab ().
19110 * src/main.c (main): Call it here.
19111 Include symtab.h.
19112 * src/conflicts.c (initialize_conflicts): Rename as...
19113 (solve_conflicts): this.
19114 * src/print.c (print_core, print_actions, print_state)
19115 (print_grammar): Dump to a file instead a `output_obstack'.
19116 (print_results): Dump `output_obstack', and then proceed with the
19117 FILE *.
19118 * src/files.c (compute_output_file_names, close_files): New.
19119 (output_files): Adjust.
19120 * src/main.c (main): Adjust.
19121
19122 2001-09-23 Marc Autret <autret_m@epita.fr>
19123
19124 * src/files.c (compute_header_macro): Computes header macro name
19125 from spec_defines_file when given.
19126
19127 2001-09-23 Marc Autret <autret_m@epita.fr>
19128
19129 * src/files.c (output_files): Add default extensions.
19130
19131 2001-09-22 Akim Demaille <akim@epita.fr>
19132
19133 * src/conflicts.c (finalize_conflicts): Rename as...
19134 (free_conflicts): this.
19135
19136 2001-09-22 Akim Demaille <akim@epita.fr>
19137
19138 * src/gram.c (gram_free): Rename back as...
19139 (dummy): this.
19140 (output_token_translations): Free `token_translations'.
19141 * src/symtab.c (free_symtab): Free the tag field.
19142
19143 2001-09-22 Akim Demaille <akim@epita.fr>
19144
19145 Remove `translations' as it is always set to true.
19146
19147 * src/gram.h: Adjust.
19148 * src/reader.c (packsymbols, parse_token_decl): Adjust
19149 * src/print.c (print_grammar): Adjust.
19150 * src/output.c (output_token_translations): Adjust.
19151 * src/lex.c (lex): Adjust.
19152 * src/gram.c: Be sure the set pointers to NULL.
19153 (dummy): Rename as...
19154 (gram_free): this.
19155
19156 2001-09-22 Akim Demaille <akim@epita.fr>
19157
19158 * configure.in: Invoke AM_LIB_DMALLOC.
19159 * src/system.h: Use dmalloc.
19160 * src/LR0.c: Be sure to have pointers initialized to NULL.
19161 (allocate_itemsets): Allocate kernel_items only if needed.
19162
19163 2001-09-22 Akim Demaille <akim@epita.fr>
19164
19165 * configure.in: Bump to 1.29b.
19166 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19167 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19168 need xmalloc.c in calc.y.
19169 From Pascal Bart.
19170
19171 2001-09-21 Akim Demaille <akim@epita.fr>
19172
19173 Version 1.29a.
19174 * Makefile.maint, config/config.guess, config/config.sub,
19175 * config/missing: Update from masters.
19176 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19177 upon package.m4.
19178 * configure.in (ALL_LINGUAS): Add `tr'.
19179
19180 2001-09-21 Akim Demaille <akim@epita.fr>
19181
19182 * tests/Makefile.am (package.m4): Move to...
19183 ($(srcdir)/$(TESTSUITE)): here.
19184
19185 2001-09-20 Akim Demaille <akim@epita.fr>
19186
19187 * src/complain.c: No longer try to be standalone: use system.h.
19188 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19189 * src/complain.h: Likewise.
19190 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19191 Remove the unused variable `n'.
19192 From Albert Chin-A-Young.
19193
19194 2001-09-18 Marc Autret <autret_m@epita.fr>
19195
19196 * doc/bison.1: Update.
19197 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19198 descriptions.
19199 (Option Cross Key): Update.
19200 Add --graph.
19201
19202 2001-09-18 Marc Autret <autret_m@epita.fr>
19203
19204 * tests/regression.at: New test (comment in %union).
19205
19206 2001-09-18 Marc Autret <autret_m@epita.fr>
19207
19208 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19209 do that.
19210 Reported by Keith Browne.
19211
19212 2001-09-18 Marc Autret <autret_m@epita.fr>
19213
19214 * tests/output.at: Add tests for --defines and --graph.
19215
19216 2001-09-18 Marc Autret <autret_m@epita.fr>
19217
19218 * tests/output.at: Removes tests of %{header,src}_extension features.
19219
19220 2001-09-18 Akim Demaille <akim@epita.fr>
19221
19222 * tests/Makefile.am (package.m4): New.
19223 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19224 (_AT_CHECK_CALC_ERROR): Likewise.
19225 Factor the `, ' part of verbose error messages.
19226
19227 2001-09-18 Marc Autret <autret_m@epita.fr>
19228
19229 * src/getargs.c (longopts): Declare --defines and --graph as options
19230 with optional arguments.
19231 * src/files.h: Add extern declarations.
19232 * src/files.c (spec_graph_file, spec_defines_file): New.
19233 (output_files): Update.
19234 Remove CPP-outed code.
19235
19236 2001-09-18 Marc Autret <autret_m@epita.fr>
19237
19238 Turn off %{source,header}_extension feature.
19239
19240 * src/files.c (compute_exts_from_gf): Update.
19241 (compute_exts_from_src): Update.
19242 (output_files): CPP-out useless code.
19243 * src/files.h: Remove {header,source}_extension extern declarations.
19244 * src/reader.c (parse_dquoted_param): CPP-out.
19245 (parse_header_extension_decl): Remove.
19246 (parse_source_extension_decl): Remove.
19247 (read_declarations): Remove cases tok_{hdrext,srcext}.
19248 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19249 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19250
19251 2001-09-10 Akim Demaille <akim@epita.fr>
19252
19253 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19254 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19255 (AT_CHECK_OUTPUT): this.
19256 Merely check ls' exit status, its output is useless.
19257
19258 2001-09-10 Akim Demaille <akim@epita.fr>
19259
19260 * tests/calc.at: Use m4_match.
19261 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19262
19263 2001-09-10 Marc Autret <autret_m@epita.fr>,
19264 Akim Demaille <akim@epita.fr>
19265
19266 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19267 enum color_e.
19268 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19269 to `normal'.
19270 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19271 * src/lex.h: Adjust prototype.
19272 (token_t): Add `tok_undef'.
19273 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19274 (parse_percent_token): Now returns token_t.
19275 Add default statement in switch.
19276 (lex): Separate `c' as an input variable, from the token_t result
19277 part.
19278 (unlexed): Is a token_t.
19279
19280 2001-09-10 Akim Demaille <akim@epita.fr>
19281
19282 * configure.in: Bump to 1.29a.
19283
19284 2001-09-07 Akim Demaille <akim@epita.fr>
19285
19286 Version 1.29.
19287
19288 2001-08-30 Akim Demaille <akim@epita.fr>
19289
19290 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19291 * m4/atconfig.m4: Remove.
19292 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19293 * tests/bison: New.
19294 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19295 m4_if, m4_patsubst, and m4_regexp.
19296 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19297 `input' file instead of echo.
19298
19299 2001-08-29 Akim Demaille <akim@epita.fr>
19300
19301 Bump to 1.28e.
19302
19303 2001-08-29 Akim Demaille <akim@epita.fr>
19304
19305 Version 1.28d.
19306
19307 2001-08-29 Paul Eggert <eggert@twinsun.com>
19308
19309 * src/bison.simple (yyparse): Don't take the address of an
19310 item before the start of an array, as that doesn't conform to
19311 the C Standard.
19312
19313 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19314
19315 * doc/bison.texinfo (Location Tracking Calc): New node.
19316
19317 2001-08-29 Paul Eggert <eggert@twinsun.com>
19318
19319 * src/output.c (output): Do not define const, as this now
19320 causes more problems than it cures.
19321
19322 2001-08-29 Akim Demaille <akim@epita.fr>
19323
19324 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19325 the nodes.
19326 Be sure to tag the `detailmenu'.
19327
19328 2001-08-29 Akim Demaille <akim@epita.fr>
19329
19330 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19331 download in a tmp dir.
19332
19333 2001-08-28 Marc Autret <autret_m@epita.fr>
19334
19335 * config/depcomp: New file.
19336
19337 2001-08-28 Marc Autret <autret_m@epita.fr>
19338
19339 * doc/bison.1 (mandoc): Adjust.
19340 From Juan Manuel Guerrero.
19341
19342 2001-08-28 Marc Autret <autret_m@epita.fr>
19343
19344 * src/print_graph.c (print_state): Fix.
19345
19346 2001-08-27 Marc Autret <autret_m@epita.fr>
19347
19348 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19349 char * members.
19350 Echo modifications to the functions prototypes.
19351 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19352
19353 2001-08-27 Marc Autret <autret_m@epita.fr>
19354
19355 * src/vcg.c: Include `xalloc.h'.
19356 (add_colorentry): New.
19357 (add_classname): New.
19358 (add_infoname): New.
19359 * src/vcg.h: Add new prototypes.
19360
19361 2001-08-27 Akim Demaille <akim@epita.fr>
19362
19363 * Makefile.maint: Sync. again with CVS Autoconf.
19364
19365 2001-08-27 Akim Demaille <akim@epita.fr>
19366
19367 * Makefile.maint: Formatting changes.
19368 (po-update, cvs-update, update): New targets.
19369 (AMTAR): Remove.
19370
19371 2001-08-27 Akim Demaille <akim@epita.fr>
19372
19373 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19374 * Makefile.maint: Sync. with CVS Autoconf.
19375
19376 2001-08-27 Marc Autret <autret_m@epita.fr>
19377
19378 * src/vcg.h (struct infoname_s): New.
19379 (struct colorentry_s): New.
19380 (graph_s): New fields {vertical,horizontal}_order in structure.
19381 Add `infoname' field.
19382 Add `colorentry' field;
19383 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19384 (G_HORIZONTAL_ORDER): New.
19385 (G_INFONAME): New.
19386 (G_COLORENTRY): New.
19387 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19388 Add output of `infoname'.
19389 Add output of `colorentry'.
19390
19391 2001-08-27 Marc Autret <autret_m@epita.fr>
19392
19393 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19394 This one shadowed a global parameter.
19395
19396 2001-08-24 Marc Autret <autret_m@epita.fr>
19397
19398 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19399 instead of `unsigned'.
19400 (print_state): Do not call obstack_object_size () in obstack_grow ()
19401 to avoid macro variables shadowing.
19402
19403 2001-08-23 Marc Autret <autret_m@epita.fr>
19404
19405 * src/lex.c (percent_table): Typo: s/naem/name/.
19406 Add graph option.
19407 Normalize new options declarations.
19408
19409 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19410
19411 * tests/suite.at: Exercise %header_extension and %source_extension.
19412
19413 2001-08-16 Marc Autret <autret_m@epita.fr>
19414
19415 * src/reader.c (parse_dquoted_param): New.
19416 (parse_header_extension_decl): Use it.
19417 (parse_source_extension_decl): Likewise.
19418
19419 2001-08-16 Marc Autret <autret_m@epita.fr>
19420
19421 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19422 (get_xxxx_str): Use assert () instead of complain ().
19423 Remove return invokations in default cases.
19424 (get_decision_str): Modify default behaviour. Remove second argument.
19425 Echo modifications on calls.
19426 (output_graph): Fix.
19427
19428 2001-08-16 Marc Autret <autret_m@epita.fr>
19429
19430 * src/getargs.c (usage): Update with ``-g, --graph''.
19431
19432 2001-08-16 Marc Autret <autret_m@epita.fr>
19433
19434 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19435 (Option Cross Key): Likewise.
19436 * doc/bison.1: Update.
19437
19438 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
19439
19440 * src/output.c (output_master_parser): Don't finish action_obstack.
19441 (output_parser): Don't care about the muscle action, here.
19442 (prepare): Copy the action_obstack in the action muscle.
19443 (output): Free action_obstack.
19444
19445 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19446
19447 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19448 will contain `%union' declaration.
19449 (parse_union_decl): Delete #line directive output.
19450 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19451 informations about %union.
19452 (parse_union_decl): Copy the union_obstack in the muscle stype.
19453 * src/bison.simple: Add new #line directive.
19454 Add typdef %%stype YYSTYPE.
19455
19456 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19457
19458 * src/bison.simple: Add new `#line' directive.
19459
19460 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
19461
19462 * src/bison.simple: New `#line' directive.
19463 * src/output.c (output_parser): Support new dynamic muscle input_line.
19464
19465 2001-09-22 Marc Autret <autret_m@epita.fr>
19466
19467 * src/output.c (output_master_parser): New.
19468 (output_parser): Be more re-entrant.
19469
19470 2001-09-21 Marc Autret <autret_m@epita.fr>
19471
19472 * src/reader.c (copy_definition, parse_union_decl): Update and use
19473 `linef' muscle.
19474 (copy_action): Likewise.
19475 Use obstack_1grow ().
19476 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19477
19478 2001-09-21 Marc Autret <autret_m@epita.fr>
19479
19480 * src/options.c (option_table): Adjust.
19481 * src/lex.c (parse_percent_token): Fix.
19482
19483 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19484
19485 * src/options.c (symtab.h): Include it, need by lex.h.
19486
19487 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19488
19489 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19490 is now an option_table_struct*.
19491 (option_strcmp): New function option_strcmp.
19492 (parse_percent_token): Call option_strcmp.
19493 * src/getargs.c (xalloc.h, options.h): Include it.
19494 (getargs): Call create_long_option_table.
19495 (getargs): Free longopts at the end of the function.
19496 (shortopts): Move in options.c.
19497 * src/options.c (create_long_option_table): New function. Convert
19498 information from option_table to option structure.
19499 * src/reader.c (options.h): Include it.
19500
19501 * src/Makefile.am: Adjust.
19502 * src/options.c (option_table): Create from longopts and percent_table.
19503 * src/getargs.c (longopts): Delete.
19504 * src/lex.c (struct percent_table_struct): Delete.
19505 (percent_table): Delete.
19506 (options.h): Include it.
19507 * src/options.c: Create.
19508 * src/options.h: Create.
19509 Declare enum opt_access_e.
19510 Define struct option_table_struct.
19511
19512 2001-09-20 Marc Autret <autret_m@epita.fr>
19513
19514 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19515 sections of Bison.
19516
19517 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
19518
19519 * src/bison.simple: s/%%filename/%%skeleton.
19520 * src/muscle_tab.c (getargs.h): Include it.
19521 (muscle_init): Insert new muscle skeleton.
19522
19523 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
19524
19525 * src/output.c (output_parser): Delete unused variable actions_dumped.
19526
19527 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
19528
19529 * src/output.c (output): Delete call to reader_output_yylsp.
19530 * src/reader.c (reader): Likewise.
19531 * src/reader.h: Delete declaration of reader_output_yylsp.
19532
19533 2001-09-02 Marc Autret <autret_m@epita.fr>
19534
19535 * src/reader.c: Include muscle_tab.h.
19536 (parse_union_decl): Update.
19537 (parse_macro_decl): Rename parse_muscle_decl.
19538 Update to use renamed functions and variable.
19539 (read_declarations, copy_action, read_additionnal_code, : Updated
19540 with correct variables and functions names.
19541 (packsymbols, reader): Likewise.
19542
19543 * src/reader.h (muscle_obstack): Extern declaration update.
19544
19545 * src/output.c: Include muscle_tab.h
19546 In all functions using macro_insert, change by using muscle_insert ().
19547 (macro_obstack): Rename muscle_obstack.
19548 Echo modifications in the whole file.
19549 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19550 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19551 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19552
19553 * src/muscle_tab.h: Update double inclusion macros.
19554 (macro_entry_s): Rename muscle_entry_s.
19555 Update prototypes.
19556
19557 * src/muscle_tab.c: Include muscle_tab.h.
19558 Rename macro_tabble to muscle_table.
19559 (mhash1, mhash2, mcmp): Use muscle_entry.
19560 (macro_init): Rename muscle_init. Update.
19561 (macro_insert): Rename muscle_insert. Update.
19562 (macro_find): Rename muscle_find. Update.
19563
19564 * src/main.c: Include muscle_tab.h.
19565 (main): Call muscle_init ().
19566 * src/Makefile.am (bison_SOURCES): Echo modifications.
19567
19568 2001-09-02 Marc Autret <autret_m@epita.fr>
19569
19570 Now the files macro_tab.[ch] are named muscle_tab.[ch].
19571
19572 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19573
19574 2001-09-02 Marc Autret <autret_m@epita.fr>
19575
19576 * src/macrotab.c, src/macrotab.h: Remove.
19577
19578 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
19579
19580 * src/reader.c (copy_guard): Use muscle to specify the `#line'
19581 filename.
19582
19583 2001-09-01 Marc Autret <autret_m@epita.fr>
19584
19585 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19586 to an explicit value to activate the feature. We do it here.
19587
19588 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19589
19590 * src/output.c (prepare): Delete the `filename' muscule insertion.
19591 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19592 (parse_union_decl): Likewise.
19593 * src/macrotab.c (macro_init): Initialize filename by infile.
19594
19595 2001-08-31 Marc Autret <autret_m@epita.fr>
19596
19597 * src/bison.simple (YYLSP_NEEDED): New definition.
19598 * src/output.c (prepare): Add macro insertion of `locations_flag'
19599
19600 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19601
19602 * src/output.c (prepare): Delete insertion of previous muscles,
19603 and insert the `prefix' muscles.
19604 * src/macrotab.c (macro_init): Likewise.
19605 (macro_init): Initialization prefix directive by `yy'.
19606 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
19607 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
19608 yylval, yydebug, yyerror, yynerrs and yyparse.
19609 New directive `#define' to substitute yydebug, ... with option
19610 name_prefix.
19611
19612 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19613
19614 * src/main.c (main): Standardize.
19615 * src/output.c (output_table_data, output_parser): Likewise.
19616 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
19617
19618 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
19619
19620 * src/reader.c (read_additionnal_code): Rename %%user_code to
19621 %%epilogue.
19622 * src/output.c (output): Rename %%declarations to %%prologue.
19623 * src/bison.simple: Echo modifications.
19624
19625 2001-08-31 Marc Autret <autret_m@epita.fr>
19626
19627 * src/reader.c (readgram): CleanUp.
19628 (output_token_defines): Likewise.
19629 (packsymbols): Likewise.
19630 (reader): Likewise.
19631 * src/output.c (output): CPP-out useless code.
19632
19633 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19634
19635 * src/reader.c (reader): Delete obsolete call to function
19636 output_trailers and output_headers.
19637 * src/output.h: Remove obsolete functions prototypes of output_headers
19638 and output_trailers.
19639
19640 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
19641
19642 * src/main.c: Include macrotab.h.
19643 * src/macrotab.h (macro_entry_s): Constify fields.
19644 Adjust functions prototypes.
19645 * src/macrotab.c (macro_insert): Constify key and value.
19646 (macro_find): Constify key.
19647 (macro_insert): Include 'xalloc.h'
19648 (macro_insert): Use XMALLOC.
19649 (macro_find): Constify return value.
19650 * src/output.c (output_table_data): Rename table to table_data.
19651 (output_parser): Constify macro_key, macro_value.
19652
19653 2001-08-30 Marc Autret <autret_m@epita.fr>
19654
19655 * src/reader.c (parse_skel_decl): New.
19656 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
19657 * src/lex.h (token_t): New token `tok_skel'.
19658 * src/lex.c (percent_table): Add skeleton option entry.
19659 Standardize.
19660
19661 2001-08-29 Marc Autret <autret_m@epita.fr>
19662
19663 * src/bison.simple: Add %%user_code directive at the end.
19664 * src/reader.c (read_additionnal_code): New.
19665 (reader): Use it.
19666 * src/output.c (output_program): Remove.
19667 (output): Update.
19668
19669 2001-08-28 Marc Autret <autret_m@epita.fr>
19670
19671 * src/output.c (output_actions): Clean up.
19672 (output_gram): CPP-out useless code.
19673 * src/reader.c (reader): Clean up, CPP-out useless code.
19674
19675 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
19676
19677 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
19678 directive.
19679 * src/bison.simple: Add `%%definitions'.
19680
19681 2001-08-28 Marc Autret <autret_m@epita.fr>
19682
19683 * config/depcomp: New file.
19684
19685 2001-08-27 Paul Eggert <eggert@twinsun.com>
19686
19687 * src/bison.simple (yyparse): Don't take the address of an
19688 item before the start of an array, as that doesn't conform to
19689 the C Standard.
19690
19691 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19692
19693 * src/output.c (output): Remove the initialization of the macro
19694 obstack. It was done too late here.
19695
19696 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
19697 completely wrong.
19698 (reader): Initialize the macro obstack here, since we need it to grow
19699 '%define' directives.
19700
19701 * src/reader.h: Declare the macro obstack as extern.
19702
19703 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19704
19705 * src/output.c (output_parser): Fix. Store single '%' characters in
19706 the output obstack instead of throwing them away.
19707
19708 2001-08-27 Akim Demaille <akim@epita.fr>
19709
19710 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19711
19712 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19713
19714 * lib/Makefile.am: Adjust.
19715
19716 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19717
19718 * src/bison.simple: Update and add '%%' directives.
19719
19720 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19721
19722 * src/reader.c (reader): Remove calls to 'output_headers' and
19723 'output_trailers'. Remove some C output.
19724 (readgram): Disable a piece of code that was writing a default
19725 definition for 'YYSTYPE'.
19726 (reader_output_yylsp): Remove.
19727 (packsymbols): Output token defintions to a macro.
19728 (copy_definition): Disable C output.
19729
19730 * src/reader.c (parse_macro_decl): New function used to parse macro
19731 declarations.
19732 (copy_string2): Put the body of copy_string into this new function.
19733 Add a parameter to let the caller choose whether he wants to copy the
19734 string delimiters or not.
19735 (copy_string): Be a simple call to copy_string2 with the last argument
19736 bound to true.
19737 (read_declarations): Add case for macro definition.
19738 (copy_identifier): New.
19739 (parse_macro_decl): Read macro identifiers using copy_identifier
19740 rather than lex.
19741
19742 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19743
19744 * src/output.c (prepare): Add prefixed names.
19745 (output_parser): Output semantic actions.
19746 (output_parser): Fix bug on '%%line' directives.
19747
19748 * src/output.c (output_headers): Remove. The C code printed by this
19749 function should now be in the skeletons.
19750 (output_trailers): Remove.
19751 (output): Disable call to 'reader_output_yylsp'.
19752 (output_rule_data): Do not output tables to the table obstack.
19753
19754 * src/output.c: Remove some C dedicated output.
19755 Improve the use of macro and output obstacks.
19756 (output_defines): Remove.
19757
19758 * src/output.c (output_token_translations): Associate 'translate'
19759 table with a macro. No output to the table obstack.
19760 (output_gram): Same for 'rhs' and 'prhs'.
19761 (output_stos): Same for 'stos'.
19762 (output_rule_data): Same for 'r1' and 'r2'.
19763 (token_actions): Same for 'defact'.
19764 (goto_actions): Same for 'defgoto'.
19765 (output_base): Same for 'pact' and 'pgoto'.
19766 (output_table): Same for 'table'.
19767 (output_check): Same for 'check'.
19768
19769 * src/output.c (output_table_data): New function.
19770 (output_short_table): Remove.
19771 (output_short_or_char_table): Remove.
19772
19773 * src/output.c (output_parser): Replace most of the skeleton copy code
19774 with something new. Skeletons are now processed character by character
19775 rather than line by line, and Bison looks for '%%' macros. This is the
19776 first step in making Bison's output process (a lot) more flexible.
19777 (output_parser): Use the macro table.
19778
19779 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19780
19781 * src/main.c (main): Initialize the macro table.
19782
19783 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19784
19785 * src/lex.c (percent_table): Add tok_define.
19786 * src/lex.h: Add tok_define.
19787
19788 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19789
19790 * src/macrotab.c: New file.
19791 * src/macrotab.h: New file.
19792 * src/Makefile.am: Update.
19793
19794 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19795
19796 * lib/hash.c: New file.
19797 * lib/hash.h: New file.
19798 * lib/Makefile.am: Update.
19799
19800 2001-08-15 Akim Demaille <akim@epita.fr>
19801
19802 Version 1.28c.
19803
19804 2001-08-15 Marc Autret <autret_m@epita.fr>
19805
19806 * src/reader.c (readgram): Indent output macro YYSTYPE.
19807 (packsymbols): Likewise.
19808 (output_token_defines): Likewise.
19809 * src/files.c: Standardize.
19810 (compute_header_macro): New.
19811 (defines_obstack_save): New. Use compute_header_macro.
19812 (output_files): Update. Use defines_obstack_save.
19813
19814 2001-08-15 Akim Demaille <akim@epita.fr>
19815
19816 * doc/bison.texinfo (Table of Symbols): Document
19817 YYSTACK_USE_ALLOCA.
19818
19819 2001-08-15 Akim Demaille <akim@epita.fr>
19820
19821 * missing: Update from CVS Automake.
19822 * config/config.guess, config/config.sub, config/texinfo.tex:
19823 Update from gnu.org.
19824
19825 2001-08-15 Akim Demaille <akim@epita.fr>
19826
19827 * Makefile.maint: Sync with CVS Autoconf.
19828
19829 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
19830
19831 * doc/bison.texinfo: Include GNU Free Documentation License from
19832 `fdl.texi'.
19833 * doc/fdl.texi: Add to package.
19834
19835 2001-08-14 Marc Autret <autret_m@epita.fr>
19836
19837 Turn on %{source,header}_extension features.
19838
19839 * src/lex.c (percent_table): Un-CPP out header_extension and
19840 source_extension.
19841 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
19842 (compute_exts_from_src): Remove conditions. It restores priorities
19843 between options.
19844
19845 2001-08-14 Marc Autret <autret_m@epita.fr>
19846
19847 * src/files.c (compute_base_names): Add extensions computing when
19848 `--file-prefix' used.
19849 Standardize function calls.
19850
19851 2001-08-13 Marc Autret <autret_m@epita.fr>
19852
19853 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
19854 defining it (defined but null disables alloca).
19855
19856 2001-08-13 Marc Autret <autret_m@epita.fr>
19857
19858 * src/bison.simple (_yy_memcpy): CPP reformat.
19859
19860 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
19861
19862 * tests/atconfig.in (CPPFLAGS): Fix.
19863
19864 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
19865
19866 * doc/bison.texinfo: Include GNU General Public License from
19867 `gpl.texi'.
19868 * doc/gpl.texi: Add to package.
19869
19870 2001-08-10 Marc Autret <autret_m@epita.fr>
19871
19872 * src/print_graph.h: Fix.
19873 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19874
19875 2001-08-10 Akim Demaille <akim@epita.fr>
19876
19877 * src/system.h: Provide default declarations for stpcpy, strndup,
19878 and strnlen.
19879
19880 2001-08-10 Robert Anisko <anisko_r@epita.fr>
19881
19882 * doc/bison.texinfo (Locations): Update @$ stuff.
19883
19884 2001-08-09 Robert Anisko <anisko_r@epita.fr>
19885
19886 * src/bison.simple (YYLLOC_DEFAULT): Update.
19887 (yyparse): Adjust.
19888
19889 2001-08-08 Marc Autret <autret_m@epita.fr>
19890
19891 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
19892 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19893 Reported by Fabrice Bauzac.
19894
19895 2001-08-08 Marc Autret <autret_m@epita.fr>
19896
19897 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19898 * src/vcg.c (output_node): Fix.
19899 * src/vcg.h: Cleanup.
19900 * src/print_graph.c: Add comments.
19901 (node_output_size): New global variable. Simplify the formatting of
19902 the VCG graph output.
19903 (print_actions): Unused code is now used. It notifies the final state
19904 and no action states in the VCG graph. It also give the reduce actions.
19905 The `shift and goto' edges are red and the `go to state' edges are
19906 blue.
19907 Get the current node name and node_obstack by argument.
19908 (node_obstack): New variable.
19909 (print_state): Manage node_obstack.
19910 (print_core): Use node_obstack given by argument.
19911 A node is not only computed here but in print_actions also.
19912 (print_graph): CPP out useless code instead of commenting it.
19913
19914 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
19915
19916 * tests/atconfig.in (CPPFLAGS): Fix.
19917
19918 2001-08-07 Akim Demaille <akim@epita.fr>
19919
19920 * src/print_graph.c (quote): New.
19921 (print_core): Use it.
19922
19923 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
19924
19925 * src/vcg.c (complain.h): Include it.
19926 Unepitaize `return' invocations.
19927 [NDEBUG] (main): Remove.
19928 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
19929 * src/files.c (open_files): Initialize graph_obstack.
19930 * src/print_graph.c (print_actions): CPP out useless code.
19931 (print_core): Don't output the last `\n' in labels.
19932 Use `quote'.
19933 * src/files.c (output_files): Output the VCG file.
19934 * src/main.c (main): Invoke print_graph ();
19935
19936 2001-08-06 Marc Autret <autret_m@epita.fr>
19937
19938 Automaton VCG graph output.
19939 Using option ``-g'' or long option ``--graph'', you can generate
19940 a gram_filename.vcg file containing a VCG description of the LALR (1)
19941 automaton of your grammar.
19942
19943 * src/main.c: Call to print_graph() function.
19944 * src/getargs.h: Update.
19945 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19946 (graph_flag): New flag.
19947 (longopts): Update.
19948 (getargs): Add case `g'.
19949 * src/files.c (graph_obstack): New obstack struct.
19950 (open_files): Initialize new obstack.
19951 (output_files): Saves graph_obstack if required.
19952 * src/files.h (graph_obstack): New extern declaration.
19953 * src/Makefile.am: Add new source files.
19954
19955 2001-08-06 Marc Autret <autret_m@epita.fr>
19956
19957 * src/print_graph.c, src/print_graph.h (graph): New.
19958 * src/vcg.h: New file.
19959 * src/vcg.c: New file, VCG graph handling.
19960
19961 2001-08-06 Marc Autret <autret_m@epita.fr>
19962
19963 Add of %source_extension and %header_extension which specify
19964 the source or/and the header output file extension.
19965
19966 * src/files.c (compute_base_names): Remove initialisation of
19967 src_extension and header_extension.
19968 (compute_exts_from_gf): Update.
19969 (compute_exts_from_src): Update.
19970 (output_files): Update.
19971 * src/reader.c (parse_header_extension_decl): New.
19972 (parse_source_extension_decl): New.
19973 (read_declarations): New case statements for the new tokens.
19974 * src/lex.c (percent_table): Add entries for %source_extension
19975 and %header_extension.
19976 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19977
19978 2001-08-06 Marc Autret <autret_m@epita.fr>
19979
19980 * configure.in: Bump to 1.28c.
19981 * doc/bison.texinfo: Texinfo thingies.
19982
19983 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
19984
19985 * tests/atconfig.in (CPPFLAGS): Add.
19986 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19987
19988 2001-08-03 Akim Demaille <akim@epita.fr>
19989
19990 Version 1.28b.
19991
19992 2001-08-03 Akim Demaille <akim@epita.fr>
19993
19994 * tests/Makefile.am (check-local): Ship testsuite.
19995 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19996 Include `string.h'.
19997
19998 2001-08-03 Akim Demaille <akim@epita.fr>
19999
20000 * configure.in: Try using -Wformat when compiling.
20001
20002 2001-08-03 Akim Demaille <akim@epita.fr>
20003
20004 * configure.in: Bump to 1.28b.
20005
20006 2001-08-03 Akim Demaille <akim@epita.fr>
20007
20008 * src/complain.c: Adjust strerror_r portability issues.
20009
20010 2001-08-03 Akim Demaille <akim@epita.fr>
20011
20012 Version 1.28a.
20013
20014 2001-08-03 Akim Demaille <akim@epita.fr>
20015
20016 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20017 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20018 * src/getargs.c: Include complain.h.
20019 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
20020 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
20021
20022 2001-08-03 Akim Demaille <akim@epita.fr>
20023
20024 * src/reader.c (readgram): Display hidden chars in error messages.
20025
20026 2001-08-03 Akim Demaille <akim@epita.fr>
20027
20028 Update to gettext 0.10.39.
20029
20030 2001-08-03 Akim Demaille <akim@epita.fr>
20031
20032 * lib/strspn.c: New.
20033
20034 2001-08-01 Marc Autret <autret_m@epita.fr>
20035
20036 * doc/bison.texinfo: Update.
20037 * doc/bison.1 (mandoc): Update.
20038 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20039 * src/files.c: Support output files extensions computing.
20040 (src_extension): New static variable.
20041 (header_extension): New static variable.
20042 (tr): New function.
20043 (get_extension_index): New function, gets the index of an extension
20044 filename in a string.
20045 (compute_exts_from_gf): New function, computes extensions from the
20046 grammar file extension.
20047 (compute_exts_from_src): New functions, computes extensions from the
20048 C source file extension, file given by ``-o'' option.
20049 (compute_base_names): Update.
20050 (output_files): Update.
20051
20052 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20053
20054 * doc/bison.texi: Document @$.
20055 (Locations): New section.
20056
20057 2001-07-18 Akim Demaille <akim@epita.fr>
20058
20059 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20060 * config/prev-version.txt, config/move-if-change: New.
20061 * Makefile.am: Adjust.
20062
20063 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20064
20065 * src/bison.simple (yyparse): Suppress warning `comparaison
20066 between signed and unsigned'.
20067
20068 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20069
20070 * src/getargs.h (raw_flag): Remove.
20071 * src/getargs.c: Die on `-r'/`--raw'.
20072 * src/lex.c (parse_percent_token): Die on `%raw'.
20073 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20074 * tests/calc.at: Suppress test with option `--raw'.
20075
20076 2001-07-14 Akim Demaille <akim@epita.fr>
20077
20078 * config/: New.
20079 * configure.in: Require Autoconf 2.50.
20080 Update to gettext 0.10.38.
20081
20082 2001-03-16 Akim Demaille <akim@epita.fr>
20083
20084 * doc/bison.texinfo: ANSIfy the examples.
20085
20086 2001-03-16 Akim Demaille <akim@epita.fr>
20087
20088 * getargs.c (skeleton): New variable.
20089 (longopts): --skeleton is a new option.
20090 (shortopts, getargs): -S is a new option.
20091 * getargs.h: Declare skeleton.
20092 * output.c (output_parser): Use it.
20093
20094 2001-03-16 Akim Demaille <akim@epita.fr>
20095
20096 * m4/strerror_r.m4: New.
20097 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20098 * lib/error.h, lib/error.c: Update.
20099
20100 2001-03-16 Akim Demaille <akim@epita.fr>
20101
20102 * src/getargs.c (longopts): Clean up.
20103
20104 2001-02-21 Akim Demaille <akim@epita.fr>
20105
20106 * src/reader.c (gensym): `gensym_count' is your own.
20107 Use a static buf to create the symbol name, as token_buffer is no
20108 longer a buffer.
20109
20110 2001-02-08 Akim Demaille <akim@epita.fr>
20111
20112 * src/conflicts.c (conflict_report): Be sure not to append to res
20113 between two calls, which could happen if both first sprintf were
20114 skipped, but not the first cp += strlen.
20115
20116 2001-02-08 Akim Demaille <akim@epita.fr>
20117
20118 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20119 New, from fileutils 4.0.37.
20120 * configure.in: Require Autoconf 2.49c. I took some time before
20121 making this decision. This is the only way out for portability
20122 issues in Bison, it would mean way too much duplicate effort to
20123 import in Bison features implemented in 2.49c since 2.13.
20124 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20125
20126 2001-02-02 Akim Demaille <akim@epita.fr>
20127
20128 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20129 * lib/xalloc.h, lib/xmalloc.c: Update.
20130
20131 2001-01-19 Akim Demaille <akim@epita.fr>
20132
20133 Get rid of the ad hoc handling of token_buffer in the scanner: use
20134 the obstacks.
20135
20136 * src/lex.c (token_obstack): New.
20137 (init_lex): Initialize it. No longer call...
20138 (grow_token_buffer): this. Remove it.
20139 Adjust all the places which used it to use the obstack.
20140
20141 2001-01-19 Akim Demaille <akim@epita.fr>
20142
20143 * src/lex.h: Rename all the tokens:
20144 s/\bENDFILE\b/tok_eof/g;
20145 s/\bIDENTIFIER\b/tok_identifier/g;
20146 etc.
20147 Let them be enums, not #define, to ease debugging.
20148 Adjust all the code.
20149
20150 2001-01-18 Akim Demaille <akim@epita.fr>
20151
20152 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20153 * src/lex.c (maxtoken, grow_token_buffer): Static.
20154
20155 2001-01-18 Akim Demaille <akim@epita.fr>
20156
20157 Since we now use obstacks, more % directives can be enabled.
20158
20159 * src/lex.c (percent_table): Also accept `%yacc',
20160 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20161 `%debug'.
20162 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20163 instead of returning a token.
20164 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20165 * src/reader.c (read_declarations): Adjust.
20166 * src/files.c (open_files): Don't call `compute_base_names', don't
20167 compute `attrsfile' since they depend upon data which might be
20168 *in* the input file now.
20169 (output_files): Do it here.
20170 * src/output.c (output_headers): Document the fact that this patch
20171 introduces a guaranteed SEGV for semantic parsers.
20172 * doc/bison.texinfo: Document them.
20173 * tests/suite.at: Exercise these %options.
20174
20175 2000-12-20 Akim Demaille <akim@epita.fr>
20176
20177 Also handle the output file (--verbose) with obstacks.
20178
20179 * files.c (foutput): Remove.
20180 (output_obstack): New.
20181 Adjust all dependencies.
20182 * src/conflicts.c: Return a string.
20183 * src/system.h (obstack_grow_string): Rename as...
20184 (obstack_sgrow): this. Be ready to work with non literals.
20185 (obstack_fgrow4): New.
20186
20187 2000-12-20 Akim Demaille <akim@epita.fr>
20188
20189 * src/files.c (open_files): Fix the computation of short_base_name
20190 in the case of `-o foo.tab.c'.
20191
20192 2000-12-20 Akim Demaille <akim@epita.fr>
20193
20194 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20195 (copy_dollar): Now that everything uses obstacks, get rid of the
20196 FILE * parameters.
20197
20198 2000-12-20 Akim Demaille <akim@epita.fr>
20199
20200 * src/files.c (open_files): Actually the `.output' file is based
20201 on the short_base_name, not base_name.
20202 * tests/suite.at (Checking output file names): Adjust.
20203
20204 2000-12-20 Akim Demaille <akim@epita.fr>
20205
20206 * src/bison.s1: Remove, we now use directly...
20207 * src/bison.simple: this.
20208 * src/Makefile.am: Use pkgdata instead of data.
20209
20210 2000-12-20 Akim Demaille <akim@epita.fr>
20211
20212 * src/files.c (guard_obstack): New.
20213 (open_files): Initialize it.
20214 (output_files): Dump it...
20215 * src/files.h: Export it.
20216 * src/reader.c (copy_guard): Use it.
20217
20218 2000-12-19 Akim Demaille <akim@epita.fr>
20219
20220 * src/files.c (outfile, defsfile, actfile): Removed as global
20221 vars.
20222 (open_files): Don't compute them.
20223 (output_files): Adjust.
20224 (base_name, short_base_name): Be global.
20225 Adjust dependencies.
20226
20227 2000-12-19 Akim Demaille <akim@epita.fr>
20228
20229 * src/files.c (strsuffix): New.
20230 (stringappend): Be just like strcat but allocate.
20231 (base_names): Eve out from open_files.
20232 Try to simplify the rather hairy computation of base_name and
20233 short_base_name.
20234 (open_files): Use it.
20235 * tests/suite.at (Checking output file names): New test.
20236
20237 2000-12-19 Akim Demaille <akim@epita.fr>
20238
20239 * src/system.h (obstack_grow_literal_string): Rename as...
20240 (obstack_grow_string): this.
20241 * src/output.c (output_parser): Recognize `%% actions' instead of
20242 `$'.
20243 * src/bison.s1: s/$/%% actions/.
20244 * src/bison.hairy: Likewise.
20245
20246 2000-12-19 Akim Demaille <akim@epita.fr>
20247
20248 * src/output.c (output_parser): Compute the `#line' lines when
20249 there are.
20250 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20251 Suggested by Hans Aberg.
20252
20253 2000-12-19 Akim Demaille <akim@epita.fr>
20254
20255 Let the handling of the skeleton files be local to the procedures
20256 that use it.
20257
20258 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20259 longer static.
20260 (fparser, open_extra_files): Remove.
20261 (open_files, output_files): Don't take care of fparser.
20262 * src/files.h: Adjust.
20263 * src/output.c (output_parser): Open and close the file to the
20264 skeleton.
20265 * src/reader.c (read_declarations): When %semantic_parser, open
20266 fguard.
20267
20268 2000-12-19 Akim Demaille <akim@epita.fr>
20269
20270 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20271 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20272
20273 2000-12-19 Akim Demaille <akim@epita.fr>
20274
20275 * src/files.c (open_files): Yipee! We no longer need all the code
20276 looking for `/tmp' since we have no tmp file.
20277
20278 2000-12-19 Akim Demaille <akim@epita.fr>
20279
20280 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20281 New macros.
20282 * src/files.c (open_files): Less dependency on MSDOS etc.
20283
20284 2000-12-14 Akim Demaille <akim@epita.fr>
20285
20286 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20287 Provide a default definition.
20288 Use it when executing the default @ action.
20289 * src/reader.c (reader_output_yylsp): No longer include
20290 `timestamp' and `text' in the default YYLTYPE.
20291
20292 2000-12-12 Akim Demaille <akim@epita.fr>
20293
20294 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20295 (copy_guard): Quote the file names.
20296 Reported by Laurent Mascherpa.
20297
20298 2000-12-12 Akim Demaille <akim@epita.fr>
20299
20300 * src/output.c (output_headers, output_program, output): Be sure
20301 to escape special characters when outputting filenames.
20302 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20303 (output_headers): Don't depend on them, Use ACTSTR.
20304
20305 2000-11-17 Akim Demaille <akim@epita.fr>
20306
20307 * lib/obstack.h: Formatting changes.
20308 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20309 prevents type checking.
20310 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20311 cast the value to (void *): assigning a `foo *' to a `void *'
20312 variable is valid.
20313 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20314 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20315 append characters.
20316
20317 2000-11-17 Akim Demaille <akim@epita.fr>
20318
20319 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20320 as...
20321 (suite.m4, regression.m4, calc.m4): these.
20322 * tests/atgeneral.m4: Update from CVS Autoconf.
20323
20324 2000-11-17 Akim Demaille <akim@epita.fr>
20325
20326 * tests/regression.m4 (%union and --defines): New test,
20327 demonstrating a current bug in the obstack implementation.
20328
20329 2000-11-17 Akim Demaille <akim@epita.fr>
20330
20331 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20332 macros.
20333 Use them to declare the variables which are global or local to
20334 `yyparse'.
20335
20336 2000-11-17 Akim Demaille <akim@epita.fr>
20337
20338 * acconfig.h: Remove, no longer used.
20339
20340 2000-11-07 Akim Demaille <akim@epita.fr>
20341
20342 * src: s/Copyright (C)/Copyright/g.
20343
20344 2000-11-07 Akim Demaille <akim@epita.fr>
20345
20346 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20347 defining.
20348 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20349
20350 2000-11-07 Akim Demaille <akim@epita.fr>
20351
20352 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20353 Merge in a single CPP if/else.
20354
20355 2000-11-07 Akim Demaille <akim@epita.fr>
20356
20357 * src/output.c (output): Remove useless variables.
20358 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20359 argument `data' for consistency with the prototypes.
20360 Qualify it `const'.
20361 (obstack_copy, obstack_copy0): Rename the second argument as
20362 `address' for consistency. Qualify it `const'.
20363 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20364 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20365 `const' their input argument (`data' or `address').
20366 Adjust the corresponding macros to include `const' in casts.
20367
20368 2000-11-03 Akim Demaille <akim@epita.fr>
20369
20370 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20371 s/PFILE1/BISON_HAIRY/.
20372 Adjust dependencies.
20373
20374 2000-11-03 Akim Demaille <akim@epita.fr>
20375
20376 For some reason, this was not applied.
20377
20378 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20379 `unlink': it's no longer used.
20380
20381 2000-11-03 Akim Demaille <akim@epita.fr>
20382
20383 * src/files.c (skeleton_find): New function, eved out of...
20384 (open_files, open_extra_files): here.
20385
20386 2000-11-03 Akim Demaille <akim@epita.fr>
20387
20388 Don't use `atexit'.
20389
20390 * src/files.c (obstack_save): New function.
20391 (done): Rename as...
20392 (output_files): this.
20393 Use `obstack_save'.
20394 * src/main.c (main): Don't use `atexit' to register `done', since
20395 it no longer has to remove tmp files, just call `output_files'
20396 when there are no errors.
20397
20398 2000-11-02 Akim Demaille <akim@epita.fr>
20399
20400 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20401 `unlink': it's no longer used.
20402 * src/files.h: Formatting changes.
20403
20404 2000-11-02 Akim Demaille <akim@epita.fr>
20405
20406 Remove the last uses of mktemp and unlink/delete.
20407
20408 * src/files.c (fdefines, ftable): Removed.
20409 (defines_ostack, table_obstack): New.
20410 Adjust dependencies of the former into uses of the latter.
20411 * src/output.c (output_short_or_char_table, output_short_table):
20412 Convert to using obstacks.
20413 * src/reader.c (copy_comment2): Accept one FILE * and two
20414 obstacks.
20415 (output_token_defines, reader_output_yylsp): Use obstacks.
20416 * src/system.h (obstack_fgrow3): New.
20417 * po/POTFILES.in: Adjust.
20418
20419 2000-11-01 Akim Demaille <akim@epita.fr>
20420
20421 Change each use of `fattrs' into a use of `attrs_obstack'.
20422
20423 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20424 * src/files.c (fattrs): Remove.
20425 (attrs_obstack): New.
20426 Adjust all dependencies.
20427 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20428
20429 2000-11-01 Akim Demaille <akim@epita.fr>
20430
20431 Introduce obstacks.
20432 Change each use of `faction' into a use of `action_obstack'.
20433
20434 * lib/obstack.h, lib/obstack.c: New files.
20435 * src/files.c (faction): Remove.
20436 (action_obstack): New.
20437 Adjust all dependencies.
20438
20439 2000-10-20 Akim Demaille <akim@epita.fr>
20440
20441 * lib/quote.h (PARAMS): New macro. Use it.
20442
20443 2000-10-16 Akim Demaille <akim@epita.fr>
20444
20445 * src/output.c (output_short_or_char_table): New function.
20446 (output_short_table, output_token_translations): Use it.
20447 (goto_actions): Use output_short_table.
20448
20449 2000-10-16 Akim Demaille <akim@epita.fr>
20450
20451 * src/symtab.c (bucket_new): New function.
20452 (getsym): Use it.
20453
20454 * src/output.c (output_short_table): New argument to display the
20455 comment associated with the table.
20456 Adjust dependencies.
20457 (output_gram): Use it.
20458 (output_rule_data): Nicer output layout for YYTNAME.
20459
20460 2000-10-16 Akim Demaille <akim@epita.fr>
20461
20462 * src/lex.c (read_typename): New function.
20463 (lex): Use it.
20464 * src/reader.c (copy_dollar): Likewise.
20465
20466 2000-10-16 Akim Demaille <akim@epita.fr>
20467
20468 * src/reader.c (copy_comment2): Expect the input stream to be on
20469 the `/' which is suspected to open a comment, instead of being
20470 called after `//' or `/*' was read.
20471 (copy_comment, copy_definition, parse_union_decl, copy_action)
20472 (copy_guard): Adjust.
20473
20474 2000-10-16 Akim Demaille <akim@epita.fr>
20475
20476 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20477 `read_signed_integer'.
20478
20479 2000-10-16 Akim Demaille <akim@epita.fr>
20480
20481 * src/reader.c (copy_dollar): New function.
20482 (copy_guard, copy_action): Use it.
20483
20484 2000-10-16 Akim Demaille <akim@epita.fr>
20485
20486 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20487 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20488 New files, from Fileutils 4.0.27.
20489 * src/main.c (printable_version): Remove.
20490 * src/lex.c, src/reader.c: Use `quote'.
20491
20492 2000-10-04 Akim Demaille <akim@epita.fr>
20493
20494 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20495
20496 2000-10-04 Akim Demaille <akim@epita.fr>
20497
20498 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20499
20500 2000-10-04 Akim Demaille <akim@epita.fr>
20501
20502 When a literal string is used to define two different tokens,
20503 `bison -v' segfaults.
20504 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20505
20506 * tests/regression.m4: New file.
20507 Include the core of the sample provided by Piotr Gackiewicz.
20508 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20509 properly.
20510
20511 2000-10-04 Akim Demaille <akim@epita.fr>
20512
20513 * src/reader.c (parse_expect_decl): Keep `count' within the size
20514 of `buffer'.
20515 From Neil Booth.
20516
20517 2000-10-02 Paul Eggert <eggert@twinsun.com>
20518
20519 * bison.s1 (yyparse): Assign the default value
20520 unconditionally, to avoid a GCC warning and make the parser a
20521 tad smaller.
20522
20523 2000-10-02 Akim Demaille <akim@epita.fr>
20524
20525 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20526 options.
20527
20528 2000-10-02 Akim Demaille <akim@epita.fr>
20529
20530 * src/derives.c, src/print.c, src/reduce.c: To ease the
20531 translation, move some `\n' out of the translated strings.
20532
20533 2000-10-02 Akim Demaille <akim@epita.fr>
20534
20535 The location tracking mechanism is precious for parse error
20536 messages. Nevertheless, it is enabled only when `@n' is used in
20537 the grammar, which is a different issue (you can use it in error
20538 message, but not in the grammar per se). Therefore, there should
20539 be another means to enable it.
20540
20541 * src/getargs.c (getargs): Support `--locations'.
20542 (usage): Report it.
20543 * src/getargs.h (locationsflag): Export it.
20544 * src/lex.c (percent_table): Support `%locations'.
20545 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20546 with `locationsflag'.
20547 * doc/bison.texinfo: Document `--locations' and `%locations'.
20548 Sort the options.
20549 * tests/calc.m4: Test it.
20550
20551 For regularity of the names, replace each
20552 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20553 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20554 In addition replace each `flag' with `_flag'.
20555
20556 2000-10-02 Akim Demaille <akim@epita.fr>
20557
20558 Also test parse error messages, including with YYERROR_VERBOSE.
20559
20560 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20561 associative).
20562 Use it to check the computations.
20563 Use it to check `nonassoc' is honored.
20564 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20565 `--yyerror-verbose'.
20566 (_AT_CHECK_CALC): Adjust to this option.
20567 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20568
20569 2000-10-02 Akim Demaille <akim@epita.fr>
20570
20571 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20572 the latter demonstrates a flaw in the handling of non debugging
20573 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20574 was used in order to simplify:
20575
20576 #if YYDEBUG
20577 if (yydebug)
20578 {
20579 ...
20580 }
20581 #endif
20582
20583 into
20584
20585 if (yydebug)
20586 {
20587 ...
20588 }
20589
20590 unfortunately this leads to a CPP conflict when
20591 `--name-prefix=foo' is used since it produces `#define yydebug
20592 foodebug'.
20593
20594 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
20595 (YYDPRINTF): New macro.
20596 Spread its use.
20597 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
20598 the bison options.
20599 Also test `--verbose', `--defines' and `--name-prefix'.
20600
20601 2000-10-02 Akim Demaille <akim@epita.fr>
20602
20603 Improve the readability of the produced parsers.
20604
20605 * src/bison.s1: Formatting changes.
20606 Improve the comment related to the `$' mark.
20607 (yydefault): Don't fall through to `yyresume': `goto' there.
20608 * src/output.c (output_parser): When the `$' is met, skip the end
20609 of its line.
20610 New variable, `number_of_dollar_signs', to check there's exactly
20611 one `$' in the parser skeleton.
20612
20613 2000-10-02 Akim Demaille <akim@epita.fr>
20614
20615 * lib/xstrdup.c: New file, from the fileutils.
20616 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
20617 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
20618 instead of strlen + xmalloc + strcpy.
20619 * src/symtab.c (copys): Remove, use xstrdup instead.
20620
20621 2000-10-02 Akim Demaille <akim@epita.fr>
20622
20623 * src/gram.h (associativity): New enum type which replaces the
20624 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
20625 `right_assoc', `left_assoc' and `non_assoc'.
20626 Adjust all dependencies.
20627 * src/reader.c: Formatting changes.
20628 (LTYPESTR): Don't define it, use it as a literal in
20629 `reader_output_yylsp'.
20630 * src/symtab.h (symbol_class): New enum type which replaces the
20631 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
20632 `sunknown', `stoken and `snterm'.
20633
20634 2000-10-02 Akim Demaille <akim@epita.fr>
20635
20636 * src/getargs.c (fixed_outfiles): Rename as...
20637 (yaccflag): for consistency and accuracy.
20638 Adjust dependencies.
20639
20640 2000-10-02 Akim Demaille <akim@epita.fr>
20641
20642 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
20643 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
20644 difficult and introduced a lot of core dump. It turns out that
20645 Bison used an implementation of `xmalloc' based on `calloc', and
20646 at various places it does depend upon the initialization to 0. I
20647 have not tried to isolate the pertinent places, and all the former
20648 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
20649 someone should address this issue.
20650
20651 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
20652 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
20653 files.
20654 Adjust dependencies.
20655 * src/warshall.h: New file.
20656 Propagate.
20657
20658 2000-10-02 Akim Demaille <akim@epita.fr>
20659
20660 Various anti-`extern in *.c' changes.
20661
20662 * src/system.h: Include `assert.h'.
20663
20664 2000-10-02 Akim Demaille <akim@epita.fr>
20665
20666 * src/state.h (nstates, final_state, first_state, first_shift)
20667 (first_reduction): Move their exportation from here...
20668 * src/LR0.h: to here.
20669 Adjust dependencies.
20670 * src/getargs.c (statisticsflag): New variable.
20671 Add support for `--statistics'.
20672 Adjust dependencies.
20673
20674 Remove a lot of now useless `extern' statements in most files.
20675
20676 2000-10-02 Akim Demaille <akim@epita.fr>
20677
20678 * src/LR0.h: New file.
20679 Propagate its use.
20680
20681 2000-10-02 Akim Demaille <akim@epita.fr>
20682
20683 * src/print.h: New file.
20684 Propagate its use.
20685 * src/print.c: Formatting and ordering changes.
20686 (verbose, terse): Replace with...
20687 (print_results): this new function.
20688 Adjust dependencies.
20689
20690 2000-10-02 Akim Demaille <akim@epita.fr>
20691
20692 * src/conflicts.c (conflict_report): New function.
20693 (conflict_log, verbose_conflict_log): Replace with...
20694 (print_conflicts): this function.
20695 Adjust dependencies.
20696 * src/conflicts.h: New file.
20697 Propagate its inclusion.
20698
20699 2000-10-02 Akim Demaille <akim@epita.fr>
20700
20701 * src/nullable.h: New file.
20702 Propagate its inclusion.
20703 * src/nullable.c: Formatting changes.
20704
20705 2000-10-02 Akim Demaille <akim@epita.fr>
20706
20707 * src/reduce.h: New file.
20708 Propagate its inclusion.
20709 * src/reduce.c: Topological sort and other formatting changes.
20710 (bool, TRUE, FALSE): Move their definition to...
20711 * src/system.h: here.
20712
20713 2000-10-02 Akim Demaille <akim@epita.fr>
20714
20715 * src/files.c: Formatting changes.
20716 (tryopen, tryclose, openfiles): Rename as...
20717 (xfopen, xfclose, open_files): this.
20718 (stringappend): static.
20719 * src/files.h: Complete the list of exported symbols.
20720 Propagate its use.
20721
20722 2000-10-02 Akim Demaille <akim@epita.fr>
20723
20724 * src/reader.h: New file.
20725 Propagate its use instead of tedious list of `extern' and
20726 prototypes.
20727 * src/reader.c: Formatting changes, topological sort,
20728 s/register//.
20729
20730 2000-10-02 Akim Demaille <akim@epita.fr>
20731
20732 * src/lex.h: Prototype `lex.c' exported functions.
20733 * src/reader.c: Adjust.
20734 * src/lex.c: Formatting changes.
20735 (safegetc): Rename as...
20736 (xgetc): this.
20737
20738 2000-10-02 Akim Demaille <akim@epita.fr>
20739
20740 * src/lalr.h: New file.
20741 Propagate its inclusion instead of prototypes and `extern'.
20742 * src/lalr.c: Formatting changes, topological sorting etc.
20743
20744 2000-10-02 Akim Demaille <akim@epita.fr>
20745
20746 * src/output.c (token_actions): Introduce a temporary array,
20747 YYDEFACT, that makes it possible for this function to use
20748 output_short_table.
20749
20750 2000-10-02 Akim Demaille <akim@epita.fr>
20751
20752 `user_toknums' is output as a `short[]' in `output.c', while it is
20753 defined as a `int[]' in `reader.c'. For consistency with the
20754 other output tables, `user_toknums' is now defined as a table of
20755 shorts.
20756
20757 * src/reader.c (user_toknums): Be a short table instead of an int
20758 table.
20759 Adjust dependencies.
20760
20761 Factor the short table outputs.
20762
20763 * src/output.c (output_short_table): New function.
20764 * src/output.c (output_gram, output_stos, output_rule_data)
20765 (output_base, output_table, output_check): Use it.
20766
20767 2000-10-02 Akim Demaille <akim@epita.fr>
20768
20769 * src/output.c (output): Topological sort of the functions, in
20770 order to get rid of the `static' prototypes.
20771 No longer use `register'.
20772 * src/output.h: New file.
20773 Propagate its inclusion in files explicitly prototyping functions
20774 from output.c.
20775
20776 2000-09-21 Akim Demaille <akim@epita.fr>
20777
20778 * src/atgeneral.m4: Update from Autoconf.
20779
20780 2000-09-21 Akim Demaille <akim@epita.fr>
20781
20782 * src/closure.h: New file.
20783 * src/closure.c: Formatting changes, topological sort over the
20784 functions, use of closure.h.
20785 (initialize_closure, finalize_closure): Rename as...
20786 (new_closure, free_closure): these. Adjust dependencies.
20787 * src/LR0.c: Formatting changes, topological sort, use of
20788 cloture.h.
20789 (initialize_states): Rename as...
20790 (new_states): this.
20791 * src/Makefile.am (noinst_HEADERS): Adjust.
20792
20793 2000-09-20 Akim Demaille <akim@epita.fr>
20794
20795 * src/acconfig.h: Don't protect config.h against multiple
20796 inclusion.
20797 Don't define PARAMS.
20798 * src/system.h: Define PARAMS.
20799 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20800 purpose of config.h. system.h must not try to fix wrong
20801 definitions in config.h.
20802
20803 2000-09-20 Akim Demaille <akim@epita.fr>
20804
20805 * src/derives.h: New file.
20806 * src/main.c, src/derives.h: Use it.
20807 Formatting changes.
20808 * src/Makefile.am (noinst_HEADERS): Adjust.
20809
20810 2000-09-20 Akim Demaille <akim@epita.fr>
20811
20812 * tests/atgeneral.m4: Update from Autoconf.
20813 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20814 (AT_CHECK_CALC): New macros.
20815 Use these macros to test bison with options `', `--raw',
20816 `--debug', `--yacc', `--yacc --debug'.
20817
20818 2000-09-19 Akim Demaille <akim@epita.fr>
20819
20820 * src/output.c: Formatting changes.
20821 * src/machine.h: Remove, leaving its contents in...
20822 * src/system.h: here.
20823 Include stdio.h.
20824 Adjust all dependencies on stdio.h and machine.h.
20825 * src/getargs.h: New file.
20826 Let all `extern' declarations about getargs.c be replaced with
20827 inclusion of `getargs.h'.
20828 * src/Makefile.am (noinst_HEADERS): Adjust.
20829
20830 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20831 scope.
20832 (yyerror): Returns void, not int.
20833 * doc/bison.texinfo: Formatting changes.
20834
20835 2000-09-19 Akim Demaille <akim@epita.fr>
20836
20837 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20838 portable.
20839
20840 2000-09-18 Akim Demaille <akim@epita.fr>
20841
20842 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20843 * src/Makefile.am (INCLUDES): Don't.
20844 Be ready to fetch headers in lib/.
20845
20846 2000-09-18 Akim Demaille <akim@epita.fr>
20847
20848 * doc/bison.texinfo: Update the copyright.
20849 ANSIfy and GNUify the examples.
20850 Remove the old menu.
20851
20852 2000-09-18 Akim Demaille <akim@epita.fr>
20853
20854 First set of tests: use the `calc' example from the documentation.
20855
20856 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20857 is defined only when YYDEBUG is.
20858 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20859 * src/files.c (tryopen, tryclose): Formatting changes.
20860 Move to the top and be static.
20861 * src/reader.c (read_signed_integer): Likewise.
20862 * tests/calc.m4: New file.
20863 * Makefile.am, suite.m4: Adjust.
20864 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20865
20866 2000-09-18 Akim Demaille <akim@epita.fr>
20867
20868 Add support for an Autotest test suite for Bison.
20869
20870 * m4/m4.m4, m4/atconfig.m4: New files.
20871 * m4/Makefile.am (EXTRA_DIST): Adjust.
20872 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20873 files.
20874 * src/getargs.c: Display a more standard --version message.
20875 * src/reader.c (reader): Formatting changes.
20876 No longer depend upon VERSION_STRING.
20877 * configure.in: No longer use `dnl'.
20878 Set up the test suite and the new directory `tests/.
20879 (VERSION_STRING): Remove.
20880
20881 2000-04-14 Akim Demaille <akim@epita.fr>
20882
20883 * src/reader.c (copy_comment2): New function, same as former
20884 `copy_comment', but outputs into two FILE *.
20885 (copy_comment): Use it.
20886 (parse_union_decl): Use it.
20887 (get_type, parse_start_decl): Use the same `invalid' message.
20888 (parse_start_decl, parse_union_decl): Use the same `multiple'
20889 message.
20890 (parse_union_decl, copy_guard, copy_action): Use the same
20891 `unmatched' message.
20892 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20893
20894 2000-03-31 Akim Demaille <akim@epita.fr>
20895
20896 * src/files.c (tryopen, tryclose): Move to the top.
20897 Be static.
20898
20899 2000-03-31 Akim Demaille <akim@epita.fr>
20900
20901 * src/main.c (main): Don't call `done', exit does it.
20902
20903 2000-03-31 Akim Demaille <akim@epita.fr>
20904
20905 * allocate.c: s/return (foo)/return foo/.
20906 * lalr.c: Likewise.
20907 * LR0.c: Likewise.
20908 * output.c: Likewise.
20909 * reader.c: Likewise.
20910 * symtab.c: Likewise.
20911 * vmsgetargs.c: Likewise.
20912
20913 2000-03-31 Akim Demaille <akim@epita.fr>
20914
20915 Clean up the error reporting functions.
20916
20917 * src/report.c: New file.
20918 * src/report.h: Likewise.
20919 * src/Makefile.am: Adjust.
20920 * m4/error.m4: New file.
20921 * m4/Makefile.am: Adjust.
20922 * configure.in (jm_PREREQ_ERROR): Call it.
20923 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20924 Remove.
20925 (fatal, fatals): Remove. All callers use complain.c::fatal.
20926 (warn, warni, warns, warnss, warnss): Remove. All callers use
20927 complain.c::complain.
20928 (toomany): Remove, use fatal instead.
20929 * src/files.c (done): No argument, use complain_message_count.
20930 * src/main.c (main): Register `done' to `atexit'.
20931
20932 * src/getargs.c (usage): More `fputs', less `fprintf'.
20933
20934 2000-03-28 Akim Demaille <akim@epita.fr>
20935
20936 * lib/: New directory.
20937 * Makefile.am (SUBDIRS): Adjust.
20938 * configure.in: Adjust.
20939 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20940 useless.
20941 * src/alloca.c: Moved to lib/.
20942 * src/getopt.c: Likewise.
20943 * src/getopt1.c: Likewise.
20944 * src/getopt.h: Likewise.
20945 * src/ansi2knr.c: Likewise.
20946 * src/ansi2knr.1: Likewise.
20947 * src/Makefile.am: Adjust.
20948 * lib/Makefile.am: New file.
20949
20950 2000-03-28 Akim Demaille <akim@epita.fr>
20951
20952 * src/getargs.c (usage): Refresh the help message.
20953
20954 2000-03-17 Akim Demaille <akim@epita.fr>
20955
20956 * src/getopt1.c: Updated from textutils 2.0e
20957 * src/getopt.c: Likewise.
20958 * src/getopt.h: Likewise.
20959
20960 2000-03-17 Akim Demaille <akim@epita.fr>
20961
20962 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20963 the file name, not the whole `#line LINE FILE'.
20964
20965 2000-03-17 Akim Demaille <akim@epita.fr>
20966
20967 On syntax errors, report the token on which we choked.
20968
20969 * src/bison.s1 (yyparse): In the label yyerrlab, when
20970 YYERROR_VERBOSE, add yychar in msg.
20971
20972 2000-03-17 Akim Demaille <akim@epita.fr>
20973
20974 * src/reader.c (copy_at): New function.
20975 (copy_guard): Use it.
20976 (copy_action): Use it.
20977
20978 2000-03-17 Akim Demaille <akim@epita.fr>
20979
20980 Be kind to translators, save some useless translations.
20981
20982 * src/main.c (banner): New function.
20983 (fatal_banner): Use it.
20984 (warn_banner): Use it.
20985
20986 2000-03-17 Akim Demaille <akim@epita.fr>
20987
20988 * src/reader.c (copy_definition): Use copy_string and
20989 copy_comment. Removed now unused `match', `ended',
20990 `cplus_comment'.
20991 (copy_comment, copy_string): Moved, to be visible from
20992 copy_definition.
20993
20994 2000-03-17 Akim Demaille <akim@epita.fr>
20995
20996 * src/reader.c (copy_string): Declare `static inline'. No
20997 problems with inline, since it is checked by configure.
20998 (copy_comment): Likewise.
20999
21000 2000-03-17 Akim Demaille <akim@epita.fr>
21001
21002 * src/reader.c (packsymbols): Formatting changes.
21003
21004 2000-03-17 Akim Demaille <akim@epita.fr>
21005
21006 * src/reader.c (copy_comment): New function, factored out from:
21007 (copy_action): Use it. Removed now unused `match', `ended',
21008 `cplus_comment'.
21009 (copy_guard): Likewise.
21010
21011 2000-03-17 Akim Demaille <akim@epita.fr>
21012
21013 * src/reader.c (copy_string): New function, factored out from:
21014 (copy_action): Use it.
21015 (copy_guard): Likewise.
21016
21017 2000-03-17 Akim Demaille <akim@epita.fr>
21018
21019 Change the handling of @s so that they behave exactly like $s.
21020 There is now a pseudo variable @$ (readble and writable), location
21021 of the lhs of the rule (by default ranging from the location of
21022 the first symbol of the rhs, to the location of the last symbol,
21023 or, if the rhs is empty, YYLLOC).
21024
21025 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21026 yyval.
21027 (yyparse): When providing a default semantic action, provide a
21028 default location action.
21029 (after the $): No longer change `*YYLSP', just stack YYLOC the
21030 same way you stack YYVAL.
21031 * src/reader.c (read_declarations): Use warns.
21032 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21033 (copy_action, case '@'): Likewise.
21034 Use a standard error message, to save useless work from
21035 translators.
21036
21037 2000-03-17 Akim Demaille <akim@epita.fr>
21038
21039 * src/bison.s1: Formatting and cosmetics changes.
21040 * src/reader.c: Likewise.
21041 Update the Copyright notice.
21042
21043 2000-03-17 Akim Demaille <akim@epita.fr>
21044
21045 * src/bison.s1 (#line): All set to `#line' only, since the
21046 Makefile now handles them.
21047
21048 2000-03-16 Akim Demaille <akim@epita.fr>
21049
21050 * src/output.c (output_rule_data): Output the documentation of
21051 some of the tables.
21052 (Copyright notice): Update.
21053 Formatting changes.
21054
21055 2000-03-16 Akim Demaille <akim@epita.fr>
21056
21057 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21058 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21059 One `#if YYDEBUG' remains, since it uses variables which are
21060 defined only if `YYDEBUG != 0'.
21061
21062 2000-03-16 Akim Demaille <akim@epita.fr>
21063
21064 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21065 and related variables so that the similarities are highlighted.
21066
21067 2000-03-16 Akim Demaille <akim@epita.fr>
21068
21069 * src/bison.s1: Properly indent CPP directives.
21070
21071 2000-03-16 Akim Demaille <akim@epita.fr>
21072
21073 * src/bison.s1: Properly indent the `alloca' CPP section.
21074
21075 2000-03-16 Akim Demaille <akim@epita.fr>
21076
21077 Do not hard code values of directories in `configure.in'.
21078 Update the `configure' tool chain.
21079
21080 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21081 src/makefile.am.
21082 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21083 (AC_OUTPUT): Add m4/Makefile.
21084 Bump to bison 1.28a, 1.29 has never been released.
21085 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21086 handled via src/Makefile.am.
21087 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21088 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21089 autoheader.
21090 * Makefile.am (SUBDIRS): Add m4.
21091 (ACLOCAL_AM_FLAGS): New variable.
21092 (AUTOMAKE_OPTIONS): Add check-news.
21093 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21094 the proper line number and file name.
21095 (DEFS): Propagate the location of bison library files and of the
21096 locale files.
21097 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21098 builddir.
21099 * acinclude.m4: Remove, replaced by the directory m4.
21100 * m4/Makefile.am (EXTRA_DIST): New variable.
21101 * m4/gettext.m4: New file, from the fileutils.
21102 * m4/lcmessage.m4: Likewise
21103 * m4/progtest.m4: Likewise.
21104 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21105
21106 2000-03-10 Akim Demaille <akim@epita.fr>
21107
21108 * src/closure.c:
21109 Formatting changes of various comments.
21110 Respect the GNU coding standards at various places.
21111 Don't use `_()' when no translation is needed.
21112
21113 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21114
21115 * src/files.c:
21116 OS/2 honors TMPDIR environment variable.
21117
21118 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21119
21120 * doc/bison.texinfo: Tweaked spelling and grammar.
21121 Updated ISBN.
21122 Removed reference to price of printed copy.
21123 Mention BISON_SIMPLE and BISON_HAIRY.
21124
21125 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21126
21127 * configure.in, NEWS:
21128 Bison 1.29 released.
21129
21130 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21131
21132 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21133 Added reference card.
21134
21135 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21136
21137 * po/ru.po: Added Russian translation.
21138
21139 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21140
21141 * configure.in: Added Russian translation.
21142
21143 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21144
21145 * configure.in, NEWS, README:
21146 Released version 1.28.
21147
21148 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21149
21150 * src/system.h:
21151 Squashed redefinition warning on some systems.
21152
21153 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21154 Have configure build version string instead of relying on ANSI string
21155 concatentation.
21156
21157 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21158
21159 * po/POTFILES.in: Got rid of version.c.
21160
21161 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21162
21163 * acconfig.h, configure.in:
21164 Have configure build version string instead of relying on ANSI string
21165 concatentation.
21166
21167 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21168
21169 * doc/bison.1:
21170 Dropped mention of `+' for long-named options.
21171
21172 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21173
21174 * src/files.c: Added <unistd.h> for unlink().
21175
21176 * src/Makefile.am, src/system.h:
21177 I18n fixes.
21178
21179 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21180
21181 * README: Added a FAQ list.
21182
21183 * configure.in, acconfig.h:
21184 I18n fixes.
21185
21186 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21187
21188 * doc/FAQ, doc/Makefile.am:
21189 Added a FAQ list.
21190
21191 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21192
21193 * src/alloc.h, src/symtab.h, src/version.c:
21194 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21195
21196 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21197
21198 * src/.cvsignore, src/Makefile.am:
21199 Reorganized: sources in `src', documentation in `doc'.
21200
21201 * src/lex.c (literalchar):
21202 fixed the code for escaping double quotes (thanks
21203 Jonathan Czisny.)
21204
21205 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21206
21207 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21208 Adjusted paths to reflect directory reorganization.
21209
21210 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21211
21212 * doc/.cvsignore, doc/Makefile.am:
21213 Reorganized: sources in `src', documentation in `doc'.
21214
21215 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21216
21217 * configure.in:
21218 Updated AC_INIT file to reflect directory reorganization.
21219
21220 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21221 Reorganized: sources in `src', documentation in `doc'.
21222
21223 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21224
21225 * src/allocate.c:
21226 Don't declare calloc() and realloc() if not necessary.
21227
21228 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21229
21230 * configure.in, acconfig.h, acinclude.m4:
21231 Don't declare calloc() and realloc() if not necessary.
21232
21233 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21234
21235 * po/.cvsignore: Added i18n support.
21236
21237 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21238
21239 * acconfig.h, configure.in, Makefile.am:
21240 Added i18n support.
21241
21242 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21243
21244 * src/bison.s1: Fixed #line numbers.
21245
21246 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21247
21248 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21249 Added PO files from Translation Project.
21250
21251 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21252
21253 * Makefile.am:
21254 Added support for non-ANSI compilers (ansi2knr).
21255
21256 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21257
21258 * configure.in: Bumped version number to 1.27.
21259
21260 * Makefile.am:
21261 Added `bison.simple' to list of files removed by `make distclean'.
21262
21263 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21264
21265 * src/files.c, src/files.h:
21266 Defined locations of parser files in config.h instead of Makefile.
21267
21268 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21269
21270 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21271 Defined locations of parser files in config.h instead of Makefile.
21272
21273 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21274
21275 * Makefile.am:
21276 Removed inappropriate use of $< macro.
21277
21278 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21279
21280 * po/Makefile.in.in, po/POTFILES.in:
21281 Add `po' directory skeleton.
21282
21283 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21284
21285 * README: Document help-bison list.
21286
21287 * configure.in: Add check for mkstemp().
21288
21289 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21290
21291 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21292 Hush a few compiler warnings.
21293
21294 * src/files.c:
21295 Add tryclose(), which verifies that fclose was successful.
21296 Hush a couple of compiler warnings.
21297
21298 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21299
21300 * Makefile.am, OChangeLog:
21301 ChangeLog is now automatically generated. Include the old version as
21302 OChangeLog.
21303
21304 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21305
21306 * 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:
21307 Update FSF address.
21308
21309 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21310
21311 * doc/bison.texinfo: Fix formatting glitch.
21312
21313 * doc/bison.texinfo: Update FSF address.
21314
21315 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21316
21317 * acconfig.h: Update FSF address.
21318
21319 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21320
21321 * src/system.h:
21322 Don't define PACKAGE here, since config.h defines it.
21323
21324 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21325
21326 * src/reader.c: Update copyright date.
21327
21328 * src/main.c:
21329 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21330 favor of output directly to stderr (avoids buffer overruns).
21331
21332 * src/reader.c: Some checks for premature EOF.
21333
21334 * 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:
21335 Use prototypes if the compiler understands them.
21336
21337 * src/files.c: Honor TMPDIR on Unix hosts.
21338 Use prototypes if the compiler understands them.
21339
21340 * src/reader.c:
21341 Fix a couple of buffer overrun bugs.
21342 Use prototypes if the compiler understands them.
21343
21344 * src/system.h: Include unistd.h and ctype.h.
21345 Use #ifdef instead of #if for NLS symbols.
21346
21347 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21348
21349 * doc/bison.texinfo:
21350 Delete comment "consider using @set for edition number, etc..." since
21351 we now are doing so.
21352
21353 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21354
21355 * configure.in:
21356 Use prototypes if the compiler understands them.
21357
21358 * NEWS: Document 1.26 highlights.
21359
21360 * Makefile.am: Require Automake 1.3 or later.
21361
21362 * acconfig.h:
21363 Use prototypes if the compiler understands them.
21364
21365 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21366
21367 * src/version.c:
21368 Use VERSION symbol from automake for version number.
21369
21370 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21371
21372 * acconfig.h, configure.in, version.cin:
21373 Use VERSION symbol from automake for version number.
21374
21375 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21376
21377 * Makefile.am:
21378 Distribute original version of simple parser (bison.s1), not built
21379 version (bison.simple).
21380
21381 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21382
21383 * doc/bison.texinfo: Add info dir entry.
21384
21385 * doc/bison.texinfo:
21386 Let automake put version number into documentation.
21387
21388 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21389
21390 * src/bison.cld, src/build.com, src/vmshlp.mar:
21391 Add non-RCS files from /gd/gnu/bison.
21392
21393 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21394
21395 * doc/bison.1:
21396 Document the BISON_HAIRY and BISON_SIMPLE variables.
21397
21398 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21399
21400 * src/version.c: Build version.c automatically.
21401
21402 * src/reader.c:
21403 Fix token numbering (used to start at 258, not 257).
21404
21405 * src/system.h: Include config.h.
21406
21407 * src/getargs.c: Update bug report address.
21408
21409 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21410 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21411
21412 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21413
21414 * Makefile.am:
21415 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21416
21417 * configure.in, version.cin:
21418 Build version.c automatically.
21419
21420 * AUTHORS: Add AUTHORS file.
21421
21422 * README: Update bug report address.
21423
21424 * bison.simple:
21425 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21426
21427 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21428 Add automake stuff.
21429
21430 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21431
21432 * doc/bison.texinfo: Clean up some formatting.
21433
21434 1998-05-05 Richard Stallman <rms@gnu.org>
21435
21436 * doc/bison.texinfo:
21437 Explain better why to make a pure parser.
21438
21439 1998-01-05 Richard Stallman <rms@gnu.org>
21440
21441 * src/files.c (openfiles):
21442 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21443 find a temporary directory, if possible. Do not unlink files while
21444 they are open.
21445
21446 1997-08-25 Richard Stallman <rms@gnu.org>
21447
21448 * src/reader.c (stack_offset;):
21449 Change some warni to warns.
21450
21451 * src/lex.c (literalchar): Use warns, not warni.
21452
21453 1997-06-28 Richard Stallman <rms@gnu.org>
21454
21455 * src/bison.s1: Add a Bison version comment.
21456
21457 * src/main.c (fatal, warn, berror):
21458 Use program_name.
21459
21460 1997-06-28 Richard Stallman <rms@gnu.org>
21461
21462 * Makefile.in (bison_version): New variable.
21463 (dist): Use that variable.
21464 (bison.s1): Substitute the Bison version into bison.simple.
21465
21466 * bison.simple: Add a Bison version comment.
21467
21468 1997-06-18 Richard Stallman <rms@gnu.org>
21469
21470 * src/main.c (fatal, warn, berror):
21471 Make error messages standard.
21472 (toomany): Improve error message text.
21473
21474 * 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:
21475 new.h renamed to alloc.h.
21476
21477 1997-06-18 Richard Stallman <rms@gnu.org>
21478
21479 * Makefile.in: new.h renamed to alloc.h.
21480
21481 1997-05-24 Richard Stallman <rms@gnu.org>
21482
21483 * src/lex.c (literalchar):
21484 Fix the code for escaping \, " and '.
21485
21486 (lex): Avoid trouble when there are many chars
21487 to discard in a char literal with just several chars in it.
21488
21489 1997-05-17 Richard Stallman <rms@gnu.org>
21490
21491 * src/bison.s1:
21492 Use malloc, if using alloca is troublesome.
21493 (YYSTACK_USE_ALLOCA): New flag macro.
21494 Define it for some systems and compilers.
21495 (YYSTACK_ALLOC): New macro.
21496 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21497 If it was malloc'd, free it.
21498
21499 1997-05-17 Richard Stallman <rms@gnu.org>
21500
21501 * bison.simple:
21502 Use malloc, if using alloca is troublesome.
21503 (YYSTACK_USE_ALLOCA): New flag macro.
21504 Define it for some systems and compilers.
21505 (YYSTACK_ALLOC): New macro.
21506 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21507 If it was malloc'd, free it.
21508
21509 1997-04-23 Richard Stallman <rms@gnu.org>
21510
21511 * src/bison.s1:
21512 (alloca) [__hpux]: Always define as __builtin_alloca.
21513
21514 1997-04-23 Richard Stallman <rms@gnu.org>
21515
21516 * bison.simple:
21517 (alloca) [__hpux]: Always define as __builtin_alloca.
21518
21519 1997-04-22 Richard Stallman <rms@gnu.org>
21520
21521 * src/bison.s1:
21522 [__hpux]: Include alloca.h (right for HPUX 10)
21523 instead of declaring alloca (right for HPUX 9).
21524
21525 * src/bison.s1 (__yy_memcpy):
21526 Declare arg `count' as unsigned int.
21527 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21528
21529 1997-04-22 Richard Stallman <rms@gnu.org>
21530
21531 * bison.simple:
21532 [__hpux]: Include alloca.h (right for HPUX 10)
21533 instead of declaring alloca (right for HPUX 9).
21534
21535 * bison.simple (__yy_memcpy):
21536 Declare arg `count' as unsigned int.
21537 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21538
21539 1997-01-03 Richard Stallman <rms@gnu.org>
21540
21541 * src/allocate.c: [__STDC__ or _MSC_VER]:
21542 Declare calloc and realloc to return void *.
21543
21544 1997-01-02 Richard Stallman <rms@gnu.org>
21545
21546 * src/system.h:
21547 [_MSC_VER]: Include stdlib.h and process.h.
21548 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21549
21550 * src/main.c (main): Return FAILURE as a value.
21551 (printable_version): Declare arg as int, not char.
21552
21553 1997-01-02 Richard Stallman <rms@gnu.org>
21554
21555 * Makefile.in (dist):
21556 Explicitly check for symlinks, and copy them.
21557
21558 1996-12-19 Richard Stallman <rms@gnu.org>
21559
21560 * src/files.c:
21561 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21562
21563 1996-12-18 Paul Eggert <eggert@gnu.org>
21564
21565 * src/bison.s1 (yyparse):
21566 If __GNUC__ and YYPARSE_PARAM are both defined,
21567 declare yyparse to have a void * argument.
21568
21569 1996-12-18 Paul Eggert <eggert@gnu.org>
21570
21571 * bison.simple (yyparse):
21572 If __GNUC__ and YYPARSE_PARAM are both defined,
21573 declare yyparse to have a void * argument.
21574
21575 1996-12-17 Richard Stallman <rms@gnu.org>
21576
21577 * src/reduce.c (nbits): Add some casts.
21578
21579 1996-08-12 Richard Stallman <rms@gnu.org>
21580
21581 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21582
21583 1996-08-12 Richard Stallman <rms@gnu.org>
21584
21585 * bison.simple: Test _MSDOS as well as _MSDOS_.
21586
21587 1996-07-31 Richard Stallman <rms@gnu.org>
21588
21589 * src/bison.s1:
21590 [__sun && __i386]: Include alloca.h.
21591
21592 1996-07-31 Richard Stallman <rms@gnu.org>
21593
21594 * bison.simple:
21595 [__sun && __i386]: Include alloca.h.
21596
21597 1996-07-30 Richard Stallman <rms@gnu.org>
21598
21599 * src/bison.s1: Comment change.
21600
21601 * src/bison.s1: Test _MSDOS_, not MSDOS.
21602
21603 1996-07-30 Richard Stallman <rms@gnu.org>
21604
21605 * bison.simple: Comment change.
21606
21607 * bison.simple: Test _MSDOS_, not MSDOS.
21608
21609 1996-06-01 Richard Stallman <rms@gnu.org>
21610
21611 * 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:
21612 Insert `_' macro around many string constants.
21613
21614 * src/main.c:
21615 Insert `_' macro around many string constants.
21616
21617 (main): Call setlocale, bindtextdomain and textdomain.
21618
21619 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
21620 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
21621 [ENABLE_NLS]: Include libintl.h.
21622 [ENABLE_NLS] (gettext): Define.
21623 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
21624 (N_, PACKAGE, LOCALEDIR): New macros.
21625
21626 1996-06-01 Richard Stallman <rms@gnu.org>
21627
21628 * POTFILES.in: New file.
21629
21630 * Makefile.in (allocate.o):
21631 Define target explicitly.
21632
21633 * Makefile.in (CFLAGS): Set to @CFLAGS@.
21634 (LDFLAGS): Set to @LDFLAGS@.
21635 (configure): Run autoconf only if preceding `cd' succeeds.
21636 (bison.s1): Redirect output to temporary file then move the
21637 temporary to the target, rather than redirecting directly to bison.s1.
21638 (clean): Remove config.status and config.log.
21639 (distclean): Don't remove config.status here.
21640
21641 1996-05-12 Richard Stallman <rms@gnu.org>
21642
21643 * src/bison.s1:
21644 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21645
21646 1996-05-12 Richard Stallman <rms@gnu.org>
21647
21648 * bison.simple:
21649 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21650
21651 1996-05-11 Richard Stallman <rms@gnu.org>
21652
21653 * src/bison.s1 (__yy_memcpy):
21654 Really reorder the args, as was supposedly done on Feb 14 1995.
21655 (yyparse): Calls changed accordingly.
21656
21657 1996-05-11 Richard Stallman <rms@gnu.org>
21658
21659 * Makefile.in (dist): Don't use $(srcdir).
21660
21661 * bison.simple (__yy_memcpy):
21662 Really reorder the args, as was supposedly done on Feb 14 1995.
21663 (yyparse): Calls changed accordingly.
21664
21665 1996-01-27 Richard Stallman <rms@gnu.org>
21666
21667 * src/output.c (output_rule_data):
21668 Test YYERROR_VERBOSE in the conditional
21669 around the definition of ttyname.
21670
21671 1995-12-29 Richard Stallman <rms@gnu.org>
21672
21673 * src/bison.s1:
21674 Fix line numbers in #line commands.
21675
21676 1995-12-29 Richard Stallman <rms@gnu.org>
21677
21678 * bison.simple:
21679 Fix line numbers in #line commands.
21680
21681 1995-12-27 Richard Stallman <rms@gnu.org>
21682
21683 * src/bison.s1 (YYPARSE_PARAM_DECL):
21684 In C++, make it always null.
21685 (YYPARSE_PARAM_ARG): New macro.
21686 (yyparse): Use YYPARSE_PARAM_ARG.
21687
21688 1995-12-27 Richard Stallman <rms@gnu.org>
21689
21690 * bison.simple (YYPARSE_PARAM_DECL):
21691 In C++, make it always null.
21692 (YYPARSE_PARAM_ARG): New macro.
21693 (yyparse): Use YYPARSE_PARAM_ARG.
21694
21695 1995-11-29 Richard Stallman <rms@gnu.org>
21696
21697 * doc/bison.texinfo:
21698 Describe literal string tokens, %raw, %no_lines, %token_table.
21699
21700 1995-11-29 Daniel Hagerty <hag@gnu.org>
21701
21702 * doc/bison.texinfo: Fixed update date
21703
21704 1995-10-16 Richard Stallman <rms@gnu.org>
21705
21706 * src/version.c: Version 1.25.
21707
21708 1995-10-16 Richard Stallman <rms@gnu.org>
21709
21710 * NEWS: *** empty log message ***
21711
21712 1995-10-16 Richard Stallman <rms@gnu.org>
21713
21714 * doc/bison.1, doc/bison.rnh:
21715 Add new options.
21716
21717 1995-10-15 Richard Stallman <rms@gnu.org>
21718
21719 * src/vmsgetargs.c, src/getargs.c:
21720 Added -n, -k, and -raw switches.
21721 (noparserflag, toknumflag, rawtoknumflag): New variables.
21722
21723 * src/symtab.h (SALIAS):
21724 New #define for adding aliases to %token.
21725 (struct bucket): Added `alias' field.
21726
21727 * src/reduce.c (reduce_grammar):
21728 Revise error message.
21729 (print_notices): Remove final `.' from error message.
21730
21731 * src/reader.c (reader_output_yylsp):
21732 New function.
21733 (readgram): Use `#if 0' around code that accepted %command
21734 inside grammar rules: The documentation doesn't allow it,
21735 and it will fail since the %command processors scan for the next %.
21736 (parse_token_decl): Extended the %token
21737 declaration to allow a multi-character symbol as an alias.
21738 (parse_thong_decl): New function.
21739 (read_declarations): Added %thong declarations.
21740 (read_declarations): Handle NOOP to deal with allowing
21741 % declarations as another means to specify the flags.
21742 (readgram): Allow %prec prior to semantics embedded in a rule.
21743 (skip_to_char, read_declarations, copy_definition)
21744 (parse_token_decl, parse_start_decl, parse_type_decl)
21745 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
21746 (get_type_name, copy_guard, copy_action, readgram)
21747 (get_type, packsymbols): Revised most error messages.
21748 Changed `fatal' to `warnxxx' to avoid aborting for error.
21749 Revised and use multiple warnxxx functions to avoid using VARARGS1.
21750 (read_declarations): Improve the error message for
21751 an invalid character. Do not abort.
21752 (read_declarations, copy_guard, copy_action): Use
21753 printable_version to avoid unprintable characters in printed output.
21754 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
21755 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
21756 Allow the type of a non-terminal can be given
21757 more than once, as long as all specifications give the same type.
21758
21759 * src/output.c:
21760 (output_headers, output_trailers, output, output_gram)
21761 (output_rule_data): Implement noparserflag variable.
21762 Implement toknumflag variable.
21763 (output): Call reader_output_yylsp to output LTYPESTR.
21764
21765 * src/main.c (main):
21766 If reader sees an error, don't process the grammar.
21767 (fatals): Updated to not use VARARGS1.
21768 (printable_version, int_to_string, warn, warni, warns, warnss)
21769 (warnsss): New error reporting functions. Avoid abort for error.
21770
21771 * src/lex.h:
21772 Added THONG and NOOP for alias processing.
21773 Added SETOPT for the new code that allows setting options with %flags.
21774
21775 * src/lex.c:
21776 Include getopt.h. Add some extern decls.
21777 (safegetc): New function to deal with EOF gracefully.
21778 (literalchar); new function to deal with reading \ escapes.
21779 (lex): Use literalchar.
21780 (lex): Implemented "..." tokens.
21781 (literalchar, lex, parse_percent_token): Made tokenbuffer
21782 always contain the token. This includes growing the token
21783 buffer while reading an integer.
21784 (parse_percent_token): Replaced if-else statement with percent_table.
21785 (parse_percent_token): Added % declarations as another
21786 way to specify the flags -n, -l, and -r. Also added hooks for
21787 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21788 major changes to files.c.
21789 (lex) Retain in the incoming stream a character following
21790 an incorrect '/'.
21791 (skip_white_space, lex): Revised most error messages
21792 and changed fatal to warn to avoid aborting.
21793 (percent_table): Added %thong declarations.
21794
21795 * src/gram.h: Comment changes.
21796
21797 * src/files.c (openfiles, open_extra_files, done):
21798 Add faction flag
21799 and actfile file. Handle noparserflag. Both for -n switch.
21800
21801 * src/conflicts.c (resolve_sr_conflict):
21802 Remove use of alloca.
21803
21804 1995-06-01 Jim Meyering <meyering@gnu.org>
21805
21806 * doc/bison.texinfo: *** empty log message ***
21807
21808 1995-05-06 Richard Stallman <rms@gnu.org>
21809
21810 * src/bison.s1: Comment change.
21811
21812 1995-05-06 Richard Stallman <rms@gnu.org>
21813
21814 * bison.simple: Comment change.
21815
21816 1995-05-03 Richard Stallman <rms@gnu.org>
21817
21818 * src/version.c: Version now 1.24.
21819
21820 * src/bison.s1: Change distribution terms.
21821
21822 * src/version.c: Version now 1.23.
21823
21824 1995-05-03 Richard Stallman <rms@gnu.org>
21825
21826 * doc/bison.texinfo:
21827 Rewrite "Conditions for Using Bison".
21828 Update version to 1.24.
21829
21830 1995-05-03 Richard Stallman <rms@gnu.org>
21831
21832 * bison.simple: Change distribution terms.
21833
21834 1995-02-23 Richard Stallman <rms@gnu.org>
21835
21836 * src/files.c: Test __VMS_POSIX as well as VMS.
21837
21838 1995-02-14 Jim Meyering <meyering@gnu.org>
21839
21840 * src/bison.s1 (__yy_memcpy):
21841 Renamed from __yy_bcopy to avoid
21842 confusion. Reverse FROM and TO arguments to be consistent with
21843 those of memcpy.
21844
21845 1995-02-14 Jim Meyering <meyering@gnu.org>
21846
21847 * bison.simple (__yy_memcpy):
21848 Renamed from __yy_bcopy to avoid
21849 confusion. Reverse FROM and TO arguments to be consistent with
21850 those of memcpy.
21851
21852 1994-11-10 David J. MacKenzie <djm@gnu.org>
21853
21854 * NEWS: reformat
21855
21856 * NEWS: New file.
21857
21858 * Makefile.in (DISTFILES): Include NEWS.
21859
21860 * Makefile.in (DISTFILES):
21861 Include install-sh, not install.sh.
21862
21863 * configure.in: Update to Autoconf v2 macro names.
21864
21865 1994-10-05 David J. MacKenzie <djm@gnu.org>
21866
21867 * Makefile.in: fix typo
21868
21869 * Makefile.in (prefix, exec_prefix):
21870 Let configure set them.
21871
21872 1994-09-28 David J. MacKenzie <djm@gnu.org>
21873
21874 * Makefile.in: Set datadir to $(prefix)/share.
21875
21876 1994-09-15 Richard Stallman <rms@gnu.org>
21877
21878 * src/bison.s1:
21879 Update copyright notice and GPL version.
21880
21881 1994-09-15 Richard Stallman <rms@gnu.org>
21882
21883 * bison.simple:
21884 Update copyright notice and GPL version.
21885
21886 1994-07-12 Richard Stallman <rms@gnu.org>
21887
21888 * src/reduce.c, src/reader.c:
21889 entered into RCS
21890
21891 1994-05-05 David J. MacKenzie <djm@gnu.org>
21892
21893 * Makefile.in: entered into RCS
21894
21895 1994-03-26 Richard Stallman <rms@gnu.org>
21896
21897 * src/bison.s1: entered into RCS
21898
21899 1994-03-26 Richard Stallman <rms@gnu.org>
21900
21901 * bison.simple: entered into RCS
21902
21903 1994-03-25 Richard Stallman <rms@gnu.org>
21904
21905 * src/main.c: entered into RCS
21906
21907 1994-03-24 Richard Stallman <rms@gnu.org>
21908
21909 * src/conflicts.c: entered into RCS
21910
21911 1994-01-02 Richard Stallman <rms@gnu.org>
21912
21913 * Makefile.in: *** empty log message ***
21914
21915 1993-11-21 Richard Stallman <rms@gnu.org>
21916
21917 * src/bison.s1: *** empty log message ***
21918
21919 1993-11-21 Richard Stallman <rms@gnu.org>
21920
21921 * doc/bison.texinfo: entered into RCS
21922
21923 * doc/bison.texinfo: *** empty log message ***
21924
21925 1993-11-21 Richard Stallman <rms@gnu.org>
21926
21927 * bison.simple: *** empty log message ***
21928
21929 1993-10-25 David J. MacKenzie <djm@gnu.org>
21930
21931 * doc/bison.texinfo: *** empty log message ***
21932
21933 1993-10-19 Richard Stallman <rms@gnu.org>
21934
21935 * src/bison.s1: *** empty log message ***
21936
21937 1993-10-19 Richard Stallman <rms@gnu.org>
21938
21939 * bison.simple: *** empty log message ***
21940
21941 1993-10-14 Richard Stallman <rms@gnu.org>
21942
21943 * src/bison.s1: *** empty log message ***
21944
21945 1993-10-14 Richard Stallman <rms@gnu.org>
21946
21947 * bison.simple: *** empty log message ***
21948
21949 1993-09-14 David J. MacKenzie <djm@gnu.org>
21950
21951 * doc/bison.texinfo: *** empty log message ***
21952
21953 1993-09-13 Noah Friedman <friedman@gnu.org>
21954
21955 * Makefile.in: *** empty log message ***
21956
21957 1993-09-10 Richard Stallman <rms@gnu.org>
21958
21959 * src/conflicts.c: *** empty log message ***
21960
21961 * src/system.h: entered into RCS
21962
21963 1993-09-10 Richard Stallman <rms@gnu.org>
21964
21965 * doc/bison.1: entered into RCS
21966
21967 1993-09-06 Noah Friedman <friedman@gnu.org>
21968
21969 * src/version.c: entered into RCS
21970
21971 1993-09-06 Noah Friedman <friedman@gnu.org>
21972
21973 * Makefile.in: *** empty log message ***
21974
21975 1993-07-30 David J. MacKenzie <djm@gnu.org>
21976
21977 * Makefile.in: *** empty log message ***
21978
21979 1993-07-24 Richard Stallman <rms@gnu.org>
21980
21981 * src/bison.s1: *** empty log message ***
21982
21983 1993-07-24 Richard Stallman <rms@gnu.org>
21984
21985 * bison.simple: *** empty log message ***
21986
21987 1993-07-08 David J. MacKenzie <djm@gnu.org>
21988
21989 * Makefile.in: *** empty log message ***
21990
21991 1993-07-04 Richard Stallman <rms@gnu.org>
21992
21993 * src/bison.s1: *** empty log message ***
21994
21995 1993-07-04 Richard Stallman <rms@gnu.org>
21996
21997 * bison.simple: *** empty log message ***
21998
21999 1993-06-26 David J. MacKenzie <djm@gnu.org>
22000
22001 * src/getargs.c: entered into RCS
22002
22003 1993-06-26 David J. MacKenzie <djm@gnu.org>
22004
22005 * doc/bison.texinfo: *** empty log message ***
22006
22007 * doc/bison.1: New file.
22008
22009 1993-06-25 Richard Stallman <rms@gnu.org>
22010
22011 * src/getargs.c: New file.
22012
22013 1993-06-16 Richard Stallman <rms@gnu.org>
22014
22015 * src/bison.s1: *** empty log message ***
22016
22017 1993-06-16 Richard Stallman <rms@gnu.org>
22018
22019 * bison.simple: *** empty log message ***
22020
22021 1993-06-03 Richard Stallman <rms@gnu.org>
22022
22023 * src/bison.s1: New file.
22024
22025 1993-06-03 Richard Stallman <rms@gnu.org>
22026
22027 * doc/bison.texinfo: *** empty log message ***
22028
22029 1993-06-03 Richard Stallman <rms@gnu.org>
22030
22031 * bison.simple: New file.
22032
22033 1993-05-19 Richard Stallman <rms@gnu.org>
22034
22035 * doc/bison.texinfo: New file.
22036
22037 1993-05-07 Noah Friedman <friedman@gnu.org>
22038
22039 * Makefile.in: *** empty log message ***
22040
22041 1993-04-28 Noah Friedman <friedman@gnu.org>
22042
22043 * src/reader.c: *** empty log message ***
22044
22045 1993-04-23 Noah Friedman <friedman@gnu.org>
22046
22047 * src/alloc.h: entered into RCS
22048
22049 1993-04-20 David J. MacKenzie <djm@gnu.org>
22050
22051 * src/version.c: *** empty log message ***
22052
22053 * src/files.c, src/allocate.c:
22054 entered into RCS
22055
22056 * src/reader.c: *** empty log message ***
22057
22058 * src/lex.c: entered into RCS
22059
22060 * src/conflicts.c: New file.
22061
22062 * src/symtab.c: entered into RCS
22063
22064 * src/alloc.h: New file.
22065
22066 * src/LR0.c: entered into RCS
22067
22068 1993-04-18 Noah Friedman <friedman@gnu.org>
22069
22070 * src/reader.c: New file.
22071
22072 * src/version.c: *** empty log message ***
22073
22074 1993-04-18 Noah Friedman <friedman@gnu.org>
22075
22076 * Makefile.in: *** empty log message ***
22077
22078 1993-04-17 Noah Friedman <friedman@gnu.org>
22079
22080 * Makefile.in: *** empty log message ***
22081
22082 1993-04-15 Richard Stallman <rms@gnu.org>
22083
22084 * src/main.c, src/files.c:
22085 New file.
22086
22087 1993-04-15 Noah Friedman <friedman@gnu.org>
22088
22089 * configure.in: entered into RCS
22090
22091 * configure.in: *** empty log message ***
22092
22093 * configure.in: New file.
22094
22095 1993-04-14 Richard Stallman <rms@gnu.org>
22096
22097 * Makefile.in: New file.
22098
22099 1993-04-13 Richard Stallman <rms@gnu.org>
22100
22101 * src/version.c: New file.
22102
22103 1993-03-25 Richard Stallman <rms@gnu.org>
22104
22105 * src/output.c: entered into RCS
22106
22107 1992-09-25 Richard Stallman <rms@gnu.org>
22108
22109 * configure.bat: entered into RCS
22110
22111 1992-06-22 Richard Stallman <rms@gnu.org>
22112
22113 * src/vmsgetargs.c: entered into RCS
22114
22115 1992-06-22 Richard Stallman <rms@gnu.org>
22116
22117 * doc/bison.rnh: entered into RCS
22118
22119 1992-04-20 David J. MacKenzie <djm@gnu.org>
22120
22121 * README: entered into RCS
22122
22123 1992-01-22 Richard Stallman <rms@gnu.org>
22124
22125 * src/machine.h: entered into RCS
22126
22127 1991-12-21 Richard Stallman <rms@gnu.org>
22128
22129 * src/lalr.c, src/closure.c:
22130 entered into RCS
22131
22132 1991-12-20 Richard Stallman <rms@gnu.org>
22133
22134 * src/state.h: entered into RCS
22135
22136 1991-12-18 Richard Stallman <rms@gnu.org>
22137
22138 * src/print.c, src/nullable.c, src/derives.c:
22139 entered into RCS
22140
22141 1991-11-03 David J. MacKenzie <djm@gnu.org>
22142
22143 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22144 entered into RCS
22145
22146 1988-09-09 Richard Stallman <rms@gnu.org>
22147
22148 * src/bison.hairy: entered into RCS
22149
22150 1987-12-16 Richard Stallman <rms@gnu.org>
22151
22152 * REFERENCES: entered into RCS
22153
22154
22155 -----
22156
22157 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22158 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22159 2007, 2008, 2009 Free Software Foundation, Inc.
22160
22161 Copying and distribution of this file, with or without
22162 modification, are permitted provided the copyright notice and this
22163 notice are preserved.