]> git.saurik.com Git - bison.git/blob - ChangeLog
muscles_output.
[bison.git] / ChangeLog
1 2008-11-10 Akim Demaille <demaille@gostai.com>
2
3 muscles_output.
4 * src/output.c (muscles_output): New, extracted from...
5 (output_skeleton): here.
6 Adjust.
7
8 2008-11-21 Akim Demaille <demaille@gostai.com>
9
10 Display the changes in cross-options.texi.
11 * build-aux/cross-options.pl ($sep): New, to separate items.
12 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
13 the changes.
14
15 2008-11-20 Di-an Jan <dianj@freeshell.org>
16
17 Improves options in the manual.
18 * doc/bison.texinfo (-g, -x): Add space before argument.
19 (Option Cross Key): Implement FIXME: listing directives also.
20 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
21 (Short Option): Special case -d. Put arguments inside @option.
22 (Bison Directive): Add column, automatically extracted from
23 src/scan-gram.l (actual name passed as the first argument)
24 with special case for %define.
25 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
26 to build-aux/cross-options.pl.
27 * src/getargs.c (usage): Document limitations of cross-options.pl.
28 * src/scan-gram.l: Likewise.
29
30 2009-02-25 Akim Demaille <demaille@gostai.com>
31
32 Copyright years.
33 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
34
35 2008-12-08 Akim Demaille <demaille@gostai.com>
36
37 Install autoconf as a submodule to get m4sugar.
38 * .gitmodules: Add submodules/autoconf.
39 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
40 submodules/autoconf.
41
42 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
43
44 Simplify last patch slightly.
45 * src/getargs.c (getargs): Here.
46
47 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
48
49 Fix last warning from --enable-gcc-warnings.
50 * src/getargs.c (getargs): Don't assign const address to non-const
51 pointer.
52
53 2008-11-17 Di-an Jan <dianj@freeshell.org>
54
55 Handle --enable-gcc-warnings.
56 * src/getargs.c (command_line_location): Set parameters to void.
57
58 2008-11-11 Akim Demaille <demaille@gostai.com>
59
60 AT_FULL_COMPILE.
61 * tests/actions.at, tests/regression.at: Use it.
62
63 2008-11-07 Akim Demaille <demaille@gostai.com>
64
65 Pass command line location to skeleton_arg and language_argmatch.
66 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
67 The location argument is now mandatory.
68 Adjust all dependencies.
69 (getargs): Use command_line_location.
70
71 2008-11-07 Akim Demaille <demaille@gostai.com>
72
73 -D, --define.
74 * src/getargs.c (usage): Document -D.
75 Fix help string for --locations.
76 (command_line_location): New.
77 (short_options, long_options, getargs): Support -D, --define.
78 (getargs): Move -d support at the right place.
79 * doc/bison.texinfo (Bison Options): Update.
80 * tests/input.at (%define, --define): New.
81
82 2008-11-07 Akim Demaille <demaille@gostai.com>
83
84 Initialize the muscle table before parsing the command line.
85 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
86 (getargs): Define file_name.
87 * src/main.c (main): Initialize muscle_tab before calling
88 getargs.
89 * src/muscle_tab.c (muscle_init): No longer define file_name, as
90 its value is not available yet.
91
92 2008-11-09 Akim Demaille <demaille@gostai.com>
93
94 Require the generation of parse-gram.output.
95 * src/Makefile.am (YACC): Pass --report=all.
96
97 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
98
99 * NEWS (2.5): New stub.
100
101 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
102
103 Fix options documentation.
104 * build-aux/cross-options.pl: As in --help output, write optional
105 arguments as [=ARG] not =[ARG].
106 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
107
108 2008-11-07 Akim Demaille <demaille@gostai.com>
109
110 Fix --help.
111 * src/getargs.c (usage): Fix help string for -W.
112
113 2008-11-07 Akim Demaille <demaille@gostai.com>
114
115 Handle more general types of option arguments.
116 * build-aux/cross-options.pl: The argument ends at the first
117 space, not the first non-symbol character.
118 Use @var for each word appearing the argument description.
119
120 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
121
122 Remove spurious initial empty lines.
123 * data/location.cc: End the @output lines with an @.
124
125 2008-11-04 Akim Demaille <demaille@gostai.com>
126
127 Remove spurious initial empty lines.
128 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
129 * data/yacc.c: End the @output lines with an @.
130
131 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
132
133 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
134 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
135 requirements for a correct m4 are stricter.
136 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
137 * configure.ac: Update to use AC_PROG_GNU_M4.
138 Reported by Eric Blake.
139
140 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
141
142 Help with updating web manual.
143 * HACKING: Incorporate instructions from gnulib/doc/README.
144 * bootstrap.conf (gnulib_modules): Add gendocs.
145
146 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
147
148 Fix strange %define locations for default values.
149 Reported by Akim Demaille at
150 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
151 and discussed again starting at
152 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
153 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
154 because location information is bogus.
155 Use angle brackets to delimit fake file name because square brackets
156 look like underexpanded m4. Choose a better fake file name.
157 Use negative line numbers.
158 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
159 * src/location.c (location_print): If line for a boundary is negative,
160 only print that boundary's file name.
161 * src/location.h: Document that.
162 * tests/skeletons.at (%define Boolean variables: invalid skeleton
163 defaults): Update output.
164
165 2008-11-07 Akim Demaille <demaille@gostai.com>
166
167 Locations without columns for command line arguments.
168 * src/location.c (location_print): Don't display negative columns.
169 * src/location.h: Document this.
170
171 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
172
173 Add reminder about uploading public key to keys.gnupg.net.
174 * HACKING (Release Procedure): Here.
175
176 2009-03-31 Akim Demaille <demaille@gostai.com>
177
178 bootstrap: --help to stdout.
179 * bootstrap (usage): Don't send --help to stderr.
180 Use a here doc instead of a long string.
181
182 2009-03-31 Akim Demaille <demaille@gostai.com>
183
184 bootstrap: README-hacking no longer exists
185 * bootstrap (checkout_only_file): Set to HACKING.
186
187 2009-03-26 Akim Demaille <demaille@gostai.com>
188
189 doc: merge HACKING and README-hacking.
190 Two files is confusing.
191 Reported by Alexandre Duret-Lutz.
192
193 * README-hacking: Merge into...
194 * HACKING (Working from the repository): here.
195
196 2009-03-26 Akim Demaille <demaille@gostai.com>
197
198 doc: update README-hacking.
199 * README-hacking: We now use git and git submodules.
200 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
201
202 2009-03-26 Akim Demaille <demaille@gostai.com>
203
204 lalr1.cc: avoid GCC 4.3 warnings.
205 GCC 4.3 now warns about "a || b && c" and asks for explicit
206 parentheses.
207 Reported by Alexandre Duret-Lutz.
208 * data/location.cc: Update copyright years.
209 (Position::operator==): Use parens to make precedence explicit.
210 Compare lines and columns first, as they are more likely to be
211 different, and they are faster to compare.
212
213 2009-03-26 Akim Demaille <demaille@gostai.com>
214
215 gnulib: update.
216 * gnulib: Update to latest.
217 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
218 use +=.
219
220 2009-01-08 Akim Demaille <demaille@gostai.com>
221
222 Fix grep portability issues.
223 Grep on Solaris does not support -q.
224 Reported by Summum Bonum.
225
226 * NEWS: Add a stub for 2.4.2.
227 * THANKS: Add Summum Bonum.
228 * tests/atlocal.in (EGREP): New.
229 (CC, CXX, XSLTPROC): Make it possible to override them via
230 envvars.
231 * tests/java.at: Use $EGREP instead of egrep.
232 Use AT_CHECK's ignore instead of grep's -q.
233
234 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
235
236 Version 2.4.1.
237 * NEWS: Set version and date.
238 * lib/Makefile.am: Update copyright year.
239 * tests/atlocal.in: Update copyright year.
240
241 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
242
243 Semicolon feature removal is not about future language support.
244 * NEWS: The semicolon feature is no longer active for newer languages,
245 so don't claim that it causes trouble for them.
246
247 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
248
249 * gnulib: Update submodule to HEAD.
250
251 2008-12-09 Akim Demaille <demaille@gostai.com>
252
253 Update data/README.
254 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
255
256 2008-12-05 Eric Blake <ebb9@byu.net>
257
258 Build testsuite with newer autoconf.
259 * tests/output.at (m4_expand): Don't override in newer autoconf,
260 where the underlying implementation changed.
261 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
262 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
263 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
264 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
265 since some of them contain unbalanced ')'.
266
267 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
268
269 * NEWS: Clarify a little.
270
271 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
272
273 * NEWS: Update for recent changes.
274
275 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
276
277 Fix unexpanded macros in GLR defines file.
278 Reported by Csaba Raduly at
279 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
280 * THANKS (Csaba Raduly): Add.
281 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
282 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
283 lexer in a separate module that includes the defines file.
284 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
285 source.
286 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
287 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
288 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
289 (AT_DATA_SOURCE_PROLOGUE): New.
290 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
291 (AT_DATA_SOURCE): New.
292 (AT_FULL_COMPILE): New, copied from master branch and extended to
293 support an additional source file.
294
295 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
296
297 Don't let maintainer-*-check targets force a version update.
298 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
299 handled.
300
301 2008-11-17 Di-an Jan <dianj@freeshell.org>
302
303 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
304 Align menus. Adjust word wrapping. Use node names for menu names.
305 (Examples): Don't abbreviate node names.
306 (LocalWords): Remove abbreviations.
307 (Copying): Make description a sentence.
308 (Java Action Features): Remove period to match the rest of menu.
309
310 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
311
312 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
313 * configure.ac: Adjust usage.
314 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
315 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
316 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
317
318 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
319
320 Don't add a semicolon to actions for %skeleton or %language.
321 It breaks Java test cases as reported by Akim Demaille.
322 * src/scan-code.l: Implement.
323
324 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
325
326 Clean up %skeleton and %language priority implementation.
327 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
328 remove static qualifier because others will soon need to see it.
329 (language_prio): Likewise.
330 (getargs): Use command_line_prio rather than 0.
331 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
332 enum fields.
333 (skeleton_prio): Extern it.
334 (language_prio): Extern it.
335 * src/parse-gram.y: Use grammar_prio rather than 1.
336
337 2008-11-04 Akim Demaille <demaille@gostai.com>
338
339 * NEWS: Mention the trailing semicolon in action.
340
341 2008-11-04 Akim Demaille <demaille@gostai.com>
342
343 Reformat NEWS.
344 * NEWS: Use more outline-mode markup.
345 Suggested by Jim Meyering.
346
347 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
348
349 Fix user actions without a trailing semicolon.
350 Reported by Sergei Steshenko at
351 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
352 * THANKS (Sergei Steshenko): Add.
353 * src/scan-code.l (SC_RULE_ACTION): Fix it.
354 * tests/regression.at (Fix user actions without a trailing semicolon):
355 New test case.
356
357 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
358
359 Initiate further development.
360 * NEWS: Create an empty section for new entries.
361 * gnulib: Update submodule to HEAD.
362
363 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
364
365 * NEWS: Version 2.4.
366
367 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
368
369 Prepare for next release.
370 * NEWS: Briefly mention changes since 2.3b.
371 * README: Say GNU m4 1.4.6, which we've been requiring in release
372 announcements already, not 1.4.3, which breaks the build.
373
374 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
375
376 Say %language is experimental.
377 We're thinking of extending it's effect on output file naming. See the
378 thread at
379 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
380 * NEWS: Say it's experimental.
381 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
382 recommend it over %skeleton for now.
383 (Bison Options): Likewise.
384 (C++ Bison Interface): Use %skeleton not %language.
385 (Calc++ Parser): Use %skeleton not %language.
386 * src/getargs.c (usage): Say it's experimental.
387
388 2008-11-01 Di-an Jan <dianj@freeshell.org>
389 Paolo Bonzini <bonzini@gnu.org>
390
391 Support all Java parser class modifiers.
392 * data/java.m4 (b4_percent_define_get3): New.
393 (b4_final_if, b4_strictfp_if): New.
394 * data/lalr1.java (final, strictfp, extends, implements): Support.
395 * doc/bison.texinfo (final, strictfp, extends, implements): Add
396 documentation.
397 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
398 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
399 (AT_CHECK_JAVA_GREP): New.
400 (Java parser class modifiers): New test.
401 (Java parser class extends and implements): New test.
402
403 Model exception propagation better with throws and lex_throws.
404 * data/java.m4 (b4_list2): New.
405 (throws): Change default.
406 * data/lalr1.java (yyaction): Add throws.
407 (parse): Add lex_throws in addition to throws.
408 * doc/bison.texinfo (throws, lex_throws): Add documentation.
409 * tests/java.at (Java throws specifications): New test.
410
411 Improve documentation for Java parsers.
412 * doc/bison.texinfo (Java Parsers): Add subsections.
413 Don't quote first argument of %define.
414 (Java Bison Interface): Document output files. Move documentation
415 of parser class and merge into Java Parser Interface. Document
416 features that error out. Document directives with no effect.
417 Move note about Javadoc higher.
418 (Java Semantic Values): Explicitly mention stype.
419 Document that generic types cannot be used.
420 (Java Location Values): Use @deftypeivar. Document constructors.
421 Correct return value for toString.
422 (Java Parser Interface): List undocumented constants/fields.
423 Move documentation of fields added by %parse-param closer to list
424 of members. Document that token names are added as fields.
425 Document constructors accurately. Remove error method.
426 (Java Scanner Interface): Move note on %pure-parser to Java Bison
427 Interface. Describe %code lexer and yylex accutately.
428 Remove documentation that does not match the code.
429 (Java Action Features): New.
430 (Java Differences): Add reference. Add item on semantic values.
431 Add note about @{ ... @}. Clarify %% epilogue placement.
432 (Java Declarations Summary): New.
433
434 Fix Java skeleton.
435 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
436 (b4_remove_comma): Quote test argument.
437 (b4_identification): Remove "bison" field.
438 * tests/java.at (Java parser class and package names): New test.
439 (Java %parse-param and %lex-param): New test.
440 (Java stype, position_class and location_class): New test.
441
442 2008-10-31 Di-an Jan <dianj@freeshell.org>
443
444 * data/lalr1.jave: Update copyright years.
445 (YYParser): Correct name of "generated from" file in Javadoc:
446 use b4_file_name instead of @ofile@.
447 (Location constructor): Correct Javadoc parameter name.
448 (yylloc): Add missing opening m4 quote after b4_location_if.
449 This removes a stray [ in the Javadoc of Lexer.getStartPos.
450 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
451 (YYParser constructor): Correct Javadoc parameter name.
452
453 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
454
455 Always put auxiliary code files in the same dir as other output files.
456 * src/files.c (compute_file_name_parts): When the user specifies
457 --output but not --file-prefix, extract the directory prefix from the
458 file prefix not from the grammar file name. This affects the location
459 of files like location.hh generated by the C++ skeleton. The includes
460 in the other output files require this fix.
461 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
462 for expected output files.
463 (Output files): Add a test for the above.
464
465 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
466
467 * gnulib: Update submodule to HEAD.
468
469 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
470
471 Update copyright year.
472 * src/files.c: Here.
473
474 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
475
476 Don't overwrite the input file.
477 * src/files.c (output_file_name_check): Fatal error if using input file
478 for output.
479 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
480 argument.
481 (Conflicting output files): Add test.
482
483 2008-10-28 Akim Demaille <demaille@gostai.com>
484
485 Space changes.
486 * data/lalr1.cc: Formatting changes.
487
488 2008-10-28 Akim Demaille <demaille@gostai.com>
489
490 Don't define debugging functions when !YYDEBUG.
491 * data/lalr1.cc (debug_stream, set_debug_stream)
492 (debug_level_type, debug_level, set_debug_level): Don't
493 declare them when YYDEBUG is not defined.
494 The implementation are already YYDEBUG-aware.
495
496 2008-10-28 Akim Demaille <demaille@gostai.com>
497
498 Prefer "continue" for empty loop bodies.
499 * etc/bench.pl.in: Use "continue" instead of {}.
500
501 2008-10-28 Akim Demaille <demaille@gostai.com>
502
503 Space and comments changes.
504 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
505 * data/c.m4, data/lalr1.cc: Space changes.
506
507 2008-10-28 Akim Demaille <demaille@gostai.com>
508
509 Make gnulib a submodule.
510 * gnulib: New.
511 * .gitmodules (gnulib): New.
512
513 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
514
515 Fix yyerror_range for user-defined location type in C++. Reported by
516 Georg Sauthoff at
517 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
518 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
519 * THANKS (Georg Sauthoff): Add.
520
521 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Update several administrative files mainly to facilitate releasing.
524 * HACKING (Administrivia): Make the git-merge-changelog notes more
525 helpful.
526 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
527 (Release Procedure): Update for git and add numerous details that were
528 previously missing.
529 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
530 * maint.mk (announcement): Don't list bison as a bootstrap tool so
531 that announcements don't claim we bootstrapped with whatever bison
532 happened to be in PATH. Add flex as a bootstrap tool.
533 * Makefile.maint: Remove, previously replaced by maint.mk.
534 * Makefile.cfg: Remove, and migrate settings to...
535 * cfg.mk: ... here for the sake of `make announcement'.
536 * bootstrap.conf (gnulib_modules): Add announce-gen.
537 * README: Say GNU Bison instead of just Bison. Suggested by Karl
538 Berry.
539
540 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
541
542 Small but important bugfixes for the Java skeleton.
543 * data/lalr1.java (yyerror): Change Location to b4_location_type.
544 (yy_symbol_print): Call toString on yyvaluep.
545
546 2008-08-29 Akim Demaille <demaille@gostai.com>
547
548 Clarify UPDATED use.
549 * doc/bison.texinfo: It refers to the last edition of this file,
550 not to the release date of Bison.
551 Reported by Joel E. Denny.
552
553 2008-08-29 Akim Demaille <demaille@gostai.com>
554
555 * README: Update FAQ pointer.
556 Reported by Joel E. Denny.
557
558 2008-08-27 Eric Blake <ebb9@byu.net>
559
560 Resync m4sugar from autoconf.
561 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
562 (m4_init): Adjust to latest m4.git changes.
563 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
564 effects.
565 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
566 (_m4_list_cmp): Reduce side effects.
567
568 2008-08-27 Akim Demaille <demaille@gostai.com>
569
570 Check yyerrok in calc.at.
571 * tests/calc.at (calc.y): Use yyerrok on "( error )".
572 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
573 expected.
574
575 2008-08-27 Akim Demaille <demaille@gostai.com>
576
577 Support yyerrok in lalr1.cc.
578 YYBACKUP is still to import back into lalr1.cc.
579 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
580
581 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
582
583 For maintainer-check*, don't recompile for a $(VERSION) update.
584 * cfg.mk: New file.
585 (_is-dist-target): Override the one in GNUmakefile.
586 * Makefile.am (EXTRA_DIST): Add cfg.mk.
587
588 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 Update for recent change to gnulib.
591 * src/parse-gram.y: Don't include strverscmp.h. It comes from
592 string.h now.
593
594 2008-08-15 Eric Blake <ebb9@byu.net>
595
596 Remaining m4sugar merge from autoconf.
597 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
598 * data/m4sugar/foreach.m4: New file, copied from autoconf.
599 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
600 * src/output.c (output_skeleton): Tell m4 how to find it.
601
602 Partial m4sugar merge from autoconf: m4_map.
603 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
604 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
605 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
606 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
607 for empty list.
608 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
609 Likewise.
610 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
611 declares it.
612
613 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
614
615 Keep .version and PACKAGE_VERSION in sync.
616 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
617 dependency, and add comments justifying this in more detail. Discussed
618 starting at
619 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
620
621 2008-08-06 Eric Blake <ebb9@byu.net>
622
623 Partial m4sugar merge from autoconf: m4_shiftn.
624 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
625 (m4_shift2, m4_shift3): New macros.
626 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
627 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
628 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
629 * data/java.m4 (b4_remove_comma): Likewise.
630
631 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
632 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
633 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
634 (m4_init): Consolidate wrapped text into single m4_wrap.
635 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
636 in wrapped text.
637
638 2008-08-05 Eric Blake <ebb9@byu.net>
639
640 Partial m4sugar merge from autoconf: builtins, version.m4.
641 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
642 (m4_prepend): Remove, as it is unused and inherently quadratic,
643 whereas m4_append is linear in newer m4.
644 (m4_mkstemp): New builtin.
645 (m4_symbols): Make rename conditional.
646 (m4_version_prereq): Ensure fatal error if used in bison, which
647 intentionally lacks version.m4.
648
649 Fix comments in m4sugar.
650 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
651
652 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
653
654 Update for recent .gitignore fix in Gnulib.
655 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
656 anchored .gitignore entries.
657
658 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
659
660 Set gnu or gnits strictness.
661 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
662 development and gnits strictness for releases. Based on Eric Blake's
663 suggestion at
664 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
665
666 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
667
668 * NEWS: Clarify documentation of %language.
669
670 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
671
672 Support usage of git-merge-changelog.
673 * .gitattributes: New.
674 * HACKING: Document usage of git-merge-changelog.
675 * bootstrap: Install git-merge-changelog entries in .git/config
676 if appropriate.
677
678 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
679
680 Remove remaining dependence on CVS Id keyword.
681 * ChangeLog: For the sake of people still using CVS, don't use dollars
682 when mentioning Id.
683 * data/xslt/bison.xsl: Remove Id from header comments, where it was
684 unusual anyway.
685 * data/xslt/xml2dot.xsl: Likewise.
686 * data/xslt/xml2text.xsl: Likewise.
687 * data/xslt/xml2xhtml.xsl: Likewise.
688 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
689 * doc/Makefile.am (neutralize): Remove, no longer needed.
690 (.x.1): Don't use neutralize.
691 (edit): Don't substitute for ID.
692 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
693
694 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
695
696 Fix dependence on computed configure variables.
697 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
698 $(top_srcdir)/configure.ac so that changes to computed variables, such
699 as PACKAGE_VERSION, are seen.
700 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
701
702 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
703
704 Update copyright dates for recent changes.
705 * Makefile.am: Here.
706 * src/Makefile.am: Here.
707 * src/reduce.c: Here.
708 * tests/reduce.at: Here.
709
710 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
711
712 Use git-version-gen for version names between releases.
713 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
714 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
715 * .prev-version: New.
716 * .version.in: Remove.
717 * ChangeLog: Remove the Id previously used for capturing the CVS
718 revision.
719 * GNUmakefile: Remove, now copied from Gnulib.
720 * Makefile.am: Add code suggested by comments in
721 build-aux/git-version-gen.
722 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
723 .prev-version, and .version.
724 * NEWS (2.3b+): Rename to...
725 (?.?): ... this because we're dropping the "+" version naming scheme,
726 but, in general, we still can't be sure of our next release name.
727 * bootstrap: Add a quick hack to remove from .gitignore the
728 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
729 entry. This should really be fixed in gnulib instead.
730 * bootstrap.conf (gnulib_modules): Add gnumakefile.
731 * configure.ac (AC_INIT): Set version name by invoking
732 build-aux/git-version-gen.
733 (AC_CONFIG_FILES): Remove .version, now generated by
734 build-aux/git-version-gen.
735 * maint.mk: New, copied from coreutils.
736 * doc/.cvsignore (bison.1): Add.
737 * doc/.gitignore (/bison.1): Add.
738 * doc/bison.1: Remove, generated.
739 * src/.cvsignore (revision.c): Remove.
740 * src/.gitignore (/revision.c): Remove.
741 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
742 (BUILT_SOURCES): Remove revision.c.
743 (revision.c): Remove.
744 * src/getargs.c (version): Don't print revision after the VERSION.
745 * src/revision.h: Remove.
746
747 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
748
749 Fix untranslatable composition of sentences. Reported by Goran
750 Uddeborg at
751 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
752 * THANKS (Goran Uddeborg): Add.
753 * src/reduce.c (reduce_print): Report the number of nonterminals and
754 rules useless in the grammar in separate sentences.
755 * tests/reduce.at (Useless Rules): Update output.
756 (Reduced Automaton): Likewise.
757 (Underivable Rules): Likewise.
758 (Empty Language): Likewise.
759
760 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
761
762 Fix some .gitignore and .cvsignore problems.
763 * bootstrap (insert_sorted_if_absent): Replace all uses with...
764 (insert_vc_ignore): ... this new function, which prepends `/' to all
765 .gitignore entries before passing them to insert_sorted_if_absent.
766 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
767 .cvsignore files are maintained even though Bison developers run
768 bootstrap while using Git.
769 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
770 unneeded by Bison.
771 (gnulib): Add.
772 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
773 unneeded. Reported by Eric Blake.
774 * lib/.gitignore (/*~): Add.
775 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
776 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
777 Blake.
778 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
779
780 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
781
782 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
783 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
784 * bootstrap.conf (gnulib_modules): Add unsetenv.
785 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
786 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
787 (/setenv.m4): Add.
788 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
789 the first argument because it may become position-dependent, and unset
790 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
791 Add comments explaining these issues in more detail.
792
793 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
794
795 Add .gitignore everywhere based on .cvsignore.
796 * .gitignore: New.
797 * build-aux/.gitignore: New.
798 * data/.gitignore: New.
799 * doc/.gitignore: New.
800 * etc/.gitignore: New.
801 * examples/.gitignore: New.
802 * examples/calc++/.gitignore: New.
803 * lib/.gitignore: New.
804 * m4/.gitignore: New.
805 * po/.gitignore: New.
806 * runtime-po/.gitignore: New.
807 * src/.gitignore: New.
808 * tests/.gitignore: New.
809
810 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
811
812 * NEWS (2.3b+): New section, empty for now.
813 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
814
815 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
816
817 * NEWS (2.3b): Update release date since there has been a delay in
818 getting the announcements and tarballs out.
819
820 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
821
822 * NEWS: Version 2.3b.
823 * configure.ac (AC_INIT): Likewise.
824 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
825
826 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
827
828 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
829 been doing it for years.
830 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
831 (Release Procedure): Add FIXME about make alpha being unmaintained.
832
833 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 * data/yacc.c: Reformat m4 a little for readability.
836 * src/lalr.c (build_relations): Correct comment.
837
838 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
839
840 DJGPP specific issue.
841 * djgpp/config.sed: Fixes required to run configure scripts generated
842 by autoconf 2.62.
843
844 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
845
846 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
847 coordinator@translationproject.org.
848
849 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
850
851 * THANKS: Add Eric Blake.
852
853 2008-04-23 Eric Blake <ebb9@byu.net>
854
855 Revert prior patch, by working around autoconf regression.
856 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
857 ("Output file name: ("): Uncomment test.
858 ("Output file name: )"): Likewise.
859 Based on an idea from Noah Misch.
860
861 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
862
863 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
864 2.61. Reported by Juan Manuel Guerrero at
865 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
866 * tests/output.at ("Output file name: ("): Comment out test case for
867 now.
868 ("Output file name: )"): Likewise.
869
870 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
871
872 * GNUmakefile: Update git-version-gen invocation so make dist
873 succeeds.
874
875 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
876
877 Update to the current gnulib CVS repository, and fix trigraph handling
878 in Bison.
879 * bootstrap: Update gnulib CVS repository URL.
880 (symlink_to_dir): Encapsulate the code that guarantees the destination
881 directory exists into...
882 (check_dst_dir): ... this new function, and...
883 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
884 fail when copying files into lib/uniwidth/.
885 * src/output.c (prepare_symbols): When writing yytname muscles, where
886 symbol names will be encoded in C-string literals, tell quotearg to
887 escape trigraphs. This used to be the default in gnulib.
888 * tests/regression.at (Token definitions): Because of the change in
889 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
890 escapes trigraphs in symbol names. Thus, yytname no longer has
891 trigraphs unnecessarily doubly escaped. Update test case output.
892 Extend test case to be sure Bison's own error messages will no longer
893 have trigraphs in symbol names unnecessarily escaped once.
894
895 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
896
897 Fix make dist infinite loop reported by Juan Manuel Guerrero at
898 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
899 * .cvsignore: Add .version.
900 * .version.in: New.
901 * bootstrap.conf (gnulib_modules): Add git-version-gen.
902 * configure.ac (AC_CONFIG_FILES): Add .version.
903 * build-aux/.cvsignore: Add git-version-gen.
904
905 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
906
907 * NEWS (2.3a+): Mention that -g now takes an argument.
908 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
909 consistency. Update the -g and -x entries now that they take
910 arguments. Use brackets to indicate optional arguments.
911 * src/getargs.c (usage): Explain the relationship between arguments of
912 long and short options more completely. Document --defines and -d
913 separately since the former takes an argument but, for POSIX Yacc, the
914 latter does not.
915 (short_options): Let -W take an optional argument like --warnings.
916 (getargs): Sort cases.
917
918 2008-02-28 Akim Demaille <demaille@gostai.com>
919
920 * doc/bison.texinfo: Fix a few typos.
921
922 2008-02-28 Akim Demaille <akim@epita.fr>
923
924 * doc/bison.texinfo (Bison Options): Document -W.
925 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
926
927 2008-02-28 Akim Demaille <akim@epita.fr>
928
929 * src/getargs.c (short_options): Split and sort for readability.
930 -g and -x take optional arguments, just like their long options.
931 * build-aux/cross-options.pl: Use /x to make the regexp easier to
932 understand.
933 Fix the handling of $opt which resulted in all the argument to be
934 considered as optional.
935
936 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
937
938 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
939 say its interface is experimental.
940 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
941 Java.
942 (Bison Options): In the -L and --language entry, mention Java.
943 (Java Bison Interface): Say the interface is experimental.
944 * src/getargs.c (usage): Mention -L and --language.
945
946 * NEWS (2.3a+): Say the push parsing interface is experimental.
947 * doc/bison.texinfo (Push Decl): Likewise.
948 (Decl Summary): Likewise in the "%define api.push_pull" entry.
949 (Push Parser Function): Likewise.
950 (Pull Parser Function): Likewise.
951 (Parser Create Function): Likewise.
952 (Parser Delete Function): Likewise.
953 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
954 yypull_parse, and yypush_parse entries.
955
956 * NEWS (2.3a+): Mention XML support, and say the schema is
957 experimental.
958 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
959 * src/getargs.c (usage): Say the XML schema is experimental.
960
961 * NEWS (2.3a+): Say option instead of flag.
962
963 2008-02-21 Wojciech Polak <polak@gnu.org>
964
965 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
966 text.
967
968 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
969
970 Fix impure push parser compile error reported by Bob Rossi at
971 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
972 * data/yacc.c: Clean up whitespace in the output a little.
973 (yypstate_allocated): Define for impure push parsers regardless of
974 whether the pull interface is also requested.
975 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
976 check impure push parsers without the pull interface.
977
978 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
979 yyerror takes arguments specified by %parse-param while yypstate_new
980 does not.
981 * doc/bison.texinfo (Parser Create Function): Document that
982 yypstate_new returns 0 for multiple impure parser instances.
983 * tests/push.at (Push Parsing: Multiple impure instances): Update
984 expected stderr output.
985
986 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
987
988 * runtime-po/POTFILES.in (push.c): Remove.
989
990 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
991
992 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
993 * data/push.c: Rename to...
994 * data/yacc.c: ... this, overwriting it.
995 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
996 `%push-pull-parser' -> `%define api.push_pull "both"'.
997 Remove old yacc.c tests, and update push.c tests to yacc.c.
998
999 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
1000
1001 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
1002 `"%code top" blocks' instead of `%code "top" blocks'.
1003 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
1004 Clean up whitespace in the output a little.
1005
1006 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1007
1008 Fix documentation problems reported by Tim Josling at
1009 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
1010 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
1011 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
1012 integers. Explain the effect of literal string aliases on error
1013 messages. Copy token 0 documentation from the C++ skeleton
1014 documentation.
1015
1016 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
1017
1018 Accept a token number in a %left, %right, or %nonassoc for POSIX
1019 conformance. Reported by Tim Josling at
1020 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
1021 * NEWS (2.3a+): Mention.
1022 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
1023 and code numbers are treated by precedence declarations.
1024 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
1025 of symbols.1.
1026 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
1027 of symbol.
1028 (symbol.prec): New, just like symbol but allows INT.
1029 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
1030 longer holds.
1031 * tests/regression.at (Token number in precedence declaration): New
1032 test case.
1033
1034 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1035
1036 DJGPP specific issues.
1037 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
1038 be changed. Copyright timestamp adjusted.
1039 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
1040 be changed. Copyright timestamp adjusted.
1041 * djgpp/config.site: Copyright timestamp adjusted.
1042 * djgpp/config_h.sed: Copyright timestamp adjusted.
1043 * djgpp/djunpack.bat: Copyright timestamp adjusted.
1044 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
1045 filename translation list.
1046 * djgpp/subpipe.c (init_subpipe): Check the environment variables
1047 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
1048 files shall be created. Before trying to use the temp dir where the
1049 environment variable points to check that the dir really exists. If
1050 not default to the cwd as temp dir. Copyright timestamp adjusted.
1051 * djgpp/subpipe.h: Copyright timestamp adjusted.
1052 * djgpp/testsuite.sed: Copyright timestamp adjusted.
1053
1054 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
1055
1056 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
1057
1058 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
1059
1060 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
1061 Problem reported by Claudio Saavedra in
1062 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
1063
1064 2008-01-05 Wojciech Polak <polak@gnu.org>
1065
1066 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
1067 document's title with the input grammar file name.
1068
1069 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
1070
1071 Automate regression testing of the XML/XSLT implementation. Discussed
1072 starting at
1073 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
1074 * configure.ac (XSLTPROC): New substitution.
1075 * Makefile.am (maintainer-xml-check): New phony target invoking...
1076 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
1077 invoking make maintainer-check with BISON_TEST_XML=1.
1078 * tests/atlocal.in (XSLTPROC): New.
1079 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
1080 not to report reachable memory when Bison is expected to have a
1081 non-zero exit status and (2) to compare XML/XSLT output with --graph
1082 and --report=all output for every working grammar when
1083 BISON_TEST_XML=1.
1084 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
1085 (AT_BISON_CHECK_XML): New.
1086 (AT_QUELL_VALGRIND): New.
1087 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
1088 (AT_CHECK): ... don't redefine this since this was the old way to
1089 quell Valgrind.
1090 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
1091 AT_BISON_CHECK invocations.
1092 * tests/c++.at: Likewise.
1093 * tests/calc.at: Likewise.
1094 * tests/conflicts.at: Likewise.
1095 * tests/cxx-type.at: Likewise.
1096 * tests/existing.at: Likewise.
1097 * tests/glr-regression.at: Likewise.
1098 * tests/headers.at: Likewise.
1099 * tests/input.at: Likewise.
1100 * tests/java.at: Likewise.
1101 * tests/output.at: Likewise.
1102 * tests/push.at: Likewise.
1103 * tests/reduce.at: Likewise.
1104 * tests/regression.at: Likewise.
1105 * tests/sets.at: Likewise.
1106 * tests/skeletons.at: Likewise.
1107 * tests/synclines.at: Likewise.
1108 * tests/torture.at: Likewise.
1109 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
1110 tends to hang xsltproc.
1111 (Big horizontal): Likewise.
1112
1113 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1114
1115 In XML output, remove redundant class attribute on symbol element.
1116 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
1117 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
1118 look up a symbol to determine whether it's a nonterminal or terminal.
1119 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
1120 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
1121
1122 Add prec/assoc information to XML output.
1123 * src/gram.c (grammar_rules_print_xml): For each rule that has a
1124 %prec, add a percent_prec attribute.
1125 * src/print-xml.c (print_grammar): For each terminal that has a
1126 precedence or associativity, add a prec or assoc attribute.
1127 (xml_indent): New.
1128 (xml_puts): Use xml_indent.
1129 (xml_printf): Use xml_indent.
1130 * src/print-xml.h (xml_indent): Prototype.
1131
1132 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
1133 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1134
1135 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
1136
1137 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
1138 (bison:ruleByNumber): ... this for clarity.
1139 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
1140 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
1141 (xsl:template match="reduction"): Update.
1142 (xsl:template match="item"): Update.
1143 (xsl:template match="reduction"): Update.
1144
1145 In the XML output, don't print the list of rules where symbols appear.
1146 Compute it in XSLT instead. Discussed at
1147 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
1148 * data/xslt/bison.xsl (bison:ruleByLhs): New.
1149 (bison:ruleByRhs): New.
1150 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
1151 bison:ruleByRhs.
1152 (xsl:template match="terminal/rule"): Remove.
1153 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1154 bison:ruleByRhs.
1155 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1156 Remove.
1157 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
1158 bison:ruleByRhs and mode="number-link" for rule template.
1159 (xsl:template match="terminal/rule"): Remove.
1160 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
1161 bison:ruleByRhs and mode="number-link" for rule template.
1162 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
1163 Rewrite as...
1164 (xsl:template match="rule" mode="number-link"): ... this.
1165 * src/print-xml.c (print_grammar): Don't print the list of rules.
1166
1167 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 Don't let --report affect XML output; always print all information.
1170 Discussed at
1171 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
1172 * src/conflicts.c (log_resolution): Implement.
1173 * src/print-xml.c (print_core): Implement.
1174 (print_state): Implement.
1175 (print_xml): Implement.
1176
1177 * NEWS (2.3a+): Fix quotes.
1178 * src/parse-gram.y (prologue_declaration): For consistency with -v,
1179 don't let %verbose clear the list specified by --report.
1180
1181 2007-11-26 Akim Demaille <akim@epita.fr>
1182
1183 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
1184
1185 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
1186
1187 In the XML output, list useless and unused symbols and rules with the
1188 useful ones and add a "usefulness" attribute. Discussed starting at
1189 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
1190 * src/gram.c (grammar_rules_partial_print_xml): Remove.
1191 (grammar_rules_print_xml): Print all rules instead of just those
1192 useful in the grammar, and add a "usefulness" attribute.
1193 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
1194 * src/print-xml.c (print_rules_useless_in_parser): Remove.
1195 (print_grammar): Print all nonterminals instead of just useful ones,
1196 and add a "usefulness" attribute to nonterminals and terminals.
1197 (print_xml): Don't print a separate "reductions" or
1198 "rules-useless-in-parser" element.
1199 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
1200 (reduce_xml): Remove.
1201 (reduce_token_unused_in_grammar): New.
1202 (reduce_nonterminal_useless_in_grammar): New.
1203 * src/reduce.h (reduce_xml): Remove prototype.
1204 (reduce_token_unused_in_grammar): Add prototype.
1205 (reduce_nonterminal_useless_in_grammar): Add prototype.
1206 * data/xslt/xml2text.xsl: Update for XML changes.
1207 * data/xslt/xml2xhtml.xsl: Update for XML changes.
1208 * tests/reduce.at (Useless Terminals): Update output.
1209 (Useless Rules): Update output.
1210 (Reduced Automaton): Update output.
1211
1212 Say "Terminals unused in grammar" instead of "Unused terminals".
1213 * NEWS (2.3a+): Update.
1214 * doc/bison.texinfo (Understanding): Update example output.
1215 * src/reduce.c (reduce_output): Implement.
1216 * data/xslt/xml2text.xsl: Implement.
1217 * data/xslt/xml2xhtml.xsl: Implement.
1218
1219 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1220
1221 Accept --report-file=FILE to override the default `.output' filename.
1222 * NEWS (2.3a+): Mention.
1223 * doc/bison.texinfo (Bison Options): Add an entry.
1224 * src/files.c (compute_output_file_names): Don't override
1225 spec_verbose_file if already set.
1226 * src/getargs.c (usage): Document --report-file.
1227 (REPORT_FILE_OPTION): New anonymous enum member.
1228 (long_options): Add entry for it.
1229 (getargs): Add case for it setting spec_verbose_file.
1230
1231 * build-aux/cross-options.pl: Don't record a short option just because
1232 there's an arg.
1233 * doc/.cvsignore: Add yacc.1.
1234
1235 2007-11-14 Akim Demaille <akim@epita.fr>
1236
1237 * doc/yacc.1.in: New.
1238 * configure.ac, doc/Makefile.am: Adjust.
1239 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
1240 config.h symbol.
1241 Use AC_SUBST for assignments too.
1242 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
1243
1244 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1245
1246 * src/gram.c: Remove comments that duplicate comments in gram.h.
1247
1248 When reporting useless rules and nonterminals, say "useless in grammar"
1249 instead of "useless", and say "useless in parser" instead of "never
1250 reduced". Discussed starting at
1251 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
1252 * NEWS (2.3a+): Mention this change.
1253 * data/xslt/xml2text.xsl: Update output text and expected input XML
1254 element names to match changes below.
1255 * data/xslt/xml2xhtml.xsl: Likewise.
1256 (xsl:template match="bison-xml-report"): Add missing entry in Table of
1257 Contents: "Rules useless in parser due to conflicts".
1258 * doc/bison.texinfo (Decl Summary): Reword a little.
1259 (Understanding): Update example output for changes below.
1260 * src/gram.c: (rule_useful_p): Rename to...
1261 (rule_useful_in_grammar_p): ... this.
1262 (rule_useless_p): Rename to...
1263 (rule_useless_in_grammar_p): ... this.
1264 (rule_never_reduced_p): Rename to...
1265 (rule_useless_in_parser_p): ... this.
1266 (grammar_rules_print): Update for renames.
1267 (grammar_rules_print_xml): Update for renames.
1268 (grammar_rules_never_reduced_report): Rename to...
1269 (grammar_rules_useless_report): ... this since it is used for either
1270 kind of useless rule.
1271 * src/gram.h: Reword comments and update function names in prototypes.
1272 * src/main.c (main): Say "rule useless in parser due to conflicts".
1273 * src/print-xml.c (print_rules_never_reduced): Rename to...
1274 (print_rules_useless_in_parser): ... this, and rename output XML
1275 element "rules-never-reduced" to "rules-useless-in-parser".
1276 (print_xml): Update for rename.
1277 * src/print.c (print_results): Say "Rules useless in parser due to
1278 conflicts".
1279 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
1280 (nonterminals_reduce): Say "nonterminal useless in grammar".
1281 (reduce_output): Say "Nonterminals useless in grammar".
1282 Say "Rules useless in grammar".
1283 (reduce_xml): Rename output XML element "useless" to
1284 "useless-in-grammar".
1285 (reduce_print): Don't report the count of grammatically useless rules
1286 as "rules never reduced" just because %yacc is specified.
1287 In the correct report of this count, say nonterminal(s) and rule(s)
1288 "useless in grammar".
1289 * tests/conflicts.at (S/R in initial): Update expected output.
1290 (Defaulted Conflicted Reduction): Likewise.
1291 (Unreachable States After Conflict Resolution): Likewise.
1292 * tests/existing.at (GNU pic Grammar): Likewise.
1293 * tests/reduce.at (Useless Nonterminals): Likewise.
1294 (Useless Rules): Likewise.
1295 (Reduced Automaton): Likewise.
1296 (Underivable Rules): Likewise.
1297 (Empty Language): Likewise.
1298
1299 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1300
1301 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
1302 here document and before the EOF so that BSD's implementation of Bourne
1303 shell doesn't parse the delimiter as part of the here document.
1304 * doc/.cvsignore: Add cross-options.texi.
1305 * src/getargs.c (usage): Add a blank line after the warning categories.
1306
1307 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
1308
1309 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
1310
1311 2007-11-05 Akim Demaille <akim@epita.fr>
1312
1313 Remove Id: from bison.1.
1314 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
1315 (perl -0777 -pi -e 's/\.PP\nId): New.
1316 (.x.1): Use it to ignore the version control revision.
1317
1318 2007-11-05 Akim Demaille <demaille@gostai.com>
1319
1320 * build-aux/Makefile.am: Ship cross-options.pl.
1321 * doc/Makefile.am: Always refer to cross-options.texi with
1322 $(srcdir).
1323 (MAINTAINERCLEANFILES): Add it.
1324
1325 2007-11-04 Akim Demaille <demaille@gostai.com>
1326
1327 Generate the long/short option cross-table.
1328 * build-aux/cross-options.pl: New.
1329 * doc/Makefile.am (cross-options.texi): New.
1330 * doc/bison.texinfo: Use it.
1331
1332 2007-11-04 Akim Demaille <demaille@gostai.com>
1333
1334 Generate bison.1 using help2man.
1335 * doc/common.x, doc/bison.x: New.
1336 * doc/Makefile.am (bison.1, .x.1): New.
1337 The code is taken from autoconf-2.61/man/Makefile.am.
1338 * configure.ac: Look for help2man.
1339
1340 2007-11-04 Akim Demaille <demaille@gostai.com>
1341
1342 Complete --help.
1343 * src/getargs.c (usage): Document -W, make it clear that -d,
1344 -g and -x have optional arguments.
1345
1346 2007-11-04 Akim Demaille <demaille@gostai.com>
1347
1348 Find sha1sum when named gsha1sum.
1349 * bootstrap (find_tool): New.
1350 ($SHA1SUM): New.
1351
1352 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1353
1354 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
1355 at
1356 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
1357 * NEWS (2.3a+): Mention.
1358 * data/bison.m4 (b4_pure_if): Don't define it here.
1359 * data/c.m4 (b4_identification): Depend on individual skeletons to
1360 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
1361 values of the %define variables api.pure or api.push_pull. Define
1362 YYPURE, YYPUSH, and YYPULL accordingly.
1363 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
1364 glr.cc has already defined b4_pure_flag.
1365 * data/push.c: Define b4_pure_if based on `%define api.pure'.
1366 Remove YYPUSH and YYPULL since they're back in b4_identification again.
1367 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
1368 * doc/bison.texinfo (Pure Decl): Update.
1369 (Push Decl): Update.
1370 (Decl Summary): Add api.pure to %define entry.
1371 In %pure-parser entry, say it's deprecated and reference %define.
1372 (Pure Calling): Update.
1373 (Error Reporting): Update.
1374 (C++ Scanner Interface): Update.
1375 (How Can I Reset the Parser): Update.
1376 (Table of Symbols): In %pure-parser entry, say it's deprecated and
1377 reference %define.
1378 * src/getargs.c (pure_parser): Remove global variable.
1379 * src/getargs.h (pure_parser): Remove extern.
1380 * src/output.c (prepare): Don't define pure_flag muscle.
1381 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
1382 wrapper around `%define api.pure'.
1383 * tests/calc.at (Simple LALR Calculator): Update.
1384 (Simple GLR Calculator): Update.
1385 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
1386 Update.
1387 (GLR: Resolve ambiguity, pure, locations): Update.
1388 (GLR: Merge conflicting parses, pure, no locations): Update.
1389 (GLR: Merge conflicting parses, pure, locations): Update.
1390 * tests/glr-regression.at (Uninitialized location when reporting
1391 ambiguity): Update
1392 * tests/input.at (Unused %define api.pure): New test case.
1393 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
1394 AT_PURE_IF and AT_PURE_AND_LOC_IF.
1395 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1396
1397 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 %define push_pull -> %define api.push_pull. Discussed starting at
1400 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
1401 * data/push.c: Expect the new name.
1402 * data/yacc.c: Likewise.
1403 * doc/bison.texinfo (Push Decl): Update.
1404 (Decl Summary): Update %define entry.
1405 (Push Parser Function): Update.
1406 (Pull Parser Function): Update.
1407 (Parser Create Function): Update.
1408 (Parser Delete Function): Update.
1409 * tests/calc.at (Simple LALR Calculator): Update.
1410 * tests/input.at (%define enum variables): Update.
1411 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
1412 (Push Parsing: Multiple impure instances): Update.
1413 (Push Parsing: Unsupported Skeletons): Update.
1414 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
1415 (Exploding the Stack Size with Malloc): Update.
1416
1417 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
1418 other entries some.
1419
1420 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
1421
1422 For the XML output's terminal element, rename @number to @token-number,
1423 and add @symbol-number. In the nonterminal element, rename @number to
1424 @symbol-number. Discussed starting at
1425 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
1426 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
1427 renames.
1428 (xsl:template match="nonterminal"): Likewise.
1429 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
1430 (xsl:template match="nonterminal"): Likewise.
1431 * src/print-xml.c (print_grammar): Implement.
1432
1433 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1434
1435 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
1436 2007-10-11 change, the child elements here are items not rules.
1437 (xsl:template match="item"): New.
1438 (xsl:template match="rule"): Update for new reduced itemset.
1439 (xsl:template match="point"): Remove.
1440 (xsl:template match="empty"): For consistency with --graph, don't
1441 output "/* empty */".
1442 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
1443 line-wrap, don't pass a negative value as first-line-length since this
1444 won't work with the following changes.
1445 (xsl:template name="line-wrap"): Simplify slightly.
1446 (xsl:template name="ws-search"): Eliminate recursion.
1447 * src/print_graph.c (print_core): Don't print a reduction's lookahead
1448 set next to an item whose dot is not at the end of the RHS even if it
1449 happens to be associated with the same rule.
1450
1451 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 Add %define lr.keep_unreachable_states.
1454 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
1455 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
1456 * src/main.c (main): Implement it.
1457 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1458 Extend to test it, and fix a typo.
1459
1460 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
1461
1462 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
1463 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
1464 the example .output text.
1465 * tests/regression.at (Extra lookahead sets in report): Improve wording
1466 of comments.
1467
1468 2007-10-17 Wojciech Polak <polak@gnu.org>
1469
1470 * src/print-xml.c (print_grammar): Renamed
1471 <terminal> and <nonterminal> attributes:
1472 "type" to "number" and "symbol" to "name".
1473 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
1474 Use new attribute names.
1475 (xsl:template match="nonterminal"): Likewise.
1476 * data/xslt/xml2xhtml.xsl: Likewise.
1477
1478 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
1479
1480 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
1481 (Option Cross Key): Likewise.
1482
1483 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
1484 next to an item whose dot is not at the end of the RHS even if it
1485 happens to be associated with the same rule.
1486 * src/print.c (print_core): Likewise.
1487 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
1488 (Resolved SR Conflicts): Update output.
1489 * tests/regression.at (Extra lookahead sets in report): New test case.
1490
1491 2007-10-11 Wojciech Polak <polak@gnu.org>
1492
1493 * src/print-xml.c (print_core): Remove item set
1494 redundancy.
1495 * data/xslt/bison.xsl (bison:ruleNumber): New key.
1496 Improve processing time. Suggested by Joel E. Denny.
1497 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
1498 Write xsl:param "required" attribute as comment.
1499 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
1500 (xsl:template match="rule"): Support new reduced itemset.
1501 (xsl:template match="point"): Remove.
1502 * data/xslt/xml2xhtml.xsl: Likewise.
1503
1504 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1505
1506 * src/getargs.c (version): Update copyright year.
1507
1508 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
1509
1510 Make xml2dot.xsl and --graph produce the same output.
1511 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
1512 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
1513 escaped later.
1514 (xsl:template name="output-node"): Use the new escape template instead
1515 of the string-replace template directly.
1516 (xsl:template name="output-edge"): Likewise.
1517 (xsl:template name="escape"): New, escapes backslashes and newlines in
1518 addition to quotation marks.
1519 * src/graphviz.c (start_graph, output_node, output_edge): Add
1520 whitespace to output for legibility.
1521
1522 Make xml2text.xsl and --report produce the same output, and remove the
1523 XML "conflicts" element since a conflict summary is easily extracted
1524 from the automaton.
1525 * data/xslt/bison.xsl: New.
1526 (xsl:template match="state" mode="bison:count-conflicts): New.
1527 * data/xslt/xml2text.xsl: Import bison.xsl.
1528 (xsl:template match="bison-xml-report"): Instead of styling the
1529 "conflicts" element, style the "automaton" element with mode
1530 "conflicts". Unlike the former, the latter lists S/R and R/R
1531 conflicts for a state on the same line.
1532 (xsl:template match="conflicts"): Remove.
1533 (xsl:template match="conflict"): Remove.
1534 (xsl:template match="terminal"): Line-wrap the list of rules in which
1535 the terminal is used.
1536 (xsl:template match="nonterminal"): Likewise for nonterminals.
1537 (xsl:template match="automaton" mode="conflicts"): New.
1538 (xsl:template match="state" mode="conflicts"): New.
1539 (xsl:template name="line-wrap"): New.
1540 (xsl:template name="ws-search"): New.
1541 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
1542 (xsl:template match="bison-xml-report"): Instead of styling the
1543 "conflicts" element, style the "automaton" element with mode
1544 "conflicts."
1545 (xsl:template match="conflicts"): Remove.
1546 (xsl:template match="conflict"): Remove.
1547 (xsl:template match="automaton" mode="conflicts"): New.
1548 (xsl:template match="state" mode="conflicts): New.
1549 * src/conflicts.c (conflicts_output_xml): Remove.
1550 * src/conflicts.h (conflicts_output_xml): Remove prototype.
1551 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
1552 * src/print.c (print_grammar): Consistently wrap at the 66th column so
1553 the corresponding XSLT is easier. Also, never wrap between a word and
1554 the comma that follows it.
1555
1556 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1557
1558 Improve C++ namespace support. Discussed starting at
1559 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
1560 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
1561 b4_namespace_close): New macros that interpret the %define variable
1562 "namespace" so its value can contain "::" to indicate nested
1563 namespaces.
1564 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
1565 the above macros.
1566 * data/lalr1.cc (b4_namespace): Likewise.
1567 * data/location.cc (b4_namespace): Likewise.
1568 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
1569 inside a new table in the general %define entry. Document `%define
1570 namespace' there as well. Point the %name-prefix entry to it since it
1571 explains it more completely in the case of C++.
1572 (C++ Bison Interface): Mention `%define namespace' instead of
1573 %name-prefix.
1574 (Table of Symbols): Remove the `%define push_pull' entry. The %define
1575 entry suffices.
1576 * tests/c++.at (Relative namespace references): New test case.
1577 (Absolute namespace references): New test case.
1578 (Syntactically invalid namespace references): New test case.
1579 * tests/input.at (C++ namespace reference errors): New test case.
1580
1581 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
1582
1583 Add syncline support and location accessor to internal %define
1584 interfaces.
1585 * data/bison.m4 (b4_percent_define_get_loc): New.
1586 (b4_percent_define_get_syncline): New.
1587 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
1588 (b4_percent_define_default): Record defining location as line 1 rather
1589 than 0 for the sake of synchronizing #line's, and define
1590 b4_percent_define_syncline(VARIABLE).
1591 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
1592 * src/muscle_tab.c (muscle_syncline_grow): New.
1593 (muscle_code_grow): Use muscle_syncline_grow.
1594 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
1595 define b4_percent_define_syncline(VARIABLE).
1596 (muscle_percent_define_get_loc): New.
1597 (muscle_percent_define_get_syncline): New.
1598 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
1599 remove some unused variables.
1600 (muscle_percent_define_default): Record defining location as line 1
1601 rather than 0 for the sake of synchronizing #line's, and define
1602 b4_percent_define_syncline(VARIABLE).
1603 (muscle_percent_define_check_values): Use
1604 muscle_percent_define_get_loc.
1605 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
1606 (muscle_percent_define_get_syncline): Prototype.
1607 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1608 defaults): Update output for location change.
1609 (Complaining during macro argument expansion): Extend to test
1610 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
1611
1612 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
1613
1614 Fix some error-reporting macro bugs.
1615 * data/bison.m4 (b4_cat): New.
1616 (b4_error, b4_error_at): Use b4_cat to send error directives directly
1617 to stdout so they don't become arguments to other macros. Update
1618 comments and add examples.
1619 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
1620 add examples.
1621 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
1622 after printing the error directive so that M4 doesn't report subsequent
1623 problems that are induced by this problem.
1624 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
1625 instead of just in them. Recognize @\n in both places. Both expand to
1626 the empty string. Needed by b4_cat.
1627 * tests/skeletons.at (Complaining during macro argument expansion):
1628 New test case.
1629 (Fatal errors make M4 exit immediately): New test case.
1630
1631 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
1632
1633 Implement --print-datadir.
1634 * src/getargs.c (usage): Mention.
1635 (PRINT_DATADIR_OPTION): New anonymous enum member.
1636 (long_options): Add entry for it.
1637 (getargs): Add case for it calling compute_pkgdatadir.
1638 * src/output.c (output_skeleton): Encapsulate data directory
1639 computation from here...
1640 (prepare): ... and from here...
1641 (compute_pkgdatadir): ... into this new function.
1642 * src/output.h (compute_pkgdatadir): Prototype.
1643
1644 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
1645
1646 * src/print-xml.c (escape_bufs): New static global variable
1647 replacing...
1648 (xml_escape_n): ... the static local variable buf here.
1649 (print_xml): Free memory for escape_bufs.
1650 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
1651
1652 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
1653
1654 Replace `%push-parser' and `%push-pull-parser' with
1655 `%define push_pull "push"' and `%define push_pull "both"'.
1656 `%define push_pull "pull"' is the default.
1657 * doc/bison.texinfo (Push Decl, Push Parser Function,
1658 Pull Parser Function, Parser Create Function, Parser Delete Function):
1659 Update declarations.
1660 (Decl Summary, Table of Symbols): Replace %push-parser and
1661 %push-pull-parser entries with a %define push_pull entry.
1662 * data/bison.m4 (b4_percent_define_check_values): New macro.
1663 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
1664 definitions...
1665 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
1666 definitions...
1667 * data/push.c: ... to here and compute them from the value of the
1668 %define variable push_pull.
1669 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
1670 parsing requests here...
1671 * data/yacc.c: ... hack this to switch to push.c any time
1672 b4_use_push_pull_flag or the %define variable push_pull is set. This
1673 will go away when we mv push.c yacc.c.
1674 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
1675 push parsing is not supported since unused %define variables are
1676 reported anyway.
1677 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
1678 * src/muscle_tab.h (muscle_percent_define_check_values): Update
1679 comments for consistency with b4_percent_define_check_values.
1680 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
1681 muscles.
1682 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
1683 Remove.
1684 (prologue_declaration): Remove %push-parser and %push-pull-parser
1685 rules.
1686 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
1687 * tests/calc.at: Update declarations.
1688 * tests/input.at (%define enum variables): New test case.
1689 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
1690 declaration.
1691 (Push Parsing: Multiple impure instances): Update declaration.
1692 (Push Parsing: Unsupported Skeletons): New test case.
1693 * tests/torture.at (Exploding the Stack Size with Alloca): Update
1694 declaration.
1695 (Exploding the Stack Size with Malloc): Update declaration.
1696
1697 2007-09-24 Wojciech Polak <polak@gnu.org>
1698
1699 Add XSLT transformations.
1700
1701 * data/xslt/xml2dot.xsl: Transform XML into DOT.
1702 * data/xslt/xml2text.xsl: Transform XML into plain text.
1703 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
1704 * data/Makefile.am (xsltdir): New variable.
1705 (dist_xslt_DATA): Add xslt/*.xsl files.
1706
1707 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
1708
1709 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
1710 Problem reported by Wojciech Polak.
1711 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
1712 (xml_printf): Undo change I made on 21 September; that is,
1713 indent 2 spaces, not 1.
1714
1715 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
1716
1717 Pacify ./configure --enable-gcc-warnings.
1718 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
1719 `char const *' instead of `char *'.
1720 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
1721 local variable `sep'.
1722
1723 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1724
1725 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
1726 elsewhere.
1727 * src/print-xml.c: Prefer "const" after types; that's more consistent.
1728 (xml_printf): Indent just 1 space for level.
1729 (e_char, xlate_char): Remove.
1730 (xml_escape_string): Rewrite to avoid undefined behavior (used
1731 storage that was freed from the stack).
1732 (xml_escape_n): Don't bother checking for subscript error.
1733
1734 2007-09-21 Wojciech Polak <polak@gnu.org>
1735
1736 Add Bison XML Automaton Report.
1737
1738 Add support for an -x option to generate an XML report.
1739 It is not documented yet.
1740 * src/print-xml.c: New file.
1741 * src/print-xml.h: Likewise.
1742 * lib/timevar.def (TV_XML): New var.
1743 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
1744 * src/conflicts.c: Include print-xml.h.
1745 (solved_conflicts_xml_obstack): New var.
1746 (log_resolution, conflicts_solve, conflicts_free):
1747 Add support for XML report.
1748 (conflicts_output_val): New function.
1749 * src/conflicts.h (conflicts_output_val): New decl.
1750 * src/files.c (spec_xml_file): New var.
1751 (compute_output_file_names, output_file_names_free): Add XML support.
1752 * src/files.h (spec_xml_file): New decl.
1753 * src/getargs.c (xml_flag): New var.
1754 (usage, short_options, long_options, getargs): Add XML support.
1755 * src/getargs.h (xml_flag): New decl.
1756 * src/gram.c: Include print-xml.h.
1757 (rule_lhs_print_xml, rule_rhs_print_xml):
1758 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
1759 New functions.
1760 * src/gram.h: Declare external ones.
1761 * src/main.c: Include print-xml.h.
1762 (main): Add XML support.
1763 * src/reduce.c: Include print-xml.h.
1764 (reduce_xml): New function.
1765 * src/reduce.h: Declare it.
1766 * src/state.c: Include print-xml.h.
1767 (state_new): Add XML support.
1768 (state_rule_lookahead_tokens_print_xml): New function.
1769 * src/state.h: Declare it.
1770 (struct state): New member solved_conflicts_xml.
1771 * src/symtab.c (symbol_class_get_string): New function.
1772 * src/symtab.h: Declare it.
1773
1774 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
1775
1776 * GNUmakefile: Switch to coreutils's version.
1777 * bootstrap: Likewise.
1778 * Makefile.cfg: Adjust to new GNUmakefile.
1779 * README-hacking: Likewise.
1780
1781 Import from gnulib:
1782
1783 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1784 Bruno Haible <bruno@clisp.org>
1785
1786 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1787 and is a script that invokes bison. Tighten the code. Add comments.
1788
1789 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1790
1791 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1792 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1793 * doc/bison.texinfo (Decl Summary): Fix.
1794 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1795 * tests/input.at (Boolean %define variables): Update output.
1796 * tests/skeletons.at (%define boolean variables: invalid skeleton
1797 defaults): Rename to...
1798 (%define Boolean variables: invalid skeleton defaults): ... this and
1799 update output.
1800
1801 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1802
1803 In impure push mode, don't allow more than one yypstate to be allocated
1804 since multiple impure parsers would corrupt yynerrs.
1805 * data/push.c (yypstate_allocated): New static global variable
1806 initialized to 0.
1807 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1808 exhaustion if yypstate_allocated is 1, but still return 2.
1809 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1810 already 1. Otherwise, set it to 1.
1811 (yypstate_delete): Set it to 0.
1812 * tests/push.at (Push Parsing: Multiple impure instances): New test
1813 case.
1814
1815 2007-08-17 Bob Rossi <bob@brasko.net>
1816
1817 * doc/bison.texinfo (Push Decl): Document the push parser.
1818 (Table of Symbols): Ditto.
1819 (Pure Decl): Ditto.
1820 (Decl Summary): Ditto.
1821 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1822 Parser Create Function, Parser Delete Function):
1823 Add new push parser symbols.
1824 (Table of Symbols): Document push-parser, push-pull-parser,
1825 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1826
1827 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1828
1829 Update to GPLv3.
1830 * doc/gpl-3.0.texi: New file.
1831 * doc/gpl.texi: Remove.
1832 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1833 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1834 * README-hacking, TODO, bootstrap, bootstrap.conf:
1835 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1836 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1837 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1838 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1839 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1840 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1841 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1842 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1843 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1844 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1845 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1846 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1847 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1848 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1849 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1850 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1851 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1852 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1853 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1854 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1855 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1856 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1857 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1858 * src/complain.c, src/complain.h, src/conflicts.c:
1859 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1860 * src/files.h, src/flex-scanner.h, src/getargs.c:
1861 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1862 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1863 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1864 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1865 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1866 * src/print.c, src/print.h, src/print_graph.c:
1867 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1868 * src/reduce.h, src/relation.c, src/relation.h:
1869 * src/revision.h, src/scan-code.h, src/scan-code.l:
1870 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1871 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1872 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1873 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1874 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1875 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1876 * tests/existing.at, tests/glr-regression.at:
1877 * tests/headers.at, tests/input.at, tests/java.at:
1878 * tests/local.at, tests/output.at, tests/push.at:
1879 * tests/reduce.at, tests/regression.at, tests/sets.at:
1880 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1881 * tests/torture.at:
1882 Update to GPLv3.
1883
1884 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1885
1886 Get rid of broken %no-parser, -n, and --no-parser implementation and
1887 documentation.
1888 * TODO: Don't mention them.
1889 * doc/bison.1: Likewise.
1890 * doc/bison.texinfo (Decl Summary): Likewise.
1891 (Bison Options): Likewise.
1892 (Option Cross Key): Likewise.
1893 * src/getargs.c (no_parser_flag): Remove global variable.
1894 (usage): Don't print description of -n and --no-parser.
1895 (long_options): Remove --no-parser entry here.
1896 (getargs): Remove -n case in the switch here.
1897 * src/getargs.h (no_parser_flag): Remove extern.
1898 * tests/regression.at (Web2c Actions): Remove comment that mentions
1899 --no-parser.
1900
1901 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1902
1903 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1904 name user variables starting with `yy'. Just pass NULL instead of a
1905 dummy local &yylval to yypush_parse.
1906 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1907 starting with `yy'.
1908
1909 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1910
1911 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1912 true since it's then always used regardless of whether yyoverflow is
1913 defined. Reported by Christian Burger at
1914 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1915 * THANKS: Add Christian Burger.
1916
1917 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1918 node names: say "Decl Summary" not "Bison Declaration Summary".
1919
1920 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1921
1922 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1923 determine whether this function has already complained about an invalid
1924 value for a %define boolean variable, don't check whether Bison has
1925 ever examined the value. As written, the check was a tautology.
1926 Instead, record and check for this complaint using a separate muscle.
1927
1928 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1929
1930 Fix push parsing memory leak reported by Brandon Lucia at
1931 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1932 * THANKS: Add Brandon Lucia.
1933 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1934 but the parse never completed and thus freed it.
1935 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1936 * tests/testsuite.at: Include push.at.
1937 * test/push.at: New.
1938 (Push Parsing: Memory Leak for Early Deletion): New test case.
1939
1940 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1941
1942 Improve handling of multiple S/R conflicts in the same state and of S/R
1943 conflicts involving multiple reductions.
1944 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1945 set for a state here or Bison will abort if it is reassigned on a
1946 later conflicted reduction in the same state.
1947 Similarly, don't finalize and assign the solved conflicts report here
1948 or it will be lost if it is reassigned on a later conflicted reduction
1949 in the same state.
1950 (set_conflicts): Instead, assign them both here after all S/R conflicts
1951 in the state have been fully examined.
1952 * src/print.c (shift_set): Rename to...
1953 (no_reduce_set): ... this.
1954 (print_reductions): Update for rename, and add %nonassoc error action
1955 tokens to no_reduce_set so that, when printing the first remaining
1956 reduction on an error action token, the reduction is enclosed in
1957 brackets.
1958 (print_results): Update for rename.
1959 * tests/conflicts.at (Solved conflicts report for multiple reductions
1960 in a state): New test case.
1961 (%nonassoc error actions for multiple reductions in a state): New test
1962 case.
1963
1964 * src/main.c (main): Don't depend on C99 features.
1965
1966 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1967
1968 * build-aux/.cvsignore: Add compile.
1969 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1970 uniwidth.
1971
1972 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1973
1974 * bootstrap (slurp): Create target directories that don't exist.
1975 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1976
1977 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1978
1979 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1980 than item number.
1981 * closure.c (closure): Likewise.
1982 * state.h (reductions): Comment sorting of rules.
1983 (state): Comment sorting of items.
1984
1985 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1986
1987 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1988 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1989 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1990 definition in order to avoid Gnulib headers since we don't use config.h
1991 here.
1992 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1993 rather than AT_DATA so that config.h is included.
1994
1995 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1996
1997 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1998 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1999 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
2000 and so that YYFPRINTF is guaranteed to be defined here.
2001
2002 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2003
2004 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
2005 with...
2006 (muscle_percent_define_check_values): ... this more helpful function.
2007 Again, it's not used yet, but it will be.
2008 * src/muscle_tab.h: Likewise.
2009
2010 Improve some comments in parser table construction.
2011 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
2012 (generate_states): Don't mention ruleset, which is internal to closure.
2013 * src/closure.c (closure): Explain sorting of core and itemset, which
2014 is required for this function to behave correctly.
2015 * src/closure.h (closure): Mention sorting.
2016
2017 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
2018
2019 * src/lalr.c (state_lookahead_tokens_count): For code readability,
2020 move the check for disabled transitions to an aver since conflict
2021 resolution hasn't happened yet.
2022
2023 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
2024 labels a state as inconsistent just because it has error transitions.
2025 The original form of this check appeared in revision 1.1 of lalr.c,
2026 which was committed on 1991-12-21. Now (at least), changing the
2027 consistency label on such a state appears to have no useful effect in
2028 any of the places it is examined, which I enumerate below. The key
2029 point to understanding each item in this enumeration is that a state
2030 with an error transition is labelled consistent in the first place only
2031 if it has no rules, so the check cannot matter for states that have
2032 rules. (1) Labelling a state as inconsistent will cause set_conflicts
2033 to try to identify its conflicts, and a state must have *rules* to have
2034 conflicts. (2) Labelling a state as inconsistent will affect how
2035 action_row sets the default *rule* for the state. (3) Labelling a
2036 state as inconsistent will cause build_relations to add lookback edges
2037 to *rules* in that state.
2038 * src/state.h (struct state): Word the comment for member consistent
2039 more carefully.
2040
2041 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 Don't depend on C99 features.
2044 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
2045 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
2046 * src/reader.c (check_and_convert_grammar): Fix for-loop.
2047 * src/state.c (state_mark_reachable_states): Fix for-loop.
2048 (state_remove_unreachable_states): Fix for-loop.
2049
2050 Don't widen struct state with member reachable just to temporarily
2051 record reachability. Instead, use a local bitset.
2052 * src/state.h (struct state): Remove member.
2053 * src/state.c (state_new): Don't initialize it.
2054 (state_mark_reachable_states): Rename to...
2055 (state_record_reachable_states): ... this, and use bitset.
2056 (state_remove_unreachable_states): Use bitset.
2057
2058 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 * src/Makefile.am (yacc): Quote target action commands properly so
2061 that the yacc script isn't corrupt. Reported by Hans Aberg at
2062 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
2063
2064 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
2065 the case of pure parsers. Reported by Frans Englich at
2066 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
2067 * THANKS: Add Frans Englich.
2068
2069 * NEWS (2.3a+): In the %code entry, reference section `Bison
2070 Declaration Summary' from the manual now since the %code summary has
2071 moved there.
2072 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
2073 in the rules section must be terminated by semicolons.
2074
2075 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2076
2077 Extend the front-end API for %define variables to more completely
2078 mirror the back-end. This will be useful in the future.
2079 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
2080 Update comments to mention the new front-end counterparts of these
2081 macros.
2082 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
2083 for muscle_string_decode and muscle_location_decode.
2084 (muscle_string_decode): New static function.
2085 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
2086 (muscle_percent_define_get, muscle_percent_define_ifdef): New
2087 functions.
2088 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
2089 muscle_percent_define_get to mimic the b4_percent_define_flag_if
2090 implementation more closely.
2091 (muscle_percent_define_invalid_value): New function.
2092 * src/muscle_tab.h (muscle_percent_define_get,
2093 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
2094 Prototype.
2095
2096 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2097
2098 * NEWS (2.3a+): Mention yesterday's state-removal change.
2099 (2.3a): Remove the %language entry, which was added after 2.3a.
2100 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
2101 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
2102 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
2103 tests/existing.at: Update copyright date.
2104
2105 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2106
2107 If conflict resolution makes states unreachable, remove those states,
2108 report rules that are then unused, and don't report conflicts in those
2109 states.
2110 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
2111 New global function.
2112 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
2113 function.
2114 * src/main.c (main): After conflict resolution, remove the unreachable
2115 states and update all data structures that reference states by number.
2116 * src/state.c (state_new): Initialize each state's reachable member to
2117 false.
2118 (state_mark_reachable_states): New static function.
2119 (state_remove_unreachable_states): New global function.
2120 * src/state.h (struct state): Add member bool reachable.
2121 (state_remove_unreachable_states): Prototype.
2122 * tests/conflicts.at (Unreachable States After Conflict Resolution):
2123 New test case.
2124 * tests/existing.at (GNU pic Grammar): Update test case output now that
2125 an unused rule is discovered.
2126
2127 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2128
2129 Minor code cleanup in parser table construction.
2130 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
2131 (new_itemsets, save_reductions): Update for rename to nitemset.
2132 * src/closure.c (nritemset): Rename to...
2133 (nitemset): ... this since the "r" appears to meaningless and isn't
2134 used in the comments.
2135 (closure): Update for rename.
2136 * src/closure.h (nritemset): Update extern to...
2137 (nitemset): ... this.
2138 * src/lalr.c (LA): Fix a typo in comments.
2139 * src/print.c (print_core): Update for rename to nitemset.
2140 * src/print_graph.c (print_graph): Likewise.
2141 * src/state.h: Fix some typos in header comments.
2142
2143 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
2144
2145 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
2146 still sticks to ASCII. Sorry!
2147
2148 * README-hacking: New file, taken mostly from coreutils, with changes
2149 for Bison. Contains much of the contents of:
2150 * README-cvs: Remove.
2151 * bootstrap: Sync from gnulib.
2152 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
2153 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
2154
2155 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
2156
2157 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
2158 Setzer.
2159 (Java Differences): Fix some typos.
2160 * THANKS: Add Sebastian Setzer.
2161
2162 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
2163
2164 * data/java.m4 (b4_single_class_if): Remove.
2165 (b4_abstract_if): Look at "%define abstract".
2166 (b4_lexer_if): New.
2167 (b4_union_name): Rename...
2168 (b4_yystype): ... to this. Map to "%define stype".
2169 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
2170 b4_maybe_throws): Fix quoting.
2171 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
2172 * data/lalr1.java (Lexer interface): Always define.
2173 (Lexer interface within parser class): Remove.
2174 (YYLexer class): New, used when "%code lexer" is present.
2175 (constructor): When "%code lexer" is used, pass %lex-param
2176 to the lexer constructor.
2177 (yylex, yyparse): Remove %lex-param from method invocations
2178 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
2179
2180 * doc/bison.texinfo (Java Bison Interface): Mention "%define
2181 abstract". Rename "%define union_name" to "%define stype".
2182 Rename method names according to previous patch.
2183 (Java Scanner Interface): Describe "%code lexer" instead of
2184 "%pure-parser" and "%define single_class".
2185 (Java Differences): Mention "%code lexer".
2186
2187 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
2188 Include scanner here, using macros from tests/local.at.
2189 (AT_DATA_CALC_Y): Remove final argument.
2190 (_AT_CHECK_JAVA_CALC): Likewise.
2191 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
2192 of %locations and %error-verbose.
2193 (main): Test with and without %lex-param.
2194 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
2195 (AT_BISON_OPTION_POPDEFS): Pop it.
2196
2197 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2198
2199 DJGPP spefic issue. Inhibit the use of disallowed characters for
2200 file name genertion on Win98, WinXP, etc. These are |<>":?*\
2201 and concern testsuite case 46.
2202 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
2203 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
2204 * djgpp/config.bat: Inhibit the use of disallowed characters.
2205
2206 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2207
2208 Miscellaneous %define and %code cleanup.
2209 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
2210 values are interpreted.
2211 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
2212 documentation a little more.
2213 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
2214 muscle_percent_define_insert, muscle_percent_code_grow): New
2215 functions/macros.
2216 * src/muscle_tab.h (muscle_percent_define_insert,
2217 muscle_percent_code_grow): Prototype.
2218 * src/parse-gram.y (prologue_declaration): Use
2219 muscle_percent_define_insert and muscle_percent_code_grow when parsing
2220 %define and %code directives.
2221
2222 Make it easy to share %define boolean variables between the front-end
2223 and back-end. Though not used yet, this will be useful in the future.
2224 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
2225 Bison uses of names rather than just skeleton uses of names.
2226 (b4_percent_define_get, b4_percent_define_ifdef): Rename
2227 b4_percent_define_skeleton_variables(VARIABLE) to
2228 b4_percent_define_bison_variables(VARIABLE).
2229 (b4_percent_code_get, b4_percent_code_ifdef): Rename
2230 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
2231 b4_percent_code_bison_qualifiers(QUALIFIER).
2232 (b4_check_user_names_wrap): Update for renames.
2233 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
2234 muscle_percent_define_default): New functions mimicking
2235 b4_percent_define_flag_if and b4_percent_define_default.
2236
2237 For %define variables, report locations for invalid values and
2238 redefinitions.
2239 * data/bison.m4 (b4_percent_define_flag_if): Read
2240 b4_percent_define_loc(VARIABLE) to report the location of an invalid
2241 value for VARIABLE.
2242 (b4_percent_define_default): Save a special location in
2243 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
2244 must later be reported as invalid.
2245 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
2246 functions.
2247 (muscle_percent_define_insert): Record the location of VARIABLE in
2248 muscle percent_define_loc(VARIABLE), and use it to report the previous
2249 location for a redefinition.
2250 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
2251 (muscle_percent_define_default): Update like b4_percent_define_default.
2252 (muscle_grow_user_name_list): Rename to...
2253 (muscle_user_name_list_grow): ... this for consistency and use
2254 muscle_location_grow.
2255 * src/muscle_tab.h (muscle_location_grow): Prototype.
2256 * tests/input.at (%define errors): Update expected output.
2257 * tests/skeletons.at (%define boolean variables: invalid skeleton
2258 defaults): New test case.
2259
2260 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 * src/print.c (lookahead_set, state_default_rule): Remove.
2263 (print_reductions): Replace state_default_rule invocation with
2264 equivalent use of yydefact, which was computed in token_actions in
2265 tables.c.
2266 (print_results): Don't allocate lookahead_set.
2267
2268 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
2269
2270 * data/lalr1.java: Prefix all private members with yy.
2271
2272 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2273
2274 Use YYFPRINTF instead of fprintf where appropriate. Reported by
2275 Sebastien Fricker at
2276 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
2277 * THANKS: Add Sebastien Fricker.
2278 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
2279 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
2280 accept a variable number of arguments.
2281
2282 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2283
2284 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
2285
2286 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2287
2288 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
2289 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
2290 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
2291
2292 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
2293
2294 Undo my 2007-02-07 change, switching back to the c-strcase module
2295 introduced in the 2007-02-03 change. Bruno Haible reported that
2296 the 2007-02-07 change would be dangerous in Turkish if we add a
2297 language whose name contains "i", since "i" is not lowercase "I"
2298 in Turkish.
2299 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
2300 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
2301 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
2302 * m4/.cvsignore: Remove strcase.m4.
2303 * src/getargs.c: Revert 2007-02-07 change, as follows.
2304 Include c-strcase.h.
2305 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
2306
2307 2007-02-11 Bruno Haible <bruno@clisp.org>
2308
2309 Enable the Java related testsuite tests when the only Java compiler
2310 found is a gcj < 4.3. Discussed at
2311 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
2312 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
2313
2314 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
2315
2316 * data/Makefile.am: Update copyright date.
2317 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
2318 yypstate_new returns NULL.
2319 (yypstate_new): Return NULL if malloc does.
2320 * src/reader.c (packgram): Move translation of rule actions from the
2321 beginning of packgram to...
2322 (check_and_convert_grammar): ... here right before packgram is invoked
2323 so it's easier to write more complete comments, and remove redundant
2324 code.
2325
2326 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
2327
2328 As in semantic actions, make @$ in %initial-action, %destructor, and
2329 %printer imply %locations.
2330 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
2331 scanning @$.
2332 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
2333 (@$ in %initial-action implies %locations,
2334 @$ in %destructor implies %locations,
2335 @$ in %printer implies %locations): ... these new test cases.
2336
2337 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
2338
2339 Undo most of the 2007-02-03 change, switching to the strcase module
2340 now that gnulib strcase has been fixed.
2341 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
2342 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
2343 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
2344 * m4/.cvsignore: Add strcase.m4.
2345 * src/getargs.c: Revert 2007-02-03 change, as follows.
2346 Don't include c-strcase.h.
2347 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
2348 strcasecmp has "unspecified behavior" outside the POSIX locale,
2349 but it works fine in practice if at least one argument is ASCII,
2350 as is the case in Bison.
2351
2352 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
2353
2354 * tests/java.at: Skip tests if only one of javac/java is present.
2355 Reported by Joel E. Denny.
2356 * tests/atlocal.in: Adjust copyright years.
2357
2358 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2359
2360 * data/lalr1.java (Stack): Work around old verifiers that disallow
2361 access to the private fields of an inner class, from the outer class.
2362 We can make Stack's fields public because user code doesn't have access
2363 to the instance of Stack used by parse(). Reported by Paul Eggert.
2364
2365 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
2366
2367 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
2368 the right spot for these files?
2369 * bootstrap.conf (gnulib_modules): Add c-strcase.
2370 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
2371 c-strncasecmp.c.
2372 * src/getargs.c: Include c-strcase.h.
2373 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
2374 to avoid unspecified behavior.
2375
2376 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 * doc/bison.texinfo (Decl Summary): Correct typo.
2379
2380 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
2381
2382 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
2383 Complain if the value does not match empty, "true" or "false".
2384 * data/c++.m4: Adjust default definitions of %define variables.
2385 * data/java.m4: Adjust default definitions of %define variables.
2386 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
2387 to above behavior.
2388 * tests/input.at (Boolean %define variables): Test new behavior.
2389
2390 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
2391
2392 * NEWS: Mention java.
2393 * TODO: Remove things that are done.
2394 * bootstrap.conf: Add javacomp-script and javaexec-script.
2395 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
2396
2397 * data/Makefile.am: Add new files.
2398 * data/java-skel.m4: New.
2399 * data/java.m4: New.
2400 * data/lalr1.java: New.
2401
2402 * doc/bison.texinfo: Put "A Complete C++ Example" under
2403 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
2404 under Other Languages.
2405
2406 * src/getargs.c (valid_languages): Add Java.
2407 * src/getargs.h (struct bison_language): Update size of string fields.
2408
2409 * tests/Makefile.am: Add java.at.
2410 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
2411 * tests/java.at: New.
2412 * tests/testsuite.at: Include it.
2413
2414 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
2415
2416 Clean up.
2417 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
2418 at_directive_argv arguments so these no longer have to be global
2419 variables. Also, update the implementation for the following changes.
2420 (fail_for_at_directive_too_many_args,
2421 fail_for_at_directive_too_few_args): Add at_directive_name argument.
2422 (at_directive_name): Remove as at_directive_argv[0] will be used for
2423 this now.
2424 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
2425 for the directive name.
2426 (at_directive_argc, at_directive_argv): Make these local within
2427 skel_lex instead of global.
2428 (INITIAL): Update directive start action for above changes.
2429 (SC_AT_DIRECTIVE_ARG): Rename to...
2430 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
2431 (SC_AT_DIRECTIVE_SKIP_WS): Update.
2432 (scan_skel): Move yylex_destroy to...
2433 (skel_scanner_free): ... here.
2434 * tests/skeletons.at (installed skeleton file name): Rename to...
2435 (installed skeleton file names): ... this.
2436
2437 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
2438
2439 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
2440 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
2441 Summary" not "Directives".
2442 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
2443 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
2444 since the former is now the more complete one.
2445 (Prologue Alternatives): Likewise and do the same for %defines.
2446 (Table of Symbols): Add summary of %code, add summary of %define, and
2447 move full %code documentation to...
2448 (Decl Summary): ... here for consistency with other entries in these
2449 sections.
2450 Move %define entry in order to keep this list alphabetized.
2451 Reword %define entry a little to put less emphasis on the skeleton
2452 concept, which most users shouldn't have to think about.
2453
2454 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
2455
2456 Adjust to recent gnulib changes.
2457 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
2458 Add string.h, string_.h, unistd_.h, wchar_.h.
2459 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
2460 * src/system.h: Don't include <stpcpy.h>; this is now done by
2461 <string.h>.
2462
2463 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
2464
2465 Simplify implementation of unqualified %code, implement macros for
2466 uniform treatment of boolean %define flags. Document %define.
2467 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
2468 b4_percent_code_ifdef): New.
2469 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
2470 * data/c++.m4: Define default value for global_tokens_and_yystype.
2471 * data/glr.cc: Likewise.
2472 * data/location.cc: Use b4_percent_define_flag_if.
2473
2474 * doc/bison.texinfo (Decl Summary): Document %define.
2475
2476 * src/parse-gram.y (Unqualified %code): Change muscle name to
2477 b4_percent_code().
2478 (content.opt): Default to empty.
2479
2480 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2481
2482 Implement support for relative and absolute skeleton file names.
2483 Discussed starting at
2484 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
2485 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
2486 (Bison Options): Document in --skeleton entry.
2487 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
2488 full_skeleton can't necessarily hold all of pkgdatadir.
2489 If the specified skeleton file name contains a `/', don't prepend
2490 pkgdatadir.
2491 * src/parse-gram.y (prologue_declaration): If the specified skeleton
2492 file name contains a `/', prepend the grammar file directory.
2493 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
2494 * skeletons.at: New file.
2495 (relative skeleton file names): New test case.
2496 (installed skeleton file names): New test case.
2497 * tests/testsuite.at: Include skeletons.at.
2498
2499 * bootstrap: Update copyright to 2007.
2500
2501 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
2502
2503 * bootstrap: Remove occurrences of .#bootmp from the files.
2504
2505 2007-01-17 Akim Demaille <akim@epita.fr>
2506
2507 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
2508 nonterminals.
2509 Use per-type %printer.
2510
2511 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
2512
2513 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
2514 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2515 djgpp/config.site, src/files.c, src/files.h, src/main.c,
2516 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
2517 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
2518 tests/glr-regression.at, tests/input.at, tests/local.at,
2519 tests/output.at, tests/torture.at: Update copyright to 2007.
2520
2521 2007-01-16 Akim Demaille <akim@epita.fr>
2522
2523 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
2524 error code.
2525 (Calc++ Scanner): Exit with failure if we can't open the input
2526 file.
2527 Accept "-" standing for stdin.
2528 (Calc++ Top Level): Print the result only if the parsing was
2529 successful.
2530
2531 2007-01-16 Akim Demaille <akim@epita.fr>
2532
2533 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
2534
2535 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
2536 and Joel E. Denny <jdenny@ces.clemson.edu>
2537
2538 Clean up %define and %code implementation in M4 some. Most
2539 importantly, rename all related macros to be in the b4_percent_define
2540 and b4_percent_code namespaces. Also, complete support for `.' in
2541 %define variable names and %code qualifiers.
2542 * data/bison.m4 (b4_check_user_names): Check for special
2543 "SKELETON-NAMESPACE(name)" macros instead of using two nested
2544 m4_foreach loops.
2545 (b4_get_percent_define, b4_get_percent_code): Rename to...
2546 (b4_percent_define_get, b4_percent_code_get): ... these.
2547 Extend documentation with examples.
2548 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
2549 b4_percent_define_skeleton_variables and
2550 b4_percent_code_skeleton_qualifiers.
2551 Expect any value for the %define variable `foo' to be stored in the
2552 macro named `b4_percent_define(foo)'; expect any %code blocks for the
2553 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
2554 expect any unqualified %code blocks to be stored in a macro named
2555 `b4_percent_code_unqualified'.
2556 Use m4_indir so that %define variable names and %code qualifiers can
2557 contain `.', which is allowed by the grammar parser.
2558 (b4_percent_define_default): New macro to set a default value for a
2559 %define variable.
2560 (m4_wrap): Update wrapped code, and fix some underquoting.
2561 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
2562 Expect grammar uses of %define variables and %code qualifiers to be
2563 defined in b4_percent_define_user_variables and
2564 b4_percent_code_user_qualifiers.
2565 * data/c++.m4: Use b4_percent_define_default rather than
2566 m4_define_default. Fix some underquoting. Skeleton usage of %define
2567 variable define_location_comparison now implies skeleton usage of
2568 %define variable filename_type.
2569 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2570 data/push.c, data/yacc.c: Update macro names.
2571 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
2572 muscle names.
2573
2574 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2575
2576 DJGPP specific issues.
2577
2578 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
2579 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
2580
2581 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2582
2583 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
2584 run parsers in all tests so that Valgrind is invoked during
2585 maintainer-check-valgrind.
2586 (Duplicate representation of merged trees): Free all semantic values.
2587 (Duplicated user destructor for lookahead): Likewise.
2588
2589 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2590
2591 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
2592 command-line prefix.
2593 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
2594 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
2595 miss Valgrind messages.
2596 (Exploding the Stack Size with Malloc): Likewise.
2597
2598 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
2599
2600 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
2601 locals. Reported by Juan Manuel Guerrero at
2602 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
2603 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
2604 Fix some indentation also.
2605 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
2606 explaining this issue.
2607
2608 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
2609 and Joel E. Denny <jdenny@ces.clemson.edu>
2610
2611 Simplify union and prologue handling, and escape union and lex/parse
2612 params with digraphs.
2613 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
2614 values to the empty string since these are no longer guaranteed
2615 initialized by the front-end.
2616 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
2617 braces around b4_user_stype since this is no longer done by the
2618 front-end.
2619 * src/files.c, src/files.h (pre_prologue_obstack,
2620 post_prologue_obstack): Remove.
2621 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
2622 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
2623 with digraphs. This fixes lex params and parse params.
2624 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
2625 * src/output.c (prepare): Remove muscle insertion of the prologues.
2626 (output): Remove freeing of pre_prologue_obstack and
2627 post_prologue_obstack.
2628 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
2629 than prologue_augment for prologue parsing so you don't need prologue
2630 obstacks.
2631 (grammar_declaration): For %union RHS, use `braceless' instead of
2632 "{...}" so that braces are already stripped and code is escaped with
2633 digraphs.
2634 * src/reader.c (prologue_augment): Remove.
2635 (reader): Remove initialization of pre_prologue_obstack and
2636 post_prologue_obstack.
2637 * src/reader.h (prologue_augment): Remove.
2638
2639 * data/c.m4: Remove stray parenthesis.
2640
2641 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2642
2643 Remove quotes from variables names in %define directives and from
2644 qualifiers in %code directives, and restrict the characters that are
2645 allowed in them to M4-friendly ones. For %define, continue to support
2646 the quoted form as a deprecated feature. Discussed starting at
2647 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
2648 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
2649 %code.
2650 * doc/bison.texinfo (Prologue Alternatives): Update.
2651 (Decl Summary): In %defines entry, update mention of `%code requires'
2652 and `%code provides'.
2653 (C++ Location Values): Update %define uses.
2654 (Calc++ Parser Interface): Likewise.
2655 (Calc++ Parser): Likewise, and update `%code requires' uses.
2656 (Table of Symbols): Update %code documentation.
2657 * src/parse-gram.y (prologue_declaration): For %define variables, use
2658 `variable' instead of `STRING'.
2659 (grammar_declaration): For %code qualifiers, use `ID' instead of
2660 `STRING'.
2661 (variable): New nonterminal that takes an `ID' or a `STRING'.
2662 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
2663 and %define uses.
2664 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
2665 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
2666 (%define errors): Update %define uses.
2667
2668 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2669
2670 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
2671 instead of muscle_insert for %define values so that M4-special
2672 characters are replaced with digraphs.
2673 * tests/input.at (%define errors): Extend to check weird values.
2674
2675 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2676
2677 Instead of having skeletons declare all valid %define variables and
2678 %code qualifiers, provide macros that retrieve the associated values
2679 and build these lists automatically. Thus Bison will now warn when a
2680 variable or qualifier is not used by the skeleton in the current
2681 invocation regardless of whether it might sometimes be used by that
2682 skeleton in other invocations. Also, move all %define value macros to
2683 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
2684 form, which is replaced by %code.
2685 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
2686 (b4_check_user_names): ... this, and change the series of valid name
2687 arguments to a single list argument for names used in the skeleton
2688 similar to the existing list argument for names used in the grammar.
2689 Warn instead of complaining.
2690 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
2691 values and %code code, to format %code code properly, and to build
2692 lists of all %define variables and %code qualifiers used in the
2693 skeleton: b4_skeleton_percent_define_variables and
2694 b4_skeleton_percent_code_qualifiers.
2695 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
2696 Remove, and...
2697 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
2698 the skeleton names lists can finish building first. In place of
2699 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
2700 expect the lists b4_user_percent_define_variables and
2701 b4_user_percent_code_qualifiers.
2702 * data/c++.m4: Where setting default values for b4_parser_class_name,
2703 b4_location_type, b4_filename_type, b4_namespace, and
2704 b4_define_location_comparison, update their names to the
2705 b4_percent_define_ namespace.
2706 * data/glr.c: Don't use b4_check_percent_define_variables and
2707 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2708 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
2709 (b4_parser_class_name, b4_namespace): Define these using
2710 b4_get_percent_define for parser_class_name and namespace.
2711 * data/location.cc: Use b4_get_percent_define.
2712 * data/push.c: Don't use b4_check_percent_define_variables and
2713 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
2714 * data/yacc.c: Likewise, and don't call m4_exit in
2715 b4_use_push_for_pull_if or m4_wrap code will never execute.
2716 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
2717 Rename to...
2718 (muscle_grow_user_name_list): ... this for consistency with the
2719 terminology used in bison.m4.
2720 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
2721 %define variable names, and rename muscle used_percent_define_variables
2722 to user_percent_define_variables.
2723 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
2724 user_percent_code_qualifiers.
2725 (content): Remove.
2726 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
2727 {CODE} form is no longer accepted.
2728 * tests/input.at (Reject bad %code qualifiers): Rename to...
2729 (Reject unused %code qualifiers): ... this, and update test output.
2730 (%define error): Update test output.
2731
2732 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
2733
2734 Check for unrecognized %define variables similar to checking for
2735 unrecognized %code qualifiers. Check for redefined %define variables.
2736 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
2737 generalizes...
2738 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
2739 (b4_check_percent_define_variables): New, also wraps it.
2740 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
2741 variables using b4_check_percent_define_variables.
2742 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
2743 all those exercised in the test suite and all those listed in the
2744 `Default values' section of c++.m4. Are there others?
2745 * data/push.c, data/yacc.c: Declare no valid %define variables.
2746 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
2747 similar to muscle_find, but it works even when the muscle stores a
2748 const value.
2749 (muscle_grow_used_name_list): New function for constructing the used
2750 name list muscles that b4_check_for_unrecognized_names requires.
2751 * src/parse-gram.y (prologue_declaration): Warn if a variable is
2752 %define'd more than once. Define the b4_used_percent_define_variables
2753 muscle with muscle_grow_used_name_list.
2754 (grammar_declaration): Abbreviate %code code with
2755 muscle_grow_used_name_list.
2756 * tests/input.at (%define errors): New.
2757
2758 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2759
2760 Provide warn_at, complain_at, and fatal_at function callbacks to the
2761 skeletons, and use this for %code qualifier complaints.
2762 * data/bison.m4 (b4_error_at): New, invoked by...
2763 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
2764 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
2765 @fatal_at(...@) directives.
2766 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
2767 qualifiers in b4_used_percent_code_qualifiers and to use
2768 b4_complain_at.
2769 * src/location.c, src/location.h (boundary_set_from_string): New global
2770 function.
2771 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
2772 function.
2773 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
2774 to b4_used_percent_code_qualifiers.
2775 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
2776 function.
2777 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
2778 (lineno): Rename to...
2779 (out_lineno): ... this so I don't misunderstand it again.
2780 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2781 here; these newlines are in the input but not the output file.
2782 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2783 (at_directive_perform): ... this new static function, and add handling
2784 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2785 directives.
2786 * tests/input.at (Reject bad %code qualifiers): Update test output with
2787 locations and extend.
2788
2789 * tests/output.at (Output file name: [, Output file name: ]): Remove
2790 bogus comment about these tests failing.
2791
2792 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2793
2794 Clean up b4_check_percent_code_qualifiers a little.
2795 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2796 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2797 documentation and add examples.
2798 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2799 qualifiers here.
2800
2801 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2804 unreliable -- especially when they're hidden inside another macro.
2805 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2806 data/c.m4: Remove m4_divert(-1).
2807 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2808 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2809 m4_divert_push(0) and m4_divert_pop(0).
2810 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2811 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2812 pushed and popped by m4sugar, should be first on the stack.
2813
2814 Provide warn, complain, and fatal function callbacks to the skeletons.
2815 This provides more flexibility than m4_fatal, improves the error
2816 message format, and captures messages for translation. Discussed
2817 starting at
2818 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2819 * data/bison.m4 (b4_error): New, invoked by...
2820 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2821 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2822 directives. Because these M4 macros might be called when the current
2823 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2824 the previous removal of uses of m4_divert, which caused trouble.
2825 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2826 m4_fatal to report unrecognized %code qualifiers.
2827 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2828 push parser requests.
2829 * data/glr.c: Use b4_complain instead of m4_fatal to report
2830 non-deterministic push parser requests.
2831 Update @output usage to @output(...@) form.
2832 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2833 report missing %defines. Update @output usage to @output(...@) form.
2834 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2835 @output(...@) form.
2836 * src/main.c (main): Invoke skel_scanner_free.
2837 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2838 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2839 obstack_for_string from flex-scanner.h.
2840 (YY_DECL): Use to declare skel_lex static.
2841 (decode_at_digraphs): Remove; now handled in the new
2842 SC_AT_DIRECTIVE_ARG start condition.
2843 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2844 functions.
2845 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2846 at_directive_argv): New static globals.
2847 (INITIAL): Use fail_for_invalid_at.
2848 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2849 recognize the start of a generalized `@directive(...@)' form and
2850 start...
2851 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2852 directive args (using the new obstack_for_string), to decode the
2853 contained @ diagraphs, and to perform the directive. It recognizes
2854 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2855 @output(...@).
2856 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2857 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2858 `@,'.
2859 (scan_skel): Initialize obstack_for_string on the first call.
2860 (skel_scanner_free): New function to free obstack_for_string.
2861 * tests/input.at (Reject bad %code qualifiers): Update test output.
2862
2863 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2864
2865 Consolidate the 4 prologue alternative directives (%code, %requires,
2866 %provides, and %code-top) into a single %code directive with an
2867 optional qualifier field. Discussed at
2868 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2869 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2870 alternatives.
2871 * doc/bison.texinfo (Prologue Alternatives): Update.
2872 (Decl Summary): Update to %code "requires" and %code "provides".
2873 (Calc++ Parser): Update to %code "requires".
2874 (Table of Symbols): Remove entries for %requires, %provides, and
2875 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2876 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2877 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2878 which are skeleton-specific.
2879 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2880 declare what %code qualifiers it supports and to complain if any other
2881 qualifiers were used in the grammar.
2882 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2883 and b4_user_code([b4_percent_code_provides]) in place of
2884 b4_user_requires and b4_user_provides.
2885 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2886 Add b4_user_code([b4_percent_code_top]) and
2887 b4_user_code([b4_percent_code]).
2888 Invoke b4_check_percent_code_qualifiers.
2889 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2890 PERCENT_REQUIRES): Remove.
2891 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2892 %requires. Rewrite the %code RHS as the unqualified form defining the
2893 muscle b4_percent_code. Add another RHS for the qualified %code form,
2894 which defines muscles of the form b4_percent_code_QUALIFIER and the
2895 b4_used_percent_code_qualifiers muscle.
2896 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2897 PERCENT_REQUIRES): Remove.
2898 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2899 %code "requires" and %code "provides".
2900 * tests/input.at (Reject bad %code qualifiers): New.
2901
2902 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2903
2904 Use the new code_props interface for destructors and printers.
2905 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2906 printer_location members, and change the type of the destructor and
2907 printer members to code_props.
2908 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2909 symbol_printer_get, semantic_type_destructor_set,
2910 semantic_type_printer_set, default_tagged_destructor_set,
2911 default_tagless_destructor_set, default_tagged_printer_set,
2912 default_tagless_printer_set): Use code_props in arguments and return
2913 types in place of char const * and location.
2914 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2915 since the locations are now contained in the return of
2916 symbol_destructor_get and symbol_printer_get.
2917 * src/output.c (symbol_destructors_output, symbol_printers_output):
2918 Replace with...
2919 (symbol_code_props_output): ... this to eliminate duplicate code.
2920 (output_skeleton): Update to use symbol_code_props_output.
2921 * src/reader.c (symbol_should_be_used): Update use of
2922 symbol_destructor_get.
2923 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2924 Update uses of the various _destructor_set and _printer_set functions.
2925 * src/symtab.c: (default_tagged_destructor_location,
2926 default_tagless_destructor_location, default_tagged_printer_location,
2927 default_tagless_printer_location): Remove since we...
2928 (default_tagged_destructor, default_tagless_destructor,
2929 default_tagged_printer, default_tagless_printer): ... change the type
2930 of these to code_props.
2931 (symbol_new, semantic_type_new, symbol_destructor_set,
2932 semantic_type_destructor_set, symbol_destructor_get,
2933 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2934 symbol_check_alias_consistency, default_tagged_destructor_set,
2935 default_tagless_destructor_set, default_tagged_printer_set,
2936 default_tagless_printer_set): Update.
2937 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2938 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2939 code_props members.
2940 (symbol_print): Use SYMBOL_CODE_PRINT.
2941
2942 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2943
2944 Use the new code_props interface for rule actions.
2945 * src/symlist.h (symbol_list): Replace action, action_location, and
2946 used members with a code_props action_props member.
2947 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2948 grammar_midrule_action, grammar_current_rule_merge_set,
2949 grammar_current_rule_symbol_append, packgram): Update.
2950 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2951 * src/scan-code.l (handle_action_dollar): Update.
2952 (translate_rule_action): Remove, no longer used.
2953 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2954
2955 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2956
2957 Use the new code_props interface in parse-gram.y.
2958 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2959 Update all uses of translate_* functions to use the new code_props
2960 interface and to use gram_scanner_last_string_free and
2961 code_scanner_last_string_free where possible.
2962 (grammar_declaration): symbol_list_destructor_set and
2963 symbol_list_printer_set now perform the translation, so don't do it
2964 here. Use gram_scanner_last_string_free where possible.
2965 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2966 translate_code): Remove, no longer used.
2967 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2968 symbol_list_printer_set): Perform code translation here rather than
2969 depending on the caller to do so.
2970
2971 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2972 * src/scan-gram.h (gram_last_string): Remove declaration.
2973 * src/scan-gram.l (last_string): Declare it static.
2974
2975 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2976
2977 Encapsulate code properties and related functionality for the various
2978 destructors, printers, and actions into a code_props structure and
2979 interface. This patch merely implements code_props in scan-code.h and
2980 scan-code.l. Future patches will rewrite other modules to use it.
2981 Discussed starting at
2982 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2983 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2984 consistently initialize const structs that have an empty location
2985 field.
2986 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2987 to ensure consistency.
2988 * src/scan-code.h (code_props): New structure.
2989 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2990 function, macro, and const global variable for initializing a
2991 code_props with no code.
2992 (code_props_plain_init, code_props_symbol_action_init,
2993 code_props_rule_action_init, code_props_translate_code): The rest of
2994 the new code_props functional interface. Among other things, the init
2995 functions set the code_props kind field so that
2996 code_props_translate_code will know whether to behave like
2997 translate_symbol_action, translate_rule_action, or translate_code.
2998 These old translate functions must remain until all other modules are
2999 updated to use the new code_props interface.
3000 (code_scanner_last_string_free): New function similar to
3001 gram_scanner_last_string_free.
3002 (code_scanner_free): Add documentation.
3003 * src/scan-code.l: Implement the new interface.
3004 (code_lex): Make it static, add a code_props* argument, and remove the
3005 rule argument.
3006 (last_string): New static global similar to the one in scan-gram.l.
3007 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
3008 instead of rule.
3009 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
3010 code_props since Bison may one day use this information for destructors
3011 and printers.
3012 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
3013 (handle_action_dollar): Use symbol_list_n_get and set used flag
3014 directly since symbol_list_n_used_set is removed.
3015 (translate_action): Add a code_props* argument and remove the rule,
3016 action, and location arguments. Pass the code_props* on to code_lex.
3017 (translate_rule_action, translate_symbol_action, translate_code):
3018 Rewrite as wrappers around the new code_props interface.
3019 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
3020 it would eventually need to break the encapsulation of code_props.
3021
3022 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3023
3024 * etc/.cvsignore: New.
3025
3026 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
3027
3028 Add maintainer-push-check to run maintainer-check using push parsing in
3029 place of pull parsing where available.
3030 * Makefile.am (maintainer-push-check): New.
3031 * data/bison.m4 (b4_use_push_for_pull_if): New.
3032 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
3033 appropriately based on their existing values.
3034 (yypush_parse): Don't print push-parser-specific diagnostics if push
3035 parsing is being used in place of pull parsing.
3036 * data/yacc.c: If push parsing should replace pull parsing, redirect to
3037 push.c.
3038 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
3039 variable, and insert b4_use_push_for_pull_flag into muscles.
3040 * tests/Makefile.am (maintainer-push-check): New.
3041
3042 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3043
3044 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
3045 (whether successful or failed) so that yypush_parse can be invoked
3046 again to start a new parse using the same yypstate.
3047 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
3048 check multiple yypull_parse invocations on the same yypstate. For pull
3049 mode, extend to check multiple yyparse invocations.
3050 (Exploding the Stack Size with Alloca): Extend to try with
3051 %push-pull-parser.
3052 (Exploding the Stack Size with Malloc): Likewise.
3053
3054 * tests/calc.at (Simple LALR Calculator): Don't specify
3055 %skeleton "push.c" since %push-pull-parser implies that now.
3056 * tests/headers.at (export YYLTYPE): Don't check for the push
3057 declarations. Otherwise, this test case can't be used to see if push
3058 mode can truly emulate pull mode.
3059 * tests/input.at (Torturing the Scanner): Likewise.
3060 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
3061 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
3062 AT_YACC_IF, which now includes the case of push mode since %skeleton
3063 need not be used for push mode. This will be more intuitive once
3064 push.c is renamed to yacc.c.
3065
3066 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
3067
3068 For push mode, convert yyparse from a macro to a function, invoke yylex
3069 instead of passing a yylexp argument to yypull_parse, and don't
3070 generate yypull_parse or yyparse unless %push-pull-parser is declared.
3071 Discussed starting at
3072 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
3073 * data/bison.m4 (b4_pull_if): New.
3074 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
3075 * data/push.c: Improve M4 quoting a little.
3076 (b4_generate_macro_args, b4_parenthesize): Remove.
3077 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
3078 any time a pull parser is requested.
3079 Don't #define this as a wrapper around yypull_parse. Instead, when
3080 both push and pull are requested, make it a function that does that
3081 same thing.
3082 (yypull_parse): If there's a b4_prefix, #define this to
3083 b4_prefix[pull_parse] when both push and pull are requested.
3084 Don't define this as a function unless both push and pull are
3085 requested.
3086 Remove the yylexp argument and hard-code yylex invocation instead.
3087 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
3088 %push-parser.
3089 * src/getargs.c (pull_parser): New global initialized to true.
3090 * getargs.h (pull_parser): extern it.
3091 * src/output.c (prepare): Insert pull_flag muscle.
3092 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
3093 (prologue_declaration): Set both push_parser and pull_parser = true for
3094 %push-pull-parser. Set push_parser = true and pull_parser = false for
3095 %push-parser.
3096 * src/scan-gram.l: Don't accept %push_parser as an alternative to
3097 %push-parser since there's no backward-compatibility concern here.
3098 Scan %push-pull-parser.
3099 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
3100 instead of %push-parser.
3101 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
3102 prototype it in the module that calls yyparse.
3103 * tests/input.at (Torturing the Scanner): Likewise.
3104 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
3105
3106 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
3107
3108 Update etc/bench.pl. Optimize push mode a little (the yyn change
3109 deserves most of the credit).
3110 * Makefile.am (SUBDIRS): Add etc subdirectory.
3111 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
3112 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
3113 yytoken, yyval, and yyloc declarations to...
3114 (yyparse or yypush_parse): ... here to improve performance. For
3115 yypush_parse invocations after the first, be sure to assign yyn its old
3116 value again.
3117 (yypstate_new): Don't bother initializing the yyresult field since the
3118 initial value isn't used.
3119 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
3120 remove the #define that, in push mode, set it to yyps->NAME.
3121 * etc/Makefile.am: New.
3122 * etc/bench.pl: Remove and build it instead from...
3123 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
3124 "tests/bison" from the build directory by default rather than just
3125 invoking "bison" from $PATH.
3126 (calc_grammar): Update push parser code: don't declare yylval globally,
3127 don't define yyparse_wrapper, and don't #define yyparse.
3128 (bench_grammar): Update to check all working combinations of yacc.c,
3129 push.c, impure, pure, pull, and push.
3130
3131 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3132
3133 For push mode, add pull wrappers around yypush_parse.
3134 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
3135 (yypull_parse): New function wrapping yypush_parse.
3136 (yyparse): New #define wrapping yypull_parse.
3137 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
3138 is declared.
3139 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
3140 prototype yylex in the module that calls yyparse, and don't prototype
3141 yyparse there. Otherwise, the yyparse expansion won't compile.
3142 * tests/input.at (Torturing the Scanner): Likewise.
3143
3144 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
3145
3146 Enable push parsers to operate in impure mode. Thus, %push-parser no
3147 longer implies %pure-parser. The point of this change is to move
3148 towards being able to test the push parser code by running the entire
3149 test suite as if %push-parser had been declared.
3150 * data/push.c (yypush_parse): For impure mode, remove the
3151 yypushed_char, yypushed_val, and yypushed_loc arguments.
3152 Instead, declare these as local variables initialized to the global
3153 yychar, yylval, and yylloc.
3154 For the first yypush_parse invocation only, restore the initial values
3155 of these global variables when it's time to read a token since they
3156 have been overwritten.
3157 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
3158 %push-parser.
3159 * tests/calc.at (Simple LALR(1) Calculator): Always declare
3160 %pure-parser along with %push-parser since this test case was designed
3161 for pure push parsers.
3162 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
3163 (AT_YACC_OR_PUSH_IF): New.
3164 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
3165 add a note that it's still wrong for some cases (as it has been for a
3166 while).
3167 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
3168 %push-parser no longer implies %pure-parser.
3169
3170 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3171
3172 Remove some unnecessary differences between the pull parser code and
3173 the push parser code. This patch enables yynerrs in push mode.
3174 * data/push.c: Reformat M4 a little.
3175 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
3176 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
3177 because push mode is on. Instead, if pure mode is on, move yynerrs
3178 to...
3179 (b4_declare_parser_state_variables): ... here.
3180 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
3181 to yyps->NAME so it can be used in yypush_parse.
3182 (yypush_parse): Don't omit uses of yynerrs in push mode.
3183
3184 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Fix bug such that the first pushed token's value and location are
3187 sometimes overwritten (sometimes by %initial-action) before being used.
3188 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
3189 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
3190 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
3191 more closely mimic the pull parser logic.
3192 Don't copy the pushed token to yychar, yylval, and yylloc until it's
3193 time to read a token, which is after any initialization of yylval and
3194 yylloc.
3195 (gottoken): Rename label to...
3196 (yyread_pushed_token): ... for clarity and to avoid infringing on the
3197 user namespace.
3198
3199 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
3200
3201 Rearrange initialization of the parser state variables so that the
3202 skeleton doesn't have to have a copy for pull mode and another for push
3203 mode. This patch also fixes at least a bug such that yylloc was not
3204 initialized (with b4_location_initial_line and
3205 b4_location_initial_column) upon calling yypush_parse. However, that
3206 initialization now overwrites the first token's location;
3207 %initial-action assigning @$ already did the same thing, and both bugs
3208 will be fixed in a later patch.
3209 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
3210 (b4_declare_parser_state_variables): Remove initialization of yytoken,
3211 yyss, yyvs, yyls, and yystacksize.
3212 (yypstate_new): Remove initialization of some yypstate fields: yystate,
3213 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
3214 yylsp.
3215 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
3216 yyps->NAME so it can be used in yypush_parse.
3217 (yyparse or yypush_parse): For yypush_parse, don't print the
3218 "Starting parse" diagnostic for invocations after the first.
3219 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
3220 yypush_parse, only do it for the first invocation.
3221 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
3222 initialization to occur in yypush_parse but only on the first
3223 invocation.
3224
3225 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3226
3227 * data/push.c: Add CPP guards around push parser declarations in both
3228 the header and the code file.
3229 In the code file, move the push parser declarations to the same place
3230 they appear in the header file.
3231 Clean up the M4 some, especially the inconsistent underquoting in
3232 some b4_c_function_def and b4_c_function_decl uses.
3233
3234 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3235
3236 Encapsulate the push parser state variables into an M4 macro so the
3237 push skeleton doesn't have to list them again for pull mode's yyparse.
3238 For push mode, remove yypush_parse's local equivalents of these
3239 variables to eliminate unnecessary copying between the two sets at
3240 run-time. This patch also fixes at least a bug related to multiple
3241 %initial-action invocations in push mode.
3242 * data/push.c (b4_declare_parser_variables): Rename to...
3243 (b4_declare_scanner_communication_variables): ... this for clarity and
3244 update both uses.
3245 (b4_declare_yyparse_variables): Remove and move its contents to the one
3246 spot where it was invoked.
3247 (b4_declare_parser_state_variables): New macro containing the parser
3248 state variables required by push mode.
3249 (struct yypstate): Replace all fields but yynew with
3250 b4_declare_parser_state_variables.
3251 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
3252 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
3253 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
3254 (yyparse or yypush_parse): For yyparse in pull mode, replace local
3255 parser state variable declarations with
3256 b4_declare_parser_state_variables.
3257 Don't initialize parser state variables when calling yypush_parse since
3258 yypstate_new already does that.
3259 Invoke the user's initial action only upon the first yypush_parse
3260 invocation.
3261 Remove all code that copies between the local parser state variables
3262 and the yypstate.
3263
3264 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
3265
3266 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
3267 prevent a name collision in a future patch where these names will
3268 sometimes be #define'd.
3269 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
3270 since it no longer has the same name as the existing argument.
3271 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
3272
3273 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
3274 and Joel E. Denny <jdenny@ces.clemson.edu>
3275
3276 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3277 that the argument is case-insensitive, and there's no `=' here.
3278 For the %skeleton entry, mention that %language is better.
3279 (Bison Options): Likewise for --language and --skeleton. Move the
3280 --skeleton entry so that the `Tuning the parser' section is sorted
3281 alphabetically on long options.
3282 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
3283 %language directive in detail here; cross-reference the %language
3284 documentation instead.
3285 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
3286 `%require "2.3b"' so that the example is always up-to-date.
3287 (Table of Symbols): Add entries for %language and %skeleton.
3288 * examples/extexi (normalize): Instead of replacing every %require
3289 argument with the current Bison version, just substitute for
3290 `@value{VERSION}'. This guarantees that we're testing what actually
3291 appears in the documentation.
3292 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
3293 rather than `@VERSION@'.
3294
3295 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3296
3297 * NEWS: Reword the %language news a bit, and put it earlier.
3298
3299 * src/getargs.c (skeleton_arg): Last arg is now location const *.
3300 Rewrite to simplify the logic.
3301 (language_argmatch): Likewise.
3302 (program_name): We now own this var.
3303 * src/getargs.h (struct bison_language): Use char[] rather than
3304 const char *.
3305
3306 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
3307 Java is supported.
3308 * src/complain.c (program_name): Remove decl; no longer needed.
3309 * src/main.c (program_name): Remove; now belongs to getargs.
3310
3311 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
3312
3313 * NEWS: Document %language.
3314
3315 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
3316
3317 * data/c-skel.m4, data/c++-skel.m4: New files.
3318 * data/glr.c: Complain on push parsers.
3319
3320 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
3321 over %skeleton.
3322 (Decl Summary): Document %language and %skeleton.
3323 (Command line): Document -L.
3324
3325 * examples/extexi: Rewrite %require directive.
3326 * examples/calc++/Makefile.am: Pass VERSION to extexi.
3327
3328 * src/files.c (compute_exts_from_gc): Look in language structure
3329 for .y extension.
3330 (compute_file_name_parts): Check whether .tab should be added.
3331 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
3332 (language, skeleton_arg, language_argmatch): New.
3333 (long_options): Add --language.
3334 (getargs): Use skeleton_arg, add -L/--language.
3335 * src/getargs.h: Include location.h.
3336 (struct bison_language, language, skeleton_arg, language_argmatch): New.
3337 * src/output.c (prepare): Pick default skeleton from struct language.
3338 Don't dispatch C skeletons here.
3339 * src/parse-gram.y (PERCENT_LANGUAGE): New.
3340 (prologue_declaration): Add "%language" rule, use skeleton_arg.
3341 * src/scan-gram.l ("%language"): New rule.
3342
3343 * tests/calc.at: Test %skeleton and %language.
3344 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
3345 (AT_GLR_IF): Look for %skeleton "glr.cc".
3346 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
3347 (AT_YACC_IF): Reject %language.
3348
3349 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
3350
3351 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
3352 since it wasn't used; only the typedef name 'semantic_type' is needed.
3353 Also, omit trailing white space.
3354
3355 * bootstrap: Sync from coreutils.
3356 (gnulib_extra_files): Add build-aux/announce.gen.
3357 (slurp): Adjust .gitignore files like .cvsignore files.
3358 * build-aux/announce-gen: Remove from CVS, since bootstrap
3359 now creates this.
3360
3361 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
3362
3363 Make %push-parser imply %pure-parser. This fixes several bugs; see
3364 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
3365 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
3366 pure_parser = true.
3367 * data/push.c: Don't bother testing b4_push_if when deciding whether
3368 to expand b4_declare_parser_variables globally.
3369 (yypush_parse): Likewise in here.
3370
3371 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
3372 (yy_reduce_print): Reformat M4 for readability.
3373
3374 2006-12-15 Bob Rossi <bob@brasko.net>
3375 and Joel Denny <jdenny@ces.clemson.edu>
3376
3377 * data/push.c (yypstate): Add typedef, and update all uses of
3378 struct yypstate to just yypstate.
3379 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
3380
3381 2006-12-14 Bob Rossi <bob@brasko.net>
3382
3383 * data/push.c (yypush_parse): Declare prototype regardless of
3384 %locations option.
3385
3386 2006-12-14 Bob Rossi <bob@brasko.net>
3387
3388 * data/push.c (yyparse): Remove the prototype and the #define when in
3389 push-parser mode.
3390
3391 2006-12-13 Bob Rossi <bob@brasko.net>
3392
3393 * data/push.c (yypstate_init): Rename to...
3394 (yypstate_new): ... this and use b4_c_function_def.
3395 (yypstate_delete): New.
3396 (yypush_parse): Change parameters yynval and yynlloc to be const.
3397 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
3398 yypstate_delete functions.
3399
3400 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
3401
3402 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
3403 strange test case titles. Reported by Bob Rossi.
3404
3405 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
3406
3407 * TODO: Add pointer to Sylvain Schmitz's work on static detection
3408 of potential ambiguities in GLR grammers.
3409
3410 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
3411
3412 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
3413 `bison ', use m4_index instead of m4_substr since chopping up a string
3414 containing M4-special characters causes problems here.
3415
3416 Fix a couple of bugs related to special characters in user-specified
3417 file names, and make it easier for skeletons to compute output file
3418 names with the same file name prefix as Bison-computed output file
3419 names.
3420 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
3421 b4_parser_file_name and b4_spec_defines_file instead of
3422 @output_parser_name@ and @output_header_name@, which are now redundant.
3423 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
3424 b4_parser_file_name, b4_spec_defines_file, and the new
3425 @basename(FILENAME@) instead of @output_parser_name@ and
3426 @output_header_name@, which inappropriately escaped the file names as
3427 C string literals.
3428 * src/files.c (all_but_ext): Remove static qualifier.
3429 (compute_output_file_names): Move `free (all_but_ext)' to...
3430 (output_file_names_free): ... here since all_but_ext is needed later.
3431 * src/files.h (all_but_ext): Extern.
3432 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
3433 exactly what MUSCLE_INSERT_STRING used to do.
3434 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
3435 characters are escaped properly.
3436 * src/output.c (prepare): Define muscle file_name_all_but_ext as
3437 all_but_ext.
3438 For pkgdatadir muscle, maintain previous functionality by using
3439 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
3440 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
3441 digraphs would never be expanded. Hopefully no one has M4-special
3442 characters in his Bison installation path.
3443 * src/scan-skel.l: Don't parse @output_header_name@ and
3444 @output_parser_name@ anymore since they're now redundant.
3445 In @output, use decode_at_digraphs.
3446 Parse a new @basename command that invokes last_component.
3447 (decode_at_digraphs): New.
3448 (BASE_QPUTS): Remove unused.
3449 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
3450 (Output file name): New tests.
3451
3452 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
3453
3454 Warn about output files that are generated by the skeletons and that
3455 conflict with other output files.
3456 * data/glr.c: Don't generate the header file here when glr.cc does.
3457 * src/files.c (file_names, file_names_count): New static globals.
3458 (compute_output_file_names): Invoke output_file_name_check for files
3459 not generated by the skeletons and remove existing checks.
3460 (output_file_name_check): New function that warns about conflicting
3461 output file names.
3462 (output_file_names_free): Free file_names.
3463 * src/files.h (output_file_name_check): Declare.
3464 * src/scan-skel.l: Invoke output_file_name_check for files generated by
3465 the skeletons.
3466 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
3467 (Conflicting output files): New tests.
3468
3469 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3470
3471 * doc/bison.texinfo: Fix a couple of typos.
3472
3473 2006-12-08 Bob Rossi <bob@brasko.net>
3474
3475 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
3476 Rename to...
3477 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
3478 update all uses.
3479 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
3480 (yypush_parse): Rename yypvars argument to yyps and remove redundant
3481 local pv.
3482 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
3483 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
3484
3485 2006-12-07 Bob Rossi <bob@brasko.net>
3486 and Joel Denny <jdenny@ces.clemson.edu>
3487
3488 * data/push.c (yypvarsinit): Change return type from void* to struct
3489 yypvars*. No longer cast to void* on return.
3490 (struct yypvars): Remove yylen since it need not be remembered between
3491 yypushparse invocations.
3492 (yypushparse): Don't copy between yylen and pv->yylen.
3493
3494 2006-12-05 Bob Rossi <bob@brasko.net>
3495
3496 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
3497 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
3498 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
3499 (struct yypvars): Remove b4_declare_parser_variables.
3500 (yypvarsinit): Remove init code for removed variables.
3501 (global scope): Do not declare b4_declare_parser_variables if
3502 push or pure mode.
3503 (yypushparse): Add b4_declare_parser_variables.
3504 Init new local variables, and remove init code for removed
3505 yypvars variables.
3506 (yyparse): Delete.
3507 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
3508 and yyparse for other modes.
3509 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
3510 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
3511 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
3512 (AT_PURE_LEX_IF): True if pure or push parser.
3513
3514 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
3515
3516 Document Yacc prologue alternatives and default %destructor's and
3517 %printer's as experimental. Don't mention Java yet. Discussed at
3518 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
3519 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
3520 (2.3a): Annotate this entry to say the old forms of these features were
3521 also experimental.
3522 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
3523 Table of Symbols): Say they're experimental. Comment out any mention
3524 of Java (we'll want this back eventually).
3525
3526 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3527
3528 Support a file name argument to %defines. Deprecate `=' in
3529 %file-prefix, %name-prefix, and %output. Discussed at
3530 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
3531 * NEWS (2.3a+): Mention.
3532 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
3533 form of %defines, and remove `=' from entries for %file-prefix,
3534 %name-prefix, and %output.
3535 * src/parse-gram.y (prologue_declaration): Implement.
3536 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
3537 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
3538 all but one occurrence of %name-prefix.
3539 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
3540 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
3541 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
3542 occurrence of each of %file-prefix and %output. Add check for %defines
3543 with argument.
3544 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
3545 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
3546 Remove the `=' from %output.
3547
3548 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
3549
3550 Don't escape $ in test case titles since Autoconf 2.61 now does that
3551 correctly.
3552 * tests/actions.at (Default %printer and %destructor are not for error
3553 or $undefined): Here.
3554 (Default %printer and %destructor are not for $accept): Here.
3555 * tests/input.at (Invalid $n and @n): Here.
3556
3557 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
3558
3559 Rename <!> to <>. Discussed starting at
3560 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
3561 * NEWS (2.3a+): Update.
3562 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3563 Update.
3564 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
3565 * src/scan-gram.l (INITIAL): Implement.
3566 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
3567 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
3568 comment.
3569 * tests/actions.at (Default tagless %printer and %destructor,
3570 Default tagged and per-type %printer and %destructor,
3571 Default %printer and %destructor are not for error or $undefined,
3572 Default %printer and %destructor are not for $accept,
3573 Default %printer and %destructor for mid-rule values): Update.
3574 * tests/input.at (Default %printer and %destructor redeclared,
3575 Unused values with default %destructor): Update.
3576
3577 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 Don't let %prec take a nonterminal.
3580 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
3581 token.
3582 * tests/input.at (%prec takes a token): New test checking that %prec
3583 won't take a nonterminal.
3584
3585 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3586
3587 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
3588 it was double-quoted.
3589 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
3590 grammar is maintained with Bison's highest standards.
3591 * src/getargs.c: Fix some typos in Doxygen comments.
3592
3593 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3594
3595 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
3596 later. Reported by Paul Eggert in
3597 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
3598 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
3599 * src/scan-code.l (translate_action): Don't bother invoking
3600 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
3601 (code_scanner_free): Instead of invoking
3602 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
3603 which frees more.
3604 * src/scan-gram.l (gram_scanner_free): Likewise.
3605 * src/scan-skel.l (scan_skel): Likewise.
3606
3607 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3608
3609 * src/files.c (tr): Change return type to void.
3610 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
3611 has been called previously for the same key.
3612 (muscle_find): Return storage instead of value so that
3613 --enable-gcc-warnings doesn't produce warnings that the return discards
3614 const. aver that the value and storage are the same since storage
3615 could potentially be NULL when value is not.
3616 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
3617 same as 0.
3618
3619 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3620
3621 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
3622 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
3623 us a slightly cleaner distribution, and also works.
3624 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
3625 gnulib changes.
3626
3627 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
3628 and Paul Eggert <eggert@cs.ucla.edu>
3629
3630 Don't let Bison leak memory except when it complains.
3631 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
3632 (spec_defines_file, dir_prefix): Now char *, not const char *,
3633 since they are freed.
3634 * src/files.c: Likewise.
3635 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
3636 Likewise.
3637 (tr): Now operates in-place. All uses changed.
3638 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
3639 values.
3640 (compute_file_name_parts, compute_output_file_names): Don't store
3641 read-only data in variables that will be freed.
3642 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
3643 src_extension, and header_extension.
3644 (output_file_names_free): New public function to free
3645 spec_verbose_file, spec_graph_file, spec_defines_file,
3646 parser_file_name, and dir_prefix.
3647 * src/getargs.c (getargs): Don't store read-only data in variables that
3648 will be freed.
3649 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
3650 (which previously existed but was unused), and quotearg_free.
3651 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
3652 * src/muscle_tab.c: Likewise.
3653 (muscle_entry): Make the value char const *,
3654 and add a new storage member that is char * and can be freed.
3655 (muscle_entry_free): New private function.
3656 (muscle_init): Use it instead of free.
3657 (muscle_insert, muscle_grow): Update and use new storage member.
3658 (muscle_code_grow): Free the string passed to muscle_grow
3659 since it's not needed anymore.
3660 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
3661 add a new `char *code' member.
3662 ("{...}"): Declare semantic type as code.
3663 * src/scan-code.h (translate_rule_action):
3664 (translate_symbol_action, translate_code, translate_action): Return
3665 `char const *' rather than `char *' since external code should not free
3666 these strings.
3667 * src/scan-code.l: Likewise.
3668 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
3669 which is "{...}" in the parser.
3670 * tests/Makefile.am (maintainer-check-valgrind): Set
3671 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
3672 Valgrind.
3673 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
3674 complain.
3675 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
3676 expecting a non-zero exit status sets --leak-check=summary and
3677 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
3678 this case, and we don't want to hear about it.
3679
3680 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
3681
3682 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
3683 instead of from the template, to simplify configuration a bit.
3684 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
3685 and m4/wint_t.m4, as they are needed with the latest gnulib.
3686
3687 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3688
3689 Disable unset/unused mid-rule value warnings by default, and recognize
3690 --warnings=midrule-values to enable them. Discussed starting at
3691 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
3692 * NEWS (2.3a+): Mention.
3693 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
3694 warnings): Add entry for midrule-values subargument.
3695 * src/reader.c (symbol_should_be_used): Don't return true just because
3696 the value is a set/used mid-rule value unless
3697 --warnings=midrule-values was specified.
3698 * tests/input.at (Unused values, Unused values before symbol
3699 declarations): Run tests with and without --warnings=midrule-values.
3700
3701 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
3702 than LIST_FREE directly.
3703
3704 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3705
3706 Finish implementing --warnings=error, which should not be implied by
3707 --warnings=all (or by its synonyms -W and --warnings without
3708 subarguments).
3709 * src/complain.c (set_warning_issued): New function to report that
3710 warnings are being treated as errors and to record an error if so.
3711 Invoke...
3712 (warn_at, warn): ... here.
3713 * src/getargs.c (warnings_args, warnings_types): Reorder so that
3714 "error - warnings are errors" does not appear above "all - all of the
3715 above".
3716 (getargs): For -W and --warnings without subarguments, don't let
3717 FLAGS_ARGMATCH set warnings_error in warnings_flag.
3718 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
3719
3720 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
3721
3722 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
3723 empty subargument list. For example: `bison --warnings= parser.y'.
3724
3725 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3726
3727 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
3728 the parser header file so that gcc doesn't warn.
3729
3730 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3731
3732 Split the default %destructor/%printer into two kinds: <*> and <!>.
3733 Discussed starting at
3734 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
3735 * NEWS (2.3a+): Mention.
3736 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
3737 previous change today related to mid-rules.
3738 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3739 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
3740 (TYPE_TAG_ANY): Add as <*>.
3741 (TYPE_TAG_NONE): Add as <!>.
3742 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
3743 for <*> and <!>.
3744 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
3745 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
3746 * src/symlist.c (symbol_list_default_new): Split into tagged and
3747 tagless versions.
3748 (symbol_list_destructor_set, symbol_list_printer_set): Split
3749 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
3750 SYMLIST_DEFAULT_TAGLESS.
3751 * src/symlist.h: Update symbol_list_default*_new prototypes.
3752 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
3753 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
3754 * src/symtab.c (default_destructor, default_destructor_location,
3755 default_printer, default_printer_location): Split each into tagged and
3756 tagless versions.
3757 (symbol_destructor_get, symbol_destructor_location_get,
3758 symbol_printer_get, symbol_printer_location_get): Implement tagged
3759 default and tagless default cases.
3760 (default_destructor_set, default_printer_set): Split each into tagged
3761 and tagless versions.
3762 * src/symtab.h: Update prototypes.
3763 * tests/actions.at (Default %printer and %destructor): Rename to...
3764 (Default tagless %printer and %destructor): ... this, and extend.
3765 (Per-type %printer and %destructor): Rename to...
3766 (Default tagged and per-type %printer and %destructor): ... this, and
3767 extend.
3768 (Default %printer and %destructor for user-defined end token): Extend.
3769 (Default %printer and %destructor are not for error or $undefined):
3770 Update.
3771 (Default %printer and %destructor are not for $accept): Update.
3772 (Default %printer and %destructor for mid-rule values): Extend.
3773 * tests/input.at (Default %printer and %destructor redeclared): Extend.
3774 (Unused values with default %destructor): Extend.
3775
3776 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3777
3778 Don't apply the default %destructor/%printer to an unreferenced midrule
3779 value. Mentioned at
3780 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3781 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3782 like $@n instead of just @n so that the default %destructor/%printer
3783 logic doesn't see them as user-defined symbols.
3784 (symbol_is_dummy): Check for both forms of the name.
3785 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3786 name for which the midrule value is referenced in any action.
3787 * tests/actions.at (Default %printer and %destructor for mid-rule
3788 values): New test.
3789 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3790 for change to dummy symbol names.
3791
3792 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3793
3794 Warn about unset midrule $$ if the corresponding $n is used.
3795 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3796 $n usage.
3797 (packgram): Before invoking grammar_rule_check on any rule, make sure
3798 all actions have already been scanned in order to set `used' flags.
3799 Otherwise, checking that a midrule's $$ is set will not always work
3800 properly because the midrule check must forward-reference the midrule's
3801 parent rule.
3802 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3803 warning.
3804
3805 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3806
3807 More improvements to the documentation of the prologue alternatives:
3808 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3809 Bison manual.
3810 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3811 some text to clarify the relative importance of the new directives and
3812 to show how these directives may be viewed as code labels.
3813
3814 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3815
3816 Similar to the recently removed %before-header, add %code-top as the
3817 alternative to the pre-prologue. Mentioned at
3818 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3819 Also, let the prologue alternatives appear in the grammar section.
3820 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3821 (prologue_declaration): Move the existing prologue alternatives to...
3822 (grammar_declaration): ... here and add %code-top.
3823 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3824
3825 Clean up and extend documentation for the prologue alternatives.
3826 * NEWS (2.3a+): Describe prologue alternatives.
3827 * doc/bison.texinfo (Prologue): Move discussion of prologue
3828 alternatives to...
3829 (Prologue Alternatives): ... this new section, and extend it to discuss
3830 all 4 directives in detail.
3831 (Table of Symbols): Clean up discussion of prologue alternatives and
3832 add %code-top.
3833
3834 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3835
3836 DJGPP specific issues.
3837
3838 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3839 config.bat accordingly.
3840 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3841 * djgpp/config.site: Likewise.
3842
3843 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
3844
3845 Replace %*-header with %provides, %requires, %code. See discussion at
3846 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3847
3848 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3849 (b4_user_start_header): Remove.
3850 * data/glr.c: Use new macros instead of b4_*start_header
3851 and b4_*end_header.
3852 * data/glr.cc: Likewise.
3853 * data/lalr1.cc: Likewise.
3854 * data/push.c: Likewise.
3855 * data/yacc.c: Likewise.
3856
3857 * doc/bison.texinfo: Remove %before-header, rename
3858 %{start,end,after}-header to %requires, %provides, %code.
3859
3860 * src/parse-gram.y: Likewise (also rename token names accordingly).
3861 * src/scan-gram.l: Likewise.
3862 * tests/actions.at: Likewise.
3863
3864 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3865
3866 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3867 Problem reported by Joel E. Denny.
3868
3869 2006-10-14 Jim Meyering <jim@meyering.net>
3870
3871 (Sync from coreutils.)
3872 Work also when the working directory (with e.g. coreutils sources)
3873 is version controlled with git, rather than CVS.
3874 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3875 rather than CVS.
3876 In messages and comments, say e.g., "checked-out sources",
3877 rather than "CVS sources".
3878 (version_controlled_file): New function. Work for git as well as
3879 for CVS. Don't use grep's -q option.
3880 (slurp): Call it here, in place of CVS-specific code.
3881
3882 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3883
3884 Fix testsuite for ./configure --enable-gcc-warnings:
3885 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3886 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3887 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3888 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3889 * test/regression.at (Diagnostic that expects two alternatives):
3890 Likewise.
3891
3892 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3893
3894 * bootstrap.conf (gnulib_modules): Add config-h.
3895 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3896 worry about HAVE_CONFIG_H.
3897 * lib/abitset.c: Likewise.
3898 * lib/bitset.c: Likewise.
3899 * lib/bitset_stats.c: Likewise.
3900 * lib/bitsetv-print.c: Likewise.
3901 * lib/bitsetv.c: Likewise.
3902 * lib/ebitset.c: Likewise.
3903 * lib/get-errno.c: Likewise.
3904 * lib/lbitset.c: Likewise.
3905 * lib/subpipe.c: Likewise.
3906 * lib/timevar.c: Likewise.
3907 * lib/vbitset.c: Likewise.
3908 * lib/bitset.c: Include "bitset.h" first, to test interface.
3909 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3910 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3911 * lib/bitsetv.c: Include "bitsetv.h" first.
3912 * lib/get-errno.c: Include "get-errno.h" first.
3913 * m4/.cvsignore: Add config-h.m4.
3914 * tests/actions.at (Default %printer and %destructor for ...):
3915 Adjust expected line numbers in output to reflect removal of #if
3916 HAVE_CONFIG_H lines.
3917 * tests/glr-regression.at (Missed %merge type warnings when ...):
3918 Likewise.
3919 * tests/regression.at (Braced code in declaration in rules section):
3920 Likewise.
3921 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3922 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3923 Include <config.h> unconditionally.
3924
3925 * bootstrap: Sync from coreutils, as follows:
3926
3927 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3928
3929 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3930 variable was sometimes used without being initialized. This
3931 messed up the installation of the INSTALL file in some cases.
3932
3933 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3934
3935 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3936 --copy. Inspired by a suggestion from Bruno Haible.
3937
3938 2006-10-03 Jim Meyering <jim@meyering.net>
3939
3940 * bootstrap: Undo last change to this file, since now gnulib-tool
3941 sticks with the automake default in generating dependencies.
3942
3943 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3944
3945 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3946 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3947
3948 * doc/bison.1: Add copyright notice.
3949
3950 * data/glr.c: Don't include <stdarg.h>; not used.
3951
3952 * NEWS: The -g and --graph options now output graphs in Graphviz
3953 DOT format, not VCG format.
3954 * doc/bison.1: Likewise.
3955 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3956 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3957 of this change in
3958 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3959 * TODO: Remove Graphviz entry.
3960 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3961 remove vcg.c, vcg.h, vcg_defaults.h.
3962 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3963 * src/graphviz.c, src/graphviz.h: New files.
3964 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3965 * src/files.h: Make comment more generic.
3966 * src/main.c (main): Likewise.
3967 * src/print_graph.h: Likewise.
3968 * src/getargs.c (usage): Make usage description more generic.
3969 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3970 (static_graph, fgraph): Remove. All uses changed to pass
3971 arguments instead of sharing a static var.
3972 (print_core, print_actions, print_state, print_graph):
3973 Output graphviz format rather than VCG format.
3974 * tests/.cvsignore: Remove *.vcg; add *.dot.
3975 * tests/output.at: Expect *.dot files, not *.vcg files.
3976
3977 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3978 accommodates the 2006-10-08 change.
3979
3980 2006-10-11 Bob Rossi <bob@brasko.net>
3981
3982 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3983 (b4_yyssa, b4_yyerror_range): New macros.
3984 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3985 (yypvarsinit): Remove init of removed fields.
3986 (yypushparse): Remove use of removed fields; use new macros instead.
3987
3988 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3989
3990 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3991 in a push parser. Reindent slightly to match yacc.c better.
3992
3993 2006-10-11 Bob Rossi <bob@brasko.net>
3994
3995 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3996 yymsg_alloc fields.
3997 (yypvarsinit, yypushparse): Remove init of removed fields.
3998 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3999
4000 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
4001
4002 * THANKS: Add Paolo Bonzini and Bob Rossi.
4003
4004 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
4005
4006 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
4007 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
4008 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
4009 b4_define_user_cde and uses): Remove.
4010 (b4_comment, b4_prefix, b4_sync_start): New.
4011 * data/bison.m4: New file, with most of the content removed from c.m4.
4012 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
4013 * src/output.c (output_skeleton): Pass bison.m4.
4014 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
4015 only if specified.
4016
4017 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
4018
4019 Fix test failure reported by Tom Lane in
4020 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
4021 and try to make such failures easier to catch in the future.
4022 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
4023 that's now the caller's responsibility.
4024 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
4025 Set yychar = YYEOF if it's negative.
4026 * tests/actions.at (yylex): Abort if asked to read past EOF.
4027 * tests/conflicts.at (yylex): Likewise.
4028 * tests/cxx-type.at (yylex): Likewise.
4029 * tests/glr-regression.at (yylex): Likewise.
4030 * tests/input.at (yylex): Likewise.
4031 * tests/regression.at (yylex): Likewise.
4032 * tests/torture.at (yylex): Likewise.
4033
4034 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
4035
4036 Fix problems with translating English-language diagnostics.
4037 * bootstrap: Fix bug introduced in recent bootstrap changes, with
4038 respect to bison-runtime pot generation. The YY_ stuff
4039 wasn't being captured.
4040 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
4041 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
4042 * runtime-po/POTFILES.in: Add data/push.c.
4043
4044 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
4045
4046 Merge bootstrap changes from coreutils.
4047
4048 2006-09-28 Jim Meyering <jim@meyering.net>
4049
4050 Automatically generated dependencies are important even
4051 when all of the sources in a directory come from gnulib.
4052 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
4053 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
4054
4055 2006-09-23 Jim Meyering <jim@meyering.net>
4056
4057 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
4058
4059 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4060
4061 * bootstrap: Add support for --force.
4062 (usage): New function. Describe usage less tersely.
4063 (CVS_only_file): New var.
4064
4065 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
4066
4067 * data/push.c (YYPUSH_MORE): Make it an enum instead.
4068 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
4069 Adjust white space and comments to match GNU style better.
4070
4071 2006-09-20 Bob Rossi <bob@brasko.net>
4072
4073 * data/push.c (yyresult_get): Remove function.
4074 (YYPUSH_MORE): Add #define.
4075 (yypushparse): Modify return value.
4076
4077 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4078
4079 * stamp-h.in: Remove; no longer needed.
4080 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
4081 Remove config.h, config.hin, intl (no longer created).
4082 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
4083 stamp-h1.
4084
4085 Sync bootstrap from coreutils, as follows:
4086
4087 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
4088
4089 * bootstrap (symlink_to_gnulib): New function.
4090 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
4091 to copies-of-gnulib.
4092 (cp_mark_as_generated, slurp, gnulib_files):
4093 Avoid making a copy if it's the same as the old version.
4094 (gnulib_files): Add support for this variable (used by Bison).
4095
4096 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
4097
4098 * src/getargs.c (usage): Rework to use conventions similar to
4099 coreutils, to make translation a bit easier and the code a bit
4100 smaller. Problem reported by Tim Van Holder.
4101
4102 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
4103
4104 Use some of gnulib's new modules, taken from coreutils.
4105
4106 * bootstrap: Sync from coreutils, except add support for gnulib_files.
4107 * bootstrap.conf: New file.
4108 (gnulib_modules): Add configmake, inttypes, unistd.
4109 (XGETTEXT_OPTIONS): Add complain, complain_at,
4110 fatal, fatal_at, warn, warn_at, unexpected_end.
4111 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
4112 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
4113 (gl_EARLY): Add.
4114 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
4115 (gl_INIT): Add
4116 (GNULIB_AUTOCONF_SNIPPET): Remove.
4117 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
4118 the pickiest.
4119 * lib/.cvsignore: Add inttypes_.h.
4120 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
4121 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
4122 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
4123 no-longer-necessary initializations.
4124 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
4125 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
4126 use the unistd module.
4127 * src/system.h: Likewise.
4128 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
4129 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
4130 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
4131 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
4132 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
4133 * src/system.h: Include inttypes.h unconditionally, now that we
4134 use the inttypes module. Don't bother to include stdint.h, since
4135 inttypes.h now does that for us.
4136 (LOCALEDIR): Remove, now that we use the configmake module.
4137 * src/getargs.c: Include configmake.h.
4138 * src/main.c: Likewise.
4139 * src/output.c: Likewise.
4140 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
4141 not from $abs_top_builddir, since config.h moved.
4142
4143
4144 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
4145 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
4146
4147 * src/parse-gram.y (symbol_declaration): Don't put statements
4148 before declarations; it's not portable to C89.
4149 * src/scan-code.l (handle_action_at): Likewise.
4150
4151 * src/scan-code.l: Always initialize braces_level; the old code
4152 left it uninitialized and therefore had undefined behavior.
4153
4154 Don't attempt to redefine 'assert', since it runs afoul of
4155 systems where standard headers (mistakenly) include <assert.h>.
4156 Instead, define and use our own alternative, called 'aver'.
4157 * src/reader.c: Don't include assert.h, since we no longer
4158 use assert.
4159 * src/scan-code.l: Likewise.
4160 * src/system.h (assert): Remove, replacing with....
4161 (aver): New function, taking a bool arg. All uses changed.
4162 * src/tables.c (pack_vector): Ensure that aver arg is bool,
4163 not merely an integer.
4164
4165 2006-09-15 Bob Rossi <bob@brasko.net>
4166
4167 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
4168 * data/c.m4 (YYPUSH): New.
4169 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
4170 * src/getargs.c (push_parser): New var.
4171 * src/getargs.h (push_parser): New declaration.
4172 * src/output.c (prepare): Add macro insertion of `push_flag'.
4173 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
4174 (prologue_declaration): Parse %push-parser.
4175 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
4176 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
4177 list of removed lines from the traces observed.
4178 (AT_CHECK_CALC_LALR): Added push parser tests.
4179
4180 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
4181
4182 * NEWS: Version 2.3a.
4183 * configure.ac (AC_INIT): Likewise.
4184
4185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
4186 "#define YYSTYPE int" that caused "make maintainer-check" to fail
4187 due to header ordering dependencies. I don't know why the #define
4188 was there.
4189
4190 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
4191 runtime cost when YYDEBUG is not defined, and so that some tests
4192 that used to fail now work. Problem and initial suggestion by
4193 Paolo Bonzini.
4194 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
4195 * data/glr.cc (b4_parser_class_name):
4196 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
4197 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
4198 (yydebug_) [YYDEBUG]: New member.
4199 (yycdebug_): Now defined only if YYDEBUG.
4200 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
4201 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
4202 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
4203 if YYYDEBUG.
4204 (debug_stream, set_debug_stream, debug_level, set_debug_level):
4205 Define only if YYDEBUG.
4206 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
4207 set_debug_level.
4208 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
4209 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
4210 AT_CHECK_CALC_GLR_CC that are working now.
4211
4212 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
4213
4214 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
4215 We don't need them in glr.cc, and glr.c defines them.
4216 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
4217 assumes that defining it to anything is the same as defining
4218 it to 1. Problem reported by Paolo Bonzini.
4219
4220 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
4221
4222 * data/c.m4 (b4_null, b4_case): Define.
4223 * src/output.c (prepare_symbols): Use b4_null.
4224 (user_actions_output): Use b4_case.
4225
4226 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
4227
4228 * data/glr.c (b4_shared_declarations): Put start-header first,
4229 before any #includes that we generate, so that feature-test
4230 macros work. Problem reported by Michael Deutschmann in
4231 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
4232 * data/lalr1.cc: Likewise.
4233 * doc/bison.texinfo (Prologue): Document that feature-test macros
4234 should be defined before any Bison declarations.
4235 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
4236 that depend on location.hh after, not before, Bison decls, since
4237 we now include location.hh after the first user prologue.
4238
4239 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
4240 Sander Brandenburg in
4241 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
4242 Also, fix minor white space and comment issues.
4243 (Prologue): Mention that it's better to define feature-test macros
4244 before Bison declarations. Problem reported by Michael Deutschmann.
4245
4246 * README-cvs: Fix typo: "&" should be "&&". Problem reported
4247 by Jim Meyering.
4248 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
4249 This adjusts to recent gnulib changes.
4250
4251 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4252
4253 Finish implementation of per-type %destructor/%printer. Discussed
4254 starting at
4255 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
4256 and
4257 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
4258 * NEWS (2.3+): Add a description of this feature to the default
4259 %destructor/%printer description.
4260 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
4261 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4262 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
4263 list node contains a semantic type.
4264 * src/symtab.c, src/symtab.h: Extend with a table that associates
4265 semantic types with their %destructor's and %printer's.
4266 (semantic_type_from_uniqstr, semantic_type_get,
4267 semantic_type_destructor_set, semantic_type_printer_set): New functions
4268 composing the public interface of that table.
4269 (symbol_destructor_get, symbol_destructor_location_get,
4270 symbol_printer_get, symbol_printer_location_get): If there's no
4271 per-symbol %destructor/%printer, look up the per-type before trying
4272 the default.
4273 * tests/actions.at (Per-type %printer and %destructor): New test case.
4274 * tests/input.at (Default %printer and %destructor redeclared):
4275 Extend to check that multiple occurrences of %symbol-default in a
4276 single %destructor/%printer declaration is an error.
4277 (Per-type %printer and %destructor redeclared, Unused values with
4278 per-type %destructor): New test cases.
4279
4280 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
4281
4282 Require default %destructor/%printer to be declared using
4283 %symbol-default instead of an empty symbol list, and start working on
4284 new per-type %destructor/%printer. Discussed at
4285 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
4286 * NEWS (2.3+): Add %symbol-default to example.
4287 * bison.texinfo (Freeing Discarded Symbols): Likewise.
4288 (Table of Symbols): Add entry for %symbol-default.
4289 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
4290 (generic_symlist, generic_symlist_item): New nonterminals for creating
4291 a list in which each item is a symbol, semantic type, or
4292 %symbol-default.
4293 (grammar_declaration): Use generic_symlist in %destructor and %printer
4294 declarations instead of symbols.1 or an empty list.
4295 (symbol_declaration, precedence_declaration, symbols.1): Update actions
4296 for changes to symbol_list.
4297 * src/reader.c: Update for changes to symbol_list.
4298 * src/scan-code.l: Likewise.
4299 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
4300 * src/symlist.c, src/symlist.h: Extend such that a list node may
4301 represent a semantic type or a %symbol-default in addition to just an
4302 ordinary symbol. Add switched functions for setting %destructor's and
4303 %printer's.
4304 * tests/actions.at, tests/input.at: Add %symbol-default to all default
4305 %destructor/%printer declarations.
4306
4307 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
4308
4309 Whether the default %destructor/%printer applies to a particular symbol
4310 isn't a question of whether the user *declares* that symbol (in %token,
4311 for example). It's a question of whether the user by any means
4312 *defines* the symbol at all (by simply using a char token, for
4313 example). $end is defined by Bison whereas any other token with token
4314 number 0 is defined by the user. The error token is always defined by
4315 Bison regardless of whether the user declares it with %token, but we
4316 may one day let the user define error as a nonterminal instead.
4317 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
4318 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
4319 the meaning of "user-defined".
4320 * tests/actions.at (Default %printer and %destructor for user-declared
4321 end token): Rename to...
4322 (Default %printer and %destructor for user-defined end token): ...
4323 this.
4324
4325 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
4326 computation of whether to apply the default, don't maintain a list of
4327 every Bison-defined symbol. Instead, just check for a first character
4328 of '$', which a user symbol cannot have, and check for the error token.
4329
4330 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
4331
4332 Don't apply the default %destructor or %printer to the error token,
4333 $undefined, or $accept. This change fits the general rule that the
4334 default %destructor and %printer are only for user-declared symbols,
4335 and it solves several difficulties that are described in the new test
4336 cases listed below.
4337 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
4338 * tests/actions.at (Default %printer and %destructor are not for error
4339 or $undefined, Default %printer and %destructor are not for $accept):
4340 New test cases.
4341
4342 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
4343
4344 Allow %start after the first rule.
4345 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
4346 when parsing the first rule.
4347 (check_and_convert_grammar): Search for it here after all grammar
4348 declarations have been parsed. Skip midrules, which have dummy LHS
4349 nonterminals.
4350 * src/symtab.c (symbol_is_dummy): New function.
4351 * src/symtab.h (symbol_is_dummy): Declare it.
4352 * tests/input.at (%start after first rule): New test.
4353
4354 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4355
4356 Redo some of the previous commit: add back the ability to use
4357 non-aliased/undeclared string literals since it might be useful to
4358 those declaring %token-table.
4359 * src/reader.c (check_and_convert_grammar): Undo changes in previous
4360 commit: don't worry about complaints from symbols_pack.
4361 * src/symtab.c (symbol_new, symbol_class_set,
4362 symbol_check_alias_consistency): Undo changes in previous commit: count
4363 each string literal as a new symbol and token, assign it a symbol
4364 number, and don't complain about non-aliased string literals.
4365 (symbols_pack): Since symbol_make_alias still does not decrement symbol
4366 and token counts but does still set aliased tokens to the same number,
4367 symbol_pack_processor now leaves empty slots in the symbols array.
4368 Remove those slots.
4369 * tests/regression.at (Undeclared string literal): Remove test case
4370 added in previous commit since non-aliased string literals are allowed
4371 again.
4372 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
4373 remove unnecessary string literal declarations.
4374 * tests/sets.at (Firsts): Likewise.
4375
4376 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
4377
4378 Don't allow an undeclared string literal, but allow a string literal to
4379 be used before its declaration.
4380 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
4381 symbols_pack complained.
4382 * src/symtab.c (symbol_new): Don't count a string literal as a new
4383 symbol.
4384 (symbol_class_set): Don't count a string literal as a new token, and
4385 don't assign it a symbol number since symbol_make_alias does that.
4386 (symbol_make_alias): It's not necessary to decrement the symbol and
4387 token counts anymore. Don't assume that an alias declaration occurs
4388 before any uses of the identifier or string, and thus don't assert that
4389 one of them has the highest symbol number so far.
4390 (symbol_check_alias_consistency): Complain if there's a string literal
4391 that wasn't declared as an alias.
4392 (symbols_pack): Bail if symbol_check_alias_consistency failed since
4393 symbol_pack asserts that every token has been assigned a symbol number
4394 although undeclared string literals have not.
4395 * tests/regression.at (String alias declared after use, Undeclared
4396 string literal): New test cases.
4397 (Characters Escapes, Web2c Actions): Declare string literals as
4398 aliases.
4399 * tests/sets.at (Firsts): Likewise.
4400
4401 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
4402
4403 In the grammar scanner, STRING_FINISH unclosed constructs and return
4404 them to the parser in order to improve error messages.
4405 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
4406 SC_BRACED_CODE, SC_PROLOGUE): Implement.
4407 * tests/input.at (Unclosed constructs): New test case.
4408 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
4409 seen.
4410
4411 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
4412 unused global.
4413
4414 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
4415
4416 Handle string aliases for character tokens correctly.
4417 * src/symtab.c (symbol_user_token_number_set): If the token has an
4418 alias, check and set its alias's user token number instead of its own,
4419 which is set to indicate the alias. Previously, every occurrence of
4420 the character token in the grammar overwrote that alias indicator with
4421 the character code.
4422 * tests/input.at (String aliases for character tokens): New test.
4423
4424 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
4425
4426 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
4427
4428 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
4429
4430 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
4431 to prevent failures when building on older platforms.
4432 Check for autopoint failure.
4433 Set XGETTEXT_OPTIONS to values that check for C format strings,
4434 so that translators are warned about them (this also helps
4435 prevent core dumps).
4436
4437 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
4438 function, since it simplifies our code a bit.
4439
4440 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
4441 rather than -W, so we don't get bogus warnings about sign comparisons.
4442 Add -Wpointer-arith, since that warning is useful (it reports code
4443 that does not conform to C89 and that some compilers reject).
4444 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
4445 since it's no longer needed.
4446
4447 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
4448
4449 Clean up scanners a bit.
4450 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
4451 definitions so gcc won't warn when obstack_for_string is unused.
4452 * src/scan-code.l: config.h and system.h are already #include'd by
4453 scan-code-c.c, so get rid of them here.
4454 * src/scan-gram.l: Likewise.
4455 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
4456 definitions rather than duplicating the rest of it.
4457 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
4458
4459 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
4460
4461 Suppress signed/unsigned comparison warnings for yycheck.
4462 * data/c.m4 (b4_safest_int_type): New macro.
4463 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
4464 a signed int type, cast it to b4_safest_int_type first.
4465 * data/yacc.c: Likewise.
4466 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
4467 also overwritten.
4468
4469 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
4470
4471 * doc/bison.texinfo: Fix some typos.
4472
4473 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
4474
4475 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
4476 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
4477
4478 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
4479 the latest gnulib does this a different way.
4480 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
4481 translation was patched, so stop omitting it.
4482
4483 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4484
4485 Enable declaration of default %printer/%destructor. Make the parser
4486 use these for all user-declared grammar symbols for which the user does
4487 not declare a specific %printer/%destructor. Thus, the parser uses it
4488 for token 0 if the user declares it but not if Bison generates it as
4489 $end. Discussed starting at
4490 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
4491 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
4492 and
4493 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
4494 * NEWS (2.3+): Mention.
4495 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
4496 declare a %destructor for a mid-rule's semantic value. It's just
4497 impossible to declare one specific to it.
4498 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
4499 code. Describe default %destructor form.
4500 * src/parse-gram.y (grammar_declaration): Parse default
4501 %printer/%destructor declarations.
4502 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
4503 and symbol_destructor_location_get rather than accessing the destructor
4504 and destructor_location members of struct symbol.
4505 (symbol_printers_output): Likewise but for %printer's.
4506 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
4507 again.
4508 * src/symtab.c (default_destructor, default_destructor_location,
4509 default_printer, default_printer_location): New static global
4510 variables to record the default %destructor and %printer.
4511 (symbol_destructor_get, symbol_destructor_location_get,
4512 symbol_printer_get, symbol_printer_location_get): New functions to
4513 compute the appropriate %destructor and %printer for a symbol.
4514 (default_destructor_set, default_printer_set): New functions to set the
4515 default %destructor and %printer.
4516 * src/symtab.h: Prototype all those new functions.
4517 * tests/actions.at (Default %printer and %destructor): New test to
4518 check that the right %printer and %destructor are called, that they're
4519 not called for $end, and that $$ and @$ work correctly.
4520 (Default %printer and %destructor for user-declared end token): New
4521 test to check that the default %printer and %destructor are called for
4522 a user-declared end token.
4523 * tests/input.at (Default %printer and %destructor redeclared, Unused
4524 values with default %destructor): New tests to check related grammar
4525 warnings and errors.
4526
4527 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
4528
4529 Clean up handling of %destructor for the end token (token 0).
4530 Discussed starting at
4531 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
4532 and
4533 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
4534
4535 Make the skeletons consistent in how they pop the end token and invoke
4536 its %destructor.
4537 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
4538 state, which has token number 0, since this would invoke the
4539 %destructor for the end token.
4540 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
4541 until after shifting the end token, or else it won't be popped.
4542 * data/yacc.c (yyparse): Likewise.
4543
4544 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
4545 it's the end token. Upon termination, destroy an unshifted lookahead
4546 even when it's the end token.
4547 * data/lalr1.cc (yy::parser::parse): Likewise.
4548 * data/yacc.c (yyparse): Likewise.
4549
4550 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
4551 value warnings for the end token when the user gives the end token a
4552 %destructor.
4553
4554 * tests/actions.at (Printers and Destructors): Test all the above.
4555
4556 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 Update to latest gnulib and gettext versions.
4559 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
4560 Add fopen-safer.
4561 (gnulib_files): Add m4/warning.m4. Don't worry about files
4562 overwritten by autopoint.
4563 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
4564 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
4565 rejects them.
4566 Don't use autoreconf; instead, invoke autopoint etc. by hand,
4567 so that we can remove the intl files at a better time.
4568 (intl_files_to_remove): Remove aclocal.m4, since it gets
4569 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
4570 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
4571 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4572 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
4573 Remove datarootdir hack; no longer needed.
4574 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
4575 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
4576 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
4577 strdup.h.
4578 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
4579 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
4580
4581 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
4582
4583 * bootstrap: Adjust to today's change to gnulib-tool by invoking
4584 it with --assume-autoconf='latest-stable'.
4585
4586 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
4587
4588 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
4589 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
4590 YYSTYPE' and `{'.
4591 * src/muscle_tab.h (muscle_grow): Replace the header comments with
4592 those from muscle_tab.c since the old ones are misleading.
4593
4594 2006-07-13 Akim Demaille <akim@epita.fr>
4595
4596 Support %define "KEY" {VALUE}.
4597 * src/scan-code.h, src/scan-code.l (translate_action)
4598 (translate_rule_action, translate_symbol_action, translate_code):
4599 Return char *, not const char *.
4600 * src/parse-gram.y (declaration): Rename as...
4601 (prologue_declaration): this.
4602 (string_content): Remove this nonterminal, use STRING.
4603 (braceless, content, content.opt): New nonterminal.
4604 Use them.
4605 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
4606 as value.
4607 * src/scan-gram.l (getargs.h): Don't include it.
4608
4609 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
4610
4611 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
4612 rather than a for-loop that declares a local bool variable. This
4613 should work around a compatibility problem with a Cray x1e C++
4614 compiler reported by Hung Nguyen in
4615 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
4616 The for-loop was introduced in the 2004-11-17 change but I don't
4617 know why it was needed.
4618
4619 2006-07-12 Akim Demaille <akim@epita.fr>
4620
4621 * data/c.m4: Comment changes.
4622
4623 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
4624
4625 * src/complain.c (error_message, ERROR_MESSAGE): New.
4626 To factor...
4627 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
4628 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
4629
4630 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4631
4632 * NEWS: Instead of %union, you can define and use your own union type
4633 YYSTYPE if your grammar contains at least one <type> tag.
4634 Your YYSTYPE need not be a macro; it can be a typedef.
4635 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
4636 (Union Decl, Decl Summary): Document this.
4637 * data/glr.c (YYSTYPE): Implement this.
4638 * data/glr.cc (YYSTYPE): Likewise.
4639 * data/lalr1.cc (YYSTYPE): Likewise.
4640 * data/yacc.c (YYSTYPE): Likewise.
4641 * src/output.c (prepare): Output tag_seen_flag.
4642 * src/parse-gram.y (declaration, grammar_declaration):
4643 Use 'union_seen' rather than 'typed' to determine whether
4644 %union has been seen, since grammars can now be typed without
4645 %union.
4646 (symbol_declaration, type.opt, symbol_def):
4647 Keep track of whether a tag has been seen.
4648 * src/reader.c (union_seen, tag_seen): New vars.
4649 (typed): remove.
4650 * src/reader.h (union_seen, tag_seen, typed): Likewise.
4651 * src/scan-code.l (untyped_var_seen): New variable.
4652 (handle_action_dollar): Adjust to above changes.
4653 (handle_action_dollar, handle_action_at):
4654 Improve overflow checking for outlandish numbers.
4655 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
4656 avoid new diagnostics generated by above changes.
4657 * tests/regression.at (YYSTYPE typedef): Add test to check
4658 for type tags without %union.
4659
4660 * src/symlist.c (symbol_list_length): Return int, not unsigned
4661 int, since callers expect int. This may need to get revisited
4662 once we have proper integer overflow checking.
4663
4664 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
4665 object is now static.
4666
4667 * src/getargs.c (flags_argmatch): Return void, not int,
4668 to pacify ./configure --enable-gcc-warnings.
4669
4670 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
4671 since last_string is already defined to FLEX_PREFIX (last_string).
4672
4673 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4674
4675 Implement --warnings/-W.
4676 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
4677 replaced by...
4678 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
4679 Adjust callers.
4680 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
4681 (warnings_args, warnings_types): New.
4682 (getargs, short_options, long_options): Accept -W/--warnings.
4683 Sort the options by alphabetical order, upper case letter right
4684 before its lower case.
4685
4686 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4687
4688 Change %merge result type clash warnings to errors. Discussed at
4689 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
4690 * src/reader.c (record_merge_function_type): Use complain_at.
4691 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4692 declared later): Update test case results.
4693
4694 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
4695
4696 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
4697 to be in alphabetical order.
4698 (trace_args): Spelling fixes.
4699
4700 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
4701
4702 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
4703 so they don't collide with user-defined macros.
4704 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
4705 this was never guaranteed, and now that we're using gnulib stdint,
4706 which defines int_fast16_t to long int, the problem is exposed.
4707
4708 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
4709
4710 * data/c.m4 (b4_basename): Simplify a bit, since we don't
4711 need the full POSIX semantics (and weren't implementing them
4712 anyway).
4713
4714 Adjust to Autoconf 2.60 and today's gnulib.
4715 * bootstrap (gnulib_modules): Add stdint.
4716 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
4717 no longer copies it.
4718 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
4719 since stdint needs the former and wcwidth (which is now required
4720 by mbswidth) needs the latter.
4721 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
4722 work around a compatibility glitch between gettext 0.14.6 and
4723 Autoconf 2.60.
4724 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
4725 Do not check for uintptr_t, since new stdint module does the right
4726 thing.
4727 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
4728 Add stdint.h, stdint_.h, wcwidth.h.
4729 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
4730 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
4731 stdint.m4, wchar_t.m4, wcwidth.m4.
4732 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
4733 usual order for ../lib/*.h files.
4734 (file_name_split): Use last_component, not base_name, to adjust
4735 to gnulib changes.
4736 * src/parse-gram.h: Include <strverscmp.h> in the usual order
4737 for ../lib/*.h files.
4738 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
4739 Define unconditionally, since we now assume the stdint module.
4740 * src/scan-skel.l: Include <dirname.h>.
4741 (BASE_QPUTS): Use last_component, not base_name.
4742 * src/system.h: Include <unlocked-io.h> in the usual order
4743 for ../lib/*.h files. Include <stdint.h> unconditionally,
4744 since we now use the stdint module.
4745 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
4746 HAVE_UINTPTR_T, since we now use the stdint module.
4747 (base_name): Remove decl, since files now include <dirname.h>
4748 to get the decl.
4749
4750 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4751
4752 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
4753 New, default to 1.
4754 * data/yacc.c, data/glr.c, data/location.cc: Use them.
4755 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
4756 default.
4757 * tests/calc.at: Adjust.
4758
4759 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
4760
4761 * data/c.m4 (b4_basename): New.
4762 (b4_syncline): Also output the location of its invocation (from
4763 the skeleton).
4764 (b4_user_action, b4_define_user_action, b4_user_actions)
4765 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
4766 (b4_user_stype): New.
4767 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
4768
4769 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4770
4771 In the grammar file, the first column is 1 not 0 on the first line as
4772 on every other line.
4773 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
4774 * tests/input.at (Torturing the Scanner): Update output.
4775
4776 * src/scan-gram.l (scanner_cursor): Declare it static.
4777
4778 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4779
4780 In warnings, say "previous declaration" rather than "first
4781 declaration".
4782 * src/symtab.c (redeclaration): Do that here.
4783 * src/reader.c (record_merge_function_type): In the case of a result
4784 type clash, report the previous declaration rather than the very first
4785 one in the grammar file.
4786 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4787 declared later): Add a third declaration to check this behavior.
4788 * tests/input.at (Incompatible Aliases): Update output.
4789
4790 2006-06-27 Akim Demaille <akim@epita.fr>
4791
4792 * doc/Doxyfile.in: New.
4793 * doc/Makefile.am: Use it.
4794 * src/lalr.h, src/symtab.h: Initial doxygenation.
4795
4796 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4797
4798 Don't miss %merge result type warnings just because the LHS types are
4799 declared after the %merge. This continues the effort of the previous
4800 patch.
4801 * src/reader.c (get_merge_function): Don't set the merger type yet.
4802 (record_merge_function_type): New function for setting the merger type
4803 and checking for clashes.
4804 (grammar_current_rule_merge_set): Set the location of the %merge for
4805 the current rule.
4806 (packgram): Invoke record_merge_function_type for each rule now that
4807 all symbol type declarations have been parsed.
4808 * src/reader.h (merger_list.type_declaration_location): New member
4809 storing the location of the first %merge from which the type for this
4810 merging function was derived.
4811 * src/symlist.h (symbol_list.merger_declaration_location): New member
4812 storing the location of a rule's %merge, if any.
4813 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4814 declared later): New test to catch the error fixed by the above patch.
4815
4816 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4817
4818 Get action warnings (grammar_rule_check) right even when symbol
4819 declarations appear after the rules. Discussed at
4820 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4821 and
4822 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4823 Don't mistake the type of $$ in a midrule to be that of its parent
4824 rule's $$.
4825 * src/reader.c (grammar_current_rule_end): Don't invoke
4826 grammar_rule_check yet since not all symbol declarations may have been
4827 parsed yet.
4828 (grammar_midrule_action): Likewise.
4829 Don't record whether the midrule's $$ has been used yet since actions
4830 haven't been translated yet.
4831 Record the midrule's parent rule and its RHS index within the parent
4832 rule.
4833 (grammar_current_rule_action_append): Don't translate the action yet
4834 since not all symbol declarations may have been parsed yet and, thus,
4835 warnings about types for $$, $n, @$, and @n can't be reported yet.
4836 (packgram): Translate the action and invoke grammar_rule_check now that
4837 all symbol declarations have been parsed.
4838 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4839 after parsing the entire grammar file, the symbol list here in the case
4840 of a midrule is actually the midrule's empty RHS, so reference its
4841 parent rule's RHS where necessary.
4842 On the other hand, now that you can already know it's a midrule, you
4843 aren't forced to think $$ has the same type as its parent rule's $$.
4844 (handle_action_at): In the case of a midrule, reference the parent rule
4845 where necessary.
4846 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4847 members.
4848 (symbol_list_length): Now that this is invoked after all rules have
4849 been parsed, a NULL symbol (rather than a NULL symbol list node)
4850 terminates a rule. symbol_list_print already does this correctly.
4851 * src/symlist.h (symbol_list.midrule_parent_rule,
4852 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4853 remember their relationships with their parents.
4854 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4855 fixed by the above patch.
4856 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4857 implementing...
4858 (Unused values): ... this old test case and...
4859 (Unused values before symbol declarations): ... this new test case.
4860 This one is the same as `Unused values' except that all symbol
4861 declarations appear after the rules in order to catch the rest of the
4862 errors fixed by the above patch.
4863
4864 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4865
4866 More cleanup.
4867 * src/reader.c (current_rule): Declare it static since it's no longer
4868 used outside this file.
4869 (grammar_current_rule_action_append): Remove redundant arguments from
4870 translate_rule_action invocation.
4871 * src/reader.h (current_rule): Remove this unused extern.
4872 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4873 * src/scan-code.l (translate_rule_action): Likewise.
4874
4875 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4876
4877 Clean up yesterday's patch.
4878 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4879 to...
4880 * src/reader.c (grammar_current_rule_action_append): ... here for
4881 consistency with grammar_current_rule_symbol_append.
4882 * tests/regression.at (Braced code in declaration in rules section):
4883 Make yyerror and yylex static as usual.
4884
4885 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4886
4887 Fix bug that mistakes braced code in a declaration in the rules section
4888 to be a rule action. Mentioned at
4889 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4890 * src/scan-gram.l: Move midrule action detection from the start of the
4891 scanning of any braced code to...
4892 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4893 action. For readability, use $2 and @2 rather than the equivalent
4894 global variables.
4895 * tests/regression.at (Braced code in declaration in rules section):
4896 New test to catch the error fixed by the above patch.
4897
4898 Work on code readability some.
4899 * src/scan-code.l (current_rule): Get rid of this misleading and
4900 redundant declaration: it's actually extern'ed in reader.h.
4901 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4902 translate_action): Add a rule argument and use it instead of the global
4903 current_rule.
4904 (translate_rule_action): This already receives current_rule through an
4905 argument, so pass it on to translate_action instead of assigning
4906 current_rule to current_rule.
4907 (translate_symbol_action, translate_code): Pass rule = NULL to
4908 translate_action.
4909
4910 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4911
4912 Rename %before-definitions to %start-header and %after-definitions to
4913 %end-header. Don't use these declarations to separate pre-prologue
4914 blocks from post-prologue blocks. Add new order-independent
4915 declarations %before-header and %after-header as alternatives to the
4916 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4917 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4918 * NEWS (2.3+): Update for these changes.
4919 * data/glr.c (b4_before_definitions): Update to...
4920 (b4_start_header): ... this.
4921 (b4_after_definitions): Update to...
4922 (b4_end_header): ... this.
4923 * data/glr.cc: Likewise.
4924 * data/lalr1.cc: Likewise.
4925 * data/yacc.c: Likewise.
4926 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4927 prologue blocks with %*-header declarations.
4928 (Calc++ Parser): Likewise.
4929 (Decl Summary): Update names.
4930 (Table of Symbols): Update description.
4931 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4932 (PERCENT_END_HEADER): ... this.
4933 (PERCENT_BEFORE_DEFINITIONS): Update to...
4934 (PERCENT_START_HEADER): ... this.
4935 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4936 (declaration): Update token names and m4 macro names.
4937 When parsing %end-header and %start-header, invoke translate_code
4938 before muscle_code_grow, and no longer set global booleans to remember
4939 whether these declarations have been seen.
4940 Parse new %after-header and %before-header.
4941 * src/reader.c (before_definitions, after_definitions): Remove.
4942 (prologue_augment): Accept a new bool argument to specify whether to
4943 augment the pre-prologue or post-prologue.
4944 * src/reader.h (before_definitions, after_definitions): Remove these
4945 extern's.
4946 (prologue_augment): Add new bool argument.
4947 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4948 (PERCENT_END_HEADER): ... this.
4949 (PERCENT_BEFORE_DEFINITIONS): Update to...
4950 (PERCENT_START_HEADER): ... this.
4951 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4952 * tests/actions.at (Printers and Destructors): Update names.
4953
4954 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4955
4956 Add comparison operators for C++ location classes. Discussed at
4957 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4958 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4959 declaration indicating whether filename_type has an operator==. If
4960 filename_type is `std::string', it defaults to `1', `0' otherwise.
4961 * data/location.cc: Iff b4_define_location_comparison is `1', add
4962 operator== and operator!= for class position and for class location.
4963
4964 Some minor fixes.
4965 * src/scan-action.l: Remove unused file.
4966 * src/symtab.c (symbol_printer_set): Use printer_location not
4967 destructor_location.
4968 * src/symtab.h (struct symbol): Replace incorrect source comment for
4969 printer members.
4970 * tests/input.at (Incompatible Aliases): Update output with correct
4971 printer location.
4972
4973 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4974
4975 Don't put the pre-prologue in the header file. For the yacc.c code
4976 file and the glr.c header and code files, move the pre-prologue before
4977 the token definitions. Add new %before-definitions and
4978 %after-definitions to declare code that will go in both the header file
4979 and code file. Discussed at
4980 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4981 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4982 and
4983 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4984 * NEWS (2.3+): Describe these changes.
4985 * data/glr.c (b4_pre_prologue): Move from within to before...
4986 (b4_shared_declarations): ... this.
4987 Add new b4_before_definitions before b4_token_enums.
4988 Add new b4_after_definitions at the end.
4989 * data/glr.cc (b4_pre_prologue): Replace with...
4990 (b4_before_definitions): ... this in the header file.
4991 (b4_after_definitions): New near the end of the header file.
4992 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4993 code file right before including the header file.
4994 (b4_before_definitions): New in the previous position of
4995 b4_pre_prologue in the header file.
4996 (b4_after_definitions): New near the end of the header file.
4997 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4998 (b4_token_enums_defines): In the code file, move to right before
4999 YYSTYPE for consistency with the header file.
5000 (b4_before_definitions): New right before b4_token_enums_defines in
5001 both the header and code file.
5002 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
5003 header and code file.
5004 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
5005 of prologues for %union dependencies.
5006 (Decl Summary): In %defines description, mention the effect of
5007 %before-definitions and %after-definitions on the header file.
5008 (Calc++ Parser): Forward declare driver in a %before-definitions rather
5009 than in the pre-prologue so that make check succeeds.
5010 (Table of Symbols): Add entries for %before-definitions and
5011 %after-definitions.
5012 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
5013 %before-definitions.
5014 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
5015 (declaration): Parse those declarations and append to
5016 b4_before_definitions and b4_after_definitions, respectively.
5017 * src/reader.c (before_definitions, after_definitions): New bools to
5018 track whether those declarations have been seen.
5019 (prologue_augment): Add to the post-prologue if %union,
5020 %before-definitions, or %after-definitions has been seen.
5021 * src/reader.h (before_definitions, after_definitions): New extern's.
5022 * src/scan-gram.l: Scan the new declarations.
5023 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
5024 prologue block in a %before-definitions or a %after-definitions based
5025 on whether the %union is declared.
5026 * tests/regression.at (Early token definitions with --yacc, Early token
5027 definitions without --yacc): Move tests for token definitions into the
5028 post-prologue since token names are no longer defined in the
5029 pre-prologue.
5030
5031 2006-06-20 Akim Demaille <akim@epita.fr>
5032
5033 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
5034 (symbol_get): Use it.
5035 * src/parse-gram.y: Use it.
5036
5037 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
5038
5039 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
5040 build succeeds when configured with --enable-gcc-warnings.
5041
5042 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
5043
5044 * src/parse-gram.y (char_name): New function.
5045 (CHAR, STRING, string_content): For %printer, properly escape.
5046 (ID): Prefer fputs to fprintf.
5047 (id): Reindent to be consistent with other rules.
5048 Properly quote char.
5049
5050 The Translation Project changed its way of publishing translations
5051 to maintainers. I haven't received any responses to my request
5052 for supporting the old way, or for documenting the new way. I
5053 have modified 'bootstrap' to use screen scraping
5054 (in this case, HTML scraping). This is unreliable and inelegant,
5055 but I don't see any better way. Yuck.
5056 * bootstrap (TP_URL, WGET_COMMAND): New vars.
5057 (get_translations): New function, which uses HTML scraping to
5058 deduce locations of latest translations.
5059 Use this function to grab both bison and bison-runtime .po files.
5060 Don't bother priming the pump for the runtime-po domain any more,
5061 as it's now translated better than bison is.
5062
5063 2006-06-19 Akim Demaille <akim@epita.fr>
5064
5065 * src/scan-gram.l: No longer "parse" things after `%union' until
5066 `{'. Rather, return a single "%union" token.
5067 No longer make symbols: return strings, and leave the conversion
5068 to symbols to the parser.
5069 (SC_PRE_CODE, token_type): Remove.
5070 * src/parse-gram.y (%union): New field `character'.
5071 Sort tokens.
5072 (CHAR): New token.
5073 (ID, ID_COLON): Now that the scanner no longer makes them
5074 identifiers, adjust all uses to invoke symbol_get.
5075 (id_colon): New, wraps the conversion from string to symbol.
5076 (%union): Accept a possible union_name.
5077 (symbol): Now can be a char.
5078 * data/c.m4 (b4_union_name): Leave a default value.
5079 * data/glr.c, data/yacc.c: Use it.
5080
5081 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
5082
5083 For associating token numbers with token names for "yacc.c", don't use
5084 #define statements unless `--yacc' is specified; always use enum
5085 yytokentype. Most important discussions start at:
5086 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
5087 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
5088 and
5089 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
5090 * NEWS (2.3+): Mention.
5091 * data/c.m4 (b4_yacc_if): New.
5092 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
5093 token #define's.
5094 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
5095 on token name definitions.
5096 * src/getargs.c (usage): Capitalize `Yacc' in English.
5097 * src/output.c (prepare): Define b4_yacc_flag.
5098 * tests/regression.at (Early token definitions): Test that tokens names
5099 are defined before the pre-prologue not just before the post-prologue.
5100 Remove this test case and copy to...
5101 (Early token definitions with --yacc): ... this to test #define's.
5102 (Early token definitions without --yacc): ... and this to test enums.
5103
5104 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
5105
5106 * NEWS: Reword the post-2.3 change to not be so optimistic about
5107 removing the old "look-ahead" spelling.
5108 Update previous look-ahead/lookahead change reports.
5109 * REFERENCES: look-ahead -> lookahead (since that's
5110 what he actually wrote).
5111 * doc/refcard.tex: look ahead -> lookahead,
5112 look-ahead -> lookahead
5113
5114 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
5115
5116 For consistency, use `lookahead' instead of `look-ahead' or
5117 `look_ahead'. Discussed starting at
5118 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
5119 and then at
5120 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
5121 * NEWS: For the next release, note the change to `--report'.
5122 * TODO, doc/bison.1: Update English.
5123 * doc/bison.texinfo: Update English.
5124 (Understanding Your Parser, Bison Options): Document as
5125 `--report=lookahead' rather than `--report=look-ahead'.
5126 * src/conflicts.c: Update English in comments.
5127 (lookahead_set): Rename from look_ahead_set.
5128 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
5129 (resolve_sr_conflict): Rename local look_ahead_tokens to
5130 lookahead_tokens, and update other uses.
5131 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
5132 count_rr_conflicts, conflicts_free): Update uses.
5133 * src/getargs.c (report_args): Move "lookahead" before alternate
5134 spellings.
5135 (report_types): Update uses.
5136 (usage): For `--report' usage description, state `lookahead' spelling
5137 rather than `look-ahead'.
5138 * src/getargs.h (report.report_lookahead_tokens): Rename from
5139 report_look_ahead_tokens.
5140 * src/lalr.c: Update English in comments.
5141 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
5142 (state_lookahead_tokens_count): Rename from
5143 state_look_ahead_tokens_count.
5144 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5145 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
5146 Rename local n_look_ahead_tokens to n_lookahead_tokens.
5147 Update other uses.
5148 Update English in output.
5149 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
5150 * src/print.c: Update English in comments.
5151 (lookahead_set): Rename from look_ahead_set.
5152 (print_reduction): Rename argument lookahead_token from
5153 look_ahead_token.
5154 (print_core, state_default_rule, print_reductions, print_results):
5155 Update uses.
5156 * src/print_graph.c: Update English in comments.
5157 (print_core): Update uses.
5158 * src/state.c: Update English in comments.
5159 (reductions_new): Update uses.
5160 (state_rule_lookahead_tokens_print): Rename from
5161 state_rule_look_ahead_tokens_print, and update other uses.
5162 * src/state.h: Update English in comments.
5163 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
5164 (state_rule_lookahead_tokens_print): Rename from
5165 state_rule_look_ahead_tokens_print.
5166 * src/tables.c: Update English in comments.
5167 (conflict_row, action_row): Update uses.
5168 * tests/glr-regression.at
5169 (Incorrect lookahead during deterministic GLR,
5170 Incorrect lookahead during nondeterministic GLR): Rename
5171 print_look_ahead to print_lookahead.
5172 * tests/torture.at: Update English in comments.
5173 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
5174 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
5175 (Many lookahead tokens): Update uses.
5176 * data/glr.c: Update English in comments.
5177 * lalr1.cc: Likewise.
5178 * yacc.c: Likewise.
5179 * src/conflicts.h: Likewise.
5180 * src/lalr.h: Likewise.
5181 * src/main.c: Likewise.
5182 * src/output.c: Likewise.
5183 * src/parse-gram.c: Likewise.
5184 * src/tables.h: Likewise.
5185 * tests/calc.at: Likewise.
5186
5187 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
5188
5189 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
5190
5191 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
5192
5193 * TODO: Add request from Nelson H. F. Beebe to be able to install
5194 Bison without installing the yacc script.
5195
5196 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5197
5198 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
5199 and yytext if they're already #define'd.
5200 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
5201 * src/scan-code-c.c: ... here.
5202 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
5203 <config.h>.
5204
5205 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
5206
5207 Get Bison to build again when configured with --enable-gcc-warnings.
5208 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
5209 missing #include's.
5210 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
5211 loc argument as it shadows a global.
5212 * src/scan-gram.l: Remove stray comma that prevents boundary_set
5213 invocation.
5214
5215 * src/.cvsignore: Add scan-code.c.
5216
5217 2006-06-07 Akim Demaille <akim@epita.fr>
5218
5219 * src/scan-gram.l: Move the "add a trailing ; to actions" code
5220 to...
5221 * src/scan-code.l: here.
5222 * tests/input.at (Torturing the Scanner): Fix another location
5223 error.
5224
5225 2006-06-07 Akim Demaille <akim@epita.fr>
5226
5227 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
5228
5229 2006-06-06 Akim Demaille <akim@epita.fr>
5230
5231 Extract the parsing of user actions from the grammar scanner.
5232 As a consequence, the relation between the grammar scanner and
5233 parser is much simpler. We can also split "composite tokens" back
5234 into simple tokens.
5235 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
5236 * src/scan-gram.l (add_column_width, adjust_location): Move to and
5237 rename as...
5238 * src/location.h, src/location.c (add_column_width)
5239 (location_compute): these.
5240 Fix the column count: the initial column is 0.
5241 (location_print): Be robust to ending column being 0.
5242 * src/location.h (boundary_set): New.
5243 * src/main.c: Adjust to scanner_free being renamed as
5244 gram_scanner_free.
5245 * src/output.c: Include scan-code.h.
5246 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
5247 Use boundary_set.
5248 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
5249 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
5250 which is now, again, a separate token.
5251 Adjust all dependencies.
5252 Whereever actions with $ and @ are used, use translate_code.
5253 (action): Remove this nonterminal which is now useless.
5254 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
5255 (grammar_current_rule_action_append): Use translate_code.
5256 (packgram): Bound check ruleno, itemno, and rule_length.
5257 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
5258 (last_string, last_braced_code_loc, max_left_semantic_context)
5259 (scanner_initialize, scanner_free, scanner_last_string_free)
5260 (gram_out, gram_lineno, YY_DECL_): Move to...
5261 * src/scan-gram.h: this new file.
5262 (YY_DECL): Rename as...
5263 (GRAM_DECL): this.
5264 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
5265 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5266 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5267 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5268 Move these declarations, and...
5269 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
5270 these to...
5271 * src/flex-scanner.h: this new file.
5272 * src/scan-gram.l (rule_length, rule_length_overflow)
5273 (increment_rule_length): Remove.
5274 (last_braced_code_loc): Rename as...
5275 (gram_last_braced_code_loc): this.
5276 Adjust to the changes of the parser.
5277 Move all the handling of $ and @ into...
5278 * src/scan-code.l: here.
5279 * src/scan-gram.l (handle_dollar, handle_at): Remove.
5280 (handle_action_dollar, handle_action_at): Move to...
5281 * src/scan-code.l: here.
5282 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
5283 scan-code.h, scan-code-c.c, scan-gram.h.
5284 (EXTRA_bison_SOURCES): Add scan-code.l.
5285 (BUILT_SOURCES): Add scan-code.c.
5286 (yacc): Be robust to white spaces.
5287
5288 * tests/conflicts.at, tests/input.at, tests/reduce.at,
5289 * tests/regression.at: Adjust the column numbers.
5290 * tests/regression.at: Adjust the error message.
5291
5292 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5293
5294 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5295 Use Akim's wording from
5296 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
5297
5298 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
5299
5300 Between Bison releases, manually append `+' to the previous Bison
5301 release number, and use that as a signal to automatically print the
5302 ChangeLog's CVS Id keyword from --version. Discussed starting at
5303 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
5304 * ChangeLog: Add Id header.
5305 * configure.ac (AC_INIT): Append `+' to `2.3'.
5306 * src/.cvsignore: Add revision.c.
5307 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
5308 (BUILT_SOURCES): Add revision.c.
5309 (revision.c): New target rule. This file defines a new global variable
5310 named revision. It initializes it with either the Id from ChangeLog
5311 or, if VERSION doesn't contain `+', with the empty string.
5312 * src/getargs.c (version): Print the value of revision.
5313 * src/revision.h: Extern revision.
5314
5315 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
5316
5317 * NEWS: Version 2.3.
5318 * configure.ac (AC_INIT): Likewise.
5319
5320 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
5321
5322 * data/glr.c (YYRECOVERING): Define to be a function-like macro
5323 with no arguments, not as an object-like macro. This is for
5324 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
5325 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
5326 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
5327 Document this.
5328
5329 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
5330
5331 * src/getargs.c (usage): Back out yesterday's modification of the
5332 --help output so that we don't have to wait for translation before
5333 releasing 2.3.
5334
5335 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
5336
5337 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
5338 Problem reported by Akim Demaille.
5339
5340 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5341
5342 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
5343
5344 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
5345
5346 * data/yacc.c (yy_reduce_print): Omit trailing white space in
5347 generated source code. Problem reported by Frans Englich in
5348 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
5349
5350 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
5351
5352 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
5353 shell, not within 'make', so that 'make' by an ordinary builder
5354 (using GNU make) does not worry about configuring gzip. This also
5355 works around a bug reported independently by Keith Thompson and by
5356 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
5357 stderr rather than stdout, messing up the build logs.
5358
5359 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5360
5361 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
5362 to make sure that YYID will never be unused. This fixes a 'make
5363 maintainer-check' failure caused by the recent changes to the 'Trivial
5364 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
5365 not used.
5366 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
5367
5368 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
5369
5370 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
5371 state before an empty RHS is always resolved here. Only the location
5372 of that state is guaranteed to be resolved, and that's enough. This
5373 fixes the remaining bug reported by Derek M. Jones in
5374 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5375 * tests/glr-regression.at (Uninitialized location when reporting
5376 ambiguity): Test the above case.
5377 Also, the embedded comments in this test case claim it checks the case
5378 of an empty RHS that has inherited the initial location. However, the
5379 corresponding LHS was already resolved, so yyresolveLocations didn't
5380 actually have reason to modify it. Fix this by forcing
5381 nondeterministic operation at the beginning of the parse.
5382
5383 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
5384
5385 * data/c.m4 (b4_yy_symbol_print_generate):
5386 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
5387 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
5388 of the bugs reported today by Derek M Jones in
5389 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
5390 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
5391 defined to be a type name without parens or brackets.
5392 (Location Type): Similarly for YYLTYPE.
5393 * tests/regression.at (Trivial grammars): Put in a test for this
5394 bug that will be caught by 'make maintainer-check' (though not,
5395 alas, by 'make check' unless your compiler is picky).
5396
5397 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
5398
5399 * NEWS: Version 2.2.
5400 * configure.ac (AC_INIT): Likewise.
5401
5402 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
5403
5404 * data/glr.c (yyreportTree): Make room in yystates for the state
5405 preceding the RHS. This fixes the segmentation fault reported by Derek
5406 M. Jones in
5407 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
5408 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
5409 to the user. Reported for yyreportTree by Derek M. Jones later in the
5410 same thread.
5411 * THANKS: Add Derek M. Jones.
5412 Update my email address.
5413 Fix typo in Steve Murphy's name.
5414
5415 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
5416
5417 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
5418 checking against YYLAST that caused the parser to miss a potential
5419 alternative in its diagnostic.
5420 Problem reported by Maria Jose Moron Fernandez in
5421 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
5422 * data/lalr1.cc (yysyntax_error_): Likewise.
5423 * data/yacc.c (yysyntax_error): Likewise.
5424 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
5425 tokens, in case we run into an older C compiler.
5426 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
5427 Use them to check for the off-by-one error fixed above.
5428
5429 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
5430 YYSIZE_T, not size_t.
5431 * tests/regression.at (Trivial grammars): New test, to catch
5432 the error fixed by the above patch.
5433
5434 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5435
5436 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
5437 scheme.
5438 Reported by Steve Murphy.
5439
5440 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5441
5442 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
5443 * data/glr.cc: b4_location_flag is now b4_locations_flag.
5444
5445 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5446
5447 Implement --trace=m4.
5448 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
5449 * src/output.c (output_skeleton): When set, pass -dV to m4.
5450
5451 Factor the handling of flags in m4.
5452 * src/output.c (prepare): Rename the muscle names debug, defines,
5453 error_verbose to debug_flag, defines_flag, error_verbose_flag.
5454 * data/c.m4: Adjust.
5455 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
5456 Use b4_define_flag_if to define other b4_FLAG_if macros.
5457 (b4_location_if): As a consequence, rename as...
5458 (b4_locations_if): this, for consistency.
5459 Adjust all the skeletons.
5460
5461 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5462
5463 * etc/bench.pm: Shorten bench names.
5464
5465 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
5466
5467 * src/output.h, src/output.c (error_verbose): Move to...
5468 * src/getargs.h, src/getargs.c: here.
5469 Sort the flags.
5470 Adjust dependencies.
5471
5472 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
5473
5474 * data/c.m4 (b4_copyright): Put the special exception for Bison
5475 skeletons here, so we don't have to put it in each skeleton. All
5476 uses changed. Suggested by Akim Demaille. Also, wrap the
5477 copyright notice, in case it is longer than 80 columns. Replace
5478 comma by newline after title.
5479
5480 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
5481
5482 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
5483 incompatibility, not a bug. Mention that it wasn't fixed as of
5484 flex 2.5.33.
5485
5486 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5487
5488 * examples/extexi: Enforce the precedence of concatenation over
5489 >>.
5490 Reported by Tommy Nordgren.
5491
5492 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
5493
5494 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
5495 with the member "token".
5496 Reported by Martin Nylin.
5497
5498 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
5499
5500 * data/glr.c: Switch to Bison 2.2 special-exception language in
5501 the copyright notice. Use more-regular format for titles and
5502 copyright notices.
5503 * data/glr.cc: Likewise.
5504 * data/location.cc: Likewise.
5505 * data/yacc.cc: Likewise.
5506 * doc/bison.texinfo (Conditions): Document this.
5507 * NEWS: likewise. Upgrade version to 2.2.
5508
5509 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
5510
5511 * data/glr.cc: Remove dead code.
5512
5513 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
5514
5515 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
5516 that variable and the line breaks the bootstrap. Problem reported
5517 by Juan M. Guerrero.
5518
5519 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5520
5521 * doc/bison.texinfo (Multiple start-symbols): New.
5522
5523 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
5524
5525 * etc/README, etc/bench.pl: New.
5526
5527 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
5528
5529 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
5530 rule.
5531 Reported by Mickael Labau.
5532 * tests/input.at (Torturing the Scanner): Test it.
5533
5534 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
5535
5536 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
5537 Problem reported by Bob Rossi.
5538
5539 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
5540
5541 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
5542 and didn't really work.
5543 For the index, use @ifnotinfo, not @iftex.
5544 Minor cleanups of spacing and terminology.
5545
5546 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5547
5548 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
5549 of AT_NAME_PREFIX when %name-prefix is not used.
5550
5551 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
5552
5553 Apply --prefix to C++ skeletons too: they change the namespace.
5554 The test suite already exercize these cases.
5555 * data/c++.m4 (b4_namespace): New.
5556 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
5557 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
5558 * data/yacc.c, data/glr.c: Remove a useless `[]'.
5559 * doc/bison.texinfo: Document it.
5560 (Option Cross Key): Use @multitable in all formats. It looks
5561 nicer, even in TeX outputs.
5562 (Rules): Use the same code whatever the output type is.
5563 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
5564 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
5565 * tests/calc.at: Use it, instead of hard coding `yy'.
5566
5567 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5568
5569 * TODO: Remove dead items.
5570
5571 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5572
5573 * doc/FAQ: Remove, merged into...
5574 * doc/bison.texinfo (FAQ): this.
5575 * doc/Makefile.am (EXTRA_DIST): Adjust.
5576
5577 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
5578
5579 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
5580 even if empty.
5581 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
5582 * doc/bison.texinfo (Calc++ Scanner): Use it.
5583
5584 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
5585
5586 Fix two nits reported by twlevo, plus one more that I discovered.
5587
5588 * src/assoc.h (assoc_to_string): Give a name to the arg, as
5589 this is the usual Bison style.
5590 * src/location.h (location_print): Likewise.
5591
5592 * src/reader.h (token_name): Likewise.
5593
5594 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
5595
5596 Fix some nits reported by twlevo.
5597 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
5598 and "POSIX". Use more-modern syntax for URLs. Mention C++
5599 and ask for Java. Don't hardwire OS version numbers. Add
5600 copyright notice.
5601 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
5602 * src/conflicts.c (solved_conflicts_obstack): Now static.
5603
5604 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
5605
5606 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
5607 page. Say "you can use it" not "you may use it" as on the web page;
5608 we're describing capabilities not granting permission.
5609
5610 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
5611
5612 * data/glr.c (yyresolveLocations): Rename local variables to avoid
5613 shadowing warnings. Use usual patter for iterating through RHS.
5614 * tests/glr-regression.at
5615 (Uninitialized location when reporting ambiguity):
5616 Modify yylex so that it uses its argument, rather than trying
5617 to rely on ARGSUSED (which doesn't work for gcc with warnings).
5618 const char -> char const.
5619
5620 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
5621 Don't use tabs inside commands; it messes up 'ps'.
5622 Problem reported by twlevo.
5623
5624 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
5625
5626 * tests/glr-regression.at (Uninitialized location when reporting
5627 ambiguity): New test case.
5628 * data/glr.c (yyresolveLocations): New function, which uses
5629 YYLLOC_DEFAULT.
5630 (yyresolveValue): Invoke yyresolveLocations before reporting an
5631 ambiguity.
5632 * doc/bison.texinfo (Default Action for Locations): Note
5633 YYLLOC_DEFAULT's usage for ambiguity locations.
5634 (GLR Semantic Actions): Cross-reference those notes.
5635
5636 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
5637
5638 * tests/glr-regression.at (Leaked semantic values when reporting
5639 ambiguity): Remove unnecessary union and type declarations.
5640 (Leaked lookahead after nondeterministic parse syntax error): New test
5641 case.
5642 * data/glr.c (yyparse): Check for zero stacks remaining before
5643 attempting to shift the lookahead so that you don't lose it.
5644
5645 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5646
5647 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
5648 * tests/glr-regression.at (Leaked semantic values when reporting
5649 ambiguity): New test case.
5650 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
5651 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
5652 now unnecessary yystackp parameter.
5653 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
5654 destructors can be called.
5655
5656 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
5657 in existing testcases.
5658
5659 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5660
5661 Don't leak semantic values for parent RHS when a user action cuts the
5662 parser, and clean up related code a bit.
5663 * tests/glr-regression.at (Leaked merged semantic value if user action
5664 cuts parse): Rename to...
5665 (Leaked semantic values if user action cuts parse): ... this. Add check
5666 for leaked parent RHS values.
5667 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
5668 between an unresolved state (non-empty chain of semantic options) and
5669 an incomplete one (signaled by an empty chain).
5670 (yyresolveStates): Document the interface. Move all manipulation of a
5671 successfully or unsuccessfully resolved yyGLRState to...
5672 (yyresolveValue): ... here so that yyresolveValue always leaves a
5673 yyGLRState with consistent data and thus is easier to understand.
5674 Remove the yyvalp and yylocp parameters since they are always just
5675 taken from the yys parameter. When reporting a discarded merged value
5676 in debugging output, note that it is incompletely merged. Document the
5677 interface.
5678 (yyresolveAction): If resolving any of the RHS states fails, destroy
5679 them all rather than leaking them. Thus, as long as user actions are
5680 written to clean up the RHS correctly, yyresolveAction always cleans up
5681 the RHS of a semantic option. Document the interface.
5682
5683 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
5684
5685 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
5686 led to a segmentation fault in GNU Pascal. Problem reported
5687 by Waldek Hebisch.
5688
5689 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
5690
5691 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
5692 mid-rule action inside a nonterminal symbol in order to declare a
5693 destructor for its semantic value.
5694
5695 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
5696
5697 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
5698 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
5699 __cplusplus && ! defined _STDLIB_H && !
5700 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
5701 defined free))]: Include <stdlib.h> rather than rolling our own
5702 declarations of malloc and free, to avoid problems with
5703 incompatible declarations (using 'throw') C++'s stdlib.h. This
5704 should fix Debian bug 340012
5705 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
5706 reported by Guillaume Melquiond.
5707
5708 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5709
5710 * NEWS: Clarify symbols versus types in unused-value warnings.
5711
5712 * configure.ac (AC_INIT): Bump version number.
5713
5714 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
5715
5716 * NEWS: Version 2.1a.
5717 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
5718 since C99 requires this.
5719
5720 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
5721
5722 * m4/c-working.m4: New file.
5723 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
5724
5725 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
5726
5727 * Makefile.maint: Merge from coreutils.
5728
5729 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
5730
5731 More portability fixes for problems summarized by Nelson H. F. Beebe.
5732
5733 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
5734 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
5735 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
5736 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
5737 messes up because C++ code is compiled in 32-bit mode but linked
5738 in 64-bit mode.
5739
5740 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
5741
5742 More portability fixes for problems summarized by Nelson H. F. Beebe.
5743
5744 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
5745 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
5746
5747 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
5748 nodist_PROGRAMS, since we don't need to actually compile the
5749 example if we're just doing a plain 'make'. This avoids bothering
5750 the installer unnecessarily about problems due to weird C++
5751 compilers.
5752
5753 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
5754
5755 More portability fixes for problems summarized by Nelson H. F. Beebe.
5756
5757 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
5758 than #include "...", and compile with -I'.'. The old method was
5759 not portable, according to Posix and the C standard, and it does
5760 not work with Sun C 5.7, where previous #line directives affect
5761 the working directory used in later #include "..." directives.
5762
5763 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5764
5765 Various DJGGP specific issues in /djgpp
5766
5767 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
5768
5769 More portability fixes for problems summarized by Nelson H. F. Beebe.
5770
5771 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
5772 '#include <map>' works and that you can apply ++ to iterators.
5773
5774 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
5775
5776 Work around portability problems summarized by Nelson H. F. Beebe in
5777 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
5778
5779 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5780 that '#include <string>' works.
5781
5782 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5783 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5784 "warning: sorry: semantics of inline function static data `const
5785 unsigned char translate_table[262]' are wrong (you'll wind up with
5786 multiple copies)".
5787
5788 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5789 or, xor to not_, and_, or_, and xor_, respectively. This works
5790 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5791 random system header somewhere that includes the equivalent of
5792 <iso646.h>.
5793
5794 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5795 -E" works; it apparently doesn't work with PathScale EKO Compiler
5796 Suite Version 2.0.
5797
5798 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5799
5800 During deterministic GLR operation, user actions should be able to
5801 influence the parse by changing yychar. To make this easier to fix and
5802 to make glr.c easier to evolve in general, don't maintain yytoken in
5803 parallel with yychar; just compute yytoken when needed.
5804 * tests/glr-regression.at (Incorrect lookahead during deterministic
5805 GLR): Check that setting yychar in a user action has the intended
5806 effect.
5807 * data/glr.c (yyGLRStack): Remove yytokenp member.
5808 (yyclearin): Don't set *yytokenp.
5809 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5810 yychar rather than *yytokenp to determine the current lookahead.
5811 Compute yytoken locally when needed.
5812 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5813 point to.
5814
5815 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5816 after `--report' documentation.
5817
5818 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5819
5820 * src/parse-gram.y (grammar_declaration): Location of printer
5821 symbol is @1, not list->location. Bug reported by twlevo.
5822 * tests/input.at (Incompatible Aliases): Adjust to above change.
5823
5824 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5825
5826 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5827 all the test at once. This makes the output easier to read in the
5828 normal case.
5829
5830 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5831 got from <http://bro-ids.org/download.html>. The bug is that
5832 when two actions appeared in succession, the second one was
5833 scanned before the first one was added to the grammar rule
5834 as a midrule action. Bison then output the incorrect warning
5835 "parse.y:905.17-906.36: warning: unused value: $3".
5836 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5837 associated with a value.
5838 (rhs): Don't invoke grammar_current_rule_action_append.
5839 (action): Invoke it here instead.
5840 * src/reader.c (grammar_midrule_action): Now extern.
5841 (grammar_current_rule_action_append): Don't invoke
5842 grammar_midrule_action; that is now the scanner's job.
5843 * src/reader.h (last_string, last_braced_code_loc):
5844 (grammar_midrule_action): New decls.
5845 * src/scan-gram.l (last_string): Now extern, sigh.
5846 (last_braced_code_loc): New extern variable.
5847 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5848 rule already has an action.
5849 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5850 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5851 Add some tests to check that the above changes fixed the bug.
5852
5853 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5854
5855 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5856 All used changed. Check whether the symbol has a destructor,
5857 not whether it is typed.
5858 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5859 that the values are still reported as unused. All line numbers
5860 adjusted.
5861
5862 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5863
5864 Work around a bug in bro 0.8, which underparenthesizes its
5865 definition of YYLLOC_DEFAULT.
5866 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5867 their arguments.
5868 * data/lalr1.cc: Likewise.
5869 * data/yacc.cc: Likewise.
5870
5871 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5872
5873 Work around a bug in Pike 7.0, and give the Pike folks a
5874 better way to override the usual int widths.
5875 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5876 user can override the types.
5877 (short): #undef, to work around a bug in Pike 7.0.
5878 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5879 (union yyalloc.yyss): Use yytype_int16 rather than short.
5880 All uses changed.
5881 (yysigned_char): Remove.
5882 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5883 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5884 * tests/regression.at (Web2c Actions): Adjust to above changes.
5885
5886 * src/reader.c (check_and_convert_grammar): New function.
5887 (reader): Close the input file even if something went wrong during
5888 parsing. Minor file descriptor leak reported by twlevo.
5889
5890 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5891 to pacify gcc -Wswitch-default.
5892 * src/scan-gram.l (adjust_location): Use a default: break; case
5893 to pacify gcc -Wswitch-default.
5894 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5895 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5896 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5897 Move these decls to scan-skel.l, since they don't need to be
5898 visible elsewhere.
5899 * src/scan-skel.l: Accept the above decls.
5900 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5901 is used.
5902
5903 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5904
5905 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5906 since we don't want to insist on a version number at the start
5907 of the changelog every time.
5908 * Makefile.maint: Sync from coreutils a bit better.
5909 (sc_trailing_blank): Renamed from sc_trailing_space.
5910 All uses changed.
5911 (sc_no_if_have_config_h, sc_require_config_h):
5912 (sc_prohibit_assert_without_use): New rules.
5913 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5914 (sc_dd_max_sym_length): Fix leading spaces in rule.
5915 (sc_system_h_headers): Prefix with @.
5916 (sc_useless_cpp_parens, m4-check): Output line numbers.
5917 (changelog-check): Allow version only in head.
5918 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5919 satisfy new Makefile.maint rule.
5920 * data/glr.c: Likewise.
5921 * data/glr.cc: Likewise.
5922 * data/lalr1.cc: Likewise.
5923 * data/yacc.c: Likewise.
5924 * lib/ebitsetv.c: Likewise.
5925 * lib/lbitset.c: Likewise.
5926 * lib/subpipe.c: Likewise.
5927 * lib/timevar.c: Likewise.
5928 * src/system.h: Likewise.
5929 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5930 * djgpp/Makefile.maint: Add copyright notice.
5931 * djgpp/README.in: Likewise.
5932 * djgpp/config.bat: Likewise.
5933 * djgpp/config.site: Likewise.
5934 * djgpp/config_h.sed: Likewise.
5935 * djgpp/djunpack.bat: Likewise.
5936 * djgpp/config.sed: Fix copyright notice to match standard format.
5937 * djgpp/subpipe.h: Likewise.
5938 * lib/bitsetv-print.c: Likewise.
5939 * lib/bitsetv.c: Likewise.
5940 * lib/subpipe.h: Likewise.
5941 * lib/timevar.c: Likewise.
5942 * lib/timevar.h: Likewise.
5943 * djgpp/subpipe.c: Use standard recipe for config.h.
5944 * lib/abitset.c: Likewise.
5945 * lib/bitset.c: Likewise.
5946 * lib/bitset_stats.c: Likewise.
5947 * lib/bitsetv-print.c: Likewise.
5948 * lib/bitsetv.c: Likewise.
5949 * lib/ebitsetv.c: Likewise.
5950 * lib/get-errno.c: Likewise.
5951 * lib/lbitset.c: Likewise.
5952 * lib/subpipe.c: Likewise.
5953 * lib/timevar.c: Likewise.
5954 * lib/vbitset.c: Likewise.
5955 * tests/local.at: Likewise.
5956 * src/scan-gram.l: Don't include verify.h, since system.h does
5957 that for us.
5958 * .x-sc_require_config_h: New file.
5959 * .x-sc_unmarked_diagnostics: New file.
5960
5961 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5962
5963 Be a bit more systematic about using 'abort'.
5964 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5965 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5966 Put 'default: abort ();' before some other case, to satisfy older
5967 pedantic compilers.
5968 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5969 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5970 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5971 * src/conflicts.c (resolve_sr_conflict): Likewise.
5972 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5973 (get_decision_str, get_orientation_str, get_node_alignment_str):
5974 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5975 (get_linestyle_str, get_arrowstyle_str): Likewise.
5976 * src/conflicts.c (resolve_sr_conflict):
5977 Use a default case rather than one for the one remaining enum
5978 value, to catch invalid enum values as well.
5979 * src/lalr.c (set_goto_map, map_goto):
5980 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5981 * src/nullable.c (nullable_compute, token_definitions_output):
5982 Likewise.
5983 * src/reader.c (packgram, reader): Likewise.
5984 * src/state.c (transitions_to, state_new, state_reduction_find):
5985 Likewise.
5986 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5987 (symbol_pack): Likewise.
5988 * src/tables.c (conflict_row, pack_vector): Likewise.
5989 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5990 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5991 * src/system.h: Don't include <assert.h>.
5992 (assert): New macro.
5993
5994 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5995 (Destructor Decl, Parser Function, Pure Calling):
5996 Describe rules for braces inside C code more carefully.
5997
5998 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5999
6000 Fix some porting glitches found by Nelson H. F. Beebe.
6001 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
6002 compilers that don't understand that abort () does not return.
6003 * src/state.c (transitions_to): Likewise.
6004 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
6005 that '#include <cstdlib>' works.
6006 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
6007 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
6008 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
6009 for the benefit of some pre-C99 compilers.
6010
6011 * bootstrap: Undo changes to gnulib files that autoreconf made.
6012
6013 Minor fixups to get 'make maintainer-check' to work.
6014 * configure.ac: Don't use -Wnested-externs, as it's incompatible
6015 with the new verify.h implementation.
6016 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
6017 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
6018 * data/yacc.c (YYUSE): Likewise.
6019 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
6020 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
6021 * src/parse-gram.y (declaration): Don't pass a string constant
6022 to a function that expects char *, since GCC might complain
6023 about the constant value.
6024 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
6025 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
6026 before #defining them.
6027 * tests/glr-regression.at
6028 (Incorrectly initialized location for empty right-hand side in GLR):
6029 In yyerror, use the msg arg.
6030 (Corrupted semantic options if user action cuts parse):
6031 (Incorrect lookahead during deterministic GLR):
6032 (Incorrect lookahead during nondeterministic GLR):
6033 Don't name a local var 'index'; it shadows string.h's 'index'.
6034
6035 2006-01-19 Akim Demaille <akim@epita.fr>
6036
6037 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
6038 location, not just parts of it.
6039
6040 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
6041
6042 * NEWS: Document the fact that multiple %unions are now allowed.
6043 * doc/bison.texinfo (Union Decl): Likewise.
6044 * TODO: This feature is now implemented, so remove it from
6045 the wishlist.
6046
6047 * Makefile.maint: Merge with coreutils Makefile.maint.
6048 (CVS_LIST): Use build-aux version if available.
6049 (VERSION_REGEXP): New macro.
6050 (syntax-check-rules): Add sc_no_if_have_config_h,
6051 sc_prohibit_assert_without_use, sc_require_config_h,
6052 sc_useless_cpp_parens.
6053 (sc_obsolete_symbols): Check for O_NDELAY.
6054 (sc_dd_max_sym_length): Track coreutils.
6055 (sc_unmarked_diagnostics): Look in all files, not just *.c.
6056 (sc_useless_cpp_parens): New rule.
6057 (news-date-check): Look for version or today's date.
6058 (changelog-check): Don't require version number near head.
6059 (copyright-check): Use current year instead of hardwiring 2005.
6060 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
6061 (announcement): Add --gpg-key-ID.
6062
6063 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
6064 with "file system".
6065
6066 Avoid undefined behavior that addressed just before the start of an
6067 array. Problem reported by twlevo.
6068 * src/reader.c (packgram): Prepend a new sentinel before ritem.
6069 * src/lalr.c (build_relations): Rely on new sentinel.
6070 * src/gram.c (gram_free): Adjust to new sentinel.
6071
6072 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
6073
6074 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
6075 yylookaheadNeeds. All uses updated.
6076 (yysplitStack): Rename local yynewLookaheadStatuses to
6077 yynewLookaheadNeeds.
6078 * data/glr-regression.at (Incorrect lookahead during nondeterministic
6079 GLR): In comments, change `lookahead status' to `lookahead need'.
6080
6081 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6082
6083 * data/glr.c (yysplitStack): A little stylistic rewrite.
6084
6085 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6086
6087 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
6088
6089 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
6090
6091 * doc/bison.texinfo: Fix some typos.
6092 (GLR Semantic Actions): New subsection discussing special
6093 considerations because GLR semantic actions might be deferred.
6094 (Actions): Mention look-ahead usage of yylval.
6095 (Actions and Locations): Mention look-ahead usage of yylloc.
6096 (Special Features for Use in Actions): Add YYEOF entry and mention it
6097 in the yychar entry.
6098 In the yychar entry, remove mention of the local yychar case (pure
6099 parser) since this is irrelevant information when writing semantic
6100 actions and since it's already discussed in `Table of Symbols' where
6101 yychar is otherwise described as an external variable.
6102 In the yychar entry, don't call it the `current' look-ahead since it
6103 isn't when semantic actions are deferred.
6104 In the yychar and yyclearin entries, add note about deferred semantic
6105 actions.
6106 Add yylloc and yylval entries discussing look-ahead usage.
6107 (Look-Ahead Tokens): When discussing yychar, don't call it the
6108 `current' look-ahead, and do mention yylval and yylloc.
6109 (Error Recovery): Cross-reference `Action Features' when mentioning
6110 yyclearin.
6111 (Table of Symbols): In the yychar entry, don't call it the `current'
6112 look-ahead.
6113 In the yylloc and yylval entries, mention look-ahead usage.
6114
6115 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6116
6117 * tests/glr-regression.at: Update copyright year to 2006.
6118
6119 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6120
6121 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
6122 use during nondeterministic operation to track which stacks have
6123 actually needed the current lookahead.
6124 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
6125 Allocate, deallocate, resize, and otherwise shuffle space for
6126 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
6127 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
6128 appropriately during nondeterministic operation.
6129 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
6130 members to store the current lookahead to be used by the deferred
6131 user action.
6132 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
6133 from which the RHS is taken. Set the lookahead members of the new
6134 yySemanticOption according to the lookahead status for stack yyk.
6135 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
6136 yyaddDeferredAction.
6137 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
6138 members of yySemanticOption before invoking yyuserAction, and then set
6139 them back to their current values afterward.
6140 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
6141 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
6142 * tests/glr-regression.at: Remove `.' from the ends of recent test case
6143 titles for consistency.
6144 (Leaked merged semantic value if user action cuts parse): In order to
6145 suppress lint warnings, use arguments in merge function, and assign
6146 char value < 128 in main.
6147 (Incorrect lookahead during deterministic GLR): New test case.
6148 (Incorrect lookahead during nondeterministic GLR): New test case.
6149
6150 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6151
6152 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
6153 !yyvaluep as signal that no semantic value is available to print.
6154 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
6155 to print a semantic value.
6156
6157 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6158
6159 * tests/glr-regression.at: For consistency with my newer test cases,
6160 don't thank myself.
6161
6162 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6163
6164 * data/glr.c (yyresolveValue): When merging semantic options, if at
6165 least one user action succeeds but a later one cuts the parse, then
6166 destroy the semantic value before returning rather than leaking it.
6167 (yyresolveStates): If a user action cuts the parse and thus
6168 yyresolveValue fails, ignore the (unset) semantic value rather than
6169 corrupting the yyGLRState, and empty the semantic options list since
6170 the user actions should have called all necessary destructors.
6171 Simplify code with YYCHK.
6172 * tests/glr-regression.at (Corrupted semantic options if user action
6173 cuts parse): New test case.
6174 (Undesirable destructors if user action cuts parse): New test case.
6175 Before applying any of this patch, this test case never actually failed
6176 for me... but only because the corrupted semantic options usually
6177 masked this bug.
6178 (Leaked merged semantic value if user action cuts parse): New test
6179 case.
6180
6181 2006-01-05 Akim Demaille <akim@epita.fr>
6182
6183 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
6184
6185 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
6186
6187 * data/c.m4 (b4_c_modern): New macro, with a new provision for
6188 _MSC_VER. Problem reported by Cenzato Marco.
6189 (b4_c_function_def): Use it.
6190 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
6191 b4_c_modern.
6192 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
6193 than rolling our own.
6194
6195 2006-01-04 Akim Demaille <akim@epita.fr>
6196
6197 Also warn about non-used mid-rule values.
6198 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
6199 member.
6200 (symbol_list_new): Adjust.
6201 * src/reader.c (symbol_typed_p): New.
6202 (grammar_rule_check): Use it.
6203 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
6204 Check its rule.
6205 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
6206 Use it.
6207 * tests/actions.at (Exotic Dollars): Adjust.
6208
6209 2006-01-04 Akim Demaille <akim@epita.fr>
6210
6211 * src/reader.c (grammar_midrule_action): If $$ is set in a
6212 mid-rule, move the `used' bit to its lhs.
6213 * tests/input.at (Unused values): New.
6214 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
6215
6216 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
6217
6218 * doc/bison.texinfo (Bison Options): Say more accurately what
6219 --yacc does.
6220 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
6221 about declarations in the grammar when in Yacc mode, as POSIX does
6222 not require a diagnostic when the grammar uses extensions.
6223
6224 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
6225
6226 Warn about dubious constructions like "%token T T".
6227 Reported by twlevo.
6228 * src/symtab.h (struct symbol.declared): New member.
6229 * src/symtab.c (symbol_new): Initialize it to false.
6230 (symbol_class_set): New arg DECLARING, specifying whether
6231 this is a declaration that we want to warn about, if there
6232 is more than one of them. All uses changed.
6233
6234 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
6235 Allow multiple %union directives, whose contents concatenate.
6236 * src/parse-gram.y (grammar_declaration): Likewise.
6237 Use muscle_code_grow, so that we don't need stype_line any more.
6238 All uses changed.
6239
6240 * src/muscle_tab.c (muscle_grow): Fix comment.
6241
6242 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
6243 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
6244 Update copyright year to 2006.
6245
6246 2006-01-03 Akim Demaille <akim@epita.fr>
6247
6248 Have glr.cc pass (some of) the calc.at tests.
6249 * data/glr.cc (b4_parse_param_orig): New.
6250 (b4_parse_param): Improve its definition, and bound it more
6251 clearly in the skeleton.
6252 (b4_epilogue): Append, instead of prepending, in order to keep
6253 #line consistency.
6254 Simplify the generation of auxiliary functions: locations and
6255 purity are mandated.
6256 (b4_global_tokens_and_yystype): Honor it.
6257 * data/location.cc (c++.m4): Don't include it.
6258 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
6259 and AT_SKEL_CC_IF.
6260 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
6261 AT_LALR1_CC_IF.
6262 Be sure to initialize the first position's filename.
6263 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
6264 mandated anyway.
6265 (AT_CHECK_CALC_GLR_CC): New.
6266 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
6267
6268 2006-01-02 Akim Demaille <akim@epita.fr>
6269
6270 * src/output.c (output_skeleton): Don't hard wire the inclusion of
6271 c.m4.
6272 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
6273 * data/glr.cc: Do not include stack.hh.
6274
6275 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6276
6277 * data/glr.c: Reformat whitespace with tabs.
6278 (b4_lpure_formals): Remove this unused m4 macro.
6279 * tests/cxx-type.at: Reformat whitespace with tabs.
6280 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
6281 since it's a member. Rename type to isNterm for clarity.
6282
6283 2005-12-29 Akim <akim@sulaco.local>
6284
6285 Let glr.cc catch up with symbol_value_print.
6286 * data/glr.cc (b4_yysymprint_generate): Replace by...
6287 (b4_yy_symbol_print_generate): this.
6288 (yy_symbol_print, yy_symbol_value_print): Declare them.
6289
6290 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
6291
6292 * src/location.h (boundary): Note that a line or column equal
6293 to INT_MAX indicates an overflow.
6294 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
6295 (rule_length_overflow, increment_rule_length, add_column_width):
6296 New functions.
6297 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
6298 (<SC_BRACED_CODE>"}"):
6299 Use increment_rule_length rather than incrementing it by hand.
6300 (adjust_location, handle_syncline): Diagnose overflow.
6301 (handle_action_dollar, handle_action_at):
6302 Fix bug with monstrosities like $-2147483648.
6303 Remove now-unnecessary checks.
6304 (scan_integer): Verify assumptions and remove now-unnecessary checks.
6305 (convert_ucn_to_byte): Verify assumptions.
6306 (handle_syncline): New arg LOC. All callers changed.
6307 Don't store through a value derived from char const * pointer.
6308
6309 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
6310 GCC warnings.
6311
6312 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
6313
6314 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
6315 Remove unnecessary forward static decls.
6316
6317 2005-12-27 Akim Demaille <akim@epita.fr>
6318
6319 * src/reader.c (grammar_current_rule_check): Also check that $$
6320 is used.
6321 Take the rule to check as argument, hence rename as...
6322 (grammar_rule_check): this.
6323 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
6324 Rename as...
6325 (grammar_rule_begin, grammar_rule_end): these, for consistency.
6326 (grammar_midrule_action, grammar_symbol_append): Now static.
6327 * tests/torture.at (input): Don't rely on the default action
6328 being always performed.
6329 * tests/calc.at: "Set" $$ even when the action is "cut" with
6330 YYERROR or other.
6331 * tests/actions.at (Exotic Dollars): Instead of using unused
6332 values, check that the warning is issued.
6333
6334 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
6335
6336 * NEWS: Improve wording for unused-value warnings.
6337
6338 2005-12-22 Akim Demaille <akim@epita.fr>
6339
6340 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
6341 (b4_yysymprint_generate): Rename as...
6342 (b4_yy_symbol_print_generate): this.
6343 Generate yy_symbol_print instead of yysymprint.
6344 Generate also yy_symbol_value_print, and use it.
6345
6346 2005-12-22 Akim Demaille <akim@epita.fr>
6347
6348 * NEWS: Warn about unused values.
6349 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
6350 a `used' member.
6351 (symbol_list_n_get, symbol_list_n_used_set): New.
6352 (symbol_list_n_type_name_get): Use symbol_list_n_get.
6353 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
6354 * src/reader.c (grammar_current_rule_check): Check that values are
6355 used.
6356 * src/symtab.c (symbol_print): Accept 0.
6357 * tests/existing.at: Remove the type information.
6358 Empty the actions.
6359 Remove useless actions (beware of mid-rule actions: perl -000
6360 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
6361 * tests/actions.at (Exotic Dollars): Use unused values.
6362 * tests/calc.at: Likewise.
6363 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6364 Likewise.
6365
6366 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
6367 rule_useful_p.
6368
6369 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
6370
6371 Undo 2005-12-01 tentative license wording change. The wording is
6372 still being reviewed by the lawyers, and we don't want to wait for
6373 them before publishing a test release. For now, revert to the
6374 previous wording.
6375 * NEWS: Undo 2005-12-01 change.
6376 * data/glr.c: Revert to previous license wording.
6377 * data/glr.cc: Likewise.
6378 * data/lalr1.cc: Likewise.
6379 * data/location.cc: Likewise.
6380 * data/yacc.c: Likewise.
6381
6382 * NEWS: Reword %destructor vs YYABORT etc.
6383 * data/glr.c: Use American spacing, for consistency.
6384 * data/glr.cc: Likewise.
6385 * data/lalr1.cc: Likewise.
6386 * data/yacc.c: Likewise.
6387 * data/yacc.c: Reformat comments slightly.
6388 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
6389 for consistency. Fix some spelling errors and reword recently-included
6390 text slightly.
6391 * tests/cxx-type.at: Cast results of malloc, for C++.
6392
6393 2005-12-21 Joel E. Denny <address@hidden>
6394
6395 * tests/cxx-type.at: Construct a tree, count the parents of shared
6396 nodes, and free each node once and only once. Previously, the memory
6397 for semantic values was leaked instead.
6398
6399 2005-12-21 Joel E. Denny <address@hidden>
6400
6401 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
6402 (yylval, yylloc): If pure, #define to yystackp->yyval and
6403 yystackp->yyloc similar to yychar and yynerrs.
6404 (yyparse): If pure, remove local yylval and yylloc. Add local
6405 yystackp to accommodate pure definitions of yylval and yylloc.
6406 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
6407 yylvalp and yyllocp to &yylval and &yylloc.
6408 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
6409 namespace. Previously, nerrs and char were missing, but lval and lloc
6410 weren't necessary.
6411 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
6412 yylvalp and yyllocp parameters since, if pure, these are now always
6413 accessible through yystackp. If not pure, they are still accessible
6414 globally.
6415 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
6416 `if (YYID (N))' to pacify lint.
6417
6418 2005-12-21 Akim Demaille <akim@epita.fr>
6419
6420 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
6421 destroy the RHS symbols of a rule.
6422 * data/yacc.c (yylen): Initialize to 0.
6423 Keep its value to the number of items to possibly shift.
6424 In particular, a regular successful parse that ends on YYFINAL by
6425 a (internal) YYACCEPT must not have yylen != 0.
6426 (yyerrorlab, yyreturn): Pop the RHS.
6427 Reorder a bit to emphasize the `shifting' bits of code.
6428 (YYPOPSTACK): Now accept a number of items to pop.
6429 * data/lalr1.cc: Likewise.
6430 * data/glr.c: Formatting changes.
6431 Use goto instead of fall through.
6432 * doc/bison.texinfo (Destructor Decl): Complete.
6433
6434 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6435
6436 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6437 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
6438 * djgpp/config.bat: Replace every occurence of the file name
6439 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6440 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6441 * djgpp/config.sed: Replace every occurence of the file name
6442 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
6443 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
6444 * djgpp/djunpack.bat: DJGPP specific file.
6445 * djgpp/fnchange.lst: DJGPP specific file.
6446 * djgpp/README.in: Add new information about how to unpack the bison
6447 source on MSDOS and other systems which have 8.3 file name restrictions
6448 using djunpack.bat and fnchange.lst.
6449
6450 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
6451
6452 * bootstrap (build_cvs_prefix): Remove; unused.
6453 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
6454 when getting gnulib.
6455
6456 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
6457
6458 * data/glr.c: Reorder typedef declarations for structs to match order
6459 of struct declarations.
6460 Rename yystack everywhere to yystackp except in yyparse where it's not
6461 a pointer.
6462 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
6463 consistency.
6464 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
6465 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
6466 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
6467 lint.
6468
6469 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
6470
6471 * tests/sets.at (Accept): Fix typos in regular expression used to
6472 sed out the final state number.
6473
6474 Work around portability problem on Solaris 10: flex-generated
6475 files include <stdio.h> before <config.h>, which messes up
6476 because the latter defines __EXTENSIONS__. Address the problem
6477 by creating two new little files that include <config.h> first,
6478 then include the flex-generated files. Rewrite everyone else
6479 to include <config.h> first, as well.
6480 * lib/timevar.c: Always include "config.h".
6481 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
6482 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
6483 (EXTRA_bison_SOURCES): New macro.
6484 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
6485 * src/system.h: Don't include config.h.
6486 * src/LR0.c: Include <config.h> first.
6487 * src/assoc.c: Likewise.
6488 * src/closure.c: Likewise.
6489 * src/complain.c: Likewise.
6490 * src/conflicts.c: Likewise.
6491 * src/derives.c: Likewise.
6492 * src/files.c: Likewise.
6493 * src/getargs.c: Likewise.
6494 * src/gram.c: Likewise.
6495 * src/lalr.c: Likewise.
6496 * src/location.c: Likewise.
6497 * src/main.c: Likewise.
6498 * src/muscle_tab.c: Likewise.
6499 * src/nullable.c: Likewise.
6500 * src/output.c: Likewise.
6501 * src/parse-gram.y: Likewise.
6502 * src/print.c: Likewise.
6503 * src/print_graph.c: Likewise.
6504 * src/reader.c: Likewise.
6505 * src/reduce.c: Likewise.
6506 * src/relation.c: Likewise.
6507 * src/state.c: Likewise.
6508 * src/symlist.c: Likewise.
6509 * src/symtab.c: Likewise.
6510 * src/tables.c: Likewise.
6511 * src/uniqstr.c: Likewise.
6512 * src/vcg.c: Likewise.
6513
6514 * src/parse-gram.y: Fix minor problems uncovered by lint.
6515 (current_lhs, current_lhs_location): Now static.
6516 (current_assoc): Remove unused variable.
6517
6518 Cleanups so that Bison-generated parsers have less lint.
6519 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
6520 Prepend /*ARGSUSED*/, for lint's sake.
6521 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
6522 definition if 'lint' is defined.
6523 (YYID): New macro (or function, if lint).
6524 All uses of /*CONSTCOND*/0 replaced by YYID(0).
6525 * data/yacc.c: Likewise.
6526 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
6527 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
6528 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
6529 is C++ only.
6530 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
6531 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
6532 Use YYID(0) rather than 0, for lint.
6533 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
6534 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
6535
6536 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
6537
6538 * tests/glr-regression.at
6539 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6540 Close memory leak reported by twlevo.
6541
6542 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
6543
6544 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
6545 all stacks.
6546 (yyparse): Iterate another stack in order to call user destructors.
6547 * tests/glr-regression.at (No users destructors if stack 0 deleted):
6548 New test case.
6549 (Duplicated user destructor for lookahead): This test now is expected
6550 to succeed.
6551
6552 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
6553
6554 * NEWS: Document the following change.
6555 * data/yacc.c: Say "parser skeleton" rather than "file", since
6556 it's no longer just a file.
6557 * data/glr.c: Grant a special exception for C GLR parsers, that
6558 reads like the already-existing exception for C LALR(1) parsers.
6559 * data/glr.cc: Likewise.
6560 * data/lalr1.cc: Likewise.
6561 * data/location.cc: Likewise.
6562 * data/yacc.c: Reword the "written by" statement to clarify that
6563 it was the parser skeleton, not the entire output file.
6564 * data/glr.c: Written by Paul Hilfinger.
6565 * data/glr.cc: Written by Akim Demaille.
6566 * data/lalr1.cc: Likewise.
6567
6568 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
6569
6570 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
6571 Fix typos in previous change that broke 'make check'.
6572 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
6573 supported in C.
6574 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
6575 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
6576 We can revert this once things settle down.
6577
6578 * src/conflicts.c (conflicts_print): Don't print file name twice
6579 when %expect fails because there were no conflicts.
6580 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
6581 change.
6582 * tests/conflicts.at (%expect not enough, %expect too much):
6583 (%expect with reduce conflicts): Adjust to new behavior.
6584
6585 2005-11-18 Akim Demaille <akim@epita.fr>
6586
6587 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
6588 errors.
6589 * NEWS: Document this.
6590 * doc/bison.texinfo (Expect Decl): Likewise.
6591
6592 2005-11-16 Akim Demaille <akim@epita.fr>
6593
6594 Generalize the display of semantic values and locations in traces.
6595 * data/glr.c (yy_reduce_print): Fix indices (again).
6596 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6597 literal integers.
6598 * data/lalr1.cc (yyreduce_print): Rename as...
6599 (yy_reduce_print): this.
6600 Display values and locations.
6601 * data/yacc.c (yy_reduce_print): Likewise.
6602 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
6603 (yysymprint): Move higher to be visible from yy_reduce_print).
6604 (yyparse): Adjust.
6605 * tests/calc.at: Adjust the expected length of the traces.
6606
6607 2005-11-14 Akim Demaille <akim@epita.fr>
6608
6609 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
6610 from 1 to N, while values and location start at 0.
6611 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
6612
6613 2005-11-14 Akim Demaille <akim@epita.fr>
6614
6615 * data/glr.c (yy_reduce_print): Fix the $ number.
6616
6617 2005-11-14 Akim Demaille <akim@epita.fr>
6618
6619 "Use" parse parameters.
6620 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
6621 * data/glr.c, data/glr.cc: Use them.
6622 * data/glr.c (YYUSE): Have a C++ definition that supports
6623 non-pointer types.
6624
6625 2005-11-14 Akim Demaille <akim@epita.fr>
6626
6627 * data/glr.c (yyexpandGLRStack): Declare only if defined.
6628
6629 2005-11-14 Akim Demaille <akim@epita.fr>
6630
6631 * data/glr.cc: New.
6632 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
6633
6634 2005-11-12 Akim Demaille <akim@epita.fr>
6635
6636 Let position and location be PODs.
6637 * data/location.cc (position::initialize, location::initialize): New.
6638 (position::position, location::location): Define only if
6639 b4_location_constructors is defined.
6640 * data/lalr1.cc (b4_location_constructors): Define it for backward
6641 compatibility.
6642 * doc/bison.texinfo (Initial Action Decl): Use initialize.
6643
6644 2005-11-12 Akim Demaille <akim@epita.fr>
6645
6646 * data/lalr1.cc: Move the body of the ctor and dtor into the
6647 parser file (instead of the header).
6648 Wrap the implementations in a "namespace yy".
6649
6650 2005-11-12 Akim Demaille <akim@epita.fr>
6651
6652 Have glr.c include its header file when created.
6653 * data/glr.c (b4_shared_declarations): New.
6654 Output them verbatim in the parser if !%defines, otherwise
6655 output then in the header file, and include it instead.
6656
6657 2005-11-11 Akim Demaille <akim@epita.fr>
6658
6659 * data/glr.c: Comment changes.
6660
6661 2005-11-11 Akim Demaille <akim@epita.fr>
6662
6663 When yydebug, report semantic and location values for reductions.
6664 * data/glr.c (yy_reduce_print): Report the semantic values and the
6665 locations.
6666 (YY_REDUCE_PRINT): Adjust.
6667 (yyglrReduce): Use them.
6668 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
6669 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
6670 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
6671 traces.
6672
6673 2005-11-10 Akim Demaille <akim@epita.fr>
6674
6675 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
6676 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
6677 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
6678
6679 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
6680
6681 * m4/cxx.m4, examples/Makefile.am: Don't build
6682 examples/calc++ if no C++ compiler is available. (trivial change)
6683
6684 2005-11-09 Akim Demaille <akim@epita.fr>
6685
6686 * src/scan-skel.l: Use a couple of asserts.
6687
6688 2005-11-03 Akim Demaille <akim@epita.fr>
6689
6690 In some (weird) cases, the final state number is incorrect.
6691 Reported by Alexandre Duret-Lutz.
6692 * src/LR0.c (state_list_append): Remove the computation of
6693 final_state.
6694 (save_reductions): Do it here.
6695 (get_state): Alpha conversion.
6696 (generate_states): Use a for loop.
6697 * src/gram.h (item_number_is_rule_number)
6698 (item_number_is_symbol_number): New.
6699 * src/state.c: Use assert.
6700 * src/system.h: Include assert.h.
6701 * tests/sets.at (Accept): New.
6702
6703 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6704
6705 * data/glr.c (yyfill): Adjust comment.
6706 (yyresolveAction): Initialize default location properly
6707 for empty right-hand sides.
6708 (yydoAction): Ditto.
6709 Add comment explaining apparently dead code.
6710 * tests/glr-regression.at
6711 (Incorrectly initialized location for empty right-hand side in GLR):
6712 New test.
6713
6714 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
6715
6716 * bootstrap (cleanup_gnulib): New function. Use it to clean up
6717 gnulib when interrupted. This fixes some race conditions and
6718 works around some portability problems (one noted by Paul
6719 Hilfinger).
6720
6721 2005-10-22 Akim <akim@epita.fr>
6722
6723 * Makefile.cfg: Adjust to config -> build-aux.
6724 Reported by twledo.
6725
6726 2005-10-21 Akim Demaille <akim@epita.fr>
6727
6728 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
6729 the %parse-params.
6730 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
6731 * data/yacc.c (b4_Pure_if): Rename as...
6732 (b4_yacc_pure_if): this.
6733 (YY_SYMBOL_PRINT, yyparse): Adjust.
6734 * doc/bison.texinfo: Formatting changes.
6735
6736 2005-10-21 Akim Demaille <akim@epita.fr>
6737
6738 Finish the transition config -> build-aux.
6739 * configure.ac, Makefile.am: Use build-aux.
6740 * config/prev-version, config/announce-gen, config/Makefile.am:
6741 Move to...
6742 * build-aux/prev-version, build-aux/announce-gen,
6743 * build-aux/Makefile.am: here.
6744
6745 2005-10-14 Akim Demaille <akim@epita.fr>
6746
6747 * examples/calc++/test: Use set -x only when VERBOSE.
6748
6749 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
6750
6751 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
6752 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
6753
6754 2005-10-13 Akim Demaille <akim@epita.fr>
6755
6756 * src/scan-skel.l: Output the base name parts of the parser and
6757 header file names.
6758 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
6759 additional checks.
6760 Use this to exercise C++ outputs in subdirs.
6761 Reported by Oleg Smolsky.
6762
6763 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
6764
6765 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
6766 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
6767 Problem reported by John P. Hartmann.
6768 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
6769 already defined it.
6770
6771 2005-10-12 Akim Demaille <akim@epita.fr>
6772
6773 * src/parse-gram.y (version_check): Exit 63 to please missing
6774 (stands for "version mismatch).
6775 * tests/input.at, doc/bison.texinfo: Adjust.
6776
6777 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
6778
6779 Work around portability problems with Visual Age C compiler
6780 (xlc and xlC_r) reported by John P. Hartmann.
6781 * data/location.cc (initial_column, initial_line): Remove.
6782 All uses replaced by 0 and 1.
6783 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6784 that xlc complains about.
6785 * src/scan-skel.l (skel_wrap): Likewise.
6786 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
6787 as __STDC__.
6788 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6789 __STDC_VERSION__. Use it everywhere instead of looking at
6790 __STDC__ and __cplusplus.
6791
6792 2005-10-10 Akim Demaille <akim@epita.fr>
6793
6794 * examples/calc++/test: Be quiet unless VERBOSE.
6795
6796 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6797
6798 * data/c.m4 (yydestruct, yysymprint):
6799 Use YYUSE instead of casting to void.
6800 * data/glr.c (YYUSE): New macro.
6801 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6802 Use it instead of rolling our own.
6803 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6804 (YYCHK1):
6805 Use /*CONSTCOND*/ to suppress lint warnings.
6806 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6807 (YY_STACK_PRINT): Use 'false' not '0'.
6808 (YYUSE): New macro.
6809 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6810 * data/yacc.c (YYUSE): New macro.
6811 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6812 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6813 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6814
6815
6816 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6817 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6818
6819 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6820
6821 Undo the parts of the unlocked-I/O change that substituted
6822 putc or puts for printf. This might hurt performance a bit,
6823 but some people prefer the printf style.
6824 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6825 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6826 All uses replaced by YYFPRINTF and YYDPRINTF.
6827 * data/yacc.c: Likewise.
6828 * lib/bitset.c (bitset_print): Likewise.
6829 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6830 putc and puts.
6831 * lib/lbitset.c (debug_lbitset): Likewise.
6832 * src/closure.c (print_firsts, print_fderives): Likewise.
6833 * src/gram.c (grammar_dump): Likewise.
6834 * src/lalr.c (look_ahead_tokens_print): Likewise.
6835 * src/output.c (escaped_output): Likewise.
6836 (user_actions_output): Break apart two printfs.
6837 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6838 * src/reduce.c (reduce_print): Likewise.
6839 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6840 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6841
6842 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6843 Use assignments rather than casts-to-void to suppress
6844 unused-variable warnings. This pacifies 'lint'.
6845 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6846 unused-variable warnings.
6847
6848 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6849
6850 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6851
6852 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6853
6854 Use unlocked I/O for a minor performance improvement on hosts like
6855 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6856 is to use the gnlib unlocked-io module, and to prefer putc and
6857 puts to printf when either will work (since the latter doesn't
6858 come in an unlocked flavor).
6859 * bootstrap (gnulib_modules): Add unlocked-io.
6860 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6861 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6862 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6863 and similarly for puts and putc and printf.
6864 * data/yacc.c: Likewise.
6865 * lib/bitset.c (bitset_print): Likewise.
6866 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6867 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6868 to printf.
6869 * lib/lbitset.c (debug_lbitset): Likewise.
6870 * src/closure.c (print_firsts, print_fderives): Likewise.
6871 * src/gram.c (grammar_dump): Likewise.
6872 * src/lalr.c (look_ahead_tokens_print): Likewise.
6873 * src/output.c (escaped_output): Likewise.
6874 (user_actions_output): Coalesce two printfs.
6875 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6876 * src/reduce.c (reduce_print): Likewise.
6877 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6878 * src/system.h: Include unlocked-io.h rather than stdio.h.
6879
6880 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6881 this confuses xgettext.
6882
6883 2005-10-02 Akim Demaille <akim@epita.fr>
6884
6885 * bootstrap (gnulib_modules): Add strverscmp.
6886 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6887 * m4/.cvsignore: Add strverscmp.m4.
6888 * src/parse-gram.y (%require): New token, new rule.
6889 (version_check): New.
6890 * src/scan-gram.l (%require): Adjust.
6891 * tests/input.at (AT_REQUIRE): New.
6892 Use it.
6893 * doc/bison.texinfo (Require Decl): New.
6894 (Calc++ Parser): Use %require.
6895
6896 2005-10-02 Akim Demaille <akim@epita.fr>
6897
6898 * data/location.cc: New.
6899
6900 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6901 Akim Demaille <akim@epita.fr>
6902
6903 Make sure -odir/foo.cc creates dir/location.hh etc.
6904 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6905 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6906 (spec_defines_file): Now const.
6907 (dir_prefix): New.
6908 (short_base_name): Remove.
6909 * src/files.c: Adjust.
6910 (dirname.h): Include.
6911 (base_name): Don't prototype it.
6912 (finput): Remove, duplicates gram_in.
6913 (full_base_name, short_base_name): Replace by...
6914 (all_but_ext, all_but_tab_ext): these.
6915 (compute_base_names): Rename as...
6916 (compute_file_name_parts): this.
6917 Update to compute the new variables, including dir_prefix.
6918 Adjust dependencies.
6919 * src/output.c (prepare): Output them.
6920 * src/reader.c: Adjust to use gram_in, not finput.
6921 * src/scan-skel.l (@dir_prefix@): New.
6922
6923 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6924
6925 * lib/subpipe.c: New function end_of_output_subpipe() added
6926 to allow support for non-posix systems. This is a no-op function
6927 for posix systems.
6928
6929 * lib/subpipe.h: New function end_of_output_subpipe() added
6930 to allow support for non-posix systems. This is a no-op function
6931 for posix systems.
6932
6933 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6934 handle the lack of pipe/fork functionality on non-posix systems.
6935
6936 * djgpp/Makefile.maint: DJGPP specific file.
6937
6938 * djgpp/README.in: DJGPP specific file.
6939
6940 * djgpp/config.bat: DJGPP specific configuration file.
6941
6942 * djgpp/config.sed: DJGPP specific configuration file.
6943
6944 * djgpp/config.site: DJGPP specific configuration file.
6945
6946 * djgpp/config_h.sed: DJGPP specific configuration file.
6947
6948 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6949
6950 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6951
6952 2005-10-02 Akim Demaille <akim@epita.fr>
6953
6954 * data/location.cc: New, extract from...
6955 * data/lalr1.cc: here.
6956 (location.hh): Include it after the user prologue, in case the
6957 filename type is defined by the user.
6958 Forward declation location and position before the pre-prologue.
6959 (yyresult_): Rename as...
6960 (yyresult): this, it's a local variable, not an attribute.
6961 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6962
6963 2005-10-01 Akim Demaille <akim@epita.fr>
6964
6965 * examples/extexi: Restore the #line generation.
6966
6967 2005-09-30 Akim Demaille <akim@epita.fr>,
6968 Alexandre Duret-Lutz <adl@gnu.org>
6969
6970 Move the token type and YYSTYPE in the parser class.
6971 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6972 (parser::token): New, from the moved free definition of tokens.
6973 (parser::semantic_value): Now a full definition instead of an
6974 indirection to YYSTYPE.
6975 (b4_post_prologue): No longer included in the header file, but
6976 in the implementation file.
6977 * doc/bison.texi (C+ Language Interface): Update.
6978 * src/parse-gram.y: Support unary %define.
6979 * tests/actions.at: Define global_tokens_and_yystype for backward
6980 compatibility until we update the tests.
6981 * tests/calc.at: Idem.
6982 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6983 to simplify the code.
6984
6985 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6986
6987 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6988 Ah, the good old days! Problem reported by Peter Klein.
6989 * bootstrap (gnulib_modules): Add strerror, strtoul.
6990 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6991 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6992
6993 2005-09-29 Akim Demaille <akim@epita.fr>
6994
6995 * data/c.m4 (b4_error_verbose_if): New.
6996 * data/lalr1.cc: Use it.
6997 (YYERROR_VERBOSE_IF): Remove.
6998 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6999 parser members, replaced by...
7000 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
7001 local variables.
7002 (yysyntax_error_): Takes the state number as argument.
7003 (yyreduce_print_): Use the argument yyrule, not the former
7004 attribute yyn_.
7005
7006 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
7007
7008 * bootstrap (gnulib_modules): Add verify.
7009 * lib/.cvsignore: Add verify.h.
7010 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
7011 * src/system.h (verify): Remove.
7012 Include verify.h instead.
7013 * src/tables.c (tables_generate): Use new API for 'verify'.
7014
7015 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
7016
7017 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
7018 local variables whose names begin with 'yy'.
7019 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7020 Trivial changes from Joel E. Denny.
7021
7022 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
7023 it itself.
7024 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
7025 don't use alloca any more.
7026
7027 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
7028 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
7029 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
7030 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
7031 to match yacc.c, to test more hosts.
7032
7033 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
7034
7035 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
7036 doesn't affect behavior.
7037 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
7038 Solaris, AIX, MSC.
7039 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
7040 This works a bit better with glibc, if user code has already included
7041 stdlib.h.
7042 * doc/bison.texinfo (Bison Parser): Document that users can't
7043 arbitrarily use malloc and free for other purposes. Document
7044 that <alloca.h> and <malloc.h> might be included.
7045 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
7046 user must declare alloca.
7047
7048 * HACKING (release): Forwarn the Translation Project about
7049 stable releses.
7050
7051 2005-09-20 Akim Demaille <akim@epita.fr>
7052
7053 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
7054
7055 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
7056
7057 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
7058 (YYSTACK_ALLOC_MAXIMUM): Use it.
7059 (yysyntax_error): New function.
7060 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
7061 multiple syntax errors are reported, and alloca is being used.
7062 Instead, reallocate buffers twice as big each time, so that
7063 we waste at most half the allocated memory. Start with a small
7064 (128-byte) buffer that will suffice in most cases anyway.
7065 Use yysyntax_error to do most of the work.
7066
7067 * doc/bison.texinfo (Error Reporting, Table of Symbols):
7068 yynerrs is the number of errors reported, not the number of
7069 errors encountered.
7070
7071 * tests/glr-regression.at (Duplicated user destructor for lookahead):
7072 Mark it as expected to fail.
7073 Cast result of malloc; problem reported by twlevo@xs4all.nl.
7074 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
7075 Don't start user-code symbols with "yy", to avoid name space problems.
7076
7077 2005-09-19 Akim Demaille <akim@epita.fr>
7078
7079 Remove the traits, failed experiment.
7080 It never proved useful, and anyway because of the current
7081 definition, it was not possible to have several specialization of
7082 this traits, making it useless.
7083 * data/lalr1.cc (yy:traits): Remove.
7084 Inline its definitions in the parser class.
7085
7086 2005-09-19 Akim Demaille <akim@epita.fr>
7087
7088 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
7089 least Mac OSX with a /usr/local install of gettext.
7090
7091 2005-09-19 Akim Demaille <akim@epita.fr>
7092
7093 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
7094 and yytoken for similarity with the other skeletons.
7095
7096 2005-09-19 Akim Demaille <akim@epita.fr>
7097
7098 * NEWS, configure.ac: update version number to 2.1a.
7099
7100 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
7101
7102 * NEWS: Version 2.1.
7103
7104 * NEWS: Remove notice of yytname change, since it was never in an
7105 official release.
7106 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
7107 diagnostic.
7108 * src/output.c (prepare): Likewise.
7109 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
7110 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
7111 is not defined. This is an awful hack, but it's enough for now.
7112 All callers changed.
7113 * tests/glr-regression-at (make_value): Args are const pointers now,
7114 to avoid GCC warning.
7115 (Duplicated user destructor for lookahead): New test. Currently
7116 skipped. It fails on my host but I'm not sure it'll always fail.
7117
7118 2005-09-16 Akim Demaille <akim@epita.fr>
7119
7120 * src/symtab.h (struct symbol): Declare the printer and destructor
7121 as const, to avoid accidental calls to free.
7122 (symbol_destructor_set, symbol_printer_set): Adjust.
7123 * src/symtab.c: Adjust.
7124
7125 2005-09-16 Akim Demaille <akim@epita.fr>
7126
7127 * data/c.m4 (b4_token_enums): New.
7128 (b4_token_defines): Rename as...
7129 (b4_token_enums_defines): this.
7130 (b4_token_defines): New, output only the #defines.
7131 * data/yacc.c, data/glr.c: Adjust.
7132 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
7133 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
7134 as default values.
7135
7136 2005-09-16 Akim Demaille <akim@epita.fr>
7137
7138 * data/lalr1.cc (yylex_): Remove, inline its code.
7139 (yyreport_syntax_error_): Remove, replaced by...
7140 (yysyntax_error_): this which returns a string and leaves to the
7141 caller the call to the users' error function.
7142 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
7143 Move from members of the parser object...
7144 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
7145 to local variables of the parse function.
7146
7147 2005-09-16 Akim Demaille <akim@epita.fr>
7148
7149 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
7150 since it's in Bison's name space.
7151
7152 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
7153
7154 * data/glr.c (yyresolveValue): Add default case to pacify
7155 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
7156
7157 * NEWS: Document when yyparse started to return 2.
7158 * doc/bison.texinfo (Parser Function): Document when yyparse
7159 returns 2.
7160
7161 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
7162 (b4_filename_type): Renamed back from b4_file_name_type. All uses
7163 changed.
7164 (class position): file_name -> filename (reverting). All uses changed.
7165
7166 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
7167
7168 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
7169 do anything if $@ exists. This reverts part of the 2005-07-07
7170 patch.
7171
7172 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
7173
7174 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
7175 contains obsolete information and isn't worth distributing as a
7176 separate file anyway.
7177 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
7178 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
7179 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
7180 (yyparse): Abort if user code uses longjmp to throw an unexpected
7181 value.
7182
7183 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
7184
7185 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
7186 Suggested by twlevo@xs4all.nl.
7187
7188 * data/glr.c (YYCHK1): Do not assume YYE is in range.
7189 This avoids a diagnostic from gcc -Wswitch-enum.
7190 Problem reported by twlevo@xs4all.nl.
7191
7192 * doc/bison.texinfo: Don't use "filename", as per GNU coding
7193 standards. Use "file name" or "file" or "name", depending on
7194 the context.
7195 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
7196 not to hack/foo.tab.c.
7197 (Calc++ Top Level): 2nd arg of main is not const.
7198 * data/glr.c: b4_filename -> b4_file_name.
7199 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
7200 All uses changed.
7201 (class position): filename -> file_name. All uses changed.
7202 * data/yacc.c: b4_filename -> b4_file_name.
7203 * lib/bitset.h: filename -> file_name in local vars.
7204 * lib/bitset_stats.c: Likewise.
7205 * src/files.c: Likewise.
7206 * src/scan-skel.l ("@output ".*\n): Likewise.
7207 * src/files.c (file_name_split): Renamed from filename_split.
7208 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
7209
7210 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
7211
7212 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
7213 to accommodate latest gnulib.
7214
7215 * tests/glr-regression.at (Duplicate representation of merged trees):
7216 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
7217
7218 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
7219 needed.
7220
7221 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
7222
7223 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
7224 All uses changed. Invoke user destructor after an error during a
7225 split parse (trivial change from Joel E. Denny).
7226
7227 * tests/glr-regression.at
7228 (User destructor after an error during a split parse): New test case.
7229 Problem reported by Joel E. Denny in:
7230 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
7231
7232 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
7233
7234 * README-cvs: Give URLs for recommended tools.
7235 Mention Gzip version problem, and bootstrapping issues.
7236 Remove troubleshooting section, as it's somewhat obsolete.
7237
7238 * bootstrap (no_cache): New var, to accommodate different wget
7239 variants. Use it instead of '-C off'. Problem reported by
7240 twlevo@xs4all.nl.
7241
7242 * data/glr.c (yydestroyStackItem): New function.
7243 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
7244 debugging information. Problem reported by Joel E. Denny.
7245
7246 2005-08-25 Akim Demaille <akim@epita.fr>
7247
7248 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
7249
7250 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
7251
7252 * data/glr.c (yyrecoverSyntaxError, yyreturn):
7253 Don't invoke destructor on unresolved entries.
7254 * tests/glr-regression.at
7255 (User destructor for unresolved GLR semantic value): New test case.
7256 Problem reported by Joel E. Denny in:
7257 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
7258
7259 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
7260
7261 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
7262 Add strnlen.c.
7263 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
7264 lib-prefix.m4, po.m4.
7265
7266 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
7267 in yydestruct diagnostic, since it might not be an error.
7268 Problem reported by Joel Denny near end of
7269 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7270 * data/lalr1.cc (yyerturn): Likewise.
7271 * data/yacc.c (yyreturn): Likewise.
7272 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
7273
7274 * src/files.c: Remove obsolete FIXME comment.
7275
7276 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
7277 with the other templates, and to fix bogus run-on messages such
7278 as the one reported at the end of
7279 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
7280 All callers changed to avoid the newline.
7281 (yyprocessOneStack): Output two lines rather than one, to accommodate
7282 the above change. This changes the debug output format slightly.
7283
7284 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
7285 reported by Joel E. Denny in
7286 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
7287 (trivial change).
7288 * tests/glr-regression.at (Duplicate representation of merged trees):
7289 New test, from Joel E. Denny in:
7290 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
7291 * THANKS: Add Joel E. Denny.
7292
7293 * configure.ac (AC_INIT): Bump to 2.0c.
7294
7295 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
7296
7297 * NEWS: Version 2.0b.
7298
7299 * Makefile.am (SUBDIRS): Put examples before tests, so that
7300 "make check" doesn't finish with "All 1 tests passed".
7301
7302 * tests/regression.at (Token definitions): Don't rely on
7303 AT_PARSER_CHECK for data that contains backslashes. It currently
7304 uses 'echo', and 'echo' isn't portable if its argument contains
7305 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
7306 that the byte '\0xff' is not printable in the C locale; it is,
7307 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
7308 not printable, so use '\0x81' to test.
7309
7310 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
7311 version of GCC, since the macro is used with non-GCC compilers.
7312
7313 Fix core dump reported by Pablo De Napoli in
7314 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
7315 * tests/regression.at (Invalid inputs with {}): New test.
7316 * src/parse-gram.y (token_name): Translate type before using
7317 it as an index.
7318
7319 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
7320 the user's name space. All uses changed to __attribute__
7321 ((__unused__)).
7322 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
7323 Add __attribute__ ((__noreturn__)).
7324
7325 * etc/clcommit: Remove. We weren't using it, and it failed
7326 "make maintainer-distcheck".
7327 * Makefile.maint: Merge from coreutils.
7328 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
7329 (syntax-check-rules): Change list of rules as described below.
7330 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
7331 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
7332 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
7333 (sc_trailing_space): New rules.
7334 (sc_xalloc_h_in_src): Remove.
7335 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
7336 (sc_space_tab, sc_error_exit_success, sc_changelog):
7337 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
7338 (makefile-check, po-check, author_mark_check):
7339 (makefile_path_separator_check, copyright-check):
7340 Use grep -n, to make it easier to find violations.
7341 Use CVS_LIST and CVS_LIST_EXCEPT.
7342 (header_regexp, h_re): Remove.
7343 (dd_c): New macro.
7344 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
7345 (my-distcheck): Use more-modern GCC flags.
7346 (signatures, %.asc): Remove.
7347 (rel-files, announcement): Remove signatures.
7348 Restore old updating code, even though we don't use it, so
7349 that we're the same as coreutils.
7350 (alpha, beta, major): Depend on news-date-check.
7351 Make the upload commands.
7352
7353 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
7354 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
7355 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
7356 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
7357 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
7358 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
7359 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
7360 * tests/sets.at: Likewise.
7361
7362 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
7363 we comment out the Autoconf version number.
7364 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
7365 it's error-prone and "make maintainer-distcheck" rejects it.
7366
7367 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
7368 Indent calls to "error" to pacify "make maintainer-distcheck",
7369 when the calls are not intended to be translated.
7370 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
7371
7372 * src/Makefile.am (DEFS): Use +=, to pacify
7373 "make maintainer-distcheck".
7374 (bison_SOURCES): Add scan-skel.h.
7375 (sc_tight_scope): New rule, from coreutils.
7376
7377 * src/files.c (src_extension, header_extension):
7378 Now static, not extern.
7379 * src/getargs.c (short_options): Likewise.
7380 * src/muscle_tab.c (muscle_table): Likewise.
7381 * src/parse-gram.y (current_class, current_type, current_prec):
7382 Likewise.
7383 * src/reader.c (grammar_end, previous_rule_end): Likewise.
7384 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
7385 * src/main.c (main): Cast bindtextdomain and textdomain calls to
7386 void, to avoid warning when NLS is disabled.
7387 * src/output.c: Include scan-skel.h.
7388 (scan_skel): Remove decl, since scan-skel.h does this.
7389 (output_skeleton):
7390 Indent calls to "error" to pacify "make maintainer-distcheck".
7391 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
7392 * src/reader.h (gram_end, gram_lineno): New decls to pacify
7393 "make maintainer-distcheck".
7394 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
7395 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
7396 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
7397 (skel_lex_destroy, scan_skel): Move these decls to...
7398 * src/scan-skel.h: New file.
7399 * src/uniqstr.c (uniqstr_assert):
7400 Indent calls to "error" to pacify "make maintainer-distcheck".
7401
7402 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
7403 not @VAR@.
7404
7405 * tests/torture.at: Revamp to avoid misuse of atoi that
7406 "make maintainer-distcheck" complained about.
7407
7408 * examples/extexi (message): Don't print a message more than once,
7409 and omit line-number decoration that makes Emacs compile think
7410 that informative messages are worth worrying about.
7411
7412 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
7413
7414 * configure.ac: Update version number.
7415
7416 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
7417 accidentally.
7418 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
7419 autogenerated by the maintainer.
7420 * examples/calc++/.cvsignore: Add *.yy.
7421
7422 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
7423 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7424 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7425
7426 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
7427
7428 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
7429 from maintainer-distcheck about casting the argument of 'free'.
7430
7431 * NEWS: Mention recent yytname changes.
7432 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
7433
7434 * bootstrap: For translations that have not yet been upgraded to
7435 the new runtime-po domain, prime the pump by extracting the
7436 relevant strings from the obsolete translations. This code can be
7437 removed once the bison-runtime domain has been translated by each
7438 team.
7439
7440 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
7441 now that token names are already quoted.
7442
7443 Fix problem reported by Anthony Heading.
7444 * data/glr.c (YYTOKEN_TABLE): New macro.
7445 (yytname): Define if YYTOKEN_TABLE.
7446 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
7447 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
7448 (YYERROR_VERBOSE): Define the same way the other skeletons do.
7449 * src/output.c (prepare_symbols): Output token_table_flag.
7450
7451 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
7452
7453 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
7454 again if the first call fails.
7455
7456 * data/glr.c (yytnamerr): New function.
7457 (yyreportSyntaxError): Use it to dequote most string literals.
7458 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
7459 with other skeletons. All uses changed.
7460 (yytnameerr_): New function.
7461 (yyreport_syntax_error): Use it to dequote most string literals.
7462 * data/yacc.c (yytnamerr): New function.
7463 (yyerrlab): Use it to decode most string literals.
7464 * doc/bison.texinfo (Decl Summary, Calling Convention):
7465 Clarify quoting convention of yytname.
7466 * src/output.c (prepare_symbols): Quote all names. This undoes
7467 the 2005-04-17 change, which is now accomplished (mostly) via
7468 changes in the parsers as described above.
7469 * tests/regression.at (Token definitions, Web2c Actions):
7470 Undo most 2005-04-17 change here, too.
7471
7472 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
7473
7474 Fix more problems reported by twlevo@xs4all.nl.
7475 * tests/cxx-type.at: Don't pipe output of ./types through sed to
7476 remove trailing spaces. This loses the exit status of ./types,
7477 and isn't needed since ./types shouldn't be emitting trailing
7478 spaces.
7479 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
7480 as the stack isn't valid in that case.
7481
7482 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7483 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7484 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7485 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
7486 is used.
7487 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
7488 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7489 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7490 Likewise.
7491
7492 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
7493 overly-picky compilers that reject 'char *foo = "bar";'.
7494
7495 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
7496 to FILE * parameter, not to stderr. This fixes a typo introduced
7497 in the 2005-07-12 change.
7498
7499 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
7500 warnings from GCC 4.
7501
7502 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
7503 (yyglrShiftDefer, yysplitStack):
7504 Remove unused parameters b4_pure_formals. All uses changed.
7505 (yyglrShift): Remove unused parameters b4_user_formals.
7506 All uses changed.
7507 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
7508
7509 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
7510
7511 Destructor cleanups and regularization among the three skeletons.
7512 * NEWS: Document the behavior changes.
7513 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
7514 stack before failing, as the cleanup code will do it for us now.
7515 * data/lalr1.cc (yyerrlab): Likewise.
7516 * data/glr.c (yyparse): Pop everything off the stack before
7517 freeing it, so that destructors get called properly.
7518 * data/lalr1.cc (yyreturn): Likewise.
7519 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
7520 This is more consistent.
7521 * doc/bison.texinfo (Destructor Decl): Mention more reasons
7522 why destructors might be called. 1.875 -> 2.1.
7523 (Destructor Decl, Decl Summary, Table of Symbols):
7524 Some English-language cleanups for %destructor.
7525 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7526 Add output line for destructor of start symbol.
7527 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
7528 because of that same extra output line.
7529
7530 * NEWS: Document minor wording changes in diagnostics of
7531 Bison-generated parsers.
7532 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
7533 Remove unused formals. All uses changed.
7534 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
7535 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
7536 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
7537 Rename yyoverflowab to yyexhaustedlab.
7538 When memory exhaustion occurs during syntax-error reporting,
7539 report it separately rather than in a single diagnostic; this
7540 eases translation.
7541 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
7542 (Memory Exhausted): Renamed from Parser Stack Overflow.
7543 Revamp wording slightly to prefer "memory exhaustion".
7544 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
7545
7546 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
7547
7548 Add i18n support to the GLR skeleton. Partially fix the C++
7549 skeleton; a C++ expert needs to finish this. Remove debugging
7550 msgids; there's little point to having them translated, since they
7551 can be understood only by someone who can read the
7552 (English-language) source code.
7553
7554 Generate runtime-po/bison-runtime.pot automatically, so that we
7555 don't have to worry about garbage getting in that file. We'll
7556 make sure after the next official release that old msgids don't
7557 get lost. See
7558 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
7559
7560 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
7561 Now auto-generated.
7562 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
7563 Fix typos in explanations of the runtime file.
7564 * bootstrap: Change gettext keyword from YYI18N to YY_.
7565 Use standard Makefile.in.in in runtime-po, since we'll arrange
7566 for backward-compatible bison-runtime.po files in a different way.
7567 * data/glr.c (YY_): New macro, from yacc.c.
7568 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
7569 Translate messages intended for users.
7570 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
7571 the wording in the other skeletons. We don't know that the memory
7572 is virtual.
7573 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
7574 Use same method that yacc.c uses.
7575 Don't translate debugging messages.
7576 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
7577 it doesn't work (yet), and requires C++ expertise to fix.
7578 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
7579 Move defn to a more logical place, to be consistent with other
7580 skeletons.
7581 Don't translate debugging messages.
7582 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
7583 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
7584 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
7585 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
7586
7587 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
7588 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
7589 void, not int.
7590 * tests/glr-regression.at (Badly Collapsed GLR States):
7591 Likewise.
7592 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7593 yylex should return 0 at EOF rather than aborting.
7594
7595 Improve tests for stack overflow in GLR parser.
7596 Problem reported by twlevo@xs4all.nl.
7597 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
7598 All uses removed.
7599 (yyStackOverflow): Just longjmp, but with value 2 so that caller
7600 can handle the problem.
7601 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
7602 (yyparse): New local variable yyresult to record the result.
7603 Use result of setjmp to set it, rather than storing itinto
7604 struct.
7605 (yyDone): Remove label.
7606 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
7607 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
7608 if YYABORT is used).
7609 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
7610 yyparse status; put status > 1 into diagnostic.
7611 Check that status==2 works.
7612 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
7613 Use exit status 3 for failure to open (which shouldn't happen).
7614
7615 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
7618 1 on syntax error; just let yyparse do its thing.
7619 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
7620 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
7621 (Exploding the Stack Size with Alloca):
7622 (Exploding the Stack Size with Malloc):
7623 Expect exit status 2, not 1, since the parser is supposed to blow
7624 its stack. Problem reported by twlevo@xs4all.nl.
7625
7626 * data/glr.c (yyparse): Don't assume that the initial calls
7627 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
7628 Print a stack-overflow message and fail instead.
7629 Initialize the line-number information before creating the stack,
7630 so that the stack-overflow message can report line zero safely.
7631
7632 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
7633
7634 Fix problems reported by twlevo@xs4all.nl.
7635 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
7636 (yyuserMerge): Provide a default case if b4_mergers is empty.
7637 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
7638 * tests/glr-regression.at
7639 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
7640 Add casts to pacify C++ compilers.
7641 * tests/glr-regression.at (Improper merging of GLR delayed action
7642 sets): Declare yylex before using it.
7643 * tests/Makefile.am (maintainer-check-g++): Fix a stray
7644 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
7645 test for valgrind; valgrind is independent of g++.
7646 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
7647 for compatibility with POSIX 1003.1-2001 (if running coreutils).
7648 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
7649 Use a destructor, so that we can expand the stack. Change
7650 YYSTYPE to char * so that we can free it. Cast result of malloc.
7651
7652 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7653
7654 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
7655 a valgrind failure. Problem reported by twlevo@xs4all.nl.
7656
7657 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
7658
7659 * PACKAGING: New file, suggested by Bruno Haible and taken from
7660 similar wording in gettext's PACKAGING file.
7661 * NEWS: Mention PACKAGING.
7662 * Makefile.am (EXTRA_DIST): Add PACKAGING.
7663
7664 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
7665
7666 * NEWS: Document recent i18n improvements.
7667 * bootstrap: Get runtime translations into runtime-po.
7668 Create runtime-po files automatically, if possible.
7669 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
7670 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
7671 does not infringe on the user's name space.
7672 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
7673 * doc/bison.texinfo (Internationalization): Revamp the English
7674 and Texinfo syntax a bit, to try to make it clearer.
7675 (Bison Options, Option Cross Key): Mention --print-localedir.
7676 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
7677 YYENABLE_NLS. Quote a bit more.
7678 * runtime-po/.cvsignore: New file.
7679 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
7680 * runtime-po/Rules-quot: Remove; now created by bootstrap.
7681 * runtime-po/quot.sed: Likewise.
7682 * runtime-po/boldquot.sed: Likewise.
7683 * runtime-po/en@quot.header: Likewise.
7684 * runtime-po/en@boldquot.header: Likewise.
7685 * runtime-po/insert-header.sin: Likewise.
7686 * runtime-po/remove-potcdate.sin: Likewise.
7687 * runtime-po/Makevars: Likewise.
7688 * runtime-po/LINGUAS: Likewise.
7689 * runtime-po/de.po: Likewise; we will rely on the translation project
7690 to maintain this, so "bootstrap" should get it.
7691 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
7692 its value.
7693 * src/main.c (main): Bind the bison-runtime domain, too.
7694
7695 2005-07-12 Bruno Haible <bruno@clisp.org>
7696
7697 * data/yacc.c: Include <libintl.h> when NLS is enabled.
7698 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
7699 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
7700 * runtime-po: New directory.
7701 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
7702 $(DOMAIN).pot-update rule, so that old messages are never dropped.
7703 * runtime-po/Rules-quot: New file, copied from po/.
7704 * runtime-po/quot.sed: Likewise.
7705 * runtime-po/boldquot.sed: Likewise.
7706 * runtime-po/en@quot.header: Likewise.
7707 * runtime-po/en@boldquot.header: Likewise.
7708 * runtime-po/insert-header.sin: Likewise.
7709 * runtime-po/remove-potcdate.sin: Likewise.
7710 * runtime-po/Makevars: New file.
7711 * runtime-po/POTFILES.in: New file.
7712 * runtime-po/LINGUAS: New file.
7713 * runtime-po/bison-runtime.pot: New file.
7714 * runtime-po/de.po: New file.
7715 * m4/bison.m4: New file.
7716 * Makefile.am (SUBDIRS): Add runtime-po.
7717 (aclocaldir, aclocal_DATA): New variables.
7718 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
7719 Define aclocaldir.
7720 * src/getargs.c (usage): Document --print-localedir option.
7721 (PRINT_LOCALEDIR_OPTION): New enum item.
7722 (long_options): Add --print-localedir option.
7723 (getargs): Handle --print-localedir option.
7724 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
7725 (Internationalization): New section.
7726
7727 2005-07-12 Akim Demaille <akim@epita.fr>
7728
7729 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
7730 for consistency with the rest of the code.
7731 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
7732 Add separators.
7733
7734 2005-07-12 Akim Demaille <akim@epita.fr>
7735
7736 * src/parse-gram.y: Use %printer instead of YYPRINT.
7737
7738 2005-07-12 Akim Demaille <akim@epita.fr>
7739
7740 * src/symtab.h, src/symtab.c (symbol_print): New.
7741 * src/symlist.h, src/symlist.c (symbol_list_print): New.
7742 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
7743
7744 2005-07-12 Akim Demaille <akim@epita.fr>
7745
7746 * data/glr.c (b4_syncline): Fix (swap) the definitions of
7747 b4_at_dollar and b4_dollar_dollar.
7748
7749 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
7750
7751 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
7752 and Pennello's paper.
7753
7754 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
7755
7756 * data/yacc.c (yyparse): Undo previous patch. Instead,
7757 set yylsp[0] and yyvsp[0] only if the initial action
7758 sets yylloc and yylval, respectively.
7759
7760 * data/yacc.c (yyparse): In the initial action, set
7761 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
7762 This avoids the use of undefined variables if the initial
7763 action does not set yylloc and/or yylval.
7764
7765 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
7766
7767 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
7768 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
7769 Remove from CVS. These files are automatically generated.
7770 * examples/extexi: Clarify that this file is now part of Bison,
7771 not GNU M4, and that it works with any POSIX-compatible Awk.
7772 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
7773 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
7774 so that we also get calc++-parser.yy. Geneate it.
7775 Use $(AWK), not gawk, since any conforming Awk will do.
7776 Put comment before action, since older 'make' can't handle comment
7777 in action.
7778 $(BUILT_SOURCES): List all built sources, not just some of them.
7779 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7780 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7781 $($(calc_sources_generated)): Remove unnecessary test for existence
7782 of target. (This had a shell syntax error anyway; a stray "x".)
7783 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7784 calc++-parser.yy.
7785 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7786
7787 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7788 implied by the other modules.
7789
7790 2005-07-06 Akim Demaille <akim@epita.fr>
7791
7792 Bind examples/calc++ to the package.
7793 * examples/calc++/Makefile: Remove, replaced by...
7794 * examples/calc++/Makefile.am: ... this new file.
7795 * examples/calc++/test: Remove input.
7796 * examples/calc++/compile: Remove.
7797 * examples/Makefile.am: New.
7798 * configure.ac, Makefile.am: Adjust.
7799 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7800
7801 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7802
7803 * data/glr.c (yyFail): Drastically simplify; since the format argument
7804 never had any % directives, we can simply pass it to yyerror.
7805 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7806 be modified later, as that is the usual style in glr.c.
7807 Problems reported by Paul Hilfinger.
7808
7809 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7810 and size overflow errors.
7811 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7812 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7813 (YYSIZEMAX): New macro.
7814 (yystpcpy): New function, taken from yacc.c.
7815 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7816 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7817 so that we don't have to maintain their signatures.
7818 (yyFail): Check for buffer overflow, by using vsnprintf rather
7819 than vsprintf. Allocate a bigger buffer if possible.
7820 Report an error if buffer allocation fails.
7821 (yyStackOverflow): New function.
7822 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7823 the initialization was successful. It might fail if storage was
7824 exhausted.
7825 (yyexpandGLRStack): Add more checks for storage allocation failure.
7826 Use yyStackOverflow to report failures.
7827 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7828 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7829 Don't assume stack number fits in int.
7830 (yysplitStack): Check for storage allocation failure.
7831 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7832 can print diagnostics on storage allocation failure. All callers
7833 changed.
7834 (yyresolveValue): Use yybool for boolean.
7835 (yyreportSyntaxError): Check for size-calculation overflow.
7836 This code is taken from yacc.c.
7837 (yyparse): Check for storage allocation errors when allocating
7838 the initial stack.
7839
7840 2005-07-05 Akim Demaille <akim@epita.fr>
7841
7842 Extract calc++ from the documentation.
7843 * doc/bison.texinfo (Calc++): Add the extraction marks.
7844 * examples/extexi: New, from the aborted GNU Programming 2E.
7845 Separate the different paragraph of a file with empty lines.
7846 * examples/Makefile: Use it to extract the whole calc++ example.
7847
7848 2005-06-24 Akim Demaille <akim@epita.fr>
7849
7850 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7851 class typedefs.
7852
7853 2005-06-22 Akim Demaille <akim@epita.fr>
7854
7855 * doc/bison.texinfo (C++ Language Interface): First stab.
7856 (C++ Parsers): Remove.
7857
7858 2005-06-22 Akim Demaille <akim@epita.fr>
7859
7860 * data/lalr1.cc (yylex_): Honor %lex-param.
7861
7862 2005-06-22 Akim Demaille <akim@epita.fr>
7863
7864 Start a set of simple examples.
7865 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7866 * examples/calc++/calc++-driver.hh,
7867 * examples/calc++/calc++-parser.yy,
7868 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7869 * examples/calc++/compile, examples/calc++/test: New.
7870
7871 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7872
7873 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7874 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7875 which stems from the 2005-05-27 patch.
7876
7877 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7878
7879 * data/glr.c: Modify treatment of unused parameters to permit use
7880 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7881
7882 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7883
7884 Fix infringement on user name space reported by Janos Zoltan Szabo.
7885 * data/yacc.c (yyparse): strlen -> yystrlen.
7886
7887 2005-05-30 Akim Demaille <akim@epita.fr>
7888
7889 * data/lalr1.cc (_): New.
7890 Translate the various messages.
7891
7892 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7893
7894 Fix infringement on user name space reported by Bruno Haible.
7895 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7896 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7897 the user's name space.
7898 (alloca): Include <stdlib.h> to get it, if it's not built in.
7899 (YYMALLOC, YYFREE): Define only if needed.
7900 (malloc, free): Declare, but only if needed, as this infringes on
7901 the user name space.
7902
7903 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7904
7905 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7906 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7907 with %d format.
7908 * lib/ebitset.c (min, max): Undef before defining.
7909 * lib/vbitset.c (min, max): Likewise.
7910 * lib/subpipe.c (create_subpipe): Save local variables in case
7911 vfork clobbers them.
7912
7913 2005-05-24 Bruno Haible <bruno@clisp.org>
7914
7915 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7916 error message syntax used by gcc-4.0.
7917
7918 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7919
7920 * README: Mention m4 1.4.3. Remove obsolete advice about
7921 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7922
7923 * bootstrap: Remove workaround for problem I encountered with
7924 gettext 0.14.1; it seems to be fixed now.
7925
7926 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7927
7928 * NEWS: Version 2.0a.
7929
7930 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7931 the previous change.
7932
7933 Various maintainer cleanups.
7934 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7935 conftest*, for benefit of CVS commands run at the same time as
7936 "configure". Add build-aux, since "bootstrap" now creates it and
7937 its subfiles.
7938 * Makefile.cfg (move_if_change): Remove.
7939 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7940 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7941 (po_repo, do-po-update, po-update, wget_files, get-targets):
7942 (config.guess-url_prefix, config.sub-url_prefix):
7943 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7944 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7945 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7946 Remove.
7947 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7948 this is now the recommended name.
7949 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7950 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7951 ylwrap. These files now go into build-aux.
7952 * config/move-if-change: Remove.
7953 * config/prev-version.txt: Bump from 1.75 to 2.0.
7954
7955 * bootstrap: Add stdio-safer, unistd-safer modules.
7956 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7957 we don't need it).
7958 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7959 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7960 * lib/subpipe.c: Include "unistd-safer.h".
7961 (create_subpipe): Make sure all the newly-created
7962 file descriptors are > 2, so that diagnostics don't
7963 get sent down them (which might cause Bison to hang, in theory).
7964 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7965 * src/files.c (xfopen): Use fopen_safer, not fopen.
7966
7967 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7968 yesterday's yacc.c fix.
7969
7970 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7971
7972 * data/glr.c, data/lalr1.cc: Update copyright date.
7973
7974 Fix a destructor bug reported by Wolfgang Spraul in
7975 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7976 * data/yacc.c (yyabortlab): Don't call destructor, and
7977 don't set yychar to EMPTY.
7978 (yyoverflowlab): Don't call destructor.
7979 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7980 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7981 since we no longer output the message "discarding lookahead token
7982 end of input ()".
7983
7984 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7985
7986 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7987 fix a small glitch in debugging output.
7988 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7989 after YY_SYMBOL_PRINT where needed.
7990
7991 (struct yyGLRState): Add some comments.
7992 (struct yySemanticOption): Add some comments.
7993 (union yyGLRStackItem): Add comment.
7994
7995 (yymergeOptionSets): Correct this to properly perform the union,
7996 avoiding infinite reported by Michael Rosien.
7997 Update comment.
7998
7999 * tests/glr-regression.at: Add test for GLR merging error reported
8000 by M. Rosien.
8001
8002 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
8003
8004 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
8005 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
8006 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
8007 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
8008 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
8009 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
8010 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
8011 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
8012 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
8013 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
8014 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
8015 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
8016 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
8017 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
8018 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
8019 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
8020 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
8021 src/derives.h, src/files.c, src/files.h, src/getargs.c,
8022 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
8023 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
8024 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
8025 src/output.h, src/parse-gram.c, src/parse-gram.h,
8026 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
8027 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
8028 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
8029 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
8030 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
8031 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
8032 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
8033 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
8034 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
8035 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
8036 tests/reduce.at, tests/regression.at, tests/sets.at,
8037 tests/synclines.at, tests/testsuite.at, tests/torture.at:
8038 Update FSF postal mail address.
8039
8040 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
8041
8042 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
8043 Problem reported by Ralf Menzel.
8044
8045 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
8046
8047 * tests/actions.at: Test that stack overflow invokes destructors.
8048 From Marcus Holland-Moritz.
8049 * data/yacc.c (yyerrlab): Move the code that destroys the stack
8050 from here....
8051 (yyreturn): to here. That way, destructors are called properly
8052 even if the stack overflows, or the user calls YYACCEPT or
8053 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
8054 (yyoverflowlab): Destroy the lookahead.
8055
8056 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
8057
8058 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
8059
8060 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
8061
8062 * NEWS: Bison-generated C parsers no longer quote literal strings
8063 associated with tokens.
8064 * src/output.c (prepare_symbols): Don't escape strings,
8065 since users don't want to see C escapes.
8066 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
8067 in diagnostics.
8068 * tests/input.at (Torturing the Scanner): Likewise.
8069 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
8070
8071 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
8072
8073 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
8074 the data size is known to be too small and we can't increase it.
8075 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
8076
8077 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
8078
8079 * src/parse-gram.y: Include quotearg.h.
8080 (string_as_id): Quote $1 before using it as a key, since the
8081 lexer no longer quotes it for us.
8082 (string_content): Don't strip quotes, since lexer no longer
8083 quotes it for us.
8084 * src/scan-gram.l: Include quotearg.h.
8085 ("\""): Omit quote.
8086 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
8087 a key, since the rest of the lexer doesn't quote it.
8088 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
8089 * tests/regression.at (Token definitions): Check for backslashes
8090 in token strings.
8091
8092 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
8093 (YYSIZE_T): Define to unsigned long int when using an older compiler.
8094 (yyparse): Revamp code to generate long syntax error message, to
8095 make it easier to translate, and to avoid problems with arithmetic
8096 overflow. Change "virtual memory" to "memory" in diagnostic, since
8097 we don't know whether the memory is virtual.
8098
8099 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
8100
8101 * NEWS: Bison-generated C parsers now use the _ macro to
8102 translate strings.
8103 * data/yacc.c (_) [!defined _]: New macro.
8104 All English strings wrapped inside this macro.
8105 * doc/bison.texinfo (Bison Parser): Document _.
8106 * po/POTFILES.in: Include src/parse-gram.c, since it now
8107 includes translateable strings that parse-gram.y doesn't.
8108
8109 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
8110
8111 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
8112 reverting the 2004-10-11 change to this function.
8113 (symbol_check_alias_consistency): Don't call symbol_type_set
8114 if the type name is already correct.
8115 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
8116
8117 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
8118
8119 * tests/regression.at (Token definitions): Don't use a token named
8120 c, as that generates a "#define c ..." that runs afoul of buggy
8121 stdlib.h that uses the identifier c as a member of struct
8122 drand48_data. Problem reported by Horst Wente.
8123
8124 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
8125
8126 * bootstrap: Change translation URL from
8127 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
8128 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
8129 redirection glitches. Problem reported by twlevo@xs4all.nl.
8130
8131 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
8132
8133 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
8134 after operands; POSIX says this isn't portable for the c99 command.
8135
8136 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
8137
8138 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
8139 immediately if a data overrun has occurred; this may help us track
8140 down what may be a spurious failure on MacOS.
8141
8142 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
8143
8144 Respond to problems reported by twlevo@xs4all.nl.
8145
8146 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
8147
8148 * src/vcg.h: Comment fix.
8149 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
8150 (G_CMAX): Change to -1 instead of INT_MAX.
8151
8152 * data/yacc.c (yyparse): Omit spaces before #line.
8153
8154 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
8155
8156 * src/tables.c (state_number_to_vector_number): Put it inside an
8157 "#if 0", since it's not currently used. Problem reported by
8158 Roland McGrath.
8159
8160 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
8161
8162 * src/output.c (escaped_output): Renamed from
8163 escaped_file_name_output, since we now use it for symbol tags as
8164 well. All uses changed.
8165 (symbol_destructors_output, symbol_printers_output):
8166 Escape symbol tags too.
8167 Problem reported by Matyas Forstner in
8168 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
8169
8170 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
8171 not needed.
8172 * src/output.c (user_actions_output, token_definitions_output,
8173 symbol_destructors_output, symbol_printers_output): Likewise.
8174 * src/reader.c (prologue_augment): Likewise.
8175 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
8176
8177 * src/vcg.c (output_edge): Don't quote linestyle arg.
8178 Problem reported by twlevo@xs4all.nl.
8179
8180 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
8181
8182 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
8183 example, reported by Derek M Jones. Also, make the example even
8184 more outrageous, to better illustrate how bad the problem is.
8185
8186 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
8187
8188 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
8189 putsym. Typo reported by Sebastian Piping.
8190
8191 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
8192
8193 * doc/bison.texinfo (Language and Grammar): some -> same
8194 (Epilogue): int he -> in the
8195 Typos reported by Sebastian Piping via Justin Pence.
8196
8197 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
8198
8199 * tests/glr-regression.at (Improper handling of embedded actions
8200 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
8201 embedded actions and $-N in GLR parsers", work around an Autoconf bug
8202 with dollar signs in test names.
8203 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
8204 for a similar reason.
8205
8206 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
8207
8208 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
8209 wants to redefine G_VIEW.
8210
8211 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
8212
8213 * src/vcg.c (get_view_str): Remove case for normal_view.
8214 Problem reported by twlevo@xs4all.nl.
8215
8216 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
8217
8218 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
8219 Problem reported by twlevo@xs4all.nl.
8220
8221 * doc/bison.texinfo: Change @dircategory from "GNU programming
8222 tools" to "Software development". Requested by Richard Stallman
8223 via Karl Berry.
8224
8225 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
8226
8227 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
8228 Problem reported by twlevo@xs4all.nl.
8229
8230 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
8231
8232 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
8233 keyword; it's not needed with modern compilers, and it doesn't
8234 affect correctness with older compilers. Suggested by
8235 twlevo@xs4all.nl.
8236
8237 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
8238
8239 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
8240 gcc -Wswitch-default.
8241 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8242 * data/yacc.c (yyparse): Likewise.
8243
8244 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
8247 already. Let config.h define any nonstandard values.
8248
8249 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
8250
8251 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
8252 for the benefit of slower hosts. Problem reported by
8253 Nelson H. F. Beebe.
8254
8255 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
8258 being defined and not used.
8259 * data/lalr1.cc (yyparse): Likewise.
8260 Use "if (false)" rather than "if (0)".
8261
8262 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
8263
8264 * TODO: Mention that we should allow NUL bytes in tokens.
8265
8266 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
8267
8268 * src/scan-skel.l (<<EOF>>): Don't close standard output.
8269 Problem reported by Hans Aberg.
8270
8271 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
8272
8273 * src/getargs.c (version): Happy new year; update overall
8274 program copyright date from 2004 to 2005.
8275
8276 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
8277 Problem reported by Hans Aberg.
8278 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
8279 (Output file names.): Add a test for the case when standard output
8280 is closed.
8281
8282 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
8283
8284 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
8285 to fix an oversight in the Bison 2.0 manual.
8286
8287 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 * NEWS: Version 2.0. Reformat the existing news items since
8290 1.875, so that related items are grouped together.
8291 * configure.ac (AC_INIT): Bump version to 2.0.
8292 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
8293
8294 * tests/torture.at (Exploding the Stack Size with Alloca): Set
8295 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
8296 otherwise, we're not testing alloca. Unfortunately there's no
8297 simple way to consult HAVE_ALLOCA here.
8298
8299 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
8300 for yymsg, too.
8301
8302 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
8303 hand. This avoids a warning about comparing int to size_t when
8304 GCC warnings are enabled.
8305
8306 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
8307
8308 * NEWS: Bison-generated parsers no longer default to using the
8309 alloca function (when available) to extend the parser stack, due
8310 to widespread problems in unchecked stack-overflow detection.
8311 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
8312 responsibility to set it to a positive value. This lets the user
8313 specify a value that is not a preprocessor constant.
8314 * data/yacc.c (YYMAXDEPTH): Likewise.
8315 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
8316 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
8317 to be a compile-time constant. However, explain the constraints on it.
8318 Also, explain the constraints on YYINITDEPTH.
8319 (Table of Symbols): Explain that alloca is no longer the default.
8320 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
8321 to 1.
8322
8323 * doc/bison.texinfo (Location Default Action): Mention that n must
8324 be zero when k is zero. Suggested by Frank Heckenbach.
8325
8326 2004-12-22 Akim Demaille <akim@epita.fr>
8327
8328 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
8329 (parser::state_type, parser::semantic_type, parser::location_type):
8330 Private, not public.
8331 (parser::parse): Return ints, not bool.
8332 Returning a bool introduces a problem: 0 corresponds to false, and
8333 it seems weird to return false on success. Returning true changes
8334 the conventions for yyparse.
8335 Alternatively we could return void and send an exception.
8336 There is no clear consensus (yet?).
8337 (state_stack, semantic_stack, location_stack): Rename as...
8338 (state_stack_type, semantic_stack_type, location_stack_type): these.
8339 Private, not public.
8340 * tests/c++.at: New.
8341 * tests/testsuite.at, tests/Makefile.am: Adjust.
8342
8343 2004-12-21 Akim Demaille <akim@epita.fr>
8344
8345 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
8346
8347 2004-12-21 Akim Demaille <akim@epita.fr>
8348
8349 Don't impose std::string for filenames.
8350
8351 * data/lalr1.cc (b4_filename_type): New.
8352 (position::filename): Use it.
8353 (parser.hh): Move the inclusion of stack.hh and location.hh below
8354 the user code, so that needed headers for the filename type can be
8355 included first.
8356 Forward declare them before the user code.
8357 * tests/Makefile.am (check-local, installcheck-local): Pass
8358 TESTSUITEFLAGS to the TESTSUITE.
8359
8360 2004-12-20 Akim Demaille <akim@epita.fr>
8361
8362 Use more STL like names: my_class instead of MyClass.
8363
8364 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
8365 (SemanticStack, SemanticType, StateStack, StateType)
8366 (TokenNumberType, Stack, Slice, Traits, Parser::location)
8367 (Parser::value): Rename as...
8368 (location_stack, location_type, rhs_number_type, semantic_stack)
8369 (semantic_type, state_stack, state_type, token_number_type, stack)
8370 (slice, traits, parser::yylloc, parser::yylval): these.
8371
8372 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
8373
8374 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
8375
8376 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
8377 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8378
8379 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
8380
8381 Remove uses of 'short int' and 'unsigned short int'. This raises
8382 some arbitrary limits. It uses more memory but nowadays that's
8383 not much of an issue.
8384
8385 This change does not affect the generated parsers; that's a different
8386 task, as some users will want to conserve memory there.
8387
8388 Ideally we should use size_t to represent all object counts, and
8389 something like ptrdiff_t to represent signed differences of object
8390 counts; but that will require more code-cleanup than I have the
8391 time to do right now.
8392
8393 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
8394 Use size_t, not int or short int, to count objects.
8395 * src/closure.c (nritemset, closure): Likewise.
8396 * src/closure.h (nritemset, closure): Likewise.
8397 * src/nullable.c (nullable_compute): Likewise.
8398 * src/print.c (print_core): Likewise.
8399 * src/print_graph.c (print_core): Likewise.
8400 * src/state.c (state_compare, state_hash): Likewise.
8401 * src/state.h (struct state): Likewise.
8402 * src/tables.c (default_goto, goto_actions): Likewise.
8403
8404 * src/gram.h (rule_number, rule): Use int, not short int.
8405 * src/output.c (prepare_rules): Likewise.
8406 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
8407 errs, reductions): Likewise.
8408 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
8409 Likewise.
8410 * src/tables.c (vector_number, tally, action_number,
8411 ACTION_NUMBER_MINIMUM): Likewise.
8412 * src/output.c (muscle_insert_short_int_table): Remove.
8413
8414 2004-12-17 Akim Demaille <akim@epita.fr>
8415
8416 * data/lalr1.cc: Extensive Doxygenation.
8417 (error_): Rename as...
8418 (error): this, since it is visible to the user.
8419 Adjust callers.
8420 (Parser::message): Now an automatic variable from...
8421 (Parser::yyreport_syntax_error_): here.
8422 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
8423 Parser::error.
8424 * tests/input.at: Escape $.
8425
8426 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
8429 Parenthesize rhs to avoid obscure problems with mistakes like
8430 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
8431 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8432 b4_rhs_location): Likewise.
8433 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
8434 b4_rhs_location): Likewise.
8435
8436 2004-12-16 Akim Demaille <akim@epita.fr>
8437
8438 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
8439 yacc.c: be sure to stay within yycheck_.
8440 * tests/actions.at: Re-enable C++ tests.
8441
8442 2004-12-16 Akim Demaille <akim@epita.fr>
8443
8444 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
8445 real.
8446
8447 2004-12-16 Akim Demaille <akim@epita.fr>
8448
8449 Use #define to handle the %name-prefix.
8450
8451 * data/glr.c, data/yacc.c: Comment changes.
8452 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
8453 so that one can refer to yylex in the parser file, and have it
8454 renamed, as is the case with other skeletons.
8455
8456 2004-12-16 Akim Demaille <akim@epita.fr>
8457
8458 Move lalr1.cc internals into yy*.
8459
8460 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
8461 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
8462 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
8463 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
8464 (empty_, final_, terror_, errcode_, ntokens_)
8465 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
8466 (looka_, ilooka_, error_range_, nerrs_):
8467 Rename as...
8468 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
8469 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
8470 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
8471 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
8472 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
8473 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
8474 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
8475 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
8476 these.
8477
8478 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
8479
8480 Fix some problems reported by twlevo at xs4all.
8481 * src/symtab.c (symbol_new): Report an error if the input grammar
8482 contains too many symbols. This is better than calling abort() later.
8483 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
8484 (struct node, struct graph):
8485 Rename member expand to stretch. All uses changed.
8486 (struct graph): Remove member layoutalgorithm. All uses removed.
8487 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
8488 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
8489 All uses changed.
8490 (N_STRETCH): Rename from N_EXPAND. All uses changed.
8491
8492 2004-12-15 Akim Demaille <akim@epita.fr>
8493
8494 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
8495 Add more Doxygen comments.
8496 (symprint_, stack_print_, reduce_print_, destruct_, pop)
8497 (report_syntax_error_, translate_): Rename as...
8498 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
8499 (yypop_, yyreport_syntax_error_, yytranslate_): this.
8500
8501 2004-12-15 Akim Demaille <akim@epita.fr>
8502
8503 * data/lalr1.cc (lex_): Rename as...
8504 (yylex_): this.
8505 Move the trace here.
8506 Take the %name-prefix into account.
8507 Reported by Alexandre Duret-Lutz.
8508
8509 2004-12-15 Akim Demaille <akim@epita.fr>
8510
8511 Simplify the C++ parser constructor.
8512
8513 * data/lalr1.cc (debug_): Rename as...
8514 (yydebug_): so that the parser's internals are always in the yy*
8515 pseudo namespace.
8516 Adjust uses.
8517 (b4_parse_param_decl): Remove the leading comma as it is now only
8518 called as unique argument list.
8519 (Parser::Parser): Remove the constructor accepting a location and
8520 an initial debugging level.
8521 Remove from the other ctor the argument for the debugging level.
8522 (debug_level_type, debug_level, set_debug_level): New.
8523
8524 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
8525 constructor calls.
8526
8527 2004-12-15 Akim Demaille <akim@epita.fr>
8528
8529 Remove b4_root related material: failure experiment
8530 (which goal was to allow to derive from a class).
8531
8532 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
8533 definitions and uses.
8534
8535 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
8536
8537 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
8538 not 2, since it's not portable to subtract 1 from the start of an
8539 array. The new item 0 is never set or used. All uses changed.
8540
8541 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
8542 the default definition of YYLLOC_DEFAULT. Problem reported
8543 by Frank Heckenbach.
8544
8545 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
8546
8547 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
8548 the normal case and one for the error case. Just use the
8549 first one uniformly. Problem reported by Frank Heckenbach.
8550 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
8551 use exactly the same macro in both places.
8552 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
8553 so that the normal-case YYRHSLOC works for the error case too.
8554 All uses changed.
8555 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
8556 (YYLLOC_DEFAULT): Use the same macro as glr.c.
8557 * doc/bison.texinfo (Location Default Action): Don't claim that
8558 we have an array of locations. Use the same macro for both glr
8559 and lalr parsers. Mention YYRHSLOC. Mention what happens when
8560 the index is 0.
8561
8562 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8563
8564 * HACKING: Update email addresses to send announcements to.
8565
8566 * configure.ac (AC_INIT): Bump version to 1.875f.
8567
8568 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
8569
8570 * NEWS: Version 1.875e.
8571 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
8572
8573 * src/scan-skel.l: Include "complain.h", for "fatal".
8574
8575 * src/relation.h (relation_print, relation_digraph):
8576 Relation sizes are of type relation_node, not size_t (this is
8577 merely a doc fix, since the two types are equivalent).
8578 (relation_transpose): Relation sizes are of type relation_node,
8579 not int.
8580 * src/relation.c: Likewise.
8581 (top, infinity): Now of type relation_node, not int.
8582 (traverse, relation_transpose): Use relation_node, not int.
8583
8584 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
8585 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
8586 (yyparse): Remove unused local introduced in 2004-10-25 patch.
8587
8588 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
8589 specifying whether the test should be skipped. Use it tp
8590 specify that the [%defines %skeleton "lalr1.cc"] tests currently
8591 fail on some hosts, and should be skipped.
8592
8593 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
8594
8595 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
8596 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
8597 unless otherwise specified below.
8598
8599 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
8600 to allocate kernel_base, kernel_items, kernel_size, since
8601 they needn't be initialized to 0.
8602 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
8603 * src/closure.c (new_closure): Likewise, for itemset.
8604 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
8605 * src/lalr.c (set_goto_map): Likewise, for temp_map.
8606 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
8607 (build_relations): Likewise for edge, states1, includes.
8608 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
8609 * src/reader.c (packgram): Likewise, for ritem, rules.
8610 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
8611 * src/relation.c (relation_digraph): Likewise for VERTICES.
8612 (relation_transpose): Likewise for new_R, end_R.
8613 * src/symtab.c (symbols_token_translations_init): Likewise for
8614 token_translations.
8615 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
8616 (token_actions): Likewise for yydefact, actrow, conflrow,
8617 conflict_list.
8618 (save_column): Likewise for froms[symno], tos[symno].
8619 (goto_actions): Likewise for state_count.
8620 (pack_table): Likewise for base, pos, check.
8621 (tables_generate): Likewise for width.
8622
8623 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
8624 for initial core. Just have a separate core, so we needn't worry
8625 about whether kernel_size and kernel_base are initialized.
8626
8627 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
8628 kernel_size, kernel_items): Remove unnecessary initialization.
8629 * src/conflicts.c (conflicts): Likewise.
8630 * src/derives.c (derives): Likewise.
8631 * src/muscle_tablc (muscle_insert): Likewise.
8632 * src/relation.c (relation_digraph): Likewise.
8633 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
8634 conflrow, conflict_table, conflict_list, table, check):
8635 Likewise.
8636
8637 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
8638 This is because all callers pass unsigned int.
8639 * src/closure.h (new_closure): Likewise.
8640
8641 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
8642 (build_relations): Initialize includes[i] in all cases.
8643 * src/reader.c (packgram): Always initialize rules[ruleno].prec
8644 and rules[ruleno].precsym. Initialize members in order.
8645 * src/relation.c (relation_transpose): Always initialize new_R[i]
8646 and end_R[i].
8647 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
8648
8649 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
8650 conflict_list[0] was always 0, but now it isn't initialized.
8651
8652 * src/table.c (table_grow): When conflict_table grew, the grown
8653 area wasn't cleared. Fix this.
8654
8655 * lib/.cvsignore: Add strdup.c, strdup.h.
8656 * m4/.cvsignore: Add strdup.m4.
8657
8658 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
8659
8660 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
8661 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
8662 GOTO_NUMBER_MAXIMUM, since we occasionally compute
8663 ngotos + 1 without checking for overflow.
8664 (build_relations): Use END_NODE, not -1, to denote end of edges.
8665 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
8666 build_relations): Use goto_number, not int, for goto numbers.
8667 * src/tables.c (save_column, default_goto): Likewise.
8668
8669 2004-11-23 Akim Demaille <akim@epita.fr>
8670
8671 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
8672 of #defining from yystype.
8673 Don't typedef yystype, C++ does not need it.
8674 This lets it possible to forward declare it as union.
8675
8676 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
8677
8678 * bootstrap (gnulib_modules): Add extensions.
8679 Problem reported by Jim Meyering.
8680
8681 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
8682
8683 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
8684 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
8685 src/system.h, src/tables.c: XFREE -> free, to accommodate
8686 recent change to gnulib xalloc.h.
8687 Problem reported by Jim Meyering.
8688
8689 2004-11-17 Akim Demaille <akim@epita.fr>
8690
8691 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
8692
8693 2004-11-17 Akim Demaille <akim@epita.fr>,
8694 Alexandre Duret-Lutz <adl@gnu.org>
8695
8696 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
8697 changes.
8698 (YYCDEBUG): Adjust.
8699 Use it instead of cdebug_.
8700 (Parser::debug_stream, Parser::set_debug_stream): New.
8701 (Parser::symprint_): Define cdebug_ for temporary backward
8702 compatibility.
8703 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
8704 debug_stream ().
8705
8706 2004-11-17 Akim Demaille <akim@epita.fr>
8707
8708 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
8709 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
8710 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
8711 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8712
8713 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
8714
8715 * data/glr.c (yyloc_default): Remove; not used.
8716 Problem reported by Frank Heckenbach.
8717
8718 2004-10-25 Akim Demaille <akim@epita.fr>
8719
8720 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
8721 Introduce another definition to address simple location arrays.
8722 (yyGLRStack): New member: yyerror_range.
8723 (yyrecoverSyntaxError, yyparse): Update it.
8724 (yyrecoverSyntaxError): Use it when shifting the error token to
8725 have an accurate range, equivalent to the one computed by both
8726 yacc.c and lalr1.cc.
8727 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
8728 that column numbers start at column 0, as per GNU Coding
8729 Standards, the others tests, and the doc.
8730 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
8731 Adjust to the above change (first column is 0).
8732 And adjust the location of the "<error>", now covering the whole
8733 line.
8734
8735 2004-10-22 Akim Demaille <akim@epita.fr>
8736 and Paul Eggert <eggert@cs.ucla.edu>
8737
8738 Remove some arbitrary limits on goto numbers and relations.
8739 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
8740 initial values, since they're never used.
8741 (set_goto_map): ngotos is now unsigned, so test for overflow
8742 by seeing whether it wraps around to zero.
8743 * src/lalr.h (goto_number): Now size_t, not short int.
8744 (GOTO_NUMBER_MAXIMUM): Remove.
8745 * src/relation.c (relation_print, traverse, relation_transpose):
8746 Check for END_NODE rather than looking at sign.
8747 * src/relation.h (END_NODE): New macro.
8748 (relation_node): Now size_t, not short int.
8749
8750 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
8751
8752 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
8753 keyword, not an identifier. Problem reported by Baron Schwartz in
8754 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
8755
8756 2004-10-11 Akim Demaille <akim@epita.fr>
8757
8758 * src/symtab.c (symbol_check_alias_consistency): Also check
8759 type names, destructors, and printers.
8760 Reported by Alexandre Duret-Lutz.
8761 Recode the handling of associativity and precedence in terms
8762 of symbol_precedence_set.
8763 Accept no redeclaration at all, not even equal to the previous
8764 value.
8765 (redeclaration): New.
8766 Use it to factor redeclaration complaints.
8767 (symbol_make_alias): Don't set the type of the alias, let
8768 symbol_check_alias_consistency do it as for other features.
8769 * src/symtab.h (symbol): Add new member prec_location, and
8770 type_location.
8771 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
8772 * tests/input.at (Incompatible Aliases): New.
8773
8774 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
8775
8776 .cvsignore fixes to accommodate gnulib changes,
8777 and the practice of naming build directories "_build".
8778 * .cvsignore: Add "_*". Sort.
8779 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8780 * m4/.cvsignore: Add "*_gl.m4".
8781
8782 2004-10-06 Akim Demaille <akim@epita.fr>
8783
8784 * src/parse-gram.y (add_param): Fix the truncation of trailing
8785 spaces.
8786
8787 2004-10-05 Akim Demaille <akim@epita.fr>
8788
8789 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8790 whether the reducion was empty or not. This leaves room to
8791 improve the use of YYLLOC_DEFAULT in such a case.
8792 lalr1.cc is still experimental, so changing this is acceptable.
8793 And finally, there are probably not many users who changed the
8794 handling of locations in GLR, so changing is admissible too.
8795
8796 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8797 empty reduction, set @$ to an empty location ending the previously
8798 stacked symbol.
8799 Adjust uses to make sure the code is triggered on empty
8800 reductions.
8801 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8802 expected output: empty reductions have empty locations.
8803
8804 2004-09-29 Akim Demaille <akim@epita.fr>
8805
8806 * data/lalr1.cc: Move towards a more standard C++ coding style
8807 for templates: Class < T > -> Class<T>.
8808
8809 2004-09-29 Akim Demaille <akim@epita.fr>
8810
8811 * data/lalr1.cc: Reinstall the former ctor, for sake of
8812 compatibility, but warn it will be removed.
8813 Move towards a more standard C++ coding style (i.e., type *var ->
8814 type* var).
8815
8816 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8817
8818 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8819 since it's less likely to work if NULs are involved in the future.
8820
8821 2004-09-27 Akim Demaille <akim@epita.fr>
8822
8823 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8824
8825 2004-09-27 Akim Demaille <akim@epita.fr>
8826
8827 * data/lalr1.cc (b4_parse_param_decl_1): New.
8828 (b4_parse_param_decl): Use it to have different names between attribute
8829 and argument names.
8830 (b4_cc_constructor_call): Likewise.
8831
8832 2004-09-24 Akim Demaille <akim@epita.fr>
8833
8834 * src/parse-gram.y (add_param): Strip the leading and trailing
8835 blanks from a formal argument declaration.
8836 (YY_LOCATION_PRINT): New.
8837
8838 2004-09-24 Akim Demaille <akim@epita.fr>
8839
8840 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8841 after the location.
8842
8843 2004-09-24 Akim Demaille <akim@epita.fr>
8844
8845 * doc/bison.texinfo (Table of Symbols): Sort.
8846
8847 2004-09-21 Akim Demaille <akim@epita.fr>
8848
8849 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8850 the useless parentheses.
8851 Suggested by Paul Eggert.
8852
8853 2004-09-20 Akim Demaille <akim@epita.fr>
8854
8855 Let the initial-action act on the look-ahead, and use it for the
8856 "initial push" (corresponding to an hypothetical beginning-of-file).
8857 And let lalr1.cc honor %initial-action.
8858
8859 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8860 example.
8861 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8862 (Parser::Parser): Remove the ctor that used to initialize it.
8863 (Parser::parse): Like in the other skeletons, issue the "starting
8864 parse" message before any action.
8865 Honor %initial-action.
8866 Initialize the stacks with the lookahead.
8867 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8868 look-ahead.
8869 Push them in the stacks.
8870 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8871
8872 2004-09-20 Akim Demaille <akim@epita.fr>
8873
8874 * doc/bison.texinfo (Initial Action Decl): New.
8875
8876 2004-09-20 Akim Demaille <akim@epita.fr>
8877
8878 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8879 clearer criterion to define it.
8880 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8881 When reducing on an empty RHS, use the latest stacked location as
8882 location.
8883 yylloc is not always available.
8884 * data/glr.c: Likewise.
8885 Also, honor initial-actions.
8886
8887 2004-09-20 Akim Demaille <akim@epita.fr>
8888
8889 * data/yacc.c (YY_LOCATION_PRINT): New.
8890 Define when we know YYLTYPE's structure, i.e., when the default
8891 YYLLOC_DEFAULT is used.
8892 * data/c.m4 (b4_yysymprint_generate): Use it.
8893 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8894 value of the result.
8895 (error_start_): Replace with...
8896 (error_range_): this location array.
8897 This allows to replace code relying on the implementation of
8898 locations by portable code.
8899 * data/yacc.c (yylerrsp): Replace with...
8900 (yyerror_range): this.
8901 Every time a token is popped, update yyerror_range[0], to have an
8902 accurate location for the error token.
8903 * data/glr.c (YY_LOCATION_PRINT): New.
8904 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8905 deference a pointer.
8906 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8907 report the location in %printers.
8908
8909 * src/scan-skel.l: Instead of abort, report error messages to ease
8910 understanding skeleton scanning failures.
8911
8912 2004-09-16 Akim Demaille <akim@epita.fr>
8913
8914 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8915 (iterator, const_iterator): these, to be more in the C++ spirit.
8916 Also, return reverse iterators so that when displaying the stack
8917 we display its bottom first.
8918 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8919 from yacc.c.
8920 We should probably use vector here though.
8921
8922 2004-09-16 Akim Demaille <akim@epita.fr>
8923
8924 Have more complete shift traces.
8925
8926 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8927 to report Shifts instead of ad hoc YYDPRINTF invocations,
8928 including for the error token.
8929 * data/lalr1.cc (symprint_): Output the location.
8930 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8931 output the location within the %printer.
8932 Activate GLR tests, at least to make sure they compile properly.
8933 They still don't pass though.
8934 * tests/calc.at: Adjust expect verbose output, since now "Entering
8935 state..." is on a different line than the "Shifting" message.
8936
8937 2004-09-08 Akim Demaille <akim@epita.fr>
8938
8939 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8940 Bison directive from the Bison file to the invocation of this
8941 macro, so that these directives are passed to
8942 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8943 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8944 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8945 the extra Bison directives instead of the whole series.
8946 Change the grammar so that there are recoverable errors, and
8947 unrecoverable errors. Now we can have the parser give up before
8948 consuming the whole input. As a result we now can observe that
8949 the lookahead is freed when needed.
8950 Change the parser source to parse argv[1] instead of a hard coded
8951 string.
8952 Simplify yylex, and give a value and location to EOF.
8953 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8954 passed directives already coded in the file.
8955 Add some tests to check the location of "error".
8956 For some tests, the C++ parser is correct, and not yacc.c.
8957 For other tests, they provide different, but unsatisfying, values,
8958 so keep the C++ value so that at least one parser is "correct"
8959 according to the test suite.
8960 (Actions after errors): Remove, this is subsumed by the
8961 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8962
8963 2004-09-06 Akim Demaille <akim@epita.fr>
8964
8965 * data/lalr1.cc: Adjust the indentation of the labels.
8966 (Parser::pop): New.
8967 Use it.
8968
8969 2004-09-06 Akim Demaille <akim@epita.fr>
8970
8971 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8972 argument, an informative message.
8973 Call YY_SYMBOL_PRINT.
8974 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8975 * data/lalr1.cc (destruct_): Likewise.
8976 In addition, no longer depend on b4_yysymprint_generate and
8977 b4_yydestruct_generate to generate these functions, do it "by
8978 hand".
8979
8980 2004-09-03 Akim Demaille <akim@epita.fr>
8981
8982 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8983 invoked, yydestruct the lookahead.
8984 * tests/calc.at (Calculator $1): Update the expected lengths of
8985 traces: there is an added line for the discarded lookahead.
8986 * doc/bison.texinfo (Destructor Decl): Some rewording.
8987 Define "discarded" symbols.
8988
8989 2004-09-02 Akim Demaille <akim@epita.fr>
8990
8991 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8992
8993 2004-09-02 Akim Demaille <akim@epita.fr>
8994
8995 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8996 (YYDSYMPRINTF): Rename as...
8997 (YY_SYMBOL_PRINT): this.
8998 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8999 two.
9000 Use it instead of direct symprint_ calls.
9001 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
9002 one.
9003
9004 2004-09-02 Akim Demaille <akim@epita.fr>
9005
9006 * data/lalr1.cc (b4_yysymprint_generate): New.
9007 (symprint_): New member function, defined when YYDEBUG.
9008 Use it consistently instead of token/nterm debugging output by
9009 hand.
9010 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
9011 %printer calls to use cdebug_ when using lalr1.cc.
9012
9013 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9014
9015 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
9016 with #ifdef YYDEBUG.
9017
9018 2004-08-26 Akim Demaille <akim@epita.fr>
9019
9020 * doc/bison.texinfo (Implementing Loops): Rename as...
9021 (Implementing Gotos/Loops): this.
9022
9023 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
9024
9025 Adjust to latest gnulib.
9026 * bootstrap (gnulib_modules): Add xalloc-die.
9027 Set LC_ALL=C so that file names sort consistently.
9028 Prefer the gnulib copies of gettext.m4, glibc21.m4,
9029 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
9030 uintmax_t.m4, ulonglong.m4.
9031 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
9032 po.m4 since we are now using _gl.m4 instead.
9033
9034 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
9035
9036 * src/scan-action.l: Remove. Scanning of semantic actions is
9037 handled in scan-gram.l.
9038
9039 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
9040
9041 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
9042
9043 * src/location.h (struct): The file member is a uniqstr.
9044 (equal_boundaries): Use UNIQSTR_EQ for comparison.
9045
9046 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
9047
9048 Fix bug with non-%union parsers that have printers or destructors,
9049 which led to a Bison core dump. Reported by Peter Fales in
9050 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
9051
9052 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
9053 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
9054 not to our own type.
9055 * src/output.c (symbol_destructors_output, symbol_printers_output):
9056 Don't assume %union.
9057 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
9058 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
9059 UNION-FLAG. All callers changed.
9060 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
9061 Use type char, not unsigned int, when declaring an array of char;
9062 this lets us remove a cast.
9063 (Printers and Destructors): Add non-%union test cases.
9064
9065 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9066
9067 * doc/bison.texinfo: Minor editorial changes, mostly to the new
9068 GLR writeups. E.g., avoid frenchspacing and the future tense,
9069 change "lookahead" to "look-ahead", and change "wrt" to "with
9070 respect to".
9071
9072 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9073
9074 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
9075 New sections, split off from the GLR Parsers section. Put the new
9076 Simple GLR Parser near the start of the GLR section, for clarity.
9077 Rewrite connective text.
9078
9079 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
9080
9081 * doc/bison.texinfo (Simple GLR Parsers): New section.
9082
9083 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
9084
9085 * NEWS, TODO, doc/bison.texinfo:
9086 Use "look-ahead" instead of "lookahead", to be consistent.
9087 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
9088 while we're fixing "look-ahead".
9089 * src/conflicts.c (shift_set): Renamed from shiftset.
9090 (look_ahead_set): Renamed from lookaheadset.
9091 * src/print.c: Likewise.
9092 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
9093 name for "lookahead".
9094 (report_types, usage): Likewise.
9095 * src/getargs.h (report_look_ahead_tokens): Renamed from
9096 report_lookaheads.
9097 * src/lalr.c (compute_look_ahead_tokens): Renamed from
9098 compute_lookaheads.
9099 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
9100 (look_ahead_tokens_print): Renamed from lookaheads_print.
9101 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
9102 state_rule_lookaheads_print.
9103 * src/state.h: Likewise.
9104 (reductions.look_ahead_tokens): Renamed from lookaheads.
9105 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
9106 AT_DATA_LOOKAHEADS_GRAMMAR.
9107
9108 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
9109
9110 * README: Update location of patched M4 distribution.
9111
9112 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
9113
9114 Don't assume the C++ compiler takes the same arguments as the C compiler
9115 (trivial change).
9116 * configure.ac (O0CXXFLAGS): New var.
9117 * tests/atlocal.in (CXXFLAGS): Use it.
9118
9119 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
9120
9121 Fix some "make check" problems with C++ reported by
9122 Albert Chin-A-Young for Tru64 C++ in this thread:
9123 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
9124
9125 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
9126 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9127 Output to a .cc file for C++, not to a .c file.
9128 * tests/calc.at (AT_CHECK_CALC): Likewise.
9129 * tests/regression.at (AT_CHECK_DANCER): Likewise.
9130 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
9131
9132 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
9133
9134 * tests/calc.at, tests/actions.at: Workaround for SGI
9135 C++ compiler. (trivial change)
9136
9137 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
9138
9139 Spent a few hours checking out which prerequisite versions the
9140 current sources actually require. I went all the way back to
9141 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
9142 a seemingly endless set of combinations of versions more recent
9143 than that. The bottom line is that the current sources require
9144 fairly recent versions of the build tools, and it'll be some work
9145 to change this.
9146 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
9147 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
9148 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
9149 Add comments explaining why those particular versions are
9150 currently needed.
9151
9152 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
9153 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
9154 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
9155
9156 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
9157 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
9158
9159 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
9160
9161 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
9162 0.11.5. Suggested by Bruno Haible.
9163 * bootstrap: Remove gettext version checking.
9164
9165 * doc/bison.texinfo (Decl Summary): Also mention that %union
9166 can depend on prerequisite types. Problem reported by Tim
9167 Van Holder.
9168
9169 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
9170
9171 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
9172 * README-alpha: Don't tell people not to package this.
9173
9174 * bootstrap: Don't assume $(...) works; use `...` instead.
9175 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
9176 gettext better.
9177
9178 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
9179 put into the -d output file, and mention what to do if YYSTYPE is
9180 defined as a macro.
9181
9182 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9183
9184 Undo change made earlier today: it caused autopoint to not bring
9185 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
9186 autopoint's.
9187
9188 * bootstrap: Check that gettext version matches what's in
9189 configure.ac. Warn users to ignore robots.txt ERROR 404.
9190 * bootstrap: Undo today's earlier change (logged below).
9191 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
9192
9193 The gettext version checking is causing more trouble than it's
9194 curing; remove it. Problem reported by Paul Hilfinger.
9195
9196 * bootstrap: Issue a warning that one can expect a message
9197 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
9198 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
9199
9200 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
9201
9202 Ensure that the C++ compiler used for testing actually works on a
9203 simple test program; if not, skip the C++-related tests. Problem
9204 reported by Vin Shelton in:
9205 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
9206
9207 * m4/cxx.m4: New file.
9208 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
9209 * tests/atlocal.in (BISON_CXX_WORKS): Add.
9210 * tests/local.at (AT_COMPILE_CXX): Use it.
9211
9212 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9213
9214 * data/glr.c (yylloc): Output this macro even if locations are not
9215 being generated, as the GLR parser needs it even in that case.
9216 Problem reported by Troy A. Johnson
9217 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
9218
9219 * configure.ac (AC_INIT): Update to 1.875e.
9220
9221 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
9222
9223 * NEWS: Version 1.875d.
9224 * configure.ac (AC_INIT): Likewise.
9225 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
9226
9227 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
9228 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
9229 lalr1.cc runs afoul of the first, and the last two are no longer
9230 supported by GCC 3.4.0.
9231 * README: Mention GNU m4 1.4 or later; mention m4 patches.
9232 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
9233
9234 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
9235
9236 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
9237 unsigned int, for compatibility with latest gnulib hash module.
9238 * src/state.c (state_hash, state_hasher): Likewise.
9239 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
9240 * src/uniqstr.c (hash_uniqstr): Likewise.
9241
9242 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
9243
9244 * NEWS: Unescaped newlines are no longer allowed in char & strings.
9245
9246 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
9247 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
9248 character and string literals.
9249 (unexpected_end): New function.
9250 (unexpected_eof): Use it.
9251 (unexpected_newline): New function.
9252 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
9253 actions.
9254
9255 * NEWS: Document %expect-rr.
9256
9257 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
9258 Fix typo by replacing $1 with $option.
9259 Remove more 'intl'-related files.
9260 Don't DEFUN AM_INTL_SUBDIR twice.
9261
9262 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
9263 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
9264 strtoul.c.
9265 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
9266 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
9267 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
9268 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
9269 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
9270 * src/.cvsignore: Add *.output.
9271
9272 * src/parse-gram.y: Put copyright notice inside %{ %} so it
9273 gets copied to the output file.
9274
9275 2004-04-28 Paul Eggert <eggert@twinsun.com>
9276
9277 Get files from the gnulib and po repositories, instead of relying
9278 on them being in our CVS. Upgrade to latest versions of gnulib
9279 and Automake.
9280
9281 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
9282 * bootstrap: Bootstrap from gnulib and po repositories.
9283 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
9284 * README-cvs: Document these changes. Remove version numbers from
9285 mentions of build tools, since they change so often. Mention Flex.
9286
9287 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
9288 (gl_USE_SYSTEM_EXTENSIONS): Add.
9289 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
9290 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
9291 does this for us.
9292 (AC_ISC_POSIX): Remove; we no longer support this
9293 ancient OS, as it gets in the way of latest Autoconf & gnulib.
9294 (AC_HEADER_STDC): Remove: we now assume C89 or better.
9295 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
9296 Do not check for C89 headers, except for locale.h which is used
9297 by the Yacc library and must port to K&R hosts.
9298 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
9299 Do not check for C89 functions, except for setlocale which is
9300 used by the Yacc library.
9301 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
9302 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
9303 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
9304 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
9305 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
9306 AM_GNU_GETTEXT): Remove; now done by:
9307 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
9308 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
9309 for us.
9310
9311 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
9312 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
9313 Define to empty, as gnulib.mk will do the rest for us.
9314 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
9315 for us.
9316 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
9317 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
9318
9319 * src/files.c: Include gnulib's xstrndup.h.
9320
9321 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
9322 (REALLOC): Use xnrealloc, for likewise.
9323 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
9324 (strnlen, memrchr): Remove decls; functions no longer used.
9325 Include <stpcpy.h>.
9326
9327 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
9328 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9329 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
9330 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
9331 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
9332 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
9333 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
9334 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
9335 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
9336 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
9337 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
9338 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9339 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
9340 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
9341 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
9342 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
9343 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
9344 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
9345 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
9346 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
9347 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
9348 Remove, as these files are now generated automatically
9349 by bootstrap or automake.
9350
9351 * po/ChangeLog: Remove: all but one entry was a duplicate
9352 of this file, and I moved that 2000-11-02 entry here.
9353
9354 * config/.cvsignore: Add Makefile, depcomp, install-sh.
9355 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
9356 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
9357 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
9358 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
9359 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
9360 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
9361 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
9362 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
9363 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
9364 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
9365 xstrndup.h.
9366 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
9367 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
9368 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
9369 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
9370 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
9371 * src/.cvsignore: Remove *_.c.
9372
9373
9374 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
9375 support it. (The latest stable gzip doesn't.)
9376
9377 2004-04-27 Paul Eggert <eggert@twinsun.com>
9378
9379 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
9380 case, as stos_ is now used by destructors due to the 2004-02-09
9381 change.
9382
9383 Remove more K&R C support.
9384 * lib/libiberty.y (PARAMS): Remove. All uses removed.
9385 * lib/subpipe.c (errno): Remove decl.
9386 Include <stdlib.h> unconditionally.
9387 (EXIT_FAILURE): Remove macro.
9388 * src/complain.c (vfprintf, strerror): Remove.
9389 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
9390 unconditionally.
9391 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
9392 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
9393 (strchr, strspn, memchr): Remove decls.
9394 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
9395 unconditionally. Do not declare perror.
9396 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
9397 unconditionally.
9398
9399 * src/complain.c (_): Remove useless defn, as system.h defines this.
9400
9401 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
9402 with latest obstack.h.
9403 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
9404 to procedure types, as obstack.h now does that for us.
9405 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
9406
9407 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
9408 so that this include file can stand alone.
9409 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
9410 does this now. Include subpipe.h first after config.h, to
9411 test whether it can stand alone.
9412
9413 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
9414 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
9415 unused declaration.
9416
9417 * tests/synclines.at (%union synch line): Put a dummy member in
9418 the union, because empty unions aren't allowed in C. Caught
9419 by GCC 3.4.0.
9420
9421 2004-04-13 Jim Meyering <jim@meyering.net>
9422
9423 * src/conflicts.c (conflicts_print): Correct format string typo:
9424 use `%%' to produce literal `%'. (trivial change)
9425
9426 2004-03-30 Paul Eggert <eggert@twinsun.com>
9427
9428 * src/getargs.c (version): Update copyright year to 2004.
9429
9430 * data/c.m4 (b4_int_type): Use 'short int' rather than
9431 'short', and similarly for 'long', 'unsigned', etc.
9432 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
9433 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
9434 yy_yypstack, yydumpstack): Likewise.
9435 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
9436 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
9437 Likewise.
9438 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
9439 yy_stack_print, yyparse): Likewise.
9440 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
9441 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
9442 * lib/bitset.c (bitset_print): Likewise.
9443 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
9444 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9445 * lib/bitsetv.c (bitsetv_dump): Likewise.
9446 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
9447 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
9448 Likewise.
9449 * src/LR0.c (allocate_itemsets): Likewise.
9450 * src/gram.h (rule_number, rule): Likewise.
9451 * src/lalr.h (goto_number): Likewise.
9452 * src/nullable.c (nullable_compute): Likewise.
9453 * src/output.c (prepare_rules): Likewise.
9454 * src/relation.c (relation_print, relation_digraph): Likewise.
9455 * src/relation.h (relation_node): Likewise.
9456 * src/state.h (state_number, transitions, errs, reductions,
9457 struct state): Likewise.
9458 * src/symtab.h (symbol_number, struct symbol): Likewise.
9459 * src/tables.c (vector_number, tally, action_number,
9460 default_goto, goto_actions): Likewise.
9461 * tests/existing.at (GNU Cim Grammar): Likewise.
9462 * tests/regression.at (Web2c Actions): Likewise.
9463
9464 * src/output.c (muscle_insert_short_int_table): Renamed from
9465 muscle_insert_short_table. All uses changed.
9466
9467 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9468
9469 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
9470 (declaration): Replace expected_conflicts with expected_sr_conflicts.
9471 Add %expect-rr rule.
9472
9473 * src/scan-gram.l: Recognize %expect-rr.
9474
9475 * src/conflicts.h (expected_sr_conflicts): Rename from
9476 expected_conflicts.
9477 (expected_rr_conflicts): Declare.
9478
9479 * src/conflicts.c (expected_sr_conflicts): Rename from
9480 expected_conflicts.
9481 (expected_rr_conflicts): Define.
9482 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
9483 for GLR parsers.
9484 Use expected_sr_conflicts in place of expected_conflicts.
9485 Warn if expected_rr_conflicts used in non-GLR parser.
9486
9487 * doc/bison.texinfo: Add documentation for %expect-rr.
9488
9489 2004-03-08 Paul Eggert <eggert@gnu.org>
9490
9491 Add support for hex token numbers. Suggested by Odd Arild Olsen in
9492 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
9493
9494 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
9495 in lalr1.cc.
9496 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
9497 * src/scan-gram.l (scan_integer): New function.
9498 ({int}): Use it.
9499 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
9500 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
9501 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
9502 Say "long int", not "long", for uniformity with GNU style.
9503
9504 2004-02-25 Paul Eggert <eggert@twinsun.com>
9505
9506 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
9507 compilers. This fixes a problem with Intel's C++ compiler being
9508 chatty, reported by Guido Trentalancia in
9509 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
9510
9511 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
9512
9513 Support %destructor and merge error locations in lalr1.cc.
9514
9515 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
9516 (Parser::stos_): Define unconditionally.
9517 (Parser::destruct_): New method. Generate its body with
9518 b4_yydestruct_generate.
9519 (Parser::error_start_): New attribute.
9520 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
9521 token which are discarded.
9522 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
9523 error_start_ when erroneous token are discarded.
9524 (Parser::parse) <yyerrlab1>: Compute the location of the error
9525 token so that it covers all the discarded tokens.
9526 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
9527 it can be called with `%skeleton "lalr1.cc"', and do that.
9528
9529 2004-02-02 Paul Eggert <eggert@twinsun.com>
9530
9531 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
9532 $(top_srcdir)/lib and ../lib. This fixes a bug reported
9533 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
9534 There's no need to mention top_builddir since Automake does that
9535 for us.
9536 (INCLUDES): Remove, as Automake says it's obsolescent.
9537 Contents migrated into AM_CPPFLAGS as described above.
9538 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
9539
9540 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9541
9542 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
9543 (yyreportSyntaxError): Handle case where lookahead token is
9544 YYEMPTY.
9545
9546 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9547
9548 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
9549 resulting parsers are compilable with C++.
9550
9551 2003-12-23 Paul Eggert <eggert@twinsun.com>
9552
9553 * config/depcomp, config/install-sh: Sync with Automake 1.8.
9554 * src/output.c (output_skeleton): Rename local var.
9555 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
9556 Bison tokens, as this runs afoul of the 2003-10-07 change that
9557 disallowed NUL bytes in character constants or string literals.
9558
9559 * tests/local.at: Require Autoconf 2.59's Autotest.
9560 * tests/testsuite.at: Don't include local.at, since we now assume
9561 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
9562 including it.
9563 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
9564 multiple inclusion warnings.
9565
9566 2003-12-02 Akim Demaille <akim@epita.fr>
9567
9568 * doc/bison.texinfo (How Can I Reset the Parser): More about start
9569 conditions.
9570 From Bruno Haible.
9571
9572 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
9573
9574 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
9575
9576 2003-10-07 Paul Eggert <eggert@twinsun.com>
9577
9578 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
9579 if testsuite doesn't exist.
9580
9581 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
9582 literals, unfortunately.
9583 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
9584 Complain about NUL bytes in character constants or string literals.
9585
9586 2003-10-05 Paul Eggert <eggert@twinsun.com>
9587
9588 * NEWS: Don't document %no-default-prec, as it's still
9589 too experimental.
9590 * doc/bison.texinfo: Document %no-default-prec only if
9591 the defaultprec flag is set. Normally it's not.
9592
9593 2003-10-04 Paul Eggert <eggert@twinsun.com>
9594
9595 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
9596 non-modifiable lvalue, instead of a modifiable one.
9597 * doc/bison.texinfo (Actions): Document that $$ can
9598 be assigned to. Do not claim that $$ and $N are
9599 array element references: user code should not rely on this.
9600
9601 2003-10-01 Paul Eggert <eggert@twinsun.com>
9602
9603 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
9604 (grammar_declaration): Use it.
9605 * src/scan-gram.l: New token %no-default-prec.
9606 * tests/conflicts.at: Revamp tests to use %no-default-prec.
9607 * NEWS, doc/bison.texinfo: Document the above.
9608
9609 2003-10-01 Akim Demaille <akim@epita.fr>
9610
9611 VCG no longer supports long_straight_phase.
9612
9613 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
9614 * src/print_graph.c (print_graph): Adjust.
9615
9616 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
9617 and Paul Eggert <eggert@twinsun.com>
9618
9619 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
9620 Table of Symbols): Document %default-prec.
9621 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
9622 (grammar_declaration): Set default_prec on %default-prec.
9623 * src/scan-gram.l (%default-prec): New token.
9624 * src/reader.h (default_prec): New flag.
9625 * src/reader.c: Likewise.
9626 (packgram): Handle it.
9627 * tests/conflicts.at (%default-prec without %prec,
9628 %default-prec with %prec, %default-prec 1): New tests.
9629
9630 2003-09-30 Paul Eggert <eggert@twinsun.com>
9631
9632 * tests/testsuite.at: Include local.at, not input.at, fixing
9633 a typo in the 2003-08-25 patch.
9634
9635 2003-08-27 Akim Demaille <akim@epita.fr>
9636
9637 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
9638 GCC warnings.
9639
9640 2003-08-26 Akim Demaille <akim@epita.fr>
9641
9642 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
9643 "<\#" to avoid magic from Gnus when posting parts of this script.
9644
9645 2003-08-26 Akim Demaille <akim@epita.fr>
9646
9647 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
9648 (Parser::parse): here.
9649 Adjust: nerrs and errstatus is now replaced by...
9650 (Parser::nerrs_, Parser::errstatus_): New.
9651
9652 2003-08-25 Akim Demaille <akim@epita.fr>
9653
9654 * config/announce-gen, Makefile.cfg: New.
9655 * Makefile.am: Adjust.
9656 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
9657 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
9658
9659 2003-08-25 Akim Demaille <akim@epita.fr>
9660
9661 When reducing initial empty rules, Bison parser read an initial
9662 location that is not defined. This results in garbage, and that
9663 affects Bison's own parser. Therefore we need (i) to extend Bison
9664 to support a means to initialize this location, and (ii) to use
9665 this CVS Bison to fix CVS Bison's parser.
9666
9667 * src/reader.h, reader.c (epilogue_augment): Remove, replace
9668 with...
9669 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
9670 * src/parse-gram.y: Adjust.
9671 (%initial-action): New.
9672 (%error-verbose): Since we require CVS Bison, there is no reason
9673 not to use it.
9674 * src/scan-gram.l: Adjust.
9675 * src/Makefile.am (YACC): New, to make sure we use our own parser.
9676 * data/yacc.c (yyparse): Use b4_initial_action.
9677
9678 2003-08-25 Akim Demaille <akim@epita.fr>
9679
9680 * doc/bison.texinfo: Don't promote stdout for error messages.
9681
9682 2003-08-25 Akim Demaille <akim@epita.fr>
9683
9684 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
9685 From Alexandre Duret-Lutz.
9686
9687 2003-08-25 Akim Demaille <akim@epita.fr>
9688
9689 Version 1.875c.
9690
9691 2003-08-25 Akim Demaille <akim@epita.fr>
9692
9693 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
9694 Use them.
9695
9696 2003-08-25 Akim Demaille <akim@epita.fr>
9697
9698 * data/lalr1.cc (Parser::reduce_print_): New.
9699 Use it.
9700
9701 2003-08-25 Akim Demaille <akim@epita.fr>
9702
9703 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
9704 error recovery loops. This patch is based on
9705 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
9706 Also, augment the similarity between lalr1.cc and yacc.c.
9707 Note: the locations of error recovery rules are not correct yet.
9708
9709 * data/lalr1.cc: Comment changes to augment the similarity between
9710 lalr1.cc and yacc.c.
9711 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
9712 (yyerrlab1): Remove, but where it used to be (now the bottom part of
9713 yyerrlab), when hitting EOF, pop the whole stack here instead of
9714 merely falling thru the default error handling mechanism.
9715 (yyerrorlab): New label, with the old contents of YYERROR,
9716 plus the following change: pop the stack of rhs corresponding
9717 to the production that invoked YYERROR. That is how Yacc
9718 behaves (required by POSIX).
9719 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
9720 fail.
9721
9722 2003-08-25 Akim Demaille <akim@epita.fr>
9723
9724 Tune local.at so that people can "autom4te -l autotest calc.at -o
9725 calc" for instance, to extract a sub test suite.
9726
9727 * tests/testsuite.at: Move the initialization, Autotest version
9728 requirement, and AT_TESTED invocation into...
9729 * tests/local.at: here.
9730 * tests/testsuite.at: Include it for compatibility with Autoconf
9731 2.57.
9732 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
9733 be ignore.
9734
9735 2003-08-04 Paul Eggert <eggert@twinsun.com>
9736
9737 Rework code slightly to avoid gcc -Wtraditional warnings.
9738 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
9739 The returned value is now stored in *YY0. All callers changed.
9740 * src/output.c (merge_output): Adjust to the above change.
9741
9742 2003-07-26 Paul Eggert <eggert@twinsun.com>
9743
9744 * data/glr.c (YYASSERT): New macro.
9745 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
9746 yyresolveStates, yyprocessOneStack):
9747 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
9748 Derived from a suggestion by Frank Heckenbach.
9749
9750 2003-07-25 Paul Eggert <eggert@twinsun.com>
9751
9752 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
9753 for portability to K&R C (after ansi2knr, presumably). See
9754 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
9755 by Frank Heckenbach, though I have omitted the structure-initialization
9756 part of his glr-knr.diff patch since I recall that the Portable
9757 C Compiler didn't require that change.
9758
9759 Let the user specify how to allocate and free memory.
9760 Derived from a suggestion by Frank Heckenbach in
9761 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
9762 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
9763 All uses of free, malloc, realloc changed to use these macros,
9764 and unnecessary casts removed.
9765 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
9766
9767 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
9768
9769 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
9770 use s.empty() rather than s == "" to test for empty string; see
9771 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
9772 (trivial change)
9773
9774 2003-06-25 Akim Demaille <akim@epita.fr>
9775
9776 * config/depcomp, config/install-sh: Update from masters.
9777
9778 2003-06-20 Paul Eggert <eggert@twinsun.com>
9779
9780 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9781 and return properly parenthesized result.
9782 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9783 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9784 Remove unnecessary parentheses from uses.
9785 * doc/bison.texinfo (Location Default Action): Describe the
9786 conventions for parentheses.
9787
9788 2003-06-19 Paul Eggert <eggert@twinsun.com>
9789
9790 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9791 yyreportTree): Do not assume that size_t is the same width as int,
9792 when printing sizes. Print sizes using an unsigned format.
9793 Problem reported by Frank Heckenbach in
9794 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
9795
9796 Port to Forte Developer 7 C compiler.
9797 * data/glr.c (struct YYLTYPE): If locations are not being used,
9798 declare a single dummy member, as empty structs do not conform
9799 to the C standard.
9800 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9801 the Forte Developer 7 C compiler complains that end-of-loop
9802 code is not reached.
9803
9804 2003-06-17 Paul Eggert <eggert@twinsun.com>
9805
9806 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9807 avoid warnings from picky compilers about redefinition of PARAMS.
9808
9809 2003-06-17 Paul Eggert <eggert@twinsun.com>
9810
9811 Version 1.875b.
9812
9813 * NEWS: Document 1.875b.
9814
9815 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9816 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9817 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9818 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9819 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9820 per recent gettext manual's suggestion.
9821 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9822 Use prototypes, not old-style definitions.
9823 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9824 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9825 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9826 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9827 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9828 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9829 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9830 vbitset_or_and_cmp, vbitset_copy): Likewise.
9831
9832 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9833 Do not include <stdlib.h>.
9834 (PARAMS): Define unconditionally for C89.
9835 (ATTRIBUTE_NORETURN): Remove.
9836 (ATTRIBUTE_UNUSED): Define unconditionally.
9837
9838 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9839 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9840 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9841 * lib/vbitset.c, lib/vbitset.h: New files.
9842 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9843 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9844 from libbitset.
9845
9846 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9847 `How Can I Reset @code{yyparse}', since texinfo does not allow
9848 arbitrary @ in node names.
9849
9850 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9851 shouldn't be needed according to the gettext 0.12.1 documentation
9852 but which seem to be needed anyway: codeset.m4 glibc21.m4
9853 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9854 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9855 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9856
9857 * lib/.cvsignore: Add stdbool.h.
9858 * m4/.cvsignore: Add nls.m4, po.m4.
9859
9860 Upgrade to CVS gnulib.
9861 * stdbool_.h: File renamed from stdbool.h.in.
9862 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9863 AC_HEADER_STDBOOL.
9864 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9865 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9866 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9867 (MOSTLYCLEANFILES): New var.
9868 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9869 (stdbool.h): New rule.
9870 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9871 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9872 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9873 m4/quote.m4: Upgrade to today's gnulib.
9874
9875 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9876 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9877 the tests right now.
9878 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9879 yyerror are declared before use; C99 requires this.
9880
9881 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9882
9883 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9884 first.
9885 (yyrecoverSyntaxError): Correct the logic for setting and testing
9886 yyerrState.
9887 Correct comment on handling EOF.
9888 Allow states with only a default reduction, rather than failing
9889 (I can't quite reconstruct why these were not allowed before).
9890
9891 Fixes to avoid problem that $-N rules in GLR parsers can cause
9892 buffer overruns, corrupting state.
9893
9894 * src/output.c (prepare_rules): Output max_left_semantic_context
9895 definition.
9896 * src/reader.h (max_left_semantic_context): New variable declaration.
9897 * src/scan-gram.l (max_left_semantic_context): Define.
9898 (handle_action_dollar): Update max_left_semantic_context.
9899 * data/glr.c (YYMAXLEFT): New definition.
9900 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9901 (yyresolveAction): Ditto.
9902
9903 Fixes to problems with location handling in GLR parsers reported by
9904 Frank Heckenbach (2003/06/05).
9905
9906 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9907 (YYRHSLOC): Add parentheses, and define only if locations used.
9908 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9909 locations not used.
9910 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9911 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9912
9913 * tests/cxx-type.at: Exercise location information; update tests
9914 to differentiate output with and without locations.
9915 Remove forward declarations of yylex and yyerror---caused errors
9916 because default YYLTYPE not yet defined.
9917 Change semantic actions to compute strings, rather than printing
9918 them directly (to test proper passing of semantics values). Change
9919 output to prefix notation and update test data and expected results.
9920 (yylex): Track locations.
9921 (stmtMerge): Return value rather than printing, and include arguments
9922 in value.
9923
9924 2003-06-03 Paul Eggert <eggert@twinsun.com>
9925
9926 Avoid warnings generated by GCC 2.95.4 when Bison is
9927 configured with --enable-gcc-warnings.
9928 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9929 yy::]b4_parser_class_name[::translate_,
9930 yy::Stack::operator[] (unsigned),
9931 yy::Stack::operator[] (unsigned) const,
9932 yy::Slice::operator[] (unsigned),
9933 yy::Slice::operator[] (unsigned) const):
9934 Rename local vars to avoid warnings.
9935 * tests/glr-regression.at (Improper handling of embedded actions
9936 and $-N in GLR parsers): Remove unused local variable from yylex.
9937 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9938 (void) as arg when not pure, since we now assume C89 when building
9939 Bison. Pacify GCC by using parameter.
9940
9941 2003-06-02 Paul Eggert <eggert@twinsun.com>
9942
9943 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9944 yy::Location::lines, yy::Location::columns): Rename arguments
9945 to avoid shadowing; this removes a warning generated by GCC 3.3.
9946
9947 2003-06-01 Paul Eggert <eggert@twinsun.com>
9948
9949 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9950 to g++, as GCC 3.3 complains if you do it.
9951 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9952 everything that WARNING_CFLAGS has, except omit warnings
9953 not suitable for C++.
9954 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9955 * tests/atlocal.in (CXXFLAGS): New var.
9956 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9957
9958 Fix a GLR parser bug I reported in February; see
9959 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9960 The problem was that GLR parsers did not conform to the C standard,
9961 because actions like { $1 = $2 + $3; } expanded to expressions
9962 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9963 to a local variable. The C standard says that expressions
9964 like (var = f ()) + (var = f ()) have undefined behavior.
9965 Another problem was that GCC sometimes issues warnings that
9966 yyfill and its parameters are unused.
9967
9968 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9969 as possibly unused.
9970 (yyfill): New function.
9971 (YYFILL): Use it.
9972 (yyuserAction): Change type of yynormal to bool, so that it matches
9973 the new yyfill signature. Mark it as possibly unused.
9974
9975
9976 Follow up on a bug I reported in February, where a Bison-generated
9977 parser can loop. Provide a test case and a fix for yacc.c. I
9978 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9979 The original bug report is in:
9980 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9981
9982 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9983 macro's size was becoming unwieldy.
9984 (yyerrlab): Do not discard an empty lookahead symbol, as this
9985 might destroy garbage.
9986 (yyerrorlab): New label, with the old contents of YYERROR,
9987 plus the following change: pop the stack of rhs corresponding
9988 to the production that invoked YYERROR. That is how Yacc
9989 behaves, and POSIX requires this behavior.
9990 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9991 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9992 Define 'alarm' to do nothing if unistd.h is not available.
9993 Add a new rule "exp: '-' error;" to test the above change to
9994 data/yacc.c. Use 'alarm' to abort any test taking longer than
9995 10 seconds, as it's probably looping.
9996 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9997 Also, the new yacc.c generates two fewer diagnostics for an
9998 existing test.
9999
10000 2003-05-24 Paul Eggert <eggert@twinsun.com>
10001
10002 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
10003 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
10004 This fixes a problem reported by John Bowman when the Compaq/HP
10005 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
10006 -ansi -Wall -gall).
10007 * data/yacc.c (union yyalloc): Likewise.
10008 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
10009
10010 Switch from 'int' to 'bool' where that makes sense.
10011
10012 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
10013 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
10014 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
10015 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
10016 Return or accept bool, not int. All callers changed.
10017 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
10018 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
10019 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
10020 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
10021 bitset_or_and_cmp_): Likewise.
10022 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
10023 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
10024 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
10025 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
10026 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
10027 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
10028 bitset_stats_or_and_cmp): Likewise.
10029 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
10030 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
10031 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
10032 ebitset_xor_cmp): Likewise.
10033 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
10034 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
10035 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
10036 lbitset_xor_cmp): Likewise.
10037 * lib/bbitset.h: Include <stdbool.h>.
10038 (struct bitset_vtable): The following members now return bool, not
10039 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
10040 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
10041 or_and_cmp).
10042 * src/conflicts.c (count_rr_conflicts): Likewise.
10043 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
10044 All uses changed.
10045 * lib/ebitset.c (ebitset_obstack_init): Likewise.
10046 * lib/lbitset.c (lbitset_obstack_init): Likewise.
10047 * src/getargs.c (debug_flag, defines_flag, locations_flag,
10048 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10049 graph_flag): Likewise.
10050 * src/getargs.h (debug_flag, defines_flag, locations_flag,
10051 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
10052 graph_flag): Likewise.
10053 * src/output.c (error_verbose): Likewise.
10054 * src/output.h (error_verbose): Likewise.
10055 * src/reader.c (start_flag, typed): Likewise.
10056 * src/reader.h (typed): Likewise.
10057 * src/getargs.c (LOCATIONS_OPTION): New constant.
10058 (long_options, getargs): Use it.
10059 * src/lalr.c (build_relations): Use bool, not int.
10060 * src/nullable.c (nullable_compute): Likewise.
10061 * src/print.c (print_reductions): Likewise.
10062 * src/tables.c (action_row, pack_vector): Likewise.
10063 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
10064 * src/output.c (prepare): Use it.
10065 * src/output.c (token_definitions_output,
10066 symbol_destructors_output, symbol_destructors_output): Use string,
10067 not boolean integer, to keep track of whether to output separator.
10068 * src/print_graph.c (print_core): Likewise.
10069 * src/state.c (state_rule_lookaheads_print): Likewise.
10070
10071 * config/install-sh: Sync from automake 1.7.5.
10072
10073 2003-05-14 Paul Eggert <eggert@twinsun.com>
10074
10075 * src/parse-gram.y (rules_or_grammar_declaration): Require a
10076 semicolon after a grammar declaration, in the interest of possible
10077 future changes to the Bison input language.
10078 Do not allow a stray semicolon at the start of the grammar.
10079 (rhses.1): Allow one or more semicolons after any rule, including
10080 just before "|" as required by POSIX.
10081 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
10082 grammar.
10083
10084 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
10085
10086 %parse-param support for lalr1.cc.
10087
10088 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
10089 b4_cc_constructor_calls, b4_cc_constructor_call,
10090 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
10091 definitions.
10092 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
10093 parse-param arguments.
10094 (yy::b4_parser_class_name): Declare instance variables to
10095 hold parse-param arguments.
10096 * tests/calc.at: s/value/semantic_value/ because value clashes
10097 with a member of yy::b4_parser_class_name. Adjust C++ code
10098 to handle %parse-param. Enable %parse-param test in C++.
10099
10100 2003-05-12 Paul Eggert <eggert@twinsun.com>
10101
10102 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
10103 English a bit. Fix fclose typo. Change "const char" to "char
10104 const", and use ANSI C rather than K&R for "main". Suggest
10105 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
10106 and suggest yy_switch_to_buffer.
10107
10108 2003-05-05 Paul Eggert <eggert@twinsun.com>
10109
10110 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
10111 C89. This avoids a diagnostic on compilers that define __STDC__
10112 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
10113 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10114
10115 2003-05-03 Paul Eggert <eggert@twinsun.com>
10116
10117 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
10118 Do not overrun array bounds.
10119 This should fix a bug reported today by Olatunji Oluwabukunmi in
10120 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
10121
10122 2003-04-29 Akim Demaille <akim@epita.fr>
10123
10124 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
10125 * src/getargs.c, src/getargs.h: here, as bool, not int.
10126 (nondeterministic_parser): New.
10127 * src/parse-gram.y, src/scan-gram.l: Support
10128 %nondeterministic-parser.
10129 * src/output.c (prepare): Use nondeterministic_parser instead
10130 of glr_parser where appropriate.
10131 * src/tables.c (conflict_row, action_row, save_row)
10132 (token_actions, token_actions, pack_vector): Ditto.
10133
10134 2003-04-29 Akim Demaille <akim@epita.fr>
10135
10136 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
10137
10138 2003-04-29 Akim Demaille <akim@epita.fr>
10139
10140 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
10141 with %pure-parser and %locations to exercise the patch from Yakov
10142 Markovitch below.
10143
10144 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
10145
10146 * data/yacc.c: (b4_lex_param): Corrected for the case where
10147 %lex-param is provided and %pure-parser isn't.
10148
10149 2003-04-27 Paul Eggert <eggert@twinsun.com>
10150
10151 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
10152 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
10153 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
10154 if it is not defined.
10155 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
10156
10157 2003-04-26 Paul Eggert <eggert@twinsun.com>
10158
10159 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
10160 Declare to be of type suitable for the ninf value itself, not of
10161 type suitable for the corresponding table, since the latter might
10162 be unsigned but the ninf value might be negative. This fixes a
10163 bug reported by Alexandre Duret-Lutz in
10164 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
10165
10166 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
10167 invokes it. We shouldn't invoke it twice because it will attempt
10168 to put error.o in the archive twice. This fixes a glitch reported
10169 by Martin Mokrejs in
10170 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
10171
10172 2003-04-21 Paul Eggert <eggert@twinsun.com>
10173
10174 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
10175 to gnulib.
10176
10177 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
10178
10179 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
10180 Fix obvious typo that results in uncompilable GLR parsers
10181 when both %pure-parser and %locations are used. (trivial change)
10182
10183 2003-04-17 Paul Eggert <eggert@twinsun.com>
10184
10185 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10186 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
10187 Do not insert the expected token via unput, as this runs afoul
10188 of a POSIX-compatibility bug in flex 2.5.31.
10189 All uses changed to BEGIN the parent state,
10190 since we no longer insert the expected token via unput.
10191 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
10192 that is no longer emitted after the above change.
10193
10194 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
10195 the first one. This change is from Paul Hilfinger, and it fixes
10196 regression reported by Werner Lemberg in
10197 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
10198
10199 (resolve_sr_conflict): Don't invoke state_errs_set
10200 unless one or more tokens have been explicitly made errors.
10201 Otherwise, the above change causes Bison to abort.
10202
10203 * tests/existing.at (GNU pic Grammar): New test case, taken from
10204 Lemberg's email.
10205
10206 2003-03-31 Akim Demaille <akim@epita.fr>
10207
10208 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
10209
10210 2003-03-31 Akim Demaille <akim@epita.fr>
10211
10212 * src/output.c (prepare_symbols): Avoid trailing spaces in the
10213 output.
10214
10215 2003-03-31 Akim Demaille <akim@epita.fr>
10216
10217 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
10218 From Paul Hilfinger.
10219
10220 2003-03-29 Akim Demaille <akim@epita.fr>
10221
10222 * m4/error.m4: Do not put under dynamic conditions some code which
10223 expansion is under static control.
10224
10225 2003-03-29 Akim Demaille <akim@epita.fr>
10226
10227 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
10228
10229 2003-03-29 Akim Demaille <akim@epita.fr>
10230
10231 * doc/bison.texinfo (Strings are Destroyed): New.
10232
10233 2003-03-13 Paul Eggert <eggert@twinsun.com>
10234
10235 * .cvsignore: Add configure.lineno.
10236 * src/.cvsignore: Add yacc.
10237 * tests/.cvsignore: Add testsuite.log.
10238 * doc/fdl.texi: Sync with latest FSF version.
10239
10240 2003-03-12 Paul Eggert <eggert@twinsun.com>
10241
10242 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
10243 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
10244 cursor, instead of leaving it undefined. This fixes a bug
10245 reported by Tim Van Holder in
10246 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
10247 * tests/input.at (Torturing the Scanner): Test the scanner on
10248 an empty input file, which was Tim Van Holder's test case.
10249
10250 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
10251 <sys/resource.h> can be included, include sys/time.h and
10252 sys/times.h first, if available. This works around the SunOS
10253 4.1.4 porting bug reported by Bruce Becker in
10254 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
10255
10256 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
10257 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
10258 AC_HEADER_SYS_WAIT.
10259
10260 Merge changes from gnulib. This was prompted because the CVS
10261 snapshot didn't build on Solaris 7 due to strnlen problems.
10262
10263 These changes need to be merged back into gnulib:
10264 * lib/hash.c: Include <stdbool.h> unconditionally.
10265 * m4/onceonly.m4 (m4_quote): New macro.
10266 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
10267 Quote AC_FOREACH variable-expansions properly.
10268 The 2003-01-03 obstack.h change also needs merging.
10269 {end of changes requiring merging}
10270
10271 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
10272 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
10273 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
10274 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
10275 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
10276 New files, imported from gnulib.
10277 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
10278 above.
10279
10280 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
10281 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
10282 gnulib sources.
10283
10284 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
10285 Add.
10286 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
10287 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
10288 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
10289 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
10290 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
10291 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
10292 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
10293 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
10294 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
10295 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
10296 (jm_PREREQ_ARGMATCH): Remove.
10297 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
10298 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
10299
10300 * src/system.h: Include <stdbool.h> unconditionally.
10301
10302 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
10303 assuming at least C89 in the bitset code for some time now.
10304
10305 2003-03-03 Akim Demaille <akim@epita.fr>
10306
10307 * ro.po: New.
10308
10309 2003-03-02 Akim Demaille <akim@epita.fr>
10310
10311 * doc/bison.texinfo (Table of Symbols): Reactivate the
10312 documentation for %lex-param, and %parse-param.
10313
10314 2003-03-02 Akim Demaille <akim@epita.fr>
10315
10316 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
10317 generate verbose error messages.
10318 Use the number of tokens as an upper bound in yytname, as it
10319 cannot be a non terminal.
10320
10321 2003-03-02 Akim Demaille <akim@epita.fr>
10322
10323 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
10324 message.
10325
10326 2003-03-02 Akim Demaille <akim@epita.fr>
10327
10328 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
10329 Use them to exercise yycheck overrun.
10330 Based on Andrew Suffield's grammar.
10331
10332 2003-03-02 Akim Demaille <akim@epita.fr>
10333
10334 Create tests/local.at for Bison generic testing macros.
10335
10336 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
10337 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
10338 This new file.
10339 * tests/calc.at (AT_CHECK_CALC): Adjust.
10340 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
10341 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
10342 * tests/local.at: here.
10343 (AT_COMPILE_CXX): Tags the tests using it as c++.
10344 Ignore the test if CXX is not functional.
10345
10346 2003-03-01 Paul Eggert <eggert@twinsun.com>
10347
10348 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
10349 not loc->end, since loc->end might contain garbage and this leads
10350 to undefined behavior on some platforms.
10351 (id_loc, token_start): Use (IF_LINTed) initial values that do not
10352 depend on *loc, so that the reader doesn't give the the false
10353 impression that *loc is initialized.
10354 (<INITIAL>"%%"): Do not bother setting code_start, since its value
10355 does not survive the return.
10356
10357 2003-03-01 Akim Demaille <akim@epita.fr>
10358
10359 * src/scan-gram.l (code_start): Always initialize it when entering
10360 into yylex, as SC_EPILOGUE is activated *before* the corresponding
10361 yylex invocation. An alternative would be making it static, but
10362 then it starts with the second %%'s beginning, instead of its end.
10363
10364 2003-02-28 Paul Eggert <eggert@twinsun.com>
10365
10366 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
10367 around a UnixWare 7.1.1 porting bug reported by John Hughes in
10368 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
10369
10370 2003-02-26 Paul Eggert <eggert@twinsun.com>
10371
10372 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
10373 Remove Sequent/Pyramid discussion (nobody uses them any more).
10374 Merge VMS and MS-DOS discussion; these ports may well be dead
10375 but let's keep mentioning them for now. Put <> around email
10376 addresses. Add copyright notice.
10377
10378 2003-02-24 Paul Eggert <eggert@twinsun.com>
10379
10380 * data/glr.c (yy_reduce_print): yylineno -> yylno,
10381 to avoid collision with flex use of yylineno.
10382 Problem reported by Bruce Lilly in
10383 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
10384 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10385 * data/yacc.c (yy_reduce_print): Likewise.
10386
10387 * config/depcomp: Sync with Automake 1.7.3.
10388
10389 2003-02-21 Akim Demaille <akim@epita.fr>
10390
10391 * data/lalr1.cc: Use temporary variables instead of casts to
10392 change integer types.
10393 Suggested by Paul Eggert.
10394
10395 2003-02-21 Akim Demaille <akim@epita.fr>
10396
10397 * doc/bison.texinfo: Use "location" consistently to refer to @n,
10398 to avoid confusions with lalr1.cc's notion of Position.
10399 Suggested by Paul Eggert.
10400
10401 2003-02-20 Akim Demaille <akim@epita.fr>
10402
10403 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
10404 before initial_columns.
10405 (location.hh): Use consistent variable names when defining the
10406 operator<<.
10407 Use "last" so that we subtract from Positions, not from unsigned.
10408
10409 2003-02-20 Akim Demaille <akim@epita.fr>
10410
10411 * data/lalr1.cc (position.hh): New subfile, including the extended
10412 and Doxygen'ed documentation of class Position.
10413 (location.hh): Use it.
10414 Document a` la Doxygen.
10415 With the help of Benoit Perrot.
10416
10417 2003-02-20 Akim Demaille <akim@epita.fr>
10418
10419 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
10420 AT_YACC_IF.
10421 Redefine AT_YYERROR_SEES_LOC_IF using it.
10422 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
10423 not defined.
10424 Don't use the location in yy::Parser::error_ and
10425 yy::Parser::print_ when not %locations.
10426 Activate more lalr1.cc tests.
10427
10428 2003-02-19 Akim Demaille <akim@epita.fr>
10429
10430 * data/lalr1.cc: When displaying a line number, be sure to make it
10431 an int.
10432
10433 2003-02-19 Akim Demaille <akim@epita.fr>
10434
10435 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
10436 Remove, useless.
10437 (YYABORT, YYACCEPT, YYERROR): New.
10438 * tests/calc.at: Renable the lalr1.cc test.
10439
10440 2003-02-19 Akim Demaille <akim@epita.fr>
10441
10442 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
10443 error recovery, mixing with/without pops and discarding of the
10444 lookahead.
10445 Exercise YYERROR.
10446 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
10447
10448 2003-02-17 Paul Eggert <eggert@twinsun.com>
10449
10450 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
10451 * tests/testsuite.at (AT_COMPILE): Use them.
10452 This fixes the testsuite problem reported by Robert Lentz in
10453 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
10454
10455 2003-02-12 Paul Eggert <eggert@twinsun.com>
10456
10457 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
10458 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
10459 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
10460 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
10461 Check for malloc failure, for consistency with yacc.c.
10462 (yytname_size): Remove, for consistency with yacc.c.
10463
10464 The bug still remains in data/lalr1.cc, as I didn't have time
10465 to fix it there.
10466
10467 2003-02-06 Akim Demaille <akim@epita.fr>
10468
10469 * configure.ac (GXX): Rename as...
10470 (CXX): this, to keep the original Autoconf semantics.
10471 Require 2.57.
10472 * data/lalr1.cc: Fix b4_copyright invocations.
10473 If YYDEBUG is not defined, don't depend upon name_ being defined.
10474 (location.hh): Include string and iostream.
10475 (Position::filename): New member.
10476 (Position::Position ()): New.
10477 (operator<< (Position)): New.
10478 (operator- (Position, int)): New.
10479 (Location::first, Location::last): Rename as...
10480 (Location::begin, Location::end): these, to mock the conventional
10481 iterator names.
10482 (operator<< (Location)): New.
10483 * tests/atlocal.in (CXX): New.
10484 * tests/testsuite.at (AT_COMPILE_CXX): New.
10485 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
10486 locations in a more synthetic way.
10487 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
10488 lalr1.cc is used.
10489 Adjust the C locations to match those from Emacs: first column is
10490 column 0.
10491 Change all the expected results.
10492 Conform to the GCS: simplify the locations when applicable.
10493 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
10494 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
10495 these CPP macros with the m4 macros new defined by...
10496 (AT_CHECK_PUSHDEFS): this, i.e.:
10497 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
10498 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
10499 New macros.
10500 (AT_CHECK_POPDEFS): Undefine them.
10501 (AT_CHECK_CALC_LALR1_CC): New.
10502 Use it for the first lalr1.cc test.
10503
10504 2003-02-04 Akim Demaille <akim@epita.fr>
10505
10506 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
10507 Location as is defined.
10508
10509 2003-02-04 Akim Demaille <akim@epita.fr>
10510
10511 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
10512 name_ being defined.
10513
10514 2003-02-03 Paul Eggert <eggert@twinsun.com>
10515
10516 * src/gram.h (start_symbol): Remove unused decl.
10517
10518 Use more-consistent naming conventions for local vars.
10519
10520 * src/derives.c (derives_compute): Change type of local var from
10521 int to rule_number.
10522 * src/gram.c (grammar_rules_partial_print): Likewise.
10523 * src/print.c (print_core): Likewise.
10524 * src/reduce.c (reduce_grammar_tables): Likewise.
10525
10526 * src/gram.c (grammar_dump): Change name of item_number *
10527 local var from r to rp.
10528 * src/nullable.c (nullable_compute): Likewise.
10529
10530 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
10531
10532 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
10533 for symbol or symbol_number var.
10534 * src/reader.c (grammar_start_symbol_set): Likewise.
10535 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
10536 Likewise.
10537 * src/state.c (transitions_to): Likewise.
10538 * src/state.h: Likewise.
10539 * src/tables.c (symbol_number_to_vector_number): Likewise.
10540
10541 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
10542 char * var.
10543
10544 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
10545 var.
10546
10547 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
10548 var.
10549
10550 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
10551 Use str, not s, for char * var. Use ch, not c, for character var.
10552 Use size for size var.
10553
10554 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
10555 char * var.
10556 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
10557 uniqstr var.
10558 * src/uniqstr.h: Likewise.
10559
10560 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10561 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10562 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
10563 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
10564 param to have same name as that of enum, so that we don't use
10565 "s" to stand for a non-state.
10566
10567 2003-02-02 Akim Demaille <akim@epita.fr>
10568
10569 * src/scan-skel.l: Scan more than one inert character per yylex
10570 invocation.
10571
10572 2003-02-01 Paul Eggert <eggert@twinsun.com>
10573
10574 Version 1.875a.
10575
10576 * po/LINGUAS: Add ms.
10577
10578 2003-01-30 Akim Demaille <akim@epita.fr>
10579
10580 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
10581
10582 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10583
10584 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
10585 of $1.
10586
10587 Changes in response to error report by S. Eken: GLR mode does not
10588 handle negative $ indices or $ indices in embedded rules correctly.
10589 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
10590
10591 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
10592 (b4_rhs_location): Ditto.
10593 (yyfill): New function to copy from stack tree into array
10594 incrementally.
10595 (yyuserAction): Modify to allow incremental move of semantic values
10596 to rhs array when in GLR mode.
10597 Define YYFILL to use in user-defined actions to fill semantic array
10598 as needed.
10599 Remove dummy use of yystack, as there is now a guaranteed use.
10600 (yydoAction): Modify to allow incremental move of semantic values
10601 to rhs array when in GLR mode.
10602 (yyresolveAction): Ditto.
10603 (yyglrShiftDefer): Update comment.
10604 (yyresolveStates): Use X == NULL for pointers, not !X.
10605 (yyglrReduce): Ditto.
10606 (yydoAction): Ditto
10607
10608 * tests/glr-regr1.at: Rename to ...
10609 * tests/glr-regression.at: Add new regression test for the problems
10610 described above (adapted from S. Eken).
10611 Update copyright notice.
10612 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
10613 * tests/Makefile.am: Ditto.
10614
10615 2003-01-28 Paul Eggert <eggert@twinsun.com>
10616
10617 * data/lalr1.cc: Do not use @output_header_name@ unless
10618 b4_defines_flag is set. This fixes two bugs reported by
10619 Tim Van Holder in
10620 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
10621 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
10622
10623 2003-01-21 Paul Eggert <eggert@twinsun.com>
10624
10625 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
10626 we don't need to worry about yyerrlab1 being reported as an
10627 "unused label" by non-GCC C compilers. The downside is that if
10628 locations are used then a couple of statements are duplicated each
10629 time YYERROR is invoked, but the upside is that the warnings
10630 should vanish.
10631 (yyerrlab1): Move code to YERROR.
10632 (yyerrlab2): Remove. Change uses back to yyerrlab1.
10633 This reverts some of the 2002-12-27 change.
10634
10635 2003-01-17 Paul Eggert <eggert@twinsun.com>
10636
10637 * src/output.c (symbol_printers_output): Fix typo that led
10638 to core dump. Problem reported by Antonio Rus in
10639 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
10640
10641 2003-01-13 Akim Demaille <akim@epita.fr>,
10642 Quoc Peyrot <chojin@lrde.epita.fr>,
10643 Robert Anisko <anisko_r@lrde.epita.fr>
10644
10645 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
10646 when the stacks contain one element, as the loop would otherwise
10647 free the last state, and then use the top state (the one we just
10648 popped). This means that the initial elements will not be freed
10649 explicitly, as is the case in yacc.c; it is not a problem, as
10650 these elements have fake values.
10651
10652 2003-01-11 Paul Eggert <eggert@twinsun.com>
10653
10654 * NEWS: %expect-violations are now just warnings, reverting
10655 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
10656 bootstrapping problem reported by Matthias Klose; see
10657 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
10658 * src/conflicts.c (conflicts_print): Likewise.
10659 * tests/conflicts.at (%expect not enough, %expect too much,
10660 %expect with reduce conflicts): Likewise.
10661 * doc/bison.texinfo (Expect Decl): Document this. Also mention
10662 that the warning is enabled if the number of conflicts changes
10663 (not necessarily increases).
10664
10665 * src/getargs.c (version): Update copyright year.
10666
10667 2003-01-09 Akim Demaille <akim@epita.fr>
10668
10669 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
10670
10671 2003-01-08 Paul Eggert <eggert@twinsun.com>
10672
10673 * Makefile.maint (WGETFLAGS):
10674 New macro, containing "-C off" to disable proxy caches.
10675 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
10676 (rel-check): Use $(WGET) instead of wget.
10677
10678 2003-01-06 Paul Eggert <eggert@twinsun.com>
10679
10680 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
10681 the GLR paper of Scott, Johnstone and Hussain.
10682
10683 2003-01-04 Paul Eggert <eggert@twinsun.com>
10684
10685 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
10686 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
10687 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
10688 (EXTRA_LIBRARIES): New var, for liby.a.
10689 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
10690 (EXTRA_SCRIPTS): New var, for yacc.
10691
10692 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
10693 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
10694 Problem reported by Nelson H. F. Beebe.
10695
10696 2003-01-03 Paul Eggert <eggert@twinsun.com>
10697
10698 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
10699 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
10700 when compiling Bison 1.875's `bitset bset = obstack_alloc
10701 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
10702
10703 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
10704 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
10705 grow to a huge size with typical invocation.
10706
10707 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
10708 Use the pattern recommended by Autoconf 2.57, except also protect
10709 against double-definition.
10710 * src/system.h: Likewise.
10711 Portability issues reported by Nelson H. F. Beebe.
10712
10713 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
10714 All uses changed. Provide a definition in both C and C++.
10715 (yytrue, yyfalse): Define even if defined (__cplusplus).
10716
10717 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
10718 Reported by Nelson H. F. Beebe.
10719
10720 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
10721
10722 2003-01-02 Paul Eggert <eggert@twinsun.com>
10723
10724 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
10725 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
10726 Bug reported by Nelson H. F. Beebe.
10727
10728 2003-01-01 Paul Eggert <eggert@twinsun.com>
10729
10730 * Version 1.875.
10731
10732 2002-12-30 Paul Eggert <eggert@twinsun.com>
10733
10734 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
10735 Moved here from...
10736 (<INITIAL>","): Here. This causes stray "," to be treated
10737 more uniformly.
10738
10739 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
10740 last brace in braced code when not in Yacc mode, for compatibility
10741 with Bison 1.35. This resurrects the 2001-12-15 patch to
10742 src/reader.c.
10743
10744 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
10745 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
10746
10747 2002-12-28 Paul Eggert <eggert@twinsun.com>
10748
10749 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
10750 that of SYM's type. This fixes Debian bug 168069, reported by
10751 Thomas Olsson.
10752
10753 2002-12-28 Paul Eggert <eggert@twinsun.com>
10754
10755 Version 1.75f.
10756
10757 Switch back to the Yacc style of conflict reports, undoing some
10758 of the 2002-07-30 change.
10759 * doc/bison.texinfo (Understanding): Use Yacc style for
10760 conflict reports. Also, use new way of locating rules.
10761 * src/conflicts.c (conflict_report):
10762 Renamed from conflict_report_yacc, removing the old
10763 'conflict_report'. Translate the entire conflict report at once,
10764 so that we don't assume that "," has the same interpretation in
10765 all languages.
10766 (conflicts_output): Use Yacc-style conflict report for each state,
10767 instead of our more-complicated style.
10768 (conflicts_print): Use Yacc-style conflict report, except print
10769 the input file name when not emulating Yacc.
10770 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
10771 Conflicted Reduction, %expect not enough, %expect too much,
10772 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
10773 * tests/existing.at (GNU Cim Grammar): Likewise.
10774 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
10775
10776 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
10777 fatal): Don't invoke fflush; it's not needed and it might even be
10778 harmful for stdout, as stdout might not be open.
10779 * src/reduce.c (reduce_print): Likewise.
10780
10781 2002-12-27 Paul Eggert <eggert@twinsun.com>
10782
10783 Fix a bug where error locations were not being recorded correctly.
10784 This problem was originally reported by Paul Hilfinger in
10785 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
10786
10787 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10788 top of the location stack's error locations.
10789 (yyerrlab): Set it. When discarding a token, push its location
10790 onto yylerrsp so that we don't lose track of the error's end.
10791 (yyerrlab1): Now is only the target of YYERROR, so that we can
10792 properly record the location of the action that failed. For GCC
10793 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10794 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10795 (yyerrlab2): New label, which yyerrlab now falls through to.
10796 Compute the error's location by applying YYLLOC_DEFAULT to
10797 the locations of all the symbols that went into the error.
10798 * doc/bison.texinfo (Location Default Action): Mention that
10799 YYLLOC_DEFAULT is also invoked for syntax errors.
10800 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10801 Error locations include the locations of all the tokens that were
10802 discarded, not just the last token.
10803
10804 2002-12-26 Paul Eggert <eggert@twinsun.com>
10805
10806 * src/files.c: Include quote.h.
10807 (compute_output_file_names): Warn if we detect conflicting
10808 outputs to the same file. This should catch the misunderstanding
10809 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10810
10811 * src/conflicts.c (conflicts_print): If the user specifies
10812 "%expect N", report an error if there are any reduce/reduce
10813 conflicts. This is what the manual says should happen.
10814 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10815 * tests/conflicts.at (%expect with reduce conflicts): New test.
10816
10817 Don't use m4_include on relative file names, as it doesn't work as
10818 desired if there happens to be a file with that name under ".".
10819
10820 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10821 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10822 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10823 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10824 * src/output.c (output_skeleton): Use full path names when
10825 specifying a file to include; don't rely on include path, as
10826 it's unreliable when the working file contains a file with
10827 that name.
10828
10829 2002-12-25 Paul Eggert <eggert@twinsun.com>
10830
10831 Remove obsolete references to bison.simple and bison.hairy.
10832 Problem mentioned by Aubin Mahe in
10833 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10834 * data/glr.c: Comment fix.
10835 * doc/bison.1: Remove references. Also, mention "yacc".
10836
10837 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10838 with -g option.
10839
10840 * src/parse-gram.y (declaration): Use enum "report_states" rather
10841 than its numeric value 1.
10842
10843 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10844 opening a new one. This fixes Debian bug 165349, reported by
10845 Bruce Stephens.
10846
10847 2002-12-24 Paul Eggert <eggert@twinsun.com>
10848
10849 Version 1.75e.
10850
10851 * Makefile.maint (cvs-update): Don't assume that the shell
10852 supports $(...), as Solaris sh doesn't.
10853
10854 * src/parse-gram.y (lloc_default): Remove test for empty
10855 nonterminals at the end, since it didn't change the result.
10856
10857 2002-12-24 Paul Eggert <eggert@twinsun.com>
10858
10859 If the user does not define YYSTYPE as a macro, Bison now declares it
10860 using typedef instead of defining it as a macro. POSIX requires this.
10861 For consistency, YYLTYPE is also declared instead of defined.
10862
10863 %union directives can now have a tag before the `{', e.g., the
10864 directive `%union foo {...}' now generates the C code
10865 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10866 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10867 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10868 instead of `yyltype'.
10869
10870 `yystype' and `yyltype' are now obsolescent macros instead of being
10871 typedefs or tags; they are no longer documented and will be
10872 withdrawn in a future release.
10873
10874 * data/glr.c (b4_location_type): Remove.
10875 (YYSTYPE): Renamed from yystype.
10876 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10877 (struct YYLTYPE): Renamed from struct yyltype.
10878 (YYLTYPE): Renamed from yyltype.
10879 (yyltype, yystype): New (and obsolescent) macros,
10880 for backward compatibility.
10881 * data/yacc.c: Likewise.
10882
10883 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10884 does not specify a union tag. This is for compatibility with
10885 Solaris 9 yacc.
10886
10887 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10888 const *, since it is now modified by stripping surrounding { }.
10889 (current_braced_code): Remove.
10890 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10891 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10892 trailing " {...}". Now of type <chars>.
10893 (grammar_declaration): Adjust to bundled tokens.
10894 (code_content): Remove; stripping is now done by add_param.
10895 (print_token_value): Print contents of bundled tokens.
10896 (token_name): New function.
10897
10898 * src/reader.h (braced_code, current_braced_code): Remove.
10899 (token_name): New decl.
10900
10901 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10902 token_type, not braced_code code_kind. All uses changed.
10903 (SC_PRE_CODE): New state, for scanning after a keyword that
10904 has (or usually has) an immediately-following braced code.
10905 (token_type): New local var, to keep track of which token type
10906 to return when scanning braced code.
10907 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10908 <INITIAL>"%parse-param", <INITIAL>"%printer",
10909 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10910 instead of returning a token type immediately.
10911 (<INITIAL>"{"): Set token type.
10912 (<SC_BRACED_CODE>"}"): Use it.
10913 (handle_action_dollar, handle_action_at): Now returns bool
10914 indicating success. Fail if ! current_rule; this prevents a core dump.
10915 (handle_symbol_code_dollar, handle_symbol_code_at):
10916 Remove; merge body into caller.
10917 (handle_dollar, handle_at): Complain in invalid contexts.
10918
10919 * NEWS, doc/bison.texinfo: Document the above.
10920 * NEWS: Fix years and program names in copyright notice.
10921
10922 2002-12-17 Paul Eggert <eggert@twinsun.com>
10923
10924 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10925 Reporting, Table of Symbols): Omit mentions of %lex-param and
10926 %parse-param from the documentation for now.
10927
10928 2002-12-15 Paul Eggert <eggert@twinsun.com>
10929
10930 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10931 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10932 lookahead symbol, and which sets yychar in parser actions) and it
10933 disagreed with the Bison documentation. Bug
10934 reported by Andrew Walrond.
10935
10936 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10937 as the caller now does that.
10938 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10939 (YYEMPTY): Parenthesize right hand side, since others use it.
10940 (yyparse): Don't assume that our generated code is the only code
10941 that sets yychar.
10942
10943 2002-12-13 Paul Eggert <eggert@twinsun.com>
10944
10945 Version 1.75d.
10946
10947 POSIX requires a "yacc" command.
10948 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10949 (MOSTLYCLEANFILES): Add yacc.
10950 (yacc): New rule.
10951 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10952 as an alias for bison y.
10953
10954 * po/LINGUAS: Add da.
10955
10956 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10957 problem with latest <getopt.h>.
10958 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10959
10960 * doc/fdl.texi: Upgrade to 1.2.
10961 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10962 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10963 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10964 gnulib.
10965 * config/install-sh: Sync with autotools.
10966
10967 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10968 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10969 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10970 locations are requested.
10971 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10972 locations are requested.
10973
10974 2002-12-12 Paul Eggert <eggert@twinsun.com>
10975
10976 Remove unportable casts and storage allocation tricks.
10977 While we're at it, remove almost all casts, since they
10978 usually aren't needed and are a sign of trouble.
10979
10980 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10981
10982 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10983 the pointer DSET returned by malloc; this isn't portable.
10984 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10985 Similarly for DERIVES.
10986 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10987 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10988 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10989
10990 * src/derives.c (derives_compute): Do not bother invoking
10991 int_of_rule_number, since rule numbers are integers.
10992
10993 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10994 rather than XMALLOC (char, N).
10995
10996 * src/files.c (filename_split): Rewrite to avoid cast.
10997
10998 * src/gram.h (symbol_number_as_item_number,
10999 item_number_as_symbol_number, rule_number_as_item_number,
11000 item_number_as_rule_number):
11001 Now inline functions rather than macros, to avoid casts.
11002 * src/state.h (state_number_as_int): Likewise.
11003 * src/tables.c (state_number_to_vector_number,
11004 symbol_number_to_vector_number): Likewise.
11005
11006 * src/gram.h (int_of_rule_number): Remove; no longer used.
11007
11008 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
11009 since the resulting storage is always stored into.
11010
11011 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
11012 where it's needed.
11013
11014 * src/muscle_tab.c (muscle_m4_output):
11015 Now inline. Return bool, not int.
11016 * src/state.c (state_compare): Likewise.
11017 * src/symtab.c (symbol_check_defined,
11018 symbol_check_alias_consistency, symbol_pack, symbol_translation,
11019 hash_compare_symbol, hash_symbol):
11020 Likewise.
11021 * src/uniqstr.c (uniqstr_print): Likewise.
11022 * src/muscle_tab.c (muscle_m4_output_processor):
11023 New function, to avoid casts.
11024 * src/state.c (state_comparator, stage_hasher): Likewise.
11025 * src/symtab.c (symbol_check_defined_processor,
11026 symbol_check_alias_consistency_processor, symbol_pack_processor,
11027 symbol_translation_processor, hash_symbol_comparator,
11028 hash_symbol_hasher): Likewise.
11029 * src/uniqstr.c (uniqstr_print_processor): Likewise.
11030 * src/muscle_tab.c (muscles_m4_output):
11031 Use new functions instead of casting old functions unportably.
11032 * src/state.c (state_hash_new): Likewise.
11033 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
11034 symbols_token_translations_init):
11035 Likewise.
11036 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
11037
11038 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
11039 var instead of casting to long, to avoid casts.
11040 (prepare_states): Use MALLOC rather than alloca, so that we don't
11041 have to worry about alloca.
11042 * src/state.c (state_hash_lookup): Likewise.
11043
11044 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
11045 local var instead of casting to unsigned char, to avoid casts.
11046
11047 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
11048 STATE_ALLOC): Remove.
11049 (transitions_new, errs_new, reductions_new, state_new): Use malloc
11050 rather than calloc, and use offsetof to avoid allocating slightly
11051 too much storage.
11052 (state_new): Initialize all members.
11053
11054 * src/state.c (state_hash): Use unsigned accumulator, not signed.
11055
11056 * src/symtab.c (symbol_free): Remove; unused.
11057 (symbol_get): Remove cast in lhs of assignment.
11058 (symbols_do): Now static. Accept generic arguments, not
11059 hashing-related ones.
11060
11061 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
11062 (symbol_processor): Remove.
11063 (symbols_do): Remove decl; now static.
11064
11065 * src/system.h (alloca): Remove; decl no longer needed.
11066 (<stddef.h>): Include, for offsetof.
11067 (<inttypes.>, <stdint.h>): Include if available.
11068 (uintptr_t): New type, if system lacks it.
11069 (CALLOC, MALLOC, REALLOC): New macros.
11070 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
11071 new macros.
11072
11073 * src/tables.c (table_size): Now int, to pacify GCC.
11074 (table_grow, table_ninf_remap): Use signed table size.
11075 (save_row): Don't bother initializing locals when not needed.
11076 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
11077 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
11078
11079 * src/vcg.h: Correct misspellings.
11080
11081 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
11082
11083
11084 * src/getargs.c (getargs): Don't assume EOF == -1.
11085
11086 2002-12-09 Paul Eggert <eggert@twinsun.com>
11087
11088 Change identifier spellings to avoid collisions with names
11089 that are reserved by POSIX.
11090
11091 Don't use names ending in _t, since POSIX reserves them.
11092 For consistency, remove _e and _s endings -- they're weren't
11093 needed to remove ambiguity. All uses changed.
11094 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
11095 turn was just renamed from struniq_t.
11096 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
11097 which in turn was just renamed from struniq_processor_t.
11098 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
11099 in turn was renamed from hash_compare_struniq_t.
11100 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
11101 (state_list): Renamed from state_list_t.
11102 * src/assoc.h (assoc): Renamed from assoc_t.
11103 * src/conflicts.c (enum conflict_resolution): Renamed from
11104 enum conflict_resolution_e.
11105 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
11106 (rule_list): Renamed from rule_list_t.
11107 * src/getargs.h (enum trace): Renamed from enum trace_e.
11108 (enum report): Renamed from enum report_e.
11109 * src/gram.h (item_number): Renamed from item_number_t.
11110 (rule_number): Renamed from rule_number_t.
11111 (struct rule_s): Remove the "rule_s" part; not used.
11112 (rule): Renamed from rule_t.
11113 (rule_filter): Renamed from rule_filter_t.
11114 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
11115 (goto_list): Renamed from goto_list_t.
11116 * src/lalr.h (goto_number): Renamed from goto_number_t.
11117 * src/location.h (location): Renamed from location_t.
11118 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
11119 and moved here from:
11120 * src/muscle_tab.h (muscle_entry_t): here.
11121 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
11122 (rule_list): Renamed from rule_list_t.
11123 * src/print_graph.c (static_graph): Renamed from graph.
11124 * src/reader.h (braced_code): Renamed from braced_code_t.
11125 Remove brace_code_e tag.
11126 * src/relation.h (relation_node): Renamed from relation_node_t.
11127 (relation_nodes): Renamed from relation_nodes_t.
11128 (relation): Renamed from relation_t.
11129 * src/state.h (state_number): Renamed from state_number_t.
11130 (struct state): Renamed from struct state_s.
11131 (state): Renamed from state_t.
11132 (transitions): Renamed from transitions_t. Unused (and
11133 misspelled) transtion_s tag removed.
11134 (errs): Renamed from errs_t. Unused errs_s tag removed.
11135 (reductions): Renamed from reductions_t. Unused tag
11136 reductions_s removed.
11137 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
11138 (struct symbol_list): Renamed from struct symbol_list_s.
11139 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
11140 (struct symbol): Renamed from struct symbol_s.
11141 (symbol): Renamed from symbol_t.
11142 * src/tables.c (vector_number): Renamed from vector_number_t.
11143 (action_number): Renamed from action_t.
11144 * src/tables.h (base_number): Renamed from base_t.
11145 * src/vcg.h (enum color): Renamed from enum color_e.
11146 (enum textmode): Renamed from enum textmode_e.
11147 (enum shape): Renamed from enum shape_e.
11148 (struct colorentry): Renamed from struct colorentry_s.
11149 (struct classname): Renamed from struct classname_s.
11150 (struct infoname): Renamed from struct infoname_s.
11151 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
11152 (enum decision): Renamed from enum decision_e.
11153 (enum orientation): Renamed from enum orientation_e.
11154 (enum alignment): Renamed from enum alignment_e.
11155 (enum arrow_mode): Renamed from enum arrow_mode_e.
11156 (enum crossing_type): Renamed from enum crossing_type_e.
11157 (enum view): Renamed from enum view_e.
11158 (struct node): Renamed from struct node_s.
11159 (node): Renamed from node_t.
11160 (enum linestyle): Renamed from enum linestyle_e.
11161 (enum arrowstyle): Renamed from enum arrowstyle_e.
11162 (struct edge): Renamed from struct edge.
11163 (edge): Renamed from edge_t.
11164 (struct graph): Renamed from struct graph_s.
11165 (graph): Renamed from graph_t.
11166 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
11167 Rename value_t -> value.
11168 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
11169 value_t_as_yystype -> value_as_yystype.
11170
11171 Don't include <errno.h> in the mainstream code, since it
11172 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
11173 * lib/get-errno.c, lib/get-errno.h: New files.
11174 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
11175 get-errno.c.
11176 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
11177 * src/output.c (output_skeleton): Likewise.
11178 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
11179 instead of errno.
11180 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
11181 Likewise.
11182 (handle_action_dollar, handle_action_at): Likewise.
11183 * src/system.h: Do not include <errno.h>.
11184 (TAB_EXT): Renamed from EXT_TAB.
11185 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
11186
11187 Avoid str[a-z]*, since <string.h> reserves that name space.
11188 Change all instances of "struniq" in names to "uniqstr", and
11189 likewise for "STRUNIQ" and "UNIQSTR".
11190 * src/uniqstr.c: Renamed from src/struniq.c.
11191 * src/uniqstr.h: Renamed from src/struniq.h.
11192 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
11193 * src/files.c (strsuffix): Remove; unused.
11194 (concat2): Renamed from stringappend. Now static.
11195 * src/files.h (strsuffix, stringappend): Remove; unused.
11196 * src/parse-gram.y (<chars>): Renamed from <string>.
11197 (<uniqstr>): Renamed from <struniq>.
11198 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
11199 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
11200 (struct graph_s.expand): Renamed from struct graph_s.stretch.
11201 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
11202 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
11203 (N_EXPAND): Renamed from N_STRETCH.
11204
11205 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
11206 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
11207 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
11208 Remove; unused.
11209 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
11210 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
11211 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
11212 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
11213 (BASE_MAXIMUM): Renamed from BASE_MAX.
11214 (BASE_MINIMUM): Renamed from BASE_MIN.
11215 (ACTION_MAX): Remove; unused.
11216 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
11217 Unnecessary casts removed from above defines.
11218
11219
11220 Fix misspelling in names.
11221 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
11222 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
11223 G_NODE_ALIGNEMENT.
11224
11225
11226 * lib/timevar.c (timevar_report): Renamed from time_report,
11227 for consistency with other names.
11228 * lib/timevar.h (timevar_report): New decl.
11229 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
11230
11231
11232 Sort include-file uses.
11233
11234 Reorder all include files under src to be in the order "system.h".
11235 then the ../lib include files in angle brackets (alphabetized),
11236 then the . include files in double-quotes (alphabetized). Fix
11237 dependency breakages encountered in this process, as follows:
11238 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
11239 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
11240 * src/state.h: Include "symtab.h".
11241
11242 2002-12-08 Paul Eggert <eggert@twinsun.com>
11243
11244 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
11245 since this causes problems when __file__ contains character
11246 sequences like "@" that are treated specially by src/scan-skel.l.
11247 Instead, just use the file's basename. This fixes the bug
11248 reported by Martin Mokrejs in
11249 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
11250
11251 2002-12-06 Paul Eggert <eggert@twinsun.com>
11252
11253 Add support for rules that do not have trailing semicolons, as
11254 POSIX requires. Improve the quality of locations in Bison
11255 diagnostics.
11256
11257 * src/location.c: Include <quotearg.h>.
11258 (empty_location): Now const.
11259 (location_print): New function. Follow the recommendation of the
11260 GNU Coding Standards for locations that span file boundaries.
11261 * src/location.h: Do not include <quotearg.h>; no longer needed.
11262 (boundary): New type.
11263 (location_t): Use it. This allows locations to span file boundaries.
11264 All member uses changed: file -> start.file or end.file (as needed),
11265 first_line -> start.line, first_column -> start.column,
11266 last_line -> end.line, last_column -> end.column.
11267 (equal_boundaries): New function.
11268 (LOCATION_RESET, LOCATION_STEP): Remove.
11269 (LOCATION_PRINT): Remove. All callers changed to use location_print.
11270 (empty_location): Now const.
11271 (location_print): New decl.
11272 * src/parse-gram.y (lloc_default): New function, which handles
11273 empty locations more accurately.
11274 (YYLLOC_DEFAULT): Use it.
11275 (%token COLON): Remove.
11276 (%token ID_COLON): New token.
11277 (rules): Use it.
11278 (declarations, rules): Remove trailing semicolon.
11279 (declaration, rules_or_grammar_declaration):
11280 Allow empty (";") declaration.
11281 (symbol_def): Remove empty actions; no longer needed.
11282 (rules_or_grammar_declaration): Remove trailing semicolon.
11283 (semi_colon.opt): Remove.
11284 * src/reader.h: Include location.h.
11285 (scanner_cursor): New decl.
11286 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
11287 rolling our own.
11288 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
11289 of *loc.
11290 (STEP): Remove. No longer needed, now that adjust_location does
11291 the work. All uses removed.
11292 (scanner_cursor): New var.
11293 (adjust_location): Renamed from extend_location. It now sets
11294 *loc and adjusts the scanner cursor. All uses changed.
11295 Don't bother testing for CR.
11296 (handle_syncline): Remove location arg; now updates scanner cursor.
11297 All callers changed.
11298 (unexpected_end_of_file): Now accepts start boundary of token or
11299 comment, not location. All callers changed. Update scanner cursor,
11300 not the location.
11301 (SC_AFTER_IDENTIFIER): New state.
11302 (context_state): Renamed from c_context. All uses changed.
11303 (id_loc, code_start, token_start): New local vars.
11304 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
11305 processing of Yacc white space and equivalents here.
11306 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
11307 instead of returning ID immediately, since we need to search for
11308 a subsequent colon.
11309 (<INITIAL>"'", "\""): Save token_start.
11310 (<INITIAL>"%{", "{", "%%"): Save code_start.
11311 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
11312 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
11313 BEGIN context_state at end, not INITIAL.
11314 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
11315 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
11316 Return correct token start.
11317 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
11318 the start of a character, string or multiline comment is found.
11319 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
11320 Reduction): Adjust reported locations to match the more-precise
11321 results now expected.
11322 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
11323 * tests/reduce.at (Useless Rules, Reduced Automaton,
11324 Underivable Rules): Likewise.
11325 * tests/regression.at (Invalid inputs): No longer `expecting ";"
11326 or "|"' now that so many other tokens are allowed by the new grammar.
11327
11328 * src/complain.h (current_file): Remove duplicate decl;
11329 current_file is now owned by files.h.
11330 * src/complain.c, src/scan-gram.l: Include files.h.
11331
11332 2002-12-06 Paul Eggert <eggert@twinsun.com>
11333
11334 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
11335 promotes to int; it might be unsigned int.
11336 * data/yacc.c (yy_reduce_print): Likewise.
11337
11338 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
11339 be #defined in the prologue, not in the Bison declarations.
11340 This fixes Debian Bug 102878, reported by Shaul Karl.
11341
11342 2002-12-02 Paul Eggert <eggert@twinsun.com>
11343
11344 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
11345 * lib/strtoul.c: New file, from gnulib.
11346 This fixes a porting bug reported by Peter Klein in
11347 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
11348
11349 2002-11-30 Paul Eggert <eggert@twinsun.com>
11350
11351 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
11352 and put only a forward declaration in the prologue. This is for
11353 consistency with the other scanner helper functions.
11354
11355 Type clashes now generate warnings, not errors, since it
11356 appears that POSIX may allow some grammars with type clashes.
11357 * src/reader.c (grammar_current_rule_check): Warn about
11358 type clashes instead of complaining.
11359 * tests/input.at (Type Clashes): Expect warnings, not complaints.
11360
11361 Add Yacc library, since POSIX requires it.
11362 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
11363 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
11364 * lib/main.c, lib/yyerror.c: New files.
11365
11366 gram_error can be static; it need not be extern.
11367 * src/reader.h (gram_error): Remove decl.
11368 * src/parse-gram.y (gram_error): Now static. Add static decl.
11369 (print_token_value): Omit parameter names from forward decl,
11370 for consistency.
11371
11372 2002-11-29 Paul Eggert <eggert@twinsun.com>
11373
11374 * doc/bison.texinfo: Emphasize that yylex and yyerror must
11375 be declared before being used. E.g., one should typically
11376 declare them in the prologue. Use GNU coding style in examples.
11377 Put "const" consistently after the type it modifies. Mention
11378 that C99 supports "inline". Mention that yyerror traditionally
11379 returns "int".
11380
11381 %parse-param and %lex-param now take just one argument, the
11382 declaration; the argument name is deduced from the declaration.
11383
11384 * doc/bison.texinfo (Parser Function, Pure Calling, Error
11385 Reporting, Table of Symbols): Document this.
11386 * src/parse-gram.y (add_param): New function.
11387 (COMMA): Remove.
11388 (declaration): Implement new rule for %parse-param and %lex-param.
11389 * src/scan-gram.l: "," now elicits a warning, rather than being
11390 a token; this is more compatible with byacc.
11391 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
11392
11393 2002-11-27 Paul Eggert <eggert@twinsun.com>
11394
11395 Rename identifiers to avoid real and potential collisions.
11396
11397 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
11398 to avoid collision with lex macro described by Bruce Lilly in
11399 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
11400 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11401 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
11402 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11403 All uses changed.
11404 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
11405 The name "yycontrol" violates the name space rules, and this stuff
11406 wasn't being used anyway.
11407 (input): Remove action; this stuff wasn't being used.
11408 (gram_error): Rename local variable yylloc -> loc.
11409 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
11410 (YY_DECL): Don't use "yy" at start of local variables.
11411 All uses changed, e.g., yylloc -> loc.
11412 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
11413 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
11414 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
11415 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
11416
11417 * src/parse-gram.y (gram_error): loc is now const *.
11418 * src/reader.h (gram_error): Likewise.
11419
11420 2002-11-24 Paul Eggert <eggert@twinsun.com>
11421
11422 Version 1.75c.
11423
11424 * tests/actions.at (Actions after errors): Use an output format
11425 more similar to that of the Printers and Destructors test.
11426 Test the position of the ';' token too.
11427 (Printers and Destructors): Likewise.
11428 (Printers and Destructors: %glr-parser): Remove for now, to avoid
11429 unnecessarily alarming people when the test fails.
11430
11431 * data/yacc.c (yyerrlab1): Move this label down, so that the
11432 parser does not discard the lookahead token if the user code
11433 invokes YYERROR. This change is required for POSIX conformance.
11434
11435 * lib/error.c: Sync with gnulib.
11436
11437 2002-11-22 Paul Eggert <eggert@twinsun.com>
11438
11439 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
11440 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
11441 * lib/xmalloc.c: Likewise.
11442
11443 2002-11-20 Paul Eggert <eggert@twinsun.com>
11444
11445 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
11446
11447 2002-11-20 Paul Eggert <eggert@twinsun.com>
11448
11449 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
11450 should use `if (! x) abort ();' rather than `assert (x);', and
11451 anyway it's one less thing to worry about configuring.
11452
11453 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
11454 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
11455 and replace all instances of assert with abort.
11456 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
11457 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
11458
11459 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
11460 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
11461 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
11462 hash_find_entry, hash_rehash, hash_insert): Likewise.
11463 * src/conflicts.c (resolve_sr_conflict): Likewise.
11464 * src/lalr.c (set_goto_map, map_goto): Likewise.
11465 * src/nullable.c (nullable_compute): Likewise.
11466 * src/output.c (prepare_rules, token_definitions_output): Likewise.
11467 * src/reader.c (packgram, reader): Likewise.
11468 * src/state.c (state_new, state_free, state_transitions_set,
11469 state_reduction_find): Likewise.
11470 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
11471 symbol_pack): Likewise.
11472 * src/tables.c (conflict_row, pack_vector): Likewise.
11473 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
11474 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
11475 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
11476 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
11477
11478 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
11479 (ARGMATCH_CONSTRAINT): New macro.
11480 (ARGMATCH_ASSERT): Use it.
11481
11482 * src/system.h (verify): New macro.
11483 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
11484 rather than assert.
11485 * src/tables.c (tables_generate): Likewise.
11486
11487 * src/struniq.c (struniq_assert): Now returns void, and aborts
11488 if the assertion is false.
11489 (struniq_assert_p): Remove.
11490 * src/struniq.h: Likewise.
11491
11492 2002-11-18 Paul Eggert <eggert@twinsun.com>
11493
11494 * data/glr.c (yygetLRActions): Replace `yyindex' with
11495 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
11496 This fixes the regression with Sun ONE Studio 7 cc that I reported in
11497 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
11498
11499 2002-11-18 Akim Demaille <akim@epita.fr>
11500
11501 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
11502 space.
11503 From Tim Van Holder.
11504
11505 2002-11-17 Paul Eggert <eggert@twinsun.com>
11506
11507 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
11508 to "SyntaxError" for consistency with my 2002-11-15 change.
11509
11510 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
11511 not define to {}, since this breaks the common use of `YYDPRINTF
11512 ((...));' if a single statement is desired (e.g. before `else').
11513 Work around GCC warnings by surrounding corresponding calls with
11514 {} if needed.
11515 (yyhasResolvedValue): Remove unused function.
11516 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
11517 loop body.
11518 (yyreportSyntaxError): Renamed from yyreportParseError.
11519 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
11520 All uses changed.
11521 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
11522 extern when possible. Remove unused initializations.
11523
11524 2002-11-16 Akim Demaille <akim@epita.fr>
11525
11526 Augment the similarity between GLR and LALR traces.
11527
11528 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
11529 (YY_REDUCE_PRINT): New.
11530 (yyparse): Use them.
11531 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
11532 YYDPRINT here.
11533 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
11534 state reached after the reduction/recovery, since...
11535 (yyparse, yyprocessOneStack): Report the state we are entering in.
11536
11537 2002-11-16 Akim Demaille <akim@epita.fr>
11538
11539 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
11540 Add support for --trace=skeleton.
11541 * src/scan-skel.l: %option debug.
11542 Scan strings of non-@ or \n instead of character by character.
11543 (scan_skel): Handle trace_skeleton.
11544 (QPUTS): New.
11545 (@output_parser_name@, @output_header_name@): ``Restore'' their
11546 support (used to be M4 macros).
11547 * data/yacc.c: Quote larger chunks, a la glr.c.
11548 * data/lalr1.cc: Likewise.
11549 The header guards are no longer available, so use some other
11550 string than `YYLSP_NEEDED'.
11551
11552 2002-11-16 Akim Demaille <akim@epita.fr>
11553
11554 Make the ``Printers and Destructors'' test more verbose, taking
11555 `yacc.c''s behavior as (possibly wrong) reference.
11556
11557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
11558 instead of fprint on stdout.
11559 Set and report the last_line of the symbols.
11560 Consistently display values and locations.
11561
11562 2002-11-16 Paul Eggert <eggert@twinsun.com>
11563
11564 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
11565
11566 2002-11-15 Paul Eggert <eggert@twinsun.com>
11567
11568 * tests/actions.at (Actions after errors): New test case.
11569
11570 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
11571 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
11572 tests/action.at, tests/calc.at, tests/conflicts.at,
11573 tests/cxx-type.at, tests/regression.at:
11574 "parse error" -> "syntax error" for POSIX compatibility.
11575 "parsing stack overflow..." -> "parser stack overflow" so
11576 that code matches Bison documentation.
11577
11578 2002-11-15 Akim Demaille <akim@epita.fr>
11579
11580 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
11581 take two BRACED_CODE, not two string_content.
11582 Free the scanner's obstack when we are done.
11583 (code_content): New.
11584 * tests/calc.at: Adjust.
11585 * doc/bison.texinfo: Adjust.
11586 Also, make sure to include the `,' for these declarations.
11587
11588 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
11589
11590 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
11591 definition; avoids potential autoreconf problems.
11592
11593 2002-11-15 Akim Demaille <akim@epita.fr>
11594
11595 Always check the value returned by yyparse.
11596
11597 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
11598 returned by yyparse.
11599 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
11600 Adjust calls.
11601 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
11602 returned by yyparse.
11603
11604 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11605
11606 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
11607 on input.at test.
11608
11609 2002-11-14 Paul Eggert <eggert@twinsun.com>
11610
11611 * src/output.c (output_skeleton): Call xfopen instead of
11612 duplicating xfopen's body.
11613
11614 Fix bugs reported by Nelson H. F. Beebe in
11615 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
11616
11617 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
11618 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
11619 Group compiler. Instead, use "$CC -E bar.c". Include the .h
11620 file twice in the grammar, as an extra check.
11621
11622 * tests/input.at (Torturing the Scanner): Surround the
11623 backslash-newline tests with "#if 0", to make it less likely that
11624 we'll run into compiler bugs. Bring back solitary \ inside
11625 comment, but add a closing comment to work around HP C bug. Don't
11626 test backslash-newline in C character constant.
11627
11628 2002-11-14 Akim Demaille <akim@epita.fr>
11629
11630 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
11631 status of the compiler.
11632 Calling `exit 1' is no longer needed.
11633 Reported by Nelson H. F. Beebe.
11634
11635 2002-11-14 Akim Demaille <akim@epita.fr>
11636
11637 * tests/atlocal.in (CPPFLAGS): We have config.h.
11638 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
11639 New.
11640 * tests/actions.at, tests/calc.at, tests/conflicts.at,
11641 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
11642 * tests/regression.at, tests/torture.at: Use them for all the
11643 grammars that are to be compiled.
11644 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
11645 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
11646 * doc/bison.texinfo (GLR Parsers): Document `inline'.
11647
11648 2002-11-14 Akim Demaille <akim@epita.fr>
11649
11650 * doc/bison.texinfo: Various formatting changes (alignments in
11651 samples, additional @group/@end group, GCS in samples.
11652 Use @deffn instead of simple @table to define the directives,
11653 macros, variables etc.
11654
11655 2002-11-13 Paul Eggert <eggert@twinsun.com>
11656
11657 Fix some bugs reported by Albert Chin-A-Young in
11658 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
11659
11660 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
11661 -o c"; the HP C compiler chatters during compilation.
11662 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
11663 * tests/headers.at (export YYLTYPE): Likewise.
11664
11665 * tests/input.at (Torturing the Scanner): Remove lines containing
11666 solitary backslashes, as they tickle a bug in the HP C compiler.
11667
11668 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
11669 comments, since they're not portable. Use GNU coding style.
11670
11671 2002-11-13 Akim Demaille <akim@epita.fr>
11672
11673 * data/yacc.c: Leave bigger chunks of quoted text.
11674 (YYDSYMPRINTF): New.
11675 Use it to report symbol activities.
11676 * data/glr.c (YYDSYMPRINTF): New.
11677 Use it.
11678
11679 2002-11-12 Paul Eggert <eggert@twinsun.com>
11680
11681 Version 1.75b.
11682
11683 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
11684 (yyglrReduce): Return yyok, not 0.
11685 This should avoid the enumerated-type warnings reported
11686 by Nelson H. F. Beebe in
11687 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
11688
11689 * lib/bbitset.h (BITSET_INLINE): Remove.
11690 * lib/bitset.h [! BITSET_INLINE]: Remove.
11691 (bitset_set, bitset_reset, bitset_test): Rename local vars
11692 to avoid shadowing warnings by GCC.
11693
11694 * data/glr.c (inline): Remove #define. It's the user's
11695 responsibility to #define it away, just like 'const'.
11696 This fixes one of the bugs reported by Nelson H. F. Beebe in
11697 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
11698
11699 * Makefile.maint (po-check): Scan .l and .y files instead of the
11700 .c and the .h files that they generate. This fixes the bug
11701 reported by Tim Van Holder in:
11702 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
11703 Look for N_ as well as for _. Try to avoid matching #define for
11704 N_ and _.
11705 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
11706 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
11707 * src/scan-gram.l: Revamp regular expressions so that " and '
11708 do not confuse xgettext.
11709
11710 * src/struniq.h (struniq_new): Do not declare the return type
11711 to be 'const'; this violates the C standard.
11712 * src/struniq.c (struniq_new): Likewise.
11713
11714 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
11715
11716 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
11717 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
11718 linker.
11719
11720 2002-11-12 Akim Demaille <akim@epita.fr>
11721
11722 * Makefile.maint: Sync with Autoconf:
11723 (local_updates): New.
11724
11725 2002-11-12 Akim Demaille <akim@epita.fr>
11726
11727 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
11728
11729 2002-11-12 Akim Demaille <akim@epita.fr>
11730
11731 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
11732 locations.
11733
11734 2002-11-12 Akim Demaille <akim@epita.fr>
11735
11736 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
11737 not yyvalue.
11738
11739 2002-11-12 Akim Demaille <akim@epita.fr>
11740
11741 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
11742 Use it to test the GLR parser.
11743
11744 2002-11-12 Akim Demaille <akim@epita.fr>
11745
11746 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
11747 defines it.
11748 * data/glr.c (yystos): New.
11749 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
11750 (YYDSYMPRINT): New.
11751 (yyval): Don't define it, it is handled via M4.
11752 (yyrecoverParseError): Free verbosely the discarded symbols.
11753 * data/yacc.c (yysymprint): Remove, rather...
11754 (b4_yysymprint_generate): invoke.
11755 * data/c.m4 (b4_yysymprint_generate): New.
11756 Accept pointers as arguments, as opposed to the version from
11757 yacc.c.
11758 (b4_yydestruct_generate): Likewise.
11759 * tests/cations.at (Printers and Destructors): Use Bison directives
11760 instead of CPP macros.
11761 Don't rely on internal details.
11762
11763 2002-11-12 Akim Demaille <akim@epita.fr>
11764
11765 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
11766 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
11767 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
11768 it against YYEMPTY and so forth), work on yytoken (i.e., set
11769 it to YYEMPTY etc.).
11770 (yydestruct): Replace with a b4_yydestruct_generate invocation.
11771 (b4_symbol_actions): Remove.
11772 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
11773 for 0, end-of-input.
11774
11775 2002-11-12 Akim Demaille <akim@epita.fr>
11776
11777 * doc/bison.texinfo (Destructor Decl): New.
11778
11779 2002-11-12 Akim Demaille <akim@epita.fr>
11780
11781 * src/tables.c (tables_generate): Use free for pointers that
11782 cannot be NULL, not XFREE.
11783 (pack_vector): Use assert, not fatal, for bound violations.
11784 * src/state.c (state_new): Likewise.
11785 * src/reader.c (reader): Likewise.
11786 * src/lalr.c (set_goto_map): Likewise.
11787 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
11788 the file name.
11789
11790 2002-11-12 Akim Demaille <akim@epita.fr>
11791
11792 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11793 Restore.
11794 * src/scan-gram.l (last_string): Is global to the file, not to
11795 yylex.
11796 * src/parse-gram.y (input): Don't append the epilogue here,
11797 (epilogue.opt): do it here, and free the scanner's obstack.
11798 * src/reader.c (epilogue_set): Rename as...
11799 (epilogue_augment): this.
11800 * data/c.m4 (b4_epilogue): Defaults to empty.
11801
11802 2002-11-12 Akim Demaille <akim@epita.fr>
11803
11804 * src/getargs.c (long_options): Remove duplicates.
11805 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11806 Remove.
11807 * doc/bison.rnh: Remove.
11808 * doc/bison.texinfo (VMS Invocation): Remove.
11809
11810 2002-11-12 Akim Demaille <akim@epita.fr>
11811
11812 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11813 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11814
11815 Use struniq for symbols.
11816
11817 * src/symtab.h (symbol_t): The tag member is a struniq.
11818 (symbol_type_set): Adjust.
11819 * src/symtab.c (symbol_new): Takes a struniq.
11820 (symbol_free): Don't free the tag member.
11821 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11822 (hash_compare_symbol, hash_symbol): these.
11823 Use the fact that tags as struniqs.
11824 (symbol_get): Use struniq_new.
11825 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11826 Returns a strniq.
11827 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11828 and type members are struniqs.
11829 * src/reader.c (get_merge_function)
11830 (grammar_current_rule_merge_set): Adjust.
11831 (TYPE, current_type): Are struniq.
11832
11833 Use struniq for file names.
11834
11835 * src/files.h, src/files.c (infile): Split into...
11836 (grammar_file, current_file): these.
11837 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11838 * src/reduce.c (reduce_print): Likewise.
11839 * src/getargs.c (getargs): Likewise.
11840 * src/complain.h, src/complain.c: Likewise.
11841 * src/main.c (main): Call struniqs_new early enough to use it for
11842 file names.
11843 Don't free the input file name.
11844
11845 2002-11-12 Akim Demaille <akim@epita.fr>
11846
11847 * src/symtab.c (symbol_free): Remove dead deactivated code:
11848 type_name are properly removed.
11849 Don't use XFREE to free items that cannot be NULL.
11850 * src/struniq.h, src/struniq.c: New.
11851 * src/main.c (main): Initialize/free struniqs.
11852 * src/parse-gram.y (%union): Add astruniq member.
11853 (yyprint): Adjust.
11854 * src/scan-gram.l (<{tag}>): Return a struniq.
11855 Free the obstack bit that used to store it.
11856 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11857
11858 2002-11-11 Paul Eggert <eggert@twinsun.com>
11859
11860 Revamp to fix many (but not all) of the C- and M4-related quoting
11861 problems. Among other things, this fixes the Bison bug reported
11862 by Jan Hubicka when processing the Bash grammar; see:
11863 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11864
11865 Use new @ escapes consistently. Represent brackets with @{ and @}
11866 rather than @<:@ and @:>@, since this works a bit better with dumb
11867 editors like vi. Represent @ with @@, since @ is now consistently
11868 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11869 __ofile__, to avoid unexpected expansions. Similarly, use @output
11870 rather than #output.
11871
11872 * data/c.m4 (b4_copyright): Omit file name from comment, since
11873 the file name could contain "*/".
11874 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11875 be quoted. All uses changed.
11876
11877 * data/glr.c: Use new @ escapes consistently.
11878 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11879 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11880 Remove, since they couldn't handle arbitrary characters in file
11881 names.
11882 * data/lalr1.cc: Likewise.
11883 * data/yacc.c: Likewise.
11884
11885 * src/files.c (output_infix): Remove; all uses removed.
11886 * src/files.h: Likewise.
11887
11888 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11889 mishandled funny characters in file names, and anyway it isn't
11890 needed any more.
11891 * data/yacc.c: Likewise.
11892 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11893
11894 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11895 * data/yacc.c: Likewise.
11896
11897 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11898 strings now.
11899 (muscle_init): Quote filename as a C string.
11900 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11901 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11902 * src/output.c (escaped_file_name_output): New function.
11903 (prepare_symbols): Quote tokens for M4.
11904 (prepare): Don't insert output_infix, output_prefix,
11905 output_parser_name, output_header_name; this is now down by scan-skel.
11906 Insert skeleton as a C string.
11907
11908 * src/output.c (user_actions_output, symbol_destructors_output,
11909 symbol_printers_output): Quote filenames for C and M4.
11910 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11911
11912 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11913 escapes other than \\ and \'; this simplifies the code.
11914 (<SC_STRING>): Likewise, for \\ and \".
11915 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11916 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11917 Use new escapes @{ and @} for [ and ].
11918
11919 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11920 them with auto vars.
11921 Switch to new escape scheme, where @ is the escape character uniformly.
11922 Abort if a stray escape character is found. Avoid unbounded input
11923 buffer when parsing non-escaped text.
11924
11925 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11926 __oline__, #output, $@, and @{ do not have unintended meanings.
11927
11928 2002-11-09 Paul Eggert <eggert@twinsun.com>
11929
11930 Fix the test failure due to GCC warnings described in
11931 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11932 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11933 evaluate to 0 if it's impossible for NINF to be in the respective
11934 table.
11935 (yygetLRActions, yyrecoverParseError): Use them.
11936
11937 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11938 counted in the token inserted at end of file. Now takes
11939 location_t *, not location_t, so that the location can be
11940 adjusted. All uses changed.
11941
11942 * tests/regression.at (Invalid inputs): Adjust wording in
11943 diagnostic to match the new behavior.
11944
11945 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11946 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11947 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11948 abort ();'. This reduces the runtime of the "Many lookaheads"
11949 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11950 GCC 3.2.
11951
11952 2002-11-07 Paul Eggert <eggert@twinsun.com>
11953
11954 * src/parse-gram.y (CHARACTER): Remove unused token.
11955 All uses removed.
11956
11957 * src/scan-gram.l: Remove stack option. We no longer use the
11958 stack, since the stack was never deeper than 1; instead, use the
11959 new auto var c_context to record the stacked value.
11960
11961 Remove nounput option. At an unexpected end of file, we now unput
11962 the minimal input necessary to end cleanly; this simplifies the
11963 code.
11964
11965 Avoid unbounded token sizes where this is easy.
11966
11967 (unexpected_end_of_file): New function.
11968 Use it to systematize the error message on unexpected EOF.
11969 (last-string): Now auto, not static.
11970 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11971 (scanner_last_string_free): Remove; not used.
11972 (percent_percent_count): Move decl to just before use.
11973 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11974 not the (never otherwised-used) CHARACTER.
11975
11976 2002-11-07 Akim Demaille <akim@epita.fr>
11977
11978 Let yyerror always receive the msg as last argument, so that
11979 yyerror can be variadic.
11980
11981 * data/yacc.c (b4_yyerror_args): New.
11982 Use it when calling yyerror.
11983 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11984 Use it when calling yyerror.
11985 * doc/bison.texinfo (Error Reporting): Adjust.
11986 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11987 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11988
11989 2002-11-06 Akim Demaille <akim@epita.fr>
11990
11991 #line should have quoted strings.
11992 Ideally, this should be done by m4_quotearg.
11993
11994 * src/scan-skel.l: Include quotearg.h.
11995 Quote __ofile__.
11996 * src/output.c (symbol_printers_output)
11997 (symbol_destructors_output): Quote the file name.
11998
11999 2002-11-06 Akim Demaille <akim@epita.fr>
12000
12001 * tests/regression.at (Invalid inputs): Adjust to the recent
12002 messages.
12003
12004 2002-11-06 Akim Demaille <akim@epita.fr>
12005
12006 Restore --no-lines.
12007 Reported by Jim Kent.
12008
12009 * data/c.m4 (b4_syncline): New.
12010 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
12011 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
12012 * src/output.c (user_actions_output): Likewise.
12013 (prepare): Define 'b4_synclines_flag'.
12014 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
12015
12016 2002-11-06 Akim Demaille <akim@epita.fr>
12017
12018 * src/main.c (main): Free `infile'.
12019 * src/scan-gram.l (handle_syncline): New.
12020 Recognize `#line'.
12021 * src/output.c (user_actions_output, symbol_destructors_output)
12022 (symbol_printers_output): Use the location's file name, not
12023 infile.
12024 * src/reader.c (prologue_augment, epilogue_set): Likewise.
12025
12026 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12027
12028 * src/tables.c (matching_state): Don't allow states to match if
12029 either has GLR conflict entries.
12030
12031 2002-11-05 Paul Eggert <eggert@twinsun.com>
12032
12033 * src/scan-gram.l: Use more accurate diagnostics, e.g.
12034 "integer out of range" rather than "invalid value".
12035 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
12036 accordingly.
12037
12038 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
12039 Also, remove one static variable in the scanner.
12040
12041 * src/scan-gram.l (braces_level): Now auto, not static.
12042 Initialize to zero if the compiler is being picky.
12043 (INITIAL): Clear braces_level instead of incrementing it.
12044 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
12045 as POSIX 1003.1-2001 requires.
12046 * src/system.h (IF_LINT): New macro, taken from coreutils.
12047 * configure.ac: Define "lint" if --enable-gcc-warnings.
12048
12049 2002-11-05 Akim Demaille <akim@epita.fr>
12050
12051 * src/scan-gram.l: When it starts with `%', complain about the
12052 whole directive, not just that `invalid character: %'.
12053
12054 2002-11-04 Akim Demaille <akim@epita.fr>
12055
12056 * Makefile.maint: Update from Autoconf.
12057 (update, cvs-update, po-update, do-po-update): New.
12058
12059 2002-11-04 Akim Demaille <akim@epita.fr>
12060
12061 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
12062 and yyerror.
12063 Have yyerror `use' its arguments.
12064 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
12065 returns true when location & yacc & pure & parse-param.
12066 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
12067
12068 2002-11-04 Akim Demaille <akim@epita.fr>
12069
12070 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
12071 clashes.
12072 * src/scan-gram.l: Use [\'] instead of ['] to pacify
12073 font-lock-mode.
12074 Use complain_at.
12075 Use quote, not quote_n since LOCATION_PRINT no longer uses the
12076 slot 0.
12077
12078 2002-11-03 Paul Eggert <eggert@twinsun.com>
12079
12080 * src/reader.c (get_merge_function, grammar_current_rule_check):
12081 Use consistent diagnostics for reporting type name clashes.
12082 Quote the types with <>, for consistency with Yacc.
12083 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
12084
12085 2002-11-03 Akim Demaille <akim@epita.fr>
12086
12087 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
12088 New.
12089 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
12090 (b4_parse_param): Remove.
12091 Use b4_identification.
12092 Propagate b4_pure_args where needed to pass them to yyerror.
12093 * data/glr.m4 (b4_parse_param): Remove.
12094 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
12095 (b4_lpure_formals): New.
12096 Use b4_identification.
12097 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
12098 b4_user_formals and b4_user_args.
12099 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
12100 (yyreportAmbiguity): When using a pure parser, also need
12101 the location, and the parse-params.
12102 Adjust callers.
12103 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
12104 When using a pure parser, also need the parse-params.
12105 Adjust callers.
12106 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
12107 (%pure-parser + %parse-param) LALR and GLR parsers.
12108 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
12109 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
12110 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
12111 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
12112 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
12113 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
12114 * doc/bison.texinfo: Untabify the whole file.
12115 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
12116 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
12117 (Error Reporting): Adjust to these new directives.
12118 Document %error-verbose, deprecate YYERROR_VERBOSE.
12119
12120 2002-11-03 Akim Demaille <akim@epita.fr>
12121
12122 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
12123 AT_CHECK_CALC_GLR invocations to use % directives, instead of
12124 command line options.
12125 * tests/cxx-type.at: Formatting changes.
12126
12127 2002-11-03 Paul Eggert <eggert@twinsun.com>
12128
12129 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
12130 to count columns correctly, and to check for invalid inputs.
12131
12132 Use mbsnwidth to count columns correctly. Account for tabs, too.
12133 Include mbswidth.h.
12134 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
12135 (extend_location): New function.
12136 (YY_LINES): Remove.
12137
12138 Handle CRLF in C code rather than in Lex code.
12139 (YY_INPUT): New macro.
12140 (no_cr_read): New function.
12141
12142 Scan UCNs, even though we don't fully handle them yet.
12143 (convert_ucn_to_byte): New function.
12144
12145 Handle backslash-newline correctly in C code.
12146 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
12147 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
12148 all uses changed.
12149 (tag, splice): New EREs. Do not allow NUL or newline in tags.
12150 Use {splice} wherever C allows backslash-newline.
12151 YY_STEP after space, newline, vertical-tab.
12152 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
12153
12154 (letter, id): Don't assume ASCII; e.g., spell out a-z.
12155
12156 ({int}, handle_action_dollar, handle_action_at): Check for integer
12157 overflow.
12158
12159 (YY_STEP): Omit trailing semicolon, so that it's more like C.
12160
12161 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
12162 as well as \000. Check for UCHAR_MAX, not 255.
12163 Allow \x with an arbitrary positive number of digits, as in C.
12164 Check for overflow here.
12165 Allow \? and UCNs, for compatibility with C.
12166
12167 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
12168 with quote slot used by complain_at.
12169
12170 * tests/input.at: Add tests for backslash-newline, m4 quotes
12171 in symbols, long literals, and funny escapes in strings.
12172
12173 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
12174 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
12175 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
12176 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
12177 * m4/mbswidth.m4: New file, from GNU coreutils.
12178
12179 * doc/bison.texinfo (Grammar Outline): Document // comments.
12180 (Symbols): Document that trigraphs have no special meaning in Bison,
12181 nor is backslash-newline allowed.
12182 (Actions): Document that trigraphs have no special meaning.
12183
12184 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
12185 no longer used.
12186
12187 2002-11-02 Paul Eggert <eggert@twinsun.com>
12188
12189 * src/reader.c: Don't include quote.h; not needed.
12190 (get_merge_function): Reword warning to be consistent with
12191 type clash diagnostic in grammar_current_rule_check.
12192
12193 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
12194 bug in trigraph handling.
12195
12196 * src/output.c (prepare_symbols): When printing token names,
12197 escape "[" as "@<:@" and likewise for "]".
12198
12199 * src/system.h (errno): Remove declaration, as we are now
12200 assuming C89 or better, and C89 guarantees errno.
12201
12202 2002-10-30 Paul Eggert <eggert@twinsun.com>
12203
12204 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
12205 Check for close failures.
12206 * src/files.h (xfclose): Return void, not int, since it always
12207 returned zero.
12208 * src/files.c (xfclose): Likewise. Report I/O error if ferror
12209 indicates one.
12210 * src/output.c (output_skeleton): Use xfclose rather than fclose
12211 and ferror. xfclose now checks ferror.
12212
12213 * data/glr.c (YYLEFTMOST_STATE): Remove.
12214 (yyreportTree): Use a stack-based leftmost state. This avoids
12215 our continuing battles with bogus warnings about initializers.
12216
12217 2002-10-30 Akim Demaille <akim@epita.fr>
12218
12219 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
12220 #if.
12221
12222 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12223
12224 * tests/glr-regr1.at: New test for reported regressions.
12225 * tests/testsuite.at: Add glr-regr1.at test.
12226 * tests/Makefile.am: Add glr-regr1.at test.
12227
12228 2002-10-24 Paul Eggert <eggert@twinsun.com>
12229
12230 Version 1.75a.
12231
12232 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
12233 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
12234 we use malloc. Don't assume 'A' through 'Z' are contiguous.
12235 Don't assume strdup exists; POSIX says its an XSI extension.
12236 Check for buffer overflow on input.
12237
12238 2002-10-24 Akim Demaille <akim@epita.fr>
12239
12240 * src/output.c (output_skeleton): Don't disable M4sugar comments
12241 too soon: it results in comments being expanded.
12242 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
12243 first output.
12244
12245 2002-10-24 Akim Demaille <akim@epita.fr>
12246
12247 * data/yacc.c (m4_int_type): New.
12248 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
12249 char' as only yacc.c wants K&R portability.
12250 * data/glr.c (yysigned_char): Remove.
12251 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
12252 Reported by Quoc Peyrot.
12253
12254 2002-10-23 Paul Eggert <eggert@twinsun.com>
12255
12256 * src/main.c (main): With --trace=time, report times even if a
12257 non-fatal error occurs. Formerly, the times were reported in some
12258 such cases but not in others.
12259 * src/reader.c (reader): Just return if a complaint has been issued,
12260 instead of exiting, so that 'main' can report times.
12261
12262 2002-10-22 Akim Demaille <akim@epita.fr>
12263
12264 * src/system.h: Include sys/types.
12265 Reported by Bert Deknuydt.
12266
12267 2002-10-23 Paul Eggert <eggert@twinsun.com>
12268
12269 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
12270 Suggested by Art Haas.
12271
12272 2002-10-22 Paul Eggert <eggert@twinsun.com>
12273
12274 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
12275 decl; not needed any more.
12276 * src/main.c (main): Use return to exit, undoing yesterday's change.
12277 The last OS that we could find where this wouldn't work is
12278 SunOS 3.5, and that's too old to worry about now.
12279
12280 * data/glr.c (struct yyltype): Define members even when not
12281 doing locations. This is more consistent with yacc.c, and it
12282 works around the following bug reports:
12283 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
12284 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
12285
12286 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
12287 @acronym consistently. Standardize on "Yacc" instead of "YACC",
12288 "Algol" instead of "ALGOL". Give a bit more history about BNF.
12289
12290 2002-10-22 Akim Demaille <akim@epita.fr>
12291
12292 * data/README: New.
12293
12294 2002-10-21 Paul Eggert <eggert@twinsun.com>
12295
12296 Be consistent about 'bool'; the old code used an enum in one
12297 module and an int in another, and this violates the C standard.
12298 * m4/stdbool.m4: New file, from coreutils 4.5.3.
12299 * configure.ac (AC_HEADER_STDBOOL): Add.
12300 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12301 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
12302 * src/symtab.c (hash_compare_symbol_t): Likewise.
12303 * src/system.h (bool, false, true): Use a definition consistent
12304 with ../lib/hash.c. All uses changed.
12305
12306 * src/complain.c (warning_issued): Renamed from warn_message_count,
12307 so that we needn't worry about integer overflow (!).
12308 Now of type bool. All uses changed.
12309 (complaint_issued): Renamed from complain_message_count; likewise.
12310
12311 * src/main.c (main): Use exit to exit with failure.
12312
12313 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
12314 rather than 1 and 0.
12315 * src/main.c (main): Likewise.
12316 * src/getargs.c (getargs): Likewise.
12317 * src/reader.c (reader): Likewise.
12318
12319 * src/getarg.c (getargs): Remove duplicate code for
12320 "Try `bison --help'".
12321
12322 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
12323 What was that "2" for?
12324
12325 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
12326 * src/getargs.c (usage): Likewise.
12327
12328 * src/getargs.c (getargs): When there are too few operands, report
12329 the last one. When there are too many, report the first extra
12330 one. This is how diffutils does it.
12331
12332 2002-10-20 Paul Eggert <eggert@twinsun.com>
12333
12334 Remove K&R vestiges.
12335 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
12336 * src/complain.c (VA_START): Remove. Assume prototypes.
12337 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
12338 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
12339 fatal): Assume prototypes.
12340 * src/complain.h: Assume prototypes.
12341 * src/system.h (PARAMS): Remove.
12342 Include <limits.h> unconditionally, since it's guaranteeed even
12343 for a freestanding C89 compiler.
12344 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
12345 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
12346
12347 2002-10-20 Akim Demaille <akim@epita.fr>
12348
12349 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
12350 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
12351 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
12352 (yyresolveStates, yyresolveAction, yyresolveStack)
12353 (yyprocessOneStack): Use them.
12354 (yy_reduce_print): New.
12355 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
12356
12357 2002-10-20 Akim Demaille <akim@epita.fr>
12358
12359 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
12360 arguments and output `void'.
12361 (b4_c_function): Rename as...
12362 (b4_c_function_def): this.
12363 (b4_c_function_decl, b4_c_ansi_function_def)
12364 (b4_c_ansi_function_decl): New.
12365 Change the interpretation of the arguments: before `int, foo', now
12366 `int foo, foo'.
12367 * data/yacc.c (yyparse): Prototype and define thanks to these.
12368 Adjust b4_c_function_def uses.
12369 * data/glr.c (yyparse): Likewise, but ANSI only.
12370
12371 2002-10-20 Akim Demaille <akim@epita.fr>
12372
12373 * src/output.c (prepare): Move the definition of `tokens_number',
12374 `nterms_number', `undef_token_number', `user_token_number_max'
12375 to...
12376 (prepare_tokens): Here.
12377 (prepare_tokens): Rename as...
12378 (prepare_symbols): this.
12379 (prepare): Move the definition of `rules_number' to...
12380 (prepare_rules): here.
12381 (prepare): Move the definition of `last', `final_state_number',
12382 `states_number' to...
12383 (prepare_states): here.
12384 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
12385
12386 2002-10-20 Akim Demaille <akim@epita.fr>
12387
12388 * src/tables.h, src/tables.c, src/output.c: Comment changes.
12389
12390 2002-10-20 Akim Demaille <akim@epita.fr>
12391
12392 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
12393 * data/c.m4: here.
12394
12395 2002-10-20 Akim Demaille <akim@epita.fr>
12396
12397 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
12398 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
12399 `pair'.
12400 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
12401 `name' to...
12402 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
12403 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
12404 These.
12405
12406 2002-10-19 Paul Eggert <eggert@twinsun.com>
12407
12408 Do not create a temporary file, as that involves security and
12409 cleanup headaches. Instead, use a pair of pipes.
12410 Derived from a suggestion by Florian Krohm.
12411 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
12412 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
12413 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
12414 (BISON_PREREQ_SUBPIPE): Add.
12415 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
12416 Add subpipe.h, subpipe.c.
12417 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
12418 * po/POTFILES.in: Add lib/subpipe.c.
12419 * src/output.c: Include "subpipe.h".
12420 (m4_invoke): Remove decl.
12421 (scan_skel): New decl.
12422 (output_skeleton): Use pipe rather than temporary file for m4 input.
12423 Check that m4sugar.m4 is readable, to avoid deadlock.
12424 Check for pipe I/O error.
12425 * src/scan-skel.l (readpipe): Remove decl.
12426 (scan_skel): New function, to be used in place of m4_invoke.
12427 Read from stream rather than file.
12428
12429 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
12430 float, as this generates a warning on Solaris 8 + GCC 3.2 with
12431 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
12432 this generates a more-accurate value anyway.
12433
12434 * lib/timevar.c (timervar_accumulate): Rename locals to
12435 avoid confusion with similarly-named more-global.
12436 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
12437
12438 * src/output.c (prepare): Use xstrdup to convert char const *
12439 to char *, to avoid GCC warning.
12440
12441 2002-10-19 Akim Demaille <akim@epita.fr>
12442
12443 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
12444 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
12445 Use them to have `calc.y' ready for %pure-parser.
12446 * data/yacc.c (YYLEX): Pass a yylex return type to
12447 b4_c_function_call.
12448
12449 2002-10-19 Akim Demaille <akim@epita.fr>
12450
12451 Prototype support of %lex-param and %parse-param.
12452
12453 * src/parse-gram.y: Add the definition of the %lex-param and
12454 %parse-param tokens, plus their rules.
12455 Drop the `_' version of %glr-parser.
12456 Add the "," token.
12457 * src/scan-gram.l (INITIAL): Scan them.
12458 * src/muscle_tab.c: Comment changes.
12459 (muscle_insert, muscle_find): Rename `pair' as `probe'.
12460 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
12461 (muscle_entry_s): The `value' member is no longer const.
12462 Adjust all dependencies.
12463 * src/muscle_tab.c (muscle_init): Adjust: use
12464 MUSCLE_INSERT_STRING.
12465 Initialize the obstack earlier.
12466 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
12467 (muscle_pair_list_grow): New.
12468 * data/c.m4 (b4_c_function_call, b4_c_args): New.
12469 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
12470 * tests/calc.at: Use %locations, not --locations.
12471 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
12472
12473 2002-10-19 Akim Demaille <akim@epita.fr>
12474
12475 * src/getargs.c (usage): Take status as argument and exit
12476 accordingly.
12477 Report the traditional `Try ... --help' message when status != 0.
12478 (usage, version): Don't take a FILE * as arg, it is pointless.
12479 (getargs): When there is an incorrect number of arguments, make it
12480 an error, and report it GNUlically thanks to `usage ()'.
12481
12482 2002-10-18 Paul Eggert <eggert@twinsun.com>
12483
12484 * data/glr.c (yyreportParseError): Don't assume that sprintf
12485 yields the length of the printed string, as this is not true
12486 on SunOS 4.1.4. Reported by Peter Klein.
12487
12488 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
12489 * tests/conflicts.at (%nonassoc and eof): Likewise.
12490 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
12491
12492 2002-10-17 Akim Demaille <akim@epita.fr>
12493
12494 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
12495 * src/getargs.c (trace_types, trace_args): Adjust.
12496 * src/reader.c (grammar_current_rule_prec_set)
12497 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
12498 Standardize error messages.
12499 And s/@prec/%prec/!
12500 (reader): Use trace_flag to enable scanner/parser debugging,
12501 instead of an adhoc scheme.
12502 * src/scan-gram.l: Remove trailing debugging code.
12503
12504 2002-10-16 Paul Eggert <eggert@twinsun.com>
12505
12506 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
12507 MUSCLE_TAB_H.
12508
12509 * NEWS: Officially drop support for building Bison with K&R C,
12510 since it didn't work anyway and it's not worth worrying about.
12511 * Makefile.maint (wget_files): Remove ansi2knr.c.
12512 (ansi2knr.c-url_prefix): Remove.
12513 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
12514 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12515 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12516
12517 2002-10-15 Paul Eggert <eggert@twinsun.com>
12518
12519 Stop using the "enum_" trick for K&R-style function definitions;
12520 it confused me, and I was the author! Instead, assume that people
12521 who want to use K&R C compilers (when using these modules in GCC,
12522 perhaps?) will run ansi2knr.
12523
12524 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
12525 All uses of "enum_" changed to "enum ".
12526 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12527 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12528
12529 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
12530 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
12531 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
12532 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
12533 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
12534 abitset_not, abitset_ones, abitset_or, abitset_or_and,
12535 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
12536 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
12537 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
12538 Use function prototypes; this removes the need for declaring
12539 static functions simply to provide their prototypes.
12540 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
12541 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
12542 bitset_count_, bitset_create, bitset_dump, bitset_first,
12543 bitset_free, bitset_init, bitset_last, bitset_next,
12544 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
12545 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
12546 bitset_print, bitset_release_memory, bitset_toggle_,
12547 bitset_type_choose, bitset_type_get, bitset_type_name_get,
12548 debug_bitset): Likewise.
12549 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
12550 * lib/bitset_stats.c (bitset_log_histogram_print,
12551 bitset_percent_histogram_print, bitset_stats_and,
12552 bitset_stats_and_cmp, bitset_stats_and_or,
12553 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
12554 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
12555 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
12556 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
12557 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
12558 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
12559 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
12560 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
12561 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
12562 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
12563 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
12564 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
12565 bitset_stats_zero): Likewise.
12566 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12567 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12568 bitsetv_dump, debug_bitsetv): Likewise.
12569 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
12570 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
12571 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
12572 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
12573 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
12574 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
12575 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
12576 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
12577 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
12578 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
12579 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
12580 Likewise.
12581 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
12582 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
12583 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
12584 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
12585 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
12586 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
12587 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
12588 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
12589 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
12590 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
12591 lbitset_xor_cmp, lbitset_zero): Likewise.
12592
12593 2002-10-14 Akim Demaille <akim@epita.fr>
12594
12595 Version 1.75.
12596
12597 2002-10-14 Akim Demaille <akim@epita.fr>
12598
12599 * tests/Makefile.am (maintainer-check-posix): New.
12600
12601 2002-10-14 Akim Demaille <akim@epita.fr>
12602
12603 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
12604 member.
12605
12606 2002-10-14 Akim Demaille <akim@epita.fr>
12607
12608 * src/tables.c (table_ninf_remap): base -> tab.
12609 Reported by Matt Rosing.
12610
12611 2002-10-14 Paul Eggert <eggert@twinsun.com>
12612
12613 * tests/action.at, tests/calc.at, tests/conflicts.at,
12614 tests/cxx-type.at, tests/headers.at, tests/input.at,
12615 tests/regression.at, tests/synclines.at, tests/torture.at:
12616 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
12617 so that the tests still work even if POSIXLY_CORRECT is set.
12618 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
12619
12620 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
12621 for portability to K&R hosts. Fix typo: signed char is guaranteed
12622 only to 127, not to 128.
12623 * data/glr.c (yysigned_char): New type.
12624 * data/yacc.c (yysigned_char): Likewise.
12625 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
12626
12627 2002-10-13 Paul Eggert <eggert@twinsun.com>
12628
12629 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
12630 true due to limited range of data type" warning from GCC.
12631
12632 * data/c.m4 (b4_token_defines): Protect against double-inclusion
12633 by wrapping enum yytokentype's definition inside #ifndef
12634 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
12635
12636 2002-10-13 Akim Demaille <akim@epita.fr>
12637
12638 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
12639 Un yy- yyrhs to avoid the name clash with the global YYRHS.
12640
12641 2002-10-13 Akim Demaille <akim@epita.fr>
12642
12643 * Makefile.maint: Update from Autoconf 2.54.
12644 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
12645
12646 2002-10-13 Akim Demaille <akim@epita.fr>
12647
12648 * src/print.c (print_state): Separate the list of solved conflicts
12649 from the other items.
12650 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
12651
12652 2002-10-13 Akim Demaille <akim@epita.fr>
12653
12654 Let nondeterministic skeletons be usable with deterministic
12655 tables.
12656
12657 With the patch, GAWK compiled by GCC without -O2 passes its test
12658 suite using a GLR parser driven by LALR tables. It fails with -O2
12659 because `struct stat' gives two different answers on my machine:
12660 88 (definition of an auto var) and later 96 (memset on this var).
12661 Hence the stack is badly corrumpted. The headers inclusion is to
12662 blame: if I move the awk.h inclusion before GLR's system header
12663 inclusion, the two struct stat have the same size.
12664
12665 * src/tables.c (pack_table): Always create conflict_table.
12666 (token_actions): Always create conflict_list.
12667 * data/glr.c (YYFLAG): Remove, unused.
12668
12669 2002-10-13 Akim Demaille <akim@epita.fr>
12670
12671 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
12672 (O0FLAGS): New.
12673 (VALGRIND, GXX): New.
12674 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
12675 * tests/bison.in: Run $PREBISON a pre-command.
12676 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
12677 (maintainer-check-g++): New.
12678 * Makefile.am (maintainer-check): New.
12679
12680 2002-10-13 Akim Demaille <akim@epita.fr>
12681
12682 * data/glr.c: Formatting changes.
12683 Tweak some trace messages to match yacc.c's.
12684
12685 2002-10-13 Akim Demaille <akim@epita.fr>
12686
12687 GLR parsers sometimes raise parse errors instead of performing the
12688 default reduction.
12689 Reported by Charles-Henry de Boysson.
12690
12691 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
12692 check the length of the traces when %glr.
12693 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
12694 GLR's traces.
12695 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
12696 Test GLR parsers.
12697 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
12698 (yyltype): Remove the yy prefix from the member names.
12699 (yytable): Complete its comment.
12700 (yygetLRActions): Map error action number from YYTABLE from
12701 YYTABLE_NINF to 0.
12702 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
12703 (which was a bug: it should have been YYTABEL_NINF, and yet it was
12704 not satisfying as we could compare an YYACTION computed from
12705 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
12706 only value for error actions.
12707 (yyreportParseError): In verbose parse error messages, don't issue
12708 `error' in the list of expected tokens.
12709 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
12710 next action to perform to match glr.c's decoding.
12711 (yytable): Complete its comment.
12712
12713 2002-10-13 Paul Eggert <eggert@twinsun.com>
12714
12715 Fix problem reported by Henrik Grubbstroem in
12716 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
12717 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
12718 because the Bison parser reads the second action before reducing
12719 the first one.
12720 * src/scan-gram.l (rule_length): New static var.
12721 Use it to keep track of the rule length in the scanner, since
12722 we can't expect the parser to be in lock-step sync with the scanner.
12723 (handle_action_dollar, handle_action_at): Use this var.
12724 * tests/actions.at (Exotic Dollars): Test for the problem.
12725
12726 2002-10-12 Paul Eggert <eggert@twinsun.com>
12727
12728 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
12729 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
12730 Include <sys/time.h> when checking for clock_t and struct tms.
12731 Use same include order as source.
12732 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
12733 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
12734
12735 * lib/timevar.c: Update copyright date and clarify comments.
12736 (get_time) [IN_GCC]: Keep the GCC version for reference.
12737
12738 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
12739 GCC version as of today, then merge Bison's changes.
12740 Change "GCC" to "Bison" in copyright notice. timevar.def's
12741 author is Akim, so change that too.
12742
12743 * src/reader.c (grammar_current_rule_check):
12744 Don't worry about the default action if $$ is untyped.
12745 Prevents bogus warnings reported by Jim Gifford in
12746 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
12747
12748 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
12749 * data/glr.c, data/lalr1.cc, data/yacc.c:
12750 Output token definitions before the first part of user declarations.
12751 Fixes compatibility problem reported by Jim Gifford for kbd in
12752 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
12753
12754 2002-10-11 Paul Eggert <eggert@twinsun.com>
12755
12756 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
12757 (yyparse): here. This undoes some of the 2002-07-25 change.
12758 Compatibility problem reported by Ralf S. Engelschall with
12759 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
12760
12761 2002-10-11 Akim Demaille <akim@epita.fr>
12762
12763 * tests/regression.at Characters Escapes): New.
12764 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
12765 characters.
12766 Reported by Jan Nieuwenhuizen.
12767
12768 2002-10-11 Akim Demaille <akim@epita.fr>
12769
12770 * po/id.po: New.
12771
12772 2002-10-10 Paul Eggert <eggert@twinsun.com>
12773
12774 Portability fixes for bitsets; this also avoids several GCC
12775 warnings.
12776
12777 * lib/abitset.c: Include <stddef.h>, for offsetof.
12778 * lib/lbitset.c: Likewise.
12779
12780 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12781 properly for vectors of objects. Do not assume that adding a
12782 header size to a multiple of a word size yields a value that is
12783 properly aligned for the whole union.
12784 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12785
12786 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12787 unique names for structures.
12788 * lib/ebitset.c (ebitset_bytes): Likewise.
12789 * lib/lbitset.c (lbitset_bytes): Likewise.
12790
12791 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12792 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12793 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12794 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12795 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12796 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12797 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12798 to improve the type-checking that GCC can do.
12799 * lib/bitset.c (bitset_op4_cmp): Likewise.
12800 * lib/bitset_stats.c (bitset_stats_count,
12801 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12802 bitset_stats_copy, bitset_stats_disjoint_p,
12803 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12804 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12805 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12806 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12807 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12808 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12809 bitset_stats_or_and_cmp): Likewise.
12810 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12811 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12812 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12813 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12814
12815 * lib/abitset.h: Include bitset.h, not bbitset.h.
12816 * lib/ebitset.h: Likewise.
12817 * lib/lbitset.h: Likewise.
12818
12819 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12820 All instances of parameters of type enum bitset_opts are now of
12821 type enum_bitset_opts, to conform to the C Standard, and similarly
12822 for enum_bitset_type.
12823 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12824 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12825
12826 Do not use "struct bitset_struct" to mean different things in
12827 different modules. Not only is this confusing, it violates
12828 the C Standard, which requires that structure types in different
12829 modules must be compatible if one is to be passed to the other.
12830 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12831 All instances of "struct bitset_struct *" replaced with "bitset".
12832 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12833 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12834 struct lbitset_struct, struct bitset_stats_struct): New types.
12835 All uses of struct bitset_struct changed to union bitset_union,
12836 etc.
12837 * lib/abitset.c (struct abitset_struct, abitset,
12838 struct bitset_struct): Remove.
12839 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12840 struct bitset_struct): Remove.
12841 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12842 bitset_struct): Remove.
12843 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12844 Likewise.
12845
12846 Do not call a function of type T using a call that assumes the
12847 function is of a different type U. Standard C requires that a
12848 function must be called with a type that is compatible with its
12849 definition.
12850 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12851 New decls.
12852 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12853 New functions.
12854 * lib/ebitset.c (PFV): Remove.
12855 * lib/lbitset.c (PFV): Likewise.
12856 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12857 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12858 decls.
12859 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12860 (ebitset_vtable): Use them.
12861 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12862 lbitset_xor): New functions.
12863 (lbitset_vtable): Use them.
12864
12865 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12866 Declare.
12867
12868 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12869 GCC warning.
12870 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12871 Use offsetof, for simplicity.
12872
12873 2002-10-06 Paul Eggert <eggert@twinsun.com>
12874
12875 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12876 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12877 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12878 which was inadvertently undone by the 2002-09-30 patch.
12879 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12880 the same width as int.
12881
12882 2002-10-04 Paul Eggert <eggert@twinsun.com>
12883
12884 Version 1.50.
12885
12886 * configure.ac (AC_INIT), NEWS: Increment version number.
12887
12888 * doc/bison.texinfo: Minor spelling, grammar, and white space
12889 fixes.
12890 (Symbols): Mention that any negative value returned from yylex
12891 signifies end-of-input. Warn about negative chars. Mention
12892 the portable Standard C character set.
12893
12894 The GNU coding standard says CFLAGS and YFLAGS are reserved
12895 for the installer to set.
12896 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12897 * src/Makefile.am (AM_CFLAGS): Likewise.
12898 (AM_YFLAGS): Renamed from YFLAGS.
12899
12900 Fix some MAX and MIN problems.
12901 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12902 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12903 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12904 * src/reader.c (reader): Use it.
12905
12906 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12907 POSIX 1003.1-2001 has removed fgrep.
12908
12909 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12910
12911 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12912 interpreted as signed.
12913 * lib/ebitset.c (ebitset_list): Fix bug.
12914
12915 2002-10-01 Paul Eggert <eggert@twinsun.com>
12916
12917 More fixes for 64-bit hosts and large bitsets.
12918
12919 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12920 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12921 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12922 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12923 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12924 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12925 bitset_count_): Likewise.
12926 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12927 bitset_first, bitset_last): Likewise.
12928 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12929 bitset_stats_list_reverse, bitset_stats_size,
12930 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12931 Likewise.
12932 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12933 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12934 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12935 bitsetv_reflexive_transitive_closure): Likewise.
12936 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12937 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12938 Likewise.
12939 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12940 Likewise.
12941
12942 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12943 Use size_t, not unsigned int, to count bytes.
12944 * lib/abitset.h (abitset_bytes): Likewise.
12945 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12946 Likewise.
12947 * lib/bitset.h (bitset_bytes): Likewise.
12948 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12949 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12950 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12951 * lib/ebitset.c (ebitset_bytes): Likewise.
12952 * lib/ebitset.h (ebitset_bytes): Likewise.
12953 * lib/lbitset.c (lbitset_bytes): Likewise.
12954 * lib/lbitset.h (lbitset_bytes): Likewise.
12955
12956 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12957 abitset_subset_p, abitset_disjoint_p, abitset_and,
12958 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12959 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12960 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12961 abitset_or_and, abitset_or_and_cmp):
12962 Use bitset_windex instead of unsigned int.
12963 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12964 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12965 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12966 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12967 Likewise.
12968 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12969
12970 * lib/bitset.c (bitset_print):
12971 Use proper printf formats for widths of integer types.
12972 * lib/bitset_stats.c (bitset_percent_histogram_print,
12973 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12974 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12975 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12976 * lib/lbitset.c (lbitset_bytes): Likewise.
12977
12978 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12979 BITSET_SIZE_MAX): New macros.
12980 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12981 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12982 to BITSET_WINDEX_MAX.
12983
12984 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12985 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12986 since we now return the bitset_bindex type (not int).
12987
12988 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12989 when computing sizes.
12990 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12991
12992 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12993 and avoid cast to unsigned.
12994
12995 2002-09-30 Akim Demaille <akim@epita.fr>
12996
12997 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12998 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12999 Updates from Michael Hayes.
13000
13001 2002-09-30 Art Haas <ahaas@neosoft.com>
13002
13003 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
13004 invocations.
13005 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
13006 defined.
13007
13008 2002-09-27 Akim Demaille <akim@epita.fr>
13009
13010 Version 1.49c.
13011
13012 2002-09-27 Akim Demaille <akim@epita.fr>
13013
13014 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
13015 (Because of AC_LIBSOURCE).
13016
13017 2002-09-27 Akim Demaille <akim@epita.fr>
13018
13019 Playing with Autoscan.
13020
13021 * configure.ac: Remove the old LIBOBJ tweaks.
13022 (AC_REPLACE_FUNCS): Add strrchr and strtol.
13023 * lib/strrchr.c: New.
13024 * lib/strtol.c: New, from the Coreutils 4.5.1.
13025
13026 2002-09-27 Akim Demaille <akim@epita.fr>
13027
13028 Playing with Autoscan.
13029
13030 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
13031 * lib/Makefile.am (libbison_a_SOURCES): No longer include
13032 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
13033 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
13034 Coreutils 4.5.1.
13035
13036 2002-09-24 Akim Demaille <akim@epita.fr>
13037
13038 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
13039 (Frequently Asked Questions, Parser Stack Overflow): New.
13040
13041 2002-09-13 Akim Demaille <akim@epita.fr>
13042
13043 Playing with autoscan.
13044
13045 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
13046 * src/files.c (skeleton_find): Remove, unused.
13047 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
13048 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
13049
13050 2002-09-13 Akim Demaille <akim@epita.fr>
13051
13052 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
13053 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
13054
13055 2002-09-13 Akim Demaille <akim@epita.fr>
13056
13057 * configure.ac: Require 2.54.
13058 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
13059 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
13060 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
13061 Remove, provided by Autoconf macros.
13062
13063 2002-09-12 Akim Demaille <akim@epita.fr>
13064
13065 * m4/prereq.m4: Update, from Coreutils 4.5.1.
13066
13067 2002-09-12 Akim Demaille <akim@epita.fr>
13068
13069 * m4/prereq.m4: Update, from Fileutils 4.1.5.
13070 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
13071 Reported by Martin Mokrejs.
13072
13073 2002-09-10 Akim Demaille <akim@epita.fr>
13074
13075 * src/parse-gram.y: Associate a human readable string to each
13076 token type.
13077 * tests/regression.at (Invalid inputs): Adjust.
13078
13079 2002-09-10 Gary V. Vaughan <gary@gnu.org>
13080
13081 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
13082 with an Autoconf-2.5x style configure.ac.
13083
13084 2002-09-06 Paul Eggert <eggert@twinsun.com>
13085
13086 * doc/bison.texinfo (Conditions): Make explicit that the GPL
13087 exception applies only to yacc.c. This is a modification of a
13088 patch originally suggested by Akim Demaille.
13089
13090 2002-09-06 Akim Demaille <akim@epita.fr>
13091
13092 * data/c.m4 (b4_copyright): Move the GPL exception comment from
13093 here to...
13094 * data/yacc.c: here.
13095
13096 * data/lalr1.cc (struct yyltype): Don't define it, since we use
13097 LocationType.
13098 (b4_ltype): Default to yy::Location from location.hh.
13099
13100 2002-09-04 Jim Meyering <jim@meyering.net>
13101
13102 * data/yacc.c: Guard the declaration of yytoknum also with
13103 `#ifdef YYPRINT', so it is declared only when used.
13104
13105 2002-09-04 Akim Demaille <akim@epita.fr>
13106
13107 * configure.in: Rename as...
13108 * configure.ac: this.
13109 Bump to 1.49c.
13110
13111 2002-09-04 Akim Demaille <akim@epita.fr>
13112
13113 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
13114 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
13115 translate maintainer only messages.
13116
13117 2002-08-12 Paul Eggert <eggert@twinsun.com>
13118
13119 Version 1.49b.
13120
13121 * Makefile.am (SUBDIRS): Remove intl.
13122 (DISTCLEANFILES): Remove.
13123 * NEWS: Mention that GNU M4 is now required. Clarify what is
13124 meant by "larger grammars". Mention the pt_BR translation.
13125 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
13126 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
13127 Bump version from 0.11.2 to 0.11.5.
13128 (BISON_PREREQ_STAGE): Remove.
13129 (AM_GNU_GETTEXT): Use external gettext.
13130 (AC_OUTPUT): Remove intl/Makefile.
13131
13132 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
13133
13134 * data/glr.c: Include string.h, for strlen.
13135 (yyreportParseError): Use size_t for yysize.
13136 (yy_yypstack): No longer nested inside yypstates, as nested
13137 functions are not portable. Do not assume size_t is the
13138 same width as int.
13139 (yypstates): Do not assume that ptrdiff_t is the same width
13140 as int, and similarly for yyposn and YYINDEX.
13141
13142 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
13143
13144 * lib/Makefile.am (INCLUDES): Do not include from the intl
13145 directory, which has been removed.
13146 * src/Makefile.am (INCLUDES): Likewise.
13147
13148 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
13149 (bitsets_sources, additional_bitsets_sources, timevars_sources):
13150 New vars.
13151
13152 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
13153 * tests/Makefile.am (EXTRA_DIST): Likewise.
13154
13155 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
13156 Do not assume that bitset_windex is the same width as unsigned.
13157
13158 * lib/abitset.c (abitset_unused_clear): Do not assume that
13159 bitset_word is the same width as int.
13160 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
13161 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
13162 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
13163 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
13164 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
13165
13166 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
13167 portability to one's complement hosts!).
13168 * lib/ebitset.c (ebitset_op1): Likewise.
13169 * lib/lbitset.c (lbitset_op1): Likewise.
13170
13171 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
13172 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13173 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
13174 Sync with fileutils.
13175 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
13176 lib/gettext.h: Sync with diffutils.
13177
13178 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
13179 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
13180
13181 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
13182 PROTOTYPES to check for prototypes, and "defined __STDC__" to
13183 check for void *.
13184
13185 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
13186 size_t; the old version tried to do this but casted improperly.
13187 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
13188 (bitset_test): Now returns int, not unsigned long.
13189
13190 * lib/bitset_stats.c: Include "gettext.h".
13191 (_): New macro.
13192 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
13193 name locals "index", as it generates unnecessary warnings on some
13194 hosts that have an "index" function.
13195
13196 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
13197 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
13198 they need translation.
13199 * src/LR0.c (state_list_append, new_itemsets, get_state,
13200 append_states, generate_states): Likewise.
13201 * src/assoc.c (assoc_to_string): Likewise.
13202 * src/closure.c (print_closure, set_firsts, closure): Likewise.
13203 * src/gram.c (grammar_dump): Likewise.
13204 * src/injections.c (injections_compute): Likewise.
13205 * src/lalr.c (lookaheads_print): Likewise.
13206 * src/relation.c (relation_transpose): Likewise.
13207 * src/scan-gram.l: Likewise.
13208 * src/tables.c (table_grow, pack_vector): Likewise.
13209
13210 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
13211 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
13212 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
13213 * m4/mbstate_t.m4: Sync with fileutils.
13214 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
13215
13216 * po/LINGUAS: Add pt_BR.
13217 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
13218 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
13219 lib/timevar.c.
13220 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
13221 manual recommends.
13222 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
13223
13224 * src/complain.c (strerror_r): Remove decl; not needed.
13225 (strerror): Use same pattern as ../lib/error.c.
13226
13227 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
13228
13229 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
13230
13231 * src/main.c (main): Cast result of bindtextdomain and textdomain
13232 to void, to avoid a GCC warning when --disable-nls is in effect.
13233
13234 * src/scan-gram.l: Use strings rather than escapes when possible,
13235 to minimize the number of warnings from xgettext.
13236 (handle_action_dollar, handle_action_at): Don't use isdigit,
13237 as it mishandles negative chars and it may not work as expected
13238 outside the C locale.
13239
13240 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
13241 this is a GCC extension and is not portable to other compilers.
13242
13243 * src/system.h (alloca): Use same pattern as ../lib/error.c.
13244 Do not include <ctype.h>; no longer needed.
13245 Do not include <malloc.h>; no longer needed (and generates
13246 warnings on OpenBSD 3.0).
13247
13248 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
13249 it's not portable.
13250
13251 * tests/regression.at: Do not use 'cc -c input.c -o input';
13252 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
13253
13254 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
13255 exit status as failure, not just exit status 1. Sun C exits
13256 with status 2 sometimes.
13257
13258 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
13259 Use it for the two large tests.
13260
13261 2002-08-02 Akim Demaille <akim@epita.fr>
13262
13263 * src/conflicts.c (conflicts_output): Don't output rules never
13264 reduced here, since anyway that computation doesn't work.
13265 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
13266 (rule_useless_p, rule_never_reduced_p): New.
13267 (grammar_rules_partial_print): Use a filter instead of a range.
13268 Display the title only if needed.
13269 (grammar_rules_print): Adjust.
13270 (grammar_rules_never_reduced_report): New.
13271 * src/tables.c (action_row): Move the computation of rules never
13272 reduced to...
13273 (token_actions): here.
13274 * src/main.c (main): Make the parser before making the report, so
13275 that rules never reduced are computed.
13276 Call grammar_rules_never_reduced_report.
13277 * src/print.c (print_results): Report rules never reduced.
13278 * tests/conflicts.at, tests/reduce.at: Adjust.
13279
13280 2002-08-01 Akim Demaille <akim@epita.fr>
13281
13282 Instead of attaching lookaheads and duplicating the rules being
13283 reduced by a state, attach the lookaheads to the reductions.
13284
13285 * src/state.h (state_t): Remove the `lookaheads',
13286 `lookaheads_rule' member.
13287 (reductions_t): Add a `lookaheads' member.
13288 Use a regular array for the `rules'.
13289 * src/state.c (reductions_new): Initialize the lookaheads member
13290 to 0.
13291 (state_rule_lookaheads_print): Adjust.
13292 * src/state.h, src/state.c (state_reductions_find): New.
13293 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
13294 (count_rr_conflicts): Adjust.
13295 * src/lalr.c (LArule): Remove.
13296 (add_lookback_edge): Adjust.
13297 (state_lookaheads_count): New.
13298 (states_lookaheads_initialize): Merge into...
13299 (initialize_LA): this.
13300 (lalr_free): Adjust.
13301 * src/main.c (main): Don't free nullable and derives too early: it
13302 is used by --verbose.
13303 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
13304
13305 2002-08-01 Akim Demaille <akim@epita.fr>
13306
13307 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
13308 `rule_number_t**'.
13309 (set_derives, free_derives): Rename as...
13310 (derives_compute, derives_free): this.
13311 Adjust all dependencies.
13312 * src/nullable.c (set_nullable, free_nullable): Rename as...
13313 (nullable_compute, nullable_free): these.
13314 (rule_list_t): Store rule_t *, not rule_number_t.
13315 * src/state.c (state_rule_lookaheads_print): Directly compare rule
13316 pointers, instead of their numbers.
13317 * src/main.c (main): Call nullable_free, and derives_free earlier,
13318 as they were lo longer used.
13319
13320 2002-08-01 Akim Demaille <akim@epita.fr>
13321
13322 * lib/timevar.c (get_time): Include children time.
13323 * src/lalr.h (LA, LArule): Don't export them: used with the
13324 state_t.
13325 * src/lalr.c (LA, LArule): Static.
13326 * src/lalr.h, src/lalr.c (lalr_free): New.
13327 * src/main.c (main): Call it.
13328 * src/tables.c (pack_vector): Check whether loc is >= to the
13329 table_size, not >.
13330 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
13331 (tables_generate): do it, since that's also it which allocates
13332 them.
13333 Don't free LA and LArule, main does.
13334
13335 2002-07-31 Akim Demaille <akim@epita.fr>
13336
13337 Separate parser tables computation and output.
13338
13339 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
13340 (conflict_list, conflict_list_cnt, table, check, table_ninf)
13341 (yydefgoto, yydefact, high): Move to...
13342 * src/tables.h, src/tables.c: here.
13343 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13344 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13345 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
13346 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
13347 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
13348 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
13349 (action_row, save_row, token_actions, save_column, default_goto)
13350 (goto_actions, sort_actions, matching_state, pack_vector)
13351 (table_ninf_remap, pack_table, prepare_actions): Move to...
13352 * src/tables.c: here.
13353 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
13354 * src/output.c (token_actions, output_base, output_conflicts)
13355 (output_check): Merge into...
13356 (prepare_actions): this.
13357 (actions_output): Rename as...
13358 (user_actions_output): this.
13359 * src/main.c (main): Call tables_generate and tables_free.
13360
13361 2002-07-31 Akim Demaille <akim@epita.fr>
13362
13363 Steal GCC's --time-report support.
13364
13365 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
13366 stolen/adjusted from GCC.
13367 * m4/stage.m4: Remove time related checks.
13368 * m4/timevar.m4: New.
13369 * configure.in: Adjust.
13370 * src/system.h: Adjust to using timevar.h.
13371 * src/getargs.h, src/getargs.c: Support trace_time for
13372 --trace=time.
13373 * src/main.c (stage): Remove.
13374 (main): Replace `stage' invocations with timevar calls.
13375 * src/output.c: Insert pertinent timevar calls.
13376
13377 2002-07-31 Akim Demaille <akim@epita.fr>
13378
13379 Let --trace have arguments.
13380
13381 * src/getargs.h (enum trace_e): New.
13382 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
13383 (long_options, short_options): --trace/-T takes an optional
13384 argument.
13385 Change all the uses of trace_flag to reflect the new flags.
13386 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
13387
13388 Strengthen `stage' portability.
13389
13390 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
13391 * configure.in: Use it.
13392 Don't check for malloc.h and sys/times.h.
13393 * src/system.h: Include them when appropriate.
13394 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
13395 times and struct tms are available.
13396
13397 2002-07-30 Akim Demaille <akim@epita.fr>
13398
13399 In verbose parse error message, don't report `error' as an
13400 expected token.
13401 * tests/actions.at (Printers and Destructors): Adjust.
13402 * tests/calc.at (Calculator $1): Adjust.
13403 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
13404 error message, do not report the parser accepts the error token in
13405 that state.
13406
13407 2002-07-30 Akim Demaille <akim@epita.fr>
13408
13409 Normalize conflict related messages.
13410
13411 * src/complain.h, src/complain.c (warn, complain): New.
13412 * src/conflicts.c (conflicts_print): Use them.
13413 (conflict_report_yacc): New, extracted from...
13414 (conflicts_print): here.
13415 * tests/conflicts.at, tests/existing.at: Adjust.
13416
13417 2002-07-30 Akim Demaille <akim@epita.fr>
13418
13419 Report rules which are never reduced by the parser: those hidden
13420 by conflicts.
13421
13422 * src/LR0.c (save_reductions): Don't make the final state too
13423 different: save its reduction (accept) instead of having a state
13424 without any action (no shift or goto, no reduce).
13425 Note: the final state is now a ``regular'' state, i.e., the
13426 parsers now contain `reduce 0' as default reduction.
13427 Nevertheless, since they decide to `accept' when yystate =
13428 final_state, they still will not reduce rule 0.
13429 * src/print.c (print_actions, print_reduction): Adjust.
13430 * src/output.c (action_row): Track reduced rules.
13431 (token_actions): Report rules never reduced.
13432 * tests/conflicts.at, tests/regression.at: Adjust.
13433
13434 2002-07-30 Akim Demaille <akim@epita.fr>
13435
13436 `stage' was accidently included in a previous patch.
13437 Initiate its autoconfiscation.
13438
13439 * configure.in: Look for malloc.h and sys/times.h.
13440 * src/main.c (stage): Adjust.
13441 Report only when trace_flag.
13442
13443 2002-07-29 Akim Demaille <akim@epita.fr>
13444
13445 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
13446 state_number_t.
13447 (errs_t): symbol_t*, not symbol_number_t.
13448 (reductions_t): rule_t*, not rule_number_t.
13449 (FOR_EACH_SHIFT): New.
13450 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
13451 * src/print.c, src/print_graph.c: Adjust.
13452
13453 2002-07-29 Akim Demaille <akim@epita.fr>
13454
13455 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
13456
13457 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
13458 (endtoken, accept): these.
13459 * src/reader.c (reader): Set endtoken's default tag to "$end".
13460 Set undeftoken's tag to "$undefined" instead of "$undefined.".
13461 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
13462 Adjust.
13463
13464 2002-07-29 Akim Demaille <akim@epita.fr>
13465
13466 * src/reduce.c (reduce_grammar): When the language is empty,
13467 complain about the start symbol, not the axiom.
13468 Use its location.
13469 * tests/reduce.at (Empty Language): New.
13470
13471 2002-07-26 Akim Demaille <akim@epita.fr>
13472
13473 * src/reader.h, src/reader.c (gram_error): ... can't get
13474 yycontrol without making too strong assumptions on the parser
13475 itself.
13476 * src/output.c (prepare_tokens): Use the real 0th value of
13477 token_translations instead of `0'.
13478 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
13479 visible here.
13480 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
13481 for the time being: %locations ought to provide it to yyerror.
13482
13483 2002-07-25 Akim Demaille <akim@epita.fr>
13484
13485 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
13486 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
13487 * tests/regression.at (Web2c Actions): Adjust.
13488
13489 2002-07-25 Akim Demaille <akim@epita.fr>
13490
13491 Stop storing rules from 1 to nrules + 1.
13492
13493 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
13494 * src/nullable.c, src/output.c, src/print.c, src/reader.c
13495 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
13496 Iterate from 0 to nrules.
13497 Use rule_number_as_item_number and item_number_as_rule_number.
13498 Adjust to `derive' now containing possibly 0.
13499 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
13500 Handle the `- 1' part in rule numbers from/to item numbers.
13501 * src/conflicts.c (log_resolution): Fix the message which reversed
13502 shift and reduce.
13503 * src/output.c (action_row): Initialize default_rule to -1.
13504 (token_actions): Adjust.
13505 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
13506 expected output.
13507 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
13508
13509 2002-07-25 Akim Demaille <akim@epita.fr>
13510
13511 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
13512 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
13513 (b4_c_knr_arg_decl): New.
13514 * data/yacc.c: Use it to define yysymprint, yydestruct, and
13515 yyreport_parse_error.
13516
13517 2002-07-25 Akim Demaille <akim@epita.fr>
13518
13519 * data/yacc.c (yyreport_parse_error): New, extracted from...
13520 (yyparse): here.
13521 (yydestruct, yysymprint): Move above yyparse.
13522 Be K&R compliant.
13523
13524 2002-07-25 Akim Demaille <akim@epita.fr>
13525
13526 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
13527 replace...
13528 (b4_sint_type, b4_uint_type): these.
13529 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
13530 * tests/regression.at (Web2c Actions): Adjust.
13531
13532 2002-07-25 Akim Demaille <akim@epita.fr>
13533
13534 * src/gram.h (TIEM_NUMBER_MAX): New.
13535 (item_number_of_rule_number, rule_number_of_item_number): Rename
13536 as...
13537 (rule_number_as_item_number, item_number_as_rule_number): these.
13538 Adjust dependencies.
13539 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
13540 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
13541 (symbol_number_to_vector_number): New.
13542 (order): Of vector_number_t* type.
13543 (base_t, BASE_MAX, BASE_MIN): New.
13544 (froms, tos, width, pos, check): Of base_t type.
13545 (action_number_t, ACTION_MIN, ACTION_MAX): New.
13546 (actrow): Of action_number_t type.
13547 (conflrow): Of unsigned int type.
13548 (table_ninf, base_ninf): New.
13549 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
13550 (muscle_insert_int_table, muscle_insert_base_table)
13551 (muscle_insert_rule_number_table): New.
13552 (prepare_tokens): Output `toknum' as int_table.
13553 (action_row): Returns a rule_number_t.
13554 Use ACTION_MIN, not SHRT_MIN.
13555 (token_actions): yydefact is rule_number_t*.
13556 (table_ninf_remap): New.
13557 (pack_table): Use it for `base' and `table'.
13558 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
13559 replaced with...
13560 (YYPACT_NINF, YYTABLE_NINF): these.
13561 (yypact, yytable): Compute their types instead of hard-coded
13562 `short'.
13563 * tests/regression.at (Web2c Actions): Adjust.
13564
13565 2002-07-19 Akim Demaille <akim@epita.fr>
13566
13567 * src/scan-gram.l (id): Can start with an underscore.
13568
13569 2002-07-16 Akim Demaille <akim@epita.fr>
13570
13571 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
13572 Adjust all former `associativity' dependencies.
13573 * src/symtab.c (symbol_new): Default associativity is `undef', not
13574 `right'.
13575 (symbol_check_alias_consistence): Adjust.
13576
13577 2002-07-09 Akim Demaille <akim@epita.fr>
13578
13579 * doc/bison.texinfo: Properly set the ``header'' part.
13580 Use @dircategory ``GNU programming tools'' as per Texinfo's
13581 documentation.
13582 Use @copying.
13583
13584 2002-07-09 Akim Demaille <akim@epita.fr>
13585
13586 * lib/quotearg.h: Protect against multiple inclusions.
13587 * src/location.h (location_t): Add a `file' member.
13588 (LOCATION_RESET, LOCATION_PRINT): Adjust.
13589 * src/complain.c (warn_at, complain_at, fatal_at): Drop
13590 `error_one_per_line' support.
13591
13592 2002-07-09 Akim Demaille <akim@epita.fr>
13593
13594 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
13595 * src/reader.c (lineno): Remove.
13596 Adjust all dependencies.
13597 (get_merge_function): Take a location and use complain_at.
13598 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
13599 * tests/regression.at (Invalid inputs, Mixing %token styles):
13600 Adjust.
13601
13602 2002-07-09 Akim Demaille <akim@epita.fr>
13603
13604 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
13605 recovery rule, and forbid extensions when --yacc.
13606 (gram_error): Use complain_at.
13607 * src/reader.c (reader): Exit if there were parse errors.
13608
13609 2002-07-09 Akim Demaille <akim@epita.fr>
13610
13611 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
13612 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
13613 Reported by R Blake <blakers@mac.com>.
13614
13615 2002-07-09 Akim Demaille <akim@epita.fr>
13616
13617 * data/yacc.c: Output the copyright notive in the header.
13618
13619 2002-07-03 Akim Demaille <akim@epita.fr>
13620
13621 * src/output.c (froms, tos): Are state_number_t.
13622 (save_column): sp, sp1, and sp2 are state_number_t.
13623 (prepare): Rename `final' as `final_state_number', `nnts' as
13624 `nterms_number', `nrules' as `rules_number', `nstates' as
13625 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
13626 unused.
13627 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
13628 * data/lalr1.cc (nsym_): Remove, unused.
13629
13630 2002-07-03 Akim Demaille <akim@epita.fr>
13631
13632 * src/lalr.h, src/lalr.c (goto_number_t): New.
13633 * src/lalr.c (goto_list_t): New.
13634 Propagate them.
13635 * src/nullable.c (rule_list_t): New.
13636 Propagate.
13637 * src/types.h: Remove.
13638
13639 2002-07-03 Akim Demaille <akim@epita.fr>
13640
13641 * src/closure.c (print_fderives): Use rule_rhs_print.
13642 * src/derives.c (print_derives): Use rule_rhs_print.
13643 (rule_list_t): New, replaces `shorts'.
13644 (set_derives): Add comments.
13645 * tests/sets.at (Nullable, Firsts): Adjust.
13646
13647 2002-07-03 Akim Demaille <akim@epita.fr>
13648
13649 * src/output.c (prepare_actions): Free `tally' and `width'.
13650 (prepare_actions): Allocate and free `order'.
13651 * src/symtab.c (symbols_free): Free `symbols'.
13652 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
13653 * src/output.c (m4_invoke): Move to...
13654 * src/scan-skel.l: here.
13655 (<<EOF>>): Close yyout, and free its name.
13656
13657 2002-07-03 Akim Demaille <akim@epita.fr>
13658
13659 Fix some memory leaks, and fix a bug: state 0 was examined twice.
13660
13661 * src/LR0.c (new_state): Merge into...
13662 (state_list_append): this.
13663 (new_states): Merge into...
13664 (generate_states): here.
13665 (set_states): Don't ensure a proper `errs' state member here, do it...
13666 * src/conflicts.c (conflicts_solve): here.
13667 * src/state.h, src/state.c: Comment changes.
13668 (state_t): Rename member `shifts' as `transitions'.
13669 Adjust all dependencies.
13670 (errs_new): For consistency, also take the values as argument.
13671 (errs_dup): Remove.
13672 (state_errs_set): New.
13673 (state_reductions_set, state_transitions_set): Assert that no
13674 previous value was assigned.
13675 (state_free): New.
13676 (states_free): Use it.
13677 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
13678 temporary storage: use `errs' and `nerrs' as elsewhere.
13679 (set_conflicts): Allocate and free this `errs'.
13680
13681 2002-07-02 Akim Demaille <akim@epita.fr>
13682
13683 * lib/libiberty.h: New.
13684 * lib: Update the bitset implementation from upstream.
13685 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
13686 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
13687 * src/main.c: Adjust bitset stats calls.
13688
13689 2002-07-01 Paul Eggert <eggert@twinsun.com>
13690
13691 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
13692 char, so that negative chars don't collide with $.
13693
13694 2002-06-30 Akim Demaille <akim@epita.fr>
13695
13696 Have the GLR tests be `warning' checked, and fix the warnings.
13697
13698 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
13699 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
13700 (yyremoveDeletes): `yyi' and `yyj' are size_t.
13701 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
13702 (yyaddDeferredAction): static.
13703 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
13704 (yyreportParseError): yyprefix is const.
13705 yytokenp is used only when verbose.
13706 (yy__GNUC__): Replace with __GNUC__.
13707 (yypdumpstack): yyi is size_t.
13708 (yypreference): Un-yy local variables and arguments, to avoid
13709 clashes with `yyr1'. Anyway, we are not in the user name space.
13710 (yytname_size): be an int, as is compared with ints.
13711 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
13712 Use them.
13713 * tests/cxx-gram.at: Use quotation to protect $1.
13714 Use AT_COMPILE to enable warnings hunts.
13715 Prototype yylex and yyerror.
13716 `Use' argc.
13717 Include `string.h', not `strings.h'.
13718 Produce and prototype stmtMerge only when used.
13719 yylex takes a location.
13720
13721 2002-06-30 Akim Demaille <akim@epita.fr>
13722
13723 We spend a lot of time in quotearg, in particular when --verbose.
13724
13725 * src/symtab.c (symbol_get): Store a quoted version of the key.
13726 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
13727 Adjust all callers.
13728
13729 2002-06-30 Akim Demaille <akim@epita.fr>
13730
13731 * src/state.h (reductions_t): Rename member `nreds' as num.
13732 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
13733 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
13734
13735 2002-06-30 Akim Demaille <akim@epita.fr>
13736
13737 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
13738 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
13739 (shifts_to): Rename as...
13740 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
13741 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
13742 (TRANSITION_IS_DISABLED, transitions_to): these.
13743
13744 2002-06-30 Akim Demaille <akim@epita.fr>
13745
13746 * src/print.c (print_shifts, print_gotos): Merge into...
13747 (print_transitions): this.
13748 (print_transitions, print_errs, print_reductions): Align the
13749 lookaheads columns.
13750 (print_core, print_transitions, print_errs, print_state,
13751 print_grammar): Output empty lines separator before, not after.
13752 (state_default_rule_compute): Rename as...
13753 (state_default_rule): this.
13754 * tests/conflicts.at (Defaulted Conflicted Reduction),
13755 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
13756 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
13757
13758 2002-06-30 Akim Demaille <akim@epita.fr>
13759
13760 Display items as we display rules.
13761
13762 * src/gram.h, src/gram.c (rule_lhs_print): New.
13763 * src/gram.c (grammar_rules_partial_print): Use it.
13764 * src/print.c (print_core): Likewise.
13765 * tests/conflicts.at (Defaulted Conflicted Reduction),
13766 (Unresolved SR Conflicts): Adjust.
13767 (Unresolved SR Conflicts): Adjust and rename as...
13768 (Resolved SR Conflicts): this, as was meant.
13769 * tests/regression.at (Web2c Report): Adjust.
13770
13771 2002-06-30 Akim Demaille <akim@epita.fr>
13772
13773 * src/print.c (state_default_rule_compute): New, extracted from...
13774 (print_reductions): here.
13775 Pessimize, but clarify the code.
13776 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
13777
13778 2002-06-30 Akim Demaille <akim@epita.fr>
13779
13780 * src/output.c (action_row): Let default_rule be always a rule
13781 number.
13782
13783 2002-06-30 Akim Demaille <akim@epita.fr>
13784
13785 * src/closure.c (print_firsts, print_fderives, closure):
13786 Use BITSET_EXECUTE.
13787 * src/lalr.c (lookaheads_print): Likewise.
13788 * src/state.c (state_rule_lookaheads_print): Likewise.
13789 * src/print_graph.c (print_core): Likewise.
13790 * src/print.c (print_reductions): Likewise.
13791 * src/output.c (action_row): Likewise.
13792 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13793
13794 2002-06-30 Akim Demaille <akim@epita.fr>
13795
13796 * src/print_graph.c: Use report_flag.
13797
13798 2002-06-30 Akim Demaille <akim@epita.fr>
13799
13800 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13801 to...
13802 * src/relation.h, src/relation.c (traverse, relation_digraph)
13803 (relation_print, relation_transpose): New.
13804
13805 2002-06-30 Akim Demaille <akim@epita.fr>
13806
13807 * src/state.h, src/state.c (shifts_to): New.
13808 * src/lalr.c (build_relations): Use it.
13809
13810 2002-06-30 Akim Demaille <akim@epita.fr>
13811
13812 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13813 (item_number_of_rule_number, rule_number_of_item_number): New.
13814 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13815 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13816 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13817 Propagate their use.
13818 Much remains to be done, in particular wrt `shorts' from types.h.
13819
13820 2002-06-30 Akim Demaille <akim@epita.fr>
13821
13822 * src/symtab.c (symbol_new): Initialize the `printer' member.
13823
13824 2002-06-30 Akim Demaille <akim@epita.fr>
13825
13826 * src/LR0.c (save_reductions): Remove, replaced by...
13827 * src/state.h, src/state.c (state_reductions_set): New.
13828 (reductions, errs): Rename as...
13829 (reductions_t, errs_t): these.
13830 Adjust all dependencies.
13831
13832 2002-06-30 Akim Demaille <akim@epita.fr>
13833
13834 * src/LR0.c (state_list_t, state_list_append): New.
13835 (first_state, last_state): Now symbol_list_t.
13836 (this_state): Remove.
13837 (new_itemsets, append_states, save_reductions): Take a state_t as
13838 argument.
13839 (set_states, generate_states): Adjust.
13840 (save_shifts): Remove, replaced by...
13841 * src/state.h, src/state.c (state_shifts_set): New.
13842 (shifts): Rename as...
13843 (shifts_t): this.
13844 Adjust all dependencies.
13845 * src/state.h (state_t): Remove the `next' member.
13846
13847 2002-06-30 Akim Demaille <akim@epita.fr>
13848
13849 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13850 escaped in slot 0.
13851
13852 2002-06-30 Akim Demaille <akim@epita.fr>
13853
13854 Use hash.h for the state hash table.
13855
13856 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13857 (allocate_storage): Use state_hash_new.
13858 (free_storage): Use state_hash_free.
13859 (new_state, get_state): Adjust.
13860 * src/lalr.h, src/lalr.c (states): Move to...
13861 * src/states.h (state_t): Remove the `link' member, no longer
13862 used.
13863 * src/states.h, src/states.c: here.
13864 (state_hash_new, state_hash_free, state_hash_lookup)
13865 (state_hash_insert, states_free): New.
13866 * src/states.c (state_table, state_compare, state_hash): New.
13867 * src/output.c (output_actions): Do not free states now, since we
13868 still need to know the final_state number in `prepare', called
13869 afterwards. Do it...
13870 * src/main.c (main): here: call states_free after `output'.
13871
13872 2002-06-30 Akim Demaille <akim@epita.fr>
13873
13874 * src/state.h, src/state.c (state_new): New, extracted from...
13875 * src/LR0.c (new_state): here.
13876 * src/state.h (STATE_ALLOC): Move to...
13877 * src/state.c: here.
13878 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13879 * src/state.h, src/state.c: here.
13880
13881 2002-06-30 Akim Demaille <akim@epita.fr>
13882
13883 * src/reader.c (gensym): Rename as...
13884 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13885 (getsym): Rename as...
13886 (symbol_get): this.
13887
13888 2002-06-30 Akim Demaille <akim@epita.fr>
13889
13890 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13891 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13892 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13893 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13894
13895 2002-06-30 Akim Demaille <akim@epita.fr>
13896
13897 Make the test suite pass with warnings checked.
13898
13899 * tests/actions.at (Printers and Destructors): Improve.
13900 Avoid unsigned vs. signed issues.
13901 * tests/calc.at: Don't exercise the scanner here, do it...
13902 * tests/input.at (Torturing the Scanner): here.
13903
13904 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13905
13906 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13907 reorganize first lines parallel to yacc.c.
13908
13909 2002-06-28 Akim Demaille <akim@epita.fr>
13910
13911 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13912 (b4_token_enum, b4_token_defines): New, factored from...
13913 * data/lalr1.cc, data/yacc.c, glr.c: here.
13914
13915 2002-06-28 Akim Demaille <akim@epita.fr>
13916
13917 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13918 unused variables.
13919 * src/output.c (merger_output): static.
13920
13921 2002-06-28 Akim Demaille <akim@epita.fr>
13922
13923 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13924 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13925 pacify GCC.
13926 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13927
13928 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13929
13930 Accumulated changelog for new GLR parsing features.
13931
13932 * src/conflicts.c (count_total_conflicts): Change name to
13933 conflicts_total_count.
13934 * src/conflicts.h: Ditto.
13935 * src/output.c (token_actions): Use the new name.
13936 (output_conflicts): Change conflp => conflict_list_heads, and
13937 confl => conflict_list for better readability.
13938 * data/glr.c: Use the new names.
13939 * NEWS: Add self to GLR announcement.
13940
13941 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13942
13943 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13944 Akim Demaille.
13945
13946 * data/bison.glr: Change name to glr.c
13947 * data/glr.c: Renamed from bison.glr.
13948 * data/Makefile.am: Add glr.c
13949
13950 * src/getargs.c:
13951
13952 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13953 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13954
13955 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13956
13957 * data/bison.glr: Be sure to restore the
13958 current #line when returning to the skeleton contents after having
13959 exposed the input file's #line.
13960
13961 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13962
13963 * data/bison.glr: Bring up to date with changes to bison.simple.
13964
13965 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13966
13967 * data/bison.glr: Correct definitions that use b4_prefix.
13968 Various reformatting.
13969 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13970 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13971 yytokenp argument; now part of stack.
13972 (yychar): Define to behave as documented.
13973 (yyclearin): Ditto.
13974
13975 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13976
13977 * src/reader.h: Add declaration for free_merger_functions.
13978
13979 * src/reader.c (merge_functions): New variable.
13980 (get_merge_function): New function.
13981 (free_merger_functions): New function.
13982 (readgram): Check for %prec that is not followed by a symbol.
13983 Handle %dprec and %merge declarations.
13984 (packgram): Initialize dprec and merger fields in rules array.
13985
13986 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13987 conflict_list_cnt, conflict_list_free): New variables.
13988 (table_grow): Also grow conflict_table.
13989 (prepare_rules): Output dprec and merger tables.
13990 (conflict_row): New function.
13991 (action_row): Output conflict lists for GLR parser. Don't use
13992 default reduction in conflicted states for GLR parser so that there
13993 are spaces for the conflict lists.
13994 (save_row): Also save conflict information.
13995 (token_actions): Allocate conflict list.
13996 (merger_output): New function.
13997 (pack_vector): Pack conflict table, too.
13998 (output_conflicts): New function to output yyconflp and yyconfl.
13999 (output_check): Allocate conflict_tos.
14000 (output_actions): Output conflict tables, also.
14001 (output_skeleton): Output b4_mergers definition.
14002 (prepare): Output b4_max_rhs_length definition.
14003 Use 'bison.glr' as default skeleton for GLR parsers.
14004
14005 * src/gram.c (glr_parser): New flag.
14006 (grammar_free): Call free_merger_functions.
14007
14008 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
14009 all pairs of conflicting reductions, rather than just all tokens
14010 causing conflicts. Needed to size conflict tables.
14011 (conflicts_output): Modify call to count_rr_conflicts for new
14012 interface.
14013 (conflicts_print): Ditto.
14014 (count_total_conflicts): New function.
14015
14016 * src/reader.h (merger_list): New type.
14017 (merge_functions): New variable.
14018
14019 * src/lex.h (tok_dprec, tok_merge): New token types.
14020
14021 * src/gram.h (rule_s): Add dprec and merger fields.
14022 (glr_parser): New flag.
14023
14024 * src/conflicts.h (count_total_conflicts): New function.
14025
14026 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
14027
14028 * doc/bison.texinfo (Generalized LR Parsing): New section.
14029 (GLR Parsers): New section.
14030 (Language and Grammar): Mention GLR parsing.
14031 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
14032 Correct typo ("tge" -> "the").
14033
14034 * data/bison.glr: New skeleton for GLR parsing.
14035
14036 * tests/cxx-gram.at: New tests for GLR parsing.
14037
14038 * tests/testsuite.at: Include cxx-gram.at.
14039
14040 * tests/Makefile.am: Add cxx-gram.at.
14041
14042 * src/parse-gram.y:
14043
14044 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
14045
14046 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
14047
14048 2002-06-27 Akim Demaille <akim@epita.fr>
14049
14050 * src/options.h, src/options.c: Remove.
14051 * src/getargs.c (short_options, long_options): New.
14052
14053 2002-06-27 Akim Demaille <akim@epita.fr>
14054
14055 * data/bison.simple, data/bison.c++: Rename as...
14056 * data/yacc.c, data/lalr1.cc: these.
14057 * doc/bison.texinfo (Environment Variables): Remove.
14058
14059 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
14060
14061 * src/getargs.c (report_argmatch): Initialize strtok().
14062
14063 2002-06-20 Akim Demaille <akim@epita.fr>
14064
14065 * data/bison.simple (b4_symbol_actions): New, replaces...
14066 (b4_symbol_destructor, b4_symbol_printer): these.
14067 (yysymprint): Be sure to call YYPRINT only for tokens, and using
14068 user token numbers.
14069
14070 2002-06-20 Akim Demaille <akim@epita.fr>
14071
14072 * data/bison.simple (yydestructor): Rename as...
14073 (yydestruct): this.
14074
14075 2002-06-20 Akim Demaille <akim@epita.fr>
14076
14077 * src/symtab.h, src/symtab.c (symbol_type_set)
14078 (symbol_destructor_set, symbol_precedence_set): The location is
14079 the last argument.
14080 Adjust all callers.
14081
14082 2002-06-20 Akim Demaille <akim@epita.fr>
14083
14084 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
14085 internals.
14086 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
14087 Takes a location.
14088 * src/symtab.h, src/symtab.c (symbol_class_set)
14089 (symbol_user_token_number_set): Likewise.
14090 Adjust all callers.
14091 Promote complain_at.
14092 * tests/input.at (Type Clashes): Adjust.
14093
14094 2002-06-20 Akim Demaille <akim@epita.fr>
14095
14096 * data/bison.simple (YYLEX): Fix the declaration when
14097 %pure-parser.
14098
14099 2002-06-20 Akim Demaille <akim@epita.fr>
14100
14101 * data/bison.simple (yysymprint): Don't print the token number,
14102 just its name.
14103 * tests/actions.at (Destructors): Rename as...
14104 (Printers and Destructors): this.
14105 Also exercise %printer.
14106
14107 2002-06-20 Akim Demaille <akim@epita.fr>
14108
14109 * data/bison.simple (YYDSYMPRINT): New.
14110 Use it to remove many of the #if YYDEBUG/if (yydebug).
14111
14112 2002-06-20 Akim Demaille <akim@epita.fr>
14113
14114 * src/symtab.h, src/symtab.c (symbol_t): printer and
14115 printer_location are new members.
14116 (symbol_printer_set): New.
14117 * src/parse-gram.y (PERCENT_PRINTER): New token.
14118 Handle its associated rule.
14119 * src/scan-gram.l: Adjust.
14120 (handle_destructor_at, handle_destructor_dollar): Rename as...
14121 (handle_symbol_code_at, handle_symbol_code_dollar): these.
14122 * src/output.c (symbol_printers_output): New.
14123 (output_skeleton): Call it.
14124 * data/bison.simple (yysymprint): New. Cannot be named yyprint
14125 since there are already many grammar files with a user `yyprint'.
14126 Replace the calls to YYPRINT to calls to yysymprint.
14127 * tests/calc.at: Adjust.
14128 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
14129 taking advantage of parser very internal details (stack size!).
14130
14131 2002-06-20 Akim Demaille <akim@epita.fr>
14132
14133 * src/scan-gram.l: Complete the scanner with the missing patterns
14134 to pacify Flex.
14135 Use `quote' and `symbol_tag_get' where appropriate.
14136
14137 2002-06-19 Akim Demaille <akim@epita.fr>
14138
14139 * tests/actions.at (Destructors): Augment to test locations.
14140 * data/bison.simple (yydestructor): Pass it the current location
14141 if locations are enabled.
14142 Prototype only when __STDC__ or C++.
14143 Change the argument names to move into the yy name space: there is
14144 user code here.
14145
14146 2002-06-19 Akim Demaille <akim@epita.fr>
14147
14148 * data/bison.simple (b4_pure_if): New.
14149 Use it instead of #ifdef YYPURE.
14150
14151 2002-06-19 Akim Demaille <akim@epita.fr>
14152
14153 * data/bison.simple (b4_location_if): New.
14154 Use it instead of #ifdef YYLSP_NEEDED.
14155
14156 2002-06-19 Akim Demaille <akim@epita.fr>
14157
14158 Prepare @$ in %destructor, but currently don't bind it in the
14159 skeleton, as %location use is not cleaned up yet.
14160
14161 * src/scan-gram.l (handle_dollar, handle_destructor_at)
14162 (handle_action_at): New.
14163 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
14164 a braced_code_t and a location as additional arguments.
14165 (handle_destructor_dollar): Instead of requiring `b4_eval', just
14166 unquote one when outputting `b4_dollar_dollar'.
14167 Adjust callers.
14168 * data/bison.simple (b4_eval): Remove.
14169 (b4_symbol_destructor): Adjust.
14170 * tests/input.at (Invalid @n): Adjust.
14171
14172 2002-06-19 Zack Weinberg <zack@codesourcery.com>
14173
14174 * doc/bison.texinfo: Document ability to have multiple
14175 prologue sections.
14176
14177 2002-06-18 Akim Demaille <akim@epita.fr>
14178
14179 * src/files.c (compute_base_names): When computing the output file
14180 names from the input file name, strip the directory part.
14181
14182 2002-06-18 Akim Demaille <akim@epita.fr>
14183
14184 * data/bison.simple.new: Comment changes.
14185 Reported by Andreas Schwab.
14186
14187 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
14188
14189 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
14190 there are no `label `yyoverflowlab' defined but not used' warnings
14191 when yyoverflow is defined.
14192
14193 2002-06-18 Akim Demaille <akim@epita.fr>
14194
14195 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
14196 new member.
14197 (symbol_destructor_set): Adjust.
14198 * src/output.c (symbol_destructors_output): Output the destructor
14199 locations.
14200 Output the symbol name.
14201 * data/bison.simple (b4_symbol_destructor): Adjust.
14202
14203 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
14204 and Akim Demaille <akim@epita.fr>
14205
14206 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
14207 what's left on the stack when the error recovery hits EOF.
14208 * tests/actions.at (Destructors): Complete to exercise this case.
14209
14210 2002-06-17 Akim Demaille <akim@epita.fr>
14211
14212 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
14213 arguments is really empty, not only equal to `[]'.
14214 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
14215 member.
14216 (symbol_destructor_set): New.
14217 * src/output.c (symbol_destructors_output): New.
14218 * src/reader.h (brace_code_t, current_braced_code): New.
14219 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
14220 (handle_dollar): Rename as...
14221 (handle_action_dollar): this.
14222 (handle_destructor_dollar): New.
14223 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
14224 (grammar_declaration): Use it.
14225 * data/bison.simple (yystos): Is always defined.
14226 (yydestructor): New.
14227 * tests/actions.at (Destructors): New.
14228 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
14229
14230 2002-06-17 Akim Demaille <akim@epita.fr>
14231
14232 * src/symlist.h, src/symlist.c (symbol_list_length): New.
14233 * src/scan-gram.l (handle_dollar, handle_at): Compute the
14234 rule_length only when needed.
14235 * src/output.c (actions_output, token_definitions_output): Output
14236 the full M4 block.
14237 * src/symtab.c: Don't access directly to the symbol tag, use
14238 symbol_tag_get.
14239 * src/parse-gram.y: Use symbol_list_free.
14240
14241 2002-06-17 Akim Demaille <akim@epita.fr>
14242
14243 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
14244 (symbol_list_prepend, get_type_name): Move to...
14245 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
14246 (symbol_list_prepend, symbol_list_n_type_name_get): here.
14247 Adjust all callers.
14248 (symbol_list_free): New.
14249 * src/scan-gram.l (handle_dollar): Takes a location.
14250 * tests/input.at (Invalid $n): Adjust.
14251
14252 2002-06-17 Akim Demaille <akim@epita.fr>
14253
14254 * src/reader.h, src/reader.c (symbol_list_new): Export it.
14255 (symbol_list_prepend): New.
14256 * src/parse-gram.y (%union): `list' is a new member.
14257 (symbols.1): New, replaces...
14258 (terms_to_prec.1, nterms_to_type.1): these.
14259 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
14260 Take a location as additional argument.
14261 Adjust all callers.
14262
14263 2002-06-15 Akim Demaille <akim@epita.fr>
14264
14265 * src/parse-gram.y: Move %token in the declaration section so that
14266 we don't depend upon CVS Bison.
14267
14268 2002-06-15 Akim Demaille <akim@epita.fr>
14269
14270 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
14271 * src/print.c (print_core): Use it.
14272
14273 2002-06-15 Akim Demaille <akim@epita.fr>
14274
14275 * src/conflicts.c (log_resolution): Accept the rule involved in
14276 the sr conflicts instead of the lookahead number that points to
14277 that rule.
14278 (flush_reduce): Accept the current lookahead vector as argument,
14279 instead of the index in LA.
14280 (resolve_sr_conflict): Accept the current number of lookahead
14281 bitset to consider for the STATE, instead of the index in LA.
14282 (set_conflicts): Adjust.
14283 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
14284
14285 2002-06-15 Akim Demaille <akim@epita.fr>
14286
14287 * src/state.h (state_t): Replace the `lookaheadsp' member, a
14288 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
14289 Adjust all dependencies.
14290 * src/lalr.c (initialize_lookaheads): Split into...
14291 (states_lookaheads_count, states_lookaheads_initialize): these.
14292 (lalr): Adjust.
14293
14294 2002-06-15 Akim Demaille <akim@epita.fr>
14295
14296 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
14297 out of...
14298 (grammar_rules_print): here.
14299 * src/reduce.c (reduce_output): Use it.
14300 * tests/reduce.at (Useless Rules, Reduced Automaton)
14301 (Underivable Rules): Adjust.
14302
14303 2002-06-15 Akim Demaille <akim@epita.fr>
14304
14305 Copy BYacc's nice way to report the grammar.
14306
14307 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
14308 New.
14309 Don't print the rules' location, it is confusing and useless.
14310 (rule_print): Use grammar_rhs_print.
14311 * src/print.c (print_grammar): Use grammar_rules_print.
14312
14313 2002-06-15 Akim Demaille <akim@epita.fr>
14314
14315 Complete and rationalize `useless thing' warnings.
14316
14317 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
14318 (symbol_tag_print): New.
14319 Use them everywhere in place of accessing directly the tag member.
14320 * src/gram.h, src/gram.c (rule_print): New.
14321 Use it where a rule used to be printed `by hand'.
14322 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
14323 (reduce_grammar_tables): Report the useless rules.
14324 (reduce_print): Useless things are a warning, not an error.
14325 Report it as such.
14326 * tests/reduce.at (Useless Nonterminals, Useless Rules):
14327 (Reduced Automaton, Underivable Rules): Adjust.
14328 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
14329 * tests/conflicts.at (Unresolved SR Conflicts)
14330 (Solved SR Conflicts): Adjust.
14331
14332 2002-06-15 Akim Demaille <akim@epita.fr>
14333
14334 Let symbols have a location.
14335
14336 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
14337 (getsym): Adjust.
14338 Adjust all callers.
14339 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
14340 Use location_t, not int.
14341 * src/symtab.c (symbol_check_defined): Take advantage of the
14342 location.
14343 * tests/regression.at (Invalid inputs): Adjust.
14344
14345 2002-06-15 Akim Demaille <akim@epita.fr>
14346
14347 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
14348 (input): Don't try to initialize yylloc here, do it in the
14349 scanner.
14350 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
14351 * src/gram.h (rule_t): Change line and action_line into location
14352 and action_location, of location_t type.
14353 Adjust all dependencies.
14354 * src/location.h, src/location.c (empty_location): New.
14355 * src/reader.h, src/reader.c (grammar_start_symbol_set)
14356 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
14357 (grammar_current_rule_symbol_append)
14358 (grammar_current_rule_action_append): Expect a location as argument.
14359 * src/reader.c (grammar_midrule_action): Adjust to attach an
14360 action's location as dummy symbol location.
14361 * src/symtab.h, src/symtab.c (startsymbol_location): New.
14362 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
14363 the line numbers.
14364
14365 2002-06-14 Akim Demaille <akim@epita.fr>
14366
14367 Grammar declarations may be found in the grammar section.
14368
14369 * src/parse-gram.y (rules_or_grammar_declaration): New.
14370 (declarations): Each declaration may end with a semicolon, not
14371 just...
14372 (grammar_declaration): `"%union"'.
14373 (grammar): Branch to rules_or_grammar_declaration.
14374
14375 2002-06-14 Akim Demaille <akim@epita.fr>
14376
14377 * src/main.c (main): Invoke scanner_free.
14378
14379 2002-06-14 Akim Demaille <akim@epita.fr>
14380
14381 * src/output.c (m4_invoke): Extracted from...
14382 (output_skeleton): here.
14383 Free tempfile.
14384
14385 2002-06-14 Akim Demaille <akim@epita.fr>
14386
14387 * src/parse-gram.y (directives, directive, gram)
14388 (grammar_directives, precedence_directives, precedence_directive):
14389 Rename as...
14390 (declarations, declaration, grammar, grammar_declaration)
14391 (precedence_declaration, precedence_declarator): these.
14392 (symbol_declaration): New.
14393
14394 2002-06-14 Akim Demaille <akim@epita.fr>
14395
14396 * src/files.c (action_obstack): Remove, unused.
14397 (output_obstack): Remove it, and all its dependencies, as it is no
14398 longer needed.
14399 * src/reader.c (epilogue_set): Build the epilogue in the
14400 muscle_obstack.
14401 * src/output.h, src/output.c (muscle_obstack): Move to...
14402 * src/muscle_tab.h, src/muscle_tab.h: here.
14403 (muscle_init): Initialize muscle_obstack.
14404 (muscle_free): New.
14405 * src/main.c (main): Call it.
14406
14407 2002-06-14 Akim Demaille <akim@epita.fr>
14408
14409 * src/location.h: New, extracted from...
14410 * src/reader.h: here.
14411 * src/Makefile.am (noinst_HEADERS): Merge into
14412 (bison_SOURCES): this.
14413 Add location.h.
14414 * src/parse-gram.y: Use location_t instead of Bison's.
14415 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
14416 Use location_t instead of ints.
14417
14418 2002-06-14 Akim Demaille <akim@epita.fr>
14419
14420 * data/bison.simple, data/bison.c++: Be sure to restore the
14421 current #line when returning to the skeleton contents after having
14422 exposed the input file's #line.
14423
14424 2002-06-12 Akim Demaille <akim@epita.fr>
14425
14426 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
14427 eager.
14428 * tests/actions.at (Exotic Dollars): New.
14429
14430 2002-06-12 Akim Demaille <akim@epita.fr>
14431
14432 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
14433 ['"/] too eagerly.
14434 * tests/input.at (Torturing the Scanner): New.
14435
14436 2002-06-11 Akim Demaille <akim@epita.fr>
14437
14438 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
14439 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
14440 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
14441 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
14442 * src/reader.c (reader): Use it.
14443
14444 2002-06-11 Akim Demaille <akim@epita.fr>
14445
14446 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
14447 Adjust all callers.
14448 (scanner_last_string_free): New.
14449
14450 2002-06-11 Akim Demaille <akim@epita.fr>
14451
14452 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
14453 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
14454 (last_string, YY_OBS_FREE): New.
14455 Use them when returning an ID.
14456
14457 2002-06-11 Akim Demaille <akim@epita.fr>
14458
14459 Have Bison grammars parsed by a Bison grammar.
14460
14461 * src/reader.c, src/reader.h (prologue_augment): New.
14462 * src/reader.c (copy_definition): Remove.
14463
14464 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
14465 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
14466 (grammar_current_rule_prec_set, grammar_current_rule_check)
14467 (grammar_current_rule_symbol_append)
14468 (grammar_current_rule_action_append): Export.
14469 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
14470 (symbol_list_action_append): Remove.
14471 Hook the routines from reader.
14472 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
14473 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
14474
14475 * src/reader.c (read_declarations): Remove, unused.
14476
14477 * src/parse-gram.y: Handle the epilogue.
14478 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
14479 (grammar_start_symbol_set): this.
14480 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
14481 * src/reader.c (readgram): Remove, unused.
14482 (reader): Adjust to insert eoftoken and axiom where appropriate.
14483
14484 * src/reader.c (copy_dollar): Replace with...
14485 * src/scan-gram.h (handle_dollar): this.
14486 * src/parse-gram.y: Remove `%thong'.
14487
14488 * src/reader.c (copy_at): Replace with...
14489 * src/scan-gram.h (handle_at): this.
14490
14491 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
14492 New.
14493
14494 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
14495 time being.
14496
14497 * src/reader.h, src/reader.c (grammar_rule_end): New.
14498
14499 * src/parse.y (current_type, current_class): New.
14500 Implement `%nterm', `%token' support.
14501 Merge `%term' into `%token'.
14502 (string_as_id): New.
14503 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
14504 type name.
14505
14506 * src/parse-gram.y: Be sure to handle properly the beginning of
14507 rules.
14508
14509 * src/parse-gram.y: Handle %type.
14510 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
14511
14512 * src/parse-gram.y: More directives support.
14513 * src/options.c: No longer handle source directives.
14514
14515 * src/parse-gram.y: Fix %output.
14516
14517 * src/parse-gram.y: Handle %union.
14518 Use the prologue locations.
14519 * src/reader.c (parse_union_decl): Remove.
14520
14521 * src/reader.h, src/reader.c (epilogue_set): New.
14522 * src/parse-gram.y: Use it.
14523
14524 * data/bison.simple, data/bison.c++: b4_stype is now either not
14525 defined, then default to int, or to the contents of %union,
14526 without `union' itself.
14527 Adjust.
14528 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
14529
14530 * src/output.c (actions_output): Don't output braces, as they are
14531 already handled by the scanner.
14532
14533 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
14534 characters to themselves.
14535
14536 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
14537 that the epilogue has a proper #line.
14538
14539 * src/parse-gram.y: Handle precedence/associativity.
14540
14541 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
14542 a terminal.
14543 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
14544 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
14545 at all to define terminals that cannot be emitted.
14546
14547 * src/scan-gram.l: Escape M4 characters.
14548
14549 * src/scan-gram.l: Working properly with escapes in user
14550 strings/characters.
14551
14552 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
14553 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
14554 grammar.
14555 Use more modest sizes, as for the time being the parser does not
14556 release memory, and therefore the process swallows a huge amount
14557 of memory.
14558
14559 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
14560 stricter %token grammar.
14561
14562 * src/symtab.h (associativity): Add `undef_assoc'.
14563 (symbol_precedence_set): Do nothing when passed an undef_assoc.
14564 * src/symtab.c (symbol_check_alias_consistence): Adjust.
14565
14566 * tests/regression.at (Invalid %directive): Remove, as it is now
14567 meaningless.
14568 (Invalid inputs): Adjust to the new error messages.
14569 (Token definitions): The new grammar doesn't allow too many
14570 eccentricities.
14571
14572 * src/lex.h, src/lex.c: Remove.
14573 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
14574 (copy_character, copy_string2, copy_string, copy_identifier)
14575 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
14576 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
14577 (parse_action): Remove.
14578 * po/POTFILES.in: Adjust.
14579
14580 2002-06-11 Akim Demaille <akim@epita.fr>
14581
14582 * src/reader.c (parse_action): Don't store directly into the
14583 rule's action member: return the action as a string.
14584 Don't require `rule_length' as an argument: compute it.
14585 (grammar_current_rule_symbol_append)
14586 (grammar_current_rule_action_append): New, eved out from
14587 (readgram): here.
14588 Remove `action_flag', `rulelength', unused now.
14589
14590 2002-06-11 Akim Demaille <akim@epita.fr>
14591
14592 * src/reader.c (grammar_current_rule_prec_set).
14593 (grammar_current_rule_check): New, eved out from...
14594 (readgram): here.
14595 Remove `xaction', `first_rhs': useless.
14596 * tests/input.at (Type clashes): New.
14597 * tests/existing.at (GNU Cim Grammar): Adjust.
14598
14599 2002-06-11 Akim Demaille <akim@epita.fr>
14600
14601 * src/reader.c (grammar_midrule_action): New, Eved out from
14602 (readgram): here.
14603
14604 2002-06-11 Akim Demaille <akim@epita.fr>
14605
14606 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
14607 New.
14608 (readgram): Use them as replacement of inlined code, crule and
14609 crule1.
14610
14611 2002-06-11 Akim Demaille <akim@epita.fr>
14612
14613 * src/reader.c (grammar_end, grammar_symbol_append): New.
14614 (readgram): Use them.
14615 Make the use of `p' as local as possible.
14616
14617 2002-06-10 Akim Demaille <akim@epita.fr>
14618
14619 GCJ's parser requires the tokens to be defined before the prologue.
14620
14621 * data/bison.simple: Output the token definition before the user's
14622 prologue.
14623 * tests/regression.at (Braces parsing, Duplicate string)
14624 (Mixing %token styles): Check the output from bison.
14625 (Early token definitions): New.
14626
14627 2002-06-10 Akim Demaille <akim@epita.fr>
14628
14629 * src/symtab.c (symbol_user_token_number_set): Don't complain when
14630 assigning twice the same user number to a token, so that we can
14631 use it in...
14632 * src/lex.c (lex): here.
14633 Also use `symbol_class_set' instead of hand written code.
14634 * src/reader.c (parse_assoc_decl): Likewise.
14635
14636 2002-06-10 Akim Demaille <akim@epita.fr>
14637
14638 * src/symtab.c, src/symtab.c (symbol_class_set)
14639 (symbol_user_token_number_set): New.
14640 * src/reader.c (parse_token_decl): Use them.
14641 Use a switch instead of ifs.
14642 Use a single argument.
14643
14644 2002-06-10 Akim Demaille <akim@epita.fr>
14645
14646 Remove `%thong' support as it is undocumented, unused, duplicates
14647 `%token's job, and creates useless e-mail traffic with people who
14648 want to know what it is, why it is undocumented, unused, and
14649 duplicates `%token's job.
14650
14651 * src/reader.c (parse_thong_decl): Remove.
14652 * src/options.c (option_table): Remove "thong".
14653 * src/lex.h (tok_thong): Remove.
14654
14655 2002-06-10 Akim Demaille <akim@epita.fr>
14656
14657 * src/symtab.c, src/symtab.c (symbol_type_set)
14658 (symbol_precedence_set): New.
14659 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
14660 (value_components_used): Remove, unused.
14661
14662 2002-06-09 Akim Demaille <akim@epita.fr>
14663
14664 Move symbols handling code out of the reader.
14665
14666 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
14667 (axiom): Move to...
14668 * src/symtab.h, src/symtab.c: here.
14669
14670 * src/gram.c (start_symbol): Remove: use startsymbol->number.
14671 * src/reader.c (startval): Rename as...
14672 * src/symtab.h, src/symtab.c (startsymbol): this.
14673 * src/reader.c: Adjust.
14674
14675 * src/reader.c (symbol_check_defined, symbol_make_alias)
14676 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14677 (token_translations_init)
14678 Move to...
14679 * src/symtab.c: here.
14680 * src/reader.c (packsymbols): Move to...
14681 * src/symtab.h, src/symtab.c (symbols_pack): here.
14682 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
14683 argument.
14684
14685 2002-06-03 Akim Demaille <akim@epita.fr>
14686
14687 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
14688 then statements.
14689
14690 2002-06-03 Akim Demaille <akim@epita.fr>
14691
14692 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
14693 structs with non literals.
14694 * src/scan-skel.l: never-interactive.
14695 * src/conflicts.c (enum conflict_resolution_e): No trailing
14696 comma.
14697 * src/getargs.c (usage): Split long literal strings.
14698 Reported by Hans Aberg.
14699
14700 2002-05-28 Akim Demaille <akim@epita.fr>
14701
14702 * data/bison.c++: Use C++ ostreams.
14703 (cdebug_): New member.
14704
14705 2002-05-28 Akim Demaille <akim@epita.fr>
14706
14707 * src/output.c (output_skeleton): Be sure to allocate enough room
14708 for `/' _and_ for `\0' in full_skeleton.
14709
14710 2002-05-28 Akim Demaille <akim@epita.fr>
14711
14712 * data/bison.c++: Catch up with bison.simple:
14713 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14714 and Paul Eggert <eggert@twinsun.com>: `error' handing.
14715 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
14716 and popping traces.
14717
14718 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14719
14720 * src/output.c (output_skeleton): Put an explicit path in front of
14721 the skeleton file name, rather than relying on the -I directory,
14722 to partially alleviate effects of having a skeleton file lying around
14723 in the current directory.
14724
14725 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14726
14727 * src/conflicts.c (log_resolution): Correct typo:
14728 obstack_printf should be obstack_fgrow1.
14729
14730 2002-05-26 Akim Demaille <akim@epita.fr>
14731
14732 * src/state.h (state_t): `solved_conflicts' is a new member.
14733 * src/LR0.c (new_state): Set it to 0.
14734 * src/conflicts.h, src/conflicts.c (print_conflicts)
14735 (free_conflicts, solve_conflicts): Rename as...
14736 (conflicts_print, conflicts_free, conflicts_solve): these.
14737 Adjust callers.
14738 * src/conflicts.c (enum conflict_resolution_e)
14739 (solved_conflicts_obstack): New, used by...
14740 (log_resolution): this.
14741 Adjust to attach the conflict resolution to each state.
14742 Complete the description with the precedence/associativity
14743 information.
14744 (resolve_sr_conflict): Adjust.
14745 * src/print.c (print_state): Output its solved_conflicts.
14746 * tests/conflicts.at (Unresolved SR Conflicts)
14747 (Solved SR Conflicts): Exercise --report=all.
14748
14749 2002-05-26 Akim Demaille <akim@epita.fr>
14750
14751 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14752 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14753 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
14754 (token_number_t, item_number_as_token_number)
14755 (token_number_as_item_number, muscle_insert_token_number_table):
14756 Rename as...
14757 (symbol_number_t, item_number_as_symbol_number)
14758 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
14759 these, since it is more appropriate.
14760
14761 2002-05-26 Akim Demaille <akim@epita.fr>
14762
14763 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
14764 `Error:' lines.
14765 * data/bison.simple (yystos) [YYDEBUG]: New.
14766 (yyparse) [YYDEBUG]: Display the symbols which are popped during
14767 error recovery.
14768 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
14769
14770 2002-05-25 Akim Demaille <akim@epita.fr>
14771
14772 * doc/bison.texinfo (Debugging): Split into...
14773 (Tracing): this new section, its former contents, and...
14774 (Understanding): this new section.
14775 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
14776 by...
14777 (report_flag): this.
14778 Adjust all dependencies.
14779 (report_args, report_types, report_argmatch): New.
14780 (usage, getargs): Report/support -r, --report.
14781 * src/options.h
14782 (struct option_table_struct): Rename as..,
14783 (struct option_table_s): this.
14784 Rename the `set_flag' member to `flag' to match with getopt_long's
14785 struct.
14786 * src/options.c (option_table): Split verbose into an entry for
14787 %verbose, and another for --verbose.
14788 Support --report/-r, so remove -r from the obsolete --raw.
14789 * src/print.c: Attach full item sets and lookaheads reports to
14790 report_flag instead of trace_flag.
14791 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14792
14793 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14794 and Paul Eggert <eggert@twinsun.com>
14795
14796 * data/bison.simple (yyparse): Correct error handling to conform to
14797 POSIX and yacc. Specifically, after syntax error is discovered,
14798 do not reduce further before shifting the error token.
14799 Clean up the code a bit by removing the labels yyerrdefault,
14800 yyerrhandle, yyerrpop.
14801 * NEWS: Document the above.
14802
14803 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14804
14805 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14806 type; it isn't always big enough, since it doesn't necessarily
14807 include non-terminals.
14808 (yytranslate): Expand definition of yy_token_number_type, so that
14809 the latter can be removed.
14810 (yy_token_number_type): Remove, only one use.
14811 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14812 don't use TokenNumberType as element type.
14813
14814 * tests/regression.at: Modify expected output to agree with change
14815 to yyr1 and yytranslate.
14816
14817 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14818
14819 * src/reader.c (parse_action): Use copy_character instead of
14820 obstack_1grow.
14821
14822 2002-05-13 Akim Demaille <akim@epita.fr>
14823
14824 * tests/regression.at (Token definitions): Prototype yylex and
14825 yyerror.
14826
14827 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14828
14829 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14830 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14831 32-bit arithmetic.
14832 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14833
14834 2002-05-07 Akim Demaille <akim@epita.fr>
14835
14836 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14837 avoid GCC warnings.
14838
14839 2002-05-07 Akim Demaille <akim@epita.fr>
14840
14841 Kill GCC warnings.
14842
14843 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14844 over the RHS of each rule.
14845 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14846 * src/state.h (state_t): Member `nitems' is unsigned short.
14847 * src/LR0.c (get_state): Adjust.
14848 * src/reader.c (packgram): Likewise.
14849 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14850 `Type'.
14851 (muscle_insert_int_table): Remove, unused.
14852 (prepare_rules): Remove `max'.
14853
14854 2002-05-06 Akim Demaille <akim@epita.fr>
14855
14856 * src/closure.c (print_firsts): Display of the symbol tags.
14857 (bitmatrix_print): Move to...
14858 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14859 here.
14860 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14861
14862 2002-05-06 Akim Demaille <akim@epita.fr>
14863
14864 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14865 hash_do_for_each.
14866
14867 2002-05-06 Akim Demaille <akim@epita.fr>
14868
14869 * src/LR0.c (new_state, get_state): Instead of using the global
14870 `kernel_size' and `kernel_base', have two new arguments:
14871 `core_size' and `core'.
14872 Adjust callers.
14873
14874 2002-05-06 Akim Demaille <akim@epita.fr>
14875
14876 * src/reader.c (packgram): No longer end `ritem' with a 0
14877 sentinel: it is not used.
14878
14879 2002-05-05 Akim Demaille <akim@epita.fr>
14880
14881 New experimental feature: display the lookaheads in the report and
14882 graph.
14883
14884 * src/print (print_core): When --trace-flag, display the rules
14885 lookaheads.
14886 * src/print_graph.c (print_core): Likewise.
14887 Swap the arguments.
14888 Adjust caller.
14889
14890 2002-05-05 Akim Demaille <akim@epita.fr>
14891
14892 * tests/torture.at (Many lookaheads): New test.
14893
14894 2002-05-05 Akim Demaille <akim@epita.fr>
14895
14896 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14897 (GENERATE_MUSCLE_INSERT_TABLE): this.
14898 (output_int_table, output_unsigned_int_table, output_short_table)
14899 (output_token_number_table, output_item_number_table): Replace with...
14900 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14901 (muscle_insert_short_table, muscle_insert_token_number_table)
14902 (muscle_insert_item_number_table): these.
14903 Adjust all callers.
14904 (prepare_tokens): Don't free `translations', since...
14905 * src/reader.h, src/reader.c (grammar_free): do it.
14906 Move to...
14907 * src/gram.h, src/gram.c (grammar_free): here.
14908 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14909 b4_translate_max.
14910
14911 2002-05-05 Akim Demaille <akim@epita.fr>
14912
14913 * src/output.c (output_unsigned_int_table): New.
14914 (prepare_rules): `i' is unsigned.
14915 `prhs', `rline', `r2' are unsigned int.
14916 Rename muscle `rhs_number_max' as `rhs_max'.
14917 Output muscles `prhs_max', `rline_max', and `r2_max'.
14918 Free rline and r1.
14919 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14920 to compute types instead of constant types.
14921 * tests/regression.at (Web2c Actions): Adjust.
14922
14923 2002-05-04 Akim Demaille <akim@epita.fr>
14924
14925 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14926 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14927 Adjust dependencies.
14928 * src/output.c (token_definitions_output): Be sure not to output a
14929 `#define 'a'' when fed with `%token 'a' "a"'.
14930 * tests/regression.at (Token definitions): New.
14931
14932 2002-05-03 Paul Eggert <eggert@twinsun.com>
14933
14934 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14935 for K&R C.
14936
14937 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14938
14939 * Makefile.am (SUBDIRS): Remove intl.
14940 (EXTRA_DIST): Add config/config.rpath.
14941
14942 2002-05-03 Akim Demaille <akim@epita.fr>
14943
14944 * data/bison.simple (m4_if): Don't output empty enums.
14945 And actually, output valid enum definitions :(.
14946
14947 2002-05-03 Akim Demaille <akim@epita.fr>
14948
14949 * configure.bat: Remove, completely obsolete.
14950 * Makefile.am (EXTRA_DIST): Adjust.
14951 Don't distribute config.rpath...
14952 * config/Makefile.am (EXTRA_DIST): Do it.
14953
14954 2002-05-03 Akim Demaille <akim@epita.fr>
14955
14956 * configure.in (GETTEXT_VERSION): New.
14957 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14958
14959 2002-05-03 Akim Demaille <akim@epita.fr>
14960
14961 * data/bison.simple (b4_token_enum): New.
14962 (b4_token_defines): Use it to output tokens both as #define and
14963 enums.
14964 Suggested by Paul Eggert.
14965 * src/output.c (token_definitions_output): Don't output spurious
14966 white spaces.
14967
14968 2002-05-03 Akim Demaille <akim@epita.fr>
14969
14970 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14971
14972 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
14973
14974 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14975 Update the stack class, give a try to deque as the default container.
14976
14977 2002-05-02 Akim Demaille <akim@epita.fr>
14978
14979 * data/bison.simple (yyparse): Do not implement @$ = @1.
14980 (YYLLOC_DEFAULT): Adjust to do it.
14981 * doc/bison.texinfo (Location Default Action): Fix.
14982
14983 2002-05-02 Akim Demaille <akim@epita.fr>
14984
14985 * src/reader.c (parse_braces): Merge into...
14986 (parse_action): this.
14987
14988 2002-05-02 Akim Demaille <akim@epita.fr>
14989
14990 * configure.in (ALL_LINGUAS): Remove.
14991 * po/LINGUAS, hr.po: New.
14992
14993 2002-05-02 Akim Demaille <akim@epita.fr>
14994
14995 Remove the so called hairy (semantic) parsers.
14996
14997 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14998 * src/gram.h, src/gram.c (semantic_parser): Remove.
14999 (rule_t): Remove the guard and guard_line members.
15000 * src/lex.h (token_t): remove tok_guard.
15001 * src/options.c (option_table): Remove %guard and %semantic_parser
15002 support.
15003 * src/output.c, src/output.h (guards_output): Remove.
15004 (prepare): Adjust.
15005 (token_definitions_output): Don't output the `T'
15006 tokens (???).
15007 (output_skeleton): Don't output the guards.
15008 * src/files.c, src/files.c (attrsfile): Remove.
15009 * src/reader.c (symbol_list): Remove the guard and guard_line
15010 members.
15011 Adjust dependencies.
15012 (parse_guard): Remove.
15013 * data/bison.hairy: Remove.
15014 * doc/bison.texinfo (Environment Variables): Remove occurrences of
15015 BISON_HAIRY.
15016
15017 2002-05-02 Akim Demaille <akim@epita.fr>
15018
15019 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
15020 (parse_guard): Rename the formal argument `stack_offset' as
15021 `rule_length', which is more readable.
15022 Adjust callers.
15023 (copy_at, copy_dollar): Instead of outputting the hard coded
15024 values of $$, $n and so forth, output invocation to b4_lhs_value,
15025 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
15026 Note: this patch partially drops `semantic-parser' support: it
15027 always does `rule_length - n', where semantic parsers ought to
15028 always use `-n'.
15029 * data/bison.simple, data/bison.c++ (b4_lhs_value)
15030 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
15031
15032 2002-05-02 Akim Demaille <akim@epita.fr>
15033
15034 * configure.in (AC_INIT): Bump to 1.49b.
15035 (AM_INIT_AUTOMAKE): Short invocation.
15036
15037 2002-05-02 Akim Demaille <akim@epita.fr>
15038
15039 Version 1.49a.
15040
15041 2002-05-01 Akim Demaille <akim@epita.fr>
15042
15043 * src/skeleton.h: Remove.
15044
15045 2002-05-01 Akim Demaille <akim@epita.fr>
15046
15047 * src/skeleton.h: Fix the #endif.
15048 Reported by Magnus Fromreide.
15049
15050 2002-04-26 Paul Eggert <eggert@twinsun.com>
15051
15052 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
15053 Define if we define YYSTYPE and YYLTYPE, respectively.
15054 (YYCOPY): Fix [] quoting problem in the non-GCC case.
15055
15056 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
15057
15058 * src/scan-skel.l: Postprocess quadrigraphs.
15059
15060 * src/reader.c (copy_character): New function, used to output
15061 single characters while replacing `[' and `]' with quadrigraphs, to
15062 avoid troubles with M4 quotes.
15063 (copy_comment): Output characters with copy_character.
15064 (read_additionnal_code): Likewise.
15065 (copy_string2): Likewise.
15066 (copy_definition): Likewise.
15067
15068 * tests/calc.at: Exercise M4 quoting.
15069
15070 2002-04-25 Akim Demaille <akim@epita.fr>
15071
15072 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
15073 between `!' and the command.
15074 Reported by Paul Eggert.
15075
15076 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
15077
15078 * tests/calc.at: Exercise prologue splitting.
15079
15080 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
15081 `b4_post_prologue' instead of `b4_prologue'.
15082
15083 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15084 muscles.
15085 (output): Free pre_prologue_obstack and post_prologue_obstack.
15086 * src/files.h, src/files.c (attrs_obstack): Remove.
15087 (pre_prologue_obstack, post_prologue_obstack): New.
15088 * src/reader.c (copy_definition): Add a parameter to specify the
15089 obstack to fill, instead of using attrs_obstack unconditionally.
15090 (read_declarations): Pass pre_prologue_obstack to copy_definition if
15091 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
15092
15093 2002-04-23 Paul Eggert <eggert@twinsun.com>
15094
15095 * data/bison.simple: Remove unnecessary commentary and white
15096 space differences from 1_29-branch.
15097 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
15098
15099 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
15100 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
15101 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
15102 constructors or destructors.
15103
15104 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
15105
15106 2002-04-23 Akim Demaille <akim@epita.fr>
15107
15108 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
15109 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
15110 location with columns.
15111 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
15112 All reported by Paul Eggert.
15113
15114 2002-04-22 Akim Demaille <akim@epita.fr>
15115
15116 * src/reduce.c (dump_grammar): Move to...
15117 * src/gram.h, src/gram.c (grammar_dump): here.
15118 Be sure to separate long item numbers.
15119 Don't read the members of a rule's prec if its nil.
15120
15121 2002-04-22 Akim Demaille <akim@epita.fr>
15122
15123 * src/output.c (table_size, table_grow): New.
15124 (MAXTABLE): Remove, replace uses with table_size.
15125 (pack_vector): Instead of dying when the table is too big, grow it.
15126
15127 2002-04-22 Akim Demaille <akim@epita.fr>
15128
15129 * data/bison.simple (yyr1): Its type is that of a token number.
15130 * data/bison.c++ (r1_): Likewise.
15131 * tests/regression.at (Web2c Actions): Adjust.
15132
15133 2002-04-22 Akim Demaille <akim@epita.fr>
15134
15135 * src/reader.c (token_translations_init): 256 is now the default
15136 value for the error token, i.e., it will be assigned another
15137 number if the user assigned 256 to one of her tokens.
15138 (reader): Don't force 256 to error.
15139 * doc/bison.texinfo (Symbols): Adjust.
15140 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15141 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
15142 etc. instead of 10, 20, 30 (which was used to `jump' over error
15143 (256) and undefined (2)).
15144
15145 2002-04-22 Akim Demaille <akim@epita.fr>
15146
15147 Propagate more token_number_t.
15148
15149 * src/gram.h (token_number_as_item_number)
15150 (item_number_as_token_number): New.
15151 * src/output.c (GENERATE_OUTPUT_TABLE): New.
15152 Use it to create output_item_number_table and
15153 output_token_number_table.
15154 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
15155 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
15156 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
15157 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
15158
15159 2002-04-22 Akim Demaille <akim@epita.fr>
15160
15161 * src/output.h, src/output.c (get_lines_number): Remove.
15162
15163 2002-04-19 Akim Demaille <akim@epita.fr>
15164
15165 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
15166 as Lex/Flex'.
15167 (Debugging): More details about enabling the debugging features.
15168 (Table of Symbols): Describe $$, $n, @$, and @n.
15169 Suggested by Tim Josling.
15170
15171 2002-04-19 Akim Demaille <akim@epita.fr>
15172
15173 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
15174
15175 2002-04-10 Akim Demaille <akim@epita.fr>
15176
15177 * src/system.h: Rely on HAVE_LIMITS_H.
15178 Suggested by Paul Eggert.
15179
15180 2002-04-09 Akim Demaille <akim@epita.fr>
15181
15182 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
15183 full stderr, and strip it according to the bison options, instead
15184 of composing the error message from different bits.
15185 This makes it easier to check for several error messages.
15186 Adjust all the invocations.
15187 Add an invocation exercising the error token.
15188 Add an invocation demonstrating a stupid error message.
15189 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
15190 Adjust the tests.
15191 Error message are for stderr, not stdout.
15192
15193 2002-04-09 Akim Demaille <akim@epita.fr>
15194
15195 * src/gram.h, src/gram.c (error_token_number): Remove, use
15196 errtoken->number.
15197 * src/reader.c (reader): Don't specify the user token number (2)
15198 for $undefined, as it uselessly prevents using it.
15199 * src/gram.h (token_number_t): Move to...
15200 * src/symtab.h: here.
15201 (state_t.number): Is a token_number_t.
15202 * src/print.c, src/reader.c: Use undeftoken->number instead of
15203 hard coded 2.
15204 (Even though this 2 is not the same as above: the number of the
15205 undeftoken remains being 2, it is its user token number which
15206 might not be 2).
15207 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
15208 `user_token_number_max'.
15209 Output `undef_token_number'.
15210 * data/bison.simple, data/bison.c++: Use them.
15211 Be sure to map invalid yylex return values to
15212 `undef_token_number'. This saves us from gratuitous SEGV.
15213
15214 * tests/conflicts.at (Solved SR Conflicts)
15215 (Unresolved SR Conflicts): Adjust.
15216 * tests/regression.at (Web2c Actions): Adjust.
15217
15218 2002-04-08 Akim Demaille <akim@epita.fr>
15219
15220 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
15221 Adding #line.
15222 Remove the duplicate `typedefs'.
15223 (RhsNumberType): Fix the declaration and various other typos.
15224 Use __ofile__.
15225 * data/bison.simple: Use __ofile__.
15226 * src/scan-skel.l: Handle __ofile__.
15227
15228 2002-04-08 Akim Demaille <akim@epita.fr>
15229
15230 * src/gram.h (item_number_t): New, the type of item numbers in
15231 RITEM. Note that it must be able to code symbol numbers as
15232 positive number, and the negation of rule numbers as negative
15233 numbers.
15234 Adjust all dependencies (pretty many).
15235 * src/reduce.c (rule): Remove this `short *' pointer: use
15236 item_number_t.
15237 * src/system.h (MINSHORT, MAXSHORT): Remove.
15238 Include `limits.h'.
15239 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
15240 (shortcpy): Remove.
15241 (MAXTABLE): Move to...
15242 * src/output.c (MAXTABLE): here.
15243 (prepare_rules): Use output_int_table to output rhs.
15244 * data/bison.simple, data/bison.c++: Adjust.
15245 * tests/torture.at (Big triangle): Move the limit from 254 to
15246 500.
15247 * tests/regression.at (Web2c Actions): Ajust.
15248
15249 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
15250 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
15251 passes, but produces negative #line number, once fixed, GCC is
15252 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
15253 C), it passes.
15254 * src/state.h (state_h): Code input lines on ints, not shorts.
15255
15256 2002-04-08 Akim Demaille <akim@epita.fr>
15257
15258 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
15259 and then the grammar.
15260
15261 2002-04-08 Akim Demaille <akim@epita.fr>
15262
15263 * src/system.h: No longer using strndup.
15264
15265 2002-04-07 Akim Demaille <akim@epita.fr>
15266
15267 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
15268 * src/output.c (output_table_data): Return the longest number.
15269 (prepare_tokens): Output `token_number_max').
15270 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
15271 New.
15272 Use them to define yy_token_number_type/TokenNumberType.
15273 Use this type for yytranslate.
15274 * tests/torture.at (Big triangle): Push the limit from 124 to
15275 253.
15276 * tests/regression.at (Web2c Actions): Adjust.
15277
15278 2002-04-07 Akim Demaille <akim@epita.fr>
15279
15280 * tests/torture.at (Big triangle): New.
15281 (GNU AWK Grammar, GNU Cim Grammar): Move to...
15282 * tests/existing.at: here.
15283
15284 2002-04-07 Akim Demaille <akim@epita.fr>
15285
15286 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
15287 nritems.
15288 Adjust dependencies.
15289
15290 2002-04-07 Akim Demaille <akim@epita.fr>
15291
15292 * src/reader.c: Normalize increments to prefix form.
15293
15294 2002-04-07 Akim Demaille <akim@epita.fr>
15295
15296 * src/reader.c, symtab.c: Remove debugging code.
15297
15298 2002-04-07 Akim Demaille <akim@epita.fr>
15299
15300 Rename all the `bucket's as `symbol_t'.
15301
15302 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
15303 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
15304 * src/symtab.c, src/symtab.h (bucket): Rename as...
15305 (symbol_t): this.
15306 (symbol_list_new, bucket_check_defined, bucket_make_alias)
15307 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
15308 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15309 (buckets_new, buckets_free, buckets_do): Rename as...
15310 (symbol_list_new, symbol_check_defined, symbol_make_alias)
15311 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
15312 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
15313 (symbols_new, symbols_free, symbols_do): these.
15314
15315 2002-04-07 Akim Demaille <akim@epita.fr>
15316
15317 Use lib/hash for the symbol table.
15318
15319 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
15320 EOF.
15321 * src/lex.c (lex): Set the `number' member of new terminals.
15322 * src/reader.c (bucket_check_defined, bucket_make_alias)
15323 (bucket_check_alias_consistence, bucket_translation): New.
15324 (reader, grammar_free, readgram, token_translations_init)
15325 (packsymbols): Adjust.
15326 (reader): Number the predefined tokens.
15327 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
15328 for predefined tokens.
15329 * src/symtab.h (bucket): Remove all the hash table related
15330 members.
15331 * src/symtab.c (symtab): Replace by...
15332 (bucket_table): this.
15333 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
15334 (buckets_new, buckets_do): New.
15335
15336 2002-04-07 Akim Demaille <akim@epita.fr>
15337
15338 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
15339 (start_symbol, max_user_token_number, semantic_parser)
15340 (error_token_number): Initialize.
15341 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
15342 Initialize.
15343 (reader): Don't.
15344 (errtoken, eoftoken, undeftoken, axiom): Extern.
15345
15346 2002-04-07 Akim Demaille <akim@epita.fr>
15347
15348 * src/gram.h (rule_s): prec and precsym are now pointers
15349 to the bucket giving the priority/associativity.
15350 Member `associativity' removed: useless.
15351 * src/reduce.c, src/conflicts.c: Adjust.
15352
15353 2002-04-07 Akim Demaille <akim@epita.fr>
15354
15355 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
15356 Properly escape the symbols' TAG when outputting them.
15357
15358 2002-04-07 Akim Demaille <akim@epita.fr>
15359
15360 * src/lalr.h (LA): Is a bitsetv, not bitset*.
15361
15362 2002-04-07 Akim Demaille <akim@epita.fr>
15363
15364 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
15365 (LArule): this, which is an array to rule_t*.
15366 * src/print.c, src/conflicts.c: Adjust.
15367
15368 2002-04-07 Akim Demaille <akim@epita.fr>
15369
15370 * src/gram.h (rule_t): Rename `number' as `user_number'.
15371 `number' is a new member.
15372 Adjust dependencies.
15373 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
15374
15375 2002-04-07 Akim Demaille <akim@epita.fr>
15376
15377 As a result of the previous patch, it is no longer needed
15378 to reorder ritem itself.
15379
15380 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
15381
15382 2002-04-07 Akim Demaille <akim@epita.fr>
15383
15384 Be sure never to walk through RITEMS, but use only data related to
15385 the rules themselves. RITEMS should be banished.
15386
15387 * src/output.c (output_token_translations): Rename as...
15388 (prepare_tokens): this.
15389 In addition to `translate', prepare the muscles `tname' and
15390 `toknum', which were handled by...
15391 (output_rule_data): this.
15392 Remove, and move the remainder of its outputs into...
15393 (prepare_rules): this new routines, which also merges content from
15394 (output_gram): this.
15395 (prepare_rules): Be sure never to walk through RITEMS.
15396 (output_stos): Rename as...
15397 (prepare_stos): this.
15398 (output): Always invoke prepare_states, after all, just don't use it
15399 in the output if you don't need it.
15400
15401 2002-04-07 Akim Demaille <akim@epita.fr>
15402
15403 * src/LR0.c (new_state): Display `nstates' as the name of the
15404 newly created state.
15405 Adjust to initialize first_state and last_state if needed.
15406 Be sure to distinguish the initial from the final state.
15407 (new_states): Create the itemset of the initial state, and use
15408 new_state.
15409 * src/closure.c (closure): Now that the initial state has its
15410 items properly set, there is no need for a special case when
15411 creating `ruleset'.
15412
15413 As a result, now the rule 0, reducing to $axiom, is visible in the
15414 outputs. Adjust the test suite.
15415
15416 * tests/conflicts.at (Solved SR Conflicts)
15417 (Unresolved SR Conflicts): Adjust.
15418 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
15419 * tests/conflicts.at (S/R in initial): New.
15420
15421 2002-04-07 Akim Demaille <akim@epita.fr>
15422
15423 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
15424 the RHS of the rules.
15425 * src/output.c (output_gram): Likewise.
15426
15427 2002-04-07 Akim Demaille <akim@epita.fr>
15428
15429 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
15430 bucket.
15431 Adjust all dependencies.
15432 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
15433 `number' of the buckets too.
15434 * src/gram.h: Include `symtab.h'.
15435 (associativity): Move to...
15436 * src/symtab.h: here.
15437 No longer include `gram.h'.
15438
15439 2002-04-07 Akim Demaille <akim@epita.fr>
15440
15441 * src/gram.h, src/gram.c (rules_rhs_length): New.
15442 (ritem_longest_rhs): Use it.
15443 * src/gram.h (rule_t): `number' is a new member.
15444 * src/reader.c (packgram): Set it.
15445 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
15446 the end of `rules', and count them out of `nrules'.
15447 (reduce_output, dump_grammar): Adjust.
15448 * src/print.c (print_grammar): It is no longer needed to check for
15449 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
15450 * tests/reduce.at (Reduced Automaton): New test.
15451
15452 2002-04-07 Akim Demaille <akim@epita.fr>
15453
15454 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
15455 lacking `+ 1' to nrules, Bison reported as useless a token if it
15456 was used solely to set the precedence of the last rule...
15457
15458 2002-04-07 Akim Demaille <akim@epita.fr>
15459
15460 * data/bison.c++, data/bison.simple: Don't output the current file
15461 name in #line, to avoid useless diffs between two identical
15462 outputs under different names.
15463
15464 2002-04-07 Akim Demaille <akim@epita.fr>
15465
15466 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
15467 Normalize loops to using `< nrules + 1', not `<= nrules'.
15468
15469 2002-04-07 Akim Demaille <akim@epita.fr>
15470
15471 * TODO: Update.
15472
15473 2002-04-07 Akim Demaille <akim@epita.fr>
15474
15475 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15476 bucket.value as bucket.number.
15477
15478 2002-04-07 Akim Demaille <akim@epita.fr>
15479
15480 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15481 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
15482 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
15483 RHS, instead of being an index in RITEMS.
15484
15485 2002-04-04 Paul Eggert <eggert@twinsun.com>
15486
15487 * doc/bison.texinfo: Update copyright date.
15488 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
15489 (Symbols): Warn about running Bison in one character set,
15490 but compiling and/or running in an incompatible one.
15491 Warn about character code 256, too.
15492
15493 2002-04-03 Paul Eggert <eggert@twinsun.com>
15494
15495 * src/bison.data (YYSTACK_ALLOC): Depend on whether
15496 YYERROR_VERBOSE is nonzero, not whether it is defined.
15497
15498 Merge changes from bison-1_29-branch.
15499
15500 2002-03-20 Paul Eggert <eggert@twinsun.com>
15501
15502 Merge fixes from Debian bison_1.34-1.diff.
15503
15504 * configure.in (AC_PREREQ): 2.53.
15505
15506 2002-03-20 Akim Demaille <akim@epita.fr>
15507
15508 * src/conflicts.c (log_resolution): Argument `resolution' is const.
15509
15510 2002-03-19 Paul Eggert <eggert@twinsun.com>
15511
15512 * src/bison.simple (YYCOPY): New macro.
15513 (YYSTACK_RELOCATE): Use it.
15514 Remove Type arg; no longer needed. All callers changed.
15515 (yymemcpy): Remove; no longer needed.
15516
15517 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
15518 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15519
15520 2002-03-19 Akim Demaille <akim@epita.fr>
15521
15522 Test and fix the #line outputs.
15523
15524 * tests/atlocal.at (GCC): New.
15525 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
15526 (Prologue synch line, %union synch line, Postprologue synch line)
15527 (Action synch line, Epilogue synch line): New tests.
15528 * src/reader.c (parse_union_decl): Define the muscle stype_line.
15529 * data/bison.simple, data/bison.c++: Use it.
15530
15531 2002-03-19 Akim Demaille <akim@epita.fr>
15532
15533 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
15534 (Solved SR Conflicts, %expect not enough, %expect right)
15535 (%expect too much): Move to...
15536 * tests/conflicts.at: this new file.
15537
15538 2002-03-19 Akim Demaille <akim@epita.fr>
15539
15540 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
15541 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
15542 that we can move to enums for instance.
15543 * src/output.c (token_definitions_output): Output a list of
15544 `token-name, token-number' instead of the #define.
15545 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
15546
15547 2002-03-14 Akim Demaille <akim@epita.fr>
15548
15549 Use Gettext 0.11.1.
15550
15551 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
15552
15553 * data/bison.c++: Make the user able to add members to the generated
15554 parser by subclassing.
15555
15556 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
15557
15558 * src/reader.c (read_additionnal_code): `c' should be an integer, not
15559 a character.
15560 Reported by Nicolas Tisserand and Nicolas Burrus.
15561
15562 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15563
15564 * src/reader.c: Warn about lacking semi-colons, do not complain.
15565
15566 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15567
15568 * data/bison.c++: Remove a debug line.
15569
15570 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
15571
15572 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
15573 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
15574 provide a default implementation.
15575
15576 2002-03-04 Akim Demaille <akim@epita.fr>
15577
15578 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
15579 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
15580 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
15581 * tests/semantic.at (Parsing Guards): Similarly.
15582 * src/reader.at (readgram): Complain if the last rule is not ended
15583 with a semi-colon.
15584
15585 2002-03-04 Akim Demaille <akim@epita.fr>
15586
15587 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
15588 * src/closure.c: here.
15589 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
15590 RTC.
15591 * src/warshall.h, src/warshall.c: Remove.
15592 * tests/sets.at (Broken Closure): Adjust.
15593
15594 2002-03-04 Akim Demaille <akim@epita.fr>
15595
15596 * src/output.c (output_skeleton): tempdir is const.
15597 bytes_read is unused.
15598
15599 2002-03-04 Akim Demaille <akim@epita.fr>
15600
15601 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15602 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
15603 Update.
15604 From Michael Hayes.
15605
15606 2002-03-04 Akim Demaille <akim@epita.fr>
15607
15608 * src/closure.c (closure): `r' is unused.
15609
15610 2002-03-04 Akim Demaille <akim@epita.fr>
15611
15612 * tests/sets.at (Broken Closure): Add the ending `;'.
15613 * src/reader.at (readgram): Complain if a rule is not ended with a
15614 semi-colon.
15615
15616 2002-03-04 Akim Demaille <akim@epita.fr>
15617
15618 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
15619 (count_sr_conflicts): Use bitset_count.
15620 * src/reduce.c (inaccessable_symbols): Ditto.
15621 (bits_size): Remove.
15622 * src/warshall.h, src/warshall.c: Convert to bitsetv.
15623
15624 2002-03-04 Akim Demaille <akim@epita.fr>
15625
15626 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
15627 * src/reduce.c: Remove the `bitset_zero's following the
15628 `bitset_create's, as now it is performed by the latter.
15629
15630 2002-03-04 Akim Demaille <akim@epita.fr>
15631
15632 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
15633 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
15634 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
15635 latest sources from Michael.
15636
15637 2002-03-04 Akim Demaille <akim@epita.fr>
15638
15639 * src/output.c (output): Don't free the grammar.
15640 * src/reader.c (grammar_free): New.
15641 * src/main.c (main): Call it and don't free symtab here.
15642
15643 2002-03-04 Akim Demaille <akim@epita.fr>
15644
15645 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
15646 before returning.
15647 Reported by Benoit Perrot.
15648
15649 2002-03-04 Akim Demaille <akim@epita.fr>
15650
15651 Use bitset operations when possible, not loops over bits.
15652
15653 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
15654 bitset_or.
15655 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
15656 * src/reduce.c (useless_nonterminals): Formatting changes.
15657 * src/warshall.c (TC): Use bitset_or.
15658
15659 2002-03-04 Akim Demaille <akim@epita.fr>
15660
15661 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
15662 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
15663 Ditto.
15664
15665 2002-03-04 Akim Demaille <akim@epita.fr>
15666
15667 * src/lalr.c (F): Now a bitset*.
15668 Adjust all dependencies.
15669
15670 2002-03-04 Akim Demaille <akim@epita.fr>
15671
15672 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
15673 Adjust all dependencies.
15674
15675 2002-03-04 Akim Demaille <akim@epita.fr>
15676
15677 * src/L0.c, src/LR0.h (nstates): Be size_t.
15678 Adjust comparisons (signed vs unsigned).
15679 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
15680 bitset*.
15681 Adjust all dependencies.
15682
15683 2002-03-04 Akim Demaille <akim@epita.fr>
15684
15685 * src/closure.c (firsts): Now, also a bitset.
15686 Adjust all dependencies.
15687 (varsetsize): Remove, now unused.
15688 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
15689
15690 2002-03-04 Akim Demaille <akim@epita.fr>
15691
15692 * src/print.c: Convert to use bitset.h, not hand coded iterations
15693 over ints.
15694
15695 2002-03-04 Akim Demaille <akim@epita.fr>
15696
15697 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
15698
15699 2002-03-04 Akim Demaille <akim@epita.fr>
15700
15701 * src/closure.c (ruleset): Be a bitset.
15702 (rulesetsize): Remove.
15703
15704 2002-03-04 Akim Demaille <akim@epita.fr>
15705
15706 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
15707 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
15708 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
15709 * src/closure.c (fderives): Be an array of bitsets.
15710
15711 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
15712
15713 * data/bison.c++: Merge the two generated headers. Insert a copyright
15714 notice in each output file.
15715
15716 2002-02-28 Akim Demaille <akim@epita.fr>
15717
15718 * data/bison.c++: Copy the prologue of bison.simple to fetch
15719 useful M4 definitions, such as b4_header_guard.
15720
15721 2002-02-25 Akim Demaille <akim@epita.fr>
15722
15723 * src/getargs.c (version): Give the name of the authors, and use a
15724 translator friendly scheme for the bgr
15725 copyright notice.
15726
15727 2002-02-25 Akim Demaille <akim@epita.fr>
15728
15729 * src/output.c (header_output): Remove, now handled completely via
15730 M4.
15731
15732 2002-02-25 Akim Demaille <akim@epita.fr>
15733
15734 * m4/m4.m4: New, from CVS Autoconf.
15735 * configure.in: Invoke it.
15736 * src/output.c (output_skeleton): Use its result instead of the
15737 hard coded name.
15738
15739 2002-02-25 Akim Demaille <akim@epita.fr>
15740
15741 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
15742 Fileutils 4.1.5.
15743 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
15744 * src/output.c (output_skeleton): Use mkstemp to create a real
15745 temporary file.
15746 Move the filling of `skeleton' and its muscle to...
15747 (prepare): here.
15748 (output): Move the definition of the prologue muscle to...
15749 (prepare): here.
15750 * src/system.h (DEFAULT_TMPDIR): New.
15751
15752 2002-02-14 Paul Eggert <eggert@twinsun.com>
15753
15754 Remove the support for C++ namespace cleanliness; it was
15755 causing more problems than it was curing, since it didn't work
15756 properly on some nonstandard C++ compilers. This can wait
15757 for a proper C++ parser.
15758
15759 * NEWS: Document this.
15760 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
15761 of C++, as it's treated like C now.
15762 * src/bison.simple (YYSTD): Remove.
15763 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
15764 Treat C++ just like Standard C instead of trying to support
15765 namespace cleanliness.
15766
15767 2002-02-14 Akim Demaille <akim@epita.fr>
15768
15769 * tests/regression.at (else): Adjust to Andreas' change.
15770
15771 2002-02-14 Akim Demaille <akim@epita.fr>
15772
15773 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
15774
15775 2002-02-13 Andreas Schwab <schwab@suse.de>
15776
15777 * src/output.c (output_rule_data): Don't output NULL, it might
15778 not be defined yet.
15779
15780 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
15781
15782 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15783 (Copyright notice): Update.
15784
15785 2002-02-11 Akim Demaille <akim@epita.fr>
15786
15787 * tests/regression.at (%nonassoc and eof): Don't include
15788 nonportable headers.
15789
15790 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
15791
15792 * data/bison.c++: Correct error recovery. Make the user able to
15793 initialize the starting location.
15794
15795 2002-02-07 Akim Demaille <akim@epita.fr>
15796
15797 * tests/input.at: New.
15798
15799 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15800
15801 * data/bison.c++: Replace some direct m4 expansions by constants. Be
15802 more consistent when naming methods and variables. Put preprocessor
15803 directives around tables only needed for debugging.
15804
15805 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15806
15807 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15808 C++ parsers.
15809 (yy::b4_name::parse): Use print_.
15810
15811 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15812
15813 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15814
15815 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15816
15817 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15818 C++ parsers.
15819 (yy::b4_name::parse): Build verbose error messages, and use error_.
15820
15821 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15822
15823 * data/bison.c++: Fix m4 quoting in comments.
15824
15825 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15826
15827 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15828 not expanded by m4.
15829
15830 2002-02-05 Akim Demaille <akim@epita.fr>
15831
15832 * data/bison.c++: Adjust to the M4 back end.
15833 More is certainly needed.
15834
15835 2002-02-05 Akim Demaille <akim@epita.fr>
15836
15837 Give a try to M4 as a back end.
15838
15839 * lib/readpipe.c: New, from wdiff.
15840 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15841 BISON_HAIRY.
15842 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15843 specific values. Now it is m4 that performs the lookup.
15844 * src/parse-skel.y: Remove.
15845 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15846 * src/output.c (actions_output, guards_output)
15847 (token_definitions_output): No longer keeps track of the output
15848 line number, hence remove the second argument.
15849 (guards_output): Check against the guard member of a rule, not the
15850 action member.
15851 Adjust callers.
15852 (output_skeleton): Don't look for the skeleton location, let m4 do
15853 that.
15854 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15855 file will be used.
15856 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15857 (prepare): Given that for the time being changesyntax is not
15858 usable in M4, rename the muscles using `-' to `_'.
15859 Define `defines_flag', `output_parser_name' and `output_header_name'.
15860 * src/output.h (actions_output, guards_output)
15861 (token_definitions_output): Adjust prototypes.
15862 * src/scan-skel.l: Instead of scanning the skeletons, it now
15863 processes the output of m4: `__oline__' and `#output'.
15864 * data/bison.simple: Adjust to be used by M4(sugar).
15865 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15866 to date.
15867 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15868 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15869 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15870 shamelessly stolen from CVS Autoconf.
15871
15872 2002-02-05 Akim Demaille <akim@epita.fr>
15873
15874 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15875 * configure.in: Check for the declarations of free and malloc.
15876 * src/muscle_tab.c: Adjust.
15877
15878 2002-02-05 Akim Demaille <akim@epita.fr>
15879
15880 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15881 which have no values.
15882
15883 2002-02-05 Akim Demaille <akim@epita.fr>
15884
15885 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15886 * data/: here.
15887
15888 2002-01-29 Paul Eggert <eggert@twinsun.com>
15889
15890 * src/bison.simple (YYSIZE_T): Do not define merely because
15891 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15892 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15893
15894 2002-01-27 Akim Demaille <akim@epita.fr>
15895
15896 Fix `%nonassoc and eof'.
15897
15898 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15899 which were not properly copied! Replace
15900 memcpy (res->errs, src->errs, src->nerrs);
15901 with
15902 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15903 !!!
15904 * tests/regression.at (%nonassoc and eof): Adjust to newest
15905 Autotest: `.' is not in the PATH.
15906
15907 2002-01-27 Akim Demaille <akim@epita.fr>
15908
15909 * tests/sets.at (AT_EXTRACT_SETS): New.
15910 (Nullable): Use it.
15911 (Firsts): New.
15912
15913 2002-01-26 Akim Demaille <akim@epita.fr>
15914
15915 * tests/actions.at, tests/calc.at, tests/headers.at,
15916 * tests/torture.at: Adjust to the newest Autotest which no longer
15917 forces `.' in the PATH.
15918
15919 2002-01-25 Akim Demaille <akim@epita.fr>
15920
15921 * tests/regression.at (%nonassoc and eof): New.
15922 Suggested by Robert Anisko.
15923
15924 2002-01-24 Akim Demaille <akim@epita.fr>
15925
15926 Bison dumps core when trying to complain about broken input files.
15927 Reported by Cris van Pelt.
15928
15929 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15930 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15931 into...
15932 (Invalid inputs): Strengthen: exercise parse_percent_token.
15933
15934 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
15935
15936 * src/Makefile.am: Add bison.c++.
15937 * src/bison.c++: New skeleton.
15938
15939 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
15940
15941 * po/it.po: New.
15942
15943 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15944
15945 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15946
15947 2002-01-20 Marc Autret <marc@gnu.org>
15948
15949 * src/files.c (compute_output_file_names): Fix
15950
15951 2002-01-20 Marc Autret <marc@gnu.org>
15952
15953 * tests/output.at: New test.
15954 * src/files.c (compute_base_names): Don't map extensions when
15955 the YACC flag is set, use defaults.
15956 Reported by Evgeny Stambulchik.
15957
15958 2002-01-20 Marc Autret <marc@gnu.org>
15959
15960 * src/system.h: Need to define __attribute__ away for non-GCC
15961 compilers as well (i.e., the vendor C compiler).
15962 Suggested by Albert Chin-A-Young.
15963
15964 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15965
15966 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15967 canonical definition.
15968 * src/system.h: Use the canonical definition for PARAMS (avoids
15969 a conflict with the macro from lib/hash.h).
15970
15971 2002-01-11 Akim Demaille <akim@epita.fr>
15972
15973 * configure.in: Use AC_FUNC_STRNLEN.
15974 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15975
15976 2002-01-09 Akim Demaille <akim@epita.fr>
15977
15978 * src/files.c, src/files.h (output_infix): New.
15979 (tab_extension): Remove.
15980 (compute_base_names): Compute the former, drop the latter.
15981 * src/output.c (prepare): Insert the muscles `output-infix', and
15982 `output-suffix'.
15983 * src/parse-skel.y (string, string.1): New.
15984 (section.header): Use it.
15985 (section.yacc): Remove.
15986 (prefix): Remove too.
15987 * src/scan-skel.l: Adjust.
15988 * src/bison.simple, src/bison.hairy: Adjust.
15989
15990 2002-01-09 Akim Demaille <akim@epita.fr>
15991
15992 * configure.in (WERROR_CFLAGS): Compute it.
15993 * src/Makefile.am (CFLAGS): Pass it.
15994 * tests/atlocal.in (CFLAGS): Idem.
15995 * src/files.c: Fix a few warnings.
15996 (get_extension_index): Remove, unused.
15997
15998 2002-01-08 Akim Demaille <akim@epita.fr>
15999
16000 * src/getargs.c (AS_FILE_NAME): New.
16001 (getargs): Use it to convert DOSish file names.
16002 * src/files.c (base_name): Rename as full_base_name to avoid
16003 clashes with `base_name ()'.
16004 (filename_split): New.
16005 (compute_base_names): N-th rewrite, using filename_split.
16006
16007 2002-01-08 Akim Demaille <akim@epita.fr>
16008
16009 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
16010 New, stolen from the Fileutils 4.1.
16011 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16012 * configure.in: Check for the presence of memrchr, and of its
16013 prototype.
16014
16015 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
16016
16017 * lib/hash.h (__P): Added definition for this macro.
16018 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
16019 BUILT_SOURCES, to ensure they are generated first.
16020 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
16021 %error-verbose to allow bootstrapping with bison 1.30x.
16022
16023 2002-01-06 Akim Demaille <akim@epita.fr>
16024
16025 * src/reader.c (parse_braces): Don't fetch the next char, the
16026 convention is to fetch on entry.
16027 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
16028 'switch' without a following semicolon.
16029 * tests/regression.at (braces parsing): New.
16030
16031 2002-01-06 Akim Demaille <akim@epita.fr>
16032
16033 Bison is dead wrong in its RR conflict reports.
16034
16035 * tests/torture.at (GNU Cim Grammar): New.
16036 * src/conflicts.c (count_rr_conflicts): Fix.
16037
16038 2002-01-06 Akim Demaille <akim@epita.fr>
16039
16040 Creating package.m4 from configure.ac causes too many problems.
16041
16042 * tests/Makefile.am (package.m4): Create it by hand,
16043 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
16044
16045 2002-01-06 Akim Demaille <akim@epita.fr>
16046
16047 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
16048 skeleton.h.
16049
16050 2002-01-04 Paul Eggert <eggert@twinsun.com>
16051
16052 * doc/bison.texinfo (Debugging):
16053 Remove YYSTDERR; it's no longer defined or used.
16054 Also, s/cstdio.h/cstdio/.
16055
16056 2002-01-03 Akim Demaille <akim@epita.fr>
16057
16058 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
16059
16060 2002-01-03 Akim Demaille <akim@epita.fr>
16061
16062 * src/parse-skel.y (process_skeleton): Don't bind the parser's
16063 tracing code to --trace, wait for a better --trace option, with
16064 args.
16065
16066 2002-01-03 Akim Demaille <akim@epita.fr>
16067
16068 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
16069 The ISO C++ standard is extremely clear about it: stderr is
16070 considered a macro, not a regular symbol (see table 94 `Header
16071 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
16072 Therefore std:: does not apply to it. It still does with fprintf.
16073 Also, s/cstdio.h/cstdio/.
16074
16075 2002-01-03 Akim Demaille <akim@epita.fr>
16076
16077 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
16078 for non system headers.
16079
16080 2002-01-02 Akim Demaille <akim@epita.fr>
16081
16082 Equip the skeleton chain with location tracking, runtime trace,
16083 pure parser and scanner.
16084
16085 * src/parse-skel.y: Request a pure parser, locations, and prefix
16086 renaming.
16087 (%union): Having several members with the same type does not help
16088 type mismatches, simplify.
16089 (YYPRINT, yyprint): New.
16090 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
16091 (skel_error): this.
16092 Handle locations.
16093 * src/scan-skel.l: Adjust to these changes.
16094 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16095 (LOCATION_PRINT, skel_control_t): New.
16096
16097 2001-12-30 Akim Demaille <akim@epita.fr>
16098
16099 * src/parse-skel.y: Get rid of the shift/reduce conflict:
16100 replace `gb' with BLANKS.
16101 * src/scan-skel.l: Adjust.
16102
16103 2001-12-30 Akim Demaille <akim@epita.fr>
16104
16105 * src/system.h: We don't need nor want bcopy.
16106 Throw away MS-DOS crap: we don't need getpid.
16107 * configure.in: We don't need strndup. It was even causing
16108 problems: because Flex includes the headers *before* us,
16109 _GNU_SOURCE is not defined by config.h, and therefore strndup was
16110 not visible.
16111 * lib/xstrndup.c: New.
16112 * src/scan-skel.l: Use it.
16113 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
16114 * src/parse-skel.y: Use %directives instead of #defines.
16115
16116 2001-12-30 Akim Demaille <akim@epita.fr>
16117
16118 * src/skeleton.h: New.
16119 * src/output.c (output_parser, output_master_parser): Remove, dead
16120 code.
16121 * src/output.h (get_lines_number, actions_output, guards_output)
16122 (token_definitions_output): Prototype them.
16123 * src/parse-skel.y: Add the license notice.
16124 Include output.h and skeleton.h.
16125 (process_skeleton): Returns void, and takes a single parameter.
16126 * src/scan-skel.l: Add the license notice.
16127 Include skeleton.h.
16128 Don't use %option yylineno: it seems that then Flex imagines
16129 REJECT has been used, and therefore it won't reallocate its
16130 buffers (which makes no other sense to me than a bug). It results
16131 in warnings for `unused: yy_flex_realloc'.
16132
16133 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
16134
16135 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16136 (MUSCLE_INSERT_PREFIX): ...to there.
16137 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
16138 (MUSCLE_INSERT_PREFIX): Move from here...
16139
16140 * src/bison.hairy: Add a section directive. Put braces around muscle
16141 names. This parser skeleton is still broken, but Bison should not
16142 choke on a bad muscle 'syntax'.
16143 * src/bison.simple: Add a section directive. Put braces around muscle
16144 names.
16145
16146 * src/files.h (strsuffix, stringappend): Add declarations.
16147 (tab_extension): Add declaration.
16148 (short_base_name): Add declaration.
16149
16150 * src/files.c (strsuffix, stringappend): No longer static. These
16151 functions are used in the skeleton parser.
16152 (tab_extension): New.
16153 (compute_base_names): Use the computations done in this function
16154 to guess if the generated parsers should have '.tab' in their
16155 names.
16156 (short_base_name): No longer static.
16157
16158 * src/output.c (output_skeleton): New.
16159 (output): Disable call to output_master_parser, and give a try to
16160 a new skeleton handling system.
16161 (guards_output, actions_output): No longer static.
16162 (token_definitions_output, get_lines_number): No longer static.
16163
16164 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
16165
16166 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
16167 parse-skel.y.
16168
16169 * src/parse-skel.y: New file.
16170 * src/scan-skel.l: New file.
16171
16172 2001-12-29 Akim Demaille <akim@epita.fr>
16173
16174 %name-prefix is broken.
16175
16176 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
16177 Adjust all dependencies.
16178 * tests/headers.at (export YYLTYPE): Strengthen this test: use
16179 %name-prefix.
16180
16181 Renaming yylval but not yylloc is not consistent. Now we do.
16182
16183 * src/bison.simple: Prefix yylloc if used.
16184 * doc/bison.texinfo (Decl Summary): Document that.
16185
16186 2001-12-29 Akim Demaille <akim@epita.fr>
16187
16188 * doc/bison.texinfo: Promote `%long-directive' over
16189 `%long_directive'.
16190 Remove all references to fixed-output-files, yacc is enough.
16191
16192 2001-12-29 Akim Demaille <akim@epita.fr>
16193
16194 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
16195 user prologue. These are defaults.
16196 * tests/actions.at (Mid-rule actions): Make sure the user can
16197 define YYDEBUG and YYERROR_VERBOSE.
16198
16199 2001-12-29 Akim Demaille <akim@epita.fr>
16200
16201 * src/output.c (header_output): Don't forget to export YYLTYPE and
16202 yylloc.
16203 * tests/headers.at (export YYLTYPE): New, make sure it does.
16204 * tests/regression.at (%union and --defines, Invalid CPP headers):
16205 Move to...
16206 * tests/headers.at: here.
16207
16208 2001-12-29 Akim Demaille <akim@epita.fr>
16209
16210 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
16211
16212 2001-12-29 Akim Demaille <akim@epita.fr>
16213
16214 * tests/actions.at (Mid-rule actions): Output on a single line
16215 instead of several.
16216
16217 2001-12-29 Akim Demaille <akim@epita.fr>
16218
16219 * doc/bison.texinfo: Formatting changes.
16220
16221 2001-12-29 Akim Demaille <akim@epita.fr>
16222
16223 Don't store the token defs in a muscle, just be ready to output it
16224 on command. Now possible via `symbols'. Fixes a memory leak.
16225
16226 * src/output.c (token_definitions_output): New.
16227 (output_parser, header_output): Use it.
16228 * src/reader.c (symbols_save): Remove.
16229
16230 2001-12-29 Akim Demaille <akim@epita.fr>
16231
16232 * src/bison.simple: Do not provide a default for YYSTYPE and
16233 YYLTYPE before the user's prologue. Otherwise it's hardly... a
16234 default.
16235
16236 2001-12-29 Akim Demaille <akim@epita.fr>
16237
16238 Mid-rule actions are simply... ignored!
16239
16240 * src/reader.c (readgram): Be sure to attach mid-rule actions to
16241 the empty-rule associated to the dummy symbol, not to the host
16242 rule.
16243 * tests/actions.at (Mid-rule actions): New.
16244
16245 2001-12-29 Akim Demaille <akim@epita.fr>
16246
16247 Memory leak.
16248
16249 * src/reader.c (reader): Free grammar.
16250
16251 2001-12-29 Akim Demaille <akim@epita.fr>
16252
16253 Memory leak.
16254
16255 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
16256 since it allocates it for each state, although only one is needed.
16257 (allocate_storage): Do it here.
16258
16259 2001-12-29 Akim Demaille <akim@epita.fr>
16260
16261 * src/options.h, src/options.c (create_long_option_table): Rename
16262 as...
16263 (long_option_table_new): this, with a clearer prototype.
16264 (percent_table): Remove, unused,
16265 * src/getargs.c (getargs): Adjust.
16266
16267 2001-12-29 Akim Demaille <akim@epita.fr>
16268
16269 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
16270 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
16271 as states.
16272
16273 2001-12-29 Akim Demaille <akim@epita.fr>
16274
16275 * src/lalr.c (build_relations): Rename `states' as `states1'.
16276 Sorry, I don't understand exactly what it is, no better name...
16277
16278 2001-12-29 Akim Demaille <akim@epita.fr>
16279
16280 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
16281 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
16282 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
16283 as rules.
16284
16285 2001-12-29 Akim Demaille <akim@epita.fr>
16286
16287 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
16288 ago.
16289
16290 2001-12-29 Akim Demaille <akim@epita.fr>
16291
16292 * src/reader.c, src/reader.h (user_toknums): Remove.
16293 Adjust all users to use symbols[i]->user_token_number.
16294
16295 2001-12-29 Akim Demaille <akim@epita.fr>
16296
16297 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
16298 Adjust all users to use symbols[i]->prec or ->assoc.
16299
16300 2001-12-29 Akim Demaille <akim@epita.fr>
16301
16302 * src/reader.c, src/reader.h (tags): Remove.
16303 Adjust all users to use symbols[i]->tag.
16304
16305 2001-12-29 Akim Demaille <akim@epita.fr>
16306
16307 * src/gram.h, src/gram.c (symbols): New, similar to state_table
16308 and rule_table.
16309 * src/reader.c (packsymbols): Fill this table.
16310 Drop sprec.
16311 * src/conflicts.c (resolve_sr_conflict): Adjust.
16312 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
16313 single table.
16314 Use symbols[i]->tag instead of tags[i].
16315
16316 2001-12-29 Akim Demaille <akim@epita.fr>
16317
16318 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
16319 In addition, put a comment in there, to replace...
16320 * tests/regression.at (%union and C comments): Remove.
16321
16322 2001-12-29 Akim Demaille <akim@epita.fr>
16323
16324 * tests/regression.at (Web2c Actions): Blindly move the actual
16325 output as expected output. The contents *seem* right to me, but I
16326 can't pretend reading perfectly parser tables... Nonetheless, all
16327 the other tests pass correctly, the table look OK, even though the
16328 presence of `$axiom' is to be noted: AFAICS it is useless (but
16329 harmless).
16330
16331 2001-12-29 Akim Demaille <akim@epita.fr>
16332
16333 * src/reader.c (readgram): Don't add the rule 0 if there were no
16334 rules read. In other words, add it _after_ having performed
16335 grammar sanity checks.
16336 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
16337
16338 2001-12-29 Akim Demaille <akim@epita.fr>
16339
16340 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
16341 visible, and some states have now a different number.
16342
16343 2001-12-29 Akim Demaille <akim@epita.fr>
16344
16345 * src/reader.c (readgram): Bind the initial rule's lineno to that
16346 of the first rule.
16347 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
16348 (Solved SR Conflicts): Adjust rule 0's line number.
16349
16350 2001-12-29 Akim Demaille <akim@epita.fr>
16351
16352 Fix the `GAWK Grammar' failure.
16353
16354 * src/LR0.c (final_state): Initialize to -1 so that we do compute
16355 the reductions of the first state which was mistakenly confused
16356 with the final state because precisely final_state was initialized
16357 to 0.
16358 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
16359 now noticed by Bison.
16360 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
16361 have a reduction on $default.
16362
16363 2001-12-29 Akim Demaille <akim@epita.fr>
16364
16365 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
16366 rule line numbers.
16367 * src/closure.c (print_closure): Likewise.
16368 * src/derives.c (print_derives): Likewise.
16369 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
16370 now.
16371
16372 2001-12-29 Akim Demaille <akim@epita.fr>
16373
16374 * src/lalr.c (lookaheads_print): New.
16375 (lalr): Call it when --trace-flag.
16376 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
16377 are dumped.
16378
16379 2001-12-29 Akim Demaille <akim@epita.fr>
16380
16381 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
16382 when walking through ritem, even via rule->rhs.
16383 * src/reduce.c (dump_grammar, useful_production, reduce_output)
16384 (useful_production, useless_nonterminals): Likewise.
16385 (reduce_grammar_tables): Likewise, plus update nritems.
16386 * src/nullable.c (set_nullable): Likewise.
16387 * src/lalr.c (build_relations): Likewise.
16388 * tests/sets.at (Nullable): Adjust.
16389 Fortunately, now, the $axiom is no longer nullable.
16390
16391 2001-12-29 Akim Demaille <akim@epita.fr>
16392
16393 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
16394 the 0-sentinel.
16395 * src/gram.c (ritem_longest_rhs): Likewise.
16396 * src/reduce.c (nonterminals_reduce): Likewise.
16397 * src/print_graph.c (print_graph): Likewise.
16398 * src/output.c (output_rule_data): Likewise.
16399 * src/nullable.c (set_nullable): Likewise.
16400
16401 2001-12-29 Akim Demaille <akim@epita.fr>
16402
16403 * src/output.c: Comment changes.
16404
16405 2001-12-27 Paul Eggert <eggert@twinsun.com>
16406
16407 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
16408 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
16409 Sparc, as they were causing more porting problems than the
16410 (minor) performance improvement was worth.
16411
16412 Also, catch up with 1.31's YYSTD.
16413
16414 2001-12-27 Akim Demaille <akim@epita.fr>
16415
16416 * src/output.c (output_gram): Rely on nritems, not the
16417 0-sentinel. See below.
16418 Use -1 as separator, not 0.
16419 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
16420 Rely on -1 as separator in yyrhs, instead of 0.
16421 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
16422 twice `Now at end of input', therefore there are two lines less to
16423 expect.
16424
16425 2001-12-27 Akim Demaille <akim@epita.fr>
16426
16427 * tests/regression.at (Unresolved SR Conflicts):
16428 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
16429 below.
16430
16431 2001-12-27 Akim Demaille <akim@epita.fr>
16432
16433 * src/LR0.c (new_state): Recognize the final state by the fact it
16434 is reached by eoftoken.
16435 (insert_start_shifting_state, insert_eof_shifting_state)
16436 (insert_accepting_state, augment_automaton): Remove, since now
16437 these states are automatically computed from the initial state.
16438 (generate_states): Adjust.
16439 * src/print.c: When reporting a rule number to the user, substract
16440 1, so that the axiom rule is rule 0, and the first user rule is 1.
16441 * src/reduce.c: Likewise.
16442 * src/print_graph.c (print_core): For the time being, just as for
16443 the report, depend upon --trace-flags to dump the full set of
16444 items.
16445 * src/reader.c (readgram): Once the grammar read, insert the rule
16446 0: `$axiom: START-SYMBOL $'.
16447 * tests/set.at: Adjust: rule 0 is now displayed, and since the
16448 number of the states has changed (the final state is no longer
16449 necessarily the last), catch up.
16450
16451 2001-12-27 Akim Demaille <akim@epita.fr>
16452
16453 Try to make the use of the eoftoken valid. Given that its value
16454 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
16455 is used instead of > 0 where appropriate, (ii), depend upon nritems
16456 instead of the 0-sentinel.
16457
16458 * src/gram.h, src/gram.c (nritems): New.
16459 Expected to be duplication of nitems, but for the time being...
16460 * src/reader.c (packgram): Assert nritems and nitems are equal.
16461 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
16462 * src/closure.c (print_closure, print_fderives): Likewise.
16463 * src/gram.c (ritem_print): Likewise.
16464 * src/print.c (print_core, print_grammar): Likewise.
16465 * src/print_graph.c: Likewise.
16466
16467 2001-12-27 Akim Demaille <akim@epita.fr>
16468
16469 * src/main.c (main): If there are complains after grammar
16470 reductions, then output the report anyway if requested, then die.
16471 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
16472 * src/reader.c (eoftoken): New.
16473 (parse_token_decl): If the token being defined has value `0', it
16474 is the eoftoken.
16475 (packsymbols): No longer hack `tags' to insert `$' by hand.
16476 Be sure to preserve the value of the eoftoken.
16477 (reader): Make sure eoftoken is defined.
16478 Initialize nsyms to 0: now eoftoken is created just like the others.
16479 * src/print.c (print_grammar): Don't special case the eof token.
16480 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
16481 lie anyway, albeit pleasant.
16482 * tests/calc.at: Exercise error messages with eoftoken.
16483 Change the grammar so that empty input is invalid.
16484 Adjust expectations.
16485 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
16486
16487 2001-12-27 Akim Demaille <akim@epita.fr>
16488
16489 * configure.in: Check the protos of strchr ans strspn.
16490 Replace strchr if needed.
16491 * src/system.h: Provide the protos of strchr, strspn and memchr if
16492 missing.
16493 * lib/strchr.c: New.
16494 * src/reader.c (symbols_save): Use strchr.
16495
16496 2001-12-27 Akim Demaille <akim@epita.fr>
16497
16498 * src/print.c, src/print_graph.c (escape): New.
16499 Use it to quote the TAGS outputs.
16500 * src/print_graph.c (print_state): Now errors are in red, and
16501 reductions in green.
16502 Prefer high to wide: output the state number on a line of its own.
16503
16504 2001-12-27 Akim Demaille <akim@epita.fr>
16505
16506 * src/state.h, src/state.c (reductions_new): New.
16507 * src/LR0.c (set_state_table): Let all the states have a
16508 `reductions', even if reduced to 0.
16509 (save_reductions): Adjust.
16510 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
16511 * src/print.c (print_reductions, print_actions): Adjust.
16512 * src/output.c (action_row): Adjust.
16513
16514 2001-12-27 Akim Demaille <akim@epita.fr>
16515
16516 * src/state.h, src/state.c (errs_new, errs_dup): New.
16517 * src/LR0.c (set_state_table): Let all the states have an errs,
16518 even if reduced to 0.
16519 * src/print.c (print_errs, print_reductions): Adjust.
16520 * src/output.c (output_actions, action_row): Adjust.
16521 * src/conflicts.c (resolve_sr_conflict): Adjust.
16522
16523 2001-12-27 Akim Demaille <akim@epita.fr>
16524
16525 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
16526
16527 2001-12-27 Akim Demaille <akim@epita.fr>
16528
16529 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
16530 * src/print.c: here.
16531 (lookaheadset, shiftset): New, used as additional storage by
16532 print_reductions.
16533 (print_results): Adjust.
16534 (print_shifts, print_gotos, print_errs): New, extracted from...
16535 (print_actions): here.
16536 * src/print_graph.c (print_actions): Remove dead code.
16537
16538 2001-12-27 Akim Demaille <akim@epita.fr>
16539
16540 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
16541 `$n' and `@n'.
16542
16543 2001-12-27 Akim Demaille <akim@epita.fr>
16544
16545 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
16546 (build_relations): Adjust.
16547
16548 2001-12-27 Akim Demaille <akim@epita.fr>
16549
16550 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
16551 duplication.
16552
16553 2001-12-27 Akim Demaille <akim@epita.fr>
16554
16555 * src/reader.c (packgram): Catch nitems overflows.
16556
16557 2001-12-27 Akim Demaille <akim@epita.fr>
16558
16559 * src/files.c, src/files.h (guard_obstack): Remove.
16560 * src/output.c (output): Adjust.
16561 * src/reader.c (parse_braces): New, factoring...
16562 (copy_action, copy_guard): these two which are renamed as...
16563 (parse_action, parse_guard): these.
16564 As a voluntary consequence, using braces around guards is now
16565 mandatory.
16566
16567 2001-12-27 Akim Demaille <akim@epita.fr>
16568
16569 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
16570 * src/reader.c (symbol_list): `guard' and `guard_line' are new
16571 members.
16572 (symbol_list_new): Adjust.
16573 (copy_action): action_line is the first line, not the last.
16574 (copy_guard): Just as for actions, store the `action' only, not
16575 the switch/case/break flesh.
16576 Don't parse the user action that might follow the guard, let...
16577 (readgram): do it, i.e., now, there can be an action after a
16578 guard.
16579 In other words the guard is just explicitly optional.
16580 (packgram): Adjust.
16581 * src/output.c (guards_output): New.
16582 (output_parser): Call it when needed.
16583 (output): Also free the guard and attrs obstacks.
16584 * src/files.c, src/files.h (obstack_save): Remove.
16585 (output_files): Remove.
16586 As a result, if one needs the former `.act' file, using an
16587 appropriate skeleton which requires actions and guards is now
16588 required.
16589 * src/main.c (main): Adjust.
16590 * tests/semantic.at: New.
16591 * tests/regression.at: Use `input.y' as input file name.
16592 Avoid 8+3 problems by requiring input.c when the test needs the
16593 parser.
16594
16595 2001-12-27 Akim Demaille <akim@epita.fr>
16596
16597 * src/reader.c (symbol_list_new): Be sure to initialize all the
16598 fields.
16599
16600 2001-12-27 Akim Demaille <akim@epita.fr>
16601
16602 All the hacks using a final pseudo state are now useless.
16603
16604 * src/LR0.c (set_state_table): state_table holds exactly nstates.
16605 * src/lalr.c (nLA): New.
16606 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
16607 instead of lookaheadsp from the pseudo state (nstate + 1).
16608
16609 2001-12-27 Akim Demaille <akim@epita.fr>
16610
16611 * src/output.c (action_row, token_actions): Use a state_t instead
16612 of a integer, and nlookaheads instead of the following state's
16613 lookaheadsp.
16614
16615 2001-12-27 Akim Demaille <akim@epita.fr>
16616
16617 * src/conflicts.c (log_resolution, flush_shift)
16618 (resolve_sr_conflict, set_conflicts, solve_conflicts)
16619 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
16620 (conflicts_print, print_reductions): Use a state_t instead of an
16621 integer when referring to a state.
16622 As much as possible, depend upon nlookaheads, instead of the
16623 `lookaheadsp' member of the following state (since lookaheads of
16624 successive states are successive, the difference between state n + 1
16625 and n served as the number of lookaheads for state n).
16626 * src/lalr.c (add_lookback_edge): Likewise.
16627 * src/print.c (print_core, print_actions, print_state)
16628 (print_results): Likewise.
16629 * src/print_graph.c (print_core, print_actions, print_state)
16630 (print_graph): Likewise.
16631 * src/conflicts.h: Adjust.
16632
16633 2001-12-27 Akim Demaille <akim@epita.fr>
16634
16635 * src/bison.hairy: Formatting/comment changes.
16636 ANSIfy.
16637 Remove `register' indications.
16638 Add plenty of `static'.
16639
16640 2001-12-27 Akim Demaille <akim@epita.fr>
16641
16642 * src/output.c (prepare): Drop the muscle `ntbase' which
16643 duplicates ntokens.
16644 * src/bison.simple: Formatting/comment changes.
16645 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
16646 is an undocumented synonym.
16647
16648 2001-12-22 Akim Demaille <akim@epita.fr>
16649
16650 * src/output.c (output_table_data): Change the prototype to use
16651 `int' for array ranges: some invocations do pass an int, not a
16652 short.
16653 Reported by Wayne Green.
16654
16655 2001-12-22 Akim Demaille <akim@epita.fr>
16656
16657 Some actions of web2c.y are improperly triggered.
16658 Reported by Mike Castle.
16659
16660 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
16661 * tests/regression.at (Web2c): Rename as...
16662 (Web2c Report): this.
16663 (Web2c Actions): New.
16664
16665 2001-12-22 Akim Demaille <akim@epita.fr>
16666
16667 Reductions in web2c.y are improperly reported.
16668 Reported by Mike Castle.
16669
16670 * src/conflicts.c (print_reductions): Fix.
16671 * tests/regression.at (Web2c): New.
16672
16673 2001-12-18 Akim Demaille <akim@epita.fr>
16674
16675 Some host fail on `assert (!"foo")', which expands to
16676 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
16677 Reported by Nelson Beebee.
16678
16679 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
16680 `#define it_succeeded 0' and `assert (it_succeeded)'.
16681
16682 2001-12-17 Marc Autret <autret_m@epita.fr>
16683
16684 * src/bison.simple: Don't hard code the skeleton line and filename.
16685 * src/output.c (output_parser): Rename 'line' as 'output_line'.
16686 New line counter 'skeleton_line' (skeleton-line muscle).
16687
16688 2001-12-17 Paul Eggert <eggert@twinsun.com>
16689
16690 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
16691 YYDEBUG must be defined to a nonzero value.
16692
16693 * src/bison.simple (yytname): Do not assume that the user defines
16694 YYDEBUG to a properly parenthesized expression.
16695
16696 2001-12-17 Akim Demaille <akim@epita.fr>
16697
16698 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
16699 nlookaheads is a new member.
16700 Adjust all users.
16701 * src/lalr.h (nlookaheads): Remove this orphan declaration.
16702 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
16703 state.
16704
16705 2001-12-17 Akim Demaille <akim@epita.fr>
16706
16707 * src/files.h, src/files.c (open_files, close_files): Remove.
16708 * src/main.c (main): Don't open/close files, nor invoke lex_free,
16709 let...
16710 * src/reader.c (reader): Do it.
16711
16712 2001-12-17 Akim Demaille <akim@epita.fr>
16713
16714 * src/conflicts.c (print_reductions): Formatting changes.
16715
16716 2001-12-17 Akim Demaille <akim@epita.fr>
16717
16718 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
16719 (flush_reduce): New.
16720 (resolve_sr_conflict): Adjust.
16721
16722 2001-12-17 Akim Demaille <akim@epita.fr>
16723
16724 * src/output.c (output_obstack): Be static and rename as...
16725 (format_obstack): this, to avoid any confusion with files.c's
16726 output_obstack.
16727 * src/reader.h (muscle_obstack): Move to...
16728 * src/output.h: here, since it's defined in output.c.
16729
16730 2001-12-17 Akim Demaille <akim@epita.fr>
16731
16732 * src/output.c (action_row, save_column, default_goto)
16733 (sort_actions, matching_state, pack_vector): Better variable
16734 locality.
16735
16736 2001-12-17 Akim Demaille <akim@epita.fr>
16737
16738 * src/output.c: Various formatting changes.
16739
16740 2001-12-17 Akim Demaille <akim@epita.fr>
16741
16742 * src/files.c (output_files): Free the output_obstack.
16743 * src/main.c (main): Call print and print_graph conditionally.
16744 * src/print.c (print): Work unconditionally.
16745 * src/print_graph.c (print_graph): Work unconditionally.
16746 * src/conflicts.c (log_resolution): Output only if verbose_flag.
16747
16748 2001-12-16 Marc Autret <autret_m@epita.fr>
16749
16750 * src/output.c (actions_output): Fix. When we use %no-lines,
16751 there is one less line per action.
16752
16753 2001-12-16 Marc Autret <autret_m@epita.fr>
16754
16755 * src/bison.simple: Remove a useless #line directive.
16756 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
16757 * src/output.c (get_lines_number): New.
16758 (output_parser): Adjust, now takes care about the lines of a
16759 output muscles.
16760 Fix line numbering.
16761 (actions_output): Computes the number of lines taken by actions.
16762 (output_master_parser): Insert new skeleton which is the name of
16763 the output parser file name.
16764
16765 2001-12-15 Marc Autret <autret_m@epita.fr>
16766
16767 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
16768
16769 2001-12-15 Marc Autret <autret_m@epita.fr>
16770
16771 * src/output.c (output_gram): Keep track of the hairy one.
16772
16773 2001-12-15 Akim Demaille <akim@epita.fr>
16774
16775 Make `make distcheck' work.
16776
16777 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
16778 system.h which uses libgettext.h.
16779
16780 2001-12-15 Akim Demaille <akim@epita.fr>
16781
16782 * src/nullable.c (set_nullable): Useless rules must be skipped,
16783 otherwise, since we range over their symbols, we might look at a
16784 nonterminal which no longer ``exists'', i.e., it is not counted in
16785 `nvars', hence we overflow our arrays.
16786
16787 2001-12-15 Akim Demaille <akim@epita.fr>
16788
16789 The header can also be produced directly, without any obstack!
16790 Yahoo!
16791
16792 * src/files.c, src/files.h (defines_obstack): Remove.
16793 (compute_header_macro): Global.
16794 (defines_obstack_save): Remove.
16795 * src/reader.c (parse_union_decl): No longer output to
16796 defines_obstack: its content can be found in the `stype' muscle
16797 anyway.
16798 (output_token_translations): Merge into...
16799 (symbols_output): this.
16800 Rename as...
16801 (symbols_save): this.
16802 (reader): Adjust.
16803 * src/output.c (header_output): New.
16804 (output): Call it.
16805
16806 2001-12-15 Akim Demaille <akim@epita.fr>
16807
16808 * src/reader.c (parse_union_decl): Instead of handling two obstack
16809 simultaneously, use one to define the `stype' muscle, and use the
16810 value of the latter to fill defines_obstack.
16811 (copy_comment): Remove.
16812 (copy_comment2): Work for a single obstack.
16813 Rename as...
16814 (copy_comment): this.
16815
16816 2001-12-15 Akim Demaille <akim@epita.fr>
16817
16818 * src/lex.c, src/lex.h (xgetc): No longer static.
16819 * src/reader.c (parse_union_decl): Revamp.
16820
16821 2001-12-15 Akim Demaille <akim@epita.fr>
16822
16823 Still making progress in separating Bison into (i) input, (ii)
16824 process, (iii) output: now we can directly output the parser file
16825 without using table_obstack at all.
16826
16827 * src/files.c, src/files.h (table_obstack): Bye bye.
16828 (parser_file_name): New.
16829 * src/files.c (compute_output_file_names): Compute it.
16830 * src/output.c (actions_output, output_parser)
16831 (output_master_parser): To a file instead of an obstack.
16832
16833 2001-12-15 Akim Demaille <akim@epita.fr>
16834
16835 Attach actions to rules, instead of pre-outputting them to
16836 actions_obstack.
16837
16838 * src/gram.h (rule_t): action and action_line are new members.
16839 * src/reader.c (symbol_list): Likewise.
16840 (copy_action): Save the actions within the rule.
16841 (packgram): Save them in rule_table.
16842 * src/output.c (actions_output): New.
16843 (output_parser): Use it on `%%actions'.
16844 (output_rule_data): Don't free rule_table.
16845 (output): Do it.
16846 (prepare): Don't save the `action' muscle.
16847 * src/bison.simple: s/%%action/%%actions/.
16848
16849 2001-12-15 Akim Demaille <akim@epita.fr>
16850
16851 * src/reader.c (copy_action): When --yacc, don't append a `;'
16852 to the user action: let it fail if lacking.
16853 Suggested by Arnold Robbins and Tom Tromey.
16854
16855 2001-12-14 Akim Demaille <akim@epita.fr>
16856
16857 * src/lex.c (literalchar): Simply return the char you decoded, non
16858 longer mess around with obstacks and int pointers.
16859 Adjust all callers.
16860
16861 2001-12-14 Akim Demaille <akim@epita.fr>
16862
16863 * src/lex.c (literalchar): Don't escape the special characters,
16864 just decode them, and keep them as char (before, eol was output as
16865 the 2 char string `\n' etc.).
16866 * src/output.c (output_rule_data): Use quotearg to output the
16867 token strings.
16868
16869 2001-12-13 Paul Eggert <eggert@twinsun.com>
16870
16871 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16872 Do not infringe on the global user namespace when using C++.
16873 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16874 All uses of `fprintf' and `stderr' changed.
16875
16876 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16877
16878 2001-12-13 Akim Demaille <akim@epita.fr>
16879
16880 The computation of nullable is broken: it doesn't handle empty
16881 RHS's properly.
16882
16883 * tests/torture.at (GNU AWK Grammar): New.
16884 * tests/sets.at (Nullable): New.
16885 * src/nullable.c (set_nullable): Instead of blindly looping over
16886 `ritems', loop over the rules, and then over their rhs's.
16887
16888 Work around Autotest bugs.
16889
16890 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16891 frame, because Autotest understand lines starting with a `+' as
16892 traces from the shell. Then, they are not processed properly.
16893 Admittedly an Autotest bug, but we don't have time to wait for
16894 Autotest to catch up.
16895 * tests/regression.at (Broken Closure): Adjust to the new table
16896 frames.
16897 Move to...
16898 * tests/sets.at: here.
16899
16900 2001-12-13 Akim Demaille <akim@epita.fr>
16901
16902 * src/closure.c (closure): Use nrules instead of playing tricks
16903 with BITS_PER_WORD.
16904
16905 2001-12-13 Akim Demaille <akim@epita.fr>
16906
16907 * src/print.c (print_actions): Output the handling of `$' as the
16908 traces do: shifting the token EOF. Before EOF was treated as a
16909 nonterminal.
16910 * tests/regression.at: Adjust some tests.
16911 * src/print_graph.c (print_core): Complete the set of items via
16912 closure. The next-to-final and final states are still unsatisfying,
16913 but that's to be addressed elsewhere.
16914 No longer output the rule numbers, but do output the state number.
16915 A single loop for the shifts + gotos is enough, but picked a
16916 distinct color for each.
16917 (print_graph): Initialize and finalize closure.
16918
16919 2001-12-13 Akim Demaille <akim@epita.fr>
16920
16921 * src/reader.c (readgram): Remove dead code, an strip useless
16922 braces.
16923 (get_type): Remove, unused.
16924
16925 2001-12-12 Akim Demaille <akim@epita.fr>
16926
16927 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16928 on that of lib/error.c.
16929
16930 2001-12-12 Akim Demaille <akim@epita.fr>
16931
16932 Some hosts don't like `/' in includes.
16933
16934 * src/system.h: Include libgettext.h without qualifying the path.
16935 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16936 $(top_srcdir).
16937
16938 2001-12-11 Marc Autret <autret_m@epita.fr>
16939
16940 * src/output.c (output_parser): Remove useless muscle.
16941
16942 2001-12-11 Marc Autret <autret_m@epita.fr>
16943
16944 * src/bison.simple: Remove #line just before %%epilogue. It
16945 is now handled in ...
16946 * src/reader.c (read_additionnal_code): Add the output of a
16947 #line for the epilogue.
16948
16949 2001-12-10 Marc Autret <autret_m@epita.fr>
16950
16951 * src/reader.c (copy_definition): Re-use CPP-outed code which
16952 replace precedent remove.
16953 * src/bison.simple: Remove #line before %%prologue because
16954 %%input-line is wrong at this time.
16955
16956 2001-12-10 Marc Autret <autret_m@epita.fr>
16957
16958 * src/reader.c (symbols_output): Clean up.
16959 * src/output.c (output_gram, output): Clean up.
16960
16961 2001-12-10 Akim Demaille <akim@epita.fr>
16962
16963 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16964 * src/LR0.c (set_state_table): here.
16965 * src/lalr.c (lalr): Call it.
16966
16967 2001-12-10 Akim Demaille <akim@epita.fr>
16968
16969 * src/state.h (shifts): Remove the `number' member: shifts are
16970 attached to state, hence no longer need to be labelled with a
16971 state number.
16972
16973 2001-12-10 Akim Demaille <akim@epita.fr>
16974
16975 Now that states have a complete set of members, the linked list of
16976 shifts is useless: just fill directly the state's shifts member.
16977
16978 * src/state.h (shifts): Remove the `next' member.
16979 * src/LR0.c (first_state, last_state): Remove.
16980 Adjust the callers.
16981 (augment_automaton): Don't look for the shifts that must be added
16982 a shift on EOF: it is those of the state we looked for! But now,
16983 since shifts are attached, it is no longer needed to looking
16984 merely by its id: its number.
16985
16986 2001-12-10 Akim Demaille <akim@epita.fr>
16987
16988 * src/LR0.c (augment_automaton): Better variable locality.
16989 Remove an impossible branch: if there is a state corresponding to
16990 the start symbol being shifted, then there is shift for the start
16991 symbol from the initial state.
16992
16993 2001-12-10 Akim Demaille <akim@epita.fr>
16994
16995 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16996 only when appropriate: when insert_start_shifting_state' is not
16997 invoked.
16998 * tests/regression.at (Rule Line Numbers): Adjust.
16999
17000 2001-12-10 Akim Demaille <akim@epita.fr>
17001
17002 * src/LR0.c (augment_automaton): Now that all states have shifts,
17003 merge the two cases addition shifts to the initial state.
17004
17005 2001-12-10 Akim Demaille <akim@epita.fr>
17006
17007 * src/lalr.c (set_state_table): Move to...
17008 * src/LR0.c: here.
17009 * src/lalr.c (lalr): Don't call it...
17010 * src/LR0.c (generate_states): do it.
17011 * src/LR0.h (first_state): Remove, only the table is used.
17012
17013 2001-12-10 Akim Demaille <akim@epita.fr>
17014
17015 * src/LR0.h (first_shift, first_reduction): Remove.
17016 * src/lalr.c: Don't use first_shift: find shifts through the
17017 states.
17018
17019 2001-12-10 Akim Demaille <akim@epita.fr>
17020
17021 * src/LR0.c: Attach shifts to states as soon as they are
17022 computed.
17023 * src/lalr.c (set_state_table): Instead of assigning shifts to
17024 state, just assert that the mapping was properly done.
17025
17026 2001-12-10 Akim Demaille <akim@epita.fr>
17027
17028 * src/LR0.c (insert_start_shift): Rename as...
17029 (insert_start_shifting_state): this.
17030 (insert_eof_shifting_state, insert_accepting_state): New.
17031 (augment_automaton): Adjust.
17032 Better locality of the variables.
17033 When looking if the start_symbol is shifted from the initial
17034 state, using `while (... symbol != start_symbol ...)' sounds
17035 better than `while (... symbol < start_symbol ...)': If fail
17036 to see how the order between symbols could be relevant!
17037
17038 2001-12-10 Akim Demaille <akim@epita.fr>
17039
17040 * src/getargs.h: Don't declare `spec_name_prefix' and
17041 `spec_file_prefix', declared by src/files.h.
17042 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
17043 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
17044 * src/output.c (prepare): Adjust.
17045 * src/reader.c (symbols_output): Likewise.
17046 * src/vmsgetargs.c: Vaguely adjust, but who cares?
17047
17048 2001-12-10 Akim Demaille <akim@epita.fr>
17049
17050 * src/muscle_tab.c (muscle_init): NULL is a better default than
17051 `"0"'.
17052
17053 2001-12-10 Akim Demaille <akim@epita.fr>
17054
17055 * src/reader.c (reader): Calling symbols_output once is enough.
17056
17057 2001-12-10 Akim Demaille <akim@epita.fr>
17058
17059 Now that states have a complete set of members, the linked list of
17060 reductions is useless: just fill directly the state's reductions
17061 member.
17062
17063 * src/state.h (struct reductions): Remove member `number' and
17064 `next'.
17065 * src/LR0.c (first_reduction, last_reduction): Remove.
17066 (save_reductions): Don't link the new reductions, store them in
17067 this_state.
17068 * src/lalr.c (set_state_table): No need to attach reductions to
17069 states, it's already done.
17070 * src/output.c (output_actions): No longer free the shifts, then
17071 the reductions, then the states: free all the states and their
17072 members.
17073
17074 2001-12-10 Akim Demaille <akim@epita.fr>
17075
17076 * src/options.c (OPTN, DRTV, BOTH): New.
17077 (option_table): Use them.
17078
17079 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
17080 the job of system.h.
17081 * src/options.c: Don't include stdio.h and xalloc.h for the same
17082 reasons.
17083
17084 2001-12-10 Akim Demaille <akim@epita.fr>
17085
17086 * src/output.c (output, prepare): Make sure the values of the
17087 muscles `action' and `prologue' are 0-terminated.
17088
17089 2001-12-10 Akim Demaille <akim@epita.fr>
17090
17091 Clean up GCC warnings.
17092
17093 * src/reader.c (copy_action): `buf' is not used.
17094 (parse_skel_decl): Be static.
17095 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
17096 * src/options.h (create_long_option_table): Have a real prototype.
17097 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
17098 (hash_delete_at): Return const void *.
17099 Adjust casts to preserve the const.
17100
17101 2001-12-10 Akim Demaille <akim@epita.fr>
17102
17103 * configure.in: Require 2.52g.
17104 M4 is not needed, but AUTOM4TE is.
17105 * m4/m4.m4: Remove.
17106 * tests/Makefile.am: Adjust.
17107
17108 2001-12-10 Akim Demaille <akim@epita.fr>
17109
17110 One structure for states is enough, even though theoretically
17111 there are LR(0) states and LALR(1) states.
17112
17113 * src/lalr.h (state_t): Remove.
17114 (state_table): Be state_t **, not state_t *.
17115 * src/state.h (core, CORE_ALLOC): Rename as...
17116 (state_t, STATE_ALLOC): this.
17117 Add the LALR(1) members: shifts, reductions, errs.
17118 * src/LR0.c (state_table): Rename as...
17119 (state_hash): this, to avoid name clashes with the global
17120 `state_table'.
17121 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
17122 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
17123
17124 2001-12-10 Akim Demaille <akim@epita.fr>
17125
17126 Bison dumps core on bash.y.
17127 Reported by Pascal Bart.
17128
17129 * src/warshall.c (bitmatrix_print): New.
17130 (TC): Use it.
17131 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
17132 j must be the outer loop.
17133 * tests/regression.at (Broken Closure): New.
17134
17135 2001-12-05 Akim Demaille <akim@epita.fr>
17136
17137 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
17138 its argument.
17139 Reported by Peter Hamorsky.
17140
17141 2001-12-05 Akim Demaille <akim@epita.fr>
17142
17143 * src/conflicts.c (err_table): Remove.
17144 (resolve_sr_conflict): Adjust.
17145 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
17146 Rename as...
17147 (state_t.reductions, state_t.shifts): this.
17148
17149 2001-12-05 Akim Demaille <akim@epita.fr>
17150
17151 * src/reduce.c (reduce_grammar_tables): No longer disable the
17152 removal of useless rules via CPP but via `if (0)', so that the
17153 compiler still check the code is valid.
17154 For instance, it should have noticed `rline' no longer exists: use
17155 the `line' member of rule_t.
17156 * src/gram.c (dummy, rline): Remove, unused.
17157
17158 2001-12-05 Akim Demaille <akim@epita.fr>
17159
17160 * src/output.c (pack_vector): Use assert, not berror.
17161 * src/main.c (berror): Remove, unused.
17162
17163 2001-12-05 Akim Demaille <akim@epita.fr>
17164
17165 New experimental feature: if --verbose --trace output all the
17166 items of a state, not only its kernel.
17167
17168 * src/print.c (print_core): If `trace_flag', then invoke closure
17169 before outputting the items of the state (print_core is no longer
17170 a correct name them).
17171 (print_results): Invoke new_closure/free_closure if needed.
17172
17173 2001-12-05 Akim Demaille <akim@epita.fr>
17174
17175 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
17176 * src/closure.c, src/closure.h (itemsetsize): Rename as...
17177 (nitemset): for consistency with the rest of the project.
17178
17179 2001-12-05 Akim Demaille <akim@epita.fr>
17180
17181 * src/closure.c (print_closure): Improve.
17182 (closure): Use it for printing input and output.
17183
17184 2001-12-05 Akim Demaille <akim@epita.fr>
17185
17186 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
17187 indexed by nonterminals.
17188
17189 2001-12-05 Akim Demaille <akim@epita.fr>
17190
17191 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
17192 what it was!).
17193 * src/warshall.h: Remove accidental duplication of the content.
17194
17195 2001-12-05 Akim Demaille <akim@epita.fr>
17196
17197 * src/closure.c (set_fderives): De-obfuscate.
17198
17199 2001-12-05 Akim Demaille <akim@epita.fr>
17200
17201 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
17202
17203 2001-12-05 Akim Demaille <akim@epita.fr>
17204
17205 * src/closure.c (set_firsts): De-obfuscate.
17206
17207 2001-12-05 Akim Demaille <akim@epita.fr>
17208
17209 * src/output.c (action_row): De-obfuscate
17210 using the good o' techniques: arrays not pointers, variable
17211 locality, BITISSET, RESETBIT etc.
17212
17213 2001-12-05 Akim Demaille <akim@epita.fr>
17214
17215 Pessimize the code to simplify it: from now on, all the states
17216 have a valid SHIFTS, which NSHIFTS is possibly 0.
17217
17218 * src/LR0.c (shifts_new): Be global and move to..
17219 * src/state.c, src/state.h: here.
17220 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
17221 * src/print_graph: Adjust.
17222
17223 2001-12-05 Akim Demaille <akim@epita.fr>
17224
17225 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
17226 * src/conflicts.c: Use it.
17227 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
17228 incorrectly ``simplified''.
17229
17230 2001-12-05 Akim Demaille <akim@epita.fr>
17231
17232 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
17233 using the good o' techniques: arrays not pointers, variable
17234 locality, BITISSET, RESETBIT etc.
17235
17236 2001-12-05 Akim Demaille <akim@epita.fr>
17237
17238 * src/state.h (SHIFT_SYMBOL): New.
17239 * src/conflicts.c: Use it to deobfuscate.
17240
17241 2001-12-05 Akim Demaille <akim@epita.fr>
17242
17243 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
17244 (print_reductions): De-obfuscate using the good o' techniques:
17245 arrays not pointers, variable locality, BITISSET.
17246
17247 2001-12-05 Akim Demaille <akim@epita.fr>
17248
17249 * src/conflicts.c (print_reductions): Arrays, not pointers.
17250 Use BITISSET.
17251
17252 2001-12-05 Akim Demaille <akim@epita.fr>
17253
17254 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17255
17256 2001-12-05 Akim Demaille <akim@epita.fr>
17257
17258 * src/conflicts.c (print_reductions): Improve variable locality.
17259
17260 2001-12-05 Akim Demaille <akim@epita.fr>
17261
17262 * src/conflicts.c (print_reductions): Pessimize, but clarify.
17263
17264 2001-12-05 Akim Demaille <akim@epita.fr>
17265
17266 * src/conflicts.c (print_reductions): Improve variable locality.
17267
17268 2001-12-05 Akim Demaille <akim@epita.fr>
17269
17270 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
17271 * src/lalr.c: Use them.
17272
17273 2001-12-05 Akim Demaille <akim@epita.fr>
17274
17275 * src/LR0.c (augment_automaton): Formatting changes.
17276 Better variable locality.
17277
17278 2001-12-05 Akim Demaille <akim@epita.fr>
17279
17280 * src/lalr.c (matrix_print): New.
17281 (transpose): Use it.
17282 Use arrays instead of pointers.
17283
17284 2001-12-05 Akim Demaille <akim@epita.fr>
17285
17286 * src/lalr.c (maxrhs): Move to...
17287 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
17288 * src/lalr.c (build_relations): Adjust.
17289
17290 2001-12-05 Akim Demaille <akim@epita.fr>
17291
17292 * src/lalr.c (transpose): Free the memory allocated to the
17293 argument, as it is replaced by the results by the unique caller.
17294 (build_relations): Merely invoke transpose: it handles the memory
17295 deallocation.
17296 Improve variable locality.
17297 Avoid variables used as mere abbreviations.
17298 (compute_lookaheads): Use arrays instead of pointers.
17299
17300 2001-12-05 Akim Demaille <akim@epita.fr>
17301
17302 * src/lalr.c (initialize_F): Improve variable locality.
17303 Avoid variables used as mere abbreviations.
17304
17305 2001-12-05 Akim Demaille <akim@epita.fr>
17306
17307 * src/derives.c (print_derives): Display the ruleno.
17308 * src/lalr.c (initialize_F, transpose): Better variable locality
17309 to improve readability.
17310 Avoid variables used as mere abbreviations.
17311
17312 2001-12-05 Akim Demaille <akim@epita.fr>
17313
17314 * src/lalr.c (traverse): Use arrays instead of pointers.
17315
17316 2001-12-05 Akim Demaille <akim@epita.fr>
17317
17318 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
17319 the handling of squeue.
17320 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17321
17322 2001-12-05 Akim Demaille <akim@epita.fr>
17323
17324 Because useless nonterminals are now kept alive (instead of being
17325 `destroyed'), we now sometimes examine them, and store information
17326 related to them. Hence we need to know their number, and adjust
17327 memory allocations.
17328
17329 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
17330 static.
17331 * src/LR0.c (allocate_itemsets): The memory allocated to
17332 `symbol_count' was used for two different purpose: once to count
17333 the number of occurrences of each symbol, and later reassigned to
17334 `shift_symbol', containing the symbol that can be shifted from a
17335 given state.
17336 Deobfuscate, i.e., allocate, use and free `symbol_count' here
17337 only, and...
17338 (new_itemsets): Allocate `shift_symbol' here.
17339 (allocate_itemsets): symbol_count includes useless nonterminals.
17340 Make room for them.
17341 (free_storage): Use `free', not `XFREE', for pointers that cannot
17342 be null.
17343
17344 2001-12-05 Akim Demaille <akim@epita.fr>
17345
17346 * src/nullable.c (set_nullable): Deobfuscate the handling of
17347 ritem.
17348 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
17349
17350 2001-12-05 Akim Demaille <akim@epita.fr>
17351
17352 * src/gram.c, src/gram.h (ritem_print): New.
17353 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
17354 (This useless function was defined only to work around VMS linkers
17355 that can't handle compilation units with variables only).
17356 * src/reduce.c (dump_grammar): Use it to trace the construction of
17357 ritem.
17358
17359 2001-12-04 Paul Eggert <eggert@twinsun.com>
17360
17361 * src/bison.simple (union yyalloc): Change member names
17362 to be the same as the stack names.
17363 (yyparse): yyptr is now union yyalloc *, not char *.
17364 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
17365 and may generate better code on some machines.
17366 (yystpcpy): Use prototype if __STDC__ is defined, not just
17367 if __cplusplus is defined.
17368
17369 2001-11-30 Akim Demaille <akim@epita.fr>
17370
17371 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
17372 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
17373 Gettext doesn't compile cleanly, and dies with -Werror.
17374 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
17375 Include WARNING_CFLAGS here.
17376 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
17377 before being defined.
17378
17379 2001-11-27 Paul Eggert <eggert@twinsun.com>
17380
17381 * lib/quotearg.h (quotearg_n, quotearg_n_style):
17382 First arg is int, not unsigned.
17383 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
17384 (SIZE_MAX, UINT_MAX): New macros.
17385 (quotearg_n_options): Abort if N is negative.
17386 Avoid overflow check on hosts where size_t is 64 bits and int
17387 is 32 bits, as overflow is impossible there.
17388 Fix off-by-one typo that caused unnecessary reallocation.
17389
17390 2001-11-29 Paul Eggert <eggert@twinsun.com>
17391
17392 Name space cleanup in generated parser.
17393
17394 * doc/bison.texinfo (Bison Parser): Discuss system headers
17395 and their effect on the user name space.
17396
17397 * src/bison.simple:
17398 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
17399 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
17400 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
17401
17402 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
17403 on user names when possible.
17404
17405 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
17406 Simplify test for whather <alloca.h> exists.
17407
17408 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
17409
17410 (<stdio.h>): Include if YYDEBUG.
17411
17412 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
17413 ! defined (yyoverflow) && ! defined (yymemcpy).
17414
17415 (yymemcpy, yyparse): Rename local variables as needed so that
17416 they all begin with 'yy'.
17417
17418 (yystrlen, yystpcpy): New functions.
17419
17420 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
17421 All uses changed.
17422
17423 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
17424 instead of relying on string.h functions. Use YYSTACK_ALLOC
17425 and YYSTACK_FREE instead of malloc and free.
17426
17427 2001-11-30 Akim Demaille <akim@epita.fr>
17428
17429 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
17430 before their first uses.
17431 (YYBISON, YYPURE): Move to the top of the output.
17432
17433 2001-11-30 Akim Demaille <akim@epita.fr>
17434
17435 * tests/reduce.at (Useless Nonterminals): Fix.
17436
17437 2001-11-30 Akim Demaille <akim@epita.fr>
17438
17439 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
17440 if body instead of `;' to pacify GCC's warnings.
17441
17442 2001-11-30 Akim Demaille <akim@epita.fr>
17443
17444 Instead of mapping the LHS of unused rules to -1, keep the LHS
17445 valid, but flag the rules as invalid.
17446
17447 * src/gram.h (rule_t): `useful' is a new member.
17448 * src/print.c (print_grammar): Adjust.
17449 * src/derives.c (set_derives): Likewise.
17450 * src/reader.c (packgram, reduce_output): Likewise.
17451 * src/reduce.c (reduce_grammar_tables): Likewise.
17452 * tests/reduce.at (Underivable Rules, Useless Rules): New.
17453
17454 2001-11-30 Akim Demaille <akim@epita.fr>
17455
17456 * src/reduce.c (reduce_output): Formatting changes.
17457 * src/print.c (print_results, print_grammar): Likewise.
17458 * tests/regression.at (Rule Line Numbers)
17459 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
17460
17461 2001-11-30 Akim Demaille <akim@epita.fr>
17462
17463 * src/reduce.c (nonterminals_reduce): Instead of throwing away
17464 useless nonterminals, move them at the end of the symbol arrays.
17465 (reduce_output): Adjust.
17466 * tests/reduce.at (Useless Nonterminals): Adjust.
17467
17468 2001-11-30 Akim Demaille <akim@epita.fr>
17469
17470 * src/reduce.c: Various comment/formatting changes.
17471 (nonterminals_reduce): New, extracted from...
17472 (reduce_grammar_tables): here.
17473 (reduce_grammar): Call nonterminals_reduce.
17474
17475 2001-11-29 Paul Eggert <eggert@twinsun.com>
17476
17477 * src/bison.simple (YYSTACK_REALLOC): Remove.
17478 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
17479 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
17480 New macros.
17481 (union yyalloc): New type.
17482 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
17483 an arbitrary restriction on hosts where size_t is wider than int.
17484
17485 (yyparse): Don't dump core if alloca or malloc fails; instead, report
17486 a parser stack overflow. Allocate just one block of memory for all
17487 three stacks, instead of allocating three blocks; this typically is
17488 faster and reduces fragmentation.
17489
17490 Do not limit the number of items in the stack to a value that fits
17491 in 'int', as this is an arbitrary limit on hosts with 64-bit
17492 size_t and 32-bit int.
17493
17494 2001-11-29 Marc Autret <autret_m@epita.fr>
17495
17496 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
17497 of defining YYERROR_VERBOSE.
17498 [AT_DATA]: $4 is now out of C declarations in the prologue.
17499
17500 2001-11-28 Marc Autret <autret_m@epita.fr>
17501
17502 * src/reader.c (parse_dquoted_param): New.
17503 (parse_skel_decl): Use it.
17504 * src/lex.h: Add its prototype.
17505 * src/lex.c (literalchar): Become not static.
17506
17507 2001-11-28 Marc Autret <autret_m@epita.fr>
17508
17509 * src/output.h: And put its extern declaration here.
17510 * src/output.c (error_verbose): Define here.
17511 (prepare): Echo name modification.
17512 * src/getargs.h: Clean its extern declaration.
17513 * src/getargs.c (error_verbose_flag): Remove.
17514 (getargs): Remove case 'e'.
17515 * src/options.c (option_table): 'error-verbose' is now seen as simple
17516 percent option.
17517 Include output.h.
17518
17519 * src/reader.c (read_declarations): Remove case tok_include.
17520 (parse_include_decl): Remove.
17521 * src/lex.h (token_t): Remove tok_include.
17522 * src/options.c (option_table): 'include' is now a simple command line
17523 option.
17524
17525 2001-11-28 Marc Autret <autret_m@epita.fr>
17526
17527 * src/bison.simple: Adjust muscle names.
17528 * src/muscle_tab.c (muscle_init): Also rename the muscles.
17529 * src/output.c (prepare): s/_/-/ for the muscles names.
17530 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
17531
17532 2001-11-28 Marc Autret <autret_m@epita.fr>
17533
17534 * src/bison.simple: Fix debug.
17535 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
17536
17537 2001-11-28 Akim Demaille <akim@epita.fr>
17538
17539 * src/LR0.c (shifts_new): New.
17540 (save_shifts, insert_start_shift, augment_automaton): Use it.
17541
17542 2001-11-28 Akim Demaille <akim@epita.fr>
17543
17544 * src/closure.c (closure): `b' and `ruleno' denote the same value:
17545 keep ruleno only.
17546
17547 2001-11-28 Akim Demaille <akim@epita.fr>
17548
17549 * src/closure.c (closure): Instead of looping over word in array
17550 then bits in words, loop over bits in array.
17551
17552 2001-11-28 Akim Demaille <akim@epita.fr>
17553
17554 * src/closure.c (closure): No longer optimize the special case
17555 where all the bits of `ruleset[r]' are set to 0, to make the code
17556 clearer.
17557
17558 2001-11-28 Akim Demaille <akim@epita.fr>
17559
17560 * src/closure.c (closure): `r' and `c' are new variables, used to
17561 de-obfuscate accesses to RULESET and CORE.
17562
17563 2001-11-28 Akim Demaille <akim@epita.fr>
17564
17565 * src/reduce.c (reduce_print): Use ngettext.
17566 (dump_grammar): Improve the trace accuracy.
17567
17568 2001-11-28 Akim Demaille <akim@epita.fr>
17569
17570 * src/reduce.c (dump_grammar): Don't translate trace messages.
17571
17572 2001-11-28 Akim Demaille <akim@epita.fr>
17573
17574 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
17575 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
17576 as all tags are free'ed afterwards.
17577 From Enrico Scholz.
17578
17579 2001-11-27 Paul Eggert <eggert@twinsun.com>
17580
17581 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
17582 use alloca when we didn't want to, and vice versa.
17583
17584 2001-11-27 Marc Autret <autret_m@epita.fr>
17585
17586 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
17587 initialization.
17588 * src/output.c (prepare): Remove its update.
17589
17590 2001-11-27 Marc Autret <autret_m@epita.fr>
17591
17592 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
17593 Use %error-verbose.
17594
17595 2001-11-27 Marc Autret <autret_m@epita.fr>
17596
17597 * src/bison.simple: Remove YYERROR_VERBOSE using.
17598 Use %%error_verbose.
17599 (yyparse): Likewise.
17600 * src/output.c (prepare): Give its final value.
17601 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
17602 * src/getargs.h: Add its extern declaration.
17603 * src/getargs.c (error_verbose_flag): New int.
17604 (getargs): Update to catch new case.
17605 * src/options.c (option_table): 'error-verbose' is a new option.
17606 (shortopts): Update.
17607
17608 2001-11-27 Akim Demaille <akim@epita.fr>
17609
17610 * src/system.h: Use intl/libgettext.h.
17611 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
17612
17613 2001-11-27 Akim Demaille <akim@epita.fr>
17614
17615 * tests/torture.at (Exploding the Stack Size with Malloc):
17616 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
17617
17618 2001-11-27 Akim Demaille <akim@epita.fr>
17619
17620 * src/files.c: Include error.h.
17621 Reported by Hans Aberg.
17622
17623 2001-11-26 Marc Autret <autret_m@epita.fr>
17624
17625 * src/reader.c (parse_include_decl): New, not yet implemented.
17626 (read_declarations): Add case tok_include.
17627 * src/getargs.h (include): Add its extern definition.
17628 * src/getargs.c (include): New const char *.
17629 (getargs): Add case '-I'.
17630 * src/options.c (option_table): Add include as command line and
17631 percent option.
17632 * src/lex.h (token_t): Add tok_include.
17633
17634 2001-11-26 Akim Demaille <akim@epita.fr>
17635
17636 * src/reader.c (readgram): Make sure rules for mid-rule actions
17637 have a lineno equal to that of their host rule.
17638 Reported by Hans Aberg.
17639 * tests/regression.at (Rule Line Numbers): New.
17640
17641 2001-11-26 Akim Demaille <akim@epita.fr>
17642
17643 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
17644 size_ts.
17645
17646 2001-11-26 Akim Demaille <akim@epita.fr>
17647
17648 * src/complain.c, src/complain.h (error): Remove, provided by
17649 lib/error.[ch].
17650
17651 2001-11-26 Akim Demaille <akim@epita.fr>
17652
17653 * src/reader.c (read_declarations): Don't abort on tok_illegal,
17654 issue an error message.
17655 * tests/regression.at (Invalid %directive): New.
17656 Reported by Hans Aberg.
17657
17658 2001-11-26 Akim Demaille <akim@epita.fr>
17659
17660 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
17661 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17662
17663 2001-11-26 Akim Demaille <akim@epita.fr>
17664
17665 * src/conflicts.c (conflicts_print): Don't complain at all when
17666 there are no reduce/reduce conflicts, and as many shift/reduce
17667 conflicts as expected.
17668 * tests/regression.at (%expect right): Adjust.
17669
17670 2001-11-23 Akim Demaille <akim@epita.fr>
17671
17672 * lib/alloca.c: Update, from fileutils.
17673
17674 2001-11-23 Akim Demaille <akim@epita.fr>
17675
17676 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
17677
17678 2001-11-23 Akim Demaille <akim@epita.fr>
17679
17680 * src/system.h: Include alloca.h.
17681 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
17682
17683 2001-11-23 Akim Demaille <akim@epita.fr>
17684
17685 * src/print_graph.c (print_actions): Remove `rule', unused.
17686 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
17687 pacify GCC's signed < unsigned warnings.
17688 * src/closure.c (itemsetsize): Likewise.
17689 * src/reader.c (symbol_list_new): Static.
17690
17691 2001-11-23 Akim Demaille <akim@epita.fr>
17692
17693 Attaching lineno to buckets is stupid, since only one copy of each
17694 symbol is kept, only the line of the first occurrence is kept too.
17695
17696 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
17697 * src/reader.c (rline_allocated): Remove, unused.
17698 (symbol_list): Have a `line' member.
17699 (symbol_list_new): New.
17700 (readgram): Use it.
17701 * src/print.c (print_grammar): Output the rule line numbers.
17702 * tests/regression.at (Solved SR Conflicts)
17703 (Unresolved SR Conflicts): Adjust.
17704 Reported by Hans Aberg.
17705
17706 2001-11-22 Marc Autret <autret_m@epita.fr>
17707
17708 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
17709
17710 2001-11-22 Marc Autret <autret_m@epita.fr>
17711
17712 * src/muscle_tab.c (muscle_init): Remove initialization of
17713 skeleton muscle.
17714 * src/output.c (output_master_parser): Do it here.
17715
17716 2001-11-20 Akim Demaille <akim@epita.fr>
17717
17718 * po/sv.po: New.
17719 * configure.in (ALL_LINGUAS): Adjust.
17720 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
17721 longer contains strings to translate.
17722
17723 2001-11-19 Akim Demaille <akim@epita.fr>
17724
17725 * src/conflicts.c (conflicts_print): Add a missing \n.
17726
17727 2001-11-19 Akim Demaille <akim@epita.fr>
17728
17729 * src/nullable.c (nullable_print): New.
17730 (set_nullable): Call it when tracing.
17731 Better locality of variables.
17732
17733 2001-11-19 Akim Demaille <akim@epita.fr>
17734
17735 * src/print.c (print_actions): Better locality of variables.
17736
17737 2001-11-19 Akim Demaille <akim@epita.fr>
17738
17739 * src/derives.c (print_derives): Fix and enrich.
17740 * src/closure.c (print_fderives): Likewise.
17741
17742 2001-11-19 Akim Demaille <akim@epita.fr>
17743
17744 * src/closure.c (itemsetend): Remove, replaced with...
17745 (itemsetsize): new.
17746
17747 2001-11-19 Akim Demaille <akim@epita.fr>
17748
17749 * src/LR0.c (kernel_end): Remove, replaced with...
17750 (kernel_size): new.
17751
17752 2001-11-19 Akim Demaille <akim@epita.fr>
17753
17754 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
17755 to clarify.
17756
17757 2001-11-19 Akim Demaille <akim@epita.fr>
17758
17759 * src/closure.c (closure): Use arrays instead of pointers to clarify.
17760
17761 2001-11-19 Akim Demaille <akim@epita.fr>
17762
17763 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
17764 trace messages.
17765 * src/LR0.c: Likewise.
17766 (allocate_itemsets): Use arrays instead of pointers to clarify.
17767
17768 2001-11-19 Akim Demaille <akim@epita.fr>
17769
17770 * src/getargs.c (statistics_flag): Replace with...
17771 (trace_flag): New.
17772 (longopts): Accept --trace instead of --statistics.
17773 * src/getargs.h, src/options.c: Adjust.
17774 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
17775 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
17776
17777 2001-11-19 Akim Demaille <akim@epita.fr>
17778
17779 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
17780 pointers to clarify the code.
17781 (save_reductions, save_shifts): Factor common parts of alternatives.
17782
17783 2001-11-19 Akim Demaille <akim@epita.fr>
17784
17785 * src/LR0.c (new_state, get_state): Complete TRACE code.
17786 * src/closure.c: Include `reader.h' to get `tags', needed by the
17787 trace code.
17788 Rename the conditional DEBUG as TRACE.
17789 Output consistently TRACEs to stderr, not stdout.
17790 * src/derives.c: Likewise.
17791 * src/reduce.c: (inaccessable_symbols): Using if is better style
17792 than goto.
17793 Use `#if TRACE' instead of `#if 0' for tracing code.
17794
17795 2001-11-19 Akim Demaille <akim@epita.fr>
17796
17797 * src/system.h (LIST_FREE, shortcpy): New.
17798 * src/LR0.c: Use them.
17799 * src/output.c (free_itemsets, free_reductions, free_shifts):
17800 Remove, replaced by LIST_FREE.
17801
17802 2001-11-19 Akim Demaille <akim@epita.fr>
17803
17804 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17805 (REDUCTIONS_ALLOC): New.
17806 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17807 allocation.
17808
17809 2001-11-19 Akim Demaille <akim@epita.fr>
17810
17811 * src/LR0.c (new_state): Complete trace code.
17812 * src/nullable.c (set_nullable): Don't translate traces.
17813
17814 2001-11-19 Akim Demaille <akim@epita.fr>
17815
17816 * src/print_graph.c (print_core): Better locality of variables.
17817 * src/print.c (print_core): Likewise.
17818
17819 2001-11-19 Akim Demaille <akim@epita.fr>
17820
17821 * src/vcg.c: You do the output, so you are responsible of the
17822 handling of VCG syntax, in particular: use quotearg.
17823 * src/print_graph.c: Don't.
17824 (print_actions): Don't output the actions as part of the nodes,
17825 since that's the job of the edges.
17826 (print_state): Don't output by hand: fill the node description,
17827 and ask for its output.
17828
17829 2001-11-19 Akim Demaille <akim@epita.fr>
17830
17831 * src/bison.simple (yyparse): When verbosely reporting an error,
17832 no longer put additional quotes around token names.
17833 * tests/calc.at: Adjust.
17834
17835 2001-11-19 Akim Demaille <akim@epita.fr>
17836
17837 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17838 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17839 * src/output.c: Adjust.
17840
17841 2001-11-19 Akim Demaille <akim@epita.fr>
17842
17843 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17844 (rule_t): this.
17845 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17846
17847 2001-11-19 Akim Demaille <akim@epita.fr>
17848
17849 * src/gram.h (rule_t): New.
17850 (rule_table): New.
17851 (rrhs, rlhs): Remove, part of state_t.
17852 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17853 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17854 * src/reader.c, src/reduce.c: Adjust.
17855
17856 2001-11-19 Akim Demaille <akim@epita.fr>
17857
17858 * src/reader.c (symbols_output): New, extracted from...
17859 (packsymbols): Here.
17860 (reader): Call it.
17861
17862 2001-11-19 Akim Demaille <akim@epita.fr>
17863
17864 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17865 (maxrhs): this new function.
17866
17867 2001-11-19 Akim Demaille <akim@epita.fr>
17868
17869 * src/lalr.c (F): New macro to access the variable F.
17870 Adjust.
17871
17872 2001-11-19 Akim Demaille <akim@epita.fr>
17873
17874 * src/lalr.h (LA): New macro to access the variable LA.
17875 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17876 * src/lalr.c: Adjust.
17877
17878 2001-11-19 Akim Demaille <akim@epita.fr>
17879
17880 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17881 (set_state_table): handle the `lookaheads' members.
17882
17883 2001-11-19 Akim Demaille <akim@epita.fr>
17884
17885 * src/lalr.h (lookaheads): Removed array, whose contents is now
17886 a member of...
17887 (state_t): this structure.
17888 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17889 Adjust.
17890
17891 2001-11-19 Akim Demaille <akim@epita.fr>
17892
17893 * src/lalr.h (consistent): Removed array, whose contents is now
17894 a member of...
17895 (state_t): this structure.
17896 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17897 Adjust.
17898
17899 2001-11-19 Akim Demaille <akim@epita.fr>
17900
17901 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17902 contents are now members of...
17903 (state_t): this structure.
17904 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17905 Adjust.
17906
17907 2001-11-19 Akim Demaille <akim@epita.fr>
17908
17909 * src/lalr.h (state_t): New.
17910 (state_table): Be a state_t * instead of a core **.
17911 (accessing_symbol): Remove, part of state_t.
17912 * src/lalr.c: Adjust.
17913 (set_accessing_symbol): Merge into...
17914 (set_state_table): this.
17915 * src/print_graph.c, src/conflicts.c: Adjust.
17916
17917 2001-11-14 Akim Demaille <akim@epita.fr>
17918
17919 * tests/calc.at, tests/output.at, tests/regression.at,
17920 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17921 now the tests are run in private dirs, therefore AC_CLEANUP and
17922 family can be simplified to 0-ary.
17923 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17924 use abs. path to find config.h.
17925 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17926 stderr, there can be way too much random noise.
17927 Instead pass -Werror to GCC and rely on the exit status.
17928 Reported by Wolfram Wagner.
17929
17930 2001-11-14 Akim Demaille <akim@epita.fr>
17931
17932 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17933 defined only if yyoverflow is defined, to avoid `warning: unused
17934 variable `yyvs1''.
17935 Reported by The Test Suite.
17936
17937 2001-11-14 Akim Demaille <akim@epita.fr>
17938
17939 * src/print.c: Include reduce.h.
17940 Reported by Hans Aberg.
17941
17942 2001-11-14 Akim Demaille <akim@epita.fr>
17943
17944 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17945 Revert a previous patch: these are really const.
17946 * src/conflicts.c (conflict_report): Additional useless pair of
17947 braces to pacify GCC's warnings for `if () if () {} else {}'.
17948 * src/lex.c (parse_percent_token): Replace equal_offset with
17949 arg_offset.
17950 arg is const.
17951 Be sure to strdup `arg' when used, since there is no reason for
17952 token_buffer not to change.
17953
17954 2001-11-14 Akim Demaille <akim@epita.fr>
17955
17956 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17957 definition.
17958 * src/main.c (main): Use them.
17959 Suggested by Hans Aberg.
17960
17961 2001-11-12 Akim Demaille <akim@epita.fr>
17962
17963 * src/system.h (ngettext): Now that we use ngettext, be sure to
17964 provide a default definition when NLS are not used.
17965
17966 2001-11-12 Akim Demaille <akim@epita.fr>
17967
17968 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17969 Use @kbd to denote user input.
17970 (Language and Grammar): ANSIfy the example.
17971 Adjust its layout for info/notinfo.
17972 (Location Tracking Calc): Output error messages to stderr.
17973 Output locations in a more GNUtically correct way.
17974 Fix a couple of Englishos.
17975 Adjust @group/@end group pairs.
17976
17977 2001-11-12 Akim Demaille <akim@epita.fr>
17978
17979 %expect was not functioning at all.
17980
17981 * src/conflicts.c (expected_conflicts): Set to -1.
17982 (conflict_report): Use ngettext.
17983 (conflicts_print): Check %expect and make its violation an error.
17984 * doc/bison.texinfo (Expect Decl): Adjust.
17985 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17986 * tests/regression.at (%expect not enough, %expect right)
17987 (%expect too much): New.
17988
17989 2001-11-12 Akim Demaille <akim@epita.fr>
17990
17991 * tests/regression.at (Conflicts): Rename as...
17992 (Unresolved SR Conflicts): this.
17993 (Solved SR Conflicts): New.
17994
17995 2001-11-12 Akim Demaille <akim@epita.fr>
17996
17997 * src/reduce.c (print_results): Rename as...
17998 (reduce_output): This.
17999 Output to OUT, passed as argument, instead of output_obstack.
18000 (dump_grammar): Likewise.
18001 (reduce_free): New.
18002 Also free V1.
18003 (reduce_grammar): No longer call reduce_output, since...
18004 * src/print.c (print_results): do it.
18005 * src/main.c (main): Call reduce_free;
18006
18007 2001-11-12 Akim Demaille <akim@epita.fr>
18008
18009 * src/conflicts.c (print_reductions): Accept OUT as argument.
18010 Output to it, not to output_obstack.
18011 * src/print.c (print_actions): Adjust.
18012
18013 2001-11-12 Akim Demaille <akim@epita.fr>
18014
18015 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
18016 the result instead of using...
18017 (src_total, rrc_total, src_count, rrc_count): Remove.
18018 (any_conflicts): Remove.
18019 (print_conflicts): Split into...
18020 (conflicts_print, conflicts_output): New.
18021 * src/conflicts.h: Adjust.
18022 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
18023 * src/print.c (print_grammar): Issue `\n' between two rules.
18024 * tests/regression.at (Conflicts): New.
18025 Reported by Tom Lane.
18026
18027 2001-11-12 Akim Demaille <akim@epita.fr>
18028
18029 * tests/regression.at (Invalid input): Remove, duplicate with
18030 ``Invalid input: 1''.
18031
18032 2001-11-12 Akim Demaille <akim@epita.fr>
18033
18034 * tests/torture.at (AT_DATA_STACK_TORTURE)
18035 (Exploding the Stack Size with Alloca)
18036 (Exploding the Stack Size with Malloc): New.
18037
18038 2001-11-12 Akim Demaille <akim@epita.fr>
18039
18040 * src/bison.simple (YYSTACK_REALLOC): New.
18041 (yyparse) [!yyoverflow]: Use it and free the old stack.
18042 Reported by Per Allansson.
18043
18044 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
18045
18046 * src/bison.simple: Define type yystype instead of YYSTYPE, and
18047 define CPP macro, which substitute YYSTYPE by yystype.
18048 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
18049 with yyltype/YYLTYPE. This allows inclusion of the generated
18050 header within the parser if the compiler, such as GGC, accepts
18051 multiple equivalent #defines.
18052 From Akim.
18053
18054 2001-11-05 Akim Demaille <akim@epita.fr>
18055
18056 * src/reader.c (symbols_output): New, extracted from...
18057 (packsymbols): here.
18058 (reader): Adjust.
18059
18060 2001-11-05 Akim Demaille <akim@epita.fr>
18061
18062 * src/lex.c (parse_percent_token): s/quotearg/quote/.
18063
18064 2001-11-05 Akim Demaille <akim@epita.fr>
18065
18066 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
18067 pattern.
18068
18069 2001-11-05 Akim Demaille <akim@epita.fr>
18070
18071 * src/options.h (struct option_table_struct): set_flags is void*.
18072 * src/options.c (longopts): Support `--output' and `%output'.
18073 (usage): Adjust.
18074 * src/lex.h (tok_setopt): Remove, replaced with...
18075 (tok_intopt, tok_stropt): these new guys.
18076 * src/lex.c (getopt.h): Not needed.
18077 (token_buffer, unlexed_token_buffer): Not const.
18078 (percent_table): Promote `-' over `_' in directive names.
18079 Active `%name-prefix', `file-prefix', and `output'.
18080 (parse_percent_token): Accept possible arguments to directives.
18081 Promote `-' over `_' in directive names.
18082
18083 2001-11-04 Akim Demaille <akim@epita.fr>
18084
18085 * doc/bison.texinfo (Decl Summary): Split the list into
18086 `directives for grammars' and `directives for bison'.
18087 Sort'em.
18088 Add description of `%name-prefix', `file-prefix', and `output'.
18089 Promote `-' over `_' in directive names.
18090 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
18091 Simplify the description of `--name-prefix'.
18092 Promote `-' over `_' in directive names.
18093 Promote `--output' over `--output-file'.
18094 Fix the description of `--defines'.
18095 * tests/output.at: Exercise %file-prefix and %output.
18096
18097 2001-11-02 Akim Demaille <akim@epita.fr>
18098
18099 * doc/refcard.tex: Update.
18100
18101 2001-11-02 Akim Demaille <akim@epita.fr>
18102
18103 * src/symtab.h (SUNDEF): New.
18104 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
18105 stand for `uninitialized', instead of 0.
18106 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
18107 * src/lex.c (lex): Adjust.
18108
18109 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
18110 Number it 0.
18111 Let yylex return it instead of a plain 0.
18112 Reported by Dick Streefland.
18113
18114 2001-11-02 Akim Demaille <akim@epita.fr>
18115
18116 * tests/regression.at (Mixing %token styles): New test.
18117
18118 2001-11-02 Akim Demaille <akim@epita.fr>
18119
18120 * src/reader.c (parse_thong_decl): Formatting changes.
18121 (token_translations_init): New, extracted from...
18122 (packsymbols): Here.
18123 Adjust.
18124
18125 2001-11-01 Akim Demaille <akim@epita.fr>
18126
18127 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
18128 Check that `9foo.y' produces correct cpp guards.
18129 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
18130 guards.
18131 Reported by Wwp.
18132
18133 2001-11-01 Akim Demaille <akim@epita.fr>
18134
18135 * tests/regression.at (Invalid input: 2): New.
18136 * src/lex.c (unlexed_token_buffer): New.
18137 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
18138 too.
18139 Reported by Wwp.
18140
18141 2001-11-01 Akim Demaille <akim@epita.fr>
18142
18143 * tests/calc.at: Catch up with 1.30.
18144 * configure.in: Bump to 1.49a.
18145 Adjust to newer Autotest.
18146
18147 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
18148
18149 * src/conflicts.c: Move global variables rrc_total and src_total ...
18150 (print_conflicts): here.
18151 * src/output.c (output): Free global variable user_toknums.
18152 * src/lex.c (token_obstack): Become static.
18153
18154 2001-10-18 Akim Demaille <akim@epita.fr>
18155
18156 * tests/atlocal.in (GCC): Add.
18157 * tests/calc.at: s/m4_match/m4_bmatch/.
18158 s/m4_patsubst/m4_bpatsubst/.
18159 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
18160 * configure.in: AC_SUBST(GCC).
18161
18162 2001-10-14 Marc Autret <autret_m@epita.fr>
18163
18164 * src/options.c (create_long_option_table): Fix.
18165
18166 2001-10-10 Akim Demaille <akim@epita.fr>
18167
18168 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
18169
18170 2001-10-04 Akim Demaille <akim@epita.fr>
18171
18172 * src/reader.c (parse_union_decl): Push the caracters in
18173 union_obstack, not attrs_obstack.
18174
18175 2001-10-04 Akim Demaille <akim@epita.fr>
18176
18177 Merge in the branch 1.29.
18178
18179 * src/reader.c (packsymbols): Use a temporary obstack for
18180 `%%tokendef', since output_stack is already used elsewhere.
18181
18182 2001-10-02 Akim Demaille <akim@epita.fr>
18183
18184 Bump 1.29d.
18185
18186 2001-10-02 Akim Demaille <akim@epita.fr>
18187
18188 Version 1.29c.
18189
18190 2001-10-02 Akim Demaille <akim@epita.fr>
18191
18192 * tests/regression.at (Invalid CPP headers): New.
18193 From Alexander Belopolsky.
18194 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
18195
18196 2001-10-02 Akim Demaille <akim@epita.fr>
18197
18198 * tests/regression.at (Invalid input): New.
18199 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
18200 Reported by Shura.
18201
18202 2001-10-02 Akim Demaille <akim@epita.fr>
18203
18204 * tests/calc.at: Now that --debug works, the tests must be adjusted.
18205
18206 2001-10-02 Akim Demaille <akim@epita.fr>
18207
18208 * src/output.c (output_parser): Assert `skeleton'.
18209 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
18210 systems.
18211 From Shura.
18212
18213 2001-10-01 Marc Autret <autret_m@epita.fr>
18214
18215 * src/lex.h: Echo modifications.
18216 * src/lex.c (unlex): Parameter is now token_t.
18217 From Hans Aberg.
18218
18219 2001-10-01 Marc Autret <autret_m@epita.fr>
18220
18221 * src/main.c: Include lex.h.
18222 From Hans Aberg.
18223
18224 2001-09-29 Akim Demaille <akim@epita.fr>
18225
18226 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
18227
18228 2001-09-28 Akim Demaille <akim@epita.fr>
18229
18230 * tests/testsuite.at: Update to newer Autotest.
18231 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
18232
18233 2001-09-27 Akim Demaille <akim@epita.fr>
18234
18235 Position independent wrapper.
18236
18237 * tests/bison: Remove.
18238 * tests/bison.in: New.
18239 * configure.in: Adjust.
18240
18241 2001-09-27 Paul Eggert <eggert@twinsun.com>
18242
18243 Port quotearg fixes from tar 1.13.24.
18244
18245 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
18246 tm to be declared.
18247 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18248 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18249
18250 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
18251 * m4/mbrtowc.m4: New file.
18252 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
18253 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
18254
18255 2001-09-27 Akim Demaille <akim@epita.fr>
18256
18257 Bump to 1.29c.
18258
18259 2001-09-27 Akim Demaille <akim@epita.fr>
18260
18261 Version 1.29b.
18262
18263 2001-09-25 Akim Demaille <akim@epita.fr>
18264
18265 * src/system.h: Include `xalloc.h'.
18266 Remove it from the C files.
18267 * src/files.c (output_files): Free the obstacks.
18268 * src/lex.c (init_lex): Rename as...
18269 (lex_init): this.
18270 (lex_free): New.
18271 * src/main.c (main): Use it.
18272
18273 2001-09-24 Marc Autret <autret_m@epita.fr>
18274
18275 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
18276 to output informations in fout (FILE*).
18277 (open_graph, close_graph): Likewise.
18278 (output_graph, output_edge, output_node): Likewise.
18279 * src/vcg.h: Update function prototypes.
18280 * src/print_graph.c (print_graph): Open output graph file.
18281 (print_actions): Adjust.
18282 * src/files.h: Remove extern declaration.
18283 * src/files.c: Remove graph_obstack declaration.
18284 (open_files): Remove graph_obstack initialization.
18285 (output_files): Remove graph_obstack saving.
18286
18287 2001-09-24 Marc Autret <autret_m@epita.fr>
18288
18289 * src/files.c (compute_output_file_names): Fix.
18290
18291 2001-09-24 Marc Autret <autret_m@epita.fr>,
18292 Akim Demaille <akim@epita.fr>
18293
18294 * src/reader.c (reader): Remove call to free_symtab ().
18295 * src/main.c (main): Call it here.
18296 Include symtab.h.
18297 * src/conflicts.c (initialize_conflicts): Rename as...
18298 (solve_conflicts): this.
18299 * src/print.c (print_core, print_actions, print_state)
18300 (print_grammar): Dump to a file instead a `output_obstack'.
18301 (print_results): Dump `output_obstack', and then proceed with the
18302 FILE *.
18303 * src/files.c (compute_output_file_names, close_files): New.
18304 (output_files): Adjust.
18305 * src/main.c (main): Adjust.
18306
18307 2001-09-23 Marc Autret <autret_m@epita.fr>
18308
18309 * src/files.c (compute_header_macro): Computes header macro name
18310 from spec_defines_file when given.
18311
18312 2001-09-23 Marc Autret <autret_m@epita.fr>
18313
18314 * src/files.c (output_files): Add default extensions.
18315
18316 2001-09-22 Akim Demaille <akim@epita.fr>
18317
18318 * src/conflicts.c (finalize_conflicts): Rename as...
18319 (free_conflicts): this.
18320
18321 2001-09-22 Akim Demaille <akim@epita.fr>
18322
18323 * src/gram.c (gram_free): Rename back as...
18324 (dummy): this.
18325 (output_token_translations): Free `token_translations'.
18326 * src/symtab.c (free_symtab): Free the tag field.
18327
18328 2001-09-22 Akim Demaille <akim@epita.fr>
18329
18330 Remove `translations' as it is always set to true.
18331
18332 * src/gram.h: Adjust.
18333 * src/reader.c (packsymbols, parse_token_decl): Adjust
18334 * src/print.c (print_grammar): Adjust.
18335 * src/output.c (output_token_translations): Adjust.
18336 * src/lex.c (lex): Adjust.
18337 * src/gram.c: Be sure the set pointers to NULL.
18338 (dummy): Rename as...
18339 (gram_free): this.
18340
18341 2001-09-22 Akim Demaille <akim@epita.fr>
18342
18343 * configure.in: Invoke AM_LIB_DMALLOC.
18344 * src/system.h: Use dmalloc.
18345 * src/LR0.c: Be sure to have pointers initialized to NULL.
18346 (allocate_itemsets): Allocate kernel_items only if needed.
18347
18348 2001-09-22 Akim Demaille <akim@epita.fr>
18349
18350 * configure.in: Bump to 1.29b.
18351 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
18352 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
18353 need xmalloc.c in calc.y.
18354 From Pascal Bart.
18355
18356 2001-09-21 Akim Demaille <akim@epita.fr>
18357
18358 Version 1.29a.
18359 * Makefile.maint, config/config.guess, config/config.sub,
18360 * config/missing: Update from masters.
18361 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
18362 upon package.m4.
18363 * configure.in (ALL_LINGUAS): Add `tr'.
18364
18365 2001-09-21 Akim Demaille <akim@epita.fr>
18366
18367 * tests/Makefile.am (package.m4): Move to...
18368 ($(srcdir)/$(TESTSUITE)): here.
18369
18370 2001-09-20 Akim Demaille <akim@epita.fr>
18371
18372 * src/complain.c: No longer try to be standalone: use system.h.
18373 Don't assume __STDC__ is defined to 1. Just test if it is defined.
18374 * src/complain.h: Likewise.
18375 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
18376 Remove the unused variable `n'.
18377 From Albert Chin-A-Young.
18378
18379 2001-09-18 Marc Autret <autret_m@epita.fr>
18380
18381 * doc/bison.1: Update.
18382 * doc/bison.texinfo (Bison Options): Update --defines and --graph
18383 descriptions.
18384 (Option Cross Key): Update.
18385 Add --graph.
18386
18387 2001-09-18 Marc Autret <autret_m@epita.fr>
18388
18389 * tests/regression.at: New test (comment in %union).
18390
18391 2001-09-18 Marc Autret <autret_m@epita.fr>
18392
18393 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
18394 do that.
18395 Reported by Keith Browne.
18396
18397 2001-09-18 Marc Autret <autret_m@epita.fr>
18398
18399 * tests/output.at: Add tests for --defines and --graph.
18400
18401 2001-09-18 Marc Autret <autret_m@epita.fr>
18402
18403 * tests/output.at: Removes tests of %{header,src}_extension features.
18404
18405 2001-09-18 Akim Demaille <akim@epita.fr>
18406
18407 * tests/Makefile.am (package.m4): New.
18408 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
18409 (_AT_CHECK_CALC_ERROR): Likewise.
18410 Factor the `, ' part of verbose error messages.
18411
18412 2001-09-18 Marc Autret <autret_m@epita.fr>
18413
18414 * src/getargs.c (longopts): Declare --defines and --graph as options
18415 with optional arguments.
18416 * src/files.h: Add extern declarations.
18417 * src/files.c (spec_graph_file, spec_defines_file): New.
18418 (output_files): Update.
18419 Remove CPP-outed code.
18420
18421 2001-09-18 Marc Autret <autret_m@epita.fr>
18422
18423 Turn off %{source,header}_extension feature.
18424
18425 * src/files.c (compute_exts_from_gf): Update.
18426 (compute_exts_from_src): Update.
18427 (output_files): CPP-out useless code.
18428 * src/files.h: Remove {header,source}_extension extern declarations.
18429 * src/reader.c (parse_dquoted_param): CPP-out.
18430 (parse_header_extension_decl): Remove.
18431 (parse_source_extension_decl): Remove.
18432 (read_declarations): Remove cases tok_{hdrext,srcext}.
18433 * src/lex.c (percent_table): Remove {header,source}_extension entries.
18434 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
18435
18436 2001-09-10 Akim Demaille <akim@epita.fr>
18437
18438 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
18439 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
18440 (AT_CHECK_OUTPUT): this.
18441 Merely check ls' exit status, its output is useless.
18442
18443 2001-09-10 Akim Demaille <akim@epita.fr>
18444
18445 * tests/calc.at: Use m4_match.
18446 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
18447
18448 2001-09-10 Marc Autret <autret_m@epita.fr>,
18449 Akim Demaille <akim@epita.fr>
18450
18451 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
18452 enum color_e.
18453 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
18454 to `normal'.
18455 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
18456 * src/lex.h: Adjust prototype.
18457 (token_t): Add `tok_undef'.
18458 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
18459 (parse_percent_token): Now returns token_t.
18460 Add default statement in switch.
18461 (lex): Separate `c' as an input variable, from the token_t result
18462 part.
18463 (unlexed): Is a token_t.
18464
18465 2001-09-10 Akim Demaille <akim@epita.fr>
18466
18467 * configure.in: Bump to 1.29a.
18468
18469 2001-09-07 Akim Demaille <akim@epita.fr>
18470
18471 Version 1.29.
18472
18473 2001-08-30 Akim Demaille <akim@epita.fr>
18474
18475 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
18476 * m4/atconfig.m4: Remove.
18477 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
18478 * tests/bison: New.
18479 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
18480 m4_if, m4_patsubst, and m4_regexp.
18481 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
18482 `input' file instead of echo.
18483
18484 2001-08-29 Akim Demaille <akim@epita.fr>
18485
18486 Bump to 1.28e.
18487
18488 2001-08-29 Akim Demaille <akim@epita.fr>
18489
18490 Version 1.28d.
18491
18492 2001-08-29 Paul Eggert <eggert@twinsun.com>
18493
18494 * src/bison.simple (yyparse): Don't take the address of an
18495 item before the start of an array, as that doesn't conform to
18496 the C Standard.
18497
18498 2001-08-29 Robert Anisko <anisko_r@epita.fr>
18499
18500 * doc/bison.texinfo (Location Tracking Calc): New node.
18501
18502 2001-08-29 Paul Eggert <eggert@twinsun.com>
18503
18504 * src/output.c (output): Do not define const, as this now
18505 causes more problems than it cures.
18506
18507 2001-08-29 Akim Demaille <akim@epita.fr>
18508
18509 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
18510 the nodes.
18511 Be sure to tag the `detailmenu'.
18512
18513 2001-08-29 Akim Demaille <akim@epita.fr>
18514
18515 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
18516 download in a tmp dir.
18517
18518 2001-08-28 Marc Autret <autret_m@epita.fr>
18519
18520 * config/depcomp: New file.
18521
18522 2001-08-28 Marc Autret <autret_m@epita.fr>
18523
18524 * doc/bison.1 (mandoc): Adjust.
18525 From Juan Manuel Guerrero.
18526
18527 2001-08-28 Marc Autret <autret_m@epita.fr>
18528
18529 * src/print_graph.c (print_state): Fix.
18530
18531 2001-08-27 Marc Autret <autret_m@epita.fr>
18532
18533 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
18534 char * members.
18535 Echo modifications to the functions prototypes.
18536 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
18537
18538 2001-08-27 Marc Autret <autret_m@epita.fr>
18539
18540 * src/vcg.c: Include `xalloc.h'.
18541 (add_colorentry): New.
18542 (add_classname): New.
18543 (add_infoname): New.
18544 * src/vcg.h: Add new prototypes.
18545
18546 2001-08-27 Akim Demaille <akim@epita.fr>
18547
18548 * Makefile.maint: Sync. again with CVS Autoconf.
18549
18550 2001-08-27 Akim Demaille <akim@epita.fr>
18551
18552 * Makefile.maint: Formatting changes.
18553 (po-update, cvs-update, update): New targets.
18554 (AMTAR): Remove.
18555
18556 2001-08-27 Akim Demaille <akim@epita.fr>
18557
18558 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18559 * Makefile.maint: Sync. with CVS Autoconf.
18560
18561 2001-08-27 Marc Autret <autret_m@epita.fr>
18562
18563 * src/vcg.h (struct infoname_s): New.
18564 (struct colorentry_s): New.
18565 (graph_s): New fields {vertical,horizontal}_order in structure.
18566 Add `infoname' field.
18567 Add `colorentry' field;
18568 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
18569 (G_HORIZONTAL_ORDER): New.
18570 (G_INFONAME): New.
18571 (G_COLORENTRY): New.
18572 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
18573 Add output of `infoname'.
18574 Add output of `colorentry'.
18575
18576 2001-08-27 Marc Autret <autret_m@epita.fr>
18577
18578 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
18579 This one shadowed a global parameter.
18580
18581 2001-08-24 Marc Autret <autret_m@epita.fr>
18582
18583 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
18584 instead of `unsigned'.
18585 (print_state): Do not call obstack_object_size () in obstack_grow ()
18586 to avoid macro variables shadowing.
18587
18588 2001-08-23 Marc Autret <autret_m@epita.fr>
18589
18590 * src/lex.c (percent_table): Typo: s/naem/name/.
18591 Add graph option.
18592 Normalize new options declarations.
18593
18594 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
18595
18596 * tests/suite.at: Exercise %header_extension and %source_extension.
18597
18598 2001-08-16 Marc Autret <autret_m@epita.fr>
18599
18600 * src/reader.c (parse_dquoted_param): New.
18601 (parse_header_extension_decl): Use it.
18602 (parse_source_extension_decl): Likewise.
18603
18604 2001-08-16 Marc Autret <autret_m@epita.fr>
18605
18606 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
18607 (get_xxxx_str): Use assert () instead of complain ().
18608 Remove return invokations in default cases.
18609 (get_decision_str): Modify default behaviour. Remove second argument.
18610 Echo modifications on calls.
18611 (output_graph): Fix.
18612
18613 2001-08-16 Marc Autret <autret_m@epita.fr>
18614
18615 * src/getargs.c (usage): Update with ``-g, --graph''.
18616
18617 2001-08-16 Marc Autret <autret_m@epita.fr>
18618
18619 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
18620 (Option Cross Key): Likewise.
18621 * doc/bison.1: Update.
18622
18623 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
18624
18625 * src/output.c (output_master_parser): Don't finish action_obstack.
18626 (output_parser): Don't care about the muscle action, here.
18627 (prepare): Copy the action_obstack in the action muscle.
18628 (output): Free action_obstack.
18629
18630 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18631
18632 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
18633 will contain `%union' declaration.
18634 (parse_union_decl): Delete #line directive output.
18635 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
18636 informations about %union.
18637 (parse_union_decl): Copy the union_obstack in the muscle stype.
18638 * src/bison.simple: Add new #line directive.
18639 Add typdef %%stype YYSTYPE.
18640
18641 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
18642
18643 * src/bison.simple: Add new `#line' directive.
18644
18645 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
18646
18647 * src/bison.simple: New `#line' directive.
18648 * src/output.c (output_parser): Support new dynamic muscle input_line.
18649
18650 2001-09-22 Marc Autret <autret_m@epita.fr>
18651
18652 * src/output.c (output_master_parser): New.
18653 (output_parser): Be more re-entrant.
18654
18655 2001-09-21 Marc Autret <autret_m@epita.fr>
18656
18657 * src/reader.c (copy_definition, parse_union_decl): Update and use
18658 `linef' muscle.
18659 (copy_action): Likewise.
18660 Use obstack_1grow ().
18661 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
18662
18663 2001-09-21 Marc Autret <autret_m@epita.fr>
18664
18665 * src/options.c (option_table): Adjust.
18666 * src/lex.c (parse_percent_token): Fix.
18667
18668 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18669
18670 * src/options.c (symtab.h): Include it, need by lex.h.
18671
18672 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
18673
18674 * src/lex.c (parse_percent_token): Change type of variable `tx', which
18675 is now an option_table_struct*.
18676 (option_strcmp): New function option_strcmp.
18677 (parse_percent_token): Call option_strcmp.
18678 * src/getargs.c (xalloc.h, options.h): Include it.
18679 (getargs): Call create_long_option_table.
18680 (getargs): Free longopts at the end of the function.
18681 (shortopts): Move in options.c.
18682 * src/options.c (create_long_option_table): New function. Convert
18683 information from option_table to option structure.
18684 * src/reader.c (options.h): Include it.
18685
18686 * src/Makefile.am: Adjust.
18687 * src/options.c (option_table): Create from longopts and percent_table.
18688 * src/getargs.c (longopts): Delete.
18689 * src/lex.c (struct percent_table_struct): Delete.
18690 (percent_table): Delete.
18691 (options.h): Include it.
18692 * src/options.c: Create.
18693 * src/options.h: Create.
18694 Declare enum opt_access_e.
18695 Define struct option_table_struct.
18696
18697 2001-09-20 Marc Autret <autret_m@epita.fr>
18698
18699 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
18700 sections of Bison.
18701
18702 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
18703
18704 * src/bison.simple: s/%%filename/%%skeleton.
18705 * src/muscle_tab.c (getargs.h): Include it.
18706 (muscle_init): Insert new muscle skeleton.
18707
18708 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
18709
18710 * src/output.c (output_parser): Delete unused variable actions_dumped.
18711
18712 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
18713
18714 * src/output.c (output): Delete call to reader_output_yylsp.
18715 * src/reader.c (reader): Likewise.
18716 * src/reader.h: Delete declaration of reader_output_yylsp.
18717
18718 2001-09-02 Marc Autret <autret_m@epita.fr>
18719
18720 * src/reader.c: Include muscle_tab.h.
18721 (parse_union_decl): Update.
18722 (parse_macro_decl): Rename parse_muscle_decl.
18723 Update to use renamed functions and variable.
18724 (read_declarations, copy_action, read_additionnal_code, : Updated
18725 with correct variables and functions names.
18726 (packsymbols, reader): Likewise.
18727
18728 * src/reader.h (muscle_obstack): Extern declaration update.
18729
18730 * src/output.c: Include muscle_tab.h
18731 In all functions using macro_insert, change by using muscle_insert ().
18732 (macro_obstack): Rename muscle_obstack.
18733 Echo modifications in the whole file.
18734 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
18735 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
18736 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
18737
18738 * src/muscle_tab.h: Update double inclusion macros.
18739 (macro_entry_s): Rename muscle_entry_s.
18740 Update prototypes.
18741
18742 * src/muscle_tab.c: Include muscle_tab.h.
18743 Rename macro_tabble to muscle_table.
18744 (mhash1, mhash2, mcmp): Use muscle_entry.
18745 (macro_init): Rename muscle_init. Update.
18746 (macro_insert): Rename muscle_insert. Update.
18747 (macro_find): Rename muscle_find. Update.
18748
18749 * src/main.c: Include muscle_tab.h.
18750 (main): Call muscle_init ().
18751 * src/Makefile.am (bison_SOURCES): Echo modifications.
18752
18753 2001-09-02 Marc Autret <autret_m@epita.fr>
18754
18755 Now the files macro_tab.[ch] are named muscle_tab.[ch].
18756
18757 * src/muscle_tab.c, src/muscle_tab.h: Add files.
18758
18759 2001-09-02 Marc Autret <autret_m@epita.fr>
18760
18761 * src/macrotab.c, src/macrotab.h: Remove.
18762
18763 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
18764
18765 * src/reader.c (copy_guard): Use muscle to specify the `#line'
18766 filename.
18767
18768 2001-09-01 Marc Autret <autret_m@epita.fr>
18769
18770 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
18771 to an explicit value to activate the feature. We do it here.
18772
18773 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18774
18775 * src/output.c (prepare): Delete the `filename' muscule insertion.
18776 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
18777 (parse_union_decl): Likewise.
18778 * src/macrotab.c (macro_init): Initialize filename by infile.
18779
18780 2001-08-31 Marc Autret <autret_m@epita.fr>
18781
18782 * src/bison.simple (YYLSP_NEEDED): New definition.
18783 * src/output.c (prepare): Add macro insertion of `locations_flag'
18784
18785 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18786
18787 * src/output.c (prepare): Delete insertion of previous muscles,
18788 and insert the `prefix' muscles.
18789 * src/macrotab.c (macro_init): Likewise.
18790 (macro_init): Initialization prefix directive by `yy'.
18791 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
18792 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18793 yylval, yydebug, yyerror, yynerrs and yyparse.
18794 New directive `#define' to substitute yydebug, ... with option
18795 name_prefix.
18796
18797 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18798
18799 * src/main.c (main): Standardize.
18800 * src/output.c (output_table_data, output_parser): Likewise.
18801 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18802
18803 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18804
18805 * src/reader.c (read_additionnal_code): Rename %%user_code to
18806 %%epilogue.
18807 * src/output.c (output): Rename %%declarations to %%prologue.
18808 * src/bison.simple: Echo modifications.
18809
18810 2001-08-31 Marc Autret <autret_m@epita.fr>
18811
18812 * src/reader.c (readgram): CleanUp.
18813 (output_token_defines): Likewise.
18814 (packsymbols): Likewise.
18815 (reader): Likewise.
18816 * src/output.c (output): CPP-out useless code.
18817
18818 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18819
18820 * src/reader.c (reader): Delete obsolete call to function
18821 output_trailers and output_headers.
18822 * src/output.h: Remove obsolete functions prototypes of output_headers
18823 and output_trailers.
18824
18825 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
18826
18827 * src/main.c: Include macrotab.h.
18828 * src/macrotab.h (macro_entry_s): Constify fields.
18829 Adjust functions prototypes.
18830 * src/macrotab.c (macro_insert): Constify key and value.
18831 (macro_find): Constify key.
18832 (macro_insert): Include 'xalloc.h'
18833 (macro_insert): Use XMALLOC.
18834 (macro_find): Constify return value.
18835 * src/output.c (output_table_data): Rename table to table_data.
18836 (output_parser): Constify macro_key, macro_value.
18837
18838 2001-08-30 Marc Autret <autret_m@epita.fr>
18839
18840 * src/reader.c (parse_skel_decl): New.
18841 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18842 * src/lex.h (token_t): New token `tok_skel'.
18843 * src/lex.c (percent_table): Add skeleton option entry.
18844 Standardize.
18845
18846 2001-08-29 Marc Autret <autret_m@epita.fr>
18847
18848 * src/bison.simple: Add %%user_code directive at the end.
18849 * src/reader.c (read_additionnal_code): New.
18850 (reader): Use it.
18851 * src/output.c (output_program): Remove.
18852 (output): Update.
18853
18854 2001-08-28 Marc Autret <autret_m@epita.fr>
18855
18856 * src/output.c (output_actions): Clean up.
18857 (output_gram): CPP-out useless code.
18858 * src/reader.c (reader): Clean up, CPP-out useless code.
18859
18860 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
18861
18862 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18863 directive.
18864 * src/bison.simple: Add `%%definitions'.
18865
18866 2001-08-28 Marc Autret <autret_m@epita.fr>
18867
18868 * config/depcomp: New file.
18869
18870 2001-08-27 Paul Eggert <eggert@twinsun.com>
18871
18872 * src/bison.simple (yyparse): Don't take the address of an
18873 item before the start of an array, as that doesn't conform to
18874 the C Standard.
18875
18876 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18877
18878 * src/output.c (output): Remove the initialization of the macro
18879 obstack. It was done too late here.
18880
18881 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18882 completely wrong.
18883 (reader): Initialize the macro obstack here, since we need it to grow
18884 '%define' directives.
18885
18886 * src/reader.h: Declare the macro obstack as extern.
18887
18888 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18889
18890 * src/output.c (output_parser): Fix. Store single '%' characters in
18891 the output obstack instead of throwing them away.
18892
18893 2001-08-27 Akim Demaille <akim@epita.fr>
18894
18895 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18896
18897 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18898
18899 * lib/Makefile.am: Adjust.
18900
18901 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18902
18903 * src/bison.simple: Update and add '%%' directives.
18904
18905 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18906
18907 * src/reader.c (reader): Remove calls to 'output_headers' and
18908 'output_trailers'. Remove some C output.
18909 (readgram): Disable a piece of code that was writing a default
18910 definition for 'YYSTYPE'.
18911 (reader_output_yylsp): Remove.
18912 (packsymbols): Output token defintions to a macro.
18913 (copy_definition): Disable C output.
18914
18915 * src/reader.c (parse_macro_decl): New function used to parse macro
18916 declarations.
18917 (copy_string2): Put the body of copy_string into this new function.
18918 Add a parameter to let the caller choose whether he wants to copy the
18919 string delimiters or not.
18920 (copy_string): Be a simple call to copy_string2 with the last argument
18921 bound to true.
18922 (read_declarations): Add case for macro definition.
18923 (copy_identifier): New.
18924 (parse_macro_decl): Read macro identifiers using copy_identifier
18925 rather than lex.
18926
18927 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18928
18929 * src/output.c (prepare): Add prefixed names.
18930 (output_parser): Output semantic actions.
18931 (output_parser): Fix bug on '%%line' directives.
18932
18933 * src/output.c (output_headers): Remove. The C code printed by this
18934 function should now be in the skeletons.
18935 (output_trailers): Remove.
18936 (output): Disable call to 'reader_output_yylsp'.
18937 (output_rule_data): Do not output tables to the table obstack.
18938
18939 * src/output.c: Remove some C dedicated output.
18940 Improve the use of macro and output obstacks.
18941 (output_defines): Remove.
18942
18943 * src/output.c (output_token_translations): Associate 'translate'
18944 table with a macro. No output to the table obstack.
18945 (output_gram): Same for 'rhs' and 'prhs'.
18946 (output_stos): Same for 'stos'.
18947 (output_rule_data): Same for 'r1' and 'r2'.
18948 (token_actions): Same for 'defact'.
18949 (goto_actions): Same for 'defgoto'.
18950 (output_base): Same for 'pact' and 'pgoto'.
18951 (output_table): Same for 'table'.
18952 (output_check): Same for 'check'.
18953
18954 * src/output.c (output_table_data): New function.
18955 (output_short_table): Remove.
18956 (output_short_or_char_table): Remove.
18957
18958 * src/output.c (output_parser): Replace most of the skeleton copy code
18959 with something new. Skeletons are now processed character by character
18960 rather than line by line, and Bison looks for '%%' macros. This is the
18961 first step in making Bison's output process (a lot) more flexible.
18962 (output_parser): Use the macro table.
18963
18964 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18965
18966 * src/main.c (main): Initialize the macro table.
18967
18968 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18969
18970 * src/lex.c (percent_table): Add tok_define.
18971 * src/lex.h: Add tok_define.
18972
18973 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18974
18975 * src/macrotab.c: New file.
18976 * src/macrotab.h: New file.
18977 * src/Makefile.am: Update.
18978
18979 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18980
18981 * lib/hash.c: New file.
18982 * lib/hash.h: New file.
18983 * lib/Makefile.am: Update.
18984
18985 2001-08-15 Akim Demaille <akim@epita.fr>
18986
18987 Version 1.28c.
18988
18989 2001-08-15 Marc Autret <autret_m@epita.fr>
18990
18991 * src/reader.c (readgram): Indent output macro YYSTYPE.
18992 (packsymbols): Likewise.
18993 (output_token_defines): Likewise.
18994 * src/files.c: Standardize.
18995 (compute_header_macro): New.
18996 (defines_obstack_save): New. Use compute_header_macro.
18997 (output_files): Update. Use defines_obstack_save.
18998
18999 2001-08-15 Akim Demaille <akim@epita.fr>
19000
19001 * doc/bison.texinfo (Table of Symbols): Document
19002 YYSTACK_USE_ALLOCA.
19003
19004 2001-08-15 Akim Demaille <akim@epita.fr>
19005
19006 * missing: Update from CVS Automake.
19007 * config/config.guess, config/config.sub, config/texinfo.tex:
19008 Update from gnu.org.
19009
19010 2001-08-15 Akim Demaille <akim@epita.fr>
19011
19012 * Makefile.maint: Sync with CVS Autoconf.
19013
19014 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
19015
19016 * doc/bison.texinfo: Include GNU Free Documentation License from
19017 `fdl.texi'.
19018 * doc/fdl.texi: Add to package.
19019
19020 2001-08-14 Marc Autret <autret_m@epita.fr>
19021
19022 Turn on %{source,header}_extension features.
19023
19024 * src/lex.c (percent_table): Un-CPP out header_extension and
19025 source_extension.
19026 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
19027 (compute_exts_from_src): Remove conditions. It restores priorities
19028 between options.
19029
19030 2001-08-14 Marc Autret <autret_m@epita.fr>
19031
19032 * src/files.c (compute_base_names): Add extensions computing when
19033 `--file-prefix' used.
19034 Standardize function calls.
19035
19036 2001-08-13 Marc Autret <autret_m@epita.fr>
19037
19038 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
19039 defining it (defined but null disables alloca).
19040
19041 2001-08-13 Marc Autret <autret_m@epita.fr>
19042
19043 * src/bison.simple (_yy_memcpy): CPP reformat.
19044
19045 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
19046
19047 * tests/atconfig.in (CPPFLAGS): Fix.
19048
19049 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
19050
19051 * doc/bison.texinfo: Include GNU General Public License from
19052 `gpl.texi'.
19053 * doc/gpl.texi: Add to package.
19054
19055 2001-08-10 Marc Autret <autret_m@epita.fr>
19056
19057 * src/print_graph.h: Fix.
19058 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
19059
19060 2001-08-10 Akim Demaille <akim@epita.fr>
19061
19062 * src/system.h: Provide default declarations for stpcpy, strndup,
19063 and strnlen.
19064
19065 2001-08-10 Robert Anisko <anisko_r@epita.fr>
19066
19067 * doc/bison.texinfo (Locations): Update @$ stuff.
19068
19069 2001-08-09 Robert Anisko <anisko_r@epita.fr>
19070
19071 * src/bison.simple (YYLLOC_DEFAULT): Update.
19072 (yyparse): Adjust.
19073
19074 2001-08-08 Marc Autret <autret_m@epita.fr>
19075
19076 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
19077 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
19078 Reported by Fabrice Bauzac.
19079
19080 2001-08-08 Marc Autret <autret_m@epita.fr>
19081
19082 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
19083 * src/vcg.c (output_node): Fix.
19084 * src/vcg.h: Cleanup.
19085 * src/print_graph.c: Add comments.
19086 (node_output_size): New global variable. Simplify the formatting of
19087 the VCG graph output.
19088 (print_actions): Unused code is now used. It notifies the final state
19089 and no action states in the VCG graph. It also give the reduce actions.
19090 The `shift and goto' edges are red and the `go to state' edges are
19091 blue.
19092 Get the current node name and node_obstack by argument.
19093 (node_obstack): New variable.
19094 (print_state): Manage node_obstack.
19095 (print_core): Use node_obstack given by argument.
19096 A node is not only computed here but in print_actions also.
19097 (print_graph): CPP out useless code instead of commenting it.
19098
19099 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
19100
19101 * tests/atconfig.in (CPPFLAGS): Fix.
19102
19103 2001-08-07 Akim Demaille <akim@epita.fr>
19104
19105 * src/print_graph.c (quote): New.
19106 (print_core): Use it.
19107
19108 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
19109
19110 * src/vcg.c (complain.h): Include it.
19111 Unepitaize `return' invocations.
19112 [NDEBUG] (main): Remove.
19113 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
19114 * src/files.c (open_files): Initialize graph_obstack.
19115 * src/print_graph.c (print_actions): CPP out useless code.
19116 (print_core): Don't output the last `\n' in labels.
19117 Use `quote'.
19118 * src/files.c (output_files): Output the VCG file.
19119 * src/main.c (main): Invoke print_graph ();
19120
19121 2001-08-06 Marc Autret <autret_m@epita.fr>
19122
19123 Automaton VCG graph output.
19124 Using option ``-g'' or long option ``--graph'', you can generate
19125 a gram_filename.vcg file containing a VCG description of the LALR (1)
19126 automaton of your grammar.
19127
19128 * src/main.c: Call to print_graph() function.
19129 * src/getargs.h: Update.
19130 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
19131 (graph_flag): New flag.
19132 (longopts): Update.
19133 (getargs): Add case `g'.
19134 * src/files.c (graph_obstack): New obstack struct.
19135 (open_files): Initialize new obstack.
19136 (output_files): Saves graph_obstack if required.
19137 * src/files.h (graph_obstack): New extern declaration.
19138 * src/Makefile.am: Add new source files.
19139
19140 2001-08-06 Marc Autret <autret_m@epita.fr>
19141
19142 * src/print_graph.c, src/print_graph.h (graph): New.
19143 * src/vcg.h: New file.
19144 * src/vcg.c: New file, VCG graph handling.
19145
19146 2001-08-06 Marc Autret <autret_m@epita.fr>
19147
19148 Add of %source_extension and %header_extension which specify
19149 the source or/and the header output file extension.
19150
19151 * src/files.c (compute_base_names): Remove initialisation of
19152 src_extension and header_extension.
19153 (compute_exts_from_gf): Update.
19154 (compute_exts_from_src): Update.
19155 (output_files): Update.
19156 * src/reader.c (parse_header_extension_decl): New.
19157 (parse_source_extension_decl): New.
19158 (read_declarations): New case statements for the new tokens.
19159 * src/lex.c (percent_table): Add entries for %source_extension
19160 and %header_extension.
19161 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
19162
19163 2001-08-06 Marc Autret <autret_m@epita.fr>
19164
19165 * configure.in: Bump to 1.28c.
19166 * doc/bison.texinfo: Texinfo thingies.
19167
19168 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
19169
19170 * tests/atconfig.in (CPPFLAGS): Add.
19171 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
19172
19173 2001-08-03 Akim Demaille <akim@epita.fr>
19174
19175 Version 1.28b.
19176
19177 2001-08-03 Akim Demaille <akim@epita.fr>
19178
19179 * tests/Makefile.am (check-local): Ship testsuite.
19180 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
19181 Include `string.h'.
19182
19183 2001-08-03 Akim Demaille <akim@epita.fr>
19184
19185 * configure.in: Try using -Wformat when compiling.
19186
19187 2001-08-03 Akim Demaille <akim@epita.fr>
19188
19189 * configure.in: Bump to 1.28b.
19190
19191 2001-08-03 Akim Demaille <akim@epita.fr>
19192
19193 * src/complain.c: Adjust strerror_r portability issues.
19194
19195 2001-08-03 Akim Demaille <akim@epita.fr>
19196
19197 Version 1.28a.
19198
19199 2001-08-03 Akim Demaille <akim@epita.fr>
19200
19201 * src/getargs.c, src/getarg.h (skeleton)): Constify.
19202 * src/lex.c (literalchar): Avoid name clashes on `buf'.
19203 * src/getargs.c: Include complain.h.
19204 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
19205 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
19206
19207 2001-08-03 Akim Demaille <akim@epita.fr>
19208
19209 * src/reader.c (readgram): Display hidden chars in error messages.
19210
19211 2001-08-03 Akim Demaille <akim@epita.fr>
19212
19213 Update to gettext 0.10.39.
19214
19215 2001-08-03 Akim Demaille <akim@epita.fr>
19216
19217 * lib/strspn.c: New.
19218
19219 2001-08-01 Marc Autret <autret_m@epita.fr>
19220
19221 * doc/bison.texinfo: Update.
19222 * doc/bison.1 (mandoc): Update.
19223 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
19224 * src/files.c: Support output files extensions computing.
19225 (src_extension): New static variable.
19226 (header_extension): New static variable.
19227 (tr): New function.
19228 (get_extension_index): New function, gets the index of an extension
19229 filename in a string.
19230 (compute_exts_from_gf): New function, computes extensions from the
19231 grammar file extension.
19232 (compute_exts_from_src): New functions, computes extensions from the
19233 C source file extension, file given by ``-o'' option.
19234 (compute_base_names): Update.
19235 (output_files): Update.
19236
19237 2001-08-01 Robert Anisko <anisko_r@epita.fr>
19238
19239 * doc/bison.texi: Document @$.
19240 (Locations): New section.
19241
19242 2001-07-18 Akim Demaille <akim@epita.fr>
19243
19244 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
19245 * config/prev-version.txt, config/move-if-change: New.
19246 * Makefile.am: Adjust.
19247
19248 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
19249
19250 * src/bison.simple (yyparse): Suppress warning `comparaison
19251 between signed and unsigned'.
19252
19253 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
19254
19255 * src/getargs.h (raw_flag): Remove.
19256 * src/getargs.c: Die on `-r'/`--raw'.
19257 * src/lex.c (parse_percent_token): Die on `%raw'.
19258 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
19259 * tests/calc.at: Suppress test with option `--raw'.
19260
19261 2001-07-14 Akim Demaille <akim@epita.fr>
19262
19263 * config/: New.
19264 * configure.in: Require Autoconf 2.50.
19265 Update to gettext 0.10.38.
19266
19267 2001-03-16 Akim Demaille <akim@epita.fr>
19268
19269 * doc/bison.texinfo: ANSIfy the examples.
19270
19271 2001-03-16 Akim Demaille <akim@epita.fr>
19272
19273 * getargs.c (skeleton): New variable.
19274 (longopts): --skeleton is a new option.
19275 (shortopts, getargs): -S is a new option.
19276 * getargs.h: Declare skeleton.
19277 * output.c (output_parser): Use it.
19278
19279 2001-03-16 Akim Demaille <akim@epita.fr>
19280
19281 * m4/strerror_r.m4: New.
19282 * m4/error.m4: Run AC_FUNC_STRERROR_R.
19283 * lib/error.h, lib/error.c: Update.
19284
19285 2001-03-16 Akim Demaille <akim@epita.fr>
19286
19287 * src/getargs.c (longopts): Clean up.
19288
19289 2001-02-21 Akim Demaille <akim@epita.fr>
19290
19291 * src/reader.c (gensym): `gensym_count' is your own.
19292 Use a static buf to create the symbol name, as token_buffer is no
19293 longer a buffer.
19294
19295 2001-02-08 Akim Demaille <akim@epita.fr>
19296
19297 * src/conflicts.c (conflict_report): Be sure not to append to res
19298 between two calls, which could happen if both first sprintf were
19299 skipped, but not the first cp += strlen.
19300
19301 2001-02-08 Akim Demaille <akim@epita.fr>
19302
19303 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
19304 New, from fileutils 4.0.37.
19305 * configure.in: Require Autoconf 2.49c. I took some time before
19306 making this decision. This is the only way out for portability
19307 issues in Bison, it would mean way too much duplicate effort to
19308 import in Bison features implemented in 2.49c since 2.13.
19309 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
19310
19311 2001-02-02 Akim Demaille <akim@epita.fr>
19312
19313 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
19314 * lib/xalloc.h, lib/xmalloc.c: Update.
19315
19316 2001-01-19 Akim Demaille <akim@epita.fr>
19317
19318 Get rid of the ad hoc handling of token_buffer in the scanner: use
19319 the obstacks.
19320
19321 * src/lex.c (token_obstack): New.
19322 (init_lex): Initialize it. No longer call...
19323 (grow_token_buffer): this. Remove it.
19324 Adjust all the places which used it to use the obstack.
19325
19326 2001-01-19 Akim Demaille <akim@epita.fr>
19327
19328 * src/lex.h: Rename all the tokens:
19329 s/\bENDFILE\b/tok_eof/g;
19330 s/\bIDENTIFIER\b/tok_identifier/g;
19331 etc.
19332 Let them be enums, not #define, to ease debugging.
19333 Adjust all the code.
19334
19335 2001-01-18 Akim Demaille <akim@epita.fr>
19336
19337 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
19338 * src/lex.c (maxtoken, grow_token_buffer): Static.
19339
19340 2001-01-18 Akim Demaille <akim@epita.fr>
19341
19342 Since we now use obstacks, more % directives can be enabled.
19343
19344 * src/lex.c (percent_table): Also accept `%yacc',
19345 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
19346 `%debug'.
19347 Handle the actions for `%semantic_parser' and `%pure_parser' here,
19348 instead of returning a token.
19349 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
19350 * src/reader.c (read_declarations): Adjust.
19351 * src/files.c (open_files): Don't call `compute_base_names', don't
19352 compute `attrsfile' since they depend upon data which might be
19353 *in* the input file now.
19354 (output_files): Do it here.
19355 * src/output.c (output_headers): Document the fact that this patch
19356 introduces a guaranteed SEGV for semantic parsers.
19357 * doc/bison.texinfo: Document them.
19358 * tests/suite.at: Exercise these %options.
19359
19360 2000-12-20 Akim Demaille <akim@epita.fr>
19361
19362 Also handle the output file (--verbose) with obstacks.
19363
19364 * files.c (foutput): Remove.
19365 (output_obstack): New.
19366 Adjust all dependencies.
19367 * src/conflicts.c: Return a string.
19368 * src/system.h (obstack_grow_string): Rename as...
19369 (obstack_sgrow): this. Be ready to work with non literals.
19370 (obstack_fgrow4): New.
19371
19372 2000-12-20 Akim Demaille <akim@epita.fr>
19373
19374 * src/files.c (open_files): Fix the computation of short_base_name
19375 in the case of `-o foo.tab.c'.
19376
19377 2000-12-20 Akim Demaille <akim@epita.fr>
19378
19379 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
19380 (copy_dollar): Now that everything uses obstacks, get rid of the
19381 FILE * parameters.
19382
19383 2000-12-20 Akim Demaille <akim@epita.fr>
19384
19385 * src/files.c (open_files): Actually the `.output' file is based
19386 on the short_base_name, not base_name.
19387 * tests/suite.at (Checking output file names): Adjust.
19388
19389 2000-12-20 Akim Demaille <akim@epita.fr>
19390
19391 * src/bison.s1: Remove, we now use directly...
19392 * src/bison.simple: this.
19393 * src/Makefile.am: Use pkgdata instead of data.
19394
19395 2000-12-20 Akim Demaille <akim@epita.fr>
19396
19397 * src/files.c (guard_obstack): New.
19398 (open_files): Initialize it.
19399 (output_files): Dump it...
19400 * src/files.h: Export it.
19401 * src/reader.c (copy_guard): Use it.
19402
19403 2000-12-19 Akim Demaille <akim@epita.fr>
19404
19405 * src/files.c (outfile, defsfile, actfile): Removed as global
19406 vars.
19407 (open_files): Don't compute them.
19408 (output_files): Adjust.
19409 (base_name, short_base_name): Be global.
19410 Adjust dependencies.
19411
19412 2000-12-19 Akim Demaille <akim@epita.fr>
19413
19414 * src/files.c (strsuffix): New.
19415 (stringappend): Be just like strcat but allocate.
19416 (base_names): Eve out from open_files.
19417 Try to simplify the rather hairy computation of base_name and
19418 short_base_name.
19419 (open_files): Use it.
19420 * tests/suite.at (Checking output file names): New test.
19421
19422 2000-12-19 Akim Demaille <akim@epita.fr>
19423
19424 * src/system.h (obstack_grow_literal_string): Rename as...
19425 (obstack_grow_string): this.
19426 * src/output.c (output_parser): Recognize `%% actions' instead of
19427 `$'.
19428 * src/bison.s1: s/$/%% actions/.
19429 * src/bison.hairy: Likewise.
19430
19431 2000-12-19 Akim Demaille <akim@epita.fr>
19432
19433 * src/output.c (output_parser): Compute the `#line' lines when
19434 there are.
19435 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
19436 Suggested by Hans Aberg.
19437
19438 2000-12-19 Akim Demaille <akim@epita.fr>
19439
19440 Let the handling of the skeleton files be local to the procedures
19441 that use it.
19442
19443 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
19444 longer static.
19445 (fparser, open_extra_files): Remove.
19446 (open_files, output_files): Don't take care of fparser.
19447 * src/files.h: Adjust.
19448 * src/output.c (output_parser): Open and close the file to the
19449 skeleton.
19450 * src/reader.c (read_declarations): When %semantic_parser, open
19451 fguard.
19452
19453 2000-12-19 Akim Demaille <akim@epita.fr>
19454
19455 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
19456 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
19457
19458 2000-12-19 Akim Demaille <akim@epita.fr>
19459
19460 * src/files.c (open_files): Yipee! We no longer need all the code
19461 looking for `/tmp' since we have no tmp file.
19462
19463 2000-12-19 Akim Demaille <akim@epita.fr>
19464
19465 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
19466 New macros.
19467 * src/files.c (open_files): Less dependency on MSDOS etc.
19468
19469 2000-12-14 Akim Demaille <akim@epita.fr>
19470
19471 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
19472 Provide a default definition.
19473 Use it when executing the default @ action.
19474 * src/reader.c (reader_output_yylsp): No longer include
19475 `timestamp' and `text' in the default YYLTYPE.
19476
19477 2000-12-12 Akim Demaille <akim@epita.fr>
19478
19479 * src/reader.c (copy_definition, parse_union_decl, copy_action)
19480 (copy_guard): Quote the file names.
19481 Reported by Laurent Mascherpa.
19482
19483 2000-12-12 Akim Demaille <akim@epita.fr>
19484
19485 * src/output.c (output_headers, output_program, output): Be sure
19486 to escape special characters when outputting filenames.
19487 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
19488 (output_headers): Don't depend on them, Use ACTSTR.
19489
19490 2000-11-17 Akim Demaille <akim@epita.fr>
19491
19492 * lib/obstack.h: Formatting changes.
19493 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
19494 prevents type checking.
19495 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
19496 cast the value to (void *): assigning a `foo *' to a `void *'
19497 variable is valid.
19498 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
19499 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
19500 append characters.
19501
19502 2000-11-17 Akim Demaille <akim@epita.fr>
19503
19504 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
19505 as...
19506 (suite.m4, regression.m4, calc.m4): these.
19507 * tests/atgeneral.m4: Update from CVS Autoconf.
19508
19509 2000-11-17 Akim Demaille <akim@epita.fr>
19510
19511 * tests/regression.m4 (%union and --defines): New test,
19512 demonstrating a current bug in the obstack implementation.
19513
19514 2000-11-17 Akim Demaille <akim@epita.fr>
19515
19516 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
19517 macros.
19518 Use them to declare the variables which are global or local to
19519 `yyparse'.
19520
19521 2000-11-17 Akim Demaille <akim@epita.fr>
19522
19523 * acconfig.h: Remove, no longer used.
19524
19525 2000-11-07 Akim Demaille <akim@epita.fr>
19526
19527 * src: s/Copyright (C)/Copyright/g.
19528
19529 2000-11-07 Akim Demaille <akim@epita.fr>
19530
19531 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
19532 defining.
19533 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
19534
19535 2000-11-07 Akim Demaille <akim@epita.fr>
19536
19537 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
19538 Merge in a single CPP if/else.
19539
19540 2000-11-07 Akim Demaille <akim@epita.fr>
19541
19542 * src/output.c (output): Remove useless variables.
19543 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
19544 argument `data' for consistency with the prototypes.
19545 Qualify it `const'.
19546 (obstack_copy, obstack_copy0): Rename the second argument as
19547 `address' for consistency. Qualify it `const'.
19548 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
19549 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
19550 `const' their input argument (`data' or `address').
19551 Adjust the corresponding macros to include `const' in casts.
19552
19553 2000-11-03 Akim Demaille <akim@epita.fr>
19554
19555 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
19556 s/PFILE1/BISON_HAIRY/.
19557 Adjust dependencies.
19558
19559 2000-11-03 Akim Demaille <akim@epita.fr>
19560
19561 For some reason, this was not applied.
19562
19563 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19564 `unlink': it's no longer used.
19565
19566 2000-11-03 Akim Demaille <akim@epita.fr>
19567
19568 * src/files.c (skeleton_find): New function, eved out of...
19569 (open_files, open_extra_files): here.
19570
19571 2000-11-03 Akim Demaille <akim@epita.fr>
19572
19573 Don't use `atexit'.
19574
19575 * src/files.c (obstack_save): New function.
19576 (done): Rename as...
19577 (output_files): this.
19578 Use `obstack_save'.
19579 * src/main.c (main): Don't use `atexit' to register `done', since
19580 it no longer has to remove tmp files, just call `output_files'
19581 when there are no errors.
19582
19583 2000-11-02 Akim Demaille <akim@epita.fr>
19584
19585 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
19586 `unlink': it's no longer used.
19587 * src/files.h: Formatting changes.
19588
19589 2000-11-02 Akim Demaille <akim@epita.fr>
19590
19591 Remove the last uses of mktemp and unlink/delete.
19592
19593 * src/files.c (fdefines, ftable): Removed.
19594 (defines_ostack, table_obstack): New.
19595 Adjust dependencies of the former into uses of the latter.
19596 * src/output.c (output_short_or_char_table, output_short_table):
19597 Convert to using obstacks.
19598 * src/reader.c (copy_comment2): Accept one FILE * and two
19599 obstacks.
19600 (output_token_defines, reader_output_yylsp): Use obstacks.
19601 * src/system.h (obstack_fgrow3): New.
19602 * po/POTFILES.in: Adjust.
19603
19604 2000-11-01 Akim Demaille <akim@epita.fr>
19605
19606 Change each use of `fattrs' into a use of `attrs_obstack'.
19607
19608 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
19609 * src/files.c (fattrs): Remove.
19610 (attrs_obstack): New.
19611 Adjust all dependencies.
19612 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
19613
19614 2000-11-01 Akim Demaille <akim@epita.fr>
19615
19616 Introduce obstacks.
19617 Change each use of `faction' into a use of `action_obstack'.
19618
19619 * lib/obstack.h, lib/obstack.c: New files.
19620 * src/files.c (faction): Remove.
19621 (action_obstack): New.
19622 Adjust all dependencies.
19623
19624 2000-10-20 Akim Demaille <akim@epita.fr>
19625
19626 * lib/quote.h (PARAMS): New macro. Use it.
19627
19628 2000-10-16 Akim Demaille <akim@epita.fr>
19629
19630 * src/output.c (output_short_or_char_table): New function.
19631 (output_short_table, output_token_translations): Use it.
19632 (goto_actions): Use output_short_table.
19633
19634 2000-10-16 Akim Demaille <akim@epita.fr>
19635
19636 * src/symtab.c (bucket_new): New function.
19637 (getsym): Use it.
19638
19639 * src/output.c (output_short_table): New argument to display the
19640 comment associated with the table.
19641 Adjust dependencies.
19642 (output_gram): Use it.
19643 (output_rule_data): Nicer output layout for YYTNAME.
19644
19645 2000-10-16 Akim Demaille <akim@epita.fr>
19646
19647 * src/lex.c (read_typename): New function.
19648 (lex): Use it.
19649 * src/reader.c (copy_dollar): Likewise.
19650
19651 2000-10-16 Akim Demaille <akim@epita.fr>
19652
19653 * src/reader.c (copy_comment2): Expect the input stream to be on
19654 the `/' which is suspected to open a comment, instead of being
19655 called after `//' or `/*' was read.
19656 (copy_comment, copy_definition, parse_union_decl, copy_action)
19657 (copy_guard): Adjust.
19658
19659 2000-10-16 Akim Demaille <akim@epita.fr>
19660
19661 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
19662 `read_signed_integer'.
19663
19664 2000-10-16 Akim Demaille <akim@epita.fr>
19665
19666 * src/reader.c (copy_dollar): New function.
19667 (copy_guard, copy_action): Use it.
19668
19669 2000-10-16 Akim Demaille <akim@epita.fr>
19670
19671 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
19672 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
19673 New files, from Fileutils 4.0.27.
19674 * src/main.c (printable_version): Remove.
19675 * src/lex.c, src/reader.c: Use `quote'.
19676
19677 2000-10-04 Akim Demaille <akim@epita.fr>
19678
19679 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
19680
19681 2000-10-04 Akim Demaille <akim@epita.fr>
19682
19683 * doc/bison.texinfo: Various typos spotted by Neil Booth.
19684
19685 2000-10-04 Akim Demaille <akim@epita.fr>
19686
19687 When a literal string is used to define two different tokens,
19688 `bison -v' segfaults.
19689 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
19690
19691 * tests/regression.m4: New file.
19692 Include the core of the sample provided by Piotr Gackiewicz.
19693 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
19694 properly.
19695
19696 2000-10-04 Akim Demaille <akim@epita.fr>
19697
19698 * src/reader.c (parse_expect_decl): Keep `count' within the size
19699 of `buffer'.
19700 From Neil Booth.
19701
19702 2000-10-02 Paul Eggert <eggert@twinsun.com>
19703
19704 * bison.s1 (yyparse): Assign the default value
19705 unconditionally, to avoid a GCC warning and make the parser a
19706 tad smaller.
19707
19708 2000-10-02 Akim Demaille <akim@epita.fr>
19709
19710 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
19711 options.
19712
19713 2000-10-02 Akim Demaille <akim@epita.fr>
19714
19715 * src/derives.c, src/print.c, src/reduce.c: To ease the
19716 translation, move some `\n' out of the translated strings.
19717
19718 2000-10-02 Akim Demaille <akim@epita.fr>
19719
19720 The location tracking mechanism is precious for parse error
19721 messages. Nevertheless, it is enabled only when `@n' is used in
19722 the grammar, which is a different issue (you can use it in error
19723 message, but not in the grammar per se). Therefore, there should
19724 be another means to enable it.
19725
19726 * src/getargs.c (getargs): Support `--locations'.
19727 (usage): Report it.
19728 * src/getargs.h (locationsflag): Export it.
19729 * src/lex.c (percent_table): Support `%locations'.
19730 * src/reader.c (yylsp_needed): Remove this variable, now replaced
19731 with `locationsflag'.
19732 * doc/bison.texinfo: Document `--locations' and `%locations'.
19733 Sort the options.
19734 * tests/calc.m4: Test it.
19735
19736 For regularity of the names, replace each
19737 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
19738 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
19739 In addition replace each `flag' with `_flag'.
19740
19741 2000-10-02 Akim Demaille <akim@epita.fr>
19742
19743 Also test parse error messages, including with YYERROR_VERBOSE.
19744
19745 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
19746 associative).
19747 Use it to check the computations.
19748 Use it to check `nonassoc' is honored.
19749 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
19750 `--yyerror-verbose'.
19751 (_AT_CHECK_CALC): Adjust to this option.
19752 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
19753
19754 2000-10-02 Akim Demaille <akim@epita.fr>
19755
19756 Test also `--verbose', `--defines' and `--name-prefix'. Testing
19757 the latter demonstrates a flaw in the handling of non debugging
19758 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
19759 was used in order to simplify:
19760
19761 #if YYDEBUG
19762 if (yydebug)
19763 {
19764 ...
19765 }
19766 #endif
19767
19768 into
19769
19770 if (yydebug)
19771 {
19772 ...
19773 }
19774
19775 unfortunately this leads to a CPP conflict when
19776 `--name-prefix=foo' is used since it produces `#define yydebug
19777 foodebug'.
19778
19779 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19780 (YYDPRINTF): New macro.
19781 Spread its use.
19782 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19783 the bison options.
19784 Also test `--verbose', `--defines' and `--name-prefix'.
19785
19786 2000-10-02 Akim Demaille <akim@epita.fr>
19787
19788 Improve the readability of the produced parsers.
19789
19790 * src/bison.s1: Formatting changes.
19791 Improve the comment related to the `$' mark.
19792 (yydefault): Don't fall through to `yyresume': `goto' there.
19793 * src/output.c (output_parser): When the `$' is met, skip the end
19794 of its line.
19795 New variable, `number_of_dollar_signs', to check there's exactly
19796 one `$' in the parser skeleton.
19797
19798 2000-10-02 Akim Demaille <akim@epita.fr>
19799
19800 * lib/xstrdup.c: New file, from the fileutils.
19801 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19802 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19803 instead of strlen + xmalloc + strcpy.
19804 * src/symtab.c (copys): Remove, use xstrdup instead.
19805
19806 2000-10-02 Akim Demaille <akim@epita.fr>
19807
19808 * src/gram.h (associativity): New enum type which replaces the
19809 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19810 `right_assoc', `left_assoc' and `non_assoc'.
19811 Adjust all dependencies.
19812 * src/reader.c: Formatting changes.
19813 (LTYPESTR): Don't define it, use it as a literal in
19814 `reader_output_yylsp'.
19815 * src/symtab.h (symbol_class): New enum type which replaces the
19816 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19817 `sunknown', `stoken and `snterm'.
19818
19819 2000-10-02 Akim Demaille <akim@epita.fr>
19820
19821 * src/getargs.c (fixed_outfiles): Rename as...
19822 (yaccflag): for consistency and accuracy.
19823 Adjust dependencies.
19824
19825 2000-10-02 Akim Demaille <akim@epita.fr>
19826
19827 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19828 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19829 difficult and introduced a lot of core dump. It turns out that
19830 Bison used an implementation of `xmalloc' based on `calloc', and
19831 at various places it does depend upon the initialization to 0. I
19832 have not tried to isolate the pertinent places, and all the former
19833 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19834 someone should address this issue.
19835
19836 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19837 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19838 files.
19839 Adjust dependencies.
19840 * src/warshall.h: New file.
19841 Propagate.
19842
19843 2000-10-02 Akim Demaille <akim@epita.fr>
19844
19845 Various anti-`extern in *.c' changes.
19846
19847 * src/system.h: Include `assert.h'.
19848
19849 2000-10-02 Akim Demaille <akim@epita.fr>
19850
19851 * src/state.h (nstates, final_state, first_state, first_shift)
19852 (first_reduction): Move their exportation from here...
19853 * src/LR0.h: to here.
19854 Adjust dependencies.
19855 * src/getargs.c (statisticsflag): New variable.
19856 Add support for `--statistics'.
19857 Adjust dependencies.
19858
19859 Remove a lot of now useless `extern' statements in most files.
19860
19861 2000-10-02 Akim Demaille <akim@epita.fr>
19862
19863 * src/LR0.h: New file.
19864 Propagate its use.
19865
19866 2000-10-02 Akim Demaille <akim@epita.fr>
19867
19868 * src/print.h: New file.
19869 Propagate its use.
19870 * src/print.c: Formatting and ordering changes.
19871 (verbose, terse): Replace with...
19872 (print_results): this new function.
19873 Adjust dependencies.
19874
19875 2000-10-02 Akim Demaille <akim@epita.fr>
19876
19877 * src/conflicts.c (conflict_report): New function.
19878 (conflict_log, verbose_conflict_log): Replace with...
19879 (print_conflicts): this function.
19880 Adjust dependencies.
19881 * src/conflicts.h: New file.
19882 Propagate its inclusion.
19883
19884 2000-10-02 Akim Demaille <akim@epita.fr>
19885
19886 * src/nullable.h: New file.
19887 Propagate its inclusion.
19888 * src/nullable.c: Formatting changes.
19889
19890 2000-10-02 Akim Demaille <akim@epita.fr>
19891
19892 * src/reduce.h: New file.
19893 Propagate its inclusion.
19894 * src/reduce.c: Topological sort and other formatting changes.
19895 (bool, TRUE, FALSE): Move their definition to...
19896 * src/system.h: here.
19897
19898 2000-10-02 Akim Demaille <akim@epita.fr>
19899
19900 * src/files.c: Formatting changes.
19901 (tryopen, tryclose, openfiles): Rename as...
19902 (xfopen, xfclose, open_files): this.
19903 (stringappend): static.
19904 * src/files.h: Complete the list of exported symbols.
19905 Propagate its use.
19906
19907 2000-10-02 Akim Demaille <akim@epita.fr>
19908
19909 * src/reader.h: New file.
19910 Propagate its use instead of tedious list of `extern' and
19911 prototypes.
19912 * src/reader.c: Formatting changes, topological sort,
19913 s/register//.
19914
19915 2000-10-02 Akim Demaille <akim@epita.fr>
19916
19917 * src/lex.h: Prototype `lex.c' exported functions.
19918 * src/reader.c: Adjust.
19919 * src/lex.c: Formatting changes.
19920 (safegetc): Rename as...
19921 (xgetc): this.
19922
19923 2000-10-02 Akim Demaille <akim@epita.fr>
19924
19925 * src/lalr.h: New file.
19926 Propagate its inclusion instead of prototypes and `extern'.
19927 * src/lalr.c: Formatting changes, topological sorting etc.
19928
19929 2000-10-02 Akim Demaille <akim@epita.fr>
19930
19931 * src/output.c (token_actions): Introduce a temporary array,
19932 YYDEFACT, that makes it possible for this function to use
19933 output_short_table.
19934
19935 2000-10-02 Akim Demaille <akim@epita.fr>
19936
19937 `user_toknums' is output as a `short[]' in `output.c', while it is
19938 defined as a `int[]' in `reader.c'. For consistency with the
19939 other output tables, `user_toknums' is now defined as a table of
19940 shorts.
19941
19942 * src/reader.c (user_toknums): Be a short table instead of an int
19943 table.
19944 Adjust dependencies.
19945
19946 Factor the short table outputs.
19947
19948 * src/output.c (output_short_table): New function.
19949 * src/output.c (output_gram, output_stos, output_rule_data)
19950 (output_base, output_table, output_check): Use it.
19951
19952 2000-10-02 Akim Demaille <akim@epita.fr>
19953
19954 * src/output.c (output): Topological sort of the functions, in
19955 order to get rid of the `static' prototypes.
19956 No longer use `register'.
19957 * src/output.h: New file.
19958 Propagate its inclusion in files explicitly prototyping functions
19959 from output.c.
19960
19961 2000-09-21 Akim Demaille <akim@epita.fr>
19962
19963 * src/atgeneral.m4: Update from Autoconf.
19964
19965 2000-09-21 Akim Demaille <akim@epita.fr>
19966
19967 * src/closure.h: New file.
19968 * src/closure.c: Formatting changes, topological sort over the
19969 functions, use of closure.h.
19970 (initialize_closure, finalize_closure): Rename as...
19971 (new_closure, free_closure): these. Adjust dependencies.
19972 * src/LR0.c: Formatting changes, topological sort, use of
19973 cloture.h.
19974 (initialize_states): Rename as...
19975 (new_states): this.
19976 * src/Makefile.am (noinst_HEADERS): Adjust.
19977
19978 2000-09-20 Akim Demaille <akim@epita.fr>
19979
19980 * src/acconfig.h: Don't protect config.h against multiple
19981 inclusion.
19982 Don't define PARAMS.
19983 * src/system.h: Define PARAMS.
19984 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19985 purpose of config.h. system.h must not try to fix wrong
19986 definitions in config.h.
19987
19988 2000-09-20 Akim Demaille <akim@epita.fr>
19989
19990 * src/derives.h: New file.
19991 * src/main.c, src/derives.h: Use it.
19992 Formatting changes.
19993 * src/Makefile.am (noinst_HEADERS): Adjust.
19994
19995 2000-09-20 Akim Demaille <akim@epita.fr>
19996
19997 * tests/atgeneral.m4: Update from Autoconf.
19998 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19999 (AT_CHECK_CALC): New macros.
20000 Use these macros to test bison with options `', `--raw',
20001 `--debug', `--yacc', `--yacc --debug'.
20002
20003 2000-09-19 Akim Demaille <akim@epita.fr>
20004
20005 * src/output.c: Formatting changes.
20006 * src/machine.h: Remove, leaving its contents in...
20007 * src/system.h: here.
20008 Include stdio.h.
20009 Adjust all dependencies on stdio.h and machine.h.
20010 * src/getargs.h: New file.
20011 Let all `extern' declarations about getargs.c be replaced with
20012 inclusion of `getargs.h'.
20013 * src/Makefile.am (noinst_HEADERS): Adjust.
20014
20015 * tests/calc.m4 (yyin): Be initialized in main, not on the global
20016 scope.
20017 (yyerror): Returns void, not int.
20018 * doc/bison.texinfo: Formatting changes.
20019
20020 2000-09-19 Akim Demaille <akim@epita.fr>
20021
20022 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
20023 portable.
20024
20025 2000-09-18 Akim Demaille <akim@epita.fr>
20026
20027 * configure.in: Append WARNING_CFLAGS to CFLAGS.
20028 * src/Makefile.am (INCLUDES): Don't.
20029 Be ready to fetch headers in lib/.
20030
20031 2000-09-18 Akim Demaille <akim@epita.fr>
20032
20033 * doc/bison.texinfo: Update the copyright.
20034 ANSIfy and GNUify the examples.
20035 Remove the old menu.
20036
20037 2000-09-18 Akim Demaille <akim@epita.fr>
20038
20039 First set of tests: use the `calc' example from the documentation.
20040
20041 * src/bison.s1 (yyparse): Condition the code using `yytname' which
20042 is defined only when YYDEBUG is.
20043 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
20044 * src/files.c (tryopen, tryclose): Formatting changes.
20045 Move to the top and be static.
20046 * src/reader.c (read_signed_integer): Likewise.
20047 * tests/calc.m4: New file.
20048 * Makefile.am, suite.m4: Adjust.
20049 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
20050
20051 2000-09-18 Akim Demaille <akim@epita.fr>
20052
20053 Add support for an Autotest test suite for Bison.
20054
20055 * m4/m4.m4, m4/atconfig.m4: New files.
20056 * m4/Makefile.am (EXTRA_DIST): Adjust.
20057 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
20058 files.
20059 * src/getargs.c: Display a more standard --version message.
20060 * src/reader.c (reader): Formatting changes.
20061 No longer depend upon VERSION_STRING.
20062 * configure.in: No longer use `dnl'.
20063 Set up the test suite and the new directory `tests/.
20064 (VERSION_STRING): Remove.
20065
20066 2000-04-14 Akim Demaille <akim@epita.fr>
20067
20068 * src/reader.c (copy_comment2): New function, same as former
20069 `copy_comment', but outputs into two FILE *.
20070 (copy_comment): Use it.
20071 (parse_union_decl): Use it.
20072 (get_type, parse_start_decl): Use the same `invalid' message.
20073 (parse_start_decl, parse_union_decl): Use the same `multiple'
20074 message.
20075 (parse_union_decl, copy_guard, copy_action): Use the same
20076 `unmatched' message.
20077 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
20078
20079 2000-03-31 Akim Demaille <akim@epita.fr>
20080
20081 * src/files.c (tryopen, tryclose): Move to the top.
20082 Be static.
20083
20084 2000-03-31 Akim Demaille <akim@epita.fr>
20085
20086 * src/main.c (main): Don't call `done', exit does it.
20087
20088 2000-03-31 Akim Demaille <akim@epita.fr>
20089
20090 * allocate.c: s/return (foo)/return foo/.
20091 * lalr.c: Likewise.
20092 * LR0.c: Likewise.
20093 * output.c: Likewise.
20094 * reader.c: Likewise.
20095 * symtab.c: Likewise.
20096 * vmsgetargs.c: Likewise.
20097
20098 2000-03-31 Akim Demaille <akim@epita.fr>
20099
20100 Clean up the error reporting functions.
20101
20102 * src/report.c: New file.
20103 * src/report.h: Likewise.
20104 * src/Makefile.am: Adjust.
20105 * m4/error.m4: New file.
20106 * m4/Makefile.am: Adjust.
20107 * configure.in (jm_PREREQ_ERROR): Call it.
20108 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
20109 Remove.
20110 (fatal, fatals): Remove. All callers use complain.c::fatal.
20111 (warn, warni, warns, warnss, warnss): Remove. All callers use
20112 complain.c::complain.
20113 (toomany): Remove, use fatal instead.
20114 * src/files.c (done): No argument, use complain_message_count.
20115 * src/main.c (main): Register `done' to `atexit'.
20116
20117 * src/getargs.c (usage): More `fputs', less `fprintf'.
20118
20119 2000-03-28 Akim Demaille <akim@epita.fr>
20120
20121 * lib/: New directory.
20122 * Makefile.am (SUBDIRS): Adjust.
20123 * configure.in: Adjust.
20124 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
20125 useless.
20126 * src/alloca.c: Moved to lib/.
20127 * src/getopt.c: Likewise.
20128 * src/getopt1.c: Likewise.
20129 * src/getopt.h: Likewise.
20130 * src/ansi2knr.c: Likewise.
20131 * src/ansi2knr.1: Likewise.
20132 * src/Makefile.am: Adjust.
20133 * lib/Makefile.am: New file.
20134
20135 2000-03-28 Akim Demaille <akim@epita.fr>
20136
20137 * src/getargs.c (usage): Refresh the help message.
20138
20139 2000-03-17 Akim Demaille <akim@epita.fr>
20140
20141 * src/getopt1.c: Updated from textutils 2.0e
20142 * src/getopt.c: Likewise.
20143 * src/getopt.h: Likewise.
20144
20145 2000-03-17 Akim Demaille <akim@epita.fr>
20146
20147 * src/Makefile.am (bison.simple): Fix the awk program: quote only
20148 the file name, not the whole `#line LINE FILE'.
20149
20150 2000-03-17 Akim Demaille <akim@epita.fr>
20151
20152 On syntax errors, report the token on which we choked.
20153
20154 * src/bison.s1 (yyparse): In the label yyerrlab, when
20155 YYERROR_VERBOSE, add yychar in msg.
20156
20157 2000-03-17 Akim Demaille <akim@epita.fr>
20158
20159 * src/reader.c (copy_at): New function.
20160 (copy_guard): Use it.
20161 (copy_action): Use it.
20162
20163 2000-03-17 Akim Demaille <akim@epita.fr>
20164
20165 Be kind to translators, save some useless translations.
20166
20167 * src/main.c (banner): New function.
20168 (fatal_banner): Use it.
20169 (warn_banner): Use it.
20170
20171 2000-03-17 Akim Demaille <akim@epita.fr>
20172
20173 * src/reader.c (copy_definition): Use copy_string and
20174 copy_comment. Removed now unused `match', `ended',
20175 `cplus_comment'.
20176 (copy_comment, copy_string): Moved, to be visible from
20177 copy_definition.
20178
20179 2000-03-17 Akim Demaille <akim@epita.fr>
20180
20181 * src/reader.c (copy_string): Declare `static inline'. No
20182 problems with inline, since it is checked by configure.
20183 (copy_comment): Likewise.
20184
20185 2000-03-17 Akim Demaille <akim@epita.fr>
20186
20187 * src/reader.c (packsymbols): Formatting changes.
20188
20189 2000-03-17 Akim Demaille <akim@epita.fr>
20190
20191 * src/reader.c (copy_comment): New function, factored out from:
20192 (copy_action): Use it. Removed now unused `match', `ended',
20193 `cplus_comment'.
20194 (copy_guard): Likewise.
20195
20196 2000-03-17 Akim Demaille <akim@epita.fr>
20197
20198 * src/reader.c (copy_string): New function, factored out from:
20199 (copy_action): Use it.
20200 (copy_guard): Likewise.
20201
20202 2000-03-17 Akim Demaille <akim@epita.fr>
20203
20204 Change the handling of @s so that they behave exactly like $s.
20205 There is now a pseudo variable @$ (readble and writable), location
20206 of the lhs of the rule (by default ranging from the location of
20207 the first symbol of the rhs, to the location of the last symbol,
20208 or, if the rhs is empty, YYLLOC).
20209
20210 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
20211 yyval.
20212 (yyparse): When providing a default semantic action, provide a
20213 default location action.
20214 (after the $): No longer change `*YYLSP', just stack YYLOC the
20215 same way you stack YYVAL.
20216 * src/reader.c (read_declarations): Use warns.
20217 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
20218 (copy_action, case '@'): Likewise.
20219 Use a standard error message, to save useless work from
20220 translators.
20221
20222 2000-03-17 Akim Demaille <akim@epita.fr>
20223
20224 * src/bison.s1: Formatting and cosmetics changes.
20225 * src/reader.c: Likewise.
20226 Update the Copyright notice.
20227
20228 2000-03-17 Akim Demaille <akim@epita.fr>
20229
20230 * src/bison.s1 (#line): All set to `#line' only, since the
20231 Makefile now handles them.
20232
20233 2000-03-16 Akim Demaille <akim@epita.fr>
20234
20235 * src/output.c (output_rule_data): Output the documentation of
20236 some of the tables.
20237 (Copyright notice): Update.
20238 Formatting changes.
20239
20240 2000-03-16 Akim Demaille <akim@epita.fr>
20241
20242 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
20243 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
20244 One `#if YYDEBUG' remains, since it uses variables which are
20245 defined only if `YYDEBUG != 0'.
20246
20247 2000-03-16 Akim Demaille <akim@epita.fr>
20248
20249 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
20250 and related variables so that the similarities are highlighted.
20251
20252 2000-03-16 Akim Demaille <akim@epita.fr>
20253
20254 * src/bison.s1: Properly indent CPP directives.
20255
20256 2000-03-16 Akim Demaille <akim@epita.fr>
20257
20258 * src/bison.s1: Properly indent the `alloca' CPP section.
20259
20260 2000-03-16 Akim Demaille <akim@epita.fr>
20261
20262 Do not hard code values of directories in `configure.in'.
20263 Update the `configure' tool chain.
20264
20265 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
20266 src/makefile.am.
20267 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
20268 (AC_OUTPUT): Add m4/Makefile.
20269 Bump to bison 1.28a, 1.29 has never been released.
20270 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
20271 handled via src/Makefile.am.
20272 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
20273 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
20274 autoheader.
20275 * Makefile.am (SUBDIRS): Add m4.
20276 (ACLOCAL_AM_FLAGS): New variable.
20277 (AUTOMAKE_OPTIONS): Add check-news.
20278 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
20279 the proper line number and file name.
20280 (DEFS): Propagate the location of bison library files and of the
20281 locale files.
20282 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
20283 builddir.
20284 * acinclude.m4: Remove, replaced by the directory m4.
20285 * m4/Makefile.am (EXTRA_DIST): New variable.
20286 * m4/gettext.m4: New file, from the fileutils.
20287 * m4/lcmessage.m4: Likewise
20288 * m4/progtest.m4: Likewise.
20289 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
20290
20291 2000-03-10 Akim Demaille <akim@epita.fr>
20292
20293 * src/closure.c:
20294 Formatting changes of various comments.
20295 Respect the GNU coding standards at various places.
20296 Don't use `_()' when no translation is needed.
20297
20298 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20299
20300 * src/files.c:
20301 OS/2 honors TMPDIR environment variable.
20302
20303 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20304
20305 * doc/bison.texinfo: Tweaked spelling and grammar.
20306 Updated ISBN.
20307 Removed reference to price of printed copy.
20308 Mention BISON_SIMPLE and BISON_HAIRY.
20309
20310 1999-12-13 Jesse Thilo <jthilo@gnu.org>
20311
20312 * configure.in, NEWS:
20313 Bison 1.29 released.
20314
20315 1999-10-27 Jesse Thilo <jthilo@gnu.org>
20316
20317 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
20318 Added reference card.
20319
20320 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20321
20322 * po/ru.po: Added Russian translation.
20323
20324 1999-07-26 Jesse Thilo <jthilo@gnu.org>
20325
20326 * configure.in: Added Russian translation.
20327
20328 1999-07-06 Jesse Thilo <jthilo@gnu.org>
20329
20330 * configure.in, NEWS, README:
20331 Released version 1.28.
20332
20333 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20334
20335 * src/system.h:
20336 Squashed redefinition warning on some systems.
20337
20338 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
20339 Have configure build version string instead of relying on ANSI string
20340 concatentation.
20341
20342 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20343
20344 * po/POTFILES.in: Got rid of version.c.
20345
20346 1999-06-14 Jesse Thilo <jthilo@gnu.org>
20347
20348 * acconfig.h, configure.in:
20349 Have configure build version string instead of relying on ANSI string
20350 concatentation.
20351
20352 1999-06-08 Jesse Thilo <jthilo@gnu.org>
20353
20354 * doc/bison.1:
20355 Dropped mention of `+' for long-named options.
20356
20357 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20358
20359 * src/files.c: Added <unistd.h> for unlink().
20360
20361 * src/Makefile.am, src/system.h:
20362 I18n fixes.
20363
20364 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20365
20366 * README: Added a FAQ list.
20367
20368 * configure.in, acconfig.h:
20369 I18n fixes.
20370
20371 1999-05-30 Jesse Thilo <jthilo@gnu.org>
20372
20373 * doc/FAQ, doc/Makefile.am:
20374 Added a FAQ list.
20375
20376 1999-05-19 Jesse Thilo <jthilo@gnu.org>
20377
20378 * src/alloc.h, src/symtab.h, src/version.c:
20379 Protected inclusion of "config.h" with HAVE_CONFIG_H.
20380
20381 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20382
20383 * src/.cvsignore, src/Makefile.am:
20384 Reorganized: sources in `src', documentation in `doc'.
20385
20386 * src/lex.c (literalchar):
20387 fixed the code for escaping double quotes (thanks
20388 Jonathan Czisny.)
20389
20390 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20391
20392 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
20393 Adjusted paths to reflect directory reorganization.
20394
20395 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20396
20397 * doc/.cvsignore, doc/Makefile.am:
20398 Reorganized: sources in `src', documentation in `doc'.
20399
20400 1999-04-18 Jesse Thilo <jthilo@gnu.org>
20401
20402 * configure.in:
20403 Updated AC_INIT file to reflect directory reorganization.
20404
20405 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
20406 Reorganized: sources in `src', documentation in `doc'.
20407
20408 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20409
20410 * src/allocate.c:
20411 Don't declare calloc() and realloc() if not necessary.
20412
20413 1999-04-13 Jesse Thilo <jthilo@gnu.org>
20414
20415 * configure.in, acconfig.h, acinclude.m4:
20416 Don't declare calloc() and realloc() if not necessary.
20417
20418 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20419
20420 * po/.cvsignore: Added i18n support.
20421
20422 1999-03-23 Jesse Thilo <jthilo@gnu.org>
20423
20424 * acconfig.h, configure.in, Makefile.am:
20425 Added i18n support.
20426
20427 1999-03-22 Jesse Thilo <jthilo@gnu.org>
20428
20429 * src/bison.s1: Fixed #line numbers.
20430
20431 1999-03-15 Jesse Thilo <jthilo@gnu.org>
20432
20433 * po/es.po, po/fr.po, po/nl.po, po/de.po:
20434 Added PO files from Translation Project.
20435
20436 1999-03-03 Jesse Thilo <jthilo@gnu.org>
20437
20438 * Makefile.am:
20439 Added support for non-ANSI compilers (ansi2knr).
20440
20441 1999-02-16 Jesse Thilo <jthilo@gnu.org>
20442
20443 * configure.in: Bumped version number to 1.27.
20444
20445 * Makefile.am:
20446 Added `bison.simple' to list of files removed by `make distclean'.
20447
20448 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20449
20450 * src/files.c, src/files.h:
20451 Defined locations of parser files in config.h instead of Makefile.
20452
20453 1999-02-12 Jesse Thilo <jthilo@gnu.org>
20454
20455 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
20456 Defined locations of parser files in config.h instead of Makefile.
20457
20458 1999-02-09 Jesse Thilo <jthilo@gnu.org>
20459
20460 * Makefile.am:
20461 Removed inappropriate use of $< macro.
20462
20463 1999-02-05 Jesse Thilo <jthilo@gnu.org>
20464
20465 * po/Makefile.in.in, po/POTFILES.in:
20466 Add `po' directory skeleton.
20467
20468 1999-01-27 Jesse Thilo <jthilo@gnu.org>
20469
20470 * README: Document help-bison list.
20471
20472 * configure.in: Add check for mkstemp().
20473
20474 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20475
20476 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
20477 Hush a few compiler warnings.
20478
20479 * src/files.c:
20480 Add tryclose(), which verifies that fclose was successful.
20481 Hush a couple of compiler warnings.
20482
20483 1999-01-20 Jesse Thilo <jthilo@gnu.org>
20484
20485 * Makefile.am, OChangeLog:
20486 ChangeLog is now automatically generated. Include the old version as
20487 OChangeLog.
20488
20489 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20490
20491 * 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:
20492 Update FSF address.
20493
20494 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20495
20496 * doc/bison.texinfo: Fix formatting glitch.
20497
20498 * doc/bison.texinfo: Update FSF address.
20499
20500 1999-01-14 Jesse Thilo <jthilo@gnu.org>
20501
20502 * acconfig.h: Update FSF address.
20503
20504 1999-01-08 Jesse Thilo <jthilo@gnu.org>
20505
20506 * src/system.h:
20507 Don't define PACKAGE here, since config.h defines it.
20508
20509 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20510
20511 * src/reader.c: Update copyright date.
20512
20513 * src/main.c:
20514 Ditch sprintf to statically-sized buffers in fatal/warn functions in
20515 favor of output directly to stderr (avoids buffer overruns).
20516
20517 * src/reader.c: Some checks for premature EOF.
20518
20519 * 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:
20520 Use prototypes if the compiler understands them.
20521
20522 * src/files.c: Honor TMPDIR on Unix hosts.
20523 Use prototypes if the compiler understands them.
20524
20525 * src/reader.c:
20526 Fix a couple of buffer overrun bugs.
20527 Use prototypes if the compiler understands them.
20528
20529 * src/system.h: Include unistd.h and ctype.h.
20530 Use #ifdef instead of #if for NLS symbols.
20531
20532 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20533
20534 * doc/bison.texinfo:
20535 Delete comment "consider using @set for edition number, etc..." since
20536 we now are doing so.
20537
20538 1998-12-30 Jesse Thilo <jthilo@gnu.org>
20539
20540 * configure.in:
20541 Use prototypes if the compiler understands them.
20542
20543 * NEWS: Document 1.26 highlights.
20544
20545 * Makefile.am: Require Automake 1.3 or later.
20546
20547 * acconfig.h:
20548 Use prototypes if the compiler understands them.
20549
20550 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20551
20552 * src/version.c:
20553 Use VERSION symbol from automake for version number.
20554
20555 1998-12-29 Jesse Thilo <jthilo@gnu.org>
20556
20557 * acconfig.h, configure.in, version.cin:
20558 Use VERSION symbol from automake for version number.
20559
20560 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20561
20562 * Makefile.am:
20563 Distribute original version of simple parser (bison.s1), not built
20564 version (bison.simple).
20565
20566 1998-11-28 Jesse Thilo <jthilo@gnu.org>
20567
20568 * doc/bison.texinfo: Add info dir entry.
20569
20570 * doc/bison.texinfo:
20571 Let automake put version number into documentation.
20572
20573 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20574
20575 * src/bison.cld, src/build.com, src/vmshlp.mar:
20576 Add non-RCS files from /gd/gnu/bison.
20577
20578 1998-11-26 Jesse Thilo <jthilo@gnu.org>
20579
20580 * doc/bison.1:
20581 Document the BISON_HAIRY and BISON_SIMPLE variables.
20582
20583 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20584
20585 * src/version.c: Build version.c automatically.
20586
20587 * src/reader.c:
20588 Fix token numbering (used to start at 258, not 257).
20589
20590 * src/system.h: Include config.h.
20591
20592 * src/getargs.c: Update bug report address.
20593
20594 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
20595 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
20596
20597 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20598
20599 * Makefile.am:
20600 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20601
20602 * configure.in, version.cin:
20603 Build version.c automatically.
20604
20605 * AUTHORS: Add AUTHORS file.
20606
20607 * README: Update bug report address.
20608
20609 * bison.simple:
20610 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
20611
20612 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
20613 Add automake stuff.
20614
20615 1998-11-25 Jesse Thilo <jthilo@gnu.org>
20616
20617 * doc/bison.texinfo: Clean up some formatting.
20618
20619 1998-05-05 Richard Stallman <rms@gnu.org>
20620
20621 * doc/bison.texinfo:
20622 Explain better why to make a pure parser.
20623
20624 1998-01-05 Richard Stallman <rms@gnu.org>
20625
20626 * src/files.c (openfiles):
20627 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
20628 find a temporary directory, if possible. Do not unlink files while
20629 they are open.
20630
20631 1997-08-25 Richard Stallman <rms@gnu.org>
20632
20633 * src/reader.c (stack_offset;):
20634 Change some warni to warns.
20635
20636 * src/lex.c (literalchar): Use warns, not warni.
20637
20638 1997-06-28 Richard Stallman <rms@gnu.org>
20639
20640 * src/bison.s1: Add a Bison version comment.
20641
20642 * src/main.c (fatal, warn, berror):
20643 Use program_name.
20644
20645 1997-06-28 Richard Stallman <rms@gnu.org>
20646
20647 * Makefile.in (bison_version): New variable.
20648 (dist): Use that variable.
20649 (bison.s1): Substitute the Bison version into bison.simple.
20650
20651 * bison.simple: Add a Bison version comment.
20652
20653 1997-06-18 Richard Stallman <rms@gnu.org>
20654
20655 * src/main.c (fatal, warn, berror):
20656 Make error messages standard.
20657 (toomany): Improve error message text.
20658
20659 * 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:
20660 new.h renamed to alloc.h.
20661
20662 1997-06-18 Richard Stallman <rms@gnu.org>
20663
20664 * Makefile.in: new.h renamed to alloc.h.
20665
20666 1997-05-24 Richard Stallman <rms@gnu.org>
20667
20668 * src/lex.c (literalchar):
20669 Fix the code for escaping \, " and '.
20670
20671 (lex): Avoid trouble when there are many chars
20672 to discard in a char literal with just several chars in it.
20673
20674 1997-05-17 Richard Stallman <rms@gnu.org>
20675
20676 * src/bison.s1:
20677 Use malloc, if using alloca is troublesome.
20678 (YYSTACK_USE_ALLOCA): New flag macro.
20679 Define it for some systems and compilers.
20680 (YYSTACK_ALLOC): New macro.
20681 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20682 If it was malloc'd, free it.
20683
20684 1997-05-17 Richard Stallman <rms@gnu.org>
20685
20686 * bison.simple:
20687 Use malloc, if using alloca is troublesome.
20688 (YYSTACK_USE_ALLOCA): New flag macro.
20689 Define it for some systems and compilers.
20690 (YYSTACK_ALLOC): New macro.
20691 (yyparse): Use YYSTACK_ALLOC to allocate stack.
20692 If it was malloc'd, free it.
20693
20694 1997-04-23 Richard Stallman <rms@gnu.org>
20695
20696 * src/bison.s1:
20697 (alloca) [__hpux]: Always define as __builtin_alloca.
20698
20699 1997-04-23 Richard Stallman <rms@gnu.org>
20700
20701 * bison.simple:
20702 (alloca) [__hpux]: Always define as __builtin_alloca.
20703
20704 1997-04-22 Richard Stallman <rms@gnu.org>
20705
20706 * src/bison.s1:
20707 [__hpux]: Include alloca.h (right for HPUX 10)
20708 instead of declaring alloca (right for HPUX 9).
20709
20710 * src/bison.s1 (__yy_memcpy):
20711 Declare arg `count' as unsigned int.
20712 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20713
20714 1997-04-22 Richard Stallman <rms@gnu.org>
20715
20716 * bison.simple:
20717 [__hpux]: Include alloca.h (right for HPUX 10)
20718 instead of declaring alloca (right for HPUX 9).
20719
20720 * bison.simple (__yy_memcpy):
20721 Declare arg `count' as unsigned int.
20722 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
20723
20724 1997-01-03 Richard Stallman <rms@gnu.org>
20725
20726 * src/allocate.c: [__STDC__ or _MSC_VER]:
20727 Declare calloc and realloc to return void *.
20728
20729 1997-01-02 Richard Stallman <rms@gnu.org>
20730
20731 * src/system.h:
20732 [_MSC_VER]: Include stdlib.h and process.h.
20733 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
20734
20735 * src/main.c (main): Return FAILURE as a value.
20736 (printable_version): Declare arg as int, not char.
20737
20738 1997-01-02 Richard Stallman <rms@gnu.org>
20739
20740 * Makefile.in (dist):
20741 Explicitly check for symlinks, and copy them.
20742
20743 1996-12-19 Richard Stallman <rms@gnu.org>
20744
20745 * src/files.c:
20746 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
20747
20748 1996-12-18 Paul Eggert <eggert@gnu.org>
20749
20750 * src/bison.s1 (yyparse):
20751 If __GNUC__ and YYPARSE_PARAM are both defined,
20752 declare yyparse to have a void * argument.
20753
20754 1996-12-18 Paul Eggert <eggert@gnu.org>
20755
20756 * bison.simple (yyparse):
20757 If __GNUC__ and YYPARSE_PARAM are both defined,
20758 declare yyparse to have a void * argument.
20759
20760 1996-12-17 Richard Stallman <rms@gnu.org>
20761
20762 * src/reduce.c (nbits): Add some casts.
20763
20764 1996-08-12 Richard Stallman <rms@gnu.org>
20765
20766 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
20767
20768 1996-08-12 Richard Stallman <rms@gnu.org>
20769
20770 * bison.simple: Test _MSDOS as well as _MSDOS_.
20771
20772 1996-07-31 Richard Stallman <rms@gnu.org>
20773
20774 * src/bison.s1:
20775 [__sun && __i386]: Include alloca.h.
20776
20777 1996-07-31 Richard Stallman <rms@gnu.org>
20778
20779 * bison.simple:
20780 [__sun && __i386]: Include alloca.h.
20781
20782 1996-07-30 Richard Stallman <rms@gnu.org>
20783
20784 * src/bison.s1: Comment change.
20785
20786 * src/bison.s1: Test _MSDOS_, not MSDOS.
20787
20788 1996-07-30 Richard Stallman <rms@gnu.org>
20789
20790 * bison.simple: Comment change.
20791
20792 * bison.simple: Test _MSDOS_, not MSDOS.
20793
20794 1996-06-01 Richard Stallman <rms@gnu.org>
20795
20796 * 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:
20797 Insert `_' macro around many string constants.
20798
20799 * src/main.c:
20800 Insert `_' macro around many string constants.
20801
20802 (main): Call setlocale, bindtextdomain and textdomain.
20803
20804 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20805 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20806 [ENABLE_NLS]: Include libintl.h.
20807 [ENABLE_NLS] (gettext): Define.
20808 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20809 (N_, PACKAGE, LOCALEDIR): New macros.
20810
20811 1996-06-01 Richard Stallman <rms@gnu.org>
20812
20813 * POTFILES.in: New file.
20814
20815 * Makefile.in (allocate.o):
20816 Define target explicitly.
20817
20818 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20819 (LDFLAGS): Set to @LDFLAGS@.
20820 (configure): Run autoconf only if preceding `cd' succeeds.
20821 (bison.s1): Redirect output to temporary file then move the
20822 temporary to the target, rather than redirecting directly to bison.s1.
20823 (clean): Remove config.status and config.log.
20824 (distclean): Don't remove config.status here.
20825
20826 1996-05-12 Richard Stallman <rms@gnu.org>
20827
20828 * src/bison.s1:
20829 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20830
20831 1996-05-12 Richard Stallman <rms@gnu.org>
20832
20833 * bison.simple:
20834 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20835
20836 1996-05-11 Richard Stallman <rms@gnu.org>
20837
20838 * src/bison.s1 (__yy_memcpy):
20839 Really reorder the args, as was supposedly done on Feb 14 1995.
20840 (yyparse): Calls changed accordingly.
20841
20842 1996-05-11 Richard Stallman <rms@gnu.org>
20843
20844 * Makefile.in (dist): Don't use $(srcdir).
20845
20846 * bison.simple (__yy_memcpy):
20847 Really reorder the args, as was supposedly done on Feb 14 1995.
20848 (yyparse): Calls changed accordingly.
20849
20850 1996-01-27 Richard Stallman <rms@gnu.org>
20851
20852 * src/output.c (output_rule_data):
20853 Test YYERROR_VERBOSE in the conditional
20854 around the definition of ttyname.
20855
20856 1995-12-29 Richard Stallman <rms@gnu.org>
20857
20858 * src/bison.s1:
20859 Fix line numbers in #line commands.
20860
20861 1995-12-29 Richard Stallman <rms@gnu.org>
20862
20863 * bison.simple:
20864 Fix line numbers in #line commands.
20865
20866 1995-12-27 Richard Stallman <rms@gnu.org>
20867
20868 * src/bison.s1 (YYPARSE_PARAM_DECL):
20869 In C++, make it always null.
20870 (YYPARSE_PARAM_ARG): New macro.
20871 (yyparse): Use YYPARSE_PARAM_ARG.
20872
20873 1995-12-27 Richard Stallman <rms@gnu.org>
20874
20875 * bison.simple (YYPARSE_PARAM_DECL):
20876 In C++, make it always null.
20877 (YYPARSE_PARAM_ARG): New macro.
20878 (yyparse): Use YYPARSE_PARAM_ARG.
20879
20880 1995-11-29 Richard Stallman <rms@gnu.org>
20881
20882 * doc/bison.texinfo:
20883 Describe literal string tokens, %raw, %no_lines, %token_table.
20884
20885 1995-11-29 Daniel Hagerty <hag@gnu.org>
20886
20887 * doc/bison.texinfo: Fixed update date
20888
20889 1995-10-16 Richard Stallman <rms@gnu.org>
20890
20891 * src/version.c: Version 1.25.
20892
20893 1995-10-16 Richard Stallman <rms@gnu.org>
20894
20895 * NEWS: *** empty log message ***
20896
20897 1995-10-16 Richard Stallman <rms@gnu.org>
20898
20899 * doc/bison.1, doc/bison.rnh:
20900 Add new options.
20901
20902 1995-10-15 Richard Stallman <rms@gnu.org>
20903
20904 * src/vmsgetargs.c, src/getargs.c:
20905 Added -n, -k, and -raw switches.
20906 (noparserflag, toknumflag, rawtoknumflag): New variables.
20907
20908 * src/symtab.h (SALIAS):
20909 New #define for adding aliases to %token.
20910 (struct bucket): Added `alias' field.
20911
20912 * src/reduce.c (reduce_grammar):
20913 Revise error message.
20914 (print_notices): Remove final `.' from error message.
20915
20916 * src/reader.c (reader_output_yylsp):
20917 New function.
20918 (readgram): Use `#if 0' around code that accepted %command
20919 inside grammar rules: The documentation doesn't allow it,
20920 and it will fail since the %command processors scan for the next %.
20921 (parse_token_decl): Extended the %token
20922 declaration to allow a multi-character symbol as an alias.
20923 (parse_thong_decl): New function.
20924 (read_declarations): Added %thong declarations.
20925 (read_declarations): Handle NOOP to deal with allowing
20926 % declarations as another means to specify the flags.
20927 (readgram): Allow %prec prior to semantics embedded in a rule.
20928 (skip_to_char, read_declarations, copy_definition)
20929 (parse_token_decl, parse_start_decl, parse_type_decl)
20930 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20931 (get_type_name, copy_guard, copy_action, readgram)
20932 (get_type, packsymbols): Revised most error messages.
20933 Changed `fatal' to `warnxxx' to avoid aborting for error.
20934 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20935 (read_declarations): Improve the error message for
20936 an invalid character. Do not abort.
20937 (read_declarations, copy_guard, copy_action): Use
20938 printable_version to avoid unprintable characters in printed output.
20939 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20940 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20941 Allow the type of a non-terminal can be given
20942 more than once, as long as all specifications give the same type.
20943
20944 * src/output.c:
20945 (output_headers, output_trailers, output, output_gram)
20946 (output_rule_data): Implement noparserflag variable.
20947 Implement toknumflag variable.
20948 (output): Call reader_output_yylsp to output LTYPESTR.
20949
20950 * src/main.c (main):
20951 If reader sees an error, don't process the grammar.
20952 (fatals): Updated to not use VARARGS1.
20953 (printable_version, int_to_string, warn, warni, warns, warnss)
20954 (warnsss): New error reporting functions. Avoid abort for error.
20955
20956 * src/lex.h:
20957 Added THONG and NOOP for alias processing.
20958 Added SETOPT for the new code that allows setting options with %flags.
20959
20960 * src/lex.c:
20961 Include getopt.h. Add some extern decls.
20962 (safegetc): New function to deal with EOF gracefully.
20963 (literalchar); new function to deal with reading \ escapes.
20964 (lex): Use literalchar.
20965 (lex): Implemented "..." tokens.
20966 (literalchar, lex, parse_percent_token): Made tokenbuffer
20967 always contain the token. This includes growing the token
20968 buffer while reading an integer.
20969 (parse_percent_token): Replaced if-else statement with percent_table.
20970 (parse_percent_token): Added % declarations as another
20971 way to specify the flags -n, -l, and -r. Also added hooks for
20972 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20973 major changes to files.c.
20974 (lex) Retain in the incoming stream a character following
20975 an incorrect '/'.
20976 (skip_white_space, lex): Revised most error messages
20977 and changed fatal to warn to avoid aborting.
20978 (percent_table): Added %thong declarations.
20979
20980 * src/gram.h: Comment changes.
20981
20982 * src/files.c (openfiles, open_extra_files, done):
20983 Add faction flag
20984 and actfile file. Handle noparserflag. Both for -n switch.
20985
20986 * src/conflicts.c (resolve_sr_conflict):
20987 Remove use of alloca.
20988
20989 1995-06-01 Jim Meyering <meyering@gnu.org>
20990
20991 * doc/bison.texinfo: *** empty log message ***
20992
20993 1995-05-06 Richard Stallman <rms@gnu.org>
20994
20995 * src/bison.s1: Comment change.
20996
20997 1995-05-06 Richard Stallman <rms@gnu.org>
20998
20999 * bison.simple: Comment change.
21000
21001 1995-05-03 Richard Stallman <rms@gnu.org>
21002
21003 * src/version.c: Version now 1.24.
21004
21005 * src/bison.s1: Change distribution terms.
21006
21007 * src/version.c: Version now 1.23.
21008
21009 1995-05-03 Richard Stallman <rms@gnu.org>
21010
21011 * doc/bison.texinfo:
21012 Rewrite "Conditions for Using Bison".
21013 Update version to 1.24.
21014
21015 1995-05-03 Richard Stallman <rms@gnu.org>
21016
21017 * bison.simple: Change distribution terms.
21018
21019 1995-02-23 Richard Stallman <rms@gnu.org>
21020
21021 * src/files.c: Test __VMS_POSIX as well as VMS.
21022
21023 1995-02-14 Jim Meyering <meyering@gnu.org>
21024
21025 * src/bison.s1 (__yy_memcpy):
21026 Renamed from __yy_bcopy to avoid
21027 confusion. Reverse FROM and TO arguments to be consistent with
21028 those of memcpy.
21029
21030 1995-02-14 Jim Meyering <meyering@gnu.org>
21031
21032 * bison.simple (__yy_memcpy):
21033 Renamed from __yy_bcopy to avoid
21034 confusion. Reverse FROM and TO arguments to be consistent with
21035 those of memcpy.
21036
21037 1994-11-10 David J. MacKenzie <djm@gnu.org>
21038
21039 * NEWS: reformat
21040
21041 * NEWS: New file.
21042
21043 * Makefile.in (DISTFILES): Include NEWS.
21044
21045 * Makefile.in (DISTFILES):
21046 Include install-sh, not install.sh.
21047
21048 * configure.in: Update to Autoconf v2 macro names.
21049
21050 1994-10-05 David J. MacKenzie <djm@gnu.org>
21051
21052 * Makefile.in: fix typo
21053
21054 * Makefile.in (prefix, exec_prefix):
21055 Let configure set them.
21056
21057 1994-09-28 David J. MacKenzie <djm@gnu.org>
21058
21059 * Makefile.in: Set datadir to $(prefix)/share.
21060
21061 1994-09-15 Richard Stallman <rms@gnu.org>
21062
21063 * src/bison.s1:
21064 Update copyright notice and GPL version.
21065
21066 1994-09-15 Richard Stallman <rms@gnu.org>
21067
21068 * bison.simple:
21069 Update copyright notice and GPL version.
21070
21071 1994-07-12 Richard Stallman <rms@gnu.org>
21072
21073 * src/reduce.c, src/reader.c:
21074 entered into RCS
21075
21076 1994-05-05 David J. MacKenzie <djm@gnu.org>
21077
21078 * Makefile.in: entered into RCS
21079
21080 1994-03-26 Richard Stallman <rms@gnu.org>
21081
21082 * src/bison.s1: entered into RCS
21083
21084 1994-03-26 Richard Stallman <rms@gnu.org>
21085
21086 * bison.simple: entered into RCS
21087
21088 1994-03-25 Richard Stallman <rms@gnu.org>
21089
21090 * src/main.c: entered into RCS
21091
21092 1994-03-24 Richard Stallman <rms@gnu.org>
21093
21094 * src/conflicts.c: entered into RCS
21095
21096 1994-01-02 Richard Stallman <rms@gnu.org>
21097
21098 * Makefile.in: *** empty log message ***
21099
21100 1993-11-21 Richard Stallman <rms@gnu.org>
21101
21102 * src/bison.s1: *** empty log message ***
21103
21104 1993-11-21 Richard Stallman <rms@gnu.org>
21105
21106 * doc/bison.texinfo: entered into RCS
21107
21108 * doc/bison.texinfo: *** empty log message ***
21109
21110 1993-11-21 Richard Stallman <rms@gnu.org>
21111
21112 * bison.simple: *** empty log message ***
21113
21114 1993-10-25 David J. MacKenzie <djm@gnu.org>
21115
21116 * doc/bison.texinfo: *** empty log message ***
21117
21118 1993-10-19 Richard Stallman <rms@gnu.org>
21119
21120 * src/bison.s1: *** empty log message ***
21121
21122 1993-10-19 Richard Stallman <rms@gnu.org>
21123
21124 * bison.simple: *** empty log message ***
21125
21126 1993-10-14 Richard Stallman <rms@gnu.org>
21127
21128 * src/bison.s1: *** empty log message ***
21129
21130 1993-10-14 Richard Stallman <rms@gnu.org>
21131
21132 * bison.simple: *** empty log message ***
21133
21134 1993-09-14 David J. MacKenzie <djm@gnu.org>
21135
21136 * doc/bison.texinfo: *** empty log message ***
21137
21138 1993-09-13 Noah Friedman <friedman@gnu.org>
21139
21140 * Makefile.in: *** empty log message ***
21141
21142 1993-09-10 Richard Stallman <rms@gnu.org>
21143
21144 * src/conflicts.c: *** empty log message ***
21145
21146 * src/system.h: entered into RCS
21147
21148 1993-09-10 Richard Stallman <rms@gnu.org>
21149
21150 * doc/bison.1: entered into RCS
21151
21152 1993-09-06 Noah Friedman <friedman@gnu.org>
21153
21154 * src/version.c: entered into RCS
21155
21156 1993-09-06 Noah Friedman <friedman@gnu.org>
21157
21158 * Makefile.in: *** empty log message ***
21159
21160 1993-07-30 David J. MacKenzie <djm@gnu.org>
21161
21162 * Makefile.in: *** empty log message ***
21163
21164 1993-07-24 Richard Stallman <rms@gnu.org>
21165
21166 * src/bison.s1: *** empty log message ***
21167
21168 1993-07-24 Richard Stallman <rms@gnu.org>
21169
21170 * bison.simple: *** empty log message ***
21171
21172 1993-07-08 David J. MacKenzie <djm@gnu.org>
21173
21174 * Makefile.in: *** empty log message ***
21175
21176 1993-07-04 Richard Stallman <rms@gnu.org>
21177
21178 * src/bison.s1: *** empty log message ***
21179
21180 1993-07-04 Richard Stallman <rms@gnu.org>
21181
21182 * bison.simple: *** empty log message ***
21183
21184 1993-06-26 David J. MacKenzie <djm@gnu.org>
21185
21186 * src/getargs.c: entered into RCS
21187
21188 1993-06-26 David J. MacKenzie <djm@gnu.org>
21189
21190 * doc/bison.texinfo: *** empty log message ***
21191
21192 * doc/bison.1: New file.
21193
21194 1993-06-25 Richard Stallman <rms@gnu.org>
21195
21196 * src/getargs.c: New file.
21197
21198 1993-06-16 Richard Stallman <rms@gnu.org>
21199
21200 * src/bison.s1: *** empty log message ***
21201
21202 1993-06-16 Richard Stallman <rms@gnu.org>
21203
21204 * bison.simple: *** empty log message ***
21205
21206 1993-06-03 Richard Stallman <rms@gnu.org>
21207
21208 * src/bison.s1: New file.
21209
21210 1993-06-03 Richard Stallman <rms@gnu.org>
21211
21212 * doc/bison.texinfo: *** empty log message ***
21213
21214 1993-06-03 Richard Stallman <rms@gnu.org>
21215
21216 * bison.simple: New file.
21217
21218 1993-05-19 Richard Stallman <rms@gnu.org>
21219
21220 * doc/bison.texinfo: New file.
21221
21222 1993-05-07 Noah Friedman <friedman@gnu.org>
21223
21224 * Makefile.in: *** empty log message ***
21225
21226 1993-04-28 Noah Friedman <friedman@gnu.org>
21227
21228 * src/reader.c: *** empty log message ***
21229
21230 1993-04-23 Noah Friedman <friedman@gnu.org>
21231
21232 * src/alloc.h: entered into RCS
21233
21234 1993-04-20 David J. MacKenzie <djm@gnu.org>
21235
21236 * src/version.c: *** empty log message ***
21237
21238 * src/files.c, src/allocate.c:
21239 entered into RCS
21240
21241 * src/reader.c: *** empty log message ***
21242
21243 * src/lex.c: entered into RCS
21244
21245 * src/conflicts.c: New file.
21246
21247 * src/symtab.c: entered into RCS
21248
21249 * src/alloc.h: New file.
21250
21251 * src/LR0.c: entered into RCS
21252
21253 1993-04-18 Noah Friedman <friedman@gnu.org>
21254
21255 * src/reader.c: New file.
21256
21257 * src/version.c: *** empty log message ***
21258
21259 1993-04-18 Noah Friedman <friedman@gnu.org>
21260
21261 * Makefile.in: *** empty log message ***
21262
21263 1993-04-17 Noah Friedman <friedman@gnu.org>
21264
21265 * Makefile.in: *** empty log message ***
21266
21267 1993-04-15 Richard Stallman <rms@gnu.org>
21268
21269 * src/main.c, src/files.c:
21270 New file.
21271
21272 1993-04-15 Noah Friedman <friedman@gnu.org>
21273
21274 * configure.in: entered into RCS
21275
21276 * configure.in: *** empty log message ***
21277
21278 * configure.in: New file.
21279
21280 1993-04-14 Richard Stallman <rms@gnu.org>
21281
21282 * Makefile.in: New file.
21283
21284 1993-04-13 Richard Stallman <rms@gnu.org>
21285
21286 * src/version.c: New file.
21287
21288 1993-03-25 Richard Stallman <rms@gnu.org>
21289
21290 * src/output.c: entered into RCS
21291
21292 1992-09-25 Richard Stallman <rms@gnu.org>
21293
21294 * configure.bat: entered into RCS
21295
21296 1992-06-22 Richard Stallman <rms@gnu.org>
21297
21298 * src/vmsgetargs.c: entered into RCS
21299
21300 1992-06-22 Richard Stallman <rms@gnu.org>
21301
21302 * doc/bison.rnh: entered into RCS
21303
21304 1992-04-20 David J. MacKenzie <djm@gnu.org>
21305
21306 * README: entered into RCS
21307
21308 1992-01-22 Richard Stallman <rms@gnu.org>
21309
21310 * src/machine.h: entered into RCS
21311
21312 1991-12-21 Richard Stallman <rms@gnu.org>
21313
21314 * src/lalr.c, src/closure.c:
21315 entered into RCS
21316
21317 1991-12-20 Richard Stallman <rms@gnu.org>
21318
21319 * src/state.h: entered into RCS
21320
21321 1991-12-18 Richard Stallman <rms@gnu.org>
21322
21323 * src/print.c, src/nullable.c, src/derives.c:
21324 entered into RCS
21325
21326 1991-11-03 David J. MacKenzie <djm@gnu.org>
21327
21328 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
21329 entered into RCS
21330
21331 1988-09-09 Richard Stallman <rms@gnu.org>
21332
21333 * src/bison.hairy: entered into RCS
21334
21335 1987-12-16 Richard Stallman <rms@gnu.org>
21336
21337 * REFERENCES: entered into RCS
21338
21339
21340 -----
21341
21342 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
21343 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
21344 2007, 2008, 2009 Free Software Foundation, Inc.
21345
21346 Copying and distribution of this file, with or without
21347 modification, are permitted provided the copyright notice and this
21348 notice are preserved.