]> git.saurik.com Git - bison.git/blob - ChangeLog
build: require gettext 0.17.
[bison.git] / ChangeLog
1 2009-08-17 Akim Demaille <demaille@gostai.com>
2
3 build: require gettext 0.17.
4
5 Suggested by Bruno Haible.
6 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
7 * configure.ac: require gettext 0.17 to ensure compatibility with
8 gnulib.
9
10 2009-08-17 Akim Demaille <demaille@gostai.com>
11
12 build: lower gettext requirements.
13
14 Bison was uselessly requiring the formatstring macros from
15 gettext, which resulted in mo files not being installed on systems
16 that perfectly supported Bison mo files. Lower the requirement.
17 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
18
19 * configure.ac: Require need-ngettext instead of
20 need-formatstring-macros.
21 Reported by Martin Jabocs.
22 Suggested by Bruno Haible.
23 * INSTALL: Restructure.
24 (Internationalization): New.
25
26 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
27
28 maint: fix use of copyright year intervals.
29 * gnulib: Update.
30 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
31 as now recommended in gnulib/NEWS.
32 * build-aux/update-b4-copyright: Fix.
33 * cfg.mk (update-copyright-env): Configure update-copyright.
34
35 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
36
37 Make it easier to write deterministic tests.
38 Continues Akim's work from his 2009-06-10 commits.
39 * src/reader.c (check_and_convert_grammar): Don't add any
40 symbols after the first symbols_do invocation.
41 * src/symtab.c (symbols_sorted): New static global.
42 (user_token_number_redeclaration): Update comments.
43 (symbol_from_uniqstr): If a new symbol is being created, assert
44 that symbols_sorted hasn't been allocated yet.
45 (symbols_free): Free symbols_sorted.
46 (symbols_cmp, symbols_cmp_qsort): New functions.
47 (symbols_do): Sort symbol_table into symbols_sorted on first
48 invocation.
49 * tests/input.at (Numbered tokens): Recombine tests now that the
50 output should be deterministic across multiple numbers.
51
52 2009-08-12 Akim Demaille <demaille@gostai.com>
53
54 distcheck: fix.
55
56 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
57
58 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
59
60 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
61
62 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
63
64 Miscellaneous code readability improvements.
65
66 * src/reader.c (reader): Move %define front-end variable
67 defaults and checking into...
68 (prepare_percent_define_front_end_variables): ... this new
69 function.
70
71 * src/scan-gram.l (INITIAL): For consistency with string
72 literals, don't store open quote on character literal. It's
73 discarded before returning anyway.
74 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
75 Make length test more readable, and make the character stored
76 for an empty literal more obvious while consistent with the
77 previous behavior.
78
79 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
80 USER_NUMBER_HAS_STRING_ALIAS throughout.
81 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
82 that is repeated in symtab.h. Improve argument names to make it
83 clear which side of the symbol-string alias pair is which.
84 (symbol_check_alias_consistency): Improve local variable names
85 for the same purpose.
86 * src/symtab.h (struct symbol): Make comments about aliases
87 clearer.
88 (symbol_make_alias): Improve comments and argument name.
89 * src/output.c (token_definitions_output): Update for rename to
90 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
91
92 2009-08-08 Alex Rozenman <rozenman@gmail.com>
93
94 Convert "misleading reference" messages to warnings.
95 * src/scan-code.l: New function 'show_sub_messages', more
96 factoring.
97 * tests/named-ref.at: Adjust tests.
98
99 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
100
101 maint: run "make update-copyright"
102
103 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
104
105 maint: make update-b4-copyright easier to use
106 * build-aux/update-b4-copyright: In warnings, report line
107 numbers rather than character positions.
108 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
109 that update-copyright runs it.
110 * gnulib: Update.
111
112 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
113
114 maint: clean up update-b4-copyright code
115 * build-aux/update-b4-copyright: Do not accept 2-digit
116 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
117 Don't accept a `[' in a b4_copyright argument.
118 Format code more consistently.
119 Don't assume b4*copyright never occurs.
120
121 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
122
123 maint: automate b4_copyright updates.
124 * Makefile.am (update-b4-copyright): New target rule.
125 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
126 * build-aux/update-b4-copyright: New.
127 * data/yacc.c: Remove stray characters around b4_copyright
128 invocations.
129
130 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
131
132 maint: automate annual package-wide copyright-year update.
133 * .x-update-copyright: New.
134 * Makefile.am (EXTRA_DIST): Remove maint.mk.
135 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
136 update-copyright. Remove gnumakefile, which is implied by
137 maintainer-makefile.
138 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
139 * gnulib: Update.
140 * maint.mk: Remove, now copied from gnulib.
141 * examples/extexi: Add missing "(C)" in copyright statement so
142 update-copyright can recognize it.
143 * src/LR0.h: Likewise.
144 * src/print.h: Likewise.
145 * src/print_graph.h: Likewise.
146 * src/gram.c: Add missing comma in copyright statement.
147 * src/gram.h: Likewise.
148
149 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
150
151 Fix "make distcheck".
152 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
153 of just calc.stamp.
154
155 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
156
157 Pacify "gcc -Wunused" for the input function from Flex.
158 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
159 and later.
160 * src/scan-code.l: Add "%option noinput", which I cannot find in
161 the Flex manual, but which Flex has supported since at least as
162 far back as 2.5.4. However, if any of our developers still use
163 Flex 2.5.4, they'll need to stop configuring with
164 --enable-gcc-warnings because "%option noinput" didn't work
165 correctly until Flex 2.5.6.
166 * src/scan-gram.l: Likewise.
167 * src/scan-skel.l: Likewise.
168
169 2009-07-31 Alex Rozenman <rozenman@gmail.com>
170
171 Fix --enable-gcc-warnings problems.
172 * src/reader.c: Adjust variable names.
173 * src/scan-code.l: Fix prototypes and adjust names.
174 * src/named-ref.c: Remove redundant "if".
175
176 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
177
178 Fix a --enable-gcc-warnings problem.
179 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
180 variable.
181
182 2009-07-24 Alex Rozenman <rozenman@gmail.com>
183
184 Fix some memory leaks.
185 * src/named-ref.c: Add a pointer check (named_ref_free).
186 * src/scan-code.l: New function (variant_table_free). Called in
187 code_scanner_free.
188 * src/symlist.c: Call to named_ref_free (symbol_list_free).
189
190 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
191
192 Warn about character literals not of length one.
193 * NEWS (2.5): Document.
194 * src/scan-gram.l (INITIAL): Remove comment that we don't check
195 the length.
196 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
197 * tests/input.at (Bad character literals): New test group.
198
199 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
200
201 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
202
203 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
204
205 Some M4 cleanup in the testsuite.
206 Suggested by Eric Blake at
207 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
208 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
209 complicate the code by distinguishing between a missing value
210 and an empty string value for an optional argument. This fix is
211 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
212 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
213 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
214 arguments are not needed because of the following changes.
215 Fix stale comments.
216 Bison developers should use GNU M4 and should not use
217 POSIXLY_CORRECT when building the test suite, so do not
218 complicate the code by avoiding $10 and above.
219 Do not quote an empty string value for an optional argument, and
220 do not distinguish between a missing value and an empty string
221 value.
222
223 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
224
225 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
226
227 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
228
229 Revert unnecessary column realignment in --help output.
230 Reported by Akim Demaille at
231 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
232 * src/getargs.c (usage): Here.
233
234 2009-07-04 Alex Rozenman <rozenman@gmail.com>
235
236 Alphabetical order in src/Makefile.am.
237 * src/Makefile.am: Adjust.
238
239 2009-07-04 Alex Rozenman <rozenman@gmail.com>
240
241 Style changes and factoring.
242 * src/named-ref.h: Add comments.
243 * src/parse-gram.y: Readability and style changes.
244 * src/reader.c: Factoring: assign_named_ref function.
245 * src/scan-code.l: Factoring and style changes. Rename
246 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
247 Use "unsigned" type for variant index. Improve readablity.
248 * src/scan-gram.l: Change error messages and add comments.
249 * src/symlist.h: symbol_list_null: New function decl.
250 * src/symlist.c: symbol_list_null: Implement here.
251 * tests/named-refs.at: Adjust for new error messages.
252
253 2009-06-29 Eric Blake <ebb9@byu.net>
254
255 scan-code: avoid compiler warnings
256 * src/scan-code.l (parse_named_ref): Use correct specifiers.
257
258 2009-06-29 Akim Demaille <demaille@gostai.com>
259
260 build: avoid concurrent extraction of calc++.
261 * examples/calc++/Makefile.am (calc.stamp): New.
262 Depend on it to create the sources of calc++ so that concurrent
263 builds don't launch several "extexi" in parallel.
264 Not only this is inefficient, this also builds incorrect sources
265 with several extractions mixed together.
266
267 2009-06-27 Alex Rozenman <rozenman@gmail.com>
268
269 Implement support for named symbol references.
270 * src/parse-gram.y: Add new syntax (named_ref.opt).
271 * src/reader.c: Store named refs in symbol lists.
272 * src/reader.h: New argument for symbol_append and
273 action_append functions.
274 * src/scan-code.h: Add new field (named_ref) into
275 code_props data structure. Keeps named ref of midrule
276 actions.
277 * src/scan-code.l: Support for named refs in semantic
278 action code. New function 'parse_named_ref'.
279 * src/scan-gram.l: Support bracketed id.
280 * src/symlist.c: Store named refs in symbol lists.
281 * src/symlist.h: New field in symbol list: named_ref.
282 * src/named-ref.h: New file, a struct for named_ref.
283 * src/named-ref.cp: New file, named_ref_new function.
284 * src/local.mk: Add two new files.
285 * tests/testsuite.at: Include new test group:
286 * tests/named-refs.at: this new file.
287
288 2009-06-25 Akim Demaille <demaille@gostai.com>
289
290 hash: check insertion for memory exhaustion.
291 * src/uniqstr.c (uniqstr_new): New.
292
293 2009-06-11 Akim Demaille <demaille@gostai.com>
294
295 style changes.
296 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
297 * src/print-xml.c: Style changes.
298 * tests/conflicts.at: Comment changes.
299
300 2009-06-11 Akim Demaille <demaille@gostai.com>
301
302 xml: beware of user strings used to give a %prec to rules.
303 * tests/conflicts.at (%prec with user strings): New.
304 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
305 XML output.
306
307 2009-06-11 Akim Demaille <demaille@gostai.com>
308
309 hash: check insertion for memory exhaustion.
310 * src/muscle-tab.c (muscle_insert, muscle_grow)
311 * src/state.c (state_hash_insert): Check the return value of
312 hash_insert.
313
314 2009-06-10 Akim Demaille <demaille@gostai.com>
315
316 deterministic test suite.
317 Some consistency checks on symbols are performed after all the
318 symbols were read, by an iteration over the symbol table. This
319 traversal is nondeterministic, which can be a problem for test
320 cases.
321 Avoid this.
322 Addresses another form of nondeterminism reported by Joel E. Denny.
323 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
324
325 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
326 test in two.
327 Use different file names for the three tests to make the
328 maintenance easier.
329
330 2009-06-10 Akim Demaille <demaille@gostai.com>
331
332 deterministic user-token-number redeclaration errors.
333 Address nondeterminism reported by Joel E. Denny.
334 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
335
336 * src/uniqstr.h: Comment changes.
337 * src/location.h (boundary_cmp, location_cmp): New.
338 * src/symtab.c (user_token_number_redeclaration): New.
339 (symbol_translation): Use it.
340 * tests/input.at (Numbered tokens): Adjust the expected output.
341
342 2009-05-25 Akim Demaille <demaille@gostai.com>
343
344 gnulib: update.
345 * gnulib: Update to latest.
346 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
347 * m4/.gitignore: Regen.
348 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
349 Call xalloc_die on hash_insert failures.
350 Requested by the new __warn_unused_result__ attribute of
351 hash_insert.
352
353 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
354
355 Convert multiple variable definition warnings to complaints.
356 * NEWS (2.5): Add a new entry for that change.
357 * doc/bison.texinfo (Decl Summary): Update %define entry.
358 (Bison Options): Update -D/--define/-F/--force-define entry.
359 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
360 * src/muscle_tab.h (muscle_percent_define_insert): Update
361 comments.
362 * tests/input.at (`%define errors'): Update.
363 (`%define, --define, --force-define'): Update.
364
365 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
366
367 -F/--force-define and relative %define/-D/--define priorities.
368 * NEWS (2.5): Add documentation to -D/--define entry.
369 * build-aux/cross-options.pl: Hard-code association of
370 --force-define with %define.
371 * doc/bison.texinfo (Decl Summary): In %define entry,
372 cross-reference command-line options.
373 (Bison Options): Add documentation to -D/--define entry.
374 (Option Cross Key): Widen column for --force-define row.
375 * src/getargs.c (usage): Document -F/--force-define. Realign
376 options in output.
377 (short_options, long_options, getargs): Parse -F/--force-define,
378 and update muscle_percent_define_insert invocation.
379 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
380 (muscle_percent_define_insert): Add argument with that type.
381 * src/muscle_tab.c (muscle_percent_define_insert): Implement
382 -F/--force-define behavior and priorities.
383 * src/parse-gram.y (prologue_declaration): Update
384 muscle_percent_define_insert invocations.
385 * tests/input.at (`%define, --define'): Rename to...
386 (`%define, --define, --force-define'): ... this and extend.
387
388 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
389
390 Update some comments to make sense for -D.
391 * data/bison.m4 (b4_check_user_names): In header comments, say
392 "user occurrence" instead of "grammar occurrence".
393 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
394 (muscle_percent_code_grow): Likewise just for consistency.
395
396 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 * data/c++.m4: Update copyright year.
399
400 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 * data/c++.m4 (b4_namespace_close): Simplify slightly.
403
404 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
405
406 Handle a trailing `:' in a user-supplied C++ namespace better.
407 * data/c++.m4 (b4_namespace_close): Don't let it be printed
408 among the closing braces here. This fix might make the
409 generated code easier to debug, but otherwise it should be
410 insignificant because a trailing `:' is a C++ error already.
411
412 2009-05-19 Akim Demaille <demaille@gostai.com>
413
414 remove useless variable.
415 * src/getargs.c (skeleton_arg): Remove now useless variable.
416 Should help the compiler see that this printf-like call is sane.
417
418 2009-05-11 Akim Demaille <demaille@gostai.com>
419
420 doc: use C++ headers.
421 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
422 headers.
423
424 2009-05-05 Akim Demaille <demaille@gostai.com>
425
426 fix hexadecimal token number support.
427 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
428
429 2009-05-05 Akim Demaille <demaille@gostai.com>
430
431 tests: check token numbers.
432 * tests/input.at (Numbered tokens): New.
433
434 2009-05-04 Akim Demaille <demaille@gostai.com>
435
436 bison: catch bad symbol names.
437 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
438 * tests/input.at: Adjust.
439
440 2009-05-04 Akim Demaille <demaille@gostai.com>
441
442 space changes.
443 * src/scan-gram.l: Untabify to be robust to zealous editors.
444
445 2009-05-04 Akim Demaille <demaille@gostai.com>
446
447 identifiers: dashes are letters.
448 Dashes can now start identifiers (symbols and directives).
449
450 * src/scan-gram.l ({letter}): Add dash.
451 ({id}): Remove it.
452 * tests/input.at (Symbols): Adjust.
453 Remove stray comment.
454 * tests/regression.at (Invalid inputs): Adjust error message.
455 * doc/bison.texinfo (Symbols): Update.
456
457 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
458
459 Declare %code to be a permanent feature.
460 * NEWS (2.4.2): Here.
461 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
462 experimental.
463 (Decl Summary): Likewise.
464
465 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
466
467 Convert underscores to dashes in some %define variable names.
468 For now, just api.push-pull and lr.keep-unreachable-states.
469 Maintain old names for backward compatibility.
470 * NEWS (2.5): Document.
471 * data/c.m4 (b4_identification): Update comment.
472 * data/yacc.c: Update access.
473 * doc/bison.texinfo: Update.
474 * etc/bench.pl.in (bench_grammar): Update use.
475 * src/files.c (tr): Move to...
476 * src/getargs.c, src/getargs.h (tr): ... here because I can't
477 think of a better place to expose it. My logic is that, for all
478 uses of tr so far, command-line arguments can be involved, and
479 getargs.h is already included.
480 * src/main.c (main): Update access.
481 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
482 variable names to new variable names before assigning value.
483 * src/reader.c (reader): Update setting default.
484 * tests/calc.at: Update uses.
485 * tests/conflicts.at (Unreachable States After Conflict
486 Resolution): Update use.
487 * tests/input.at (%define enum variables): Update use.
488 (%define backward compatibility): New test group.
489 * tests/push.at: Update uses.
490 * tests/reduce.at: Update uses.
491 * tests/torture.at: Update uses.
492
493 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
494
495 Set all front-end %define defaults in one place.
496 * src/main.c (main): Move lr.keep_unreachable_states default...
497 * src/reader.c (reader): ... to here.
498
499 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
500
501 Rename lr.default_reductions to lr.default-reductions.
502 * NEWS (2.5): Here.
503 * doc/bison.texinfo: Here.
504 * src/lalr.c (initialize_LA): Here.
505 * src/print.c (print_reductions): Here.
506 * src/reader.c (reader): Here.
507 * src/tables.c (action_row): Here.
508 * tests/input.at (%define enum variables): Here.
509 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
510
511 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 Pacify ./configure --enable-gcc-warnings.
514 * tests/input.at (Symbols): Prototype yyerror and yylex.
515
516 2009-04-21 Akim Demaille <demaille@gostai.com>
517
518 tests: check the use of dashes and periods in symbols.
519 * tests/input.at (Symbol): New test group.
520
521 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Document how `%define "var" "value"' is not M4-friendly.
524 * src/parse-gram.y (variable): In comments here.
525
526 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
527
528 Add copyright updates missed during previous cherry pick.
529 * src/output.c: Here.
530 * src/parse-gram.y: Here.
531 * src/scan-gram.l: Here.
532
533 2009-04-20 Akim Demaille <demaille@gostai.com>
534
535 variables: accept dashes.
536 * src/scan-gram.l ({id}): Also accept dashes after the initial
537 letter.
538 ({directive}): Use {id}.
539 * src/parse-gram.y: Comment and formatting changes.
540 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
541 symbols.
542 * src/complain.h, src/complain.c (yacc_at): New.
543 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
544 symbol names.
545 * src/output.c (token_definitions_output): Do not #define token
546 names with dashes.
547
548 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
549
550 Clean up recent patches a little.
551 Reported by Akim Demaille.
552 * doc/bison.texinfo (Understanding): Fix typos.
553 * src/print.c (print_reductions): Don't use negated variable.
554
555 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
556
557 List accepted values for a %define enum variable with an invalid value.
558 Suggested by Akim Demaille at
559 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
560 * data/bison.m4 (_b4_percent_define_check_values): Implement.
561 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
562 * tests/input.at (%define lr.default_reductions invalid values): Merge
563 into...
564 (%define enum variables): ... here, and update output.
565
566 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
567
568 Rename "default rule" to "default reduction".
569 This includes changing variable names in code, changing
570 comments, and renaming %define lr.default_rules to %define
571 lr.default_reductions.
572 * NEWS (2.5): Update IELR documentation.
573 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
574 Adjust YYDEFACT and yydefact_ documentation.
575 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
576 and lr.type documentation. Make some other wording
577 improvements.
578 (Glossary): Adjust cross-references and Default Reduction
579 definition.
580 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
581 Remove a confusing comment pointed out by Akim Demaille.
582 (initialize_LA): Adjust code.
583 * src/print-xml.c (print_reductions): Adjust code.
584 * src/print.c (print_reductions): Adjust code.
585 * src/reader.c (reader): Adjust code.
586 * src/tables.c (action_row): Adjust code.
587 (token_actions): Adjust code.
588 * src/tables.h: Adjust YYDEFACT documentation.
589 * tests/input.at (%define lr.default_rules invalid values):
590 Rename test group to...
591 (%define lr.default_reductions invalid values): ... this, and
592 update grammar file and expected output.
593 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
594 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
595
596 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
597
598 Document %define lr.type and lr.default_rules.
599 * NEWS (2.5): Add an entry.
600 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
601 besides just LALR(1) and GLR(1).
602 * doc/bison.texinfo (Introduction): Likewise.
603 (Language and Grammar): Bison is no longer limited to LALR(1)
604 restrictions.
605 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
606 when trying to distinguish from GLR. Talk about LR(1) grammars
607 rather than LALR(1) grammars.
608 (Decl Summary): In %define api.push_pull entry, say it applies
609 to deterministic parsers in C rather than LALR(1) parsers in C.
610 Add lr.default_rules entry.
611 Add lr.type entry.
612 (Mystery Conflicts): Bison is no longer limited to LALR(1)
613 restrictions.
614 (Generalized LR Parsing): Same changes as for the previous GLR
615 section.
616 (Memory Management): Say deterministic rather than LALR(1).
617 (Understanding): Correct some bison output.
618 Index discussion of "accepting state".
619 Say deterministic rather than LALR(1).
620 (Bison Options): In --yacc entry, say deterministic rather than
621 LALR(1).
622 In --report, --graph, and --xml entries, just don't mention
623 LALR(1).
624 (C++ Parsers): Say deterministic rather than LALR(1).
625 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
626 (Glossary): Add Accepting State, Consistent State, Default Rule,
627 and IELR(1) definitions.
628 In Generalized LR (GLR) definition, make same changes as in
629 previous GLR sections.
630 In LALR(1) definition, say Bison uses LALR(1) by default rather
631 than implying Bison is limited to LALR(1).
632 (LocalWords): Add IELR.
633
634 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
635
636 Finish implementing %define lr.type.
637 Its value can be "LALR", "IELR", or "canonical LR".
638 * lib/timevar.def (TV_IELR_PHASE1): New var.
639 (TV_IELR_PHASE2): New var.
640 (TV_IELR_PHASE3): New var.
641 (TV_IELR_PHASE4): New var.
642 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
643 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
644 Sbitset.h, ielr.h, and ielr.c.
645 * src/getargs.h, src/getargs.c (enum trace, trace_args,
646 trace_types): Add trace_ielr.
647 * src/lalr.h, src/lalr.c (ngotos): Export it.
648 (F): Rename to...
649 (goto_follows): ... this, update all uses, and export it.
650 (set_goto_map): Export it.
651 (map_goto): Export it.
652 (compute_lookahead_tokens): Don't free goto_follows yet. Now
653 handled in ielr.
654 (initialize_LA): Export it. Move lookback allocation to...
655 (lalr): ... here because, for canonical LR, initialize_LA must
656 be invoked but lookback and much of the rest of LALR isn't
657 needed.
658 * main.c (main): Instead of lalr, invoke ielr, which invokes
659 lalr.
660 * src/reader.c (reader): Default lr.type to "LALR".
661 Default lr.default_rules to "accepting" if lr.type is "canonical
662 LR". Leave the default as "all" otherwise.
663 Check for a valid lr.type value.
664 * src/state.h, src/state.c (struct state_list): Add state_list
665 member.
666 (state_new): Initialize state_list member to NULL.
667 (state_new_isocore): New function, exported.
668 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
669 exercises all values of lr.type.
670 (GNU AWK Grammar): Rename test group to...
671 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
672 AT_TEST_EXISTING_GRAMMAR.
673 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
674 (GNU pic Grammar): Rename test group to...
675 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
676 AT_TEST_EXISTING_GRAMMAR.
677 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
678 all values of lr.type.
679 (Single State Split): New test groups using AT_TEST_LR_TYPE.
680 (Lane Split): Likewise.
681 (Complex Lane Split): Likewise.
682 (Split During Added Lookahead Propagation): Likewise.
683
684 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
685
686 Add new files for IELR and canonical LR implementation.
687 * src/AnnotationList.c: New.
688 * src/AnnotationList.h: New.
689 * src/InadequacyList.c: New.
690 * src/InadequacyList.h: New.
691 * src/Sbitset.c: New.
692 * src/Sbitset.h: New.
693 * src/ielr.c: New.
694 * src/ielr.h: New.
695
696 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
697
698 Implement %define lr.default_rules.
699 Its value describes the states that are permitted to contain
700 default rules: "all", "consistent", or "accepting".
701 * src/reader.c (reader): Default lr.default_rules to "all".
702 Check for a valid lr.default_rules value.
703 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
704 is "accepting", then only mark the accepting state as
705 consistent.
706 (initialize_LA): Tell state_lookahead_tokens_count whether
707 lr.default_rules is "accepting".
708 * src/tables.c (action_row): If lr.default_rules is not "all",
709 then disable default rules in inconsistent states.
710 * src/print.c (print_reductions): Use this opportunity to
711 perform some assertions about whether lr.default_rules was
712 obeyed correctly.
713 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
714 helps with checking the parser tables for a grammar.
715 * tests/input.at (%define lr.default_rules invalid values): New
716 test group.
717 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
718 AT_TEST_TABLES_AND_PARSE.
719 (`no %define lr.default_rules'): New test group generated by
720 AT_TEST_LR_DEFAULT_RULES.
721 (`%define lr.default_rules "all"'): Likewise.
722 (`%define lr.default_rules "consistent"'): Likewise.
723 (`%define lr.default_rules "accepting"'): Likewise.
724
725 2009-04-20 Akim Demaille <demaille@gostai.com>
726
727 Consistently refer to Yacc, not YACC.
728 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
729
730 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
731
732 Pacify make maintainer-check-posix.
733 * tests/input.at (%define, --define): Move bison command-line
734 options before grammar file name.
735
736 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
737
738 Document semicolon warnings.
739 * NEWS (2.5): Here.
740
741 2008-12-08 Akim Demaille <demaille@gostai.com>
742
743 Fix portability issue in the test suite.
744 * tests/local.at (AT_MATCHES_CHECK): New.
745 Based on Perl instead of Sed. Sed has too many portability
746 pitfalls, not ever Sed is GNU Sed.
747 * tests/actions.at (Fix user actions without a trailing semicolon):
748 Use it.
749
750 2008-12-07 Di-an Jan <dianj@freeshell.org>
751
752 Implement the FIXME that ends an user action with a semicolon
753 if it seems necessary.
754 * src/scan-code.l (flex rules section): Flag cpp directive from
755 any `#' to the first unescaped end-of-line. Semicolon is not
756 needed after `;', `{', '}', or cpp directives and is needed after
757 any other token (whitespaces and comments have no effect).
758 * tests/actions.at (Fix user actions without a trailing semicolon):
759 New test.
760 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
761 to make user actions complete statements.
762 Adjust column numbers in error messages.
763 * tests/regression.at (Fix user actions without a trailing semicolon):
764 Remove. Covered by new test.
765
766 2009-04-14 Akim Demaille <demaille@gostai.com>
767
768 doc: minor fixes.
769 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
770 (Table of Symbols): Remove duplicate entry for %debug.
771
772 2009-04-10 Eric Blake <ebb9@byu.net>
773
774 submodules: update to latest
775 * submodules/autoconf: Use latest upstream Autoconf.
776
777 2009-04-06 Eric Blake <ebb9@byu.net>
778
779 Work around autoconf 2.63b bug in testsuite.
780 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
781 autoconf bug related to # in test.
782
783 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
784
785 * NEWS (2.5): Describe new -D/--define feature.
786
787 2008-11-10 Akim Demaille <demaille@gostai.com>
788
789 --trace=muscles
790 * src/getargs.h, src/getargs.c (trace_muscle): New.
791 (trace_types, trace_args): Support it.
792 * src/output.c (output_skeleton): Use it.
793
794 2008-11-10 Akim Demaille <demaille@gostai.com>
795
796 muscles_output.
797 * src/output.c (muscles_output): New, extracted from...
798 (output_skeleton): here.
799 Adjust.
800
801 2008-11-21 Akim Demaille <demaille@gostai.com>
802
803 Display the changes in cross-options.texi.
804 * build-aux/cross-options.pl ($sep): New, to separate items.
805 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
806 the changes.
807
808 2008-11-20 Di-an Jan <dianj@freeshell.org>
809
810 Improves options in the manual.
811 * doc/bison.texinfo (-g, -x): Add space before argument.
812 (Option Cross Key): Implement FIXME: listing directives also.
813 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
814 (Short Option): Special case -d. Put arguments inside @option.
815 (Bison Directive): Add column, automatically extracted from
816 src/scan-gram.l (actual name passed as the first argument)
817 with special case for %define.
818 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
819 to build-aux/cross-options.pl.
820 * src/getargs.c (usage): Document limitations of cross-options.pl.
821 * src/scan-gram.l: Likewise.
822
823 2009-02-25 Akim Demaille <demaille@gostai.com>
824
825 Copyright years.
826 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
827
828 2008-12-08 Akim Demaille <demaille@gostai.com>
829
830 Install autoconf as a submodule to get m4sugar.
831 * .gitmodules: Add submodules/autoconf.
832 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
833 submodules/autoconf.
834
835 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
836
837 Simplify last patch slightly.
838 * src/getargs.c (getargs): Here.
839
840 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
841
842 Fix last warning from --enable-gcc-warnings.
843 * src/getargs.c (getargs): Don't assign const address to non-const
844 pointer.
845
846 2008-11-17 Di-an Jan <dianj@freeshell.org>
847
848 Handle --enable-gcc-warnings.
849 * src/getargs.c (command_line_location): Set parameters to void.
850
851 2008-11-11 Akim Demaille <demaille@gostai.com>
852
853 AT_FULL_COMPILE.
854 * tests/actions.at, tests/regression.at: Use it.
855
856 2008-11-07 Akim Demaille <demaille@gostai.com>
857
858 Pass command line location to skeleton_arg and language_argmatch.
859 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
860 The location argument is now mandatory.
861 Adjust all dependencies.
862 (getargs): Use command_line_location.
863
864 2008-11-07 Akim Demaille <demaille@gostai.com>
865
866 -D, --define.
867 * src/getargs.c (usage): Document -D.
868 Fix help string for --locations.
869 (command_line_location): New.
870 (short_options, long_options, getargs): Support -D, --define.
871 (getargs): Move -d support at the right place.
872 * doc/bison.texinfo (Bison Options): Update.
873 * tests/input.at (%define, --define): New.
874
875 2008-11-07 Akim Demaille <demaille@gostai.com>
876
877 Initialize the muscle table before parsing the command line.
878 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
879 (getargs): Define file_name.
880 * src/main.c (main): Initialize muscle_tab before calling
881 getargs.
882 * src/muscle_tab.c (muscle_init): No longer define file_name, as
883 its value is not available yet.
884
885 2008-11-09 Akim Demaille <demaille@gostai.com>
886
887 Require the generation of parse-gram.output.
888 * src/Makefile.am (YACC): Pass --report=all.
889
890 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
891
892 * NEWS (2.5): New stub.
893
894 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
895
896 Fix options documentation.
897 * build-aux/cross-options.pl: As in --help output, write optional
898 arguments as [=ARG] not =[ARG].
899 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
900
901 2008-11-07 Akim Demaille <demaille@gostai.com>
902
903 Fix --help.
904 * src/getargs.c (usage): Fix help string for -W.
905
906 2008-11-07 Akim Demaille <demaille@gostai.com>
907
908 Handle more general types of option arguments.
909 * build-aux/cross-options.pl: The argument ends at the first
910 space, not the first non-symbol character.
911 Use @var for each word appearing the argument description.
912
913 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
914
915 Remove spurious initial empty lines.
916 * data/location.cc: End the @output lines with an @.
917
918 2008-11-04 Akim Demaille <demaille@gostai.com>
919
920 Remove spurious initial empty lines.
921 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
922 * data/yacc.c: End the @output lines with an @.
923
924 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
925
926 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
927 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
928 requirements for a correct m4 are stricter.
929 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
930 * configure.ac: Update to use AC_PROG_GNU_M4.
931 Reported by Eric Blake.
932
933 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
934
935 Help with updating web manual.
936 * HACKING: Incorporate instructions from gnulib/doc/README.
937 * bootstrap.conf (gnulib_modules): Add gendocs.
938
939 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
940
941 Fix strange %define locations for default values.
942 Reported by Akim Demaille at
943 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
944 and discussed again starting at
945 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
946 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
947 because location information is bogus.
948 Use angle brackets to delimit fake file name because square brackets
949 look like underexpanded m4. Choose a better fake file name.
950 Use negative line numbers.
951 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
952 * src/location.c (location_print): If line for a boundary is negative,
953 only print that boundary's file name.
954 * src/location.h: Document that.
955 * tests/skeletons.at (%define Boolean variables: invalid skeleton
956 defaults): Update output.
957
958 2008-11-07 Akim Demaille <demaille@gostai.com>
959
960 Locations without columns for command line arguments.
961 * src/location.c (location_print): Don't display negative columns.
962 * src/location.h: Document this.
963
964 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
965
966 Add reminder about uploading public key to keys.gnupg.net.
967 * HACKING (Release Procedure): Here.
968
969 2009-03-31 Akim Demaille <demaille@gostai.com>
970
971 bootstrap: --help to stdout.
972 * bootstrap (usage): Don't send --help to stderr.
973 Use a here doc instead of a long string.
974
975 2009-03-31 Akim Demaille <demaille@gostai.com>
976
977 bootstrap: README-hacking no longer exists
978 * bootstrap (checkout_only_file): Set to HACKING.
979
980 2009-03-26 Akim Demaille <demaille@gostai.com>
981
982 doc: merge HACKING and README-hacking.
983 Two files is confusing.
984 Reported by Alexandre Duret-Lutz.
985
986 * README-hacking: Merge into...
987 * HACKING (Working from the repository): here.
988
989 2009-03-26 Akim Demaille <demaille@gostai.com>
990
991 doc: update README-hacking.
992 * README-hacking: We now use git and git submodules.
993 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
994
995 2009-03-26 Akim Demaille <demaille@gostai.com>
996
997 lalr1.cc: avoid GCC 4.3 warnings.
998 GCC 4.3 now warns about "a || b && c" and asks for explicit
999 parentheses.
1000 Reported by Alexandre Duret-Lutz.
1001 * data/location.cc: Update copyright years.
1002 (Position::operator==): Use parens to make precedence explicit.
1003 Compare lines and columns first, as they are more likely to be
1004 different, and they are faster to compare.
1005
1006 2009-03-26 Akim Demaille <demaille@gostai.com>
1007
1008 gnulib: update.
1009 * gnulib: Update to latest.
1010 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
1011 use +=.
1012
1013 2009-01-08 Akim Demaille <demaille@gostai.com>
1014
1015 Fix grep portability issues.
1016 Grep on Solaris does not support -q.
1017 Reported by Summum Bonum.
1018
1019 * NEWS: Add a stub for 2.4.2.
1020 * THANKS: Add Summum Bonum.
1021 * tests/atlocal.in (EGREP): New.
1022 (CC, CXX, XSLTPROC): Make it possible to override them via
1023 envvars.
1024 * tests/java.at: Use $EGREP instead of egrep.
1025 Use AT_CHECK's ignore instead of grep's -q.
1026
1027 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1028
1029 Version 2.4.1.
1030 * NEWS: Set version and date.
1031 * lib/Makefile.am: Update copyright year.
1032 * tests/atlocal.in: Update copyright year.
1033
1034 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1035
1036 Semicolon feature removal is not about future language support.
1037 * NEWS: The semicolon feature is no longer active for newer languages,
1038 so don't claim that it causes trouble for them.
1039
1040 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
1041
1042 * gnulib: Update submodule to HEAD.
1043
1044 2008-12-09 Akim Demaille <demaille@gostai.com>
1045
1046 Update data/README.
1047 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1048
1049 2008-12-05 Eric Blake <ebb9@byu.net>
1050
1051 Build testsuite with newer autoconf.
1052 * tests/output.at (m4_expand): Don't override in newer autoconf,
1053 where the underlying implementation changed.
1054 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1055 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1056 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1057 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1058 since some of them contain unbalanced ')'.
1059
1060 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 * NEWS: Clarify a little.
1063
1064 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
1065
1066 * NEWS: Update for recent changes.
1067
1068 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1069
1070 Fix unexpanded macros in GLR defines file.
1071 Reported by Csaba Raduly at
1072 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1073 * THANKS (Csaba Raduly): Add.
1074 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1075 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1076 lexer in a separate module that includes the defines file.
1077 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
1078 source.
1079 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1080 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1081 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1082 (AT_DATA_SOURCE_PROLOGUE): New.
1083 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1084 (AT_DATA_SOURCE): New.
1085 (AT_FULL_COMPILE): New, copied from master branch and extended to
1086 support an additional source file.
1087
1088 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1089
1090 Don't let maintainer-*-check targets force a version update.
1091 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1092 handled.
1093
1094 2008-11-17 Di-an Jan <dianj@freeshell.org>
1095
1096 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1097 Align menus. Adjust word wrapping. Use node names for menu names.
1098 (Examples): Don't abbreviate node names.
1099 (LocalWords): Remove abbreviations.
1100 (Copying): Make description a sentence.
1101 (Java Action Features): Remove period to match the rest of menu.
1102
1103 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1104
1105 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1106 * configure.ac: Adjust usage.
1107 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1108 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1109 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1110
1111 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1112
1113 Don't add a semicolon to actions for %skeleton or %language.
1114 It breaks Java test cases as reported by Akim Demaille.
1115 * src/scan-code.l: Implement.
1116
1117 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 Clean up %skeleton and %language priority implementation.
1120 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1121 remove static qualifier because others will soon need to see it.
1122 (language_prio): Likewise.
1123 (getargs): Use command_line_prio rather than 0.
1124 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1125 enum fields.
1126 (skeleton_prio): Extern it.
1127 (language_prio): Extern it.
1128 * src/parse-gram.y: Use grammar_prio rather than 1.
1129
1130 2008-11-04 Akim Demaille <demaille@gostai.com>
1131
1132 * NEWS: Mention the trailing semicolon in action.
1133
1134 2008-11-04 Akim Demaille <demaille@gostai.com>
1135
1136 Reformat NEWS.
1137 * NEWS: Use more outline-mode markup.
1138 Suggested by Jim Meyering.
1139
1140 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1141
1142 Fix user actions without a trailing semicolon.
1143 Reported by Sergei Steshenko at
1144 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1145 * THANKS (Sergei Steshenko): Add.
1146 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1147 * tests/regression.at (Fix user actions without a trailing semicolon):
1148 New test case.
1149
1150 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1151
1152 Initiate further development.
1153 * NEWS: Create an empty section for new entries.
1154 * gnulib: Update submodule to HEAD.
1155
1156 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1157
1158 * NEWS: Version 2.4.
1159
1160 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1161
1162 Prepare for next release.
1163 * NEWS: Briefly mention changes since 2.3b.
1164 * README: Say GNU m4 1.4.6, which we've been requiring in release
1165 announcements already, not 1.4.3, which breaks the build.
1166
1167 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 Say %language is experimental.
1170 We're thinking of extending it's effect on output file naming. See the
1171 thread at
1172 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
1173 * NEWS: Say it's experimental.
1174 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
1175 recommend it over %skeleton for now.
1176 (Bison Options): Likewise.
1177 (C++ Bison Interface): Use %skeleton not %language.
1178 (Calc++ Parser): Use %skeleton not %language.
1179 * src/getargs.c (usage): Say it's experimental.
1180
1181 2008-11-01 Di-an Jan <dianj@freeshell.org>
1182 Paolo Bonzini <bonzini@gnu.org>
1183
1184 Support all Java parser class modifiers.
1185 * data/java.m4 (b4_percent_define_get3): New.
1186 (b4_final_if, b4_strictfp_if): New.
1187 * data/lalr1.java (final, strictfp, extends, implements): Support.
1188 * doc/bison.texinfo (final, strictfp, extends, implements): Add
1189 documentation.
1190 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
1191 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
1192 (AT_CHECK_JAVA_GREP): New.
1193 (Java parser class modifiers): New test.
1194 (Java parser class extends and implements): New test.
1195
1196 Model exception propagation better with throws and lex_throws.
1197 * data/java.m4 (b4_list2): New.
1198 (throws): Change default.
1199 * data/lalr1.java (yyaction): Add throws.
1200 (parse): Add lex_throws in addition to throws.
1201 * doc/bison.texinfo (throws, lex_throws): Add documentation.
1202 * tests/java.at (Java throws specifications): New test.
1203
1204 Improve documentation for Java parsers.
1205 * doc/bison.texinfo (Java Parsers): Add subsections.
1206 Don't quote first argument of %define.
1207 (Java Bison Interface): Document output files. Move documentation
1208 of parser class and merge into Java Parser Interface. Document
1209 features that error out. Document directives with no effect.
1210 Move note about Javadoc higher.
1211 (Java Semantic Values): Explicitly mention stype.
1212 Document that generic types cannot be used.
1213 (Java Location Values): Use @deftypeivar. Document constructors.
1214 Correct return value for toString.
1215 (Java Parser Interface): List undocumented constants/fields.
1216 Move documentation of fields added by %parse-param closer to list
1217 of members. Document that token names are added as fields.
1218 Document constructors accurately. Remove error method.
1219 (Java Scanner Interface): Move note on %pure-parser to Java Bison
1220 Interface. Describe %code lexer and yylex accutately.
1221 Remove documentation that does not match the code.
1222 (Java Action Features): New.
1223 (Java Differences): Add reference. Add item on semantic values.
1224 Add note about @{ ... @}. Clarify %% epilogue placement.
1225 (Java Declarations Summary): New.
1226
1227 Fix Java skeleton.
1228 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
1229 (b4_remove_comma): Quote test argument.
1230 (b4_identification): Remove "bison" field.
1231 * tests/java.at (Java parser class and package names): New test.
1232 (Java %parse-param and %lex-param): New test.
1233 (Java stype, position_class and location_class): New test.
1234
1235 2008-10-31 Di-an Jan <dianj@freeshell.org>
1236
1237 * data/lalr1.jave: Update copyright years.
1238 (YYParser): Correct name of "generated from" file in Javadoc:
1239 use b4_file_name instead of @ofile@.
1240 (Location constructor): Correct Javadoc parameter name.
1241 (yylloc): Add missing opening m4 quote after b4_location_if.
1242 This removes a stray [ in the Javadoc of Lexer.getStartPos.
1243 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
1244 (YYParser constructor): Correct Javadoc parameter name.
1245
1246 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
1247
1248 Always put auxiliary code files in the same dir as other output files.
1249 * src/files.c (compute_file_name_parts): When the user specifies
1250 --output but not --file-prefix, extract the directory prefix from the
1251 file prefix not from the grammar file name. This affects the location
1252 of files like location.hh generated by the C++ skeleton. The includes
1253 in the other output files require this fix.
1254 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
1255 for expected output files.
1256 (Output files): Add a test for the above.
1257
1258 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
1259
1260 * gnulib: Update submodule to HEAD.
1261
1262 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1263
1264 Update copyright year.
1265 * src/files.c: Here.
1266
1267 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
1268
1269 Don't overwrite the input file.
1270 * src/files.c (output_file_name_check): Fatal error if using input file
1271 for output.
1272 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
1273 argument.
1274 (Conflicting output files): Add test.
1275
1276 2008-10-28 Akim Demaille <demaille@gostai.com>
1277
1278 Space changes.
1279 * data/lalr1.cc: Formatting changes.
1280
1281 2008-10-28 Akim Demaille <demaille@gostai.com>
1282
1283 Don't define debugging functions when !YYDEBUG.
1284 * data/lalr1.cc (debug_stream, set_debug_stream)
1285 (debug_level_type, debug_level, set_debug_level): Don't
1286 declare them when YYDEBUG is not defined.
1287 The implementation are already YYDEBUG-aware.
1288
1289 2008-10-28 Akim Demaille <demaille@gostai.com>
1290
1291 Prefer "continue" for empty loop bodies.
1292 * etc/bench.pl.in: Use "continue" instead of {}.
1293
1294 2008-10-28 Akim Demaille <demaille@gostai.com>
1295
1296 Space and comments changes.
1297 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
1298 * data/c.m4, data/lalr1.cc: Space changes.
1299
1300 2008-10-28 Akim Demaille <demaille@gostai.com>
1301
1302 Make gnulib a submodule.
1303 * gnulib: New.
1304 * .gitmodules (gnulib): New.
1305
1306 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1307
1308 Fix yyerror_range for user-defined location type in C++. Reported by
1309 Georg Sauthoff at
1310 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
1311 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
1312 * THANKS (Georg Sauthoff): Add.
1313
1314 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
1315
1316 Update several administrative files mainly to facilitate releasing.
1317 * HACKING (Administrivia): Make the git-merge-changelog notes more
1318 helpful.
1319 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
1320 (Release Procedure): Update for git and add numerous details that were
1321 previously missing.
1322 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
1323 * maint.mk (announcement): Don't list bison as a bootstrap tool so
1324 that announcements don't claim we bootstrapped with whatever bison
1325 happened to be in PATH. Add flex as a bootstrap tool.
1326 * Makefile.maint: Remove, previously replaced by maint.mk.
1327 * Makefile.cfg: Remove, and migrate settings to...
1328 * cfg.mk: ... here for the sake of `make announcement'.
1329 * bootstrap.conf (gnulib_modules): Add announce-gen.
1330 * README: Say GNU Bison instead of just Bison. Suggested by Karl
1331 Berry.
1332
1333 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
1334
1335 Small but important bugfixes for the Java skeleton.
1336 * data/lalr1.java (yyerror): Change Location to b4_location_type.
1337 (yy_symbol_print): Call toString on yyvaluep.
1338
1339 2008-08-29 Akim Demaille <demaille@gostai.com>
1340
1341 Clarify UPDATED use.
1342 * doc/bison.texinfo: It refers to the last edition of this file,
1343 not to the release date of Bison.
1344 Reported by Joel E. Denny.
1345
1346 2008-08-29 Akim Demaille <demaille@gostai.com>
1347
1348 * README: Update FAQ pointer.
1349 Reported by Joel E. Denny.
1350
1351 2008-08-27 Eric Blake <ebb9@byu.net>
1352
1353 Resync m4sugar from autoconf.
1354 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
1355 (m4_init): Adjust to latest m4.git changes.
1356 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
1357 effects.
1358 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
1359 (_m4_list_cmp): Reduce side effects.
1360
1361 2008-08-27 Akim Demaille <demaille@gostai.com>
1362
1363 Check yyerrok in calc.at.
1364 * tests/calc.at (calc.y): Use yyerrok on "( error )".
1365 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
1366 expected.
1367
1368 2008-08-27 Akim Demaille <demaille@gostai.com>
1369
1370 Support yyerrok in lalr1.cc.
1371 YYBACKUP is still to import back into lalr1.cc.
1372 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
1373
1374 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1375
1376 For maintainer-check*, don't recompile for a $(VERSION) update.
1377 * cfg.mk: New file.
1378 (_is-dist-target): Override the one in GNUmakefile.
1379 * Makefile.am (EXTRA_DIST): Add cfg.mk.
1380
1381 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
1382
1383 Update for recent change to gnulib.
1384 * src/parse-gram.y: Don't include strverscmp.h. It comes from
1385 string.h now.
1386
1387 2008-08-15 Eric Blake <ebb9@byu.net>
1388
1389 Remaining m4sugar merge from autoconf.
1390 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
1391 * data/m4sugar/foreach.m4: New file, copied from autoconf.
1392 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
1393 * src/output.c (output_skeleton): Tell m4 how to find it.
1394
1395 Partial m4sugar merge from autoconf: m4_map.
1396 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
1397 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
1398 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
1399 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
1400 for empty list.
1401 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
1402 Likewise.
1403 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
1404 declares it.
1405
1406 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
1407
1408 Keep .version and PACKAGE_VERSION in sync.
1409 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
1410 dependency, and add comments justifying this in more detail. Discussed
1411 starting at
1412 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
1413
1414 2008-08-06 Eric Blake <ebb9@byu.net>
1415
1416 Partial m4sugar merge from autoconf: m4_shiftn.
1417 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
1418 (m4_shift2, m4_shift3): New macros.
1419 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
1420 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
1421 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
1422 * data/java.m4 (b4_remove_comma): Likewise.
1423
1424 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
1425 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
1426 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
1427 (m4_init): Consolidate wrapped text into single m4_wrap.
1428 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
1429 in wrapped text.
1430
1431 2008-08-05 Eric Blake <ebb9@byu.net>
1432
1433 Partial m4sugar merge from autoconf: builtins, version.m4.
1434 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
1435 (m4_prepend): Remove, as it is unused and inherently quadratic,
1436 whereas m4_append is linear in newer m4.
1437 (m4_mkstemp): New builtin.
1438 (m4_symbols): Make rename conditional.
1439 (m4_version_prereq): Ensure fatal error if used in bison, which
1440 intentionally lacks version.m4.
1441
1442 Fix comments in m4sugar.
1443 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
1444
1445 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1446
1447 Update for recent .gitignore fix in Gnulib.
1448 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
1449 anchored .gitignore entries.
1450
1451 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 Set gnu or gnits strictness.
1454 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
1455 development and gnits strictness for releases. Based on Eric Blake's
1456 suggestion at
1457 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
1458
1459 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1460
1461 * NEWS: Clarify documentation of %language.
1462
1463 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
1464
1465 Support usage of git-merge-changelog.
1466 * .gitattributes: New.
1467 * HACKING: Document usage of git-merge-changelog.
1468 * bootstrap: Install git-merge-changelog entries in .git/config
1469 if appropriate.
1470
1471 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1472
1473 Remove remaining dependence on CVS Id keyword.
1474 * ChangeLog: For the sake of people still using CVS, don't use dollars
1475 when mentioning Id.
1476 * data/xslt/bison.xsl: Remove Id from header comments, where it was
1477 unusual anyway.
1478 * data/xslt/xml2dot.xsl: Likewise.
1479 * data/xslt/xml2text.xsl: Likewise.
1480 * data/xslt/xml2xhtml.xsl: Likewise.
1481 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
1482 * doc/Makefile.am (neutralize): Remove, no longer needed.
1483 (.x.1): Don't use neutralize.
1484 (edit): Don't substitute for ID.
1485 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
1486
1487 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1488
1489 Fix dependence on computed configure variables.
1490 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
1491 $(top_srcdir)/configure.ac so that changes to computed variables, such
1492 as PACKAGE_VERSION, are seen.
1493 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
1494
1495 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
1496
1497 Update copyright dates for recent changes.
1498 * Makefile.am: Here.
1499 * src/Makefile.am: Here.
1500 * src/reduce.c: Here.
1501 * tests/reduce.at: Here.
1502
1503 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 Use git-version-gen for version names between releases.
1506 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
1507 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
1508 * .prev-version: New.
1509 * .version.in: Remove.
1510 * ChangeLog: Remove the Id previously used for capturing the CVS
1511 revision.
1512 * GNUmakefile: Remove, now copied from Gnulib.
1513 * Makefile.am: Add code suggested by comments in
1514 build-aux/git-version-gen.
1515 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
1516 .prev-version, and .version.
1517 * NEWS (2.3b+): Rename to...
1518 (?.?): ... this because we're dropping the "+" version naming scheme,
1519 but, in general, we still can't be sure of our next release name.
1520 * bootstrap: Add a quick hack to remove from .gitignore the
1521 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
1522 entry. This should really be fixed in gnulib instead.
1523 * bootstrap.conf (gnulib_modules): Add gnumakefile.
1524 * configure.ac (AC_INIT): Set version name by invoking
1525 build-aux/git-version-gen.
1526 (AC_CONFIG_FILES): Remove .version, now generated by
1527 build-aux/git-version-gen.
1528 * maint.mk: New, copied from coreutils.
1529 * doc/.cvsignore (bison.1): Add.
1530 * doc/.gitignore (/bison.1): Add.
1531 * doc/bison.1: Remove, generated.
1532 * src/.cvsignore (revision.c): Remove.
1533 * src/.gitignore (/revision.c): Remove.
1534 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
1535 (BUILT_SOURCES): Remove revision.c.
1536 (revision.c): Remove.
1537 * src/getargs.c (version): Don't print revision after the VERSION.
1538 * src/revision.h: Remove.
1539
1540 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1541
1542 Fix untranslatable composition of sentences. Reported by Goran
1543 Uddeborg at
1544 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
1545 * THANKS (Goran Uddeborg): Add.
1546 * src/reduce.c (reduce_print): Report the number of nonterminals and
1547 rules useless in the grammar in separate sentences.
1548 * tests/reduce.at (Useless Rules): Update output.
1549 (Reduced Automaton): Likewise.
1550 (Underivable Rules): Likewise.
1551 (Empty Language): Likewise.
1552
1553 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1554
1555 Fix some .gitignore and .cvsignore problems.
1556 * bootstrap (insert_sorted_if_absent): Replace all uses with...
1557 (insert_vc_ignore): ... this new function, which prepends `/' to all
1558 .gitignore entries before passing them to insert_sorted_if_absent.
1559 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
1560 .cvsignore files are maintained even though Bison developers run
1561 bootstrap while using Git.
1562 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
1563 unneeded by Bison.
1564 (gnulib): Add.
1565 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
1566 unneeded. Reported by Eric Blake.
1567 * lib/.gitignore (/*~): Add.
1568 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
1569 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
1570 Blake.
1571 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
1572
1573 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1574
1575 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
1576 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
1577 * bootstrap.conf (gnulib_modules): Add unsetenv.
1578 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
1579 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
1580 (/setenv.m4): Add.
1581 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
1582 the first argument because it may become position-dependent, and unset
1583 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
1584 Add comments explaining these issues in more detail.
1585
1586 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
1587
1588 Add .gitignore everywhere based on .cvsignore.
1589 * .gitignore: New.
1590 * build-aux/.gitignore: New.
1591 * data/.gitignore: New.
1592 * doc/.gitignore: New.
1593 * etc/.gitignore: New.
1594 * examples/.gitignore: New.
1595 * examples/calc++/.gitignore: New.
1596 * lib/.gitignore: New.
1597 * m4/.gitignore: New.
1598 * po/.gitignore: New.
1599 * runtime-po/.gitignore: New.
1600 * src/.gitignore: New.
1601 * tests/.gitignore: New.
1602
1603 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1604
1605 * NEWS (2.3b+): New section, empty for now.
1606 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
1607
1608 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 * NEWS (2.3b): Update release date since there has been a delay in
1611 getting the announcements and tarballs out.
1612
1613 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1614
1615 * NEWS: Version 2.3b.
1616 * configure.ac (AC_INIT): Likewise.
1617 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
1618
1619 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
1620
1621 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
1622 been doing it for years.
1623 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
1624 (Release Procedure): Add FIXME about make alpha being unmaintained.
1625
1626 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
1627
1628 * data/yacc.c: Reformat m4 a little for readability.
1629 * src/lalr.c (build_relations): Correct comment.
1630
1631 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1632
1633 DJGPP specific issue.
1634 * djgpp/config.sed: Fixes required to run configure scripts generated
1635 by autoconf 2.62.
1636
1637 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1638
1639 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
1640 coordinator@translationproject.org.
1641
1642 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1643
1644 * THANKS: Add Eric Blake.
1645
1646 2008-04-23 Eric Blake <ebb9@byu.net>
1647
1648 Revert prior patch, by working around autoconf regression.
1649 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
1650 ("Output file name: ("): Uncomment test.
1651 ("Output file name: )"): Likewise.
1652 Based on an idea from Noah Misch.
1653
1654 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1655
1656 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
1657 2.61. Reported by Juan Manuel Guerrero at
1658 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
1659 * tests/output.at ("Output file name: ("): Comment out test case for
1660 now.
1661 ("Output file name: )"): Likewise.
1662
1663 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1664
1665 * GNUmakefile: Update git-version-gen invocation so make dist
1666 succeeds.
1667
1668 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1669
1670 Update to the current gnulib CVS repository, and fix trigraph handling
1671 in Bison.
1672 * bootstrap: Update gnulib CVS repository URL.
1673 (symlink_to_dir): Encapsulate the code that guarantees the destination
1674 directory exists into...
1675 (check_dst_dir): ... this new function, and...
1676 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
1677 fail when copying files into lib/uniwidth/.
1678 * src/output.c (prepare_symbols): When writing yytname muscles, where
1679 symbol names will be encoded in C-string literals, tell quotearg to
1680 escape trigraphs. This used to be the default in gnulib.
1681 * tests/regression.at (Token definitions): Because of the change in
1682 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
1683 escapes trigraphs in symbol names. Thus, yytname no longer has
1684 trigraphs unnecessarily doubly escaped. Update test case output.
1685 Extend test case to be sure Bison's own error messages will no longer
1686 have trigraphs in symbol names unnecessarily escaped once.
1687
1688 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1689
1690 Fix make dist infinite loop reported by Juan Manuel Guerrero at
1691 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
1692 * .cvsignore: Add .version.
1693 * .version.in: New.
1694 * bootstrap.conf (gnulib_modules): Add git-version-gen.
1695 * configure.ac (AC_CONFIG_FILES): Add .version.
1696 * build-aux/.cvsignore: Add git-version-gen.
1697
1698 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1699
1700 * NEWS (2.3a+): Mention that -g now takes an argument.
1701 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
1702 consistency. Update the -g and -x entries now that they take
1703 arguments. Use brackets to indicate optional arguments.
1704 * src/getargs.c (usage): Explain the relationship between arguments of
1705 long and short options more completely. Document --defines and -d
1706 separately since the former takes an argument but, for POSIX Yacc, the
1707 latter does not.
1708 (short_options): Let -W take an optional argument like --warnings.
1709 (getargs): Sort cases.
1710
1711 2008-02-28 Akim Demaille <demaille@gostai.com>
1712
1713 * doc/bison.texinfo: Fix a few typos.
1714
1715 2008-02-28 Akim Demaille <akim@epita.fr>
1716
1717 * doc/bison.texinfo (Bison Options): Document -W.
1718 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
1719
1720 2008-02-28 Akim Demaille <akim@epita.fr>
1721
1722 * src/getargs.c (short_options): Split and sort for readability.
1723 -g and -x take optional arguments, just like their long options.
1724 * build-aux/cross-options.pl: Use /x to make the regexp easier to
1725 understand.
1726 Fix the handling of $opt which resulted in all the argument to be
1727 considered as optional.
1728
1729 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1730
1731 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
1732 say its interface is experimental.
1733 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1734 Java.
1735 (Bison Options): In the -L and --language entry, mention Java.
1736 (Java Bison Interface): Say the interface is experimental.
1737 * src/getargs.c (usage): Mention -L and --language.
1738
1739 * NEWS (2.3a+): Say the push parsing interface is experimental.
1740 * doc/bison.texinfo (Push Decl): Likewise.
1741 (Decl Summary): Likewise in the "%define api.push_pull" entry.
1742 (Push Parser Function): Likewise.
1743 (Pull Parser Function): Likewise.
1744 (Parser Create Function): Likewise.
1745 (Parser Delete Function): Likewise.
1746 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
1747 yypull_parse, and yypush_parse entries.
1748
1749 * NEWS (2.3a+): Mention XML support, and say the schema is
1750 experimental.
1751 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
1752 * src/getargs.c (usage): Say the XML schema is experimental.
1753
1754 * NEWS (2.3a+): Say option instead of flag.
1755
1756 2008-02-21 Wojciech Polak <polak@gnu.org>
1757
1758 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
1759 text.
1760
1761 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
1762
1763 Fix impure push parser compile error reported by Bob Rossi at
1764 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
1765 * data/yacc.c: Clean up whitespace in the output a little.
1766 (yypstate_allocated): Define for impure push parsers regardless of
1767 whether the pull interface is also requested.
1768 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
1769 check impure push parsers without the pull interface.
1770
1771 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
1772 yyerror takes arguments specified by %parse-param while yypstate_new
1773 does not.
1774 * doc/bison.texinfo (Parser Create Function): Document that
1775 yypstate_new returns 0 for multiple impure parser instances.
1776 * tests/push.at (Push Parsing: Multiple impure instances): Update
1777 expected stderr output.
1778
1779 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1780
1781 * runtime-po/POTFILES.in (push.c): Remove.
1782
1783 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1784
1785 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
1786 * data/push.c: Rename to...
1787 * data/yacc.c: ... this, overwriting it.
1788 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
1789 `%push-pull-parser' -> `%define api.push_pull "both"'.
1790 Remove old yacc.c tests, and update push.c tests to yacc.c.
1791
1792 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1793
1794 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1795 `"%code top" blocks' instead of `%code "top" blocks'.
1796 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1797 Clean up whitespace in the output a little.
1798
1799 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1800
1801 Fix documentation problems reported by Tim Josling at
1802 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1803 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1804 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1805 integers. Explain the effect of literal string aliases on error
1806 messages. Copy token 0 documentation from the C++ skeleton
1807 documentation.
1808
1809 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1810
1811 Accept a token number in a %left, %right, or %nonassoc for POSIX
1812 conformance. Reported by Tim Josling at
1813 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1814 * NEWS (2.3a+): Mention.
1815 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1816 and code numbers are treated by precedence declarations.
1817 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1818 of symbols.1.
1819 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1820 of symbol.
1821 (symbol.prec): New, just like symbol but allows INT.
1822 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1823 longer holds.
1824 * tests/regression.at (Token number in precedence declaration): New
1825 test case.
1826
1827 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1828
1829 DJGPP specific issues.
1830 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1831 be changed. Copyright timestamp adjusted.
1832 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1833 be changed. Copyright timestamp adjusted.
1834 * djgpp/config.site: Copyright timestamp adjusted.
1835 * djgpp/config_h.sed: Copyright timestamp adjusted.
1836 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1837 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1838 filename translation list.
1839 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1840 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1841 files shall be created. Before trying to use the temp dir where the
1842 environment variable points to check that the dir really exists. If
1843 not default to the cwd as temp dir. Copyright timestamp adjusted.
1844 * djgpp/subpipe.h: Copyright timestamp adjusted.
1845 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1846
1847 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1848
1849 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1850
1851 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1852
1853 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1854 Problem reported by Claudio Saavedra in
1855 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1856
1857 2008-01-05 Wojciech Polak <polak@gnu.org>
1858
1859 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1860 document's title with the input grammar file name.
1861
1862 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1863
1864 Automate regression testing of the XML/XSLT implementation. Discussed
1865 starting at
1866 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1867 * configure.ac (XSLTPROC): New substitution.
1868 * Makefile.am (maintainer-xml-check): New phony target invoking...
1869 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1870 invoking make maintainer-check with BISON_TEST_XML=1.
1871 * tests/atlocal.in (XSLTPROC): New.
1872 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1873 not to report reachable memory when Bison is expected to have a
1874 non-zero exit status and (2) to compare XML/XSLT output with --graph
1875 and --report=all output for every working grammar when
1876 BISON_TEST_XML=1.
1877 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1878 (AT_BISON_CHECK_XML): New.
1879 (AT_QUELL_VALGRIND): New.
1880 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1881 (AT_CHECK): ... don't redefine this since this was the old way to
1882 quell Valgrind.
1883 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1884 AT_BISON_CHECK invocations.
1885 * tests/c++.at: Likewise.
1886 * tests/calc.at: Likewise.
1887 * tests/conflicts.at: Likewise.
1888 * tests/cxx-type.at: Likewise.
1889 * tests/existing.at: Likewise.
1890 * tests/glr-regression.at: Likewise.
1891 * tests/headers.at: Likewise.
1892 * tests/input.at: Likewise.
1893 * tests/java.at: Likewise.
1894 * tests/output.at: Likewise.
1895 * tests/push.at: Likewise.
1896 * tests/reduce.at: Likewise.
1897 * tests/regression.at: Likewise.
1898 * tests/sets.at: Likewise.
1899 * tests/skeletons.at: Likewise.
1900 * tests/synclines.at: Likewise.
1901 * tests/torture.at: Likewise.
1902 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1903 tends to hang xsltproc.
1904 (Big horizontal): Likewise.
1905
1906 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1907
1908 In XML output, remove redundant class attribute on symbol element.
1909 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1910 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1911 look up a symbol to determine whether it's a nonterminal or terminal.
1912 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1913 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1914
1915 Add prec/assoc information to XML output.
1916 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1917 %prec, add a percent_prec attribute.
1918 * src/print-xml.c (print_grammar): For each terminal that has a
1919 precedence or associativity, add a prec or assoc attribute.
1920 (xml_indent): New.
1921 (xml_puts): Use xml_indent.
1922 (xml_printf): Use xml_indent.
1923 * src/print-xml.h (xml_indent): Prototype.
1924
1925 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1926 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1927
1928 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1929
1930 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1931 (bison:ruleByNumber): ... this for clarity.
1932 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1933 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1934 (xsl:template match="reduction"): Update.
1935 (xsl:template match="item"): Update.
1936 (xsl:template match="reduction"): Update.
1937
1938 In the XML output, don't print the list of rules where symbols appear.
1939 Compute it in XSLT instead. Discussed at
1940 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1941 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1942 (bison:ruleByRhs): New.
1943 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1944 bison:ruleByRhs.
1945 (xsl:template match="terminal/rule"): Remove.
1946 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1947 bison:ruleByRhs.
1948 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1949 Remove.
1950 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1951 bison:ruleByRhs and mode="number-link" for rule template.
1952 (xsl:template match="terminal/rule"): Remove.
1953 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1954 bison:ruleByRhs and mode="number-link" for rule template.
1955 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1956 Rewrite as...
1957 (xsl:template match="rule" mode="number-link"): ... this.
1958 * src/print-xml.c (print_grammar): Don't print the list of rules.
1959
1960 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1961
1962 Don't let --report affect XML output; always print all information.
1963 Discussed at
1964 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1965 * src/conflicts.c (log_resolution): Implement.
1966 * src/print-xml.c (print_core): Implement.
1967 (print_state): Implement.
1968 (print_xml): Implement.
1969
1970 * NEWS (2.3a+): Fix quotes.
1971 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1972 don't let %verbose clear the list specified by --report.
1973
1974 2007-11-26 Akim Demaille <akim@epita.fr>
1975
1976 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1977
1978 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1979
1980 In the XML output, list useless and unused symbols and rules with the
1981 useful ones and add a "usefulness" attribute. Discussed starting at
1982 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1983 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1984 (grammar_rules_print_xml): Print all rules instead of just those
1985 useful in the grammar, and add a "usefulness" attribute.
1986 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1987 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1988 (print_grammar): Print all nonterminals instead of just useful ones,
1989 and add a "usefulness" attribute to nonterminals and terminals.
1990 (print_xml): Don't print a separate "reductions" or
1991 "rules-useless-in-parser" element.
1992 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1993 (reduce_xml): Remove.
1994 (reduce_token_unused_in_grammar): New.
1995 (reduce_nonterminal_useless_in_grammar): New.
1996 * src/reduce.h (reduce_xml): Remove prototype.
1997 (reduce_token_unused_in_grammar): Add prototype.
1998 (reduce_nonterminal_useless_in_grammar): Add prototype.
1999 * data/xslt/xml2text.xsl: Update for XML changes.
2000 * data/xslt/xml2xhtml.xsl: Update for XML changes.
2001 * tests/reduce.at (Useless Terminals): Update output.
2002 (Useless Rules): Update output.
2003 (Reduced Automaton): Update output.
2004
2005 Say "Terminals unused in grammar" instead of "Unused terminals".
2006 * NEWS (2.3a+): Update.
2007 * doc/bison.texinfo (Understanding): Update example output.
2008 * src/reduce.c (reduce_output): Implement.
2009 * data/xslt/xml2text.xsl: Implement.
2010 * data/xslt/xml2xhtml.xsl: Implement.
2011
2012 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2013
2014 Accept --report-file=FILE to override the default `.output' filename.
2015 * NEWS (2.3a+): Mention.
2016 * doc/bison.texinfo (Bison Options): Add an entry.
2017 * src/files.c (compute_output_file_names): Don't override
2018 spec_verbose_file if already set.
2019 * src/getargs.c (usage): Document --report-file.
2020 (REPORT_FILE_OPTION): New anonymous enum member.
2021 (long_options): Add entry for it.
2022 (getargs): Add case for it setting spec_verbose_file.
2023
2024 * build-aux/cross-options.pl: Don't record a short option just because
2025 there's an arg.
2026 * doc/.cvsignore: Add yacc.1.
2027
2028 2007-11-14 Akim Demaille <akim@epita.fr>
2029
2030 * doc/yacc.1.in: New.
2031 * configure.ac, doc/Makefile.am: Adjust.
2032 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
2033 config.h symbol.
2034 Use AC_SUBST for assignments too.
2035 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
2036
2037 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2038
2039 * src/gram.c: Remove comments that duplicate comments in gram.h.
2040
2041 When reporting useless rules and nonterminals, say "useless in grammar"
2042 instead of "useless", and say "useless in parser" instead of "never
2043 reduced". Discussed starting at
2044 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
2045 * NEWS (2.3a+): Mention this change.
2046 * data/xslt/xml2text.xsl: Update output text and expected input XML
2047 element names to match changes below.
2048 * data/xslt/xml2xhtml.xsl: Likewise.
2049 (xsl:template match="bison-xml-report"): Add missing entry in Table of
2050 Contents: "Rules useless in parser due to conflicts".
2051 * doc/bison.texinfo (Decl Summary): Reword a little.
2052 (Understanding): Update example output for changes below.
2053 * src/gram.c: (rule_useful_p): Rename to...
2054 (rule_useful_in_grammar_p): ... this.
2055 (rule_useless_p): Rename to...
2056 (rule_useless_in_grammar_p): ... this.
2057 (rule_never_reduced_p): Rename to...
2058 (rule_useless_in_parser_p): ... this.
2059 (grammar_rules_print): Update for renames.
2060 (grammar_rules_print_xml): Update for renames.
2061 (grammar_rules_never_reduced_report): Rename to...
2062 (grammar_rules_useless_report): ... this since it is used for either
2063 kind of useless rule.
2064 * src/gram.h: Reword comments and update function names in prototypes.
2065 * src/main.c (main): Say "rule useless in parser due to conflicts".
2066 * src/print-xml.c (print_rules_never_reduced): Rename to...
2067 (print_rules_useless_in_parser): ... this, and rename output XML
2068 element "rules-never-reduced" to "rules-useless-in-parser".
2069 (print_xml): Update for rename.
2070 * src/print.c (print_results): Say "Rules useless in parser due to
2071 conflicts".
2072 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
2073 (nonterminals_reduce): Say "nonterminal useless in grammar".
2074 (reduce_output): Say "Nonterminals useless in grammar".
2075 Say "Rules useless in grammar".
2076 (reduce_xml): Rename output XML element "useless" to
2077 "useless-in-grammar".
2078 (reduce_print): Don't report the count of grammatically useless rules
2079 as "rules never reduced" just because %yacc is specified.
2080 In the correct report of this count, say nonterminal(s) and rule(s)
2081 "useless in grammar".
2082 * tests/conflicts.at (S/R in initial): Update expected output.
2083 (Defaulted Conflicted Reduction): Likewise.
2084 (Unreachable States After Conflict Resolution): Likewise.
2085 * tests/existing.at (GNU pic Grammar): Likewise.
2086 * tests/reduce.at (Useless Nonterminals): Likewise.
2087 (Useless Rules): Likewise.
2088 (Reduced Automaton): Likewise.
2089 (Underivable Rules): Likewise.
2090 (Empty Language): Likewise.
2091
2092 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2093
2094 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
2095 here document and before the EOF so that BSD's implementation of Bourne
2096 shell doesn't parse the delimiter as part of the here document.
2097 * doc/.cvsignore: Add cross-options.texi.
2098 * src/getargs.c (usage): Add a blank line after the warning categories.
2099
2100 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
2101
2102 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
2103
2104 2007-11-05 Akim Demaille <akim@epita.fr>
2105
2106 Remove Id: from bison.1.
2107 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
2108 (perl -0777 -pi -e 's/\.PP\nId): New.
2109 (.x.1): Use it to ignore the version control revision.
2110
2111 2007-11-05 Akim Demaille <demaille@gostai.com>
2112
2113 * build-aux/Makefile.am: Ship cross-options.pl.
2114 * doc/Makefile.am: Always refer to cross-options.texi with
2115 $(srcdir).
2116 (MAINTAINERCLEANFILES): Add it.
2117
2118 2007-11-04 Akim Demaille <demaille@gostai.com>
2119
2120 Generate the long/short option cross-table.
2121 * build-aux/cross-options.pl: New.
2122 * doc/Makefile.am (cross-options.texi): New.
2123 * doc/bison.texinfo: Use it.
2124
2125 2007-11-04 Akim Demaille <demaille@gostai.com>
2126
2127 Generate bison.1 using help2man.
2128 * doc/common.x, doc/bison.x: New.
2129 * doc/Makefile.am (bison.1, .x.1): New.
2130 The code is taken from autoconf-2.61/man/Makefile.am.
2131 * configure.ac: Look for help2man.
2132
2133 2007-11-04 Akim Demaille <demaille@gostai.com>
2134
2135 Complete --help.
2136 * src/getargs.c (usage): Document -W, make it clear that -d,
2137 -g and -x have optional arguments.
2138
2139 2007-11-04 Akim Demaille <demaille@gostai.com>
2140
2141 Find sha1sum when named gsha1sum.
2142 * bootstrap (find_tool): New.
2143 ($SHA1SUM): New.
2144
2145 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2146
2147 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
2148 at
2149 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
2150 * NEWS (2.3a+): Mention.
2151 * data/bison.m4 (b4_pure_if): Don't define it here.
2152 * data/c.m4 (b4_identification): Depend on individual skeletons to
2153 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
2154 values of the %define variables api.pure or api.push_pull. Define
2155 YYPURE, YYPUSH, and YYPULL accordingly.
2156 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
2157 glr.cc has already defined b4_pure_flag.
2158 * data/push.c: Define b4_pure_if based on `%define api.pure'.
2159 Remove YYPUSH and YYPULL since they're back in b4_identification again.
2160 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
2161 * doc/bison.texinfo (Pure Decl): Update.
2162 (Push Decl): Update.
2163 (Decl Summary): Add api.pure to %define entry.
2164 In %pure-parser entry, say it's deprecated and reference %define.
2165 (Pure Calling): Update.
2166 (Error Reporting): Update.
2167 (C++ Scanner Interface): Update.
2168 (How Can I Reset the Parser): Update.
2169 (Table of Symbols): In %pure-parser entry, say it's deprecated and
2170 reference %define.
2171 * src/getargs.c (pure_parser): Remove global variable.
2172 * src/getargs.h (pure_parser): Remove extern.
2173 * src/output.c (prepare): Don't define pure_flag muscle.
2174 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
2175 wrapper around `%define api.pure'.
2176 * tests/calc.at (Simple LALR Calculator): Update.
2177 (Simple GLR Calculator): Update.
2178 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
2179 Update.
2180 (GLR: Resolve ambiguity, pure, locations): Update.
2181 (GLR: Merge conflicting parses, pure, no locations): Update.
2182 (GLR: Merge conflicting parses, pure, locations): Update.
2183 * tests/glr-regression.at (Uninitialized location when reporting
2184 ambiguity): Update
2185 * tests/input.at (Unused %define api.pure): New test case.
2186 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
2187 AT_PURE_IF and AT_PURE_AND_LOC_IF.
2188 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2189
2190 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2191
2192 %define push_pull -> %define api.push_pull. Discussed starting at
2193 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
2194 * data/push.c: Expect the new name.
2195 * data/yacc.c: Likewise.
2196 * doc/bison.texinfo (Push Decl): Update.
2197 (Decl Summary): Update %define entry.
2198 (Push Parser Function): Update.
2199 (Pull Parser Function): Update.
2200 (Parser Create Function): Update.
2201 (Parser Delete Function): Update.
2202 * tests/calc.at (Simple LALR Calculator): Update.
2203 * tests/input.at (%define enum variables): Update.
2204 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
2205 (Push Parsing: Multiple impure instances): Update.
2206 (Push Parsing: Unsupported Skeletons): Update.
2207 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
2208 (Exploding the Stack Size with Malloc): Update.
2209
2210 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
2211 other entries some.
2212
2213 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
2214
2215 For the XML output's terminal element, rename @number to @token-number,
2216 and add @symbol-number. In the nonterminal element, rename @number to
2217 @symbol-number. Discussed starting at
2218 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
2219 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
2220 renames.
2221 (xsl:template match="nonterminal"): Likewise.
2222 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
2223 (xsl:template match="nonterminal"): Likewise.
2224 * src/print-xml.c (print_grammar): Implement.
2225
2226 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2227
2228 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
2229 2007-10-11 change, the child elements here are items not rules.
2230 (xsl:template match="item"): New.
2231 (xsl:template match="rule"): Update for new reduced itemset.
2232 (xsl:template match="point"): Remove.
2233 (xsl:template match="empty"): For consistency with --graph, don't
2234 output "/* empty */".
2235 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
2236 line-wrap, don't pass a negative value as first-line-length since this
2237 won't work with the following changes.
2238 (xsl:template name="line-wrap"): Simplify slightly.
2239 (xsl:template name="ws-search"): Eliminate recursion.
2240 * src/print_graph.c (print_core): Don't print a reduction's lookahead
2241 set next to an item whose dot is not at the end of the RHS even if it
2242 happens to be associated with the same rule.
2243
2244 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2245
2246 Add %define lr.keep_unreachable_states.
2247 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
2248 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
2249 * src/main.c (main): Implement it.
2250 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2251 Extend to test it, and fix a typo.
2252
2253 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
2254
2255 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
2256 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
2257 the example .output text.
2258 * tests/regression.at (Extra lookahead sets in report): Improve wording
2259 of comments.
2260
2261 2007-10-17 Wojciech Polak <polak@gnu.org>
2262
2263 * src/print-xml.c (print_grammar): Renamed
2264 <terminal> and <nonterminal> attributes:
2265 "type" to "number" and "symbol" to "name".
2266 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
2267 Use new attribute names.
2268 (xsl:template match="nonterminal"): Likewise.
2269 * data/xslt/xml2xhtml.xsl: Likewise.
2270
2271 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
2272
2273 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
2274 (Option Cross Key): Likewise.
2275
2276 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
2277 next to an item whose dot is not at the end of the RHS even if it
2278 happens to be associated with the same rule.
2279 * src/print.c (print_core): Likewise.
2280 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
2281 (Resolved SR Conflicts): Update output.
2282 * tests/regression.at (Extra lookahead sets in report): New test case.
2283
2284 2007-10-11 Wojciech Polak <polak@gnu.org>
2285
2286 * src/print-xml.c (print_core): Remove item set
2287 redundancy.
2288 * data/xslt/bison.xsl (bison:ruleNumber): New key.
2289 Improve processing time. Suggested by Joel E. Denny.
2290 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
2291 Write xsl:param "required" attribute as comment.
2292 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
2293 (xsl:template match="rule"): Support new reduced itemset.
2294 (xsl:template match="point"): Remove.
2295 * data/xslt/xml2xhtml.xsl: Likewise.
2296
2297 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2298
2299 * src/getargs.c (version): Update copyright year.
2300
2301 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
2302
2303 Make xml2dot.xsl and --graph produce the same output.
2304 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
2305 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
2306 escaped later.
2307 (xsl:template name="output-node"): Use the new escape template instead
2308 of the string-replace template directly.
2309 (xsl:template name="output-edge"): Likewise.
2310 (xsl:template name="escape"): New, escapes backslashes and newlines in
2311 addition to quotation marks.
2312 * src/graphviz.c (start_graph, output_node, output_edge): Add
2313 whitespace to output for legibility.
2314
2315 Make xml2text.xsl and --report produce the same output, and remove the
2316 XML "conflicts" element since a conflict summary is easily extracted
2317 from the automaton.
2318 * data/xslt/bison.xsl: New.
2319 (xsl:template match="state" mode="bison:count-conflicts): New.
2320 * data/xslt/xml2text.xsl: Import bison.xsl.
2321 (xsl:template match="bison-xml-report"): Instead of styling the
2322 "conflicts" element, style the "automaton" element with mode
2323 "conflicts". Unlike the former, the latter lists S/R and R/R
2324 conflicts for a state on the same line.
2325 (xsl:template match="conflicts"): Remove.
2326 (xsl:template match="conflict"): Remove.
2327 (xsl:template match="terminal"): Line-wrap the list of rules in which
2328 the terminal is used.
2329 (xsl:template match="nonterminal"): Likewise for nonterminals.
2330 (xsl:template match="automaton" mode="conflicts"): New.
2331 (xsl:template match="state" mode="conflicts"): New.
2332 (xsl:template name="line-wrap"): New.
2333 (xsl:template name="ws-search"): New.
2334 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
2335 (xsl:template match="bison-xml-report"): Instead of styling the
2336 "conflicts" element, style the "automaton" element with mode
2337 "conflicts."
2338 (xsl:template match="conflicts"): Remove.
2339 (xsl:template match="conflict"): Remove.
2340 (xsl:template match="automaton" mode="conflicts"): New.
2341 (xsl:template match="state" mode="conflicts): New.
2342 * src/conflicts.c (conflicts_output_xml): Remove.
2343 * src/conflicts.h (conflicts_output_xml): Remove prototype.
2344 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
2345 * src/print.c (print_grammar): Consistently wrap at the 66th column so
2346 the corresponding XSLT is easier. Also, never wrap between a word and
2347 the comma that follows it.
2348
2349 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2350
2351 Improve C++ namespace support. Discussed starting at
2352 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
2353 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
2354 b4_namespace_close): New macros that interpret the %define variable
2355 "namespace" so its value can contain "::" to indicate nested
2356 namespaces.
2357 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
2358 the above macros.
2359 * data/lalr1.cc (b4_namespace): Likewise.
2360 * data/location.cc (b4_namespace): Likewise.
2361 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
2362 inside a new table in the general %define entry. Document `%define
2363 namespace' there as well. Point the %name-prefix entry to it since it
2364 explains it more completely in the case of C++.
2365 (C++ Bison Interface): Mention `%define namespace' instead of
2366 %name-prefix.
2367 (Table of Symbols): Remove the `%define push_pull' entry. The %define
2368 entry suffices.
2369 * tests/c++.at (Relative namespace references): New test case.
2370 (Absolute namespace references): New test case.
2371 (Syntactically invalid namespace references): New test case.
2372 * tests/input.at (C++ namespace reference errors): New test case.
2373
2374 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
2375
2376 Add syncline support and location accessor to internal %define
2377 interfaces.
2378 * data/bison.m4 (b4_percent_define_get_loc): New.
2379 (b4_percent_define_get_syncline): New.
2380 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
2381 (b4_percent_define_default): Record defining location as line 1 rather
2382 than 0 for the sake of synchronizing #line's, and define
2383 b4_percent_define_syncline(VARIABLE).
2384 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
2385 * src/muscle_tab.c (muscle_syncline_grow): New.
2386 (muscle_code_grow): Use muscle_syncline_grow.
2387 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
2388 define b4_percent_define_syncline(VARIABLE).
2389 (muscle_percent_define_get_loc): New.
2390 (muscle_percent_define_get_syncline): New.
2391 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
2392 remove some unused variables.
2393 (muscle_percent_define_default): Record defining location as line 1
2394 rather than 0 for the sake of synchronizing #line's, and define
2395 b4_percent_define_syncline(VARIABLE).
2396 (muscle_percent_define_check_values): Use
2397 muscle_percent_define_get_loc.
2398 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
2399 (muscle_percent_define_get_syncline): Prototype.
2400 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2401 defaults): Update output for location change.
2402 (Complaining during macro argument expansion): Extend to test
2403 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
2404
2405 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 Fix some error-reporting macro bugs.
2408 * data/bison.m4 (b4_cat): New.
2409 (b4_error, b4_error_at): Use b4_cat to send error directives directly
2410 to stdout so they don't become arguments to other macros. Update
2411 comments and add examples.
2412 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
2413 add examples.
2414 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
2415 after printing the error directive so that M4 doesn't report subsequent
2416 problems that are induced by this problem.
2417 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
2418 instead of just in them. Recognize @\n in both places. Both expand to
2419 the empty string. Needed by b4_cat.
2420 * tests/skeletons.at (Complaining during macro argument expansion):
2421 New test case.
2422 (Fatal errors make M4 exit immediately): New test case.
2423
2424 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
2425
2426 Implement --print-datadir.
2427 * src/getargs.c (usage): Mention.
2428 (PRINT_DATADIR_OPTION): New anonymous enum member.
2429 (long_options): Add entry for it.
2430 (getargs): Add case for it calling compute_pkgdatadir.
2431 * src/output.c (output_skeleton): Encapsulate data directory
2432 computation from here...
2433 (prepare): ... and from here...
2434 (compute_pkgdatadir): ... into this new function.
2435 * src/output.h (compute_pkgdatadir): Prototype.
2436
2437 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
2438
2439 * src/print-xml.c (escape_bufs): New static global variable
2440 replacing...
2441 (xml_escape_n): ... the static local variable buf here.
2442 (print_xml): Free memory for escape_bufs.
2443 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
2444
2445 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
2446
2447 Replace `%push-parser' and `%push-pull-parser' with
2448 `%define push_pull "push"' and `%define push_pull "both"'.
2449 `%define push_pull "pull"' is the default.
2450 * doc/bison.texinfo (Push Decl, Push Parser Function,
2451 Pull Parser Function, Parser Create Function, Parser Delete Function):
2452 Update declarations.
2453 (Decl Summary, Table of Symbols): Replace %push-parser and
2454 %push-pull-parser entries with a %define push_pull entry.
2455 * data/bison.m4 (b4_percent_define_check_values): New macro.
2456 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
2457 definitions...
2458 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
2459 definitions...
2460 * data/push.c: ... to here and compute them from the value of the
2461 %define variable push_pull.
2462 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
2463 parsing requests here...
2464 * data/yacc.c: ... hack this to switch to push.c any time
2465 b4_use_push_pull_flag or the %define variable push_pull is set. This
2466 will go away when we mv push.c yacc.c.
2467 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
2468 push parsing is not supported since unused %define variables are
2469 reported anyway.
2470 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
2471 * src/muscle_tab.h (muscle_percent_define_check_values): Update
2472 comments for consistency with b4_percent_define_check_values.
2473 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
2474 muscles.
2475 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
2476 Remove.
2477 (prologue_declaration): Remove %push-parser and %push-pull-parser
2478 rules.
2479 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
2480 * tests/calc.at: Update declarations.
2481 * tests/input.at (%define enum variables): New test case.
2482 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
2483 declaration.
2484 (Push Parsing: Multiple impure instances): Update declaration.
2485 (Push Parsing: Unsupported Skeletons): New test case.
2486 * tests/torture.at (Exploding the Stack Size with Alloca): Update
2487 declaration.
2488 (Exploding the Stack Size with Malloc): Update declaration.
2489
2490 2007-09-24 Wojciech Polak <polak@gnu.org>
2491
2492 Add XSLT transformations.
2493
2494 * data/xslt/xml2dot.xsl: Transform XML into DOT.
2495 * data/xslt/xml2text.xsl: Transform XML into plain text.
2496 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
2497 * data/Makefile.am (xsltdir): New variable.
2498 (dist_xslt_DATA): Add xslt/*.xsl files.
2499
2500 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
2503 Problem reported by Wojciech Polak.
2504 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
2505 (xml_printf): Undo change I made on 21 September; that is,
2506 indent 2 spaces, not 1.
2507
2508 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
2509
2510 Pacify ./configure --enable-gcc-warnings.
2511 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
2512 `char const *' instead of `char *'.
2513 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
2514 local variable `sep'.
2515
2516 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
2519 elsewhere.
2520 * src/print-xml.c: Prefer "const" after types; that's more consistent.
2521 (xml_printf): Indent just 1 space for level.
2522 (e_char, xlate_char): Remove.
2523 (xml_escape_string): Rewrite to avoid undefined behavior (used
2524 storage that was freed from the stack).
2525 (xml_escape_n): Don't bother checking for subscript error.
2526
2527 2007-09-21 Wojciech Polak <polak@gnu.org>
2528
2529 Add Bison XML Automaton Report.
2530
2531 Add support for an -x option to generate an XML report.
2532 It is not documented yet.
2533 * src/print-xml.c: New file.
2534 * src/print-xml.h: Likewise.
2535 * lib/timevar.def (TV_XML): New var.
2536 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
2537 * src/conflicts.c: Include print-xml.h.
2538 (solved_conflicts_xml_obstack): New var.
2539 (log_resolution, conflicts_solve, conflicts_free):
2540 Add support for XML report.
2541 (conflicts_output_val): New function.
2542 * src/conflicts.h (conflicts_output_val): New decl.
2543 * src/files.c (spec_xml_file): New var.
2544 (compute_output_file_names, output_file_names_free): Add XML support.
2545 * src/files.h (spec_xml_file): New decl.
2546 * src/getargs.c (xml_flag): New var.
2547 (usage, short_options, long_options, getargs): Add XML support.
2548 * src/getargs.h (xml_flag): New decl.
2549 * src/gram.c: Include print-xml.h.
2550 (rule_lhs_print_xml, rule_rhs_print_xml):
2551 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
2552 New functions.
2553 * src/gram.h: Declare external ones.
2554 * src/main.c: Include print-xml.h.
2555 (main): Add XML support.
2556 * src/reduce.c: Include print-xml.h.
2557 (reduce_xml): New function.
2558 * src/reduce.h: Declare it.
2559 * src/state.c: Include print-xml.h.
2560 (state_new): Add XML support.
2561 (state_rule_lookahead_tokens_print_xml): New function.
2562 * src/state.h: Declare it.
2563 (struct state): New member solved_conflicts_xml.
2564 * src/symtab.c (symbol_class_get_string): New function.
2565 * src/symtab.h: Declare it.
2566
2567 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
2568
2569 * GNUmakefile: Switch to coreutils's version.
2570 * bootstrap: Likewise.
2571 * Makefile.cfg: Adjust to new GNUmakefile.
2572 * README-hacking: Likewise.
2573
2574 Import from gnulib:
2575
2576 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
2577 Bruno Haible <bruno@clisp.org>
2578
2579 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2580 and is a script that invokes bison. Tighten the code. Add comments.
2581
2582 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
2583
2584 Spell "boolean" as "Boolean". Reported by Akim Demaille.
2585 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
2586 * doc/bison.texinfo (Decl Summary): Fix.
2587 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
2588 * tests/input.at (Boolean %define variables): Update output.
2589 * tests/skeletons.at (%define boolean variables: invalid skeleton
2590 defaults): Rename to...
2591 (%define Boolean variables: invalid skeleton defaults): ... this and
2592 update output.
2593
2594 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
2595
2596 In impure push mode, don't allow more than one yypstate to be allocated
2597 since multiple impure parsers would corrupt yynerrs.
2598 * data/push.c (yypstate_allocated): New static global variable
2599 initialized to 0.
2600 (yypull_parse): If yypstate_new returns 0, don't report it as memory
2601 exhaustion if yypstate_allocated is 1, but still return 2.
2602 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
2603 already 1. Otherwise, set it to 1.
2604 (yypstate_delete): Set it to 0.
2605 * tests/push.at (Push Parsing: Multiple impure instances): New test
2606 case.
2607
2608 2007-08-17 Bob Rossi <bob@brasko.net>
2609
2610 * doc/bison.texinfo (Push Decl): Document the push parser.
2611 (Table of Symbols): Ditto.
2612 (Pure Decl): Ditto.
2613 (Decl Summary): Ditto.
2614 (Multiple Parsers, Push Parser Function, Pull Parser Function,
2615 Parser Create Function, Parser Delete Function):
2616 Add new push parser symbols.
2617 (Table of Symbols): Document push-parser, push-pull-parser,
2618 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
2619
2620 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
2621
2622 Update to GPLv3.
2623 * doc/gpl-3.0.texi: New file.
2624 * doc/gpl.texi: Remove.
2625 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
2626 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
2627 * README-hacking, TODO, bootstrap, bootstrap.conf:
2628 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
2629 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
2630 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
2631 * data/lalr1.cc, data/lalr1.java, data/location.cc:
2632 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
2633 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
2634 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
2635 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
2636 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
2637 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
2638 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
2639 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
2640 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
2641 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
2642 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
2643 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
2644 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
2645 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
2646 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
2647 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
2648 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
2649 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
2650 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
2651 * src/complain.c, src/complain.h, src/conflicts.c:
2652 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
2653 * src/files.h, src/flex-scanner.h, src/getargs.c:
2654 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
2655 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
2656 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
2657 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
2658 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
2659 * src/print.c, src/print.h, src/print_graph.c:
2660 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
2661 * src/reduce.h, src/relation.c, src/relation.h:
2662 * src/revision.h, src/scan-code.h, src/scan-code.l:
2663 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
2664 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
2665 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
2666 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
2667 * tests/Makefile.am, tests/actions.at, tests/c++.at:
2668 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
2669 * tests/existing.at, tests/glr-regression.at:
2670 * tests/headers.at, tests/input.at, tests/java.at:
2671 * tests/local.at, tests/output.at, tests/push.at:
2672 * tests/reduce.at, tests/regression.at, tests/sets.at:
2673 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
2674 * tests/torture.at:
2675 Update to GPLv3.
2676
2677 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2678
2679 Get rid of broken %no-parser, -n, and --no-parser implementation and
2680 documentation.
2681 * TODO: Don't mention them.
2682 * doc/bison.1: Likewise.
2683 * doc/bison.texinfo (Decl Summary): Likewise.
2684 (Bison Options): Likewise.
2685 (Option Cross Key): Likewise.
2686 * src/getargs.c (no_parser_flag): Remove global variable.
2687 (usage): Don't print description of -n and --no-parser.
2688 (long_options): Remove --no-parser entry here.
2689 (getargs): Remove -n case in the switch here.
2690 * src/getargs.h (no_parser_flag): Remove extern.
2691 * tests/regression.at (Web2c Actions): Remove comment that mentions
2692 --no-parser.
2693
2694 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
2695
2696 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
2697 name user variables starting with `yy'. Just pass NULL instead of a
2698 dummy local &yylval to yypush_parse.
2699 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
2700 starting with `yy'.
2701
2702 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
2703
2704 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
2705 true since it's then always used regardless of whether yyoverflow is
2706 defined. Reported by Christian Burger at
2707 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
2708 * THANKS: Add Christian Burger.
2709
2710 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2711 node names: say "Decl Summary" not "Bison Declaration Summary".
2712
2713 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
2714
2715 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
2716 determine whether this function has already complained about an invalid
2717 value for a %define boolean variable, don't check whether Bison has
2718 ever examined the value. As written, the check was a tautology.
2719 Instead, record and check for this complaint using a separate muscle.
2720
2721 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2722
2723 Fix push parsing memory leak reported by Brandon Lucia at
2724 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
2725 * THANKS: Add Brandon Lucia.
2726 * data/push.c (yypstate_delete): Free the stack if it was reallocated
2727 but the parse never completed and thus freed it.
2728 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
2729 * tests/testsuite.at: Include push.at.
2730 * test/push.at: New.
2731 (Push Parsing: Memory Leak for Early Deletion): New test case.
2732
2733 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 Improve handling of multiple S/R conflicts in the same state and of S/R
2736 conflicts involving multiple reductions.
2737 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
2738 set for a state here or Bison will abort if it is reassigned on a
2739 later conflicted reduction in the same state.
2740 Similarly, don't finalize and assign the solved conflicts report here
2741 or it will be lost if it is reassigned on a later conflicted reduction
2742 in the same state.
2743 (set_conflicts): Instead, assign them both here after all S/R conflicts
2744 in the state have been fully examined.
2745 * src/print.c (shift_set): Rename to...
2746 (no_reduce_set): ... this.
2747 (print_reductions): Update for rename, and add %nonassoc error action
2748 tokens to no_reduce_set so that, when printing the first remaining
2749 reduction on an error action token, the reduction is enclosed in
2750 brackets.
2751 (print_results): Update for rename.
2752 * tests/conflicts.at (Solved conflicts report for multiple reductions
2753 in a state): New test case.
2754 (%nonassoc error actions for multiple reductions in a state): New test
2755 case.
2756
2757 * src/main.c (main): Don't depend on C99 features.
2758
2759 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2760
2761 * build-aux/.cvsignore: Add compile.
2762 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
2763 uniwidth.
2764
2765 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
2766
2767 * bootstrap (slurp): Create target directories that don't exist.
2768 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
2769
2770 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2771
2772 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
2773 than item number.
2774 * closure.c (closure): Likewise.
2775 * state.h (reductions): Comment sorting of rules.
2776 (state): Comment sorting of items.
2777
2778 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
2779
2780 Fix C++ test cases after recent Gnulib changes. Discussed starting at
2781 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
2782 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
2783 definition in order to avoid Gnulib headers since we don't use config.h
2784 here.
2785 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
2786 rather than AT_DATA so that config.h is included.
2787
2788 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
2789
2790 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
2791 instead of fprintf. Guard these functions with #if YYDEBUG instead of
2792 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2793 and so that YYFPRINTF is guaranteed to be defined here.
2794
2795 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2796
2797 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2798 with...
2799 (muscle_percent_define_check_values): ... this more helpful function.
2800 Again, it's not used yet, but it will be.
2801 * src/muscle_tab.h: Likewise.
2802
2803 Improve some comments in parser table construction.
2804 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2805 (generate_states): Don't mention ruleset, which is internal to closure.
2806 * src/closure.c (closure): Explain sorting of core and itemset, which
2807 is required for this function to behave correctly.
2808 * src/closure.h (closure): Mention sorting.
2809
2810 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2811
2812 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2813 move the check for disabled transitions to an aver since conflict
2814 resolution hasn't happened yet.
2815
2816 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2817 labels a state as inconsistent just because it has error transitions.
2818 The original form of this check appeared in revision 1.1 of lalr.c,
2819 which was committed on 1991-12-21. Now (at least), changing the
2820 consistency label on such a state appears to have no useful effect in
2821 any of the places it is examined, which I enumerate below. The key
2822 point to understanding each item in this enumeration is that a state
2823 with an error transition is labelled consistent in the first place only
2824 if it has no rules, so the check cannot matter for states that have
2825 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2826 to try to identify its conflicts, and a state must have *rules* to have
2827 conflicts. (2) Labelling a state as inconsistent will affect how
2828 action_row sets the default *rule* for the state. (3) Labelling a
2829 state as inconsistent will cause build_relations to add lookback edges
2830 to *rules* in that state.
2831 * src/state.h (struct state): Word the comment for member consistent
2832 more carefully.
2833
2834 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2835
2836 Don't depend on C99 features.
2837 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2838 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2839 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2840 * src/state.c (state_mark_reachable_states): Fix for-loop.
2841 (state_remove_unreachable_states): Fix for-loop.
2842
2843 Don't widen struct state with member reachable just to temporarily
2844 record reachability. Instead, use a local bitset.
2845 * src/state.h (struct state): Remove member.
2846 * src/state.c (state_new): Don't initialize it.
2847 (state_mark_reachable_states): Rename to...
2848 (state_record_reachable_states): ... this, and use bitset.
2849 (state_remove_unreachable_states): Use bitset.
2850
2851 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2852
2853 * src/Makefile.am (yacc): Quote target action commands properly so
2854 that the yacc script isn't corrupt. Reported by Hans Aberg at
2855 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2856
2857 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2858 the case of pure parsers. Reported by Frans Englich at
2859 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2860 * THANKS: Add Frans Englich.
2861
2862 * NEWS (2.3a+): In the %code entry, reference section `Bison
2863 Declaration Summary' from the manual now since the %code summary has
2864 moved there.
2865 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2866 in the rules section must be terminated by semicolons.
2867
2868 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2869
2870 Extend the front-end API for %define variables to more completely
2871 mirror the back-end. This will be useful in the future.
2872 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2873 Update comments to mention the new front-end counterparts of these
2874 macros.
2875 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2876 for muscle_string_decode and muscle_location_decode.
2877 (muscle_string_decode): New static function.
2878 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2879 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2880 functions.
2881 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2882 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2883 implementation more closely.
2884 (muscle_percent_define_invalid_value): New function.
2885 * src/muscle_tab.h (muscle_percent_define_get,
2886 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2887 Prototype.
2888
2889 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2890
2891 * NEWS (2.3a+): Mention yesterday's state-removal change.
2892 (2.3a): Remove the %language entry, which was added after 2.3a.
2893 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2894 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2895 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2896 tests/existing.at: Update copyright date.
2897
2898 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2899
2900 If conflict resolution makes states unreachable, remove those states,
2901 report rules that are then unused, and don't report conflicts in those
2902 states.
2903 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2904 New global function.
2905 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2906 function.
2907 * src/main.c (main): After conflict resolution, remove the unreachable
2908 states and update all data structures that reference states by number.
2909 * src/state.c (state_new): Initialize each state's reachable member to
2910 false.
2911 (state_mark_reachable_states): New static function.
2912 (state_remove_unreachable_states): New global function.
2913 * src/state.h (struct state): Add member bool reachable.
2914 (state_remove_unreachable_states): Prototype.
2915 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2916 New test case.
2917 * tests/existing.at (GNU pic Grammar): Update test case output now that
2918 an unused rule is discovered.
2919
2920 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2921
2922 Minor code cleanup in parser table construction.
2923 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2924 (new_itemsets, save_reductions): Update for rename to nitemset.
2925 * src/closure.c (nritemset): Rename to...
2926 (nitemset): ... this since the "r" appears to meaningless and isn't
2927 used in the comments.
2928 (closure): Update for rename.
2929 * src/closure.h (nritemset): Update extern to...
2930 (nitemset): ... this.
2931 * src/lalr.c (LA): Fix a typo in comments.
2932 * src/print.c (print_core): Update for rename to nitemset.
2933 * src/print_graph.c (print_graph): Likewise.
2934 * src/state.h: Fix some typos in header comments.
2935
2936 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2937
2938 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2939 still sticks to ASCII. Sorry!
2940
2941 * README-hacking: New file, taken mostly from coreutils, with changes
2942 for Bison. Contains much of the contents of:
2943 * README-cvs: Remove.
2944 * bootstrap: Sync from gnulib.
2945 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2946 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2947
2948 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2949
2950 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2951 Setzer.
2952 (Java Differences): Fix some typos.
2953 * THANKS: Add Sebastian Setzer.
2954
2955 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
2956
2957 * data/java.m4 (b4_single_class_if): Remove.
2958 (b4_abstract_if): Look at "%define abstract".
2959 (b4_lexer_if): New.
2960 (b4_union_name): Rename...
2961 (b4_yystype): ... to this. Map to "%define stype".
2962 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2963 b4_maybe_throws): Fix quoting.
2964 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2965 * data/lalr1.java (Lexer interface): Always define.
2966 (Lexer interface within parser class): Remove.
2967 (YYLexer class): New, used when "%code lexer" is present.
2968 (constructor): When "%code lexer" is used, pass %lex-param
2969 to the lexer constructor.
2970 (yylex, yyparse): Remove %lex-param from method invocations
2971 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2972
2973 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2974 abstract". Rename "%define union_name" to "%define stype".
2975 Rename method names according to previous patch.
2976 (Java Scanner Interface): Describe "%code lexer" instead of
2977 "%pure-parser" and "%define single_class".
2978 (Java Differences): Mention "%code lexer".
2979
2980 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2981 Include scanner here, using macros from tests/local.at.
2982 (AT_DATA_CALC_Y): Remove final argument.
2983 (_AT_CHECK_JAVA_CALC): Likewise.
2984 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2985 of %locations and %error-verbose.
2986 (main): Test with and without %lex-param.
2987 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2988 (AT_BISON_OPTION_POPDEFS): Pop it.
2989
2990 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2991
2992 DJGPP spefic issue. Inhibit the use of disallowed characters for
2993 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2994 and concern testsuite case 46.
2995 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2996 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2997 * djgpp/config.bat: Inhibit the use of disallowed characters.
2998
2999 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3000
3001 Miscellaneous %define and %code cleanup.
3002 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
3003 values are interpreted.
3004 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
3005 documentation a little more.
3006 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
3007 muscle_percent_define_insert, muscle_percent_code_grow): New
3008 functions/macros.
3009 * src/muscle_tab.h (muscle_percent_define_insert,
3010 muscle_percent_code_grow): Prototype.
3011 * src/parse-gram.y (prologue_declaration): Use
3012 muscle_percent_define_insert and muscle_percent_code_grow when parsing
3013 %define and %code directives.
3014
3015 Make it easy to share %define boolean variables between the front-end
3016 and back-end. Though not used yet, this will be useful in the future.
3017 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
3018 Bison uses of names rather than just skeleton uses of names.
3019 (b4_percent_define_get, b4_percent_define_ifdef): Rename
3020 b4_percent_define_skeleton_variables(VARIABLE) to
3021 b4_percent_define_bison_variables(VARIABLE).
3022 (b4_percent_code_get, b4_percent_code_ifdef): Rename
3023 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
3024 b4_percent_code_bison_qualifiers(QUALIFIER).
3025 (b4_check_user_names_wrap): Update for renames.
3026 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
3027 muscle_percent_define_default): New functions mimicking
3028 b4_percent_define_flag_if and b4_percent_define_default.
3029
3030 For %define variables, report locations for invalid values and
3031 redefinitions.
3032 * data/bison.m4 (b4_percent_define_flag_if): Read
3033 b4_percent_define_loc(VARIABLE) to report the location of an invalid
3034 value for VARIABLE.
3035 (b4_percent_define_default): Save a special location in
3036 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
3037 must later be reported as invalid.
3038 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
3039 functions.
3040 (muscle_percent_define_insert): Record the location of VARIABLE in
3041 muscle percent_define_loc(VARIABLE), and use it to report the previous
3042 location for a redefinition.
3043 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
3044 (muscle_percent_define_default): Update like b4_percent_define_default.
3045 (muscle_grow_user_name_list): Rename to...
3046 (muscle_user_name_list_grow): ... this for consistency and use
3047 muscle_location_grow.
3048 * src/muscle_tab.h (muscle_location_grow): Prototype.
3049 * tests/input.at (%define errors): Update expected output.
3050 * tests/skeletons.at (%define boolean variables: invalid skeleton
3051 defaults): New test case.
3052
3053 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
3054
3055 * src/print.c (lookahead_set, state_default_rule): Remove.
3056 (print_reductions): Replace state_default_rule invocation with
3057 equivalent use of yydefact, which was computed in token_actions in
3058 tables.c.
3059 (print_results): Don't allocate lookahead_set.
3060
3061 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
3062
3063 * data/lalr1.java: Prefix all private members with yy.
3064
3065 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
3066
3067 Use YYFPRINTF instead of fprintf where appropriate. Reported by
3068 Sebastien Fricker at
3069 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
3070 * THANKS: Add Sebastien Fricker.
3071 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
3072 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
3073 accept a variable number of arguments.
3074
3075 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3076
3077 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
3078
3079 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3080
3081 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
3082 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
3083 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
3084
3085 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
3086
3087 Undo my 2007-02-07 change, switching back to the c-strcase module
3088 introduced in the 2007-02-03 change. Bruno Haible reported that
3089 the 2007-02-07 change would be dangerous in Turkish if we add a
3090 language whose name contains "i", since "i" is not lowercase "I"
3091 in Turkish.
3092 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
3093 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
3094 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
3095 * m4/.cvsignore: Remove strcase.m4.
3096 * src/getargs.c: Revert 2007-02-07 change, as follows.
3097 Include c-strcase.h.
3098 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
3099
3100 2007-02-11 Bruno Haible <bruno@clisp.org>
3101
3102 Enable the Java related testsuite tests when the only Java compiler
3103 found is a gcj < 4.3. Discussed at
3104 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
3105 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
3106
3107 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
3108
3109 * data/Makefile.am: Update copyright date.
3110 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
3111 yypstate_new returns NULL.
3112 (yypstate_new): Return NULL if malloc does.
3113 * src/reader.c (packgram): Move translation of rule actions from the
3114 beginning of packgram to...
3115 (check_and_convert_grammar): ... here right before packgram is invoked
3116 so it's easier to write more complete comments, and remove redundant
3117 code.
3118
3119 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
3120
3121 As in semantic actions, make @$ in %initial-action, %destructor, and
3122 %printer imply %locations.
3123 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
3124 scanning @$.
3125 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
3126 (@$ in %initial-action implies %locations,
3127 @$ in %destructor implies %locations,
3128 @$ in %printer implies %locations): ... these new test cases.
3129
3130 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
3131
3132 Undo most of the 2007-02-03 change, switching to the strcase module
3133 now that gnulib strcase has been fixed.
3134 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
3135 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
3136 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
3137 * m4/.cvsignore: Add strcase.m4.
3138 * src/getargs.c: Revert 2007-02-03 change, as follows.
3139 Don't include c-strcase.h.
3140 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
3141 strcasecmp has "unspecified behavior" outside the POSIX locale,
3142 but it works fine in practice if at least one argument is ASCII,
3143 as is the case in Bison.
3144
3145 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
3146
3147 * tests/java.at: Skip tests if only one of javac/java is present.
3148 Reported by Joel E. Denny.
3149 * tests/atlocal.in: Adjust copyright years.
3150
3151 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3152
3153 * data/lalr1.java (Stack): Work around old verifiers that disallow
3154 access to the private fields of an inner class, from the outer class.
3155 We can make Stack's fields public because user code doesn't have access
3156 to the instance of Stack used by parse(). Reported by Paul Eggert.
3157
3158 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
3159
3160 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
3161 the right spot for these files?
3162 * bootstrap.conf (gnulib_modules): Add c-strcase.
3163 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
3164 c-strncasecmp.c.
3165 * src/getargs.c: Include c-strcase.h.
3166 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
3167 to avoid unspecified behavior.
3168
3169 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
3170
3171 * doc/bison.texinfo (Decl Summary): Correct typo.
3172
3173 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
3174
3175 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
3176 Complain if the value does not match empty, "true" or "false".
3177 * data/c++.m4: Adjust default definitions of %define variables.
3178 * data/java.m4: Adjust default definitions of %define variables.
3179 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
3180 to above behavior.
3181 * tests/input.at (Boolean %define variables): Test new behavior.
3182
3183 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
3184
3185 * NEWS: Mention java.
3186 * TODO: Remove things that are done.
3187 * bootstrap.conf: Add javacomp-script and javaexec-script.
3188 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
3189
3190 * data/Makefile.am: Add new files.
3191 * data/java-skel.m4: New.
3192 * data/java.m4: New.
3193 * data/lalr1.java: New.
3194
3195 * doc/bison.texinfo: Put "A Complete C++ Example" under
3196 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
3197 under Other Languages.
3198
3199 * src/getargs.c (valid_languages): Add Java.
3200 * src/getargs.h (struct bison_language): Update size of string fields.
3201
3202 * tests/Makefile.am: Add java.at.
3203 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
3204 * tests/java.at: New.
3205 * tests/testsuite.at: Include it.
3206
3207 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
3208
3209 Clean up.
3210 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
3211 at_directive_argv arguments so these no longer have to be global
3212 variables. Also, update the implementation for the following changes.
3213 (fail_for_at_directive_too_many_args,
3214 fail_for_at_directive_too_few_args): Add at_directive_name argument.
3215 (at_directive_name): Remove as at_directive_argv[0] will be used for
3216 this now.
3217 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
3218 for the directive name.
3219 (at_directive_argc, at_directive_argv): Make these local within
3220 skel_lex instead of global.
3221 (INITIAL): Update directive start action for above changes.
3222 (SC_AT_DIRECTIVE_ARG): Rename to...
3223 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
3224 (SC_AT_DIRECTIVE_SKIP_WS): Update.
3225 (scan_skel): Move yylex_destroy to...
3226 (skel_scanner_free): ... here.
3227 * tests/skeletons.at (installed skeleton file name): Rename to...
3228 (installed skeleton file names): ... this.
3229
3230 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
3231
3232 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3233 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
3234 Summary" not "Directives".
3235 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
3236 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
3237 since the former is now the more complete one.
3238 (Prologue Alternatives): Likewise and do the same for %defines.
3239 (Table of Symbols): Add summary of %code, add summary of %define, and
3240 move full %code documentation to...
3241 (Decl Summary): ... here for consistency with other entries in these
3242 sections.
3243 Move %define entry in order to keep this list alphabetized.
3244 Reword %define entry a little to put less emphasis on the skeleton
3245 concept, which most users shouldn't have to think about.
3246
3247 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
3248
3249 Adjust to recent gnulib changes.
3250 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
3251 Add string.h, string_.h, unistd_.h, wchar_.h.
3252 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
3253 * src/system.h: Don't include <stpcpy.h>; this is now done by
3254 <string.h>.
3255
3256 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
3257
3258 Simplify implementation of unqualified %code, implement macros for
3259 uniform treatment of boolean %define flags. Document %define.
3260 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
3261 b4_percent_code_ifdef): New.
3262 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
3263 * data/c++.m4: Define default value for global_tokens_and_yystype.
3264 * data/glr.cc: Likewise.
3265 * data/location.cc: Use b4_percent_define_flag_if.
3266
3267 * doc/bison.texinfo (Decl Summary): Document %define.
3268
3269 * src/parse-gram.y (Unqualified %code): Change muscle name to
3270 b4_percent_code().
3271 (content.opt): Default to empty.
3272
3273 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3274
3275 Implement support for relative and absolute skeleton file names.
3276 Discussed starting at
3277 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
3278 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
3279 (Bison Options): Document in --skeleton entry.
3280 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
3281 full_skeleton can't necessarily hold all of pkgdatadir.
3282 If the specified skeleton file name contains a `/', don't prepend
3283 pkgdatadir.
3284 * src/parse-gram.y (prologue_declaration): If the specified skeleton
3285 file name contains a `/', prepend the grammar file directory.
3286 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
3287 * skeletons.at: New file.
3288 (relative skeleton file names): New test case.
3289 (installed skeleton file names): New test case.
3290 * tests/testsuite.at: Include skeletons.at.
3291
3292 * bootstrap: Update copyright to 2007.
3293
3294 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
3295
3296 * bootstrap: Remove occurrences of .#bootmp from the files.
3297
3298 2007-01-17 Akim Demaille <akim@epita.fr>
3299
3300 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
3301 nonterminals.
3302 Use per-type %printer.
3303
3304 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
3305
3306 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
3307 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3308 djgpp/config.site, src/files.c, src/files.h, src/main.c,
3309 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
3310 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
3311 tests/glr-regression.at, tests/input.at, tests/local.at,
3312 tests/output.at, tests/torture.at: Update copyright to 2007.
3313
3314 2007-01-16 Akim Demaille <akim@epita.fr>
3315
3316 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
3317 error code.
3318 (Calc++ Scanner): Exit with failure if we can't open the input
3319 file.
3320 Accept "-" standing for stdin.
3321 (Calc++ Top Level): Print the result only if the parsing was
3322 successful.
3323
3324 2007-01-16 Akim Demaille <akim@epita.fr>
3325
3326 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
3327
3328 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
3329 and Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 Clean up %define and %code implementation in M4 some. Most
3332 importantly, rename all related macros to be in the b4_percent_define
3333 and b4_percent_code namespaces. Also, complete support for `.' in
3334 %define variable names and %code qualifiers.
3335 * data/bison.m4 (b4_check_user_names): Check for special
3336 "SKELETON-NAMESPACE(name)" macros instead of using two nested
3337 m4_foreach loops.
3338 (b4_get_percent_define, b4_get_percent_code): Rename to...
3339 (b4_percent_define_get, b4_percent_code_get): ... these.
3340 Extend documentation with examples.
3341 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
3342 b4_percent_define_skeleton_variables and
3343 b4_percent_code_skeleton_qualifiers.
3344 Expect any value for the %define variable `foo' to be stored in the
3345 macro named `b4_percent_define(foo)'; expect any %code blocks for the
3346 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
3347 expect any unqualified %code blocks to be stored in a macro named
3348 `b4_percent_code_unqualified'.
3349 Use m4_indir so that %define variable names and %code qualifiers can
3350 contain `.', which is allowed by the grammar parser.
3351 (b4_percent_define_default): New macro to set a default value for a
3352 %define variable.
3353 (m4_wrap): Update wrapped code, and fix some underquoting.
3354 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
3355 Expect grammar uses of %define variables and %code qualifiers to be
3356 defined in b4_percent_define_user_variables and
3357 b4_percent_code_user_qualifiers.
3358 * data/c++.m4: Use b4_percent_define_default rather than
3359 m4_define_default. Fix some underquoting. Skeleton usage of %define
3360 variable define_location_comparison now implies skeleton usage of
3361 %define variable filename_type.
3362 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3363 data/push.c, data/yacc.c: Update macro names.
3364 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
3365 muscle names.
3366
3367 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3368
3369 DJGPP specific issues.
3370
3371 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
3372 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
3373
3374 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3375
3376 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
3377 run parsers in all tests so that Valgrind is invoked during
3378 maintainer-check-valgrind.
3379 (Duplicate representation of merged trees): Free all semantic values.
3380 (Duplicated user destructor for lookahead): Likewise.
3381
3382 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3383
3384 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
3385 command-line prefix.
3386 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
3387 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
3388 miss Valgrind messages.
3389 (Exploding the Stack Size with Malloc): Likewise.
3390
3391 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
3392
3393 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
3394 locals. Reported by Juan Manuel Guerrero at
3395 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
3396 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
3397 Fix some indentation also.
3398 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
3399 explaining this issue.
3400
3401 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
3402 and Joel E. Denny <jdenny@ces.clemson.edu>
3403
3404 Simplify union and prologue handling, and escape union and lex/parse
3405 params with digraphs.
3406 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
3407 values to the empty string since these are no longer guaranteed
3408 initialized by the front-end.
3409 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
3410 braces around b4_user_stype since this is no longer done by the
3411 front-end.
3412 * src/files.c, src/files.h (pre_prologue_obstack,
3413 post_prologue_obstack): Remove.
3414 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
3415 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
3416 with digraphs. This fixes lex params and parse params.
3417 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
3418 * src/output.c (prepare): Remove muscle insertion of the prologues.
3419 (output): Remove freeing of pre_prologue_obstack and
3420 post_prologue_obstack.
3421 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
3422 than prologue_augment for prologue parsing so you don't need prologue
3423 obstacks.
3424 (grammar_declaration): For %union RHS, use `braceless' instead of
3425 "{...}" so that braces are already stripped and code is escaped with
3426 digraphs.
3427 * src/reader.c (prologue_augment): Remove.
3428 (reader): Remove initialization of pre_prologue_obstack and
3429 post_prologue_obstack.
3430 * src/reader.h (prologue_augment): Remove.
3431
3432 * data/c.m4: Remove stray parenthesis.
3433
3434 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3435
3436 Remove quotes from variables names in %define directives and from
3437 qualifiers in %code directives, and restrict the characters that are
3438 allowed in them to M4-friendly ones. For %define, continue to support
3439 the quoted form as a deprecated feature. Discussed starting at
3440 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
3441 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
3442 %code.
3443 * doc/bison.texinfo (Prologue Alternatives): Update.
3444 (Decl Summary): In %defines entry, update mention of `%code requires'
3445 and `%code provides'.
3446 (C++ Location Values): Update %define uses.
3447 (Calc++ Parser Interface): Likewise.
3448 (Calc++ Parser): Likewise, and update `%code requires' uses.
3449 (Table of Symbols): Update %code documentation.
3450 * src/parse-gram.y (prologue_declaration): For %define variables, use
3451 `variable' instead of `STRING'.
3452 (grammar_declaration): For %code qualifiers, use `ID' instead of
3453 `STRING'.
3454 (variable): New nonterminal that takes an `ID' or a `STRING'.
3455 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
3456 and %define uses.
3457 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
3458 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
3459 (%define errors): Update %define uses.
3460
3461 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
3464 instead of muscle_insert for %define values so that M4-special
3465 characters are replaced with digraphs.
3466 * tests/input.at (%define errors): Extend to check weird values.
3467
3468 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3469
3470 Instead of having skeletons declare all valid %define variables and
3471 %code qualifiers, provide macros that retrieve the associated values
3472 and build these lists automatically. Thus Bison will now warn when a
3473 variable or qualifier is not used by the skeleton in the current
3474 invocation regardless of whether it might sometimes be used by that
3475 skeleton in other invocations. Also, move all %define value macros to
3476 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
3477 form, which is replaced by %code.
3478 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
3479 (b4_check_user_names): ... this, and change the series of valid name
3480 arguments to a single list argument for names used in the skeleton
3481 similar to the existing list argument for names used in the grammar.
3482 Warn instead of complaining.
3483 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
3484 values and %code code, to format %code code properly, and to build
3485 lists of all %define variables and %code qualifiers used in the
3486 skeleton: b4_skeleton_percent_define_variables and
3487 b4_skeleton_percent_code_qualifiers.
3488 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
3489 Remove, and...
3490 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
3491 the skeleton names lists can finish building first. In place of
3492 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
3493 expect the lists b4_user_percent_define_variables and
3494 b4_user_percent_code_qualifiers.
3495 * data/c++.m4: Where setting default values for b4_parser_class_name,
3496 b4_location_type, b4_filename_type, b4_namespace, and
3497 b4_define_location_comparison, update their names to the
3498 b4_percent_define_ namespace.
3499 * data/glr.c: Don't use b4_check_percent_define_variables and
3500 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3501 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
3502 (b4_parser_class_name, b4_namespace): Define these using
3503 b4_get_percent_define for parser_class_name and namespace.
3504 * data/location.cc: Use b4_get_percent_define.
3505 * data/push.c: Don't use b4_check_percent_define_variables and
3506 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
3507 * data/yacc.c: Likewise, and don't call m4_exit in
3508 b4_use_push_for_pull_if or m4_wrap code will never execute.
3509 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
3510 Rename to...
3511 (muscle_grow_user_name_list): ... this for consistency with the
3512 terminology used in bison.m4.
3513 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
3514 %define variable names, and rename muscle used_percent_define_variables
3515 to user_percent_define_variables.
3516 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
3517 user_percent_code_qualifiers.
3518 (content): Remove.
3519 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
3520 {CODE} form is no longer accepted.
3521 * tests/input.at (Reject bad %code qualifiers): Rename to...
3522 (Reject unused %code qualifiers): ... this, and update test output.
3523 (%define error): Update test output.
3524
3525 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 Check for unrecognized %define variables similar to checking for
3528 unrecognized %code qualifiers. Check for redefined %define variables.
3529 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
3530 generalizes...
3531 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
3532 (b4_check_percent_define_variables): New, also wraps it.
3533 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
3534 variables using b4_check_percent_define_variables.
3535 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
3536 all those exercised in the test suite and all those listed in the
3537 `Default values' section of c++.m4. Are there others?
3538 * data/push.c, data/yacc.c: Declare no valid %define variables.
3539 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
3540 similar to muscle_find, but it works even when the muscle stores a
3541 const value.
3542 (muscle_grow_used_name_list): New function for constructing the used
3543 name list muscles that b4_check_for_unrecognized_names requires.
3544 * src/parse-gram.y (prologue_declaration): Warn if a variable is
3545 %define'd more than once. Define the b4_used_percent_define_variables
3546 muscle with muscle_grow_used_name_list.
3547 (grammar_declaration): Abbreviate %code code with
3548 muscle_grow_used_name_list.
3549 * tests/input.at (%define errors): New.
3550
3551 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3552
3553 Provide warn_at, complain_at, and fatal_at function callbacks to the
3554 skeletons, and use this for %code qualifier complaints.
3555 * data/bison.m4 (b4_error_at): New, invoked by...
3556 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
3557 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
3558 @fatal_at(...@) directives.
3559 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
3560 qualifiers in b4_used_percent_code_qualifiers and to use
3561 b4_complain_at.
3562 * src/location.c, src/location.h (boundary_set_from_string): New global
3563 function.
3564 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
3565 function.
3566 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
3567 to b4_used_percent_code_qualifiers.
3568 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
3569 function.
3570 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
3571 (lineno): Rename to...
3572 (out_lineno): ... this so I don't misunderstand it again.
3573 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
3574 here; these newlines are in the input but not the output file.
3575 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
3576 (at_directive_perform): ... this new static function, and add handling
3577 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
3578 directives.
3579 * tests/input.at (Reject bad %code qualifiers): Update test output with
3580 locations and extend.
3581
3582 * tests/output.at (Output file name: [, Output file name: ]): Remove
3583 bogus comment about these tests failing.
3584
3585 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3586
3587 Clean up b4_check_percent_code_qualifiers a little.
3588 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
3589 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
3590 documentation and add examples.
3591 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
3592 qualifiers here.
3593
3594 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3595
3596 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
3597 unreliable -- especially when they're hidden inside another macro.
3598 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
3599 data/c.m4: Remove m4_divert(-1).
3600 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
3601 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
3602 m4_divert_push(0) and m4_divert_pop(0).
3603 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
3604 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
3605 pushed and popped by m4sugar, should be first on the stack.
3606
3607 Provide warn, complain, and fatal function callbacks to the skeletons.
3608 This provides more flexibility than m4_fatal, improves the error
3609 message format, and captures messages for translation. Discussed
3610 starting at
3611 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
3612 * data/bison.m4 (b4_error): New, invoked by...
3613 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
3614 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
3615 directives. Because these M4 macros might be called when the current
3616 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
3617 the previous removal of uses of m4_divert, which caused trouble.
3618 (b4_check_percent_code_qualifiers): Use b4_complain instead of
3619 m4_fatal to report unrecognized %code qualifiers.
3620 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
3621 push parser requests.
3622 * data/glr.c: Use b4_complain instead of m4_fatal to report
3623 non-deterministic push parser requests.
3624 Update @output usage to @output(...@) form.
3625 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
3626 report missing %defines. Update @output usage to @output(...@) form.
3627 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
3628 @output(...@) form.
3629 * src/main.c (main): Invoke skel_scanner_free.
3630 * src/scan-skel.h (skel_scanner_free): Prototype new function.
3631 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
3632 obstack_for_string from flex-scanner.h.
3633 (YY_DECL): Use to declare skel_lex static.
3634 (decode_at_digraphs): Remove; now handled in the new
3635 SC_AT_DIRECTIVE_ARG start condition.
3636 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
3637 functions.
3638 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
3639 at_directive_argv): New static globals.
3640 (INITIAL): Use fail_for_invalid_at.
3641 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
3642 recognize the start of a generalized `@directive(...@)' form and
3643 start...
3644 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
3645 directive args (using the new obstack_for_string), to decode the
3646 contained @ diagraphs, and to perform the directive. It recognizes
3647 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
3648 @output(...@).
3649 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
3650 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
3651 `@,'.
3652 (scan_skel): Initialize obstack_for_string on the first call.
3653 (skel_scanner_free): New function to free obstack_for_string.
3654 * tests/input.at (Reject bad %code qualifiers): Update test output.
3655
3656 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
3657
3658 Consolidate the 4 prologue alternative directives (%code, %requires,
3659 %provides, and %code-top) into a single %code directive with an
3660 optional qualifier field. Discussed at
3661 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
3662 * NEWS (2.3a+): Rewrite the existing entry for the prologue
3663 alternatives.
3664 * doc/bison.texinfo (Prologue Alternatives): Update.
3665 (Decl Summary): Update to %code "requires" and %code "provides".
3666 (Calc++ Parser): Update to %code "requires".
3667 (Table of Symbols): Remove entries for %requires, %provides, and
3668 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
3669 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
3670 are replaced by b4_percent_code_provides and b4_percent_code_requires,
3671 which are skeleton-specific.
3672 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
3673 declare what %code qualifiers it supports and to complain if any other
3674 qualifiers were used in the grammar.
3675 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
3676 and b4_user_code([b4_percent_code_provides]) in place of
3677 b4_user_requires and b4_user_provides.
3678 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
3679 Add b4_user_code([b4_percent_code_top]) and
3680 b4_user_code([b4_percent_code]).
3681 Invoke b4_check_percent_code_qualifiers.
3682 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3683 PERCENT_REQUIRES): Remove.
3684 (grammar_declaration): Remove RHS's for %code-top, %provides, and
3685 %requires. Rewrite the %code RHS as the unqualified form defining the
3686 muscle b4_percent_code. Add another RHS for the qualified %code form,
3687 which defines muscles of the form b4_percent_code_QUALIFIER and the
3688 b4_used_percent_code_qualifiers muscle.
3689 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
3690 PERCENT_REQUIRES): Remove.
3691 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
3692 %code "requires" and %code "provides".
3693 * tests/input.at (Reject bad %code qualifiers): New.
3694
3695 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3696
3697 Use the new code_props interface for destructors and printers.
3698 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
3699 printer_location members, and change the type of the destructor and
3700 printer members to code_props.
3701 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
3702 symbol_printer_get, semantic_type_destructor_set,
3703 semantic_type_printer_set, default_tagged_destructor_set,
3704 default_tagless_destructor_set, default_tagged_printer_set,
3705 default_tagless_printer_set): Use code_props in arguments and return
3706 types in place of char const * and location.
3707 (symbol_destructor_location_get, symbol_printer_location_get): Remove
3708 since the locations are now contained in the return of
3709 symbol_destructor_get and symbol_printer_get.
3710 * src/output.c (symbol_destructors_output, symbol_printers_output):
3711 Replace with...
3712 (symbol_code_props_output): ... this to eliminate duplicate code.
3713 (output_skeleton): Update to use symbol_code_props_output.
3714 * src/reader.c (symbol_should_be_used): Update use of
3715 symbol_destructor_get.
3716 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3717 Update uses of the various _destructor_set and _printer_set functions.
3718 * src/symtab.c: (default_tagged_destructor_location,
3719 default_tagless_destructor_location, default_tagged_printer_location,
3720 default_tagless_printer_location): Remove since we...
3721 (default_tagged_destructor, default_tagless_destructor,
3722 default_tagged_printer, default_tagless_printer): ... change the type
3723 of these to code_props.
3724 (symbol_new, semantic_type_new, symbol_destructor_set,
3725 semantic_type_destructor_set, symbol_destructor_get,
3726 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
3727 symbol_check_alias_consistency, default_tagged_destructor_set,
3728 default_tagless_destructor_set, default_tagged_printer_set,
3729 default_tagless_printer_set): Update.
3730 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
3731 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
3732 code_props members.
3733 (symbol_print): Use SYMBOL_CODE_PRINT.
3734
3735 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 Use the new code_props interface for rule actions.
3738 * src/symlist.h (symbol_list): Replace action, action_location, and
3739 used members with a code_props action_props member.
3740 * src/reader.c (symbol_should_be_used, grammar_rule_check,
3741 grammar_midrule_action, grammar_current_rule_merge_set,
3742 grammar_current_rule_symbol_append, packgram): Update.
3743 * src/scan-code.h (translate_rule_action): Remove, no longer used.
3744 * src/scan-code.l (handle_action_dollar): Update.
3745 (translate_rule_action): Remove, no longer used.
3746 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
3747
3748 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 Use the new code_props interface in parse-gram.y.
3751 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
3752 Update all uses of translate_* functions to use the new code_props
3753 interface and to use gram_scanner_last_string_free and
3754 code_scanner_last_string_free where possible.
3755 (grammar_declaration): symbol_list_destructor_set and
3756 symbol_list_printer_set now perform the translation, so don't do it
3757 here. Use gram_scanner_last_string_free where possible.
3758 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
3759 translate_code): Remove, no longer used.
3760 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
3761 symbol_list_printer_set): Perform code translation here rather than
3762 depending on the caller to do so.
3763
3764 * src/symlist.h (struct symbol_list): Correct some documentation typos.
3765 * src/scan-gram.h (gram_last_string): Remove declaration.
3766 * src/scan-gram.l (last_string): Declare it static.
3767
3768 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3769
3770 Encapsulate code properties and related functionality for the various
3771 destructors, printers, and actions into a code_props structure and
3772 interface. This patch merely implements code_props in scan-code.h and
3773 scan-code.l. Future patches will rewrite other modules to use it.
3774 Discussed starting at
3775 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
3776 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
3777 consistently initialize const structs that have an empty location
3778 field.
3779 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
3780 to ensure consistency.
3781 * src/scan-code.h (code_props): New structure.
3782 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
3783 function, macro, and const global variable for initializing a
3784 code_props with no code.
3785 (code_props_plain_init, code_props_symbol_action_init,
3786 code_props_rule_action_init, code_props_translate_code): The rest of
3787 the new code_props functional interface. Among other things, the init
3788 functions set the code_props kind field so that
3789 code_props_translate_code will know whether to behave like
3790 translate_symbol_action, translate_rule_action, or translate_code.
3791 These old translate functions must remain until all other modules are
3792 updated to use the new code_props interface.
3793 (code_scanner_last_string_free): New function similar to
3794 gram_scanner_last_string_free.
3795 (code_scanner_free): Add documentation.
3796 * src/scan-code.l: Implement the new interface.
3797 (code_lex): Make it static, add a code_props* argument, and remove the
3798 rule argument.
3799 (last_string): New static global similar to the one in scan-gram.l.
3800 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3801 instead of rule.
3802 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3803 code_props since Bison may one day use this information for destructors
3804 and printers.
3805 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3806 (handle_action_dollar): Use symbol_list_n_get and set used flag
3807 directly since symbol_list_n_used_set is removed.
3808 (translate_action): Add a code_props* argument and remove the rule,
3809 action, and location arguments. Pass the code_props* on to code_lex.
3810 (translate_rule_action, translate_symbol_action, translate_code):
3811 Rewrite as wrappers around the new code_props interface.
3812 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3813 it would eventually need to break the encapsulation of code_props.
3814
3815 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3816
3817 * etc/.cvsignore: New.
3818
3819 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3820
3821 Add maintainer-push-check to run maintainer-check using push parsing in
3822 place of pull parsing where available.
3823 * Makefile.am (maintainer-push-check): New.
3824 * data/bison.m4 (b4_use_push_for_pull_if): New.
3825 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3826 appropriately based on their existing values.
3827 (yypush_parse): Don't print push-parser-specific diagnostics if push
3828 parsing is being used in place of pull parsing.
3829 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3830 push.c.
3831 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3832 variable, and insert b4_use_push_for_pull_flag into muscles.
3833 * tests/Makefile.am (maintainer-push-check): New.
3834
3835 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3836
3837 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3838 (whether successful or failed) so that yypush_parse can be invoked
3839 again to start a new parse using the same yypstate.
3840 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3841 check multiple yypull_parse invocations on the same yypstate. For pull
3842 mode, extend to check multiple yyparse invocations.
3843 (Exploding the Stack Size with Alloca): Extend to try with
3844 %push-pull-parser.
3845 (Exploding the Stack Size with Malloc): Likewise.
3846
3847 * tests/calc.at (Simple LALR Calculator): Don't specify
3848 %skeleton "push.c" since %push-pull-parser implies that now.
3849 * tests/headers.at (export YYLTYPE): Don't check for the push
3850 declarations. Otherwise, this test case can't be used to see if push
3851 mode can truly emulate pull mode.
3852 * tests/input.at (Torturing the Scanner): Likewise.
3853 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3854 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3855 AT_YACC_IF, which now includes the case of push mode since %skeleton
3856 need not be used for push mode. This will be more intuitive once
3857 push.c is renamed to yacc.c.
3858
3859 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3860
3861 For push mode, convert yyparse from a macro to a function, invoke yylex
3862 instead of passing a yylexp argument to yypull_parse, and don't
3863 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3864 Discussed starting at
3865 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3866 * data/bison.m4 (b4_pull_if): New.
3867 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3868 * data/push.c: Improve M4 quoting a little.
3869 (b4_generate_macro_args, b4_parenthesize): Remove.
3870 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3871 any time a pull parser is requested.
3872 Don't #define this as a wrapper around yypull_parse. Instead, when
3873 both push and pull are requested, make it a function that does that
3874 same thing.
3875 (yypull_parse): If there's a b4_prefix, #define this to
3876 b4_prefix[pull_parse] when both push and pull are requested.
3877 Don't define this as a function unless both push and pull are
3878 requested.
3879 Remove the yylexp argument and hard-code yylex invocation instead.
3880 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3881 %push-parser.
3882 * src/getargs.c (pull_parser): New global initialized to true.
3883 * getargs.h (pull_parser): extern it.
3884 * src/output.c (prepare): Insert pull_flag muscle.
3885 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3886 (prologue_declaration): Set both push_parser and pull_parser = true for
3887 %push-pull-parser. Set push_parser = true and pull_parser = false for
3888 %push-parser.
3889 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3890 %push-parser since there's no backward-compatibility concern here.
3891 Scan %push-pull-parser.
3892 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3893 instead of %push-parser.
3894 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3895 prototype it in the module that calls yyparse.
3896 * tests/input.at (Torturing the Scanner): Likewise.
3897 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3898
3899 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3900
3901 Update etc/bench.pl. Optimize push mode a little (the yyn change
3902 deserves most of the credit).
3903 * Makefile.am (SUBDIRS): Add etc subdirectory.
3904 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3905 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3906 yytoken, yyval, and yyloc declarations to...
3907 (yyparse or yypush_parse): ... here to improve performance. For
3908 yypush_parse invocations after the first, be sure to assign yyn its old
3909 value again.
3910 (yypstate_new): Don't bother initializing the yyresult field since the
3911 initial value isn't used.
3912 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3913 remove the #define that, in push mode, set it to yyps->NAME.
3914 * etc/Makefile.am: New.
3915 * etc/bench.pl: Remove and build it instead from...
3916 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3917 "tests/bison" from the build directory by default rather than just
3918 invoking "bison" from $PATH.
3919 (calc_grammar): Update push parser code: don't declare yylval globally,
3920 don't define yyparse_wrapper, and don't #define yyparse.
3921 (bench_grammar): Update to check all working combinations of yacc.c,
3922 push.c, impure, pure, pull, and push.
3923
3924 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3925
3926 For push mode, add pull wrappers around yypush_parse.
3927 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3928 (yypull_parse): New function wrapping yypush_parse.
3929 (yyparse): New #define wrapping yypull_parse.
3930 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3931 is declared.
3932 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3933 prototype yylex in the module that calls yyparse, and don't prototype
3934 yyparse there. Otherwise, the yyparse expansion won't compile.
3935 * tests/input.at (Torturing the Scanner): Likewise.
3936
3937 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3938
3939 Enable push parsers to operate in impure mode. Thus, %push-parser no
3940 longer implies %pure-parser. The point of this change is to move
3941 towards being able to test the push parser code by running the entire
3942 test suite as if %push-parser had been declared.
3943 * data/push.c (yypush_parse): For impure mode, remove the
3944 yypushed_char, yypushed_val, and yypushed_loc arguments.
3945 Instead, declare these as local variables initialized to the global
3946 yychar, yylval, and yylloc.
3947 For the first yypush_parse invocation only, restore the initial values
3948 of these global variables when it's time to read a token since they
3949 have been overwritten.
3950 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3951 %push-parser.
3952 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3953 %pure-parser along with %push-parser since this test case was designed
3954 for pure push parsers.
3955 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3956 (AT_YACC_OR_PUSH_IF): New.
3957 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3958 add a note that it's still wrong for some cases (as it has been for a
3959 while).
3960 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3961 %push-parser no longer implies %pure-parser.
3962
3963 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3964
3965 Remove some unnecessary differences between the pull parser code and
3966 the push parser code. This patch enables yynerrs in push mode.
3967 * data/push.c: Reformat M4 a little.
3968 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3969 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3970 because push mode is on. Instead, if pure mode is on, move yynerrs
3971 to...
3972 (b4_declare_parser_state_variables): ... here.
3973 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3974 to yyps->NAME so it can be used in yypush_parse.
3975 (yypush_parse): Don't omit uses of yynerrs in push mode.
3976
3977 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3978
3979 Fix bug such that the first pushed token's value and location are
3980 sometimes overwritten (sometimes by %initial-action) before being used.
3981 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3982 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3983 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3984 more closely mimic the pull parser logic.
3985 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3986 time to read a token, which is after any initialization of yylval and
3987 yylloc.
3988 (gottoken): Rename label to...
3989 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3990 user namespace.
3991
3992 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3993
3994 Rearrange initialization of the parser state variables so that the
3995 skeleton doesn't have to have a copy for pull mode and another for push
3996 mode. This patch also fixes at least a bug such that yylloc was not
3997 initialized (with b4_location_initial_line and
3998 b4_location_initial_column) upon calling yypush_parse. However, that
3999 initialization now overwrites the first token's location;
4000 %initial-action assigning @$ already did the same thing, and both bugs
4001 will be fixed in a later patch.
4002 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
4003 (b4_declare_parser_state_variables): Remove initialization of yytoken,
4004 yyss, yyvs, yyls, and yystacksize.
4005 (yypstate_new): Remove initialization of some yypstate fields: yystate,
4006 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
4007 yylsp.
4008 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
4009 yyps->NAME so it can be used in yypush_parse.
4010 (yyparse or yypush_parse): For yypush_parse, don't print the
4011 "Starting parse" diagnostic for invocations after the first.
4012 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
4013 yypush_parse, only do it for the first invocation.
4014 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
4015 initialization to occur in yypush_parse but only on the first
4016 invocation.
4017
4018 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4019
4020 * data/push.c: Add CPP guards around push parser declarations in both
4021 the header and the code file.
4022 In the code file, move the push parser declarations to the same place
4023 they appear in the header file.
4024 Clean up the M4 some, especially the inconsistent underquoting in
4025 some b4_c_function_def and b4_c_function_decl uses.
4026
4027 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 Encapsulate the push parser state variables into an M4 macro so the
4030 push skeleton doesn't have to list them again for pull mode's yyparse.
4031 For push mode, remove yypush_parse's local equivalents of these
4032 variables to eliminate unnecessary copying between the two sets at
4033 run-time. This patch also fixes at least a bug related to multiple
4034 %initial-action invocations in push mode.
4035 * data/push.c (b4_declare_parser_variables): Rename to...
4036 (b4_declare_scanner_communication_variables): ... this for clarity and
4037 update both uses.
4038 (b4_declare_yyparse_variables): Remove and move its contents to the one
4039 spot where it was invoked.
4040 (b4_declare_parser_state_variables): New macro containing the parser
4041 state variables required by push mode.
4042 (struct yypstate): Replace all fields but yynew with
4043 b4_declare_parser_state_variables.
4044 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
4045 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
4046 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
4047 (yyparse or yypush_parse): For yyparse in pull mode, replace local
4048 parser state variable declarations with
4049 b4_declare_parser_state_variables.
4050 Don't initialize parser state variables when calling yypush_parse since
4051 yypstate_new already does that.
4052 Invoke the user's initial action only upon the first yypush_parse
4053 invocation.
4054 Remove all code that copies between the local parser state variables
4055 and the yypstate.
4056
4057 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
4058
4059 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
4060 prevent a name collision in a future patch where these names will
4061 sometimes be #define'd.
4062 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
4063 since it no longer has the same name as the existing argument.
4064 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
4065
4066 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
4067 and Joel E. Denny <jdenny@ces.clemson.edu>
4068
4069 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4070 that the argument is case-insensitive, and there's no `=' here.
4071 For the %skeleton entry, mention that %language is better.
4072 (Bison Options): Likewise for --language and --skeleton. Move the
4073 --skeleton entry so that the `Tuning the parser' section is sorted
4074 alphabetically on long options.
4075 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
4076 %language directive in detail here; cross-reference the %language
4077 documentation instead.
4078 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
4079 `%require "2.3b"' so that the example is always up-to-date.
4080 (Table of Symbols): Add entries for %language and %skeleton.
4081 * examples/extexi (normalize): Instead of replacing every %require
4082 argument with the current Bison version, just substitute for
4083 `@value{VERSION}'. This guarantees that we're testing what actually
4084 appears in the documentation.
4085 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
4086 rather than `@VERSION@'.
4087
4088 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4089
4090 * NEWS: Reword the %language news a bit, and put it earlier.
4091
4092 * src/getargs.c (skeleton_arg): Last arg is now location const *.
4093 Rewrite to simplify the logic.
4094 (language_argmatch): Likewise.
4095 (program_name): We now own this var.
4096 * src/getargs.h (struct bison_language): Use char[] rather than
4097 const char *.
4098
4099 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
4100 Java is supported.
4101 * src/complain.c (program_name): Remove decl; no longer needed.
4102 * src/main.c (program_name): Remove; now belongs to getargs.
4103
4104 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
4105
4106 * NEWS: Document %language.
4107
4108 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
4109
4110 * data/c-skel.m4, data/c++-skel.m4: New files.
4111 * data/glr.c: Complain on push parsers.
4112
4113 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
4114 over %skeleton.
4115 (Decl Summary): Document %language and %skeleton.
4116 (Command line): Document -L.
4117
4118 * examples/extexi: Rewrite %require directive.
4119 * examples/calc++/Makefile.am: Pass VERSION to extexi.
4120
4121 * src/files.c (compute_exts_from_gc): Look in language structure
4122 for .y extension.
4123 (compute_file_name_parts): Check whether .tab should be added.
4124 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
4125 (language, skeleton_arg, language_argmatch): New.
4126 (long_options): Add --language.
4127 (getargs): Use skeleton_arg, add -L/--language.
4128 * src/getargs.h: Include location.h.
4129 (struct bison_language, language, skeleton_arg, language_argmatch): New.
4130 * src/output.c (prepare): Pick default skeleton from struct language.
4131 Don't dispatch C skeletons here.
4132 * src/parse-gram.y (PERCENT_LANGUAGE): New.
4133 (prologue_declaration): Add "%language" rule, use skeleton_arg.
4134 * src/scan-gram.l ("%language"): New rule.
4135
4136 * tests/calc.at: Test %skeleton and %language.
4137 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
4138 (AT_GLR_IF): Look for %skeleton "glr.cc".
4139 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
4140 (AT_YACC_IF): Reject %language.
4141
4142 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
4143
4144 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
4145 since it wasn't used; only the typedef name 'semantic_type' is needed.
4146 Also, omit trailing white space.
4147
4148 * bootstrap: Sync from coreutils.
4149 (gnulib_extra_files): Add build-aux/announce.gen.
4150 (slurp): Adjust .gitignore files like .cvsignore files.
4151 * build-aux/announce-gen: Remove from CVS, since bootstrap
4152 now creates this.
4153
4154 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
4155
4156 Make %push-parser imply %pure-parser. This fixes several bugs; see
4157 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
4158 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
4159 pure_parser = true.
4160 * data/push.c: Don't bother testing b4_push_if when deciding whether
4161 to expand b4_declare_parser_variables globally.
4162 (yypush_parse): Likewise in here.
4163
4164 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
4165 (yy_reduce_print): Reformat M4 for readability.
4166
4167 2006-12-15 Bob Rossi <bob@brasko.net>
4168 and Joel Denny <jdenny@ces.clemson.edu>
4169
4170 * data/push.c (yypstate): Add typedef, and update all uses of
4171 struct yypstate to just yypstate.
4172 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
4173
4174 2006-12-14 Bob Rossi <bob@brasko.net>
4175
4176 * data/push.c (yypush_parse): Declare prototype regardless of
4177 %locations option.
4178
4179 2006-12-14 Bob Rossi <bob@brasko.net>
4180
4181 * data/push.c (yyparse): Remove the prototype and the #define when in
4182 push-parser mode.
4183
4184 2006-12-13 Bob Rossi <bob@brasko.net>
4185
4186 * data/push.c (yypstate_init): Rename to...
4187 (yypstate_new): ... this and use b4_c_function_def.
4188 (yypstate_delete): New.
4189 (yypush_parse): Change parameters yynval and yynlloc to be const.
4190 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
4191 yypstate_delete functions.
4192
4193 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
4194
4195 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
4196 strange test case titles. Reported by Bob Rossi.
4197
4198 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
4199
4200 * TODO: Add pointer to Sylvain Schmitz's work on static detection
4201 of potential ambiguities in GLR grammers.
4202
4203 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
4204
4205 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
4206 `bison ', use m4_index instead of m4_substr since chopping up a string
4207 containing M4-special characters causes problems here.
4208
4209 Fix a couple of bugs related to special characters in user-specified
4210 file names, and make it easier for skeletons to compute output file
4211 names with the same file name prefix as Bison-computed output file
4212 names.
4213 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
4214 b4_parser_file_name and b4_spec_defines_file instead of
4215 @output_parser_name@ and @output_header_name@, which are now redundant.
4216 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
4217 b4_parser_file_name, b4_spec_defines_file, and the new
4218 @basename(FILENAME@) instead of @output_parser_name@ and
4219 @output_header_name@, which inappropriately escaped the file names as
4220 C string literals.
4221 * src/files.c (all_but_ext): Remove static qualifier.
4222 (compute_output_file_names): Move `free (all_but_ext)' to...
4223 (output_file_names_free): ... here since all_but_ext is needed later.
4224 * src/files.h (all_but_ext): Extern.
4225 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
4226 exactly what MUSCLE_INSERT_STRING used to do.
4227 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
4228 characters are escaped properly.
4229 * src/output.c (prepare): Define muscle file_name_all_but_ext as
4230 all_but_ext.
4231 For pkgdatadir muscle, maintain previous functionality by using
4232 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
4233 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
4234 digraphs would never be expanded. Hopefully no one has M4-special
4235 characters in his Bison installation path.
4236 * src/scan-skel.l: Don't parse @output_header_name@ and
4237 @output_parser_name@ anymore since they're now redundant.
4238 In @output, use decode_at_digraphs.
4239 Parse a new @basename command that invokes last_component.
4240 (decode_at_digraphs): New.
4241 (BASE_QPUTS): Remove unused.
4242 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
4243 (Output file name): New tests.
4244
4245 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
4246
4247 Warn about output files that are generated by the skeletons and that
4248 conflict with other output files.
4249 * data/glr.c: Don't generate the header file here when glr.cc does.
4250 * src/files.c (file_names, file_names_count): New static globals.
4251 (compute_output_file_names): Invoke output_file_name_check for files
4252 not generated by the skeletons and remove existing checks.
4253 (output_file_name_check): New function that warns about conflicting
4254 output file names.
4255 (output_file_names_free): Free file_names.
4256 * src/files.h (output_file_name_check): Declare.
4257 * src/scan-skel.l: Invoke output_file_name_check for files generated by
4258 the skeletons.
4259 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
4260 (Conflicting output files): New tests.
4261
4262 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4263
4264 * doc/bison.texinfo: Fix a couple of typos.
4265
4266 2006-12-08 Bob Rossi <bob@brasko.net>
4267
4268 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4269 Rename to...
4270 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
4271 update all uses.
4272 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
4273 (yypush_parse): Rename yypvars argument to yyps and remove redundant
4274 local pv.
4275 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
4276 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
4277
4278 2006-12-07 Bob Rossi <bob@brasko.net>
4279 and Joel Denny <jdenny@ces.clemson.edu>
4280
4281 * data/push.c (yypvarsinit): Change return type from void* to struct
4282 yypvars*. No longer cast to void* on return.
4283 (struct yypvars): Remove yylen since it need not be remembered between
4284 yypushparse invocations.
4285 (yypushparse): Don't copy between yylen and pv->yylen.
4286
4287 2006-12-05 Bob Rossi <bob@brasko.net>
4288
4289 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
4290 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
4291 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
4292 (struct yypvars): Remove b4_declare_parser_variables.
4293 (yypvarsinit): Remove init code for removed variables.
4294 (global scope): Do not declare b4_declare_parser_variables if
4295 push or pure mode.
4296 (yypushparse): Add b4_declare_parser_variables.
4297 Init new local variables, and remove init code for removed
4298 yypvars variables.
4299 (yyparse): Delete.
4300 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
4301 and yyparse for other modes.
4302 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
4303 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
4304 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
4305 (AT_PURE_LEX_IF): True if pure or push parser.
4306
4307 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
4308
4309 Document Yacc prologue alternatives and default %destructor's and
4310 %printer's as experimental. Don't mention Java yet. Discussed at
4311 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
4312 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
4313 (2.3a): Annotate this entry to say the old forms of these features were
4314 also experimental.
4315 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
4316 Table of Symbols): Say they're experimental. Comment out any mention
4317 of Java (we'll want this back eventually).
4318
4319 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4320
4321 Support a file name argument to %defines. Deprecate `=' in
4322 %file-prefix, %name-prefix, and %output. Discussed at
4323 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
4324 * NEWS (2.3a+): Mention.
4325 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
4326 form of %defines, and remove `=' from entries for %file-prefix,
4327 %name-prefix, and %output.
4328 * src/parse-gram.y (prologue_declaration): Implement.
4329 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
4330 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
4331 all but one occurrence of %name-prefix.
4332 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
4333 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
4334 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
4335 occurrence of each of %file-prefix and %output. Add check for %defines
4336 with argument.
4337 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
4338 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
4339 Remove the `=' from %output.
4340
4341 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
4342
4343 Don't escape $ in test case titles since Autoconf 2.61 now does that
4344 correctly.
4345 * tests/actions.at (Default %printer and %destructor are not for error
4346 or $undefined): Here.
4347 (Default %printer and %destructor are not for $accept): Here.
4348 * tests/input.at (Invalid $n and @n): Here.
4349
4350 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
4351
4352 Rename <!> to <>. Discussed starting at
4353 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
4354 * NEWS (2.3a+): Update.
4355 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
4356 Update.
4357 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
4358 * src/scan-gram.l (INITIAL): Implement.
4359 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
4360 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
4361 comment.
4362 * tests/actions.at (Default tagless %printer and %destructor,
4363 Default tagged and per-type %printer and %destructor,
4364 Default %printer and %destructor are not for error or $undefined,
4365 Default %printer and %destructor are not for $accept,
4366 Default %printer and %destructor for mid-rule values): Update.
4367 * tests/input.at (Default %printer and %destructor redeclared,
4368 Unused values with default %destructor): Update.
4369
4370 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4371
4372 Don't let %prec take a nonterminal.
4373 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
4374 token.
4375 * tests/input.at (%prec takes a token): New test checking that %prec
4376 won't take a nonterminal.
4377
4378 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4379
4380 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4381 it was double-quoted.
4382 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
4383 grammar is maintained with Bison's highest standards.
4384 * src/getargs.c: Fix some typos in Doxygen comments.
4385
4386 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4387
4388 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
4389 later. Reported by Paul Eggert in
4390 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
4391 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
4392 * src/scan-code.l (translate_action): Don't bother invoking
4393 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
4394 (code_scanner_free): Instead of invoking
4395 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
4396 which frees more.
4397 * src/scan-gram.l (gram_scanner_free): Likewise.
4398 * src/scan-skel.l (scan_skel): Likewise.
4399
4400 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4401
4402 * src/files.c (tr): Change return type to void.
4403 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
4404 has been called previously for the same key.
4405 (muscle_find): Return storage instead of value so that
4406 --enable-gcc-warnings doesn't produce warnings that the return discards
4407 const. aver that the value and storage are the same since storage
4408 could potentially be NULL when value is not.
4409 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
4410 same as 0.
4411
4412 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4413
4414 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
4415 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
4416 us a slightly cleaner distribution, and also works.
4417 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
4418 gnulib changes.
4419
4420 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
4421 and Paul Eggert <eggert@cs.ucla.edu>
4422
4423 Don't let Bison leak memory except when it complains.
4424 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
4425 (spec_defines_file, dir_prefix): Now char *, not const char *,
4426 since they are freed.
4427 * src/files.c: Likewise.
4428 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
4429 Likewise.
4430 (tr): Now operates in-place. All uses changed.
4431 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
4432 values.
4433 (compute_file_name_parts, compute_output_file_names): Don't store
4434 read-only data in variables that will be freed.
4435 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
4436 src_extension, and header_extension.
4437 (output_file_names_free): New public function to free
4438 spec_verbose_file, spec_graph_file, spec_defines_file,
4439 parser_file_name, and dir_prefix.
4440 * src/getargs.c (getargs): Don't store read-only data in variables that
4441 will be freed.
4442 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
4443 (which previously existed but was unused), and quotearg_free.
4444 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
4445 * src/muscle_tab.c: Likewise.
4446 (muscle_entry): Make the value char const *,
4447 and add a new storage member that is char * and can be freed.
4448 (muscle_entry_free): New private function.
4449 (muscle_init): Use it instead of free.
4450 (muscle_insert, muscle_grow): Update and use new storage member.
4451 (muscle_code_grow): Free the string passed to muscle_grow
4452 since it's not needed anymore.
4453 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
4454 add a new `char *code' member.
4455 ("{...}"): Declare semantic type as code.
4456 * src/scan-code.h (translate_rule_action):
4457 (translate_symbol_action, translate_code, translate_action): Return
4458 `char const *' rather than `char *' since external code should not free
4459 these strings.
4460 * src/scan-code.l: Likewise.
4461 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
4462 which is "{...}" in the parser.
4463 * tests/Makefile.am (maintainer-check-valgrind): Set
4464 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
4465 Valgrind.
4466 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
4467 complain.
4468 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
4469 expecting a non-zero exit status sets --leak-check=summary and
4470 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
4471 this case, and we don't want to hear about it.
4472
4473 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
4474
4475 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
4476 instead of from the template, to simplify configuration a bit.
4477 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
4478 and m4/wint_t.m4, as they are needed with the latest gnulib.
4479
4480 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4481
4482 Disable unset/unused mid-rule value warnings by default, and recognize
4483 --warnings=midrule-values to enable them. Discussed starting at
4484 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
4485 * NEWS (2.3a+): Mention.
4486 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
4487 warnings): Add entry for midrule-values subargument.
4488 * src/reader.c (symbol_should_be_used): Don't return true just because
4489 the value is a set/used mid-rule value unless
4490 --warnings=midrule-values was specified.
4491 * tests/input.at (Unused values, Unused values before symbol
4492 declarations): Run tests with and without --warnings=midrule-values.
4493
4494 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
4495 than LIST_FREE directly.
4496
4497 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4498
4499 Finish implementing --warnings=error, which should not be implied by
4500 --warnings=all (or by its synonyms -W and --warnings without
4501 subarguments).
4502 * src/complain.c (set_warning_issued): New function to report that
4503 warnings are being treated as errors and to record an error if so.
4504 Invoke...
4505 (warn_at, warn): ... here.
4506 * src/getargs.c (warnings_args, warnings_types): Reorder so that
4507 "error - warnings are errors" does not appear above "all - all of the
4508 above".
4509 (getargs): For -W and --warnings without subarguments, don't let
4510 FLAGS_ARGMATCH set warnings_error in warnings_flag.
4511 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
4512
4513 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
4514
4515 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
4516 empty subargument list. For example: `bison --warnings= parser.y'.
4517
4518 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4519
4520 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
4521 the parser header file so that gcc doesn't warn.
4522
4523 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 Split the default %destructor/%printer into two kinds: <*> and <!>.
4526 Discussed starting at
4527 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
4528 * NEWS (2.3a+): Mention.
4529 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
4530 previous change today related to mid-rules.
4531 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
4532 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
4533 (TYPE_TAG_ANY): Add as <*>.
4534 (TYPE_TAG_NONE): Add as <!>.
4535 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
4536 for <*> and <!>.
4537 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
4538 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
4539 * src/symlist.c (symbol_list_default_new): Split into tagged and
4540 tagless versions.
4541 (symbol_list_destructor_set, symbol_list_printer_set): Split
4542 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
4543 SYMLIST_DEFAULT_TAGLESS.
4544 * src/symlist.h: Update symbol_list_default*_new prototypes.
4545 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
4546 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
4547 * src/symtab.c (default_destructor, default_destructor_location,
4548 default_printer, default_printer_location): Split each into tagged and
4549 tagless versions.
4550 (symbol_destructor_get, symbol_destructor_location_get,
4551 symbol_printer_get, symbol_printer_location_get): Implement tagged
4552 default and tagless default cases.
4553 (default_destructor_set, default_printer_set): Split each into tagged
4554 and tagless versions.
4555 * src/symtab.h: Update prototypes.
4556 * tests/actions.at (Default %printer and %destructor): Rename to...
4557 (Default tagless %printer and %destructor): ... this, and extend.
4558 (Per-type %printer and %destructor): Rename to...
4559 (Default tagged and per-type %printer and %destructor): ... this, and
4560 extend.
4561 (Default %printer and %destructor for user-defined end token): Extend.
4562 (Default %printer and %destructor are not for error or $undefined):
4563 Update.
4564 (Default %printer and %destructor are not for $accept): Update.
4565 (Default %printer and %destructor for mid-rule values): Extend.
4566 * tests/input.at (Default %printer and %destructor redeclared): Extend.
4567 (Unused values with default %destructor): Extend.
4568
4569 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4570
4571 Don't apply the default %destructor/%printer to an unreferenced midrule
4572 value. Mentioned at
4573 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
4574 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
4575 like $@n instead of just @n so that the default %destructor/%printer
4576 logic doesn't see them as user-defined symbols.
4577 (symbol_is_dummy): Check for both forms of the name.
4578 * src/reader.c (packgram): Remove the `$' from each midrule symbol
4579 name for which the midrule value is referenced in any action.
4580 * tests/actions.at (Default %printer and %destructor for mid-rule
4581 values): New test.
4582 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
4583 for change to dummy symbol names.
4584
4585 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4586
4587 Warn about unset midrule $$ if the corresponding $n is used.
4588 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
4589 $n usage.
4590 (packgram): Before invoking grammar_rule_check on any rule, make sure
4591 all actions have already been scanned in order to set `used' flags.
4592 Otherwise, checking that a midrule's $$ is set will not always work
4593 properly because the midrule check must forward-reference the midrule's
4594 parent rule.
4595 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
4596 warning.
4597
4598 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
4599
4600 More improvements to the documentation of the prologue alternatives:
4601 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
4602 Bison manual.
4603 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
4604 some text to clarify the relative importance of the new directives and
4605 to show how these directives may be viewed as code labels.
4606
4607 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
4608
4609 Similar to the recently removed %before-header, add %code-top as the
4610 alternative to the pre-prologue. Mentioned at
4611 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
4612 Also, let the prologue alternatives appear in the grammar section.
4613 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
4614 (prologue_declaration): Move the existing prologue alternatives to...
4615 (grammar_declaration): ... here and add %code-top.
4616 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
4617
4618 Clean up and extend documentation for the prologue alternatives.
4619 * NEWS (2.3a+): Describe prologue alternatives.
4620 * doc/bison.texinfo (Prologue): Move discussion of prologue
4621 alternatives to...
4622 (Prologue Alternatives): ... this new section, and extend it to discuss
4623 all 4 directives in detail.
4624 (Table of Symbols): Clean up discussion of prologue alternatives and
4625 add %code-top.
4626
4627 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4628
4629 DJGPP specific issues.
4630
4631 * djgpp/config.bat: config.hin has been moved to lib. Adjust
4632 config.bat accordingly.
4633 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
4634 * djgpp/config.site: Likewise.
4635
4636 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
4637
4638 Replace %*-header with %provides, %requires, %code. See discussion at
4639 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
4640
4641 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
4642 (b4_user_start_header): Remove.
4643 * data/glr.c: Use new macros instead of b4_*start_header
4644 and b4_*end_header.
4645 * data/glr.cc: Likewise.
4646 * data/lalr1.cc: Likewise.
4647 * data/push.c: Likewise.
4648 * data/yacc.c: Likewise.
4649
4650 * doc/bison.texinfo: Remove %before-header, rename
4651 %{start,end,after}-header to %requires, %provides, %code.
4652
4653 * src/parse-gram.y: Likewise (also rename token names accordingly).
4654 * src/scan-gram.l: Likewise.
4655 * tests/actions.at: Likewise.
4656
4657 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
4658
4659 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
4660 Problem reported by Joel E. Denny.
4661
4662 2006-10-14 Jim Meyering <jim@meyering.net>
4663
4664 (Sync from coreutils.)
4665 Work also when the working directory (with e.g. coreutils sources)
4666 is version controlled with git, rather than CVS.
4667 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
4668 rather than CVS.
4669 In messages and comments, say e.g., "checked-out sources",
4670 rather than "CVS sources".
4671 (version_controlled_file): New function. Work for git as well as
4672 for CVS. Don't use grep's -q option.
4673 (slurp): Call it here, in place of CVS-specific code.
4674
4675 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
4676
4677 Fix testsuite for ./configure --enable-gcc-warnings:
4678 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
4679 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
4680 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
4681 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
4682 * test/regression.at (Diagnostic that expects two alternatives):
4683 Likewise.
4684
4685 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4686
4687 * bootstrap.conf (gnulib_modules): Add config-h.
4688 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
4689 worry about HAVE_CONFIG_H.
4690 * lib/abitset.c: Likewise.
4691 * lib/bitset.c: Likewise.
4692 * lib/bitset_stats.c: Likewise.
4693 * lib/bitsetv-print.c: Likewise.
4694 * lib/bitsetv.c: Likewise.
4695 * lib/ebitset.c: Likewise.
4696 * lib/get-errno.c: Likewise.
4697 * lib/lbitset.c: Likewise.
4698 * lib/subpipe.c: Likewise.
4699 * lib/timevar.c: Likewise.
4700 * lib/vbitset.c: Likewise.
4701 * lib/bitset.c: Include "bitset.h" first, to test interface.
4702 * lib/bitset_stats.c: Include "bitset_stats.h" first.
4703 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
4704 * lib/bitsetv.c: Include "bitsetv.h" first.
4705 * lib/get-errno.c: Include "get-errno.h" first.
4706 * m4/.cvsignore: Add config-h.m4.
4707 * tests/actions.at (Default %printer and %destructor for ...):
4708 Adjust expected line numbers in output to reflect removal of #if
4709 HAVE_CONFIG_H lines.
4710 * tests/glr-regression.at (Missed %merge type warnings when ...):
4711 Likewise.
4712 * tests/regression.at (Braced code in declaration in rules section):
4713 Likewise.
4714 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
4715 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
4716 Include <config.h> unconditionally.
4717
4718 * bootstrap: Sync from coreutils, as follows:
4719
4720 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4721
4722 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
4723 variable was sometimes used without being initialized. This
4724 messed up the installation of the INSTALL file in some cases.
4725
4726 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4727
4728 * bootstrap (usage, main program, symlink_to_gnulib): Add option
4729 --copy. Inspired by a suggestion from Bruno Haible.
4730
4731 2006-10-03 Jim Meyering <jim@meyering.net>
4732
4733 * bootstrap: Undo last change to this file, since now gnulib-tool
4734 sticks with the automake default in generating dependencies.
4735
4736 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
4737
4738 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
4739 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
4740
4741 * doc/bison.1: Add copyright notice.
4742
4743 * data/glr.c: Don't include <stdarg.h>; not used.
4744
4745 * NEWS: The -g and --graph options now output graphs in Graphviz
4746 DOT format, not VCG format.
4747 * doc/bison.1: Likewise.
4748 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
4749 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
4750 of this change in
4751 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
4752 * TODO: Remove Graphviz entry.
4753 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
4754 remove vcg.c, vcg.h, vcg_defaults.h.
4755 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
4756 * src/graphviz.c, src/graphviz.h: New files.
4757 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
4758 * src/files.h: Make comment more generic.
4759 * src/main.c (main): Likewise.
4760 * src/print_graph.h: Likewise.
4761 * src/getargs.c (usage): Make usage description more generic.
4762 * src/print_graph.c: Include graphviz.h rather than vcg.h.
4763 (static_graph, fgraph): Remove. All uses changed to pass
4764 arguments instead of sharing a static var.
4765 (print_core, print_actions, print_state, print_graph):
4766 Output graphviz format rather than VCG format.
4767 * tests/.cvsignore: Remove *.vcg; add *.dot.
4768 * tests/output.at: Expect *.dot files, not *.vcg files.
4769
4770 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
4771 accommodates the 2006-10-08 change.
4772
4773 2006-10-11 Bob Rossi <bob@brasko.net>
4774
4775 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
4776 (b4_yyssa, b4_yyerror_range): New macros.
4777 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
4778 (yypvarsinit): Remove init of removed fields.
4779 (yypushparse): Remove use of removed fields; use new macros instead.
4780
4781 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
4782
4783 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
4784 in a push parser. Reindent slightly to match yacc.c better.
4785
4786 2006-10-11 Bob Rossi <bob@brasko.net>
4787
4788 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
4789 yymsg_alloc fields.
4790 (yypvarsinit, yypushparse): Remove init of removed fields.
4791 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
4792
4793 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4794
4795 * THANKS: Add Paolo Bonzini and Bob Rossi.
4796
4797 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
4798
4799 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4800 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4801 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4802 b4_define_user_cde and uses): Remove.
4803 (b4_comment, b4_prefix, b4_sync_start): New.
4804 * data/bison.m4: New file, with most of the content removed from c.m4.
4805 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4806 * src/output.c (output_skeleton): Pass bison.m4.
4807 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4808 only if specified.
4809
4810 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4811
4812 Fix test failure reported by Tom Lane in
4813 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4814 and try to make such failures easier to catch in the future.
4815 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4816 that's now the caller's responsibility.
4817 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4818 Set yychar = YYEOF if it's negative.
4819 * tests/actions.at (yylex): Abort if asked to read past EOF.
4820 * tests/conflicts.at (yylex): Likewise.
4821 * tests/cxx-type.at (yylex): Likewise.
4822 * tests/glr-regression.at (yylex): Likewise.
4823 * tests/input.at (yylex): Likewise.
4824 * tests/regression.at (yylex): Likewise.
4825 * tests/torture.at (yylex): Likewise.
4826
4827 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4828
4829 Fix problems with translating English-language diagnostics.
4830 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4831 respect to bison-runtime pot generation. The YY_ stuff
4832 wasn't being captured.
4833 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4834 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4835 * runtime-po/POTFILES.in: Add data/push.c.
4836
4837 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4838
4839 Merge bootstrap changes from coreutils.
4840
4841 2006-09-28 Jim Meyering <jim@meyering.net>
4842
4843 Automatically generated dependencies are important even
4844 when all of the sources in a directory come from gnulib.
4845 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4846 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4847
4848 2006-09-23 Jim Meyering <jim@meyering.net>
4849
4850 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4851
4852 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4853
4854 * bootstrap: Add support for --force.
4855 (usage): New function. Describe usage less tersely.
4856 (CVS_only_file): New var.
4857
4858 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4859
4860 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4861 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4862 Adjust white space and comments to match GNU style better.
4863
4864 2006-09-20 Bob Rossi <bob@brasko.net>
4865
4866 * data/push.c (yyresult_get): Remove function.
4867 (YYPUSH_MORE): Add #define.
4868 (yypushparse): Modify return value.
4869
4870 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4871
4872 * stamp-h.in: Remove; no longer needed.
4873 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4874 Remove config.h, config.hin, intl (no longer created).
4875 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4876 stamp-h1.
4877
4878 Sync bootstrap from coreutils, as follows:
4879
4880 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4881
4882 * bootstrap (symlink_to_gnulib): New function.
4883 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4884 to copies-of-gnulib.
4885 (cp_mark_as_generated, slurp, gnulib_files):
4886 Avoid making a copy if it's the same as the old version.
4887 (gnulib_files): Add support for this variable (used by Bison).
4888
4889 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4890
4891 * src/getargs.c (usage): Rework to use conventions similar to
4892 coreutils, to make translation a bit easier and the code a bit
4893 smaller. Problem reported by Tim Van Holder.
4894
4895 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4896
4897 Use some of gnulib's new modules, taken from coreutils.
4898
4899 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4900 * bootstrap.conf: New file.
4901 (gnulib_modules): Add configmake, inttypes, unistd.
4902 (XGETTEXT_OPTIONS): Add complain, complain_at,
4903 fatal, fatal_at, warn, warn_at, unexpected_end.
4904 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4905 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4906 (gl_EARLY): Add.
4907 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4908 (gl_INIT): Add
4909 (GNULIB_AUTOCONF_SNIPPET): Remove.
4910 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4911 the pickiest.
4912 * lib/.cvsignore: Add inttypes_.h.
4913 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4914 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4915 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4916 no-longer-necessary initializations.
4917 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4918 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4919 use the unistd module.
4920 * src/system.h: Likewise.
4921 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4922 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4923 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4924 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4925 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4926 * src/system.h: Include inttypes.h unconditionally, now that we
4927 use the inttypes module. Don't bother to include stdint.h, since
4928 inttypes.h now does that for us.
4929 (LOCALEDIR): Remove, now that we use the configmake module.
4930 * src/getargs.c: Include configmake.h.
4931 * src/main.c: Likewise.
4932 * src/output.c: Likewise.
4933 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4934 not from $abs_top_builddir, since config.h moved.
4935
4936
4937 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4938 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4939
4940 * src/parse-gram.y (symbol_declaration): Don't put statements
4941 before declarations; it's not portable to C89.
4942 * src/scan-code.l (handle_action_at): Likewise.
4943
4944 * src/scan-code.l: Always initialize braces_level; the old code
4945 left it uninitialized and therefore had undefined behavior.
4946
4947 Don't attempt to redefine 'assert', since it runs afoul of
4948 systems where standard headers (mistakenly) include <assert.h>.
4949 Instead, define and use our own alternative, called 'aver'.
4950 * src/reader.c: Don't include assert.h, since we no longer
4951 use assert.
4952 * src/scan-code.l: Likewise.
4953 * src/system.h (assert): Remove, replacing with....
4954 (aver): New function, taking a bool arg. All uses changed.
4955 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4956 not merely an integer.
4957
4958 2006-09-15 Bob Rossi <bob@brasko.net>
4959
4960 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4961 * data/c.m4 (YYPUSH): New.
4962 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4963 * src/getargs.c (push_parser): New var.
4964 * src/getargs.h (push_parser): New declaration.
4965 * src/output.c (prepare): Add macro insertion of `push_flag'.
4966 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4967 (prologue_declaration): Parse %push-parser.
4968 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4969 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4970 list of removed lines from the traces observed.
4971 (AT_CHECK_CALC_LALR): Added push parser tests.
4972
4973 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4974
4975 * NEWS: Version 2.3a.
4976 * configure.ac (AC_INIT): Likewise.
4977
4978 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4979 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4980 due to header ordering dependencies. I don't know why the #define
4981 was there.
4982
4983 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4984 runtime cost when YYDEBUG is not defined, and so that some tests
4985 that used to fail now work. Problem and initial suggestion by
4986 Paolo Bonzini.
4987 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4988 * data/glr.cc (b4_parser_class_name):
4989 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4990 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4991 (yydebug_) [YYDEBUG]: New member.
4992 (yycdebug_): Now defined only if YYDEBUG.
4993 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4994 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4995 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4996 if YYYDEBUG.
4997 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4998 Define only if YYDEBUG.
4999 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
5000 set_debug_level.
5001 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
5002 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
5003 AT_CHECK_CALC_GLR_CC that are working now.
5004
5005 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
5006
5007 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
5008 We don't need them in glr.cc, and glr.c defines them.
5009 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
5010 assumes that defining it to anything is the same as defining
5011 it to 1. Problem reported by Paolo Bonzini.
5012
5013 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
5014
5015 * data/c.m4 (b4_null, b4_case): Define.
5016 * src/output.c (prepare_symbols): Use b4_null.
5017 (user_actions_output): Use b4_case.
5018
5019 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
5020
5021 * data/glr.c (b4_shared_declarations): Put start-header first,
5022 before any #includes that we generate, so that feature-test
5023 macros work. Problem reported by Michael Deutschmann in
5024 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
5025 * data/lalr1.cc: Likewise.
5026 * doc/bison.texinfo (Prologue): Document that feature-test macros
5027 should be defined before any Bison declarations.
5028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
5029 that depend on location.hh after, not before, Bison decls, since
5030 we now include location.hh after the first user prologue.
5031
5032 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
5033 Sander Brandenburg in
5034 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
5035 Also, fix minor white space and comment issues.
5036 (Prologue): Mention that it's better to define feature-test macros
5037 before Bison declarations. Problem reported by Michael Deutschmann.
5038
5039 * README-cvs: Fix typo: "&" should be "&&". Problem reported
5040 by Jim Meyering.
5041 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
5042 This adjusts to recent gnulib changes.
5043
5044 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5045
5046 Finish implementation of per-type %destructor/%printer. Discussed
5047 starting at
5048 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
5049 and
5050 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
5051 * NEWS (2.3+): Add a description of this feature to the default
5052 %destructor/%printer description.
5053 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
5054 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5055 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
5056 list node contains a semantic type.
5057 * src/symtab.c, src/symtab.h: Extend with a table that associates
5058 semantic types with their %destructor's and %printer's.
5059 (semantic_type_from_uniqstr, semantic_type_get,
5060 semantic_type_destructor_set, semantic_type_printer_set): New functions
5061 composing the public interface of that table.
5062 (symbol_destructor_get, symbol_destructor_location_get,
5063 symbol_printer_get, symbol_printer_location_get): If there's no
5064 per-symbol %destructor/%printer, look up the per-type before trying
5065 the default.
5066 * tests/actions.at (Per-type %printer and %destructor): New test case.
5067 * tests/input.at (Default %printer and %destructor redeclared):
5068 Extend to check that multiple occurrences of %symbol-default in a
5069 single %destructor/%printer declaration is an error.
5070 (Per-type %printer and %destructor redeclared, Unused values with
5071 per-type %destructor): New test cases.
5072
5073 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
5074
5075 Require default %destructor/%printer to be declared using
5076 %symbol-default instead of an empty symbol list, and start working on
5077 new per-type %destructor/%printer. Discussed at
5078 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
5079 * NEWS (2.3+): Add %symbol-default to example.
5080 * bison.texinfo (Freeing Discarded Symbols): Likewise.
5081 (Table of Symbols): Add entry for %symbol-default.
5082 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
5083 (generic_symlist, generic_symlist_item): New nonterminals for creating
5084 a list in which each item is a symbol, semantic type, or
5085 %symbol-default.
5086 (grammar_declaration): Use generic_symlist in %destructor and %printer
5087 declarations instead of symbols.1 or an empty list.
5088 (symbol_declaration, precedence_declaration, symbols.1): Update actions
5089 for changes to symbol_list.
5090 * src/reader.c: Update for changes to symbol_list.
5091 * src/scan-code.l: Likewise.
5092 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
5093 * src/symlist.c, src/symlist.h: Extend such that a list node may
5094 represent a semantic type or a %symbol-default in addition to just an
5095 ordinary symbol. Add switched functions for setting %destructor's and
5096 %printer's.
5097 * tests/actions.at, tests/input.at: Add %symbol-default to all default
5098 %destructor/%printer declarations.
5099
5100 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
5101
5102 Whether the default %destructor/%printer applies to a particular symbol
5103 isn't a question of whether the user *declares* that symbol (in %token,
5104 for example). It's a question of whether the user by any means
5105 *defines* the symbol at all (by simply using a char token, for
5106 example). $end is defined by Bison whereas any other token with token
5107 number 0 is defined by the user. The error token is always defined by
5108 Bison regardless of whether the user declares it with %token, but we
5109 may one day let the user define error as a nonterminal instead.
5110 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
5111 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
5112 the meaning of "user-defined".
5113 * tests/actions.at (Default %printer and %destructor for user-declared
5114 end token): Rename to...
5115 (Default %printer and %destructor for user-defined end token): ...
5116 this.
5117
5118 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
5119 computation of whether to apply the default, don't maintain a list of
5120 every Bison-defined symbol. Instead, just check for a first character
5121 of '$', which a user symbol cannot have, and check for the error token.
5122
5123 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
5124
5125 Don't apply the default %destructor or %printer to the error token,
5126 $undefined, or $accept. This change fits the general rule that the
5127 default %destructor and %printer are only for user-declared symbols,
5128 and it solves several difficulties that are described in the new test
5129 cases listed below.
5130 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
5131 * tests/actions.at (Default %printer and %destructor are not for error
5132 or $undefined, Default %printer and %destructor are not for $accept):
5133 New test cases.
5134
5135 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
5136
5137 Allow %start after the first rule.
5138 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
5139 when parsing the first rule.
5140 (check_and_convert_grammar): Search for it here after all grammar
5141 declarations have been parsed. Skip midrules, which have dummy LHS
5142 nonterminals.
5143 * src/symtab.c (symbol_is_dummy): New function.
5144 * src/symtab.h (symbol_is_dummy): Declare it.
5145 * tests/input.at (%start after first rule): New test.
5146
5147 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5148
5149 Redo some of the previous commit: add back the ability to use
5150 non-aliased/undeclared string literals since it might be useful to
5151 those declaring %token-table.
5152 * src/reader.c (check_and_convert_grammar): Undo changes in previous
5153 commit: don't worry about complaints from symbols_pack.
5154 * src/symtab.c (symbol_new, symbol_class_set,
5155 symbol_check_alias_consistency): Undo changes in previous commit: count
5156 each string literal as a new symbol and token, assign it a symbol
5157 number, and don't complain about non-aliased string literals.
5158 (symbols_pack): Since symbol_make_alias still does not decrement symbol
5159 and token counts but does still set aliased tokens to the same number,
5160 symbol_pack_processor now leaves empty slots in the symbols array.
5161 Remove those slots.
5162 * tests/regression.at (Undeclared string literal): Remove test case
5163 added in previous commit since non-aliased string literals are allowed
5164 again.
5165 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
5166 remove unnecessary string literal declarations.
5167 * tests/sets.at (Firsts): Likewise.
5168
5169 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
5170
5171 Don't allow an undeclared string literal, but allow a string literal to
5172 be used before its declaration.
5173 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
5174 symbols_pack complained.
5175 * src/symtab.c (symbol_new): Don't count a string literal as a new
5176 symbol.
5177 (symbol_class_set): Don't count a string literal as a new token, and
5178 don't assign it a symbol number since symbol_make_alias does that.
5179 (symbol_make_alias): It's not necessary to decrement the symbol and
5180 token counts anymore. Don't assume that an alias declaration occurs
5181 before any uses of the identifier or string, and thus don't assert that
5182 one of them has the highest symbol number so far.
5183 (symbol_check_alias_consistency): Complain if there's a string literal
5184 that wasn't declared as an alias.
5185 (symbols_pack): Bail if symbol_check_alias_consistency failed since
5186 symbol_pack asserts that every token has been assigned a symbol number
5187 although undeclared string literals have not.
5188 * tests/regression.at (String alias declared after use, Undeclared
5189 string literal): New test cases.
5190 (Characters Escapes, Web2c Actions): Declare string literals as
5191 aliases.
5192 * tests/sets.at (Firsts): Likewise.
5193
5194 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
5195
5196 In the grammar scanner, STRING_FINISH unclosed constructs and return
5197 them to the parser in order to improve error messages.
5198 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
5199 SC_BRACED_CODE, SC_PROLOGUE): Implement.
5200 * tests/input.at (Unclosed constructs): New test case.
5201 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
5202 seen.
5203
5204 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
5205 unused global.
5206
5207 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
5208
5209 Handle string aliases for character tokens correctly.
5210 * src/symtab.c (symbol_user_token_number_set): If the token has an
5211 alias, check and set its alias's user token number instead of its own,
5212 which is set to indicate the alias. Previously, every occurrence of
5213 the character token in the grammar overwrote that alias indicator with
5214 the character code.
5215 * tests/input.at (String aliases for character tokens): New test.
5216
5217 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
5218
5219 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
5220
5221 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
5222
5223 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
5224 to prevent failures when building on older platforms.
5225 Check for autopoint failure.
5226 Set XGETTEXT_OPTIONS to values that check for C format strings,
5227 so that translators are warned about them (this also helps
5228 prevent core dumps).
5229
5230 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
5231 function, since it simplifies our code a bit.
5232
5233 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
5234 rather than -W, so we don't get bogus warnings about sign comparisons.
5235 Add -Wpointer-arith, since that warning is useful (it reports code
5236 that does not conform to C89 and that some compilers reject).
5237 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
5238 since it's no longer needed.
5239
5240 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 Clean up scanners a bit.
5243 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5244 definitions so gcc won't warn when obstack_for_string is unused.
5245 * src/scan-code.l: config.h and system.h are already #include'd by
5246 scan-code-c.c, so get rid of them here.
5247 * src/scan-gram.l: Likewise.
5248 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
5249 definitions rather than duplicating the rest of it.
5250 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
5251
5252 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
5253
5254 Suppress signed/unsigned comparison warnings for yycheck.
5255 * data/c.m4 (b4_safest_int_type): New macro.
5256 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
5257 a signed int type, cast it to b4_safest_int_type first.
5258 * data/yacc.c: Likewise.
5259 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
5260 also overwritten.
5261
5262 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
5263
5264 * doc/bison.texinfo: Fix some typos.
5265
5266 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
5267
5268 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
5269 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
5270
5271 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
5272 the latest gnulib does this a different way.
5273 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
5274 translation was patched, so stop omitting it.
5275
5276 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 Enable declaration of default %printer/%destructor. Make the parser
5279 use these for all user-declared grammar symbols for which the user does
5280 not declare a specific %printer/%destructor. Thus, the parser uses it
5281 for token 0 if the user declares it but not if Bison generates it as
5282 $end. Discussed starting at
5283 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
5284 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
5285 and
5286 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
5287 * NEWS (2.3+): Mention.
5288 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
5289 declare a %destructor for a mid-rule's semantic value. It's just
5290 impossible to declare one specific to it.
5291 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
5292 code. Describe default %destructor form.
5293 * src/parse-gram.y (grammar_declaration): Parse default
5294 %printer/%destructor declarations.
5295 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
5296 and symbol_destructor_location_get rather than accessing the destructor
5297 and destructor_location members of struct symbol.
5298 (symbol_printers_output): Likewise but for %printer's.
5299 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
5300 again.
5301 * src/symtab.c (default_destructor, default_destructor_location,
5302 default_printer, default_printer_location): New static global
5303 variables to record the default %destructor and %printer.
5304 (symbol_destructor_get, symbol_destructor_location_get,
5305 symbol_printer_get, symbol_printer_location_get): New functions to
5306 compute the appropriate %destructor and %printer for a symbol.
5307 (default_destructor_set, default_printer_set): New functions to set the
5308 default %destructor and %printer.
5309 * src/symtab.h: Prototype all those new functions.
5310 * tests/actions.at (Default %printer and %destructor): New test to
5311 check that the right %printer and %destructor are called, that they're
5312 not called for $end, and that $$ and @$ work correctly.
5313 (Default %printer and %destructor for user-declared end token): New
5314 test to check that the default %printer and %destructor are called for
5315 a user-declared end token.
5316 * tests/input.at (Default %printer and %destructor redeclared, Unused
5317 values with default %destructor): New tests to check related grammar
5318 warnings and errors.
5319
5320 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
5321
5322 Clean up handling of %destructor for the end token (token 0).
5323 Discussed starting at
5324 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
5325 and
5326 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
5327
5328 Make the skeletons consistent in how they pop the end token and invoke
5329 its %destructor.
5330 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
5331 state, which has token number 0, since this would invoke the
5332 %destructor for the end token.
5333 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
5334 until after shifting the end token, or else it won't be popped.
5335 * data/yacc.c (yyparse): Likewise.
5336
5337 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
5338 it's the end token. Upon termination, destroy an unshifted lookahead
5339 even when it's the end token.
5340 * data/lalr1.cc (yy::parser::parse): Likewise.
5341 * data/yacc.c (yyparse): Likewise.
5342
5343 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
5344 value warnings for the end token when the user gives the end token a
5345 %destructor.
5346
5347 * tests/actions.at (Printers and Destructors): Test all the above.
5348
5349 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
5350
5351 Update to latest gnulib and gettext versions.
5352 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
5353 Add fopen-safer.
5354 (gnulib_files): Add m4/warning.m4. Don't worry about files
5355 overwritten by autopoint.
5356 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
5357 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
5358 rejects them.
5359 Don't use autoreconf; instead, invoke autopoint etc. by hand,
5360 so that we can remove the intl files at a better time.
5361 (intl_files_to_remove): Remove aclocal.m4, since it gets
5362 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
5363 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
5364 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5365 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
5366 Remove datarootdir hack; no longer needed.
5367 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
5368 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
5369 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
5370 strdup.h.
5371 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
5372 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
5373
5374 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
5375
5376 * bootstrap: Adjust to today's change to gnulib-tool by invoking
5377 it with --assume-autoconf='latest-stable'.
5378
5379 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
5380
5381 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
5382 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
5383 YYSTYPE' and `{'.
5384 * src/muscle_tab.h (muscle_grow): Replace the header comments with
5385 those from muscle_tab.c since the old ones are misleading.
5386
5387 2006-07-13 Akim Demaille <akim@epita.fr>
5388
5389 Support %define "KEY" {VALUE}.
5390 * src/scan-code.h, src/scan-code.l (translate_action)
5391 (translate_rule_action, translate_symbol_action, translate_code):
5392 Return char *, not const char *.
5393 * src/parse-gram.y (declaration): Rename as...
5394 (prologue_declaration): this.
5395 (string_content): Remove this nonterminal, use STRING.
5396 (braceless, content, content.opt): New nonterminal.
5397 Use them.
5398 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
5399 as value.
5400 * src/scan-gram.l (getargs.h): Don't include it.
5401
5402 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
5403
5404 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
5405 rather than a for-loop that declares a local bool variable. This
5406 should work around a compatibility problem with a Cray x1e C++
5407 compiler reported by Hung Nguyen in
5408 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
5409 The for-loop was introduced in the 2004-11-17 change but I don't
5410 know why it was needed.
5411
5412 2006-07-12 Akim Demaille <akim@epita.fr>
5413
5414 * data/c.m4: Comment changes.
5415
5416 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
5417
5418 * src/complain.c (error_message, ERROR_MESSAGE): New.
5419 To factor...
5420 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
5421 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
5422
5423 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5424
5425 * NEWS: Instead of %union, you can define and use your own union type
5426 YYSTYPE if your grammar contains at least one <type> tag.
5427 Your YYSTYPE need not be a macro; it can be a typedef.
5428 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
5429 (Union Decl, Decl Summary): Document this.
5430 * data/glr.c (YYSTYPE): Implement this.
5431 * data/glr.cc (YYSTYPE): Likewise.
5432 * data/lalr1.cc (YYSTYPE): Likewise.
5433 * data/yacc.c (YYSTYPE): Likewise.
5434 * src/output.c (prepare): Output tag_seen_flag.
5435 * src/parse-gram.y (declaration, grammar_declaration):
5436 Use 'union_seen' rather than 'typed' to determine whether
5437 %union has been seen, since grammars can now be typed without
5438 %union.
5439 (symbol_declaration, type.opt, symbol_def):
5440 Keep track of whether a tag has been seen.
5441 * src/reader.c (union_seen, tag_seen): New vars.
5442 (typed): remove.
5443 * src/reader.h (union_seen, tag_seen, typed): Likewise.
5444 * src/scan-code.l (untyped_var_seen): New variable.
5445 (handle_action_dollar): Adjust to above changes.
5446 (handle_action_dollar, handle_action_at):
5447 Improve overflow checking for outlandish numbers.
5448 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
5449 avoid new diagnostics generated by above changes.
5450 * tests/regression.at (YYSTYPE typedef): Add test to check
5451 for type tags without %union.
5452
5453 * src/symlist.c (symbol_list_length): Return int, not unsigned
5454 int, since callers expect int. This may need to get revisited
5455 once we have proper integer overflow checking.
5456
5457 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
5458 object is now static.
5459
5460 * src/getargs.c (flags_argmatch): Return void, not int,
5461 to pacify ./configure --enable-gcc-warnings.
5462
5463 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
5464 since last_string is already defined to FLEX_PREFIX (last_string).
5465
5466 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5467
5468 Implement --warnings/-W.
5469 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
5470 replaced by...
5471 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
5472 Adjust callers.
5473 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
5474 (warnings_args, warnings_types): New.
5475 (getargs, short_options, long_options): Accept -W/--warnings.
5476 Sort the options by alphabetical order, upper case letter right
5477 before its lower case.
5478
5479 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5480
5481 Change %merge result type clash warnings to errors. Discussed at
5482 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
5483 * src/reader.c (record_merge_function_type): Use complain_at.
5484 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5485 declared later): Update test case results.
5486
5487 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
5488
5489 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
5490 to be in alphabetical order.
5491 (trace_args): Spelling fixes.
5492
5493 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
5494
5495 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
5496 so they don't collide with user-defined macros.
5497 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
5498 this was never guaranteed, and now that we're using gnulib stdint,
5499 which defines int_fast16_t to long int, the problem is exposed.
5500
5501 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
5502
5503 * data/c.m4 (b4_basename): Simplify a bit, since we don't
5504 need the full POSIX semantics (and weren't implementing them
5505 anyway).
5506
5507 Adjust to Autoconf 2.60 and today's gnulib.
5508 * bootstrap (gnulib_modules): Add stdint.
5509 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
5510 no longer copies it.
5511 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
5512 since stdint needs the former and wcwidth (which is now required
5513 by mbswidth) needs the latter.
5514 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
5515 work around a compatibility glitch between gettext 0.14.6 and
5516 Autoconf 2.60.
5517 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
5518 Do not check for uintptr_t, since new stdint module does the right
5519 thing.
5520 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
5521 Add stdint.h, stdint_.h, wcwidth.h.
5522 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
5523 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
5524 stdint.m4, wchar_t.m4, wcwidth.m4.
5525 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
5526 usual order for ../lib/*.h files.
5527 (file_name_split): Use last_component, not base_name, to adjust
5528 to gnulib changes.
5529 * src/parse-gram.h: Include <strverscmp.h> in the usual order
5530 for ../lib/*.h files.
5531 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
5532 Define unconditionally, since we now assume the stdint module.
5533 * src/scan-skel.l: Include <dirname.h>.
5534 (BASE_QPUTS): Use last_component, not base_name.
5535 * src/system.h: Include <unlocked-io.h> in the usual order
5536 for ../lib/*.h files. Include <stdint.h> unconditionally,
5537 since we now use the stdint module.
5538 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
5539 HAVE_UINTPTR_T, since we now use the stdint module.
5540 (base_name): Remove decl, since files now include <dirname.h>
5541 to get the decl.
5542
5543 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5544
5545 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
5546 New, default to 1.
5547 * data/yacc.c, data/glr.c, data/location.cc: Use them.
5548 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
5549 default.
5550 * tests/calc.at: Adjust.
5551
5552 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
5553
5554 * data/c.m4 (b4_basename): New.
5555 (b4_syncline): Also output the location of its invocation (from
5556 the skeleton).
5557 (b4_user_action, b4_define_user_action, b4_user_actions)
5558 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
5559 (b4_user_stype): New.
5560 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
5561
5562 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5563
5564 In the grammar file, the first column is 1 not 0 on the first line as
5565 on every other line.
5566 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
5567 * tests/input.at (Torturing the Scanner): Update output.
5568
5569 * src/scan-gram.l (scanner_cursor): Declare it static.
5570
5571 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
5572
5573 In warnings, say "previous declaration" rather than "first
5574 declaration".
5575 * src/symtab.c (redeclaration): Do that here.
5576 * src/reader.c (record_merge_function_type): In the case of a result
5577 type clash, report the previous declaration rather than the very first
5578 one in the grammar file.
5579 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5580 declared later): Add a third declaration to check this behavior.
5581 * tests/input.at (Incompatible Aliases): Update output.
5582
5583 2006-06-27 Akim Demaille <akim@epita.fr>
5584
5585 * doc/Doxyfile.in: New.
5586 * doc/Makefile.am: Use it.
5587 * src/lalr.h, src/symtab.h: Initial doxygenation.
5588
5589 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5590
5591 Don't miss %merge result type warnings just because the LHS types are
5592 declared after the %merge. This continues the effort of the previous
5593 patch.
5594 * src/reader.c (get_merge_function): Don't set the merger type yet.
5595 (record_merge_function_type): New function for setting the merger type
5596 and checking for clashes.
5597 (grammar_current_rule_merge_set): Set the location of the %merge for
5598 the current rule.
5599 (packgram): Invoke record_merge_function_type for each rule now that
5600 all symbol type declarations have been parsed.
5601 * src/reader.h (merger_list.type_declaration_location): New member
5602 storing the location of the first %merge from which the type for this
5603 merging function was derived.
5604 * src/symlist.h (symbol_list.merger_declaration_location): New member
5605 storing the location of a rule's %merge, if any.
5606 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
5607 declared later): New test to catch the error fixed by the above patch.
5608
5609 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5610
5611 Get action warnings (grammar_rule_check) right even when symbol
5612 declarations appear after the rules. Discussed at
5613 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
5614 and
5615 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
5616 Don't mistake the type of $$ in a midrule to be that of its parent
5617 rule's $$.
5618 * src/reader.c (grammar_current_rule_end): Don't invoke
5619 grammar_rule_check yet since not all symbol declarations may have been
5620 parsed yet.
5621 (grammar_midrule_action): Likewise.
5622 Don't record whether the midrule's $$ has been used yet since actions
5623 haven't been translated yet.
5624 Record the midrule's parent rule and its RHS index within the parent
5625 rule.
5626 (grammar_current_rule_action_append): Don't translate the action yet
5627 since not all symbol declarations may have been parsed yet and, thus,
5628 warnings about types for $$, $n, @$, and @n can't be reported yet.
5629 (packgram): Translate the action and invoke grammar_rule_check now that
5630 all symbol declarations have been parsed.
5631 * src/scan-code.l (handle_action_dollar): Now that this is invoked
5632 after parsing the entire grammar file, the symbol list here in the case
5633 of a midrule is actually the midrule's empty RHS, so reference its
5634 parent rule's RHS where necessary.
5635 On the other hand, now that you can already know it's a midrule, you
5636 aren't forced to think $$ has the same type as its parent rule's $$.
5637 (handle_action_at): In the case of a midrule, reference the parent rule
5638 where necessary.
5639 * src/symlist.c (symbol_list_new): Initialize new midrule-related
5640 members.
5641 (symbol_list_length): Now that this is invoked after all rules have
5642 been parsed, a NULL symbol (rather than a NULL symbol list node)
5643 terminates a rule. symbol_list_print already does this correctly.
5644 * src/symlist.h (symbol_list.midrule_parent_rule,
5645 symbol_list.midrule_parent_rhs_index): New members so that midrules can
5646 remember their relationships with their parents.
5647 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
5648 fixed by the above patch.
5649 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
5650 implementing...
5651 (Unused values): ... this old test case and...
5652 (Unused values before symbol declarations): ... this new test case.
5653 This one is the same as `Unused values' except that all symbol
5654 declarations appear after the rules in order to catch the rest of the
5655 errors fixed by the above patch.
5656
5657 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 More cleanup.
5660 * src/reader.c (current_rule): Declare it static since it's no longer
5661 used outside this file.
5662 (grammar_current_rule_action_append): Remove redundant arguments from
5663 translate_rule_action invocation.
5664 * src/reader.h (current_rule): Remove this unused extern.
5665 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
5666 * src/scan-code.l (translate_rule_action): Likewise.
5667
5668 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
5669
5670 Clean up yesterday's patch.
5671 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
5672 to...
5673 * src/reader.c (grammar_current_rule_action_append): ... here for
5674 consistency with grammar_current_rule_symbol_append.
5675 * tests/regression.at (Braced code in declaration in rules section):
5676 Make yyerror and yylex static as usual.
5677
5678 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
5679
5680 Fix bug that mistakes braced code in a declaration in the rules section
5681 to be a rule action. Mentioned at
5682 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
5683 * src/scan-gram.l: Move midrule action detection from the start of the
5684 scanning of any braced code to...
5685 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
5686 action. For readability, use $2 and @2 rather than the equivalent
5687 global variables.
5688 * tests/regression.at (Braced code in declaration in rules section):
5689 New test to catch the error fixed by the above patch.
5690
5691 Work on code readability some.
5692 * src/scan-code.l (current_rule): Get rid of this misleading and
5693 redundant declaration: it's actually extern'ed in reader.h.
5694 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
5695 translate_action): Add a rule argument and use it instead of the global
5696 current_rule.
5697 (translate_rule_action): This already receives current_rule through an
5698 argument, so pass it on to translate_action instead of assigning
5699 current_rule to current_rule.
5700 (translate_symbol_action, translate_code): Pass rule = NULL to
5701 translate_action.
5702
5703 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
5704
5705 Rename %before-definitions to %start-header and %after-definitions to
5706 %end-header. Don't use these declarations to separate pre-prologue
5707 blocks from post-prologue blocks. Add new order-independent
5708 declarations %before-header and %after-header as alternatives to the
5709 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
5710 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
5711 * NEWS (2.3+): Update for these changes.
5712 * data/glr.c (b4_before_definitions): Update to...
5713 (b4_start_header): ... this.
5714 (b4_after_definitions): Update to...
5715 (b4_end_header): ... this.
5716 * data/glr.cc: Likewise.
5717 * data/lalr1.cc: Likewise.
5718 * data/yacc.c: Likewise.
5719 * doc/bison.texinfo (The prologue): Update names, and replace remaining
5720 prologue blocks with %*-header declarations.
5721 (Calc++ Parser): Likewise.
5722 (Decl Summary): Update names.
5723 (Table of Symbols): Update description.
5724 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
5725 (PERCENT_END_HEADER): ... this.
5726 (PERCENT_BEFORE_DEFINITIONS): Update to...
5727 (PERCENT_START_HEADER): ... this.
5728 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5729 (declaration): Update token names and m4 macro names.
5730 When parsing %end-header and %start-header, invoke translate_code
5731 before muscle_code_grow, and no longer set global booleans to remember
5732 whether these declarations have been seen.
5733 Parse new %after-header and %before-header.
5734 * src/reader.c (before_definitions, after_definitions): Remove.
5735 (prologue_augment): Accept a new bool argument to specify whether to
5736 augment the pre-prologue or post-prologue.
5737 * src/reader.h (before_definitions, after_definitions): Remove these
5738 extern's.
5739 (prologue_augment): Add new bool argument.
5740 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
5741 (PERCENT_END_HEADER): ... this.
5742 (PERCENT_BEFORE_DEFINITIONS): Update to...
5743 (PERCENT_START_HEADER): ... this.
5744 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
5745 * tests/actions.at (Printers and Destructors): Update names.
5746
5747 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
5748
5749 Add comparison operators for C++ location classes. Discussed at
5750 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
5751 * data/c++.m4 (b4_define_location_comparison): New boolean %define
5752 declaration indicating whether filename_type has an operator==. If
5753 filename_type is `std::string', it defaults to `1', `0' otherwise.
5754 * data/location.cc: Iff b4_define_location_comparison is `1', add
5755 operator== and operator!= for class position and for class location.
5756
5757 Some minor fixes.
5758 * src/scan-action.l: Remove unused file.
5759 * src/symtab.c (symbol_printer_set): Use printer_location not
5760 destructor_location.
5761 * src/symtab.h (struct symbol): Replace incorrect source comment for
5762 printer members.
5763 * tests/input.at (Incompatible Aliases): Update output with correct
5764 printer location.
5765
5766 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
5767
5768 Don't put the pre-prologue in the header file. For the yacc.c code
5769 file and the glr.c header and code files, move the pre-prologue before
5770 the token definitions. Add new %before-definitions and
5771 %after-definitions to declare code that will go in both the header file
5772 and code file. Discussed at
5773 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
5774 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
5775 and
5776 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
5777 * NEWS (2.3+): Describe these changes.
5778 * data/glr.c (b4_pre_prologue): Move from within to before...
5779 (b4_shared_declarations): ... this.
5780 Add new b4_before_definitions before b4_token_enums.
5781 Add new b4_after_definitions at the end.
5782 * data/glr.cc (b4_pre_prologue): Replace with...
5783 (b4_before_definitions): ... this in the header file.
5784 (b4_after_definitions): New near the end of the header file.
5785 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
5786 code file right before including the header file.
5787 (b4_before_definitions): New in the previous position of
5788 b4_pre_prologue in the header file.
5789 (b4_after_definitions): New near the end of the header file.
5790 * data/yacc.c: Clean up some m4 quoting especially in the header file.
5791 (b4_token_enums_defines): In the code file, move to right before
5792 YYSTYPE for consistency with the header file.
5793 (b4_before_definitions): New right before b4_token_enums_defines in
5794 both the header and code file.
5795 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5796 header and code file.
5797 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5798 of prologues for %union dependencies.
5799 (Decl Summary): In %defines description, mention the effect of
5800 %before-definitions and %after-definitions on the header file.
5801 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5802 than in the pre-prologue so that make check succeeds.
5803 (Table of Symbols): Add entries for %before-definitions and
5804 %after-definitions.
5805 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5806 %before-definitions.
5807 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5808 (declaration): Parse those declarations and append to
5809 b4_before_definitions and b4_after_definitions, respectively.
5810 * src/reader.c (before_definitions, after_definitions): New bools to
5811 track whether those declarations have been seen.
5812 (prologue_augment): Add to the post-prologue if %union,
5813 %before-definitions, or %after-definitions has been seen.
5814 * src/reader.h (before_definitions, after_definitions): New extern's.
5815 * src/scan-gram.l: Scan the new declarations.
5816 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5817 prologue block in a %before-definitions or a %after-definitions based
5818 on whether the %union is declared.
5819 * tests/regression.at (Early token definitions with --yacc, Early token
5820 definitions without --yacc): Move tests for token definitions into the
5821 post-prologue since token names are no longer defined in the
5822 pre-prologue.
5823
5824 2006-06-20 Akim Demaille <akim@epita.fr>
5825
5826 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5827 (symbol_get): Use it.
5828 * src/parse-gram.y: Use it.
5829
5830 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5831
5832 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5833 build succeeds when configured with --enable-gcc-warnings.
5834
5835 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5836
5837 * src/parse-gram.y (char_name): New function.
5838 (CHAR, STRING, string_content): For %printer, properly escape.
5839 (ID): Prefer fputs to fprintf.
5840 (id): Reindent to be consistent with other rules.
5841 Properly quote char.
5842
5843 The Translation Project changed its way of publishing translations
5844 to maintainers. I haven't received any responses to my request
5845 for supporting the old way, or for documenting the new way. I
5846 have modified 'bootstrap' to use screen scraping
5847 (in this case, HTML scraping). This is unreliable and inelegant,
5848 but I don't see any better way. Yuck.
5849 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5850 (get_translations): New function, which uses HTML scraping to
5851 deduce locations of latest translations.
5852 Use this function to grab both bison and bison-runtime .po files.
5853 Don't bother priming the pump for the runtime-po domain any more,
5854 as it's now translated better than bison is.
5855
5856 2006-06-19 Akim Demaille <akim@epita.fr>
5857
5858 * src/scan-gram.l: No longer "parse" things after `%union' until
5859 `{'. Rather, return a single "%union" token.
5860 No longer make symbols: return strings, and leave the conversion
5861 to symbols to the parser.
5862 (SC_PRE_CODE, token_type): Remove.
5863 * src/parse-gram.y (%union): New field `character'.
5864 Sort tokens.
5865 (CHAR): New token.
5866 (ID, ID_COLON): Now that the scanner no longer makes them
5867 identifiers, adjust all uses to invoke symbol_get.
5868 (id_colon): New, wraps the conversion from string to symbol.
5869 (%union): Accept a possible union_name.
5870 (symbol): Now can be a char.
5871 * data/c.m4 (b4_union_name): Leave a default value.
5872 * data/glr.c, data/yacc.c: Use it.
5873
5874 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5875
5876 For associating token numbers with token names for "yacc.c", don't use
5877 #define statements unless `--yacc' is specified; always use enum
5878 yytokentype. Most important discussions start at:
5879 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5880 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5881 and
5882 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5883 * NEWS (2.3+): Mention.
5884 * data/c.m4 (b4_yacc_if): New.
5885 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5886 token #define's.
5887 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5888 on token name definitions.
5889 * src/getargs.c (usage): Capitalize `Yacc' in English.
5890 * src/output.c (prepare): Define b4_yacc_flag.
5891 * tests/regression.at (Early token definitions): Test that tokens names
5892 are defined before the pre-prologue not just before the post-prologue.
5893 Remove this test case and copy to...
5894 (Early token definitions with --yacc): ... this to test #define's.
5895 (Early token definitions without --yacc): ... and this to test enums.
5896
5897 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5898
5899 * NEWS: Reword the post-2.3 change to not be so optimistic about
5900 removing the old "look-ahead" spelling.
5901 Update previous look-ahead/lookahead change reports.
5902 * REFERENCES: look-ahead -> lookahead (since that's
5903 what he actually wrote).
5904 * doc/refcard.tex: look ahead -> lookahead,
5905 look-ahead -> lookahead
5906
5907 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5908
5909 For consistency, use `lookahead' instead of `look-ahead' or
5910 `look_ahead'. Discussed starting at
5911 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5912 and then at
5913 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5914 * NEWS: For the next release, note the change to `--report'.
5915 * TODO, doc/bison.1: Update English.
5916 * doc/bison.texinfo: Update English.
5917 (Understanding Your Parser, Bison Options): Document as
5918 `--report=lookahead' rather than `--report=look-ahead'.
5919 * src/conflicts.c: Update English in comments.
5920 (lookahead_set): Rename from look_ahead_set.
5921 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5922 (resolve_sr_conflict): Rename local look_ahead_tokens to
5923 lookahead_tokens, and update other uses.
5924 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5925 count_rr_conflicts, conflicts_free): Update uses.
5926 * src/getargs.c (report_args): Move "lookahead" before alternate
5927 spellings.
5928 (report_types): Update uses.
5929 (usage): For `--report' usage description, state `lookahead' spelling
5930 rather than `look-ahead'.
5931 * src/getargs.h (report.report_lookahead_tokens): Rename from
5932 report_look_ahead_tokens.
5933 * src/lalr.c: Update English in comments.
5934 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5935 (state_lookahead_tokens_count): Rename from
5936 state_look_ahead_tokens_count.
5937 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5938 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5939 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5940 Update other uses.
5941 Update English in output.
5942 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5943 * src/print.c: Update English in comments.
5944 (lookahead_set): Rename from look_ahead_set.
5945 (print_reduction): Rename argument lookahead_token from
5946 look_ahead_token.
5947 (print_core, state_default_rule, print_reductions, print_results):
5948 Update uses.
5949 * src/print_graph.c: Update English in comments.
5950 (print_core): Update uses.
5951 * src/state.c: Update English in comments.
5952 (reductions_new): Update uses.
5953 (state_rule_lookahead_tokens_print): Rename from
5954 state_rule_look_ahead_tokens_print, and update other uses.
5955 * src/state.h: Update English in comments.
5956 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5957 (state_rule_lookahead_tokens_print): Rename from
5958 state_rule_look_ahead_tokens_print.
5959 * src/tables.c: Update English in comments.
5960 (conflict_row, action_row): Update uses.
5961 * tests/glr-regression.at
5962 (Incorrect lookahead during deterministic GLR,
5963 Incorrect lookahead during nondeterministic GLR): Rename
5964 print_look_ahead to print_lookahead.
5965 * tests/torture.at: Update English in comments.
5966 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5967 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5968 (Many lookahead tokens): Update uses.
5969 * data/glr.c: Update English in comments.
5970 * lalr1.cc: Likewise.
5971 * yacc.c: Likewise.
5972 * src/conflicts.h: Likewise.
5973 * src/lalr.h: Likewise.
5974 * src/main.c: Likewise.
5975 * src/output.c: Likewise.
5976 * src/parse-gram.c: Likewise.
5977 * src/tables.h: Likewise.
5978 * tests/calc.at: Likewise.
5979
5980 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5981
5982 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5983
5984 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5985
5986 * TODO: Add request from Nelson H. F. Beebe to be able to install
5987 Bison without installing the yacc script.
5988
5989 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5990
5991 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5992 and yytext if they're already #define'd.
5993 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5994 * src/scan-code-c.c: ... here.
5995 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5996 <config.h>.
5997
5998 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5999
6000 Get Bison to build again when configured with --enable-gcc-warnings.
6001 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
6002 missing #include's.
6003 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
6004 loc argument as it shadows a global.
6005 * src/scan-gram.l: Remove stray comma that prevents boundary_set
6006 invocation.
6007
6008 * src/.cvsignore: Add scan-code.c.
6009
6010 2006-06-07 Akim Demaille <akim@epita.fr>
6011
6012 * src/scan-gram.l: Move the "add a trailing ; to actions" code
6013 to...
6014 * src/scan-code.l: here.
6015 * tests/input.at (Torturing the Scanner): Fix another location
6016 error.
6017
6018 2006-06-07 Akim Demaille <akim@epita.fr>
6019
6020 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
6021
6022 2006-06-06 Akim Demaille <akim@epita.fr>
6023
6024 Extract the parsing of user actions from the grammar scanner.
6025 As a consequence, the relation between the grammar scanner and
6026 parser is much simpler. We can also split "composite tokens" back
6027 into simple tokens.
6028 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
6029 * src/scan-gram.l (add_column_width, adjust_location): Move to and
6030 rename as...
6031 * src/location.h, src/location.c (add_column_width)
6032 (location_compute): these.
6033 Fix the column count: the initial column is 0.
6034 (location_print): Be robust to ending column being 0.
6035 * src/location.h (boundary_set): New.
6036 * src/main.c: Adjust to scanner_free being renamed as
6037 gram_scanner_free.
6038 * src/output.c: Include scan-code.h.
6039 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
6040 Use boundary_set.
6041 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
6042 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
6043 which is now, again, a separate token.
6044 Adjust all dependencies.
6045 Whereever actions with $ and @ are used, use translate_code.
6046 (action): Remove this nonterminal which is now useless.
6047 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
6048 (grammar_current_rule_action_append): Use translate_code.
6049 (packgram): Bound check ruleno, itemno, and rule_length.
6050 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
6051 (last_string, last_braced_code_loc, max_left_semantic_context)
6052 (scanner_initialize, scanner_free, scanner_last_string_free)
6053 (gram_out, gram_lineno, YY_DECL_): Move to...
6054 * src/scan-gram.h: this new file.
6055 (YY_DECL): Rename as...
6056 (GRAM_DECL): this.
6057 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
6058 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6059 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6060 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6061 Move these declarations, and...
6062 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
6063 these to...
6064 * src/flex-scanner.h: this new file.
6065 * src/scan-gram.l (rule_length, rule_length_overflow)
6066 (increment_rule_length): Remove.
6067 (last_braced_code_loc): Rename as...
6068 (gram_last_braced_code_loc): this.
6069 Adjust to the changes of the parser.
6070 Move all the handling of $ and @ into...
6071 * src/scan-code.l: here.
6072 * src/scan-gram.l (handle_dollar, handle_at): Remove.
6073 (handle_action_dollar, handle_action_at): Move to...
6074 * src/scan-code.l: here.
6075 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
6076 scan-code.h, scan-code-c.c, scan-gram.h.
6077 (EXTRA_bison_SOURCES): Add scan-code.l.
6078 (BUILT_SOURCES): Add scan-code.c.
6079 (yacc): Be robust to white spaces.
6080
6081 * tests/conflicts.at, tests/input.at, tests/reduce.at,
6082 * tests/regression.at: Adjust the column numbers.
6083 * tests/regression.at: Adjust the error message.
6084
6085 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6086
6087 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6088 Use Akim's wording from
6089 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
6090
6091 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
6092
6093 Between Bison releases, manually append `+' to the previous Bison
6094 release number, and use that as a signal to automatically print the
6095 ChangeLog's CVS Id keyword from --version. Discussed starting at
6096 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
6097 * ChangeLog: Add Id header.
6098 * configure.ac (AC_INIT): Append `+' to `2.3'.
6099 * src/.cvsignore: Add revision.c.
6100 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
6101 (BUILT_SOURCES): Add revision.c.
6102 (revision.c): New target rule. This file defines a new global variable
6103 named revision. It initializes it with either the Id from ChangeLog
6104 or, if VERSION doesn't contain `+', with the empty string.
6105 * src/getargs.c (version): Print the value of revision.
6106 * src/revision.h: Extern revision.
6107
6108 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
6109
6110 * NEWS: Version 2.3.
6111 * configure.ac (AC_INIT): Likewise.
6112
6113 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
6114
6115 * data/glr.c (YYRECOVERING): Define to be a function-like macro
6116 with no arguments, not as an object-like macro. This is for
6117 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
6118 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
6119 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
6120 Document this.
6121
6122 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
6123
6124 * src/getargs.c (usage): Back out yesterday's modification of the
6125 --help output so that we don't have to wait for translation before
6126 releasing 2.3.
6127
6128 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
6129
6130 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
6131 Problem reported by Akim Demaille.
6132
6133 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
6134
6135 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
6136
6137 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
6138
6139 * data/yacc.c (yy_reduce_print): Omit trailing white space in
6140 generated source code. Problem reported by Frans Englich in
6141 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
6142
6143 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
6144
6145 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
6146 shell, not within 'make', so that 'make' by an ordinary builder
6147 (using GNU make) does not worry about configuring gzip. This also
6148 works around a bug reported independently by Keith Thompson and by
6149 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
6150 stderr rather than stdout, messing up the build logs.
6151
6152 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6153
6154 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
6155 to make sure that YYID will never be unused. This fixes a 'make
6156 maintainer-check' failure caused by the recent changes to the 'Trivial
6157 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
6158 not used.
6159 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
6160
6161 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
6162
6163 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
6164 state before an empty RHS is always resolved here. Only the location
6165 of that state is guaranteed to be resolved, and that's enough. This
6166 fixes the remaining bug reported by Derek M. Jones in
6167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6168 * tests/glr-regression.at (Uninitialized location when reporting
6169 ambiguity): Test the above case.
6170 Also, the embedded comments in this test case claim it checks the case
6171 of an empty RHS that has inherited the initial location. However, the
6172 corresponding LHS was already resolved, so yyresolveLocations didn't
6173 actually have reason to modify it. Fix this by forcing
6174 nondeterministic operation at the beginning of the parse.
6175
6176 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
6177
6178 * data/c.m4 (b4_yy_symbol_print_generate):
6179 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
6180 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
6181 of the bugs reported today by Derek M Jones in
6182 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
6183 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
6184 defined to be a type name without parens or brackets.
6185 (Location Type): Similarly for YYLTYPE.
6186 * tests/regression.at (Trivial grammars): Put in a test for this
6187 bug that will be caught by 'make maintainer-check' (though not,
6188 alas, by 'make check' unless your compiler is picky).
6189
6190 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
6191
6192 * NEWS: Version 2.2.
6193 * configure.ac (AC_INIT): Likewise.
6194
6195 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
6196
6197 * data/glr.c (yyreportTree): Make room in yystates for the state
6198 preceding the RHS. This fixes the segmentation fault reported by Derek
6199 M. Jones in
6200 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
6201 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
6202 to the user. Reported for yyreportTree by Derek M. Jones later in the
6203 same thread.
6204 * THANKS: Add Derek M. Jones.
6205 Update my email address.
6206 Fix typo in Steve Murphy's name.
6207
6208 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
6209
6210 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
6211 checking against YYLAST that caused the parser to miss a potential
6212 alternative in its diagnostic.
6213 Problem reported by Maria Jose Moron Fernandez in
6214 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
6215 * data/lalr1.cc (yysyntax_error_): Likewise.
6216 * data/yacc.c (yysyntax_error): Likewise.
6217 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
6218 tokens, in case we run into an older C compiler.
6219 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
6220 Use them to check for the off-by-one error fixed above.
6221
6222 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
6223 YYSIZE_T, not size_t.
6224 * tests/regression.at (Trivial grammars): New test, to catch
6225 the error fixed by the above patch.
6226
6227 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6228
6229 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
6230 scheme.
6231 Reported by Steve Murphy.
6232
6233 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6234
6235 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
6236 * data/glr.cc: b4_location_flag is now b4_locations_flag.
6237
6238 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6239
6240 Implement --trace=m4.
6241 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
6242 * src/output.c (output_skeleton): When set, pass -dV to m4.
6243
6244 Factor the handling of flags in m4.
6245 * src/output.c (prepare): Rename the muscle names debug, defines,
6246 error_verbose to debug_flag, defines_flag, error_verbose_flag.
6247 * data/c.m4: Adjust.
6248 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
6249 Use b4_define_flag_if to define other b4_FLAG_if macros.
6250 (b4_location_if): As a consequence, rename as...
6251 (b4_locations_if): this, for consistency.
6252 Adjust all the skeletons.
6253
6254 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6255
6256 * etc/bench.pm: Shorten bench names.
6257
6258 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
6259
6260 * src/output.h, src/output.c (error_verbose): Move to...
6261 * src/getargs.h, src/getargs.c: here.
6262 Sort the flags.
6263 Adjust dependencies.
6264
6265 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
6266
6267 * data/c.m4 (b4_copyright): Put the special exception for Bison
6268 skeletons here, so we don't have to put it in each skeleton. All
6269 uses changed. Suggested by Akim Demaille. Also, wrap the
6270 copyright notice, in case it is longer than 80 columns. Replace
6271 comma by newline after title.
6272
6273 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
6274
6275 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
6276 incompatibility, not a bug. Mention that it wasn't fixed as of
6277 flex 2.5.33.
6278
6279 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6280
6281 * examples/extexi: Enforce the precedence of concatenation over
6282 >>.
6283 Reported by Tommy Nordgren.
6284
6285 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
6286
6287 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
6288 with the member "token".
6289 Reported by Martin Nylin.
6290
6291 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
6292
6293 * data/glr.c: Switch to Bison 2.2 special-exception language in
6294 the copyright notice. Use more-regular format for titles and
6295 copyright notices.
6296 * data/glr.cc: Likewise.
6297 * data/location.cc: Likewise.
6298 * data/yacc.cc: Likewise.
6299 * doc/bison.texinfo (Conditions): Document this.
6300 * NEWS: likewise. Upgrade version to 2.2.
6301
6302 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
6303
6304 * data/glr.cc: Remove dead code.
6305
6306 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
6307
6308 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
6309 that variable and the line breaks the bootstrap. Problem reported
6310 by Juan M. Guerrero.
6311
6312 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6313
6314 * doc/bison.texinfo (Multiple start-symbols): New.
6315
6316 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
6317
6318 * etc/README, etc/bench.pl: New.
6319
6320 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
6321
6322 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
6323 rule.
6324 Reported by Mickael Labau.
6325 * tests/input.at (Torturing the Scanner): Test it.
6326
6327 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
6328
6329 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
6330 Problem reported by Bob Rossi.
6331
6332 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
6333
6334 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
6335 and didn't really work.
6336 For the index, use @ifnotinfo, not @iftex.
6337 Minor cleanups of spacing and terminology.
6338
6339 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6340
6341 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
6342 of AT_NAME_PREFIX when %name-prefix is not used.
6343
6344 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
6345
6346 Apply --prefix to C++ skeletons too: they change the namespace.
6347 The test suite already exercize these cases.
6348 * data/c++.m4 (b4_namespace): New.
6349 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
6350 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
6351 * data/yacc.c, data/glr.c: Remove a useless `[]'.
6352 * doc/bison.texinfo: Document it.
6353 (Option Cross Key): Use @multitable in all formats. It looks
6354 nicer, even in TeX outputs.
6355 (Rules): Use the same code whatever the output type is.
6356 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
6357 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
6358 * tests/calc.at: Use it, instead of hard coding `yy'.
6359
6360 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6361
6362 * TODO: Remove dead items.
6363
6364 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6365
6366 * doc/FAQ: Remove, merged into...
6367 * doc/bison.texinfo (FAQ): this.
6368 * doc/Makefile.am (EXTRA_DIST): Adjust.
6369
6370 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
6371
6372 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
6373 even if empty.
6374 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
6375 * doc/bison.texinfo (Calc++ Scanner): Use it.
6376
6377 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
6378
6379 Fix two nits reported by twlevo, plus one more that I discovered.
6380
6381 * src/assoc.h (assoc_to_string): Give a name to the arg, as
6382 this is the usual Bison style.
6383 * src/location.h (location_print): Likewise.
6384
6385 * src/reader.h (token_name): Likewise.
6386
6387 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
6388
6389 Fix some nits reported by twlevo.
6390 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
6391 and "POSIX". Use more-modern syntax for URLs. Mention C++
6392 and ask for Java. Don't hardwire OS version numbers. Add
6393 copyright notice.
6394 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
6395 * src/conflicts.c (solved_conflicts_obstack): Now static.
6396
6397 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6398
6399 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
6400 page. Say "you can use it" not "you may use it" as on the web page;
6401 we're describing capabilities not granting permission.
6402
6403 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
6404
6405 * data/glr.c (yyresolveLocations): Rename local variables to avoid
6406 shadowing warnings. Use usual patter for iterating through RHS.
6407 * tests/glr-regression.at
6408 (Uninitialized location when reporting ambiguity):
6409 Modify yylex so that it uses its argument, rather than trying
6410 to rely on ARGSUSED (which doesn't work for gcc with warnings).
6411 const char -> char const.
6412
6413 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
6414 Don't use tabs inside commands; it messes up 'ps'.
6415 Problem reported by twlevo.
6416
6417 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
6418
6419 * tests/glr-regression.at (Uninitialized location when reporting
6420 ambiguity): New test case.
6421 * data/glr.c (yyresolveLocations): New function, which uses
6422 YYLLOC_DEFAULT.
6423 (yyresolveValue): Invoke yyresolveLocations before reporting an
6424 ambiguity.
6425 * doc/bison.texinfo (Default Action for Locations): Note
6426 YYLLOC_DEFAULT's usage for ambiguity locations.
6427 (GLR Semantic Actions): Cross-reference those notes.
6428
6429 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
6430
6431 * tests/glr-regression.at (Leaked semantic values when reporting
6432 ambiguity): Remove unnecessary union and type declarations.
6433 (Leaked lookahead after nondeterministic parse syntax error): New test
6434 case.
6435 * data/glr.c (yyparse): Check for zero stacks remaining before
6436 attempting to shift the lookahead so that you don't lose it.
6437
6438 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6439
6440 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
6441 * tests/glr-regression.at (Leaked semantic values when reporting
6442 ambiguity): New test case.
6443 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
6444 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
6445 now unnecessary yystackp parameter.
6446 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
6447 destructors can be called.
6448
6449 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
6450 in existing testcases.
6451
6452 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6453
6454 Don't leak semantic values for parent RHS when a user action cuts the
6455 parser, and clean up related code a bit.
6456 * tests/glr-regression.at (Leaked merged semantic value if user action
6457 cuts parse): Rename to...
6458 (Leaked semantic values if user action cuts parse): ... this. Add check
6459 for leaked parent RHS values.
6460 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
6461 between an unresolved state (non-empty chain of semantic options) and
6462 an incomplete one (signaled by an empty chain).
6463 (yyresolveStates): Document the interface. Move all manipulation of a
6464 successfully or unsuccessfully resolved yyGLRState to...
6465 (yyresolveValue): ... here so that yyresolveValue always leaves a
6466 yyGLRState with consistent data and thus is easier to understand.
6467 Remove the yyvalp and yylocp parameters since they are always just
6468 taken from the yys parameter. When reporting a discarded merged value
6469 in debugging output, note that it is incompletely merged. Document the
6470 interface.
6471 (yyresolveAction): If resolving any of the RHS states fails, destroy
6472 them all rather than leaking them. Thus, as long as user actions are
6473 written to clean up the RHS correctly, yyresolveAction always cleans up
6474 the RHS of a semantic option. Document the interface.
6475
6476 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
6477
6478 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
6479 led to a segmentation fault in GNU Pascal. Problem reported
6480 by Waldek Hebisch.
6481
6482 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
6483
6484 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
6485 mid-rule action inside a nonterminal symbol in order to declare a
6486 destructor for its semantic value.
6487
6488 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
6489
6490 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
6491 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
6492 __cplusplus && ! defined _STDLIB_H && !
6493 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
6494 defined free))]: Include <stdlib.h> rather than rolling our own
6495 declarations of malloc and free, to avoid problems with
6496 incompatible declarations (using 'throw') C++'s stdlib.h. This
6497 should fix Debian bug 340012
6498 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
6499 reported by Guillaume Melquiond.
6500
6501 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6502
6503 * NEWS: Clarify symbols versus types in unused-value warnings.
6504
6505 * configure.ac (AC_INIT): Bump version number.
6506
6507 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
6508
6509 * NEWS: Version 2.1a.
6510 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
6511 since C99 requires this.
6512
6513 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
6514
6515 * m4/c-working.m4: New file.
6516 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
6517
6518 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
6519
6520 * Makefile.maint: Merge from coreutils.
6521
6522 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
6523
6524 More portability fixes for problems summarized by Nelson H. F. Beebe.
6525
6526 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
6527 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
6528 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
6529 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
6530 messes up because C++ code is compiled in 32-bit mode but linked
6531 in 64-bit mode.
6532
6533 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
6534
6535 More portability fixes for problems summarized by Nelson H. F. Beebe.
6536
6537 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
6538 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
6539
6540 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
6541 nodist_PROGRAMS, since we don't need to actually compile the
6542 example if we're just doing a plain 'make'. This avoids bothering
6543 the installer unnecessarily about problems due to weird C++
6544 compilers.
6545
6546 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
6547
6548 More portability fixes for problems summarized by Nelson H. F. Beebe.
6549
6550 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
6551 than #include "...", and compile with -I'.'. The old method was
6552 not portable, according to Posix and the C standard, and it does
6553 not work with Sun C 5.7, where previous #line directives affect
6554 the working directory used in later #include "..." directives.
6555
6556 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6557
6558 Various DJGGP specific issues in /djgpp
6559
6560 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
6561
6562 More portability fixes for problems summarized by Nelson H. F. Beebe.
6563
6564 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
6565 '#include <map>' works and that you can apply ++ to iterators.
6566
6567 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
6568
6569 Work around portability problems summarized by Nelson H. F. Beebe in
6570 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
6571
6572 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6573 that '#include <string>' works.
6574
6575 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
6576 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
6577 "warning: sorry: semantics of inline function static data `const
6578 unsigned char translate_table[262]' are wrong (you'll wind up with
6579 multiple copies)".
6580
6581 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
6582 or, xor to not_, and_, or_, and xor_, respectively. This works
6583 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
6584 random system header somewhere that includes the equivalent of
6585 <iso646.h>.
6586
6587 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
6588 -E" works; it apparently doesn't work with PathScale EKO Compiler
6589 Suite Version 2.0.
6590
6591 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 During deterministic GLR operation, user actions should be able to
6594 influence the parse by changing yychar. To make this easier to fix and
6595 to make glr.c easier to evolve in general, don't maintain yytoken in
6596 parallel with yychar; just compute yytoken when needed.
6597 * tests/glr-regression.at (Incorrect lookahead during deterministic
6598 GLR): Check that setting yychar in a user action has the intended
6599 effect.
6600 * data/glr.c (yyGLRStack): Remove yytokenp member.
6601 (yyclearin): Don't set *yytokenp.
6602 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
6603 yychar rather than *yytokenp to determine the current lookahead.
6604 Compute yytoken locally when needed.
6605 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
6606 point to.
6607
6608 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
6609 after `--report' documentation.
6610
6611 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
6612
6613 * src/parse-gram.y (grammar_declaration): Location of printer
6614 symbol is @1, not list->location. Bug reported by twlevo.
6615 * tests/input.at (Incompatible Aliases): Adjust to above change.
6616
6617 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
6618
6619 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
6620 all the test at once. This makes the output easier to read in the
6621 normal case.
6622
6623 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
6624 got from <http://bro-ids.org/download.html>. The bug is that
6625 when two actions appeared in succession, the second one was
6626 scanned before the first one was added to the grammar rule
6627 as a midrule action. Bison then output the incorrect warning
6628 "parse.y:905.17-906.36: warning: unused value: $3".
6629 * src/parse-gram.y (BRACED_CODE, action): These are no longer
6630 associated with a value.
6631 (rhs): Don't invoke grammar_current_rule_action_append.
6632 (action): Invoke it here instead.
6633 * src/reader.c (grammar_midrule_action): Now extern.
6634 (grammar_current_rule_action_append): Don't invoke
6635 grammar_midrule_action; that is now the scanner's job.
6636 * src/reader.h (last_string, last_braced_code_loc):
6637 (grammar_midrule_action): New decls.
6638 * src/scan-gram.l (last_string): Now extern, sigh.
6639 (last_braced_code_loc): New extern variable.
6640 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
6641 rule already has an action.
6642 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
6643 * tests/input.at (AT_CHECK_UNUSED_VALUES):
6644 Add some tests to check that the above changes fixed the bug.
6645
6646 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
6647
6648 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
6649 All used changed. Check whether the symbol has a destructor,
6650 not whether it is typed.
6651 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
6652 that the values are still reported as unused. All line numbers
6653 adjusted.
6654
6655 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
6656
6657 Work around a bug in bro 0.8, which underparenthesizes its
6658 definition of YYLLOC_DEFAULT.
6659 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
6660 their arguments.
6661 * data/lalr1.cc: Likewise.
6662 * data/yacc.cc: Likewise.
6663
6664 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
6665
6666 Work around a bug in Pike 7.0, and give the Pike folks a
6667 better way to override the usual int widths.
6668 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
6669 user can override the types.
6670 (short): #undef, to work around a bug in Pike 7.0.
6671 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
6672 (union yyalloc.yyss): Use yytype_int16 rather than short.
6673 All uses changed.
6674 (yysigned_char): Remove.
6675 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
6676 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
6677 * tests/regression.at (Web2c Actions): Adjust to above changes.
6678
6679 * src/reader.c (check_and_convert_grammar): New function.
6680 (reader): Close the input file even if something went wrong during
6681 parsing. Minor file descriptor leak reported by twlevo.
6682
6683 * src/assoc.c (assoc_to_string): Use a default: abort (); case
6684 to pacify gcc -Wswitch-default.
6685 * src/scan-gram.l (adjust_location): Use a default: break; case
6686 to pacify gcc -Wswitch-default.
6687 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
6688 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6689 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6690 Move these decls to scan-skel.l, since they don't need to be
6691 visible elsewhere.
6692 * src/scan-skel.l: Accept the above decls.
6693 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
6694 is used.
6695
6696 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
6697
6698 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
6699 since we don't want to insist on a version number at the start
6700 of the changelog every time.
6701 * Makefile.maint: Sync from coreutils a bit better.
6702 (sc_trailing_blank): Renamed from sc_trailing_space.
6703 All uses changed.
6704 (sc_no_if_have_config_h, sc_require_config_h):
6705 (sc_prohibit_assert_without_use): New rules.
6706 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
6707 (sc_dd_max_sym_length): Fix leading spaces in rule.
6708 (sc_system_h_headers): Prefix with @.
6709 (sc_useless_cpp_parens, m4-check): Output line numbers.
6710 (changelog-check): Allow version only in head.
6711 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
6712 satisfy new Makefile.maint rule.
6713 * data/glr.c: Likewise.
6714 * data/glr.cc: Likewise.
6715 * data/lalr1.cc: Likewise.
6716 * data/yacc.c: Likewise.
6717 * lib/ebitsetv.c: Likewise.
6718 * lib/lbitset.c: Likewise.
6719 * lib/subpipe.c: Likewise.
6720 * lib/timevar.c: Likewise.
6721 * src/system.h: Likewise.
6722 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
6723 * djgpp/Makefile.maint: Add copyright notice.
6724 * djgpp/README.in: Likewise.
6725 * djgpp/config.bat: Likewise.
6726 * djgpp/config.site: Likewise.
6727 * djgpp/config_h.sed: Likewise.
6728 * djgpp/djunpack.bat: Likewise.
6729 * djgpp/config.sed: Fix copyright notice to match standard format.
6730 * djgpp/subpipe.h: Likewise.
6731 * lib/bitsetv-print.c: Likewise.
6732 * lib/bitsetv.c: Likewise.
6733 * lib/subpipe.h: Likewise.
6734 * lib/timevar.c: Likewise.
6735 * lib/timevar.h: Likewise.
6736 * djgpp/subpipe.c: Use standard recipe for config.h.
6737 * lib/abitset.c: Likewise.
6738 * lib/bitset.c: Likewise.
6739 * lib/bitset_stats.c: Likewise.
6740 * lib/bitsetv-print.c: Likewise.
6741 * lib/bitsetv.c: Likewise.
6742 * lib/ebitsetv.c: Likewise.
6743 * lib/get-errno.c: Likewise.
6744 * lib/lbitset.c: Likewise.
6745 * lib/subpipe.c: Likewise.
6746 * lib/timevar.c: Likewise.
6747 * lib/vbitset.c: Likewise.
6748 * tests/local.at: Likewise.
6749 * src/scan-gram.l: Don't include verify.h, since system.h does
6750 that for us.
6751 * .x-sc_require_config_h: New file.
6752 * .x-sc_unmarked_diagnostics: New file.
6753
6754 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
6755
6756 Be a bit more systematic about using 'abort'.
6757 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
6758 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6759 Put 'default: abort ();' before some other case, to satisfy older
6760 pedantic compilers.
6761 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6762 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
6763 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
6764 * src/conflicts.c (resolve_sr_conflict): Likewise.
6765 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
6766 (get_decision_str, get_orientation_str, get_node_alignment_str):
6767 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
6768 (get_linestyle_str, get_arrowstyle_str): Likewise.
6769 * src/conflicts.c (resolve_sr_conflict):
6770 Use a default case rather than one for the one remaining enum
6771 value, to catch invalid enum values as well.
6772 * src/lalr.c (set_goto_map, map_goto):
6773 Prefer "assert (FOO);" to "if (!FOO) abort ();".
6774 * src/nullable.c (nullable_compute, token_definitions_output):
6775 Likewise.
6776 * src/reader.c (packgram, reader): Likewise.
6777 * src/state.c (transitions_to, state_new, state_reduction_find):
6778 Likewise.
6779 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
6780 (symbol_pack): Likewise.
6781 * src/tables.c (conflict_row, pack_vector): Likewise.
6782 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
6783 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
6784 * src/system.h: Don't include <assert.h>.
6785 (assert): New macro.
6786
6787 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
6788 (Destructor Decl, Parser Function, Pure Calling):
6789 Describe rules for braces inside C code more carefully.
6790
6791 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
6792
6793 Fix some porting glitches found by Nelson H. F. Beebe.
6794 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6795 compilers that don't understand that abort () does not return.
6796 * src/state.c (transitions_to): Likewise.
6797 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6798 that '#include <cstdlib>' works.
6799 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6800 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6801 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6802 for the benefit of some pre-C99 compilers.
6803
6804 * bootstrap: Undo changes to gnulib files that autoreconf made.
6805
6806 Minor fixups to get 'make maintainer-check' to work.
6807 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6808 with the new verify.h implementation.
6809 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6810 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6811 * data/yacc.c (YYUSE): Likewise.
6812 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6813 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6814 * src/parse-gram.y (declaration): Don't pass a string constant
6815 to a function that expects char *, since GCC might complain
6816 about the constant value.
6817 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6818 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6819 before #defining them.
6820 * tests/glr-regression.at
6821 (Incorrectly initialized location for empty right-hand side in GLR):
6822 In yyerror, use the msg arg.
6823 (Corrupted semantic options if user action cuts parse):
6824 (Incorrect lookahead during deterministic GLR):
6825 (Incorrect lookahead during nondeterministic GLR):
6826 Don't name a local var 'index'; it shadows string.h's 'index'.
6827
6828 2006-01-19 Akim Demaille <akim@epita.fr>
6829
6830 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6831 location, not just parts of it.
6832
6833 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6834
6835 * NEWS: Document the fact that multiple %unions are now allowed.
6836 * doc/bison.texinfo (Union Decl): Likewise.
6837 * TODO: This feature is now implemented, so remove it from
6838 the wishlist.
6839
6840 * Makefile.maint: Merge with coreutils Makefile.maint.
6841 (CVS_LIST): Use build-aux version if available.
6842 (VERSION_REGEXP): New macro.
6843 (syntax-check-rules): Add sc_no_if_have_config_h,
6844 sc_prohibit_assert_without_use, sc_require_config_h,
6845 sc_useless_cpp_parens.
6846 (sc_obsolete_symbols): Check for O_NDELAY.
6847 (sc_dd_max_sym_length): Track coreutils.
6848 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6849 (sc_useless_cpp_parens): New rule.
6850 (news-date-check): Look for version or today's date.
6851 (changelog-check): Don't require version number near head.
6852 (copyright-check): Use current year instead of hardwiring 2005.
6853 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6854 (announcement): Add --gpg-key-ID.
6855
6856 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6857 with "file system".
6858
6859 Avoid undefined behavior that addressed just before the start of an
6860 array. Problem reported by twlevo.
6861 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6862 * src/lalr.c (build_relations): Rely on new sentinel.
6863 * src/gram.c (gram_free): Adjust to new sentinel.
6864
6865 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6866
6867 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6868 yylookaheadNeeds. All uses updated.
6869 (yysplitStack): Rename local yynewLookaheadStatuses to
6870 yynewLookaheadNeeds.
6871 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6872 GLR): In comments, change `lookahead status' to `lookahead need'.
6873
6874 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6875
6876 * data/glr.c (yysplitStack): A little stylistic rewrite.
6877
6878 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6879
6880 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6881
6882 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6883
6884 * doc/bison.texinfo: Fix some typos.
6885 (GLR Semantic Actions): New subsection discussing special
6886 considerations because GLR semantic actions might be deferred.
6887 (Actions): Mention look-ahead usage of yylval.
6888 (Actions and Locations): Mention look-ahead usage of yylloc.
6889 (Special Features for Use in Actions): Add YYEOF entry and mention it
6890 in the yychar entry.
6891 In the yychar entry, remove mention of the local yychar case (pure
6892 parser) since this is irrelevant information when writing semantic
6893 actions and since it's already discussed in `Table of Symbols' where
6894 yychar is otherwise described as an external variable.
6895 In the yychar entry, don't call it the `current' look-ahead since it
6896 isn't when semantic actions are deferred.
6897 In the yychar and yyclearin entries, add note about deferred semantic
6898 actions.
6899 Add yylloc and yylval entries discussing look-ahead usage.
6900 (Look-Ahead Tokens): When discussing yychar, don't call it the
6901 `current' look-ahead, and do mention yylval and yylloc.
6902 (Error Recovery): Cross-reference `Action Features' when mentioning
6903 yyclearin.
6904 (Table of Symbols): In the yychar entry, don't call it the `current'
6905 look-ahead.
6906 In the yylloc and yylval entries, mention look-ahead usage.
6907
6908 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6909
6910 * tests/glr-regression.at: Update copyright year to 2006.
6911
6912 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6913
6914 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6915 use during nondeterministic operation to track which stacks have
6916 actually needed the current lookahead.
6917 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6918 Allocate, deallocate, resize, and otherwise shuffle space for
6919 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6920 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6921 appropriately during nondeterministic operation.
6922 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6923 members to store the current lookahead to be used by the deferred
6924 user action.
6925 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6926 from which the RHS is taken. Set the lookahead members of the new
6927 yySemanticOption according to the lookahead status for stack yyk.
6928 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6929 yyaddDeferredAction.
6930 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6931 members of yySemanticOption before invoking yyuserAction, and then set
6932 them back to their current values afterward.
6933 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6934 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6935 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6936 titles for consistency.
6937 (Leaked merged semantic value if user action cuts parse): In order to
6938 suppress lint warnings, use arguments in merge function, and assign
6939 char value < 128 in main.
6940 (Incorrect lookahead during deterministic GLR): New test case.
6941 (Incorrect lookahead during nondeterministic GLR): New test case.
6942
6943 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6944
6945 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
6946 !yyvaluep as signal that no semantic value is available to print.
6947 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6948 to print a semantic value.
6949
6950 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6951
6952 * tests/glr-regression.at: For consistency with my newer test cases,
6953 don't thank myself.
6954
6955 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6956
6957 * data/glr.c (yyresolveValue): When merging semantic options, if at
6958 least one user action succeeds but a later one cuts the parse, then
6959 destroy the semantic value before returning rather than leaking it.
6960 (yyresolveStates): If a user action cuts the parse and thus
6961 yyresolveValue fails, ignore the (unset) semantic value rather than
6962 corrupting the yyGLRState, and empty the semantic options list since
6963 the user actions should have called all necessary destructors.
6964 Simplify code with YYCHK.
6965 * tests/glr-regression.at (Corrupted semantic options if user action
6966 cuts parse): New test case.
6967 (Undesirable destructors if user action cuts parse): New test case.
6968 Before applying any of this patch, this test case never actually failed
6969 for me... but only because the corrupted semantic options usually
6970 masked this bug.
6971 (Leaked merged semantic value if user action cuts parse): New test
6972 case.
6973
6974 2006-01-05 Akim Demaille <akim@epita.fr>
6975
6976 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6977
6978 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6979
6980 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6981 _MSC_VER. Problem reported by Cenzato Marco.
6982 (b4_c_function_def): Use it.
6983 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6984 b4_c_modern.
6985 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6986 than rolling our own.
6987
6988 2006-01-04 Akim Demaille <akim@epita.fr>
6989
6990 Also warn about non-used mid-rule values.
6991 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6992 member.
6993 (symbol_list_new): Adjust.
6994 * src/reader.c (symbol_typed_p): New.
6995 (grammar_rule_check): Use it.
6996 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6997 Check its rule.
6998 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6999 Use it.
7000 * tests/actions.at (Exotic Dollars): Adjust.
7001
7002 2006-01-04 Akim Demaille <akim@epita.fr>
7003
7004 * src/reader.c (grammar_midrule_action): If $$ is set in a
7005 mid-rule, move the `used' bit to its lhs.
7006 * tests/input.at (Unused values): New.
7007 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
7008
7009 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
7010
7011 * doc/bison.texinfo (Bison Options): Say more accurately what
7012 --yacc does.
7013 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
7014 about declarations in the grammar when in Yacc mode, as POSIX does
7015 not require a diagnostic when the grammar uses extensions.
7016
7017 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
7018
7019 Warn about dubious constructions like "%token T T".
7020 Reported by twlevo.
7021 * src/symtab.h (struct symbol.declared): New member.
7022 * src/symtab.c (symbol_new): Initialize it to false.
7023 (symbol_class_set): New arg DECLARING, specifying whether
7024 this is a declaration that we want to warn about, if there
7025 is more than one of them. All uses changed.
7026
7027 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
7028 Allow multiple %union directives, whose contents concatenate.
7029 * src/parse-gram.y (grammar_declaration): Likewise.
7030 Use muscle_code_grow, so that we don't need stype_line any more.
7031 All uses changed.
7032
7033 * src/muscle_tab.c (muscle_grow): Fix comment.
7034
7035 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
7036 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
7037 Update copyright year to 2006.
7038
7039 2006-01-03 Akim Demaille <akim@epita.fr>
7040
7041 Have glr.cc pass (some of) the calc.at tests.
7042 * data/glr.cc (b4_parse_param_orig): New.
7043 (b4_parse_param): Improve its definition, and bound it more
7044 clearly in the skeleton.
7045 (b4_epilogue): Append, instead of prepending, in order to keep
7046 #line consistency.
7047 Simplify the generation of auxiliary functions: locations and
7048 purity are mandated.
7049 (b4_global_tokens_and_yystype): Honor it.
7050 * data/location.cc (c++.m4): Don't include it.
7051 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
7052 and AT_SKEL_CC_IF.
7053 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
7054 AT_LALR1_CC_IF.
7055 Be sure to initialize the first position's filename.
7056 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
7057 mandated anyway.
7058 (AT_CHECK_CALC_GLR_CC): New.
7059 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
7060
7061 2006-01-02 Akim Demaille <akim@epita.fr>
7062
7063 * src/output.c (output_skeleton): Don't hard wire the inclusion of
7064 c.m4.
7065 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
7066 * data/glr.cc: Do not include stack.hh.
7067
7068 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
7069
7070 * data/glr.c: Reformat whitespace with tabs.
7071 (b4_lpure_formals): Remove this unused m4 macro.
7072 * tests/cxx-type.at: Reformat whitespace with tabs.
7073 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7074 since it's a member. Rename type to isNterm for clarity.
7075
7076 2005-12-29 Akim <akim@sulaco.local>
7077
7078 Let glr.cc catch up with symbol_value_print.
7079 * data/glr.cc (b4_yysymprint_generate): Replace by...
7080 (b4_yy_symbol_print_generate): this.
7081 (yy_symbol_print, yy_symbol_value_print): Declare them.
7082
7083 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
7084
7085 * src/location.h (boundary): Note that a line or column equal
7086 to INT_MAX indicates an overflow.
7087 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
7088 (rule_length_overflow, increment_rule_length, add_column_width):
7089 New functions.
7090 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
7091 (<SC_BRACED_CODE>"}"):
7092 Use increment_rule_length rather than incrementing it by hand.
7093 (adjust_location, handle_syncline): Diagnose overflow.
7094 (handle_action_dollar, handle_action_at):
7095 Fix bug with monstrosities like $-2147483648.
7096 Remove now-unnecessary checks.
7097 (scan_integer): Verify assumptions and remove now-unnecessary checks.
7098 (convert_ucn_to_byte): Verify assumptions.
7099 (handle_syncline): New arg LOC. All callers changed.
7100 Don't store through a value derived from char const * pointer.
7101
7102 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
7103 GCC warnings.
7104
7105 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
7106
7107 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
7108 Remove unnecessary forward static decls.
7109
7110 2005-12-27 Akim Demaille <akim@epita.fr>
7111
7112 * src/reader.c (grammar_current_rule_check): Also check that $$
7113 is used.
7114 Take the rule to check as argument, hence rename as...
7115 (grammar_rule_check): this.
7116 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
7117 Rename as...
7118 (grammar_rule_begin, grammar_rule_end): these, for consistency.
7119 (grammar_midrule_action, grammar_symbol_append): Now static.
7120 * tests/torture.at (input): Don't rely on the default action
7121 being always performed.
7122 * tests/calc.at: "Set" $$ even when the action is "cut" with
7123 YYERROR or other.
7124 * tests/actions.at (Exotic Dollars): Instead of using unused
7125 values, check that the warning is issued.
7126
7127 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
7128
7129 * NEWS: Improve wording for unused-value warnings.
7130
7131 2005-12-22 Akim Demaille <akim@epita.fr>
7132
7133 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
7134 (b4_yysymprint_generate): Rename as...
7135 (b4_yy_symbol_print_generate): this.
7136 Generate yy_symbol_print instead of yysymprint.
7137 Generate also yy_symbol_value_print, and use it.
7138
7139 2005-12-22 Akim Demaille <akim@epita.fr>
7140
7141 * NEWS: Warn about unused values.
7142 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
7143 a `used' member.
7144 (symbol_list_n_get, symbol_list_n_used_set): New.
7145 (symbol_list_n_type_name_get): Use symbol_list_n_get.
7146 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
7147 * src/reader.c (grammar_current_rule_check): Check that values are
7148 used.
7149 * src/symtab.c (symbol_print): Accept 0.
7150 * tests/existing.at: Remove the type information.
7151 Empty the actions.
7152 Remove useless actions (beware of mid-rule actions: perl -000
7153 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
7154 * tests/actions.at (Exotic Dollars): Use unused values.
7155 * tests/calc.at: Likewise.
7156 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7157 Likewise.
7158
7159 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
7160 rule_useful_p.
7161
7162 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
7163
7164 Undo 2005-12-01 tentative license wording change. The wording is
7165 still being reviewed by the lawyers, and we don't want to wait for
7166 them before publishing a test release. For now, revert to the
7167 previous wording.
7168 * NEWS: Undo 2005-12-01 change.
7169 * data/glr.c: Revert to previous license wording.
7170 * data/glr.cc: Likewise.
7171 * data/lalr1.cc: Likewise.
7172 * data/location.cc: Likewise.
7173 * data/yacc.c: Likewise.
7174
7175 * NEWS: Reword %destructor vs YYABORT etc.
7176 * data/glr.c: Use American spacing, for consistency.
7177 * data/glr.cc: Likewise.
7178 * data/lalr1.cc: Likewise.
7179 * data/yacc.c: Likewise.
7180 * data/yacc.c: Reformat comments slightly.
7181 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
7182 for consistency. Fix some spelling errors and reword recently-included
7183 text slightly.
7184 * tests/cxx-type.at: Cast results of malloc, for C++.
7185
7186 2005-12-21 Joel E. Denny <address@hidden>
7187
7188 * tests/cxx-type.at: Construct a tree, count the parents of shared
7189 nodes, and free each node once and only once. Previously, the memory
7190 for semantic values was leaked instead.
7191
7192 2005-12-21 Joel E. Denny <address@hidden>
7193
7194 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
7195 (yylval, yylloc): If pure, #define to yystackp->yyval and
7196 yystackp->yyloc similar to yychar and yynerrs.
7197 (yyparse): If pure, remove local yylval and yylloc. Add local
7198 yystackp to accommodate pure definitions of yylval and yylloc.
7199 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
7200 yylvalp and yyllocp to &yylval and &yylloc.
7201 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
7202 namespace. Previously, nerrs and char were missing, but lval and lloc
7203 weren't necessary.
7204 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
7205 yylvalp and yyllocp parameters since, if pure, these are now always
7206 accessible through yystackp. If not pure, they are still accessible
7207 globally.
7208 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
7209 `if (YYID (N))' to pacify lint.
7210
7211 2005-12-21 Akim Demaille <akim@epita.fr>
7212
7213 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
7214 destroy the RHS symbols of a rule.
7215 * data/yacc.c (yylen): Initialize to 0.
7216 Keep its value to the number of items to possibly shift.
7217 In particular, a regular successful parse that ends on YYFINAL by
7218 a (internal) YYACCEPT must not have yylen != 0.
7219 (yyerrorlab, yyreturn): Pop the RHS.
7220 Reorder a bit to emphasize the `shifting' bits of code.
7221 (YYPOPSTACK): Now accept a number of items to pop.
7222 * data/lalr1.cc: Likewise.
7223 * data/glr.c: Formatting changes.
7224 Use goto instead of fall through.
7225 * doc/bison.texinfo (Destructor Decl): Complete.
7226
7227 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7228
7229 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7230 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
7231 * djgpp/config.bat: Replace every occurence of the file name
7232 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7233 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7234 * djgpp/config.sed: Replace every occurence of the file name
7235 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
7236 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
7237 * djgpp/djunpack.bat: DJGPP specific file.
7238 * djgpp/fnchange.lst: DJGPP specific file.
7239 * djgpp/README.in: Add new information about how to unpack the bison
7240 source on MSDOS and other systems which have 8.3 file name restrictions
7241 using djunpack.bat and fnchange.lst.
7242
7243 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
7244
7245 * bootstrap (build_cvs_prefix): Remove; unused.
7246 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
7247 when getting gnulib.
7248
7249 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
7250
7251 * data/glr.c: Reorder typedef declarations for structs to match order
7252 of struct declarations.
7253 Rename yystack everywhere to yystackp except in yyparse where it's not
7254 a pointer.
7255 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
7256 consistency.
7257 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
7258 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
7259 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
7260 lint.
7261
7262 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
7263
7264 * tests/sets.at (Accept): Fix typos in regular expression used to
7265 sed out the final state number.
7266
7267 Work around portability problem on Solaris 10: flex-generated
7268 files include <stdio.h> before <config.h>, which messes up
7269 because the latter defines __EXTENSIONS__. Address the problem
7270 by creating two new little files that include <config.h> first,
7271 then include the flex-generated files. Rewrite everyone else
7272 to include <config.h> first, as well.
7273 * lib/timevar.c: Always include "config.h".
7274 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
7275 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
7276 (EXTRA_bison_SOURCES): New macro.
7277 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
7278 * src/system.h: Don't include config.h.
7279 * src/LR0.c: Include <config.h> first.
7280 * src/assoc.c: Likewise.
7281 * src/closure.c: Likewise.
7282 * src/complain.c: Likewise.
7283 * src/conflicts.c: Likewise.
7284 * src/derives.c: Likewise.
7285 * src/files.c: Likewise.
7286 * src/getargs.c: Likewise.
7287 * src/gram.c: Likewise.
7288 * src/lalr.c: Likewise.
7289 * src/location.c: Likewise.
7290 * src/main.c: Likewise.
7291 * src/muscle_tab.c: Likewise.
7292 * src/nullable.c: Likewise.
7293 * src/output.c: Likewise.
7294 * src/parse-gram.y: Likewise.
7295 * src/print.c: Likewise.
7296 * src/print_graph.c: Likewise.
7297 * src/reader.c: Likewise.
7298 * src/reduce.c: Likewise.
7299 * src/relation.c: Likewise.
7300 * src/state.c: Likewise.
7301 * src/symlist.c: Likewise.
7302 * src/symtab.c: Likewise.
7303 * src/tables.c: Likewise.
7304 * src/uniqstr.c: Likewise.
7305 * src/vcg.c: Likewise.
7306
7307 * src/parse-gram.y: Fix minor problems uncovered by lint.
7308 (current_lhs, current_lhs_location): Now static.
7309 (current_assoc): Remove unused variable.
7310
7311 Cleanups so that Bison-generated parsers have less lint.
7312 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
7313 Prepend /*ARGSUSED*/, for lint's sake.
7314 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
7315 definition if 'lint' is defined.
7316 (YYID): New macro (or function, if lint).
7317 All uses of /*CONSTCOND*/0 replaced by YYID(0).
7318 * data/yacc.c: Likewise.
7319 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
7320 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
7321 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
7322 is C++ only.
7323 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
7324 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
7325 Use YYID(0) rather than 0, for lint.
7326 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
7327 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
7328
7329 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
7330
7331 * tests/glr-regression.at
7332 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7333 Close memory leak reported by twlevo.
7334
7335 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
7336
7337 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
7338 all stacks.
7339 (yyparse): Iterate another stack in order to call user destructors.
7340 * tests/glr-regression.at (No users destructors if stack 0 deleted):
7341 New test case.
7342 (Duplicated user destructor for lookahead): This test now is expected
7343 to succeed.
7344
7345 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
7346
7347 * NEWS: Document the following change.
7348 * data/yacc.c: Say "parser skeleton" rather than "file", since
7349 it's no longer just a file.
7350 * data/glr.c: Grant a special exception for C GLR parsers, that
7351 reads like the already-existing exception for C LALR(1) parsers.
7352 * data/glr.cc: Likewise.
7353 * data/lalr1.cc: Likewise.
7354 * data/location.cc: Likewise.
7355 * data/yacc.c: Reword the "written by" statement to clarify that
7356 it was the parser skeleton, not the entire output file.
7357 * data/glr.c: Written by Paul Hilfinger.
7358 * data/glr.cc: Written by Akim Demaille.
7359 * data/lalr1.cc: Likewise.
7360
7361 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
7362
7363 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
7364 Fix typos in previous change that broke 'make check'.
7365 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
7366 supported in C.
7367 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
7368 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
7369 We can revert this once things settle down.
7370
7371 * src/conflicts.c (conflicts_print): Don't print file name twice
7372 when %expect fails because there were no conflicts.
7373 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
7374 change.
7375 * tests/conflicts.at (%expect not enough, %expect too much):
7376 (%expect with reduce conflicts): Adjust to new behavior.
7377
7378 2005-11-18 Akim Demaille <akim@epita.fr>
7379
7380 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
7381 errors.
7382 * NEWS: Document this.
7383 * doc/bison.texinfo (Expect Decl): Likewise.
7384
7385 2005-11-16 Akim Demaille <akim@epita.fr>
7386
7387 Generalize the display of semantic values and locations in traces.
7388 * data/glr.c (yy_reduce_print): Fix indices (again).
7389 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
7390 literal integers.
7391 * data/lalr1.cc (yyreduce_print): Rename as...
7392 (yy_reduce_print): this.
7393 Display values and locations.
7394 * data/yacc.c (yy_reduce_print): Likewise.
7395 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
7396 (yysymprint): Move higher to be visible from yy_reduce_print).
7397 (yyparse): Adjust.
7398 * tests/calc.at: Adjust the expected length of the traces.
7399
7400 2005-11-14 Akim Demaille <akim@epita.fr>
7401
7402 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
7403 from 1 to N, while values and location start at 0.
7404 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
7405
7406 2005-11-14 Akim Demaille <akim@epita.fr>
7407
7408 * data/glr.c (yy_reduce_print): Fix the $ number.
7409
7410 2005-11-14 Akim Demaille <akim@epita.fr>
7411
7412 "Use" parse parameters.
7413 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
7414 * data/glr.c, data/glr.cc: Use them.
7415 * data/glr.c (YYUSE): Have a C++ definition that supports
7416 non-pointer types.
7417
7418 2005-11-14 Akim Demaille <akim@epita.fr>
7419
7420 * data/glr.c (yyexpandGLRStack): Declare only if defined.
7421
7422 2005-11-14 Akim Demaille <akim@epita.fr>
7423
7424 * data/glr.cc: New.
7425 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
7426
7427 2005-11-12 Akim Demaille <akim@epita.fr>
7428
7429 Let position and location be PODs.
7430 * data/location.cc (position::initialize, location::initialize): New.
7431 (position::position, location::location): Define only if
7432 b4_location_constructors is defined.
7433 * data/lalr1.cc (b4_location_constructors): Define it for backward
7434 compatibility.
7435 * doc/bison.texinfo (Initial Action Decl): Use initialize.
7436
7437 2005-11-12 Akim Demaille <akim@epita.fr>
7438
7439 * data/lalr1.cc: Move the body of the ctor and dtor into the
7440 parser file (instead of the header).
7441 Wrap the implementations in a "namespace yy".
7442
7443 2005-11-12 Akim Demaille <akim@epita.fr>
7444
7445 Have glr.c include its header file when created.
7446 * data/glr.c (b4_shared_declarations): New.
7447 Output them verbatim in the parser if !%defines, otherwise
7448 output then in the header file, and include it instead.
7449
7450 2005-11-11 Akim Demaille <akim@epita.fr>
7451
7452 * data/glr.c: Comment changes.
7453
7454 2005-11-11 Akim Demaille <akim@epita.fr>
7455
7456 When yydebug, report semantic and location values for reductions.
7457 * data/glr.c (yy_reduce_print): Report the semantic values and the
7458 locations.
7459 (YY_REDUCE_PRINT): Adjust.
7460 (yyglrReduce): Use them.
7461 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
7462 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
7463 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
7464 traces.
7465
7466 2005-11-10 Akim Demaille <akim@epita.fr>
7467
7468 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
7469 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
7470 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
7471
7472 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
7473
7474 * m4/cxx.m4, examples/Makefile.am: Don't build
7475 examples/calc++ if no C++ compiler is available. (trivial change)
7476
7477 2005-11-09 Akim Demaille <akim@epita.fr>
7478
7479 * src/scan-skel.l: Use a couple of asserts.
7480
7481 2005-11-03 Akim Demaille <akim@epita.fr>
7482
7483 In some (weird) cases, the final state number is incorrect.
7484 Reported by Alexandre Duret-Lutz.
7485 * src/LR0.c (state_list_append): Remove the computation of
7486 final_state.
7487 (save_reductions): Do it here.
7488 (get_state): Alpha conversion.
7489 (generate_states): Use a for loop.
7490 * src/gram.h (item_number_is_rule_number)
7491 (item_number_is_symbol_number): New.
7492 * src/state.c: Use assert.
7493 * src/system.h: Include assert.h.
7494 * tests/sets.at (Accept): New.
7495
7496 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7497
7498 * data/glr.c (yyfill): Adjust comment.
7499 (yyresolveAction): Initialize default location properly
7500 for empty right-hand sides.
7501 (yydoAction): Ditto.
7502 Add comment explaining apparently dead code.
7503 * tests/glr-regression.at
7504 (Incorrectly initialized location for empty right-hand side in GLR):
7505 New test.
7506
7507 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
7508
7509 * bootstrap (cleanup_gnulib): New function. Use it to clean up
7510 gnulib when interrupted. This fixes some race conditions and
7511 works around some portability problems (one noted by Paul
7512 Hilfinger).
7513
7514 2005-10-22 Akim <akim@epita.fr>
7515
7516 * Makefile.cfg: Adjust to config -> build-aux.
7517 Reported by twledo.
7518
7519 2005-10-21 Akim Demaille <akim@epita.fr>
7520
7521 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
7522 the %parse-params.
7523 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
7524 * data/yacc.c (b4_Pure_if): Rename as...
7525 (b4_yacc_pure_if): this.
7526 (YY_SYMBOL_PRINT, yyparse): Adjust.
7527 * doc/bison.texinfo: Formatting changes.
7528
7529 2005-10-21 Akim Demaille <akim@epita.fr>
7530
7531 Finish the transition config -> build-aux.
7532 * configure.ac, Makefile.am: Use build-aux.
7533 * config/prev-version, config/announce-gen, config/Makefile.am:
7534 Move to...
7535 * build-aux/prev-version, build-aux/announce-gen,
7536 * build-aux/Makefile.am: here.
7537
7538 2005-10-14 Akim Demaille <akim@epita.fr>
7539
7540 * examples/calc++/test: Use set -x only when VERBOSE.
7541
7542 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
7543
7544 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
7545 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
7546
7547 2005-10-13 Akim Demaille <akim@epita.fr>
7548
7549 * src/scan-skel.l: Output the base name parts of the parser and
7550 header file names.
7551 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7552 additional checks.
7553 Use this to exercise C++ outputs in subdirs.
7554 Reported by Oleg Smolsky.
7555
7556 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
7557
7558 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
7559 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
7560 Problem reported by John P. Hartmann.
7561 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
7562 already defined it.
7563
7564 2005-10-12 Akim Demaille <akim@epita.fr>
7565
7566 * src/parse-gram.y (version_check): Exit 63 to please missing
7567 (stands for "version mismatch).
7568 * tests/input.at, doc/bison.texinfo: Adjust.
7569
7570 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
7571
7572 Work around portability problems with Visual Age C compiler
7573 (xlc and xlC_r) reported by John P. Hartmann.
7574 * data/location.cc (initial_column, initial_line): Remove.
7575 All uses replaced by 0 and 1.
7576 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
7577 that xlc complains about.
7578 * src/scan-skel.l (skel_wrap): Likewise.
7579 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
7580 as __STDC__.
7581 * data/yacc.c (YYMODERN_C): New macro, which also looks at
7582 __STDC_VERSION__. Use it everywhere instead of looking at
7583 __STDC__ and __cplusplus.
7584
7585 2005-10-10 Akim Demaille <akim@epita.fr>
7586
7587 * examples/calc++/test: Be quiet unless VERBOSE.
7588
7589 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
7590
7591 * data/c.m4 (yydestruct, yysymprint):
7592 Use YYUSE instead of casting to void.
7593 * data/glr.c (YYUSE): New macro.
7594 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7595 Use it instead of rolling our own.
7596 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7597 (YYCHK1):
7598 Use /*CONSTCOND*/ to suppress lint warnings.
7599 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
7600 (YY_STACK_PRINT): Use 'false' not '0'.
7601 (YYUSE): New macro.
7602 (yysymprint_, yydestruct_): Use it instead of rolling our own.
7603 * data/yacc.c (YYUSE): New macro.
7604 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
7605 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
7606 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
7607
7608
7609 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
7610 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
7611
7612 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7613
7614 Undo the parts of the unlocked-I/O change that substituted
7615 putc or puts for printf. This might hurt performance a bit,
7616 but some people prefer the printf style.
7617 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
7618 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
7619 All uses replaced by YYFPRINTF and YYDPRINTF.
7620 * data/yacc.c: Likewise.
7621 * lib/bitset.c (bitset_print): Likewise.
7622 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
7623 putc and puts.
7624 * lib/lbitset.c (debug_lbitset): Likewise.
7625 * src/closure.c (print_firsts, print_fderives): Likewise.
7626 * src/gram.c (grammar_dump): Likewise.
7627 * src/lalr.c (look_ahead_tokens_print): Likewise.
7628 * src/output.c (escaped_output): Likewise.
7629 (user_actions_output): Break apart two printfs.
7630 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
7631 * src/reduce.c (reduce_print): Likewise.
7632 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7633 * src/system.h: Include unlocked-io.h rathe than stdio.h.
7634
7635 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
7636 Use assignments rather than casts-to-void to suppress
7637 unused-variable warnings. This pacifies 'lint'.
7638 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
7639 unused-variable warnings.
7640
7641 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7642
7643 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
7644
7645 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
7646
7647 Use unlocked I/O for a minor performance improvement on hosts like
7648 GNU/Linux and Solaris that support unlocked I/O. The basic idea
7649 is to use the gnlib unlocked-io module, and to prefer putc and
7650 puts to printf when either will work (since the latter doesn't
7651 come in an unlocked flavor).
7652 * bootstrap (gnulib_modules): Add unlocked-io.
7653 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
7654 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
7655 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
7656 and similarly for puts and putc and printf.
7657 * data/yacc.c: Likewise.
7658 * lib/bitset.c (bitset_print): Likewise.
7659 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
7660 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
7661 to printf.
7662 * lib/lbitset.c (debug_lbitset): Likewise.
7663 * src/closure.c (print_firsts, print_fderives): Likewise.
7664 * src/gram.c (grammar_dump): Likewise.
7665 * src/lalr.c (look_ahead_tokens_print): Likewise.
7666 * src/output.c (escaped_output): Likewise.
7667 (user_actions_output): Coalesce two printfs.
7668 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
7669 * src/reduce.c (reduce_print): Likewise.
7670 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
7671 * src/system.h: Include unlocked-io.h rather than stdio.h.
7672
7673 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
7674 this confuses xgettext.
7675
7676 2005-10-02 Akim Demaille <akim@epita.fr>
7677
7678 * bootstrap (gnulib_modules): Add strverscmp.
7679 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
7680 * m4/.cvsignore: Add strverscmp.m4.
7681 * src/parse-gram.y (%require): New token, new rule.
7682 (version_check): New.
7683 * src/scan-gram.l (%require): Adjust.
7684 * tests/input.at (AT_REQUIRE): New.
7685 Use it.
7686 * doc/bison.texinfo (Require Decl): New.
7687 (Calc++ Parser): Use %require.
7688
7689 2005-10-02 Akim Demaille <akim@epita.fr>
7690
7691 * data/location.cc: New.
7692
7693 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
7694 Akim Demaille <akim@epita.fr>
7695
7696 Make sure -odir/foo.cc creates dir/location.hh etc.
7697 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
7698 (spec_file_prefix, spec_verbose_file, spec_graph_file)
7699 (spec_defines_file): Now const.
7700 (dir_prefix): New.
7701 (short_base_name): Remove.
7702 * src/files.c: Adjust.
7703 (dirname.h): Include.
7704 (base_name): Don't prototype it.
7705 (finput): Remove, duplicates gram_in.
7706 (full_base_name, short_base_name): Replace by...
7707 (all_but_ext, all_but_tab_ext): these.
7708 (compute_base_names): Rename as...
7709 (compute_file_name_parts): this.
7710 Update to compute the new variables, including dir_prefix.
7711 Adjust dependencies.
7712 * src/output.c (prepare): Output them.
7713 * src/reader.c: Adjust to use gram_in, not finput.
7714 * src/scan-skel.l (@dir_prefix@): New.
7715
7716 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7717
7718 * lib/subpipe.c: New function end_of_output_subpipe() added
7719 to allow support for non-posix systems. This is a no-op function
7720 for posix systems.
7721
7722 * lib/subpipe.h: New function end_of_output_subpipe() added
7723 to allow support for non-posix systems. This is a no-op function
7724 for posix systems.
7725
7726 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
7727 handle the lack of pipe/fork functionality on non-posix systems.
7728
7729 * djgpp/Makefile.maint: DJGPP specific file.
7730
7731 * djgpp/README.in: DJGPP specific file.
7732
7733 * djgpp/config.bat: DJGPP specific configuration file.
7734
7735 * djgpp/config.sed: DJGPP specific configuration file.
7736
7737 * djgpp/config.site: DJGPP specific configuration file.
7738
7739 * djgpp/config_h.sed: DJGPP specific configuration file.
7740
7741 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
7742
7743 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
7744
7745 2005-10-02 Akim Demaille <akim@epita.fr>
7746
7747 * data/location.cc: New, extract from...
7748 * data/lalr1.cc: here.
7749 (location.hh): Include it after the user prologue, in case the
7750 filename type is defined by the user.
7751 Forward declation location and position before the pre-prologue.
7752 (yyresult_): Rename as...
7753 (yyresult): this, it's a local variable, not an attribute.
7754 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
7755
7756 2005-10-01 Akim Demaille <akim@epita.fr>
7757
7758 * examples/extexi: Restore the #line generation.
7759
7760 2005-09-30 Akim Demaille <akim@epita.fr>,
7761 Alexandre Duret-Lutz <adl@gnu.org>
7762
7763 Move the token type and YYSTYPE in the parser class.
7764 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
7765 (parser::token): New, from the moved free definition of tokens.
7766 (parser::semantic_value): Now a full definition instead of an
7767 indirection to YYSTYPE.
7768 (b4_post_prologue): No longer included in the header file, but
7769 in the implementation file.
7770 * doc/bison.texi (C+ Language Interface): Update.
7771 * src/parse-gram.y: Support unary %define.
7772 * tests/actions.at: Define global_tokens_and_yystype for backward
7773 compatibility until we update the tests.
7774 * tests/calc.at: Idem.
7775 (first_line, first_column, last_line, last_column): Define for lalr1.cc
7776 to simplify the code.
7777
7778 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
7779
7780 Port to SunOS 4.1.4, which lacks strtoul and strerror.
7781 Ah, the good old days! Problem reported by Peter Klein.
7782 * bootstrap (gnulib_modules): Add strerror, strtoul.
7783 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
7784 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
7785
7786 2005-09-29 Akim Demaille <akim@epita.fr>
7787
7788 * data/c.m4 (b4_error_verbose_if): New.
7789 * data/lalr1.cc: Use it.
7790 (YYERROR_VERBOSE_IF): Remove.
7791 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
7792 parser members, replaced by...
7793 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7794 local variables.
7795 (yysyntax_error_): Takes the state number as argument.
7796 (yyreduce_print_): Use the argument yyrule, not the former
7797 attribute yyn_.
7798
7799 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7800
7801 * bootstrap (gnulib_modules): Add verify.
7802 * lib/.cvsignore: Add verify.h.
7803 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7804 * src/system.h (verify): Remove.
7805 Include verify.h instead.
7806 * src/tables.c (tables_generate): Use new API for 'verify'.
7807
7808 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7809
7810 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7811 local variables whose names begin with 'yy'.
7812 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7813 Trivial changes from Joel E. Denny.
7814
7815 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7816 it itself.
7817 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7818 don't use alloca any more.
7819
7820 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7821 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
7822 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
7823 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7824 to match yacc.c, to test more hosts.
7825
7826 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7827
7828 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7829 doesn't affect behavior.
7830 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7831 Solaris, AIX, MSC.
7832 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7833 This works a bit better with glibc, if user code has already included
7834 stdlib.h.
7835 * doc/bison.texinfo (Bison Parser): Document that users can't
7836 arbitrarily use malloc and free for other purposes. Document
7837 that <alloca.h> and <malloc.h> might be included.
7838 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7839 user must declare alloca.
7840
7841 * HACKING (release): Forwarn the Translation Project about
7842 stable releses.
7843
7844 2005-09-20 Akim Demaille <akim@epita.fr>
7845
7846 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7847
7848 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7849
7850 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7851 (YYSTACK_ALLOC_MAXIMUM): Use it.
7852 (yysyntax_error): New function.
7853 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7854 multiple syntax errors are reported, and alloca is being used.
7855 Instead, reallocate buffers twice as big each time, so that
7856 we waste at most half the allocated memory. Start with a small
7857 (128-byte) buffer that will suffice in most cases anyway.
7858 Use yysyntax_error to do most of the work.
7859
7860 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7861 yynerrs is the number of errors reported, not the number of
7862 errors encountered.
7863
7864 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7865 Mark it as expected to fail.
7866 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7867 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7868 Don't start user-code symbols with "yy", to avoid name space problems.
7869
7870 2005-09-19 Akim Demaille <akim@epita.fr>
7871
7872 Remove the traits, failed experiment.
7873 It never proved useful, and anyway because of the current
7874 definition, it was not possible to have several specialization of
7875 this traits, making it useless.
7876 * data/lalr1.cc (yy:traits): Remove.
7877 Inline its definitions in the parser class.
7878
7879 2005-09-19 Akim Demaille <akim@epita.fr>
7880
7881 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7882 least Mac OSX with a /usr/local install of gettext.
7883
7884 2005-09-19 Akim Demaille <akim@epita.fr>
7885
7886 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7887 and yytoken for similarity with the other skeletons.
7888
7889 2005-09-19 Akim Demaille <akim@epita.fr>
7890
7891 * NEWS, configure.ac: update version number to 2.1a.
7892
7893 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7894
7895 * NEWS: Version 2.1.
7896
7897 * NEWS: Remove notice of yytname change, since it was never in an
7898 official release.
7899 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7900 diagnostic.
7901 * src/output.c (prepare): Likewise.
7902 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7903 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7904 is not defined. This is an awful hack, but it's enough for now.
7905 All callers changed.
7906 * tests/glr-regression-at (make_value): Args are const pointers now,
7907 to avoid GCC warning.
7908 (Duplicated user destructor for lookahead): New test. Currently
7909 skipped. It fails on my host but I'm not sure it'll always fail.
7910
7911 2005-09-16 Akim Demaille <akim@epita.fr>
7912
7913 * src/symtab.h (struct symbol): Declare the printer and destructor
7914 as const, to avoid accidental calls to free.
7915 (symbol_destructor_set, symbol_printer_set): Adjust.
7916 * src/symtab.c: Adjust.
7917
7918 2005-09-16 Akim Demaille <akim@epita.fr>
7919
7920 * data/c.m4 (b4_token_enums): New.
7921 (b4_token_defines): Rename as...
7922 (b4_token_enums_defines): this.
7923 (b4_token_defines): New, output only the #defines.
7924 * data/yacc.c, data/glr.c: Adjust.
7925 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7926 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7927 as default values.
7928
7929 2005-09-16 Akim Demaille <akim@epita.fr>
7930
7931 * data/lalr1.cc (yylex_): Remove, inline its code.
7932 (yyreport_syntax_error_): Remove, replaced by...
7933 (yysyntax_error_): this which returns a string and leaves to the
7934 caller the call to the users' error function.
7935 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7936 Move from members of the parser object...
7937 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7938 to local variables of the parse function.
7939
7940 2005-09-16 Akim Demaille <akim@epita.fr>
7941
7942 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7943 since it's in Bison's name space.
7944
7945 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7946
7947 * data/glr.c (yyresolveValue): Add default case to pacify
7948 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7949
7950 * NEWS: Document when yyparse started to return 2.
7951 * doc/bison.texinfo (Parser Function): Document when yyparse
7952 returns 2.
7953
7954 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7955 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7956 changed.
7957 (class position): file_name -> filename (reverting). All uses changed.
7958
7959 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7960
7961 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7962 do anything if $@ exists. This reverts part of the 2005-07-07
7963 patch.
7964
7965 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7966
7967 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7968 contains obsolete information and isn't worth distributing as a
7969 separate file anyway.
7970 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7971 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7972 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7973 (yyparse): Abort if user code uses longjmp to throw an unexpected
7974 value.
7975
7976 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7977
7978 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7979 Suggested by twlevo@xs4all.nl.
7980
7981 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7982 This avoids a diagnostic from gcc -Wswitch-enum.
7983 Problem reported by twlevo@xs4all.nl.
7984
7985 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7986 standards. Use "file name" or "file" or "name", depending on
7987 the context.
7988 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7989 not to hack/foo.tab.c.
7990 (Calc++ Top Level): 2nd arg of main is not const.
7991 * data/glr.c: b4_filename -> b4_file_name.
7992 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7993 All uses changed.
7994 (class position): filename -> file_name. All uses changed.
7995 * data/yacc.c: b4_filename -> b4_file_name.
7996 * lib/bitset.h: filename -> file_name in local vars.
7997 * lib/bitset_stats.c: Likewise.
7998 * src/files.c: Likewise.
7999 * src/scan-skel.l ("@output ".*\n): Likewise.
8000 * src/files.c (file_name_split): Renamed from filename_split.
8001 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
8002
8003 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
8004
8005 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
8006 to accommodate latest gnulib.
8007
8008 * tests/glr-regression.at (Duplicate representation of merged trees):
8009 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
8010
8011 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
8012 needed.
8013
8014 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
8015
8016 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
8017 All uses changed. Invoke user destructor after an error during a
8018 split parse (trivial change from Joel E. Denny).
8019
8020 * tests/glr-regression.at
8021 (User destructor after an error during a split parse): New test case.
8022 Problem reported by Joel E. Denny in:
8023 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
8024
8025 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
8026
8027 * README-cvs: Give URLs for recommended tools.
8028 Mention Gzip version problem, and bootstrapping issues.
8029 Remove troubleshooting section, as it's somewhat obsolete.
8030
8031 * bootstrap (no_cache): New var, to accommodate different wget
8032 variants. Use it instead of '-C off'. Problem reported by
8033 twlevo@xs4all.nl.
8034
8035 * data/glr.c (yydestroyStackItem): New function.
8036 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
8037 debugging information. Problem reported by Joel E. Denny.
8038
8039 2005-08-25 Akim Demaille <akim@epita.fr>
8040
8041 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
8042
8043 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
8044
8045 * data/glr.c (yyrecoverSyntaxError, yyreturn):
8046 Don't invoke destructor on unresolved entries.
8047 * tests/glr-regression.at
8048 (User destructor for unresolved GLR semantic value): New test case.
8049 Problem reported by Joel E. Denny in:
8050 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
8051
8052 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
8053
8054 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
8055 Add strnlen.c.
8056 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
8057 lib-prefix.m4, po.m4.
8058
8059 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
8060 in yydestruct diagnostic, since it might not be an error.
8061 Problem reported by Joel Denny near end of
8062 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8063 * data/lalr1.cc (yyerturn): Likewise.
8064 * data/yacc.c (yyreturn): Likewise.
8065 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
8066
8067 * src/files.c: Remove obsolete FIXME comment.
8068
8069 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
8070 with the other templates, and to fix bogus run-on messages such
8071 as the one reported at the end of
8072 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
8073 All callers changed to avoid the newline.
8074 (yyprocessOneStack): Output two lines rather than one, to accommodate
8075 the above change. This changes the debug output format slightly.
8076
8077 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
8078 reported by Joel E. Denny in
8079 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
8080 (trivial change).
8081 * tests/glr-regression.at (Duplicate representation of merged trees):
8082 New test, from Joel E. Denny in:
8083 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
8084 * THANKS: Add Joel E. Denny.
8085
8086 * configure.ac (AC_INIT): Bump to 2.0c.
8087
8088 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
8089
8090 * NEWS: Version 2.0b.
8091
8092 * Makefile.am (SUBDIRS): Put examples before tests, so that
8093 "make check" doesn't finish with "All 1 tests passed".
8094
8095 * tests/regression.at (Token definitions): Don't rely on
8096 AT_PARSER_CHECK for data that contains backslashes. It currently
8097 uses 'echo', and 'echo' isn't portable if its argument contains
8098 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
8099 that the byte '\0xff' is not printable in the C locale; it is,
8100 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
8101 not printable, so use '\0x81' to test.
8102
8103 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
8104 version of GCC, since the macro is used with non-GCC compilers.
8105
8106 Fix core dump reported by Pablo De Napoli in
8107 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
8108 * tests/regression.at (Invalid inputs with {}): New test.
8109 * src/parse-gram.y (token_name): Translate type before using
8110 it as an index.
8111
8112 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
8113 the user's name space. All uses changed to __attribute__
8114 ((__unused__)).
8115 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
8116 Add __attribute__ ((__noreturn__)).
8117
8118 * etc/clcommit: Remove. We weren't using it, and it failed
8119 "make maintainer-distcheck".
8120 * Makefile.maint: Merge from coreutils.
8121 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
8122 (syntax-check-rules): Change list of rules as described below.
8123 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
8124 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
8125 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
8126 (sc_trailing_space): New rules.
8127 (sc_xalloc_h_in_src): Remove.
8128 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
8129 (sc_space_tab, sc_error_exit_success, sc_changelog):
8130 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
8131 (makefile-check, po-check, author_mark_check):
8132 (makefile_path_separator_check, copyright-check):
8133 Use grep -n, to make it easier to find violations.
8134 Use CVS_LIST and CVS_LIST_EXCEPT.
8135 (header_regexp, h_re): Remove.
8136 (dd_c): New macro.
8137 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
8138 (my-distcheck): Use more-modern GCC flags.
8139 (signatures, %.asc): Remove.
8140 (rel-files, announcement): Remove signatures.
8141 Restore old updating code, even though we don't use it, so
8142 that we're the same as coreutils.
8143 (alpha, beta, major): Depend on news-date-check.
8144 Make the upload commands.
8145
8146 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
8147 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
8148 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
8149 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
8150 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
8151 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
8152 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
8153 * tests/sets.at: Likewise.
8154
8155 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
8156 we comment out the Autoconf version number.
8157 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
8158 it's error-prone and "make maintainer-distcheck" rejects it.
8159
8160 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
8161 Indent calls to "error" to pacify "make maintainer-distcheck",
8162 when the calls are not intended to be translated.
8163 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
8164
8165 * src/Makefile.am (DEFS): Use +=, to pacify
8166 "make maintainer-distcheck".
8167 (bison_SOURCES): Add scan-skel.h.
8168 (sc_tight_scope): New rule, from coreutils.
8169
8170 * src/files.c (src_extension, header_extension):
8171 Now static, not extern.
8172 * src/getargs.c (short_options): Likewise.
8173 * src/muscle_tab.c (muscle_table): Likewise.
8174 * src/parse-gram.y (current_class, current_type, current_prec):
8175 Likewise.
8176 * src/reader.c (grammar_end, previous_rule_end): Likewise.
8177 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
8178 * src/main.c (main): Cast bindtextdomain and textdomain calls to
8179 void, to avoid warning when NLS is disabled.
8180 * src/output.c: Include scan-skel.h.
8181 (scan_skel): Remove decl, since scan-skel.h does this.
8182 (output_skeleton):
8183 Indent calls to "error" to pacify "make maintainer-distcheck".
8184 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
8185 * src/reader.h (gram_end, gram_lineno): New decls to pacify
8186 "make maintainer-distcheck".
8187 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
8188 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
8189 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
8190 (skel_lex_destroy, scan_skel): Move these decls to...
8191 * src/scan-skel.h: New file.
8192 * src/uniqstr.c (uniqstr_assert):
8193 Indent calls to "error" to pacify "make maintainer-distcheck".
8194
8195 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
8196 not @VAR@.
8197
8198 * tests/torture.at: Revamp to avoid misuse of atoi that
8199 "make maintainer-distcheck" complained about.
8200
8201 * examples/extexi (message): Don't print a message more than once,
8202 and omit line-number decoration that makes Emacs compile think
8203 that informative messages are worth worrying about.
8204
8205 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
8206
8207 * configure.ac: Update version number.
8208
8209 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
8210 accidentally.
8211 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
8212 autogenerated by the maintainer.
8213 * examples/calc++/.cvsignore: Add *.yy.
8214
8215 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
8216 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8217 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8218
8219 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
8220
8221 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
8222 from maintainer-distcheck about casting the argument of 'free'.
8223
8224 * NEWS: Mention recent yytname changes.
8225 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
8226
8227 * bootstrap: For translations that have not yet been upgraded to
8228 the new runtime-po domain, prime the pump by extracting the
8229 relevant strings from the obsolete translations. This code can be
8230 removed once the bison-runtime domain has been translated by each
8231 team.
8232
8233 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
8234 now that token names are already quoted.
8235
8236 Fix problem reported by Anthony Heading.
8237 * data/glr.c (YYTOKEN_TABLE): New macro.
8238 (yytname): Define if YYTOKEN_TABLE.
8239 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
8240 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
8241 (YYERROR_VERBOSE): Define the same way the other skeletons do.
8242 * src/output.c (prepare_symbols): Output token_table_flag.
8243
8244 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
8247 again if the first call fails.
8248
8249 * data/glr.c (yytnamerr): New function.
8250 (yyreportSyntaxError): Use it to dequote most string literals.
8251 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
8252 with other skeletons. All uses changed.
8253 (yytnameerr_): New function.
8254 (yyreport_syntax_error): Use it to dequote most string literals.
8255 * data/yacc.c (yytnamerr): New function.
8256 (yyerrlab): Use it to decode most string literals.
8257 * doc/bison.texinfo (Decl Summary, Calling Convention):
8258 Clarify quoting convention of yytname.
8259 * src/output.c (prepare_symbols): Quote all names. This undoes
8260 the 2005-04-17 change, which is now accomplished (mostly) via
8261 changes in the parsers as described above.
8262 * tests/regression.at (Token definitions, Web2c Actions):
8263 Undo most 2005-04-17 change here, too.
8264
8265 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 Fix more problems reported by twlevo@xs4all.nl.
8268 * tests/cxx-type.at: Don't pipe output of ./types through sed to
8269 remove trailing spaces. This loses the exit status of ./types,
8270 and isn't needed since ./types shouldn't be emitting trailing
8271 spaces.
8272 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
8273 as the stack isn't valid in that case.
8274
8275 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8276 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8277 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8278 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
8279 is used.
8280 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
8281 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8282 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8283 Likewise.
8284
8285 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
8286 overly-picky compilers that reject 'char *foo = "bar";'.
8287
8288 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
8289 to FILE * parameter, not to stderr. This fixes a typo introduced
8290 in the 2005-07-12 change.
8291
8292 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
8293 warnings from GCC 4.
8294
8295 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
8296 (yyglrShiftDefer, yysplitStack):
8297 Remove unused parameters b4_pure_formals. All uses changed.
8298 (yyglrShift): Remove unused parameters b4_user_formals.
8299 All uses changed.
8300 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
8301
8302 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
8303
8304 Destructor cleanups and regularization among the three skeletons.
8305 * NEWS: Document the behavior changes.
8306 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
8307 stack before failing, as the cleanup code will do it for us now.
8308 * data/lalr1.cc (yyerrlab): Likewise.
8309 * data/glr.c (yyparse): Pop everything off the stack before
8310 freeing it, so that destructors get called properly.
8311 * data/lalr1.cc (yyreturn): Likewise.
8312 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
8313 This is more consistent.
8314 * doc/bison.texinfo (Destructor Decl): Mention more reasons
8315 why destructors might be called. 1.875 -> 2.1.
8316 (Destructor Decl, Decl Summary, Table of Symbols):
8317 Some English-language cleanups for %destructor.
8318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8319 Add output line for destructor of start symbol.
8320 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
8321 because of that same extra output line.
8322
8323 * NEWS: Document minor wording changes in diagnostics of
8324 Bison-generated parsers.
8325 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
8326 Remove unused formals. All uses changed.
8327 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8328 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
8329 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
8330 Rename yyoverflowab to yyexhaustedlab.
8331 When memory exhaustion occurs during syntax-error reporting,
8332 report it separately rather than in a single diagnostic; this
8333 eases translation.
8334 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
8335 (Memory Exhausted): Renamed from Parser Stack Overflow.
8336 Revamp wording slightly to prefer "memory exhaustion".
8337 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
8338
8339 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
8340
8341 Add i18n support to the GLR skeleton. Partially fix the C++
8342 skeleton; a C++ expert needs to finish this. Remove debugging
8343 msgids; there's little point to having them translated, since they
8344 can be understood only by someone who can read the
8345 (English-language) source code.
8346
8347 Generate runtime-po/bison-runtime.pot automatically, so that we
8348 don't have to worry about garbage getting in that file. We'll
8349 make sure after the next official release that old msgids don't
8350 get lost. See
8351 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
8352
8353 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
8354 Now auto-generated.
8355 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
8356 Fix typos in explanations of the runtime file.
8357 * bootstrap: Change gettext keyword from YYI18N to YY_.
8358 Use standard Makefile.in.in in runtime-po, since we'll arrange
8359 for backward-compatible bison-runtime.po files in a different way.
8360 * data/glr.c (YY_): New macro, from yacc.c.
8361 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
8362 Translate messages intended for users.
8363 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
8364 the wording in the other skeletons. We don't know that the memory
8365 is virtual.
8366 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
8367 Use same method that yacc.c uses.
8368 Don't translate debugging messages.
8369 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
8370 it doesn't work (yet), and requires C++ expertise to fix.
8371 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
8372 Move defn to a more logical place, to be consistent with other
8373 skeletons.
8374 Don't translate debugging messages.
8375 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
8376 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
8377 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
8378 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
8379
8380 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
8381 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
8382 void, not int.
8383 * tests/glr-regression.at (Badly Collapsed GLR States):
8384 Likewise.
8385 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8386 yylex should return 0 at EOF rather than aborting.
8387
8388 Improve tests for stack overflow in GLR parser.
8389 Problem reported by twlevo@xs4all.nl.
8390 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
8391 All uses removed.
8392 (yyStackOverflow): Just longjmp, but with value 2 so that caller
8393 can handle the problem.
8394 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
8395 (yyparse): New local variable yyresult to record the result.
8396 Use result of setjmp to set it, rather than storing itinto
8397 struct.
8398 (yyDone): Remove label.
8399 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
8400 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
8401 if YYABORT is used).
8402 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
8403 yyparse status; put status > 1 into diagnostic.
8404 Check that status==2 works.
8405 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
8406 Use exit status 3 for failure to open (which shouldn't happen).
8407
8408 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
8409
8410 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
8411 1 on syntax error; just let yyparse do its thing.
8412 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
8413 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
8414 (Exploding the Stack Size with Alloca):
8415 (Exploding the Stack Size with Malloc):
8416 Expect exit status 2, not 1, since the parser is supposed to blow
8417 its stack. Problem reported by twlevo@xs4all.nl.
8418
8419 * data/glr.c (yyparse): Don't assume that the initial calls
8420 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
8421 Print a stack-overflow message and fail instead.
8422 Initialize the line-number information before creating the stack,
8423 so that the stack-overflow message can report line zero safely.
8424
8425 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 Fix problems reported by twlevo@xs4all.nl.
8428 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
8429 (yyuserMerge): Provide a default case if b4_mergers is empty.
8430 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
8431 * tests/glr-regression.at
8432 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8433 Add casts to pacify C++ compilers.
8434 * tests/glr-regression.at (Improper merging of GLR delayed action
8435 sets): Declare yylex before using it.
8436 * tests/Makefile.am (maintainer-check-g++): Fix a stray
8437 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
8438 test for valgrind; valgrind is independent of g++.
8439 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
8440 for compatibility with POSIX 1003.1-2001 (if running coreutils).
8441 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
8442 Use a destructor, so that we can expand the stack. Change
8443 YYSTYPE to char * so that we can free it. Cast result of malloc.
8444
8445 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8446
8447 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
8448 a valgrind failure. Problem reported by twlevo@xs4all.nl.
8449
8450 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
8451
8452 * PACKAGING: New file, suggested by Bruno Haible and taken from
8453 similar wording in gettext's PACKAGING file.
8454 * NEWS: Mention PACKAGING.
8455 * Makefile.am (EXTRA_DIST): Add PACKAGING.
8456
8457 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
8458
8459 * NEWS: Document recent i18n improvements.
8460 * bootstrap: Get runtime translations into runtime-po.
8461 Create runtime-po files automatically, if possible.
8462 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
8463 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
8464 does not infringe on the user's name space.
8465 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
8466 * doc/bison.texinfo (Internationalization): Revamp the English
8467 and Texinfo syntax a bit, to try to make it clearer.
8468 (Bison Options, Option Cross Key): Mention --print-localedir.
8469 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
8470 YYENABLE_NLS. Quote a bit more.
8471 * runtime-po/.cvsignore: New file.
8472 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
8473 * runtime-po/Rules-quot: Remove; now created by bootstrap.
8474 * runtime-po/quot.sed: Likewise.
8475 * runtime-po/boldquot.sed: Likewise.
8476 * runtime-po/en@quot.header: Likewise.
8477 * runtime-po/en@boldquot.header: Likewise.
8478 * runtime-po/insert-header.sin: Likewise.
8479 * runtime-po/remove-potcdate.sin: Likewise.
8480 * runtime-po/Makevars: Likewise.
8481 * runtime-po/LINGUAS: Likewise.
8482 * runtime-po/de.po: Likewise; we will rely on the translation project
8483 to maintain this, so "bootstrap" should get it.
8484 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
8485 its value.
8486 * src/main.c (main): Bind the bison-runtime domain, too.
8487
8488 2005-07-12 Bruno Haible <bruno@clisp.org>
8489
8490 * data/yacc.c: Include <libintl.h> when NLS is enabled.
8491 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
8492 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
8493 * runtime-po: New directory.
8494 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
8495 $(DOMAIN).pot-update rule, so that old messages are never dropped.
8496 * runtime-po/Rules-quot: New file, copied from po/.
8497 * runtime-po/quot.sed: Likewise.
8498 * runtime-po/boldquot.sed: Likewise.
8499 * runtime-po/en@quot.header: Likewise.
8500 * runtime-po/en@boldquot.header: Likewise.
8501 * runtime-po/insert-header.sin: Likewise.
8502 * runtime-po/remove-potcdate.sin: Likewise.
8503 * runtime-po/Makevars: New file.
8504 * runtime-po/POTFILES.in: New file.
8505 * runtime-po/LINGUAS: New file.
8506 * runtime-po/bison-runtime.pot: New file.
8507 * runtime-po/de.po: New file.
8508 * m4/bison.m4: New file.
8509 * Makefile.am (SUBDIRS): Add runtime-po.
8510 (aclocaldir, aclocal_DATA): New variables.
8511 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
8512 Define aclocaldir.
8513 * src/getargs.c (usage): Document --print-localedir option.
8514 (PRINT_LOCALEDIR_OPTION): New enum item.
8515 (long_options): Add --print-localedir option.
8516 (getargs): Handle --print-localedir option.
8517 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
8518 (Internationalization): New section.
8519
8520 2005-07-12 Akim Demaille <akim@epita.fr>
8521
8522 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
8523 for consistency with the rest of the code.
8524 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
8525 Add separators.
8526
8527 2005-07-12 Akim Demaille <akim@epita.fr>
8528
8529 * src/parse-gram.y: Use %printer instead of YYPRINT.
8530
8531 2005-07-12 Akim Demaille <akim@epita.fr>
8532
8533 * src/symtab.h, src/symtab.c (symbol_print): New.
8534 * src/symlist.h, src/symlist.c (symbol_list_print): New.
8535 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
8536
8537 2005-07-12 Akim Demaille <akim@epita.fr>
8538
8539 * data/glr.c (b4_syncline): Fix (swap) the definitions of
8540 b4_at_dollar and b4_dollar_dollar.
8541
8542 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
8543
8544 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
8545 and Pennello's paper.
8546
8547 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
8548
8549 * data/yacc.c (yyparse): Undo previous patch. Instead,
8550 set yylsp[0] and yyvsp[0] only if the initial action
8551 sets yylloc and yylval, respectively.
8552
8553 * data/yacc.c (yyparse): In the initial action, set
8554 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
8555 This avoids the use of undefined variables if the initial
8556 action does not set yylloc and/or yylval.
8557
8558 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
8559
8560 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
8561 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
8562 Remove from CVS. These files are automatically generated.
8563 * examples/extexi: Clarify that this file is now part of Bison,
8564 not GNU M4, and that it works with any POSIX-compatible Awk.
8565 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
8566 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
8567 so that we also get calc++-parser.yy. Geneate it.
8568 Use $(AWK), not gawk, since any conforming Awk will do.
8569 Put comment before action, since older 'make' can't handle comment
8570 in action.
8571 $(BUILT_SOURCES): List all built sources, not just some of them.
8572 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
8573 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
8574 $($(calc_sources_generated)): Remove unnecessary test for existence
8575 of target. (This had a shell syntax error anyway; a stray "x".)
8576 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
8577 calc++-parser.yy.
8578 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
8579
8580 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
8581 implied by the other modules.
8582
8583 2005-07-06 Akim Demaille <akim@epita.fr>
8584
8585 Bind examples/calc++ to the package.
8586 * examples/calc++/Makefile: Remove, replaced by...
8587 * examples/calc++/Makefile.am: ... this new file.
8588 * examples/calc++/test: Remove input.
8589 * examples/calc++/compile: Remove.
8590 * examples/Makefile.am: New.
8591 * configure.ac, Makefile.am: Adjust.
8592 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
8593
8594 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
8595
8596 * data/glr.c (yyFail): Drastically simplify; since the format argument
8597 never had any % directives, we can simply pass it to yyerror.
8598 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
8599 be modified later, as that is the usual style in glr.c.
8600 Problems reported by Paul Hilfinger.
8601
8602 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
8603 and size overflow errors.
8604 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
8605 in case the user prolog sets feature-test macros like _GNU_SOURCE.
8606 (YYSIZEMAX): New macro.
8607 (yystpcpy): New function, taken from yacc.c.
8608 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
8609 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
8610 so that we don't have to maintain their signatures.
8611 (yyFail): Check for buffer overflow, by using vsnprintf rather
8612 than vsprintf. Allocate a bigger buffer if possible.
8613 Report an error if buffer allocation fails.
8614 (yyStackOverflow): New function.
8615 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
8616 the initialization was successful. It might fail if storage was
8617 exhausted.
8618 (yyexpandGLRStack): Add more checks for storage allocation failure.
8619 Use yyStackOverflow to report failures.
8620 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
8621 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
8622 Don't assume stack number fits in int.
8623 (yysplitStack): Check for storage allocation failure.
8624 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
8625 can print diagnostics on storage allocation failure. All callers
8626 changed.
8627 (yyresolveValue): Use yybool for boolean.
8628 (yyreportSyntaxError): Check for size-calculation overflow.
8629 This code is taken from yacc.c.
8630 (yyparse): Check for storage allocation errors when allocating
8631 the initial stack.
8632
8633 2005-07-05 Akim Demaille <akim@epita.fr>
8634
8635 Extract calc++ from the documentation.
8636 * doc/bison.texinfo (Calc++): Add the extraction marks.
8637 * examples/extexi: New, from the aborted GNU Programming 2E.
8638 Separate the different paragraph of a file with empty lines.
8639 * examples/Makefile: Use it to extract the whole calc++ example.
8640
8641 2005-06-24 Akim Demaille <akim@epita.fr>
8642
8643 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
8644 class typedefs.
8645
8646 2005-06-22 Akim Demaille <akim@epita.fr>
8647
8648 * doc/bison.texinfo (C++ Language Interface): First stab.
8649 (C++ Parsers): Remove.
8650
8651 2005-06-22 Akim Demaille <akim@epita.fr>
8652
8653 * data/lalr1.cc (yylex_): Honor %lex-param.
8654
8655 2005-06-22 Akim Demaille <akim@epita.fr>
8656
8657 Start a set of simple examples.
8658 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
8659 * examples/calc++/calc++-driver.hh,
8660 * examples/calc++/calc++-parser.yy,
8661 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
8662 * examples/calc++/compile, examples/calc++/test: New.
8663
8664 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
8665
8666 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
8667 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
8668 which stems from the 2005-05-27 patch.
8669
8670 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8671
8672 * data/glr.c: Modify treatment of unused parameters to permit use
8673 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
8674
8675 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
8676
8677 Fix infringement on user name space reported by Janos Zoltan Szabo.
8678 * data/yacc.c (yyparse): strlen -> yystrlen.
8679
8680 2005-05-30 Akim Demaille <akim@epita.fr>
8681
8682 * data/lalr1.cc (_): New.
8683 Translate the various messages.
8684
8685 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
8686
8687 Fix infringement on user name space reported by Bruno Haible.
8688 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
8689 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
8690 the user's name space.
8691 (alloca): Include <stdlib.h> to get it, if it's not built in.
8692 (YYMALLOC, YYFREE): Define only if needed.
8693 (malloc, free): Declare, but only if needed, as this infringes on
8694 the user name space.
8695
8696 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
8697
8698 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
8699 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
8700 with %d format.
8701 * lib/ebitset.c (min, max): Undef before defining.
8702 * lib/vbitset.c (min, max): Likewise.
8703 * lib/subpipe.c (create_subpipe): Save local variables in case
8704 vfork clobbers them.
8705
8706 2005-05-24 Bruno Haible <bruno@clisp.org>
8707
8708 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
8709 error message syntax used by gcc-4.0.
8710
8711 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
8712
8713 * README: Mention m4 1.4.3. Remove obsolete advice about
8714 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
8715
8716 * bootstrap: Remove workaround for problem I encountered with
8717 gettext 0.14.1; it seems to be fixed now.
8718
8719 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
8720
8721 * NEWS: Version 2.0a.
8722
8723 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
8724 the previous change.
8725
8726 Various maintainer cleanups.
8727 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
8728 conftest*, for benefit of CVS commands run at the same time as
8729 "configure". Add build-aux, since "bootstrap" now creates it and
8730 its subfiles.
8731 * Makefile.cfg (move_if_change): Remove.
8732 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
8733 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
8734 (po_repo, do-po-update, po-update, wget_files, get-targets):
8735 (config.guess-url_prefix, config.sub-url_prefix):
8736 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
8737 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
8738 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
8739 Remove.
8740 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
8741 this is now the recommended name.
8742 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
8743 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
8744 ylwrap. These files now go into build-aux.
8745 * config/move-if-change: Remove.
8746 * config/prev-version.txt: Bump from 1.75 to 2.0.
8747
8748 * bootstrap: Add stdio-safer, unistd-safer modules.
8749 Remove m4/glibc2.m4 (introduced by latest gnulib, but
8750 we don't need it).
8751 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
8752 fopen-safer.c, stdio-safer.h, unistd-safer.h.
8753 * lib/subpipe.c: Include "unistd-safer.h".
8754 (create_subpipe): Make sure all the newly-created
8755 file descriptors are > 2, so that diagnostics don't
8756 get sent down them (which might cause Bison to hang, in theory).
8757 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
8758 * src/files.c (xfopen): Use fopen_safer, not fopen.
8759
8760 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
8761 yesterday's yacc.c fix.
8762
8763 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
8764
8765 * data/glr.c, data/lalr1.cc: Update copyright date.
8766
8767 Fix a destructor bug reported by Wolfgang Spraul in
8768 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
8769 * data/yacc.c (yyabortlab): Don't call destructor, and
8770 don't set yychar to EMPTY.
8771 (yyoverflowlab): Don't call destructor.
8772 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
8773 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
8774 since we no longer output the message "discarding lookahead token
8775 end of input ()".
8776
8777 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8778
8779 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
8780 fix a small glitch in debugging output.
8781 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
8782 after YY_SYMBOL_PRINT where needed.
8783
8784 (struct yyGLRState): Add some comments.
8785 (struct yySemanticOption): Add some comments.
8786 (union yyGLRStackItem): Add comment.
8787
8788 (yymergeOptionSets): Correct this to properly perform the union,
8789 avoiding infinite reported by Michael Rosien.
8790 Update comment.
8791
8792 * tests/glr-regression.at: Add test for GLR merging error reported
8793 by M. Rosien.
8794
8795 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8796
8797 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8798 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8799 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8800 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8801 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8802 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8803 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8804 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8805 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8806 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8807 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8808 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8809 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8810 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8811 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8812 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8813 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8814 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8815 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8816 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8817 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8818 src/output.h, src/parse-gram.c, src/parse-gram.h,
8819 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8820 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8821 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8822 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8823 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8824 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8825 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8826 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8827 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8828 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8829 tests/reduce.at, tests/regression.at, tests/sets.at,
8830 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8831 Update FSF postal mail address.
8832
8833 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8834
8835 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8836 Problem reported by Ralf Menzel.
8837
8838 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8839
8840 * tests/actions.at: Test that stack overflow invokes destructors.
8841 From Marcus Holland-Moritz.
8842 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8843 from here....
8844 (yyreturn): to here. That way, destructors are called properly
8845 even if the stack overflows, or the user calls YYACCEPT or
8846 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8847 (yyoverflowlab): Destroy the lookahead.
8848
8849 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8850
8851 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8852
8853 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8854
8855 * NEWS: Bison-generated C parsers no longer quote literal strings
8856 associated with tokens.
8857 * src/output.c (prepare_symbols): Don't escape strings,
8858 since users don't want to see C escapes.
8859 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8860 in diagnostics.
8861 * tests/input.at (Torturing the Scanner): Likewise.
8862 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8863
8864 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8865
8866 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8867 the data size is known to be too small and we can't increase it.
8868 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8869
8870 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8871
8872 * src/parse-gram.y: Include quotearg.h.
8873 (string_as_id): Quote $1 before using it as a key, since the
8874 lexer no longer quotes it for us.
8875 (string_content): Don't strip quotes, since lexer no longer
8876 quotes it for us.
8877 * src/scan-gram.l: Include quotearg.h.
8878 ("\""): Omit quote.
8879 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8880 a key, since the rest of the lexer doesn't quote it.
8881 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8882 * tests/regression.at (Token definitions): Check for backslashes
8883 in token strings.
8884
8885 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8886 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8887 (yyparse): Revamp code to generate long syntax error message, to
8888 make it easier to translate, and to avoid problems with arithmetic
8889 overflow. Change "virtual memory" to "memory" in diagnostic, since
8890 we don't know whether the memory is virtual.
8891
8892 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8893
8894 * NEWS: Bison-generated C parsers now use the _ macro to
8895 translate strings.
8896 * data/yacc.c (_) [!defined _]: New macro.
8897 All English strings wrapped inside this macro.
8898 * doc/bison.texinfo (Bison Parser): Document _.
8899 * po/POTFILES.in: Include src/parse-gram.c, since it now
8900 includes translateable strings that parse-gram.y doesn't.
8901
8902 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8903
8904 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8905 reverting the 2004-10-11 change to this function.
8906 (symbol_check_alias_consistency): Don't call symbol_type_set
8907 if the type name is already correct.
8908 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8909
8910 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8911
8912 * tests/regression.at (Token definitions): Don't use a token named
8913 c, as that generates a "#define c ..." that runs afoul of buggy
8914 stdlib.h that uses the identifier c as a member of struct
8915 drand48_data. Problem reported by Horst Wente.
8916
8917 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8918
8919 * bootstrap: Change translation URL from
8920 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8921 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8922 redirection glitches. Problem reported by twlevo@xs4all.nl.
8923
8924 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8925
8926 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8927 after operands; POSIX says this isn't portable for the c99 command.
8928
8929 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8930
8931 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8932 immediately if a data overrun has occurred; this may help us track
8933 down what may be a spurious failure on MacOS.
8934
8935 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8936
8937 Respond to problems reported by twlevo@xs4all.nl.
8938
8939 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8940
8941 * src/vcg.h: Comment fix.
8942 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8943 (G_CMAX): Change to -1 instead of INT_MAX.
8944
8945 * data/yacc.c (yyparse): Omit spaces before #line.
8946
8947 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8948
8949 * src/tables.c (state_number_to_vector_number): Put it inside an
8950 "#if 0", since it's not currently used. Problem reported by
8951 Roland McGrath.
8952
8953 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8954
8955 * src/output.c (escaped_output): Renamed from
8956 escaped_file_name_output, since we now use it for symbol tags as
8957 well. All uses changed.
8958 (symbol_destructors_output, symbol_printers_output):
8959 Escape symbol tags too.
8960 Problem reported by Matyas Forstner in
8961 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8962
8963 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8964 not needed.
8965 * src/output.c (user_actions_output, token_definitions_output,
8966 symbol_destructors_output, symbol_printers_output): Likewise.
8967 * src/reader.c (prologue_augment): Likewise.
8968 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8969
8970 * src/vcg.c (output_edge): Don't quote linestyle arg.
8971 Problem reported by twlevo@xs4all.nl.
8972
8973 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8974
8975 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8976 example, reported by Derek M Jones. Also, make the example even
8977 more outrageous, to better illustrate how bad the problem is.
8978
8979 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8980
8981 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8982 putsym. Typo reported by Sebastian Piping.
8983
8984 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8985
8986 * doc/bison.texinfo (Language and Grammar): some -> same
8987 (Epilogue): int he -> in the
8988 Typos reported by Sebastian Piping via Justin Pence.
8989
8990 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8991
8992 * tests/glr-regression.at (Improper handling of embedded actions
8993 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8994 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8995 with dollar signs in test names.
8996 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8997 for a similar reason.
8998
8999 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
9000
9001 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
9002 wants to redefine G_VIEW.
9003
9004 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
9005
9006 * src/vcg.c (get_view_str): Remove case for normal_view.
9007 Problem reported by twlevo@xs4all.nl.
9008
9009 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
9010
9011 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
9012 Problem reported by twlevo@xs4all.nl.
9013
9014 * doc/bison.texinfo: Change @dircategory from "GNU programming
9015 tools" to "Software development". Requested by Richard Stallman
9016 via Karl Berry.
9017
9018 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
9019
9020 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
9021 Problem reported by twlevo@xs4all.nl.
9022
9023 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
9024
9025 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
9026 keyword; it's not needed with modern compilers, and it doesn't
9027 affect correctness with older compilers. Suggested by
9028 twlevo@xs4all.nl.
9029
9030 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
9031
9032 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
9033 gcc -Wswitch-default.
9034 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9035 * data/yacc.c (yyparse): Likewise.
9036
9037 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
9038
9039 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
9040 already. Let config.h define any nonstandard values.
9041
9042 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
9043
9044 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
9045 for the benefit of slower hosts. Problem reported by
9046 Nelson H. F. Beebe.
9047
9048 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
9049
9050 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
9051 being defined and not used.
9052 * data/lalr1.cc (yyparse): Likewise.
9053 Use "if (false)" rather than "if (0)".
9054
9055 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
9056
9057 * TODO: Mention that we should allow NUL bytes in tokens.
9058
9059 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
9060
9061 * src/scan-skel.l (<<EOF>>): Don't close standard output.
9062 Problem reported by Hans Aberg.
9063
9064 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
9065
9066 * src/getargs.c (version): Happy new year; update overall
9067 program copyright date from 2004 to 2005.
9068
9069 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
9070 Problem reported by Hans Aberg.
9071 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
9072 (Output file names.): Add a test for the case when standard output
9073 is closed.
9074
9075 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
9076
9077 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
9078 to fix an oversight in the Bison 2.0 manual.
9079
9080 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
9081
9082 * NEWS: Version 2.0. Reformat the existing news items since
9083 1.875, so that related items are grouped together.
9084 * configure.ac (AC_INIT): Bump version to 2.0.
9085 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
9086
9087 * tests/torture.at (Exploding the Stack Size with Alloca): Set
9088 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
9089 otherwise, we're not testing alloca. Unfortunately there's no
9090 simple way to consult HAVE_ALLOCA here.
9091
9092 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
9093 for yymsg, too.
9094
9095 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
9096 hand. This avoids a warning about comparing int to size_t when
9097 GCC warnings are enabled.
9098
9099 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
9100
9101 * NEWS: Bison-generated parsers no longer default to using the
9102 alloca function (when available) to extend the parser stack, due
9103 to widespread problems in unchecked stack-overflow detection.
9104 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
9105 responsibility to set it to a positive value. This lets the user
9106 specify a value that is not a preprocessor constant.
9107 * data/yacc.c (YYMAXDEPTH): Likewise.
9108 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
9109 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
9110 to be a compile-time constant. However, explain the constraints on it.
9111 Also, explain the constraints on YYINITDEPTH.
9112 (Table of Symbols): Explain that alloca is no longer the default.
9113 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
9114 to 1.
9115
9116 * doc/bison.texinfo (Location Default Action): Mention that n must
9117 be zero when k is zero. Suggested by Frank Heckenbach.
9118
9119 2004-12-22 Akim Demaille <akim@epita.fr>
9120
9121 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
9122 (parser::state_type, parser::semantic_type, parser::location_type):
9123 Private, not public.
9124 (parser::parse): Return ints, not bool.
9125 Returning a bool introduces a problem: 0 corresponds to false, and
9126 it seems weird to return false on success. Returning true changes
9127 the conventions for yyparse.
9128 Alternatively we could return void and send an exception.
9129 There is no clear consensus (yet?).
9130 (state_stack, semantic_stack, location_stack): Rename as...
9131 (state_stack_type, semantic_stack_type, location_stack_type): these.
9132 Private, not public.
9133 * tests/c++.at: New.
9134 * tests/testsuite.at, tests/Makefile.am: Adjust.
9135
9136 2004-12-21 Akim Demaille <akim@epita.fr>
9137
9138 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
9139
9140 2004-12-21 Akim Demaille <akim@epita.fr>
9141
9142 Don't impose std::string for filenames.
9143
9144 * data/lalr1.cc (b4_filename_type): New.
9145 (position::filename): Use it.
9146 (parser.hh): Move the inclusion of stack.hh and location.hh below
9147 the user code, so that needed headers for the filename type can be
9148 included first.
9149 Forward declare them before the user code.
9150 * tests/Makefile.am (check-local, installcheck-local): Pass
9151 TESTSUITEFLAGS to the TESTSUITE.
9152
9153 2004-12-20 Akim Demaille <akim@epita.fr>
9154
9155 Use more STL like names: my_class instead of MyClass.
9156
9157 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
9158 (SemanticStack, SemanticType, StateStack, StateType)
9159 (TokenNumberType, Stack, Slice, Traits, Parser::location)
9160 (Parser::value): Rename as...
9161 (location_stack, location_type, rhs_number_type, semantic_stack)
9162 (semantic_type, state_stack, state_type, token_number_type, stack)
9163 (slice, traits, parser::yylloc, parser::yylval): these.
9164
9165 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
9166
9167 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
9168
9169 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
9170 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9171
9172 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 Remove uses of 'short int' and 'unsigned short int'. This raises
9175 some arbitrary limits. It uses more memory but nowadays that's
9176 not much of an issue.
9177
9178 This change does not affect the generated parsers; that's a different
9179 task, as some users will want to conserve memory there.
9180
9181 Ideally we should use size_t to represent all object counts, and
9182 something like ptrdiff_t to represent signed differences of object
9183 counts; but that will require more code-cleanup than I have the
9184 time to do right now.
9185
9186 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
9187 Use size_t, not int or short int, to count objects.
9188 * src/closure.c (nritemset, closure): Likewise.
9189 * src/closure.h (nritemset, closure): Likewise.
9190 * src/nullable.c (nullable_compute): Likewise.
9191 * src/print.c (print_core): Likewise.
9192 * src/print_graph.c (print_core): Likewise.
9193 * src/state.c (state_compare, state_hash): Likewise.
9194 * src/state.h (struct state): Likewise.
9195 * src/tables.c (default_goto, goto_actions): Likewise.
9196
9197 * src/gram.h (rule_number, rule): Use int, not short int.
9198 * src/output.c (prepare_rules): Likewise.
9199 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
9200 errs, reductions): Likewise.
9201 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
9202 Likewise.
9203 * src/tables.c (vector_number, tally, action_number,
9204 ACTION_NUMBER_MINIMUM): Likewise.
9205 * src/output.c (muscle_insert_short_int_table): Remove.
9206
9207 2004-12-17 Akim Demaille <akim@epita.fr>
9208
9209 * data/lalr1.cc: Extensive Doxygenation.
9210 (error_): Rename as...
9211 (error): this, since it is visible to the user.
9212 Adjust callers.
9213 (Parser::message): Now an automatic variable from...
9214 (Parser::yyreport_syntax_error_): here.
9215 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
9216 Parser::error.
9217 * tests/input.at: Escape $.
9218
9219 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
9220
9221 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
9222 Parenthesize rhs to avoid obscure problems with mistakes like
9223 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
9224 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9225 b4_rhs_location): Likewise.
9226 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
9227 b4_rhs_location): Likewise.
9228
9229 2004-12-16 Akim Demaille <akim@epita.fr>
9230
9231 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
9232 yacc.c: be sure to stay within yycheck_.
9233 * tests/actions.at: Re-enable C++ tests.
9234
9235 2004-12-16 Akim Demaille <akim@epita.fr>
9236
9237 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
9238 real.
9239
9240 2004-12-16 Akim Demaille <akim@epita.fr>
9241
9242 Use #define to handle the %name-prefix.
9243
9244 * data/glr.c, data/yacc.c: Comment changes.
9245 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
9246 so that one can refer to yylex in the parser file, and have it
9247 renamed, as is the case with other skeletons.
9248
9249 2004-12-16 Akim Demaille <akim@epita.fr>
9250
9251 Move lalr1.cc internals into yy*.
9252
9253 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
9254 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
9255 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
9256 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
9257 (empty_, final_, terror_, errcode_, ntokens_)
9258 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
9259 (looka_, ilooka_, error_range_, nerrs_):
9260 Rename as...
9261 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
9262 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
9263 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
9264 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
9265 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
9266 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
9267 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
9268 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
9269 these.
9270
9271 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
9272
9273 Fix some problems reported by twlevo at xs4all.
9274 * src/symtab.c (symbol_new): Report an error if the input grammar
9275 contains too many symbols. This is better than calling abort() later.
9276 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
9277 (struct node, struct graph):
9278 Rename member expand to stretch. All uses changed.
9279 (struct graph): Remove member layoutalgorithm. All uses removed.
9280 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
9281 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
9282 All uses changed.
9283 (N_STRETCH): Rename from N_EXPAND. All uses changed.
9284
9285 2004-12-15 Akim Demaille <akim@epita.fr>
9286
9287 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
9288 Add more Doxygen comments.
9289 (symprint_, stack_print_, reduce_print_, destruct_, pop)
9290 (report_syntax_error_, translate_): Rename as...
9291 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
9292 (yypop_, yyreport_syntax_error_, yytranslate_): this.
9293
9294 2004-12-15 Akim Demaille <akim@epita.fr>
9295
9296 * data/lalr1.cc (lex_): Rename as...
9297 (yylex_): this.
9298 Move the trace here.
9299 Take the %name-prefix into account.
9300 Reported by Alexandre Duret-Lutz.
9301
9302 2004-12-15 Akim Demaille <akim@epita.fr>
9303
9304 Simplify the C++ parser constructor.
9305
9306 * data/lalr1.cc (debug_): Rename as...
9307 (yydebug_): so that the parser's internals are always in the yy*
9308 pseudo namespace.
9309 Adjust uses.
9310 (b4_parse_param_decl): Remove the leading comma as it is now only
9311 called as unique argument list.
9312 (Parser::Parser): Remove the constructor accepting a location and
9313 an initial debugging level.
9314 Remove from the other ctor the argument for the debugging level.
9315 (debug_level_type, debug_level, set_debug_level): New.
9316
9317 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
9318 constructor calls.
9319
9320 2004-12-15 Akim Demaille <akim@epita.fr>
9321
9322 Remove b4_root related material: failure experiment
9323 (which goal was to allow to derive from a class).
9324
9325 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
9326 definitions and uses.
9327
9328 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
9329
9330 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
9331 not 2, since it's not portable to subtract 1 from the start of an
9332 array. The new item 0 is never set or used. All uses changed.
9333
9334 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
9335 the default definition of YYLLOC_DEFAULT. Problem reported
9336 by Frank Heckenbach.
9337
9338 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
9339
9340 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
9341 the normal case and one for the error case. Just use the
9342 first one uniformly. Problem reported by Frank Heckenbach.
9343 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
9344 use exactly the same macro in both places.
9345 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
9346 so that the normal-case YYRHSLOC works for the error case too.
9347 All uses changed.
9348 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
9349 (YYLLOC_DEFAULT): Use the same macro as glr.c.
9350 * doc/bison.texinfo (Location Default Action): Don't claim that
9351 we have an array of locations. Use the same macro for both glr
9352 and lalr parsers. Mention YYRHSLOC. Mention what happens when
9353 the index is 0.
9354
9355 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9356
9357 * HACKING: Update email addresses to send announcements to.
9358
9359 * configure.ac (AC_INIT): Bump version to 1.875f.
9360
9361 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
9362
9363 * NEWS: Version 1.875e.
9364 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
9365
9366 * src/scan-skel.l: Include "complain.h", for "fatal".
9367
9368 * src/relation.h (relation_print, relation_digraph):
9369 Relation sizes are of type relation_node, not size_t (this is
9370 merely a doc fix, since the two types are equivalent).
9371 (relation_transpose): Relation sizes are of type relation_node,
9372 not int.
9373 * src/relation.c: Likewise.
9374 (top, infinity): Now of type relation_node, not int.
9375 (traverse, relation_transpose): Use relation_node, not int.
9376
9377 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
9378 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
9379 (yyparse): Remove unused local introduced in 2004-10-25 patch.
9380
9381 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
9382 specifying whether the test should be skipped. Use it tp
9383 specify that the [%defines %skeleton "lalr1.cc"] tests currently
9384 fail on some hosts, and should be skipped.
9385
9386 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
9387
9388 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
9389 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
9390 unless otherwise specified below.
9391
9392 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
9393 to allocate kernel_base, kernel_items, kernel_size, since
9394 they needn't be initialized to 0.
9395 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
9396 * src/closure.c (new_closure): Likewise, for itemset.
9397 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
9398 * src/lalr.c (set_goto_map): Likewise, for temp_map.
9399 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
9400 (build_relations): Likewise for edge, states1, includes.
9401 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
9402 * src/reader.c (packgram): Likewise, for ritem, rules.
9403 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
9404 * src/relation.c (relation_digraph): Likewise for VERTICES.
9405 (relation_transpose): Likewise for new_R, end_R.
9406 * src/symtab.c (symbols_token_translations_init): Likewise for
9407 token_translations.
9408 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
9409 (token_actions): Likewise for yydefact, actrow, conflrow,
9410 conflict_list.
9411 (save_column): Likewise for froms[symno], tos[symno].
9412 (goto_actions): Likewise for state_count.
9413 (pack_table): Likewise for base, pos, check.
9414 (tables_generate): Likewise for width.
9415
9416 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
9417 for initial core. Just have a separate core, so we needn't worry
9418 about whether kernel_size and kernel_base are initialized.
9419
9420 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
9421 kernel_size, kernel_items): Remove unnecessary initialization.
9422 * src/conflicts.c (conflicts): Likewise.
9423 * src/derives.c (derives): Likewise.
9424 * src/muscle_tablc (muscle_insert): Likewise.
9425 * src/relation.c (relation_digraph): Likewise.
9426 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
9427 conflrow, conflict_table, conflict_list, table, check):
9428 Likewise.
9429
9430 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
9431 This is because all callers pass unsigned int.
9432 * src/closure.h (new_closure): Likewise.
9433
9434 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
9435 (build_relations): Initialize includes[i] in all cases.
9436 * src/reader.c (packgram): Always initialize rules[ruleno].prec
9437 and rules[ruleno].precsym. Initialize members in order.
9438 * src/relation.c (relation_transpose): Always initialize new_R[i]
9439 and end_R[i].
9440 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
9441
9442 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
9443 conflict_list[0] was always 0, but now it isn't initialized.
9444
9445 * src/table.c (table_grow): When conflict_table grew, the grown
9446 area wasn't cleared. Fix this.
9447
9448 * lib/.cvsignore: Add strdup.c, strdup.h.
9449 * m4/.cvsignore: Add strdup.m4.
9450
9451 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
9452
9453 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
9454 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
9455 GOTO_NUMBER_MAXIMUM, since we occasionally compute
9456 ngotos + 1 without checking for overflow.
9457 (build_relations): Use END_NODE, not -1, to denote end of edges.
9458 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
9459 build_relations): Use goto_number, not int, for goto numbers.
9460 * src/tables.c (save_column, default_goto): Likewise.
9461
9462 2004-11-23 Akim Demaille <akim@epita.fr>
9463
9464 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
9465 of #defining from yystype.
9466 Don't typedef yystype, C++ does not need it.
9467 This lets it possible to forward declare it as union.
9468
9469 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
9470
9471 * bootstrap (gnulib_modules): Add extensions.
9472 Problem reported by Jim Meyering.
9473
9474 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
9475
9476 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
9477 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
9478 src/system.h, src/tables.c: XFREE -> free, to accommodate
9479 recent change to gnulib xalloc.h.
9480 Problem reported by Jim Meyering.
9481
9482 2004-11-17 Akim Demaille <akim@epita.fr>
9483
9484 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
9485
9486 2004-11-17 Akim Demaille <akim@epita.fr>,
9487 Alexandre Duret-Lutz <adl@gnu.org>
9488
9489 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
9490 changes.
9491 (YYCDEBUG): Adjust.
9492 Use it instead of cdebug_.
9493 (Parser::debug_stream, Parser::set_debug_stream): New.
9494 (Parser::symprint_): Define cdebug_ for temporary backward
9495 compatibility.
9496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
9497 debug_stream ().
9498
9499 2004-11-17 Akim Demaille <akim@epita.fr>
9500
9501 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
9502 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
9503 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
9504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9505
9506 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 * data/glr.c (yyloc_default): Remove; not used.
9509 Problem reported by Frank Heckenbach.
9510
9511 2004-10-25 Akim Demaille <akim@epita.fr>
9512
9513 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
9514 Introduce another definition to address simple location arrays.
9515 (yyGLRStack): New member: yyerror_range.
9516 (yyrecoverSyntaxError, yyparse): Update it.
9517 (yyrecoverSyntaxError): Use it when shifting the error token to
9518 have an accurate range, equivalent to the one computed by both
9519 yacc.c and lalr1.cc.
9520 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
9521 that column numbers start at column 0, as per GNU Coding
9522 Standards, the others tests, and the doc.
9523 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
9524 Adjust to the above change (first column is 0).
9525 And adjust the location of the "<error>", now covering the whole
9526 line.
9527
9528 2004-10-22 Akim Demaille <akim@epita.fr>
9529 and Paul Eggert <eggert@cs.ucla.edu>
9530
9531 Remove some arbitrary limits on goto numbers and relations.
9532 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
9533 initial values, since they're never used.
9534 (set_goto_map): ngotos is now unsigned, so test for overflow
9535 by seeing whether it wraps around to zero.
9536 * src/lalr.h (goto_number): Now size_t, not short int.
9537 (GOTO_NUMBER_MAXIMUM): Remove.
9538 * src/relation.c (relation_print, traverse, relation_transpose):
9539 Check for END_NODE rather than looking at sign.
9540 * src/relation.h (END_NODE): New macro.
9541 (relation_node): Now size_t, not short int.
9542
9543 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
9544
9545 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
9546 keyword, not an identifier. Problem reported by Baron Schwartz in
9547 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
9548
9549 2004-10-11 Akim Demaille <akim@epita.fr>
9550
9551 * src/symtab.c (symbol_check_alias_consistency): Also check
9552 type names, destructors, and printers.
9553 Reported by Alexandre Duret-Lutz.
9554 Recode the handling of associativity and precedence in terms
9555 of symbol_precedence_set.
9556 Accept no redeclaration at all, not even equal to the previous
9557 value.
9558 (redeclaration): New.
9559 Use it to factor redeclaration complaints.
9560 (symbol_make_alias): Don't set the type of the alias, let
9561 symbol_check_alias_consistency do it as for other features.
9562 * src/symtab.h (symbol): Add new member prec_location, and
9563 type_location.
9564 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
9565 * tests/input.at (Incompatible Aliases): New.
9566
9567 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
9568
9569 .cvsignore fixes to accommodate gnulib changes,
9570 and the practice of naming build directories "_build".
9571 * .cvsignore: Add "_*". Sort.
9572 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
9573 * m4/.cvsignore: Add "*_gl.m4".
9574
9575 2004-10-06 Akim Demaille <akim@epita.fr>
9576
9577 * src/parse-gram.y (add_param): Fix the truncation of trailing
9578 spaces.
9579
9580 2004-10-05 Akim Demaille <akim@epita.fr>
9581
9582 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
9583 whether the reducion was empty or not. This leaves room to
9584 improve the use of YYLLOC_DEFAULT in such a case.
9585 lalr1.cc is still experimental, so changing this is acceptable.
9586 And finally, there are probably not many users who changed the
9587 handling of locations in GLR, so changing is admissible too.
9588
9589 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
9590 empty reduction, set @$ to an empty location ending the previously
9591 stacked symbol.
9592 Adjust uses to make sure the code is triggered on empty
9593 reductions.
9594 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
9595 expected output: empty reductions have empty locations.
9596
9597 2004-09-29 Akim Demaille <akim@epita.fr>
9598
9599 * data/lalr1.cc: Move towards a more standard C++ coding style
9600 for templates: Class < T > -> Class<T>.
9601
9602 2004-09-29 Akim Demaille <akim@epita.fr>
9603
9604 * data/lalr1.cc: Reinstall the former ctor, for sake of
9605 compatibility, but warn it will be removed.
9606 Move towards a more standard C++ coding style (i.e., type *var ->
9607 type* var).
9608
9609 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
9610
9611 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
9612 since it's less likely to work if NULs are involved in the future.
9613
9614 2004-09-27 Akim Demaille <akim@epita.fr>
9615
9616 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
9617
9618 2004-09-27 Akim Demaille <akim@epita.fr>
9619
9620 * data/lalr1.cc (b4_parse_param_decl_1): New.
9621 (b4_parse_param_decl): Use it to have different names between attribute
9622 and argument names.
9623 (b4_cc_constructor_call): Likewise.
9624
9625 2004-09-24 Akim Demaille <akim@epita.fr>
9626
9627 * src/parse-gram.y (add_param): Strip the leading and trailing
9628 blanks from a formal argument declaration.
9629 (YY_LOCATION_PRINT): New.
9630
9631 2004-09-24 Akim Demaille <akim@epita.fr>
9632
9633 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
9634 after the location.
9635
9636 2004-09-24 Akim Demaille <akim@epita.fr>
9637
9638 * doc/bison.texinfo (Table of Symbols): Sort.
9639
9640 2004-09-21 Akim Demaille <akim@epita.fr>
9641
9642 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
9643 the useless parentheses.
9644 Suggested by Paul Eggert.
9645
9646 2004-09-20 Akim Demaille <akim@epita.fr>
9647
9648 Let the initial-action act on the look-ahead, and use it for the
9649 "initial push" (corresponding to an hypothetical beginning-of-file).
9650 And let lalr1.cc honor %initial-action.
9651
9652 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
9653 example.
9654 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
9655 (Parser::Parser): Remove the ctor that used to initialize it.
9656 (Parser::parse): Like in the other skeletons, issue the "starting
9657 parse" message before any action.
9658 Honor %initial-action.
9659 Initialize the stacks with the lookahead.
9660 * data/yacc.c: Let $$ and @$ in %initial-action designate the
9661 look-ahead.
9662 Push them in the stacks.
9663 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
9664
9665 2004-09-20 Akim Demaille <akim@epita.fr>
9666
9667 * doc/bison.texinfo (Initial Action Decl): New.
9668
9669 2004-09-20 Akim Demaille <akim@epita.fr>
9670
9671 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
9672 clearer criterion to define it.
9673 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
9674 When reducing on an empty RHS, use the latest stacked location as
9675 location.
9676 yylloc is not always available.
9677 * data/glr.c: Likewise.
9678 Also, honor initial-actions.
9679
9680 2004-09-20 Akim Demaille <akim@epita.fr>
9681
9682 * data/yacc.c (YY_LOCATION_PRINT): New.
9683 Define when we know YYLTYPE's structure, i.e., when the default
9684 YYLLOC_DEFAULT is used.
9685 * data/c.m4 (b4_yysymprint_generate): Use it.
9686 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
9687 value of the result.
9688 (error_start_): Replace with...
9689 (error_range_): this location array.
9690 This allows to replace code relying on the implementation of
9691 locations by portable code.
9692 * data/yacc.c (yylerrsp): Replace with...
9693 (yyerror_range): this.
9694 Every time a token is popped, update yyerror_range[0], to have an
9695 accurate location for the error token.
9696 * data/glr.c (YY_LOCATION_PRINT): New.
9697 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
9698 deference a pointer.
9699 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
9700 report the location in %printers.
9701
9702 * src/scan-skel.l: Instead of abort, report error messages to ease
9703 understanding skeleton scanning failures.
9704
9705 2004-09-16 Akim Demaille <akim@epita.fr>
9706
9707 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
9708 (iterator, const_iterator): these, to be more in the C++ spirit.
9709 Also, return reverse iterators so that when displaying the stack
9710 we display its bottom first.
9711 (Parser::stack_print_, Parser::reduce_print_): Match the messages
9712 from yacc.c.
9713 We should probably use vector here though.
9714
9715 2004-09-16 Akim Demaille <akim@epita.fr>
9716
9717 Have more complete shift traces.
9718
9719 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
9720 to report Shifts instead of ad hoc YYDPRINTF invocations,
9721 including for the error token.
9722 * data/lalr1.cc (symprint_): Output the location.
9723 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
9724 output the location within the %printer.
9725 Activate GLR tests, at least to make sure they compile properly.
9726 They still don't pass though.
9727 * tests/calc.at: Adjust expect verbose output, since now "Entering
9728 state..." is on a different line than the "Shifting" message.
9729
9730 2004-09-08 Akim Demaille <akim@epita.fr>
9731
9732 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
9733 Bison directive from the Bison file to the invocation of this
9734 macro, so that these directives are passed to
9735 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
9736 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
9737 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
9738 the extra Bison directives instead of the whole series.
9739 Change the grammar so that there are recoverable errors, and
9740 unrecoverable errors. Now we can have the parser give up before
9741 consuming the whole input. As a result we now can observe that
9742 the lookahead is freed when needed.
9743 Change the parser source to parse argv[1] instead of a hard coded
9744 string.
9745 Simplify yylex, and give a value and location to EOF.
9746 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
9747 passed directives already coded in the file.
9748 Add some tests to check the location of "error".
9749 For some tests, the C++ parser is correct, and not yacc.c.
9750 For other tests, they provide different, but unsatisfying, values,
9751 so keep the C++ value so that at least one parser is "correct"
9752 according to the test suite.
9753 (Actions after errors): Remove, this is subsumed by the
9754 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
9755
9756 2004-09-06 Akim Demaille <akim@epita.fr>
9757
9758 * data/lalr1.cc: Adjust the indentation of the labels.
9759 (Parser::pop): New.
9760 Use it.
9761
9762 2004-09-06 Akim Demaille <akim@epita.fr>
9763
9764 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
9765 argument, an informative message.
9766 Call YY_SYMBOL_PRINT.
9767 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
9768 * data/lalr1.cc (destruct_): Likewise.
9769 In addition, no longer depend on b4_yysymprint_generate and
9770 b4_yydestruct_generate to generate these functions, do it "by
9771 hand".
9772
9773 2004-09-03 Akim Demaille <akim@epita.fr>
9774
9775 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
9776 invoked, yydestruct the lookahead.
9777 * tests/calc.at (Calculator $1): Update the expected lengths of
9778 traces: there is an added line for the discarded lookahead.
9779 * doc/bison.texinfo (Destructor Decl): Some rewording.
9780 Define "discarded" symbols.
9781
9782 2004-09-02 Akim Demaille <akim@epita.fr>
9783
9784 * data/lalr1.cc (translate_, destruct_): No reason to be static.
9785
9786 2004-09-02 Akim Demaille <akim@epita.fr>
9787
9788 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
9789 (YYDSYMPRINTF): Rename as...
9790 (YY_SYMBOL_PRINT): this.
9791 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
9792 two.
9793 Use it instead of direct symprint_ calls.
9794 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9795 one.
9796
9797 2004-09-02 Akim Demaille <akim@epita.fr>
9798
9799 * data/lalr1.cc (b4_yysymprint_generate): New.
9800 (symprint_): New member function, defined when YYDEBUG.
9801 Use it consistently instead of token/nterm debugging output by
9802 hand.
9803 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9804 %printer calls to use cdebug_ when using lalr1.cc.
9805
9806 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9807
9808 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9809 with #ifdef YYDEBUG.
9810
9811 2004-08-26 Akim Demaille <akim@epita.fr>
9812
9813 * doc/bison.texinfo (Implementing Loops): Rename as...
9814 (Implementing Gotos/Loops): this.
9815
9816 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9817
9818 Adjust to latest gnulib.
9819 * bootstrap (gnulib_modules): Add xalloc-die.
9820 Set LC_ALL=C so that file names sort consistently.
9821 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9822 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9823 uintmax_t.m4, ulonglong.m4.
9824 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9825 po.m4 since we are now using _gl.m4 instead.
9826
9827 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9828
9829 * src/scan-action.l: Remove. Scanning of semantic actions is
9830 handled in scan-gram.l.
9831
9832 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9833
9834 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9835
9836 * src/location.h (struct): The file member is a uniqstr.
9837 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9838
9839 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9840
9841 Fix bug with non-%union parsers that have printers or destructors,
9842 which led to a Bison core dump. Reported by Peter Fales in
9843 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
9844
9845 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9846 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9847 not to our own type.
9848 * src/output.c (symbol_destructors_output, symbol_printers_output):
9849 Don't assume %union.
9850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9851 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9852 UNION-FLAG. All callers changed.
9853 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9854 Use type char, not unsigned int, when declaring an array of char;
9855 this lets us remove a cast.
9856 (Printers and Destructors): Add non-%union test cases.
9857
9858 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9859
9860 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9861 GLR writeups. E.g., avoid frenchspacing and the future tense,
9862 change "lookahead" to "look-ahead", and change "wrt" to "with
9863 respect to".
9864
9865 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9866
9867 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9868 New sections, split off from the GLR Parsers section. Put the new
9869 Simple GLR Parser near the start of the GLR section, for clarity.
9870 Rewrite connective text.
9871
9872 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
9873
9874 * doc/bison.texinfo (Simple GLR Parsers): New section.
9875
9876 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9877
9878 * NEWS, TODO, doc/bison.texinfo:
9879 Use "look-ahead" instead of "lookahead", to be consistent.
9880 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9881 while we're fixing "look-ahead".
9882 * src/conflicts.c (shift_set): Renamed from shiftset.
9883 (look_ahead_set): Renamed from lookaheadset.
9884 * src/print.c: Likewise.
9885 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9886 name for "lookahead".
9887 (report_types, usage): Likewise.
9888 * src/getargs.h (report_look_ahead_tokens): Renamed from
9889 report_lookaheads.
9890 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9891 compute_lookaheads.
9892 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9893 (look_ahead_tokens_print): Renamed from lookaheads_print.
9894 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9895 state_rule_lookaheads_print.
9896 * src/state.h: Likewise.
9897 (reductions.look_ahead_tokens): Renamed from lookaheads.
9898 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9899 AT_DATA_LOOKAHEADS_GRAMMAR.
9900
9901 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * README: Update location of patched M4 distribution.
9904
9905 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9906
9907 Don't assume the C++ compiler takes the same arguments as the C compiler
9908 (trivial change).
9909 * configure.ac (O0CXXFLAGS): New var.
9910 * tests/atlocal.in (CXXFLAGS): Use it.
9911
9912 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9913
9914 Fix some "make check" problems with C++ reported by
9915 Albert Chin-A-Young for Tru64 C++ in this thread:
9916 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9917
9918 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9919 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9920 Output to a .cc file for C++, not to a .c file.
9921 * tests/calc.at (AT_CHECK_CALC): Likewise.
9922 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9923 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9924
9925 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9926
9927 * tests/calc.at, tests/actions.at: Workaround for SGI
9928 C++ compiler. (trivial change)
9929
9930 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 Spent a few hours checking out which prerequisite versions the
9933 current sources actually require. I went all the way back to
9934 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9935 a seemingly endless set of combinations of versions more recent
9936 than that. The bottom line is that the current sources require
9937 fairly recent versions of the build tools, and it'll be some work
9938 to change this.
9939 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9940 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9941 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9942 Add comments explaining why those particular versions are
9943 currently needed.
9944
9945 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9946 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
9947 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
9948
9949 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9950 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9951
9952 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9955 0.11.5. Suggested by Bruno Haible.
9956 * bootstrap: Remove gettext version checking.
9957
9958 * doc/bison.texinfo (Decl Summary): Also mention that %union
9959 can depend on prerequisite types. Problem reported by Tim
9960 Van Holder.
9961
9962 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9963
9964 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9965 * README-alpha: Don't tell people not to package this.
9966
9967 * bootstrap: Don't assume $(...) works; use `...` instead.
9968 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9969 gettext better.
9970
9971 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9972 put into the -d output file, and mention what to do if YYSTYPE is
9973 defined as a macro.
9974
9975 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 Undo change made earlier today: it caused autopoint to not bring
9978 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9979 autopoint's.
9980
9981 * bootstrap: Check that gettext version matches what's in
9982 configure.ac. Warn users to ignore robots.txt ERROR 404.
9983 * bootstrap: Undo today's earlier change (logged below).
9984 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
9985
9986 The gettext version checking is causing more trouble than it's
9987 curing; remove it. Problem reported by Paul Hilfinger.
9988
9989 * bootstrap: Issue a warning that one can expect a message
9990 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9991 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9992
9993 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 Ensure that the C++ compiler used for testing actually works on a
9996 simple test program; if not, skip the C++-related tests. Problem
9997 reported by Vin Shelton in:
9998 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
9999
10000 * m4/cxx.m4: New file.
10001 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10002 * tests/atlocal.in (BISON_CXX_WORKS): Add.
10003 * tests/local.at (AT_COMPILE_CXX): Use it.
10004
10005 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10006
10007 * data/glr.c (yylloc): Output this macro even if locations are not
10008 being generated, as the GLR parser needs it even in that case.
10009 Problem reported by Troy A. Johnson
10010 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
10011
10012 * configure.ac (AC_INIT): Update to 1.875e.
10013
10014 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
10015
10016 * NEWS: Version 1.875d.
10017 * configure.ac (AC_INIT): Likewise.
10018 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
10019
10020 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
10021 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
10022 lalr1.cc runs afoul of the first, and the last two are no longer
10023 supported by GCC 3.4.0.
10024 * README: Mention GNU m4 1.4 or later; mention m4 patches.
10025 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
10026
10027 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
10028
10029 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
10030 unsigned int, for compatibility with latest gnulib hash module.
10031 * src/state.c (state_hash, state_hasher): Likewise.
10032 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
10033 * src/uniqstr.c (hash_uniqstr): Likewise.
10034
10035 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
10036
10037 * NEWS: Unescaped newlines are no longer allowed in char & strings.
10038
10039 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
10040 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
10041 character and string literals.
10042 (unexpected_end): New function.
10043 (unexpected_eof): Use it.
10044 (unexpected_newline): New function.
10045 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
10046 actions.
10047
10048 * NEWS: Document %expect-rr.
10049
10050 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
10051 Fix typo by replacing $1 with $option.
10052 Remove more 'intl'-related files.
10053 Don't DEFUN AM_INTL_SUBDIR twice.
10054
10055 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
10056 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
10057 strtoul.c.
10058 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
10059 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
10060 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
10061 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
10062 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
10063 * src/.cvsignore: Add *.output.
10064
10065 * src/parse-gram.y: Put copyright notice inside %{ %} so it
10066 gets copied to the output file.
10067
10068 2004-04-28 Paul Eggert <eggert@twinsun.com>
10069
10070 Get files from the gnulib and po repositories, instead of relying
10071 on them being in our CVS. Upgrade to latest versions of gnulib
10072 and Automake.
10073
10074 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
10075 * bootstrap: Bootstrap from gnulib and po repositories.
10076 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
10077 * README-cvs: Document these changes. Remove version numbers from
10078 mentions of build tools, since they change so often. Mention Flex.
10079
10080 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
10081 (gl_USE_SYSTEM_EXTENSIONS): Add.
10082 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
10083 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
10084 does this for us.
10085 (AC_ISC_POSIX): Remove; we no longer support this
10086 ancient OS, as it gets in the way of latest Autoconf & gnulib.
10087 (AC_HEADER_STDC): Remove: we now assume C89 or better.
10088 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
10089 Do not check for C89 headers, except for locale.h which is used
10090 by the Yacc library and must port to K&R hosts.
10091 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
10092 Do not check for C89 functions, except for setlocale which is
10093 used by the Yacc library.
10094 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
10095 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
10096 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
10097 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
10098 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
10099 AM_GNU_GETTEXT): Remove; now done by:
10100 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
10101 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
10102 for us.
10103
10104 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
10105 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
10106 Define to empty, as gnulib.mk will do the rest for us.
10107 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
10108 for us.
10109 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
10110 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
10111
10112 * src/files.c: Include gnulib's xstrndup.h.
10113
10114 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
10115 (REALLOC): Use xnrealloc, for likewise.
10116 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
10117 (strnlen, memrchr): Remove decls; functions no longer used.
10118 Include <stpcpy.h>.
10119
10120 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
10121 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10122 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
10123 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
10124 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
10125 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
10126 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
10127 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
10128 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
10129 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
10130 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
10131 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10132 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
10133 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
10134 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
10135 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
10136 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
10137 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
10138 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
10139 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
10140 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
10141 Remove, as these files are now generated automatically
10142 by bootstrap or automake.
10143
10144 * po/ChangeLog: Remove: all but one entry was a duplicate
10145 of this file, and I moved that 2000-11-02 entry here.
10146
10147 * config/.cvsignore: Add Makefile, depcomp, install-sh.
10148 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
10149 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
10150 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
10151 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
10152 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
10153 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
10154 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
10155 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
10156 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
10157 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
10158 xstrndup.h.
10159 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
10160 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
10161 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
10162 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
10163 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
10164 * src/.cvsignore: Remove *_.c.
10165
10166
10167 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
10168 support it. (The latest stable gzip doesn't.)
10169
10170 2004-04-27 Paul Eggert <eggert@twinsun.com>
10171
10172 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
10173 case, as stos_ is now used by destructors due to the 2004-02-09
10174 change.
10175
10176 Remove more K&R C support.
10177 * lib/libiberty.y (PARAMS): Remove. All uses removed.
10178 * lib/subpipe.c (errno): Remove decl.
10179 Include <stdlib.h> unconditionally.
10180 (EXIT_FAILURE): Remove macro.
10181 * src/complain.c (vfprintf, strerror): Remove.
10182 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
10183 unconditionally.
10184 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
10185 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
10186 (strchr, strspn, memchr): Remove decls.
10187 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
10188 unconditionally. Do not declare perror.
10189 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
10190 unconditionally.
10191
10192 * src/complain.c (_): Remove useless defn, as system.h defines this.
10193
10194 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
10195 with latest obstack.h.
10196 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
10197 to procedure types, as obstack.h now does that for us.
10198 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
10199
10200 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
10201 so that this include file can stand alone.
10202 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
10203 does this now. Include subpipe.h first after config.h, to
10204 test whether it can stand alone.
10205
10206 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
10207 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
10208 unused declaration.
10209
10210 * tests/synclines.at (%union synch line): Put a dummy member in
10211 the union, because empty unions aren't allowed in C. Caught
10212 by GCC 3.4.0.
10213
10214 2004-04-13 Jim Meyering <jim@meyering.net>
10215
10216 * src/conflicts.c (conflicts_print): Correct format string typo:
10217 use `%%' to produce literal `%'. (trivial change)
10218
10219 2004-03-30 Paul Eggert <eggert@twinsun.com>
10220
10221 * src/getargs.c (version): Update copyright year to 2004.
10222
10223 * data/c.m4 (b4_int_type): Use 'short int' rather than
10224 'short', and similarly for 'long', 'unsigned', etc.
10225 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
10226 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
10227 yy_yypstack, yydumpstack): Likewise.
10228 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
10229 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
10230 Likewise.
10231 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
10232 yy_stack_print, yyparse): Likewise.
10233 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
10234 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
10235 * lib/bitset.c (bitset_print): Likewise.
10236 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
10237 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10238 * lib/bitsetv.c (bitsetv_dump): Likewise.
10239 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
10240 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
10241 Likewise.
10242 * src/LR0.c (allocate_itemsets): Likewise.
10243 * src/gram.h (rule_number, rule): Likewise.
10244 * src/lalr.h (goto_number): Likewise.
10245 * src/nullable.c (nullable_compute): Likewise.
10246 * src/output.c (prepare_rules): Likewise.
10247 * src/relation.c (relation_print, relation_digraph): Likewise.
10248 * src/relation.h (relation_node): Likewise.
10249 * src/state.h (state_number, transitions, errs, reductions,
10250 struct state): Likewise.
10251 * src/symtab.h (symbol_number, struct symbol): Likewise.
10252 * src/tables.c (vector_number, tally, action_number,
10253 default_goto, goto_actions): Likewise.
10254 * tests/existing.at (GNU Cim Grammar): Likewise.
10255 * tests/regression.at (Web2c Actions): Likewise.
10256
10257 * src/output.c (muscle_insert_short_int_table): Renamed from
10258 muscle_insert_short_table. All uses changed.
10259
10260 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10261
10262 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
10263 (declaration): Replace expected_conflicts with expected_sr_conflicts.
10264 Add %expect-rr rule.
10265
10266 * src/scan-gram.l: Recognize %expect-rr.
10267
10268 * src/conflicts.h (expected_sr_conflicts): Rename from
10269 expected_conflicts.
10270 (expected_rr_conflicts): Declare.
10271
10272 * src/conflicts.c (expected_sr_conflicts): Rename from
10273 expected_conflicts.
10274 (expected_rr_conflicts): Define.
10275 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
10276 for GLR parsers.
10277 Use expected_sr_conflicts in place of expected_conflicts.
10278 Warn if expected_rr_conflicts used in non-GLR parser.
10279
10280 * doc/bison.texinfo: Add documentation for %expect-rr.
10281
10282 2004-03-08 Paul Eggert <eggert@gnu.org>
10283
10284 Add support for hex token numbers. Suggested by Odd Arild Olsen in
10285 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
10286
10287 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
10288 in lalr1.cc.
10289 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
10290 * src/scan-gram.l (scan_integer): New function.
10291 ({int}): Use it.
10292 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
10293 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
10294 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
10295 Say "long int", not "long", for uniformity with GNU style.
10296
10297 2004-02-25 Paul Eggert <eggert@twinsun.com>
10298
10299 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
10300 compilers. This fixes a problem with Intel's C++ compiler being
10301 chatty, reported by Guido Trentalancia in
10302 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
10303
10304 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
10305
10306 Support %destructor and merge error locations in lalr1.cc.
10307
10308 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
10309 (Parser::stos_): Define unconditionally.
10310 (Parser::destruct_): New method. Generate its body with
10311 b4_yydestruct_generate.
10312 (Parser::error_start_): New attribute.
10313 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
10314 token which are discarded.
10315 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
10316 error_start_ when erroneous token are discarded.
10317 (Parser::parse) <yyerrlab1>: Compute the location of the error
10318 token so that it covers all the discarded tokens.
10319 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
10320 it can be called with `%skeleton "lalr1.cc"', and do that.
10321
10322 2004-02-02 Paul Eggert <eggert@twinsun.com>
10323
10324 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
10325 $(top_srcdir)/lib and ../lib. This fixes a bug reported
10326 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
10327 There's no need to mention top_builddir since Automake does that
10328 for us.
10329 (INCLUDES): Remove, as Automake says it's obsolescent.
10330 Contents migrated into AM_CPPFLAGS as described above.
10331 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
10332
10333 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10334
10335 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
10336 (yyreportSyntaxError): Handle case where lookahead token is
10337 YYEMPTY.
10338
10339 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10340
10341 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
10342 resulting parsers are compilable with C++.
10343
10344 2003-12-23 Paul Eggert <eggert@twinsun.com>
10345
10346 * config/depcomp, config/install-sh: Sync with Automake 1.8.
10347 * src/output.c (output_skeleton): Rename local var.
10348 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
10349 Bison tokens, as this runs afoul of the 2003-10-07 change that
10350 disallowed NUL bytes in character constants or string literals.
10351
10352 * tests/local.at: Require Autoconf 2.59's Autotest.
10353 * tests/testsuite.at: Don't include local.at, since we now assume
10354 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
10355 including it.
10356 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
10357 multiple inclusion warnings.
10358
10359 2003-12-02 Akim Demaille <akim@epita.fr>
10360
10361 * doc/bison.texinfo (How Can I Reset the Parser): More about start
10362 conditions.
10363 From Bruno Haible.
10364
10365 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
10366
10367 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10368
10369 2003-10-07 Paul Eggert <eggert@twinsun.com>
10370
10371 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
10372 if testsuite doesn't exist.
10373
10374 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
10375 literals, unfortunately.
10376 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
10377 Complain about NUL bytes in character constants or string literals.
10378
10379 2003-10-05 Paul Eggert <eggert@twinsun.com>
10380
10381 * NEWS: Don't document %no-default-prec, as it's still
10382 too experimental.
10383 * doc/bison.texinfo: Document %no-default-prec only if
10384 the defaultprec flag is set. Normally it's not.
10385
10386 2003-10-04 Paul Eggert <eggert@twinsun.com>
10387
10388 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
10389 non-modifiable lvalue, instead of a modifiable one.
10390 * doc/bison.texinfo (Actions): Document that $$ can
10391 be assigned to. Do not claim that $$ and $N are
10392 array element references: user code should not rely on this.
10393
10394 2003-10-01 Paul Eggert <eggert@twinsun.com>
10395
10396 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
10397 (grammar_declaration): Use it.
10398 * src/scan-gram.l: New token %no-default-prec.
10399 * tests/conflicts.at: Revamp tests to use %no-default-prec.
10400 * NEWS, doc/bison.texinfo: Document the above.
10401
10402 2003-10-01 Akim Demaille <akim@epita.fr>
10403
10404 VCG no longer supports long_straight_phase.
10405
10406 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
10407 * src/print_graph.c (print_graph): Adjust.
10408
10409 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
10410 and Paul Eggert <eggert@twinsun.com>
10411
10412 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
10413 Table of Symbols): Document %default-prec.
10414 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
10415 (grammar_declaration): Set default_prec on %default-prec.
10416 * src/scan-gram.l (%default-prec): New token.
10417 * src/reader.h (default_prec): New flag.
10418 * src/reader.c: Likewise.
10419 (packgram): Handle it.
10420 * tests/conflicts.at (%default-prec without %prec,
10421 %default-prec with %prec, %default-prec 1): New tests.
10422
10423 2003-09-30 Paul Eggert <eggert@twinsun.com>
10424
10425 * tests/testsuite.at: Include local.at, not input.at, fixing
10426 a typo in the 2003-08-25 patch.
10427
10428 2003-08-27 Akim Demaille <akim@epita.fr>
10429
10430 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
10431 GCC warnings.
10432
10433 2003-08-26 Akim Demaille <akim@epita.fr>
10434
10435 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
10436 "<\#" to avoid magic from Gnus when posting parts of this script.
10437
10438 2003-08-26 Akim Demaille <akim@epita.fr>
10439
10440 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
10441 (Parser::parse): here.
10442 Adjust: nerrs and errstatus is now replaced by...
10443 (Parser::nerrs_, Parser::errstatus_): New.
10444
10445 2003-08-25 Akim Demaille <akim@epita.fr>
10446
10447 * config/announce-gen, Makefile.cfg: New.
10448 * Makefile.am: Adjust.
10449 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
10450 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
10451
10452 2003-08-25 Akim Demaille <akim@epita.fr>
10453
10454 When reducing initial empty rules, Bison parser read an initial
10455 location that is not defined. This results in garbage, and that
10456 affects Bison's own parser. Therefore we need (i) to extend Bison
10457 to support a means to initialize this location, and (ii) to use
10458 this CVS Bison to fix CVS Bison's parser.
10459
10460 * src/reader.h, reader.c (epilogue_augment): Remove, replace
10461 with...
10462 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
10463 * src/parse-gram.y: Adjust.
10464 (%initial-action): New.
10465 (%error-verbose): Since we require CVS Bison, there is no reason
10466 not to use it.
10467 * src/scan-gram.l: Adjust.
10468 * src/Makefile.am (YACC): New, to make sure we use our own parser.
10469 * data/yacc.c (yyparse): Use b4_initial_action.
10470
10471 2003-08-25 Akim Demaille <akim@epita.fr>
10472
10473 * doc/bison.texinfo: Don't promote stdout for error messages.
10474
10475 2003-08-25 Akim Demaille <akim@epita.fr>
10476
10477 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
10478 From Alexandre Duret-Lutz.
10479
10480 2003-08-25 Akim Demaille <akim@epita.fr>
10481
10482 Version 1.875c.
10483
10484 2003-08-25 Akim Demaille <akim@epita.fr>
10485
10486 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
10487 Use them.
10488
10489 2003-08-25 Akim Demaille <akim@epita.fr>
10490
10491 * data/lalr1.cc (Parser::reduce_print_): New.
10492 Use it.
10493
10494 2003-08-25 Akim Demaille <akim@epita.fr>
10495
10496 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
10497 error recovery loops. This patch is based on
10498 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
10499 Also, augment the similarity between lalr1.cc and yacc.c.
10500 Note: the locations of error recovery rules are not correct yet.
10501
10502 * data/lalr1.cc: Comment changes to augment the similarity between
10503 lalr1.cc and yacc.c.
10504 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
10505 (yyerrlab1): Remove, but where it used to be (now the bottom part of
10506 yyerrlab), when hitting EOF, pop the whole stack here instead of
10507 merely falling thru the default error handling mechanism.
10508 (yyerrorlab): New label, with the old contents of YYERROR,
10509 plus the following change: pop the stack of rhs corresponding
10510 to the production that invoked YYERROR. That is how Yacc
10511 behaves (required by POSIX).
10512 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
10513 fail.
10514
10515 2003-08-25 Akim Demaille <akim@epita.fr>
10516
10517 Tune local.at so that people can "autom4te -l autotest calc.at -o
10518 calc" for instance, to extract a sub test suite.
10519
10520 * tests/testsuite.at: Move the initialization, Autotest version
10521 requirement, and AT_TESTED invocation into...
10522 * tests/local.at: here.
10523 * tests/testsuite.at: Include it for compatibility with Autoconf
10524 2.57.
10525 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
10526 be ignore.
10527
10528 2003-08-04 Paul Eggert <eggert@twinsun.com>
10529
10530 Rework code slightly to avoid gcc -Wtraditional warnings.
10531 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
10532 The returned value is now stored in *YY0. All callers changed.
10533 * src/output.c (merge_output): Adjust to the above change.
10534
10535 2003-07-26 Paul Eggert <eggert@twinsun.com>
10536
10537 * data/glr.c (YYASSERT): New macro.
10538 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
10539 yyresolveStates, yyprocessOneStack):
10540 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
10541 Derived from a suggestion by Frank Heckenbach.
10542
10543 2003-07-25 Paul Eggert <eggert@twinsun.com>
10544
10545 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
10546 for portability to K&R C (after ansi2knr, presumably). See
10547 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
10548 by Frank Heckenbach, though I have omitted the structure-initialization
10549 part of his glr-knr.diff patch since I recall that the Portable
10550 C Compiler didn't require that change.
10551
10552 Let the user specify how to allocate and free memory.
10553 Derived from a suggestion by Frank Heckenbach in
10554 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
10555 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
10556 All uses of free, malloc, realloc changed to use these macros,
10557 and unnecessary casts removed.
10558 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
10559
10560 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
10561
10562 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
10563 use s.empty() rather than s == "" to test for empty string; see
10564 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
10565 (trivial change)
10566
10567 2003-06-25 Akim Demaille <akim@epita.fr>
10568
10569 * config/depcomp, config/install-sh: Update from masters.
10570
10571 2003-06-20 Paul Eggert <eggert@twinsun.com>
10572
10573 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
10574 and return properly parenthesized result.
10575 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10576 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10577 Remove unnecessary parentheses from uses.
10578 * doc/bison.texinfo (Location Default Action): Describe the
10579 conventions for parentheses.
10580
10581 2003-06-19 Paul Eggert <eggert@twinsun.com>
10582
10583 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
10584 yyreportTree): Do not assume that size_t is the same width as int,
10585 when printing sizes. Print sizes using an unsigned format.
10586 Problem reported by Frank Heckenbach in
10587 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
10588
10589 Port to Forte Developer 7 C compiler.
10590 * data/glr.c (struct YYLTYPE): If locations are not being used,
10591 declare a single dummy member, as empty structs do not conform
10592 to the C standard.
10593 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
10594 the Forte Developer 7 C compiler complains that end-of-loop
10595 code is not reached.
10596
10597 2003-06-17 Paul Eggert <eggert@twinsun.com>
10598
10599 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
10600 avoid warnings from picky compilers about redefinition of PARAMS.
10601
10602 2003-06-17 Paul Eggert <eggert@twinsun.com>
10603
10604 Version 1.875b.
10605
10606 * NEWS: Document 1.875b.
10607
10608 * lib/bbitset.h: Do not include config.h; that's the includer's job.
10609 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
10610 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
10611 Don't use 'index' in comments, as it's a builtin fn on some hosts.
10612 * lib/bitset_stats.c: Include gettext.h unconditionally, as
10613 per recent gettext manual's suggestion.
10614 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
10615 Use prototypes, not old-style definitions.
10616 * lib/lbitset.c (lbitset_unused_clear): Likewise.
10617 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
10618 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
10619 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
10620 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
10621 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
10622 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
10623 vbitset_or_and_cmp, vbitset_copy): Likewise.
10624
10625 * lib/libiberty.h: Do not include config.h; that's the includer's job.
10626 Do not include <stdlib.h>.
10627 (PARAMS): Define unconditionally for C89.
10628 (ATTRIBUTE_NORETURN): Remove.
10629 (ATTRIBUTE_UNUSED): Define unconditionally.
10630
10631 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
10632 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
10633 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
10634 * lib/vbitset.c, lib/vbitset.h: New files.
10635 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10636 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
10637 from libbitset.
10638
10639 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
10640 `How Can I Reset @code{yyparse}', since texinfo does not allow
10641 arbitrary @ in node names.
10642
10643 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
10644 shouldn't be needed according to the gettext 0.12.1 documentation
10645 but which seem to be needed anyway: codeset.m4 glibc21.m4
10646 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
10647 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
10648 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
10649
10650 * lib/.cvsignore: Add stdbool.h.
10651 * m4/.cvsignore: Add nls.m4, po.m4.
10652
10653 Upgrade to CVS gnulib.
10654 * stdbool_.h: File renamed from stdbool.h.in.
10655 * configure.ac (AM_STDBOOL_H): Invoke this instead of
10656 AC_HEADER_STDBOOL.
10657 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
10658 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
10659 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
10660 (MOSTLYCLEANFILES): New var.
10661 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
10662 (stdbool.h): New rule.
10663 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
10664 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
10665 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
10666 m4/quote.m4: Upgrade to today's gnulib.
10667
10668 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
10669 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
10670 the tests right now.
10671 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
10672 yyerror are declared before use; C99 requires this.
10673
10674 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10675
10676 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
10677 first.
10678 (yyrecoverSyntaxError): Correct the logic for setting and testing
10679 yyerrState.
10680 Correct comment on handling EOF.
10681 Allow states with only a default reduction, rather than failing
10682 (I can't quite reconstruct why these were not allowed before).
10683
10684 Fixes to avoid problem that $-N rules in GLR parsers can cause
10685 buffer overruns, corrupting state.
10686
10687 * src/output.c (prepare_rules): Output max_left_semantic_context
10688 definition.
10689 * src/reader.h (max_left_semantic_context): New variable declaration.
10690 * src/scan-gram.l (max_left_semantic_context): Define.
10691 (handle_action_dollar): Update max_left_semantic_context.
10692 * data/glr.c (YYMAXLEFT): New definition.
10693 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
10694 (yyresolveAction): Ditto.
10695
10696 Fixes to problems with location handling in GLR parsers reported by
10697 Frank Heckenbach (2003/06/05).
10698
10699 * data/glr.c (YYLTYPE): Make trivial if locations not used.
10700 (YYRHSLOC): Add parentheses, and define only if locations used.
10701 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
10702 locations not used.
10703 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
10704 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
10705
10706 * tests/cxx-type.at: Exercise location information; update tests
10707 to differentiate output with and without locations.
10708 Remove forward declarations of yylex and yyerror---caused errors
10709 because default YYLTYPE not yet defined.
10710 Change semantic actions to compute strings, rather than printing
10711 them directly (to test proper passing of semantics values). Change
10712 output to prefix notation and update test data and expected results.
10713 (yylex): Track locations.
10714 (stmtMerge): Return value rather than printing, and include arguments
10715 in value.
10716
10717 2003-06-03 Paul Eggert <eggert@twinsun.com>
10718
10719 Avoid warnings generated by GCC 2.95.4 when Bison is
10720 configured with --enable-gcc-warnings.
10721 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
10722 yy::]b4_parser_class_name[::translate_,
10723 yy::Stack::operator[] (unsigned),
10724 yy::Stack::operator[] (unsigned) const,
10725 yy::Slice::operator[] (unsigned),
10726 yy::Slice::operator[] (unsigned) const):
10727 Rename local vars to avoid warnings.
10728 * tests/glr-regression.at (Improper handling of embedded actions
10729 and $-N in GLR parsers): Remove unused local variable from yylex.
10730 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
10731 (void) as arg when not pure, since we now assume C89 when building
10732 Bison. Pacify GCC by using parameter.
10733
10734 2003-06-02 Paul Eggert <eggert@twinsun.com>
10735
10736 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
10737 yy::Location::lines, yy::Location::columns): Rename arguments
10738 to avoid shadowing; this removes a warning generated by GCC 3.3.
10739
10740 2003-06-01 Paul Eggert <eggert@twinsun.com>
10741
10742 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
10743 to g++, as GCC 3.3 complains if you do it.
10744 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
10745 everything that WARNING_CFLAGS has, except omit warnings
10746 not suitable for C++.
10747 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
10748 * tests/atlocal.in (CXXFLAGS): New var.
10749 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
10750
10751 Fix a GLR parser bug I reported in February; see
10752 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
10753 The problem was that GLR parsers did not conform to the C standard,
10754 because actions like { $1 = $2 + $3; } expanded to expressions
10755 that invoked YYFILL in separate subexpressions, and YYFILL assigned
10756 to a local variable. The C standard says that expressions
10757 like (var = f ()) + (var = f ()) have undefined behavior.
10758 Another problem was that GCC sometimes issues warnings that
10759 yyfill and its parameters are unused.
10760
10761 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
10762 as possibly unused.
10763 (yyfill): New function.
10764 (YYFILL): Use it.
10765 (yyuserAction): Change type of yynormal to bool, so that it matches
10766 the new yyfill signature. Mark it as possibly unused.
10767
10768
10769 Follow up on a bug I reported in February, where a Bison-generated
10770 parser can loop. Provide a test case and a fix for yacc.c. I
10771 don't have a fix for lalr1.cc or for glr.c, unfortunately.
10772 The original bug report is in:
10773 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
10774
10775 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
10776 macro's size was becoming unwieldy.
10777 (yyerrlab): Do not discard an empty lookahead symbol, as this
10778 might destroy garbage.
10779 (yyerrorlab): New label, with the old contents of YYERROR,
10780 plus the following change: pop the stack of rhs corresponding
10781 to the production that invoked YYERROR. That is how Yacc
10782 behaves, and POSIX requires this behavior.
10783 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
10784 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
10785 Define 'alarm' to do nothing if unistd.h is not available.
10786 Add a new rule "exp: '-' error;" to test the above change to
10787 data/yacc.c. Use 'alarm' to abort any test taking longer than
10788 10 seconds, as it's probably looping.
10789 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
10790 Also, the new yacc.c generates two fewer diagnostics for an
10791 existing test.
10792
10793 2003-05-24 Paul Eggert <eggert@twinsun.com>
10794
10795 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10796 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10797 This fixes a problem reported by John Bowman when the Compaq/HP
10798 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10799 -ansi -Wall -gall).
10800 * data/yacc.c (union yyalloc): Likewise.
10801 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
10802
10803 Switch from 'int' to 'bool' where that makes sense.
10804
10805 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10806 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10807 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10808 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10809 Return or accept bool, not int. All callers changed.
10810 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10811 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10812 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10813 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10814 bitset_or_and_cmp_): Likewise.
10815 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10816 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10817 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10818 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10819 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10820 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10821 bitset_stats_or_and_cmp): Likewise.
10822 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10823 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10824 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10825 ebitset_xor_cmp): Likewise.
10826 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10827 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10828 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10829 lbitset_xor_cmp): Likewise.
10830 * lib/bbitset.h: Include <stdbool.h>.
10831 (struct bitset_vtable): The following members now return bool, not
10832 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10833 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10834 or_and_cmp).
10835 * src/conflicts.c (count_rr_conflicts): Likewise.
10836 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10837 All uses changed.
10838 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10839 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10840 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10841 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10842 graph_flag): Likewise.
10843 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10844 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10845 graph_flag): Likewise.
10846 * src/output.c (error_verbose): Likewise.
10847 * src/output.h (error_verbose): Likewise.
10848 * src/reader.c (start_flag, typed): Likewise.
10849 * src/reader.h (typed): Likewise.
10850 * src/getargs.c (LOCATIONS_OPTION): New constant.
10851 (long_options, getargs): Use it.
10852 * src/lalr.c (build_relations): Use bool, not int.
10853 * src/nullable.c (nullable_compute): Likewise.
10854 * src/print.c (print_reductions): Likewise.
10855 * src/tables.c (action_row, pack_vector): Likewise.
10856 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10857 * src/output.c (prepare): Use it.
10858 * src/output.c (token_definitions_output,
10859 symbol_destructors_output, symbol_destructors_output): Use string,
10860 not boolean integer, to keep track of whether to output separator.
10861 * src/print_graph.c (print_core): Likewise.
10862 * src/state.c (state_rule_lookaheads_print): Likewise.
10863
10864 * config/install-sh: Sync from automake 1.7.5.
10865
10866 2003-05-14 Paul Eggert <eggert@twinsun.com>
10867
10868 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10869 semicolon after a grammar declaration, in the interest of possible
10870 future changes to the Bison input language.
10871 Do not allow a stray semicolon at the start of the grammar.
10872 (rhses.1): Allow one or more semicolons after any rule, including
10873 just before "|" as required by POSIX.
10874 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10875 grammar.
10876
10877 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10878
10879 %parse-param support for lalr1.cc.
10880
10881 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10882 b4_cc_constructor_calls, b4_cc_constructor_call,
10883 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10884 definitions.
10885 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10886 parse-param arguments.
10887 (yy::b4_parser_class_name): Declare instance variables to
10888 hold parse-param arguments.
10889 * tests/calc.at: s/value/semantic_value/ because value clashes
10890 with a member of yy::b4_parser_class_name. Adjust C++ code
10891 to handle %parse-param. Enable %parse-param test in C++.
10892
10893 2003-05-12 Paul Eggert <eggert@twinsun.com>
10894
10895 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10896 English a bit. Fix fclose typo. Change "const char" to "char
10897 const", and use ANSI C rather than K&R for "main". Suggest
10898 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10899 and suggest yy_switch_to_buffer.
10900
10901 2003-05-05 Paul Eggert <eggert@twinsun.com>
10902
10903 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10904 C89. This avoids a diagnostic on compilers that define __STDC__
10905 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
10906 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10907
10908 2003-05-03 Paul Eggert <eggert@twinsun.com>
10909
10910 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10911 Do not overrun array bounds.
10912 This should fix a bug reported today by Olatunji Oluwabukunmi in
10913 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
10914
10915 2003-04-29 Akim Demaille <akim@epita.fr>
10916
10917 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10918 * src/getargs.c, src/getargs.h: here, as bool, not int.
10919 (nondeterministic_parser): New.
10920 * src/parse-gram.y, src/scan-gram.l: Support
10921 %nondeterministic-parser.
10922 * src/output.c (prepare): Use nondeterministic_parser instead
10923 of glr_parser where appropriate.
10924 * src/tables.c (conflict_row, action_row, save_row)
10925 (token_actions, token_actions, pack_vector): Ditto.
10926
10927 2003-04-29 Akim Demaille <akim@epita.fr>
10928
10929 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10930
10931 2003-04-29 Akim Demaille <akim@epita.fr>
10932
10933 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10934 with %pure-parser and %locations to exercise the patch from Yakov
10935 Markovitch below.
10936
10937 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10938
10939 * data/yacc.c: (b4_lex_param): Corrected for the case where
10940 %lex-param is provided and %pure-parser isn't.
10941
10942 2003-04-27 Paul Eggert <eggert@twinsun.com>
10943
10944 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
10945 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
10946 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10947 if it is not defined.
10948 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10949
10950 2003-04-26 Paul Eggert <eggert@twinsun.com>
10951
10952 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10953 Declare to be of type suitable for the ninf value itself, not of
10954 type suitable for the corresponding table, since the latter might
10955 be unsigned but the ninf value might be negative. This fixes a
10956 bug reported by Alexandre Duret-Lutz in
10957 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
10958
10959 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10960 invokes it. We shouldn't invoke it twice because it will attempt
10961 to put error.o in the archive twice. This fixes a glitch reported
10962 by Martin Mokrejs in
10963 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10964
10965 2003-04-21 Paul Eggert <eggert@twinsun.com>
10966
10967 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10968 to gnulib.
10969
10970 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10971
10972 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10973 Fix obvious typo that results in uncompilable GLR parsers
10974 when both %pure-parser and %locations are used. (trivial change)
10975
10976 2003-04-17 Paul Eggert <eggert@twinsun.com>
10977
10978 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10979 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10980 Do not insert the expected token via unput, as this runs afoul
10981 of a POSIX-compatibility bug in flex 2.5.31.
10982 All uses changed to BEGIN the parent state,
10983 since we no longer insert the expected token via unput.
10984 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10985 that is no longer emitted after the above change.
10986
10987 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10988 the first one. This change is from Paul Hilfinger, and it fixes
10989 regression reported by Werner Lemberg in
10990 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
10991
10992 (resolve_sr_conflict): Don't invoke state_errs_set
10993 unless one or more tokens have been explicitly made errors.
10994 Otherwise, the above change causes Bison to abort.
10995
10996 * tests/existing.at (GNU pic Grammar): New test case, taken from
10997 Lemberg's email.
10998
10999 2003-03-31 Akim Demaille <akim@epita.fr>
11000
11001 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
11002
11003 2003-03-31 Akim Demaille <akim@epita.fr>
11004
11005 * src/output.c (prepare_symbols): Avoid trailing spaces in the
11006 output.
11007
11008 2003-03-31 Akim Demaille <akim@epita.fr>
11009
11010 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
11011 From Paul Hilfinger.
11012
11013 2003-03-29 Akim Demaille <akim@epita.fr>
11014
11015 * m4/error.m4: Do not put under dynamic conditions some code which
11016 expansion is under static control.
11017
11018 2003-03-29 Akim Demaille <akim@epita.fr>
11019
11020 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
11021
11022 2003-03-29 Akim Demaille <akim@epita.fr>
11023
11024 * doc/bison.texinfo (Strings are Destroyed): New.
11025
11026 2003-03-13 Paul Eggert <eggert@twinsun.com>
11027
11028 * .cvsignore: Add configure.lineno.
11029 * src/.cvsignore: Add yacc.
11030 * tests/.cvsignore: Add testsuite.log.
11031 * doc/fdl.texi: Sync with latest FSF version.
11032
11033 2003-03-12 Paul Eggert <eggert@twinsun.com>
11034
11035 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
11036 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
11037 cursor, instead of leaving it undefined. This fixes a bug
11038 reported by Tim Van Holder in
11039 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
11040 * tests/input.at (Torturing the Scanner): Test the scanner on
11041 an empty input file, which was Tim Van Holder's test case.
11042
11043 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
11044 <sys/resource.h> can be included, include sys/time.h and
11045 sys/times.h first, if available. This works around the SunOS
11046 4.1.4 porting bug reported by Bruce Becker in
11047 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
11048
11049 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
11050 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
11051 AC_HEADER_SYS_WAIT.
11052
11053 Merge changes from gnulib. This was prompted because the CVS
11054 snapshot didn't build on Solaris 7 due to strnlen problems.
11055
11056 These changes need to be merged back into gnulib:
11057 * lib/hash.c: Include <stdbool.h> unconditionally.
11058 * m4/onceonly.m4 (m4_quote): New macro.
11059 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
11060 Quote AC_FOREACH variable-expansions properly.
11061 The 2003-01-03 obstack.h change also needs merging.
11062 {end of changes requiring merging}
11063
11064 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11065 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
11066 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
11067 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
11068 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
11069 New files, imported from gnulib.
11070 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
11071 above.
11072
11073 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
11074 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
11075 gnulib sources.
11076
11077 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
11078 Add.
11079 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
11080 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
11081 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
11082 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
11083 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
11084 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
11085 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
11086 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
11087 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
11088 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
11089 (jm_PREREQ_ARGMATCH): Remove.
11090 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
11091 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
11092
11093 * src/system.h: Include <stdbool.h> unconditionally.
11094
11095 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
11096 assuming at least C89 in the bitset code for some time now.
11097
11098 2003-03-03 Akim Demaille <akim@epita.fr>
11099
11100 * ro.po: New.
11101
11102 2003-03-02 Akim Demaille <akim@epita.fr>
11103
11104 * doc/bison.texinfo (Table of Symbols): Reactivate the
11105 documentation for %lex-param, and %parse-param.
11106
11107 2003-03-02 Akim Demaille <akim@epita.fr>
11108
11109 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
11110 generate verbose error messages.
11111 Use the number of tokens as an upper bound in yytname, as it
11112 cannot be a non terminal.
11113
11114 2003-03-02 Akim Demaille <akim@epita.fr>
11115
11116 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
11117 message.
11118
11119 2003-03-02 Akim Demaille <akim@epita.fr>
11120
11121 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
11122 Use them to exercise yycheck overrun.
11123 Based on Andrew Suffield's grammar.
11124
11125 2003-03-02 Akim Demaille <akim@epita.fr>
11126
11127 Create tests/local.at for Bison generic testing macros.
11128
11129 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
11130 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
11131 This new file.
11132 * tests/calc.at (AT_CHECK_CALC): Adjust.
11133 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
11134 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
11135 * tests/local.at: here.
11136 (AT_COMPILE_CXX): Tags the tests using it as c++.
11137 Ignore the test if CXX is not functional.
11138
11139 2003-03-01 Paul Eggert <eggert@twinsun.com>
11140
11141 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
11142 not loc->end, since loc->end might contain garbage and this leads
11143 to undefined behavior on some platforms.
11144 (id_loc, token_start): Use (IF_LINTed) initial values that do not
11145 depend on *loc, so that the reader doesn't give the the false
11146 impression that *loc is initialized.
11147 (<INITIAL>"%%"): Do not bother setting code_start, since its value
11148 does not survive the return.
11149
11150 2003-03-01 Akim Demaille <akim@epita.fr>
11151
11152 * src/scan-gram.l (code_start): Always initialize it when entering
11153 into yylex, as SC_EPILOGUE is activated *before* the corresponding
11154 yylex invocation. An alternative would be making it static, but
11155 then it starts with the second %%'s beginning, instead of its end.
11156
11157 2003-02-28 Paul Eggert <eggert@twinsun.com>
11158
11159 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
11160 around a UnixWare 7.1.1 porting bug reported by John Hughes in
11161 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
11162
11163 2003-02-26 Paul Eggert <eggert@twinsun.com>
11164
11165 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
11166 Remove Sequent/Pyramid discussion (nobody uses them any more).
11167 Merge VMS and MS-DOS discussion; these ports may well be dead
11168 but let's keep mentioning them for now. Put <> around email
11169 addresses. Add copyright notice.
11170
11171 2003-02-24 Paul Eggert <eggert@twinsun.com>
11172
11173 * data/glr.c (yy_reduce_print): yylineno -> yylno,
11174 to avoid collision with flex use of yylineno.
11175 Problem reported by Bruce Lilly in
11176 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
11177 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11178 * data/yacc.c (yy_reduce_print): Likewise.
11179
11180 * config/depcomp: Sync with Automake 1.7.3.
11181
11182 2003-02-21 Akim Demaille <akim@epita.fr>
11183
11184 * data/lalr1.cc: Use temporary variables instead of casts to
11185 change integer types.
11186 Suggested by Paul Eggert.
11187
11188 2003-02-21 Akim Demaille <akim@epita.fr>
11189
11190 * doc/bison.texinfo: Use "location" consistently to refer to @n,
11191 to avoid confusions with lalr1.cc's notion of Position.
11192 Suggested by Paul Eggert.
11193
11194 2003-02-20 Akim Demaille <akim@epita.fr>
11195
11196 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
11197 before initial_columns.
11198 (location.hh): Use consistent variable names when defining the
11199 operator<<.
11200 Use "last" so that we subtract from Positions, not from unsigned.
11201
11202 2003-02-20 Akim Demaille <akim@epita.fr>
11203
11204 * data/lalr1.cc (position.hh): New subfile, including the extended
11205 and Doxygen'ed documentation of class Position.
11206 (location.hh): Use it.
11207 Document a` la Doxygen.
11208 With the help of Benoit Perrot.
11209
11210 2003-02-20 Akim Demaille <akim@epita.fr>
11211
11212 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
11213 AT_YACC_IF.
11214 Redefine AT_YYERROR_SEES_LOC_IF using it.
11215 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
11216 not defined.
11217 Don't use the location in yy::Parser::error_ and
11218 yy::Parser::print_ when not %locations.
11219 Activate more lalr1.cc tests.
11220
11221 2003-02-19 Akim Demaille <akim@epita.fr>
11222
11223 * data/lalr1.cc: When displaying a line number, be sure to make it
11224 an int.
11225
11226 2003-02-19 Akim Demaille <akim@epita.fr>
11227
11228 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
11229 Remove, useless.
11230 (YYABORT, YYACCEPT, YYERROR): New.
11231 * tests/calc.at: Renable the lalr1.cc test.
11232
11233 2003-02-19 Akim Demaille <akim@epita.fr>
11234
11235 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
11236 error recovery, mixing with/without pops and discarding of the
11237 lookahead.
11238 Exercise YYERROR.
11239 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
11240
11241 2003-02-17 Paul Eggert <eggert@twinsun.com>
11242
11243 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
11244 * tests/testsuite.at (AT_COMPILE): Use them.
11245 This fixes the testsuite problem reported by Robert Lentz in
11246 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
11247
11248 2003-02-12 Paul Eggert <eggert@twinsun.com>
11249
11250 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
11251 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
11252 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
11253 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
11254 Check for malloc failure, for consistency with yacc.c.
11255 (yytname_size): Remove, for consistency with yacc.c.
11256
11257 The bug still remains in data/lalr1.cc, as I didn't have time
11258 to fix it there.
11259
11260 2003-02-06 Akim Demaille <akim@epita.fr>
11261
11262 * configure.ac (GXX): Rename as...
11263 (CXX): this, to keep the original Autoconf semantics.
11264 Require 2.57.
11265 * data/lalr1.cc: Fix b4_copyright invocations.
11266 If YYDEBUG is not defined, don't depend upon name_ being defined.
11267 (location.hh): Include string and iostream.
11268 (Position::filename): New member.
11269 (Position::Position ()): New.
11270 (operator<< (Position)): New.
11271 (operator- (Position, int)): New.
11272 (Location::first, Location::last): Rename as...
11273 (Location::begin, Location::end): these, to mock the conventional
11274 iterator names.
11275 (operator<< (Location)): New.
11276 * tests/atlocal.in (CXX): New.
11277 * tests/testsuite.at (AT_COMPILE_CXX): New.
11278 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
11279 locations in a more synthetic way.
11280 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
11281 lalr1.cc is used.
11282 Adjust the C locations to match those from Emacs: first column is
11283 column 0.
11284 Change all the expected results.
11285 Conform to the GCS: simplify the locations when applicable.
11286 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
11287 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
11288 these CPP macros with the m4 macros new defined by...
11289 (AT_CHECK_PUSHDEFS): this, i.e.:
11290 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
11291 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
11292 New macros.
11293 (AT_CHECK_POPDEFS): Undefine them.
11294 (AT_CHECK_CALC_LALR1_CC): New.
11295 Use it for the first lalr1.cc test.
11296
11297 2003-02-04 Akim Demaille <akim@epita.fr>
11298
11299 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
11300 Location as is defined.
11301
11302 2003-02-04 Akim Demaille <akim@epita.fr>
11303
11304 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
11305 name_ being defined.
11306
11307 2003-02-03 Paul Eggert <eggert@twinsun.com>
11308
11309 * src/gram.h (start_symbol): Remove unused decl.
11310
11311 Use more-consistent naming conventions for local vars.
11312
11313 * src/derives.c (derives_compute): Change type of local var from
11314 int to rule_number.
11315 * src/gram.c (grammar_rules_partial_print): Likewise.
11316 * src/print.c (print_core): Likewise.
11317 * src/reduce.c (reduce_grammar_tables): Likewise.
11318
11319 * src/gram.c (grammar_dump): Change name of item_number *
11320 local var from r to rp.
11321 * src/nullable.c (nullable_compute): Likewise.
11322
11323 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
11324
11325 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
11326 for symbol or symbol_number var.
11327 * src/reader.c (grammar_start_symbol_set): Likewise.
11328 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
11329 Likewise.
11330 * src/state.c (transitions_to): Likewise.
11331 * src/state.h: Likewise.
11332 * src/tables.c (symbol_number_to_vector_number): Likewise.
11333
11334 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
11335 char * var.
11336
11337 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
11338 var.
11339
11340 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
11341 var.
11342
11343 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
11344 Use str, not s, for char * var. Use ch, not c, for character var.
11345 Use size for size var.
11346
11347 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
11348 char * var.
11349 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
11350 uniqstr var.
11351 * src/uniqstr.h: Likewise.
11352
11353 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11354 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11355 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
11356 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
11357 param to have same name as that of enum, so that we don't use
11358 "s" to stand for a non-state.
11359
11360 2003-02-02 Akim Demaille <akim@epita.fr>
11361
11362 * src/scan-skel.l: Scan more than one inert character per yylex
11363 invocation.
11364
11365 2003-02-01 Paul Eggert <eggert@twinsun.com>
11366
11367 Version 1.875a.
11368
11369 * po/LINGUAS: Add ms.
11370
11371 2003-01-30 Akim Demaille <akim@epita.fr>
11372
11373 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
11374
11375 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11376
11377 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
11378 of $1.
11379
11380 Changes in response to error report by S. Eken: GLR mode does not
11381 handle negative $ indices or $ indices in embedded rules correctly.
11382 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
11383
11384 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
11385 (b4_rhs_location): Ditto.
11386 (yyfill): New function to copy from stack tree into array
11387 incrementally.
11388 (yyuserAction): Modify to allow incremental move of semantic values
11389 to rhs array when in GLR mode.
11390 Define YYFILL to use in user-defined actions to fill semantic array
11391 as needed.
11392 Remove dummy use of yystack, as there is now a guaranteed use.
11393 (yydoAction): Modify to allow incremental move of semantic values
11394 to rhs array when in GLR mode.
11395 (yyresolveAction): Ditto.
11396 (yyglrShiftDefer): Update comment.
11397 (yyresolveStates): Use X == NULL for pointers, not !X.
11398 (yyglrReduce): Ditto.
11399 (yydoAction): Ditto
11400
11401 * tests/glr-regr1.at: Rename to ...
11402 * tests/glr-regression.at: Add new regression test for the problems
11403 described above (adapted from S. Eken).
11404 Update copyright notice.
11405 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
11406 * tests/Makefile.am: Ditto.
11407
11408 2003-01-28 Paul Eggert <eggert@twinsun.com>
11409
11410 * data/lalr1.cc: Do not use @output_header_name@ unless
11411 b4_defines_flag is set. This fixes two bugs reported by
11412 Tim Van Holder in
11413 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
11414 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
11415
11416 2003-01-21 Paul Eggert <eggert@twinsun.com>
11417
11418 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
11419 we don't need to worry about yyerrlab1 being reported as an
11420 "unused label" by non-GCC C compilers. The downside is that if
11421 locations are used then a couple of statements are duplicated each
11422 time YYERROR is invoked, but the upside is that the warnings
11423 should vanish.
11424 (yyerrlab1): Move code to YERROR.
11425 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11426 This reverts some of the 2002-12-27 change.
11427
11428 2003-01-17 Paul Eggert <eggert@twinsun.com>
11429
11430 * src/output.c (symbol_printers_output): Fix typo that led
11431 to core dump. Problem reported by Antonio Rus in
11432 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
11433
11434 2003-01-13 Akim Demaille <akim@epita.fr>,
11435 Quoc Peyrot <chojin@lrde.epita.fr>,
11436 Robert Anisko <anisko_r@lrde.epita.fr>
11437
11438 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
11439 when the stacks contain one element, as the loop would otherwise
11440 free the last state, and then use the top state (the one we just
11441 popped). This means that the initial elements will not be freed
11442 explicitly, as is the case in yacc.c; it is not a problem, as
11443 these elements have fake values.
11444
11445 2003-01-11 Paul Eggert <eggert@twinsun.com>
11446
11447 * NEWS: %expect-violations are now just warnings, reverting
11448 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
11449 bootstrapping problem reported by Matthias Klose; see
11450 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
11451 * src/conflicts.c (conflicts_print): Likewise.
11452 * tests/conflicts.at (%expect not enough, %expect too much,
11453 %expect with reduce conflicts): Likewise.
11454 * doc/bison.texinfo (Expect Decl): Document this. Also mention
11455 that the warning is enabled if the number of conflicts changes
11456 (not necessarily increases).
11457
11458 * src/getargs.c (version): Update copyright year.
11459
11460 2003-01-09 Akim Demaille <akim@epita.fr>
11461
11462 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
11463
11464 2003-01-08 Paul Eggert <eggert@twinsun.com>
11465
11466 * Makefile.maint (WGETFLAGS):
11467 New macro, containing "-C off" to disable proxy caches.
11468 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
11469 (rel-check): Use $(WGET) instead of wget.
11470
11471 2003-01-06 Paul Eggert <eggert@twinsun.com>
11472
11473 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11474 the GLR paper of Scott, Johnstone and Hussain.
11475
11476 2003-01-04 Paul Eggert <eggert@twinsun.com>
11477
11478 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
11479 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
11480 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
11481 (EXTRA_LIBRARIES): New var, for liby.a.
11482 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
11483 (EXTRA_SCRIPTS): New var, for yacc.
11484
11485 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
11486 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
11487 Problem reported by Nelson H. F. Beebe.
11488
11489 2003-01-03 Paul Eggert <eggert@twinsun.com>
11490
11491 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
11492 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
11493 when compiling Bison 1.875's `bitset bset = obstack_alloc
11494 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
11495
11496 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
11497 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
11498 grow to a huge size with typical invocation.
11499
11500 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
11501 Use the pattern recommended by Autoconf 2.57, except also protect
11502 against double-definition.
11503 * src/system.h: Likewise.
11504 Portability issues reported by Nelson H. F. Beebe.
11505
11506 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
11507 All uses changed. Provide a definition in both C and C++.
11508 (yytrue, yyfalse): Define even if defined (__cplusplus).
11509
11510 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
11511 Reported by Nelson H. F. Beebe.
11512
11513 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
11514
11515 2003-01-02 Paul Eggert <eggert@twinsun.com>
11516
11517 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
11518 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
11519 Bug reported by Nelson H. F. Beebe.
11520
11521 2003-01-01 Paul Eggert <eggert@twinsun.com>
11522
11523 * Version 1.875.
11524
11525 2002-12-30 Paul Eggert <eggert@twinsun.com>
11526
11527 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
11528 Moved here from...
11529 (<INITIAL>","): Here. This causes stray "," to be treated
11530 more uniformly.
11531
11532 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
11533 last brace in braced code when not in Yacc mode, for compatibility
11534 with Bison 1.35. This resurrects the 2001-12-15 patch to
11535 src/reader.c.
11536
11537 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
11538 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
11539
11540 2002-12-28 Paul Eggert <eggert@twinsun.com>
11541
11542 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
11543 that of SYM's type. This fixes Debian bug 168069, reported by
11544 Thomas Olsson.
11545
11546 2002-12-28 Paul Eggert <eggert@twinsun.com>
11547
11548 Version 1.75f.
11549
11550 Switch back to the Yacc style of conflict reports, undoing some
11551 of the 2002-07-30 change.
11552 * doc/bison.texinfo (Understanding): Use Yacc style for
11553 conflict reports. Also, use new way of locating rules.
11554 * src/conflicts.c (conflict_report):
11555 Renamed from conflict_report_yacc, removing the old
11556 'conflict_report'. Translate the entire conflict report at once,
11557 so that we don't assume that "," has the same interpretation in
11558 all languages.
11559 (conflicts_output): Use Yacc-style conflict report for each state,
11560 instead of our more-complicated style.
11561 (conflicts_print): Use Yacc-style conflict report, except print
11562 the input file name when not emulating Yacc.
11563 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
11564 Conflicted Reduction, %expect not enough, %expect too much,
11565 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
11566 * tests/existing.at (GNU Cim Grammar): Likewise.
11567 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
11568
11569 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
11570 fatal): Don't invoke fflush; it's not needed and it might even be
11571 harmful for stdout, as stdout might not be open.
11572 * src/reduce.c (reduce_print): Likewise.
11573
11574 2002-12-27 Paul Eggert <eggert@twinsun.com>
11575
11576 Fix a bug where error locations were not being recorded correctly.
11577 This problem was originally reported by Paul Hilfinger in
11578 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
11579
11580 * data/yacc.c (yyparse): New local var yylerrsp, to record the
11581 top of the location stack's error locations.
11582 (yyerrlab): Set it. When discarding a token, push its location
11583 onto yylerrsp so that we don't lose track of the error's end.
11584 (yyerrlab1): Now is only the target of YYERROR, so that we can
11585 properly record the location of the action that failed. For GCC
11586 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
11587 GCC warning about yyerrlab1 being unused if YYERROR is unused.
11588 (yyerrlab2): New label, which yyerrlab now falls through to.
11589 Compute the error's location by applying YYLLOC_DEFAULT to
11590 the locations of all the symbols that went into the error.
11591 * doc/bison.texinfo (Location Default Action): Mention that
11592 YYLLOC_DEFAULT is also invoked for syntax errors.
11593 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11594 Error locations include the locations of all the tokens that were
11595 discarded, not just the last token.
11596
11597 2002-12-26 Paul Eggert <eggert@twinsun.com>
11598
11599 * src/files.c: Include quote.h.
11600 (compute_output_file_names): Warn if we detect conflicting
11601 outputs to the same file. This should catch the misunderstanding
11602 exemplified by Debian Bug 165349, reported by Bruce Stephens..
11603
11604 * src/conflicts.c (conflicts_print): If the user specifies
11605 "%expect N", report an error if there are any reduce/reduce
11606 conflicts. This is what the manual says should happen.
11607 This fixes Debian bug 130890, reported by Anthony DeRobertis.
11608 * tests/conflicts.at (%expect with reduce conflicts): New test.
11609
11610 Don't use m4_include on relative file names, as it doesn't work as
11611 desired if there happens to be a file with that name under ".".
11612
11613 * m4sugar/version.m4: Remove; it was included but it wasn't used.
11614 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
11615 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
11616 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
11617 * src/output.c (output_skeleton): Use full path names when
11618 specifying a file to include; don't rely on include path, as
11619 it's unreliable when the working file contains a file with
11620 that name.
11621
11622 2002-12-25 Paul Eggert <eggert@twinsun.com>
11623
11624 Remove obsolete references to bison.simple and bison.hairy.
11625 Problem mentioned by Aubin Mahe in
11626 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
11627 * data/glr.c: Comment fix.
11628 * doc/bison.1: Remove references. Also, mention "yacc".
11629
11630 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
11631 with -g option.
11632
11633 * src/parse-gram.y (declaration): Use enum "report_states" rather
11634 than its numeric value 1.
11635
11636 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
11637 opening a new one. This fixes Debian bug 165349, reported by
11638 Bruce Stephens.
11639
11640 2002-12-24 Paul Eggert <eggert@twinsun.com>
11641
11642 Version 1.75e.
11643
11644 * Makefile.maint (cvs-update): Don't assume that the shell
11645 supports $(...), as Solaris sh doesn't.
11646
11647 * src/parse-gram.y (lloc_default): Remove test for empty
11648 nonterminals at the end, since it didn't change the result.
11649
11650 2002-12-24 Paul Eggert <eggert@twinsun.com>
11651
11652 If the user does not define YYSTYPE as a macro, Bison now declares it
11653 using typedef instead of defining it as a macro. POSIX requires this.
11654 For consistency, YYLTYPE is also declared instead of defined.
11655
11656 %union directives can now have a tag before the `{', e.g., the
11657 directive `%union foo {...}' now generates the C code
11658 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
11659 The default union tag is `YYSTYPE', for compatibility with Solaris 9
11660 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
11661 instead of `yyltype'.
11662
11663 `yystype' and `yyltype' are now obsolescent macros instead of being
11664 typedefs or tags; they are no longer documented and will be
11665 withdrawn in a future release.
11666
11667 * data/glr.c (b4_location_type): Remove.
11668 (YYSTYPE): Renamed from yystype.
11669 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
11670 (struct YYLTYPE): Renamed from struct yyltype.
11671 (YYLTYPE): Renamed from yyltype.
11672 (yyltype, yystype): New (and obsolescent) macros,
11673 for backward compatibility.
11674 * data/yacc.c: Likewise.
11675
11676 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
11677 does not specify a union tag. This is for compatibility with
11678 Solaris 9 yacc.
11679
11680 * src/parse-gram.y (add_param): 2nd arg is now char * not char
11681 const *, since it is now modified by stripping surrounding { }.
11682 (current_braced_code): Remove.
11683 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
11684 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
11685 trailing " {...}". Now of type <chars>.
11686 (grammar_declaration): Adjust to bundled tokens.
11687 (code_content): Remove; stripping is now done by add_param.
11688 (print_token_value): Print contents of bundled tokens.
11689 (token_name): New function.
11690
11691 * src/reader.h (braced_code, current_braced_code): Remove.
11692 (token_name): New decl.
11693
11694 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
11695 token_type, not braced_code code_kind. All uses changed.
11696 (SC_PRE_CODE): New state, for scanning after a keyword that
11697 has (or usually has) an immediately-following braced code.
11698 (token_type): New local var, to keep track of which token type
11699 to return when scanning braced code.
11700 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
11701 <INITIAL>"%parse-param", <INITIAL>"%printer",
11702 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
11703 instead of returning a token type immediately.
11704 (<INITIAL>"{"): Set token type.
11705 (<SC_BRACED_CODE>"}"): Use it.
11706 (handle_action_dollar, handle_action_at): Now returns bool
11707 indicating success. Fail if ! current_rule; this prevents a core dump.
11708 (handle_symbol_code_dollar, handle_symbol_code_at):
11709 Remove; merge body into caller.
11710 (handle_dollar, handle_at): Complain in invalid contexts.
11711
11712 * NEWS, doc/bison.texinfo: Document the above.
11713 * NEWS: Fix years and program names in copyright notice.
11714
11715 2002-12-17 Paul Eggert <eggert@twinsun.com>
11716
11717 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
11718 Reporting, Table of Symbols): Omit mentions of %lex-param and
11719 %parse-param from the documentation for now.
11720
11721 2002-12-15 Paul Eggert <eggert@twinsun.com>
11722
11723 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
11724 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
11725 lookahead symbol, and which sets yychar in parser actions) and it
11726 disagreed with the Bison documentation. Bug
11727 reported by Andrew Walrond.
11728
11729 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
11730 as the caller now does that.
11731 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
11732 (YYEMPTY): Parenthesize right hand side, since others use it.
11733 (yyparse): Don't assume that our generated code is the only code
11734 that sets yychar.
11735
11736 2002-12-13 Paul Eggert <eggert@twinsun.com>
11737
11738 Version 1.75d.
11739
11740 POSIX requires a "yacc" command.
11741 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
11742 (MOSTLYCLEANFILES): Add yacc.
11743 (yacc): New rule.
11744 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
11745 as an alias for bison y.
11746
11747 * po/LINGUAS: Add da.
11748
11749 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
11750 problem with latest <getopt.h>.
11751 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
11752
11753 * doc/fdl.texi: Upgrade to 1.2.
11754 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
11755 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
11756 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
11757 gnulib.
11758 * config/install-sh: Sync with autotools.
11759
11760 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
11761 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11762 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
11763 locations are requested.
11764 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
11765 locations are requested.
11766
11767 2002-12-12 Paul Eggert <eggert@twinsun.com>
11768
11769 Remove unportable casts and storage allocation tricks.
11770 While we're at it, remove almost all casts, since they
11771 usually aren't needed and are a sign of trouble.
11772
11773 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
11774
11775 * src/derives.c (derives_compute): Do not subtract NTOKENS from
11776 the pointer DSET returned by malloc; this isn't portable.
11777 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
11778 Similarly for DERIVES.
11779 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
11780 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
11781 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
11782
11783 * src/derives.c (derives_compute): Do not bother invoking
11784 int_of_rule_number, since rule numbers are integers.
11785
11786 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
11787 rather than XMALLOC (char, N).
11788
11789 * src/files.c (filename_split): Rewrite to avoid cast.
11790
11791 * src/gram.h (symbol_number_as_item_number,
11792 item_number_as_symbol_number, rule_number_as_item_number,
11793 item_number_as_rule_number):
11794 Now inline functions rather than macros, to avoid casts.
11795 * src/state.h (state_number_as_int): Likewise.
11796 * src/tables.c (state_number_to_vector_number,
11797 symbol_number_to_vector_number): Likewise.
11798
11799 * src/gram.h (int_of_rule_number): Remove; no longer used.
11800
11801 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11802 since the resulting storage is always stored into.
11803
11804 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11805 where it's needed.
11806
11807 * src/muscle_tab.c (muscle_m4_output):
11808 Now inline. Return bool, not int.
11809 * src/state.c (state_compare): Likewise.
11810 * src/symtab.c (symbol_check_defined,
11811 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11812 hash_compare_symbol, hash_symbol):
11813 Likewise.
11814 * src/uniqstr.c (uniqstr_print): Likewise.
11815 * src/muscle_tab.c (muscle_m4_output_processor):
11816 New function, to avoid casts.
11817 * src/state.c (state_comparator, stage_hasher): Likewise.
11818 * src/symtab.c (symbol_check_defined_processor,
11819 symbol_check_alias_consistency_processor, symbol_pack_processor,
11820 symbol_translation_processor, hash_symbol_comparator,
11821 hash_symbol_hasher): Likewise.
11822 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11823 * src/muscle_tab.c (muscles_m4_output):
11824 Use new functions instead of casting old functions unportably.
11825 * src/state.c (state_hash_new): Likewise.
11826 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11827 symbols_token_translations_init):
11828 Likewise.
11829 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11830
11831 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11832 var instead of casting to long, to avoid casts.
11833 (prepare_states): Use MALLOC rather than alloca, so that we don't
11834 have to worry about alloca.
11835 * src/state.c (state_hash_lookup): Likewise.
11836
11837 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11838 local var instead of casting to unsigned char, to avoid casts.
11839
11840 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11841 STATE_ALLOC): Remove.
11842 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11843 rather than calloc, and use offsetof to avoid allocating slightly
11844 too much storage.
11845 (state_new): Initialize all members.
11846
11847 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11848
11849 * src/symtab.c (symbol_free): Remove; unused.
11850 (symbol_get): Remove cast in lhs of assignment.
11851 (symbols_do): Now static. Accept generic arguments, not
11852 hashing-related ones.
11853
11854 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11855 (symbol_processor): Remove.
11856 (symbols_do): Remove decl; now static.
11857
11858 * src/system.h (alloca): Remove; decl no longer needed.
11859 (<stddef.h>): Include, for offsetof.
11860 (<inttypes.>, <stdint.h>): Include if available.
11861 (uintptr_t): New type, if system lacks it.
11862 (CALLOC, MALLOC, REALLOC): New macros.
11863 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11864 new macros.
11865
11866 * src/tables.c (table_size): Now int, to pacify GCC.
11867 (table_grow, table_ninf_remap): Use signed table size.
11868 (save_row): Don't bother initializing locals when not needed.
11869 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11870 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11871
11872 * src/vcg.h: Correct misspellings.
11873
11874 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11875
11876
11877 * src/getargs.c (getargs): Don't assume EOF == -1.
11878
11879 2002-12-09 Paul Eggert <eggert@twinsun.com>
11880
11881 Change identifier spellings to avoid collisions with names
11882 that are reserved by POSIX.
11883
11884 Don't use names ending in _t, since POSIX reserves them.
11885 For consistency, remove _e and _s endings -- they're weren't
11886 needed to remove ambiguity. All uses changed.
11887 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11888 turn was just renamed from struniq_t.
11889 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11890 which in turn was just renamed from struniq_processor_t.
11891 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11892 in turn was renamed from hash_compare_struniq_t.
11893 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11894 (state_list): Renamed from state_list_t.
11895 * src/assoc.h (assoc): Renamed from assoc_t.
11896 * src/conflicts.c (enum conflict_resolution): Renamed from
11897 enum conflict_resolution_e.
11898 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11899 (rule_list): Renamed from rule_list_t.
11900 * src/getargs.h (enum trace): Renamed from enum trace_e.
11901 (enum report): Renamed from enum report_e.
11902 * src/gram.h (item_number): Renamed from item_number_t.
11903 (rule_number): Renamed from rule_number_t.
11904 (struct rule_s): Remove the "rule_s" part; not used.
11905 (rule): Renamed from rule_t.
11906 (rule_filter): Renamed from rule_filter_t.
11907 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11908 (goto_list): Renamed from goto_list_t.
11909 * src/lalr.h (goto_number): Renamed from goto_number_t.
11910 * src/location.h (location): Renamed from location_t.
11911 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11912 and moved here from:
11913 * src/muscle_tab.h (muscle_entry_t): here.
11914 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11915 (rule_list): Renamed from rule_list_t.
11916 * src/print_graph.c (static_graph): Renamed from graph.
11917 * src/reader.h (braced_code): Renamed from braced_code_t.
11918 Remove brace_code_e tag.
11919 * src/relation.h (relation_node): Renamed from relation_node_t.
11920 (relation_nodes): Renamed from relation_nodes_t.
11921 (relation): Renamed from relation_t.
11922 * src/state.h (state_number): Renamed from state_number_t.
11923 (struct state): Renamed from struct state_s.
11924 (state): Renamed from state_t.
11925 (transitions): Renamed from transitions_t. Unused (and
11926 misspelled) transtion_s tag removed.
11927 (errs): Renamed from errs_t. Unused errs_s tag removed.
11928 (reductions): Renamed from reductions_t. Unused tag
11929 reductions_s removed.
11930 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11931 (struct symbol_list): Renamed from struct symbol_list_s.
11932 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11933 (struct symbol): Renamed from struct symbol_s.
11934 (symbol): Renamed from symbol_t.
11935 * src/tables.c (vector_number): Renamed from vector_number_t.
11936 (action_number): Renamed from action_t.
11937 * src/tables.h (base_number): Renamed from base_t.
11938 * src/vcg.h (enum color): Renamed from enum color_e.
11939 (enum textmode): Renamed from enum textmode_e.
11940 (enum shape): Renamed from enum shape_e.
11941 (struct colorentry): Renamed from struct colorentry_s.
11942 (struct classname): Renamed from struct classname_s.
11943 (struct infoname): Renamed from struct infoname_s.
11944 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11945 (enum decision): Renamed from enum decision_e.
11946 (enum orientation): Renamed from enum orientation_e.
11947 (enum alignment): Renamed from enum alignment_e.
11948 (enum arrow_mode): Renamed from enum arrow_mode_e.
11949 (enum crossing_type): Renamed from enum crossing_type_e.
11950 (enum view): Renamed from enum view_e.
11951 (struct node): Renamed from struct node_s.
11952 (node): Renamed from node_t.
11953 (enum linestyle): Renamed from enum linestyle_e.
11954 (enum arrowstyle): Renamed from enum arrowstyle_e.
11955 (struct edge): Renamed from struct edge.
11956 (edge): Renamed from edge_t.
11957 (struct graph): Renamed from struct graph_s.
11958 (graph): Renamed from graph_t.
11959 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11960 Rename value_t -> value.
11961 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11962 value_t_as_yystype -> value_as_yystype.
11963
11964 Don't include <errno.h> in the mainstream code, since it
11965 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11966 * lib/get-errno.c, lib/get-errno.h: New files.
11967 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11968 get-errno.c.
11969 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11970 * src/output.c (output_skeleton): Likewise.
11971 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11972 instead of errno.
11973 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11974 Likewise.
11975 (handle_action_dollar, handle_action_at): Likewise.
11976 * src/system.h: Do not include <errno.h>.
11977 (TAB_EXT): Renamed from EXT_TAB.
11978 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11979
11980 Avoid str[a-z]*, since <string.h> reserves that name space.
11981 Change all instances of "struniq" in names to "uniqstr", and
11982 likewise for "STRUNIQ" and "UNIQSTR".
11983 * src/uniqstr.c: Renamed from src/struniq.c.
11984 * src/uniqstr.h: Renamed from src/struniq.h.
11985 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11986 * src/files.c (strsuffix): Remove; unused.
11987 (concat2): Renamed from stringappend. Now static.
11988 * src/files.h (strsuffix, stringappend): Remove; unused.
11989 * src/parse-gram.y (<chars>): Renamed from <string>.
11990 (<uniqstr>): Renamed from <struniq>.
11991 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11992 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11993 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11994 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11995 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11996 (N_EXPAND): Renamed from N_STRETCH.
11997
11998 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11999 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
12000 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
12001 Remove; unused.
12002 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
12003 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
12004 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
12005 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
12006 (BASE_MAXIMUM): Renamed from BASE_MAX.
12007 (BASE_MINIMUM): Renamed from BASE_MIN.
12008 (ACTION_MAX): Remove; unused.
12009 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
12010 Unnecessary casts removed from above defines.
12011
12012
12013 Fix misspelling in names.
12014 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
12015 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
12016 G_NODE_ALIGNEMENT.
12017
12018
12019 * lib/timevar.c (timevar_report): Renamed from time_report,
12020 for consistency with other names.
12021 * lib/timevar.h (timevar_report): New decl.
12022 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
12023
12024
12025 Sort include-file uses.
12026
12027 Reorder all include files under src to be in the order "system.h".
12028 then the ../lib include files in angle brackets (alphabetized),
12029 then the . include files in double-quotes (alphabetized). Fix
12030 dependency breakages encountered in this process, as follows:
12031 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
12032 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
12033 * src/state.h: Include "symtab.h".
12034
12035 2002-12-08 Paul Eggert <eggert@twinsun.com>
12036
12037 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
12038 since this causes problems when __file__ contains character
12039 sequences like "@" that are treated specially by src/scan-skel.l.
12040 Instead, just use the file's basename. This fixes the bug
12041 reported by Martin Mokrejs in
12042 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
12043
12044 2002-12-06 Paul Eggert <eggert@twinsun.com>
12045
12046 Add support for rules that do not have trailing semicolons, as
12047 POSIX requires. Improve the quality of locations in Bison
12048 diagnostics.
12049
12050 * src/location.c: Include <quotearg.h>.
12051 (empty_location): Now const.
12052 (location_print): New function. Follow the recommendation of the
12053 GNU Coding Standards for locations that span file boundaries.
12054 * src/location.h: Do not include <quotearg.h>; no longer needed.
12055 (boundary): New type.
12056 (location_t): Use it. This allows locations to span file boundaries.
12057 All member uses changed: file -> start.file or end.file (as needed),
12058 first_line -> start.line, first_column -> start.column,
12059 last_line -> end.line, last_column -> end.column.
12060 (equal_boundaries): New function.
12061 (LOCATION_RESET, LOCATION_STEP): Remove.
12062 (LOCATION_PRINT): Remove. All callers changed to use location_print.
12063 (empty_location): Now const.
12064 (location_print): New decl.
12065 * src/parse-gram.y (lloc_default): New function, which handles
12066 empty locations more accurately.
12067 (YYLLOC_DEFAULT): Use it.
12068 (%token COLON): Remove.
12069 (%token ID_COLON): New token.
12070 (rules): Use it.
12071 (declarations, rules): Remove trailing semicolon.
12072 (declaration, rules_or_grammar_declaration):
12073 Allow empty (";") declaration.
12074 (symbol_def): Remove empty actions; no longer needed.
12075 (rules_or_grammar_declaration): Remove trailing semicolon.
12076 (semi_colon.opt): Remove.
12077 * src/reader.h: Include location.h.
12078 (scanner_cursor): New decl.
12079 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
12080 rolling our own.
12081 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
12082 of *loc.
12083 (STEP): Remove. No longer needed, now that adjust_location does
12084 the work. All uses removed.
12085 (scanner_cursor): New var.
12086 (adjust_location): Renamed from extend_location. It now sets
12087 *loc and adjusts the scanner cursor. All uses changed.
12088 Don't bother testing for CR.
12089 (handle_syncline): Remove location arg; now updates scanner cursor.
12090 All callers changed.
12091 (unexpected_end_of_file): Now accepts start boundary of token or
12092 comment, not location. All callers changed. Update scanner cursor,
12093 not the location.
12094 (SC_AFTER_IDENTIFIER): New state.
12095 (context_state): Renamed from c_context. All uses changed.
12096 (id_loc, code_start, token_start): New local vars.
12097 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
12098 processing of Yacc white space and equivalents here.
12099 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
12100 instead of returning ID immediately, since we need to search for
12101 a subsequent colon.
12102 (<INITIAL>"'", "\""): Save token_start.
12103 (<INITIAL>"%{", "{", "%%"): Save code_start.
12104 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
12105 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
12106 BEGIN context_state at end, not INITIAL.
12107 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
12108 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
12109 Return correct token start.
12110 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
12111 the start of a character, string or multiline comment is found.
12112 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
12113 Reduction): Adjust reported locations to match the more-precise
12114 results now expected.
12115 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
12116 * tests/reduce.at (Useless Rules, Reduced Automaton,
12117 Underivable Rules): Likewise.
12118 * tests/regression.at (Invalid inputs): No longer `expecting ";"
12119 or "|"' now that so many other tokens are allowed by the new grammar.
12120
12121 * src/complain.h (current_file): Remove duplicate decl;
12122 current_file is now owned by files.h.
12123 * src/complain.c, src/scan-gram.l: Include files.h.
12124
12125 2002-12-06 Paul Eggert <eggert@twinsun.com>
12126
12127 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
12128 promotes to int; it might be unsigned int.
12129 * data/yacc.c (yy_reduce_print): Likewise.
12130
12131 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
12132 be #defined in the prologue, not in the Bison declarations.
12133 This fixes Debian Bug 102878, reported by Shaul Karl.
12134
12135 2002-12-02 Paul Eggert <eggert@twinsun.com>
12136
12137 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
12138 * lib/strtoul.c: New file, from gnulib.
12139 This fixes a porting bug reported by Peter Klein in
12140 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
12141
12142 2002-11-30 Paul Eggert <eggert@twinsun.com>
12143
12144 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
12145 and put only a forward declaration in the prologue. This is for
12146 consistency with the other scanner helper functions.
12147
12148 Type clashes now generate warnings, not errors, since it
12149 appears that POSIX may allow some grammars with type clashes.
12150 * src/reader.c (grammar_current_rule_check): Warn about
12151 type clashes instead of complaining.
12152 * tests/input.at (Type Clashes): Expect warnings, not complaints.
12153
12154 Add Yacc library, since POSIX requires it.
12155 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
12156 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
12157 * lib/main.c, lib/yyerror.c: New files.
12158
12159 gram_error can be static; it need not be extern.
12160 * src/reader.h (gram_error): Remove decl.
12161 * src/parse-gram.y (gram_error): Now static. Add static decl.
12162 (print_token_value): Omit parameter names from forward decl,
12163 for consistency.
12164
12165 2002-11-29 Paul Eggert <eggert@twinsun.com>
12166
12167 * doc/bison.texinfo: Emphasize that yylex and yyerror must
12168 be declared before being used. E.g., one should typically
12169 declare them in the prologue. Use GNU coding style in examples.
12170 Put "const" consistently after the type it modifies. Mention
12171 that C99 supports "inline". Mention that yyerror traditionally
12172 returns "int".
12173
12174 %parse-param and %lex-param now take just one argument, the
12175 declaration; the argument name is deduced from the declaration.
12176
12177 * doc/bison.texinfo (Parser Function, Pure Calling, Error
12178 Reporting, Table of Symbols): Document this.
12179 * src/parse-gram.y (add_param): New function.
12180 (COMMA): Remove.
12181 (declaration): Implement new rule for %parse-param and %lex-param.
12182 * src/scan-gram.l: "," now elicits a warning, rather than being
12183 a token; this is more compatible with byacc.
12184 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
12185
12186 2002-11-27 Paul Eggert <eggert@twinsun.com>
12187
12188 Rename identifiers to avoid real and potential collisions.
12189
12190 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
12191 to avoid collision with lex macro described by Bruce Lilly in
12192 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12193 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12194 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
12195 * src/parse-gram.y (print_token_value): Renamed from yyprint.
12196 All uses changed.
12197 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
12198 The name "yycontrol" violates the name space rules, and this stuff
12199 wasn't being used anyway.
12200 (input): Remove action; this stuff wasn't being used.
12201 (gram_error): Rename local variable yylloc -> loc.
12202 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
12203 (YY_DECL): Don't use "yy" at start of local variables.
12204 All uses changed, e.g., yylloc -> loc.
12205 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
12206 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
12207 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
12208 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
12209
12210 * src/parse-gram.y (gram_error): loc is now const *.
12211 * src/reader.h (gram_error): Likewise.
12212
12213 2002-11-24 Paul Eggert <eggert@twinsun.com>
12214
12215 Version 1.75c.
12216
12217 * tests/actions.at (Actions after errors): Use an output format
12218 more similar to that of the Printers and Destructors test.
12219 Test the position of the ';' token too.
12220 (Printers and Destructors): Likewise.
12221 (Printers and Destructors: %glr-parser): Remove for now, to avoid
12222 unnecessarily alarming people when the test fails.
12223
12224 * data/yacc.c (yyerrlab1): Move this label down, so that the
12225 parser does not discard the lookahead token if the user code
12226 invokes YYERROR. This change is required for POSIX conformance.
12227
12228 * lib/error.c: Sync with gnulib.
12229
12230 2002-11-22 Paul Eggert <eggert@twinsun.com>
12231
12232 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
12233 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
12234 * lib/xmalloc.c: Likewise.
12235
12236 2002-11-20 Paul Eggert <eggert@twinsun.com>
12237
12238 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
12239
12240 2002-11-20 Paul Eggert <eggert@twinsun.com>
12241
12242 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
12243 should use `if (! x) abort ();' rather than `assert (x);', and
12244 anyway it's one less thing to worry about configuring.
12245
12246 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
12247 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
12248 and replace all instances of assert with abort.
12249 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12250 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
12251
12252 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
12253 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
12254 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
12255 hash_find_entry, hash_rehash, hash_insert): Likewise.
12256 * src/conflicts.c (resolve_sr_conflict): Likewise.
12257 * src/lalr.c (set_goto_map, map_goto): Likewise.
12258 * src/nullable.c (nullable_compute): Likewise.
12259 * src/output.c (prepare_rules, token_definitions_output): Likewise.
12260 * src/reader.c (packgram, reader): Likewise.
12261 * src/state.c (state_new, state_free, state_transitions_set,
12262 state_reduction_find): Likewise.
12263 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
12264 symbol_pack): Likewise.
12265 * src/tables.c (conflict_row, pack_vector): Likewise.
12266 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12267 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12268 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
12269 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
12270
12271 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
12272 (ARGMATCH_CONSTRAINT): New macro.
12273 (ARGMATCH_ASSERT): Use it.
12274
12275 * src/system.h (verify): New macro.
12276 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
12277 rather than assert.
12278 * src/tables.c (tables_generate): Likewise.
12279
12280 * src/struniq.c (struniq_assert): Now returns void, and aborts
12281 if the assertion is false.
12282 (struniq_assert_p): Remove.
12283 * src/struniq.h: Likewise.
12284
12285 2002-11-18 Paul Eggert <eggert@twinsun.com>
12286
12287 * data/glr.c (yygetLRActions): Replace `yyindex' with
12288 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
12289 This fixes the regression with Sun ONE Studio 7 cc that I reported in
12290 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
12291
12292 2002-11-18 Akim Demaille <akim@epita.fr>
12293
12294 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
12295 space.
12296 From Tim Van Holder.
12297
12298 2002-11-17 Paul Eggert <eggert@twinsun.com>
12299
12300 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
12301 to "SyntaxError" for consistency with my 2002-11-15 change.
12302
12303 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
12304 not define to {}, since this breaks the common use of `YYDPRINTF
12305 ((...));' if a single statement is desired (e.g. before `else').
12306 Work around GCC warnings by surrounding corresponding calls with
12307 {} if needed.
12308 (yyhasResolvedValue): Remove unused function.
12309 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
12310 loop body.
12311 (yyreportSyntaxError): Renamed from yyreportParseError.
12312 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
12313 All uses changed.
12314 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
12315 extern when possible. Remove unused initializations.
12316
12317 2002-11-16 Akim Demaille <akim@epita.fr>
12318
12319 Augment the similarity between GLR and LALR traces.
12320
12321 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
12322 (YY_REDUCE_PRINT): New.
12323 (yyparse): Use them.
12324 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
12325 YYDPRINT here.
12326 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
12327 state reached after the reduction/recovery, since...
12328 (yyparse, yyprocessOneStack): Report the state we are entering in.
12329
12330 2002-11-16 Akim Demaille <akim@epita.fr>
12331
12332 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
12333 Add support for --trace=skeleton.
12334 * src/scan-skel.l: %option debug.
12335 Scan strings of non-@ or \n instead of character by character.
12336 (scan_skel): Handle trace_skeleton.
12337 (QPUTS): New.
12338 (@output_parser_name@, @output_header_name@): ``Restore'' their
12339 support (used to be M4 macros).
12340 * data/yacc.c: Quote larger chunks, a la glr.c.
12341 * data/lalr1.cc: Likewise.
12342 The header guards are no longer available, so use some other
12343 string than `YYLSP_NEEDED'.
12344
12345 2002-11-16 Akim Demaille <akim@epita.fr>
12346
12347 Make the ``Printers and Destructors'' test more verbose, taking
12348 `yacc.c''s behavior as (possibly wrong) reference.
12349
12350 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
12351 instead of fprint on stdout.
12352 Set and report the last_line of the symbols.
12353 Consistently display values and locations.
12354
12355 2002-11-16 Paul Eggert <eggert@twinsun.com>
12356
12357 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
12358
12359 2002-11-15 Paul Eggert <eggert@twinsun.com>
12360
12361 * tests/actions.at (Actions after errors): New test case.
12362
12363 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
12364 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
12365 tests/action.at, tests/calc.at, tests/conflicts.at,
12366 tests/cxx-type.at, tests/regression.at:
12367 "parse error" -> "syntax error" for POSIX compatibility.
12368 "parsing stack overflow..." -> "parser stack overflow" so
12369 that code matches Bison documentation.
12370
12371 2002-11-15 Akim Demaille <akim@epita.fr>
12372
12373 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
12374 take two BRACED_CODE, not two string_content.
12375 Free the scanner's obstack when we are done.
12376 (code_content): New.
12377 * tests/calc.at: Adjust.
12378 * doc/bison.texinfo: Adjust.
12379 Also, make sure to include the `,' for these declarations.
12380
12381 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
12382
12383 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
12384 definition; avoids potential autoreconf problems.
12385
12386 2002-11-15 Akim Demaille <akim@epita.fr>
12387
12388 Always check the value returned by yyparse.
12389
12390 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
12391 returned by yyparse.
12392 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
12393 Adjust calls.
12394 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
12395 returned by yyparse.
12396
12397 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12398
12399 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
12400 on input.at test.
12401
12402 2002-11-14 Paul Eggert <eggert@twinsun.com>
12403
12404 * src/output.c (output_skeleton): Call xfopen instead of
12405 duplicating xfopen's body.
12406
12407 Fix bugs reported by Nelson H. F. Beebe in
12408 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
12409
12410 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
12411 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
12412 Group compiler. Instead, use "$CC -E bar.c". Include the .h
12413 file twice in the grammar, as an extra check.
12414
12415 * tests/input.at (Torturing the Scanner): Surround the
12416 backslash-newline tests with "#if 0", to make it less likely that
12417 we'll run into compiler bugs. Bring back solitary \ inside
12418 comment, but add a closing comment to work around HP C bug. Don't
12419 test backslash-newline in C character constant.
12420
12421 2002-11-14 Akim Demaille <akim@epita.fr>
12422
12423 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
12424 status of the compiler.
12425 Calling `exit 1' is no longer needed.
12426 Reported by Nelson H. F. Beebe.
12427
12428 2002-11-14 Akim Demaille <akim@epita.fr>
12429
12430 * tests/atlocal.in (CPPFLAGS): We have config.h.
12431 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
12432 New.
12433 * tests/actions.at, tests/calc.at, tests/conflicts.at,
12434 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
12435 * tests/regression.at, tests/torture.at: Use them for all the
12436 grammars that are to be compiled.
12437 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
12438 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
12439 * doc/bison.texinfo (GLR Parsers): Document `inline'.
12440
12441 2002-11-14 Akim Demaille <akim@epita.fr>
12442
12443 * doc/bison.texinfo: Various formatting changes (alignments in
12444 samples, additional @group/@end group, GCS in samples.
12445 Use @deffn instead of simple @table to define the directives,
12446 macros, variables etc.
12447
12448 2002-11-13 Paul Eggert <eggert@twinsun.com>
12449
12450 Fix some bugs reported by Albert Chin-A-Young in
12451 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
12452
12453 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
12454 -o c"; the HP C compiler chatters during compilation.
12455 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
12456 * tests/headers.at (export YYLTYPE): Likewise.
12457
12458 * tests/input.at (Torturing the Scanner): Remove lines containing
12459 solitary backslashes, as they tickle a bug in the HP C compiler.
12460
12461 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
12462 comments, since they're not portable. Use GNU coding style.
12463
12464 2002-11-13 Akim Demaille <akim@epita.fr>
12465
12466 * data/yacc.c: Leave bigger chunks of quoted text.
12467 (YYDSYMPRINTF): New.
12468 Use it to report symbol activities.
12469 * data/glr.c (YYDSYMPRINTF): New.
12470 Use it.
12471
12472 2002-11-12 Paul Eggert <eggert@twinsun.com>
12473
12474 Version 1.75b.
12475
12476 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
12477 (yyglrReduce): Return yyok, not 0.
12478 This should avoid the enumerated-type warnings reported
12479 by Nelson H. F. Beebe in
12480 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
12481
12482 * lib/bbitset.h (BITSET_INLINE): Remove.
12483 * lib/bitset.h [! BITSET_INLINE]: Remove.
12484 (bitset_set, bitset_reset, bitset_test): Rename local vars
12485 to avoid shadowing warnings by GCC.
12486
12487 * data/glr.c (inline): Remove #define. It's the user's
12488 responsibility to #define it away, just like 'const'.
12489 This fixes one of the bugs reported by Nelson H. F. Beebe in
12490 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
12491
12492 * Makefile.maint (po-check): Scan .l and .y files instead of the
12493 .c and the .h files that they generate. This fixes the bug
12494 reported by Tim Van Holder in:
12495 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
12496 Look for N_ as well as for _. Try to avoid matching #define for
12497 N_ and _.
12498 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
12499 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
12500 * src/scan-gram.l: Revamp regular expressions so that " and '
12501 do not confuse xgettext.
12502
12503 * src/struniq.h (struniq_new): Do not declare the return type
12504 to be 'const'; this violates the C standard.
12505 * src/struniq.c (struniq_new): Likewise.
12506
12507 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
12508
12509 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
12510 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
12511 linker.
12512
12513 2002-11-12 Akim Demaille <akim@epita.fr>
12514
12515 * Makefile.maint: Sync with Autoconf:
12516 (local_updates): New.
12517
12518 2002-11-12 Akim Demaille <akim@epita.fr>
12519
12520 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
12521
12522 2002-11-12 Akim Demaille <akim@epita.fr>
12523
12524 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
12525 locations.
12526
12527 2002-11-12 Akim Demaille <akim@epita.fr>
12528
12529 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
12530 not yyvalue.
12531
12532 2002-11-12 Akim Demaille <akim@epita.fr>
12533
12534 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
12535 Use it to test the GLR parser.
12536
12537 2002-11-12 Akim Demaille <akim@epita.fr>
12538
12539 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
12540 defines it.
12541 * data/glr.c (yystos): New.
12542 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
12543 (YYDSYMPRINT): New.
12544 (yyval): Don't define it, it is handled via M4.
12545 (yyrecoverParseError): Free verbosely the discarded symbols.
12546 * data/yacc.c (yysymprint): Remove, rather...
12547 (b4_yysymprint_generate): invoke.
12548 * data/c.m4 (b4_yysymprint_generate): New.
12549 Accept pointers as arguments, as opposed to the version from
12550 yacc.c.
12551 (b4_yydestruct_generate): Likewise.
12552 * tests/cations.at (Printers and Destructors): Use Bison directives
12553 instead of CPP macros.
12554 Don't rely on internal details.
12555
12556 2002-11-12 Akim Demaille <akim@epita.fr>
12557
12558 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
12559 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
12560 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
12561 it against YYEMPTY and so forth), work on yytoken (i.e., set
12562 it to YYEMPTY etc.).
12563 (yydestruct): Replace with a b4_yydestruct_generate invocation.
12564 (b4_symbol_actions): Remove.
12565 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
12566 for 0, end-of-input.
12567
12568 2002-11-12 Akim Demaille <akim@epita.fr>
12569
12570 * doc/bison.texinfo (Destructor Decl): New.
12571
12572 2002-11-12 Akim Demaille <akim@epita.fr>
12573
12574 * src/tables.c (tables_generate): Use free for pointers that
12575 cannot be NULL, not XFREE.
12576 (pack_vector): Use assert, not fatal, for bound violations.
12577 * src/state.c (state_new): Likewise.
12578 * src/reader.c (reader): Likewise.
12579 * src/lalr.c (set_goto_map): Likewise.
12580 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
12581 the file name.
12582
12583 2002-11-12 Akim Demaille <akim@epita.fr>
12584
12585 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
12586 Restore.
12587 * src/scan-gram.l (last_string): Is global to the file, not to
12588 yylex.
12589 * src/parse-gram.y (input): Don't append the epilogue here,
12590 (epilogue.opt): do it here, and free the scanner's obstack.
12591 * src/reader.c (epilogue_set): Rename as...
12592 (epilogue_augment): this.
12593 * data/c.m4 (b4_epilogue): Defaults to empty.
12594
12595 2002-11-12 Akim Demaille <akim@epita.fr>
12596
12597 * src/getargs.c (long_options): Remove duplicates.
12598 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
12599 Remove.
12600 * doc/bison.rnh: Remove.
12601 * doc/bison.texinfo (VMS Invocation): Remove.
12602
12603 2002-11-12 Akim Demaille <akim@epita.fr>
12604
12605 * src/struniq.h, src/struniq.c (struniq_t): Is const.
12606 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
12607
12608 Use struniq for symbols.
12609
12610 * src/symtab.h (symbol_t): The tag member is a struniq.
12611 (symbol_type_set): Adjust.
12612 * src/symtab.c (symbol_new): Takes a struniq.
12613 (symbol_free): Don't free the tag member.
12614 (hash_compare_symbol_t, hash_symbol_t): Rename as...
12615 (hash_compare_symbol, hash_symbol): these.
12616 Use the fact that tags as struniqs.
12617 (symbol_get): Use struniq_new.
12618 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
12619 Returns a strniq.
12620 * src/reader.h (merger_list, grammar_currentmerge_set): The name
12621 and type members are struniqs.
12622 * src/reader.c (get_merge_function)
12623 (grammar_current_rule_merge_set): Adjust.
12624 (TYPE, current_type): Are struniq.
12625
12626 Use struniq for file names.
12627
12628 * src/files.h, src/files.c (infile): Split into...
12629 (grammar_file, current_file): these.
12630 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
12631 * src/reduce.c (reduce_print): Likewise.
12632 * src/getargs.c (getargs): Likewise.
12633 * src/complain.h, src/complain.c: Likewise.
12634 * src/main.c (main): Call struniqs_new early enough to use it for
12635 file names.
12636 Don't free the input file name.
12637
12638 2002-11-12 Akim Demaille <akim@epita.fr>
12639
12640 * src/symtab.c (symbol_free): Remove dead deactivated code:
12641 type_name are properly removed.
12642 Don't use XFREE to free items that cannot be NULL.
12643 * src/struniq.h, src/struniq.c: New.
12644 * src/main.c (main): Initialize/free struniqs.
12645 * src/parse-gram.y (%union): Add astruniq member.
12646 (yyprint): Adjust.
12647 * src/scan-gram.l (<{tag}>): Return a struniq.
12648 Free the obstack bit that used to store it.
12649 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
12650
12651 2002-11-11 Paul Eggert <eggert@twinsun.com>
12652
12653 Revamp to fix many (but not all) of the C- and M4-related quoting
12654 problems. Among other things, this fixes the Bison bug reported
12655 by Jan Hubicka when processing the Bash grammar; see:
12656 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
12657
12658 Use new @ escapes consistently. Represent brackets with @{ and @}
12659 rather than @<:@ and @:>@, since this works a bit better with dumb
12660 editors like vi. Represent @ with @@, since @ is now consistently
12661 an escape. Use @oline@ and @ofile@ rather than __oline__ and
12662 __ofile__, to avoid unexpected expansions. Similarly, use @output
12663 rather than #output.
12664
12665 * data/c.m4 (b4_copyright): Omit file name from comment, since
12666 the file name could contain "*/".
12667 (b4_synclines_flag): Don't quote the 2nd argument; it should already
12668 be quoted. All uses changed.
12669
12670 * data/glr.c: Use new @ escapes consistently.
12671 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
12672 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
12673 Remove, since they couldn't handle arbitrary characters in file
12674 names.
12675 * data/lalr1.cc: Likewise.
12676 * data/yacc.c: Likewise.
12677
12678 * src/files.c (output_infix): Remove; all uses removed.
12679 * src/files.h: Likewise.
12680
12681 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
12682 mishandled funny characters in file names, and anyway it isn't
12683 needed any more.
12684 * data/yacc.c: Likewise.
12685 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
12686
12687 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
12688 * data/yacc.c: Likewise.
12689
12690 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
12691 strings now.
12692 (muscle_init): Quote filename as a C string.
12693 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
12694 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
12695 * src/output.c (escaped_file_name_output): New function.
12696 (prepare_symbols): Quote tokens for M4.
12697 (prepare): Don't insert output_infix, output_prefix,
12698 output_parser_name, output_header_name; this is now down by scan-skel.
12699 Insert skeleton as a C string.
12700
12701 * src/output.c (user_actions_output, symbol_destructors_output,
12702 symbol_printers_output): Quote filenames for C and M4.
12703 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12704
12705 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
12706 escapes other than \\ and \'; this simplifies the code.
12707 (<SC_STRING>): Likewise, for \\ and \".
12708 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
12709 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
12710 Use new escapes @{ and @} for [ and ].
12711
12712 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
12713 them with auto vars.
12714 Switch to new escape scheme, where @ is the escape character uniformly.
12715 Abort if a stray escape character is found. Avoid unbounded input
12716 buffer when parsing non-escaped text.
12717
12718 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
12719 __oline__, #output, $@, and @{ do not have unintended meanings.
12720
12721 2002-11-09 Paul Eggert <eggert@twinsun.com>
12722
12723 Fix the test failure due to GCC warnings described in
12724 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
12725 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
12726 evaluate to 0 if it's impossible for NINF to be in the respective
12727 table.
12728 (yygetLRActions, yyrecoverParseError): Use them.
12729
12730 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
12731 counted in the token inserted at end of file. Now takes
12732 location_t *, not location_t, so that the location can be
12733 adjusted. All uses changed.
12734
12735 * tests/regression.at (Invalid inputs): Adjust wording in
12736 diagnostic to match the new behavior.
12737
12738 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
12739 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
12740 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
12741 abort ();'. This reduces the runtime of the "Many lookaheads"
12742 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
12743 GCC 3.2.
12744
12745 2002-11-07 Paul Eggert <eggert@twinsun.com>
12746
12747 * src/parse-gram.y (CHARACTER): Remove unused token.
12748 All uses removed.
12749
12750 * src/scan-gram.l: Remove stack option. We no longer use the
12751 stack, since the stack was never deeper than 1; instead, use the
12752 new auto var c_context to record the stacked value.
12753
12754 Remove nounput option. At an unexpected end of file, we now unput
12755 the minimal input necessary to end cleanly; this simplifies the
12756 code.
12757
12758 Avoid unbounded token sizes where this is easy.
12759
12760 (unexpected_end_of_file): New function.
12761 Use it to systematize the error message on unexpected EOF.
12762 (last-string): Now auto, not static.
12763 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
12764 (scanner_last_string_free): Remove; not used.
12765 (percent_percent_count): Move decl to just before use.
12766 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
12767 not the (never otherwised-used) CHARACTER.
12768
12769 2002-11-07 Akim Demaille <akim@epita.fr>
12770
12771 Let yyerror always receive the msg as last argument, so that
12772 yyerror can be variadic.
12773
12774 * data/yacc.c (b4_yyerror_args): New.
12775 Use it when calling yyerror.
12776 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
12777 Use it when calling yyerror.
12778 * doc/bison.texinfo (Error Reporting): Adjust.
12779 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
12780 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
12781
12782 2002-11-06 Akim Demaille <akim@epita.fr>
12783
12784 #line should have quoted strings.
12785 Ideally, this should be done by m4_quotearg.
12786
12787 * src/scan-skel.l: Include quotearg.h.
12788 Quote __ofile__.
12789 * src/output.c (symbol_printers_output)
12790 (symbol_destructors_output): Quote the file name.
12791
12792 2002-11-06 Akim Demaille <akim@epita.fr>
12793
12794 * tests/regression.at (Invalid inputs): Adjust to the recent
12795 messages.
12796
12797 2002-11-06 Akim Demaille <akim@epita.fr>
12798
12799 Restore --no-lines.
12800 Reported by Jim Kent.
12801
12802 * data/c.m4 (b4_syncline): New.
12803 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12804 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12805 * src/output.c (user_actions_output): Likewise.
12806 (prepare): Define 'b4_synclines_flag'.
12807 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
12808
12809 2002-11-06 Akim Demaille <akim@epita.fr>
12810
12811 * src/main.c (main): Free `infile'.
12812 * src/scan-gram.l (handle_syncline): New.
12813 Recognize `#line'.
12814 * src/output.c (user_actions_output, symbol_destructors_output)
12815 (symbol_printers_output): Use the location's file name, not
12816 infile.
12817 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12818
12819 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12820
12821 * src/tables.c (matching_state): Don't allow states to match if
12822 either has GLR conflict entries.
12823
12824 2002-11-05 Paul Eggert <eggert@twinsun.com>
12825
12826 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12827 "integer out of range" rather than "invalid value".
12828 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12829 accordingly.
12830
12831 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12832 Also, remove one static variable in the scanner.
12833
12834 * src/scan-gram.l (braces_level): Now auto, not static.
12835 Initialize to zero if the compiler is being picky.
12836 (INITIAL): Clear braces_level instead of incrementing it.
12837 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12838 as POSIX 1003.1-2001 requires.
12839 * src/system.h (IF_LINT): New macro, taken from coreutils.
12840 * configure.ac: Define "lint" if --enable-gcc-warnings.
12841
12842 2002-11-05 Akim Demaille <akim@epita.fr>
12843
12844 * src/scan-gram.l: When it starts with `%', complain about the
12845 whole directive, not just that `invalid character: %'.
12846
12847 2002-11-04 Akim Demaille <akim@epita.fr>
12848
12849 * Makefile.maint: Update from Autoconf.
12850 (update, cvs-update, po-update, do-po-update): New.
12851
12852 2002-11-04 Akim Demaille <akim@epita.fr>
12853
12854 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12855 and yyerror.
12856 Have yyerror `use' its arguments.
12857 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12858 returns true when location & yacc & pure & parse-param.
12859 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12860
12861 2002-11-04 Akim Demaille <akim@epita.fr>
12862
12863 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12864 clashes.
12865 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12866 font-lock-mode.
12867 Use complain_at.
12868 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12869 slot 0.
12870
12871 2002-11-03 Paul Eggert <eggert@twinsun.com>
12872
12873 * src/reader.c (get_merge_function, grammar_current_rule_check):
12874 Use consistent diagnostics for reporting type name clashes.
12875 Quote the types with <>, for consistency with Yacc.
12876 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12877
12878 2002-11-03 Akim Demaille <akim@epita.fr>
12879
12880 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12881 New.
12882 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12883 (b4_parse_param): Remove.
12884 Use b4_identification.
12885 Propagate b4_pure_args where needed to pass them to yyerror.
12886 * data/glr.m4 (b4_parse_param): Remove.
12887 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12888 (b4_lpure_formals): New.
12889 Use b4_identification.
12890 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12891 b4_user_formals and b4_user_args.
12892 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12893 (yyreportAmbiguity): When using a pure parser, also need
12894 the location, and the parse-params.
12895 Adjust callers.
12896 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12897 When using a pure parser, also need the parse-params.
12898 Adjust callers.
12899 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12900 (%pure-parser + %parse-param) LALR and GLR parsers.
12901 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12902 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12903 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12904 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12905 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12906 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12907 * doc/bison.texinfo: Untabify the whole file.
12908 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12909 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12910 (Error Reporting): Adjust to these new directives.
12911 Document %error-verbose, deprecate YYERROR_VERBOSE.
12912
12913 2002-11-03 Akim Demaille <akim@epita.fr>
12914
12915 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12916 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12917 command line options.
12918 * tests/cxx-type.at: Formatting changes.
12919
12920 2002-11-03 Paul Eggert <eggert@twinsun.com>
12921
12922 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12923 to count columns correctly, and to check for invalid inputs.
12924
12925 Use mbsnwidth to count columns correctly. Account for tabs, too.
12926 Include mbswidth.h.
12927 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12928 (extend_location): New function.
12929 (YY_LINES): Remove.
12930
12931 Handle CRLF in C code rather than in Lex code.
12932 (YY_INPUT): New macro.
12933 (no_cr_read): New function.
12934
12935 Scan UCNs, even though we don't fully handle them yet.
12936 (convert_ucn_to_byte): New function.
12937
12938 Handle backslash-newline correctly in C code.
12939 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12940 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12941 all uses changed.
12942 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12943 Use {splice} wherever C allows backslash-newline.
12944 YY_STEP after space, newline, vertical-tab.
12945 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
12946
12947 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12948
12949 ({int}, handle_action_dollar, handle_action_at): Check for integer
12950 overflow.
12951
12952 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12953
12954 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12955 as well as \000. Check for UCHAR_MAX, not 255.
12956 Allow \x with an arbitrary positive number of digits, as in C.
12957 Check for overflow here.
12958 Allow \? and UCNs, for compatibility with C.
12959
12960 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12961 with quote slot used by complain_at.
12962
12963 * tests/input.at: Add tests for backslash-newline, m4 quotes
12964 in symbols, long literals, and funny escapes in strings.
12965
12966 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12967 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12968 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12969 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12970 * m4/mbswidth.m4: New file, from GNU coreutils.
12971
12972 * doc/bison.texinfo (Grammar Outline): Document // comments.
12973 (Symbols): Document that trigraphs have no special meaning in Bison,
12974 nor is backslash-newline allowed.
12975 (Actions): Document that trigraphs have no special meaning.
12976
12977 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12978 no longer used.
12979
12980 2002-11-02 Paul Eggert <eggert@twinsun.com>
12981
12982 * src/reader.c: Don't include quote.h; not needed.
12983 (get_merge_function): Reword warning to be consistent with
12984 type clash diagnostic in grammar_current_rule_check.
12985
12986 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12987 bug in trigraph handling.
12988
12989 * src/output.c (prepare_symbols): When printing token names,
12990 escape "[" as "@<:@" and likewise for "]".
12991
12992 * src/system.h (errno): Remove declaration, as we are now
12993 assuming C89 or better, and C89 guarantees errno.
12994
12995 2002-10-30 Paul Eggert <eggert@twinsun.com>
12996
12997 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12998 Check for close failures.
12999 * src/files.h (xfclose): Return void, not int, since it always
13000 returned zero.
13001 * src/files.c (xfclose): Likewise. Report I/O error if ferror
13002 indicates one.
13003 * src/output.c (output_skeleton): Use xfclose rather than fclose
13004 and ferror. xfclose now checks ferror.
13005
13006 * data/glr.c (YYLEFTMOST_STATE): Remove.
13007 (yyreportTree): Use a stack-based leftmost state. This avoids
13008 our continuing battles with bogus warnings about initializers.
13009
13010 2002-10-30 Akim Demaille <akim@epita.fr>
13011
13012 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
13013 #if.
13014
13015 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13016
13017 * tests/glr-regr1.at: New test for reported regressions.
13018 * tests/testsuite.at: Add glr-regr1.at test.
13019 * tests/Makefile.am: Add glr-regr1.at test.
13020
13021 2002-10-24 Paul Eggert <eggert@twinsun.com>
13022
13023 Version 1.75a.
13024
13025 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
13026 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
13027 we use malloc. Don't assume 'A' through 'Z' are contiguous.
13028 Don't assume strdup exists; POSIX says its an XSI extension.
13029 Check for buffer overflow on input.
13030
13031 2002-10-24 Akim Demaille <akim@epita.fr>
13032
13033 * src/output.c (output_skeleton): Don't disable M4sugar comments
13034 too soon: it results in comments being expanded.
13035 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
13036 first output.
13037
13038 2002-10-24 Akim Demaille <akim@epita.fr>
13039
13040 * data/yacc.c (m4_int_type): New.
13041 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
13042 char' as only yacc.c wants K&R portability.
13043 * data/glr.c (yysigned_char): Remove.
13044 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
13045 Reported by Quoc Peyrot.
13046
13047 2002-10-23 Paul Eggert <eggert@twinsun.com>
13048
13049 * src/main.c (main): With --trace=time, report times even if a
13050 non-fatal error occurs. Formerly, the times were reported in some
13051 such cases but not in others.
13052 * src/reader.c (reader): Just return if a complaint has been issued,
13053 instead of exiting, so that 'main' can report times.
13054
13055 2002-10-22 Akim Demaille <akim@epita.fr>
13056
13057 * src/system.h: Include sys/types.
13058 Reported by Bert Deknuydt.
13059
13060 2002-10-23 Paul Eggert <eggert@twinsun.com>
13061
13062 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
13063 Suggested by Art Haas.
13064
13065 2002-10-22 Paul Eggert <eggert@twinsun.com>
13066
13067 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
13068 decl; not needed any more.
13069 * src/main.c (main): Use return to exit, undoing yesterday's change.
13070 The last OS that we could find where this wouldn't work is
13071 SunOS 3.5, and that's too old to worry about now.
13072
13073 * data/glr.c (struct yyltype): Define members even when not
13074 doing locations. This is more consistent with yacc.c, and it
13075 works around the following bug reports:
13076 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
13077 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
13078
13079 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
13080 @acronym consistently. Standardize on "Yacc" instead of "YACC",
13081 "Algol" instead of "ALGOL". Give a bit more history about BNF.
13082
13083 2002-10-22 Akim Demaille <akim@epita.fr>
13084
13085 * data/README: New.
13086
13087 2002-10-21 Paul Eggert <eggert@twinsun.com>
13088
13089 Be consistent about 'bool'; the old code used an enum in one
13090 module and an int in another, and this violates the C standard.
13091 * m4/stdbool.m4: New file, from coreutils 4.5.3.
13092 * configure.ac (AC_HEADER_STDBOOL): Add.
13093 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
13094 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13095 * src/symtab.c (hash_compare_symbol_t): Likewise.
13096 * src/system.h (bool, false, true): Use a definition consistent
13097 with ../lib/hash.c. All uses changed.
13098
13099 * src/complain.c (warning_issued): Renamed from warn_message_count,
13100 so that we needn't worry about integer overflow (!).
13101 Now of type bool. All uses changed.
13102 (complaint_issued): Renamed from complain_message_count; likewise.
13103
13104 * src/main.c (main): Use exit to exit with failure.
13105
13106 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
13107 rather than 1 and 0.
13108 * src/main.c (main): Likewise.
13109 * src/getargs.c (getargs): Likewise.
13110 * src/reader.c (reader): Likewise.
13111
13112 * src/getarg.c (getargs): Remove duplicate code for
13113 "Try `bison --help'".
13114
13115 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
13116 What was that "2" for?
13117
13118 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
13119 * src/getargs.c (usage): Likewise.
13120
13121 * src/getargs.c (getargs): When there are too few operands, report
13122 the last one. When there are too many, report the first extra
13123 one. This is how diffutils does it.
13124
13125 2002-10-20 Paul Eggert <eggert@twinsun.com>
13126
13127 Remove K&R vestiges.
13128 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
13129 * src/complain.c (VA_START): Remove. Assume prototypes.
13130 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
13131 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
13132 fatal): Assume prototypes.
13133 * src/complain.h: Assume prototypes.
13134 * src/system.h (PARAMS): Remove.
13135 Include <limits.h> unconditionally, since it's guaranteeed even
13136 for a freestanding C89 compiler.
13137 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
13138 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
13139
13140 2002-10-20 Akim Demaille <akim@epita.fr>
13141
13142 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
13143 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
13144 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
13145 (yyresolveStates, yyresolveAction, yyresolveStack)
13146 (yyprocessOneStack): Use them.
13147 (yy_reduce_print): New.
13148 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
13149
13150 2002-10-20 Akim Demaille <akim@epita.fr>
13151
13152 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
13153 arguments and output `void'.
13154 (b4_c_function): Rename as...
13155 (b4_c_function_def): this.
13156 (b4_c_function_decl, b4_c_ansi_function_def)
13157 (b4_c_ansi_function_decl): New.
13158 Change the interpretation of the arguments: before `int, foo', now
13159 `int foo, foo'.
13160 * data/yacc.c (yyparse): Prototype and define thanks to these.
13161 Adjust b4_c_function_def uses.
13162 * data/glr.c (yyparse): Likewise, but ANSI only.
13163
13164 2002-10-20 Akim Demaille <akim@epita.fr>
13165
13166 * src/output.c (prepare): Move the definition of `tokens_number',
13167 `nterms_number', `undef_token_number', `user_token_number_max'
13168 to...
13169 (prepare_tokens): Here.
13170 (prepare_tokens): Rename as...
13171 (prepare_symbols): this.
13172 (prepare): Move the definition of `rules_number' to...
13173 (prepare_rules): here.
13174 (prepare): Move the definition of `last', `final_state_number',
13175 `states_number' to...
13176 (prepare_states): here.
13177 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
13178
13179 2002-10-20 Akim Demaille <akim@epita.fr>
13180
13181 * src/tables.h, src/tables.c, src/output.c: Comment changes.
13182
13183 2002-10-20 Akim Demaille <akim@epita.fr>
13184
13185 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
13186 * data/c.m4: here.
13187
13188 2002-10-20 Akim Demaille <akim@epita.fr>
13189
13190 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
13191 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
13192 `pair'.
13193 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
13194 `name' to...
13195 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
13196 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
13197 These.
13198
13199 2002-10-19 Paul Eggert <eggert@twinsun.com>
13200
13201 Do not create a temporary file, as that involves security and
13202 cleanup headaches. Instead, use a pair of pipes.
13203 Derived from a suggestion by Florian Krohm.
13204 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
13205 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
13206 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
13207 (BISON_PREREQ_SUBPIPE): Add.
13208 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
13209 Add subpipe.h, subpipe.c.
13210 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
13211 * po/POTFILES.in: Add lib/subpipe.c.
13212 * src/output.c: Include "subpipe.h".
13213 (m4_invoke): Remove decl.
13214 (scan_skel): New decl.
13215 (output_skeleton): Use pipe rather than temporary file for m4 input.
13216 Check that m4sugar.m4 is readable, to avoid deadlock.
13217 Check for pipe I/O error.
13218 * src/scan-skel.l (readpipe): Remove decl.
13219 (scan_skel): New function, to be used in place of m4_invoke.
13220 Read from stream rather than file.
13221
13222 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
13223 float, as this generates a warning on Solaris 8 + GCC 3.2 with
13224 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
13225 this generates a more-accurate value anyway.
13226
13227 * lib/timevar.c (timervar_accumulate): Rename locals to
13228 avoid confusion with similarly-named more-global.
13229 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
13230
13231 * src/output.c (prepare): Use xstrdup to convert char const *
13232 to char *, to avoid GCC warning.
13233
13234 2002-10-19 Akim Demaille <akim@epita.fr>
13235
13236 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
13237 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
13238 Use them to have `calc.y' ready for %pure-parser.
13239 * data/yacc.c (YYLEX): Pass a yylex return type to
13240 b4_c_function_call.
13241
13242 2002-10-19 Akim Demaille <akim@epita.fr>
13243
13244 Prototype support of %lex-param and %parse-param.
13245
13246 * src/parse-gram.y: Add the definition of the %lex-param and
13247 %parse-param tokens, plus their rules.
13248 Drop the `_' version of %glr-parser.
13249 Add the "," token.
13250 * src/scan-gram.l (INITIAL): Scan them.
13251 * src/muscle_tab.c: Comment changes.
13252 (muscle_insert, muscle_find): Rename `pair' as `probe'.
13253 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
13254 (muscle_entry_s): The `value' member is no longer const.
13255 Adjust all dependencies.
13256 * src/muscle_tab.c (muscle_init): Adjust: use
13257 MUSCLE_INSERT_STRING.
13258 Initialize the obstack earlier.
13259 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
13260 (muscle_pair_list_grow): New.
13261 * data/c.m4 (b4_c_function_call, b4_c_args): New.
13262 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
13263 * tests/calc.at: Use %locations, not --locations.
13264 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
13265
13266 2002-10-19 Akim Demaille <akim@epita.fr>
13267
13268 * src/getargs.c (usage): Take status as argument and exit
13269 accordingly.
13270 Report the traditional `Try ... --help' message when status != 0.
13271 (usage, version): Don't take a FILE * as arg, it is pointless.
13272 (getargs): When there is an incorrect number of arguments, make it
13273 an error, and report it GNUlically thanks to `usage ()'.
13274
13275 2002-10-18 Paul Eggert <eggert@twinsun.com>
13276
13277 * data/glr.c (yyreportParseError): Don't assume that sprintf
13278 yields the length of the printed string, as this is not true
13279 on SunOS 4.1.4. Reported by Peter Klein.
13280
13281 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
13282 * tests/conflicts.at (%nonassoc and eof): Likewise.
13283 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
13284
13285 2002-10-17 Akim Demaille <akim@epita.fr>
13286
13287 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
13288 * src/getargs.c (trace_types, trace_args): Adjust.
13289 * src/reader.c (grammar_current_rule_prec_set)
13290 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
13291 Standardize error messages.
13292 And s/@prec/%prec/!
13293 (reader): Use trace_flag to enable scanner/parser debugging,
13294 instead of an adhoc scheme.
13295 * src/scan-gram.l: Remove trailing debugging code.
13296
13297 2002-10-16 Paul Eggert <eggert@twinsun.com>
13298
13299 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
13300 MUSCLE_TAB_H.
13301
13302 * NEWS: Officially drop support for building Bison with K&R C,
13303 since it didn't work anyway and it's not worth worrying about.
13304 * Makefile.maint (wget_files): Remove ansi2knr.c.
13305 (ansi2knr.c-url_prefix): Remove.
13306 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
13307 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13308 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13309
13310 2002-10-15 Paul Eggert <eggert@twinsun.com>
13311
13312 Stop using the "enum_" trick for K&R-style function definitions;
13313 it confused me, and I was the author! Instead, assume that people
13314 who want to use K&R C compilers (when using these modules in GCC,
13315 perhaps?) will run ansi2knr.
13316
13317 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
13318 All uses of "enum_" changed to "enum ".
13319 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13320 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13321
13322 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
13323 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
13324 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
13325 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
13326 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
13327 abitset_not, abitset_ones, abitset_or, abitset_or_and,
13328 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
13329 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
13330 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
13331 Use function prototypes; this removes the need for declaring
13332 static functions simply to provide their prototypes.
13333 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
13334 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
13335 bitset_count_, bitset_create, bitset_dump, bitset_first,
13336 bitset_free, bitset_init, bitset_last, bitset_next,
13337 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
13338 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
13339 bitset_print, bitset_release_memory, bitset_toggle_,
13340 bitset_type_choose, bitset_type_get, bitset_type_name_get,
13341 debug_bitset): Likewise.
13342 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
13343 * lib/bitset_stats.c (bitset_log_histogram_print,
13344 bitset_percent_histogram_print, bitset_stats_and,
13345 bitset_stats_and_cmp, bitset_stats_and_or,
13346 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
13347 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
13348 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
13349 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
13350 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
13351 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
13352 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
13353 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
13354 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
13355 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
13356 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
13357 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
13358 bitset_stats_zero): Likewise.
13359 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13360 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13361 bitsetv_dump, debug_bitsetv): Likewise.
13362 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
13363 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
13364 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
13365 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
13366 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
13367 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
13368 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
13369 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
13370 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
13371 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
13372 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
13373 Likewise.
13374 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
13375 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
13376 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
13377 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
13378 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
13379 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
13380 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
13381 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
13382 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
13383 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
13384 lbitset_xor_cmp, lbitset_zero): Likewise.
13385
13386 2002-10-14 Akim Demaille <akim@epita.fr>
13387
13388 Version 1.75.
13389
13390 2002-10-14 Akim Demaille <akim@epita.fr>
13391
13392 * tests/Makefile.am (maintainer-check-posix): New.
13393
13394 2002-10-14 Akim Demaille <akim@epita.fr>
13395
13396 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
13397 member.
13398
13399 2002-10-14 Akim Demaille <akim@epita.fr>
13400
13401 * src/tables.c (table_ninf_remap): base -> tab.
13402 Reported by Matt Rosing.
13403
13404 2002-10-14 Paul Eggert <eggert@twinsun.com>
13405
13406 * tests/action.at, tests/calc.at, tests/conflicts.at,
13407 tests/cxx-type.at, tests/headers.at, tests/input.at,
13408 tests/regression.at, tests/synclines.at, tests/torture.at:
13409 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
13410 so that the tests still work even if POSIXLY_CORRECT is set.
13411 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
13412
13413 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
13414 for portability to K&R hosts. Fix typo: signed char is guaranteed
13415 only to 127, not to 128.
13416 * data/glr.c (yysigned_char): New type.
13417 * data/yacc.c (yysigned_char): Likewise.
13418 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
13419
13420 2002-10-13 Paul Eggert <eggert@twinsun.com>
13421
13422 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
13423 true due to limited range of data type" warning from GCC.
13424
13425 * data/c.m4 (b4_token_defines): Protect against double-inclusion
13426 by wrapping enum yytokentype's definition inside #ifndef
13427 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
13428
13429 2002-10-13 Akim Demaille <akim@epita.fr>
13430
13431 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
13432 Un yy- yyrhs to avoid the name clash with the global YYRHS.
13433
13434 2002-10-13 Akim Demaille <akim@epita.fr>
13435
13436 * Makefile.maint: Update from Autoconf 2.54.
13437 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
13438
13439 2002-10-13 Akim Demaille <akim@epita.fr>
13440
13441 * src/print.c (print_state): Separate the list of solved conflicts
13442 from the other items.
13443 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
13444
13445 2002-10-13 Akim Demaille <akim@epita.fr>
13446
13447 Let nondeterministic skeletons be usable with deterministic
13448 tables.
13449
13450 With the patch, GAWK compiled by GCC without -O2 passes its test
13451 suite using a GLR parser driven by LALR tables. It fails with -O2
13452 because `struct stat' gives two different answers on my machine:
13453 88 (definition of an auto var) and later 96 (memset on this var).
13454 Hence the stack is badly corrumpted. The headers inclusion is to
13455 blame: if I move the awk.h inclusion before GLR's system header
13456 inclusion, the two struct stat have the same size.
13457
13458 * src/tables.c (pack_table): Always create conflict_table.
13459 (token_actions): Always create conflict_list.
13460 * data/glr.c (YYFLAG): Remove, unused.
13461
13462 2002-10-13 Akim Demaille <akim@epita.fr>
13463
13464 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
13465 (O0FLAGS): New.
13466 (VALGRIND, GXX): New.
13467 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
13468 * tests/bison.in: Run $PREBISON a pre-command.
13469 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
13470 (maintainer-check-g++): New.
13471 * Makefile.am (maintainer-check): New.
13472
13473 2002-10-13 Akim Demaille <akim@epita.fr>
13474
13475 * data/glr.c: Formatting changes.
13476 Tweak some trace messages to match yacc.c's.
13477
13478 2002-10-13 Akim Demaille <akim@epita.fr>
13479
13480 GLR parsers sometimes raise parse errors instead of performing the
13481 default reduction.
13482 Reported by Charles-Henry de Boysson.
13483
13484 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
13485 check the length of the traces when %glr.
13486 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
13487 GLR's traces.
13488 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
13489 Test GLR parsers.
13490 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
13491 (yyltype): Remove the yy prefix from the member names.
13492 (yytable): Complete its comment.
13493 (yygetLRActions): Map error action number from YYTABLE from
13494 YYTABLE_NINF to 0.
13495 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
13496 (which was a bug: it should have been YYTABEL_NINF, and yet it was
13497 not satisfying as we could compare an YYACTION computed from
13498 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
13499 only value for error actions.
13500 (yyreportParseError): In verbose parse error messages, don't issue
13501 `error' in the list of expected tokens.
13502 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
13503 next action to perform to match glr.c's decoding.
13504 (yytable): Complete its comment.
13505
13506 2002-10-13 Paul Eggert <eggert@twinsun.com>
13507
13508 Fix problem reported by Henrik Grubbstroem in
13509 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
13510 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
13511 because the Bison parser reads the second action before reducing
13512 the first one.
13513 * src/scan-gram.l (rule_length): New static var.
13514 Use it to keep track of the rule length in the scanner, since
13515 we can't expect the parser to be in lock-step sync with the scanner.
13516 (handle_action_dollar, handle_action_at): Use this var.
13517 * tests/actions.at (Exotic Dollars): Test for the problem.
13518
13519 2002-10-12 Paul Eggert <eggert@twinsun.com>
13520
13521 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
13522 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
13523 Include <sys/time.h> when checking for clock_t and struct tms.
13524 Use same include order as source.
13525 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
13526 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
13527
13528 * lib/timevar.c: Update copyright date and clarify comments.
13529 (get_time) [IN_GCC]: Keep the GCC version for reference.
13530
13531 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
13532 GCC version as of today, then merge Bison's changes.
13533 Change "GCC" to "Bison" in copyright notice. timevar.def's
13534 author is Akim, so change that too.
13535
13536 * src/reader.c (grammar_current_rule_check):
13537 Don't worry about the default action if $$ is untyped.
13538 Prevents bogus warnings reported by Jim Gifford in
13539 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
13540
13541 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
13542 * data/glr.c, data/lalr1.cc, data/yacc.c:
13543 Output token definitions before the first part of user declarations.
13544 Fixes compatibility problem reported by Jim Gifford for kbd in
13545 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
13546
13547 2002-10-11 Paul Eggert <eggert@twinsun.com>
13548
13549 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
13550 (yyparse): here. This undoes some of the 2002-07-25 change.
13551 Compatibility problem reported by Ralf S. Engelschall with
13552 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
13553
13554 2002-10-11 Akim Demaille <akim@epita.fr>
13555
13556 * tests/regression.at Characters Escapes): New.
13557 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
13558 characters.
13559 Reported by Jan Nieuwenhuizen.
13560
13561 2002-10-11 Akim Demaille <akim@epita.fr>
13562
13563 * po/id.po: New.
13564
13565 2002-10-10 Paul Eggert <eggert@twinsun.com>
13566
13567 Portability fixes for bitsets; this also avoids several GCC
13568 warnings.
13569
13570 * lib/abitset.c: Include <stddef.h>, for offsetof.
13571 * lib/lbitset.c: Likewise.
13572
13573 * lib/abitset.c (abitset_bytes): Return a size that is aligned
13574 properly for vectors of objects. Do not assume that adding a
13575 header size to a multiple of a word size yields a value that is
13576 properly aligned for the whole union.
13577 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13578
13579 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
13580 unique names for structures.
13581 * lib/ebitset.c (ebitset_bytes): Likewise.
13582 * lib/lbitset.c (lbitset_bytes): Likewise.
13583
13584 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
13585 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
13586 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
13587 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
13588 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
13589 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
13590 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
13591 to improve the type-checking that GCC can do.
13592 * lib/bitset.c (bitset_op4_cmp): Likewise.
13593 * lib/bitset_stats.c (bitset_stats_count,
13594 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
13595 bitset_stats_copy, bitset_stats_disjoint_p,
13596 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
13597 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
13598 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
13599 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
13600 bitset_stats_and_or_cmp, bitset_stats_andn_or,
13601 bitset_stats_andn_or_cmp, bitset_stats_or_and,
13602 bitset_stats_or_and_cmp): Likewise.
13603 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
13604 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
13605 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
13606 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
13607
13608 * lib/abitset.h: Include bitset.h, not bbitset.h.
13609 * lib/ebitset.h: Likewise.
13610 * lib/lbitset.h: Likewise.
13611
13612 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
13613 All instances of parameters of type enum bitset_opts are now of
13614 type enum_bitset_opts, to conform to the C Standard, and similarly
13615 for enum_bitset_type.
13616 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
13617 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
13618
13619 Do not use "struct bitset_struct" to mean different things in
13620 different modules. Not only is this confusing, it violates
13621 the C Standard, which requires that structure types in different
13622 modules must be compatible if one is to be passed to the other.
13623 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
13624 All instances of "struct bitset_struct *" replaced with "bitset".
13625 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
13626 (union bitset_union, struct abitset_struct, struct ebitset_struct,
13627 struct lbitset_struct, struct bitset_stats_struct): New types.
13628 All uses of struct bitset_struct changed to union bitset_union,
13629 etc.
13630 * lib/abitset.c (struct abitset_struct, abitset,
13631 struct bitset_struct): Remove.
13632 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
13633 struct bitset_struct): Remove.
13634 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
13635 bitset_struct): Remove.
13636 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
13637 Likewise.
13638
13639 Do not call a function of type T using a call that assumes the
13640 function is of a different type U. Standard C requires that a
13641 function must be called with a type that is compatible with its
13642 definition.
13643 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13644 New decls.
13645 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
13646 New functions.
13647 * lib/ebitset.c (PFV): Remove.
13648 * lib/lbitset.c (PFV): Likewise.
13649 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
13650 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
13651 decls.
13652 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
13653 (ebitset_vtable): Use them.
13654 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
13655 lbitset_xor): New functions.
13656 (lbitset_vtable): Use them.
13657
13658 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
13659 Declare.
13660
13661 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
13662 GCC warning.
13663 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
13664 Use offsetof, for simplicity.
13665
13666 2002-10-06 Paul Eggert <eggert@twinsun.com>
13667
13668 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
13669 the same width as int. This reapplies a hunk of the 2002-08-12 patch
13670 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
13671 which was inadvertently undone by the 2002-09-30 patch.
13672 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
13673 the same width as int.
13674
13675 2002-10-04 Paul Eggert <eggert@twinsun.com>
13676
13677 Version 1.50.
13678
13679 * configure.ac (AC_INIT), NEWS: Increment version number.
13680
13681 * doc/bison.texinfo: Minor spelling, grammar, and white space
13682 fixes.
13683 (Symbols): Mention that any negative value returned from yylex
13684 signifies end-of-input. Warn about negative chars. Mention
13685 the portable Standard C character set.
13686
13687 The GNU coding standard says CFLAGS and YFLAGS are reserved
13688 for the installer to set.
13689 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
13690 * src/Makefile.am (AM_CFLAGS): Likewise.
13691 (AM_YFLAGS): Renamed from YFLAGS.
13692
13693 Fix some MAX and MIN problems.
13694 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
13695 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
13696 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
13697 * src/reader.c (reader): Use it.
13698
13699 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
13700 POSIX 1003.1-2001 has removed fgrep.
13701
13702 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
13703
13704 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
13705 interpreted as signed.
13706 * lib/ebitset.c (ebitset_list): Fix bug.
13707
13708 2002-10-01 Paul Eggert <eggert@twinsun.com>
13709
13710 More fixes for 64-bit hosts and large bitsets.
13711
13712 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
13713 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
13714 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
13715 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
13716 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
13717 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
13718 bitset_count_): Likewise.
13719 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
13720 bitset_first, bitset_last): Likewise.
13721 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
13722 bitset_stats_list_reverse, bitset_stats_size,
13723 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
13724 Likewise.
13725 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13726 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
13727 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
13728 bitsetv_reflexive_transitive_closure): Likewise.
13729 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
13730 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
13731 Likewise.
13732 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
13733 Likewise.
13734
13735 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
13736 Use size_t, not unsigned int, to count bytes.
13737 * lib/abitset.h (abitset_bytes): Likewise.
13738 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
13739 Likewise.
13740 * lib/bitset.h (bitset_bytes): Likewise.
13741 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
13742 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
13743 * lib/bitsetv.c (bitsetv_alloc): Likewise.
13744 * lib/ebitset.c (ebitset_bytes): Likewise.
13745 * lib/ebitset.h (ebitset_bytes): Likewise.
13746 * lib/lbitset.c (lbitset_bytes): Likewise.
13747 * lib/lbitset.h (lbitset_bytes): Likewise.
13748
13749 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
13750 abitset_subset_p, abitset_disjoint_p, abitset_and,
13751 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
13752 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
13753 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
13754 abitset_or_and, abitset_or_and_cmp):
13755 Use bitset_windex instead of unsigned int.
13756 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13757 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
13758 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
13759 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
13760 Likewise.
13761 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
13762
13763 * lib/bitset.c (bitset_print):
13764 Use proper printf formats for widths of integer types.
13765 * lib/bitset_stats.c (bitset_percent_histogram_print,
13766 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
13767 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13768 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
13769 * lib/lbitset.c (lbitset_bytes): Likewise.
13770
13771 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
13772 BITSET_SIZE_MAX): New macros.
13773 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
13774 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
13775 to BITSET_WINDEX_MAX.
13776
13777 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
13778 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
13779 since we now return the bitset_bindex type (not int).
13780
13781 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
13782 when computing sizes.
13783 * lib/ebitset.c (ebitset_elts_grow): Likewise.
13784
13785 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
13786 and avoid cast to unsigned.
13787
13788 2002-09-30 Akim Demaille <akim@epita.fr>
13789
13790 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13791 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
13792 Updates from Michael Hayes.
13793
13794 2002-09-30 Art Haas <ahaas@neosoft.com>
13795
13796 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13797 invocations.
13798 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13799 defined.
13800
13801 2002-09-27 Akim Demaille <akim@epita.fr>
13802
13803 Version 1.49c.
13804
13805 2002-09-27 Akim Demaille <akim@epita.fr>
13806
13807 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13808 (Because of AC_LIBSOURCE).
13809
13810 2002-09-27 Akim Demaille <akim@epita.fr>
13811
13812 Playing with Autoscan.
13813
13814 * configure.ac: Remove the old LIBOBJ tweaks.
13815 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13816 * lib/strrchr.c: New.
13817 * lib/strtol.c: New, from the Coreutils 4.5.1.
13818
13819 2002-09-27 Akim Demaille <akim@epita.fr>
13820
13821 Playing with Autoscan.
13822
13823 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13824 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13825 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13826 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13827 Coreutils 4.5.1.
13828
13829 2002-09-24 Akim Demaille <akim@epita.fr>
13830
13831 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13832 (Frequently Asked Questions, Parser Stack Overflow): New.
13833
13834 2002-09-13 Akim Demaille <akim@epita.fr>
13835
13836 Playing with autoscan.
13837
13838 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13839 * src/files.c (skeleton_find): Remove, unused.
13840 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13841 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13842
13843 2002-09-13 Akim Demaille <akim@epita.fr>
13844
13845 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13846 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13847
13848 2002-09-13 Akim Demaille <akim@epita.fr>
13849
13850 * configure.ac: Require 2.54.
13851 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13852 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13853 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13854 Remove, provided by Autoconf macros.
13855
13856 2002-09-12 Akim Demaille <akim@epita.fr>
13857
13858 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13859
13860 2002-09-12 Akim Demaille <akim@epita.fr>
13861
13862 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13863 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13864 Reported by Martin Mokrejs.
13865
13866 2002-09-10 Akim Demaille <akim@epita.fr>
13867
13868 * src/parse-gram.y: Associate a human readable string to each
13869 token type.
13870 * tests/regression.at (Invalid inputs): Adjust.
13871
13872 2002-09-10 Gary V. Vaughan <gary@gnu.org>
13873
13874 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13875 with an Autoconf-2.5x style configure.ac.
13876
13877 2002-09-06 Paul Eggert <eggert@twinsun.com>
13878
13879 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13880 exception applies only to yacc.c. This is a modification of a
13881 patch originally suggested by Akim Demaille.
13882
13883 2002-09-06 Akim Demaille <akim@epita.fr>
13884
13885 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13886 here to...
13887 * data/yacc.c: here.
13888
13889 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13890 LocationType.
13891 (b4_ltype): Default to yy::Location from location.hh.
13892
13893 2002-09-04 Jim Meyering <jim@meyering.net>
13894
13895 * data/yacc.c: Guard the declaration of yytoknum also with
13896 `#ifdef YYPRINT', so it is declared only when used.
13897
13898 2002-09-04 Akim Demaille <akim@epita.fr>
13899
13900 * configure.in: Rename as...
13901 * configure.ac: this.
13902 Bump to 1.49c.
13903
13904 2002-09-04 Akim Demaille <akim@epita.fr>
13905
13906 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13907 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13908 translate maintainer only messages.
13909
13910 2002-08-12 Paul Eggert <eggert@twinsun.com>
13911
13912 Version 1.49b.
13913
13914 * Makefile.am (SUBDIRS): Remove intl.
13915 (DISTCLEANFILES): Remove.
13916 * NEWS: Mention that GNU M4 is now required. Clarify what is
13917 meant by "larger grammars". Mention the pt_BR translation.
13918 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13919 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13920 Bump version from 0.11.2 to 0.11.5.
13921 (BISON_PREREQ_STAGE): Remove.
13922 (AM_GNU_GETTEXT): Use external gettext.
13923 (AC_OUTPUT): Remove intl/Makefile.
13924
13925 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13926
13927 * data/glr.c: Include string.h, for strlen.
13928 (yyreportParseError): Use size_t for yysize.
13929 (yy_yypstack): No longer nested inside yypstates, as nested
13930 functions are not portable. Do not assume size_t is the
13931 same width as int.
13932 (yypstates): Do not assume that ptrdiff_t is the same width
13933 as int, and similarly for yyposn and YYINDEX.
13934
13935 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13936
13937 * lib/Makefile.am (INCLUDES): Do not include from the intl
13938 directory, which has been removed.
13939 * src/Makefile.am (INCLUDES): Likewise.
13940
13941 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13942 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13943 New vars.
13944
13945 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13946 * tests/Makefile.am (EXTRA_DIST): Likewise.
13947
13948 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13949 Do not assume that bitset_windex is the same width as unsigned.
13950
13951 * lib/abitset.c (abitset_unused_clear): Do not assume that
13952 bitset_word is the same width as int.
13953 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13954 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13955 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13956 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13957 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13958
13959 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13960 portability to one's complement hosts!).
13961 * lib/ebitset.c (ebitset_op1): Likewise.
13962 * lib/lbitset.c (lbitset_op1): Likewise.
13963
13964 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13965 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13966 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13967 Sync with fileutils.
13968 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13969 lib/gettext.h: Sync with diffutils.
13970
13971 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13972 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13973
13974 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13975 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13976 check for void *.
13977
13978 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13979 size_t; the old version tried to do this but casted improperly.
13980 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13981 (bitset_test): Now returns int, not unsigned long.
13982
13983 * lib/bitset_stats.c: Include "gettext.h".
13984 (_): New macro.
13985 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13986 name locals "index", as it generates unnecessary warnings on some
13987 hosts that have an "index" function.
13988
13989 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13990 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13991 they need translation.
13992 * src/LR0.c (state_list_append, new_itemsets, get_state,
13993 append_states, generate_states): Likewise.
13994 * src/assoc.c (assoc_to_string): Likewise.
13995 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13996 * src/gram.c (grammar_dump): Likewise.
13997 * src/injections.c (injections_compute): Likewise.
13998 * src/lalr.c (lookaheads_print): Likewise.
13999 * src/relation.c (relation_transpose): Likewise.
14000 * src/scan-gram.l: Likewise.
14001 * src/tables.c (table_grow, pack_vector): Likewise.
14002
14003 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
14004 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
14005 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
14006 * m4/mbstate_t.m4: Sync with fileutils.
14007 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
14008
14009 * po/LINGUAS: Add pt_BR.
14010 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
14011 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
14012 lib/timevar.c.
14013 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
14014 manual recommends.
14015 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
14016
14017 * src/complain.c (strerror_r): Remove decl; not needed.
14018 (strerror): Use same pattern as ../lib/error.c.
14019
14020 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
14021
14022 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
14023
14024 * src/main.c (main): Cast result of bindtextdomain and textdomain
14025 to void, to avoid a GCC warning when --disable-nls is in effect.
14026
14027 * src/scan-gram.l: Use strings rather than escapes when possible,
14028 to minimize the number of warnings from xgettext.
14029 (handle_action_dollar, handle_action_at): Don't use isdigit,
14030 as it mishandles negative chars and it may not work as expected
14031 outside the C locale.
14032
14033 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
14034 this is a GCC extension and is not portable to other compilers.
14035
14036 * src/system.h (alloca): Use same pattern as ../lib/error.c.
14037 Do not include <ctype.h>; no longer needed.
14038 Do not include <malloc.h>; no longer needed (and generates
14039 warnings on OpenBSD 3.0).
14040
14041 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
14042 it's not portable.
14043
14044 * tests/regression.at: Do not use 'cc -c input.c -o input';
14045 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
14046
14047 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
14048 exit status as failure, not just exit status 1. Sun C exits
14049 with status 2 sometimes.
14050
14051 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
14052 Use it for the two large tests.
14053
14054 2002-08-02 Akim Demaille <akim@epita.fr>
14055
14056 * src/conflicts.c (conflicts_output): Don't output rules never
14057 reduced here, since anyway that computation doesn't work.
14058 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
14059 (rule_useless_p, rule_never_reduced_p): New.
14060 (grammar_rules_partial_print): Use a filter instead of a range.
14061 Display the title only if needed.
14062 (grammar_rules_print): Adjust.
14063 (grammar_rules_never_reduced_report): New.
14064 * src/tables.c (action_row): Move the computation of rules never
14065 reduced to...
14066 (token_actions): here.
14067 * src/main.c (main): Make the parser before making the report, so
14068 that rules never reduced are computed.
14069 Call grammar_rules_never_reduced_report.
14070 * src/print.c (print_results): Report rules never reduced.
14071 * tests/conflicts.at, tests/reduce.at: Adjust.
14072
14073 2002-08-01 Akim Demaille <akim@epita.fr>
14074
14075 Instead of attaching lookaheads and duplicating the rules being
14076 reduced by a state, attach the lookaheads to the reductions.
14077
14078 * src/state.h (state_t): Remove the `lookaheads',
14079 `lookaheads_rule' member.
14080 (reductions_t): Add a `lookaheads' member.
14081 Use a regular array for the `rules'.
14082 * src/state.c (reductions_new): Initialize the lookaheads member
14083 to 0.
14084 (state_rule_lookaheads_print): Adjust.
14085 * src/state.h, src/state.c (state_reductions_find): New.
14086 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
14087 (count_rr_conflicts): Adjust.
14088 * src/lalr.c (LArule): Remove.
14089 (add_lookback_edge): Adjust.
14090 (state_lookaheads_count): New.
14091 (states_lookaheads_initialize): Merge into...
14092 (initialize_LA): this.
14093 (lalr_free): Adjust.
14094 * src/main.c (main): Don't free nullable and derives too early: it
14095 is used by --verbose.
14096 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
14097
14098 2002-08-01 Akim Demaille <akim@epita.fr>
14099
14100 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
14101 `rule_number_t**'.
14102 (set_derives, free_derives): Rename as...
14103 (derives_compute, derives_free): this.
14104 Adjust all dependencies.
14105 * src/nullable.c (set_nullable, free_nullable): Rename as...
14106 (nullable_compute, nullable_free): these.
14107 (rule_list_t): Store rule_t *, not rule_number_t.
14108 * src/state.c (state_rule_lookaheads_print): Directly compare rule
14109 pointers, instead of their numbers.
14110 * src/main.c (main): Call nullable_free, and derives_free earlier,
14111 as they were lo longer used.
14112
14113 2002-08-01 Akim Demaille <akim@epita.fr>
14114
14115 * lib/timevar.c (get_time): Include children time.
14116 * src/lalr.h (LA, LArule): Don't export them: used with the
14117 state_t.
14118 * src/lalr.c (LA, LArule): Static.
14119 * src/lalr.h, src/lalr.c (lalr_free): New.
14120 * src/main.c (main): Call it.
14121 * src/tables.c (pack_vector): Check whether loc is >= to the
14122 table_size, not >.
14123 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
14124 (tables_generate): do it, since that's also it which allocates
14125 them.
14126 Don't free LA and LArule, main does.
14127
14128 2002-07-31 Akim Demaille <akim@epita.fr>
14129
14130 Separate parser tables computation and output.
14131
14132 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
14133 (conflict_list, conflict_list_cnt, table, check, table_ninf)
14134 (yydefgoto, yydefact, high): Move to...
14135 * src/tables.h, src/tables.c: here.
14136 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14137 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14138 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
14139 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
14140 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
14141 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
14142 (action_row, save_row, token_actions, save_column, default_goto)
14143 (goto_actions, sort_actions, matching_state, pack_vector)
14144 (table_ninf_remap, pack_table, prepare_actions): Move to...
14145 * src/tables.c: here.
14146 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
14147 * src/output.c (token_actions, output_base, output_conflicts)
14148 (output_check): Merge into...
14149 (prepare_actions): this.
14150 (actions_output): Rename as...
14151 (user_actions_output): this.
14152 * src/main.c (main): Call tables_generate and tables_free.
14153
14154 2002-07-31 Akim Demaille <akim@epita.fr>
14155
14156 Steal GCC's --time-report support.
14157
14158 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
14159 stolen/adjusted from GCC.
14160 * m4/stage.m4: Remove time related checks.
14161 * m4/timevar.m4: New.
14162 * configure.in: Adjust.
14163 * src/system.h: Adjust to using timevar.h.
14164 * src/getargs.h, src/getargs.c: Support trace_time for
14165 --trace=time.
14166 * src/main.c (stage): Remove.
14167 (main): Replace `stage' invocations with timevar calls.
14168 * src/output.c: Insert pertinent timevar calls.
14169
14170 2002-07-31 Akim Demaille <akim@epita.fr>
14171
14172 Let --trace have arguments.
14173
14174 * src/getargs.h (enum trace_e): New.
14175 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
14176 (long_options, short_options): --trace/-T takes an optional
14177 argument.
14178 Change all the uses of trace_flag to reflect the new flags.
14179 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
14180
14181 Strengthen `stage' portability.
14182
14183 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
14184 * configure.in: Use it.
14185 Don't check for malloc.h and sys/times.h.
14186 * src/system.h: Include them when appropriate.
14187 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
14188 times and struct tms are available.
14189
14190 2002-07-30 Akim Demaille <akim@epita.fr>
14191
14192 In verbose parse error message, don't report `error' as an
14193 expected token.
14194 * tests/actions.at (Printers and Destructors): Adjust.
14195 * tests/calc.at (Calculator $1): Adjust.
14196 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
14197 error message, do not report the parser accepts the error token in
14198 that state.
14199
14200 2002-07-30 Akim Demaille <akim@epita.fr>
14201
14202 Normalize conflict related messages.
14203
14204 * src/complain.h, src/complain.c (warn, complain): New.
14205 * src/conflicts.c (conflicts_print): Use them.
14206 (conflict_report_yacc): New, extracted from...
14207 (conflicts_print): here.
14208 * tests/conflicts.at, tests/existing.at: Adjust.
14209
14210 2002-07-30 Akim Demaille <akim@epita.fr>
14211
14212 Report rules which are never reduced by the parser: those hidden
14213 by conflicts.
14214
14215 * src/LR0.c (save_reductions): Don't make the final state too
14216 different: save its reduction (accept) instead of having a state
14217 without any action (no shift or goto, no reduce).
14218 Note: the final state is now a ``regular'' state, i.e., the
14219 parsers now contain `reduce 0' as default reduction.
14220 Nevertheless, since they decide to `accept' when yystate =
14221 final_state, they still will not reduce rule 0.
14222 * src/print.c (print_actions, print_reduction): Adjust.
14223 * src/output.c (action_row): Track reduced rules.
14224 (token_actions): Report rules never reduced.
14225 * tests/conflicts.at, tests/regression.at: Adjust.
14226
14227 2002-07-30 Akim Demaille <akim@epita.fr>
14228
14229 `stage' was accidently included in a previous patch.
14230 Initiate its autoconfiscation.
14231
14232 * configure.in: Look for malloc.h and sys/times.h.
14233 * src/main.c (stage): Adjust.
14234 Report only when trace_flag.
14235
14236 2002-07-29 Akim Demaille <akim@epita.fr>
14237
14238 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
14239 state_number_t.
14240 (errs_t): symbol_t*, not symbol_number_t.
14241 (reductions_t): rule_t*, not rule_number_t.
14242 (FOR_EACH_SHIFT): New.
14243 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
14244 * src/print.c, src/print_graph.c: Adjust.
14245
14246 2002-07-29 Akim Demaille <akim@epita.fr>
14247
14248 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
14249
14250 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
14251 (endtoken, accept): these.
14252 * src/reader.c (reader): Set endtoken's default tag to "$end".
14253 Set undeftoken's tag to "$undefined" instead of "$undefined.".
14254 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
14255 Adjust.
14256
14257 2002-07-29 Akim Demaille <akim@epita.fr>
14258
14259 * src/reduce.c (reduce_grammar): When the language is empty,
14260 complain about the start symbol, not the axiom.
14261 Use its location.
14262 * tests/reduce.at (Empty Language): New.
14263
14264 2002-07-26 Akim Demaille <akim@epita.fr>
14265
14266 * src/reader.h, src/reader.c (gram_error): ... can't get
14267 yycontrol without making too strong assumptions on the parser
14268 itself.
14269 * src/output.c (prepare_tokens): Use the real 0th value of
14270 token_translations instead of `0'.
14271 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
14272 visible here.
14273 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
14274 for the time being: %locations ought to provide it to yyerror.
14275
14276 2002-07-25 Akim Demaille <akim@epita.fr>
14277
14278 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
14279 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
14280 * tests/regression.at (Web2c Actions): Adjust.
14281
14282 2002-07-25 Akim Demaille <akim@epita.fr>
14283
14284 Stop storing rules from 1 to nrules + 1.
14285
14286 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
14287 * src/nullable.c, src/output.c, src/print.c, src/reader.c
14288 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
14289 Iterate from 0 to nrules.
14290 Use rule_number_as_item_number and item_number_as_rule_number.
14291 Adjust to `derive' now containing possibly 0.
14292 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
14293 Handle the `- 1' part in rule numbers from/to item numbers.
14294 * src/conflicts.c (log_resolution): Fix the message which reversed
14295 shift and reduce.
14296 * src/output.c (action_row): Initialize default_rule to -1.
14297 (token_actions): Adjust.
14298 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
14299 expected output.
14300 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
14301
14302 2002-07-25 Akim Demaille <akim@epita.fr>
14303
14304 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
14305 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
14306 (b4_c_knr_arg_decl): New.
14307 * data/yacc.c: Use it to define yysymprint, yydestruct, and
14308 yyreport_parse_error.
14309
14310 2002-07-25 Akim Demaille <akim@epita.fr>
14311
14312 * data/yacc.c (yyreport_parse_error): New, extracted from...
14313 (yyparse): here.
14314 (yydestruct, yysymprint): Move above yyparse.
14315 Be K&R compliant.
14316
14317 2002-07-25 Akim Demaille <akim@epita.fr>
14318
14319 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
14320 replace...
14321 (b4_sint_type, b4_uint_type): these.
14322 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
14323 * tests/regression.at (Web2c Actions): Adjust.
14324
14325 2002-07-25 Akim Demaille <akim@epita.fr>
14326
14327 * src/gram.h (TIEM_NUMBER_MAX): New.
14328 (item_number_of_rule_number, rule_number_of_item_number): Rename
14329 as...
14330 (rule_number_as_item_number, item_number_as_rule_number): these.
14331 Adjust dependencies.
14332 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
14333 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
14334 (symbol_number_to_vector_number): New.
14335 (order): Of vector_number_t* type.
14336 (base_t, BASE_MAX, BASE_MIN): New.
14337 (froms, tos, width, pos, check): Of base_t type.
14338 (action_number_t, ACTION_MIN, ACTION_MAX): New.
14339 (actrow): Of action_number_t type.
14340 (conflrow): Of unsigned int type.
14341 (table_ninf, base_ninf): New.
14342 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
14343 (muscle_insert_int_table, muscle_insert_base_table)
14344 (muscle_insert_rule_number_table): New.
14345 (prepare_tokens): Output `toknum' as int_table.
14346 (action_row): Returns a rule_number_t.
14347 Use ACTION_MIN, not SHRT_MIN.
14348 (token_actions): yydefact is rule_number_t*.
14349 (table_ninf_remap): New.
14350 (pack_table): Use it for `base' and `table'.
14351 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
14352 replaced with...
14353 (YYPACT_NINF, YYTABLE_NINF): these.
14354 (yypact, yytable): Compute their types instead of hard-coded
14355 `short'.
14356 * tests/regression.at (Web2c Actions): Adjust.
14357
14358 2002-07-19 Akim Demaille <akim@epita.fr>
14359
14360 * src/scan-gram.l (id): Can start with an underscore.
14361
14362 2002-07-16 Akim Demaille <akim@epita.fr>
14363
14364 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
14365 Adjust all former `associativity' dependencies.
14366 * src/symtab.c (symbol_new): Default associativity is `undef', not
14367 `right'.
14368 (symbol_check_alias_consistence): Adjust.
14369
14370 2002-07-09 Akim Demaille <akim@epita.fr>
14371
14372 * doc/bison.texinfo: Properly set the ``header'' part.
14373 Use @dircategory ``GNU programming tools'' as per Texinfo's
14374 documentation.
14375 Use @copying.
14376
14377 2002-07-09 Akim Demaille <akim@epita.fr>
14378
14379 * lib/quotearg.h: Protect against multiple inclusions.
14380 * src/location.h (location_t): Add a `file' member.
14381 (LOCATION_RESET, LOCATION_PRINT): Adjust.
14382 * src/complain.c (warn_at, complain_at, fatal_at): Drop
14383 `error_one_per_line' support.
14384
14385 2002-07-09 Akim Demaille <akim@epita.fr>
14386
14387 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
14388 * src/reader.c (lineno): Remove.
14389 Adjust all dependencies.
14390 (get_merge_function): Take a location and use complain_at.
14391 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
14392 * tests/regression.at (Invalid inputs, Mixing %token styles):
14393 Adjust.
14394
14395 2002-07-09 Akim Demaille <akim@epita.fr>
14396
14397 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
14398 recovery rule, and forbid extensions when --yacc.
14399 (gram_error): Use complain_at.
14400 * src/reader.c (reader): Exit if there were parse errors.
14401
14402 2002-07-09 Akim Demaille <akim@epita.fr>
14403
14404 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
14405 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
14406 Reported by R Blake <blakers@mac.com>.
14407
14408 2002-07-09 Akim Demaille <akim@epita.fr>
14409
14410 * data/yacc.c: Output the copyright notive in the header.
14411
14412 2002-07-03 Akim Demaille <akim@epita.fr>
14413
14414 * src/output.c (froms, tos): Are state_number_t.
14415 (save_column): sp, sp1, and sp2 are state_number_t.
14416 (prepare): Rename `final' as `final_state_number', `nnts' as
14417 `nterms_number', `nrules' as `rules_number', `nstates' as
14418 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
14419 unused.
14420 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
14421 * data/lalr1.cc (nsym_): Remove, unused.
14422
14423 2002-07-03 Akim Demaille <akim@epita.fr>
14424
14425 * src/lalr.h, src/lalr.c (goto_number_t): New.
14426 * src/lalr.c (goto_list_t): New.
14427 Propagate them.
14428 * src/nullable.c (rule_list_t): New.
14429 Propagate.
14430 * src/types.h: Remove.
14431
14432 2002-07-03 Akim Demaille <akim@epita.fr>
14433
14434 * src/closure.c (print_fderives): Use rule_rhs_print.
14435 * src/derives.c (print_derives): Use rule_rhs_print.
14436 (rule_list_t): New, replaces `shorts'.
14437 (set_derives): Add comments.
14438 * tests/sets.at (Nullable, Firsts): Adjust.
14439
14440 2002-07-03 Akim Demaille <akim@epita.fr>
14441
14442 * src/output.c (prepare_actions): Free `tally' and `width'.
14443 (prepare_actions): Allocate and free `order'.
14444 * src/symtab.c (symbols_free): Free `symbols'.
14445 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
14446 * src/output.c (m4_invoke): Move to...
14447 * src/scan-skel.l: here.
14448 (<<EOF>>): Close yyout, and free its name.
14449
14450 2002-07-03 Akim Demaille <akim@epita.fr>
14451
14452 Fix some memory leaks, and fix a bug: state 0 was examined twice.
14453
14454 * src/LR0.c (new_state): Merge into...
14455 (state_list_append): this.
14456 (new_states): Merge into...
14457 (generate_states): here.
14458 (set_states): Don't ensure a proper `errs' state member here, do it...
14459 * src/conflicts.c (conflicts_solve): here.
14460 * src/state.h, src/state.c: Comment changes.
14461 (state_t): Rename member `shifts' as `transitions'.
14462 Adjust all dependencies.
14463 (errs_new): For consistency, also take the values as argument.
14464 (errs_dup): Remove.
14465 (state_errs_set): New.
14466 (state_reductions_set, state_transitions_set): Assert that no
14467 previous value was assigned.
14468 (state_free): New.
14469 (states_free): Use it.
14470 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
14471 temporary storage: use `errs' and `nerrs' as elsewhere.
14472 (set_conflicts): Allocate and free this `errs'.
14473
14474 2002-07-02 Akim Demaille <akim@epita.fr>
14475
14476 * lib/libiberty.h: New.
14477 * lib: Update the bitset implementation from upstream.
14478 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
14479 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
14480 * src/main.c: Adjust bitset stats calls.
14481
14482 2002-07-01 Paul Eggert <eggert@twinsun.com>
14483
14484 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
14485 char, so that negative chars don't collide with $.
14486
14487 2002-06-30 Akim Demaille <akim@epita.fr>
14488
14489 Have the GLR tests be `warning' checked, and fix the warnings.
14490
14491 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
14492 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
14493 (yyremoveDeletes): `yyi' and `yyj' are size_t.
14494 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
14495 (yyaddDeferredAction): static.
14496 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
14497 (yyreportParseError): yyprefix is const.
14498 yytokenp is used only when verbose.
14499 (yy__GNUC__): Replace with __GNUC__.
14500 (yypdumpstack): yyi is size_t.
14501 (yypreference): Un-yy local variables and arguments, to avoid
14502 clashes with `yyr1'. Anyway, we are not in the user name space.
14503 (yytname_size): be an int, as is compared with ints.
14504 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
14505 Use them.
14506 * tests/cxx-gram.at: Use quotation to protect $1.
14507 Use AT_COMPILE to enable warnings hunts.
14508 Prototype yylex and yyerror.
14509 `Use' argc.
14510 Include `string.h', not `strings.h'.
14511 Produce and prototype stmtMerge only when used.
14512 yylex takes a location.
14513
14514 2002-06-30 Akim Demaille <akim@epita.fr>
14515
14516 We spend a lot of time in quotearg, in particular when --verbose.
14517
14518 * src/symtab.c (symbol_get): Store a quoted version of the key.
14519 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
14520 Adjust all callers.
14521
14522 2002-06-30 Akim Demaille <akim@epita.fr>
14523
14524 * src/state.h (reductions_t): Rename member `nreds' as num.
14525 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
14526 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
14527
14528 2002-06-30 Akim Demaille <akim@epita.fr>
14529
14530 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
14531 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
14532 (shifts_to): Rename as...
14533 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
14534 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
14535 (TRANSITION_IS_DISABLED, transitions_to): these.
14536
14537 2002-06-30 Akim Demaille <akim@epita.fr>
14538
14539 * src/print.c (print_shifts, print_gotos): Merge into...
14540 (print_transitions): this.
14541 (print_transitions, print_errs, print_reductions): Align the
14542 lookaheads columns.
14543 (print_core, print_transitions, print_errs, print_state,
14544 print_grammar): Output empty lines separator before, not after.
14545 (state_default_rule_compute): Rename as...
14546 (state_default_rule): this.
14547 * tests/conflicts.at (Defaulted Conflicted Reduction),
14548 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
14549 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
14550
14551 2002-06-30 Akim Demaille <akim@epita.fr>
14552
14553 Display items as we display rules.
14554
14555 * src/gram.h, src/gram.c (rule_lhs_print): New.
14556 * src/gram.c (grammar_rules_partial_print): Use it.
14557 * src/print.c (print_core): Likewise.
14558 * tests/conflicts.at (Defaulted Conflicted Reduction),
14559 (Unresolved SR Conflicts): Adjust.
14560 (Unresolved SR Conflicts): Adjust and rename as...
14561 (Resolved SR Conflicts): this, as was meant.
14562 * tests/regression.at (Web2c Report): Adjust.
14563
14564 2002-06-30 Akim Demaille <akim@epita.fr>
14565
14566 * src/print.c (state_default_rule_compute): New, extracted from...
14567 (print_reductions): here.
14568 Pessimize, but clarify the code.
14569 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
14570
14571 2002-06-30 Akim Demaille <akim@epita.fr>
14572
14573 * src/output.c (action_row): Let default_rule be always a rule
14574 number.
14575
14576 2002-06-30 Akim Demaille <akim@epita.fr>
14577
14578 * src/closure.c (print_firsts, print_fderives, closure):
14579 Use BITSET_EXECUTE.
14580 * src/lalr.c (lookaheads_print): Likewise.
14581 * src/state.c (state_rule_lookaheads_print): Likewise.
14582 * src/print_graph.c (print_core): Likewise.
14583 * src/print.c (print_reductions): Likewise.
14584 * src/output.c (action_row): Likewise.
14585 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
14586
14587 2002-06-30 Akim Demaille <akim@epita.fr>
14588
14589 * src/print_graph.c: Use report_flag.
14590
14591 2002-06-30 Akim Demaille <akim@epita.fr>
14592
14593 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
14594 to...
14595 * src/relation.h, src/relation.c (traverse, relation_digraph)
14596 (relation_print, relation_transpose): New.
14597
14598 2002-06-30 Akim Demaille <akim@epita.fr>
14599
14600 * src/state.h, src/state.c (shifts_to): New.
14601 * src/lalr.c (build_relations): Use it.
14602
14603 2002-06-30 Akim Demaille <akim@epita.fr>
14604
14605 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
14606 (item_number_of_rule_number, rule_number_of_item_number): New.
14607 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
14608 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14609 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
14610 Propagate their use.
14611 Much remains to be done, in particular wrt `shorts' from types.h.
14612
14613 2002-06-30 Akim Demaille <akim@epita.fr>
14614
14615 * src/symtab.c (symbol_new): Initialize the `printer' member.
14616
14617 2002-06-30 Akim Demaille <akim@epita.fr>
14618
14619 * src/LR0.c (save_reductions): Remove, replaced by...
14620 * src/state.h, src/state.c (state_reductions_set): New.
14621 (reductions, errs): Rename as...
14622 (reductions_t, errs_t): these.
14623 Adjust all dependencies.
14624
14625 2002-06-30 Akim Demaille <akim@epita.fr>
14626
14627 * src/LR0.c (state_list_t, state_list_append): New.
14628 (first_state, last_state): Now symbol_list_t.
14629 (this_state): Remove.
14630 (new_itemsets, append_states, save_reductions): Take a state_t as
14631 argument.
14632 (set_states, generate_states): Adjust.
14633 (save_shifts): Remove, replaced by...
14634 * src/state.h, src/state.c (state_shifts_set): New.
14635 (shifts): Rename as...
14636 (shifts_t): this.
14637 Adjust all dependencies.
14638 * src/state.h (state_t): Remove the `next' member.
14639
14640 2002-06-30 Akim Demaille <akim@epita.fr>
14641
14642 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
14643 escaped in slot 0.
14644
14645 2002-06-30 Akim Demaille <akim@epita.fr>
14646
14647 Use hash.h for the state hash table.
14648
14649 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
14650 (allocate_storage): Use state_hash_new.
14651 (free_storage): Use state_hash_free.
14652 (new_state, get_state): Adjust.
14653 * src/lalr.h, src/lalr.c (states): Move to...
14654 * src/states.h (state_t): Remove the `link' member, no longer
14655 used.
14656 * src/states.h, src/states.c: here.
14657 (state_hash_new, state_hash_free, state_hash_lookup)
14658 (state_hash_insert, states_free): New.
14659 * src/states.c (state_table, state_compare, state_hash): New.
14660 * src/output.c (output_actions): Do not free states now, since we
14661 still need to know the final_state number in `prepare', called
14662 afterwards. Do it...
14663 * src/main.c (main): here: call states_free after `output'.
14664
14665 2002-06-30 Akim Demaille <akim@epita.fr>
14666
14667 * src/state.h, src/state.c (state_new): New, extracted from...
14668 * src/LR0.c (new_state): here.
14669 * src/state.h (STATE_ALLOC): Move to...
14670 * src/state.c: here.
14671 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
14672 * src/state.h, src/state.c: here.
14673
14674 2002-06-30 Akim Demaille <akim@epita.fr>
14675
14676 * src/reader.c (gensym): Rename as...
14677 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
14678 (getsym): Rename as...
14679 (symbol_get): this.
14680
14681 2002-06-30 Akim Demaille <akim@epita.fr>
14682
14683 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
14684 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
14685 * src/output.c, src/print.c, src/print_graph.c: Propagate.
14686 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
14687
14688 2002-06-30 Akim Demaille <akim@epita.fr>
14689
14690 Make the test suite pass with warnings checked.
14691
14692 * tests/actions.at (Printers and Destructors): Improve.
14693 Avoid unsigned vs. signed issues.
14694 * tests/calc.at: Don't exercise the scanner here, do it...
14695 * tests/input.at (Torturing the Scanner): here.
14696
14697 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14698
14699 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
14700 reorganize first lines parallel to yacc.c.
14701
14702 2002-06-28 Akim Demaille <akim@epita.fr>
14703
14704 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
14705 (b4_token_enum, b4_token_defines): New, factored from...
14706 * data/lalr1.cc, data/yacc.c, glr.c: here.
14707
14708 2002-06-28 Akim Demaille <akim@epita.fr>
14709
14710 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
14711 unused variables.
14712 * src/output.c (merger_output): static.
14713
14714 2002-06-28 Akim Demaille <akim@epita.fr>
14715
14716 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
14717 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
14718 pacify GCC.
14719 * src/output.c (save_row): Initialize all the variables to pacify GCC.
14720
14721 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14722
14723 Accumulated changelog for new GLR parsing features.
14724
14725 * src/conflicts.c (count_total_conflicts): Change name to
14726 conflicts_total_count.
14727 * src/conflicts.h: Ditto.
14728 * src/output.c (token_actions): Use the new name.
14729 (output_conflicts): Change conflp => conflict_list_heads, and
14730 confl => conflict_list for better readability.
14731 * data/glr.c: Use the new names.
14732 * NEWS: Add self to GLR announcement.
14733
14734 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
14735
14736 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
14737 Akim Demaille.
14738
14739 * data/bison.glr: Change name to glr.c
14740 * data/glr.c: Renamed from bison.glr.
14741 * data/Makefile.am: Add glr.c
14742
14743 * src/getargs.c:
14744
14745 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
14746 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
14747
14748 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14749
14750 * data/bison.glr: Be sure to restore the
14751 current #line when returning to the skeleton contents after having
14752 exposed the input file's #line.
14753
14754 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14755
14756 * data/bison.glr: Bring up to date with changes to bison.simple.
14757
14758 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14759
14760 * data/bison.glr: Correct definitions that use b4_prefix.
14761 Various reformatting.
14762 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
14763 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
14764 yytokenp argument; now part of stack.
14765 (yychar): Define to behave as documented.
14766 (yyclearin): Ditto.
14767
14768 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14769
14770 * src/reader.h: Add declaration for free_merger_functions.
14771
14772 * src/reader.c (merge_functions): New variable.
14773 (get_merge_function): New function.
14774 (free_merger_functions): New function.
14775 (readgram): Check for %prec that is not followed by a symbol.
14776 Handle %dprec and %merge declarations.
14777 (packgram): Initialize dprec and merger fields in rules array.
14778
14779 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
14780 conflict_list_cnt, conflict_list_free): New variables.
14781 (table_grow): Also grow conflict_table.
14782 (prepare_rules): Output dprec and merger tables.
14783 (conflict_row): New function.
14784 (action_row): Output conflict lists for GLR parser. Don't use
14785 default reduction in conflicted states for GLR parser so that there
14786 are spaces for the conflict lists.
14787 (save_row): Also save conflict information.
14788 (token_actions): Allocate conflict list.
14789 (merger_output): New function.
14790 (pack_vector): Pack conflict table, too.
14791 (output_conflicts): New function to output yyconflp and yyconfl.
14792 (output_check): Allocate conflict_tos.
14793 (output_actions): Output conflict tables, also.
14794 (output_skeleton): Output b4_mergers definition.
14795 (prepare): Output b4_max_rhs_length definition.
14796 Use 'bison.glr' as default skeleton for GLR parsers.
14797
14798 * src/gram.c (glr_parser): New flag.
14799 (grammar_free): Call free_merger_functions.
14800
14801 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14802 all pairs of conflicting reductions, rather than just all tokens
14803 causing conflicts. Needed to size conflict tables.
14804 (conflicts_output): Modify call to count_rr_conflicts for new
14805 interface.
14806 (conflicts_print): Ditto.
14807 (count_total_conflicts): New function.
14808
14809 * src/reader.h (merger_list): New type.
14810 (merge_functions): New variable.
14811
14812 * src/lex.h (tok_dprec, tok_merge): New token types.
14813
14814 * src/gram.h (rule_s): Add dprec and merger fields.
14815 (glr_parser): New flag.
14816
14817 * src/conflicts.h (count_total_conflicts): New function.
14818
14819 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14820
14821 * doc/bison.texinfo (Generalized LR Parsing): New section.
14822 (GLR Parsers): New section.
14823 (Language and Grammar): Mention GLR parsing.
14824 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14825 Correct typo ("tge" -> "the").
14826
14827 * data/bison.glr: New skeleton for GLR parsing.
14828
14829 * tests/cxx-gram.at: New tests for GLR parsing.
14830
14831 * tests/testsuite.at: Include cxx-gram.at.
14832
14833 * tests/Makefile.am: Add cxx-gram.at.
14834
14835 * src/parse-gram.y:
14836
14837 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14838
14839 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
14840
14841 2002-06-27 Akim Demaille <akim@epita.fr>
14842
14843 * src/options.h, src/options.c: Remove.
14844 * src/getargs.c (short_options, long_options): New.
14845
14846 2002-06-27 Akim Demaille <akim@epita.fr>
14847
14848 * data/bison.simple, data/bison.c++: Rename as...
14849 * data/yacc.c, data/lalr1.cc: these.
14850 * doc/bison.texinfo (Environment Variables): Remove.
14851
14852 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14853
14854 * src/getargs.c (report_argmatch): Initialize strtok().
14855
14856 2002-06-20 Akim Demaille <akim@epita.fr>
14857
14858 * data/bison.simple (b4_symbol_actions): New, replaces...
14859 (b4_symbol_destructor, b4_symbol_printer): these.
14860 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14861 user token numbers.
14862
14863 2002-06-20 Akim Demaille <akim@epita.fr>
14864
14865 * data/bison.simple (yydestructor): Rename as...
14866 (yydestruct): this.
14867
14868 2002-06-20 Akim Demaille <akim@epita.fr>
14869
14870 * src/symtab.h, src/symtab.c (symbol_type_set)
14871 (symbol_destructor_set, symbol_precedence_set): The location is
14872 the last argument.
14873 Adjust all callers.
14874
14875 2002-06-20 Akim Demaille <akim@epita.fr>
14876
14877 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14878 internals.
14879 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14880 Takes a location.
14881 * src/symtab.h, src/symtab.c (symbol_class_set)
14882 (symbol_user_token_number_set): Likewise.
14883 Adjust all callers.
14884 Promote complain_at.
14885 * tests/input.at (Type Clashes): Adjust.
14886
14887 2002-06-20 Akim Demaille <akim@epita.fr>
14888
14889 * data/bison.simple (YYLEX): Fix the declaration when
14890 %pure-parser.
14891
14892 2002-06-20 Akim Demaille <akim@epita.fr>
14893
14894 * data/bison.simple (yysymprint): Don't print the token number,
14895 just its name.
14896 * tests/actions.at (Destructors): Rename as...
14897 (Printers and Destructors): this.
14898 Also exercise %printer.
14899
14900 2002-06-20 Akim Demaille <akim@epita.fr>
14901
14902 * data/bison.simple (YYDSYMPRINT): New.
14903 Use it to remove many of the #if YYDEBUG/if (yydebug).
14904
14905 2002-06-20 Akim Demaille <akim@epita.fr>
14906
14907 * src/symtab.h, src/symtab.c (symbol_t): printer and
14908 printer_location are new members.
14909 (symbol_printer_set): New.
14910 * src/parse-gram.y (PERCENT_PRINTER): New token.
14911 Handle its associated rule.
14912 * src/scan-gram.l: Adjust.
14913 (handle_destructor_at, handle_destructor_dollar): Rename as...
14914 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14915 * src/output.c (symbol_printers_output): New.
14916 (output_skeleton): Call it.
14917 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14918 since there are already many grammar files with a user `yyprint'.
14919 Replace the calls to YYPRINT to calls to yysymprint.
14920 * tests/calc.at: Adjust.
14921 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14922 taking advantage of parser very internal details (stack size!).
14923
14924 2002-06-20 Akim Demaille <akim@epita.fr>
14925
14926 * src/scan-gram.l: Complete the scanner with the missing patterns
14927 to pacify Flex.
14928 Use `quote' and `symbol_tag_get' where appropriate.
14929
14930 2002-06-19 Akim Demaille <akim@epita.fr>
14931
14932 * tests/actions.at (Destructors): Augment to test locations.
14933 * data/bison.simple (yydestructor): Pass it the current location
14934 if locations are enabled.
14935 Prototype only when __STDC__ or C++.
14936 Change the argument names to move into the yy name space: there is
14937 user code here.
14938
14939 2002-06-19 Akim Demaille <akim@epita.fr>
14940
14941 * data/bison.simple (b4_pure_if): New.
14942 Use it instead of #ifdef YYPURE.
14943
14944 2002-06-19 Akim Demaille <akim@epita.fr>
14945
14946 * data/bison.simple (b4_location_if): New.
14947 Use it instead of #ifdef YYLSP_NEEDED.
14948
14949 2002-06-19 Akim Demaille <akim@epita.fr>
14950
14951 Prepare @$ in %destructor, but currently don't bind it in the
14952 skeleton, as %location use is not cleaned up yet.
14953
14954 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14955 (handle_action_at): New.
14956 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14957 a braced_code_t and a location as additional arguments.
14958 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14959 unquote one when outputting `b4_dollar_dollar'.
14960 Adjust callers.
14961 * data/bison.simple (b4_eval): Remove.
14962 (b4_symbol_destructor): Adjust.
14963 * tests/input.at (Invalid @n): Adjust.
14964
14965 2002-06-19 Zack Weinberg <zack@codesourcery.com>
14966
14967 * doc/bison.texinfo: Document ability to have multiple
14968 prologue sections.
14969
14970 2002-06-18 Akim Demaille <akim@epita.fr>
14971
14972 * src/files.c (compute_base_names): When computing the output file
14973 names from the input file name, strip the directory part.
14974
14975 2002-06-18 Akim Demaille <akim@epita.fr>
14976
14977 * data/bison.simple.new: Comment changes.
14978 Reported by Andreas Schwab.
14979
14980 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14981
14982 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14983 there are no `label `yyoverflowlab' defined but not used' warnings
14984 when yyoverflow is defined.
14985
14986 2002-06-18 Akim Demaille <akim@epita.fr>
14987
14988 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14989 new member.
14990 (symbol_destructor_set): Adjust.
14991 * src/output.c (symbol_destructors_output): Output the destructor
14992 locations.
14993 Output the symbol name.
14994 * data/bison.simple (b4_symbol_destructor): Adjust.
14995
14996 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14997 and Akim Demaille <akim@epita.fr>
14998
14999 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
15000 what's left on the stack when the error recovery hits EOF.
15001 * tests/actions.at (Destructors): Complete to exercise this case.
15002
15003 2002-06-17 Akim Demaille <akim@epita.fr>
15004
15005 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
15006 arguments is really empty, not only equal to `[]'.
15007 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
15008 member.
15009 (symbol_destructor_set): New.
15010 * src/output.c (symbol_destructors_output): New.
15011 * src/reader.h (brace_code_t, current_braced_code): New.
15012 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
15013 (handle_dollar): Rename as...
15014 (handle_action_dollar): this.
15015 (handle_destructor_dollar): New.
15016 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
15017 (grammar_declaration): Use it.
15018 * data/bison.simple (yystos): Is always defined.
15019 (yydestructor): New.
15020 * tests/actions.at (Destructors): New.
15021 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
15022
15023 2002-06-17 Akim Demaille <akim@epita.fr>
15024
15025 * src/symlist.h, src/symlist.c (symbol_list_length): New.
15026 * src/scan-gram.l (handle_dollar, handle_at): Compute the
15027 rule_length only when needed.
15028 * src/output.c (actions_output, token_definitions_output): Output
15029 the full M4 block.
15030 * src/symtab.c: Don't access directly to the symbol tag, use
15031 symbol_tag_get.
15032 * src/parse-gram.y: Use symbol_list_free.
15033
15034 2002-06-17 Akim Demaille <akim@epita.fr>
15035
15036 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
15037 (symbol_list_prepend, get_type_name): Move to...
15038 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
15039 (symbol_list_prepend, symbol_list_n_type_name_get): here.
15040 Adjust all callers.
15041 (symbol_list_free): New.
15042 * src/scan-gram.l (handle_dollar): Takes a location.
15043 * tests/input.at (Invalid $n): Adjust.
15044
15045 2002-06-17 Akim Demaille <akim@epita.fr>
15046
15047 * src/reader.h, src/reader.c (symbol_list_new): Export it.
15048 (symbol_list_prepend): New.
15049 * src/parse-gram.y (%union): `list' is a new member.
15050 (symbols.1): New, replaces...
15051 (terms_to_prec.1, nterms_to_type.1): these.
15052 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
15053 Take a location as additional argument.
15054 Adjust all callers.
15055
15056 2002-06-15 Akim Demaille <akim@epita.fr>
15057
15058 * src/parse-gram.y: Move %token in the declaration section so that
15059 we don't depend upon CVS Bison.
15060
15061 2002-06-15 Akim Demaille <akim@epita.fr>
15062
15063 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
15064 * src/print.c (print_core): Use it.
15065
15066 2002-06-15 Akim Demaille <akim@epita.fr>
15067
15068 * src/conflicts.c (log_resolution): Accept the rule involved in
15069 the sr conflicts instead of the lookahead number that points to
15070 that rule.
15071 (flush_reduce): Accept the current lookahead vector as argument,
15072 instead of the index in LA.
15073 (resolve_sr_conflict): Accept the current number of lookahead
15074 bitset to consider for the STATE, instead of the index in LA.
15075 (set_conflicts): Adjust.
15076 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
15077
15078 2002-06-15 Akim Demaille <akim@epita.fr>
15079
15080 * src/state.h (state_t): Replace the `lookaheadsp' member, a
15081 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
15082 Adjust all dependencies.
15083 * src/lalr.c (initialize_lookaheads): Split into...
15084 (states_lookaheads_count, states_lookaheads_initialize): these.
15085 (lalr): Adjust.
15086
15087 2002-06-15 Akim Demaille <akim@epita.fr>
15088
15089 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
15090 out of...
15091 (grammar_rules_print): here.
15092 * src/reduce.c (reduce_output): Use it.
15093 * tests/reduce.at (Useless Rules, Reduced Automaton)
15094 (Underivable Rules): Adjust.
15095
15096 2002-06-15 Akim Demaille <akim@epita.fr>
15097
15098 Copy BYacc's nice way to report the grammar.
15099
15100 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
15101 New.
15102 Don't print the rules' location, it is confusing and useless.
15103 (rule_print): Use grammar_rhs_print.
15104 * src/print.c (print_grammar): Use grammar_rules_print.
15105
15106 2002-06-15 Akim Demaille <akim@epita.fr>
15107
15108 Complete and rationalize `useless thing' warnings.
15109
15110 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
15111 (symbol_tag_print): New.
15112 Use them everywhere in place of accessing directly the tag member.
15113 * src/gram.h, src/gram.c (rule_print): New.
15114 Use it where a rule used to be printed `by hand'.
15115 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
15116 (reduce_grammar_tables): Report the useless rules.
15117 (reduce_print): Useless things are a warning, not an error.
15118 Report it as such.
15119 * tests/reduce.at (Useless Nonterminals, Useless Rules):
15120 (Reduced Automaton, Underivable Rules): Adjust.
15121 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
15122 * tests/conflicts.at (Unresolved SR Conflicts)
15123 (Solved SR Conflicts): Adjust.
15124
15125 2002-06-15 Akim Demaille <akim@epita.fr>
15126
15127 Let symbols have a location.
15128
15129 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
15130 (getsym): Adjust.
15131 Adjust all callers.
15132 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
15133 Use location_t, not int.
15134 * src/symtab.c (symbol_check_defined): Take advantage of the
15135 location.
15136 * tests/regression.at (Invalid inputs): Adjust.
15137
15138 2002-06-15 Akim Demaille <akim@epita.fr>
15139
15140 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
15141 (input): Don't try to initialize yylloc here, do it in the
15142 scanner.
15143 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
15144 * src/gram.h (rule_t): Change line and action_line into location
15145 and action_location, of location_t type.
15146 Adjust all dependencies.
15147 * src/location.h, src/location.c (empty_location): New.
15148 * src/reader.h, src/reader.c (grammar_start_symbol_set)
15149 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
15150 (grammar_current_rule_symbol_append)
15151 (grammar_current_rule_action_append): Expect a location as argument.
15152 * src/reader.c (grammar_midrule_action): Adjust to attach an
15153 action's location as dummy symbol location.
15154 * src/symtab.h, src/symtab.c (startsymbol_location): New.
15155 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
15156 the line numbers.
15157
15158 2002-06-14 Akim Demaille <akim@epita.fr>
15159
15160 Grammar declarations may be found in the grammar section.
15161
15162 * src/parse-gram.y (rules_or_grammar_declaration): New.
15163 (declarations): Each declaration may end with a semicolon, not
15164 just...
15165 (grammar_declaration): `"%union"'.
15166 (grammar): Branch to rules_or_grammar_declaration.
15167
15168 2002-06-14 Akim Demaille <akim@epita.fr>
15169
15170 * src/main.c (main): Invoke scanner_free.
15171
15172 2002-06-14 Akim Demaille <akim@epita.fr>
15173
15174 * src/output.c (m4_invoke): Extracted from...
15175 (output_skeleton): here.
15176 Free tempfile.
15177
15178 2002-06-14 Akim Demaille <akim@epita.fr>
15179
15180 * src/parse-gram.y (directives, directive, gram)
15181 (grammar_directives, precedence_directives, precedence_directive):
15182 Rename as...
15183 (declarations, declaration, grammar, grammar_declaration)
15184 (precedence_declaration, precedence_declarator): these.
15185 (symbol_declaration): New.
15186
15187 2002-06-14 Akim Demaille <akim@epita.fr>
15188
15189 * src/files.c (action_obstack): Remove, unused.
15190 (output_obstack): Remove it, and all its dependencies, as it is no
15191 longer needed.
15192 * src/reader.c (epilogue_set): Build the epilogue in the
15193 muscle_obstack.
15194 * src/output.h, src/output.c (muscle_obstack): Move to...
15195 * src/muscle_tab.h, src/muscle_tab.h: here.
15196 (muscle_init): Initialize muscle_obstack.
15197 (muscle_free): New.
15198 * src/main.c (main): Call it.
15199
15200 2002-06-14 Akim Demaille <akim@epita.fr>
15201
15202 * src/location.h: New, extracted from...
15203 * src/reader.h: here.
15204 * src/Makefile.am (noinst_HEADERS): Merge into
15205 (bison_SOURCES): this.
15206 Add location.h.
15207 * src/parse-gram.y: Use location_t instead of Bison's.
15208 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
15209 Use location_t instead of ints.
15210
15211 2002-06-14 Akim Demaille <akim@epita.fr>
15212
15213 * data/bison.simple, data/bison.c++: Be sure to restore the
15214 current #line when returning to the skeleton contents after having
15215 exposed the input file's #line.
15216
15217 2002-06-12 Akim Demaille <akim@epita.fr>
15218
15219 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
15220 eager.
15221 * tests/actions.at (Exotic Dollars): New.
15222
15223 2002-06-12 Akim Demaille <akim@epita.fr>
15224
15225 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
15226 ['"/] too eagerly.
15227 * tests/input.at (Torturing the Scanner): New.
15228
15229 2002-06-11 Akim Demaille <akim@epita.fr>
15230
15231 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
15232 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
15233 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
15234 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
15235 * src/reader.c (reader): Use it.
15236
15237 2002-06-11 Akim Demaille <akim@epita.fr>
15238
15239 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
15240 Adjust all callers.
15241 (scanner_last_string_free): New.
15242
15243 2002-06-11 Akim Demaille <akim@epita.fr>
15244
15245 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
15246 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
15247 (last_string, YY_OBS_FREE): New.
15248 Use them when returning an ID.
15249
15250 2002-06-11 Akim Demaille <akim@epita.fr>
15251
15252 Have Bison grammars parsed by a Bison grammar.
15253
15254 * src/reader.c, src/reader.h (prologue_augment): New.
15255 * src/reader.c (copy_definition): Remove.
15256
15257 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
15258 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
15259 (grammar_current_rule_prec_set, grammar_current_rule_check)
15260 (grammar_current_rule_symbol_append)
15261 (grammar_current_rule_action_append): Export.
15262 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
15263 (symbol_list_action_append): Remove.
15264 Hook the routines from reader.
15265 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
15266 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
15267
15268 * src/reader.c (read_declarations): Remove, unused.
15269
15270 * src/parse-gram.y: Handle the epilogue.
15271 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
15272 (grammar_start_symbol_set): this.
15273 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
15274 * src/reader.c (readgram): Remove, unused.
15275 (reader): Adjust to insert eoftoken and axiom where appropriate.
15276
15277 * src/reader.c (copy_dollar): Replace with...
15278 * src/scan-gram.h (handle_dollar): this.
15279 * src/parse-gram.y: Remove `%thong'.
15280
15281 * src/reader.c (copy_at): Replace with...
15282 * src/scan-gram.h (handle_at): this.
15283
15284 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
15285 New.
15286
15287 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
15288 time being.
15289
15290 * src/reader.h, src/reader.c (grammar_rule_end): New.
15291
15292 * src/parse.y (current_type, current_class): New.
15293 Implement `%nterm', `%token' support.
15294 Merge `%term' into `%token'.
15295 (string_as_id): New.
15296 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
15297 type name.
15298
15299 * src/parse-gram.y: Be sure to handle properly the beginning of
15300 rules.
15301
15302 * src/parse-gram.y: Handle %type.
15303 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
15304
15305 * src/parse-gram.y: More directives support.
15306 * src/options.c: No longer handle source directives.
15307
15308 * src/parse-gram.y: Fix %output.
15309
15310 * src/parse-gram.y: Handle %union.
15311 Use the prologue locations.
15312 * src/reader.c (parse_union_decl): Remove.
15313
15314 * src/reader.h, src/reader.c (epilogue_set): New.
15315 * src/parse-gram.y: Use it.
15316
15317 * data/bison.simple, data/bison.c++: b4_stype is now either not
15318 defined, then default to int, or to the contents of %union,
15319 without `union' itself.
15320 Adjust.
15321 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
15322
15323 * src/output.c (actions_output): Don't output braces, as they are
15324 already handled by the scanner.
15325
15326 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
15327 characters to themselves.
15328
15329 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
15330 that the epilogue has a proper #line.
15331
15332 * src/parse-gram.y: Handle precedence/associativity.
15333
15334 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
15335 a terminal.
15336 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
15337 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
15338 at all to define terminals that cannot be emitted.
15339
15340 * src/scan-gram.l: Escape M4 characters.
15341
15342 * src/scan-gram.l: Working properly with escapes in user
15343 strings/characters.
15344
15345 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
15346 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
15347 grammar.
15348 Use more modest sizes, as for the time being the parser does not
15349 release memory, and therefore the process swallows a huge amount
15350 of memory.
15351
15352 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
15353 stricter %token grammar.
15354
15355 * src/symtab.h (associativity): Add `undef_assoc'.
15356 (symbol_precedence_set): Do nothing when passed an undef_assoc.
15357 * src/symtab.c (symbol_check_alias_consistence): Adjust.
15358
15359 * tests/regression.at (Invalid %directive): Remove, as it is now
15360 meaningless.
15361 (Invalid inputs): Adjust to the new error messages.
15362 (Token definitions): The new grammar doesn't allow too many
15363 eccentricities.
15364
15365 * src/lex.h, src/lex.c: Remove.
15366 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
15367 (copy_character, copy_string2, copy_string, copy_identifier)
15368 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
15369 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
15370 (parse_action): Remove.
15371 * po/POTFILES.in: Adjust.
15372
15373 2002-06-11 Akim Demaille <akim@epita.fr>
15374
15375 * src/reader.c (parse_action): Don't store directly into the
15376 rule's action member: return the action as a string.
15377 Don't require `rule_length' as an argument: compute it.
15378 (grammar_current_rule_symbol_append)
15379 (grammar_current_rule_action_append): New, eved out from
15380 (readgram): here.
15381 Remove `action_flag', `rulelength', unused now.
15382
15383 2002-06-11 Akim Demaille <akim@epita.fr>
15384
15385 * src/reader.c (grammar_current_rule_prec_set).
15386 (grammar_current_rule_check): New, eved out from...
15387 (readgram): here.
15388 Remove `xaction', `first_rhs': useless.
15389 * tests/input.at (Type clashes): New.
15390 * tests/existing.at (GNU Cim Grammar): Adjust.
15391
15392 2002-06-11 Akim Demaille <akim@epita.fr>
15393
15394 * src/reader.c (grammar_midrule_action): New, Eved out from
15395 (readgram): here.
15396
15397 2002-06-11 Akim Demaille <akim@epita.fr>
15398
15399 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
15400 New.
15401 (readgram): Use them as replacement of inlined code, crule and
15402 crule1.
15403
15404 2002-06-11 Akim Demaille <akim@epita.fr>
15405
15406 * src/reader.c (grammar_end, grammar_symbol_append): New.
15407 (readgram): Use them.
15408 Make the use of `p' as local as possible.
15409
15410 2002-06-10 Akim Demaille <akim@epita.fr>
15411
15412 GCJ's parser requires the tokens to be defined before the prologue.
15413
15414 * data/bison.simple: Output the token definition before the user's
15415 prologue.
15416 * tests/regression.at (Braces parsing, Duplicate string)
15417 (Mixing %token styles): Check the output from bison.
15418 (Early token definitions): New.
15419
15420 2002-06-10 Akim Demaille <akim@epita.fr>
15421
15422 * src/symtab.c (symbol_user_token_number_set): Don't complain when
15423 assigning twice the same user number to a token, so that we can
15424 use it in...
15425 * src/lex.c (lex): here.
15426 Also use `symbol_class_set' instead of hand written code.
15427 * src/reader.c (parse_assoc_decl): Likewise.
15428
15429 2002-06-10 Akim Demaille <akim@epita.fr>
15430
15431 * src/symtab.c, src/symtab.c (symbol_class_set)
15432 (symbol_user_token_number_set): New.
15433 * src/reader.c (parse_token_decl): Use them.
15434 Use a switch instead of ifs.
15435 Use a single argument.
15436
15437 2002-06-10 Akim Demaille <akim@epita.fr>
15438
15439 Remove `%thong' support as it is undocumented, unused, duplicates
15440 `%token's job, and creates useless e-mail traffic with people who
15441 want to know what it is, why it is undocumented, unused, and
15442 duplicates `%token's job.
15443
15444 * src/reader.c (parse_thong_decl): Remove.
15445 * src/options.c (option_table): Remove "thong".
15446 * src/lex.h (tok_thong): Remove.
15447
15448 2002-06-10 Akim Demaille <akim@epita.fr>
15449
15450 * src/symtab.c, src/symtab.c (symbol_type_set)
15451 (symbol_precedence_set): New.
15452 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
15453 (value_components_used): Remove, unused.
15454
15455 2002-06-09 Akim Demaille <akim@epita.fr>
15456
15457 Move symbols handling code out of the reader.
15458
15459 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
15460 (axiom): Move to...
15461 * src/symtab.h, src/symtab.c: here.
15462
15463 * src/gram.c (start_symbol): Remove: use startsymbol->number.
15464 * src/reader.c (startval): Rename as...
15465 * src/symtab.h, src/symtab.c (startsymbol): this.
15466 * src/reader.c: Adjust.
15467
15468 * src/reader.c (symbol_check_defined, symbol_make_alias)
15469 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15470 (token_translations_init)
15471 Move to...
15472 * src/symtab.c: here.
15473 * src/reader.c (packsymbols): Move to...
15474 * src/symtab.h, src/symtab.c (symbols_pack): here.
15475 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
15476 argument.
15477
15478 2002-06-03 Akim Demaille <akim@epita.fr>
15479
15480 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
15481 then statements.
15482
15483 2002-06-03 Akim Demaille <akim@epita.fr>
15484
15485 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
15486 structs with non literals.
15487 * src/scan-skel.l: never-interactive.
15488 * src/conflicts.c (enum conflict_resolution_e): No trailing
15489 comma.
15490 * src/getargs.c (usage): Split long literal strings.
15491 Reported by Hans Aberg.
15492
15493 2002-05-28 Akim Demaille <akim@epita.fr>
15494
15495 * data/bison.c++: Use C++ ostreams.
15496 (cdebug_): New member.
15497
15498 2002-05-28 Akim Demaille <akim@epita.fr>
15499
15500 * src/output.c (output_skeleton): Be sure to allocate enough room
15501 for `/' _and_ for `\0' in full_skeleton.
15502
15503 2002-05-28 Akim Demaille <akim@epita.fr>
15504
15505 * data/bison.c++: Catch up with bison.simple:
15506 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15507 and Paul Eggert <eggert@twinsun.com>: `error' handing.
15508 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
15509 and popping traces.
15510
15511 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15512
15513 * src/output.c (output_skeleton): Put an explicit path in front of
15514 the skeleton file name, rather than relying on the -I directory,
15515 to partially alleviate effects of having a skeleton file lying around
15516 in the current directory.
15517
15518 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15519
15520 * src/conflicts.c (log_resolution): Correct typo:
15521 obstack_printf should be obstack_fgrow1.
15522
15523 2002-05-26 Akim Demaille <akim@epita.fr>
15524
15525 * src/state.h (state_t): `solved_conflicts' is a new member.
15526 * src/LR0.c (new_state): Set it to 0.
15527 * src/conflicts.h, src/conflicts.c (print_conflicts)
15528 (free_conflicts, solve_conflicts): Rename as...
15529 (conflicts_print, conflicts_free, conflicts_solve): these.
15530 Adjust callers.
15531 * src/conflicts.c (enum conflict_resolution_e)
15532 (solved_conflicts_obstack): New, used by...
15533 (log_resolution): this.
15534 Adjust to attach the conflict resolution to each state.
15535 Complete the description with the precedence/associativity
15536 information.
15537 (resolve_sr_conflict): Adjust.
15538 * src/print.c (print_state): Output its solved_conflicts.
15539 * tests/conflicts.at (Unresolved SR Conflicts)
15540 (Solved SR Conflicts): Exercise --report=all.
15541
15542 2002-05-26 Akim Demaille <akim@epita.fr>
15543
15544 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15545 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15546 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
15547 (token_number_t, item_number_as_token_number)
15548 (token_number_as_item_number, muscle_insert_token_number_table):
15549 Rename as...
15550 (symbol_number_t, item_number_as_symbol_number)
15551 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
15552 these, since it is more appropriate.
15553
15554 2002-05-26 Akim Demaille <akim@epita.fr>
15555
15556 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
15557 `Error:' lines.
15558 * data/bison.simple (yystos) [YYDEBUG]: New.
15559 (yyparse) [YYDEBUG]: Display the symbols which are popped during
15560 error recovery.
15561 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
15562
15563 2002-05-25 Akim Demaille <akim@epita.fr>
15564
15565 * doc/bison.texinfo (Debugging): Split into...
15566 (Tracing): this new section, its former contents, and...
15567 (Understanding): this new section.
15568 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
15569 by...
15570 (report_flag): this.
15571 Adjust all dependencies.
15572 (report_args, report_types, report_argmatch): New.
15573 (usage, getargs): Report/support -r, --report.
15574 * src/options.h
15575 (struct option_table_struct): Rename as..,
15576 (struct option_table_s): this.
15577 Rename the `set_flag' member to `flag' to match with getopt_long's
15578 struct.
15579 * src/options.c (option_table): Split verbose into an entry for
15580 %verbose, and another for --verbose.
15581 Support --report/-r, so remove -r from the obsolete --raw.
15582 * src/print.c: Attach full item sets and lookaheads reports to
15583 report_flag instead of trace_flag.
15584 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
15585
15586 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15587 and Paul Eggert <eggert@twinsun.com>
15588
15589 * data/bison.simple (yyparse): Correct error handling to conform to
15590 POSIX and yacc. Specifically, after syntax error is discovered,
15591 do not reduce further before shifting the error token.
15592 Clean up the code a bit by removing the labels yyerrdefault,
15593 yyerrhandle, yyerrpop.
15594 * NEWS: Document the above.
15595
15596 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15597
15598 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
15599 type; it isn't always big enough, since it doesn't necessarily
15600 include non-terminals.
15601 (yytranslate): Expand definition of yy_token_number_type, so that
15602 the latter can be removed.
15603 (yy_token_number_type): Remove, only one use.
15604 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
15605 don't use TokenNumberType as element type.
15606
15607 * tests/regression.at: Modify expected output to agree with change
15608 to yyr1 and yytranslate.
15609
15610 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
15611
15612 * src/reader.c (parse_action): Use copy_character instead of
15613 obstack_1grow.
15614
15615 2002-05-13 Akim Demaille <akim@epita.fr>
15616
15617 * tests/regression.at (Token definitions): Prototype yylex and
15618 yyerror.
15619
15620 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15621
15622 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
15623 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
15624 32-bit arithmetic.
15625 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
15626
15627 2002-05-07 Akim Demaille <akim@epita.fr>
15628
15629 * tests/synclines.at: Be sure to prototype yylex and yyerror to
15630 avoid GCC warnings.
15631
15632 2002-05-07 Akim Demaille <akim@epita.fr>
15633
15634 Kill GCC warnings.
15635
15636 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
15637 over the RHS of each rule.
15638 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
15639 * src/state.h (state_t): Member `nitems' is unsigned short.
15640 * src/LR0.c (get_state): Adjust.
15641 * src/reader.c (packgram): Likewise.
15642 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
15643 `Type'.
15644 (muscle_insert_int_table): Remove, unused.
15645 (prepare_rules): Remove `max'.
15646
15647 2002-05-06 Akim Demaille <akim@epita.fr>
15648
15649 * src/closure.c (print_firsts): Display of the symbol tags.
15650 (bitmatrix_print): Move to...
15651 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
15652 here.
15653 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
15654
15655 2002-05-06 Akim Demaille <akim@epita.fr>
15656
15657 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
15658 hash_do_for_each.
15659
15660 2002-05-06 Akim Demaille <akim@epita.fr>
15661
15662 * src/LR0.c (new_state, get_state): Instead of using the global
15663 `kernel_size' and `kernel_base', have two new arguments:
15664 `core_size' and `core'.
15665 Adjust callers.
15666
15667 2002-05-06 Akim Demaille <akim@epita.fr>
15668
15669 * src/reader.c (packgram): No longer end `ritem' with a 0
15670 sentinel: it is not used.
15671
15672 2002-05-05 Akim Demaille <akim@epita.fr>
15673
15674 New experimental feature: display the lookaheads in the report and
15675 graph.
15676
15677 * src/print (print_core): When --trace-flag, display the rules
15678 lookaheads.
15679 * src/print_graph.c (print_core): Likewise.
15680 Swap the arguments.
15681 Adjust caller.
15682
15683 2002-05-05 Akim Demaille <akim@epita.fr>
15684
15685 * tests/torture.at (Many lookaheads): New test.
15686
15687 2002-05-05 Akim Demaille <akim@epita.fr>
15688
15689 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
15690 (GENERATE_MUSCLE_INSERT_TABLE): this.
15691 (output_int_table, output_unsigned_int_table, output_short_table)
15692 (output_token_number_table, output_item_number_table): Replace with...
15693 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
15694 (muscle_insert_short_table, muscle_insert_token_number_table)
15695 (muscle_insert_item_number_table): these.
15696 Adjust all callers.
15697 (prepare_tokens): Don't free `translations', since...
15698 * src/reader.h, src/reader.c (grammar_free): do it.
15699 Move to...
15700 * src/gram.h, src/gram.c (grammar_free): here.
15701 * data/bison.simple, data/bison.c++: b4_token_number_max is now
15702 b4_translate_max.
15703
15704 2002-05-05 Akim Demaille <akim@epita.fr>
15705
15706 * src/output.c (output_unsigned_int_table): New.
15707 (prepare_rules): `i' is unsigned.
15708 `prhs', `rline', `r2' are unsigned int.
15709 Rename muscle `rhs_number_max' as `rhs_max'.
15710 Output muscles `prhs_max', `rline_max', and `r2_max'.
15711 Free rline and r1.
15712 * data/bison.simple, data/bison.c++: Adjust to use these muscles
15713 to compute types instead of constant types.
15714 * tests/regression.at (Web2c Actions): Adjust.
15715
15716 2002-05-04 Akim Demaille <akim@epita.fr>
15717
15718 * src/symtab.h (SALIAS, SUNDEF): Rename as...
15719 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
15720 Adjust dependencies.
15721 * src/output.c (token_definitions_output): Be sure not to output a
15722 `#define 'a'' when fed with `%token 'a' "a"'.
15723 * tests/regression.at (Token definitions): New.
15724
15725 2002-05-03 Paul Eggert <eggert@twinsun.com>
15726
15727 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
15728 for K&R C.
15729
15730 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
15731
15732 * Makefile.am (SUBDIRS): Remove intl.
15733 (EXTRA_DIST): Add config/config.rpath.
15734
15735 2002-05-03 Akim Demaille <akim@epita.fr>
15736
15737 * data/bison.simple (m4_if): Don't output empty enums.
15738 And actually, output valid enum definitions :(.
15739
15740 2002-05-03 Akim Demaille <akim@epita.fr>
15741
15742 * configure.bat: Remove, completely obsolete.
15743 * Makefile.am (EXTRA_DIST): Adjust.
15744 Don't distribute config.rpath...
15745 * config/Makefile.am (EXTRA_DIST): Do it.
15746
15747 2002-05-03 Akim Demaille <akim@epita.fr>
15748
15749 * configure.in (GETTEXT_VERSION): New.
15750 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
15751
15752 2002-05-03 Akim Demaille <akim@epita.fr>
15753
15754 * data/bison.simple (b4_token_enum): New.
15755 (b4_token_defines): Use it to output tokens both as #define and
15756 enums.
15757 Suggested by Paul Eggert.
15758 * src/output.c (token_definitions_output): Don't output spurious
15759 white spaces.
15760
15761 2002-05-03 Akim Demaille <akim@epita.fr>
15762
15763 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15764
15765 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
15766
15767 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
15768 Update the stack class, give a try to deque as the default container.
15769
15770 2002-05-02 Akim Demaille <akim@epita.fr>
15771
15772 * data/bison.simple (yyparse): Do not implement @$ = @1.
15773 (YYLLOC_DEFAULT): Adjust to do it.
15774 * doc/bison.texinfo (Location Default Action): Fix.
15775
15776 2002-05-02 Akim Demaille <akim@epita.fr>
15777
15778 * src/reader.c (parse_braces): Merge into...
15779 (parse_action): this.
15780
15781 2002-05-02 Akim Demaille <akim@epita.fr>
15782
15783 * configure.in (ALL_LINGUAS): Remove.
15784 * po/LINGUAS, hr.po: New.
15785
15786 2002-05-02 Akim Demaille <akim@epita.fr>
15787
15788 Remove the so called hairy (semantic) parsers.
15789
15790 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
15791 * src/gram.h, src/gram.c (semantic_parser): Remove.
15792 (rule_t): Remove the guard and guard_line members.
15793 * src/lex.h (token_t): remove tok_guard.
15794 * src/options.c (option_table): Remove %guard and %semantic_parser
15795 support.
15796 * src/output.c, src/output.h (guards_output): Remove.
15797 (prepare): Adjust.
15798 (token_definitions_output): Don't output the `T'
15799 tokens (???).
15800 (output_skeleton): Don't output the guards.
15801 * src/files.c, src/files.c (attrsfile): Remove.
15802 * src/reader.c (symbol_list): Remove the guard and guard_line
15803 members.
15804 Adjust dependencies.
15805 (parse_guard): Remove.
15806 * data/bison.hairy: Remove.
15807 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15808 BISON_HAIRY.
15809
15810 2002-05-02 Akim Demaille <akim@epita.fr>
15811
15812 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15813 (parse_guard): Rename the formal argument `stack_offset' as
15814 `rule_length', which is more readable.
15815 Adjust callers.
15816 (copy_at, copy_dollar): Instead of outputting the hard coded
15817 values of $$, $n and so forth, output invocation to b4_lhs_value,
15818 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
15819 Note: this patch partially drops `semantic-parser' support: it
15820 always does `rule_length - n', where semantic parsers ought to
15821 always use `-n'.
15822 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15823 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15824
15825 2002-05-02 Akim Demaille <akim@epita.fr>
15826
15827 * configure.in (AC_INIT): Bump to 1.49b.
15828 (AM_INIT_AUTOMAKE): Short invocation.
15829
15830 2002-05-02 Akim Demaille <akim@epita.fr>
15831
15832 Version 1.49a.
15833
15834 2002-05-01 Akim Demaille <akim@epita.fr>
15835
15836 * src/skeleton.h: Remove.
15837
15838 2002-05-01 Akim Demaille <akim@epita.fr>
15839
15840 * src/skeleton.h: Fix the #endif.
15841 Reported by Magnus Fromreide.
15842
15843 2002-04-26 Paul Eggert <eggert@twinsun.com>
15844
15845 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15846 Define if we define YYSTYPE and YYLTYPE, respectively.
15847 (YYCOPY): Fix [] quoting problem in the non-GCC case.
15848
15849 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
15850
15851 * src/scan-skel.l: Postprocess quadrigraphs.
15852
15853 * src/reader.c (copy_character): New function, used to output
15854 single characters while replacing `[' and `]' with quadrigraphs, to
15855 avoid troubles with M4 quotes.
15856 (copy_comment): Output characters with copy_character.
15857 (read_additionnal_code): Likewise.
15858 (copy_string2): Likewise.
15859 (copy_definition): Likewise.
15860
15861 * tests/calc.at: Exercise M4 quoting.
15862
15863 2002-04-25 Akim Demaille <akim@epita.fr>
15864
15865 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15866 between `!' and the command.
15867 Reported by Paul Eggert.
15868
15869 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
15870
15871 * tests/calc.at: Exercise prologue splitting.
15872
15873 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15874 `b4_post_prologue' instead of `b4_prologue'.
15875
15876 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15877 muscles.
15878 (output): Free pre_prologue_obstack and post_prologue_obstack.
15879 * src/files.h, src/files.c (attrs_obstack): Remove.
15880 (pre_prologue_obstack, post_prologue_obstack): New.
15881 * src/reader.c (copy_definition): Add a parameter to specify the
15882 obstack to fill, instead of using attrs_obstack unconditionally.
15883 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15884 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15885
15886 2002-04-23 Paul Eggert <eggert@twinsun.com>
15887
15888 * data/bison.simple: Remove unnecessary commentary and white
15889 space differences from 1_29-branch.
15890 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15891
15892 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15893 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15894 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15895 constructors or destructors.
15896
15897 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15898
15899 2002-04-23 Akim Demaille <akim@epita.fr>
15900
15901 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15902 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15903 location with columns.
15904 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15905 All reported by Paul Eggert.
15906
15907 2002-04-22 Akim Demaille <akim@epita.fr>
15908
15909 * src/reduce.c (dump_grammar): Move to...
15910 * src/gram.h, src/gram.c (grammar_dump): here.
15911 Be sure to separate long item numbers.
15912 Don't read the members of a rule's prec if its nil.
15913
15914 2002-04-22 Akim Demaille <akim@epita.fr>
15915
15916 * src/output.c (table_size, table_grow): New.
15917 (MAXTABLE): Remove, replace uses with table_size.
15918 (pack_vector): Instead of dying when the table is too big, grow it.
15919
15920 2002-04-22 Akim Demaille <akim@epita.fr>
15921
15922 * data/bison.simple (yyr1): Its type is that of a token number.
15923 * data/bison.c++ (r1_): Likewise.
15924 * tests/regression.at (Web2c Actions): Adjust.
15925
15926 2002-04-22 Akim Demaille <akim@epita.fr>
15927
15928 * src/reader.c (token_translations_init): 256 is now the default
15929 value for the error token, i.e., it will be assigned another
15930 number if the user assigned 256 to one of her tokens.
15931 (reader): Don't force 256 to error.
15932 * doc/bison.texinfo (Symbols): Adjust.
15933 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15934 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15935 etc. instead of 10, 20, 30 (which was used to `jump' over error
15936 (256) and undefined (2)).
15937
15938 2002-04-22 Akim Demaille <akim@epita.fr>
15939
15940 Propagate more token_number_t.
15941
15942 * src/gram.h (token_number_as_item_number)
15943 (item_number_as_token_number): New.
15944 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15945 Use it to create output_item_number_table and
15946 output_token_number_table.
15947 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15948 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15949 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15950 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15951
15952 2002-04-22 Akim Demaille <akim@epita.fr>
15953
15954 * src/output.h, src/output.c (get_lines_number): Remove.
15955
15956 2002-04-19 Akim Demaille <akim@epita.fr>
15957
15958 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15959 as Lex/Flex'.
15960 (Debugging): More details about enabling the debugging features.
15961 (Table of Symbols): Describe $$, $n, @$, and @n.
15962 Suggested by Tim Josling.
15963
15964 2002-04-19 Akim Demaille <akim@epita.fr>
15965
15966 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15967
15968 2002-04-10 Akim Demaille <akim@epita.fr>
15969
15970 * src/system.h: Rely on HAVE_LIMITS_H.
15971 Suggested by Paul Eggert.
15972
15973 2002-04-09 Akim Demaille <akim@epita.fr>
15974
15975 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15976 full stderr, and strip it according to the bison options, instead
15977 of composing the error message from different bits.
15978 This makes it easier to check for several error messages.
15979 Adjust all the invocations.
15980 Add an invocation exercising the error token.
15981 Add an invocation demonstrating a stupid error message.
15982 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15983 Adjust the tests.
15984 Error message are for stderr, not stdout.
15985
15986 2002-04-09 Akim Demaille <akim@epita.fr>
15987
15988 * src/gram.h, src/gram.c (error_token_number): Remove, use
15989 errtoken->number.
15990 * src/reader.c (reader): Don't specify the user token number (2)
15991 for $undefined, as it uselessly prevents using it.
15992 * src/gram.h (token_number_t): Move to...
15993 * src/symtab.h: here.
15994 (state_t.number): Is a token_number_t.
15995 * src/print.c, src/reader.c: Use undeftoken->number instead of
15996 hard coded 2.
15997 (Even though this 2 is not the same as above: the number of the
15998 undeftoken remains being 2, it is its user token number which
15999 might not be 2).
16000 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16001 `user_token_number_max'.
16002 Output `undef_token_number'.
16003 * data/bison.simple, data/bison.c++: Use them.
16004 Be sure to map invalid yylex return values to
16005 `undef_token_number'. This saves us from gratuitous SEGV.
16006
16007 * tests/conflicts.at (Solved SR Conflicts)
16008 (Unresolved SR Conflicts): Adjust.
16009 * tests/regression.at (Web2c Actions): Adjust.
16010
16011 2002-04-08 Akim Demaille <akim@epita.fr>
16012
16013 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
16014 Adding #line.
16015 Remove the duplicate `typedefs'.
16016 (RhsNumberType): Fix the declaration and various other typos.
16017 Use __ofile__.
16018 * data/bison.simple: Use __ofile__.
16019 * src/scan-skel.l: Handle __ofile__.
16020
16021 2002-04-08 Akim Demaille <akim@epita.fr>
16022
16023 * src/gram.h (item_number_t): New, the type of item numbers in
16024 RITEM. Note that it must be able to code symbol numbers as
16025 positive number, and the negation of rule numbers as negative
16026 numbers.
16027 Adjust all dependencies (pretty many).
16028 * src/reduce.c (rule): Remove this `short *' pointer: use
16029 item_number_t.
16030 * src/system.h (MINSHORT, MAXSHORT): Remove.
16031 Include `limits.h'.
16032 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
16033 (shortcpy): Remove.
16034 (MAXTABLE): Move to...
16035 * src/output.c (MAXTABLE): here.
16036 (prepare_rules): Use output_int_table to output rhs.
16037 * data/bison.simple, data/bison.c++: Adjust.
16038 * tests/torture.at (Big triangle): Move the limit from 254 to
16039 500.
16040 * tests/regression.at (Web2c Actions): Ajust.
16041
16042 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
16043 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
16044 passes, but produces negative #line number, once fixed, GCC is
16045 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
16046 C), it passes.
16047 * src/state.h (state_h): Code input lines on ints, not shorts.
16048
16049 2002-04-08 Akim Demaille <akim@epita.fr>
16050
16051 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
16052 and then the grammar.
16053
16054 2002-04-08 Akim Demaille <akim@epita.fr>
16055
16056 * src/system.h: No longer using strndup.
16057
16058 2002-04-07 Akim Demaille <akim@epita.fr>
16059
16060 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
16061 * src/output.c (output_table_data): Return the longest number.
16062 (prepare_tokens): Output `token_number_max').
16063 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
16064 New.
16065 Use them to define yy_token_number_type/TokenNumberType.
16066 Use this type for yytranslate.
16067 * tests/torture.at (Big triangle): Push the limit from 124 to
16068 253.
16069 * tests/regression.at (Web2c Actions): Adjust.
16070
16071 2002-04-07 Akim Demaille <akim@epita.fr>
16072
16073 * tests/torture.at (Big triangle): New.
16074 (GNU AWK Grammar, GNU Cim Grammar): Move to...
16075 * tests/existing.at: here.
16076
16077 2002-04-07 Akim Demaille <akim@epita.fr>
16078
16079 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
16080 nritems.
16081 Adjust dependencies.
16082
16083 2002-04-07 Akim Demaille <akim@epita.fr>
16084
16085 * src/reader.c: Normalize increments to prefix form.
16086
16087 2002-04-07 Akim Demaille <akim@epita.fr>
16088
16089 * src/reader.c, symtab.c: Remove debugging code.
16090
16091 2002-04-07 Akim Demaille <akim@epita.fr>
16092
16093 Rename all the `bucket's as `symbol_t'.
16094
16095 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
16096 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
16097 * src/symtab.c, src/symtab.h (bucket): Rename as...
16098 (symbol_t): this.
16099 (symbol_list_new, bucket_check_defined, bucket_make_alias)
16100 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
16101 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16102 (buckets_new, buckets_free, buckets_do): Rename as...
16103 (symbol_list_new, symbol_check_defined, symbol_make_alias)
16104 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16105 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
16106 (symbols_new, symbols_free, symbols_do): these.
16107
16108 2002-04-07 Akim Demaille <akim@epita.fr>
16109
16110 Use lib/hash for the symbol table.
16111
16112 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
16113 EOF.
16114 * src/lex.c (lex): Set the `number' member of new terminals.
16115 * src/reader.c (bucket_check_defined, bucket_make_alias)
16116 (bucket_check_alias_consistence, bucket_translation): New.
16117 (reader, grammar_free, readgram, token_translations_init)
16118 (packsymbols): Adjust.
16119 (reader): Number the predefined tokens.
16120 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
16121 for predefined tokens.
16122 * src/symtab.h (bucket): Remove all the hash table related
16123 members.
16124 * src/symtab.c (symtab): Replace by...
16125 (bucket_table): this.
16126 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
16127 (buckets_new, buckets_do): New.
16128
16129 2002-04-07 Akim Demaille <akim@epita.fr>
16130
16131 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
16132 (start_symbol, max_user_token_number, semantic_parser)
16133 (error_token_number): Initialize.
16134 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
16135 Initialize.
16136 (reader): Don't.
16137 (errtoken, eoftoken, undeftoken, axiom): Extern.
16138
16139 2002-04-07 Akim Demaille <akim@epita.fr>
16140
16141 * src/gram.h (rule_s): prec and precsym are now pointers
16142 to the bucket giving the priority/associativity.
16143 Member `associativity' removed: useless.
16144 * src/reduce.c, src/conflicts.c: Adjust.
16145
16146 2002-04-07 Akim Demaille <akim@epita.fr>
16147
16148 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
16149 Properly escape the symbols' TAG when outputting them.
16150
16151 2002-04-07 Akim Demaille <akim@epita.fr>
16152
16153 * src/lalr.h (LA): Is a bitsetv, not bitset*.
16154
16155 2002-04-07 Akim Demaille <akim@epita.fr>
16156
16157 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
16158 (LArule): this, which is an array to rule_t*.
16159 * src/print.c, src/conflicts.c: Adjust.
16160
16161 2002-04-07 Akim Demaille <akim@epita.fr>
16162
16163 * src/gram.h (rule_t): Rename `number' as `user_number'.
16164 `number' is a new member.
16165 Adjust dependencies.
16166 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
16167
16168 2002-04-07 Akim Demaille <akim@epita.fr>
16169
16170 As a result of the previous patch, it is no longer needed
16171 to reorder ritem itself.
16172
16173 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
16174
16175 2002-04-07 Akim Demaille <akim@epita.fr>
16176
16177 Be sure never to walk through RITEMS, but use only data related to
16178 the rules themselves. RITEMS should be banished.
16179
16180 * src/output.c (output_token_translations): Rename as...
16181 (prepare_tokens): this.
16182 In addition to `translate', prepare the muscles `tname' and
16183 `toknum', which were handled by...
16184 (output_rule_data): this.
16185 Remove, and move the remainder of its outputs into...
16186 (prepare_rules): this new routines, which also merges content from
16187 (output_gram): this.
16188 (prepare_rules): Be sure never to walk through RITEMS.
16189 (output_stos): Rename as...
16190 (prepare_stos): this.
16191 (output): Always invoke prepare_states, after all, just don't use it
16192 in the output if you don't need it.
16193
16194 2002-04-07 Akim Demaille <akim@epita.fr>
16195
16196 * src/LR0.c (new_state): Display `nstates' as the name of the
16197 newly created state.
16198 Adjust to initialize first_state and last_state if needed.
16199 Be sure to distinguish the initial from the final state.
16200 (new_states): Create the itemset of the initial state, and use
16201 new_state.
16202 * src/closure.c (closure): Now that the initial state has its
16203 items properly set, there is no need for a special case when
16204 creating `ruleset'.
16205
16206 As a result, now the rule 0, reducing to $axiom, is visible in the
16207 outputs. Adjust the test suite.
16208
16209 * tests/conflicts.at (Solved SR Conflicts)
16210 (Unresolved SR Conflicts): Adjust.
16211 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
16212 * tests/conflicts.at (S/R in initial): New.
16213
16214 2002-04-07 Akim Demaille <akim@epita.fr>
16215
16216 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
16217 the RHS of the rules.
16218 * src/output.c (output_gram): Likewise.
16219
16220 2002-04-07 Akim Demaille <akim@epita.fr>
16221
16222 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
16223 bucket.
16224 Adjust all dependencies.
16225 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
16226 `number' of the buckets too.
16227 * src/gram.h: Include `symtab.h'.
16228 (associativity): Move to...
16229 * src/symtab.h: here.
16230 No longer include `gram.h'.
16231
16232 2002-04-07 Akim Demaille <akim@epita.fr>
16233
16234 * src/gram.h, src/gram.c (rules_rhs_length): New.
16235 (ritem_longest_rhs): Use it.
16236 * src/gram.h (rule_t): `number' is a new member.
16237 * src/reader.c (packgram): Set it.
16238 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
16239 the end of `rules', and count them out of `nrules'.
16240 (reduce_output, dump_grammar): Adjust.
16241 * src/print.c (print_grammar): It is no longer needed to check for
16242 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
16243 * tests/reduce.at (Reduced Automaton): New test.
16244
16245 2002-04-07 Akim Demaille <akim@epita.fr>
16246
16247 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
16248 lacking `+ 1' to nrules, Bison reported as useless a token if it
16249 was used solely to set the precedence of the last rule...
16250
16251 2002-04-07 Akim Demaille <akim@epita.fr>
16252
16253 * data/bison.c++, data/bison.simple: Don't output the current file
16254 name in #line, to avoid useless diffs between two identical
16255 outputs under different names.
16256
16257 2002-04-07 Akim Demaille <akim@epita.fr>
16258
16259 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16260 Normalize loops to using `< nrules + 1', not `<= nrules'.
16261
16262 2002-04-07 Akim Demaille <akim@epita.fr>
16263
16264 * TODO: Update.
16265
16266 2002-04-07 Akim Demaille <akim@epita.fr>
16267
16268 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
16269 bucket.value as bucket.number.
16270
16271 2002-04-07 Akim Demaille <akim@epita.fr>
16272
16273 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
16274 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16275 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
16276 RHS, instead of being an index in RITEMS.
16277
16278 2002-04-04 Paul Eggert <eggert@twinsun.com>
16279
16280 * doc/bison.texinfo: Update copyright date.
16281 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
16282 (Symbols): Warn about running Bison in one character set,
16283 but compiling and/or running in an incompatible one.
16284 Warn about character code 256, too.
16285
16286 2002-04-03 Paul Eggert <eggert@twinsun.com>
16287
16288 * src/bison.data (YYSTACK_ALLOC): Depend on whether
16289 YYERROR_VERBOSE is nonzero, not whether it is defined.
16290
16291 Merge changes from bison-1_29-branch.
16292
16293 2002-03-20 Paul Eggert <eggert@twinsun.com>
16294
16295 Merge fixes from Debian bison_1.34-1.diff.
16296
16297 * configure.in (AC_PREREQ): 2.53.
16298
16299 2002-03-20 Akim Demaille <akim@epita.fr>
16300
16301 * src/conflicts.c (log_resolution): Argument `resolution' is const.
16302
16303 2002-03-19 Paul Eggert <eggert@twinsun.com>
16304
16305 * src/bison.simple (YYCOPY): New macro.
16306 (YYSTACK_RELOCATE): Use it.
16307 Remove Type arg; no longer needed. All callers changed.
16308 (yymemcpy): Remove; no longer needed.
16309
16310 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
16311 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16312
16313 2002-03-19 Akim Demaille <akim@epita.fr>
16314
16315 Test and fix the #line outputs.
16316
16317 * tests/atlocal.at (GCC): New.
16318 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
16319 (Prologue synch line, %union synch line, Postprologue synch line)
16320 (Action synch line, Epilogue synch line): New tests.
16321 * src/reader.c (parse_union_decl): Define the muscle stype_line.
16322 * data/bison.simple, data/bison.c++: Use it.
16323
16324 2002-03-19 Akim Demaille <akim@epita.fr>
16325
16326 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
16327 (Solved SR Conflicts, %expect not enough, %expect right)
16328 (%expect too much): Move to...
16329 * tests/conflicts.at: this new file.
16330
16331 2002-03-19 Akim Demaille <akim@epita.fr>
16332
16333 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16334 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
16335 that we can move to enums for instance.
16336 * src/output.c (token_definitions_output): Output a list of
16337 `token-name, token-number' instead of the #define.
16338 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16339
16340 2002-03-14 Akim Demaille <akim@epita.fr>
16341
16342 Use Gettext 0.11.1.
16343
16344 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
16345
16346 * data/bison.c++: Make the user able to add members to the generated
16347 parser by subclassing.
16348
16349 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
16350
16351 * src/reader.c (read_additionnal_code): `c' should be an integer, not
16352 a character.
16353 Reported by Nicolas Tisserand and Nicolas Burrus.
16354
16355 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16356
16357 * src/reader.c: Warn about lacking semi-colons, do not complain.
16358
16359 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16360
16361 * data/bison.c++: Remove a debug line.
16362
16363 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
16364
16365 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
16366 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
16367 provide a default implementation.
16368
16369 2002-03-04 Akim Demaille <akim@epita.fr>
16370
16371 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
16372 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
16373 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
16374 * tests/semantic.at (Parsing Guards): Similarly.
16375 * src/reader.at (readgram): Complain if the last rule is not ended
16376 with a semi-colon.
16377
16378 2002-03-04 Akim Demaille <akim@epita.fr>
16379
16380 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
16381 * src/closure.c: here.
16382 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
16383 RTC.
16384 * src/warshall.h, src/warshall.c: Remove.
16385 * tests/sets.at (Broken Closure): Adjust.
16386
16387 2002-03-04 Akim Demaille <akim@epita.fr>
16388
16389 * src/output.c (output_skeleton): tempdir is const.
16390 bytes_read is unused.
16391
16392 2002-03-04 Akim Demaille <akim@epita.fr>
16393
16394 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16395 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
16396 Update.
16397 From Michael Hayes.
16398
16399 2002-03-04 Akim Demaille <akim@epita.fr>
16400
16401 * src/closure.c (closure): `r' is unused.
16402
16403 2002-03-04 Akim Demaille <akim@epita.fr>
16404
16405 * tests/sets.at (Broken Closure): Add the ending `;'.
16406 * src/reader.at (readgram): Complain if a rule is not ended with a
16407 semi-colon.
16408
16409 2002-03-04 Akim Demaille <akim@epita.fr>
16410
16411 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
16412 (count_sr_conflicts): Use bitset_count.
16413 * src/reduce.c (inaccessable_symbols): Ditto.
16414 (bits_size): Remove.
16415 * src/warshall.h, src/warshall.c: Convert to bitsetv.
16416
16417 2002-03-04 Akim Demaille <akim@epita.fr>
16418
16419 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
16420 * src/reduce.c: Remove the `bitset_zero's following the
16421 `bitset_create's, as now it is performed by the latter.
16422
16423 2002-03-04 Akim Demaille <akim@epita.fr>
16424
16425 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
16426 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
16427 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
16428 latest sources from Michael.
16429
16430 2002-03-04 Akim Demaille <akim@epita.fr>
16431
16432 * src/output.c (output): Don't free the grammar.
16433 * src/reader.c (grammar_free): New.
16434 * src/main.c (main): Call it and don't free symtab here.
16435
16436 2002-03-04 Akim Demaille <akim@epita.fr>
16437
16438 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
16439 before returning.
16440 Reported by Benoit Perrot.
16441
16442 2002-03-04 Akim Demaille <akim@epita.fr>
16443
16444 Use bitset operations when possible, not loops over bits.
16445
16446 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
16447 bitset_or.
16448 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
16449 * src/reduce.c (useless_nonterminals): Formatting changes.
16450 * src/warshall.c (TC): Use bitset_or.
16451
16452 2002-03-04 Akim Demaille <akim@epita.fr>
16453
16454 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
16455 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
16456 Ditto.
16457
16458 2002-03-04 Akim Demaille <akim@epita.fr>
16459
16460 * src/lalr.c (F): Now a bitset*.
16461 Adjust all dependencies.
16462
16463 2002-03-04 Akim Demaille <akim@epita.fr>
16464
16465 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
16466 Adjust all dependencies.
16467
16468 2002-03-04 Akim Demaille <akim@epita.fr>
16469
16470 * src/L0.c, src/LR0.h (nstates): Be size_t.
16471 Adjust comparisons (signed vs unsigned).
16472 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
16473 bitset*.
16474 Adjust all dependencies.
16475
16476 2002-03-04 Akim Demaille <akim@epita.fr>
16477
16478 * src/closure.c (firsts): Now, also a bitset.
16479 Adjust all dependencies.
16480 (varsetsize): Remove, now unused.
16481 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
16482
16483 2002-03-04 Akim Demaille <akim@epita.fr>
16484
16485 * src/print.c: Convert to use bitset.h, not hand coded iterations
16486 over ints.
16487
16488 2002-03-04 Akim Demaille <akim@epita.fr>
16489
16490 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
16491
16492 2002-03-04 Akim Demaille <akim@epita.fr>
16493
16494 * src/closure.c (ruleset): Be a bitset.
16495 (rulesetsize): Remove.
16496
16497 2002-03-04 Akim Demaille <akim@epita.fr>
16498
16499 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
16500 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
16501 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
16502 * src/closure.c (fderives): Be an array of bitsets.
16503
16504 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
16505
16506 * data/bison.c++: Merge the two generated headers. Insert a copyright
16507 notice in each output file.
16508
16509 2002-02-28 Akim Demaille <akim@epita.fr>
16510
16511 * data/bison.c++: Copy the prologue of bison.simple to fetch
16512 useful M4 definitions, such as b4_header_guard.
16513
16514 2002-02-25 Akim Demaille <akim@epita.fr>
16515
16516 * src/getargs.c (version): Give the name of the authors, and use a
16517 translator friendly scheme for the bgr
16518 copyright notice.
16519
16520 2002-02-25 Akim Demaille <akim@epita.fr>
16521
16522 * src/output.c (header_output): Remove, now handled completely via
16523 M4.
16524
16525 2002-02-25 Akim Demaille <akim@epita.fr>
16526
16527 * m4/m4.m4: New, from CVS Autoconf.
16528 * configure.in: Invoke it.
16529 * src/output.c (output_skeleton): Use its result instead of the
16530 hard coded name.
16531
16532 2002-02-25 Akim Demaille <akim@epita.fr>
16533
16534 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
16535 Fileutils 4.1.5.
16536 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
16537 * src/output.c (output_skeleton): Use mkstemp to create a real
16538 temporary file.
16539 Move the filling of `skeleton' and its muscle to...
16540 (prepare): here.
16541 (output): Move the definition of the prologue muscle to...
16542 (prepare): here.
16543 * src/system.h (DEFAULT_TMPDIR): New.
16544
16545 2002-02-14 Paul Eggert <eggert@twinsun.com>
16546
16547 Remove the support for C++ namespace cleanliness; it was
16548 causing more problems than it was curing, since it didn't work
16549 properly on some nonstandard C++ compilers. This can wait
16550 for a proper C++ parser.
16551
16552 * NEWS: Document this.
16553 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
16554 of C++, as it's treated like C now.
16555 * src/bison.simple (YYSTD): Remove.
16556 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
16557 Treat C++ just like Standard C instead of trying to support
16558 namespace cleanliness.
16559
16560 2002-02-14 Akim Demaille <akim@epita.fr>
16561
16562 * tests/regression.at (else): Adjust to Andreas' change.
16563
16564 2002-02-14 Akim Demaille <akim@epita.fr>
16565
16566 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
16567
16568 2002-02-13 Andreas Schwab <schwab@suse.de>
16569
16570 * src/output.c (output_rule_data): Don't output NULL, it might
16571 not be defined yet.
16572
16573 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
16574
16575 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
16576 (Copyright notice): Update.
16577
16578 2002-02-11 Akim Demaille <akim@epita.fr>
16579
16580 * tests/regression.at (%nonassoc and eof): Don't include
16581 nonportable headers.
16582
16583 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
16584
16585 * data/bison.c++: Correct error recovery. Make the user able to
16586 initialize the starting location.
16587
16588 2002-02-07 Akim Demaille <akim@epita.fr>
16589
16590 * tests/input.at: New.
16591
16592 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16593
16594 * data/bison.c++: Replace some direct m4 expansions by constants. Be
16595 more consistent when naming methods and variables. Put preprocessor
16596 directives around tables only needed for debugging.
16597
16598 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16599
16600 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
16601 C++ parsers.
16602 (yy::b4_name::parse): Use print_.
16603
16604 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16605
16606 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
16607
16608 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
16609
16610 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
16611 C++ parsers.
16612 (yy::b4_name::parse): Build verbose error messages, and use error_.
16613
16614 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16615
16616 * data/bison.c++: Fix m4 quoting in comments.
16617
16618 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
16619
16620 * data/bison.c++: Adjust the parser code. Fix some muscles that were
16621 not expanded by m4.
16622
16623 2002-02-05 Akim Demaille <akim@epita.fr>
16624
16625 * data/bison.c++: Adjust to the M4 back end.
16626 More is certainly needed.
16627
16628 2002-02-05 Akim Demaille <akim@epita.fr>
16629
16630 Give a try to M4 as a back end.
16631
16632 * lib/readpipe.c: New, from wdiff.
16633 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
16634 BISON_HAIRY.
16635 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
16636 specific values. Now it is m4 that performs the lookup.
16637 * src/parse-skel.y: Remove.
16638 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
16639 * src/output.c (actions_output, guards_output)
16640 (token_definitions_output): No longer keeps track of the output
16641 line number, hence remove the second argument.
16642 (guards_output): Check against the guard member of a rule, not the
16643 action member.
16644 Adjust callers.
16645 (output_skeleton): Don't look for the skeleton location, let m4 do
16646 that.
16647 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
16648 file will be used.
16649 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
16650 (prepare): Given that for the time being changesyntax is not
16651 usable in M4, rename the muscles using `-' to `_'.
16652 Define `defines_flag', `output_parser_name' and `output_header_name'.
16653 * src/output.h (actions_output, guards_output)
16654 (token_definitions_output): Adjust prototypes.
16655 * src/scan-skel.l: Instead of scanning the skeletons, it now
16656 processes the output of m4: `__oline__' and `#output'.
16657 * data/bison.simple: Adjust to be used by M4(sugar).
16658 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
16659 to date.
16660 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
16661 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
16662 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
16663 shamelessly stolen from CVS Autoconf.
16664
16665 2002-02-05 Akim Demaille <akim@epita.fr>
16666
16667 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
16668 * configure.in: Check for the declarations of free and malloc.
16669 * src/muscle_tab.c: Adjust.
16670
16671 2002-02-05 Akim Demaille <akim@epita.fr>
16672
16673 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
16674 which have no values.
16675
16676 2002-02-05 Akim Demaille <akim@epita.fr>
16677
16678 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
16679 * data/: here.
16680
16681 2002-01-29 Paul Eggert <eggert@twinsun.com>
16682
16683 * src/bison.simple (YYSIZE_T): Do not define merely because
16684 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
16685 On some platforms, <alloca.h> does not declare YYSTD (size_t).
16686
16687 2002-01-27 Akim Demaille <akim@epita.fr>
16688
16689 Fix `%nonassoc and eof'.
16690
16691 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
16692 which were not properly copied! Replace
16693 memcpy (res->errs, src->errs, src->nerrs);
16694 with
16695 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16696 !!!
16697 * tests/regression.at (%nonassoc and eof): Adjust to newest
16698 Autotest: `.' is not in the PATH.
16699
16700 2002-01-27 Akim Demaille <akim@epita.fr>
16701
16702 * tests/sets.at (AT_EXTRACT_SETS): New.
16703 (Nullable): Use it.
16704 (Firsts): New.
16705
16706 2002-01-26 Akim Demaille <akim@epita.fr>
16707
16708 * tests/actions.at, tests/calc.at, tests/headers.at,
16709 * tests/torture.at: Adjust to the newest Autotest which no longer
16710 forces `.' in the PATH.
16711
16712 2002-01-25 Akim Demaille <akim@epita.fr>
16713
16714 * tests/regression.at (%nonassoc and eof): New.
16715 Suggested by Robert Anisko.
16716
16717 2002-01-24 Akim Demaille <akim@epita.fr>
16718
16719 Bison dumps core when trying to complain about broken input files.
16720 Reported by Cris van Pelt.
16721
16722 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
16723 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
16724 into...
16725 (Invalid inputs): Strengthen: exercise parse_percent_token.
16726
16727 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
16728
16729 * src/Makefile.am: Add bison.c++.
16730 * src/bison.c++: New skeleton.
16731
16732 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
16733
16734 * po/it.po: New.
16735
16736 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
16737
16738 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
16739
16740 2002-01-20 Marc Autret <marc@gnu.org>
16741
16742 * src/files.c (compute_output_file_names): Fix
16743
16744 2002-01-20 Marc Autret <marc@gnu.org>
16745
16746 * tests/output.at: New test.
16747 * src/files.c (compute_base_names): Don't map extensions when
16748 the YACC flag is set, use defaults.
16749 Reported by Evgeny Stambulchik.
16750
16751 2002-01-20 Marc Autret <marc@gnu.org>
16752
16753 * src/system.h: Need to define __attribute__ away for non-GCC
16754 compilers as well (i.e., the vendor C compiler).
16755 Suggested by Albert Chin-A-Young.
16756
16757 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
16758
16759 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
16760 canonical definition.
16761 * src/system.h: Use the canonical definition for PARAMS (avoids
16762 a conflict with the macro from lib/hash.h).
16763
16764 2002-01-11 Akim Demaille <akim@epita.fr>
16765
16766 * configure.in: Use AC_FUNC_STRNLEN.
16767 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
16768
16769 2002-01-09 Akim Demaille <akim@epita.fr>
16770
16771 * src/files.c, src/files.h (output_infix): New.
16772 (tab_extension): Remove.
16773 (compute_base_names): Compute the former, drop the latter.
16774 * src/output.c (prepare): Insert the muscles `output-infix', and
16775 `output-suffix'.
16776 * src/parse-skel.y (string, string.1): New.
16777 (section.header): Use it.
16778 (section.yacc): Remove.
16779 (prefix): Remove too.
16780 * src/scan-skel.l: Adjust.
16781 * src/bison.simple, src/bison.hairy: Adjust.
16782
16783 2002-01-09 Akim Demaille <akim@epita.fr>
16784
16785 * configure.in (WERROR_CFLAGS): Compute it.
16786 * src/Makefile.am (CFLAGS): Pass it.
16787 * tests/atlocal.in (CFLAGS): Idem.
16788 * src/files.c: Fix a few warnings.
16789 (get_extension_index): Remove, unused.
16790
16791 2002-01-08 Akim Demaille <akim@epita.fr>
16792
16793 * src/getargs.c (AS_FILE_NAME): New.
16794 (getargs): Use it to convert DOSish file names.
16795 * src/files.c (base_name): Rename as full_base_name to avoid
16796 clashes with `base_name ()'.
16797 (filename_split): New.
16798 (compute_base_names): N-th rewrite, using filename_split.
16799
16800 2002-01-08 Akim Demaille <akim@epita.fr>
16801
16802 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16803 New, stolen from the Fileutils 4.1.
16804 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16805 * configure.in: Check for the presence of memrchr, and of its
16806 prototype.
16807
16808 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16809
16810 * lib/hash.h (__P): Added definition for this macro.
16811 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16812 BUILT_SOURCES, to ensure they are generated first.
16813 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16814 %error-verbose to allow bootstrapping with bison 1.30x.
16815
16816 2002-01-06 Akim Demaille <akim@epita.fr>
16817
16818 * src/reader.c (parse_braces): Don't fetch the next char, the
16819 convention is to fetch on entry.
16820 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16821 'switch' without a following semicolon.
16822 * tests/regression.at (braces parsing): New.
16823
16824 2002-01-06 Akim Demaille <akim@epita.fr>
16825
16826 Bison is dead wrong in its RR conflict reports.
16827
16828 * tests/torture.at (GNU Cim Grammar): New.
16829 * src/conflicts.c (count_rr_conflicts): Fix.
16830
16831 2002-01-06 Akim Demaille <akim@epita.fr>
16832
16833 Creating package.m4 from configure.ac causes too many problems.
16834
16835 * tests/Makefile.am (package.m4): Create it by hand,
16836 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16837
16838 2002-01-06 Akim Demaille <akim@epita.fr>
16839
16840 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16841 skeleton.h.
16842
16843 2002-01-04 Paul Eggert <eggert@twinsun.com>
16844
16845 * doc/bison.texinfo (Debugging):
16846 Remove YYSTDERR; it's no longer defined or used.
16847 Also, s/cstdio.h/cstdio/.
16848
16849 2002-01-03 Akim Demaille <akim@epita.fr>
16850
16851 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16852
16853 2002-01-03 Akim Demaille <akim@epita.fr>
16854
16855 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16856 tracing code to --trace, wait for a better --trace option, with
16857 args.
16858
16859 2002-01-03 Akim Demaille <akim@epita.fr>
16860
16861 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16862 The ISO C++ standard is extremely clear about it: stderr is
16863 considered a macro, not a regular symbol (see table 94 `Header
16864 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16865 Therefore std:: does not apply to it. It still does with fprintf.
16866 Also, s/cstdio.h/cstdio/.
16867
16868 2002-01-03 Akim Demaille <akim@epita.fr>
16869
16870 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16871 for non system headers.
16872
16873 2002-01-02 Akim Demaille <akim@epita.fr>
16874
16875 Equip the skeleton chain with location tracking, runtime trace,
16876 pure parser and scanner.
16877
16878 * src/parse-skel.y: Request a pure parser, locations, and prefix
16879 renaming.
16880 (%union): Having several members with the same type does not help
16881 type mismatches, simplify.
16882 (YYPRINT, yyprint): New.
16883 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16884 (skel_error): this.
16885 Handle locations.
16886 * src/scan-skel.l: Adjust to these changes.
16887 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16888 (LOCATION_PRINT, skel_control_t): New.
16889
16890 2001-12-30 Akim Demaille <akim@epita.fr>
16891
16892 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16893 replace `gb' with BLANKS.
16894 * src/scan-skel.l: Adjust.
16895
16896 2001-12-30 Akim Demaille <akim@epita.fr>
16897
16898 * src/system.h: We don't need nor want bcopy.
16899 Throw away MS-DOS crap: we don't need getpid.
16900 * configure.in: We don't need strndup. It was even causing
16901 problems: because Flex includes the headers *before* us,
16902 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16903 not visible.
16904 * lib/xstrndup.c: New.
16905 * src/scan-skel.l: Use it.
16906 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16907 * src/parse-skel.y: Use %directives instead of #defines.
16908
16909 2001-12-30 Akim Demaille <akim@epita.fr>
16910
16911 * src/skeleton.h: New.
16912 * src/output.c (output_parser, output_master_parser): Remove, dead
16913 code.
16914 * src/output.h (get_lines_number, actions_output, guards_output)
16915 (token_definitions_output): Prototype them.
16916 * src/parse-skel.y: Add the license notice.
16917 Include output.h and skeleton.h.
16918 (process_skeleton): Returns void, and takes a single parameter.
16919 * src/scan-skel.l: Add the license notice.
16920 Include skeleton.h.
16921 Don't use %option yylineno: it seems that then Flex imagines
16922 REJECT has been used, and therefore it won't reallocate its
16923 buffers (which makes no other sense to me than a bug). It results
16924 in warnings for `unused: yy_flex_realloc'.
16925
16926 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
16927
16928 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16929 (MUSCLE_INSERT_PREFIX): ...to there.
16930 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16931 (MUSCLE_INSERT_PREFIX): Move from here...
16932
16933 * src/bison.hairy: Add a section directive. Put braces around muscle
16934 names. This parser skeleton is still broken, but Bison should not
16935 choke on a bad muscle 'syntax'.
16936 * src/bison.simple: Add a section directive. Put braces around muscle
16937 names.
16938
16939 * src/files.h (strsuffix, stringappend): Add declarations.
16940 (tab_extension): Add declaration.
16941 (short_base_name): Add declaration.
16942
16943 * src/files.c (strsuffix, stringappend): No longer static. These
16944 functions are used in the skeleton parser.
16945 (tab_extension): New.
16946 (compute_base_names): Use the computations done in this function
16947 to guess if the generated parsers should have '.tab' in their
16948 names.
16949 (short_base_name): No longer static.
16950
16951 * src/output.c (output_skeleton): New.
16952 (output): Disable call to output_master_parser, and give a try to
16953 a new skeleton handling system.
16954 (guards_output, actions_output): No longer static.
16955 (token_definitions_output, get_lines_number): No longer static.
16956
16957 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16958
16959 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
16960 parse-skel.y.
16961
16962 * src/parse-skel.y: New file.
16963 * src/scan-skel.l: New file.
16964
16965 2001-12-29 Akim Demaille <akim@epita.fr>
16966
16967 %name-prefix is broken.
16968
16969 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16970 Adjust all dependencies.
16971 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16972 %name-prefix.
16973
16974 Renaming yylval but not yylloc is not consistent. Now we do.
16975
16976 * src/bison.simple: Prefix yylloc if used.
16977 * doc/bison.texinfo (Decl Summary): Document that.
16978
16979 2001-12-29 Akim Demaille <akim@epita.fr>
16980
16981 * doc/bison.texinfo: Promote `%long-directive' over
16982 `%long_directive'.
16983 Remove all references to fixed-output-files, yacc is enough.
16984
16985 2001-12-29 Akim Demaille <akim@epita.fr>
16986
16987 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16988 user prologue. These are defaults.
16989 * tests/actions.at (Mid-rule actions): Make sure the user can
16990 define YYDEBUG and YYERROR_VERBOSE.
16991
16992 2001-12-29 Akim Demaille <akim@epita.fr>
16993
16994 * src/output.c (header_output): Don't forget to export YYLTYPE and
16995 yylloc.
16996 * tests/headers.at (export YYLTYPE): New, make sure it does.
16997 * tests/regression.at (%union and --defines, Invalid CPP headers):
16998 Move to...
16999 * tests/headers.at: here.
17000
17001 2001-12-29 Akim Demaille <akim@epita.fr>
17002
17003 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
17004
17005 2001-12-29 Akim Demaille <akim@epita.fr>
17006
17007 * tests/actions.at (Mid-rule actions): Output on a single line
17008 instead of several.
17009
17010 2001-12-29 Akim Demaille <akim@epita.fr>
17011
17012 * doc/bison.texinfo: Formatting changes.
17013
17014 2001-12-29 Akim Demaille <akim@epita.fr>
17015
17016 Don't store the token defs in a muscle, just be ready to output it
17017 on command. Now possible via `symbols'. Fixes a memory leak.
17018
17019 * src/output.c (token_definitions_output): New.
17020 (output_parser, header_output): Use it.
17021 * src/reader.c (symbols_save): Remove.
17022
17023 2001-12-29 Akim Demaille <akim@epita.fr>
17024
17025 * src/bison.simple: Do not provide a default for YYSTYPE and
17026 YYLTYPE before the user's prologue. Otherwise it's hardly... a
17027 default.
17028
17029 2001-12-29 Akim Demaille <akim@epita.fr>
17030
17031 Mid-rule actions are simply... ignored!
17032
17033 * src/reader.c (readgram): Be sure to attach mid-rule actions to
17034 the empty-rule associated to the dummy symbol, not to the host
17035 rule.
17036 * tests/actions.at (Mid-rule actions): New.
17037
17038 2001-12-29 Akim Demaille <akim@epita.fr>
17039
17040 Memory leak.
17041
17042 * src/reader.c (reader): Free grammar.
17043
17044 2001-12-29 Akim Demaille <akim@epita.fr>
17045
17046 Memory leak.
17047
17048 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
17049 since it allocates it for each state, although only one is needed.
17050 (allocate_storage): Do it here.
17051
17052 2001-12-29 Akim Demaille <akim@epita.fr>
17053
17054 * src/options.h, src/options.c (create_long_option_table): Rename
17055 as...
17056 (long_option_table_new): this, with a clearer prototype.
17057 (percent_table): Remove, unused,
17058 * src/getargs.c (getargs): Adjust.
17059
17060 2001-12-29 Akim Demaille <akim@epita.fr>
17061
17062 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
17063 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
17064 as states.
17065
17066 2001-12-29 Akim Demaille <akim@epita.fr>
17067
17068 * src/lalr.c (build_relations): Rename `states' as `states1'.
17069 Sorry, I don't understand exactly what it is, no better name...
17070
17071 2001-12-29 Akim Demaille <akim@epita.fr>
17072
17073 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
17074 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
17075 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
17076 as rules.
17077
17078 2001-12-29 Akim Demaille <akim@epita.fr>
17079
17080 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
17081 ago.
17082
17083 2001-12-29 Akim Demaille <akim@epita.fr>
17084
17085 * src/reader.c, src/reader.h (user_toknums): Remove.
17086 Adjust all users to use symbols[i]->user_token_number.
17087
17088 2001-12-29 Akim Demaille <akim@epita.fr>
17089
17090 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
17091 Adjust all users to use symbols[i]->prec or ->assoc.
17092
17093 2001-12-29 Akim Demaille <akim@epita.fr>
17094
17095 * src/reader.c, src/reader.h (tags): Remove.
17096 Adjust all users to use symbols[i]->tag.
17097
17098 2001-12-29 Akim Demaille <akim@epita.fr>
17099
17100 * src/gram.h, src/gram.c (symbols): New, similar to state_table
17101 and rule_table.
17102 * src/reader.c (packsymbols): Fill this table.
17103 Drop sprec.
17104 * src/conflicts.c (resolve_sr_conflict): Adjust.
17105 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
17106 single table.
17107 Use symbols[i]->tag instead of tags[i].
17108
17109 2001-12-29 Akim Demaille <akim@epita.fr>
17110
17111 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
17112 In addition, put a comment in there, to replace...
17113 * tests/regression.at (%union and C comments): Remove.
17114
17115 2001-12-29 Akim Demaille <akim@epita.fr>
17116
17117 * tests/regression.at (Web2c Actions): Blindly move the actual
17118 output as expected output. The contents *seem* right to me, but I
17119 can't pretend reading perfectly parser tables... Nonetheless, all
17120 the other tests pass correctly, the table look OK, even though the
17121 presence of `$axiom' is to be noted: AFAICS it is useless (but
17122 harmless).
17123
17124 2001-12-29 Akim Demaille <akim@epita.fr>
17125
17126 * src/reader.c (readgram): Don't add the rule 0 if there were no
17127 rules read. In other words, add it _after_ having performed
17128 grammar sanity checks.
17129 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
17130
17131 2001-12-29 Akim Demaille <akim@epita.fr>
17132
17133 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
17134 visible, and some states have now a different number.
17135
17136 2001-12-29 Akim Demaille <akim@epita.fr>
17137
17138 * src/reader.c (readgram): Bind the initial rule's lineno to that
17139 of the first rule.
17140 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
17141 (Solved SR Conflicts): Adjust rule 0's line number.
17142
17143 2001-12-29 Akim Demaille <akim@epita.fr>
17144
17145 Fix the `GAWK Grammar' failure.
17146
17147 * src/LR0.c (final_state): Initialize to -1 so that we do compute
17148 the reductions of the first state which was mistakenly confused
17149 with the final state because precisely final_state was initialized
17150 to 0.
17151 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
17152 now noticed by Bison.
17153 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
17154 have a reduction on $default.
17155
17156 2001-12-29 Akim Demaille <akim@epita.fr>
17157
17158 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
17159 rule line numbers.
17160 * src/closure.c (print_closure): Likewise.
17161 * src/derives.c (print_derives): Likewise.
17162 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
17163 now.
17164
17165 2001-12-29 Akim Demaille <akim@epita.fr>
17166
17167 * src/lalr.c (lookaheads_print): New.
17168 (lalr): Call it when --trace-flag.
17169 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
17170 are dumped.
17171
17172 2001-12-29 Akim Demaille <akim@epita.fr>
17173
17174 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
17175 when walking through ritem, even via rule->rhs.
17176 * src/reduce.c (dump_grammar, useful_production, reduce_output)
17177 (useful_production, useless_nonterminals): Likewise.
17178 (reduce_grammar_tables): Likewise, plus update nritems.
17179 * src/nullable.c (set_nullable): Likewise.
17180 * src/lalr.c (build_relations): Likewise.
17181 * tests/sets.at (Nullable): Adjust.
17182 Fortunately, now, the $axiom is no longer nullable.
17183
17184 2001-12-29 Akim Demaille <akim@epita.fr>
17185
17186 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
17187 the 0-sentinel.
17188 * src/gram.c (ritem_longest_rhs): Likewise.
17189 * src/reduce.c (nonterminals_reduce): Likewise.
17190 * src/print_graph.c (print_graph): Likewise.
17191 * src/output.c (output_rule_data): Likewise.
17192 * src/nullable.c (set_nullable): Likewise.
17193
17194 2001-12-29 Akim Demaille <akim@epita.fr>
17195
17196 * src/output.c: Comment changes.
17197
17198 2001-12-27 Paul Eggert <eggert@twinsun.com>
17199
17200 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
17201 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
17202 Sparc, as they were causing more porting problems than the
17203 (minor) performance improvement was worth.
17204
17205 Also, catch up with 1.31's YYSTD.
17206
17207 2001-12-27 Akim Demaille <akim@epita.fr>
17208
17209 * src/output.c (output_gram): Rely on nritems, not the
17210 0-sentinel. See below.
17211 Use -1 as separator, not 0.
17212 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
17213 Rely on -1 as separator in yyrhs, instead of 0.
17214 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
17215 twice `Now at end of input', therefore there are two lines less to
17216 expect.
17217
17218 2001-12-27 Akim Demaille <akim@epita.fr>
17219
17220 * tests/regression.at (Unresolved SR Conflicts):
17221 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
17222 below.
17223
17224 2001-12-27 Akim Demaille <akim@epita.fr>
17225
17226 * src/LR0.c (new_state): Recognize the final state by the fact it
17227 is reached by eoftoken.
17228 (insert_start_shifting_state, insert_eof_shifting_state)
17229 (insert_accepting_state, augment_automaton): Remove, since now
17230 these states are automatically computed from the initial state.
17231 (generate_states): Adjust.
17232 * src/print.c: When reporting a rule number to the user, substract
17233 1, so that the axiom rule is rule 0, and the first user rule is 1.
17234 * src/reduce.c: Likewise.
17235 * src/print_graph.c (print_core): For the time being, just as for
17236 the report, depend upon --trace-flags to dump the full set of
17237 items.
17238 * src/reader.c (readgram): Once the grammar read, insert the rule
17239 0: `$axiom: START-SYMBOL $'.
17240 * tests/set.at: Adjust: rule 0 is now displayed, and since the
17241 number of the states has changed (the final state is no longer
17242 necessarily the last), catch up.
17243
17244 2001-12-27 Akim Demaille <akim@epita.fr>
17245
17246 Try to make the use of the eoftoken valid. Given that its value
17247 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
17248 is used instead of > 0 where appropriate, (ii), depend upon nritems
17249 instead of the 0-sentinel.
17250
17251 * src/gram.h, src/gram.c (nritems): New.
17252 Expected to be duplication of nitems, but for the time being...
17253 * src/reader.c (packgram): Assert nritems and nitems are equal.
17254 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
17255 * src/closure.c (print_closure, print_fderives): Likewise.
17256 * src/gram.c (ritem_print): Likewise.
17257 * src/print.c (print_core, print_grammar): Likewise.
17258 * src/print_graph.c: Likewise.
17259
17260 2001-12-27 Akim Demaille <akim@epita.fr>
17261
17262 * src/main.c (main): If there are complains after grammar
17263 reductions, then output the report anyway if requested, then die.
17264 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
17265 * src/reader.c (eoftoken): New.
17266 (parse_token_decl): If the token being defined has value `0', it
17267 is the eoftoken.
17268 (packsymbols): No longer hack `tags' to insert `$' by hand.
17269 Be sure to preserve the value of the eoftoken.
17270 (reader): Make sure eoftoken is defined.
17271 Initialize nsyms to 0: now eoftoken is created just like the others.
17272 * src/print.c (print_grammar): Don't special case the eof token.
17273 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
17274 lie anyway, albeit pleasant.
17275 * tests/calc.at: Exercise error messages with eoftoken.
17276 Change the grammar so that empty input is invalid.
17277 Adjust expectations.
17278 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
17279
17280 2001-12-27 Akim Demaille <akim@epita.fr>
17281
17282 * configure.in: Check the protos of strchr ans strspn.
17283 Replace strchr if needed.
17284 * src/system.h: Provide the protos of strchr, strspn and memchr if
17285 missing.
17286 * lib/strchr.c: New.
17287 * src/reader.c (symbols_save): Use strchr.
17288
17289 2001-12-27 Akim Demaille <akim@epita.fr>
17290
17291 * src/print.c, src/print_graph.c (escape): New.
17292 Use it to quote the TAGS outputs.
17293 * src/print_graph.c (print_state): Now errors are in red, and
17294 reductions in green.
17295 Prefer high to wide: output the state number on a line of its own.
17296
17297 2001-12-27 Akim Demaille <akim@epita.fr>
17298
17299 * src/state.h, src/state.c (reductions_new): New.
17300 * src/LR0.c (set_state_table): Let all the states have a
17301 `reductions', even if reduced to 0.
17302 (save_reductions): Adjust.
17303 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
17304 * src/print.c (print_reductions, print_actions): Adjust.
17305 * src/output.c (action_row): Adjust.
17306
17307 2001-12-27 Akim Demaille <akim@epita.fr>
17308
17309 * src/state.h, src/state.c (errs_new, errs_dup): New.
17310 * src/LR0.c (set_state_table): Let all the states have an errs,
17311 even if reduced to 0.
17312 * src/print.c (print_errs, print_reductions): Adjust.
17313 * src/output.c (output_actions, action_row): Adjust.
17314 * src/conflicts.c (resolve_sr_conflict): Adjust.
17315
17316 2001-12-27 Akim Demaille <akim@epita.fr>
17317
17318 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
17319
17320 2001-12-27 Akim Demaille <akim@epita.fr>
17321
17322 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
17323 * src/print.c: here.
17324 (lookaheadset, shiftset): New, used as additional storage by
17325 print_reductions.
17326 (print_results): Adjust.
17327 (print_shifts, print_gotos, print_errs): New, extracted from...
17328 (print_actions): here.
17329 * src/print_graph.c (print_actions): Remove dead code.
17330
17331 2001-12-27 Akim Demaille <akim@epita.fr>
17332
17333 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
17334 `$n' and `@n'.
17335
17336 2001-12-27 Akim Demaille <akim@epita.fr>
17337
17338 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
17339 (build_relations): Adjust.
17340
17341 2001-12-27 Akim Demaille <akim@epita.fr>
17342
17343 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
17344 duplication.
17345
17346 2001-12-27 Akim Demaille <akim@epita.fr>
17347
17348 * src/reader.c (packgram): Catch nitems overflows.
17349
17350 2001-12-27 Akim Demaille <akim@epita.fr>
17351
17352 * src/files.c, src/files.h (guard_obstack): Remove.
17353 * src/output.c (output): Adjust.
17354 * src/reader.c (parse_braces): New, factoring...
17355 (copy_action, copy_guard): these two which are renamed as...
17356 (parse_action, parse_guard): these.
17357 As a voluntary consequence, using braces around guards is now
17358 mandatory.
17359
17360 2001-12-27 Akim Demaille <akim@epita.fr>
17361
17362 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
17363 * src/reader.c (symbol_list): `guard' and `guard_line' are new
17364 members.
17365 (symbol_list_new): Adjust.
17366 (copy_action): action_line is the first line, not the last.
17367 (copy_guard): Just as for actions, store the `action' only, not
17368 the switch/case/break flesh.
17369 Don't parse the user action that might follow the guard, let...
17370 (readgram): do it, i.e., now, there can be an action after a
17371 guard.
17372 In other words the guard is just explicitly optional.
17373 (packgram): Adjust.
17374 * src/output.c (guards_output): New.
17375 (output_parser): Call it when needed.
17376 (output): Also free the guard and attrs obstacks.
17377 * src/files.c, src/files.h (obstack_save): Remove.
17378 (output_files): Remove.
17379 As a result, if one needs the former `.act' file, using an
17380 appropriate skeleton which requires actions and guards is now
17381 required.
17382 * src/main.c (main): Adjust.
17383 * tests/semantic.at: New.
17384 * tests/regression.at: Use `input.y' as input file name.
17385 Avoid 8+3 problems by requiring input.c when the test needs the
17386 parser.
17387
17388 2001-12-27 Akim Demaille <akim@epita.fr>
17389
17390 * src/reader.c (symbol_list_new): Be sure to initialize all the
17391 fields.
17392
17393 2001-12-27 Akim Demaille <akim@epita.fr>
17394
17395 All the hacks using a final pseudo state are now useless.
17396
17397 * src/LR0.c (set_state_table): state_table holds exactly nstates.
17398 * src/lalr.c (nLA): New.
17399 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
17400 instead of lookaheadsp from the pseudo state (nstate + 1).
17401
17402 2001-12-27 Akim Demaille <akim@epita.fr>
17403
17404 * src/output.c (action_row, token_actions): Use a state_t instead
17405 of a integer, and nlookaheads instead of the following state's
17406 lookaheadsp.
17407
17408 2001-12-27 Akim Demaille <akim@epita.fr>
17409
17410 * src/conflicts.c (log_resolution, flush_shift)
17411 (resolve_sr_conflict, set_conflicts, solve_conflicts)
17412 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
17413 (conflicts_print, print_reductions): Use a state_t instead of an
17414 integer when referring to a state.
17415 As much as possible, depend upon nlookaheads, instead of the
17416 `lookaheadsp' member of the following state (since lookaheads of
17417 successive states are successive, the difference between state n + 1
17418 and n served as the number of lookaheads for state n).
17419 * src/lalr.c (add_lookback_edge): Likewise.
17420 * src/print.c (print_core, print_actions, print_state)
17421 (print_results): Likewise.
17422 * src/print_graph.c (print_core, print_actions, print_state)
17423 (print_graph): Likewise.
17424 * src/conflicts.h: Adjust.
17425
17426 2001-12-27 Akim Demaille <akim@epita.fr>
17427
17428 * src/bison.hairy: Formatting/comment changes.
17429 ANSIfy.
17430 Remove `register' indications.
17431 Add plenty of `static'.
17432
17433 2001-12-27 Akim Demaille <akim@epita.fr>
17434
17435 * src/output.c (prepare): Drop the muscle `ntbase' which
17436 duplicates ntokens.
17437 * src/bison.simple: Formatting/comment changes.
17438 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
17439 is an undocumented synonym.
17440
17441 2001-12-22 Akim Demaille <akim@epita.fr>
17442
17443 * src/output.c (output_table_data): Change the prototype to use
17444 `int' for array ranges: some invocations do pass an int, not a
17445 short.
17446 Reported by Wayne Green.
17447
17448 2001-12-22 Akim Demaille <akim@epita.fr>
17449
17450 Some actions of web2c.y are improperly triggered.
17451 Reported by Mike Castle.
17452
17453 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
17454 * tests/regression.at (Web2c): Rename as...
17455 (Web2c Report): this.
17456 (Web2c Actions): New.
17457
17458 2001-12-22 Akim Demaille <akim@epita.fr>
17459
17460 Reductions in web2c.y are improperly reported.
17461 Reported by Mike Castle.
17462
17463 * src/conflicts.c (print_reductions): Fix.
17464 * tests/regression.at (Web2c): New.
17465
17466 2001-12-18 Akim Demaille <akim@epita.fr>
17467
17468 Some host fail on `assert (!"foo")', which expands to
17469 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
17470 Reported by Nelson Beebee.
17471
17472 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
17473 `#define it_succeeded 0' and `assert (it_succeeded)'.
17474
17475 2001-12-17 Marc Autret <autret_m@epita.fr>
17476
17477 * src/bison.simple: Don't hard code the skeleton line and filename.
17478 * src/output.c (output_parser): Rename 'line' as 'output_line'.
17479 New line counter 'skeleton_line' (skeleton-line muscle).
17480
17481 2001-12-17 Paul Eggert <eggert@twinsun.com>
17482
17483 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
17484 YYDEBUG must be defined to a nonzero value.
17485
17486 * src/bison.simple (yytname): Do not assume that the user defines
17487 YYDEBUG to a properly parenthesized expression.
17488
17489 2001-12-17 Akim Demaille <akim@epita.fr>
17490
17491 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
17492 nlookaheads is a new member.
17493 Adjust all users.
17494 * src/lalr.h (nlookaheads): Remove this orphan declaration.
17495 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
17496 state.
17497
17498 2001-12-17 Akim Demaille <akim@epita.fr>
17499
17500 * src/files.h, src/files.c (open_files, close_files): Remove.
17501 * src/main.c (main): Don't open/close files, nor invoke lex_free,
17502 let...
17503 * src/reader.c (reader): Do it.
17504
17505 2001-12-17 Akim Demaille <akim@epita.fr>
17506
17507 * src/conflicts.c (print_reductions): Formatting changes.
17508
17509 2001-12-17 Akim Demaille <akim@epita.fr>
17510
17511 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
17512 (flush_reduce): New.
17513 (resolve_sr_conflict): Adjust.
17514
17515 2001-12-17 Akim Demaille <akim@epita.fr>
17516
17517 * src/output.c (output_obstack): Be static and rename as...
17518 (format_obstack): this, to avoid any confusion with files.c's
17519 output_obstack.
17520 * src/reader.h (muscle_obstack): Move to...
17521 * src/output.h: here, since it's defined in output.c.
17522
17523 2001-12-17 Akim Demaille <akim@epita.fr>
17524
17525 * src/output.c (action_row, save_column, default_goto)
17526 (sort_actions, matching_state, pack_vector): Better variable
17527 locality.
17528
17529 2001-12-17 Akim Demaille <akim@epita.fr>
17530
17531 * src/output.c: Various formatting changes.
17532
17533 2001-12-17 Akim Demaille <akim@epita.fr>
17534
17535 * src/files.c (output_files): Free the output_obstack.
17536 * src/main.c (main): Call print and print_graph conditionally.
17537 * src/print.c (print): Work unconditionally.
17538 * src/print_graph.c (print_graph): Work unconditionally.
17539 * src/conflicts.c (log_resolution): Output only if verbose_flag.
17540
17541 2001-12-16 Marc Autret <autret_m@epita.fr>
17542
17543 * src/output.c (actions_output): Fix. When we use %no-lines,
17544 there is one less line per action.
17545
17546 2001-12-16 Marc Autret <autret_m@epita.fr>
17547
17548 * src/bison.simple: Remove a useless #line directive.
17549 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
17550 * src/output.c (get_lines_number): New.
17551 (output_parser): Adjust, now takes care about the lines of a
17552 output muscles.
17553 Fix line numbering.
17554 (actions_output): Computes the number of lines taken by actions.
17555 (output_master_parser): Insert new skeleton which is the name of
17556 the output parser file name.
17557
17558 2001-12-15 Marc Autret <autret_m@epita.fr>
17559
17560 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
17561
17562 2001-12-15 Marc Autret <autret_m@epita.fr>
17563
17564 * src/output.c (output_gram): Keep track of the hairy one.
17565
17566 2001-12-15 Akim Demaille <akim@epita.fr>
17567
17568 Make `make distcheck' work.
17569
17570 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
17571 system.h which uses libgettext.h.
17572
17573 2001-12-15 Akim Demaille <akim@epita.fr>
17574
17575 * src/nullable.c (set_nullable): Useless rules must be skipped,
17576 otherwise, since we range over their symbols, we might look at a
17577 nonterminal which no longer ``exists'', i.e., it is not counted in
17578 `nvars', hence we overflow our arrays.
17579
17580 2001-12-15 Akim Demaille <akim@epita.fr>
17581
17582 The header can also be produced directly, without any obstack!
17583 Yahoo!
17584
17585 * src/files.c, src/files.h (defines_obstack): Remove.
17586 (compute_header_macro): Global.
17587 (defines_obstack_save): Remove.
17588 * src/reader.c (parse_union_decl): No longer output to
17589 defines_obstack: its content can be found in the `stype' muscle
17590 anyway.
17591 (output_token_translations): Merge into...
17592 (symbols_output): this.
17593 Rename as...
17594 (symbols_save): this.
17595 (reader): Adjust.
17596 * src/output.c (header_output): New.
17597 (output): Call it.
17598
17599 2001-12-15 Akim Demaille <akim@epita.fr>
17600
17601 * src/reader.c (parse_union_decl): Instead of handling two obstack
17602 simultaneously, use one to define the `stype' muscle, and use the
17603 value of the latter to fill defines_obstack.
17604 (copy_comment): Remove.
17605 (copy_comment2): Work for a single obstack.
17606 Rename as...
17607 (copy_comment): this.
17608
17609 2001-12-15 Akim Demaille <akim@epita.fr>
17610
17611 * src/lex.c, src/lex.h (xgetc): No longer static.
17612 * src/reader.c (parse_union_decl): Revamp.
17613
17614 2001-12-15 Akim Demaille <akim@epita.fr>
17615
17616 Still making progress in separating Bison into (i) input, (ii)
17617 process, (iii) output: now we can directly output the parser file
17618 without using table_obstack at all.
17619
17620 * src/files.c, src/files.h (table_obstack): Bye bye.
17621 (parser_file_name): New.
17622 * src/files.c (compute_output_file_names): Compute it.
17623 * src/output.c (actions_output, output_parser)
17624 (output_master_parser): To a file instead of an obstack.
17625
17626 2001-12-15 Akim Demaille <akim@epita.fr>
17627
17628 Attach actions to rules, instead of pre-outputting them to
17629 actions_obstack.
17630
17631 * src/gram.h (rule_t): action and action_line are new members.
17632 * src/reader.c (symbol_list): Likewise.
17633 (copy_action): Save the actions within the rule.
17634 (packgram): Save them in rule_table.
17635 * src/output.c (actions_output): New.
17636 (output_parser): Use it on `%%actions'.
17637 (output_rule_data): Don't free rule_table.
17638 (output): Do it.
17639 (prepare): Don't save the `action' muscle.
17640 * src/bison.simple: s/%%action/%%actions/.
17641
17642 2001-12-15 Akim Demaille <akim@epita.fr>
17643
17644 * src/reader.c (copy_action): When --yacc, don't append a `;'
17645 to the user action: let it fail if lacking.
17646 Suggested by Arnold Robbins and Tom Tromey.
17647
17648 2001-12-14 Akim Demaille <akim@epita.fr>
17649
17650 * src/lex.c (literalchar): Simply return the char you decoded, non
17651 longer mess around with obstacks and int pointers.
17652 Adjust all callers.
17653
17654 2001-12-14 Akim Demaille <akim@epita.fr>
17655
17656 * src/lex.c (literalchar): Don't escape the special characters,
17657 just decode them, and keep them as char (before, eol was output as
17658 the 2 char string `\n' etc.).
17659 * src/output.c (output_rule_data): Use quotearg to output the
17660 token strings.
17661
17662 2001-12-13 Paul Eggert <eggert@twinsun.com>
17663
17664 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
17665 Do not infringe on the global user namespace when using C++.
17666 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
17667 All uses of `fprintf' and `stderr' changed.
17668
17669 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
17670
17671 2001-12-13 Akim Demaille <akim@epita.fr>
17672
17673 The computation of nullable is broken: it doesn't handle empty
17674 RHS's properly.
17675
17676 * tests/torture.at (GNU AWK Grammar): New.
17677 * tests/sets.at (Nullable): New.
17678 * src/nullable.c (set_nullable): Instead of blindly looping over
17679 `ritems', loop over the rules, and then over their rhs's.
17680
17681 Work around Autotest bugs.
17682
17683 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
17684 frame, because Autotest understand lines starting with a `+' as
17685 traces from the shell. Then, they are not processed properly.
17686 Admittedly an Autotest bug, but we don't have time to wait for
17687 Autotest to catch up.
17688 * tests/regression.at (Broken Closure): Adjust to the new table
17689 frames.
17690 Move to...
17691 * tests/sets.at: here.
17692
17693 2001-12-13 Akim Demaille <akim@epita.fr>
17694
17695 * src/closure.c (closure): Use nrules instead of playing tricks
17696 with BITS_PER_WORD.
17697
17698 2001-12-13 Akim Demaille <akim@epita.fr>
17699
17700 * src/print.c (print_actions): Output the handling of `$' as the
17701 traces do: shifting the token EOF. Before EOF was treated as a
17702 nonterminal.
17703 * tests/regression.at: Adjust some tests.
17704 * src/print_graph.c (print_core): Complete the set of items via
17705 closure. The next-to-final and final states are still unsatisfying,
17706 but that's to be addressed elsewhere.
17707 No longer output the rule numbers, but do output the state number.
17708 A single loop for the shifts + gotos is enough, but picked a
17709 distinct color for each.
17710 (print_graph): Initialize and finalize closure.
17711
17712 2001-12-13 Akim Demaille <akim@epita.fr>
17713
17714 * src/reader.c (readgram): Remove dead code, an strip useless
17715 braces.
17716 (get_type): Remove, unused.
17717
17718 2001-12-12 Akim Demaille <akim@epita.fr>
17719
17720 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
17721 on that of lib/error.c.
17722
17723 2001-12-12 Akim Demaille <akim@epita.fr>
17724
17725 Some hosts don't like `/' in includes.
17726
17727 * src/system.h: Include libgettext.h without qualifying the path.
17728 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
17729 $(top_srcdir).
17730
17731 2001-12-11 Marc Autret <autret_m@epita.fr>
17732
17733 * src/output.c (output_parser): Remove useless muscle.
17734
17735 2001-12-11 Marc Autret <autret_m@epita.fr>
17736
17737 * src/bison.simple: Remove #line just before %%epilogue. It
17738 is now handled in ...
17739 * src/reader.c (read_additionnal_code): Add the output of a
17740 #line for the epilogue.
17741
17742 2001-12-10 Marc Autret <autret_m@epita.fr>
17743
17744 * src/reader.c (copy_definition): Re-use CPP-outed code which
17745 replace precedent remove.
17746 * src/bison.simple: Remove #line before %%prologue because
17747 %%input-line is wrong at this time.
17748
17749 2001-12-10 Marc Autret <autret_m@epita.fr>
17750
17751 * src/reader.c (symbols_output): Clean up.
17752 * src/output.c (output_gram, output): Clean up.
17753
17754 2001-12-10 Akim Demaille <akim@epita.fr>
17755
17756 * src/lalr.c (initialize_lookaheads): New. Extracted from...
17757 * src/LR0.c (set_state_table): here.
17758 * src/lalr.c (lalr): Call it.
17759
17760 2001-12-10 Akim Demaille <akim@epita.fr>
17761
17762 * src/state.h (shifts): Remove the `number' member: shifts are
17763 attached to state, hence no longer need to be labelled with a
17764 state number.
17765
17766 2001-12-10 Akim Demaille <akim@epita.fr>
17767
17768 Now that states have a complete set of members, the linked list of
17769 shifts is useless: just fill directly the state's shifts member.
17770
17771 * src/state.h (shifts): Remove the `next' member.
17772 * src/LR0.c (first_state, last_state): Remove.
17773 Adjust the callers.
17774 (augment_automaton): Don't look for the shifts that must be added
17775 a shift on EOF: it is those of the state we looked for! But now,
17776 since shifts are attached, it is no longer needed to looking
17777 merely by its id: its number.
17778
17779 2001-12-10 Akim Demaille <akim@epita.fr>
17780
17781 * src/LR0.c (augment_automaton): Better variable locality.
17782 Remove an impossible branch: if there is a state corresponding to
17783 the start symbol being shifted, then there is shift for the start
17784 symbol from the initial state.
17785
17786 2001-12-10 Akim Demaille <akim@epita.fr>
17787
17788 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
17789 only when appropriate: when insert_start_shifting_state' is not
17790 invoked.
17791 * tests/regression.at (Rule Line Numbers): Adjust.
17792
17793 2001-12-10 Akim Demaille <akim@epita.fr>
17794
17795 * src/LR0.c (augment_automaton): Now that all states have shifts,
17796 merge the two cases addition shifts to the initial state.
17797
17798 2001-12-10 Akim Demaille <akim@epita.fr>
17799
17800 * src/lalr.c (set_state_table): Move to...
17801 * src/LR0.c: here.
17802 * src/lalr.c (lalr): Don't call it...
17803 * src/LR0.c (generate_states): do it.
17804 * src/LR0.h (first_state): Remove, only the table is used.
17805
17806 2001-12-10 Akim Demaille <akim@epita.fr>
17807
17808 * src/LR0.h (first_shift, first_reduction): Remove.
17809 * src/lalr.c: Don't use first_shift: find shifts through the
17810 states.
17811
17812 2001-12-10 Akim Demaille <akim@epita.fr>
17813
17814 * src/LR0.c: Attach shifts to states as soon as they are
17815 computed.
17816 * src/lalr.c (set_state_table): Instead of assigning shifts to
17817 state, just assert that the mapping was properly done.
17818
17819 2001-12-10 Akim Demaille <akim@epita.fr>
17820
17821 * src/LR0.c (insert_start_shift): Rename as...
17822 (insert_start_shifting_state): this.
17823 (insert_eof_shifting_state, insert_accepting_state): New.
17824 (augment_automaton): Adjust.
17825 Better locality of the variables.
17826 When looking if the start_symbol is shifted from the initial
17827 state, using `while (... symbol != start_symbol ...)' sounds
17828 better than `while (... symbol < start_symbol ...)': If fail
17829 to see how the order between symbols could be relevant!
17830
17831 2001-12-10 Akim Demaille <akim@epita.fr>
17832
17833 * src/getargs.h: Don't declare `spec_name_prefix' and
17834 `spec_file_prefix', declared by src/files.h.
17835 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17836 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17837 * src/output.c (prepare): Adjust.
17838 * src/reader.c (symbols_output): Likewise.
17839 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17840
17841 2001-12-10 Akim Demaille <akim@epita.fr>
17842
17843 * src/muscle_tab.c (muscle_init): NULL is a better default than
17844 `"0"'.
17845
17846 2001-12-10 Akim Demaille <akim@epita.fr>
17847
17848 * src/reader.c (reader): Calling symbols_output once is enough.
17849
17850 2001-12-10 Akim Demaille <akim@epita.fr>
17851
17852 Now that states have a complete set of members, the linked list of
17853 reductions is useless: just fill directly the state's reductions
17854 member.
17855
17856 * src/state.h (struct reductions): Remove member `number' and
17857 `next'.
17858 * src/LR0.c (first_reduction, last_reduction): Remove.
17859 (save_reductions): Don't link the new reductions, store them in
17860 this_state.
17861 * src/lalr.c (set_state_table): No need to attach reductions to
17862 states, it's already done.
17863 * src/output.c (output_actions): No longer free the shifts, then
17864 the reductions, then the states: free all the states and their
17865 members.
17866
17867 2001-12-10 Akim Demaille <akim@epita.fr>
17868
17869 * src/options.c (OPTN, DRTV, BOTH): New.
17870 (option_table): Use them.
17871
17872 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17873 the job of system.h.
17874 * src/options.c: Don't include stdio.h and xalloc.h for the same
17875 reasons.
17876
17877 2001-12-10 Akim Demaille <akim@epita.fr>
17878
17879 * src/output.c (output, prepare): Make sure the values of the
17880 muscles `action' and `prologue' are 0-terminated.
17881
17882 2001-12-10 Akim Demaille <akim@epita.fr>
17883
17884 Clean up GCC warnings.
17885
17886 * src/reader.c (copy_action): `buf' is not used.
17887 (parse_skel_decl): Be static.
17888 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17889 * src/options.h (create_long_option_table): Have a real prototype.
17890 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17891 (hash_delete_at): Return const void *.
17892 Adjust casts to preserve the const.
17893
17894 2001-12-10 Akim Demaille <akim@epita.fr>
17895
17896 * configure.in: Require 2.52g.
17897 M4 is not needed, but AUTOM4TE is.
17898 * m4/m4.m4: Remove.
17899 * tests/Makefile.am: Adjust.
17900
17901 2001-12-10 Akim Demaille <akim@epita.fr>
17902
17903 One structure for states is enough, even though theoretically
17904 there are LR(0) states and LALR(1) states.
17905
17906 * src/lalr.h (state_t): Remove.
17907 (state_table): Be state_t **, not state_t *.
17908 * src/state.h (core, CORE_ALLOC): Rename as...
17909 (state_t, STATE_ALLOC): this.
17910 Add the LALR(1) members: shifts, reductions, errs.
17911 * src/LR0.c (state_table): Rename as...
17912 (state_hash): this, to avoid name clashes with the global
17913 `state_table'.
17914 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17915 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17916
17917 2001-12-10 Akim Demaille <akim@epita.fr>
17918
17919 Bison dumps core on bash.y.
17920 Reported by Pascal Bart.
17921
17922 * src/warshall.c (bitmatrix_print): New.
17923 (TC): Use it.
17924 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
17925 j must be the outer loop.
17926 * tests/regression.at (Broken Closure): New.
17927
17928 2001-12-05 Akim Demaille <akim@epita.fr>
17929
17930 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17931 its argument.
17932 Reported by Peter Hamorsky.
17933
17934 2001-12-05 Akim Demaille <akim@epita.fr>
17935
17936 * src/conflicts.c (err_table): Remove.
17937 (resolve_sr_conflict): Adjust.
17938 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17939 Rename as...
17940 (state_t.reductions, state_t.shifts): this.
17941
17942 2001-12-05 Akim Demaille <akim@epita.fr>
17943
17944 * src/reduce.c (reduce_grammar_tables): No longer disable the
17945 removal of useless rules via CPP but via `if (0)', so that the
17946 compiler still check the code is valid.
17947 For instance, it should have noticed `rline' no longer exists: use
17948 the `line' member of rule_t.
17949 * src/gram.c (dummy, rline): Remove, unused.
17950
17951 2001-12-05 Akim Demaille <akim@epita.fr>
17952
17953 * src/output.c (pack_vector): Use assert, not berror.
17954 * src/main.c (berror): Remove, unused.
17955
17956 2001-12-05 Akim Demaille <akim@epita.fr>
17957
17958 New experimental feature: if --verbose --trace output all the
17959 items of a state, not only its kernel.
17960
17961 * src/print.c (print_core): If `trace_flag', then invoke closure
17962 before outputting the items of the state (print_core is no longer
17963 a correct name them).
17964 (print_results): Invoke new_closure/free_closure if needed.
17965
17966 2001-12-05 Akim Demaille <akim@epita.fr>
17967
17968 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17969 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17970 (nitemset): for consistency with the rest of the project.
17971
17972 2001-12-05 Akim Demaille <akim@epita.fr>
17973
17974 * src/closure.c (print_closure): Improve.
17975 (closure): Use it for printing input and output.
17976
17977 2001-12-05 Akim Demaille <akim@epita.fr>
17978
17979 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17980 indexed by nonterminals.
17981
17982 2001-12-05 Akim Demaille <akim@epita.fr>
17983
17984 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17985 what it was!).
17986 * src/warshall.h: Remove accidental duplication of the content.
17987
17988 2001-12-05 Akim Demaille <akim@epita.fr>
17989
17990 * src/closure.c (set_fderives): De-obfuscate.
17991
17992 2001-12-05 Akim Demaille <akim@epita.fr>
17993
17994 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17995
17996 2001-12-05 Akim Demaille <akim@epita.fr>
17997
17998 * src/closure.c (set_firsts): De-obfuscate.
17999
18000 2001-12-05 Akim Demaille <akim@epita.fr>
18001
18002 * src/output.c (action_row): De-obfuscate
18003 using the good o' techniques: arrays not pointers, variable
18004 locality, BITISSET, RESETBIT etc.
18005
18006 2001-12-05 Akim Demaille <akim@epita.fr>
18007
18008 Pessimize the code to simplify it: from now on, all the states
18009 have a valid SHIFTS, which NSHIFTS is possibly 0.
18010
18011 * src/LR0.c (shifts_new): Be global and move to..
18012 * src/state.c, src/state.h: here.
18013 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
18014 * src/print_graph: Adjust.
18015
18016 2001-12-05 Akim Demaille <akim@epita.fr>
18017
18018 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
18019 * src/conflicts.c: Use it.
18020 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
18021 incorrectly ``simplified''.
18022
18023 2001-12-05 Akim Demaille <akim@epita.fr>
18024
18025 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
18026 using the good o' techniques: arrays not pointers, variable
18027 locality, BITISSET, RESETBIT etc.
18028
18029 2001-12-05 Akim Demaille <akim@epita.fr>
18030
18031 * src/state.h (SHIFT_SYMBOL): New.
18032 * src/conflicts.c: Use it to deobfuscate.
18033
18034 2001-12-05 Akim Demaille <akim@epita.fr>
18035
18036 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
18037 (print_reductions): De-obfuscate using the good o' techniques:
18038 arrays not pointers, variable locality, BITISSET.
18039
18040 2001-12-05 Akim Demaille <akim@epita.fr>
18041
18042 * src/conflicts.c (print_reductions): Arrays, not pointers.
18043 Use BITISSET.
18044
18045 2001-12-05 Akim Demaille <akim@epita.fr>
18046
18047 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18048
18049 2001-12-05 Akim Demaille <akim@epita.fr>
18050
18051 * src/conflicts.c (print_reductions): Improve variable locality.
18052
18053 2001-12-05 Akim Demaille <akim@epita.fr>
18054
18055 * src/conflicts.c (print_reductions): Pessimize, but clarify.
18056
18057 2001-12-05 Akim Demaille <akim@epita.fr>
18058
18059 * src/conflicts.c (print_reductions): Improve variable locality.
18060
18061 2001-12-05 Akim Demaille <akim@epita.fr>
18062
18063 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
18064 * src/lalr.c: Use them.
18065
18066 2001-12-05 Akim Demaille <akim@epita.fr>
18067
18068 * src/LR0.c (augment_automaton): Formatting changes.
18069 Better variable locality.
18070
18071 2001-12-05 Akim Demaille <akim@epita.fr>
18072
18073 * src/lalr.c (matrix_print): New.
18074 (transpose): Use it.
18075 Use arrays instead of pointers.
18076
18077 2001-12-05 Akim Demaille <akim@epita.fr>
18078
18079 * src/lalr.c (maxrhs): Move to...
18080 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
18081 * src/lalr.c (build_relations): Adjust.
18082
18083 2001-12-05 Akim Demaille <akim@epita.fr>
18084
18085 * src/lalr.c (transpose): Free the memory allocated to the
18086 argument, as it is replaced by the results by the unique caller.
18087 (build_relations): Merely invoke transpose: it handles the memory
18088 deallocation.
18089 Improve variable locality.
18090 Avoid variables used as mere abbreviations.
18091 (compute_lookaheads): Use arrays instead of pointers.
18092
18093 2001-12-05 Akim Demaille <akim@epita.fr>
18094
18095 * src/lalr.c (initialize_F): Improve variable locality.
18096 Avoid variables used as mere abbreviations.
18097
18098 2001-12-05 Akim Demaille <akim@epita.fr>
18099
18100 * src/derives.c (print_derives): Display the ruleno.
18101 * src/lalr.c (initialize_F, transpose): Better variable locality
18102 to improve readability.
18103 Avoid variables used as mere abbreviations.
18104
18105 2001-12-05 Akim Demaille <akim@epita.fr>
18106
18107 * src/lalr.c (traverse): Use arrays instead of pointers.
18108
18109 2001-12-05 Akim Demaille <akim@epita.fr>
18110
18111 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
18112 the handling of squeue.
18113 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18114
18115 2001-12-05 Akim Demaille <akim@epita.fr>
18116
18117 Because useless nonterminals are now kept alive (instead of being
18118 `destroyed'), we now sometimes examine them, and store information
18119 related to them. Hence we need to know their number, and adjust
18120 memory allocations.
18121
18122 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
18123 static.
18124 * src/LR0.c (allocate_itemsets): The memory allocated to
18125 `symbol_count' was used for two different purpose: once to count
18126 the number of occurrences of each symbol, and later reassigned to
18127 `shift_symbol', containing the symbol that can be shifted from a
18128 given state.
18129 Deobfuscate, i.e., allocate, use and free `symbol_count' here
18130 only, and...
18131 (new_itemsets): Allocate `shift_symbol' here.
18132 (allocate_itemsets): symbol_count includes useless nonterminals.
18133 Make room for them.
18134 (free_storage): Use `free', not `XFREE', for pointers that cannot
18135 be null.
18136
18137 2001-12-05 Akim Demaille <akim@epita.fr>
18138
18139 * src/nullable.c (set_nullable): Deobfuscate the handling of
18140 ritem.
18141 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
18142
18143 2001-12-05 Akim Demaille <akim@epita.fr>
18144
18145 * src/gram.c, src/gram.h (ritem_print): New.
18146 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
18147 (This useless function was defined only to work around VMS linkers
18148 that can't handle compilation units with variables only).
18149 * src/reduce.c (dump_grammar): Use it to trace the construction of
18150 ritem.
18151
18152 2001-12-04 Paul Eggert <eggert@twinsun.com>
18153
18154 * src/bison.simple (union yyalloc): Change member names
18155 to be the same as the stack names.
18156 (yyparse): yyptr is now union yyalloc *, not char *.
18157 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
18158 and may generate better code on some machines.
18159 (yystpcpy): Use prototype if __STDC__ is defined, not just
18160 if __cplusplus is defined.
18161
18162 2001-11-30 Akim Demaille <akim@epita.fr>
18163
18164 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
18165 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
18166 Gettext doesn't compile cleanly, and dies with -Werror.
18167 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
18168 Include WARNING_CFLAGS here.
18169 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
18170 before being defined.
18171
18172 2001-11-27 Paul Eggert <eggert@twinsun.com>
18173
18174 * lib/quotearg.h (quotearg_n, quotearg_n_style):
18175 First arg is int, not unsigned.
18176 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18177 (SIZE_MAX, UINT_MAX): New macros.
18178 (quotearg_n_options): Abort if N is negative.
18179 Avoid overflow check on hosts where size_t is 64 bits and int
18180 is 32 bits, as overflow is impossible there.
18181 Fix off-by-one typo that caused unnecessary reallocation.
18182
18183 2001-11-29 Paul Eggert <eggert@twinsun.com>
18184
18185 Name space cleanup in generated parser.
18186
18187 * doc/bison.texinfo (Bison Parser): Discuss system headers
18188 and their effect on the user name space.
18189
18190 * src/bison.simple:
18191 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
18192 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
18193 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
18194
18195 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
18196 on user names when possible.
18197
18198 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
18199 Simplify test for whather <alloca.h> exists.
18200
18201 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
18202
18203 (<stdio.h>): Include if YYDEBUG.
18204
18205 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
18206 ! defined (yyoverflow) && ! defined (yymemcpy).
18207
18208 (yymemcpy, yyparse): Rename local variables as needed so that
18209 they all begin with 'yy'.
18210
18211 (yystrlen, yystpcpy): New functions.
18212
18213 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
18214 All uses changed.
18215
18216 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
18217 instead of relying on string.h functions. Use YYSTACK_ALLOC
18218 and YYSTACK_FREE instead of malloc and free.
18219
18220 2001-11-30 Akim Demaille <akim@epita.fr>
18221
18222 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
18223 before their first uses.
18224 (YYBISON, YYPURE): Move to the top of the output.
18225
18226 2001-11-30 Akim Demaille <akim@epita.fr>
18227
18228 * tests/reduce.at (Useless Nonterminals): Fix.
18229
18230 2001-11-30 Akim Demaille <akim@epita.fr>
18231
18232 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
18233 if body instead of `;' to pacify GCC's warnings.
18234
18235 2001-11-30 Akim Demaille <akim@epita.fr>
18236
18237 Instead of mapping the LHS of unused rules to -1, keep the LHS
18238 valid, but flag the rules as invalid.
18239
18240 * src/gram.h (rule_t): `useful' is a new member.
18241 * src/print.c (print_grammar): Adjust.
18242 * src/derives.c (set_derives): Likewise.
18243 * src/reader.c (packgram, reduce_output): Likewise.
18244 * src/reduce.c (reduce_grammar_tables): Likewise.
18245 * tests/reduce.at (Underivable Rules, Useless Rules): New.
18246
18247 2001-11-30 Akim Demaille <akim@epita.fr>
18248
18249 * src/reduce.c (reduce_output): Formatting changes.
18250 * src/print.c (print_results, print_grammar): Likewise.
18251 * tests/regression.at (Rule Line Numbers)
18252 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
18253
18254 2001-11-30 Akim Demaille <akim@epita.fr>
18255
18256 * src/reduce.c (nonterminals_reduce): Instead of throwing away
18257 useless nonterminals, move them at the end of the symbol arrays.
18258 (reduce_output): Adjust.
18259 * tests/reduce.at (Useless Nonterminals): Adjust.
18260
18261 2001-11-30 Akim Demaille <akim@epita.fr>
18262
18263 * src/reduce.c: Various comment/formatting changes.
18264 (nonterminals_reduce): New, extracted from...
18265 (reduce_grammar_tables): here.
18266 (reduce_grammar): Call nonterminals_reduce.
18267
18268 2001-11-29 Paul Eggert <eggert@twinsun.com>
18269
18270 * src/bison.simple (YYSTACK_REALLOC): Remove.
18271 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
18272 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
18273 New macros.
18274 (union yyalloc): New type.
18275 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
18276 an arbitrary restriction on hosts where size_t is wider than int.
18277
18278 (yyparse): Don't dump core if alloca or malloc fails; instead, report
18279 a parser stack overflow. Allocate just one block of memory for all
18280 three stacks, instead of allocating three blocks; this typically is
18281 faster and reduces fragmentation.
18282
18283 Do not limit the number of items in the stack to a value that fits
18284 in 'int', as this is an arbitrary limit on hosts with 64-bit
18285 size_t and 32-bit int.
18286
18287 2001-11-29 Marc Autret <autret_m@epita.fr>
18288
18289 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
18290 of defining YYERROR_VERBOSE.
18291 [AT_DATA]: $4 is now out of C declarations in the prologue.
18292
18293 2001-11-28 Marc Autret <autret_m@epita.fr>
18294
18295 * src/reader.c (parse_dquoted_param): New.
18296 (parse_skel_decl): Use it.
18297 * src/lex.h: Add its prototype.
18298 * src/lex.c (literalchar): Become not static.
18299
18300 2001-11-28 Marc Autret <autret_m@epita.fr>
18301
18302 * src/output.h: And put its extern declaration here.
18303 * src/output.c (error_verbose): Define here.
18304 (prepare): Echo name modification.
18305 * src/getargs.h: Clean its extern declaration.
18306 * src/getargs.c (error_verbose_flag): Remove.
18307 (getargs): Remove case 'e'.
18308 * src/options.c (option_table): 'error-verbose' is now seen as simple
18309 percent option.
18310 Include output.h.
18311
18312 * src/reader.c (read_declarations): Remove case tok_include.
18313 (parse_include_decl): Remove.
18314 * src/lex.h (token_t): Remove tok_include.
18315 * src/options.c (option_table): 'include' is now a simple command line
18316 option.
18317
18318 2001-11-28 Marc Autret <autret_m@epita.fr>
18319
18320 * src/bison.simple: Adjust muscle names.
18321 * src/muscle_tab.c (muscle_init): Also rename the muscles.
18322 * src/output.c (prepare): s/_/-/ for the muscles names.
18323 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
18324
18325 2001-11-28 Marc Autret <autret_m@epita.fr>
18326
18327 * src/bison.simple: Fix debug.
18328 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
18329
18330 2001-11-28 Akim Demaille <akim@epita.fr>
18331
18332 * src/LR0.c (shifts_new): New.
18333 (save_shifts, insert_start_shift, augment_automaton): Use it.
18334
18335 2001-11-28 Akim Demaille <akim@epita.fr>
18336
18337 * src/closure.c (closure): `b' and `ruleno' denote the same value:
18338 keep ruleno only.
18339
18340 2001-11-28 Akim Demaille <akim@epita.fr>
18341
18342 * src/closure.c (closure): Instead of looping over word in array
18343 then bits in words, loop over bits in array.
18344
18345 2001-11-28 Akim Demaille <akim@epita.fr>
18346
18347 * src/closure.c (closure): No longer optimize the special case
18348 where all the bits of `ruleset[r]' are set to 0, to make the code
18349 clearer.
18350
18351 2001-11-28 Akim Demaille <akim@epita.fr>
18352
18353 * src/closure.c (closure): `r' and `c' are new variables, used to
18354 de-obfuscate accesses to RULESET and CORE.
18355
18356 2001-11-28 Akim Demaille <akim@epita.fr>
18357
18358 * src/reduce.c (reduce_print): Use ngettext.
18359 (dump_grammar): Improve the trace accuracy.
18360
18361 2001-11-28 Akim Demaille <akim@epita.fr>
18362
18363 * src/reduce.c (dump_grammar): Don't translate trace messages.
18364
18365 2001-11-28 Akim Demaille <akim@epita.fr>
18366
18367 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
18368 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
18369 as all tags are free'ed afterwards.
18370 From Enrico Scholz.
18371
18372 2001-11-27 Paul Eggert <eggert@twinsun.com>
18373
18374 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
18375 use alloca when we didn't want to, and vice versa.
18376
18377 2001-11-27 Marc Autret <autret_m@epita.fr>
18378
18379 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
18380 initialization.
18381 * src/output.c (prepare): Remove its update.
18382
18383 2001-11-27 Marc Autret <autret_m@epita.fr>
18384
18385 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
18386 Use %error-verbose.
18387
18388 2001-11-27 Marc Autret <autret_m@epita.fr>
18389
18390 * src/bison.simple: Remove YYERROR_VERBOSE using.
18391 Use %%error_verbose.
18392 (yyparse): Likewise.
18393 * src/output.c (prepare): Give its final value.
18394 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
18395 * src/getargs.h: Add its extern declaration.
18396 * src/getargs.c (error_verbose_flag): New int.
18397 (getargs): Update to catch new case.
18398 * src/options.c (option_table): 'error-verbose' is a new option.
18399 (shortopts): Update.
18400
18401 2001-11-27 Akim Demaille <akim@epita.fr>
18402
18403 * src/system.h: Use intl/libgettext.h.
18404 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
18405
18406 2001-11-27 Akim Demaille <akim@epita.fr>
18407
18408 * tests/torture.at (Exploding the Stack Size with Malloc):
18409 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
18410
18411 2001-11-27 Akim Demaille <akim@epita.fr>
18412
18413 * src/files.c: Include error.h.
18414 Reported by Hans Aberg.
18415
18416 2001-11-26 Marc Autret <autret_m@epita.fr>
18417
18418 * src/reader.c (parse_include_decl): New, not yet implemented.
18419 (read_declarations): Add case tok_include.
18420 * src/getargs.h (include): Add its extern definition.
18421 * src/getargs.c (include): New const char *.
18422 (getargs): Add case '-I'.
18423 * src/options.c (option_table): Add include as command line and
18424 percent option.
18425 * src/lex.h (token_t): Add tok_include.
18426
18427 2001-11-26 Akim Demaille <akim@epita.fr>
18428
18429 * src/reader.c (readgram): Make sure rules for mid-rule actions
18430 have a lineno equal to that of their host rule.
18431 Reported by Hans Aberg.
18432 * tests/regression.at (Rule Line Numbers): New.
18433
18434 2001-11-26 Akim Demaille <akim@epita.fr>
18435
18436 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
18437 size_ts.
18438
18439 2001-11-26 Akim Demaille <akim@epita.fr>
18440
18441 * src/complain.c, src/complain.h (error): Remove, provided by
18442 lib/error.[ch].
18443
18444 2001-11-26 Akim Demaille <akim@epita.fr>
18445
18446 * src/reader.c (read_declarations): Don't abort on tok_illegal,
18447 issue an error message.
18448 * tests/regression.at (Invalid %directive): New.
18449 Reported by Hans Aberg.
18450
18451 2001-11-26 Akim Demaille <akim@epita.fr>
18452
18453 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
18454 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18455
18456 2001-11-26 Akim Demaille <akim@epita.fr>
18457
18458 * src/conflicts.c (conflicts_print): Don't complain at all when
18459 there are no reduce/reduce conflicts, and as many shift/reduce
18460 conflicts as expected.
18461 * tests/regression.at (%expect right): Adjust.
18462
18463 2001-11-23 Akim Demaille <akim@epita.fr>
18464
18465 * lib/alloca.c: Update, from fileutils.
18466
18467 2001-11-23 Akim Demaille <akim@epita.fr>
18468
18469 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
18470
18471 2001-11-23 Akim Demaille <akim@epita.fr>
18472
18473 * src/system.h: Include alloca.h.
18474 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
18475
18476 2001-11-23 Akim Demaille <akim@epita.fr>
18477
18478 * src/print_graph.c (print_actions): Remove `rule', unused.
18479 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
18480 pacify GCC's signed < unsigned warnings.
18481 * src/closure.c (itemsetsize): Likewise.
18482 * src/reader.c (symbol_list_new): Static.
18483
18484 2001-11-23 Akim Demaille <akim@epita.fr>
18485
18486 Attaching lineno to buckets is stupid, since only one copy of each
18487 symbol is kept, only the line of the first occurrence is kept too.
18488
18489 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
18490 * src/reader.c (rline_allocated): Remove, unused.
18491 (symbol_list): Have a `line' member.
18492 (symbol_list_new): New.
18493 (readgram): Use it.
18494 * src/print.c (print_grammar): Output the rule line numbers.
18495 * tests/regression.at (Solved SR Conflicts)
18496 (Unresolved SR Conflicts): Adjust.
18497 Reported by Hans Aberg.
18498
18499 2001-11-22 Marc Autret <autret_m@epita.fr>
18500
18501 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
18502
18503 2001-11-22 Marc Autret <autret_m@epita.fr>
18504
18505 * src/muscle_tab.c (muscle_init): Remove initialization of
18506 skeleton muscle.
18507 * src/output.c (output_master_parser): Do it here.
18508
18509 2001-11-20 Akim Demaille <akim@epita.fr>
18510
18511 * po/sv.po: New.
18512 * configure.in (ALL_LINGUAS): Adjust.
18513 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
18514 longer contains strings to translate.
18515
18516 2001-11-19 Akim Demaille <akim@epita.fr>
18517
18518 * src/conflicts.c (conflicts_print): Add a missing \n.
18519
18520 2001-11-19 Akim Demaille <akim@epita.fr>
18521
18522 * src/nullable.c (nullable_print): New.
18523 (set_nullable): Call it when tracing.
18524 Better locality of variables.
18525
18526 2001-11-19 Akim Demaille <akim@epita.fr>
18527
18528 * src/print.c (print_actions): Better locality of variables.
18529
18530 2001-11-19 Akim Demaille <akim@epita.fr>
18531
18532 * src/derives.c (print_derives): Fix and enrich.
18533 * src/closure.c (print_fderives): Likewise.
18534
18535 2001-11-19 Akim Demaille <akim@epita.fr>
18536
18537 * src/closure.c (itemsetend): Remove, replaced with...
18538 (itemsetsize): new.
18539
18540 2001-11-19 Akim Demaille <akim@epita.fr>
18541
18542 * src/LR0.c (kernel_end): Remove, replaced with...
18543 (kernel_size): new.
18544
18545 2001-11-19 Akim Demaille <akim@epita.fr>
18546
18547 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
18548 to clarify.
18549
18550 2001-11-19 Akim Demaille <akim@epita.fr>
18551
18552 * src/closure.c (closure): Use arrays instead of pointers to clarify.
18553
18554 2001-11-19 Akim Demaille <akim@epita.fr>
18555
18556 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
18557 trace messages.
18558 * src/LR0.c: Likewise.
18559 (allocate_itemsets): Use arrays instead of pointers to clarify.
18560
18561 2001-11-19 Akim Demaille <akim@epita.fr>
18562
18563 * src/getargs.c (statistics_flag): Replace with...
18564 (trace_flag): New.
18565 (longopts): Accept --trace instead of --statistics.
18566 * src/getargs.h, src/options.c: Adjust.
18567 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
18568 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
18569
18570 2001-11-19 Akim Demaille <akim@epita.fr>
18571
18572 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
18573 pointers to clarify the code.
18574 (save_reductions, save_shifts): Factor common parts of alternatives.
18575
18576 2001-11-19 Akim Demaille <akim@epita.fr>
18577
18578 * src/LR0.c (new_state, get_state): Complete TRACE code.
18579 * src/closure.c: Include `reader.h' to get `tags', needed by the
18580 trace code.
18581 Rename the conditional DEBUG as TRACE.
18582 Output consistently TRACEs to stderr, not stdout.
18583 * src/derives.c: Likewise.
18584 * src/reduce.c: (inaccessable_symbols): Using if is better style
18585 than goto.
18586 Use `#if TRACE' instead of `#if 0' for tracing code.
18587
18588 2001-11-19 Akim Demaille <akim@epita.fr>
18589
18590 * src/system.h (LIST_FREE, shortcpy): New.
18591 * src/LR0.c: Use them.
18592 * src/output.c (free_itemsets, free_reductions, free_shifts):
18593 Remove, replaced by LIST_FREE.
18594
18595 2001-11-19 Akim Demaille <akim@epita.fr>
18596
18597 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
18598 (REDUCTIONS_ALLOC): New.
18599 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
18600 allocation.
18601
18602 2001-11-19 Akim Demaille <akim@epita.fr>
18603
18604 * src/LR0.c (new_state): Complete trace code.
18605 * src/nullable.c (set_nullable): Don't translate traces.
18606
18607 2001-11-19 Akim Demaille <akim@epita.fr>
18608
18609 * src/print_graph.c (print_core): Better locality of variables.
18610 * src/print.c (print_core): Likewise.
18611
18612 2001-11-19 Akim Demaille <akim@epita.fr>
18613
18614 * src/vcg.c: You do the output, so you are responsible of the
18615 handling of VCG syntax, in particular: use quotearg.
18616 * src/print_graph.c: Don't.
18617 (print_actions): Don't output the actions as part of the nodes,
18618 since that's the job of the edges.
18619 (print_state): Don't output by hand: fill the node description,
18620 and ask for its output.
18621
18622 2001-11-19 Akim Demaille <akim@epita.fr>
18623
18624 * src/bison.simple (yyparse): When verbosely reporting an error,
18625 no longer put additional quotes around token names.
18626 * tests/calc.at: Adjust.
18627
18628 2001-11-19 Akim Demaille <akim@epita.fr>
18629
18630 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
18631 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
18632 * src/output.c: Adjust.
18633
18634 2001-11-19 Akim Demaille <akim@epita.fr>
18635
18636 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
18637 (rule_t): this.
18638 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
18639
18640 2001-11-19 Akim Demaille <akim@epita.fr>
18641
18642 * src/gram.h (rule_t): New.
18643 (rule_table): New.
18644 (rrhs, rlhs): Remove, part of state_t.
18645 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
18646 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18647 * src/reader.c, src/reduce.c: Adjust.
18648
18649 2001-11-19 Akim Demaille <akim@epita.fr>
18650
18651 * src/reader.c (symbols_output): New, extracted from...
18652 (packsymbols): Here.
18653 (reader): Call it.
18654
18655 2001-11-19 Akim Demaille <akim@epita.fr>
18656
18657 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
18658 (maxrhs): this new function.
18659
18660 2001-11-19 Akim Demaille <akim@epita.fr>
18661
18662 * src/lalr.c (F): New macro to access the variable F.
18663 Adjust.
18664
18665 2001-11-19 Akim Demaille <akim@epita.fr>
18666
18667 * src/lalr.h (LA): New macro to access the variable LA.
18668 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18669 * src/lalr.c: Adjust.
18670
18671 2001-11-19 Akim Demaille <akim@epita.fr>
18672
18673 * src/lalr.c (initialize_LA): Only initialize LA. Let...
18674 (set_state_table): handle the `lookaheads' members.
18675
18676 2001-11-19 Akim Demaille <akim@epita.fr>
18677
18678 * src/lalr.h (lookaheads): Removed array, whose contents is now
18679 a member of...
18680 (state_t): this structure.
18681 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18682 Adjust.
18683
18684 2001-11-19 Akim Demaille <akim@epita.fr>
18685
18686 * src/lalr.h (consistent): Removed array, whose contents is now
18687 a member of...
18688 (state_t): this structure.
18689 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18690 Adjust.
18691
18692 2001-11-19 Akim Demaille <akim@epita.fr>
18693
18694 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
18695 contents are now members of...
18696 (state_t): this structure.
18697 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
18698 Adjust.
18699
18700 2001-11-19 Akim Demaille <akim@epita.fr>
18701
18702 * src/lalr.h (state_t): New.
18703 (state_table): Be a state_t * instead of a core **.
18704 (accessing_symbol): Remove, part of state_t.
18705 * src/lalr.c: Adjust.
18706 (set_accessing_symbol): Merge into...
18707 (set_state_table): this.
18708 * src/print_graph.c, src/conflicts.c: Adjust.
18709
18710 2001-11-14 Akim Demaille <akim@epita.fr>
18711
18712 * tests/calc.at, tests/output.at, tests/regression.at,
18713 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
18714 now the tests are run in private dirs, therefore AC_CLEANUP and
18715 family can be simplified to 0-ary.
18716 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
18717 use abs. path to find config.h.
18718 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
18719 stderr, there can be way too much random noise.
18720 Instead pass -Werror to GCC and rely on the exit status.
18721 Reported by Wolfram Wagner.
18722
18723 2001-11-14 Akim Demaille <akim@epita.fr>
18724
18725 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
18726 defined only if yyoverflow is defined, to avoid `warning: unused
18727 variable `yyvs1''.
18728 Reported by The Test Suite.
18729
18730 2001-11-14 Akim Demaille <akim@epita.fr>
18731
18732 * src/print.c: Include reduce.h.
18733 Reported by Hans Aberg.
18734
18735 2001-11-14 Akim Demaille <akim@epita.fr>
18736
18737 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
18738 Revert a previous patch: these are really const.
18739 * src/conflicts.c (conflict_report): Additional useless pair of
18740 braces to pacify GCC's warnings for `if () if () {} else {}'.
18741 * src/lex.c (parse_percent_token): Replace equal_offset with
18742 arg_offset.
18743 arg is const.
18744 Be sure to strdup `arg' when used, since there is no reason for
18745 token_buffer not to change.
18746
18747 2001-11-14 Akim Demaille <akim@epita.fr>
18748
18749 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
18750 definition.
18751 * src/main.c (main): Use them.
18752 Suggested by Hans Aberg.
18753
18754 2001-11-12 Akim Demaille <akim@epita.fr>
18755
18756 * src/system.h (ngettext): Now that we use ngettext, be sure to
18757 provide a default definition when NLS are not used.
18758
18759 2001-11-12 Akim Demaille <akim@epita.fr>
18760
18761 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
18762 Use @kbd to denote user input.
18763 (Language and Grammar): ANSIfy the example.
18764 Adjust its layout for info/notinfo.
18765 (Location Tracking Calc): Output error messages to stderr.
18766 Output locations in a more GNUtically correct way.
18767 Fix a couple of Englishos.
18768 Adjust @group/@end group pairs.
18769
18770 2001-11-12 Akim Demaille <akim@epita.fr>
18771
18772 %expect was not functioning at all.
18773
18774 * src/conflicts.c (expected_conflicts): Set to -1.
18775 (conflict_report): Use ngettext.
18776 (conflicts_print): Check %expect and make its violation an error.
18777 * doc/bison.texinfo (Expect Decl): Adjust.
18778 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
18779 * tests/regression.at (%expect not enough, %expect right)
18780 (%expect too much): New.
18781
18782 2001-11-12 Akim Demaille <akim@epita.fr>
18783
18784 * tests/regression.at (Conflicts): Rename as...
18785 (Unresolved SR Conflicts): this.
18786 (Solved SR Conflicts): New.
18787
18788 2001-11-12 Akim Demaille <akim@epita.fr>
18789
18790 * src/reduce.c (print_results): Rename as...
18791 (reduce_output): This.
18792 Output to OUT, passed as argument, instead of output_obstack.
18793 (dump_grammar): Likewise.
18794 (reduce_free): New.
18795 Also free V1.
18796 (reduce_grammar): No longer call reduce_output, since...
18797 * src/print.c (print_results): do it.
18798 * src/main.c (main): Call reduce_free;
18799
18800 2001-11-12 Akim Demaille <akim@epita.fr>
18801
18802 * src/conflicts.c (print_reductions): Accept OUT as argument.
18803 Output to it, not to output_obstack.
18804 * src/print.c (print_actions): Adjust.
18805
18806 2001-11-12 Akim Demaille <akim@epita.fr>
18807
18808 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18809 the result instead of using...
18810 (src_total, rrc_total, src_count, rrc_count): Remove.
18811 (any_conflicts): Remove.
18812 (print_conflicts): Split into...
18813 (conflicts_print, conflicts_output): New.
18814 * src/conflicts.h: Adjust.
18815 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
18816 * src/print.c (print_grammar): Issue `\n' between two rules.
18817 * tests/regression.at (Conflicts): New.
18818 Reported by Tom Lane.
18819
18820 2001-11-12 Akim Demaille <akim@epita.fr>
18821
18822 * tests/regression.at (Invalid input): Remove, duplicate with
18823 ``Invalid input: 1''.
18824
18825 2001-11-12 Akim Demaille <akim@epita.fr>
18826
18827 * tests/torture.at (AT_DATA_STACK_TORTURE)
18828 (Exploding the Stack Size with Alloca)
18829 (Exploding the Stack Size with Malloc): New.
18830
18831 2001-11-12 Akim Demaille <akim@epita.fr>
18832
18833 * src/bison.simple (YYSTACK_REALLOC): New.
18834 (yyparse) [!yyoverflow]: Use it and free the old stack.
18835 Reported by Per Allansson.
18836
18837 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
18838
18839 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18840 define CPP macro, which substitute YYSTYPE by yystype.
18841 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18842 with yyltype/YYLTYPE. This allows inclusion of the generated
18843 header within the parser if the compiler, such as GGC, accepts
18844 multiple equivalent #defines.
18845 From Akim.
18846
18847 2001-11-05 Akim Demaille <akim@epita.fr>
18848
18849 * src/reader.c (symbols_output): New, extracted from...
18850 (packsymbols): here.
18851 (reader): Adjust.
18852
18853 2001-11-05 Akim Demaille <akim@epita.fr>
18854
18855 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18856
18857 2001-11-05 Akim Demaille <akim@epita.fr>
18858
18859 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18860 pattern.
18861
18862 2001-11-05 Akim Demaille <akim@epita.fr>
18863
18864 * src/options.h (struct option_table_struct): set_flags is void*.
18865 * src/options.c (longopts): Support `--output' and `%output'.
18866 (usage): Adjust.
18867 * src/lex.h (tok_setopt): Remove, replaced with...
18868 (tok_intopt, tok_stropt): these new guys.
18869 * src/lex.c (getopt.h): Not needed.
18870 (token_buffer, unlexed_token_buffer): Not const.
18871 (percent_table): Promote `-' over `_' in directive names.
18872 Active `%name-prefix', `file-prefix', and `output'.
18873 (parse_percent_token): Accept possible arguments to directives.
18874 Promote `-' over `_' in directive names.
18875
18876 2001-11-04 Akim Demaille <akim@epita.fr>
18877
18878 * doc/bison.texinfo (Decl Summary): Split the list into
18879 `directives for grammars' and `directives for bison'.
18880 Sort'em.
18881 Add description of `%name-prefix', `file-prefix', and `output'.
18882 Promote `-' over `_' in directive names.
18883 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18884 Simplify the description of `--name-prefix'.
18885 Promote `-' over `_' in directive names.
18886 Promote `--output' over `--output-file'.
18887 Fix the description of `--defines'.
18888 * tests/output.at: Exercise %file-prefix and %output.
18889
18890 2001-11-02 Akim Demaille <akim@epita.fr>
18891
18892 * doc/refcard.tex: Update.
18893
18894 2001-11-02 Akim Demaille <akim@epita.fr>
18895
18896 * src/symtab.h (SUNDEF): New.
18897 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18898 stand for `uninitialized', instead of 0.
18899 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18900 * src/lex.c (lex): Adjust.
18901
18902 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18903 Number it 0.
18904 Let yylex return it instead of a plain 0.
18905 Reported by Dick Streefland.
18906
18907 2001-11-02 Akim Demaille <akim@epita.fr>
18908
18909 * tests/regression.at (Mixing %token styles): New test.
18910
18911 2001-11-02 Akim Demaille <akim@epita.fr>
18912
18913 * src/reader.c (parse_thong_decl): Formatting changes.
18914 (token_translations_init): New, extracted from...
18915 (packsymbols): Here.
18916 Adjust.
18917
18918 2001-11-01 Akim Demaille <akim@epita.fr>
18919
18920 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18921 Check that `9foo.y' produces correct cpp guards.
18922 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18923 guards.
18924 Reported by Wwp.
18925
18926 2001-11-01 Akim Demaille <akim@epita.fr>
18927
18928 * tests/regression.at (Invalid input: 2): New.
18929 * src/lex.c (unlexed_token_buffer): New.
18930 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18931 too.
18932 Reported by Wwp.
18933
18934 2001-11-01 Akim Demaille <akim@epita.fr>
18935
18936 * tests/calc.at: Catch up with 1.30.
18937 * configure.in: Bump to 1.49a.
18938 Adjust to newer Autotest.
18939
18940 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
18941
18942 * src/conflicts.c: Move global variables rrc_total and src_total ...
18943 (print_conflicts): here.
18944 * src/output.c (output): Free global variable user_toknums.
18945 * src/lex.c (token_obstack): Become static.
18946
18947 2001-10-18 Akim Demaille <akim@epita.fr>
18948
18949 * tests/atlocal.in (GCC): Add.
18950 * tests/calc.at: s/m4_match/m4_bmatch/.
18951 s/m4_patsubst/m4_bpatsubst/.
18952 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18953 * configure.in: AC_SUBST(GCC).
18954
18955 2001-10-14 Marc Autret <autret_m@epita.fr>
18956
18957 * src/options.c (create_long_option_table): Fix.
18958
18959 2001-10-10 Akim Demaille <akim@epita.fr>
18960
18961 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18962
18963 2001-10-04 Akim Demaille <akim@epita.fr>
18964
18965 * src/reader.c (parse_union_decl): Push the caracters in
18966 union_obstack, not attrs_obstack.
18967
18968 2001-10-04 Akim Demaille <akim@epita.fr>
18969
18970 Merge in the branch 1.29.
18971
18972 * src/reader.c (packsymbols): Use a temporary obstack for
18973 `%%tokendef', since output_stack is already used elsewhere.
18974
18975 2001-10-02 Akim Demaille <akim@epita.fr>
18976
18977 Bump 1.29d.
18978
18979 2001-10-02 Akim Demaille <akim@epita.fr>
18980
18981 Version 1.29c.
18982
18983 2001-10-02 Akim Demaille <akim@epita.fr>
18984
18985 * tests/regression.at (Invalid CPP headers): New.
18986 From Alexander Belopolsky.
18987 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18988
18989 2001-10-02 Akim Demaille <akim@epita.fr>
18990
18991 * tests/regression.at (Invalid input): New.
18992 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18993 Reported by Shura.
18994
18995 2001-10-02 Akim Demaille <akim@epita.fr>
18996
18997 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18998
18999 2001-10-02 Akim Demaille <akim@epita.fr>
19000
19001 * src/output.c (output_parser): Assert `skeleton'.
19002 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
19003 systems.
19004 From Shura.
19005
19006 2001-10-01 Marc Autret <autret_m@epita.fr>
19007
19008 * src/lex.h: Echo modifications.
19009 * src/lex.c (unlex): Parameter is now token_t.
19010 From Hans Aberg.
19011
19012 2001-10-01 Marc Autret <autret_m@epita.fr>
19013
19014 * src/main.c: Include lex.h.
19015 From Hans Aberg.
19016
19017 2001-09-29 Akim Demaille <akim@epita.fr>
19018
19019 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
19020
19021 2001-09-28 Akim Demaille <akim@epita.fr>
19022
19023 * tests/testsuite.at: Update to newer Autotest.
19024 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
19025
19026 2001-09-27 Akim Demaille <akim@epita.fr>
19027
19028 Position independent wrapper.
19029
19030 * tests/bison: Remove.
19031 * tests/bison.in: New.
19032 * configure.in: Adjust.
19033
19034 2001-09-27 Paul Eggert <eggert@twinsun.com>
19035
19036 Port quotearg fixes from tar 1.13.24.
19037
19038 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19039 tm to be declared.
19040 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19041 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19042
19043 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
19044 * m4/mbrtowc.m4: New file.
19045 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
19046 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
19047
19048 2001-09-27 Akim Demaille <akim@epita.fr>
19049
19050 Bump to 1.29c.
19051
19052 2001-09-27 Akim Demaille <akim@epita.fr>
19053
19054 Version 1.29b.
19055
19056 2001-09-25 Akim Demaille <akim@epita.fr>
19057
19058 * src/system.h: Include `xalloc.h'.
19059 Remove it from the C files.
19060 * src/files.c (output_files): Free the obstacks.
19061 * src/lex.c (init_lex): Rename as...
19062 (lex_init): this.
19063 (lex_free): New.
19064 * src/main.c (main): Use it.
19065
19066 2001-09-24 Marc Autret <autret_m@epita.fr>
19067
19068 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
19069 to output informations in fout (FILE*).
19070 (open_graph, close_graph): Likewise.
19071 (output_graph, output_edge, output_node): Likewise.
19072 * src/vcg.h: Update function prototypes.
19073 * src/print_graph.c (print_graph): Open output graph file.
19074 (print_actions): Adjust.
19075 * src/files.h: Remove extern declaration.
19076 * src/files.c: Remove graph_obstack declaration.
19077 (open_files): Remove graph_obstack initialization.
19078 (output_files): Remove graph_obstack saving.
19079
19080 2001-09-24 Marc Autret <autret_m@epita.fr>
19081
19082 * src/files.c (compute_output_file_names): Fix.
19083
19084 2001-09-24 Marc Autret <autret_m@epita.fr>,
19085 Akim Demaille <akim@epita.fr>
19086
19087 * src/reader.c (reader): Remove call to free_symtab ().
19088 * src/main.c (main): Call it here.
19089 Include symtab.h.
19090 * src/conflicts.c (initialize_conflicts): Rename as...
19091 (solve_conflicts): this.
19092 * src/print.c (print_core, print_actions, print_state)
19093 (print_grammar): Dump to a file instead a `output_obstack'.
19094 (print_results): Dump `output_obstack', and then proceed with the
19095 FILE *.
19096 * src/files.c (compute_output_file_names, close_files): New.
19097 (output_files): Adjust.
19098 * src/main.c (main): Adjust.
19099
19100 2001-09-23 Marc Autret <autret_m@epita.fr>
19101
19102 * src/files.c (compute_header_macro): Computes header macro name
19103 from spec_defines_file when given.
19104
19105 2001-09-23 Marc Autret <autret_m@epita.fr>
19106
19107 * src/files.c (output_files): Add default extensions.
19108
19109 2001-09-22 Akim Demaille <akim@epita.fr>
19110
19111 * src/conflicts.c (finalize_conflicts): Rename as...
19112 (free_conflicts): this.
19113
19114 2001-09-22 Akim Demaille <akim@epita.fr>
19115
19116 * src/gram.c (gram_free): Rename back as...
19117 (dummy): this.
19118 (output_token_translations): Free `token_translations'.
19119 * src/symtab.c (free_symtab): Free the tag field.
19120
19121 2001-09-22 Akim Demaille <akim@epita.fr>
19122
19123 Remove `translations' as it is always set to true.
19124
19125 * src/gram.h: Adjust.
19126 * src/reader.c (packsymbols, parse_token_decl): Adjust
19127 * src/print.c (print_grammar): Adjust.
19128 * src/output.c (output_token_translations): Adjust.
19129 * src/lex.c (lex): Adjust.
19130 * src/gram.c: Be sure the set pointers to NULL.
19131 (dummy): Rename as...
19132 (gram_free): this.
19133
19134 2001-09-22 Akim Demaille <akim@epita.fr>
19135
19136 * configure.in: Invoke AM_LIB_DMALLOC.
19137 * src/system.h: Use dmalloc.
19138 * src/LR0.c: Be sure to have pointers initialized to NULL.
19139 (allocate_itemsets): Allocate kernel_items only if needed.
19140
19141 2001-09-22 Akim Demaille <akim@epita.fr>
19142
19143 * configure.in: Bump to 1.29b.
19144 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
19145 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
19146 need xmalloc.c in calc.y.
19147 From Pascal Bart.
19148
19149 2001-09-21 Akim Demaille <akim@epita.fr>
19150
19151 Version 1.29a.
19152 * Makefile.maint, config/config.guess, config/config.sub,
19153 * config/missing: Update from masters.
19154 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
19155 upon package.m4.
19156 * configure.in (ALL_LINGUAS): Add `tr'.
19157
19158 2001-09-21 Akim Demaille <akim@epita.fr>
19159
19160 * tests/Makefile.am (package.m4): Move to...
19161 ($(srcdir)/$(TESTSUITE)): here.
19162
19163 2001-09-20 Akim Demaille <akim@epita.fr>
19164
19165 * src/complain.c: No longer try to be standalone: use system.h.
19166 Don't assume __STDC__ is defined to 1. Just test if it is defined.
19167 * src/complain.h: Likewise.
19168 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
19169 Remove the unused variable `n'.
19170 From Albert Chin-A-Young.
19171
19172 2001-09-18 Marc Autret <autret_m@epita.fr>
19173
19174 * doc/bison.1: Update.
19175 * doc/bison.texinfo (Bison Options): Update --defines and --graph
19176 descriptions.
19177 (Option Cross Key): Update.
19178 Add --graph.
19179
19180 2001-09-18 Marc Autret <autret_m@epita.fr>
19181
19182 * tests/regression.at: New test (comment in %union).
19183
19184 2001-09-18 Marc Autret <autret_m@epita.fr>
19185
19186 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
19187 do that.
19188 Reported by Keith Browne.
19189
19190 2001-09-18 Marc Autret <autret_m@epita.fr>
19191
19192 * tests/output.at: Add tests for --defines and --graph.
19193
19194 2001-09-18 Marc Autret <autret_m@epita.fr>
19195
19196 * tests/output.at: Removes tests of %{header,src}_extension features.
19197
19198 2001-09-18 Akim Demaille <akim@epita.fr>
19199
19200 * tests/Makefile.am (package.m4): New.
19201 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
19202 (_AT_CHECK_CALC_ERROR): Likewise.
19203 Factor the `, ' part of verbose error messages.
19204
19205 2001-09-18 Marc Autret <autret_m@epita.fr>
19206
19207 * src/getargs.c (longopts): Declare --defines and --graph as options
19208 with optional arguments.
19209 * src/files.h: Add extern declarations.
19210 * src/files.c (spec_graph_file, spec_defines_file): New.
19211 (output_files): Update.
19212 Remove CPP-outed code.
19213
19214 2001-09-18 Marc Autret <autret_m@epita.fr>
19215
19216 Turn off %{source,header}_extension feature.
19217
19218 * src/files.c (compute_exts_from_gf): Update.
19219 (compute_exts_from_src): Update.
19220 (output_files): CPP-out useless code.
19221 * src/files.h: Remove {header,source}_extension extern declarations.
19222 * src/reader.c (parse_dquoted_param): CPP-out.
19223 (parse_header_extension_decl): Remove.
19224 (parse_source_extension_decl): Remove.
19225 (read_declarations): Remove cases tok_{hdrext,srcext}.
19226 * src/lex.c (percent_table): Remove {header,source}_extension entries.
19227 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
19228
19229 2001-09-10 Akim Demaille <akim@epita.fr>
19230
19231 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
19232 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
19233 (AT_CHECK_OUTPUT): this.
19234 Merely check ls' exit status, its output is useless.
19235
19236 2001-09-10 Akim Demaille <akim@epita.fr>
19237
19238 * tests/calc.at: Use m4_match.
19239 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
19240
19241 2001-09-10 Marc Autret <autret_m@epita.fr>,
19242 Akim Demaille <akim@epita.fr>
19243
19244 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
19245 enum color_e.
19246 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
19247 to `normal'.
19248 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
19249 * src/lex.h: Adjust prototype.
19250 (token_t): Add `tok_undef'.
19251 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
19252 (parse_percent_token): Now returns token_t.
19253 Add default statement in switch.
19254 (lex): Separate `c' as an input variable, from the token_t result
19255 part.
19256 (unlexed): Is a token_t.
19257
19258 2001-09-10 Akim Demaille <akim@epita.fr>
19259
19260 * configure.in: Bump to 1.29a.
19261
19262 2001-09-07 Akim Demaille <akim@epita.fr>
19263
19264 Version 1.29.
19265
19266 2001-08-30 Akim Demaille <akim@epita.fr>
19267
19268 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
19269 * m4/atconfig.m4: Remove.
19270 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
19271 * tests/bison: New.
19272 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
19273 m4_if, m4_patsubst, and m4_regexp.
19274 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
19275 `input' file instead of echo.
19276
19277 2001-08-29 Akim Demaille <akim@epita.fr>
19278
19279 Bump to 1.28e.
19280
19281 2001-08-29 Akim Demaille <akim@epita.fr>
19282
19283 Version 1.28d.
19284
19285 2001-08-29 Paul Eggert <eggert@twinsun.com>
19286
19287 * src/bison.simple (yyparse): Don't take the address of an
19288 item before the start of an array, as that doesn't conform to
19289 the C Standard.
19290
19291 2001-08-29 Robert Anisko <anisko_r@epita.fr>
19292
19293 * doc/bison.texinfo (Location Tracking Calc): New node.
19294
19295 2001-08-29 Paul Eggert <eggert@twinsun.com>
19296
19297 * src/output.c (output): Do not define const, as this now
19298 causes more problems than it cures.
19299
19300 2001-08-29 Akim Demaille <akim@epita.fr>
19301
19302 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
19303 the nodes.
19304 Be sure to tag the `detailmenu'.
19305
19306 2001-08-29 Akim Demaille <akim@epita.fr>
19307
19308 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
19309 download in a tmp dir.
19310
19311 2001-08-28 Marc Autret <autret_m@epita.fr>
19312
19313 * config/depcomp: New file.
19314
19315 2001-08-28 Marc Autret <autret_m@epita.fr>
19316
19317 * doc/bison.1 (mandoc): Adjust.
19318 From Juan Manuel Guerrero.
19319
19320 2001-08-28 Marc Autret <autret_m@epita.fr>
19321
19322 * src/print_graph.c (print_state): Fix.
19323
19324 2001-08-27 Marc Autret <autret_m@epita.fr>
19325
19326 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
19327 char * members.
19328 Echo modifications to the functions prototypes.
19329 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
19330
19331 2001-08-27 Marc Autret <autret_m@epita.fr>
19332
19333 * src/vcg.c: Include `xalloc.h'.
19334 (add_colorentry): New.
19335 (add_classname): New.
19336 (add_infoname): New.
19337 * src/vcg.h: Add new prototypes.
19338
19339 2001-08-27 Akim Demaille <akim@epita.fr>
19340
19341 * Makefile.maint: Sync. again with CVS Autoconf.
19342
19343 2001-08-27 Akim Demaille <akim@epita.fr>
19344
19345 * Makefile.maint: Formatting changes.
19346 (po-update, cvs-update, update): New targets.
19347 (AMTAR): Remove.
19348
19349 2001-08-27 Akim Demaille <akim@epita.fr>
19350
19351 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19352 * Makefile.maint: Sync. with CVS Autoconf.
19353
19354 2001-08-27 Marc Autret <autret_m@epita.fr>
19355
19356 * src/vcg.h (struct infoname_s): New.
19357 (struct colorentry_s): New.
19358 (graph_s): New fields {vertical,horizontal}_order in structure.
19359 Add `infoname' field.
19360 Add `colorentry' field;
19361 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
19362 (G_HORIZONTAL_ORDER): New.
19363 (G_INFONAME): New.
19364 (G_COLORENTRY): New.
19365 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
19366 Add output of `infoname'.
19367 Add output of `colorentry'.
19368
19369 2001-08-27 Marc Autret <autret_m@epita.fr>
19370
19371 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
19372 This one shadowed a global parameter.
19373
19374 2001-08-24 Marc Autret <autret_m@epita.fr>
19375
19376 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
19377 instead of `unsigned'.
19378 (print_state): Do not call obstack_object_size () in obstack_grow ()
19379 to avoid macro variables shadowing.
19380
19381 2001-08-23 Marc Autret <autret_m@epita.fr>
19382
19383 * src/lex.c (percent_table): Typo: s/naem/name/.
19384 Add graph option.
19385 Normalize new options declarations.
19386
19387 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
19388
19389 * tests/suite.at: Exercise %header_extension and %source_extension.
19390
19391 2001-08-16 Marc Autret <autret_m@epita.fr>
19392
19393 * src/reader.c (parse_dquoted_param): New.
19394 (parse_header_extension_decl): Use it.
19395 (parse_source_extension_decl): Likewise.
19396
19397 2001-08-16 Marc Autret <autret_m@epita.fr>
19398
19399 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
19400 (get_xxxx_str): Use assert () instead of complain ().
19401 Remove return invokations in default cases.
19402 (get_decision_str): Modify default behaviour. Remove second argument.
19403 Echo modifications on calls.
19404 (output_graph): Fix.
19405
19406 2001-08-16 Marc Autret <autret_m@epita.fr>
19407
19408 * src/getargs.c (usage): Update with ``-g, --graph''.
19409
19410 2001-08-16 Marc Autret <autret_m@epita.fr>
19411
19412 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
19413 (Option Cross Key): Likewise.
19414 * doc/bison.1: Update.
19415
19416 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
19417
19418 * src/output.c (output_master_parser): Don't finish action_obstack.
19419 (output_parser): Don't care about the muscle action, here.
19420 (prepare): Copy the action_obstack in the action muscle.
19421 (output): Free action_obstack.
19422
19423 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19424
19425 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
19426 will contain `%union' declaration.
19427 (parse_union_decl): Delete #line directive output.
19428 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
19429 informations about %union.
19430 (parse_union_decl): Copy the union_obstack in the muscle stype.
19431 * src/bison.simple: Add new #line directive.
19432 Add typdef %%stype YYSTYPE.
19433
19434 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
19435
19436 * src/bison.simple: Add new `#line' directive.
19437
19438 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
19439
19440 * src/bison.simple: New `#line' directive.
19441 * src/output.c (output_parser): Support new dynamic muscle input_line.
19442
19443 2001-09-22 Marc Autret <autret_m@epita.fr>
19444
19445 * src/output.c (output_master_parser): New.
19446 (output_parser): Be more re-entrant.
19447
19448 2001-09-21 Marc Autret <autret_m@epita.fr>
19449
19450 * src/reader.c (copy_definition, parse_union_decl): Update and use
19451 `linef' muscle.
19452 (copy_action): Likewise.
19453 Use obstack_1grow ().
19454 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
19455
19456 2001-09-21 Marc Autret <autret_m@epita.fr>
19457
19458 * src/options.c (option_table): Adjust.
19459 * src/lex.c (parse_percent_token): Fix.
19460
19461 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19462
19463 * src/options.c (symtab.h): Include it, need by lex.h.
19464
19465 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
19466
19467 * src/lex.c (parse_percent_token): Change type of variable `tx', which
19468 is now an option_table_struct*.
19469 (option_strcmp): New function option_strcmp.
19470 (parse_percent_token): Call option_strcmp.
19471 * src/getargs.c (xalloc.h, options.h): Include it.
19472 (getargs): Call create_long_option_table.
19473 (getargs): Free longopts at the end of the function.
19474 (shortopts): Move in options.c.
19475 * src/options.c (create_long_option_table): New function. Convert
19476 information from option_table to option structure.
19477 * src/reader.c (options.h): Include it.
19478
19479 * src/Makefile.am: Adjust.
19480 * src/options.c (option_table): Create from longopts and percent_table.
19481 * src/getargs.c (longopts): Delete.
19482 * src/lex.c (struct percent_table_struct): Delete.
19483 (percent_table): Delete.
19484 (options.h): Include it.
19485 * src/options.c: Create.
19486 * src/options.h: Create.
19487 Declare enum opt_access_e.
19488 Define struct option_table_struct.
19489
19490 2001-09-20 Marc Autret <autret_m@epita.fr>
19491
19492 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
19493 sections of Bison.
19494
19495 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
19496
19497 * src/bison.simple: s/%%filename/%%skeleton.
19498 * src/muscle_tab.c (getargs.h): Include it.
19499 (muscle_init): Insert new muscle skeleton.
19500
19501 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
19502
19503 * src/output.c (output_parser): Delete unused variable actions_dumped.
19504
19505 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
19506
19507 * src/output.c (output): Delete call to reader_output_yylsp.
19508 * src/reader.c (reader): Likewise.
19509 * src/reader.h: Delete declaration of reader_output_yylsp.
19510
19511 2001-09-02 Marc Autret <autret_m@epita.fr>
19512
19513 * src/reader.c: Include muscle_tab.h.
19514 (parse_union_decl): Update.
19515 (parse_macro_decl): Rename parse_muscle_decl.
19516 Update to use renamed functions and variable.
19517 (read_declarations, copy_action, read_additionnal_code, : Updated
19518 with correct variables and functions names.
19519 (packsymbols, reader): Likewise.
19520
19521 * src/reader.h (muscle_obstack): Extern declaration update.
19522
19523 * src/output.c: Include muscle_tab.h
19524 In all functions using macro_insert, change by using muscle_insert ().
19525 (macro_obstack): Rename muscle_obstack.
19526 Echo modifications in the whole file.
19527 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
19528 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
19529 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
19530
19531 * src/muscle_tab.h: Update double inclusion macros.
19532 (macro_entry_s): Rename muscle_entry_s.
19533 Update prototypes.
19534
19535 * src/muscle_tab.c: Include muscle_tab.h.
19536 Rename macro_tabble to muscle_table.
19537 (mhash1, mhash2, mcmp): Use muscle_entry.
19538 (macro_init): Rename muscle_init. Update.
19539 (macro_insert): Rename muscle_insert. Update.
19540 (macro_find): Rename muscle_find. Update.
19541
19542 * src/main.c: Include muscle_tab.h.
19543 (main): Call muscle_init ().
19544 * src/Makefile.am (bison_SOURCES): Echo modifications.
19545
19546 2001-09-02 Marc Autret <autret_m@epita.fr>
19547
19548 Now the files macro_tab.[ch] are named muscle_tab.[ch].
19549
19550 * src/muscle_tab.c, src/muscle_tab.h: Add files.
19551
19552 2001-09-02 Marc Autret <autret_m@epita.fr>
19553
19554 * src/macrotab.c, src/macrotab.h: Remove.
19555
19556 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
19557
19558 * src/reader.c (copy_guard): Use muscle to specify the `#line'
19559 filename.
19560
19561 2001-09-01 Marc Autret <autret_m@epita.fr>
19562
19563 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
19564 to an explicit value to activate the feature. We do it here.
19565
19566 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19567
19568 * src/output.c (prepare): Delete the `filename' muscule insertion.
19569 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
19570 (parse_union_decl): Likewise.
19571 * src/macrotab.c (macro_init): Initialize filename by infile.
19572
19573 2001-08-31 Marc Autret <autret_m@epita.fr>
19574
19575 * src/bison.simple (YYLSP_NEEDED): New definition.
19576 * src/output.c (prepare): Add macro insertion of `locations_flag'
19577
19578 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19579
19580 * src/output.c (prepare): Delete insertion of previous muscles,
19581 and insert the `prefix' muscles.
19582 * src/macrotab.c (macro_init): Likewise.
19583 (macro_init): Initialization prefix directive by `yy'.
19584 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
19585 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
19586 yylval, yydebug, yyerror, yynerrs and yyparse.
19587 New directive `#define' to substitute yydebug, ... with option
19588 name_prefix.
19589
19590 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19591
19592 * src/main.c (main): Standardize.
19593 * src/output.c (output_table_data, output_parser): Likewise.
19594 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
19595
19596 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
19597
19598 * src/reader.c (read_additionnal_code): Rename %%user_code to
19599 %%epilogue.
19600 * src/output.c (output): Rename %%declarations to %%prologue.
19601 * src/bison.simple: Echo modifications.
19602
19603 2001-08-31 Marc Autret <autret_m@epita.fr>
19604
19605 * src/reader.c (readgram): CleanUp.
19606 (output_token_defines): Likewise.
19607 (packsymbols): Likewise.
19608 (reader): Likewise.
19609 * src/output.c (output): CPP-out useless code.
19610
19611 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
19612
19613 * src/reader.c (reader): Delete obsolete call to function
19614 output_trailers and output_headers.
19615 * src/output.h: Remove obsolete functions prototypes of output_headers
19616 and output_trailers.
19617
19618 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
19619
19620 * src/main.c: Include macrotab.h.
19621 * src/macrotab.h (macro_entry_s): Constify fields.
19622 Adjust functions prototypes.
19623 * src/macrotab.c (macro_insert): Constify key and value.
19624 (macro_find): Constify key.
19625 (macro_insert): Include 'xalloc.h'
19626 (macro_insert): Use XMALLOC.
19627 (macro_find): Constify return value.
19628 * src/output.c (output_table_data): Rename table to table_data.
19629 (output_parser): Constify macro_key, macro_value.
19630
19631 2001-08-30 Marc Autret <autret_m@epita.fr>
19632
19633 * src/reader.c (parse_skel_decl): New.
19634 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
19635 * src/lex.h (token_t): New token `tok_skel'.
19636 * src/lex.c (percent_table): Add skeleton option entry.
19637 Standardize.
19638
19639 2001-08-29 Marc Autret <autret_m@epita.fr>
19640
19641 * src/bison.simple: Add %%user_code directive at the end.
19642 * src/reader.c (read_additionnal_code): New.
19643 (reader): Use it.
19644 * src/output.c (output_program): Remove.
19645 (output): Update.
19646
19647 2001-08-28 Marc Autret <autret_m@epita.fr>
19648
19649 * src/output.c (output_actions): Clean up.
19650 (output_gram): CPP-out useless code.
19651 * src/reader.c (reader): Clean up, CPP-out useless code.
19652
19653 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
19654
19655 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
19656 directive.
19657 * src/bison.simple: Add `%%definitions'.
19658
19659 2001-08-28 Marc Autret <autret_m@epita.fr>
19660
19661 * config/depcomp: New file.
19662
19663 2001-08-27 Paul Eggert <eggert@twinsun.com>
19664
19665 * src/bison.simple (yyparse): Don't take the address of an
19666 item before the start of an array, as that doesn't conform to
19667 the C Standard.
19668
19669 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19670
19671 * src/output.c (output): Remove the initialization of the macro
19672 obstack. It was done too late here.
19673
19674 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
19675 completely wrong.
19676 (reader): Initialize the macro obstack here, since we need it to grow
19677 '%define' directives.
19678
19679 * src/reader.h: Declare the macro obstack as extern.
19680
19681 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
19682
19683 * src/output.c (output_parser): Fix. Store single '%' characters in
19684 the output obstack instead of throwing them away.
19685
19686 2001-08-27 Akim Demaille <akim@epita.fr>
19687
19688 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
19689
19690 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19691
19692 * lib/Makefile.am: Adjust.
19693
19694 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19695
19696 * src/bison.simple: Update and add '%%' directives.
19697
19698 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19699
19700 * src/reader.c (reader): Remove calls to 'output_headers' and
19701 'output_trailers'. Remove some C output.
19702 (readgram): Disable a piece of code that was writing a default
19703 definition for 'YYSTYPE'.
19704 (reader_output_yylsp): Remove.
19705 (packsymbols): Output token defintions to a macro.
19706 (copy_definition): Disable C output.
19707
19708 * src/reader.c (parse_macro_decl): New function used to parse macro
19709 declarations.
19710 (copy_string2): Put the body of copy_string into this new function.
19711 Add a parameter to let the caller choose whether he wants to copy the
19712 string delimiters or not.
19713 (copy_string): Be a simple call to copy_string2 with the last argument
19714 bound to true.
19715 (read_declarations): Add case for macro definition.
19716 (copy_identifier): New.
19717 (parse_macro_decl): Read macro identifiers using copy_identifier
19718 rather than lex.
19719
19720 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19721
19722 * src/output.c (prepare): Add prefixed names.
19723 (output_parser): Output semantic actions.
19724 (output_parser): Fix bug on '%%line' directives.
19725
19726 * src/output.c (output_headers): Remove. The C code printed by this
19727 function should now be in the skeletons.
19728 (output_trailers): Remove.
19729 (output): Disable call to 'reader_output_yylsp'.
19730 (output_rule_data): Do not output tables to the table obstack.
19731
19732 * src/output.c: Remove some C dedicated output.
19733 Improve the use of macro and output obstacks.
19734 (output_defines): Remove.
19735
19736 * src/output.c (output_token_translations): Associate 'translate'
19737 table with a macro. No output to the table obstack.
19738 (output_gram): Same for 'rhs' and 'prhs'.
19739 (output_stos): Same for 'stos'.
19740 (output_rule_data): Same for 'r1' and 'r2'.
19741 (token_actions): Same for 'defact'.
19742 (goto_actions): Same for 'defgoto'.
19743 (output_base): Same for 'pact' and 'pgoto'.
19744 (output_table): Same for 'table'.
19745 (output_check): Same for 'check'.
19746
19747 * src/output.c (output_table_data): New function.
19748 (output_short_table): Remove.
19749 (output_short_or_char_table): Remove.
19750
19751 * src/output.c (output_parser): Replace most of the skeleton copy code
19752 with something new. Skeletons are now processed character by character
19753 rather than line by line, and Bison looks for '%%' macros. This is the
19754 first step in making Bison's output process (a lot) more flexible.
19755 (output_parser): Use the macro table.
19756
19757 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19758
19759 * src/main.c (main): Initialize the macro table.
19760
19761 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19762
19763 * src/lex.c (percent_table): Add tok_define.
19764 * src/lex.h: Add tok_define.
19765
19766 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19767
19768 * src/macrotab.c: New file.
19769 * src/macrotab.h: New file.
19770 * src/Makefile.am: Update.
19771
19772 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
19773
19774 * lib/hash.c: New file.
19775 * lib/hash.h: New file.
19776 * lib/Makefile.am: Update.
19777
19778 2001-08-15 Akim Demaille <akim@epita.fr>
19779
19780 Version 1.28c.
19781
19782 2001-08-15 Marc Autret <autret_m@epita.fr>
19783
19784 * src/reader.c (readgram): Indent output macro YYSTYPE.
19785 (packsymbols): Likewise.
19786 (output_token_defines): Likewise.
19787 * src/files.c: Standardize.
19788 (compute_header_macro): New.
19789 (defines_obstack_save): New. Use compute_header_macro.
19790 (output_files): Update. Use defines_obstack_save.
19791
19792 2001-08-15 Akim Demaille <akim@epita.fr>
19793
19794 * doc/bison.texinfo (Table of Symbols): Document
19795 YYSTACK_USE_ALLOCA.
19796
19797 2001-08-15 Akim Demaille <akim@epita.fr>
19798
19799 * missing: Update from CVS Automake.
19800 * config/config.guess, config/config.sub, config/texinfo.tex:
19801 Update from gnu.org.
19802
19803 2001-08-15 Akim Demaille <akim@epita.fr>
19804
19805 * Makefile.maint: Sync with CVS Autoconf.
19806
19807 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
19808
19809 * doc/bison.texinfo: Include GNU Free Documentation License from
19810 `fdl.texi'.
19811 * doc/fdl.texi: Add to package.
19812
19813 2001-08-14 Marc Autret <autret_m@epita.fr>
19814
19815 Turn on %{source,header}_extension features.
19816
19817 * src/lex.c (percent_table): Un-CPP out header_extension and
19818 source_extension.
19819 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
19820 (compute_exts_from_src): Remove conditions. It restores priorities
19821 between options.
19822
19823 2001-08-14 Marc Autret <autret_m@epita.fr>
19824
19825 * src/files.c (compute_base_names): Add extensions computing when
19826 `--file-prefix' used.
19827 Standardize function calls.
19828
19829 2001-08-13 Marc Autret <autret_m@epita.fr>
19830
19831 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
19832 defining it (defined but null disables alloca).
19833
19834 2001-08-13 Marc Autret <autret_m@epita.fr>
19835
19836 * src/bison.simple (_yy_memcpy): CPP reformat.
19837
19838 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
19839
19840 * tests/atconfig.in (CPPFLAGS): Fix.
19841
19842 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
19843
19844 * doc/bison.texinfo: Include GNU General Public License from
19845 `gpl.texi'.
19846 * doc/gpl.texi: Add to package.
19847
19848 2001-08-10 Marc Autret <autret_m@epita.fr>
19849
19850 * src/print_graph.h: Fix.
19851 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19852
19853 2001-08-10 Akim Demaille <akim@epita.fr>
19854
19855 * src/system.h: Provide default declarations for stpcpy, strndup,
19856 and strnlen.
19857
19858 2001-08-10 Robert Anisko <anisko_r@epita.fr>
19859
19860 * doc/bison.texinfo (Locations): Update @$ stuff.
19861
19862 2001-08-09 Robert Anisko <anisko_r@epita.fr>
19863
19864 * src/bison.simple (YYLLOC_DEFAULT): Update.
19865 (yyparse): Adjust.
19866
19867 2001-08-08 Marc Autret <autret_m@epita.fr>
19868
19869 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
19870 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19871 Reported by Fabrice Bauzac.
19872
19873 2001-08-08 Marc Autret <autret_m@epita.fr>
19874
19875 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19876 * src/vcg.c (output_node): Fix.
19877 * src/vcg.h: Cleanup.
19878 * src/print_graph.c: Add comments.
19879 (node_output_size): New global variable. Simplify the formatting of
19880 the VCG graph output.
19881 (print_actions): Unused code is now used. It notifies the final state
19882 and no action states in the VCG graph. It also give the reduce actions.
19883 The `shift and goto' edges are red and the `go to state' edges are
19884 blue.
19885 Get the current node name and node_obstack by argument.
19886 (node_obstack): New variable.
19887 (print_state): Manage node_obstack.
19888 (print_core): Use node_obstack given by argument.
19889 A node is not only computed here but in print_actions also.
19890 (print_graph): CPP out useless code instead of commenting it.
19891
19892 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
19893
19894 * tests/atconfig.in (CPPFLAGS): Fix.
19895
19896 2001-08-07 Akim Demaille <akim@epita.fr>
19897
19898 * src/print_graph.c (quote): New.
19899 (print_core): Use it.
19900
19901 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
19902
19903 * src/vcg.c (complain.h): Include it.
19904 Unepitaize `return' invocations.
19905 [NDEBUG] (main): Remove.
19906 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
19907 * src/files.c (open_files): Initialize graph_obstack.
19908 * src/print_graph.c (print_actions): CPP out useless code.
19909 (print_core): Don't output the last `\n' in labels.
19910 Use `quote'.
19911 * src/files.c (output_files): Output the VCG file.
19912 * src/main.c (main): Invoke print_graph ();
19913
19914 2001-08-06 Marc Autret <autret_m@epita.fr>
19915
19916 Automaton VCG graph output.
19917 Using option ``-g'' or long option ``--graph'', you can generate
19918 a gram_filename.vcg file containing a VCG description of the LALR (1)
19919 automaton of your grammar.
19920
19921 * src/main.c: Call to print_graph() function.
19922 * src/getargs.h: Update.
19923 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19924 (graph_flag): New flag.
19925 (longopts): Update.
19926 (getargs): Add case `g'.
19927 * src/files.c (graph_obstack): New obstack struct.
19928 (open_files): Initialize new obstack.
19929 (output_files): Saves graph_obstack if required.
19930 * src/files.h (graph_obstack): New extern declaration.
19931 * src/Makefile.am: Add new source files.
19932
19933 2001-08-06 Marc Autret <autret_m@epita.fr>
19934
19935 * src/print_graph.c, src/print_graph.h (graph): New.
19936 * src/vcg.h: New file.
19937 * src/vcg.c: New file, VCG graph handling.
19938
19939 2001-08-06 Marc Autret <autret_m@epita.fr>
19940
19941 Add of %source_extension and %header_extension which specify
19942 the source or/and the header output file extension.
19943
19944 * src/files.c (compute_base_names): Remove initialisation of
19945 src_extension and header_extension.
19946 (compute_exts_from_gf): Update.
19947 (compute_exts_from_src): Update.
19948 (output_files): Update.
19949 * src/reader.c (parse_header_extension_decl): New.
19950 (parse_source_extension_decl): New.
19951 (read_declarations): New case statements for the new tokens.
19952 * src/lex.c (percent_table): Add entries for %source_extension
19953 and %header_extension.
19954 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19955
19956 2001-08-06 Marc Autret <autret_m@epita.fr>
19957
19958 * configure.in: Bump to 1.28c.
19959 * doc/bison.texinfo: Texinfo thingies.
19960
19961 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
19962
19963 * tests/atconfig.in (CPPFLAGS): Add.
19964 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19965
19966 2001-08-03 Akim Demaille <akim@epita.fr>
19967
19968 Version 1.28b.
19969
19970 2001-08-03 Akim Demaille <akim@epita.fr>
19971
19972 * tests/Makefile.am (check-local): Ship testsuite.
19973 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19974 Include `string.h'.
19975
19976 2001-08-03 Akim Demaille <akim@epita.fr>
19977
19978 * configure.in: Try using -Wformat when compiling.
19979
19980 2001-08-03 Akim Demaille <akim@epita.fr>
19981
19982 * configure.in: Bump to 1.28b.
19983
19984 2001-08-03 Akim Demaille <akim@epita.fr>
19985
19986 * src/complain.c: Adjust strerror_r portability issues.
19987
19988 2001-08-03 Akim Demaille <akim@epita.fr>
19989
19990 Version 1.28a.
19991
19992 2001-08-03 Akim Demaille <akim@epita.fr>
19993
19994 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19995 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19996 * src/getargs.c: Include complain.h.
19997 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19998 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19999
20000 2001-08-03 Akim Demaille <akim@epita.fr>
20001
20002 * src/reader.c (readgram): Display hidden chars in error messages.
20003
20004 2001-08-03 Akim Demaille <akim@epita.fr>
20005
20006 Update to gettext 0.10.39.
20007
20008 2001-08-03 Akim Demaille <akim@epita.fr>
20009
20010 * lib/strspn.c: New.
20011
20012 2001-08-01 Marc Autret <autret_m@epita.fr>
20013
20014 * doc/bison.texinfo: Update.
20015 * doc/bison.1 (mandoc): Update.
20016 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
20017 * src/files.c: Support output files extensions computing.
20018 (src_extension): New static variable.
20019 (header_extension): New static variable.
20020 (tr): New function.
20021 (get_extension_index): New function, gets the index of an extension
20022 filename in a string.
20023 (compute_exts_from_gf): New function, computes extensions from the
20024 grammar file extension.
20025 (compute_exts_from_src): New functions, computes extensions from the
20026 C source file extension, file given by ``-o'' option.
20027 (compute_base_names): Update.
20028 (output_files): Update.
20029
20030 2001-08-01 Robert Anisko <anisko_r@epita.fr>
20031
20032 * doc/bison.texi: Document @$.
20033 (Locations): New section.
20034
20035 2001-07-18 Akim Demaille <akim@epita.fr>
20036
20037 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
20038 * config/prev-version.txt, config/move-if-change: New.
20039 * Makefile.am: Adjust.
20040
20041 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
20042
20043 * src/bison.simple (yyparse): Suppress warning `comparaison
20044 between signed and unsigned'.
20045
20046 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
20047
20048 * src/getargs.h (raw_flag): Remove.
20049 * src/getargs.c: Die on `-r'/`--raw'.
20050 * src/lex.c (parse_percent_token): Die on `%raw'.
20051 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
20052 * tests/calc.at: Suppress test with option `--raw'.
20053
20054 2001-07-14 Akim Demaille <akim@epita.fr>
20055
20056 * config/: New.
20057 * configure.in: Require Autoconf 2.50.
20058 Update to gettext 0.10.38.
20059
20060 2001-03-16 Akim Demaille <akim@epita.fr>
20061
20062 * doc/bison.texinfo: ANSIfy the examples.
20063
20064 2001-03-16 Akim Demaille <akim@epita.fr>
20065
20066 * getargs.c (skeleton): New variable.
20067 (longopts): --skeleton is a new option.
20068 (shortopts, getargs): -S is a new option.
20069 * getargs.h: Declare skeleton.
20070 * output.c (output_parser): Use it.
20071
20072 2001-03-16 Akim Demaille <akim@epita.fr>
20073
20074 * m4/strerror_r.m4: New.
20075 * m4/error.m4: Run AC_FUNC_STRERROR_R.
20076 * lib/error.h, lib/error.c: Update.
20077
20078 2001-03-16 Akim Demaille <akim@epita.fr>
20079
20080 * src/getargs.c (longopts): Clean up.
20081
20082 2001-02-21 Akim Demaille <akim@epita.fr>
20083
20084 * src/reader.c (gensym): `gensym_count' is your own.
20085 Use a static buf to create the symbol name, as token_buffer is no
20086 longer a buffer.
20087
20088 2001-02-08 Akim Demaille <akim@epita.fr>
20089
20090 * src/conflicts.c (conflict_report): Be sure not to append to res
20091 between two calls, which could happen if both first sprintf were
20092 skipped, but not the first cp += strlen.
20093
20094 2001-02-08 Akim Demaille <akim@epita.fr>
20095
20096 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
20097 New, from fileutils 4.0.37.
20098 * configure.in: Require Autoconf 2.49c. I took some time before
20099 making this decision. This is the only way out for portability
20100 issues in Bison, it would mean way too much duplicate effort to
20101 import in Bison features implemented in 2.49c since 2.13.
20102 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
20103
20104 2001-02-02 Akim Demaille <akim@epita.fr>
20105
20106 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
20107 * lib/xalloc.h, lib/xmalloc.c: Update.
20108
20109 2001-01-19 Akim Demaille <akim@epita.fr>
20110
20111 Get rid of the ad hoc handling of token_buffer in the scanner: use
20112 the obstacks.
20113
20114 * src/lex.c (token_obstack): New.
20115 (init_lex): Initialize it. No longer call...
20116 (grow_token_buffer): this. Remove it.
20117 Adjust all the places which used it to use the obstack.
20118
20119 2001-01-19 Akim Demaille <akim@epita.fr>
20120
20121 * src/lex.h: Rename all the tokens:
20122 s/\bENDFILE\b/tok_eof/g;
20123 s/\bIDENTIFIER\b/tok_identifier/g;
20124 etc.
20125 Let them be enums, not #define, to ease debugging.
20126 Adjust all the code.
20127
20128 2001-01-18 Akim Demaille <akim@epita.fr>
20129
20130 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
20131 * src/lex.c (maxtoken, grow_token_buffer): Static.
20132
20133 2001-01-18 Akim Demaille <akim@epita.fr>
20134
20135 Since we now use obstacks, more % directives can be enabled.
20136
20137 * src/lex.c (percent_table): Also accept `%yacc',
20138 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
20139 `%debug'.
20140 Handle the actions for `%semantic_parser' and `%pure_parser' here,
20141 instead of returning a token.
20142 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
20143 * src/reader.c (read_declarations): Adjust.
20144 * src/files.c (open_files): Don't call `compute_base_names', don't
20145 compute `attrsfile' since they depend upon data which might be
20146 *in* the input file now.
20147 (output_files): Do it here.
20148 * src/output.c (output_headers): Document the fact that this patch
20149 introduces a guaranteed SEGV for semantic parsers.
20150 * doc/bison.texinfo: Document them.
20151 * tests/suite.at: Exercise these %options.
20152
20153 2000-12-20 Akim Demaille <akim@epita.fr>
20154
20155 Also handle the output file (--verbose) with obstacks.
20156
20157 * files.c (foutput): Remove.
20158 (output_obstack): New.
20159 Adjust all dependencies.
20160 * src/conflicts.c: Return a string.
20161 * src/system.h (obstack_grow_string): Rename as...
20162 (obstack_sgrow): this. Be ready to work with non literals.
20163 (obstack_fgrow4): New.
20164
20165 2000-12-20 Akim Demaille <akim@epita.fr>
20166
20167 * src/files.c (open_files): Fix the computation of short_base_name
20168 in the case of `-o foo.tab.c'.
20169
20170 2000-12-20 Akim Demaille <akim@epita.fr>
20171
20172 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
20173 (copy_dollar): Now that everything uses obstacks, get rid of the
20174 FILE * parameters.
20175
20176 2000-12-20 Akim Demaille <akim@epita.fr>
20177
20178 * src/files.c (open_files): Actually the `.output' file is based
20179 on the short_base_name, not base_name.
20180 * tests/suite.at (Checking output file names): Adjust.
20181
20182 2000-12-20 Akim Demaille <akim@epita.fr>
20183
20184 * src/bison.s1: Remove, we now use directly...
20185 * src/bison.simple: this.
20186 * src/Makefile.am: Use pkgdata instead of data.
20187
20188 2000-12-20 Akim Demaille <akim@epita.fr>
20189
20190 * src/files.c (guard_obstack): New.
20191 (open_files): Initialize it.
20192 (output_files): Dump it...
20193 * src/files.h: Export it.
20194 * src/reader.c (copy_guard): Use it.
20195
20196 2000-12-19 Akim Demaille <akim@epita.fr>
20197
20198 * src/files.c (outfile, defsfile, actfile): Removed as global
20199 vars.
20200 (open_files): Don't compute them.
20201 (output_files): Adjust.
20202 (base_name, short_base_name): Be global.
20203 Adjust dependencies.
20204
20205 2000-12-19 Akim Demaille <akim@epita.fr>
20206
20207 * src/files.c (strsuffix): New.
20208 (stringappend): Be just like strcat but allocate.
20209 (base_names): Eve out from open_files.
20210 Try to simplify the rather hairy computation of base_name and
20211 short_base_name.
20212 (open_files): Use it.
20213 * tests/suite.at (Checking output file names): New test.
20214
20215 2000-12-19 Akim Demaille <akim@epita.fr>
20216
20217 * src/system.h (obstack_grow_literal_string): Rename as...
20218 (obstack_grow_string): this.
20219 * src/output.c (output_parser): Recognize `%% actions' instead of
20220 `$'.
20221 * src/bison.s1: s/$/%% actions/.
20222 * src/bison.hairy: Likewise.
20223
20224 2000-12-19 Akim Demaille <akim@epita.fr>
20225
20226 * src/output.c (output_parser): Compute the `#line' lines when
20227 there are.
20228 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
20229 Suggested by Hans Aberg.
20230
20231 2000-12-19 Akim Demaille <akim@epita.fr>
20232
20233 Let the handling of the skeleton files be local to the procedures
20234 that use it.
20235
20236 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
20237 longer static.
20238 (fparser, open_extra_files): Remove.
20239 (open_files, output_files): Don't take care of fparser.
20240 * src/files.h: Adjust.
20241 * src/output.c (output_parser): Open and close the file to the
20242 skeleton.
20243 * src/reader.c (read_declarations): When %semantic_parser, open
20244 fguard.
20245
20246 2000-12-19 Akim Demaille <akim@epita.fr>
20247
20248 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
20249 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
20250
20251 2000-12-19 Akim Demaille <akim@epita.fr>
20252
20253 * src/files.c (open_files): Yipee! We no longer need all the code
20254 looking for `/tmp' since we have no tmp file.
20255
20256 2000-12-19 Akim Demaille <akim@epita.fr>
20257
20258 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
20259 New macros.
20260 * src/files.c (open_files): Less dependency on MSDOS etc.
20261
20262 2000-12-14 Akim Demaille <akim@epita.fr>
20263
20264 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
20265 Provide a default definition.
20266 Use it when executing the default @ action.
20267 * src/reader.c (reader_output_yylsp): No longer include
20268 `timestamp' and `text' in the default YYLTYPE.
20269
20270 2000-12-12 Akim Demaille <akim@epita.fr>
20271
20272 * src/reader.c (copy_definition, parse_union_decl, copy_action)
20273 (copy_guard): Quote the file names.
20274 Reported by Laurent Mascherpa.
20275
20276 2000-12-12 Akim Demaille <akim@epita.fr>
20277
20278 * src/output.c (output_headers, output_program, output): Be sure
20279 to escape special characters when outputting filenames.
20280 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
20281 (output_headers): Don't depend on them, Use ACTSTR.
20282
20283 2000-11-17 Akim Demaille <akim@epita.fr>
20284
20285 * lib/obstack.h: Formatting changes.
20286 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
20287 prevents type checking.
20288 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20289 cast the value to (void *): assigning a `foo *' to a `void *'
20290 variable is valid.
20291 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20292 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
20293 append characters.
20294
20295 2000-11-17 Akim Demaille <akim@epita.fr>
20296
20297 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
20298 as...
20299 (suite.m4, regression.m4, calc.m4): these.
20300 * tests/atgeneral.m4: Update from CVS Autoconf.
20301
20302 2000-11-17 Akim Demaille <akim@epita.fr>
20303
20304 * tests/regression.m4 (%union and --defines): New test,
20305 demonstrating a current bug in the obstack implementation.
20306
20307 2000-11-17 Akim Demaille <akim@epita.fr>
20308
20309 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
20310 macros.
20311 Use them to declare the variables which are global or local to
20312 `yyparse'.
20313
20314 2000-11-17 Akim Demaille <akim@epita.fr>
20315
20316 * acconfig.h: Remove, no longer used.
20317
20318 2000-11-07 Akim Demaille <akim@epita.fr>
20319
20320 * src: s/Copyright (C)/Copyright/g.
20321
20322 2000-11-07 Akim Demaille <akim@epita.fr>
20323
20324 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
20325 defining.
20326 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
20327
20328 2000-11-07 Akim Demaille <akim@epita.fr>
20329
20330 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
20331 Merge in a single CPP if/else.
20332
20333 2000-11-07 Akim Demaille <akim@epita.fr>
20334
20335 * src/output.c (output): Remove useless variables.
20336 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
20337 argument `data' for consistency with the prototypes.
20338 Qualify it `const'.
20339 (obstack_copy, obstack_copy0): Rename the second argument as
20340 `address' for consistency. Qualify it `const'.
20341 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
20342 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
20343 `const' their input argument (`data' or `address').
20344 Adjust the corresponding macros to include `const' in casts.
20345
20346 2000-11-03 Akim Demaille <akim@epita.fr>
20347
20348 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
20349 s/PFILE1/BISON_HAIRY/.
20350 Adjust dependencies.
20351
20352 2000-11-03 Akim Demaille <akim@epita.fr>
20353
20354 For some reason, this was not applied.
20355
20356 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20357 `unlink': it's no longer used.
20358
20359 2000-11-03 Akim Demaille <akim@epita.fr>
20360
20361 * src/files.c (skeleton_find): New function, eved out of...
20362 (open_files, open_extra_files): here.
20363
20364 2000-11-03 Akim Demaille <akim@epita.fr>
20365
20366 Don't use `atexit'.
20367
20368 * src/files.c (obstack_save): New function.
20369 (done): Rename as...
20370 (output_files): this.
20371 Use `obstack_save'.
20372 * src/main.c (main): Don't use `atexit' to register `done', since
20373 it no longer has to remove tmp files, just call `output_files'
20374 when there are no errors.
20375
20376 2000-11-02 Akim Demaille <akim@epita.fr>
20377
20378 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
20379 `unlink': it's no longer used.
20380 * src/files.h: Formatting changes.
20381
20382 2000-11-02 Akim Demaille <akim@epita.fr>
20383
20384 Remove the last uses of mktemp and unlink/delete.
20385
20386 * src/files.c (fdefines, ftable): Removed.
20387 (defines_ostack, table_obstack): New.
20388 Adjust dependencies of the former into uses of the latter.
20389 * src/output.c (output_short_or_char_table, output_short_table):
20390 Convert to using obstacks.
20391 * src/reader.c (copy_comment2): Accept one FILE * and two
20392 obstacks.
20393 (output_token_defines, reader_output_yylsp): Use obstacks.
20394 * src/system.h (obstack_fgrow3): New.
20395 * po/POTFILES.in: Adjust.
20396
20397 2000-11-01 Akim Demaille <akim@epita.fr>
20398
20399 Change each use of `fattrs' into a use of `attrs_obstack'.
20400
20401 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
20402 * src/files.c (fattrs): Remove.
20403 (attrs_obstack): New.
20404 Adjust all dependencies.
20405 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
20406
20407 2000-11-01 Akim Demaille <akim@epita.fr>
20408
20409 Introduce obstacks.
20410 Change each use of `faction' into a use of `action_obstack'.
20411
20412 * lib/obstack.h, lib/obstack.c: New files.
20413 * src/files.c (faction): Remove.
20414 (action_obstack): New.
20415 Adjust all dependencies.
20416
20417 2000-10-20 Akim Demaille <akim@epita.fr>
20418
20419 * lib/quote.h (PARAMS): New macro. Use it.
20420
20421 2000-10-16 Akim Demaille <akim@epita.fr>
20422
20423 * src/output.c (output_short_or_char_table): New function.
20424 (output_short_table, output_token_translations): Use it.
20425 (goto_actions): Use output_short_table.
20426
20427 2000-10-16 Akim Demaille <akim@epita.fr>
20428
20429 * src/symtab.c (bucket_new): New function.
20430 (getsym): Use it.
20431
20432 * src/output.c (output_short_table): New argument to display the
20433 comment associated with the table.
20434 Adjust dependencies.
20435 (output_gram): Use it.
20436 (output_rule_data): Nicer output layout for YYTNAME.
20437
20438 2000-10-16 Akim Demaille <akim@epita.fr>
20439
20440 * src/lex.c (read_typename): New function.
20441 (lex): Use it.
20442 * src/reader.c (copy_dollar): Likewise.
20443
20444 2000-10-16 Akim Demaille <akim@epita.fr>
20445
20446 * src/reader.c (copy_comment2): Expect the input stream to be on
20447 the `/' which is suspected to open a comment, instead of being
20448 called after `//' or `/*' was read.
20449 (copy_comment, copy_definition, parse_union_decl, copy_action)
20450 (copy_guard): Adjust.
20451
20452 2000-10-16 Akim Demaille <akim@epita.fr>
20453
20454 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
20455 `read_signed_integer'.
20456
20457 2000-10-16 Akim Demaille <akim@epita.fr>
20458
20459 * src/reader.c (copy_dollar): New function.
20460 (copy_guard, copy_action): Use it.
20461
20462 2000-10-16 Akim Demaille <akim@epita.fr>
20463
20464 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
20465 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
20466 New files, from Fileutils 4.0.27.
20467 * src/main.c (printable_version): Remove.
20468 * src/lex.c, src/reader.c: Use `quote'.
20469
20470 2000-10-04 Akim Demaille <akim@epita.fr>
20471
20472 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
20473
20474 2000-10-04 Akim Demaille <akim@epita.fr>
20475
20476 * doc/bison.texinfo: Various typos spotted by Neil Booth.
20477
20478 2000-10-04 Akim Demaille <akim@epita.fr>
20479
20480 When a literal string is used to define two different tokens,
20481 `bison -v' segfaults.
20482 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
20483
20484 * tests/regression.m4: New file.
20485 Include the core of the sample provided by Piotr Gackiewicz.
20486 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
20487 properly.
20488
20489 2000-10-04 Akim Demaille <akim@epita.fr>
20490
20491 * src/reader.c (parse_expect_decl): Keep `count' within the size
20492 of `buffer'.
20493 From Neil Booth.
20494
20495 2000-10-02 Paul Eggert <eggert@twinsun.com>
20496
20497 * bison.s1 (yyparse): Assign the default value
20498 unconditionally, to avoid a GCC warning and make the parser a
20499 tad smaller.
20500
20501 2000-10-02 Akim Demaille <akim@epita.fr>
20502
20503 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
20504 options.
20505
20506 2000-10-02 Akim Demaille <akim@epita.fr>
20507
20508 * src/derives.c, src/print.c, src/reduce.c: To ease the
20509 translation, move some `\n' out of the translated strings.
20510
20511 2000-10-02 Akim Demaille <akim@epita.fr>
20512
20513 The location tracking mechanism is precious for parse error
20514 messages. Nevertheless, it is enabled only when `@n' is used in
20515 the grammar, which is a different issue (you can use it in error
20516 message, but not in the grammar per se). Therefore, there should
20517 be another means to enable it.
20518
20519 * src/getargs.c (getargs): Support `--locations'.
20520 (usage): Report it.
20521 * src/getargs.h (locationsflag): Export it.
20522 * src/lex.c (percent_table): Support `%locations'.
20523 * src/reader.c (yylsp_needed): Remove this variable, now replaced
20524 with `locationsflag'.
20525 * doc/bison.texinfo: Document `--locations' and `%locations'.
20526 Sort the options.
20527 * tests/calc.m4: Test it.
20528
20529 For regularity of the names, replace each
20530 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
20531 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
20532 In addition replace each `flag' with `_flag'.
20533
20534 2000-10-02 Akim Demaille <akim@epita.fr>
20535
20536 Also test parse error messages, including with YYERROR_VERBOSE.
20537
20538 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
20539 associative).
20540 Use it to check the computations.
20541 Use it to check `nonassoc' is honored.
20542 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
20543 `--yyerror-verbose'.
20544 (_AT_CHECK_CALC): Adjust to this option.
20545 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
20546
20547 2000-10-02 Akim Demaille <akim@epita.fr>
20548
20549 Test also `--verbose', `--defines' and `--name-prefix'. Testing
20550 the latter demonstrates a flaw in the handling of non debugging
20551 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
20552 was used in order to simplify:
20553
20554 #if YYDEBUG
20555 if (yydebug)
20556 {
20557 ...
20558 }
20559 #endif
20560
20561 into
20562
20563 if (yydebug)
20564 {
20565 ...
20566 }
20567
20568 unfortunately this leads to a CPP conflict when
20569 `--name-prefix=foo' is used since it produces `#define yydebug
20570 foodebug'.
20571
20572 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
20573 (YYDPRINTF): New macro.
20574 Spread its use.
20575 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
20576 the bison options.
20577 Also test `--verbose', `--defines' and `--name-prefix'.
20578
20579 2000-10-02 Akim Demaille <akim@epita.fr>
20580
20581 Improve the readability of the produced parsers.
20582
20583 * src/bison.s1: Formatting changes.
20584 Improve the comment related to the `$' mark.
20585 (yydefault): Don't fall through to `yyresume': `goto' there.
20586 * src/output.c (output_parser): When the `$' is met, skip the end
20587 of its line.
20588 New variable, `number_of_dollar_signs', to check there's exactly
20589 one `$' in the parser skeleton.
20590
20591 2000-10-02 Akim Demaille <akim@epita.fr>
20592
20593 * lib/xstrdup.c: New file, from the fileutils.
20594 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
20595 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
20596 instead of strlen + xmalloc + strcpy.
20597 * src/symtab.c (copys): Remove, use xstrdup instead.
20598
20599 2000-10-02 Akim Demaille <akim@epita.fr>
20600
20601 * src/gram.h (associativity): New enum type which replaces the
20602 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
20603 `right_assoc', `left_assoc' and `non_assoc'.
20604 Adjust all dependencies.
20605 * src/reader.c: Formatting changes.
20606 (LTYPESTR): Don't define it, use it as a literal in
20607 `reader_output_yylsp'.
20608 * src/symtab.h (symbol_class): New enum type which replaces the
20609 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
20610 `sunknown', `stoken and `snterm'.
20611
20612 2000-10-02 Akim Demaille <akim@epita.fr>
20613
20614 * src/getargs.c (fixed_outfiles): Rename as...
20615 (yaccflag): for consistency and accuracy.
20616 Adjust dependencies.
20617
20618 2000-10-02 Akim Demaille <akim@epita.fr>
20619
20620 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
20621 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
20622 difficult and introduced a lot of core dump. It turns out that
20623 Bison used an implementation of `xmalloc' based on `calloc', and
20624 at various places it does depend upon the initialization to 0. I
20625 have not tried to isolate the pertinent places, and all the former
20626 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
20627 someone should address this issue.
20628
20629 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
20630 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
20631 files.
20632 Adjust dependencies.
20633 * src/warshall.h: New file.
20634 Propagate.
20635
20636 2000-10-02 Akim Demaille <akim@epita.fr>
20637
20638 Various anti-`extern in *.c' changes.
20639
20640 * src/system.h: Include `assert.h'.
20641
20642 2000-10-02 Akim Demaille <akim@epita.fr>
20643
20644 * src/state.h (nstates, final_state, first_state, first_shift)
20645 (first_reduction): Move their exportation from here...
20646 * src/LR0.h: to here.
20647 Adjust dependencies.
20648 * src/getargs.c (statisticsflag): New variable.
20649 Add support for `--statistics'.
20650 Adjust dependencies.
20651
20652 Remove a lot of now useless `extern' statements in most files.
20653
20654 2000-10-02 Akim Demaille <akim@epita.fr>
20655
20656 * src/LR0.h: New file.
20657 Propagate its use.
20658
20659 2000-10-02 Akim Demaille <akim@epita.fr>
20660
20661 * src/print.h: New file.
20662 Propagate its use.
20663 * src/print.c: Formatting and ordering changes.
20664 (verbose, terse): Replace with...
20665 (print_results): this new function.
20666 Adjust dependencies.
20667
20668 2000-10-02 Akim Demaille <akim@epita.fr>
20669
20670 * src/conflicts.c (conflict_report): New function.
20671 (conflict_log, verbose_conflict_log): Replace with...
20672 (print_conflicts): this function.
20673 Adjust dependencies.
20674 * src/conflicts.h: New file.
20675 Propagate its inclusion.
20676
20677 2000-10-02 Akim Demaille <akim@epita.fr>
20678
20679 * src/nullable.h: New file.
20680 Propagate its inclusion.
20681 * src/nullable.c: Formatting changes.
20682
20683 2000-10-02 Akim Demaille <akim@epita.fr>
20684
20685 * src/reduce.h: New file.
20686 Propagate its inclusion.
20687 * src/reduce.c: Topological sort and other formatting changes.
20688 (bool, TRUE, FALSE): Move their definition to...
20689 * src/system.h: here.
20690
20691 2000-10-02 Akim Demaille <akim@epita.fr>
20692
20693 * src/files.c: Formatting changes.
20694 (tryopen, tryclose, openfiles): Rename as...
20695 (xfopen, xfclose, open_files): this.
20696 (stringappend): static.
20697 * src/files.h: Complete the list of exported symbols.
20698 Propagate its use.
20699
20700 2000-10-02 Akim Demaille <akim@epita.fr>
20701
20702 * src/reader.h: New file.
20703 Propagate its use instead of tedious list of `extern' and
20704 prototypes.
20705 * src/reader.c: Formatting changes, topological sort,
20706 s/register//.
20707
20708 2000-10-02 Akim Demaille <akim@epita.fr>
20709
20710 * src/lex.h: Prototype `lex.c' exported functions.
20711 * src/reader.c: Adjust.
20712 * src/lex.c: Formatting changes.
20713 (safegetc): Rename as...
20714 (xgetc): this.
20715
20716 2000-10-02 Akim Demaille <akim@epita.fr>
20717
20718 * src/lalr.h: New file.
20719 Propagate its inclusion instead of prototypes and `extern'.
20720 * src/lalr.c: Formatting changes, topological sorting etc.
20721
20722 2000-10-02 Akim Demaille <akim@epita.fr>
20723
20724 * src/output.c (token_actions): Introduce a temporary array,
20725 YYDEFACT, that makes it possible for this function to use
20726 output_short_table.
20727
20728 2000-10-02 Akim Demaille <akim@epita.fr>
20729
20730 `user_toknums' is output as a `short[]' in `output.c', while it is
20731 defined as a `int[]' in `reader.c'. For consistency with the
20732 other output tables, `user_toknums' is now defined as a table of
20733 shorts.
20734
20735 * src/reader.c (user_toknums): Be a short table instead of an int
20736 table.
20737 Adjust dependencies.
20738
20739 Factor the short table outputs.
20740
20741 * src/output.c (output_short_table): New function.
20742 * src/output.c (output_gram, output_stos, output_rule_data)
20743 (output_base, output_table, output_check): Use it.
20744
20745 2000-10-02 Akim Demaille <akim@epita.fr>
20746
20747 * src/output.c (output): Topological sort of the functions, in
20748 order to get rid of the `static' prototypes.
20749 No longer use `register'.
20750 * src/output.h: New file.
20751 Propagate its inclusion in files explicitly prototyping functions
20752 from output.c.
20753
20754 2000-09-21 Akim Demaille <akim@epita.fr>
20755
20756 * src/atgeneral.m4: Update from Autoconf.
20757
20758 2000-09-21 Akim Demaille <akim@epita.fr>
20759
20760 * src/closure.h: New file.
20761 * src/closure.c: Formatting changes, topological sort over the
20762 functions, use of closure.h.
20763 (initialize_closure, finalize_closure): Rename as...
20764 (new_closure, free_closure): these. Adjust dependencies.
20765 * src/LR0.c: Formatting changes, topological sort, use of
20766 cloture.h.
20767 (initialize_states): Rename as...
20768 (new_states): this.
20769 * src/Makefile.am (noinst_HEADERS): Adjust.
20770
20771 2000-09-20 Akim Demaille <akim@epita.fr>
20772
20773 * src/acconfig.h: Don't protect config.h against multiple
20774 inclusion.
20775 Don't define PARAMS.
20776 * src/system.h: Define PARAMS.
20777 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
20778 purpose of config.h. system.h must not try to fix wrong
20779 definitions in config.h.
20780
20781 2000-09-20 Akim Demaille <akim@epita.fr>
20782
20783 * src/derives.h: New file.
20784 * src/main.c, src/derives.h: Use it.
20785 Formatting changes.
20786 * src/Makefile.am (noinst_HEADERS): Adjust.
20787
20788 2000-09-20 Akim Demaille <akim@epita.fr>
20789
20790 * tests/atgeneral.m4: Update from Autoconf.
20791 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
20792 (AT_CHECK_CALC): New macros.
20793 Use these macros to test bison with options `', `--raw',
20794 `--debug', `--yacc', `--yacc --debug'.
20795
20796 2000-09-19 Akim Demaille <akim@epita.fr>
20797
20798 * src/output.c: Formatting changes.
20799 * src/machine.h: Remove, leaving its contents in...
20800 * src/system.h: here.
20801 Include stdio.h.
20802 Adjust all dependencies on stdio.h and machine.h.
20803 * src/getargs.h: New file.
20804 Let all `extern' declarations about getargs.c be replaced with
20805 inclusion of `getargs.h'.
20806 * src/Makefile.am (noinst_HEADERS): Adjust.
20807
20808 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20809 scope.
20810 (yyerror): Returns void, not int.
20811 * doc/bison.texinfo: Formatting changes.
20812
20813 2000-09-19 Akim Demaille <akim@epita.fr>
20814
20815 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20816 portable.
20817
20818 2000-09-18 Akim Demaille <akim@epita.fr>
20819
20820 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20821 * src/Makefile.am (INCLUDES): Don't.
20822 Be ready to fetch headers in lib/.
20823
20824 2000-09-18 Akim Demaille <akim@epita.fr>
20825
20826 * doc/bison.texinfo: Update the copyright.
20827 ANSIfy and GNUify the examples.
20828 Remove the old menu.
20829
20830 2000-09-18 Akim Demaille <akim@epita.fr>
20831
20832 First set of tests: use the `calc' example from the documentation.
20833
20834 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20835 is defined only when YYDEBUG is.
20836 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20837 * src/files.c (tryopen, tryclose): Formatting changes.
20838 Move to the top and be static.
20839 * src/reader.c (read_signed_integer): Likewise.
20840 * tests/calc.m4: New file.
20841 * Makefile.am, suite.m4: Adjust.
20842 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20843
20844 2000-09-18 Akim Demaille <akim@epita.fr>
20845
20846 Add support for an Autotest test suite for Bison.
20847
20848 * m4/m4.m4, m4/atconfig.m4: New files.
20849 * m4/Makefile.am (EXTRA_DIST): Adjust.
20850 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20851 files.
20852 * src/getargs.c: Display a more standard --version message.
20853 * src/reader.c (reader): Formatting changes.
20854 No longer depend upon VERSION_STRING.
20855 * configure.in: No longer use `dnl'.
20856 Set up the test suite and the new directory `tests/.
20857 (VERSION_STRING): Remove.
20858
20859 2000-04-14 Akim Demaille <akim@epita.fr>
20860
20861 * src/reader.c (copy_comment2): New function, same as former
20862 `copy_comment', but outputs into two FILE *.
20863 (copy_comment): Use it.
20864 (parse_union_decl): Use it.
20865 (get_type, parse_start_decl): Use the same `invalid' message.
20866 (parse_start_decl, parse_union_decl): Use the same `multiple'
20867 message.
20868 (parse_union_decl, copy_guard, copy_action): Use the same
20869 `unmatched' message.
20870 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20871
20872 2000-03-31 Akim Demaille <akim@epita.fr>
20873
20874 * src/files.c (tryopen, tryclose): Move to the top.
20875 Be static.
20876
20877 2000-03-31 Akim Demaille <akim@epita.fr>
20878
20879 * src/main.c (main): Don't call `done', exit does it.
20880
20881 2000-03-31 Akim Demaille <akim@epita.fr>
20882
20883 * allocate.c: s/return (foo)/return foo/.
20884 * lalr.c: Likewise.
20885 * LR0.c: Likewise.
20886 * output.c: Likewise.
20887 * reader.c: Likewise.
20888 * symtab.c: Likewise.
20889 * vmsgetargs.c: Likewise.
20890
20891 2000-03-31 Akim Demaille <akim@epita.fr>
20892
20893 Clean up the error reporting functions.
20894
20895 * src/report.c: New file.
20896 * src/report.h: Likewise.
20897 * src/Makefile.am: Adjust.
20898 * m4/error.m4: New file.
20899 * m4/Makefile.am: Adjust.
20900 * configure.in (jm_PREREQ_ERROR): Call it.
20901 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20902 Remove.
20903 (fatal, fatals): Remove. All callers use complain.c::fatal.
20904 (warn, warni, warns, warnss, warnss): Remove. All callers use
20905 complain.c::complain.
20906 (toomany): Remove, use fatal instead.
20907 * src/files.c (done): No argument, use complain_message_count.
20908 * src/main.c (main): Register `done' to `atexit'.
20909
20910 * src/getargs.c (usage): More `fputs', less `fprintf'.
20911
20912 2000-03-28 Akim Demaille <akim@epita.fr>
20913
20914 * lib/: New directory.
20915 * Makefile.am (SUBDIRS): Adjust.
20916 * configure.in: Adjust.
20917 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20918 useless.
20919 * src/alloca.c: Moved to lib/.
20920 * src/getopt.c: Likewise.
20921 * src/getopt1.c: Likewise.
20922 * src/getopt.h: Likewise.
20923 * src/ansi2knr.c: Likewise.
20924 * src/ansi2knr.1: Likewise.
20925 * src/Makefile.am: Adjust.
20926 * lib/Makefile.am: New file.
20927
20928 2000-03-28 Akim Demaille <akim@epita.fr>
20929
20930 * src/getargs.c (usage): Refresh the help message.
20931
20932 2000-03-17 Akim Demaille <akim@epita.fr>
20933
20934 * src/getopt1.c: Updated from textutils 2.0e
20935 * src/getopt.c: Likewise.
20936 * src/getopt.h: Likewise.
20937
20938 2000-03-17 Akim Demaille <akim@epita.fr>
20939
20940 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20941 the file name, not the whole `#line LINE FILE'.
20942
20943 2000-03-17 Akim Demaille <akim@epita.fr>
20944
20945 On syntax errors, report the token on which we choked.
20946
20947 * src/bison.s1 (yyparse): In the label yyerrlab, when
20948 YYERROR_VERBOSE, add yychar in msg.
20949
20950 2000-03-17 Akim Demaille <akim@epita.fr>
20951
20952 * src/reader.c (copy_at): New function.
20953 (copy_guard): Use it.
20954 (copy_action): Use it.
20955
20956 2000-03-17 Akim Demaille <akim@epita.fr>
20957
20958 Be kind to translators, save some useless translations.
20959
20960 * src/main.c (banner): New function.
20961 (fatal_banner): Use it.
20962 (warn_banner): Use it.
20963
20964 2000-03-17 Akim Demaille <akim@epita.fr>
20965
20966 * src/reader.c (copy_definition): Use copy_string and
20967 copy_comment. Removed now unused `match', `ended',
20968 `cplus_comment'.
20969 (copy_comment, copy_string): Moved, to be visible from
20970 copy_definition.
20971
20972 2000-03-17 Akim Demaille <akim@epita.fr>
20973
20974 * src/reader.c (copy_string): Declare `static inline'. No
20975 problems with inline, since it is checked by configure.
20976 (copy_comment): Likewise.
20977
20978 2000-03-17 Akim Demaille <akim@epita.fr>
20979
20980 * src/reader.c (packsymbols): Formatting changes.
20981
20982 2000-03-17 Akim Demaille <akim@epita.fr>
20983
20984 * src/reader.c (copy_comment): New function, factored out from:
20985 (copy_action): Use it. Removed now unused `match', `ended',
20986 `cplus_comment'.
20987 (copy_guard): Likewise.
20988
20989 2000-03-17 Akim Demaille <akim@epita.fr>
20990
20991 * src/reader.c (copy_string): New function, factored out from:
20992 (copy_action): Use it.
20993 (copy_guard): Likewise.
20994
20995 2000-03-17 Akim Demaille <akim@epita.fr>
20996
20997 Change the handling of @s so that they behave exactly like $s.
20998 There is now a pseudo variable @$ (readble and writable), location
20999 of the lhs of the rule (by default ranging from the location of
21000 the first symbol of the rhs, to the location of the last symbol,
21001 or, if the rhs is empty, YYLLOC).
21002
21003 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
21004 yyval.
21005 (yyparse): When providing a default semantic action, provide a
21006 default location action.
21007 (after the $): No longer change `*YYLSP', just stack YYLOC the
21008 same way you stack YYVAL.
21009 * src/reader.c (read_declarations): Use warns.
21010 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
21011 (copy_action, case '@'): Likewise.
21012 Use a standard error message, to save useless work from
21013 translators.
21014
21015 2000-03-17 Akim Demaille <akim@epita.fr>
21016
21017 * src/bison.s1: Formatting and cosmetics changes.
21018 * src/reader.c: Likewise.
21019 Update the Copyright notice.
21020
21021 2000-03-17 Akim Demaille <akim@epita.fr>
21022
21023 * src/bison.s1 (#line): All set to `#line' only, since the
21024 Makefile now handles them.
21025
21026 2000-03-16 Akim Demaille <akim@epita.fr>
21027
21028 * src/output.c (output_rule_data): Output the documentation of
21029 some of the tables.
21030 (Copyright notice): Update.
21031 Formatting changes.
21032
21033 2000-03-16 Akim Demaille <akim@epita.fr>
21034
21035 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
21036 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
21037 One `#if YYDEBUG' remains, since it uses variables which are
21038 defined only if `YYDEBUG != 0'.
21039
21040 2000-03-16 Akim Demaille <akim@epita.fr>
21041
21042 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
21043 and related variables so that the similarities are highlighted.
21044
21045 2000-03-16 Akim Demaille <akim@epita.fr>
21046
21047 * src/bison.s1: Properly indent CPP directives.
21048
21049 2000-03-16 Akim Demaille <akim@epita.fr>
21050
21051 * src/bison.s1: Properly indent the `alloca' CPP section.
21052
21053 2000-03-16 Akim Demaille <akim@epita.fr>
21054
21055 Do not hard code values of directories in `configure.in'.
21056 Update the `configure' tool chain.
21057
21058 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
21059 src/makefile.am.
21060 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
21061 (AC_OUTPUT): Add m4/Makefile.
21062 Bump to bison 1.28a, 1.29 has never been released.
21063 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
21064 handled via src/Makefile.am.
21065 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
21066 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
21067 autoheader.
21068 * Makefile.am (SUBDIRS): Add m4.
21069 (ACLOCAL_AM_FLAGS): New variable.
21070 (AUTOMAKE_OPTIONS): Add check-news.
21071 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
21072 the proper line number and file name.
21073 (DEFS): Propagate the location of bison library files and of the
21074 locale files.
21075 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
21076 builddir.
21077 * acinclude.m4: Remove, replaced by the directory m4.
21078 * m4/Makefile.am (EXTRA_DIST): New variable.
21079 * m4/gettext.m4: New file, from the fileutils.
21080 * m4/lcmessage.m4: Likewise
21081 * m4/progtest.m4: Likewise.
21082 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
21083
21084 2000-03-10 Akim Demaille <akim@epita.fr>
21085
21086 * src/closure.c:
21087 Formatting changes of various comments.
21088 Respect the GNU coding standards at various places.
21089 Don't use `_()' when no translation is needed.
21090
21091 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21092
21093 * src/files.c:
21094 OS/2 honors TMPDIR environment variable.
21095
21096 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21097
21098 * doc/bison.texinfo: Tweaked spelling and grammar.
21099 Updated ISBN.
21100 Removed reference to price of printed copy.
21101 Mention BISON_SIMPLE and BISON_HAIRY.
21102
21103 1999-12-13 Jesse Thilo <jthilo@gnu.org>
21104
21105 * configure.in, NEWS:
21106 Bison 1.29 released.
21107
21108 1999-10-27 Jesse Thilo <jthilo@gnu.org>
21109
21110 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
21111 Added reference card.
21112
21113 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21114
21115 * po/ru.po: Added Russian translation.
21116
21117 1999-07-26 Jesse Thilo <jthilo@gnu.org>
21118
21119 * configure.in: Added Russian translation.
21120
21121 1999-07-06 Jesse Thilo <jthilo@gnu.org>
21122
21123 * configure.in, NEWS, README:
21124 Released version 1.28.
21125
21126 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21127
21128 * src/system.h:
21129 Squashed redefinition warning on some systems.
21130
21131 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
21132 Have configure build version string instead of relying on ANSI string
21133 concatentation.
21134
21135 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21136
21137 * po/POTFILES.in: Got rid of version.c.
21138
21139 1999-06-14 Jesse Thilo <jthilo@gnu.org>
21140
21141 * acconfig.h, configure.in:
21142 Have configure build version string instead of relying on ANSI string
21143 concatentation.
21144
21145 1999-06-08 Jesse Thilo <jthilo@gnu.org>
21146
21147 * doc/bison.1:
21148 Dropped mention of `+' for long-named options.
21149
21150 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21151
21152 * src/files.c: Added <unistd.h> for unlink().
21153
21154 * src/Makefile.am, src/system.h:
21155 I18n fixes.
21156
21157 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21158
21159 * README: Added a FAQ list.
21160
21161 * configure.in, acconfig.h:
21162 I18n fixes.
21163
21164 1999-05-30 Jesse Thilo <jthilo@gnu.org>
21165
21166 * doc/FAQ, doc/Makefile.am:
21167 Added a FAQ list.
21168
21169 1999-05-19 Jesse Thilo <jthilo@gnu.org>
21170
21171 * src/alloc.h, src/symtab.h, src/version.c:
21172 Protected inclusion of "config.h" with HAVE_CONFIG_H.
21173
21174 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21175
21176 * src/.cvsignore, src/Makefile.am:
21177 Reorganized: sources in `src', documentation in `doc'.
21178
21179 * src/lex.c (literalchar):
21180 fixed the code for escaping double quotes (thanks
21181 Jonathan Czisny.)
21182
21183 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21184
21185 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
21186 Adjusted paths to reflect directory reorganization.
21187
21188 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21189
21190 * doc/.cvsignore, doc/Makefile.am:
21191 Reorganized: sources in `src', documentation in `doc'.
21192
21193 1999-04-18 Jesse Thilo <jthilo@gnu.org>
21194
21195 * configure.in:
21196 Updated AC_INIT file to reflect directory reorganization.
21197
21198 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
21199 Reorganized: sources in `src', documentation in `doc'.
21200
21201 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21202
21203 * src/allocate.c:
21204 Don't declare calloc() and realloc() if not necessary.
21205
21206 1999-04-13 Jesse Thilo <jthilo@gnu.org>
21207
21208 * configure.in, acconfig.h, acinclude.m4:
21209 Don't declare calloc() and realloc() if not necessary.
21210
21211 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21212
21213 * po/.cvsignore: Added i18n support.
21214
21215 1999-03-23 Jesse Thilo <jthilo@gnu.org>
21216
21217 * acconfig.h, configure.in, Makefile.am:
21218 Added i18n support.
21219
21220 1999-03-22 Jesse Thilo <jthilo@gnu.org>
21221
21222 * src/bison.s1: Fixed #line numbers.
21223
21224 1999-03-15 Jesse Thilo <jthilo@gnu.org>
21225
21226 * po/es.po, po/fr.po, po/nl.po, po/de.po:
21227 Added PO files from Translation Project.
21228
21229 1999-03-03 Jesse Thilo <jthilo@gnu.org>
21230
21231 * Makefile.am:
21232 Added support for non-ANSI compilers (ansi2knr).
21233
21234 1999-02-16 Jesse Thilo <jthilo@gnu.org>
21235
21236 * configure.in: Bumped version number to 1.27.
21237
21238 * Makefile.am:
21239 Added `bison.simple' to list of files removed by `make distclean'.
21240
21241 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21242
21243 * src/files.c, src/files.h:
21244 Defined locations of parser files in config.h instead of Makefile.
21245
21246 1999-02-12 Jesse Thilo <jthilo@gnu.org>
21247
21248 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
21249 Defined locations of parser files in config.h instead of Makefile.
21250
21251 1999-02-09 Jesse Thilo <jthilo@gnu.org>
21252
21253 * Makefile.am:
21254 Removed inappropriate use of $< macro.
21255
21256 1999-02-05 Jesse Thilo <jthilo@gnu.org>
21257
21258 * po/Makefile.in.in, po/POTFILES.in:
21259 Add `po' directory skeleton.
21260
21261 1999-01-27 Jesse Thilo <jthilo@gnu.org>
21262
21263 * README: Document help-bison list.
21264
21265 * configure.in: Add check for mkstemp().
21266
21267 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21268
21269 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
21270 Hush a few compiler warnings.
21271
21272 * src/files.c:
21273 Add tryclose(), which verifies that fclose was successful.
21274 Hush a couple of compiler warnings.
21275
21276 1999-01-20 Jesse Thilo <jthilo@gnu.org>
21277
21278 * Makefile.am, OChangeLog:
21279 ChangeLog is now automatically generated. Include the old version as
21280 OChangeLog.
21281
21282 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21283
21284 * 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:
21285 Update FSF address.
21286
21287 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21288
21289 * doc/bison.texinfo: Fix formatting glitch.
21290
21291 * doc/bison.texinfo: Update FSF address.
21292
21293 1999-01-14 Jesse Thilo <jthilo@gnu.org>
21294
21295 * acconfig.h: Update FSF address.
21296
21297 1999-01-08 Jesse Thilo <jthilo@gnu.org>
21298
21299 * src/system.h:
21300 Don't define PACKAGE here, since config.h defines it.
21301
21302 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21303
21304 * src/reader.c: Update copyright date.
21305
21306 * src/main.c:
21307 Ditch sprintf to statically-sized buffers in fatal/warn functions in
21308 favor of output directly to stderr (avoids buffer overruns).
21309
21310 * src/reader.c: Some checks for premature EOF.
21311
21312 * 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:
21313 Use prototypes if the compiler understands them.
21314
21315 * src/files.c: Honor TMPDIR on Unix hosts.
21316 Use prototypes if the compiler understands them.
21317
21318 * src/reader.c:
21319 Fix a couple of buffer overrun bugs.
21320 Use prototypes if the compiler understands them.
21321
21322 * src/system.h: Include unistd.h and ctype.h.
21323 Use #ifdef instead of #if for NLS symbols.
21324
21325 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21326
21327 * doc/bison.texinfo:
21328 Delete comment "consider using @set for edition number, etc..." since
21329 we now are doing so.
21330
21331 1998-12-30 Jesse Thilo <jthilo@gnu.org>
21332
21333 * configure.in:
21334 Use prototypes if the compiler understands them.
21335
21336 * NEWS: Document 1.26 highlights.
21337
21338 * Makefile.am: Require Automake 1.3 or later.
21339
21340 * acconfig.h:
21341 Use prototypes if the compiler understands them.
21342
21343 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21344
21345 * src/version.c:
21346 Use VERSION symbol from automake for version number.
21347
21348 1998-12-29 Jesse Thilo <jthilo@gnu.org>
21349
21350 * acconfig.h, configure.in, version.cin:
21351 Use VERSION symbol from automake for version number.
21352
21353 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21354
21355 * Makefile.am:
21356 Distribute original version of simple parser (bison.s1), not built
21357 version (bison.simple).
21358
21359 1998-11-28 Jesse Thilo <jthilo@gnu.org>
21360
21361 * doc/bison.texinfo: Add info dir entry.
21362
21363 * doc/bison.texinfo:
21364 Let automake put version number into documentation.
21365
21366 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21367
21368 * src/bison.cld, src/build.com, src/vmshlp.mar:
21369 Add non-RCS files from /gd/gnu/bison.
21370
21371 1998-11-26 Jesse Thilo <jthilo@gnu.org>
21372
21373 * doc/bison.1:
21374 Document the BISON_HAIRY and BISON_SIMPLE variables.
21375
21376 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21377
21378 * src/version.c: Build version.c automatically.
21379
21380 * src/reader.c:
21381 Fix token numbering (used to start at 258, not 257).
21382
21383 * src/system.h: Include config.h.
21384
21385 * src/getargs.c: Update bug report address.
21386
21387 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
21388 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
21389
21390 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21391
21392 * Makefile.am:
21393 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21394
21395 * configure.in, version.cin:
21396 Build version.c automatically.
21397
21398 * AUTHORS: Add AUTHORS file.
21399
21400 * README: Update bug report address.
21401
21402 * bison.simple:
21403 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
21404
21405 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
21406 Add automake stuff.
21407
21408 1998-11-25 Jesse Thilo <jthilo@gnu.org>
21409
21410 * doc/bison.texinfo: Clean up some formatting.
21411
21412 1998-05-05 Richard Stallman <rms@gnu.org>
21413
21414 * doc/bison.texinfo:
21415 Explain better why to make a pure parser.
21416
21417 1998-01-05 Richard Stallman <rms@gnu.org>
21418
21419 * src/files.c (openfiles):
21420 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
21421 find a temporary directory, if possible. Do not unlink files while
21422 they are open.
21423
21424 1997-08-25 Richard Stallman <rms@gnu.org>
21425
21426 * src/reader.c (stack_offset;):
21427 Change some warni to warns.
21428
21429 * src/lex.c (literalchar): Use warns, not warni.
21430
21431 1997-06-28 Richard Stallman <rms@gnu.org>
21432
21433 * src/bison.s1: Add a Bison version comment.
21434
21435 * src/main.c (fatal, warn, berror):
21436 Use program_name.
21437
21438 1997-06-28 Richard Stallman <rms@gnu.org>
21439
21440 * Makefile.in (bison_version): New variable.
21441 (dist): Use that variable.
21442 (bison.s1): Substitute the Bison version into bison.simple.
21443
21444 * bison.simple: Add a Bison version comment.
21445
21446 1997-06-18 Richard Stallman <rms@gnu.org>
21447
21448 * src/main.c (fatal, warn, berror):
21449 Make error messages standard.
21450 (toomany): Improve error message text.
21451
21452 * 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:
21453 new.h renamed to alloc.h.
21454
21455 1997-06-18 Richard Stallman <rms@gnu.org>
21456
21457 * Makefile.in: new.h renamed to alloc.h.
21458
21459 1997-05-24 Richard Stallman <rms@gnu.org>
21460
21461 * src/lex.c (literalchar):
21462 Fix the code for escaping \, " and '.
21463
21464 (lex): Avoid trouble when there are many chars
21465 to discard in a char literal with just several chars in it.
21466
21467 1997-05-17 Richard Stallman <rms@gnu.org>
21468
21469 * src/bison.s1:
21470 Use malloc, if using alloca is troublesome.
21471 (YYSTACK_USE_ALLOCA): New flag macro.
21472 Define it for some systems and compilers.
21473 (YYSTACK_ALLOC): New macro.
21474 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21475 If it was malloc'd, free it.
21476
21477 1997-05-17 Richard Stallman <rms@gnu.org>
21478
21479 * bison.simple:
21480 Use malloc, if using alloca is troublesome.
21481 (YYSTACK_USE_ALLOCA): New flag macro.
21482 Define it for some systems and compilers.
21483 (YYSTACK_ALLOC): New macro.
21484 (yyparse): Use YYSTACK_ALLOC to allocate stack.
21485 If it was malloc'd, free it.
21486
21487 1997-04-23 Richard Stallman <rms@gnu.org>
21488
21489 * src/bison.s1:
21490 (alloca) [__hpux]: Always define as __builtin_alloca.
21491
21492 1997-04-23 Richard Stallman <rms@gnu.org>
21493
21494 * bison.simple:
21495 (alloca) [__hpux]: Always define as __builtin_alloca.
21496
21497 1997-04-22 Richard Stallman <rms@gnu.org>
21498
21499 * src/bison.s1:
21500 [__hpux]: Include alloca.h (right for HPUX 10)
21501 instead of declaring alloca (right for HPUX 9).
21502
21503 * src/bison.s1 (__yy_memcpy):
21504 Declare arg `count' as unsigned int.
21505 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21506
21507 1997-04-22 Richard Stallman <rms@gnu.org>
21508
21509 * bison.simple:
21510 [__hpux]: Include alloca.h (right for HPUX 10)
21511 instead of declaring alloca (right for HPUX 9).
21512
21513 * bison.simple (__yy_memcpy):
21514 Declare arg `count' as unsigned int.
21515 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
21516
21517 1997-01-03 Richard Stallman <rms@gnu.org>
21518
21519 * src/allocate.c: [__STDC__ or _MSC_VER]:
21520 Declare calloc and realloc to return void *.
21521
21522 1997-01-02 Richard Stallman <rms@gnu.org>
21523
21524 * src/system.h:
21525 [_MSC_VER]: Include stdlib.h and process.h.
21526 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
21527
21528 * src/main.c (main): Return FAILURE as a value.
21529 (printable_version): Declare arg as int, not char.
21530
21531 1997-01-02 Richard Stallman <rms@gnu.org>
21532
21533 * Makefile.in (dist):
21534 Explicitly check for symlinks, and copy them.
21535
21536 1996-12-19 Richard Stallman <rms@gnu.org>
21537
21538 * src/files.c:
21539 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
21540
21541 1996-12-18 Paul Eggert <eggert@gnu.org>
21542
21543 * src/bison.s1 (yyparse):
21544 If __GNUC__ and YYPARSE_PARAM are both defined,
21545 declare yyparse to have a void * argument.
21546
21547 1996-12-18 Paul Eggert <eggert@gnu.org>
21548
21549 * bison.simple (yyparse):
21550 If __GNUC__ and YYPARSE_PARAM are both defined,
21551 declare yyparse to have a void * argument.
21552
21553 1996-12-17 Richard Stallman <rms@gnu.org>
21554
21555 * src/reduce.c (nbits): Add some casts.
21556
21557 1996-08-12 Richard Stallman <rms@gnu.org>
21558
21559 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
21560
21561 1996-08-12 Richard Stallman <rms@gnu.org>
21562
21563 * bison.simple: Test _MSDOS as well as _MSDOS_.
21564
21565 1996-07-31 Richard Stallman <rms@gnu.org>
21566
21567 * src/bison.s1:
21568 [__sun && __i386]: Include alloca.h.
21569
21570 1996-07-31 Richard Stallman <rms@gnu.org>
21571
21572 * bison.simple:
21573 [__sun && __i386]: Include alloca.h.
21574
21575 1996-07-30 Richard Stallman <rms@gnu.org>
21576
21577 * src/bison.s1: Comment change.
21578
21579 * src/bison.s1: Test _MSDOS_, not MSDOS.
21580
21581 1996-07-30 Richard Stallman <rms@gnu.org>
21582
21583 * bison.simple: Comment change.
21584
21585 * bison.simple: Test _MSDOS_, not MSDOS.
21586
21587 1996-06-01 Richard Stallman <rms@gnu.org>
21588
21589 * 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:
21590 Insert `_' macro around many string constants.
21591
21592 * src/main.c:
21593 Insert `_' macro around many string constants.
21594
21595 (main): Call setlocale, bindtextdomain and textdomain.
21596
21597 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
21598 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
21599 [ENABLE_NLS]: Include libintl.h.
21600 [ENABLE_NLS] (gettext): Define.
21601 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
21602 (N_, PACKAGE, LOCALEDIR): New macros.
21603
21604 1996-06-01 Richard Stallman <rms@gnu.org>
21605
21606 * POTFILES.in: New file.
21607
21608 * Makefile.in (allocate.o):
21609 Define target explicitly.
21610
21611 * Makefile.in (CFLAGS): Set to @CFLAGS@.
21612 (LDFLAGS): Set to @LDFLAGS@.
21613 (configure): Run autoconf only if preceding `cd' succeeds.
21614 (bison.s1): Redirect output to temporary file then move the
21615 temporary to the target, rather than redirecting directly to bison.s1.
21616 (clean): Remove config.status and config.log.
21617 (distclean): Don't remove config.status here.
21618
21619 1996-05-12 Richard Stallman <rms@gnu.org>
21620
21621 * src/bison.s1:
21622 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21623
21624 1996-05-12 Richard Stallman <rms@gnu.org>
21625
21626 * bison.simple:
21627 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
21628
21629 1996-05-11 Richard Stallman <rms@gnu.org>
21630
21631 * src/bison.s1 (__yy_memcpy):
21632 Really reorder the args, as was supposedly done on Feb 14 1995.
21633 (yyparse): Calls changed accordingly.
21634
21635 1996-05-11 Richard Stallman <rms@gnu.org>
21636
21637 * Makefile.in (dist): Don't use $(srcdir).
21638
21639 * bison.simple (__yy_memcpy):
21640 Really reorder the args, as was supposedly done on Feb 14 1995.
21641 (yyparse): Calls changed accordingly.
21642
21643 1996-01-27 Richard Stallman <rms@gnu.org>
21644
21645 * src/output.c (output_rule_data):
21646 Test YYERROR_VERBOSE in the conditional
21647 around the definition of ttyname.
21648
21649 1995-12-29 Richard Stallman <rms@gnu.org>
21650
21651 * src/bison.s1:
21652 Fix line numbers in #line commands.
21653
21654 1995-12-29 Richard Stallman <rms@gnu.org>
21655
21656 * bison.simple:
21657 Fix line numbers in #line commands.
21658
21659 1995-12-27 Richard Stallman <rms@gnu.org>
21660
21661 * src/bison.s1 (YYPARSE_PARAM_DECL):
21662 In C++, make it always null.
21663 (YYPARSE_PARAM_ARG): New macro.
21664 (yyparse): Use YYPARSE_PARAM_ARG.
21665
21666 1995-12-27 Richard Stallman <rms@gnu.org>
21667
21668 * bison.simple (YYPARSE_PARAM_DECL):
21669 In C++, make it always null.
21670 (YYPARSE_PARAM_ARG): New macro.
21671 (yyparse): Use YYPARSE_PARAM_ARG.
21672
21673 1995-11-29 Richard Stallman <rms@gnu.org>
21674
21675 * doc/bison.texinfo:
21676 Describe literal string tokens, %raw, %no_lines, %token_table.
21677
21678 1995-11-29 Daniel Hagerty <hag@gnu.org>
21679
21680 * doc/bison.texinfo: Fixed update date
21681
21682 1995-10-16 Richard Stallman <rms@gnu.org>
21683
21684 * src/version.c: Version 1.25.
21685
21686 1995-10-16 Richard Stallman <rms@gnu.org>
21687
21688 * NEWS: *** empty log message ***
21689
21690 1995-10-16 Richard Stallman <rms@gnu.org>
21691
21692 * doc/bison.1, doc/bison.rnh:
21693 Add new options.
21694
21695 1995-10-15 Richard Stallman <rms@gnu.org>
21696
21697 * src/vmsgetargs.c, src/getargs.c:
21698 Added -n, -k, and -raw switches.
21699 (noparserflag, toknumflag, rawtoknumflag): New variables.
21700
21701 * src/symtab.h (SALIAS):
21702 New #define for adding aliases to %token.
21703 (struct bucket): Added `alias' field.
21704
21705 * src/reduce.c (reduce_grammar):
21706 Revise error message.
21707 (print_notices): Remove final `.' from error message.
21708
21709 * src/reader.c (reader_output_yylsp):
21710 New function.
21711 (readgram): Use `#if 0' around code that accepted %command
21712 inside grammar rules: The documentation doesn't allow it,
21713 and it will fail since the %command processors scan for the next %.
21714 (parse_token_decl): Extended the %token
21715 declaration to allow a multi-character symbol as an alias.
21716 (parse_thong_decl): New function.
21717 (read_declarations): Added %thong declarations.
21718 (read_declarations): Handle NOOP to deal with allowing
21719 % declarations as another means to specify the flags.
21720 (readgram): Allow %prec prior to semantics embedded in a rule.
21721 (skip_to_char, read_declarations, copy_definition)
21722 (parse_token_decl, parse_start_decl, parse_type_decl)
21723 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
21724 (get_type_name, copy_guard, copy_action, readgram)
21725 (get_type, packsymbols): Revised most error messages.
21726 Changed `fatal' to `warnxxx' to avoid aborting for error.
21727 Revised and use multiple warnxxx functions to avoid using VARARGS1.
21728 (read_declarations): Improve the error message for
21729 an invalid character. Do not abort.
21730 (read_declarations, copy_guard, copy_action): Use
21731 printable_version to avoid unprintable characters in printed output.
21732 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
21733 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
21734 Allow the type of a non-terminal can be given
21735 more than once, as long as all specifications give the same type.
21736
21737 * src/output.c:
21738 (output_headers, output_trailers, output, output_gram)
21739 (output_rule_data): Implement noparserflag variable.
21740 Implement toknumflag variable.
21741 (output): Call reader_output_yylsp to output LTYPESTR.
21742
21743 * src/main.c (main):
21744 If reader sees an error, don't process the grammar.
21745 (fatals): Updated to not use VARARGS1.
21746 (printable_version, int_to_string, warn, warni, warns, warnss)
21747 (warnsss): New error reporting functions. Avoid abort for error.
21748
21749 * src/lex.h:
21750 Added THONG and NOOP for alias processing.
21751 Added SETOPT for the new code that allows setting options with %flags.
21752
21753 * src/lex.c:
21754 Include getopt.h. Add some extern decls.
21755 (safegetc): New function to deal with EOF gracefully.
21756 (literalchar); new function to deal with reading \ escapes.
21757 (lex): Use literalchar.
21758 (lex): Implemented "..." tokens.
21759 (literalchar, lex, parse_percent_token): Made tokenbuffer
21760 always contain the token. This includes growing the token
21761 buffer while reading an integer.
21762 (parse_percent_token): Replaced if-else statement with percent_table.
21763 (parse_percent_token): Added % declarations as another
21764 way to specify the flags -n, -l, and -r. Also added hooks for
21765 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
21766 major changes to files.c.
21767 (lex) Retain in the incoming stream a character following
21768 an incorrect '/'.
21769 (skip_white_space, lex): Revised most error messages
21770 and changed fatal to warn to avoid aborting.
21771 (percent_table): Added %thong declarations.
21772
21773 * src/gram.h: Comment changes.
21774
21775 * src/files.c (openfiles, open_extra_files, done):
21776 Add faction flag
21777 and actfile file. Handle noparserflag. Both for -n switch.
21778
21779 * src/conflicts.c (resolve_sr_conflict):
21780 Remove use of alloca.
21781
21782 1995-06-01 Jim Meyering <meyering@gnu.org>
21783
21784 * doc/bison.texinfo: *** empty log message ***
21785
21786 1995-05-06 Richard Stallman <rms@gnu.org>
21787
21788 * src/bison.s1: Comment change.
21789
21790 1995-05-06 Richard Stallman <rms@gnu.org>
21791
21792 * bison.simple: Comment change.
21793
21794 1995-05-03 Richard Stallman <rms@gnu.org>
21795
21796 * src/version.c: Version now 1.24.
21797
21798 * src/bison.s1: Change distribution terms.
21799
21800 * src/version.c: Version now 1.23.
21801
21802 1995-05-03 Richard Stallman <rms@gnu.org>
21803
21804 * doc/bison.texinfo:
21805 Rewrite "Conditions for Using Bison".
21806 Update version to 1.24.
21807
21808 1995-05-03 Richard Stallman <rms@gnu.org>
21809
21810 * bison.simple: Change distribution terms.
21811
21812 1995-02-23 Richard Stallman <rms@gnu.org>
21813
21814 * src/files.c: Test __VMS_POSIX as well as VMS.
21815
21816 1995-02-14 Jim Meyering <meyering@gnu.org>
21817
21818 * src/bison.s1 (__yy_memcpy):
21819 Renamed from __yy_bcopy to avoid
21820 confusion. Reverse FROM and TO arguments to be consistent with
21821 those of memcpy.
21822
21823 1995-02-14 Jim Meyering <meyering@gnu.org>
21824
21825 * bison.simple (__yy_memcpy):
21826 Renamed from __yy_bcopy to avoid
21827 confusion. Reverse FROM and TO arguments to be consistent with
21828 those of memcpy.
21829
21830 1994-11-10 David J. MacKenzie <djm@gnu.org>
21831
21832 * NEWS: reformat
21833
21834 * NEWS: New file.
21835
21836 * Makefile.in (DISTFILES): Include NEWS.
21837
21838 * Makefile.in (DISTFILES):
21839 Include install-sh, not install.sh.
21840
21841 * configure.in: Update to Autoconf v2 macro names.
21842
21843 1994-10-05 David J. MacKenzie <djm@gnu.org>
21844
21845 * Makefile.in: fix typo
21846
21847 * Makefile.in (prefix, exec_prefix):
21848 Let configure set them.
21849
21850 1994-09-28 David J. MacKenzie <djm@gnu.org>
21851
21852 * Makefile.in: Set datadir to $(prefix)/share.
21853
21854 1994-09-15 Richard Stallman <rms@gnu.org>
21855
21856 * src/bison.s1:
21857 Update copyright notice and GPL version.
21858
21859 1994-09-15 Richard Stallman <rms@gnu.org>
21860
21861 * bison.simple:
21862 Update copyright notice and GPL version.
21863
21864 1994-07-12 Richard Stallman <rms@gnu.org>
21865
21866 * src/reduce.c, src/reader.c:
21867 entered into RCS
21868
21869 1994-05-05 David J. MacKenzie <djm@gnu.org>
21870
21871 * Makefile.in: entered into RCS
21872
21873 1994-03-26 Richard Stallman <rms@gnu.org>
21874
21875 * src/bison.s1: entered into RCS
21876
21877 1994-03-26 Richard Stallman <rms@gnu.org>
21878
21879 * bison.simple: entered into RCS
21880
21881 1994-03-25 Richard Stallman <rms@gnu.org>
21882
21883 * src/main.c: entered into RCS
21884
21885 1994-03-24 Richard Stallman <rms@gnu.org>
21886
21887 * src/conflicts.c: entered into RCS
21888
21889 1994-01-02 Richard Stallman <rms@gnu.org>
21890
21891 * Makefile.in: *** empty log message ***
21892
21893 1993-11-21 Richard Stallman <rms@gnu.org>
21894
21895 * src/bison.s1: *** empty log message ***
21896
21897 1993-11-21 Richard Stallman <rms@gnu.org>
21898
21899 * doc/bison.texinfo: entered into RCS
21900
21901 * doc/bison.texinfo: *** empty log message ***
21902
21903 1993-11-21 Richard Stallman <rms@gnu.org>
21904
21905 * bison.simple: *** empty log message ***
21906
21907 1993-10-25 David J. MacKenzie <djm@gnu.org>
21908
21909 * doc/bison.texinfo: *** empty log message ***
21910
21911 1993-10-19 Richard Stallman <rms@gnu.org>
21912
21913 * src/bison.s1: *** empty log message ***
21914
21915 1993-10-19 Richard Stallman <rms@gnu.org>
21916
21917 * bison.simple: *** empty log message ***
21918
21919 1993-10-14 Richard Stallman <rms@gnu.org>
21920
21921 * src/bison.s1: *** empty log message ***
21922
21923 1993-10-14 Richard Stallman <rms@gnu.org>
21924
21925 * bison.simple: *** empty log message ***
21926
21927 1993-09-14 David J. MacKenzie <djm@gnu.org>
21928
21929 * doc/bison.texinfo: *** empty log message ***
21930
21931 1993-09-13 Noah Friedman <friedman@gnu.org>
21932
21933 * Makefile.in: *** empty log message ***
21934
21935 1993-09-10 Richard Stallman <rms@gnu.org>
21936
21937 * src/conflicts.c: *** empty log message ***
21938
21939 * src/system.h: entered into RCS
21940
21941 1993-09-10 Richard Stallman <rms@gnu.org>
21942
21943 * doc/bison.1: entered into RCS
21944
21945 1993-09-06 Noah Friedman <friedman@gnu.org>
21946
21947 * src/version.c: entered into RCS
21948
21949 1993-09-06 Noah Friedman <friedman@gnu.org>
21950
21951 * Makefile.in: *** empty log message ***
21952
21953 1993-07-30 David J. MacKenzie <djm@gnu.org>
21954
21955 * Makefile.in: *** empty log message ***
21956
21957 1993-07-24 Richard Stallman <rms@gnu.org>
21958
21959 * src/bison.s1: *** empty log message ***
21960
21961 1993-07-24 Richard Stallman <rms@gnu.org>
21962
21963 * bison.simple: *** empty log message ***
21964
21965 1993-07-08 David J. MacKenzie <djm@gnu.org>
21966
21967 * Makefile.in: *** empty log message ***
21968
21969 1993-07-04 Richard Stallman <rms@gnu.org>
21970
21971 * src/bison.s1: *** empty log message ***
21972
21973 1993-07-04 Richard Stallman <rms@gnu.org>
21974
21975 * bison.simple: *** empty log message ***
21976
21977 1993-06-26 David J. MacKenzie <djm@gnu.org>
21978
21979 * src/getargs.c: entered into RCS
21980
21981 1993-06-26 David J. MacKenzie <djm@gnu.org>
21982
21983 * doc/bison.texinfo: *** empty log message ***
21984
21985 * doc/bison.1: New file.
21986
21987 1993-06-25 Richard Stallman <rms@gnu.org>
21988
21989 * src/getargs.c: New file.
21990
21991 1993-06-16 Richard Stallman <rms@gnu.org>
21992
21993 * src/bison.s1: *** empty log message ***
21994
21995 1993-06-16 Richard Stallman <rms@gnu.org>
21996
21997 * bison.simple: *** empty log message ***
21998
21999 1993-06-03 Richard Stallman <rms@gnu.org>
22000
22001 * src/bison.s1: New file.
22002
22003 1993-06-03 Richard Stallman <rms@gnu.org>
22004
22005 * doc/bison.texinfo: *** empty log message ***
22006
22007 1993-06-03 Richard Stallman <rms@gnu.org>
22008
22009 * bison.simple: New file.
22010
22011 1993-05-19 Richard Stallman <rms@gnu.org>
22012
22013 * doc/bison.texinfo: New file.
22014
22015 1993-05-07 Noah Friedman <friedman@gnu.org>
22016
22017 * Makefile.in: *** empty log message ***
22018
22019 1993-04-28 Noah Friedman <friedman@gnu.org>
22020
22021 * src/reader.c: *** empty log message ***
22022
22023 1993-04-23 Noah Friedman <friedman@gnu.org>
22024
22025 * src/alloc.h: entered into RCS
22026
22027 1993-04-20 David J. MacKenzie <djm@gnu.org>
22028
22029 * src/version.c: *** empty log message ***
22030
22031 * src/files.c, src/allocate.c:
22032 entered into RCS
22033
22034 * src/reader.c: *** empty log message ***
22035
22036 * src/lex.c: entered into RCS
22037
22038 * src/conflicts.c: New file.
22039
22040 * src/symtab.c: entered into RCS
22041
22042 * src/alloc.h: New file.
22043
22044 * src/LR0.c: entered into RCS
22045
22046 1993-04-18 Noah Friedman <friedman@gnu.org>
22047
22048 * src/reader.c: New file.
22049
22050 * src/version.c: *** empty log message ***
22051
22052 1993-04-18 Noah Friedman <friedman@gnu.org>
22053
22054 * Makefile.in: *** empty log message ***
22055
22056 1993-04-17 Noah Friedman <friedman@gnu.org>
22057
22058 * Makefile.in: *** empty log message ***
22059
22060 1993-04-15 Richard Stallman <rms@gnu.org>
22061
22062 * src/main.c, src/files.c:
22063 New file.
22064
22065 1993-04-15 Noah Friedman <friedman@gnu.org>
22066
22067 * configure.in: entered into RCS
22068
22069 * configure.in: *** empty log message ***
22070
22071 * configure.in: New file.
22072
22073 1993-04-14 Richard Stallman <rms@gnu.org>
22074
22075 * Makefile.in: New file.
22076
22077 1993-04-13 Richard Stallman <rms@gnu.org>
22078
22079 * src/version.c: New file.
22080
22081 1993-03-25 Richard Stallman <rms@gnu.org>
22082
22083 * src/output.c: entered into RCS
22084
22085 1992-09-25 Richard Stallman <rms@gnu.org>
22086
22087 * configure.bat: entered into RCS
22088
22089 1992-06-22 Richard Stallman <rms@gnu.org>
22090
22091 * src/vmsgetargs.c: entered into RCS
22092
22093 1992-06-22 Richard Stallman <rms@gnu.org>
22094
22095 * doc/bison.rnh: entered into RCS
22096
22097 1992-04-20 David J. MacKenzie <djm@gnu.org>
22098
22099 * README: entered into RCS
22100
22101 1992-01-22 Richard Stallman <rms@gnu.org>
22102
22103 * src/machine.h: entered into RCS
22104
22105 1991-12-21 Richard Stallman <rms@gnu.org>
22106
22107 * src/lalr.c, src/closure.c:
22108 entered into RCS
22109
22110 1991-12-20 Richard Stallman <rms@gnu.org>
22111
22112 * src/state.h: entered into RCS
22113
22114 1991-12-18 Richard Stallman <rms@gnu.org>
22115
22116 * src/print.c, src/nullable.c, src/derives.c:
22117 entered into RCS
22118
22119 1991-11-03 David J. MacKenzie <djm@gnu.org>
22120
22121 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
22122 entered into RCS
22123
22124 1988-09-09 Richard Stallman <rms@gnu.org>
22125
22126 * src/bison.hairy: entered into RCS
22127
22128 1987-12-16 Richard Stallman <rms@gnu.org>
22129
22130 * REFERENCES: entered into RCS
22131
22132
22133 -----
22134
22135 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
22136 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
22137 2007, 2008, 2009 Free Software Foundation, Inc.
22138
22139 Copying and distribution of this file, with or without
22140 modification, are permitted provided the copyright notice and this
22141 notice are preserved.