]> git.saurik.com Git - bison.git/blob - ChangeLog
b7b1f3767c3f30187fdb86b08f6ba3eb49bf943c
[bison.git] / ChangeLog
1 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
4 it was double-quoted.
5 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6 grammar is maintained with Bison's highest standards.
7 * src/getargs.c: Fix some typos in Doxygen comments.
8
9 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
10
11 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
12 later. Reported by Paul Eggert in
13 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
14 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
15 * src/scan-code.l (translate_action): Don't bother invoking
16 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
17 (code_scanner_free): Instead of invoking
18 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
19 which frees more.
20 * src/scan-gram.l (gram_scanner_free): Likewise.
21 * src/scan-skel.l (scan_skel): Likewise.
22
23 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
24
25 * src/files.c (tr): Change return type to void.
26 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
27 has been called previously for the same key.
28 (muscle_find): Return storage instead of value so that
29 --enable-gcc-warnings doesn't produce warnings that the return discards
30 const. aver that the value and storage are the same since storage
31 could potentially be NULL when value is not.
32 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
33 same as 0.
34
35 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
36
37 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
38 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
39 us a slightly cleaner distribution, and also works.
40 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
41 gnulib changes.
42
43 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
44 and Paul Eggert <eggert@cs.ucla.edu>
45
46 Don't let Bison leak memory except when it complains.
47 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
48 (spec_defines_file, dir_prefix): Now char *, not const char *,
49 since they are freed.
50 * src/files.c: Likewise.
51 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
52 Likewise.
53 (tr): Now operates in-place. All uses changed.
54 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
55 values.
56 (compute_file_name_parts, compute_output_file_names): Don't store
57 read-only data in variables that will be freed.
58 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
59 src_extension, and header_extension.
60 (output_file_names_free): New public function to free
61 spec_verbose_file, spec_graph_file, spec_defines_file,
62 parser_file_name, and dir_prefix.
63 * src/getargs.c (getargs): Don't store read-only data in variables that
64 will be freed.
65 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
66 (which previously existed but was unused), and quotearg_free.
67 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
68 * src/muscle_tab.c: Likewise.
69 (muscle_entry): Make the value char const *,
70 and add a new storage member that is char * and can be freed.
71 (muscle_entry_free): New private function.
72 (muscle_init): Use it instead of free.
73 (muscle_insert, muscle_grow): Update and use new storage member.
74 (muscle_code_grow): Free the string passed to muscle_grow
75 since it's not needed anymore.
76 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
77 add a new `char *code' member.
78 ("{...}"): Declare semantic type as code.
79 * src/scan-code.h (translate_rule_action):
80 (translate_symbol_action, translate_code, translate_action): Return
81 `char const *' rather than `char *' since external code should not free
82 these strings.
83 * src/scan-code.l: Likewise.
84 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
85 which is "{...}" in the parser.
86 * tests/Makefile.am (maintainer-check-valgrind): Set
87 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
88 Valgrind.
89 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
90 complain.
91 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
92 expecting a non-zero exit status sets --leak-check=summary and
93 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
94 this case, and we don't want to hear about it.
95
96 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
97
98 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
99 instead of from the template, to simplify configuration a bit.
100 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
101 and m4/wint_t.m4, as they are needed with the latest gnulib.
102
103 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
104
105 Disable unset/unused mid-rule value warnings by default, and recognize
106 --warnings=midrule-values to enable them. Discussed starting at
107 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
108 * NEWS (2.3a+): Mention.
109 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
110 warnings): Add entry for midrule-values subargument.
111 * src/reader.c (symbol_should_be_used): Don't return true just because
112 the value is a set/used mid-rule value unless
113 --warnings=midrule-values was specified.
114 * tests/input.at (Unused values, Unused values before symbol
115 declarations): Run tests with and without --warnings=midrule-values.
116
117 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
118 than LIST_FREE directly.
119
120 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
121
122 Finish implementing --warnings=error, which should not be implied by
123 --warnings=all (or by its synonyms -W and --warnings without
124 subarguments).
125 * src/complain.c (set_warning_issued): New function to report that
126 warnings are being treated as errors and to record an error if so.
127 Invoke...
128 (warn_at, warn): ... here.
129 * src/getargs.c (warnings_args, warnings_types): Reorder so that
130 "error - warnings are errors" does not appear above "all - all of the
131 above".
132 (getargs): For -W and --warnings without subarguments, don't let
133 FLAGS_ARGMATCH set warnings_error in warnings_flag.
134 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
135
136 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
137
138 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
139 empty subargument list. For example: `bison --warnings= parser.y'.
140
141 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
142
143 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
144 the parser header file so that gcc doesn't warn.
145
146 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
147
148 Split the default %destructor/%printer into two kinds: <*> and <!>.
149 Discussed starting at
150 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
151 * NEWS (2.3a+): Mention.
152 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
153 previous change today related to mid-rules.
154 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
155 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
156 (TYPE_TAG_ANY): Add as <*>.
157 (TYPE_TAG_NONE): Add as <!>.
158 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
159 for <*> and <!>.
160 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
161 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
162 * src/symlist.c (symbol_list_default_new): Split into tagged and
163 tagless versions.
164 (symbol_list_destructor_set, symbol_list_printer_set): Split
165 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
166 SYMLIST_DEFAULT_TAGLESS.
167 * src/symlist.h: Update symbol_list_default*_new prototypes.
168 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
169 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
170 * src/symtab.c (default_destructor, default_destructor_location,
171 default_printer, default_printer_location): Split each into tagged and
172 tagless versions.
173 (symbol_destructor_get, symbol_destructor_location_get,
174 symbol_printer_get, symbol_printer_location_get): Implement tagged
175 default and tagless default cases.
176 (default_destructor_set, default_printer_set): Split each into tagged
177 and tagless versions.
178 * src/symtab.h: Update prototypes.
179 * tests/actions.at (Default %printer and %destructor): Rename to...
180 (Default tagless %printer and %destructor): ... this, and extend.
181 (Per-type %printer and %destructor): Rename to...
182 (Default tagged and per-type %printer and %destructor): ... this, and
183 extend.
184 (Default %printer and %destructor for user-defined end token): Extend.
185 (Default %printer and %destructor are not for error or $undefined):
186 Update.
187 (Default %printer and %destructor are not for $accept): Update.
188 (Default %printer and %destructor for mid-rule values): Extend.
189 * tests/input.at (Default %printer and %destructor redeclared): Extend.
190 (Unused values with default %destructor): Extend.
191
192 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
193
194 Don't apply the default %destructor/%printer to an unreferenced midrule
195 value. Mentioned at
196 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
197 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
198 like $@n instead of just @n so that the default %destructor/%printer
199 logic doesn't see them as user-defined symbols.
200 (symbol_is_dummy): Check for both forms of the name.
201 * src/reader.c (packgram): Remove the `$' from each midrule symbol
202 name for which the midrule value is referenced in any action.
203 * tests/actions.at (Default %printer and %destructor for mid-rule
204 values): New test.
205 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
206 for change to dummy symbol names.
207
208 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
209
210 Warn about unset midrule $$ if the corresponding $n is used.
211 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
212 $n usage.
213 (packgram): Before invoking grammar_rule_check on any rule, make sure
214 all actions have already been scanned in order to set `used' flags.
215 Otherwise, checking that a midrule's $$ is set will not always work
216 properly because the midrule check must forward-reference the midrule's
217 parent rule.
218 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
219 warning.
220
221 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
222
223 More improvements to the documentation of the prologue alternatives:
224 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
225 Bison manual.
226 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
227 some text to clarify the relative importance of the new directives and
228 to show how these directives may be viewed as code labels.
229
230 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
231
232 Similar to the recently removed %before-header, add %code-top as the
233 alternative to the pre-prologue. Mentioned at
234 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
235 Also, let the prologue alternatives appear in the grammar section.
236 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
237 (prologue_declaration): Move the existing prologue alternatives to...
238 (grammar_declaration): ... here and add %code-top.
239 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
240
241 Clean up and extend documentation for the prologue alternatives.
242 * NEWS (2.3a+): Describe prologue alternatives.
243 * doc/bison.texinfo (Prologue): Move discussion of prologue
244 alternatives to...
245 (Prologue Alternatives): ... this new section, and extend it to discuss
246 all 4 directives in detail.
247 (Bison Symbols): Clean up discussion of prologue alternatives and add
248 %code-top.
249
250 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
251
252 DJGPP specific issues.
253
254 * djgpp/config.bat: config.hin has been moved to lib. Adjust
255 config.bat accordingly.
256 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
257 * djgpp/config.site: Likewise.
258
259 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
260
261 Replace %*-header with %provides, %requires, %code. See discussion at
262 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
263
264 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
265 (b4_user_start_header): Remove.
266 * data/glr.c: Use new macros instead of b4_*start_header
267 and b4_*end_header.
268 * data/glr.cc: Likewise.
269 * data/lalr1.cc: Likewise.
270 * data/push.c: Likewise.
271 * data/yacc.c: Likewise.
272
273 * doc/bison.texinfo: Remove %before-header, rename
274 %{start,end,after}-header to %requires, %provides, %code.
275
276 * src/parse-gram.y: Likewise (also rename token names accordingly).
277 * src/scan-gram.l: Likewise.
278 * tests/actions.at: Likewise.
279
280 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
281
282 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
283 Problem reported by Joel E. Denny.
284
285 2006-10-14 Jim Meyering <jim@meyering.net>
286
287 (Sync from coreutils.)
288 Work also when the working directory (with e.g. coreutils sources)
289 is version controlled with git, rather than CVS.
290 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
291 rather than CVS.
292 In messages and comments, say e.g., "checked-out sources",
293 rather than "CVS sources".
294 (version_controlled_file): New function. Work for git as well as
295 for CVS. Don't use grep's -q option.
296 (slurp): Call it here, in place of CVS-specific code.
297
298 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
299
300 Fix testsuite for ./configure --enable-gcc-warnings:
301 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
302 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
303 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
304 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
305 * test/regression.at (Diagnostic that expects two alternatives):
306 Likewise.
307
308 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
309
310 * bootstrap.conf (gnulib_modules): Add config-h.
311 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
312 worry about HAVE_CONFIG_H.
313 * lib/abitset.c: Likewise.
314 * lib/bitset.c: Likewise.
315 * lib/bitset_stats.c: Likewise.
316 * lib/bitsetv-print.c: Likewise.
317 * lib/bitsetv.c: Likewise.
318 * lib/ebitset.c: Likewise.
319 * lib/get-errno.c: Likewise.
320 * lib/lbitset.c: Likewise.
321 * lib/subpipe.c: Likewise.
322 * lib/timevar.c: Likewise.
323 * lib/vbitset.c: Likewise.
324 * lib/bitset.c: Include "bitset.h" first, to test interface.
325 * lib/bitset_stats.c: Include "bitset_stats.h" first.
326 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
327 * lib/bitsetv.c: Include "bitsetv.h" first.
328 * lib/get-errno.c: Include "get-errno.h" first.
329 * m4/.cvsignore: Add config-h.m4.
330 * tests/actions.at (Default %printer and %destructor for ...):
331 Adjust expected line numbers in output to reflect removal of #if
332 HAVE_CONFIG_H lines.
333 * tests/glr-regression.at (Missed %merge type warnings when ...):
334 Likewise.
335 * tests/regression.at (Braced code in declaration in rules section):
336 Likewise.
337 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
338 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
339 Include <config.h> unconditionally.
340
341 * bootstrap: Sync from coreutils, as follows:
342
343 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
344
345 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
346 variable was sometimes used without being initialized. This
347 messed up the installation of the INSTALL file in some cases.
348
349 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
350
351 * bootstrap (usage, main program, symlink_to_gnulib): Add option
352 --copy. Inspired by a suggestion from Bruno Haible.
353
354 2006-10-03 Jim Meyering <jim@meyering.net>
355
356 * bootstrap: Undo last change to this file, since now gnulib-tool
357 sticks with the automake default in generating dependencies.
358
359 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
360
361 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
362 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
363
364 * doc/bison.1: Add copyright notice.
365
366 * data/glr.c: Don't include <stdarg.h>; not used.
367
368 * NEWS: The -g and --graph options now output graphs in Graphviz
369 DOT format, not VCG format.
370 * doc/bison.1: Likewise.
371 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
372 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
373 of this change in
374 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
375 * TODO: Remove Graphviz entry.
376 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
377 remove vcg.c, vcg.h, vcg_defaults.h.
378 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
379 * src/graphviz.c, src/graphviz.h: New files.
380 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
381 * src/files.h: Make comment more generic.
382 * src/main.c (main): Likewise.
383 * src/print_graph.h: Likewise.
384 * src/getargs.c (usage): Make usage description more generic.
385 * src/print_graph.c: Include graphviz.h rather than vcg.h.
386 (static_graph, fgraph): Remove. All uses changed to pass
387 arguments instead of sharing a static var.
388 (print_core, print_actions, print_state, print_graph):
389 Output graphviz format rather than VCG format.
390 * tests/.cvsignore: Remove *.vcg; add *.dot.
391 * tests/output.at: Expect *.dot files, not *.vcg files.
392
393 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
394 accommodates the 2006-10-08 change.
395
396 2006-10-11 Bob Rossi <bob@brasko.net>
397
398 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
399 (b4_yyssa, b4_yyerror_range): New macros.
400 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
401 (yypvarsinit): Remove init of removed fields.
402 (yypushparse): Remove use of removed fields; use new macros instead.
403
404 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
405
406 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
407 in a push parser. Reindent slightly to match yacc.c better.
408
409 2006-10-11 Bob Rossi <bob@brasko.net>
410
411 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
412 yymsg_alloc fields.
413 (yypvarsinit, yypushparse): Remove init of removed fields.
414 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
415
416 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
417
418 * THANKS: Add Paolo Bonzini and Bob Rossi.
419
420 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
421
422 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
423 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
424 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
425 b4_define_user_cde and uses): Remove.
426 (b4_comment, b4_prefix, b4_sync_start): New.
427 * data/bison.m4: New file, with most of the content removed from c.m4.
428 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
429 * src/output.c (output_skeleton): Pass bison.m4.
430 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
431 only if specified.
432
433 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
434
435 Fix test failure reported by Tom Lane in
436 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
437 and try to make such failures easier to catch in the future.
438 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
439 that's now the caller's responsibility.
440 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
441 Set yychar = YYEOF if it's negative.
442 * tests/actions.at (yylex): Abort if asked to read past EOF.
443 * tests/conflicts.at (yylex): Likewise.
444 * tests/cxx-type.at (yylex): Likewise.
445 * tests/glr-regression.at (yylex): Likewise.
446 * tests/input.at (yylex): Likewise.
447 * tests/regression.at (yylex): Likewise.
448 * tests/torture.at (yylex): Likewise.
449
450 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
451
452 Fix problems with translating English-language diagnostics.
453 * bootstrap: Fix bug introduced in recent bootstrap changes, with
454 respect to bison-runtime pot generation. The YY_ stuff
455 wasn't being captured.
456 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
457 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
458 * runtime-po/POTFILES.in: Add data/push.c.
459
460 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
461
462 Merge bootstrap changes from coreutils.
463
464 2006-09-28 Jim Meyering <jim@meyering.net>
465
466 Automatically generated dependencies are important even
467 when all of the sources in a directory come from gnulib.
468 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
469 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
470
471 2006-09-23 Jim Meyering <jim@meyering.net>
472
473 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
474
475 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
476
477 * bootstrap: Add support for --force.
478 (usage): New function. Describe usage less tersely.
479 (CVS_only_file): New var.
480
481 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
482
483 * data/push.c (YYPUSH_MORE): Make it an enum instead.
484 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
485 Adjust white space and comments to match GNU style better.
486
487 2006-09-20 Bob Rossi <bob@brasko.net>
488
489 * data/push.c (yyresult_get): Remove function.
490 (YYPUSH_MORE): Add #define.
491 (yypushparse): Modify return value.
492
493 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
494
495 * stamp-h.in: Remove; no longer needed.
496 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
497 Remove config.h, config.hin, intl (no longer created).
498 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
499 stamp-h1.
500
501 Sync bootstrap from coreutils, as follows:
502
503 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
504
505 * bootstrap (symlink_to_gnulib): New function.
506 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
507 to copies-of-gnulib.
508 (cp_mark_as_generated, slurp, gnulib_files):
509 Avoid making a copy if it's the same as the old version.
510 (gnulib_files): Add support for this variable (used by Bison).
511
512 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
513
514 * src/getargs.c (usage): Rework to use conventions similar to
515 coreutils, to make translation a bit easier and the code a bit
516 smaller. Problem reported by Tim Van Holder.
517
518 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
519
520 Use some of gnulib's new modules, taken from coreutils.
521
522 * bootstrap: Sync from coreutils, except add support for gnulib_files.
523 * bootstrap.conf: New file.
524 (gnulib_modules): Add configmake, inttypes, unistd.
525 (XGETTEXT_OPTIONS): Add complain, complain_at,
526 fatal, fatal_at, warn, warn_at, unexpected_end.
527 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
528 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
529 (gl_EARLY): Add.
530 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
531 (gl_INIT): Add
532 (GNULIB_AUTOCONF_SNIPPET): Remove.
533 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
534 the pickiest.
535 * lib/.cvsignore: Add inttypes_.h.
536 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
537 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
538 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
539 no-longer-necessary initializations.
540 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
541 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
542 use the unistd module.
543 * src/system.h: Likewise.
544 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
545 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
546 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
547 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
548 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
549 * src/system.h: Include inttypes.h unconditionally, now that we
550 use the inttypes module. Don't bother to include stdint.h, since
551 inttypes.h now does that for us.
552 (LOCALEDIR): Remove, now that we use the configmake module.
553 * src/getargs.c: Include configmake.h.
554 * src/main.c: Likewise.
555 * src/output.c: Likewise.
556 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
557 not from $abs_top_builddir, since config.h moved.
558
559
560 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
561 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
562
563 * src/parse-gram.y (symbol_declaration): Don't put statements
564 before declarations; it's not portable to C89.
565 * src/scan-code.l (handle_action_at): Likewise.
566
567 * src/scan-code.l: Always initialize braces_level; the old code
568 left it uninitialized and therefore had undefined behavior.
569
570 Don't attempt to redefine 'assert', since it runs afoul of
571 systems where standard headers (mistakenly) include <assert.h>.
572 Instead, define and use our own alternative, called 'aver'.
573 * src/reader.c: Don't include assert.h, since we no longer
574 use assert.
575 * src/scan-code.l: Likewise.
576 * src/system.h (assert): Remove, replacing with....
577 (aver): New function, taking a bool arg. All uses changed.
578 * src/tables.c (pack_vector): Ensure that aver arg is bool,
579 not merely an integer.
580
581 2006-09-15 Bob Rossi <bob@brasko.net>
582
583 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
584 * data/c.m4 (YYPUSH): New.
585 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
586 * src/getargs.c (push_parser): New var.
587 * src/getargs.h (push_parser): New declaration.
588 * src/output.c (prepare): Add macro insertion of `push_flag'.
589 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
590 (prologue_declaration): Parse %push-parser.
591 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
592 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
593 list of removed lines from the traces observed.
594 (AT_CHECK_CALC_LALR): Added push parser tests.
595
596 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
597
598 * NEWS: Version 2.3a.
599 * configure.ac (AC_INIT): Likewise.
600
601 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
602 "#define YYSTYPE int" that caused "make maintainer-check" to fail
603 due to header ordering dependencies. I don't know why the #define
604 was there.
605
606 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
607 runtime cost when YYDEBUG is not defined, and so that some tests
608 that used to fail now work. Problem and initial suggestion by
609 Paolo Bonzini.
610 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
611 * data/glr.cc (b4_parser_class_name):
612 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
613 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
614 (yydebug_) [YYDEBUG]: New member.
615 (yycdebug_): Now defined only if YYDEBUG.
616 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
617 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
618 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
619 if YYYDEBUG.
620 (debug_stream, set_debug_stream, debug_level, set_debug_level):
621 Define only if YYDEBUG.
622 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
623 set_debug_level.
624 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
625 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
626 AT_CHECK_CALC_GLR_CC that are working now.
627
628 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
629
630 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
631 We don't need them in glr.cc, and glr.c defines them.
632 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
633 assumes that defining it to anything is the same as defining
634 it to 1. Problem reported by Paolo Bonzini.
635
636 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
637
638 * data/c.m4 (b4_null, b4_case): Define.
639 * src/output.c (prepare_symbols): Use b4_null.
640 (user_actions_output): Use b4_case.
641
642 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
643
644 * data/glr.c (b4_shared_declarations): Put start-header first,
645 before any #includes that we generate, so that feature-test
646 macros work. Problem reported by Michael Deutschmann in
647 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
648 * data/lalr1.cc: Likewise.
649 * doc/bison.texinfo (Prologue): Document that feature-test macros
650 should be defined before any Bison declarations.
651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
652 that depend on location.hh after, not before, Bison decls, since
653 we now include location.hh after the first user prologue.
654
655 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
656 Sander Brandenburg in
657 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
658 Also, fix minor white space and comment issues.
659 (Prologue): Mention that it's better to define feature-test macros
660 before Bison declarations. Problem reported by Michael Deutschmann.
661
662 * README-cvs: Fix typo: "&" should be "&&". Problem reported
663 by Jim Meyering.
664 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
665 This adjusts to recent gnulib changes.
666
667 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
668
669 Finish implementation of per-type %destructor/%printer. Discussed
670 starting at
671 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
672 and
673 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
674 * NEWS (2.3+): Add a description of this feature to the default
675 %destructor/%printer description.
676 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
677 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
678 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
679 list node contains a semantic type.
680 * src/symtab.c, src/symtab.h: Extend with a table that associates
681 semantic types with their %destructor's and %printer's.
682 (semantic_type_from_uniqstr, semantic_type_get,
683 semantic_type_destructor_set, semantic_type_printer_set): New functions
684 composing the public interface of that table.
685 (symbol_destructor_get, symbol_destructor_location_get,
686 symbol_printer_get, symbol_printer_location_get): If there's no
687 per-symbol %destructor/%printer, look up the per-type before trying
688 the default.
689 * tests/actions.at (Per-type %printer and %destructor): New test case.
690 * tests/input.at (Default %printer and %destructor redeclared):
691 Extend to check that multiple occurrences of %symbol-default in a
692 single %destructor/%printer declaration is an error.
693 (Per-type %printer and %destructor redeclared, Unused values with
694 per-type %destructor): New test cases.
695
696 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
697
698 Require default %destructor/%printer to be declared using
699 %symbol-default instead of an empty symbol list, and start working on
700 new per-type %destructor/%printer. Discussed at
701 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
702 * NEWS (2.3+): Add %symbol-default to example.
703 * bison.texinfo (Freeing Discarded Symbols): Likewise.
704 (Bison Symbols): Add entry for %symbol-default.
705 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
706 (generic_symlist, generic_symlist_item): New nonterminals for creating
707 a list in which each item is a symbol, semantic type, or
708 %symbol-default.
709 (grammar_declaration): Use generic_symlist in %destructor and %printer
710 declarations instead of symbols.1 or an empty list.
711 (symbol_declaration, precedence_declaration, symbols.1): Update actions
712 for changes to symbol_list.
713 * src/reader.c: Update for changes to symbol_list.
714 * src/scan-code.l: Likewise.
715 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
716 * src/symlist.c, src/symlist.h: Extend such that a list node may
717 represent a semantic type or a %symbol-default in addition to just an
718 ordinary symbol. Add switched functions for setting %destructor's and
719 %printer's.
720 * tests/actions.at, tests/input.at: Add %symbol-default to all default
721 %destructor/%printer declarations.
722
723 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
724
725 Whether the default %destructor/%printer applies to a particular symbol
726 isn't a question of whether the user *declares* that symbol (in %token,
727 for example). It's a question of whether the user by any means
728 *defines* the symbol at all (by simply using a char token, for
729 example). $end is defined by Bison whereas any other token with token
730 number 0 is defined by the user. The error token is always defined by
731 Bison regardless of whether the user declares it with %token, but we
732 may one day let the user define error as a nonterminal instead.
733 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
734 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
735 the meaning of "user-defined".
736 * tests/actions.at (Default %printer and %destructor for user-declared
737 end token): Rename to...
738 (Default %printer and %destructor for user-defined end token): ...
739 this.
740
741 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
742 computation of whether to apply the default, don't maintain a list of
743 every Bison-defined symbol. Instead, just check for a first character
744 of '$', which a user symbol cannot have, and check for the error token.
745
746 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
747
748 Don't apply the default %destructor or %printer to the error token,
749 $undefined, or $accept. This change fits the general rule that the
750 default %destructor and %printer are only for user-declared symbols,
751 and it solves several difficulties that are described in the new test
752 cases listed below.
753 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
754 * tests/actions.at (Default %printer and %destructor are not for error
755 or $undefined, Default %printer and %destructor are not for $accept):
756 New test cases.
757
758 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Allow %start after the first rule.
761 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
762 when parsing the first rule.
763 (check_and_convert_grammar): Search for it here after all grammar
764 declarations have been parsed. Skip midrules, which have dummy LHS
765 nonterminals.
766 * src/symtab.c (symbol_is_dummy): New function.
767 * src/symtab.h (symbol_is_dummy): Declare it.
768 * tests/input.at (%start after first rule): New test.
769
770 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
771
772 Redo some of the previous commit: add back the ability to use
773 non-aliased/undeclared string literals since it might be useful to
774 those declaring %token-table.
775 * src/reader.c (check_and_convert_grammar): Undo changes in previous
776 commit: don't worry about complaints from symbols_pack.
777 * src/symtab.c (symbol_new, symbol_class_set,
778 symbol_check_alias_consistency): Undo changes in previous commit: count
779 each string literal as a new symbol and token, assign it a symbol
780 number, and don't complain about non-aliased string literals.
781 (symbols_pack): Since symbol_make_alias still does not decrement symbol
782 and token counts but does still set aliased tokens to the same number,
783 symbol_pack_processor now leaves empty slots in the symbols array.
784 Remove those slots.
785 * tests/regression.at (Undeclared string literal): Remove test case
786 added in previous commit since non-aliased string literals are allowed
787 again.
788 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
789 remove unnecessary string literal declarations.
790 * tests/sets.at (Firsts): Likewise.
791
792 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
793
794 Don't allow an undeclared string literal, but allow a string literal to
795 be used before its declaration.
796 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
797 symbols_pack complained.
798 * src/symtab.c (symbol_new): Don't count a string literal as a new
799 symbol.
800 (symbol_class_set): Don't count a string literal as a new token, and
801 don't assign it a symbol number since symbol_make_alias does that.
802 (symbol_make_alias): It's not necessary to decrement the symbol and
803 token counts anymore. Don't assume that an alias declaration occurs
804 before any uses of the identifier or string, and thus don't assert that
805 one of them has the highest symbol number so far.
806 (symbol_check_alias_consistency): Complain if there's a string literal
807 that wasn't declared as an alias.
808 (symbols_pack): Bail if symbol_check_alias_consistency failed since
809 symbol_pack asserts that every token has been assigned a symbol number
810 although undeclared string literals have not.
811 * tests/regression.at (String alias declared after use, Undeclared
812 string literal): New test cases.
813 (Characters Escapes, Web2c Actions): Declare string literals as
814 aliases.
815 * tests/sets.at (Firsts): Likewise.
816
817 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
818
819 In the grammar scanner, STRING_FINISH unclosed constructs and return
820 them to the parser in order to improve error messages.
821 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
822 SC_BRACED_CODE, SC_PROLOGUE): Implement.
823 * tests/input.at (Unclosed constructs): New test case.
824 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
825 seen.
826
827 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
828 unused global.
829
830 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
831
832 Handle string aliases for character tokens correctly.
833 * src/symtab.c (symbol_user_token_number_set): If the token has an
834 alias, check and set its alias's user token number instead of its own,
835 which is set to indicate the alias. Previously, every occurrence of
836 the character token in the grammar overwrote that alias indicator with
837 the character code.
838 * tests/input.at (String aliases for character tokens): New test.
839
840 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
841
842 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
843
844 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
845
846 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
847 to prevent failures when building on older platforms.
848 Check for autopoint failure.
849 Set XGETTEXT_OPTIONS to values that check for C format strings,
850 so that translators are warned about them (this also helps
851 prevent core dumps).
852
853 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
854 function, since it simplifies our code a bit.
855
856 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
857 rather than -W, so we don't get bogus warnings about sign comparisons.
858 Add -Wpointer-arith, since that warning is useful (it reports code
859 that does not conform to C89 and that some compilers reject).
860 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
861 since it's no longer needed.
862
863 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
864
865 Clean up scanners a bit.
866 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
867 definitions so gcc won't warn when obstack_for_string is unused.
868 * src/scan-code.l: config.h and system.h are already #include'd by
869 scan-code-c.c, so get rid of them here.
870 * src/scan-gram.l: Likewise.
871 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
872 definitions rather than duplicating the rest of it.
873 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
874
875 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
876
877 Suppress signed/unsigned comparison warnings for yycheck.
878 * data/c.m4 (b4_safest_int_type): New macro.
879 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
880 a signed int type, cast it to b4_safest_int_type first.
881 * data/yacc.c: Likewise.
882 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
883 also overwritten.
884
885 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
886
887 * doc/bison.texinfo: Fix some typos.
888
889 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
890
891 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
892 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
893
894 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
895 the latest gnulib does this a different way.
896 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
897 translation was patched, so stop omitting it.
898
899 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
900
901 Enable declaration of default %printer/%destructor. Make the parser
902 use these for all user-declared grammar symbols for which the user does
903 not declare a specific %printer/%destructor. Thus, the parser uses it
904 for token 0 if the user declares it but not if Bison generates it as
905 $end. Discussed starting at
906 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
907 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
908 and
909 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
910 * NEWS (2.3+): Mention.
911 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
912 declare a %destructor for a mid-rule's semantic value. It's just
913 impossible to declare one specific to it.
914 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
915 code. Describe default %destructor form.
916 * src/parse-gram.y (grammar_declaration): Parse default
917 %printer/%destructor declarations.
918 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
919 and symbol_destructor_location_get rather than accessing the destructor
920 and destructor_location members of struct symbol.
921 (symbol_printers_output): Likewise but for %printer's.
922 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
923 again.
924 * src/symtab.c (default_destructor, default_destructor_location,
925 default_printer, default_printer_location): New static global
926 variables to record the default %destructor and %printer.
927 (symbol_destructor_get, symbol_destructor_location_get,
928 symbol_printer_get, symbol_printer_location_get): New functions to
929 compute the appropriate %destructor and %printer for a symbol.
930 (default_destructor_set, default_printer_set): New functions to set the
931 default %destructor and %printer.
932 * src/symtab.h: Prototype all those new functions.
933 * tests/actions.at (Default %printer and %destructor): New test to
934 check that the right %printer and %destructor are called, that they're
935 not called for $end, and that $$ and @$ work correctly.
936 (Default %printer and %destructor for user-declared end token): New
937 test to check that the default %printer and %destructor are called for
938 a user-declared end token.
939 * tests/input.at (Default %printer and %destructor redeclared, Unused
940 values with default %destructor): New tests to check related grammar
941 warnings and errors.
942
943 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
944
945 Clean up handling of %destructor for the end token (token 0).
946 Discussed starting at
947 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
948 and
949 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
950
951 Make the skeletons consistent in how they pop the end token and invoke
952 its %destructor.
953 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
954 state, which has token number 0, since this would invoke the
955 %destructor for the end token.
956 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
957 until after shifting the end token, or else it won't be popped.
958 * data/yacc.c (yyparse): Likewise.
959
960 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
961 it's the end token. Upon termination, destroy an unshifted lookahead
962 even when it's the end token.
963 * data/lalr1.cc (yy::parser::parse): Likewise.
964 * data/yacc.c (yyparse): Likewise.
965
966 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
967 value warnings for the end token when the user gives the end token a
968 %destructor.
969
970 * tests/actions.at (Printers and Destructors): Test all the above.
971
972 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
973
974 Update to latest gnulib and gettext versions.
975 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
976 Add fopen-safer.
977 (gnulib_files): Add m4/warning.m4. Don't worry about files
978 overwritten by autopoint.
979 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
980 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
981 rejects them.
982 Don't use autoreconf; instead, invoke autopoint etc. by hand,
983 so that we can remove the intl files at a better time.
984 (intl_files_to_remove): Remove aclocal.m4, since it gets
985 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
986 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
987 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
988 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
989 Remove datarootdir hack; no longer needed.
990 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
991 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
992 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
993 strdup.h.
994 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
995 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
996
997 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
998
999 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1000 it with --assume-autoconf='latest-stable'.
1001
1002 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1003
1004 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1005 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1006 YYSTYPE' and `{'.
1007 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1008 those from muscle_tab.c since the old ones are misleading.
1009
1010 2006-07-13 Akim Demaille <akim@epita.fr>
1011
1012 Support %define "KEY" {VALUE}.
1013 * src/scan-code.h, src/scan-code.l (translate_action)
1014 (translate_rule_action, translate_symbol_action, translate_code):
1015 Return char *, not const char *.
1016 * src/parse-gram.y (declaration): Rename as...
1017 (prologue_declaration): this.
1018 (string_content): Remove this nonterminal, use STRING.
1019 (braceless, content, content.opt): New nonterminal.
1020 Use them.
1021 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1022 as value.
1023 * src/scan-gram.l (getargs.h): Don't include it.
1024
1025 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1026
1027 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1028 rather than a for-loop that declares a local bool variable. This
1029 should work around a compatibility problem with a Cray x1e C++
1030 compiler reported by Hung Nguyen in
1031 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1032 The for-loop was introduced in the 2004-11-17 change but I don't
1033 know why it was needed.
1034
1035 2006-07-12 Akim Demaille <akim@epita.fr>
1036
1037 * data/c.m4: Comment changes.
1038
1039 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
1040
1041 * src/complain.c (error_message, ERROR_MESSAGE): New.
1042 To factor...
1043 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1044 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1045
1046 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1047
1048 * NEWS: Instead of %union, you can define and use your own union type
1049 YYSTYPE if your grammar contains at least one <type> tag.
1050 Your YYSTYPE need not be a macro; it can be a typedef.
1051 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1052 (Union Decl, Decl Summary): Document this.
1053 * data/glr.c (YYSTYPE): Implement this.
1054 * data/glr.cc (YYSTYPE): Likewise.
1055 * data/lalr1.cc (YYSTYPE): Likewise.
1056 * data/yacc.c (YYSTYPE): Likewise.
1057 * src/output.c (prepare): Output tag_seen_flag.
1058 * src/parse-gram.y (declaration, grammar_declaration):
1059 Use 'union_seen' rather than 'typed' to determine whether
1060 %union has been seen, since grammars can now be typed without
1061 %union.
1062 (symbol_declaration, type.opt, symbol_def):
1063 Keep track of whether a tag has been seen.
1064 * src/reader.c (union_seen, tag_seen): New vars.
1065 (typed): remove.
1066 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1067 * src/scan-code.l (untyped_var_seen): New variable.
1068 (handle_action_dollar): Adjust to above changes.
1069 (handle_action_dollar, handle_action_at):
1070 Improve overflow checking for outlandish numbers.
1071 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1072 avoid new diagnostics generated by above changes.
1073 * tests/regression.at (YYSTYPE typedef): Add test to check
1074 for type tags without %union.
1075
1076 * src/symlist.c (symbol_list_length): Return int, not unsigned
1077 int, since callers expect int. This may need to get revisited
1078 once we have proper integer overflow checking.
1079
1080 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1081 object is now static.
1082
1083 * src/getargs.c (flags_argmatch): Return void, not int,
1084 to pacify ./configure --enable-gcc-warnings.
1085
1086 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1087 since last_string is already defined to FLEX_PREFIX (last_string).
1088
1089 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1090
1091 Implement --warnings/-W.
1092 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1093 replaced by...
1094 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1095 Adjust callers.
1096 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1097 (warnings_args, warnings_types): New.
1098 (getargs, short_options, long_options): Accept -W/--warnings.
1099 Sort the options by alphabetical order, upper case letter right
1100 before its lower case.
1101
1102 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1103
1104 Change %merge result type clash warnings to errors. Discussed at
1105 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1106 * src/reader.c (record_merge_function_type): Use complain_at.
1107 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1108 declared later): Update test case results.
1109
1110 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1111
1112 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1113 to be in alphabetical order.
1114 (trace_args): Spelling fixes.
1115
1116 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1117
1118 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1119 so they don't collide with user-defined macros.
1120 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1121 this was never guaranteed, and now that we're using gnulib stdint,
1122 which defines int_fast16_t to long int, the problem is exposed.
1123
1124 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1125
1126 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1127 need the full POSIX semantics (and weren't implementing them
1128 anyway).
1129
1130 Adjust to Autoconf 2.60 and today's gnulib.
1131 * bootstrap (gnulib_modules): Add stdint.
1132 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1133 no longer copies it.
1134 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1135 since stdint needs the former and wcwidth (which is now required
1136 by mbswidth) needs the latter.
1137 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1138 work around a compatibility glitch between gettext 0.14.6 and
1139 Autoconf 2.60.
1140 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1141 Do not check for uintptr_t, since new stdint module does the right
1142 thing.
1143 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1144 Add stdint.h, stdint_.h, wcwidth.h.
1145 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1146 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1147 stdint.m4, wchar_t.m4, wcwidth.m4.
1148 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1149 usual order for ../lib/*.h files.
1150 (file_name_split): Use last_component, not base_name, to adjust
1151 to gnulib changes.
1152 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1153 for ../lib/*.h files.
1154 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1155 Define unconditionally, since we now assume the stdint module.
1156 * src/scan-skel.l: Include <dirname.h>.
1157 (BASE_QPUTS): Use last_component, not base_name.
1158 * src/system.h: Include <unlocked-io.h> in the usual order
1159 for ../lib/*.h files. Include <stdint.h> unconditionally,
1160 since we now use the stdint module.
1161 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1162 HAVE_UINTPTR_T, since we now use the stdint module.
1163 (base_name): Remove decl, since files now include <dirname.h>
1164 to get the decl.
1165
1166 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1167
1168 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1169 New, default to 1.
1170 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1171 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1172 default.
1173 * tests/calc.at: Adjust.
1174
1175 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1176
1177 * data/c.m4 (b4_basename): New.
1178 (b4_syncline): Also output the location of its invocation (from
1179 the skeleton).
1180 (b4_user_action, b4_define_user_action, b4_user_actions)
1181 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1182 (b4_user_stype): New.
1183 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1184
1185 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1186
1187 In the grammar file, the first column is 1 not 0 on the first line as
1188 on every other line.
1189 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1190 * tests/input.at (Torturing the Scanner): Update output.
1191
1192 * src/scan-gram.l (scanner_cursor): Declare it static.
1193
1194 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1195
1196 In warnings, say "previous declaration" rather than "first
1197 declaration".
1198 * src/symtab.c (redeclaration): Do that here.
1199 * src/reader.c (record_merge_function_type): In the case of a result
1200 type clash, report the previous declaration rather than the very first
1201 one in the grammar file.
1202 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1203 declared later): Add a third declaration to check this behavior.
1204 * tests/input.at (Incompatible Aliases): Update output.
1205
1206 2006-06-27 Akim Demaille <akim@epita.fr>
1207
1208 * doc/Doxyfile.in: New.
1209 * doc/Makefile.am: Use it.
1210 * src/lalr.h, src/symtab.h: Initial doxygenation.
1211
1212 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1213
1214 Don't miss %merge result type warnings just because the LHS types are
1215 declared after the %merge. This continues the effort of the previous
1216 patch.
1217 * src/reader.c (get_merge_function): Don't set the merger type yet.
1218 (record_merge_function_type): New function for setting the merger type
1219 and checking for clashes.
1220 (grammar_current_rule_merge_set): Set the location of the %merge for
1221 the current rule.
1222 (packgram): Invoke record_merge_function_type for each rule now that
1223 all symbol type declarations have been parsed.
1224 * src/reader.h (merger_list.type_declaration_location): New member
1225 storing the location of the first %merge from which the type for this
1226 merging function was derived.
1227 * src/symlist.h (symbol_list.merger_declaration_location): New member
1228 storing the location of a rule's %merge, if any.
1229 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1230 declared later): New test to catch the error fixed by the above patch.
1231
1232 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1233
1234 Get action warnings (grammar_rule_check) right even when symbol
1235 declarations appear after the rules. Discussed at
1236 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1237 and
1238 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1239 Don't mistake the type of $$ in a midrule to be that of its parent
1240 rule's $$.
1241 * src/reader.c (grammar_current_rule_end): Don't invoke
1242 grammar_rule_check yet since not all symbol declarations may have been
1243 parsed yet.
1244 (grammar_midrule_action): Likewise.
1245 Don't record whether the midrule's $$ has been used yet since actions
1246 haven't been translated yet.
1247 Record the midrule's parent rule and its RHS index within the parent
1248 rule.
1249 (grammar_current_rule_action_append): Don't translate the action yet
1250 since not all symbol declarations may have been parsed yet and, thus,
1251 warnings about types for $$, $n, @$, and @n can't be reported yet.
1252 (packgram): Translate the action and invoke grammar_rule_check now that
1253 all symbol declarations have been parsed.
1254 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1255 after parsing the entire grammar file, the symbol list here in the case
1256 of a midrule is actually the midrule's empty RHS, so reference its
1257 parent rule's RHS where necessary.
1258 On the other hand, now that you can already know it's a midrule, you
1259 aren't forced to think $$ has the same type as its parent rule's $$.
1260 (handle_action_at): In the case of a midrule, reference the parent rule
1261 where necessary.
1262 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1263 members.
1264 (symbol_list_length): Now that this is invoked after all rules have
1265 been parsed, a NULL symbol (rather than a NULL symbol list node)
1266 terminates a rule. symbol_list_print already does this correctly.
1267 * src/symlist.h (symbol_list.midrule_parent_rule,
1268 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1269 remember their relationships with their parents.
1270 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1271 fixed by the above patch.
1272 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1273 implementing...
1274 (Unused values): ... this old test case and...
1275 (Unused values before symbol declarations): ... this new test case.
1276 This one is the same as `Unused values' except that all symbol
1277 declarations appear after the rules in order to catch the rest of the
1278 errors fixed by the above patch.
1279
1280 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1281
1282 More cleanup.
1283 * src/reader.c (current_rule): Declare it static since it's no longer
1284 used outside this file.
1285 (grammar_current_rule_action_append): Remove redundant arguments from
1286 translate_rule_action invocation.
1287 * src/reader.h (current_rule): Remove this unused extern.
1288 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1289 * src/scan-code.l (translate_rule_action): Likewise.
1290
1291 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1292
1293 Clean up yesterday's patch.
1294 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1295 to...
1296 * src/reader.c (grammar_current_rule_action_append): ... here for
1297 consistency with grammar_current_rule_symbol_append.
1298 * tests/regression.at (Braced code in declaration in rules section):
1299 Make yyerror and yylex static as usual.
1300
1301 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1302
1303 Fix bug that mistakes braced code in a declaration in the rules section
1304 to be a rule action. Mentioned at
1305 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1306 * src/scan-gram.l: Move midrule action detection from the start of the
1307 scanning of any braced code to...
1308 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1309 action. For readability, use $2 and @2 rather than the equivalent
1310 global variables.
1311 * tests/regression.at (Braced code in declaration in rules section):
1312 New test to catch the error fixed by the above patch.
1313
1314 Work on code readability some.
1315 * src/scan-code.l (current_rule): Get rid of this misleading and
1316 redundant declaration: it's actually extern'ed in reader.h.
1317 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1318 translate_action): Add a rule argument and use it instead of the global
1319 current_rule.
1320 (translate_rule_action): This already receives current_rule through an
1321 argument, so pass it on to translate_action instead of assigning
1322 current_rule to current_rule.
1323 (translate_symbol_action, translate_code): Pass rule = NULL to
1324 translate_action.
1325
1326 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1327
1328 Rename %before-definitions to %start-header and %after-definitions to
1329 %end-header. Don't use these declarations to separate pre-prologue
1330 blocks from post-prologue blocks. Add new order-independent
1331 declarations %before-header and %after-header as alternatives to the
1332 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1333 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1334 * NEWS (2.3+): Update for these changes.
1335 * data/glr.c (b4_before_definitions): Update to...
1336 (b4_start_header): ... this.
1337 (b4_after_definitions): Update to...
1338 (b4_end_header): ... this.
1339 * data/glr.cc: Likewise.
1340 * data/lalr1.cc: Likewise.
1341 * data/yacc.c: Likewise.
1342 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1343 prologue blocks with %*-header declarations.
1344 (Calc++ Parser): Likewise.
1345 (Bison Declaration Summary): Update names.
1346 (Bison Symbols): Update description.
1347 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1348 (PERCENT_END_HEADER): ... this.
1349 (PERCENT_BEFORE_DEFINITIONS): Update to...
1350 (PERCENT_START_HEADER): ... this.
1351 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1352 (declaration): Update token names and m4 macro names.
1353 When parsing %end-header and %start-header, invoke translate_code
1354 before muscle_code_grow, and no longer set global booleans to remember
1355 whether these declarations have been seen.
1356 Parse new %after-header and %before-header.
1357 * src/reader.c (before_definitions, after_definitions): Remove.
1358 (prologue_augment): Accept a new bool argument to specify whether to
1359 augment the pre-prologue or post-prologue.
1360 * src/reader.h (before_definitions, after_definitions): Remove these
1361 extern's.
1362 (prologue_augment): Add new bool argument.
1363 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1364 (PERCENT_END_HEADER): ... this.
1365 (PERCENT_BEFORE_DEFINITIONS): Update to...
1366 (PERCENT_START_HEADER): ... this.
1367 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1368 * tests/actions.at (Printers and Destructors): Update names.
1369
1370 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 Add comparison operators for C++ location classes. Discussed at
1373 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1374 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1375 declaration indicating whether filename_type has an operator==. If
1376 filename_type is `std::string', it defaults to `1', `0' otherwise.
1377 * data/location.cc: Iff b4_define_location_comparison is `1', add
1378 operator== and operator!= for class position and for class location.
1379
1380 Some minor fixes.
1381 * src/scan-action.l: Remove unused file.
1382 * src/symtab.c (symbol_printer_set): Use printer_location not
1383 destructor_location.
1384 * src/symtab.h (struct symbol): Replace incorrect source comment for
1385 printer members.
1386 * tests/input.at (Incompatible Aliases): Update output with correct
1387 printer location.
1388
1389 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 Don't put the pre-prologue in the header file. For the yacc.c code
1392 file and the glr.c header and code files, move the pre-prologue before
1393 the token definitions. Add new %before-definitions and
1394 %after-definitions to declare code that will go in both the header file
1395 and code file. Discussed at
1396 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1397 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1398 and
1399 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1400 * NEWS (2.3+): Describe these changes.
1401 * data/glr.c (b4_pre_prologue): Move from within to before...
1402 (b4_shared_declarations): ... this.
1403 Add new b4_before_definitions before b4_token_enums.
1404 Add new b4_after_definitions at the end.
1405 * data/glr.cc (b4_pre_prologue): Replace with...
1406 (b4_before_definitions): ... this in the header file.
1407 (b4_after_definitions): New near the end of the header file.
1408 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1409 code file right before including the header file.
1410 (b4_before_definitions): New in the previous position of
1411 b4_pre_prologue in the header file.
1412 (b4_after_definitions): New near the end of the header file.
1413 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1414 (b4_token_enums_defines): In the code file, move to right before
1415 YYSTYPE for consistency with the header file.
1416 (b4_before_definitions): New right before b4_token_enums_defines in
1417 both the header and code file.
1418 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1419 header and code file.
1420 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1421 of prologues for %union dependencies.
1422 (Bison Declaration Summary): In %defines description, mention the
1423 effect of %before-definitions and %after-definitions on the header
1424 file.
1425 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1426 than in the pre-prologue so that make check succeeds.
1427 (Bison Symbols): Add entries for %before-definitions and
1428 %after-definitions.
1429 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1430 %before-definitions.
1431 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1432 (declaration): Parse those declarations and append to
1433 b4_before_definitions and b4_after_definitions, respectively.
1434 * src/reader.c (before_definitions, after_definitions): New bools to
1435 track whether those declarations have been seen.
1436 (prologue_augment): Add to the post-prologue if %union,
1437 %before-definitions, or %after-definitions has been seen.
1438 * src/reader.h (before_definitions, after_definitions): New extern's.
1439 * src/scan-gram.l: Scan the new declarations.
1440 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1441 prologue block in a %before-definitions or a %after-definitions based
1442 on whether the %union is declared.
1443 * tests/regression.at (Early token definitions with --yacc, Early token
1444 definitions without --yacc): Move tests for token definitions into the
1445 post-prologue since token names are no longer defined in the
1446 pre-prologue.
1447
1448 2006-06-20 Akim Demaille <akim@epita.fr>
1449
1450 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1451 (symbol_get): Use it.
1452 * src/parse-gram.y: Use it.
1453
1454 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1455
1456 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1457 build succeeds when configured with --enable-gcc-warnings.
1458
1459 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1460
1461 * src/parse-gram.y (char_name): New function.
1462 (CHAR, STRING, string_content): For %printer, properly escape.
1463 (ID): Prefer fputs to fprintf.
1464 (id): Reindent to be consistent with other rules.
1465 Properly quote char.
1466
1467 The Translation Project changed its way of publishing translations
1468 to maintainers. I haven't received any responses to my request
1469 for supporting the old way, or for documenting the new way. I
1470 have modified 'bootstrap' to use screen scraping
1471 (in this case, HTML scraping). This is unreliable and inelegant,
1472 but I don't see any better way. Yuck.
1473 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1474 (get_translations): New function, which uses HTML scraping to
1475 deduce locations of latest translations.
1476 Use this function to grab both bison and bison-runtime .po files.
1477 Don't bother priming the pump for the runtime-po domain any more,
1478 as it's now translated better than bison is.
1479
1480 2006-06-19 Akim Demaille <akim@epita.fr>
1481
1482 * src/scan-gram.l: No longer "parse" things after `%union' until
1483 `{'. Rather, return a single "%union" token.
1484 No longer make symbols: return strings, and leave the conversion
1485 to symbols to the parser.
1486 (SC_PRE_CODE, token_type): Remove.
1487 * src/parse-gram.y (%union): New field `character'.
1488 Sort tokens.
1489 (CHAR): New token.
1490 (ID, ID_COLON): Now that the scanner no longer makes them
1491 identifiers, adjust all uses to invoke symbol_get.
1492 (id_colon): New, wraps the conversion from string to symbol.
1493 (%union): Accept a possible union_name.
1494 (symbol): Now can be a char.
1495 * data/c.m4 (b4_union_name): Leave a default value.
1496 * data/glr.c, data/yacc.c: Use it.
1497
1498 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1499
1500 For associating token numbers with token names for "yacc.c", don't use
1501 #define statements unless `--yacc' is specified; always use enum
1502 yytokentype. Most important discussions start at:
1503 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1504 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1505 and
1506 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1507 * NEWS (2.3+): Mention.
1508 * data/c.m4 (b4_yacc_if): New.
1509 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1510 token #define's.
1511 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1512 on token name definitions.
1513 * src/getargs.c (usage): Capitalize `Yacc' in English.
1514 * src/output.c (prepare): Define b4_yacc_flag.
1515 * tests/regression.at (Early token definitions): Test that tokens names
1516 are defined before the pre-prologue not just before the post-prologue.
1517 Remove this test case and copy to...
1518 (Early token definitions with --yacc): ... this to test #define's.
1519 (Early token definitions without --yacc): ... and this to test enums.
1520
1521 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1522
1523 * NEWS: Reword the post-2.3 change to not be so optimistic about
1524 removing the old "look-ahead" spelling.
1525 Update previous look-ahead/lookahead change reports.
1526 * REFERENCES: look-ahead -> lookahead (since that's
1527 what he actually wrote).
1528 * doc/refcard.tex: look ahead -> lookahead,
1529 look-ahead -> lookahead
1530
1531 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1532
1533 For consistency, use `lookahead' instead of `look-ahead' or
1534 `look_ahead'. Discussed starting at
1535 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1536 and then at
1537 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1538 * NEWS: For the next release, note the change to `--report'.
1539 * TODO, doc/bison.1: Update English.
1540 * doc/bison.texinfo: Update English.
1541 (Understanding Your Parser, Bison Options): Document as
1542 `--report=lookahead' rather than `--report=look-ahead'.
1543 * src/conflicts.c: Update English in comments.
1544 (lookahead_set): Rename from look_ahead_set.
1545 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1546 (resolve_sr_conflict): Rename local look_ahead_tokens to
1547 lookahead_tokens, and update other uses.
1548 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1549 count_rr_conflicts, conflicts_free): Update uses.
1550 * src/getargs.c (report_args): Move "lookahead" before alternate
1551 spellings.
1552 (report_types): Update uses.
1553 (usage): For `--report' usage description, state `lookahead' spelling
1554 rather than `look-ahead'.
1555 * src/getargs.h (report.report_lookahead_tokens): Rename from
1556 report_look_ahead_tokens.
1557 * src/lalr.c: Update English in comments.
1558 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1559 (state_lookahead_tokens_count): Rename from
1560 state_look_ahead_tokens_count.
1561 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1562 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1563 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1564 Update other uses.
1565 Update English in output.
1566 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1567 * src/print.c: Update English in comments.
1568 (lookahead_set): Rename from look_ahead_set.
1569 (print_reduction): Rename argument lookahead_token from
1570 look_ahead_token.
1571 (print_core, state_default_rule, print_reductions, print_results):
1572 Update uses.
1573 * src/print_graph.c: Update English in comments.
1574 (print_core): Update uses.
1575 * src/state.c: Update English in comments.
1576 (reductions_new): Update uses.
1577 (state_rule_lookahead_tokens_print): Rename from
1578 state_rule_look_ahead_tokens_print, and update other uses.
1579 * src/state.h: Update English in comments.
1580 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1581 (state_rule_lookahead_tokens_print): Rename from
1582 state_rule_look_ahead_tokens_print.
1583 * src/tables.c: Update English in comments.
1584 (conflict_row, action_row): Update uses.
1585 * tests/glr-regression.at
1586 (Incorrect lookahead during deterministic GLR,
1587 Incorrect lookahead during nondeterministic GLR): Rename
1588 print_look_ahead to print_lookahead.
1589 * tests/torture.at: Update English in comments.
1590 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1591 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1592 (Many lookahead tokens): Update uses.
1593 * data/glr.c: Update English in comments.
1594 * lalr1.cc: Likewise.
1595 * yacc.c: Likewise.
1596 * src/conflicts.h: Likewise.
1597 * src/lalr.h: Likewise.
1598 * src/main.c: Likewise.
1599 * src/output.c: Likewise.
1600 * src/parse-gram.c: Likewise.
1601 * src/tables.h: Likewise.
1602 * tests/calc.at: Likewise.
1603
1604 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1605
1606 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1607
1608 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1609
1610 * TODO: Add request from Nelson H. F. Beebe to be able to install
1611 Bison without installing the yacc script.
1612
1613 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1614
1615 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1616 and yytext if they're already #define'd.
1617 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1618 * src/scan-code-c.c: ... here.
1619 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1620 <config.h>.
1621
1622 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1623
1624 Get Bison to build again when configured with --enable-gcc-warnings.
1625 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1626 missing #include's.
1627 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1628 loc argument as it shadows a global.
1629 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1630 invocation.
1631
1632 * src/.cvsignore: Add scan-code.c.
1633
1634 2006-06-07 Akim Demaille <akim@epita.fr>
1635
1636 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1637 to...
1638 * src/scan-code.l: here.
1639 * tests/input.at (Torturing the Scanner): Fix another location
1640 error.
1641
1642 2006-06-07 Akim Demaille <akim@epita.fr>
1643
1644 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1645
1646 2006-06-06 Akim Demaille <akim@epita.fr>
1647
1648 Extract the parsing of user actions from the grammar scanner.
1649 As a consequence, the relation between the grammar scanner and
1650 parser is much simpler. We can also split "composite tokens" back
1651 into simple tokens.
1652 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1653 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1654 rename as...
1655 * src/location.h, src/location.c (add_column_width)
1656 (location_compute): these.
1657 Fix the column count: the initial column is 0.
1658 (location_print): Be robust to ending column being 0.
1659 * src/location.h (boundary_set): New.
1660 * src/main.c: Adjust to scanner_free being renamed as
1661 gram_scanner_free.
1662 * src/output.c: Include scan-code.h.
1663 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1664 Use boundary_set.
1665 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1666 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1667 which is now, again, a separate token.
1668 Adjust all dependencies.
1669 Whereever actions with $ and @ are used, use translate_code.
1670 (action): Remove this nonterminal which is now useless.
1671 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1672 (grammar_current_rule_action_append): Use translate_code.
1673 (packgram): Bound check ruleno, itemno, and rule_length.
1674 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1675 (last_string, last_braced_code_loc, max_left_semantic_context)
1676 (scanner_initialize, scanner_free, scanner_last_string_free)
1677 (gram_out, gram_lineno, YY_DECL_): Move to...
1678 * src/scan-gram.h: this new file.
1679 (YY_DECL): Rename as...
1680 (GRAM_DECL): this.
1681 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1682 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1683 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1684 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1685 Move these declarations, and...
1686 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1687 these to...
1688 * src/flex-scanner.h: this new file.
1689 * src/scan-gram.l (rule_length, rule_length_overflow)
1690 (increment_rule_length): Remove.
1691 (last_braced_code_loc): Rename as...
1692 (gram_last_braced_code_loc): this.
1693 Adjust to the changes of the parser.
1694 Move all the handling of $ and @ into...
1695 * src/scan-code.l: here.
1696 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1697 (handle_action_dollar, handle_action_at): Move to...
1698 * src/scan-code.l: here.
1699 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1700 scan-code.h, scan-code-c.c, scan-gram.h.
1701 (EXTRA_bison_SOURCES): Add scan-code.l.
1702 (BUILT_SOURCES): Add scan-code.c.
1703 (yacc): Be robust to white spaces.
1704
1705 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1706 * tests/regression.at: Adjust the column numbers.
1707 * tests/regression.at: Adjust the error message.
1708
1709 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1710
1711 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1712 Use Akim's wording from
1713 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1714
1715 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1716
1717 Between Bison releases, manually append `+' to the previous Bison
1718 release number, and use that as a signal to automatically print the
1719 ChangeLog's CVS Id keyword from --version. Discussed starting at
1720 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1721 * ChangeLog: Add Id header.
1722 * configure.ac (AC_INIT): Append `+' to `2.3'.
1723 * src/.cvsignore: Add revision.c.
1724 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1725 (BUILT_SOURCES): Add revision.c.
1726 (revision.c): New target rule. This file defines a new global variable
1727 named revision. It initializes it with either the Id from ChangeLog
1728 or, if VERSION doesn't contain `+', with the empty string.
1729 * src/getargs.c (version): Print the value of revision.
1730 * src/revision.h: Extern revision.
1731
1732 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1733
1734 * NEWS: Version 2.3.
1735 * configure.ac (AC_INIT): Likewise.
1736
1737 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1738
1739 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1740 with no arguments, not as an object-like macro. This is for
1741 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1742 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1743 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1744 Document this.
1745
1746 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1747
1748 * src/getargs.c (usage): Back out yesterday's modification of the
1749 --help output so that we don't have to wait for translation before
1750 releasing 2.3.
1751
1752 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1753
1754 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1755 Problem reported by Akim Demaille.
1756
1757 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1760
1761 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1762
1763 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1764 generated source code. Problem reported by Frans Englich in
1765 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1766
1767 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1768
1769 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1770 shell, not within 'make', so that 'make' by an ordinary builder
1771 (using GNU make) does not worry about configuring gzip. This also
1772 works around a bug reported independently by Keith Thompson and by
1773 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1774 stderr rather than stdout, messing up the build logs.
1775
1776 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1777
1778 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1779 to make sure that YYID will never be unused. This fixes a 'make
1780 maintainer-check' failure caused by the recent changes to the 'Trivial
1781 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1782 not used.
1783 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1784
1785 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1786
1787 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1788 state before an empty RHS is always resolved here. Only the location
1789 of that state is guaranteed to be resolved, and that's enough. This
1790 fixes the remaining bug reported by Derek M. Jones in
1791 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1792 * tests/glr-regression.at (Uninitialized location when reporting
1793 ambiguity): Test the above case.
1794 Also, the embedded comments in this test case claim it checks the case
1795 of an empty RHS that has inherited the initial location. However, the
1796 corresponding LHS was already resolved, so yyresolveLocations didn't
1797 actually have reason to modify it. Fix this by forcing
1798 nondeterministic operation at the beginning of the parse.
1799
1800 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1801
1802 * data/c.m4 (b4_yy_symbol_print_generate):
1803 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1804 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1805 of the bugs reported today by Derek M Jones in
1806 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1807 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1808 defined to be a type name without parens or brackets.
1809 (Location Type): Similarly for YYLTYPE.
1810 * tests/regression.at (Trivial grammars): Put in a test for this
1811 bug that will be caught by 'make maintainer-check' (though not,
1812 alas, by 'make check' unless your compiler is picky).
1813
1814 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1815
1816 * NEWS: Version 2.2.
1817 * configure.ac (AC_INIT): Likewise.
1818
1819 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1820
1821 * data/glr.c (yyreportTree): Make room in yystates for the state
1822 preceding the RHS. This fixes the segmentation fault reported by Derek
1823 M. Jones in
1824 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1825 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1826 to the user. Reported for yyreportTree by Derek M. Jones later in the
1827 same thread.
1828 * THANKS: Add Derek M. Jones.
1829 Update my email address.
1830 Fix typo in Steve Murphy's name.
1831
1832 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1833
1834 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1835 checking against YYLAST that caused the parser to miss a potential
1836 alternative in its diagnostic.
1837 Problem reported by Maria Jose Moron Fernandez in
1838 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1839 * data/lalr1.cc (yysyntax_error_): Likewise.
1840 * data/yacc.c (yysyntax_error): Likewise.
1841 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1842 tokens, in case we run into an older C compiler.
1843 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1844 Use them to check for the off-by-one error fixed above.
1845
1846 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1847 YYSIZE_T, not size_t.
1848 * tests/regression.at (Trivial grammars): New test, to catch
1849 the error fixed by the above patch.
1850
1851 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1852
1853 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1854 scheme.
1855 Reported by Steve Murphy.
1856
1857 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1858
1859 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1860 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1861
1862 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1863
1864 Implement --trace=m4.
1865 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1866 * src/output.c (output_skeleton): When set, pass -dV to m4.
1867
1868 Factor the handling of flags in m4.
1869 * src/output.c (prepare): Rename the muscle names debug, defines,
1870 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1871 * data/c.m4: Adjust.
1872 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1873 Use b4_define_flag_if to define other b4_FLAG_if macros.
1874 (b4_location_if): As a consequence, rename as...
1875 (b4_locations_if): this, for consistency.
1876 Adjust all the skeletons.
1877
1878 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1879
1880 * etc/bench.pm: Shorten bench names.
1881
1882 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1883
1884 * src/output.h, src/output.c (error_verbose): Move to...
1885 * src/getargs.h, src/getargs.c: here.
1886 Sort the flags.
1887 Adjust dependencies.
1888
1889 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1890
1891 * data/c.m4 (b4_copyright): Put the special exception for Bison
1892 skeletons here, so we don't have to put it in each skeleton. All
1893 uses changed. Suggested by Akim Demaille. Also, wrap the
1894 copyright notice, in case it is longer than 80 columns. Replace
1895 comma by newline after title.
1896
1897 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1898
1899 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1900 incompatibility, not a bug. Mention that it wasn't fixed as of
1901 flex 2.5.33.
1902
1903 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1904
1905 * examples/extexi: Enforce the precedence of concatenation over
1906 >>.
1907 Reported by Tommy Nordgren.
1908
1909 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1910
1911 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1912 with the member "token".
1913 Reported by Martin Nylin.
1914
1915 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1916
1917 * data/glr.c: Switch to Bison 2.2 special-exception language in
1918 the copyright notice. Use more-regular format for titles and
1919 copyright notices.
1920 * data/glr.cc: Likewise.
1921 * data/location.cc: Likewise.
1922 * data/yacc.cc: Likewise.
1923 * doc/bison.texinfo (Conditions): Document this.
1924 * NEWS: likewise. Upgrade version to 2.2.
1925
1926 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1927
1928 * data/glr.cc: Remove dead code.
1929
1930 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1931
1932 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1933 that variable and the line breaks the bootstrap. Problem reported
1934 by Juan M. Guerrero.
1935
1936 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1937
1938 * doc/bison.texinfo (Multiple start-symbols): New.
1939
1940 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1941
1942 * etc/README, etc/bench.pl: New.
1943
1944 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1945
1946 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1947 rule.
1948 Reported by Mickael Labau.
1949 * tests/input.at (Torturing the Scanner): Test it.
1950
1951 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1952
1953 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1954 Problem reported by Bob Rossi.
1955
1956 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1957
1958 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1959 and didn't really work.
1960 For the index, use @ifnotinfo, not @iftex.
1961 Minor cleanups of spacing and terminology.
1962
1963 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1964
1965 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1966 of AT_NAME_PREFIX when %name-prefix is not used.
1967
1968 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1969
1970 Apply --prefix to C++ skeletons too: they change the namespace.
1971 The test suite already exercize these cases.
1972 * data/c++.m4 (b4_namespace): New.
1973 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1974 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1975 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1976 * doc/bison.texinfo: Document it.
1977 (Option Cross Key): Use @multitable in all formats. It looks
1978 nicer, even in TeX outputs.
1979 (Rules): Use the same code whatever the output type is.
1980 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1981 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1982 * tests/calc.at: Use it, instead of hard coding `yy'.
1983
1984 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1985
1986 * TODO: Remove dead items.
1987
1988 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1989
1990 * doc/FAQ: Remove, merged into...
1991 * doc/bison.texinfo (FAQ): this.
1992 * doc/Makefile.am (EXTRA_DIST): Adjust.
1993
1994 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1995
1996 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1997 even if empty.
1998 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1999 * doc/bison.texinfo (Calc++ Scanner): Use it.
2000
2001 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2002
2003 Fix two nits reported by twlevo, plus one more that I discovered.
2004
2005 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2006 this is the usual Bison style.
2007 * src/location.h (location_print): Likewise.
2008
2009 * src/reader.h (token_name): Likewise.
2010
2011 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2012
2013 Fix some nits reported by twlevo.
2014 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2015 and "POSIX". Use more-modern syntax for URLs. Mention C++
2016 and ask for Java. Don't hardwire OS version numbers. Add
2017 copyright notice.
2018 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2019 * src/conflicts.c (solved_conflicts_obstack): Now static.
2020
2021 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2022
2023 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2024 page. Say "you can use it" not "you may use it" as on the web page;
2025 we're describing capabilities not granting permission.
2026
2027 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2028
2029 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2030 shadowing warnings. Use usual patter for iterating through RHS.
2031 * tests/glr-regression.at
2032 (Uninitialized location when reporting ambiguity):
2033 Modify yylex so that it uses its argument, rather than trying
2034 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2035 const char -> char const.
2036
2037 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2038 Don't use tabs inside commands; it messes up 'ps'.
2039 Problem reported by twlevo.
2040
2041 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 * tests/glr-regression.at (Uninitialized location when reporting
2044 ambiguity): New test case.
2045 * data/glr.c (yyresolveLocations): New function, which uses
2046 YYLLOC_DEFAULT.
2047 (yyresolveValue): Invoke yyresolveLocations before reporting an
2048 ambiguity.
2049 * doc/bison.texinfo (Default Action for Locations): Note
2050 YYLLOC_DEFAULT's usage for ambiguity locations.
2051 (GLR Semantic Actions): Cross-reference those notes.
2052
2053 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2054
2055 * tests/glr-regression.at (Leaked semantic values when reporting
2056 ambiguity): Remove unnecessary union and type declarations.
2057 (Leaked lookahead after nondeterministic parse syntax error): New test
2058 case.
2059 * data/glr.c (yyparse): Check for zero stacks remaining before
2060 attempting to shift the lookahead so that you don't lose it.
2061
2062 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2063
2064 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2065 * tests/glr-regression.at (Leaked semantic values when reporting
2066 ambiguity): New test case.
2067 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2068 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2069 now unnecessary yystackp parameter.
2070 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2071 destructors can be called.
2072
2073 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2074 in existing testcases.
2075
2076 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2077
2078 Don't leak semantic values for parent RHS when a user action cuts the
2079 parser, and clean up related code a bit.
2080 * tests/glr-regression.at (Leaked merged semantic value if user action
2081 cuts parse): Rename to...
2082 (Leaked semantic values if user action cuts parse): ... this. Add check
2083 for leaked parent RHS values.
2084 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2085 between an unresolved state (non-empty chain of semantic options) and
2086 an incomplete one (signaled by an empty chain).
2087 (yyresolveStates): Document the interface. Move all manipulation of a
2088 successfully or unsuccessfully resolved yyGLRState to...
2089 (yyresolveValue): ... here so that yyresolveValue always leaves a
2090 yyGLRState with consistent data and thus is easier to understand.
2091 Remove the yyvalp and yylocp parameters since they are always just
2092 taken from the yys parameter. When reporting a discarded merged value
2093 in debugging output, note that it is incompletely merged. Document the
2094 interface.
2095 (yyresolveAction): If resolving any of the RHS states fails, destroy
2096 them all rather than leaking them. Thus, as long as user actions are
2097 written to clean up the RHS correctly, yyresolveAction always cleans up
2098 the RHS of a semantic option. Document the interface.
2099
2100 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2101
2102 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2103 led to a segmentation fault in GNU Pascal. Problem reported
2104 by Waldek Hebisch.
2105
2106 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2107
2108 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2109 mid-rule action inside a nonterminal symbol in order to declare a
2110 destructor for its semantic value.
2111
2112 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2113
2114 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2115 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2116 __cplusplus && ! defined _STDLIB_H && !
2117 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2118 defined free))]: Include <stdlib.h> rather than rolling our own
2119 declarations of malloc and free, to avoid problems with
2120 incompatible declarations (using 'throw') C++'s stdlib.h. This
2121 should fix Debian bug 340012
2122 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2123 reported by Guillaume Melquiond.
2124
2125 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2126
2127 * NEWS: Clarify symbols versus types in unused-value warnings.
2128
2129 * configure.ac (AC_INIT): Bump version number.
2130
2131 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2132
2133 * NEWS: Version 2.1a.
2134 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2135 since C99 requires this.
2136
2137 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2138
2139 * m4/c-working.m4: New file.
2140 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2141
2142 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2143
2144 * Makefile.maint: Merge from coreutils.
2145
2146 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2147
2148 More portability fixes for problems summarized by Nelson H. F. Beebe.
2149
2150 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2151 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2152 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2153 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2154 messes up because C++ code is compiled in 32-bit mode but linked
2155 in 64-bit mode.
2156
2157 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2158
2159 More portability fixes for problems summarized by Nelson H. F. Beebe.
2160
2161 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2162 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2163
2164 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2165 nodist_PROGRAMS, since we don't need to actually compile the
2166 example if we're just doing a plain 'make'. This avoids bothering
2167 the installer unnecessarily about problems due to weird C++
2168 compilers.
2169
2170 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2171
2172 More portability fixes for problems summarized by Nelson H. F. Beebe.
2173
2174 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2175 than #include "...", and compile with -I'.'. The old method was
2176 not portable, according to Posix and the C standard, and it does
2177 not work with Sun C 5.7, where previous #line directives affect
2178 the working directory used in later #include "..." directives.
2179
2180 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2181
2182 Various DJGGP specific issues in /djgpp
2183
2184 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2185
2186 More portability fixes for problems summarized by Nelson H. F. Beebe.
2187
2188 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2189 '#include <map>' works and that you can apply ++ to iterators.
2190
2191 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2192
2193 Work around portability problems summarized by Nelson H. F. Beebe in
2194 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2195
2196 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2197 that '#include <string>' works.
2198
2199 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2200 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2201 "warning: sorry: semantics of inline function static data `const
2202 unsigned char translate_table[262]' are wrong (you'll wind up with
2203 multiple copies)".
2204
2205 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2206 or, xor to not_, and_, or_, and xor_, respectively. This works
2207 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2208 random system header somewhere that includes the equivalent of
2209 <iso646.h>.
2210
2211 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2212 -E" works; it apparently doesn't work with PathScale EKO Compiler
2213 Suite Version 2.0.
2214
2215 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2216
2217 During deterministic GLR operation, user actions should be able to
2218 influence the parse by changing yychar. To make this easier to fix and
2219 to make glr.c easier to evolve in general, don't maintain yytoken in
2220 parallel with yychar; just compute yytoken when needed.
2221 * tests/glr-regression.at (Incorrect lookahead during deterministic
2222 GLR): Check that setting yychar in a user action has the intended
2223 effect.
2224 * data/glr.c (yyGLRStack): Remove yytokenp member.
2225 (yyclearin): Don't set *yytokenp.
2226 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2227 yychar rather than *yytokenp to determine the current lookahead.
2228 Compute yytoken locally when needed.
2229 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2230 point to.
2231
2232 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2233 after `--report' documentation.
2234
2235 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2236
2237 * src/parse-gram.y (grammar_declaration): Location of printer
2238 symbol is @1, not list->location. Bug reported by twlevo.
2239 * tests/input.at (Incompatible Aliases): Adjust to above change.
2240
2241 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2242
2243 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2244 all the test at once. This makes the output easier to read in the
2245 normal case.
2246
2247 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2248 got from <http://bro-ids.org/download.html>. The bug is that
2249 when two actions appeared in succession, the second one was
2250 scanned before the first one was added to the grammar rule
2251 as a midrule action. Bison then output the incorrect warning
2252 "parse.y:905.17-906.36: warning: unused value: $3".
2253 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2254 associated with a value.
2255 (rhs): Don't invoke grammar_current_rule_action_append.
2256 (action): Invoke it here instead.
2257 * src/reader.c (grammar_midrule_action): Now extern.
2258 (grammar_current_rule_action_append): Don't invoke
2259 grammar_midrule_action; that is now the scanner's job.
2260 * src/reader.h (last_string, last_braced_code_loc):
2261 (grammar_midrule_action): New decls.
2262 * src/scan-gram.l (last_string): Now extern, sigh.
2263 (last_braced_code_loc): New extern variable.
2264 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2265 rule already has an action.
2266 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2267 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2268 Add some tests to check that the above changes fixed the bug.
2269
2270 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2271
2272 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2273 All used changed. Check whether the symbol has a destructor,
2274 not whether it is typed.
2275 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2276 that the values are still reported as unused. All line numbers
2277 adjusted.
2278
2279 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2280
2281 Work around a bug in bro 0.8, which underparenthesizes its
2282 definition of YYLLOC_DEFAULT.
2283 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2284 their arguments.
2285 * data/lalr1.cc: Likewise.
2286 * data/yacc.cc: Likewise.
2287
2288 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2289
2290 Work around a bug in Pike 7.0, and give the Pike folks a
2291 better way to override the usual int widths.
2292 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2293 user can override the types.
2294 (short): #undef, to work around a bug in Pike 7.0.
2295 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2296 (union yyalloc.yyss): Use yytype_int16 rather than short.
2297 All uses changed.
2298 (yysigned_char): Remove.
2299 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2300 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2301 * tests/regression.at (Web2c Actions): Adjust to above changes.
2302
2303 * src/reader.c (check_and_convert_grammar): New function.
2304 (reader): Close the input file even if something went wrong during
2305 parsing. Minor file descriptor leak reported by twlevo.
2306
2307 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2308 to pacify gcc -Wswitch-default.
2309 * src/scan-gram.l (adjust_location): Use a default: break; case
2310 to pacify gcc -Wswitch-default.
2311 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2312 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2313 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2314 Move these decls to scan-skel.l, since they don't need to be
2315 visible elsewhere.
2316 * src/scan-skel.l: Accept the above decls.
2317 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2318 is used.
2319
2320 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2321
2322 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2323 since we don't want to insist on a version number at the start
2324 of the changelog every time.
2325 * Makefile.maint: Sync from coreutils a bit better.
2326 (sc_trailing_blank): Renamed from sc_trailing_space.
2327 All uses changed.
2328 (sc_no_if_have_config_h, sc_require_config_h):
2329 (sc_prohibit_assert_without_use): New rules.
2330 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2331 (sc_dd_max_sym_length): Fix leading spaces in rule.
2332 (sc_system_h_headers): Prefix with @.
2333 (sc_useless_cpp_parens, m4-check): Output line numbers.
2334 (changelog-check): Allow version only in head.
2335 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2336 satisfy new Makefile.maint rule.
2337 * data/glr.c: Likewise.
2338 * data/glr.cc: Likewise.
2339 * data/lalr1.cc: Likewise.
2340 * data/yacc.c: Likewise.
2341 * lib/ebitsetv.c: Likewise.
2342 * lib/lbitset.c: Likewise.
2343 * lib/subpipe.c: Likewise.
2344 * lib/timevar.c: Likewise.
2345 * src/system.h: Likewise.
2346 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2347 * djgpp/Makefile.maint: Add copyright notice.
2348 * djgpp/README.in: Likewise.
2349 * djgpp/config.bat: Likewise.
2350 * djgpp/config.site: Likewise.
2351 * djgpp/config_h.sed: Likewise.
2352 * djgpp/djunpack.bat: Likewise.
2353 * djgpp/config.sed: Fix copyright notice to match standard format.
2354 * djgpp/subpipe.h: Likewise.
2355 * lib/bitsetv-print.c: Likewise.
2356 * lib/bitsetv.c: Likewise.
2357 * lib/subpipe.h: Likewise.
2358 * lib/timevar.c: Likewise.
2359 * lib/timevar.h: Likewise.
2360 * djgpp/subpipe.c: Use standard recipe for config.h.
2361 * lib/abitset.c: Likewise.
2362 * lib/bitset.c: Likewise.
2363 * lib/bitset_stats.c: Likewise.
2364 * lib/bitsetv-print.c: Likewise.
2365 * lib/bitsetv.c: Likewise.
2366 * lib/ebitsetv.c: Likewise.
2367 * lib/get-errno.c: Likewise.
2368 * lib/lbitset.c: Likewise.
2369 * lib/subpipe.c: Likewise.
2370 * lib/timevar.c: Likewise.
2371 * lib/vbitset.c: Likewise.
2372 * tests/local.at: Likewise.
2373 * src/scan-gram.l: Don't include verify.h, since system.h does
2374 that for us.
2375 * .x-sc_require_config_h: New file.
2376 * .x-sc_unmarked_diagnostics: New file.
2377
2378 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2379
2380 Be a bit more systematic about using 'abort'.
2381 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2382 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2383 Put 'default: abort ();' before some other case, to satisfy older
2384 pedantic compilers.
2385 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2386 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2387 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2388 * src/conflicts.c (resolve_sr_conflict): Likewise.
2389 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2390 (get_decision_str, get_orientation_str, get_node_alignment_str):
2391 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2392 (get_linestyle_str, get_arrowstyle_str): Likewise.
2393 * src/conflicts.c (resolve_sr_conflict):
2394 Use a default case rather than one for the one remaining enum
2395 value, to catch invalid enum values as well.
2396 * src/lalr.c (set_goto_map, map_goto):
2397 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2398 * src/nullable.c (nullable_compute, token_definitions_output):
2399 Likewise.
2400 * src/reader.c (packgram, reader): Likewise.
2401 * src/state.c (transitions_to, state_new, state_reduction_find):
2402 Likewise.
2403 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2404 (symbol_pack): Likewise.
2405 * src/tables.c (conflict_row, pack_vector): Likewise.
2406 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2407 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2408 * src/system.h: Don't include <assert.h>.
2409 (assert): New macro.
2410
2411 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2412 (Destructor Decl, Parser Function, Pure Calling):
2413 Describe rules for braces inside C code more carefully.
2414
2415 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2416
2417 Fix some porting glitches found by Nelson H. F. Beebe.
2418 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2419 compilers that don't understand that abort () does not return.
2420 * src/state.c (transitions_to): Likewise.
2421 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2422 that '#include <cstdlib>' works.
2423 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2424 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2425 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2426 for the benefit of some pre-C99 compilers.
2427
2428 * bootstrap: Undo changes to gnulib files that autoreconf made.
2429
2430 Minor fixups to get 'make maintainer-check' to work.
2431 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2432 with the new verify.h implementation.
2433 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2434 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2435 * data/yacc.c (YYUSE): Likewise.
2436 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2437 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2438 * src/parse-gram.y (declaration): Don't pass a string constant
2439 to a function that expects char *, since GCC might complain
2440 about the constant value.
2441 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2442 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2443 before #defining them.
2444 * tests/glr-regression.at
2445 (Incorrectly initialized location for empty right-hand side in GLR):
2446 In yyerror, use the msg arg.
2447 (Corrupted semantic options if user action cuts parse):
2448 (Incorrect lookahead during deterministic GLR):
2449 (Incorrect lookahead during nondeterministic GLR):
2450 Don't name a local var 'index'; it shadows string.h's 'index'.
2451
2452 2006-01-19 Akim Demaille <akim@epita.fr>
2453
2454 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2455 location, not just parts of it.
2456
2457 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2458
2459 * NEWS: Document the fact that multiple %unions are now allowed.
2460 * doc/bison.texinfo (Union Decl): Likewise.
2461 * TODO: This feature is now implemented, so remove it from
2462 the wishlist.
2463
2464 * Makefile.maint: Merge with coreutils Makefile.maint.
2465 (CVS_LIST): Use build-aux version if available.
2466 (VERSION_REGEXP): New macro.
2467 (syntax-check-rules): Add sc_no_if_have_config_h,
2468 sc_prohibit_assert_without_use, sc_require_config_h,
2469 sc_useless_cpp_parens.
2470 (sc_obsolete_symbols): Check for O_NDELAY.
2471 (sc_dd_max_sym_length): Track coreutils.
2472 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2473 (sc_useless_cpp_parens): New rule.
2474 (news-date-check): Look for version or today's date.
2475 (changelog-check): Don't require version number near head.
2476 (copyright-check): Use current year instead of hardwiring 2005.
2477 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2478 (announcement): Add --gpg-key-ID.
2479
2480 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2481 with "file system".
2482
2483 Avoid undefined behavior that addressed just before the start of an
2484 array. Problem reported by twlevo.
2485 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2486 * src/lalr.c (build_relations): Rely on new sentinel.
2487 * src/gram.c (gram_free): Adjust to new sentinel.
2488
2489 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2490
2491 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2492 yylookaheadNeeds. All uses updated.
2493 (yysplitStack): Rename local yynewLookaheadStatuses to
2494 yynewLookaheadNeeds.
2495 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2496 GLR): In comments, change `lookahead status' to `lookahead need'.
2497
2498 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2499
2500 * data/glr.c (yysplitStack): A little stylistic rewrite.
2501
2502 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2503
2504 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2505
2506 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2507
2508 * doc/bison.texinfo: Fix some typos.
2509 (GLR Semantic Actions): New subsection discussing special
2510 considerations because GLR semantic actions might be deferred.
2511 (Actions): Mention look-ahead usage of yylval.
2512 (Actions and Locations): Mention look-ahead usage of yylloc.
2513 (Special Features for Use in Actions): Add YYEOF entry and mention it
2514 in the yychar entry.
2515 In the yychar entry, remove mention of the local yychar case (pure
2516 parser) since this is irrelevant information when writing semantic
2517 actions and since it's already discussed in `Bison Symbols' where
2518 yychar is otherwise described as an external variable.
2519 In the yychar entry, don't call it the `current' look-ahead since it
2520 isn't when semantic actions are deferred.
2521 In the yychar and yyclearin entries, add note about deferred semantic
2522 actions.
2523 Add yylloc and yylval entries discussing look-ahead usage.
2524 (Look-Ahead Tokens): When discussing yychar, don't call it the
2525 `current' look-ahead, and do mention yylval and yylloc.
2526 (Error Recovery): Cross-reference `Action Features' when mentioning
2527 yyclearin.
2528 (Bison Symbols): In the yychar entry, don't call it the `current'
2529 look-ahead.
2530 In the yylloc and yylval entries, mention look-ahead usage.
2531
2532 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2533
2534 * tests/glr-regression.at: Update copyright year to 2006.
2535
2536 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2537
2538 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2539 use during nondeterministic operation to track which stacks have
2540 actually needed the current lookahead.
2541 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2542 Allocate, deallocate, resize, and otherwise shuffle space for
2543 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2544 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2545 appropriately during nondeterministic operation.
2546 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2547 members to store the current lookahead to be used by the deferred
2548 user action.
2549 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2550 from which the RHS is taken. Set the lookahead members of the new
2551 yySemanticOption according to the lookahead status for stack yyk.
2552 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2553 yyaddDeferredAction.
2554 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2555 members of yySemanticOption before invoking yyuserAction, and then set
2556 them back to their current values afterward.
2557 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2558 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2559 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2560 titles for consistency.
2561 (Leaked merged semantic value if user action cuts parse): In order to
2562 suppress lint warnings, use arguments in merge function, and assign
2563 char value < 128 in main.
2564 (Incorrect lookahead during deterministic GLR): New test case.
2565 (Incorrect lookahead during nondeterministic GLR): New test case.
2566
2567 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2570 !yyvaluep as signal that no semantic value is available to print.
2571 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2572 to print a semantic value.
2573
2574 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2575
2576 * tests/glr-regression.at: For consistency with my newer test cases,
2577 don't thank myself.
2578
2579 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 * data/glr.c (yyresolveValue): When merging semantic options, if at
2582 least one user action succeeds but a later one cuts the parse, then
2583 destroy the semantic value before returning rather than leaking it.
2584 (yyresolveStates): If a user action cuts the parse and thus
2585 yyresolveValue fails, ignore the (unset) semantic value rather than
2586 corrupting the yyGLRState, and empty the semantic options list since
2587 the user actions should have called all necessary destructors.
2588 Simplify code with YYCHK.
2589 * tests/glr-regression.at (Corrupted semantic options if user action
2590 cuts parse): New test case.
2591 (Undesirable destructors if user action cuts parse): New test case.
2592 Before applying any of this patch, this test case never actually failed
2593 for me... but only because the corrupted semantic options usually
2594 masked this bug.
2595 (Leaked merged semantic value if user action cuts parse): New test
2596 case.
2597
2598 2006-01-05 Akim Demaille <akim@epita.fr>
2599
2600 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2601
2602 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2603
2604 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2605 _MSC_VER. Problem reported by Cenzato Marco.
2606 (b4_c_function_def): Use it.
2607 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2608 b4_c_modern.
2609 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2610 than rolling our own.
2611
2612 2006-01-04 Akim Demaille <akim@epita.fr>
2613
2614 Also warn about non-used mid-rule values.
2615 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2616 member.
2617 (symbol_list_new): Adjust.
2618 * src/reader.c (symbol_typed_p): New.
2619 (grammar_rule_check): Use it.
2620 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2621 Check its rule.
2622 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2623 Use it.
2624 * tests/actions.at (Exotic Dollars): Adjust.
2625
2626 2006-01-04 Akim Demaille <akim@epita.fr>
2627
2628 * src/reader.c (grammar_midrule_action): If $$ is set in a
2629 mid-rule, move the `used' bit to its lhs.
2630 * tests/input.at (Unused values): New.
2631 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2632
2633 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2634
2635 * doc/bison.texinfo (Bison Options): Say more accurately what
2636 --yacc does.
2637 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2638 about declarations in the grammar when in Yacc mode, as POSIX does
2639 not require a diagnostic when the grammar uses extensions.
2640
2641 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2642
2643 Warn about dubious constructions like "%token T T".
2644 Reported by twlevo.
2645 * src/symtab.h (struct symbol.declared): New member.
2646 * src/symtab.c (symbol_new): Initialize it to false.
2647 (symbol_class_set): New arg DECLARING, specifying whether
2648 this is a declaration that we want to warn about, if there
2649 is more than one of them. All uses changed.
2650
2651 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2652 Allow multiple %union directives, whose contents concatenate.
2653 * src/parse-gram.y (grammar_declaration): Likewise.
2654 Use muscle_code_grow, so that we don't need stype_line any more.
2655 All uses changed.
2656
2657 * src/muscle_tab.c (muscle_grow): Fix comment.
2658
2659 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2660 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2661 Update copyright year to 2006.
2662
2663 2006-01-03 Akim Demaille <akim@epita.fr>
2664
2665 Have glr.cc pass (some of) the calc.at tests.
2666 * data/glr.cc (b4_parse_param_orig): New.
2667 (b4_parse_param): Improve its definition, and bound it more
2668 clearly in the skeleton.
2669 (b4_epilogue): Append, instead of prepending, in order to keep
2670 #line consistency.
2671 Simplify the generation of auxiliary functions: locations and
2672 purity are mandated.
2673 (b4_global_tokens_and_yystype): Honor it.
2674 * data/location.cc (c++.m4): Don't include it.
2675 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2676 and AT_SKEL_CC_IF.
2677 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2678 AT_LALR1_CC_IF.
2679 Be sure to initialize the first position's filename.
2680 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2681 mandated anyway.
2682 (AT_CHECK_CALC_GLR_CC): New.
2683 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2684
2685 2006-01-02 Akim Demaille <akim@epita.fr>
2686
2687 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2688 c.m4.
2689 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2690 * data/glr.cc: Do not include stack.hh.
2691
2692 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2693
2694 * data/glr.c: Reformat whitespace with tabs.
2695 (b4_lpure_formals): Remove this unused m4 macro.
2696 * tests/cxx-type.at: Reformat whitespace with tabs.
2697 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2698 since it's a member. Rename type to isNterm for clarity.
2699
2700 2005-12-29 Akim <akim@sulaco.local>
2701
2702 Let glr.cc catch up with symbol_value_print.
2703 * data/glr.cc (b4_yysymprint_generate): Replace by...
2704 (b4_yy_symbol_print_generate): this.
2705 (yy_symbol_print, yy_symbol_value_print): Declare them.
2706
2707 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2708
2709 * src/location.h (boundary): Note that a line or column equal
2710 to INT_MAX indicates an overflow.
2711 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2712 (rule_length_overflow, increment_rule_length, add_column_width):
2713 New functions.
2714 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2715 (<SC_BRACED_CODE>"}"):
2716 Use increment_rule_length rather than incrementing it by hand.
2717 (adjust_location, handle_syncline): Diagnose overflow.
2718 (handle_action_dollar, handle_action_at):
2719 Fix bug with monstrosities like $-2147483648.
2720 Remove now-unnecessary checks.
2721 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2722 (convert_ucn_to_byte): Verify assumptions.
2723 (handle_syncline): New arg LOC. All callers changed.
2724 Don't store through a value derived from char const * pointer.
2725
2726 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2727 GCC warnings.
2728
2729 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2730
2731 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2732 Remove unnecessary forward static decls.
2733
2734 2005-12-27 Akim Demaille <akim@epita.fr>
2735
2736 * src/reader.c (grammar_current_rule_check): Also check that $$
2737 is used.
2738 Take the rule to check as argument, hence rename as...
2739 (grammar_rule_check): this.
2740 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2741 Rename as...
2742 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2743 (grammar_midrule_action, grammar_symbol_append): Now static.
2744 * tests/torture.at (input): Don't rely on the default action
2745 being always performed.
2746 * tests/calc.at: "Set" $$ even when the action is "cut" with
2747 YYERROR or other.
2748 * tests/actions.at (Exotic Dollars): Instead of using unused
2749 values, check that the warning is issued.
2750
2751 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2752
2753 * NEWS: Improve wording for unused-value warnings.
2754
2755 2005-12-22 Akim Demaille <akim@epita.fr>
2756
2757 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2758 (b4_yysymprint_generate): Rename as...
2759 (b4_yy_symbol_print_generate): this.
2760 Generate yy_symbol_print instead of yysymprint.
2761 Generate also yy_symbol_value_print, and use it.
2762
2763 2005-12-22 Akim Demaille <akim@epita.fr>
2764
2765 * NEWS: Warn about unused values.
2766 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2767 a `used' member.
2768 (symbol_list_n_get, symbol_list_n_used_set): New.
2769 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2770 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2771 * src/reader.c (grammar_current_rule_check): Check that values are
2772 used.
2773 * src/symtab.c (symbol_print): Accept 0.
2774 * tests/existing.at: Remove the type information.
2775 Empty the actions.
2776 Remove useless actions (beware of mid-rule actions: perl -000
2777 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2778 * tests/actions.at (Exotic Dollars): Use unused values.
2779 * tests/calc.at: Likewise.
2780 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2781 Likewise.
2782
2783 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2784 rule_useful_p.
2785
2786 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2787
2788 Undo 2005-12-01 tentative license wording change. The wording is
2789 still being reviewed by the lawyers, and we don't want to wait for
2790 them before publishing a test release. For now, revert to the
2791 previous wording.
2792 * NEWS: Undo 2005-12-01 change.
2793 * data/glr.c: Revert to previous license wording.
2794 * data/glr.cc: Likewise.
2795 * data/lalr1.cc: Likewise.
2796 * data/location.cc: Likewise.
2797 * data/yacc.c: Likewise.
2798
2799 * NEWS: Reword %destructor vs YYABORT etc.
2800 * data/glr.c: Use American spacing, for consistency.
2801 * data/glr.cc: Likewise.
2802 * data/lalr1.cc: Likewise.
2803 * data/yacc.c: Likewise.
2804 * data/yacc.c: Reformat comments slightly.
2805 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2806 for consistency. Fix some spelling errors and reword recently-included
2807 text slightly.
2808 * tests/cxx-type.at: Cast results of malloc, for C++.
2809
2810 2005-12-21 Joel E. Denny <address@hidden>
2811
2812 * tests/cxx-type.at: Construct a tree, count the parents of shared
2813 nodes, and free each node once and only once. Previously, the memory
2814 for semantic values was leaked instead.
2815
2816 2005-12-21 Joel E. Denny <address@hidden>
2817
2818 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2819 (yylval, yylloc): If pure, #define to yystackp->yyval and
2820 yystackp->yyloc similar to yychar and yynerrs.
2821 (yyparse): If pure, remove local yylval and yylloc. Add local
2822 yystackp to accommodate pure definitions of yylval and yylloc.
2823 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2824 yylvalp and yyllocp to &yylval and &yylloc.
2825 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2826 namespace. Previously, nerrs and char were missing, but lval and lloc
2827 weren't necessary.
2828 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2829 yylvalp and yyllocp parameters since, if pure, these are now always
2830 accessible through yystackp. If not pure, they are still accessible
2831 globally.
2832 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2833 `if (YYID (N))' to pacify lint.
2834
2835 2005-12-21 Akim Demaille <akim@epita.fr>
2836
2837 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2838 destroy the RHS symbols of a rule.
2839 * data/yacc.c (yylen): Initialize to 0.
2840 Keep its value to the number of items to possibly shift.
2841 In particular, a regular successful parse that ends on YYFINAL by
2842 a (internal) YYACCEPT must not have yylen != 0.
2843 (yyerrorlab, yyreturn): Pop the RHS.
2844 Reorder a bit to emphasize the `shifting' bits of code.
2845 (YYPOPSTACK): Now accept a number of items to pop.
2846 * data/lalr1.cc: Likewise.
2847 * data/glr.c: Formatting changes.
2848 Use goto instead of fall through.
2849 * doc/bison.texinfo (Destructor Decl): Complete.
2850
2851 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2852
2853 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2854 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2855 * djgpp/config.bat: Replace every occurence of the file name
2856 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2857 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2858 * djgpp/config.sed: Replace every occurence of the file name
2859 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2860 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2861 * djgpp/djunpack.bat: DJGPP specific file.
2862 * djgpp/fnchange.lst: DJGPP specific file.
2863 * djgpp/README.in: Add new information about how to unpack the bison
2864 source on MSDOS and other systems which have 8.3 file name restrictions
2865 using djunpack.bat and fnchange.lst.
2866
2867 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2868
2869 * bootstrap (build_cvs_prefix): Remove; unused.
2870 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2871 when getting gnulib.
2872
2873 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2874
2875 * data/glr.c: Reorder typedef declarations for structs to match order
2876 of struct declarations.
2877 Rename yystack everywhere to yystackp except in yyparse where it's not
2878 a pointer.
2879 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2880 consistency.
2881 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2882 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2883 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2884 lint.
2885
2886 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2887
2888 * tests/sets.at (Accept): Fix typos in regular expression used to
2889 sed out the final state number.
2890
2891 Work around portability problem on Solaris 10: flex-generated
2892 files include <stdio.h> before <config.h>, which messes up
2893 because the latter defines __EXTENSIONS__. Address the problem
2894 by creating two new little files that include <config.h> first,
2895 then include the flex-generated files. Rewrite everyone else
2896 to include <config.h> first, as well.
2897 * lib/timevar.c: Always include "config.h".
2898 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2899 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2900 (EXTRA_bison_SOURCES): New macro.
2901 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2902 * src/system.h: Don't include config.h.
2903 * src/LR0.c: Include <config.h> first.
2904 * src/assoc.c: Likewise.
2905 * src/closure.c: Likewise.
2906 * src/complain.c: Likewise.
2907 * src/conflicts.c: Likewise.
2908 * src/derives.c: Likewise.
2909 * src/files.c: Likewise.
2910 * src/getargs.c: Likewise.
2911 * src/gram.c: Likewise.
2912 * src/lalr.c: Likewise.
2913 * src/location.c: Likewise.
2914 * src/main.c: Likewise.
2915 * src/muscle_tab.c: Likewise.
2916 * src/nullable.c: Likewise.
2917 * src/output.c: Likewise.
2918 * src/parse-gram.y: Likewise.
2919 * src/print.c: Likewise.
2920 * src/print_graph.c: Likewise.
2921 * src/reader.c: Likewise.
2922 * src/reduce.c: Likewise.
2923 * src/relation.c: Likewise.
2924 * src/state.c: Likewise.
2925 * src/symlist.c: Likewise.
2926 * src/symtab.c: Likewise.
2927 * src/tables.c: Likewise.
2928 * src/uniqstr.c: Likewise.
2929 * src/vcg.c: Likewise.
2930
2931 * src/parse-gram.y: Fix minor problems uncovered by lint.
2932 (current_lhs, current_lhs_location): Now static.
2933 (current_assoc): Remove unused variable.
2934
2935 Cleanups so that Bison-generated parsers have less lint.
2936 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2937 Prepend /*ARGSUSED*/, for lint's sake.
2938 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2939 definition if 'lint' is defined.
2940 (YYID): New macro (or function, if lint).
2941 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2942 * data/yacc.c: Likewise.
2943 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2944 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2945 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2946 is C++ only.
2947 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2948 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2949 Use YYID(0) rather than 0, for lint.
2950 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2951 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2952
2953 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2954
2955 * tests/glr-regression.at
2956 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2957 Close memory leak reported by twlevo.
2958
2959 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2960
2961 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2962 all stacks.
2963 (yyparse): Iterate another stack in order to call user destructors.
2964 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2965 New test case.
2966 (Duplicated user destructor for lookahead): This test now is expected
2967 to succeed.
2968
2969 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2970
2971 * NEWS: Document the following change.
2972 * data/yacc.c: Say "parser skeleton" rather than "file", since
2973 it's no longer just a file.
2974 * data/glr.c: Grant a special exception for C GLR parsers, that
2975 reads like the already-existing exception for C LALR(1) parsers.
2976 * data/glr.cc: Likewise.
2977 * data/lalr1.cc: Likewise.
2978 * data/location.cc: Likewise.
2979 * data/yacc.c: Reword the "written by" statement to clarify that
2980 it was the parser skeleton, not the entire output file.
2981 * data/glr.c: Written by Paul Hilfinger.
2982 * data/glr.cc: Written by Akim Demaille.
2983 * data/lalr1.cc: Likewise.
2984
2985 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2986
2987 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2988 Fix typos in previous change that broke 'make check'.
2989 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2990 supported in C.
2991 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2992 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2993 We can revert this once things settle down.
2994
2995 * src/conflicts.c (conflicts_print): Don't print file name twice
2996 when %expect fails because there were no conflicts.
2997 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2998 change.
2999 * tests/conflicts.at (%expect not enough, %expect too much):
3000 (%expect with reduce conflicts): Adjust to new behavior.
3001
3002 2005-11-18 Akim Demaille <akim@epita.fr>
3003
3004 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3005 errors.
3006 * NEWS: Document this.
3007 * doc/bison.texinfo (Expect Decl): Likewise.
3008
3009 2005-11-16 Akim Demaille <akim@epita.fr>
3010
3011 Generalize the display of semantic values and locations in traces.
3012 * data/glr.c (yy_reduce_print): Fix indices (again).
3013 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3014 literal integers.
3015 * data/lalr1.cc (yyreduce_print): Rename as...
3016 (yy_reduce_print): this.
3017 Display values and locations.
3018 * data/yacc.c (yy_reduce_print): Likewise.
3019 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3020 (yysymprint): Move higher to be visible from yy_reduce_print).
3021 (yyparse): Adjust.
3022 * tests/calc.at: Adjust the expected length of the traces.
3023
3024 2005-11-14 Akim Demaille <akim@epita.fr>
3025
3026 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3027 from 1 to N, while values and location start at 0.
3028 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3029
3030 2005-11-14 Akim Demaille <akim@epita.fr>
3031
3032 * data/glr.c (yy_reduce_print): Fix the $ number.
3033
3034 2005-11-14 Akim Demaille <akim@epita.fr>
3035
3036 "Use" parse parameters.
3037 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3038 * data/glr.c, data/glr.cc: Use them.
3039 * data/glr.c (YYUSE): Have a C++ definition that supports
3040 non-pointer types.
3041
3042 2005-11-14 Akim Demaille <akim@epita.fr>
3043
3044 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3045
3046 2005-11-14 Akim Demaille <akim@epita.fr>
3047
3048 * data/glr.cc: New.
3049 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3050
3051 2005-11-12 Akim Demaille <akim@epita.fr>
3052
3053 Let position and location be PODs.
3054 * data/location.cc (position::initialize, location::initialize): New.
3055 (position::position, location::location): Define only if
3056 b4_location_constructors is defined.
3057 * data/lalr1.cc (b4_location_constructors): Define it for backward
3058 compatibility.
3059 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3060
3061 2005-11-12 Akim Demaille <akim@epita.fr>
3062
3063 * data/lalr1.cc: Move the body of the ctor and dtor into the
3064 parser file (instead of the header).
3065 Wrap the implementations in a "namespace yy".
3066
3067 2005-11-12 Akim Demaille <akim@epita.fr>
3068
3069 Have glr.c include its header file when created.
3070 * data/glr.c (b4_shared_declarations): New.
3071 Output them verbatim in the parser if !%defines, otherwise
3072 output then in the header file, and include it instead.
3073
3074 2005-11-11 Akim Demaille <akim@epita.fr>
3075
3076 * data/glr.c: Comment changes.
3077
3078 2005-11-11 Akim Demaille <akim@epita.fr>
3079
3080 When yydebug, report semantic and location values for reductions.
3081 * data/glr.c (yy_reduce_print): Report the semantic values and the
3082 locations.
3083 (YY_REDUCE_PRINT): Adjust.
3084 (yyglrReduce): Use them.
3085 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3086 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3087 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3088 traces.
3089
3090 2005-11-10 Akim Demaille <akim@epita.fr>
3091
3092 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3093 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3094 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3095
3096 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3097
3098 * m4/cxx.m4, examples/Makefile.am: Don't build
3099 examples/calc++ if no C++ compiler is available. (trivial change)
3100
3101 2005-11-09 Akim Demaille <akim@epita.fr>
3102
3103 * src/scan-skel.l: Use a couple of asserts.
3104
3105 2005-11-03 Akim Demaille <akim@epita.fr>
3106
3107 In some (weird) cases, the final state number is incorrect.
3108 Reported by Alexandre Duret-Lutz.
3109 * src/LR0.c (state_list_append): Remove the computation of
3110 final_state.
3111 (save_reductions): Do it here.
3112 (get_state): Alpha conversion.
3113 (generate_states): Use a for loop.
3114 * src/gram.h (item_number_is_rule_number)
3115 (item_number_is_symbol_number): New.
3116 * src/state.c: Use assert.
3117 * src/system.h: Include assert.h.
3118 * tests/sets.at (Accept): New.
3119
3120 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3121
3122 * data/glr.c (yyfill): Adjust comment.
3123 (yyresolveAction): Initialize default location properly
3124 for empty right-hand sides.
3125 (yydoAction): Ditto.
3126 Add comment explaining apparently dead code.
3127 * tests/glr-regression.at
3128 (Incorrectly initialized location for empty right-hand side in GLR):
3129 New test.
3130
3131 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3132
3133 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3134 gnulib when interrupted. This fixes some race conditions and
3135 works around some portability problems (one noted by Paul
3136 Hilfinger).
3137
3138 2005-10-22 Akim <akim@epita.fr>
3139
3140 * Makefile.cfg: Adjust to config -> build-aux.
3141 Reported by twledo.
3142
3143 2005-10-21 Akim Demaille <akim@epita.fr>
3144
3145 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3146 the %parse-params.
3147 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3148 * data/yacc.c (b4_Pure_if): Rename as...
3149 (b4_yacc_pure_if): this.
3150 (YY_SYMBOL_PRINT, yyparse): Adjust.
3151 * doc/bison.texinfo: Formatting changes.
3152
3153 2005-10-21 Akim Demaille <akim@epita.fr>
3154
3155 Finish the transition config -> build-aux.
3156 * configure.ac, Makefile.am: Use build-aux.
3157 * config/prev-version, config/announce-gen, config/Makefile.am:
3158 Move to...
3159 * build-aux/prev-version, build-aux/announce-gen,
3160 * build-aux/Makefile.am: here.
3161
3162 2005-10-14 Akim Demaille <akim@epita.fr>
3163
3164 * examples/calc++/test: Use set -x only when VERBOSE.
3165
3166 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3167
3168 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3169 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3170
3171 2005-10-13 Akim Demaille <akim@epita.fr>
3172
3173 * src/scan-skel.l: Output the base name parts of the parser and
3174 header file names.
3175 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3176 additional checks.
3177 Use this to exercise C++ outputs in subdirs.
3178 Reported by Oleg Smolsky.
3179
3180 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3181
3182 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3183 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3184 Problem reported by John P. Hartmann.
3185 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3186 already defined it.
3187
3188 2005-10-12 Akim Demaille <akim@epita.fr>
3189
3190 * src/parse-gram.y (version_check): Exit 63 to please missing
3191 (stands for "version mismatch).
3192 * tests/input.at, doc/bison.texinfo: Adjust.
3193
3194 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3195
3196 Work around portability problems with Visual Age C compiler
3197 (xlc and xlC_r) reported by John P. Hartmann.
3198 * data/location.cc (initial_column, initial_line): Remove.
3199 All uses replaced by 0 and 1.
3200 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3201 that xlc complains about.
3202 * src/scan-skel.l (skel_wrap): Likewise.
3203 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3204 as __STDC__.
3205 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3206 __STDC_VERSION__. Use it everywhere instead of looking at
3207 __STDC__ and __cplusplus.
3208
3209 2005-10-10 Akim Demaille <akim@epita.fr>
3210
3211 * examples/calc++/test: Be quiet unless VERBOSE.
3212
3213 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3214
3215 * data/c.m4 (yydestruct, yysymprint):
3216 Use YYUSE instead of casting to void.
3217 * data/glr.c (YYUSE): New macro.
3218 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3219 Use it instead of rolling our own.
3220 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3221 (YYCHK1):
3222 Use /*CONSTCOND*/ to suppress lint warnings.
3223 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3224 (YY_STACK_PRINT): Use 'false' not '0'.
3225 (YYUSE): New macro.
3226 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3227 * data/yacc.c (YYUSE): New macro.
3228 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3229 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3230 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3231
3232
3233 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3234 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3235
3236 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3237
3238 Undo the parts of the unlocked-I/O change that substituted
3239 putc or puts for printf. This might hurt performance a bit,
3240 but some people prefer the printf style.
3241 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3242 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3243 All uses replaced by YYFPRINTF and YYDPRINTF.
3244 * data/yacc.c: Likewise.
3245 * lib/bitset.c (bitset_print): Likewise.
3246 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3247 putc and puts.
3248 * lib/lbitset.c (debug_lbitset): Likewise.
3249 * src/closure.c (print_firsts, print_fderives): Likewise.
3250 * src/gram.c (grammar_dump): Likewise.
3251 * src/lalr.c (look_ahead_tokens_print): Likewise.
3252 * src/output.c (escaped_output): Likewise.
3253 (user_actions_output): Break apart two printfs.
3254 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3255 * src/reduce.c (reduce_print): Likewise.
3256 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3257 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3258
3259 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3260 Use assignments rather than casts-to-void to suppress
3261 unused-variable warnings. This pacifies 'lint'.
3262 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3263 unused-variable warnings.
3264
3265 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3266
3267 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3268
3269 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3270
3271 Use unlocked I/O for a minor performance improvement on hosts like
3272 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3273 is to use the gnlib unlocked-io module, and to prefer putc and
3274 puts to printf when either will work (since the latter doesn't
3275 come in an unlocked flavor).
3276 * bootstrap (gnulib_modules): Add unlocked-io.
3277 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3278 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3279 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3280 and similarly for puts and putc and printf.
3281 * data/yacc.c: Likewise.
3282 * lib/bitset.c (bitset_print): Likewise.
3283 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3284 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3285 to printf.
3286 * lib/lbitset.c (debug_lbitset): Likewise.
3287 * src/closure.c (print_firsts, print_fderives): Likewise.
3288 * src/gram.c (grammar_dump): Likewise.
3289 * src/lalr.c (look_ahead_tokens_print): Likewise.
3290 * src/output.c (escaped_output): Likewise.
3291 (user_actions_output): Coalesce two printfs.
3292 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3293 * src/reduce.c (reduce_print): Likewise.
3294 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3295 * src/system.h: Include unlocked-io.h rather than stdio.h.
3296
3297 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3298 this confuses xgettext.
3299
3300 2005-10-02 Akim Demaille <akim@epita.fr>
3301
3302 * bootstrap (gnulib_modules): Add strverscmp.
3303 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3304 * m4/.cvsignore: Add strverscmp.m4.
3305 * src/parse-gram.y (%require): New token, new rule.
3306 (version_check): New.
3307 * src/scan-gram.l (%require): Adjust.
3308 * tests/input.at (AT_REQUIRE): New.
3309 Use it.
3310 * doc/bison.texinfo (Require Decl): New.
3311 (Calc++ Parser): Use %require.
3312
3313 2005-10-02 Akim Demaille <akim@epita.fr>
3314
3315 * data/location.cc: New.
3316
3317 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3318 Akim Demaille <akim@epita.fr>
3319
3320 Make sure -odir/foo.cc creates dir/location.hh etc.
3321 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3322 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3323 (spec_defines_file): Now const.
3324 (dir_prefix): New.
3325 (short_base_name): Remove.
3326 * src/files.c: Adjust.
3327 (dirname.h): Include.
3328 (base_name): Don't prototype it.
3329 (finput): Remove, duplicates gram_in.
3330 (full_base_name, short_base_name): Replace by...
3331 (all_but_ext, all_but_tab_ext): these.
3332 (compute_base_names): Rename as...
3333 (compute_file_name_parts): this.
3334 Update to compute the new variables, including dir_prefix.
3335 Adjust dependencies.
3336 * src/output.c (prepare): Output them.
3337 * src/reader.c: Adjust to use gram_in, not finput.
3338 * src/scan-skel.l (@dir_prefix@): New.
3339
3340 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3341
3342 * lib/subpipe.c: New function end_of_output_subpipe() added
3343 to allow support for non-posix systems. This is a no-op function
3344 for posix systems.
3345
3346 * lib/subpipe.h: New function end_of_output_subpipe() added
3347 to allow support for non-posix systems. This is a no-op function
3348 for posix systems.
3349
3350 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3351 handle the lack of pipe/fork functionality on non-posix systems.
3352
3353 * djgpp/Makefile.maint: DJGPP specific file.
3354
3355 * djgpp/README.in: DJGPP specific file.
3356
3357 * djgpp/config.bat: DJGPP specific configuration file.
3358
3359 * djgpp/config.sed: DJGPP specific configuration file.
3360
3361 * djgpp/config.site: DJGPP specific configuration file.
3362
3363 * djgpp/config_h.sed: DJGPP specific configuration file.
3364
3365 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3366
3367 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3368
3369 2005-10-02 Akim Demaille <akim@epita.fr>
3370
3371 * data/location.cc: New, extract from...
3372 * data/lalr1.cc: here.
3373 (location.hh): Include it after the user prologue, in case the
3374 filename type is defined by the user.
3375 Forward declation location and position before the pre-prologue.
3376 (yyresult_): Rename as...
3377 (yyresult): this, it's a local variable, not an attribute.
3378 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3379
3380 2005-10-01 Akim Demaille <akim@epita.fr>
3381
3382 * examples/extexi: Restore the #line generation.
3383
3384 2005-09-30 Akim Demaille <akim@epita.fr>,
3385 Alexandre Duret-Lutz <adl@gnu.org>
3386
3387 Move the token type and YYSTYPE in the parser class.
3388 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3389 (parser::token): New, from the moved free definition of tokens.
3390 (parser::semantic_value): Now a full definition instead of an
3391 indirection to YYSTYPE.
3392 (b4_post_prologue): No longer included in the header file, but
3393 in the implementation file.
3394 * doc/bison.texi (C+ Language Interface): Update.
3395 * src/parse-gram.y: Support unary %define.
3396 * tests/actions.at: Define global_tokens_and_yystype for backward
3397 compatibility until we update the tests.
3398 * tests/calc.at: Idem.
3399 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3400 to simplify the code.
3401
3402 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3403
3404 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3405 Ah, the good old days! Problem reported by Peter Klein.
3406 * bootstrap (gnulib_modules): Add strerror, strtoul.
3407 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3408 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3409
3410 2005-09-29 Akim Demaille <akim@epita.fr>
3411
3412 * data/c.m4 (b4_error_verbose_if): New.
3413 * data/lalr1.cc: Use it.
3414 (YYERROR_VERBOSE_IF): Remove.
3415 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3416 parser members, replaced by...
3417 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3418 local variables.
3419 (yysyntax_error_): Takes the state number as argument.
3420 (yyreduce_print_): Use the argument yyrule, not the former
3421 attribute yyn_.
3422
3423 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3424
3425 * bootstrap (gnulib_modules): Add verify.
3426 * lib/.cvsignore: Add verify.h.
3427 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3428 * src/system.h (verify): Remove.
3429 Include verify.h instead.
3430 * src/tables.c (tables_generate): Use new API for 'verify'.
3431
3432 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3433
3434 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3435 local variables whose names begin with 'yy'.
3436 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3437 Trivial changes from Joel E. Denny.
3438
3439 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3440 it itself.
3441 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3442 don't use alloca any more.
3443
3444 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3445 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3446 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3447 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3448 to match yacc.c, to test more hosts.
3449
3450 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3451
3452 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3453 doesn't affect behavior.
3454 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3455 Solaris, AIX, MSC.
3456 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3457 This works a bit better with glibc, if user code has already included
3458 stdlib.h.
3459 * doc/bison.texinfo (Bison Parser): Document that users can't
3460 arbitrarily use malloc and free for other purposes. Document
3461 that <alloca.h> and <malloc.h> might be included.
3462 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3463 user must declare alloca.
3464
3465 * HACKING (release): Forwarn the Translation Project about
3466 stable releses.
3467
3468 2005-09-20 Akim Demaille <akim@epita.fr>
3469
3470 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3471
3472 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3473
3474 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3475 (YYSTACK_ALLOC_MAXIMUM): Use it.
3476 (yysyntax_error): New function.
3477 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3478 multiple syntax errors are reported, and alloca is being used.
3479 Instead, reallocate buffers twice as big each time, so that
3480 we waste at most half the allocated memory. Start with a small
3481 (128-byte) buffer that will suffice in most cases anyway.
3482 Use yysyntax_error to do most of the work.
3483
3484 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3485 yynerrs is the number of errors reported, not the number of
3486 errors encountered.
3487
3488 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3489 Mark it as expected to fail.
3490 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3491 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3492 Don't start user-code symbols with "yy", to avoid name space problems.
3493
3494 2005-09-19 Akim Demaille <akim@epita.fr>
3495
3496 Remove the traits, failed experiment.
3497 It never proved useful, and anyway because of the current
3498 definition, it was not possible to have several specialization of
3499 this traits, making it useless.
3500 * data/lalr1.cc (yy:traits): Remove.
3501 Inline its definitions in the parser class.
3502
3503 2005-09-19 Akim Demaille <akim@epita.fr>
3504
3505 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3506 least Mac OSX with a /usr/local install of gettext.
3507
3508 2005-09-19 Akim Demaille <akim@epita.fr>
3509
3510 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3511 and yytoken for similarity with the other skeletons.
3512
3513 2005-09-19 Akim Demaille <akim@epita.fr>
3514
3515 * NEWS, configure.ac: update version number to 2.1a.
3516
3517 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3518
3519 * NEWS: Version 2.1.
3520
3521 * NEWS: Remove notice of yytname change, since it was never in an
3522 official release.
3523 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3524 diagnostic.
3525 * src/output.c (prepare): Likewise.
3526 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3527 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3528 is not defined. This is an awful hack, but it's enough for now.
3529 All callers changed.
3530 * tests/glr-regression-at (make_value): Args are const pointers now,
3531 to avoid GCC warning.
3532 (Duplicated user destructor for lookahead): New test. Currently
3533 skipped. It fails on my host but I'm not sure it'll always fail.
3534
3535 2005-09-16 Akim Demaille <akim@epita.fr>
3536
3537 * src/symtab.h (struct symbol): Declare the printer and destructor
3538 as const, to avoid accidental calls to free.
3539 (symbol_destructor_set, symbol_printer_set): Adjust.
3540 * src/symtab.c: Adjust.
3541
3542 2005-09-16 Akim Demaille <akim@epita.fr>
3543
3544 * data/c.m4 (b4_token_enums): New.
3545 (b4_token_defines): Rename as...
3546 (b4_token_enums_defines): this.
3547 (b4_token_defines): New, output only the #defines.
3548 * data/yacc.c, data/glr.c: Adjust.
3549 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3550 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3551 as default values.
3552
3553 2005-09-16 Akim Demaille <akim@epita.fr>
3554
3555 * data/lalr1.cc (yylex_): Remove, inline its code.
3556 (yyreport_syntax_error_): Remove, replaced by...
3557 (yysyntax_error_): this which returns a string and leaves to the
3558 caller the call to the users' error function.
3559 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3560 Move from members of the parser object...
3561 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3562 to local variables of the parse function.
3563
3564 2005-09-16 Akim Demaille <akim@epita.fr>
3565
3566 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3567 since it's in Bison's name space.
3568
3569 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3570
3571 * data/glr.c (yyresolveValue): Add default case to pacify
3572 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3573
3574 * NEWS: Document when yyparse started to return 2.
3575 * doc/bison.texinfo (Parser Function): Document when yyparse
3576 returns 2.
3577
3578 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3579 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3580 changed.
3581 (class position): file_name -> filename (reverting). All uses changed.
3582
3583 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3584
3585 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3586 do anything if $@ exists. This reverts part of the 2005-07-07
3587 patch.
3588
3589 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3590
3591 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3592 contains obsolete information and isn't worth distributing as a
3593 separate file anyway.
3594 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3595 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3596 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3597 (yyparse): Abort if user code uses longjmp to throw an unexpected
3598 value.
3599
3600 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3601
3602 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3603 Suggested by twlevo@xs4all.nl.
3604
3605 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3606 This avoids a diagnostic from gcc -Wswitch-enum.
3607 Problem reported by twlevo@xs4all.nl.
3608
3609 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3610 standards. Use "file name" or "file" or "name", depending on
3611 the context.
3612 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3613 not to hack/foo.tab.c.
3614 (Calc++ Top Level): 2nd arg of main is not const.
3615 * data/glr.c: b4_filename -> b4_file_name.
3616 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3617 All uses changed.
3618 (class position): filename -> file_name. All uses changed.
3619 * data/yacc.c: b4_filename -> b4_file_name.
3620 * lib/bitset.h: filename -> file_name in local vars.
3621 * lib/bitset_stats.c: Likewise.
3622 * src/files.c: Likewise.
3623 * src/scan-skel.l ("@output ".*\n): Likewise.
3624 * src/files.c (file_name_split): Renamed from filename_split.
3625 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3626
3627 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3628
3629 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3630 to accommodate latest gnulib.
3631
3632 * tests/glr-regression.at (Duplicate representation of merged trees):
3633 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3634
3635 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3636 needed.
3637
3638 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3639
3640 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3641 All uses changed. Invoke user destructor after an error during a
3642 split parse (trivial change from Joel E. Denny).
3643
3644 * tests/glr-regression.at
3645 (User destructor after an error during a split parse): New test case.
3646 Problem reported by Joel E. Denny in:
3647 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3648
3649 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3650
3651 * README-cvs: Give URLs for recommended tools.
3652 Mention Gzip version problem, and bootstrapping issues.
3653 Remove troubleshooting section, as it's somewhat obsolete.
3654
3655 * bootstrap (no_cache): New var, to accommodate different wget
3656 variants. Use it instead of '-C off'. Problem reported by
3657 twlevo@xs4all.nl.
3658
3659 * data/glr.c (yydestroyStackItem): New function.
3660 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3661 debugging information. Problem reported by Joel E. Denny.
3662
3663 2005-08-25 Akim Demaille <akim@epita.fr>
3664
3665 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3666
3667 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3668
3669 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3670 Don't invoke destructor on unresolved entries.
3671 * tests/glr-regression.at
3672 (User destructor for unresolved GLR semantic value): New test case.
3673 Problem reported by Joel E. Denny in:
3674 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3675
3676 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3677
3678 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3679 Add strnlen.c.
3680 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3681 lib-prefix.m4, po.m4.
3682
3683 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3684 in yydestruct diagnostic, since it might not be an error.
3685 Problem reported by Joel Denny near end of
3686 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3687 * data/lalr1.cc (yyerturn): Likewise.
3688 * data/yacc.c (yyreturn): Likewise.
3689 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3690
3691 * src/files.c: Remove obsolete FIXME comment.
3692
3693 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3694 with the other templates, and to fix bogus run-on messages such
3695 as the one reported at the end of
3696 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3697 All callers changed to avoid the newline.
3698 (yyprocessOneStack): Output two lines rather than one, to accommodate
3699 the above change. This changes the debug output format slightly.
3700
3701 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3702 reported by Joel E. Denny in
3703 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3704 (trivial change).
3705 * tests/glr-regression.at (Duplicate representation of merged trees):
3706 New test, from Joel E. Denny in:
3707 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3708 * THANKS: Add Joel E. Denny.
3709
3710 * configure.ac (AC_INIT): Bump to 2.0c.
3711
3712 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3713
3714 * NEWS: Version 2.0b.
3715
3716 * Makefile.am (SUBDIRS): Put examples before tests, so that
3717 "make check" doesn't finish with "All 1 tests passed".
3718
3719 * tests/regression.at (Token definitions): Don't rely on
3720 AT_PARSER_CHECK for data that contains backslashes. It currently
3721 uses 'echo', and 'echo' isn't portable if its argument contains
3722 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3723 that the byte '\0xff' is not printable in the C locale; it is,
3724 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3725 not printable, so use '\0x81' to test.
3726
3727 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3728 version of GCC, since the macro is used with non-GCC compilers.
3729
3730 Fix core dump reported by Pablo De Napoli in
3731 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3732 * tests/regression.at (Invalid inputs with {}): New test.
3733 * src/parse-gram.y (token_name): Translate type before using
3734 it as an index.
3735
3736 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3737 the user's name space. All uses changed to __attribute__
3738 ((__unused__)).
3739 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3740 Add __attribute__ ((__noreturn__)).
3741
3742 * etc/clcommit: Remove. We weren't using it, and it failed
3743 "make maintainer-distcheck".
3744 * Makefile.maint: Merge from coreutils.
3745 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3746 (syntax-check-rules): Change list of rules as described below.
3747 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3748 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3749 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3750 (sc_trailing_space): New rules.
3751 (sc_xalloc_h_in_src): Remove.
3752 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3753 (sc_space_tab, sc_error_exit_success, sc_changelog):
3754 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3755 (makefile-check, po-check, author_mark_check):
3756 (makefile_path_separator_check, copyright-check):
3757 Use grep -n, to make it easier to find violations.
3758 Use CVS_LIST and CVS_LIST_EXCEPT.
3759 (header_regexp, h_re): Remove.
3760 (dd_c): New macro.
3761 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3762 (my-distcheck): Use more-modern GCC flags.
3763 (signatures, %.asc): Remove.
3764 (rel-files, announcement): Remove signatures.
3765 Restore old updating code, even though we don't use it, so
3766 that we're the same as coreutils.
3767 (alpha, beta, major): Depend on news-date-check.
3768 Make the upload commands.
3769
3770 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3771 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3772 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3773 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3774 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3775 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3776 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3777 * tests/sets.at: Likewise.
3778
3779 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3780 we comment out the Autoconf version number.
3781 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3782 it's error-prone and "make maintainer-distcheck" rejects it.
3783
3784 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3785 Indent calls to "error" to pacify "make maintainer-distcheck",
3786 when the calls are not intended to be translated.
3787 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3788
3789 * src/Makefile.am (DEFS): Use +=, to pacify
3790 "make maintainer-distcheck".
3791 (bison_SOURCES): Add scan-skel.h.
3792 (sc_tight_scope): New rule, from coreutils.
3793
3794 * src/files.c (src_extension, header_extension):
3795 Now static, not extern.
3796 * src/getargs.c (short_options): Likewise.
3797 * src/muscle_tab.c (muscle_table): Likewise.
3798 * src/parse-gram.y (current_class, current_type, current_prec):
3799 Likewise.
3800 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3801 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3802 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3803 void, to avoid warning when NLS is disabled.
3804 * src/output.c: Include scan-skel.h.
3805 (scan_skel): Remove decl, since scan-skel.h does this.
3806 (output_skeleton):
3807 Indent calls to "error" to pacify "make maintainer-distcheck".
3808 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3809 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3810 "make maintainer-distcheck".
3811 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3812 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3813 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3814 (skel_lex_destroy, scan_skel): Move these decls to...
3815 * src/scan-skel.h: New file.
3816 * src/uniqstr.c (uniqstr_assert):
3817 Indent calls to "error" to pacify "make maintainer-distcheck".
3818
3819 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3820 not @VAR@.
3821
3822 * tests/torture.at: Revamp to avoid misuse of atoi that
3823 "make maintainer-distcheck" complained about.
3824
3825 * examples/extexi (message): Don't print a message more than once,
3826 and omit line-number decoration that makes Emacs compile think
3827 that informative messages are worth worrying about.
3828
3829 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3830
3831 * configure.ac: Update version number.
3832
3833 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3834 accidentally.
3835 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3836 autogenerated by the maintainer.
3837 * examples/calc++/.cvsignore: Add *.yy.
3838
3839 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3840 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3841 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3842
3843 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3844
3845 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3846 from maintainer-distcheck about casting the argument of 'free'.
3847
3848 * NEWS: Mention recent yytname changes.
3849 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3850
3851 * bootstrap: For translations that have not yet been upgraded to
3852 the new runtime-po domain, prime the pump by extracting the
3853 relevant strings from the obsolete translations. This code can be
3854 removed once the bison-runtime domain has been translated by each
3855 team.
3856
3857 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3858 now that token names are already quoted.
3859
3860 Fix problem reported by Anthony Heading.
3861 * data/glr.c (YYTOKEN_TABLE): New macro.
3862 (yytname): Define if YYTOKEN_TABLE.
3863 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3864 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3865 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3866 * src/output.c (prepare_symbols): Output token_table_flag.
3867
3868 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3869
3870 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3871 again if the first call fails.
3872
3873 * data/glr.c (yytnamerr): New function.
3874 (yyreportSyntaxError): Use it to dequote most string literals.
3875 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3876 with other skeletons. All uses changed.
3877 (yytnameerr_): New function.
3878 (yyreport_syntax_error): Use it to dequote most string literals.
3879 * data/yacc.c (yytnamerr): New function.
3880 (yyerrlab): Use it to decode most string literals.
3881 * doc/bison.texinfo (Decl Summary, Calling Convention):
3882 Clarify quoting convention of yytname.
3883 * src/output.c (prepare_symbols): Quote all names. This undoes
3884 the 2005-04-17 change, which is now accomplished (mostly) via
3885 changes in the parsers as described above.
3886 * tests/regression.at (Token definitions, Web2c Actions):
3887 Undo most 2005-04-17 change here, too.
3888
3889 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3890
3891 Fix more problems reported by twlevo@xs4all.nl.
3892 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3893 remove trailing spaces. This loses the exit status of ./types,
3894 and isn't needed since ./types shouldn't be emitting trailing
3895 spaces.
3896 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3897 as the stack isn't valid in that case.
3898
3899 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3900 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3901 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3902 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3903 is used.
3904 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3905 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3906 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3907 Likewise.
3908
3909 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3910 overly-picky compilers that reject 'char *foo = "bar";'.
3911
3912 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3913 to FILE * parameter, not to stderr. This fixes a typo introduced
3914 in the 2005-07-12 change.
3915
3916 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3917 warnings from GCC 4.
3918
3919 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3920 (yyglrShiftDefer, yysplitStack):
3921 Remove unused parameters b4_pure_formals. All uses changed.
3922 (yyglrShift): Remove unused parameters b4_user_formals.
3923 All uses changed.
3924 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3925
3926 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3927
3928 Destructor cleanups and regularization among the three skeletons.
3929 * NEWS: Document the behavior changes.
3930 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3931 stack before failing, as the cleanup code will do it for us now.
3932 * data/lalr1.cc (yyerrlab): Likewise.
3933 * data/glr.c (yyparse): Pop everything off the stack before
3934 freeing it, so that destructors get called properly.
3935 * data/lalr1.cc (yyreturn): Likewise.
3936 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3937 This is more consistent.
3938 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3939 why destructors might be called. 1.875 -> 2.1.
3940 (Destructor Decl, Decl Summary, Table of Symbols):
3941 Some English-language cleanups for %destructor.
3942 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3943 Add output line for destructor of start symbol.
3944 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3945 because of that same extra output line.
3946
3947 * NEWS: Document minor wording changes in diagnostics of
3948 Bison-generated parsers.
3949 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3950 Remove unused formals. All uses changed.
3951 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3952 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3953 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3954 Rename yyoverflowab to yyexhaustedlab.
3955 When memory exhaustion occurs during syntax-error reporting,
3956 report it separately rather than in a single diagnostic; this
3957 eases translation.
3958 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3959 (Memory Exhausted): Renamed from Parser Stack Overflow.
3960 Revamp wording slightly to prefer "memory exhaustion".
3961 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3962
3963 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3964
3965 Add i18n support to the GLR skeleton. Partially fix the C++
3966 skeleton; a C++ expert needs to finish this. Remove debugging
3967 msgids; there's little point to having them translated, since they
3968 can be understood only by someone who can read the
3969 (English-language) source code.
3970
3971 Generate runtime-po/bison-runtime.pot automatically, so that we
3972 don't have to worry about garbage getting in that file. We'll
3973 make sure after the next official release that old msgids don't
3974 get lost. See
3975 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3976
3977 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3978 Now auto-generated.
3979 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3980 Fix typos in explanations of the runtime file.
3981 * bootstrap: Change gettext keyword from YYI18N to YY_.
3982 Use standard Makefile.in.in in runtime-po, since we'll arrange
3983 for backward-compatible bison-runtime.po files in a different way.
3984 * data/glr.c (YY_): New macro, from yacc.c.
3985 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3986 Translate messages intended for users.
3987 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3988 the wording in the other skeletons. We don't know that the memory
3989 is virtual.
3990 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3991 Use same method that yacc.c uses.
3992 Don't translate debugging messages.
3993 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3994 it doesn't work (yet), and requires C++ expertise to fix.
3995 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3996 Move defn to a more logical place, to be consistent with other
3997 skeletons.
3998 Don't translate debugging messages.
3999 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4000 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4001 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4002 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4003
4004 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4005 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4006 void, not int.
4007 * tests/glr-regression.at (Badly Collapsed GLR States):
4008 Likewise.
4009 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4010 yylex should return 0 at EOF rather than aborting.
4011
4012 Improve tests for stack overflow in GLR parser.
4013 Problem reported by twlevo@xs4all.nl.
4014 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4015 All uses removed.
4016 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4017 can handle the problem.
4018 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4019 (yyparse): New local variable yyresult to record the result.
4020 Use result of setjmp to set it, rather than storing itinto
4021 struct.
4022 (yyDone): Remove label.
4023 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4024 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4025 if YYABORT is used).
4026 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4027 yyparse status; put status > 1 into diagnostic.
4028 Check that status==2 works.
4029 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4030 Use exit status 3 for failure to open (which shouldn't happen).
4031
4032 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4033
4034 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4035 1 on syntax error; just let yyparse do its thing.
4036 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4037 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4038 (Exploding the Stack Size with Alloca):
4039 (Exploding the Stack Size with Malloc):
4040 Expect exit status 2, not 1, since the parser is supposed to blow
4041 its stack. Problem reported by twlevo@xs4all.nl.
4042
4043 * data/glr.c (yyparse): Don't assume that the initial calls
4044 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4045 Print a stack-overflow message and fail instead.
4046 Initialize the line-number information before creating the stack,
4047 so that the stack-overflow message can report line zero safely.
4048
4049 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4050
4051 Fix problems reported by twlevo@xs4all.nl.
4052 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4053 (yyuserMerge): Provide a default case if b4_mergers is empty.
4054 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4055 * tests/glr-regression.at
4056 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4057 Add casts to pacify C++ compilers.
4058 * tests/glr-regression.at (Improper merging of GLR delayed action
4059 sets): Declare yylex before using it.
4060 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4061 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4062 test for valgrind; valgrind is independent of g++.
4063 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4064 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4065 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4066 Use a destructor, so that we can expand the stack. Change
4067 YYSTYPE to char * so that we can free it. Cast result of malloc.
4068
4069 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4070
4071 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4072 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4073
4074 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4075
4076 * PACKAGING: New file, suggested by Bruno Haible and taken from
4077 similar wording in gettext's PACKAGING file.
4078 * NEWS: Mention PACKAGING.
4079 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4080
4081 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4082
4083 * NEWS: Document recent i18n improvements.
4084 * bootstrap: Get runtime translations into runtime-po.
4085 Create runtime-po files automatically, if possible.
4086 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4087 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4088 does not infringe on the user's name space.
4089 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4090 * doc/bison.texinfo (Internationalization): Revamp the English
4091 and Texinfo syntax a bit, to try to make it clearer.
4092 (Bison Options, Option Cross Key): Mention --print-localedir.
4093 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4094 YYENABLE_NLS. Quote a bit more.
4095 * runtime-po/.cvsignore: New file.
4096 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4097 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4098 * runtime-po/quot.sed: Likewise.
4099 * runtime-po/boldquot.sed: Likewise.
4100 * runtime-po/en@quot.header: Likewise.
4101 * runtime-po/en@boldquot.header: Likewise.
4102 * runtime-po/insert-header.sin: Likewise.
4103 * runtime-po/remove-potcdate.sin: Likewise.
4104 * runtime-po/Makevars: Likewise.
4105 * runtime-po/LINGUAS: Likewise.
4106 * runtime-po/de.po: Likewise; we will rely on the translation project
4107 to maintain this, so "bootstrap" should get it.
4108 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4109 its value.
4110 * src/main.c (main): Bind the bison-runtime domain, too.
4111
4112 2005-07-12 Bruno Haible <bruno@clisp.org>
4113
4114 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4115 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4116 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4117 * runtime-po: New directory.
4118 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4119 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4120 * runtime-po/Rules-quot: New file, copied from po/.
4121 * runtime-po/quot.sed: Likewise.
4122 * runtime-po/boldquot.sed: Likewise.
4123 * runtime-po/en@quot.header: Likewise.
4124 * runtime-po/en@boldquot.header: Likewise.
4125 * runtime-po/insert-header.sin: Likewise.
4126 * runtime-po/remove-potcdate.sin: Likewise.
4127 * runtime-po/Makevars: New file.
4128 * runtime-po/POTFILES.in: New file.
4129 * runtime-po/LINGUAS: New file.
4130 * runtime-po/bison-runtime.pot: New file.
4131 * runtime-po/de.po: New file.
4132 * m4/bison.m4: New file.
4133 * Makefile.am (SUBDIRS): Add runtime-po.
4134 (aclocaldir, aclocal_DATA): New variables.
4135 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4136 Define aclocaldir.
4137 * src/getargs.c (usage): Document --print-localedir option.
4138 (PRINT_LOCALEDIR_OPTION): New enum item.
4139 (long_options): Add --print-localedir option.
4140 (getargs): Handle --print-localedir option.
4141 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4142 (Internationalization): New section.
4143
4144 2005-07-12 Akim Demaille <akim@epita.fr>
4145
4146 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4147 for consistency with the rest of the code.
4148 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4149 Add separators.
4150
4151 2005-07-12 Akim Demaille <akim@epita.fr>
4152
4153 * src/parse-gram.y: Use %printer instead of YYPRINT.
4154
4155 2005-07-12 Akim Demaille <akim@epita.fr>
4156
4157 * src/symtab.h, src/symtab.c (symbol_print): New.
4158 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4159 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4160
4161 2005-07-12 Akim Demaille <akim@epita.fr>
4162
4163 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4164 b4_at_dollar and b4_dollar_dollar.
4165
4166 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4167
4168 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4169 and Pennello's paper.
4170
4171 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4172
4173 * data/yacc.c (yyparse): Undo previous patch. Instead,
4174 set yylsp[0] and yyvsp[0] only if the initial action
4175 sets yylloc and yylval, respectively.
4176
4177 * data/yacc.c (yyparse): In the initial action, set
4178 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4179 This avoids the use of undefined variables if the initial
4180 action does not set yylloc and/or yylval.
4181
4182 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4183
4184 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4185 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4186 Remove from CVS. These files are automatically generated.
4187 * examples/extexi: Clarify that this file is now part of Bison,
4188 not GNU M4, and that it works with any POSIX-compatible Awk.
4189 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4190 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4191 so that we also get calc++-parser.yy. Geneate it.
4192 Use $(AWK), not gawk, since any conforming Awk will do.
4193 Put comment before action, since older 'make' can't handle comment
4194 in action.
4195 $(BUILT_SOURCES): List all built sources, not just some of them.
4196 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4197 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4198 $($(calc_sources_generated)): Remove unnecessary test for existence
4199 of target. (This had a shell syntax error anyway; a stray "x".)
4200 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4201 calc++-parser.yy.
4202 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4203
4204 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4205 implied by the other modules.
4206
4207 2005-07-06 Akim Demaille <akim@epita.fr>
4208
4209 Bind examples/calc++ to the package.
4210 * examples/calc++/Makefile: Remove, replaced by...
4211 * examples/calc++/Makefile.am: ... this new file.
4212 * examples/calc++/test: Remove input.
4213 * examples/calc++/compile: Remove.
4214 * examples/Makefile.am: New.
4215 * configure.ac, Makefile.am: Adjust.
4216 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4217
4218 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4219
4220 * data/glr.c (yyFail): Drastically simplify; since the format argument
4221 never had any % directives, we can simply pass it to yyerror.
4222 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4223 be modified later, as that is the usual style in glr.c.
4224 Problems reported by Paul Hilfinger.
4225
4226 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4227 and size overflow errors.
4228 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4229 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4230 (YYSIZEMAX): New macro.
4231 (yystpcpy): New function, taken from yacc.c.
4232 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4233 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4234 so that we don't have to maintain their signatures.
4235 (yyFail): Check for buffer overflow, by using vsnprintf rather
4236 than vsprintf. Allocate a bigger buffer if possible.
4237 Report an error if buffer allocation fails.
4238 (yyStackOverflow): New function.
4239 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4240 the initialization was successful. It might fail if storage was
4241 exhausted.
4242 (yyexpandGLRStack): Add more checks for storage allocation failure.
4243 Use yyStackOverflow to report failures.
4244 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4245 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4246 Don't assume stack number fits in int.
4247 (yysplitStack): Check for storage allocation failure.
4248 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4249 can print diagnostics on storage allocation failure. All callers
4250 changed.
4251 (yyresolveValue): Use yybool for boolean.
4252 (yyreportSyntaxError): Check for size-calculation overflow.
4253 This code is taken from yacc.c.
4254 (yyparse): Check for storage allocation errors when allocating
4255 the initial stack.
4256
4257 2005-07-05 Akim Demaille <akim@epita.fr>
4258
4259 Extract calc++ from the documentation.
4260 * doc/bison.texinfo (Calc++): Add the extraction marks.
4261 * examples/extexi: New, from the aborted GNU Programming 2E.
4262 Separate the different paragraph of a file with empty lines.
4263 * examples/Makefile: Use it to extract the whole calc++ example.
4264
4265 2005-06-24 Akim Demaille <akim@epita.fr>
4266
4267 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4268 class typedefs.
4269
4270 2005-06-22 Akim Demaille <akim@epita.fr>
4271
4272 * doc/bison.texinfo (C++ Language Interface): First stab.
4273 (C++ Parsers): Remove.
4274
4275 2005-06-22 Akim Demaille <akim@epita.fr>
4276
4277 * data/lalr1.cc (yylex_): Honor %lex-param.
4278
4279 2005-06-22 Akim Demaille <akim@epita.fr>
4280
4281 Start a set of simple examples.
4282 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4283 * examples/calc++/calc++-driver.hh,
4284 * examples/calc++/calc++-parser.yy,
4285 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4286 * examples/calc++/compile, examples/calc++/test: New.
4287
4288 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4289
4290 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4291 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4292 which stems from the 2005-05-27 patch.
4293
4294 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4295
4296 * data/glr.c: Modify treatment of unused parameters to permit use
4297 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4298
4299 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4300
4301 Fix infringement on user name space reported by Janos Zoltan Szabo.
4302 * data/yacc.c (yyparse): strlen -> yystrlen.
4303
4304 2005-05-30 Akim Demaille <akim@epita.fr>
4305
4306 * data/lalr1.cc (_): New.
4307 Translate the various messages.
4308
4309 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4310
4311 Fix infringement on user name space reported by Bruno Haible.
4312 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4313 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4314 the user's name space.
4315 (alloca): Include <stdlib.h> to get it, if it's not built in.
4316 (YYMALLOC, YYFREE): Define only if needed.
4317 (malloc, free): Declare, but only if needed, as this infringes on
4318 the user name space.
4319
4320 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4321
4322 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4323 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4324 with %d format.
4325 * lib/ebitset.c (min, max): Undef before defining.
4326 * lib/vbitset.c (min, max): Likewise.
4327 * lib/subpipe.c (create_subpipe): Save local variables in case
4328 vfork clobbers them.
4329
4330 2005-05-24 Bruno Haible <bruno@clisp.org>
4331
4332 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4333 error message syntax used by gcc-4.0.
4334
4335 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4336
4337 * README: Mention m4 1.4.3. Remove obsolete advice about
4338 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4339
4340 * bootstrap: Remove workaround for problem I encountered with
4341 gettext 0.14.1; it seems to be fixed now.
4342
4343 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4344
4345 * NEWS: Version 2.0a.
4346
4347 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4348 the previous change.
4349
4350 Various maintainer cleanups.
4351 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4352 conftest*, for benefit of CVS commands run at the same time as
4353 "configure". Add build-aux, since "bootstrap" now creates it and
4354 its subfiles.
4355 * Makefile.cfg (move_if_change): Remove.
4356 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4357 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4358 (po_repo, do-po-update, po-update, wget_files, get-targets):
4359 (config.guess-url_prefix, config.sub-url_prefix):
4360 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4361 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4362 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4363 Remove.
4364 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4365 this is now the recommended name.
4366 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4367 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4368 ylwrap. These files now go into build-aux.
4369 * config/move-if-change: Remove.
4370 * config/prev-version.txt: Bump from 1.75 to 2.0.
4371
4372 * bootstrap: Add stdio-safer, unistd-safer modules.
4373 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4374 we don't need it).
4375 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4376 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4377 * lib/subpipe.c: Include "unistd-safer.h".
4378 (create_subpipe): Make sure all the newly-created
4379 file descriptors are > 2, so that diagnostics don't
4380 get sent down them (which might cause Bison to hang, in theory).
4381 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4382 * src/files.c (xfopen): Use fopen_safer, not fopen.
4383
4384 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4385 yesterday's yacc.c fix.
4386
4387 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4388
4389 * data/glr.c, data/lalr1.cc: Update copyright date.
4390
4391 Fix a destructor bug reported by Wolfgang Spraul in
4392 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4393 * data/yacc.c (yyabortlab): Don't call destructor, and
4394 don't set yychar to EMPTY.
4395 (yyoverflowlab): Don't call destructor.
4396 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4397 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4398 since we no longer output the message "discarding lookahead token
4399 end of input ()".
4400
4401 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4402
4403 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4404 fix a small glitch in debugging output.
4405 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4406 after YY_SYMBOL_PRINT where needed.
4407
4408 (struct yyGLRState): Add some comments.
4409 (struct yySemanticOption): Add some comments.
4410 (union yyGLRStackItem): Add comment.
4411
4412 (yymergeOptionSets): Correct this to properly perform the union,
4413 avoiding infinite reported by Michael Rosien.
4414 Update comment.
4415
4416 * tests/glr-regression.at: Add test for GLR merging error reported
4417 by M. Rosien.
4418
4419 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4420
4421 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4422 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4423 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4424 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4425 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4426 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4427 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4428 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4429 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4430 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4431 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4432 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4433 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4434 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4435 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4436 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4437 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4438 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4439 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4440 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4441 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4442 src/output.h, src/parse-gram.c, src/parse-gram.h,
4443 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4444 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4445 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4446 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4447 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4448 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4449 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4450 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4451 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4452 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4453 tests/reduce.at, tests/regression.at, tests/sets.at,
4454 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4455 Update FSF postal mail address.
4456
4457 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4458
4459 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4460 Problem reported by Ralf Menzel.
4461
4462 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4463
4464 * tests/actions.at: Test that stack overflow invokes destructors.
4465 From Marcus Holland-Moritz.
4466 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4467 from here....
4468 (yyreturn): to here. That way, destructors are called properly
4469 even if the stack overflows, or the user calls YYACCEPT or
4470 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4471 (yyoverflowlab): Destroy the lookahead.
4472
4473 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4474
4475 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4476
4477 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4478
4479 * NEWS: Bison-generated C parsers no longer quote literal strings
4480 associated with tokens.
4481 * src/output.c (prepare_symbols): Don't escape strings,
4482 since users don't want to see C escapes.
4483 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4484 in diagnostics.
4485 * tests/input.at (Torturing the Scanner): Likewise.
4486 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4487
4488 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4489
4490 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4491 the data size is known to be too small and we can't increase it.
4492 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4493
4494 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4495
4496 * src/parse-gram.y: Include quotearg.h.
4497 (string_as_id): Quote $1 before using it as a key, since the
4498 lexer no longer quotes it for us.
4499 (string_content): Don't strip quotes, since lexer no longer
4500 quotes it for us.
4501 * src/scan-gram.l: Include quotearg.h.
4502 ("\""): Omit quote.
4503 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4504 a key, since the rest of the lexer doesn't quote it.
4505 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4506 * tests/regression.at (Token definitions): Check for backslashes
4507 in token strings.
4508
4509 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4510 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4511 (yyparse): Revamp code to generate long syntax error message, to
4512 make it easier to translate, and to avoid problems with arithmetic
4513 overflow. Change "virtual memory" to "memory" in diagnostic, since
4514 we don't know whether the memory is virtual.
4515
4516 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4517
4518 * NEWS: Bison-generated C parsers now use the _ macro to
4519 translate strings.
4520 * data/yacc.c (_) [!defined _]: New macro.
4521 All English strings wrapped inside this macro.
4522 * doc/bison.texinfo (Bison Parser): Document _.
4523 * po/POTFILES.in: Include src/parse-gram.c, since it now
4524 includes translateable strings that parse-gram.y doesn't.
4525
4526 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4529 reverting the 2004-10-11 change to this function.
4530 (symbol_check_alias_consistency): Don't call symbol_type_set
4531 if the type name is already correct.
4532 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4533
4534 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4535
4536 * tests/regression.at (Token definitions): Don't use a token named
4537 c, as that generates a "#define c ..." that runs afoul of buggy
4538 stdlib.h that uses the identifier c as a member of struct
4539 drand48_data. Problem reported by Horst Wente.
4540
4541 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4542
4543 * bootstrap: Change translation URL from
4544 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4545 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4546 redirection glitches. Problem reported by twlevo@xs4all.nl.
4547
4548 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4549
4550 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4551 after operands; POSIX says this isn't portable for the c99 command.
4552
4553 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4554
4555 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4556 immediately if a data overrun has occurred; this may help us track
4557 down what may be a spurious failure on MacOS.
4558
4559 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4560
4561 Respond to problems reported by twlevo@xs4all.nl.
4562
4563 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4564
4565 * src/vcg.h: Comment fix.
4566 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4567 (G_CMAX): Change to -1 instead of INT_MAX.
4568
4569 * data/yacc.c (yyparse): Omit spaces before #line.
4570
4571 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4572
4573 * src/tables.c (state_number_to_vector_number): Put it inside an
4574 "#if 0", since it's not currently used. Problem reported by
4575 Roland McGrath.
4576
4577 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4578
4579 * src/output.c (escaped_output): Renamed from
4580 escaped_file_name_output, since we now use it for symbol tags as
4581 well. All uses changed.
4582 (symbol_destructors_output, symbol_printers_output):
4583 Escape symbol tags too.
4584 Problem reported by Matyas Forstner in
4585 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4586
4587 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4588 not needed.
4589 * src/output.c (user_actions_output, token_definitions_output,
4590 symbol_destructors_output, symbol_printers_output): Likewise.
4591 * src/reader.c (prologue_augment): Likewise.
4592 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4593
4594 * src/vcg.c (output_edge): Don't quote linestyle arg.
4595 Problem reported by twlevo@xs4all.nl.
4596
4597 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4598
4599 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4600 example, reported by Derek M Jones. Also, make the example even
4601 more outrageous, to better illustrate how bad the problem is.
4602
4603 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4604
4605 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4606 putsym. Typo reported by Sebastian Piping.
4607
4608 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4609
4610 * doc/bison.texinfo (Language and Grammar): some -> same
4611 (Epilogue): int he -> in the
4612 Typos reported by Sebastian Piping via Justin Pence.
4613
4614 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4615
4616 * tests/glr-regression.at (Improper handling of embedded actions
4617 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4618 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4619 with dollar signs in test names.
4620 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4621 for a similar reason.
4622
4623 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4624
4625 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4626 wants to redefine G_VIEW.
4627
4628 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4629
4630 * src/vcg.c (get_view_str): Remove case for normal_view.
4631 Problem reported by twlevo@xs4all.nl.
4632
4633 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4634
4635 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4636 Problem reported by twlevo@xs4all.nl.
4637
4638 * doc/bison.texinfo: Change @dircategory from "GNU programming
4639 tools" to "Software development". Requested by Richard Stallman
4640 via Karl Berry.
4641
4642 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4643
4644 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4645 Problem reported by twlevo@xs4all.nl.
4646
4647 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4648
4649 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4650 keyword; it's not needed with modern compilers, and it doesn't
4651 affect correctness with older compilers. Suggested by
4652 twlevo@xs4all.nl.
4653
4654 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4655
4656 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4657 gcc -Wswitch-default.
4658 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4659 * data/yacc.c (yyparse): Likewise.
4660
4661 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4662
4663 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4664 already. Let config.h define any nonstandard values.
4665
4666 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4667
4668 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4669 for the benefit of slower hosts. Problem reported by
4670 Nelson H. F. Beebe.
4671
4672 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4673
4674 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4675 being defined and not used.
4676 * data/lalr1.cc (yyparse): Likewise.
4677 Use "if (false)" rather than "if (0)".
4678
4679 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4680
4681 * TODO: Mention that we should allow NUL bytes in tokens.
4682
4683 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4684
4685 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4686 Problem reported by Hans Aberg.
4687
4688 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4689
4690 * src/getargs.c (version): Happy new year; update overall
4691 program copyright date from 2004 to 2005.
4692
4693 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4694 Problem reported by Hans Aberg.
4695 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4696 (Output file names.): Add a test for the case when standard output
4697 is closed.
4698
4699 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4700
4701 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4702 to fix an oversight in the Bison 2.0 manual.
4703
4704 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4705
4706 * NEWS: Version 2.0. Reformat the existing news items since
4707 1.875, so that related items are grouped together.
4708 * configure.ac (AC_INIT): Bump version to 2.0.
4709 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4710
4711 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4712 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4713 otherwise, we're not testing alloca. Unfortunately there's no
4714 simple way to consult HAVE_ALLOCA here.
4715
4716 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4717 for yymsg, too.
4718
4719 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4720 hand. This avoids a warning about comparing int to size_t when
4721 GCC warnings are enabled.
4722
4723 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4724
4725 * NEWS: Bison-generated parsers no longer default to using the
4726 alloca function (when available) to extend the parser stack, due
4727 to widespread problems in unchecked stack-overflow detection.
4728 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4729 responsibility to set it to a positive value. This lets the user
4730 specify a value that is not a preprocessor constant.
4731 * data/yacc.c (YYMAXDEPTH): Likewise.
4732 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4733 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4734 to be a compile-time constant. However, explain the constraints on it.
4735 Also, explain the constraints on YYINITDEPTH.
4736 (Table of Symbols): Explain that alloca is no longer the default.
4737 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4738 to 1.
4739
4740 * doc/bison.texinfo (Location Default Action): Mention that n must
4741 be zero when k is zero. Suggested by Frank Heckenbach.
4742
4743 2004-12-22 Akim Demaille <akim@epita.fr>
4744
4745 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4746 (parser::state_type, parser::semantic_type, parser::location_type):
4747 Private, not public.
4748 (parser::parse): Return ints, not bool.
4749 Returning a bool introduces a problem: 0 corresponds to false, and
4750 it seems weird to return false on success. Returning true changes
4751 the conventions for yyparse.
4752 Alternatively we could return void and send an exception.
4753 There is no clear consensus (yet?).
4754 (state_stack, semantic_stack, location_stack): Rename as...
4755 (state_stack_type, semantic_stack_type, location_stack_type): these.
4756 Private, not public.
4757 * tests/c++.at: New.
4758 * tests/testsuite.at, tests/Makefile.am: Adjust.
4759
4760 2004-12-21 Akim Demaille <akim@epita.fr>
4761
4762 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4763
4764 2004-12-21 Akim Demaille <akim@epita.fr>
4765
4766 Don't impose std::string for filenames.
4767
4768 * data/lalr1.cc (b4_filename_type): New.
4769 (position::filename): Use it.
4770 (parser.hh): Move the inclusion of stack.hh and location.hh below
4771 the user code, so that needed headers for the filename type can be
4772 included first.
4773 Forward declare them before the user code.
4774 * tests/Makefile.am (check-local, installcheck-local): Pass
4775 TESTSUITEFLAGS to the TESTSUITE.
4776
4777 2004-12-20 Akim Demaille <akim@epita.fr>
4778
4779 Use more STL like names: my_class instead of MyClass.
4780
4781 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4782 (SemanticStack, SemanticType, StateStack, StateType)
4783 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4784 (Parser::value): Rename as...
4785 (location_stack, location_type, rhs_number_type, semantic_stack)
4786 (semantic_type, state_stack, state_type, token_number_type, stack)
4787 (slice, traits, parser::yylloc, parser::yylval): these.
4788
4789 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4790
4791 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4792
4793 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4794 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4795
4796 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4797
4798 Remove uses of 'short int' and 'unsigned short int'. This raises
4799 some arbitrary limits. It uses more memory but nowadays that's
4800 not much of an issue.
4801
4802 This change does not affect the generated parsers; that's a different
4803 task, as some users will want to conserve memory there.
4804
4805 Ideally we should use size_t to represent all object counts, and
4806 something like ptrdiff_t to represent signed differences of object
4807 counts; but that will require more code-cleanup than I have the
4808 time to do right now.
4809
4810 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4811 Use size_t, not int or short int, to count objects.
4812 * src/closure.c (nritemset, closure): Likewise.
4813 * src/closure.h (nritemset, closure): Likewise.
4814 * src/nullable.c (nullable_compute): Likewise.
4815 * src/print.c (print_core): Likewise.
4816 * src/print_graph.c (print_core): Likewise.
4817 * src/state.c (state_compare, state_hash): Likewise.
4818 * src/state.h (struct state): Likewise.
4819 * src/tables.c (default_goto, goto_actions): Likewise.
4820
4821 * src/gram.h (rule_number, rule): Use int, not short int.
4822 * src/output.c (prepare_rules): Likewise.
4823 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4824 errs, reductions): Likewise.
4825 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4826 Likewise.
4827 * src/tables.c (vector_number, tally, action_number,
4828 ACTION_NUMBER_MINIMUM): Likewise.
4829 * src/output.c (muscle_insert_short_int_table): Remove.
4830
4831 2004-12-17 Akim Demaille <akim@epita.fr>
4832
4833 * data/lalr1.cc: Extensive Doxygenation.
4834 (error_): Rename as...
4835 (error): this, since it is visible to the user.
4836 Adjust callers.
4837 (Parser::message): Now an automatic variable from...
4838 (Parser::yyreport_syntax_error_): here.
4839 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4840 Parser::error.
4841 * tests/input.at: Escape $.
4842
4843 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4844
4845 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4846 Parenthesize rhs to avoid obscure problems with mistakes like
4847 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4848 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4849 b4_rhs_location): Likewise.
4850 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4851 b4_rhs_location): Likewise.
4852
4853 2004-12-16 Akim Demaille <akim@epita.fr>
4854
4855 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4856 yacc.c: be sure to stay within yycheck_.
4857 * tests/actions.at: Re-enable C++ tests.
4858
4859 2004-12-16 Akim Demaille <akim@epita.fr>
4860
4861 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4862 real.
4863
4864 2004-12-16 Akim Demaille <akim@epita.fr>
4865
4866 Use #define to handle the %name-prefix.
4867
4868 * data/glr.c, data/yacc.c: Comment changes.
4869 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4870 so that one can refer to yylex in the parser file, and have it
4871 renamed, as is the case with other skeletons.
4872
4873 2004-12-16 Akim Demaille <akim@epita.fr>
4874
4875 Move lalr1.cc internals into yy*.
4876
4877 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4878 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4879 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4880 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4881 (empty_, final_, terror_, errcode_, ntokens_)
4882 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4883 (looka_, ilooka_, error_range_, nerrs_):
4884 Rename as...
4885 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4886 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4887 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4888 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4889 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4890 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4891 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4892 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4893 these.
4894
4895 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4896
4897 Fix some problems reported by twlevo at xs4all.
4898 * src/symtab.c (symbol_new): Report an error if the input grammar
4899 contains too many symbols. This is better than calling abort() later.
4900 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4901 (struct node, struct graph):
4902 Rename member expand to stretch. All uses changed.
4903 (struct graph): Remove member layoutalgorithm. All uses removed.
4904 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4905 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4906 All uses changed.
4907 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4908
4909 2004-12-15 Akim Demaille <akim@epita.fr>
4910
4911 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4912 Add more Doxygen comments.
4913 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4914 (report_syntax_error_, translate_): Rename as...
4915 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4916 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4917
4918 2004-12-15 Akim Demaille <akim@epita.fr>
4919
4920 * data/lalr1.cc (lex_): Rename as...
4921 (yylex_): this.
4922 Move the trace here.
4923 Take the %name-prefix into account.
4924 Reported by Alexandre Duret-Lutz.
4925
4926 2004-12-15 Akim Demaille <akim@epita.fr>
4927
4928 Simplify the C++ parser constructor.
4929
4930 * data/lalr1.cc (debug_): Rename as...
4931 (yydebug_): so that the parser's internals are always in the yy*
4932 pseudo namespace.
4933 Adjust uses.
4934 (b4_parse_param_decl): Remove the leading comma as it is now only
4935 called as unique argument list.
4936 (Parser::Parser): Remove the constructor accepting a location and
4937 an initial debugging level.
4938 Remove from the other ctor the argument for the debugging level.
4939 (debug_level_type, debug_level, set_debug_level): New.
4940
4941 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4942 constructor calls.
4943
4944 2004-12-15 Akim Demaille <akim@epita.fr>
4945
4946 Remove b4_root related material: failure experiment
4947 (which goal was to allow to derive from a class).
4948
4949 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4950 definitions and uses.
4951
4952 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4953
4954 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4955 not 2, since it's not portable to subtract 1 from the start of an
4956 array. The new item 0 is never set or used. All uses changed.
4957
4958 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4959 the default definition of YYLLOC_DEFAULT. Problem reported
4960 by Frank Heckenbach.
4961
4962 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4963
4964 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4965 the normal case and one for the error case. Just use the
4966 first one uniformly. Problem reported by Frank Heckenbach.
4967 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4968 use exactly the same macro in both places.
4969 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4970 so that the normal-case YYRHSLOC works for the error case too.
4971 All uses changed.
4972 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4973 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4974 * doc/bison.texinfo (Location Default Action): Don't claim that
4975 we have an array of locations. Use the same macro for both glr
4976 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4977 the index is 0.
4978
4979 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4980
4981 * HACKING: Update email addresses to send announcements to.
4982
4983 * configure.ac (AC_INIT): Bump version to 1.875f.
4984
4985 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4986
4987 * NEWS: Version 1.875e.
4988 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4989
4990 * src/scan-skel.l: Include "complain.h", for "fatal".
4991
4992 * src/relation.h (relation_print, relation_digraph):
4993 Relation sizes are of type relation_node, not size_t (this is
4994 merely a doc fix, since the two types are equivalent).
4995 (relation_transpose): Relation sizes are of type relation_node,
4996 not int.
4997 * src/relation.c: Likewise.
4998 (top, infinity): Now of type relation_node, not int.
4999 (traverse, relation_transpose): Use relation_node, not int.
5000
5001 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5002 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5003 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5004
5005 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5006 specifying whether the test should be skipped. Use it tp
5007 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5008 fail on some hosts, and should be skipped.
5009
5010 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5011
5012 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5013 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5014 unless otherwise specified below.
5015
5016 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5017 to allocate kernel_base, kernel_items, kernel_size, since
5018 they needn't be initialized to 0.
5019 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5020 * src/closure.c (new_closure): Likewise, for itemset.
5021 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5022 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5023 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5024 (build_relations): Likewise for edge, states1, includes.
5025 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5026 * src/reader.c (packgram): Likewise, for ritem, rules.
5027 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5028 * src/relation.c (relation_digraph): Likewise for VERTICES.
5029 (relation_transpose): Likewise for new_R, end_R.
5030 * src/symtab.c (symbols_token_translations_init): Likewise for
5031 token_translations.
5032 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5033 (token_actions): Likewise for yydefact, actrow, conflrow,
5034 conflict_list.
5035 (save_column): Likewise for froms[symno], tos[symno].
5036 (goto_actions): Likewise for state_count.
5037 (pack_table): Likewise for base, pos, check.
5038 (tables_generate): Likewise for width.
5039
5040 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5041 for initial core. Just have a separate core, so we needn't worry
5042 about whether kernel_size and kernel_base are initialized.
5043
5044 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5045 kernel_size, kernel_items): Remove unnecessary initialization.
5046 * src/conflicts.c (conflicts): Likewise.
5047 * src/derives.c (derives): Likewise.
5048 * src/muscle_tablc (muscle_insert): Likewise.
5049 * src/relation.c (relation_digraph): Likewise.
5050 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5051 conflrow, conflict_table, conflict_list, table, check):
5052 Likewise.
5053
5054 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5055 This is because all callers pass unsigned int.
5056 * src/closure.h (new_closure): Likewise.
5057
5058 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5059 (build_relations): Initialize includes[i] in all cases.
5060 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5061 and rules[ruleno].precsym. Initialize members in order.
5062 * src/relation.c (relation_transpose): Always initialize new_R[i]
5063 and end_R[i].
5064 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5065
5066 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5067 conflict_list[0] was always 0, but now it isn't initialized.
5068
5069 * src/table.c (table_grow): When conflict_table grew, the grown
5070 area wasn't cleared. Fix this.
5071
5072 * lib/.cvsignore: Add strdup.c, strdup.h.
5073 * m4/.cvsignore: Add strdup.m4.
5074
5075 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5076
5077 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5078 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5079 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5080 ngotos + 1 without checking for overflow.
5081 (build_relations): Use END_NODE, not -1, to denote end of edges.
5082 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5083 build_relations): Use goto_number, not int, for goto numbers.
5084 * src/tables.c (save_column, default_goto): Likewise.
5085
5086 2004-11-23 Akim Demaille <akim@epita.fr>
5087
5088 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5089 of #defining from yystype.
5090 Don't typedef yystype, C++ does not need it.
5091 This lets it possible to forward declare it as union.
5092
5093 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 * bootstrap (gnulib_modules): Add extensions.
5096 Problem reported by Jim Meyering.
5097
5098 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5099
5100 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5101 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5102 src/system.h, src/tables.c: XFREE -> free, to accommodate
5103 recent change to gnulib xalloc.h.
5104 Problem reported by Jim Meyering.
5105
5106 2004-11-17 Akim Demaille <akim@epita.fr>
5107
5108 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5109
5110 2004-11-17 Akim Demaille <akim@epita.fr>,
5111 Alexandre Duret-Lutz <adl@gnu.org>
5112
5113 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5114 changes.
5115 (YYCDEBUG): Adjust.
5116 Use it instead of cdebug_.
5117 (Parser::debug_stream, Parser::set_debug_stream): New.
5118 (Parser::symprint_): Define cdebug_ for temporary backward
5119 compatibility.
5120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5121 debug_stream ().
5122
5123 2004-11-17 Akim Demaille <akim@epita.fr>
5124
5125 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5126 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5127 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5128 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5129
5130 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5131
5132 * data/glr.c (yyloc_default): Remove; not used.
5133 Problem reported by Frank Heckenbach.
5134
5135 2004-10-25 Akim Demaille <akim@epita.fr>
5136
5137 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5138 Introduce another definition to address simple location arrays.
5139 (yyGLRStack): New member: yyerror_range.
5140 (yyrecoverSyntaxError, yyparse): Update it.
5141 (yyrecoverSyntaxError): Use it when shifting the error token to
5142 have an accurate range, equivalent to the one computed by both
5143 yacc.c and lalr1.cc.
5144 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5145 that column numbers start at column 0, as per GNU Coding
5146 Standards, the others tests, and the doc.
5147 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5148 Adjust to the above change (first column is 0).
5149 And adjust the location of the "<error>", now covering the whole
5150 line.
5151
5152 2004-10-22 Akim Demaille <akim@epita.fr>
5153 and Paul Eggert <eggert@cs.ucla.edu>
5154
5155 Remove some arbitrary limits on goto numbers and relations.
5156 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5157 initial values, since they're never used.
5158 (set_goto_map): ngotos is now unsigned, so test for overflow
5159 by seeing whether it wraps around to zero.
5160 * src/lalr.h (goto_number): Now size_t, not short int.
5161 (GOTO_NUMBER_MAXIMUM): Remove.
5162 * src/relation.c (relation_print, traverse, relation_transpose):
5163 Check for END_NODE rather than looking at sign.
5164 * src/relation.h (END_NODE): New macro.
5165 (relation_node): Now size_t, not short int.
5166
5167 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5168
5169 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5170 keyword, not an identifier. Problem reported by Baron Schwartz in
5171 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5172
5173 2004-10-11 Akim Demaille <akim@epita.fr>
5174
5175 * src/symtab.c (symbol_check_alias_consistency): Also check
5176 type names, destructors, and printers.
5177 Reported by Alexandre Duret-Lutz.
5178 Recode the handling of associativity and precedence in terms
5179 of symbol_precedence_set.
5180 Accept no redeclaration at all, not even equal to the previous
5181 value.
5182 (redeclaration): New.
5183 Use it to factor redeclaration complaints.
5184 (symbol_make_alias): Don't set the type of the alias, let
5185 symbol_check_alias_consistency do it as for other features.
5186 * src/symtab.h (symbol): Add new member prec_location, and
5187 type_location.
5188 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5189 * tests/input.at (Incompatible Aliases): New.
5190
5191 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5192
5193 .cvsignore fixes to accommodate gnulib changes,
5194 and the practice of naming build directories "_build".
5195 * .cvsignore: Add "_*". Sort.
5196 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5197 * m4/.cvsignore: Add "*_gl.m4".
5198
5199 2004-10-06 Akim Demaille <akim@epita.fr>
5200
5201 * src/parse-gram.y (add_param): Fix the truncation of trailing
5202 spaces.
5203
5204 2004-10-05 Akim Demaille <akim@epita.fr>
5205
5206 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5207 whether the reducion was empty or not. This leaves room to
5208 improve the use of YYLLOC_DEFAULT in such a case.
5209 lalr1.cc is still experimental, so changing this is acceptable.
5210 And finally, there are probably not many users who changed the
5211 handling of locations in GLR, so changing is admissible too.
5212
5213 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5214 empty reduction, set @$ to an empty location ending the previously
5215 stacked symbol.
5216 Adjust uses to make sure the code is triggered on empty
5217 reductions.
5218 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5219 expected output: empty reductions have empty locations.
5220
5221 2004-09-29 Akim Demaille <akim@epita.fr>
5222
5223 * data/lalr1.cc: Move towards a more standard C++ coding style
5224 for templates: Class < T > -> Class<T>.
5225
5226 2004-09-29 Akim Demaille <akim@epita.fr>
5227
5228 * data/lalr1.cc: Reinstall the former ctor, for sake of
5229 compatibility, but warn it will be removed.
5230 Move towards a more standard C++ coding style (i.e., type *var ->
5231 type* var).
5232
5233 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5234
5235 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5236 since it's less likely to work if NULs are involved in the future.
5237
5238 2004-09-27 Akim Demaille <akim@epita.fr>
5239
5240 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5241
5242 2004-09-27 Akim Demaille <akim@epita.fr>
5243
5244 * data/lalr1.cc (b4_parse_param_decl_1): New.
5245 (b4_parse_param_decl): Use it to have different names between attribute
5246 and argument names.
5247 (b4_cc_constructor_call): Likewise.
5248
5249 2004-09-24 Akim Demaille <akim@epita.fr>
5250
5251 * src/parse-gram.y (add_param): Strip the leading and trailing
5252 blanks from a formal argument declaration.
5253 (YY_LOCATION_PRINT): New.
5254
5255 2004-09-24 Akim Demaille <akim@epita.fr>
5256
5257 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5258 after the location.
5259
5260 2004-09-24 Akim Demaille <akim@epita.fr>
5261
5262 * doc/bison.texinfo (Table of Symbols): Sort.
5263
5264 2004-09-21 Akim Demaille <akim@epita.fr>
5265
5266 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5267 the useless parentheses.
5268 Suggested by Paul Eggert.
5269
5270 2004-09-20 Akim Demaille <akim@epita.fr>
5271
5272 Let the initial-action act on the look-ahead, and use it for the
5273 "initial push" (corresponding to an hypothetical beginning-of-file).
5274 And let lalr1.cc honor %initial-action.
5275
5276 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5277 example.
5278 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5279 (Parser::Parser): Remove the ctor that used to initialize it.
5280 (Parser::parse): Like in the other skeletons, issue the "starting
5281 parse" message before any action.
5282 Honor %initial-action.
5283 Initialize the stacks with the lookahead.
5284 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5285 look-ahead.
5286 Push them in the stacks.
5287 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5288
5289 2004-09-20 Akim Demaille <akim@epita.fr>
5290
5291 * doc/bison.texinfo (Initial Action Decl): New.
5292
5293 2004-09-20 Akim Demaille <akim@epita.fr>
5294
5295 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5296 clearer criterion to define it.
5297 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5298 When reducing on an empty RHS, use the latest stacked location as
5299 location.
5300 yylloc is not always available.
5301 * data/glr.c: Likewise.
5302 Also, honor initial-actions.
5303
5304 2004-09-20 Akim Demaille <akim@epita.fr>
5305
5306 * data/yacc.c (YY_LOCATION_PRINT): New.
5307 Define when we know YYLTYPE's structure, i.e., when the default
5308 YYLLOC_DEFAULT is used.
5309 * data/c.m4 (b4_yysymprint_generate): Use it.
5310 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5311 value of the result.
5312 (error_start_): Replace with...
5313 (error_range_): this location array.
5314 This allows to replace code relying on the implementation of
5315 locations by portable code.
5316 * data/yacc.c (yylerrsp): Replace with...
5317 (yyerror_range): this.
5318 Every time a token is popped, update yyerror_range[0], to have an
5319 accurate location for the error token.
5320 * data/glr.c (YY_LOCATION_PRINT): New.
5321 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5322 deference a pointer.
5323 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5324 report the location in %printers.
5325
5326 * src/scan-skel.l: Instead of abort, report error messages to ease
5327 understanding skeleton scanning failures.
5328
5329 2004-09-16 Akim Demaille <akim@epita.fr>
5330
5331 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5332 (iterator, const_iterator): these, to be more in the C++ spirit.
5333 Also, return reverse iterators so that when displaying the stack
5334 we display its bottom first.
5335 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5336 from yacc.c.
5337 We should probably use vector here though.
5338
5339 2004-09-16 Akim Demaille <akim@epita.fr>
5340
5341 Have more complete shift traces.
5342
5343 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5344 to report Shifts instead of ad hoc YYDPRINTF invocations,
5345 including for the error token.
5346 * data/lalr1.cc (symprint_): Output the location.
5347 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5348 output the location within the %printer.
5349 Activate GLR tests, at least to make sure they compile properly.
5350 They still don't pass though.
5351 * tests/calc.at: Adjust expect verbose output, since now "Entering
5352 state..." is on a different line than the "Shifting" message.
5353
5354 2004-09-08 Akim Demaille <akim@epita.fr>
5355
5356 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5357 Bison directive from the Bison file to the invocation of this
5358 macro, so that these directives are passed to
5359 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5360 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5361 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5362 the extra Bison directives instead of the whole series.
5363 Change the grammar so that there are recoverable errors, and
5364 unrecoverable errors. Now we can have the parser give up before
5365 consuming the whole input. As a result we now can observe that
5366 the lookahead is freed when needed.
5367 Change the parser source to parse argv[1] instead of a hard coded
5368 string.
5369 Simplify yylex, and give a value and location to EOF.
5370 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5371 passed directives already coded in the file.
5372 Add some tests to check the location of "error".
5373 For some tests, the C++ parser is correct, and not yacc.c.
5374 For other tests, they provide different, but unsatisfying, values,
5375 so keep the C++ value so that at least one parser is "correct"
5376 according to the test suite.
5377 (Actions after errors): Remove, this is subsumed by the
5378 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5379
5380 2004-09-06 Akim Demaille <akim@epita.fr>
5381
5382 * data/lalr1.cc: Adjust the indentation of the labels.
5383 (Parser::pop): New.
5384 Use it.
5385
5386 2004-09-06 Akim Demaille <akim@epita.fr>
5387
5388 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5389 argument, an informative message.
5390 Call YY_SYMBOL_PRINT.
5391 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5392 * data/lalr1.cc (destruct_): Likewise.
5393 In addition, no longer depend on b4_yysymprint_generate and
5394 b4_yydestruct_generate to generate these functions, do it "by
5395 hand".
5396
5397 2004-09-03 Akim Demaille <akim@epita.fr>
5398
5399 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5400 invoked, yydestruct the lookahead.
5401 * tests/calc.at (Calculator $1): Update the expected lengths of
5402 traces: there is an added line for the discarded lookahead.
5403 * doc/bison.texinfo (Destructor Decl): Some rewording.
5404 Define "discarded" symbols.
5405
5406 2004-09-02 Akim Demaille <akim@epita.fr>
5407
5408 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5409
5410 2004-09-02 Akim Demaille <akim@epita.fr>
5411
5412 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5413 (YYDSYMPRINTF): Rename as...
5414 (YY_SYMBOL_PRINT): this.
5415 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5416 two.
5417 Use it instead of direct symprint_ calls.
5418 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5419 one.
5420
5421 2004-09-02 Akim Demaille <akim@epita.fr>
5422
5423 * data/lalr1.cc (b4_yysymprint_generate): New.
5424 (symprint_): New member function, defined when YYDEBUG.
5425 Use it consistently instead of token/nterm debugging output by
5426 hand.
5427 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5428 %printer calls to use cdebug_ when using lalr1.cc.
5429
5430 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5431
5432 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5433 with #ifdef YYDEBUG.
5434
5435 2004-08-26 Akim Demaille <akim@epita.fr>
5436
5437 * doc/bison.texinfo (Implementing Loops): Rename as...
5438 (Implementing Gotos/Loops): this.
5439
5440 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5441
5442 Adjust to latest gnulib.
5443 * bootstrap (gnulib_modules): Add xalloc-die.
5444 Set LC_ALL=C so that file names sort consistently.
5445 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5446 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5447 uintmax_t.m4, ulonglong.m4.
5448 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5449 po.m4 since we are now using _gl.m4 instead.
5450
5451 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5452
5453 * src/scan-action.l: Remove. Scanning of semantic actions is
5454 handled in scan-gram.l.
5455
5456 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5457
5458 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5459
5460 * src/location.h (struct): The file member is a uniqstr.
5461 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5462
5463 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5464
5465 Fix bug with non-%union parsers that have printers or destructors,
5466 which led to a Bison core dump. Reported by Peter Fales in
5467 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5468
5469 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5470 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5471 not to our own type.
5472 * src/output.c (symbol_destructors_output, symbol_printers_output):
5473 Don't assume %union.
5474 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5475 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5476 UNION-FLAG. All callers changed.
5477 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5478 Use type char, not unsigned int, when declaring an array of char;
5479 this lets us remove a cast.
5480 (Printers and Destructors): Add non-%union test cases.
5481
5482 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5483
5484 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5485 GLR writeups. E.g., avoid frenchspacing and the future tense,
5486 change "lookahead" to "look-ahead", and change "wrt" to "with
5487 respect to".
5488
5489 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5490
5491 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5492 New sections, split off from the GLR Parsers section. Put the new
5493 Simple GLR Parser near the start of the GLR section, for clarity.
5494 Rewrite connective text.
5495
5496 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5497
5498 * doc/bison.texinfo (Simple GLR Parsers): New section.
5499
5500 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5501
5502 * NEWS, TODO, doc/bison.texinfo:
5503 Use "look-ahead" instead of "lookahead", to be consistent.
5504 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5505 while we're fixing "look-ahead".
5506 * src/conflicts.c (shift_set): Renamed from shiftset.
5507 (look_ahead_set): Renamed from lookaheadset.
5508 * src/print.c: Likewise.
5509 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5510 name for "lookahead".
5511 (report_types, usage): Likewise.
5512 * src/getargs.h (report_look_ahead_tokens): Renamed from
5513 report_lookaheads.
5514 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5515 compute_lookaheads.
5516 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5517 (look_ahead_tokens_print): Renamed from lookaheads_print.
5518 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5519 state_rule_lookaheads_print.
5520 * src/state.h: Likewise.
5521 (reductions.look_ahead_tokens): Renamed from lookaheads.
5522 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5523 AT_DATA_LOOKAHEADS_GRAMMAR.
5524
5525 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5526
5527 * README: Update location of patched M4 distribution.
5528
5529 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5530
5531 Don't assume the C++ compiler takes the same arguments as the C compiler
5532 (trivial change).
5533 * configure.ac (O0CXXFLAGS): New var.
5534 * tests/atlocal.in (CXXFLAGS): Use it.
5535
5536 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5537
5538 Fix some "make check" problems with C++ reported by
5539 Albert Chin-A-Young for Tru64 C++ in this thread:
5540 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5541
5542 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5544 Output to a .cc file for C++, not to a .c file.
5545 * tests/calc.at (AT_CHECK_CALC): Likewise.
5546 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5547 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5548
5549 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5550
5551 * tests/calc.at, tests/actions.at: Workaround for SGI
5552 C++ compiler. (trivial change)
5553
5554 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5555
5556 Spent a few hours checking out which prerequisite versions the
5557 current sources actually require. I went all the way back to
5558 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5559 a seemingly endless set of combinations of versions more recent
5560 than that. The bottom line is that the current sources require
5561 fairly recent versions of the build tools, and it'll be some work
5562 to change this.
5563 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5564 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5565 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5566 Add comments explaining why those particular versions are
5567 currently needed.
5568
5569 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5570 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5571 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5572
5573 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5574 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5575
5576 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5577
5578 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5579 0.11.5. Suggested by Bruno Haible.
5580 * bootstrap: Remove gettext version checking.
5581
5582 * doc/bison.texinfo (Decl Summary): Also mention that %union
5583 can depend on prerequisite types. Problem reported by Tim
5584 Van Holder.
5585
5586 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5587
5588 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5589 * README-alpha: Don't tell people not to package this.
5590
5591 * bootstrap: Don't assume $(...) works; use `...` instead.
5592 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5593 gettext better.
5594
5595 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5596 put into the -d output file, and mention what to do if YYSTYPE is
5597 defined as a macro.
5598
5599 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5600
5601 Undo change made earlier today: it caused autopoint to not bring
5602 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5603 autopoint's.
5604
5605 * bootstrap: Check that gettext version matches what's in
5606 configure.ac. Warn users to ignore robots.txt ERROR 404.
5607 * bootstrap: Undo today's earlier change (logged below).
5608 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5609
5610 The gettext version checking is causing more trouble than it's
5611 curing; remove it. Problem reported by Paul Hilfinger.
5612
5613 * bootstrap: Issue a warning that one can expect a message
5614 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5615 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5616
5617 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5618
5619 Ensure that the C++ compiler used for testing actually works on a
5620 simple test program; if not, skip the C++-related tests. Problem
5621 reported by Vin Shelton in:
5622 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5623
5624 * m4/cxx.m4: New file.
5625 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5626 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5627 * tests/local.at (AT_COMPILE_CXX): Use it.
5628
5629 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5630
5631 * data/glr.c (yylloc): Output this macro even if locations are not
5632 being generated, as the GLR parser needs it even in that case.
5633 Problem reported by Troy A. Johnson
5634 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5635
5636 * configure.ac (AC_INIT): Update to 1.875e.
5637
5638 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5639
5640 * NEWS: Version 1.875d.
5641 * configure.ac (AC_INIT): Likewise.
5642 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5643
5644 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5645 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5646 lalr1.cc runs afoul of the first, and the last two are no longer
5647 supported by GCC 3.4.0.
5648 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5649 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5650
5651 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5652
5653 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5654 unsigned int, for compatibility with latest gnulib hash module.
5655 * src/state.c (state_hash, state_hasher): Likewise.
5656 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5657 * src/uniqstr.c (hash_uniqstr): Likewise.
5658
5659 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5660
5661 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5662
5663 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5664 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5665 character and string literals.
5666 (unexpected_end): New function.
5667 (unexpected_eof): Use it.
5668 (unexpected_newline): New function.
5669 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5670 actions.
5671
5672 * NEWS: Document %expect-rr.
5673
5674 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5675 Fix typo by replacing $1 with $option.
5676 Remove more 'intl'-related files.
5677 Don't DEFUN AM_INTL_SUBDIR twice.
5678
5679 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5680 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5681 strtoul.c.
5682 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5683 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5684 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5685 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5686 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5687 * src/.cvsignore: Add *.output.
5688
5689 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5690 gets copied to the output file.
5691
5692 2004-04-28 Paul Eggert <eggert@twinsun.com>
5693
5694 Get files from the gnulib and po repositories, instead of relying
5695 on them being in our CVS. Upgrade to latest versions of gnulib
5696 and Automake.
5697
5698 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5699 * bootstrap: Bootstrap from gnulib and po repositories.
5700 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5701 * README-cvs: Document these changes. Remove version numbers from
5702 mentions of build tools, since they change so often. Mention Flex.
5703
5704 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5705 (gl_USE_SYSTEM_EXTENSIONS): Add.
5706 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5707 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5708 does this for us.
5709 (AC_ISC_POSIX): Remove; we no longer support this
5710 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5711 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5712 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5713 Do not check for C89 headers, except for locale.h which is used
5714 by the Yacc library and must port to K&R hosts.
5715 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5716 Do not check for C89 functions, except for setlocale which is
5717 used by the Yacc library.
5718 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5719 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5720 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5721 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5722 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5723 AM_GNU_GETTEXT): Remove; now done by:
5724 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5725 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5726 for us.
5727
5728 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5729 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5730 Define to empty, as gnulib.mk will do the rest for us.
5731 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5732 for us.
5733 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5734 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5735
5736 * src/files.c: Include gnulib's xstrndup.h.
5737
5738 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5739 (REALLOC): Use xnrealloc, for likewise.
5740 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5741 (strnlen, memrchr): Remove decls; functions no longer used.
5742 Include <stpcpy.h>.
5743
5744 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5745 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5746 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5747 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5748 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5749 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5750 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5751 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5752 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5753 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5754 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5755 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5756 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5757 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5758 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5759 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5760 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5761 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5762 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5763 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5764 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5765 Remove, as these files are now generated automatically
5766 by bootstrap or automake.
5767
5768 * po/ChangeLog: Remove: all but one entry was a duplicate
5769 of this file, and I moved that 2000-11-02 entry here.
5770
5771 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5772 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5773 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5774 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5775 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5776 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5777 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5778 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5779 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5780 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5781 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5782 xstrndup.h.
5783 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5784 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5785 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5786 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5787 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5788 * src/.cvsignore: Remove *_.c.
5789
5790
5791 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5792 support it. (The latest stable gzip doesn't.)
5793
5794 2004-04-27 Paul Eggert <eggert@twinsun.com>
5795
5796 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5797 case, as stos_ is now used by destructors due to the 2004-02-09
5798 change.
5799
5800 Remove more K&R C support.
5801 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5802 * lib/subpipe.c (errno): Remove decl.
5803 Include <stdlib.h> unconditionally.
5804 (EXIT_FAILURE): Remove macro.
5805 * src/complain.c (vfprintf, strerror): Remove.
5806 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5807 unconditionally.
5808 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5809 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5810 (strchr, strspn, memchr): Remove decls.
5811 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5812 unconditionally. Do not declare perror.
5813 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5814 unconditionally.
5815
5816 * src/complain.c (_): Remove useless defn, as system.h defines this.
5817
5818 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5819 with latest obstack.h.
5820 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5821 to procedure types, as obstack.h now does that for us.
5822 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5823
5824 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5825 so that this include file can stand alone.
5826 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5827 does this now. Include subpipe.h first after config.h, to
5828 test whether it can stand alone.
5829
5830 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5831 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5832 unused declaration.
5833
5834 * tests/synclines.at (%union synch line): Put a dummy member in
5835 the union, because empty unions aren't allowed in C. Caught
5836 by GCC 3.4.0.
5837
5838 2004-04-13 Jim Meyering <jim@meyering.net>
5839
5840 * src/conflicts.c (conflicts_print): Correct format string typo:
5841 use `%%' to produce literal `%'. (trivial change)
5842
5843 2004-03-30 Paul Eggert <eggert@twinsun.com>
5844
5845 * src/getargs.c (version): Update copyright year to 2004.
5846
5847 * data/c.m4 (b4_int_type): Use 'short int' rather than
5848 'short', and similarly for 'long', 'unsigned', etc.
5849 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5850 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5851 yy_yypstack, yydumpstack): Likewise.
5852 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5853 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5854 Likewise.
5855 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5856 yy_stack_print, yyparse): Likewise.
5857 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5858 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5859 * lib/bitset.c (bitset_print): Likewise.
5860 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5861 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5862 * lib/bitsetv.c (bitsetv_dump): Likewise.
5863 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5864 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5865 Likewise.
5866 * src/LR0.c (allocate_itemsets): Likewise.
5867 * src/gram.h (rule_number, rule): Likewise.
5868 * src/lalr.h (goto_number): Likewise.
5869 * src/nullable.c (nullable_compute): Likewise.
5870 * src/output.c (prepare_rules): Likewise.
5871 * src/relation.c (relation_print, relation_digraph): Likewise.
5872 * src/relation.h (relation_node): Likewise.
5873 * src/state.h (state_number, transitions, errs, reductions,
5874 struct state): Likewise.
5875 * src/symtab.h (symbol_number, struct symbol): Likewise.
5876 * src/tables.c (vector_number, tally, action_number,
5877 default_goto, goto_actions): Likewise.
5878 * tests/existing.at (GNU Cim Grammar): Likewise.
5879 * tests/regression.at (Web2c Actions): Likewise.
5880
5881 * src/output.c (muscle_insert_short_int_table): Renamed from
5882 muscle_insert_short_table. All uses changed.
5883
5884 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5885
5886 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5887 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5888 Add %expect-rr rule.
5889
5890 * src/scan-gram.l: Recognize %expect-rr.
5891
5892 * src/conflicts.h (expected_sr_conflicts): Rename from
5893 expected_conflicts.
5894 (expected_rr_conflicts): Declare.
5895
5896 * src/conflicts.c (expected_sr_conflicts): Rename from
5897 expected_conflicts.
5898 (expected_rr_conflicts): Define.
5899 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5900 for GLR parsers.
5901 Use expected_sr_conflicts in place of expected_conflicts.
5902 Warn if expected_rr_conflicts used in non-GLR parser.
5903
5904 * doc/bison.texinfo: Add documentation for %expect-rr.
5905
5906 2004-03-08 Paul Eggert <eggert@gnu.org>
5907
5908 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5909 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5910
5911 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5912 in lalr1.cc.
5913 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5914 * src/scan-gram.l (scan_integer): New function.
5915 ({int}): Use it.
5916 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5917 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5918 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5919 Say "long int", not "long", for uniformity with GNU style.
5920
5921 2004-02-25 Paul Eggert <eggert@twinsun.com>
5922
5923 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5924 compilers. This fixes a problem with Intel's C++ compiler being
5925 chatty, reported by Guido Trentalancia in
5926 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5927
5928 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5929
5930 Support %destructor and merge error locations in lalr1.cc.
5931
5932 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5933 (Parser::stos_): Define unconditionally.
5934 (Parser::destruct_): New method. Generate its body with
5935 b4_yydestruct_generate.
5936 (Parser::error_start_): New attribute.
5937 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5938 token which are discarded.
5939 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5940 error_start_ when erroneous token are discarded.
5941 (Parser::parse) <yyerrlab1>: Compute the location of the error
5942 token so that it covers all the discarded tokens.
5943 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5944 it can be called with `%skeleton "lalr1.cc"', and do that.
5945
5946 2004-02-02 Paul Eggert <eggert@twinsun.com>
5947
5948 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5949 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5950 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5951 There's no need to mention top_builddir since Automake does that
5952 for us.
5953 (INCLUDES): Remove, as Automake says it's obsolescent.
5954 Contents migrated into AM_CPPFLAGS as described above.
5955 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5956
5957 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5958
5959 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5960 (yyreportSyntaxError): Handle case where lookahead token is
5961 YYEMPTY.
5962
5963 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5964
5965 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5966 resulting parsers are compilable with C++.
5967
5968 2003-12-23 Paul Eggert <eggert@twinsun.com>
5969
5970 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5971 * src/output.c (output_skeleton): Rename local var.
5972 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5973 Bison tokens, as this runs afoul of the 2003-10-07 change that
5974 disallowed NUL bytes in character constants or string literals.
5975
5976 * tests/local.at: Require Autoconf 2.59's Autotest.
5977 * tests/testsuite.at: Don't include local.at, since we now assume
5978 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5979 including it.
5980 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5981 multiple inclusion warnings.
5982
5983 2003-12-02 Akim Demaille <akim@epita.fr>
5984
5985 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5986 conditions.
5987 From Bruno Haible.
5988
5989 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5990
5991 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5992
5993 2003-10-07 Paul Eggert <eggert@twinsun.com>
5994
5995 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5996 if testsuite doesn't exist.
5997
5998 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5999 literals, unfortunately.
6000 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6001 Complain about NUL bytes in character constants or string literals.
6002
6003 2003-10-05 Paul Eggert <eggert@twinsun.com>
6004
6005 * NEWS: Don't document %no-default-prec, as it's still
6006 too experimental.
6007 * doc/bison.texinfo: Document %no-default-prec only if
6008 the defaultprec flag is set. Normally it's not.
6009
6010 2003-10-04 Paul Eggert <eggert@twinsun.com>
6011
6012 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6013 non-modifiable lvalue, instead of a modifiable one.
6014 * doc/bison.texinfo (Actions): Document that $$ can
6015 be assigned to. Do not claim that $$ and $N are
6016 array element references: user code should not rely on this.
6017
6018 2003-10-01 Paul Eggert <eggert@twinsun.com>
6019
6020 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6021 (grammar_declaration): Use it.
6022 * src/scan-gram.l: New token %no-default-prec.
6023 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6024 * NEWS, doc/bison.texinfo: Document the above.
6025
6026 2003-10-01 Akim Demaille <akim@epita.fr>
6027
6028 VCG no longer supports long_straight_phase.
6029
6030 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6031 * src/print_graph.c (print_graph): Adjust.
6032
6033 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
6034 and Paul Eggert <eggert@twinsun.com>
6035
6036 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6037 Table of Symbols): Document %default-prec.
6038 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6039 (grammar_declaration): Set default_prec on %default-prec.
6040 * src/scan-gram.l (%default-prec): New token.
6041 * src/reader.h (default_prec): New flag.
6042 * src/reader.c: Likewise.
6043 (packgram): Handle it.
6044 * tests/conflicts.at (%default-prec without %prec,
6045 %default-prec with %prec, %default-prec 1): New tests.
6046
6047 2003-09-30 Paul Eggert <eggert@twinsun.com>
6048
6049 * tests/testsuite.at: Include local.at, not input.at, fixing
6050 a typo in the 2003-08-25 patch.
6051
6052 2003-08-27 Akim Demaille <akim@epita.fr>
6053
6054 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6055 GCC warnings.
6056
6057 2003-08-26 Akim Demaille <akim@epita.fr>
6058
6059 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6060 "<\#" to avoid magic from Gnus when posting parts of this script.
6061
6062 2003-08-26 Akim Demaille <akim@epita.fr>
6063
6064 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6065 (Parser::parse): here.
6066 Adjust: nerrs and errstatus is now replaced by...
6067 (Parser::nerrs_, Parser::errstatus_): New.
6068
6069 2003-08-25 Akim Demaille <akim@epita.fr>
6070
6071 * config/announce-gen, Makefile.cfg: New.
6072 * Makefile.am: Adjust.
6073 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6074 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6075
6076 2003-08-25 Akim Demaille <akim@epita.fr>
6077
6078 When reducing initial empty rules, Bison parser read an initial
6079 location that is not defined. This results in garbage, and that
6080 affects Bison's own parser. Therefore we need (i) to extend Bison
6081 to support a means to initialize this location, and (ii) to use
6082 this CVS Bison to fix CVS Bison's parser.
6083
6084 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6085 with...
6086 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6087 * src/parse-gram.y: Adjust.
6088 (%initial-action): New.
6089 (%error-verbose): Since we require CVS Bison, there is no reason
6090 not to use it.
6091 * src/scan-gram.l: Adjust.
6092 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6093 * data/yacc.c (yyparse): Use b4_initial_action.
6094
6095 2003-08-25 Akim Demaille <akim@epita.fr>
6096
6097 * doc/bison.texinfo: Don't promote stdout for error messages.
6098
6099 2003-08-25 Akim Demaille <akim@epita.fr>
6100
6101 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6102 From Alexandre Duret-Lutz.
6103
6104 2003-08-25 Akim Demaille <akim@epita.fr>
6105
6106 Version 1.875c.
6107
6108 2003-08-25 Akim Demaille <akim@epita.fr>
6109
6110 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6111 Use them.
6112
6113 2003-08-25 Akim Demaille <akim@epita.fr>
6114
6115 * data/lalr1.cc (Parser::reduce_print_): New.
6116 Use it.
6117
6118 2003-08-25 Akim Demaille <akim@epita.fr>
6119
6120 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6121 error recovery loops. This patch is based on
6122 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6123 Also, augment the similarity between lalr1.cc and yacc.c.
6124 Note: the locations of error recovery rules are not correct yet.
6125
6126 * data/lalr1.cc: Comment changes to augment the similarity between
6127 lalr1.cc and yacc.c.
6128 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6129 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6130 yyerrlab), when hitting EOF, pop the whole stack here instead of
6131 merely falling thru the default error handling mechanism.
6132 (yyerrorlab): New label, with the old contents of YYERROR,
6133 plus the following change: pop the stack of rhs corresponding
6134 to the production that invoked YYERROR. That is how Yacc
6135 behaves (required by POSIX).
6136 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6137 fail.
6138
6139 2003-08-25 Akim Demaille <akim@epita.fr>
6140
6141 Tune local.at so that people can "autom4te -l autotest calc.at -o
6142 calc" for instance, to extract a sub test suite.
6143
6144 * tests/testsuite.at: Move the initialization, Autotest version
6145 requirement, and AT_TESTED invocation into...
6146 * tests/local.at: here.
6147 * tests/testsuite.at: Include it for compatibility with Autoconf
6148 2.57.
6149 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6150 be ignore.
6151
6152 2003-08-04 Paul Eggert <eggert@twinsun.com>
6153
6154 Rework code slightly to avoid gcc -Wtraditional warnings.
6155 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6156 The returned value is now stored in *YY0. All callers changed.
6157 * src/output.c (merge_output): Adjust to the above change.
6158
6159 2003-07-26 Paul Eggert <eggert@twinsun.com>
6160
6161 * data/glr.c (YYASSERT): New macro.
6162 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6163 yyresolveStates, yyprocessOneStack):
6164 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6165 Derived from a suggestion by Frank Heckenbach.
6166
6167 2003-07-25 Paul Eggert <eggert@twinsun.com>
6168
6169 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6170 for portability to K&R C (after ansi2knr, presumably). See
6171 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6172 by Frank Heckenbach, though I have omitted the structure-initialization
6173 part of his glr-knr.diff patch since I recall that the Portable
6174 C Compiler didn't require that change.
6175
6176 Let the user specify how to allocate and free memory.
6177 Derived from a suggestion by Frank Heckenbach in
6178 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6179 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6180 All uses of free, malloc, realloc changed to use these macros,
6181 and unnecessary casts removed.
6182 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6183
6184 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6185
6186 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6187 use s.empty() rather than s == "" to test for empty string; see
6188 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6189 (trivial change)
6190
6191 2003-06-25 Akim Demaille <akim@epita.fr>
6192
6193 * config/depcomp, config/install-sh: Update from masters.
6194
6195 2003-06-20 Paul Eggert <eggert@twinsun.com>
6196
6197 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6198 and return properly parenthesized result.
6199 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6200 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6201 Remove unnecessary parentheses from uses.
6202 * doc/bison.texinfo (Location Default Action): Describe the
6203 conventions for parentheses.
6204
6205 2003-06-19 Paul Eggert <eggert@twinsun.com>
6206
6207 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6208 yyreportTree): Do not assume that size_t is the same width as int,
6209 when printing sizes. Print sizes using an unsigned format.
6210 Problem reported by Frank Heckenbach in
6211 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6212
6213 Port to Forte Developer 7 C compiler.
6214 * data/glr.c (struct YYLTYPE): If locations are not being used,
6215 declare a single dummy member, as empty structs do not conform
6216 to the C standard.
6217 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6218 the Forte Developer 7 C compiler complains that end-of-loop
6219 code is not reached.
6220
6221 2003-06-17 Paul Eggert <eggert@twinsun.com>
6222
6223 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6224 avoid warnings from picky compilers about redefinition of PARAMS.
6225
6226 2003-06-17 Paul Eggert <eggert@twinsun.com>
6227
6228 Version 1.875b.
6229
6230 * NEWS: Document 1.875b.
6231
6232 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6233 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6234 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6235 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6236 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6237 per recent gettext manual's suggestion.
6238 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6239 Use prototypes, not old-style definitions.
6240 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6241 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6242 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6243 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6244 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6245 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6246 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6247 vbitset_or_and_cmp, vbitset_copy): Likewise.
6248
6249 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6250 Do not include <stdlib.h>.
6251 (PARAMS): Define unconditionally for C89.
6252 (ATTRIBUTE_NORETURN): Remove.
6253 (ATTRIBUTE_UNUSED): Define unconditionally.
6254
6255 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6256 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6257 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6258 * lib/vbitset.c, lib/vbitset.h: New files.
6259 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6260 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6261 from libbitset.
6262
6263 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6264 `How Can I Reset @code{yyparse}', since texinfo does not allow
6265 arbitrary @ in node names.
6266
6267 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6268 shouldn't be needed according to the gettext 0.12.1 documentation
6269 but which seem to be needed anyway: codeset.m4 glibc21.m4
6270 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6271 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6272 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6273
6274 * lib/.cvsignore: Add stdbool.h.
6275 * m4/.cvsignore: Add nls.m4, po.m4.
6276
6277 Upgrade to CVS gnulib.
6278 * stdbool_.h: File renamed from stdbool.h.in.
6279 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6280 AC_HEADER_STDBOOL.
6281 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6282 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6283 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6284 (MOSTLYCLEANFILES): New var.
6285 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6286 (stdbool.h): New rule.
6287 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6288 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6289 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6290 m4/quote.m4: Upgrade to today's gnulib.
6291
6292 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6293 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6294 the tests right now.
6295 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6296 yyerror are declared before use; C99 requires this.
6297
6298 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6299
6300 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6301 first.
6302 (yyrecoverSyntaxError): Correct the logic for setting and testing
6303 yyerrState.
6304 Correct comment on handling EOF.
6305 Allow states with only a default reduction, rather than failing
6306 (I can't quite reconstruct why these were not allowed before).
6307
6308 Fixes to avoid problem that $-N rules in GLR parsers can cause
6309 buffer overruns, corrupting state.
6310
6311 * src/output.c (prepare_rules): Output max_left_semantic_context
6312 definition.
6313 * src/reader.h (max_left_semantic_context): New variable declaration.
6314 * src/scan-gram.l (max_left_semantic_context): Define.
6315 (handle_action_dollar): Update max_left_semantic_context.
6316 * data/glr.c (YYMAXLEFT): New definition.
6317 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6318 (yyresolveAction): Ditto.
6319
6320 Fixes to problems with location handling in GLR parsers reported by
6321 Frank Heckenbach (2003/06/05).
6322
6323 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6324 (YYRHSLOC): Add parentheses, and define only if locations used.
6325 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6326 locations not used.
6327 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6328 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6329
6330 * tests/cxx-type.at: Exercise location information; update tests
6331 to differentiate output with and without locations.
6332 Remove forward declarations of yylex and yyerror---caused errors
6333 because default YYLTYPE not yet defined.
6334 Change semantic actions to compute strings, rather than printing
6335 them directly (to test proper passing of semantics values). Change
6336 output to prefix notation and update test data and expected results.
6337 (yylex): Track locations.
6338 (stmtMerge): Return value rather than printing, and include arguments
6339 in value.
6340
6341 2003-06-03 Paul Eggert <eggert@twinsun.com>
6342
6343 Avoid warnings generated by GCC 2.95.4 when Bison is
6344 configured with --enable-gcc-warnings.
6345 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6346 yy::]b4_parser_class_name[::translate_,
6347 yy::Stack::operator[] (unsigned),
6348 yy::Stack::operator[] (unsigned) const,
6349 yy::Slice::operator[] (unsigned),
6350 yy::Slice::operator[] (unsigned) const):
6351 Rename local vars to avoid warnings.
6352 * tests/glr-regression.at (Improper handling of embedded actions
6353 and $-N in GLR parsers): Remove unused local variable from yylex.
6354 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6355 (void) as arg when not pure, since we now assume C89 when building
6356 Bison. Pacify GCC by using parameter.
6357
6358 2003-06-02 Paul Eggert <eggert@twinsun.com>
6359
6360 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6361 yy::Location::lines, yy::Location::columns): Rename arguments
6362 to avoid shadowing; this removes a warning generated by GCC 3.3.
6363
6364 2003-06-01 Paul Eggert <eggert@twinsun.com>
6365
6366 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6367 to g++, as GCC 3.3 complains if you do it.
6368 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6369 everything that WARNING_CFLAGS has, except omit warnings
6370 not suitable for C++.
6371 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6372 * tests/atlocal.in (CXXFLAGS): New var.
6373 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6374
6375 Fix a GLR parser bug I reported in February; see
6376 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6377 The problem was that GLR parsers did not conform to the C standard,
6378 because actions like { $1 = $2 + $3; } expanded to expressions
6379 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6380 to a local variable. The C standard says that expressions
6381 like (var = f ()) + (var = f ()) have undefined behavior.
6382 Another problem was that GCC sometimes issues warnings that
6383 yyfill and its parameters are unused.
6384
6385 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6386 as possibly unused.
6387 (yyfill): New function.
6388 (YYFILL): Use it.
6389 (yyuserAction): Change type of yynormal to bool, so that it matches
6390 the new yyfill signature. Mark it as possibly unused.
6391
6392
6393 Follow up on a bug I reported in February, where a Bison-generated
6394 parser can loop. Provide a test case and a fix for yacc.c. I
6395 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6396 The original bug report is in:
6397 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6398
6399 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6400 macro's size was becoming unwieldy.
6401 (yyerrlab): Do not discard an empty lookahead symbol, as this
6402 might destroy garbage.
6403 (yyerrorlab): New label, with the old contents of YYERROR,
6404 plus the following change: pop the stack of rhs corresponding
6405 to the production that invoked YYERROR. That is how Yacc
6406 behaves, and POSIX requires this behavior.
6407 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6408 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6409 Define 'alarm' to do nothing if unistd.h is not available.
6410 Add a new rule "exp: '-' error;" to test the above change to
6411 data/yacc.c. Use 'alarm' to abort any test taking longer than
6412 10 seconds, as it's probably looping.
6413 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6414 Also, the new yacc.c generates two fewer diagnostics for an
6415 existing test.
6416
6417 2003-05-24 Paul Eggert <eggert@twinsun.com>
6418
6419 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6420 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6421 This fixes a problem reported by John Bowman when the Compaq/HP
6422 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6423 -ansi -Wall -gall).
6424 * data/yacc.c (union yyalloc): Likewise.
6425 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6426
6427 Switch from 'int' to 'bool' where that makes sense.
6428
6429 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6430 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6431 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6432 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6433 Return or accept bool, not int. All callers changed.
6434 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6435 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6436 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6437 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6438 bitset_or_and_cmp_): Likewise.
6439 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6440 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6441 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6442 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6443 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6444 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6445 bitset_stats_or_and_cmp): Likewise.
6446 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6447 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6448 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6449 ebitset_xor_cmp): Likewise.
6450 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6451 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6452 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6453 lbitset_xor_cmp): Likewise.
6454 * lib/bbitset.h: Include <stdbool.h>.
6455 (struct bitset_vtable): The following members now return bool, not
6456 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6457 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6458 or_and_cmp).
6459 * src/conflicts.c (count_rr_conflicts): Likewise.
6460 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6461 All uses changed.
6462 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6463 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6464 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6465 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6466 graph_flag): Likewise.
6467 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6468 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6469 graph_flag): Likewise.
6470 * src/output.c (error_verbose): Likewise.
6471 * src/output.h (error_verbose): Likewise.
6472 * src/reader.c (start_flag, typed): Likewise.
6473 * src/reader.h (typed): Likewise.
6474 * src/getargs.c (LOCATIONS_OPTION): New constant.
6475 (long_options, getargs): Use it.
6476 * src/lalr.c (build_relations): Use bool, not int.
6477 * src/nullable.c (nullable_compute): Likewise.
6478 * src/print.c (print_reductions): Likewise.
6479 * src/tables.c (action_row, pack_vector): Likewise.
6480 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6481 * src/output.c (prepare): Use it.
6482 * src/output.c (token_definitions_output,
6483 symbol_destructors_output, symbol_destructors_output): Use string,
6484 not boolean integer, to keep track of whether to output separator.
6485 * src/print_graph.c (print_core): Likewise.
6486 * src/state.c (state_rule_lookaheads_print): Likewise.
6487
6488 * config/install-sh: Sync from automake 1.7.5.
6489
6490 2003-05-14 Paul Eggert <eggert@twinsun.com>
6491
6492 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6493 semicolon after a grammar declaration, in the interest of possible
6494 future changes to the Bison input language.
6495 Do not allow a stray semicolon at the start of the grammar.
6496 (rhses.1): Allow one or more semicolons after any rule, including
6497 just before "|" as required by POSIX.
6498 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6499 grammar.
6500
6501 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6502
6503 %parse-param support for lalr1.cc.
6504
6505 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6506 b4_cc_constructor_calls, b4_cc_constructor_call,
6507 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6508 definitions.
6509 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6510 parse-param arguments.
6511 (yy::b4_parser_class_name): Declare instance variables to
6512 hold parse-param arguments.
6513 * tests/calc.at: s/value/semantic_value/ because value clashes
6514 with a member of yy::b4_parser_class_name. Adjust C++ code
6515 to handle %parse-param. Enable %parse-param test in C++.
6516
6517 2003-05-12 Paul Eggert <eggert@twinsun.com>
6518
6519 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6520 English a bit. Fix fclose typo. Change "const char" to "char
6521 const", and use ANSI C rather than K&R for "main". Suggest
6522 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6523 and suggest yy_switch_to_buffer.
6524
6525 2003-05-05 Paul Eggert <eggert@twinsun.com>
6526
6527 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6528 C89. This avoids a diagnostic on compilers that define __STDC__
6529 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6530 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6531
6532 2003-05-03 Paul Eggert <eggert@twinsun.com>
6533
6534 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6535 Do not overrun array bounds.
6536 This should fix a bug reported today by Olatunji Oluwabukunmi in
6537 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6538
6539 2003-04-29 Akim Demaille <akim@epita.fr>
6540
6541 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6542 * src/getargs.c, src/getargs.h: here, as bool, not int.
6543 (nondeterministic_parser): New.
6544 * src/parse-gram.y, src/scan-gram.l: Support
6545 %nondeterministic-parser.
6546 * src/output.c (prepare): Use nondeterministic_parser instead
6547 of glr_parser where appropriate.
6548 * src/tables.c (conflict_row, action_row, save_row)
6549 (token_actions, token_actions, pack_vector): Ditto.
6550
6551 2003-04-29 Akim Demaille <akim@epita.fr>
6552
6553 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6554
6555 2003-04-29 Akim Demaille <akim@epita.fr>
6556
6557 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6558 with %pure-parser and %locations to exercise the patch from Yakov
6559 Markovitch below.
6560
6561 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6562
6563 * data/yacc.c: (b4_lex_param): Corrected for the case where
6564 %lex-param is provided and %pure-parser isn't.
6565
6566 2003-04-27 Paul Eggert <eggert@twinsun.com>
6567
6568 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6569 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6570 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6571 if it is not defined.
6572 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6573
6574 2003-04-26 Paul Eggert <eggert@twinsun.com>
6575
6576 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6577 Declare to be of type suitable for the ninf value itself, not of
6578 type suitable for the corresponding table, since the latter might
6579 be unsigned but the ninf value might be negative. This fixes a
6580 bug reported by Alexandre Duret-Lutz in
6581 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6582
6583 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6584 invokes it. We shouldn't invoke it twice because it will attempt
6585 to put error.o in the archive twice. This fixes a glitch reported
6586 by Martin Mokrejs in
6587 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6588
6589 2003-04-21 Paul Eggert <eggert@twinsun.com>
6590
6591 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6592 to gnulib.
6593
6594 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6595
6596 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6597 Fix obvious typo that results in uncompilable GLR parsers
6598 when both %pure-parser and %locations are used. (trivial change)
6599
6600 2003-04-17 Paul Eggert <eggert@twinsun.com>
6601
6602 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6603 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6604 Do not insert the expected token via unput, as this runs afoul
6605 of a POSIX-compatibility bug in flex 2.5.31.
6606 All uses changed to BEGIN the parent state,
6607 since we no longer insert the expected token via unput.
6608 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6609 that is no longer emitted after the above change.
6610
6611 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6612 the first one. This change is from Paul Hilfinger, and it fixes
6613 regression reported by Werner Lemberg in
6614 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6615
6616 (resolve_sr_conflict): Don't invoke state_errs_set
6617 unless one or more tokens have been explicitly made errors.
6618 Otherwise, the above change causes Bison to abort.
6619
6620 * tests/existing.at (GNU pic Grammar): New test case, taken from
6621 Lemberg's email.
6622
6623 2003-03-31 Akim Demaille <akim@epita.fr>
6624
6625 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6626
6627 2003-03-31 Akim Demaille <akim@epita.fr>
6628
6629 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6630 output.
6631
6632 2003-03-31 Akim Demaille <akim@epita.fr>
6633
6634 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6635 From Paul Hilfinger.
6636
6637 2003-03-29 Akim Demaille <akim@epita.fr>
6638
6639 * m4/error.m4: Do not put under dynamic conditions some code which
6640 expansion is under static control.
6641
6642 2003-03-29 Akim Demaille <akim@epita.fr>
6643
6644 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6645
6646 2003-03-29 Akim Demaille <akim@epita.fr>
6647
6648 * doc/bison.texinfo (Strings are Destroyed): New.
6649
6650 2003-03-13 Paul Eggert <eggert@twinsun.com>
6651
6652 * .cvsignore: Add configure.lineno.
6653 * src/.cvsignore: Add yacc.
6654 * tests/.cvsignore: Add testsuite.log.
6655 * doc/fdl.texi: Sync with latest FSF version.
6656
6657 2003-03-12 Paul Eggert <eggert@twinsun.com>
6658
6659 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6660 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6661 cursor, instead of leaving it undefined. This fixes a bug
6662 reported by Tim Van Holder in
6663 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6664 * tests/input.at (Torturing the Scanner): Test the scanner on
6665 an empty input file, which was Tim Van Holder's test case.
6666
6667 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6668 <sys/resource.h> can be included, include sys/time.h and
6669 sys/times.h first, if available. This works around the SunOS
6670 4.1.4 porting bug reported by Bruce Becker in
6671 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6672
6673 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6674 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6675 AC_HEADER_SYS_WAIT.
6676
6677 Merge changes from gnulib. This was prompted because the CVS
6678 snapshot didn't build on Solaris 7 due to strnlen problems.
6679
6680 These changes need to be merged back into gnulib:
6681 * lib/hash.c: Include <stdbool.h> unconditionally.
6682 * m4/onceonly.m4 (m4_quote): New macro.
6683 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6684 Quote AC_FOREACH variable-expansions properly.
6685 The 2003-01-03 obstack.h change also needs merging.
6686 {end of changes requiring merging}
6687
6688 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6689 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6690 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6691 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6692 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6693 New files, imported from gnulib.
6694 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6695 above.
6696
6697 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6698 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6699 gnulib sources.
6700
6701 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6702 Add.
6703 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6704 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6705 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6706 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6707 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6708 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6709 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6710 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6711 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6712 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6713 (jm_PREREQ_ARGMATCH): Remove.
6714 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6715 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6716
6717 * src/system.h: Include <stdbool.h> unconditionally.
6718
6719 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6720 assuming at least C89 in the bitset code for some time now.
6721
6722 2003-03-03 Akim Demaille <akim@epita.fr>
6723
6724 * ro.po: New.
6725
6726 2003-03-02 Akim Demaille <akim@epita.fr>
6727
6728 * doc/bison.texinfo (Table of Symbols): Reactivate the
6729 documentation for %lex-param, and %parse-param.
6730
6731 2003-03-02 Akim Demaille <akim@epita.fr>
6732
6733 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6734 generate verbose error messages.
6735 Use the number of tokens as an upper bound in yytname, as it
6736 cannot be a non terminal.
6737
6738 2003-03-02 Akim Demaille <akim@epita.fr>
6739
6740 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6741 message.
6742
6743 2003-03-02 Akim Demaille <akim@epita.fr>
6744
6745 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6746 Use them to exercise yycheck overrun.
6747 Based on Andrew Suffield's grammar.
6748
6749 2003-03-02 Akim Demaille <akim@epita.fr>
6750
6751 Create tests/local.at for Bison generic testing macros.
6752
6753 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6754 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6755 This new file.
6756 * tests/calc.at (AT_CHECK_CALC): Adjust.
6757 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6758 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6759 * tests/local.at: here.
6760 (AT_COMPILE_CXX): Tags the tests using it as c++.
6761 Ignore the test if CXX is not functional.
6762
6763 2003-03-01 Paul Eggert <eggert@twinsun.com>
6764
6765 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6766 not loc->end, since loc->end might contain garbage and this leads
6767 to undefined behavior on some platforms.
6768 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6769 depend on *loc, so that the reader doesn't give the the false
6770 impression that *loc is initialized.
6771 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6772 does not survive the return.
6773
6774 2003-03-01 Akim Demaille <akim@epita.fr>
6775
6776 * src/scan-gram.l (code_start): Always initialize it when entering
6777 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6778 yylex invocation. An alternative would be making it static, but
6779 then it starts with the second %%'s beginning, instead of its end.
6780
6781 2003-02-28 Paul Eggert <eggert@twinsun.com>
6782
6783 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6784 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6785 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6786
6787 2003-02-26 Paul Eggert <eggert@twinsun.com>
6788
6789 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6790 Remove Sequent/Pyramid discussion (nobody uses them any more).
6791 Merge VMS and MS-DOS discussion; these ports may well be dead
6792 but let's keep mentioning them for now. Put <> around email
6793 addresses. Add copyright notice.
6794
6795 2003-02-24 Paul Eggert <eggert@twinsun.com>
6796
6797 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6798 to avoid collision with flex use of yylineno.
6799 Problem reported by Bruce Lilly in
6800 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6801 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6802 * data/yacc.c (yy_reduce_print): Likewise.
6803
6804 * config/depcomp: Sync with Automake 1.7.3.
6805
6806 2003-02-21 Akim Demaille <akim@epita.fr>
6807
6808 * data/lalr1.cc: Use temporary variables instead of casts to
6809 change integer types.
6810 Suggested by Paul Eggert.
6811
6812 2003-02-21 Akim Demaille <akim@epita.fr>
6813
6814 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6815 to avoid confusions with lalr1.cc's notion of Position.
6816 Suggested by Paul Eggert.
6817
6818 2003-02-20 Akim Demaille <akim@epita.fr>
6819
6820 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6821 before initial_columns.
6822 (location.hh): Use consistent variable names when defining the
6823 operator<<.
6824 Use "last" so that we subtract from Positions, not from unsigned.
6825
6826 2003-02-20 Akim Demaille <akim@epita.fr>
6827
6828 * data/lalr1.cc (position.hh): New subfile, including the extended
6829 and Doxygen'ed documentation of class Position.
6830 (location.hh): Use it.
6831 Document a` la Doxygen.
6832 With the help of Benoit Perrot.
6833
6834 2003-02-20 Akim Demaille <akim@epita.fr>
6835
6836 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6837 AT_YACC_IF.
6838 Redefine AT_YYERROR_SEES_LOC_IF using it.
6839 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6840 not defined.
6841 Don't use the location in yy::Parser::error_ and
6842 yy::Parser::print_ when not %locations.
6843 Activate more lalr1.cc tests.
6844
6845 2003-02-19 Akim Demaille <akim@epita.fr>
6846
6847 * data/lalr1.cc: When displaying a line number, be sure to make it
6848 an int.
6849
6850 2003-02-19 Akim Demaille <akim@epita.fr>
6851
6852 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6853 Remove, useless.
6854 (YYABORT, YYACCEPT, YYERROR): New.
6855 * tests/calc.at: Renable the lalr1.cc test.
6856
6857 2003-02-19 Akim Demaille <akim@epita.fr>
6858
6859 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6860 error recovery, mixing with/without pops and discarding of the
6861 lookahead.
6862 Exercise YYERROR.
6863 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6864
6865 2003-02-17 Paul Eggert <eggert@twinsun.com>
6866
6867 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6868 * tests/testsuite.at (AT_COMPILE): Use them.
6869 This fixes the testsuite problem reported by Robert Lentz in
6870 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6871
6872 2003-02-12 Paul Eggert <eggert@twinsun.com>
6873
6874 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6875 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6876 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6877 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6878 Check for malloc failure, for consistency with yacc.c.
6879 (yytname_size): Remove, for consistency with yacc.c.
6880
6881 The bug still remains in data/lalr1.cc, as I didn't have time
6882 to fix it there.
6883
6884 2003-02-06 Akim Demaille <akim@epita.fr>
6885
6886 * configure.ac (GXX): Rename as...
6887 (CXX): this, to keep the original Autoconf semantics.
6888 Require 2.57.
6889 * data/lalr1.cc: Fix b4_copyright invocations.
6890 If YYDEBUG is not defined, don't depend upon name_ being defined.
6891 (location.hh): Include string and iostream.
6892 (Position::filename): New member.
6893 (Position::Position ()): New.
6894 (operator<< (Position)): New.
6895 (operator- (Position, int)): New.
6896 (Location::first, Location::last): Rename as...
6897 (Location::begin, Location::end): these, to mock the conventional
6898 iterator names.
6899 (operator<< (Location)): New.
6900 * tests/atlocal.in (CXX): New.
6901 * tests/testsuite.at (AT_COMPILE_CXX): New.
6902 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6903 locations in a more synthetic way.
6904 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6905 lalr1.cc is used.
6906 Adjust the C locations to match those from Emacs: first column is
6907 column 0.
6908 Change all the expected results.
6909 Conform to the GCS: simplify the locations when applicable.
6910 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6911 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6912 these CPP macros with the m4 macros new defined by...
6913 (AT_CHECK_PUSHDEFS): this, i.e.:
6914 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6915 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6916 New macros.
6917 (AT_CHECK_POPDEFS): Undefine them.
6918 (AT_CHECK_CALC_LALR1_CC): New.
6919 Use it for the first lalr1.cc test.
6920
6921 2003-02-04 Akim Demaille <akim@epita.fr>
6922
6923 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6924 Location as is defined.
6925
6926 2003-02-04 Akim Demaille <akim@epita.fr>
6927
6928 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6929 name_ being defined.
6930
6931 2003-02-03 Paul Eggert <eggert@twinsun.com>
6932
6933 * src/gram.h (start_symbol): Remove unused decl.
6934
6935 Use more-consistent naming conventions for local vars.
6936
6937 * src/derives.c (derives_compute): Change type of local var from
6938 int to rule_number.
6939 * src/gram.c (grammar_rules_partial_print): Likewise.
6940 * src/print.c (print_core): Likewise.
6941 * src/reduce.c (reduce_grammar_tables): Likewise.
6942
6943 * src/gram.c (grammar_dump): Change name of item_number *
6944 local var from r to rp.
6945 * src/nullable.c (nullable_compute): Likewise.
6946
6947 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6948
6949 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6950 for symbol or symbol_number var.
6951 * src/reader.c (grammar_start_symbol_set): Likewise.
6952 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6953 Likewise.
6954 * src/state.c (transitions_to): Likewise.
6955 * src/state.h: Likewise.
6956 * src/tables.c (symbol_number_to_vector_number): Likewise.
6957
6958 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6959 char * var.
6960
6961 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6962 var.
6963
6964 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6965 var.
6966
6967 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6968 Use str, not s, for char * var. Use ch, not c, for character var.
6969 Use size for size var.
6970
6971 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6972 char * var.
6973 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6974 uniqstr var.
6975 * src/uniqstr.h: Likewise.
6976
6977 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6978 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6979 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6980 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6981 param to have same name as that of enum, so that we don't use
6982 "s" to stand for a non-state.
6983
6984 2003-02-02 Akim Demaille <akim@epita.fr>
6985
6986 * src/scan-skel.l: Scan more than one inert character per yylex
6987 invocation.
6988
6989 2003-02-01 Paul Eggert <eggert@twinsun.com>
6990
6991 Version 1.875a.
6992
6993 * po/LINGUAS: Add ms.
6994
6995 2003-01-30 Akim Demaille <akim@epita.fr>
6996
6997 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6998
6999 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7000
7001 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7002 of $1.
7003
7004 Changes in response to error report by S. Eken: GLR mode does not
7005 handle negative $ indices or $ indices in embedded rules correctly.
7006 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7007
7008 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7009 (b4_rhs_location): Ditto.
7010 (yyfill): New function to copy from stack tree into array
7011 incrementally.
7012 (yyuserAction): Modify to allow incremental move of semantic values
7013 to rhs array when in GLR mode.
7014 Define YYFILL to use in user-defined actions to fill semantic array
7015 as needed.
7016 Remove dummy use of yystack, as there is now a guaranteed use.
7017 (yydoAction): Modify to allow incremental move of semantic values
7018 to rhs array when in GLR mode.
7019 (yyresolveAction): Ditto.
7020 (yyglrShiftDefer): Update comment.
7021 (yyresolveStates): Use X == NULL for pointers, not !X.
7022 (yyglrReduce): Ditto.
7023 (yydoAction): Ditto
7024
7025 * tests/glr-regr1.at: Rename to ...
7026 * tests/glr-regression.at: Add new regression test for the problems
7027 described above (adapted from S. Eken).
7028 Update copyright notice.
7029 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7030 * tests/Makefile.am: Ditto.
7031
7032 2003-01-28 Paul Eggert <eggert@twinsun.com>
7033
7034 * data/lalr1.cc: Do not use @output_header_name@ unless
7035 b4_defines_flag is set. This fixes two bugs reported by
7036 Tim Van Holder in
7037 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7038 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7039
7040 2003-01-21 Paul Eggert <eggert@twinsun.com>
7041
7042 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7043 we don't need to worry about yyerrlab1 being reported as an
7044 "unused label" by non-GCC C compilers. The downside is that if
7045 locations are used then a couple of statements are duplicated each
7046 time YYERROR is invoked, but the upside is that the warnings
7047 should vanish.
7048 (yyerrlab1): Move code to YERROR.
7049 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7050 This reverts some of the 2002-12-27 change.
7051
7052 2003-01-17 Paul Eggert <eggert@twinsun.com>
7053
7054 * src/output.c (symbol_printers_output): Fix typo that led
7055 to core dump. Problem reported by Antonio Rus in
7056 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7057
7058 2003-01-13 Akim Demaille <akim@epita.fr>,
7059 Quoc Peyrot <chojin@lrde.epita.fr>,
7060 Robert Anisko <anisko_r@lrde.epita.fr>
7061
7062 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7063 when the stacks contain one element, as the loop would otherwise
7064 free the last state, and then use the top state (the one we just
7065 popped). This means that the initial elements will not be freed
7066 explicitly, as is the case in yacc.c; it is not a problem, as
7067 these elements have fake values.
7068
7069 2003-01-11 Paul Eggert <eggert@twinsun.com>
7070
7071 * NEWS: %expect-violations are now just warnings, reverting
7072 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7073 bootstrapping problem reported by Matthias Klose; see
7074 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7075 * src/conflicts.c (conflicts_print): Likewise.
7076 * tests/conflicts.at (%expect not enough, %expect too much,
7077 %expect with reduce conflicts): Likewise.
7078 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7079 that the warning is enabled if the number of conflicts changes
7080 (not necessarily increases).
7081
7082 * src/getargs.c (version): Update copyright year.
7083
7084 2003-01-09 Akim Demaille <akim@epita.fr>
7085
7086 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7087
7088 2003-01-08 Paul Eggert <eggert@twinsun.com>
7089
7090 * Makefile.maint (WGETFLAGS):
7091 New macro, containing "-C off" to disable proxy caches.
7092 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7093 (rel-check): Use $(WGET) instead of wget.
7094
7095 2003-01-06 Paul Eggert <eggert@twinsun.com>
7096
7097 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7098 the GLR paper of Scott, Johnstone and Hussain.
7099
7100 2003-01-04 Paul Eggert <eggert@twinsun.com>
7101
7102 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7103 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7104 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7105 (EXTRA_LIBRARIES): New var, for liby.a.
7106 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7107 (EXTRA_SCRIPTS): New var, for yacc.
7108
7109 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7110 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7111 Problem reported by Nelson H. F. Beebe.
7112
7113 2003-01-03 Paul Eggert <eggert@twinsun.com>
7114
7115 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7116 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7117 when compiling Bison 1.875's `bitset bset = obstack_alloc
7118 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7119
7120 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7121 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7122 grow to a huge size with typical invocation.
7123
7124 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7125 Use the pattern recommended by Autoconf 2.57, except also protect
7126 against double-definition.
7127 * src/system.h: Likewise.
7128 Portability issues reported by Nelson H. F. Beebe.
7129
7130 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7131 All uses changed. Provide a definition in both C and C++.
7132 (yytrue, yyfalse): Define even if defined (__cplusplus).
7133
7134 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7135 Reported by Nelson H. F. Beebe.
7136
7137 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7138
7139 2003-01-02 Paul Eggert <eggert@twinsun.com>
7140
7141 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7142 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7143 Bug reported by Nelson H. F. Beebe.
7144
7145 2003-01-01 Paul Eggert <eggert@twinsun.com>
7146
7147 * Version 1.875.
7148
7149 2002-12-30 Paul Eggert <eggert@twinsun.com>
7150
7151 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7152 Moved here from...
7153 (<INITIAL>","): Here. This causes stray "," to be treated
7154 more uniformly.
7155
7156 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7157 last brace in braced code when not in Yacc mode, for compatibility
7158 with Bison 1.35. This resurrects the 2001-12-15 patch to
7159 src/reader.c.
7160
7161 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7162 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7163
7164 2002-12-28 Paul Eggert <eggert@twinsun.com>
7165
7166 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7167 that of SYM's type. This fixes Debian bug 168069, reported by
7168 Thomas Olsson.
7169
7170 2002-12-28 Paul Eggert <eggert@twinsun.com>
7171
7172 Version 1.75f.
7173
7174 Switch back to the Yacc style of conflict reports, undoing some
7175 of the 2002-07-30 change.
7176 * doc/bison.texinfo (Understanding): Use Yacc style for
7177 conflict reports. Also, use new way of locating rules.
7178 * src/conflicts.c (conflict_report):
7179 Renamed from conflict_report_yacc, removing the old
7180 'conflict_report'. Translate the entire conflict report at once,
7181 so that we don't assume that "," has the same interpretation in
7182 all languages.
7183 (conflicts_output): Use Yacc-style conflict report for each state,
7184 instead of our more-complicated style.
7185 (conflicts_print): Use Yacc-style conflict report, except print
7186 the input file name when not emulating Yacc.
7187 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7188 Conflicted Reduction, %expect not enough, %expect too much,
7189 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7190 * tests/existing.at (GNU Cim Grammar): Likewise.
7191 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7192
7193 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7194 fatal): Don't invoke fflush; it's not needed and it might even be
7195 harmful for stdout, as stdout might not be open.
7196 * src/reduce.c (reduce_print): Likewise.
7197
7198 2002-12-27 Paul Eggert <eggert@twinsun.com>
7199
7200 Fix a bug where error locations were not being recorded correctly.
7201 This problem was originally reported by Paul Hilfinger in
7202 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7203
7204 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7205 top of the location stack's error locations.
7206 (yyerrlab): Set it. When discarding a token, push its location
7207 onto yylerrsp so that we don't lose track of the error's end.
7208 (yyerrlab1): Now is only the target of YYERROR, so that we can
7209 properly record the location of the action that failed. For GCC
7210 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7211 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7212 (yyerrlab2): New label, which yyerrlab now falls through to.
7213 Compute the error's location by applying YYLLOC_DEFAULT to
7214 the locations of all the symbols that went into the error.
7215 * doc/bison.texinfo (Location Default Action): Mention that
7216 YYLLOC_DEFAULT is also invoked for syntax errors.
7217 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7218 Error locations include the locations of all the tokens that were
7219 discarded, not just the last token.
7220
7221 2002-12-26 Paul Eggert <eggert@twinsun.com>
7222
7223 * src/files.c: Include quote.h.
7224 (compute_output_file_names): Warn if we detect conflicting
7225 outputs to the same file. This should catch the misunderstanding
7226 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7227
7228 * src/conflicts.c (conflicts_print): If the user specifies
7229 "%expect N", report an error if there are any reduce/reduce
7230 conflicts. This is what the manual says should happen.
7231 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7232 * tests/conflicts.at (%expect with reduce conflicts): New test.
7233
7234 Don't use m4_include on relative file names, as it doesn't work as
7235 desired if there happens to be a file with that name under ".".
7236
7237 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7238 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7239 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7240 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7241 * src/output.c (output_skeleton): Use full path names when
7242 specifying a file to include; don't rely on include path, as
7243 it's unreliable when the working file contains a file with
7244 that name.
7245
7246 2002-12-25 Paul Eggert <eggert@twinsun.com>
7247
7248 Remove obsolete references to bison.simple and bison.hairy.
7249 Problem mentioned by Aubin Mahe in
7250 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7251 * data/glr.c: Comment fix.
7252 * doc/bison.1: Remove references. Also, mention "yacc".
7253
7254 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7255 with -g option.
7256
7257 * src/parse-gram.y (declaration): Use enum "report_states" rather
7258 than its numeric value 1.
7259
7260 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7261 opening a new one. This fixes Debian bug 165349, reported by
7262 Bruce Stephens.
7263
7264 2002-12-24 Paul Eggert <eggert@twinsun.com>
7265
7266 Version 1.75e.
7267
7268 * Makefile.maint (cvs-update): Don't assume that the shell
7269 supports $(...), as Solaris sh doesn't.
7270
7271 * src/parse-gram.y (lloc_default): Remove test for empty
7272 nonterminals at the end, since it didn't change the result.
7273
7274 2002-12-24 Paul Eggert <eggert@twinsun.com>
7275
7276 If the user does not define YYSTYPE as a macro, Bison now declares it
7277 using typedef instead of defining it as a macro. POSIX requires this.
7278 For consistency, YYLTYPE is also declared instead of defined.
7279
7280 %union directives can now have a tag before the `{', e.g., the
7281 directive `%union foo {...}' now generates the C code
7282 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7283 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7284 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7285 instead of `yyltype'.
7286
7287 `yystype' and `yyltype' are now obsolescent macros instead of being
7288 typedefs or tags; they are no longer documented and will be
7289 withdrawn in a future release.
7290
7291 * data/glr.c (b4_location_type): Remove.
7292 (YYSTYPE): Renamed from yystype.
7293 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7294 (struct YYLTYPE): Renamed from struct yyltype.
7295 (YYLTYPE): Renamed from yyltype.
7296 (yyltype, yystype): New (and obsolescent) macros,
7297 for backward compatibility.
7298 * data/yacc.c: Likewise.
7299
7300 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7301 does not specify a union tag. This is for compatibility with
7302 Solaris 9 yacc.
7303
7304 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7305 const *, since it is now modified by stripping surrounding { }.
7306 (current_braced_code): Remove.
7307 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7308 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7309 trailing " {...}". Now of type <chars>.
7310 (grammar_declaration): Adjust to bundled tokens.
7311 (code_content): Remove; stripping is now done by add_param.
7312 (print_token_value): Print contents of bundled tokens.
7313 (token_name): New function.
7314
7315 * src/reader.h (braced_code, current_braced_code): Remove.
7316 (token_name): New decl.
7317
7318 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7319 token_type, not braced_code code_kind. All uses changed.
7320 (SC_PRE_CODE): New state, for scanning after a keyword that
7321 has (or usually has) an immediately-following braced code.
7322 (token_type): New local var, to keep track of which token type
7323 to return when scanning braced code.
7324 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7325 <INITIAL>"%parse-param", <INITIAL>"%printer",
7326 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7327 instead of returning a token type immediately.
7328 (<INITIAL>"{"): Set token type.
7329 (<SC_BRACED_CODE>"}"): Use it.
7330 (handle_action_dollar, handle_action_at): Now returns bool
7331 indicating success. Fail if ! current_rule; this prevents a core dump.
7332 (handle_symbol_code_dollar, handle_symbol_code_at):
7333 Remove; merge body into caller.
7334 (handle_dollar, handle_at): Complain in invalid contexts.
7335
7336 * NEWS, doc/bison.texinfo: Document the above.
7337 * NEWS: Fix years and program names in copyright notice.
7338
7339 2002-12-17 Paul Eggert <eggert@twinsun.com>
7340
7341 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7342 Reporting, Table of Symbols): Omit mentions of %lex-param and
7343 %parse-param from the documentation for now.
7344
7345 2002-12-15 Paul Eggert <eggert@twinsun.com>
7346
7347 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7348 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7349 lookahead symbol, and which sets yychar in parser actions) and it
7350 disagreed with the Bison documentation. Bug
7351 reported by Andrew Walrond.
7352
7353 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7354 as the caller now does that.
7355 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7356 (YYEMPTY): Parenthesize right hand side, since others use it.
7357 (yyparse): Don't assume that our generated code is the only code
7358 that sets yychar.
7359
7360 2002-12-13 Paul Eggert <eggert@twinsun.com>
7361
7362 Version 1.75d.
7363
7364 POSIX requires a "yacc" command.
7365 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7366 (MOSTLYCLEANFILES): Add yacc.
7367 (yacc): New rule.
7368 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7369 as an alias for bison y.
7370
7371 * po/LINGUAS: Add da.
7372
7373 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7374 problem with latest <getopt.h>.
7375 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7376
7377 * doc/fdl.texi: Upgrade to 1.2.
7378 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7379 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7380 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7381 gnulib.
7382 * config/install-sh: Sync with autotools.
7383
7384 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7385 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7386 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7387 locations are requested.
7388 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7389 locations are requested.
7390
7391 2002-12-12 Paul Eggert <eggert@twinsun.com>
7392
7393 Remove unportable casts and storage allocation tricks.
7394 While we're at it, remove almost all casts, since they
7395 usually aren't needed and are a sign of trouble.
7396
7397 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7398
7399 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7400 the pointer DSET returned by malloc; this isn't portable.
7401 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7402 Similarly for DERIVES.
7403 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7404 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7405 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7406
7407 * src/derives.c (derives_compute): Do not bother invoking
7408 int_of_rule_number, since rule numbers are integers.
7409
7410 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7411 rather than XMALLOC (char, N).
7412
7413 * src/files.c (filename_split): Rewrite to avoid cast.
7414
7415 * src/gram.h (symbol_number_as_item_number,
7416 item_number_as_symbol_number, rule_number_as_item_number,
7417 item_number_as_rule_number):
7418 Now inline functions rather than macros, to avoid casts.
7419 * src/state.h (state_number_as_int): Likewise.
7420 * src/tables.c (state_number_to_vector_number,
7421 symbol_number_to_vector_number): Likewise.
7422
7423 * src/gram.h (int_of_rule_number): Remove; no longer used.
7424
7425 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7426 since the resulting storage is always stored into.
7427
7428 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7429 where it's needed.
7430
7431 * src/muscle_tab.c (muscle_m4_output):
7432 Now inline. Return bool, not int.
7433 * src/state.c (state_compare): Likewise.
7434 * src/symtab.c (symbol_check_defined,
7435 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7436 hash_compare_symbol, hash_symbol):
7437 Likewise.
7438 * src/uniqstr.c (uniqstr_print): Likewise.
7439 * src/muscle_tab.c (muscle_m4_output_processor):
7440 New function, to avoid casts.
7441 * src/state.c (state_comparator, stage_hasher): Likewise.
7442 * src/symtab.c (symbol_check_defined_processor,
7443 symbol_check_alias_consistency_processor, symbol_pack_processor,
7444 symbol_translation_processor, hash_symbol_comparator,
7445 hash_symbol_hasher): Likewise.
7446 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7447 * src/muscle_tab.c (muscles_m4_output):
7448 Use new functions instead of casting old functions unportably.
7449 * src/state.c (state_hash_new): Likewise.
7450 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7451 symbols_token_translations_init):
7452 Likewise.
7453 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7454
7455 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7456 var instead of casting to long, to avoid casts.
7457 (prepare_states): Use MALLOC rather than alloca, so that we don't
7458 have to worry about alloca.
7459 * src/state.c (state_hash_lookup): Likewise.
7460
7461 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7462 local var instead of casting to unsigned char, to avoid casts.
7463
7464 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7465 STATE_ALLOC): Remove.
7466 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7467 rather than calloc, and use offsetof to avoid allocating slightly
7468 too much storage.
7469 (state_new): Initialize all members.
7470
7471 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7472
7473 * src/symtab.c (symbol_free): Remove; unused.
7474 (symbol_get): Remove cast in lhs of assignment.
7475 (symbols_do): Now static. Accept generic arguments, not
7476 hashing-related ones.
7477
7478 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7479 (symbol_processor): Remove.
7480 (symbols_do): Remove decl; now static.
7481
7482 * src/system.h (alloca): Remove; decl no longer needed.
7483 (<stddef.h>): Include, for offsetof.
7484 (<inttypes.>, <stdint.h>): Include if available.
7485 (uintptr_t): New type, if system lacks it.
7486 (CALLOC, MALLOC, REALLOC): New macros.
7487 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7488 new macros.
7489
7490 * src/tables.c (table_size): Now int, to pacify GCC.
7491 (table_grow, table_ninf_remap): Use signed table size.
7492 (save_row): Don't bother initializing locals when not needed.
7493 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7494 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7495
7496 * src/vcg.h: Correct misspellings.
7497
7498 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7499
7500
7501 * src/getargs.c (getargs): Don't assume EOF == -1.
7502
7503 2002-12-09 Paul Eggert <eggert@twinsun.com>
7504
7505 Change identifier spellings to avoid collisions with names
7506 that are reserved by POSIX.
7507
7508 Don't use names ending in _t, since POSIX reserves them.
7509 For consistency, remove _e and _s endings -- they're weren't
7510 needed to remove ambiguity. All uses changed.
7511 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7512 turn was just renamed from struniq_t.
7513 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7514 which in turn was just renamed from struniq_processor_t.
7515 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7516 in turn was renamed from hash_compare_struniq_t.
7517 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7518 (state_list): Renamed from state_list_t.
7519 * src/assoc.h (assoc): Renamed from assoc_t.
7520 * src/conflicts.c (enum conflict_resolution): Renamed from
7521 enum conflict_resolution_e.
7522 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7523 (rule_list): Renamed from rule_list_t.
7524 * src/getargs.h (enum trace): Renamed from enum trace_e.
7525 (enum report): Renamed from enum report_e.
7526 * src/gram.h (item_number): Renamed from item_number_t.
7527 (rule_number): Renamed from rule_number_t.
7528 (struct rule_s): Remove the "rule_s" part; not used.
7529 (rule): Renamed from rule_t.
7530 (rule_filter): Renamed from rule_filter_t.
7531 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7532 (goto_list): Renamed from goto_list_t.
7533 * src/lalr.h (goto_number): Renamed from goto_number_t.
7534 * src/location.h (location): Renamed from location_t.
7535 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7536 and moved here from:
7537 * src/muscle_tab.h (muscle_entry_t): here.
7538 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7539 (rule_list): Renamed from rule_list_t.
7540 * src/print_graph.c (static_graph): Renamed from graph.
7541 * src/reader.h (braced_code): Renamed from braced_code_t.
7542 Remove brace_code_e tag.
7543 * src/relation.h (relation_node): Renamed from relation_node_t.
7544 (relation_nodes): Renamed from relation_nodes_t.
7545 (relation): Renamed from relation_t.
7546 * src/state.h (state_number): Renamed from state_number_t.
7547 (struct state): Renamed from struct state_s.
7548 (state): Renamed from state_t.
7549 (transitions): Renamed from transitions_t. Unused (and
7550 misspelled) transtion_s tag removed.
7551 (errs): Renamed from errs_t. Unused errs_s tag removed.
7552 (reductions): Renamed from reductions_t. Unused tag
7553 reductions_s removed.
7554 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7555 (struct symbol_list): Renamed from struct symbol_list_s.
7556 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7557 (struct symbol): Renamed from struct symbol_s.
7558 (symbol): Renamed from symbol_t.
7559 * src/tables.c (vector_number): Renamed from vector_number_t.
7560 (action_number): Renamed from action_t.
7561 * src/tables.h (base_number): Renamed from base_t.
7562 * src/vcg.h (enum color): Renamed from enum color_e.
7563 (enum textmode): Renamed from enum textmode_e.
7564 (enum shape): Renamed from enum shape_e.
7565 (struct colorentry): Renamed from struct colorentry_s.
7566 (struct classname): Renamed from struct classname_s.
7567 (struct infoname): Renamed from struct infoname_s.
7568 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7569 (enum decision): Renamed from enum decision_e.
7570 (enum orientation): Renamed from enum orientation_e.
7571 (enum alignment): Renamed from enum alignment_e.
7572 (enum arrow_mode): Renamed from enum arrow_mode_e.
7573 (enum crossing_type): Renamed from enum crossing_type_e.
7574 (enum view): Renamed from enum view_e.
7575 (struct node): Renamed from struct node_s.
7576 (node): Renamed from node_t.
7577 (enum linestyle): Renamed from enum linestyle_e.
7578 (enum arrowstyle): Renamed from enum arrowstyle_e.
7579 (struct edge): Renamed from struct edge.
7580 (edge): Renamed from edge_t.
7581 (struct graph): Renamed from struct graph_s.
7582 (graph): Renamed from graph_t.
7583 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7584 Rename value_t -> value.
7585 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7586 value_t_as_yystype -> value_as_yystype.
7587
7588 Don't include <errno.h> in the mainstream code, since it
7589 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7590 * lib/get-errno.c, lib/get-errno.h: New files.
7591 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7592 get-errno.c.
7593 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7594 * src/output.c (output_skeleton): Likewise.
7595 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7596 instead of errno.
7597 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7598 Likewise.
7599 (handle_action_dollar, handle_action_at): Likewise.
7600 * src/system.h: Do not include <errno.h>.
7601 (TAB_EXT): Renamed from EXT_TAB.
7602 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7603
7604 Avoid str[a-z]*, since <string.h> reserves that name space.
7605 Change all instances of "struniq" in names to "uniqstr", and
7606 likewise for "STRUNIQ" and "UNIQSTR".
7607 * src/uniqstr.c: Renamed from src/struniq.c.
7608 * src/uniqstr.h: Renamed from src/struniq.h.
7609 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7610 * src/files.c (strsuffix): Remove; unused.
7611 (concat2): Renamed from stringappend. Now static.
7612 * src/files.h (strsuffix, stringappend): Remove; unused.
7613 * src/parse-gram.y (<chars>): Renamed from <string>.
7614 (<uniqstr>): Renamed from <struniq>.
7615 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7616 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7617 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7618 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7619 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7620 (N_EXPAND): Renamed from N_STRETCH.
7621
7622 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7623 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7624 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7625 Remove; unused.
7626 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7627 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7628 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7629 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7630 (BASE_MAXIMUM): Renamed from BASE_MAX.
7631 (BASE_MINIMUM): Renamed from BASE_MIN.
7632 (ACTION_MAX): Remove; unused.
7633 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7634 Unnecessary casts removed from above defines.
7635
7636
7637 Fix misspelling in names.
7638 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7639 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7640 G_NODE_ALIGNEMENT.
7641
7642
7643 * lib/timevar.c (timevar_report): Renamed from time_report,
7644 for consistency with other names.
7645 * lib/timevar.h (timevar_report): New decl.
7646 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7647
7648
7649 Sort include-file uses.
7650
7651 Reorder all include files under src to be in the order "system.h".
7652 then the ../lib include files in angle brackets (alphabetized),
7653 then the . include files in double-quotes (alphabetized). Fix
7654 dependency breakages encountered in this process, as follows:
7655 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7656 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7657 * src/state.h: Include "symtab.h".
7658
7659 2002-12-08 Paul Eggert <eggert@twinsun.com>
7660
7661 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7662 since this causes problems when __file__ contains character
7663 sequences like "@" that are treated specially by src/scan-skel.l.
7664 Instead, just use the file's basename. This fixes the bug
7665 reported by Martin Mokrejs in
7666 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7667
7668 2002-12-06 Paul Eggert <eggert@twinsun.com>
7669
7670 Add support for rules that do not have trailing semicolons, as
7671 POSIX requires. Improve the quality of locations in Bison
7672 diagnostics.
7673
7674 * src/location.c: Include <quotearg.h>.
7675 (empty_location): Now const.
7676 (location_print): New function. Follow the recommendation of the
7677 GNU Coding Standards for locations that span file boundaries.
7678 * src/location.h: Do not include <quotearg.h>; no longer needed.
7679 (boundary): New type.
7680 (location_t): Use it. This allows locations to span file boundaries.
7681 All member uses changed: file -> start.file or end.file (as needed),
7682 first_line -> start.line, first_column -> start.column,
7683 last_line -> end.line, last_column -> end.column.
7684 (equal_boundaries): New function.
7685 (LOCATION_RESET, LOCATION_STEP): Remove.
7686 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7687 (empty_location): Now const.
7688 (location_print): New decl.
7689 * src/parse-gram.y (lloc_default): New function, which handles
7690 empty locations more accurately.
7691 (YYLLOC_DEFAULT): Use it.
7692 (%token COLON): Remove.
7693 (%token ID_COLON): New token.
7694 (rules): Use it.
7695 (declarations, rules): Remove trailing semicolon.
7696 (declaration, rules_or_grammar_declaration):
7697 Allow empty (";") declaration.
7698 (symbol_def): Remove empty actions; no longer needed.
7699 (rules_or_grammar_declaration): Remove trailing semicolon.
7700 (semi_colon.opt): Remove.
7701 * src/reader.h: Include location.h.
7702 (scanner_cursor): New decl.
7703 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7704 rolling our own.
7705 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7706 of *loc.
7707 (STEP): Remove. No longer needed, now that adjust_location does
7708 the work. All uses removed.
7709 (scanner_cursor): New var.
7710 (adjust_location): Renamed from extend_location. It now sets
7711 *loc and adjusts the scanner cursor. All uses changed.
7712 Don't bother testing for CR.
7713 (handle_syncline): Remove location arg; now updates scanner cursor.
7714 All callers changed.
7715 (unexpected_end_of_file): Now accepts start boundary of token or
7716 comment, not location. All callers changed. Update scanner cursor,
7717 not the location.
7718 (SC_AFTER_IDENTIFIER): New state.
7719 (context_state): Renamed from c_context. All uses changed.
7720 (id_loc, code_start, token_start): New local vars.
7721 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7722 processing of Yacc white space and equivalents here.
7723 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7724 instead of returning ID immediately, since we need to search for
7725 a subsequent colon.
7726 (<INITIAL>"'", "\""): Save token_start.
7727 (<INITIAL>"%{", "{", "%%"): Save code_start.
7728 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7729 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7730 BEGIN context_state at end, not INITIAL.
7731 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7732 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7733 Return correct token start.
7734 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7735 the start of a character, string or multiline comment is found.
7736 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7737 Reduction): Adjust reported locations to match the more-precise
7738 results now expected.
7739 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7740 * tests/reduce.at (Useless Rules, Reduced Automaton,
7741 Underivable Rules): Likewise.
7742 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7743 or "|"' now that so many other tokens are allowed by the new grammar.
7744
7745 * src/complain.h (current_file): Remove duplicate decl;
7746 current_file is now owned by files.h.
7747 * src/complain.c, src/scan-gram.l: Include files.h.
7748
7749 2002-12-06 Paul Eggert <eggert@twinsun.com>
7750
7751 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7752 promotes to int; it might be unsigned int.
7753 * data/yacc.c (yy_reduce_print): Likewise.
7754
7755 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7756 be #defined in the prologue, not in the Bison declarations.
7757 This fixes Debian Bug 102878, reported by Shaul Karl.
7758
7759 2002-12-02 Paul Eggert <eggert@twinsun.com>
7760
7761 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7762 * lib/strtoul.c: New file, from gnulib.
7763 This fixes a porting bug reported by Peter Klein in
7764 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7765
7766 2002-11-30 Paul Eggert <eggert@twinsun.com>
7767
7768 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7769 and put only a forward declaration in the prologue. This is for
7770 consistency with the other scanner helper functions.
7771
7772 Type clashes now generate warnings, not errors, since it
7773 appears that POSIX may allow some grammars with type clashes.
7774 * src/reader.c (grammar_current_rule_check): Warn about
7775 type clashes instead of complaining.
7776 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7777
7778 Add Yacc library, since POSIX requires it.
7779 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7780 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7781 * lib/main.c, lib/yyerror.c: New files.
7782
7783 gram_error can be static; it need not be extern.
7784 * src/reader.h (gram_error): Remove decl.
7785 * src/parse-gram.y (gram_error): Now static. Add static decl.
7786 (print_token_value): Omit parameter names from forward decl,
7787 for consistency.
7788
7789 2002-11-29 Paul Eggert <eggert@twinsun.com>
7790
7791 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7792 be declared before being used. E.g., one should typically
7793 declare them in the prologue. Use GNU coding style in examples.
7794 Put "const" consistently after the type it modifies. Mention
7795 that C99 supports "inline". Mention that yyerror traditionally
7796 returns "int".
7797
7798 %parse-param and %lex-param now take just one argument, the
7799 declaration; the argument name is deduced from the declaration.
7800
7801 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7802 Reporting, Table of Symbols): Document this.
7803 * src/parse-gram.y (add_param): New function.
7804 (COMMA): Remove.
7805 (declaration): Implement new rule for %parse-param and %lex-param.
7806 * src/scan-gram.l: "," now elicits a warning, rather than being
7807 a token; this is more compatible with byacc.
7808 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7809
7810 2002-11-27 Paul Eggert <eggert@twinsun.com>
7811
7812 Rename identifiers to avoid real and potential collisions.
7813
7814 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7815 to avoid collision with lex macro described by Bruce Lilly in
7816 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7817 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7818 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7819 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7820 All uses changed.
7821 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7822 The name "yycontrol" violates the name space rules, and this stuff
7823 wasn't being used anyway.
7824 (input): Remove action; this stuff wasn't being used.
7825 (gram_error): Rename local variable yylloc -> loc.
7826 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7827 (YY_DECL): Don't use "yy" at start of local variables.
7828 All uses changed, e.g., yylloc -> loc.
7829 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7830 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7831 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7832 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7833
7834 * src/parse-gram.y (gram_error): loc is now const *.
7835 * src/reader.h (gram_error): Likewise.
7836
7837 2002-11-24 Paul Eggert <eggert@twinsun.com>
7838
7839 Version 1.75c.
7840
7841 * tests/actions.at (Actions after errors): Use an output format
7842 more similar to that of the Printers and Destructors test.
7843 Test the position of the ';' token too.
7844 (Printers and Destructors): Likewise.
7845 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7846 unnecessarily alarming people when the test fails.
7847
7848 * data/yacc.c (yyerrlab1): Move this label down, so that the
7849 parser does not discard the lookahead token if the user code
7850 invokes YYERROR. This change is required for POSIX conformance.
7851
7852 * lib/error.c: Sync with gnulib.
7853
7854 2002-11-22 Paul Eggert <eggert@twinsun.com>
7855
7856 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7857 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7858 * lib/xmalloc.c: Likewise.
7859
7860 2002-11-20 Paul Eggert <eggert@twinsun.com>
7861
7862 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7863
7864 2002-11-20 Paul Eggert <eggert@twinsun.com>
7865
7866 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7867 should use `if (! x) abort ();' rather than `assert (x);', and
7868 anyway it's one less thing to worry about configuring.
7869
7870 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7871 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7872 and replace all instances of assert with abort.
7873 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7874 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7875
7876 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7877 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7878 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7879 hash_find_entry, hash_rehash, hash_insert): Likewise.
7880 * src/conflicts.c (resolve_sr_conflict): Likewise.
7881 * src/lalr.c (set_goto_map, map_goto): Likewise.
7882 * src/nullable.c (nullable_compute): Likewise.
7883 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7884 * src/reader.c (packgram, reader): Likewise.
7885 * src/state.c (state_new, state_free, state_transitions_set,
7886 state_reduction_find): Likewise.
7887 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7888 symbol_pack): Likewise.
7889 * src/tables.c (conflict_row, pack_vector): Likewise.
7890 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7891 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7892 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7893 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7894
7895 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7896 (ARGMATCH_CONSTRAINT): New macro.
7897 (ARGMATCH_ASSERT): Use it.
7898
7899 * src/system.h (verify): New macro.
7900 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7901 rather than assert.
7902 * src/tables.c (tables_generate): Likewise.
7903
7904 * src/struniq.c (struniq_assert): Now returns void, and aborts
7905 if the assertion is false.
7906 (struniq_assert_p): Remove.
7907 * src/struniq.h: Likewise.
7908
7909 2002-11-18 Paul Eggert <eggert@twinsun.com>
7910
7911 * data/glr.c (yygetLRActions): Replace `yyindex' with
7912 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7913 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7914 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7915
7916 2002-11-18 Akim Demaille <akim@epita.fr>
7917
7918 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7919 space.
7920 From Tim Van Holder.
7921
7922 2002-11-17 Paul Eggert <eggert@twinsun.com>
7923
7924 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7925 to "SyntaxError" for consistency with my 2002-11-15 change.
7926
7927 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7928 not define to {}, since this breaks the common use of `YYDPRINTF
7929 ((...));' if a single statement is desired (e.g. before `else').
7930 Work around GCC warnings by surrounding corresponding calls with
7931 {} if needed.
7932 (yyhasResolvedValue): Remove unused function.
7933 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7934 loop body.
7935 (yyreportSyntaxError): Renamed from yyreportParseError.
7936 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7937 All uses changed.
7938 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7939 extern when possible. Remove unused initializations.
7940
7941 2002-11-16 Akim Demaille <akim@epita.fr>
7942
7943 Augment the similarity between GLR and LALR traces.
7944
7945 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7946 (YY_REDUCE_PRINT): New.
7947 (yyparse): Use them.
7948 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7949 YYDPRINT here.
7950 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7951 state reached after the reduction/recovery, since...
7952 (yyparse, yyprocessOneStack): Report the state we are entering in.
7953
7954 2002-11-16 Akim Demaille <akim@epita.fr>
7955
7956 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7957 Add support for --trace=skeleton.
7958 * src/scan-skel.l: %option debug.
7959 Scan strings of non-@ or \n instead of character by character.
7960 (scan_skel): Handle trace_skeleton.
7961 (QPUTS): New.
7962 (@output_parser_name@, @output_header_name@): ``Restore'' their
7963 support (used to be M4 macros).
7964 * data/yacc.c: Quote larger chunks, a la glr.c.
7965 * data/lalr1.cc: Likewise.
7966 The header guards are no longer available, so use some other
7967 string than `YYLSP_NEEDED'.
7968
7969 2002-11-16 Akim Demaille <akim@epita.fr>
7970
7971 Make the ``Printers and Destructors'' test more verbose, taking
7972 `yacc.c''s behavior as (possibly wrong) reference.
7973
7974 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7975 instead of fprint on stdout.
7976 Set and report the last_line of the symbols.
7977 Consistently display values and locations.
7978
7979 2002-11-16 Paul Eggert <eggert@twinsun.com>
7980
7981 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7982
7983 2002-11-15 Paul Eggert <eggert@twinsun.com>
7984
7985 * tests/actions.at (Actions after errors): New test case.
7986
7987 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7988 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7989 tests/action.at, tests/calc.at, tests/conflicts.at,
7990 tests/cxx-type.at, tests/regression.at:
7991 "parse error" -> "syntax error" for POSIX compatibility.
7992 "parsing stack overflow..." -> "parser stack overflow" so
7993 that code matches Bison documentation.
7994
7995 2002-11-15 Akim Demaille <akim@epita.fr>
7996
7997 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7998 take two BRACED_CODE, not two string_content.
7999 Free the scanner's obstack when we are done.
8000 (code_content): New.
8001 * tests/calc.at: Adjust.
8002 * doc/bison.texinfo: Adjust.
8003 Also, make sure to include the `,' for these declarations.
8004
8005 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8006
8007 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8008 definition; avoids potential autoreconf problems.
8009
8010 2002-11-15 Akim Demaille <akim@epita.fr>
8011
8012 Always check the value returned by yyparse.
8013
8014 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8015 returned by yyparse.
8016 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8017 Adjust calls.
8018 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8019 returned by yyparse.
8020
8021 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8022
8023 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8024 on input.at test.
8025
8026 2002-11-14 Paul Eggert <eggert@twinsun.com>
8027
8028 * src/output.c (output_skeleton): Call xfopen instead of
8029 duplicating xfopen's body.
8030
8031 Fix bugs reported by Nelson H. F. Beebe in
8032 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8033
8034 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8035 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8036 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8037 file twice in the grammar, as an extra check.
8038
8039 * tests/input.at (Torturing the Scanner): Surround the
8040 backslash-newline tests with "#if 0", to make it less likely that
8041 we'll run into compiler bugs. Bring back solitary \ inside
8042 comment, but add a closing comment to work around HP C bug. Don't
8043 test backslash-newline in C character constant.
8044
8045 2002-11-14 Akim Demaille <akim@epita.fr>
8046
8047 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8048 status of the compiler.
8049 Calling `exit 1' is no longer needed.
8050 Reported by Nelson H. F. Beebe.
8051
8052 2002-11-14 Akim Demaille <akim@epita.fr>
8053
8054 * tests/atlocal.in (CPPFLAGS): We have config.h.
8055 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8056 New.
8057 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8058 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8059 * tests/regression.at, tests/torture.at: Use them for all the
8060 grammars that are to be compiled.
8061 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8062 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8063 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8064
8065 2002-11-14 Akim Demaille <akim@epita.fr>
8066
8067 * doc/bison.texinfo: Various formatting changes (alignments in
8068 samples, additional @group/@end group, GCS in samples.
8069 Use @deffn instead of simple @table to define the directives,
8070 macros, variables etc.
8071
8072 2002-11-13 Paul Eggert <eggert@twinsun.com>
8073
8074 Fix some bugs reported by Albert Chin-A-Young in
8075 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8076
8077 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8078 -o c"; the HP C compiler chatters during compilation.
8079 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8080 * tests/headers.at (export YYLTYPE): Likewise.
8081
8082 * tests/input.at (Torturing the Scanner): Remove lines containing
8083 solitary backslashes, as they tickle a bug in the HP C compiler.
8084
8085 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8086 comments, since they're not portable. Use GNU coding style.
8087
8088 2002-11-13 Akim Demaille <akim@epita.fr>
8089
8090 * data/yacc.c: Leave bigger chunks of quoted text.
8091 (YYDSYMPRINTF): New.
8092 Use it to report symbol activities.
8093 * data/glr.c (YYDSYMPRINTF): New.
8094 Use it.
8095
8096 2002-11-12 Paul Eggert <eggert@twinsun.com>
8097
8098 Version 1.75b.
8099
8100 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8101 (yyglrReduce): Return yyok, not 0.
8102 This should avoid the enumerated-type warnings reported
8103 by Nelson H. F. Beebe in
8104 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8105
8106 * lib/bbitset.h (BITSET_INLINE): Remove.
8107 * lib/bitset.h [! BITSET_INLINE]: Remove.
8108 (bitset_set, bitset_reset, bitset_test): Rename local vars
8109 to avoid shadowing warnings by GCC.
8110
8111 * data/glr.c (inline): Remove #define. It's the user's
8112 responsibility to #define it away, just like 'const'.
8113 This fixes one of the bugs reported by Nelson H. F. Beebe in
8114 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8115
8116 * Makefile.maint (po-check): Scan .l and .y files instead of the
8117 .c and the .h files that they generate. This fixes the bug
8118 reported by Tim Van Holder in:
8119 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8120 Look for N_ as well as for _. Try to avoid matching #define for
8121 N_ and _.
8122 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8123 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8124 * src/scan-gram.l: Revamp regular expressions so that " and '
8125 do not confuse xgettext.
8126
8127 * src/struniq.h (struniq_new): Do not declare the return type
8128 to be 'const'; this violates the C standard.
8129 * src/struniq.c (struniq_new): Likewise.
8130
8131 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8132
8133 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8134 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8135 linker.
8136
8137 2002-11-12 Akim Demaille <akim@epita.fr>
8138
8139 * Makefile.maint: Sync with Autoconf:
8140 (local_updates): New.
8141
8142 2002-11-12 Akim Demaille <akim@epita.fr>
8143
8144 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8145
8146 2002-11-12 Akim Demaille <akim@epita.fr>
8147
8148 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8149 locations.
8150
8151 2002-11-12 Akim Demaille <akim@epita.fr>
8152
8153 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8154 not yyvalue.
8155
8156 2002-11-12 Akim Demaille <akim@epita.fr>
8157
8158 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8159 Use it to test the GLR parser.
8160
8161 2002-11-12 Akim Demaille <akim@epita.fr>
8162
8163 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8164 defines it.
8165 * data/glr.c (yystos): New.
8166 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8167 (YYDSYMPRINT): New.
8168 (yyval): Don't define it, it is handled via M4.
8169 (yyrecoverParseError): Free verbosely the discarded symbols.
8170 * data/yacc.c (yysymprint): Remove, rather...
8171 (b4_yysymprint_generate): invoke.
8172 * data/c.m4 (b4_yysymprint_generate): New.
8173 Accept pointers as arguments, as opposed to the version from
8174 yacc.c.
8175 (b4_yydestruct_generate): Likewise.
8176 * tests/cations.at (Printers and Destructors): Use Bison directives
8177 instead of CPP macros.
8178 Don't rely on internal details.
8179
8180 2002-11-12 Akim Demaille <akim@epita.fr>
8181
8182 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8183 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8184 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8185 it against YYEMPTY and so forth), work on yytoken (i.e., set
8186 it to YYEMPTY etc.).
8187 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8188 (b4_symbol_actions): Remove.
8189 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8190 for 0, end-of-input.
8191
8192 2002-11-12 Akim Demaille <akim@epita.fr>
8193
8194 * doc/bison.texinfo (Destructor Decl): New.
8195
8196 2002-11-12 Akim Demaille <akim@epita.fr>
8197
8198 * src/tables.c (tables_generate): Use free for pointers that
8199 cannot be NULL, not XFREE.
8200 (pack_vector): Use assert, not fatal, for bound violations.
8201 * src/state.c (state_new): Likewise.
8202 * src/reader.c (reader): Likewise.
8203 * src/lalr.c (set_goto_map): Likewise.
8204 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8205 the file name.
8206
8207 2002-11-12 Akim Demaille <akim@epita.fr>
8208
8209 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8210 Restore.
8211 * src/scan-gram.l (last_string): Is global to the file, not to
8212 yylex.
8213 * src/parse-gram.y (input): Don't append the epilogue here,
8214 (epilogue.opt): do it here, and free the scanner's obstack.
8215 * src/reader.c (epilogue_set): Rename as...
8216 (epilogue_augment): this.
8217 * data/c.m4 (b4_epilogue): Defaults to empty.
8218
8219 2002-11-12 Akim Demaille <akim@epita.fr>
8220
8221 * src/getargs.c (long_options): Remove duplicates.
8222 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8223 Remove.
8224 * doc/bison.rnh: Remove.
8225 * doc/bison.texinfo (VMS Invocation): Remove.
8226
8227 2002-11-12 Akim Demaille <akim@epita.fr>
8228
8229 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8230 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8231
8232 Use struniq for symbols.
8233
8234 * src/symtab.h (symbol_t): The tag member is a struniq.
8235 (symbol_type_set): Adjust.
8236 * src/symtab.c (symbol_new): Takes a struniq.
8237 (symbol_free): Don't free the tag member.
8238 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8239 (hash_compare_symbol, hash_symbol): these.
8240 Use the fact that tags as struniqs.
8241 (symbol_get): Use struniq_new.
8242 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8243 Returns a strniq.
8244 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8245 and type members are struniqs.
8246 * src/reader.c (get_merge_function)
8247 (grammar_current_rule_merge_set): Adjust.
8248 (TYPE, current_type): Are struniq.
8249
8250 Use struniq for file names.
8251
8252 * src/files.h, src/files.c (infile): Split into...
8253 (grammar_file, current_file): these.
8254 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8255 * src/reduce.c (reduce_print): Likewise.
8256 * src/getargs.c (getargs): Likewise.
8257 * src/complain.h, src/complain.c: Likewise.
8258 * src/main.c (main): Call struniqs_new early enough to use it for
8259 file names.
8260 Don't free the input file name.
8261
8262 2002-11-12 Akim Demaille <akim@epita.fr>
8263
8264 * src/symtab.c (symbol_free): Remove dead deactivated code:
8265 type_name are properly removed.
8266 Don't use XFREE to free items that cannot be NULL.
8267 * src/struniq.h, src/struniq.c: New.
8268 * src/main.c (main): Initialize/free struniqs.
8269 * src/parse-gram.y (%union): Add astruniq member.
8270 (yyprint): Adjust.
8271 * src/scan-gram.l (<{tag}>): Return a struniq.
8272 Free the obstack bit that used to store it.
8273 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8274
8275 2002-11-11 Paul Eggert <eggert@twinsun.com>
8276
8277 Revamp to fix many (but not all) of the C- and M4-related quoting
8278 problems. Among other things, this fixes the Bison bug reported
8279 by Jan Hubicka when processing the Bash grammar; see:
8280 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8281
8282 Use new @ escapes consistently. Represent brackets with @{ and @}
8283 rather than @<:@ and @:>@, since this works a bit better with dumb
8284 editors like vi. Represent @ with @@, since @ is now consistently
8285 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8286 __ofile__, to avoid unexpected expansions. Similarly, use @output
8287 rather than #output.
8288
8289 * data/c.m4 (b4_copyright): Omit file name from comment, since
8290 the file name could contain "*/".
8291 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8292 be quoted. All uses changed.
8293
8294 * data/glr.c: Use new @ escapes consistently.
8295 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8296 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8297 Remove, since they couldn't handle arbitrary characters in file
8298 names.
8299 * data/lalr1.cc: Likewise.
8300 * data/yacc.c: Likewise.
8301
8302 * src/files.c (output_infix): Remove; all uses removed.
8303 * src/files.h: Likewise.
8304
8305 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8306 mishandled funny characters in file names, and anyway it isn't
8307 needed any more.
8308 * data/yacc.c: Likewise.
8309 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8310
8311 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8312 * data/yacc.c: Likewise.
8313
8314 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8315 strings now.
8316 (muscle_init): Quote filename as a C string.
8317 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8318 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8319 * src/output.c (escaped_file_name_output): New function.
8320 (prepare_symbols): Quote tokens for M4.
8321 (prepare): Don't insert output_infix, output_prefix,
8322 output_parser_name, output_header_name; this is now down by scan-skel.
8323 Insert skeleton as a C string.
8324
8325 * src/output.c (user_actions_output, symbol_destructors_output,
8326 symbol_printers_output): Quote filenames for C and M4.
8327 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8328
8329 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8330 escapes other than \\ and \'; this simplifies the code.
8331 (<SC_STRING>): Likewise, for \\ and \".
8332 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8333 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8334 Use new escapes @{ and @} for [ and ].
8335
8336 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8337 them with auto vars.
8338 Switch to new escape scheme, where @ is the escape character uniformly.
8339 Abort if a stray escape character is found. Avoid unbounded input
8340 buffer when parsing non-escaped text.
8341
8342 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8343 __oline__, #output, $@, and @{ do not have unintended meanings.
8344
8345 2002-11-09 Paul Eggert <eggert@twinsun.com>
8346
8347 Fix the test failure due to GCC warnings described in
8348 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8349 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8350 evaluate to 0 if it's impossible for NINF to be in the respective
8351 table.
8352 (yygetLRActions, yyrecoverParseError): Use them.
8353
8354 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8355 counted in the token inserted at end of file. Now takes
8356 location_t *, not location_t, so that the location can be
8357 adjusted. All uses changed.
8358
8359 * tests/regression.at (Invalid inputs): Adjust wording in
8360 diagnostic to match the new behavior.
8361
8362 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8363 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8364 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8365 abort ();'. This reduces the runtime of the "Many lookaheads"
8366 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8367 GCC 3.2.
8368
8369 2002-11-07 Paul Eggert <eggert@twinsun.com>
8370
8371 * src/parse-gram.y (CHARACTER): Remove unused token.
8372 All uses removed.
8373
8374 * src/scan-gram.l: Remove stack option. We no longer use the
8375 stack, since the stack was never deeper than 1; instead, use the
8376 new auto var c_context to record the stacked value.
8377
8378 Remove nounput option. At an unexpected end of file, we now unput
8379 the minimal input necessary to end cleanly; this simplifies the
8380 code.
8381
8382 Avoid unbounded token sizes where this is easy.
8383
8384 (unexpected_end_of_file): New function.
8385 Use it to systematize the error message on unexpected EOF.
8386 (last-string): Now auto, not static.
8387 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8388 (scanner_last_string_free): Remove; not used.
8389 (percent_percent_count): Move decl to just before use.
8390 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8391 not the (never otherwised-used) CHARACTER.
8392
8393 2002-11-07 Akim Demaille <akim@epita.fr>
8394
8395 Let yyerror always receive the msg as last argument, so that
8396 yyerror can be variadic.
8397
8398 * data/yacc.c (b4_yyerror_args): New.
8399 Use it when calling yyerror.
8400 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8401 Use it when calling yyerror.
8402 * doc/bison.texinfo (Error Reporting): Adjust.
8403 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8404 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8405
8406 2002-11-06 Akim Demaille <akim@epita.fr>
8407
8408 #line should have quoted strings.
8409 Ideally, this should be done by m4_quotearg.
8410
8411 * src/scan-skel.l: Include quotearg.h.
8412 Quote __ofile__.
8413 * src/output.c (symbol_printers_output)
8414 (symbol_destructors_output): Quote the file name.
8415
8416 2002-11-06 Akim Demaille <akim@epita.fr>
8417
8418 * tests/regression.at (Invalid inputs): Adjust to the recent
8419 messages.
8420
8421 2002-11-06 Akim Demaille <akim@epita.fr>
8422
8423 Restore --no-lines.
8424 Reported by Jim Kent.
8425
8426 * data/c.m4 (b4_syncline): New.
8427 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8428 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8429 * src/output.c (user_actions_output): Likewise.
8430 (prepare): Define 'b4_synclines_flag'.
8431 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8432
8433 2002-11-06 Akim Demaille <akim@epita.fr>
8434
8435 * src/main.c (main): Free `infile'.
8436 * src/scan-gram.l (handle_syncline): New.
8437 Recognize `#line'.
8438 * src/output.c (user_actions_output, symbol_destructors_output)
8439 (symbol_printers_output): Use the location's file name, not
8440 infile.
8441 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8442
8443 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8444
8445 * src/tables.c (matching_state): Don't allow states to match if
8446 either has GLR conflict entries.
8447
8448 2002-11-05 Paul Eggert <eggert@twinsun.com>
8449
8450 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8451 "integer out of range" rather than "invalid value".
8452 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8453 accordingly.
8454
8455 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8456 Also, remove one static variable in the scanner.
8457
8458 * src/scan-gram.l (braces_level): Now auto, not static.
8459 Initialize to zero if the compiler is being picky.
8460 (INITIAL): Clear braces_level instead of incrementing it.
8461 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8462 as POSIX 1003.1-2001 requires.
8463 * src/system.h (IF_LINT): New macro, taken from coreutils.
8464 * configure.ac: Define "lint" if --enable-gcc-warnings.
8465
8466 2002-11-05 Akim Demaille <akim@epita.fr>
8467
8468 * src/scan-gram.l: When it starts with `%', complain about the
8469 whole directive, not just that `invalid character: %'.
8470
8471 2002-11-04 Akim Demaille <akim@epita.fr>
8472
8473 * Makefile.maint: Update from Autoconf.
8474 (update, cvs-update, po-update, do-po-update): New.
8475
8476 2002-11-04 Akim Demaille <akim@epita.fr>
8477
8478 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8479 and yyerror.
8480 Have yyerror `use' its arguments.
8481 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8482 returns true when location & yacc & pure & parse-param.
8483 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8484
8485 2002-11-04 Akim Demaille <akim@epita.fr>
8486
8487 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8488 clashes.
8489 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8490 font-lock-mode.
8491 Use complain_at.
8492 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8493 slot 0.
8494
8495 2002-11-03 Paul Eggert <eggert@twinsun.com>
8496
8497 * src/reader.c (get_merge_function, grammar_current_rule_check):
8498 Use consistent diagnostics for reporting type name clashes.
8499 Quote the types with <>, for consistency with Yacc.
8500 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8501
8502 2002-11-03 Akim Demaille <akim@epita.fr>
8503
8504 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8505 New.
8506 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8507 (b4_parse_param): Remove.
8508 Use b4_identification.
8509 Propagate b4_pure_args where needed to pass them to yyerror.
8510 * data/glr.m4 (b4_parse_param): Remove.
8511 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8512 (b4_lpure_formals): New.
8513 Use b4_identification.
8514 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8515 b4_user_formals and b4_user_args.
8516 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8517 (yyreportAmbiguity): When using a pure parser, also need
8518 the location, and the parse-params.
8519 Adjust callers.
8520 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8521 When using a pure parser, also need the parse-params.
8522 Adjust callers.
8523 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8524 (%pure-parser + %parse-param) LALR and GLR parsers.
8525 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8526 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8527 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8528 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8529 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8530 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8531 * doc/bison.texinfo: Untabify the whole file.
8532 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8533 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8534 (Error Reporting): Adjust to these new directives.
8535 Document %error-verbose, deprecate YYERROR_VERBOSE.
8536
8537 2002-11-03 Akim Demaille <akim@epita.fr>
8538
8539 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8540 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8541 command line options.
8542 * tests/cxx-type.at: Formatting changes.
8543
8544 2002-11-03 Paul Eggert <eggert@twinsun.com>
8545
8546 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8547 to count columns correctly, and to check for invalid inputs.
8548
8549 Use mbsnwidth to count columns correctly. Account for tabs, too.
8550 Include mbswidth.h.
8551 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8552 (extend_location): New function.
8553 (YY_LINES): Remove.
8554
8555 Handle CRLF in C code rather than in Lex code.
8556 (YY_INPUT): New macro.
8557 (no_cr_read): New function.
8558
8559 Scan UCNs, even though we don't fully handle them yet.
8560 (convert_ucn_to_byte): New function.
8561
8562 Handle backslash-newline correctly in C code.
8563 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8564 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8565 all uses changed.
8566 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8567 Use {splice} wherever C allows backslash-newline.
8568 YY_STEP after space, newline, vertical-tab.
8569 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8570
8571 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8572
8573 ({int}, handle_action_dollar, handle_action_at): Check for integer
8574 overflow.
8575
8576 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8577
8578 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8579 as well as \000. Check for UCHAR_MAX, not 255.
8580 Allow \x with an arbitrary positive number of digits, as in C.
8581 Check for overflow here.
8582 Allow \? and UCNs, for compatibility with C.
8583
8584 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8585 with quote slot used by complain_at.
8586
8587 * tests/input.at: Add tests for backslash-newline, m4 quotes
8588 in symbols, long literals, and funny escapes in strings.
8589
8590 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8591 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8592 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8593 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8594 * m4/mbswidth.m4: New file, from GNU coreutils.
8595
8596 * doc/bison.texinfo (Grammar Outline): Document // comments.
8597 (Symbols): Document that trigraphs have no special meaning in Bison,
8598 nor is backslash-newline allowed.
8599 (Actions): Document that trigraphs have no special meaning.
8600
8601 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8602 no longer used.
8603
8604 2002-11-02 Paul Eggert <eggert@twinsun.com>
8605
8606 * src/reader.c: Don't include quote.h; not needed.
8607 (get_merge_function): Reword warning to be consistent with
8608 type clash diagnostic in grammar_current_rule_check.
8609
8610 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8611 bug in trigraph handling.
8612
8613 * src/output.c (prepare_symbols): When printing token names,
8614 escape "[" as "@<:@" and likewise for "]".
8615
8616 * src/system.h (errno): Remove declaration, as we are now
8617 assuming C89 or better, and C89 guarantees errno.
8618
8619 2002-10-30 Paul Eggert <eggert@twinsun.com>
8620
8621 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8622 Check for close failures.
8623 * src/files.h (xfclose): Return void, not int, since it always
8624 returned zero.
8625 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8626 indicates one.
8627 * src/output.c (output_skeleton): Use xfclose rather than fclose
8628 and ferror. xfclose now checks ferror.
8629
8630 * data/glr.c (YYLEFTMOST_STATE): Remove.
8631 (yyreportTree): Use a stack-based leftmost state. This avoids
8632 our continuing battles with bogus warnings about initializers.
8633
8634 2002-10-30 Akim Demaille <akim@epita.fr>
8635
8636 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8637 #if.
8638
8639 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8640
8641 * tests/glr-regr1.at: New test for reported regressions.
8642 * tests/testsuite.at: Add glr-regr1.at test.
8643 * tests/Makefile.am: Add glr-regr1.at test.
8644
8645 2002-10-24 Paul Eggert <eggert@twinsun.com>
8646
8647 Version 1.75a.
8648
8649 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8650 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8651 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8652 Don't assume strdup exists; POSIX says its an XSI extension.
8653 Check for buffer overflow on input.
8654
8655 2002-10-24 Akim Demaille <akim@epita.fr>
8656
8657 * src/output.c (output_skeleton): Don't disable M4sugar comments
8658 too soon: it results in comments being expanded.
8659 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8660 first output.
8661
8662 2002-10-24 Akim Demaille <akim@epita.fr>
8663
8664 * data/yacc.c (m4_int_type): New.
8665 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8666 char' as only yacc.c wants K&R portability.
8667 * data/glr.c (yysigned_char): Remove.
8668 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8669 Reported by Quoc Peyrot.
8670
8671 2002-10-23 Paul Eggert <eggert@twinsun.com>
8672
8673 * src/main.c (main): With --trace=time, report times even if a
8674 non-fatal error occurs. Formerly, the times were reported in some
8675 such cases but not in others.
8676 * src/reader.c (reader): Just return if a complaint has been issued,
8677 instead of exiting, so that 'main' can report times.
8678
8679 2002-10-22 Akim Demaille <akim@epita.fr>
8680
8681 * src/system.h: Include sys/types.
8682 Reported by Bert Deknuydt.
8683
8684 2002-10-23 Paul Eggert <eggert@twinsun.com>
8685
8686 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8687 Suggested by Art Haas.
8688
8689 2002-10-22 Paul Eggert <eggert@twinsun.com>
8690
8691 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8692 decl; not needed any more.
8693 * src/main.c (main): Use return to exit, undoing yesterday's change.
8694 The last OS that we could find where this wouldn't work is
8695 SunOS 3.5, and that's too old to worry about now.
8696
8697 * data/glr.c (struct yyltype): Define members even when not
8698 doing locations. This is more consistent with yacc.c, and it
8699 works around the following bug reports:
8700 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8701 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8702
8703 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8704 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8705 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8706
8707 2002-10-22 Akim Demaille <akim@epita.fr>
8708
8709 * data/README: New.
8710
8711 2002-10-21 Paul Eggert <eggert@twinsun.com>
8712
8713 Be consistent about 'bool'; the old code used an enum in one
8714 module and an int in another, and this violates the C standard.
8715 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8716 * configure.ac (AC_HEADER_STDBOOL): Add.
8717 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8718 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8719 * src/symtab.c (hash_compare_symbol_t): Likewise.
8720 * src/system.h (bool, false, true): Use a definition consistent
8721 with ../lib/hash.c. All uses changed.
8722
8723 * src/complain.c (warning_issued): Renamed from warn_message_count,
8724 so that we needn't worry about integer overflow (!).
8725 Now of type bool. All uses changed.
8726 (complaint_issued): Renamed from complain_message_count; likewise.
8727
8728 * src/main.c (main): Use exit to exit with failure.
8729
8730 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8731 rather than 1 and 0.
8732 * src/main.c (main): Likewise.
8733 * src/getargs.c (getargs): Likewise.
8734 * src/reader.c (reader): Likewise.
8735
8736 * src/getarg.c (getargs): Remove duplicate code for
8737 "Try `bison --help'".
8738
8739 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8740 What was that "2" for?
8741
8742 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8743 * src/getargs.c (usage): Likewise.
8744
8745 * src/getargs.c (getargs): When there are too few operands, report
8746 the last one. When there are too many, report the first extra
8747 one. This is how diffutils does it.
8748
8749 2002-10-20 Paul Eggert <eggert@twinsun.com>
8750
8751 Remove K&R vestiges.
8752 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8753 * src/complain.c (VA_START): Remove. Assume prototypes.
8754 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8755 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8756 fatal): Assume prototypes.
8757 * src/complain.h: Assume prototypes.
8758 * src/system.h (PARAMS): Remove.
8759 Include <limits.h> unconditionally, since it's guaranteeed even
8760 for a freestanding C89 compiler.
8761 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8762 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8763
8764 2002-10-20 Akim Demaille <akim@epita.fr>
8765
8766 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8767 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8768 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8769 (yyresolveStates, yyresolveAction, yyresolveStack)
8770 (yyprocessOneStack): Use them.
8771 (yy_reduce_print): New.
8772 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8773
8774 2002-10-20 Akim Demaille <akim@epita.fr>
8775
8776 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8777 arguments and output `void'.
8778 (b4_c_function): Rename as...
8779 (b4_c_function_def): this.
8780 (b4_c_function_decl, b4_c_ansi_function_def)
8781 (b4_c_ansi_function_decl): New.
8782 Change the interpretation of the arguments: before `int, foo', now
8783 `int foo, foo'.
8784 * data/yacc.c (yyparse): Prototype and define thanks to these.
8785 Adjust b4_c_function_def uses.
8786 * data/glr.c (yyparse): Likewise, but ANSI only.
8787
8788 2002-10-20 Akim Demaille <akim@epita.fr>
8789
8790 * src/output.c (prepare): Move the definition of `tokens_number',
8791 `nterms_number', `undef_token_number', `user_token_number_max'
8792 to...
8793 (prepare_tokens): Here.
8794 (prepare_tokens): Rename as...
8795 (prepare_symbols): this.
8796 (prepare): Move the definition of `rules_number' to...
8797 (prepare_rules): here.
8798 (prepare): Move the definition of `last', `final_state_number',
8799 `states_number' to...
8800 (prepare_states): here.
8801 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8802
8803 2002-10-20 Akim Demaille <akim@epita.fr>
8804
8805 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8806
8807 2002-10-20 Akim Demaille <akim@epita.fr>
8808
8809 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8810 * data/c.m4: here.
8811
8812 2002-10-20 Akim Demaille <akim@epita.fr>
8813
8814 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8815 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8816 `pair'.
8817 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8818 `name' to...
8819 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8820 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8821 These.
8822
8823 2002-10-19 Paul Eggert <eggert@twinsun.com>
8824
8825 Do not create a temporary file, as that involves security and
8826 cleanup headaches. Instead, use a pair of pipes.
8827 Derived from a suggestion by Florian Krohm.
8828 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8829 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8830 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8831 (BISON_PREREQ_SUBPIPE): Add.
8832 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8833 Add subpipe.h, subpipe.c.
8834 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8835 * po/POTFILES.in: Add lib/subpipe.c.
8836 * src/output.c: Include "subpipe.h".
8837 (m4_invoke): Remove decl.
8838 (scan_skel): New decl.
8839 (output_skeleton): Use pipe rather than temporary file for m4 input.
8840 Check that m4sugar.m4 is readable, to avoid deadlock.
8841 Check for pipe I/O error.
8842 * src/scan-skel.l (readpipe): Remove decl.
8843 (scan_skel): New function, to be used in place of m4_invoke.
8844 Read from stream rather than file.
8845
8846 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8847 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8848 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8849 this generates a more-accurate value anyway.
8850
8851 * lib/timevar.c (timervar_accumulate): Rename locals to
8852 avoid confusion with similarly-named more-global.
8853 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8854
8855 * src/output.c (prepare): Use xstrdup to convert char const *
8856 to char *, to avoid GCC warning.
8857
8858 2002-10-19 Akim Demaille <akim@epita.fr>
8859
8860 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8861 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8862 Use them to have `calc.y' ready for %pure-parser.
8863 * data/yacc.c (YYLEX): Pass a yylex return type to
8864 b4_c_function_call.
8865
8866 2002-10-19 Akim Demaille <akim@epita.fr>
8867
8868 Prototype support of %lex-param and %parse-param.
8869
8870 * src/parse-gram.y: Add the definition of the %lex-param and
8871 %parse-param tokens, plus their rules.
8872 Drop the `_' version of %glr-parser.
8873 Add the "," token.
8874 * src/scan-gram.l (INITIAL): Scan them.
8875 * src/muscle_tab.c: Comment changes.
8876 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8877 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8878 (muscle_entry_s): The `value' member is no longer const.
8879 Adjust all dependencies.
8880 * src/muscle_tab.c (muscle_init): Adjust: use
8881 MUSCLE_INSERT_STRING.
8882 Initialize the obstack earlier.
8883 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8884 (muscle_pair_list_grow): New.
8885 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8886 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8887 * tests/calc.at: Use %locations, not --locations.
8888 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8889
8890 2002-10-19 Akim Demaille <akim@epita.fr>
8891
8892 * src/getargs.c (usage): Take status as argument and exit
8893 accordingly.
8894 Report the traditional `Try ... --help' message when status != 0.
8895 (usage, version): Don't take a FILE * as arg, it is pointless.
8896 (getargs): When there is an incorrect number of arguments, make it
8897 an error, and report it GNUlically thanks to `usage ()'.
8898
8899 2002-10-18 Paul Eggert <eggert@twinsun.com>
8900
8901 * data/glr.c (yyreportParseError): Don't assume that sprintf
8902 yields the length of the printed string, as this is not true
8903 on SunOS 4.1.4. Reported by Peter Klein.
8904
8905 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8906 * tests/conflicts.at (%nonassoc and eof): Likewise.
8907 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8908
8909 2002-10-17 Akim Demaille <akim@epita.fr>
8910
8911 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8912 * src/getargs.c (trace_types, trace_args): Adjust.
8913 * src/reader.c (grammar_current_rule_prec_set)
8914 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8915 Standardize error messages.
8916 And s/@prec/%prec/!
8917 (reader): Use trace_flag to enable scanner/parser debugging,
8918 instead of an adhoc scheme.
8919 * src/scan-gram.l: Remove trailing debugging code.
8920
8921 2002-10-16 Paul Eggert <eggert@twinsun.com>
8922
8923 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8924 MUSCLE_TAB_H.
8925
8926 * NEWS: Officially drop support for building Bison with K&R C,
8927 since it didn't work anyway and it's not worth worrying about.
8928 * Makefile.maint (wget_files): Remove ansi2knr.c.
8929 (ansi2knr.c-url_prefix): Remove.
8930 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8931 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8932 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8933
8934 2002-10-15 Paul Eggert <eggert@twinsun.com>
8935
8936 Stop using the "enum_" trick for K&R-style function definitions;
8937 it confused me, and I was the author! Instead, assume that people
8938 who want to use K&R C compilers (when using these modules in GCC,
8939 perhaps?) will run ansi2knr.
8940
8941 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8942 All uses of "enum_" changed to "enum ".
8943 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8944 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8945
8946 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8947 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8948 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8949 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8950 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8951 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8952 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8953 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8954 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8955 Use function prototypes; this removes the need for declaring
8956 static functions simply to provide their prototypes.
8957 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8958 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8959 bitset_count_, bitset_create, bitset_dump, bitset_first,
8960 bitset_free, bitset_init, bitset_last, bitset_next,
8961 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8962 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8963 bitset_print, bitset_release_memory, bitset_toggle_,
8964 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8965 debug_bitset): Likewise.
8966 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8967 * lib/bitset_stats.c (bitset_log_histogram_print,
8968 bitset_percent_histogram_print, bitset_stats_and,
8969 bitset_stats_and_cmp, bitset_stats_and_or,
8970 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8971 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8972 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8973 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8974 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8975 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8976 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8977 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8978 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8979 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8980 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8981 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8982 bitset_stats_zero): Likewise.
8983 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8984 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8985 bitsetv_dump, debug_bitsetv): Likewise.
8986 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8987 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8988 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8989 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8990 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8991 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8992 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8993 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8994 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8995 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8996 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8997 Likewise.
8998 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8999 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9000 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9001 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9002 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9003 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9004 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9005 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9006 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9007 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9008 lbitset_xor_cmp, lbitset_zero): Likewise.
9009
9010 2002-10-14 Akim Demaille <akim@epita.fr>
9011
9012 Version 1.75.
9013
9014 2002-10-14 Akim Demaille <akim@epita.fr>
9015
9016 * tests/Makefile.am (maintainer-check-posix): New.
9017
9018 2002-10-14 Akim Demaille <akim@epita.fr>
9019
9020 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9021 member.
9022
9023 2002-10-14 Akim Demaille <akim@epita.fr>
9024
9025 * src/tables.c (table_ninf_remap): base -> tab.
9026 Reported by Matt Rosing.
9027
9028 2002-10-14 Paul Eggert <eggert@twinsun.com>
9029
9030 * tests/action.at, tests/calc.at, tests/conflicts.at,
9031 tests/cxx-type.at, tests/headers.at, tests/input.at,
9032 tests/regression.at, tests/synclines.at, tests/torture.at:
9033 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9034 so that the tests still work even if POSIXLY_CORRECT is set.
9035 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9036
9037 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9038 for portability to K&R hosts. Fix typo: signed char is guaranteed
9039 only to 127, not to 128.
9040 * data/glr.c (yysigned_char): New type.
9041 * data/yacc.c (yysigned_char): Likewise.
9042 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9043
9044 2002-10-13 Paul Eggert <eggert@twinsun.com>
9045
9046 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9047 true due to limited range of data type" warning from GCC.
9048
9049 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9050 by wrapping enum yytokentype's definition inside #ifndef
9051 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9052
9053 2002-10-13 Akim Demaille <akim@epita.fr>
9054
9055 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9056 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9057
9058 2002-10-13 Akim Demaille <akim@epita.fr>
9059
9060 * Makefile.maint: Update from Autoconf 2.54.
9061 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9062
9063 2002-10-13 Akim Demaille <akim@epita.fr>
9064
9065 * src/print.c (print_state): Separate the list of solved conflicts
9066 from the other items.
9067 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9068
9069 2002-10-13 Akim Demaille <akim@epita.fr>
9070
9071 Let nondeterministic skeletons be usable with deterministic
9072 tables.
9073
9074 With the patch, GAWK compiled by GCC without -O2 passes its test
9075 suite using a GLR parser driven by LALR tables. It fails with -O2
9076 because `struct stat' gives two different answers on my machine:
9077 88 (definition of an auto var) and later 96 (memset on this var).
9078 Hence the stack is badly corrumpted. The headers inclusion is to
9079 blame: if I move the awk.h inclusion before GLR's system header
9080 inclusion, the two struct stat have the same size.
9081
9082 * src/tables.c (pack_table): Always create conflict_table.
9083 (token_actions): Always create conflict_list.
9084 * data/glr.c (YYFLAG): Remove, unused.
9085
9086 2002-10-13 Akim Demaille <akim@epita.fr>
9087
9088 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9089 (O0FLAGS): New.
9090 (VALGRIND, GXX): New.
9091 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9092 * tests/bison.in: Run $PREBISON a pre-command.
9093 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9094 (maintainer-check-g++): New.
9095 * Makefile.am (maintainer-check): New.
9096
9097 2002-10-13 Akim Demaille <akim@epita.fr>
9098
9099 * data/glr.c: Formatting changes.
9100 Tweak some trace messages to match yacc.c's.
9101
9102 2002-10-13 Akim Demaille <akim@epita.fr>
9103
9104 GLR parsers sometimes raise parse errors instead of performing the
9105 default reduction.
9106 Reported by Charles-Henry de Boysson.
9107
9108 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9109 check the length of the traces when %glr.
9110 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9111 GLR's traces.
9112 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9113 Test GLR parsers.
9114 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9115 (yyltype): Remove the yy prefix from the member names.
9116 (yytable): Complete its comment.
9117 (yygetLRActions): Map error action number from YYTABLE from
9118 YYTABLE_NINF to 0.
9119 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9120 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9121 not satisfying as we could compare an YYACTION computed from
9122 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9123 only value for error actions.
9124 (yyreportParseError): In verbose parse error messages, don't issue
9125 `error' in the list of expected tokens.
9126 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9127 next action to perform to match glr.c's decoding.
9128 (yytable): Complete its comment.
9129
9130 2002-10-13 Paul Eggert <eggert@twinsun.com>
9131
9132 Fix problem reported by Henrik Grubbstroem in
9133 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9134 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9135 because the Bison parser reads the second action before reducing
9136 the first one.
9137 * src/scan-gram.l (rule_length): New static var.
9138 Use it to keep track of the rule length in the scanner, since
9139 we can't expect the parser to be in lock-step sync with the scanner.
9140 (handle_action_dollar, handle_action_at): Use this var.
9141 * tests/actions.at (Exotic Dollars): Test for the problem.
9142
9143 2002-10-12 Paul Eggert <eggert@twinsun.com>
9144
9145 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9146 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9147 Include <sys/time.h> when checking for clock_t and struct tms.
9148 Use same include order as source.
9149 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9150 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9151
9152 * lib/timevar.c: Update copyright date and clarify comments.
9153 (get_time) [IN_GCC]: Keep the GCC version for reference.
9154
9155 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9156 GCC version as of today, then merge Bison's changes.
9157 Change "GCC" to "Bison" in copyright notice. timevar.def's
9158 author is Akim, so change that too.
9159
9160 * src/reader.c (grammar_current_rule_check):
9161 Don't worry about the default action if $$ is untyped.
9162 Prevents bogus warnings reported by Jim Gifford in
9163 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9164
9165 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9166 * data/glr.c, data/lalr1.cc, data/yacc.c:
9167 Output token definitions before the first part of user declarations.
9168 Fixes compatibility problem reported by Jim Gifford for kbd in
9169 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9170
9171 2002-10-11 Paul Eggert <eggert@twinsun.com>
9172
9173 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9174 (yyparse): here. This undoes some of the 2002-07-25 change.
9175 Compatibility problem reported by Ralf S. Engelschall with
9176 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9177
9178 2002-10-11 Akim Demaille <akim@epita.fr>
9179
9180 * tests/regression.at Characters Escapes): New.
9181 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9182 characters.
9183 Reported by Jan Nieuwenhuizen.
9184
9185 2002-10-11 Akim Demaille <akim@epita.fr>
9186
9187 * po/id.po: New.
9188
9189 2002-10-10 Paul Eggert <eggert@twinsun.com>
9190
9191 Portability fixes for bitsets; this also avoids several GCC
9192 warnings.
9193
9194 * lib/abitset.c: Include <stddef.h>, for offsetof.
9195 * lib/lbitset.c: Likewise.
9196
9197 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9198 properly for vectors of objects. Do not assume that adding a
9199 header size to a multiple of a word size yields a value that is
9200 properly aligned for the whole union.
9201 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9202
9203 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9204 unique names for structures.
9205 * lib/ebitset.c (ebitset_bytes): Likewise.
9206 * lib/lbitset.c (lbitset_bytes): Likewise.
9207
9208 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9209 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9210 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9211 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9212 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9213 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9214 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9215 to improve the type-checking that GCC can do.
9216 * lib/bitset.c (bitset_op4_cmp): Likewise.
9217 * lib/bitset_stats.c (bitset_stats_count,
9218 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9219 bitset_stats_copy, bitset_stats_disjoint_p,
9220 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9221 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9222 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9223 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9224 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9225 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9226 bitset_stats_or_and_cmp): Likewise.
9227 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9228 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9229 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9230 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9231
9232 * lib/abitset.h: Include bitset.h, not bbitset.h.
9233 * lib/ebitset.h: Likewise.
9234 * lib/lbitset.h: Likewise.
9235
9236 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9237 All instances of parameters of type enum bitset_opts are now of
9238 type enum_bitset_opts, to conform to the C Standard, and similarly
9239 for enum_bitset_type.
9240 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9241 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9242
9243 Do not use "struct bitset_struct" to mean different things in
9244 different modules. Not only is this confusing, it violates
9245 the C Standard, which requires that structure types in different
9246 modules must be compatible if one is to be passed to the other.
9247 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9248 All instances of "struct bitset_struct *" replaced with "bitset".
9249 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9250 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9251 struct lbitset_struct, struct bitset_stats_struct): New types.
9252 All uses of struct bitset_struct changed to union bitset_union,
9253 etc.
9254 * lib/abitset.c (struct abitset_struct, abitset,
9255 struct bitset_struct): Remove.
9256 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9257 struct bitset_struct): Remove.
9258 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9259 bitset_struct): Remove.
9260 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9261 Likewise.
9262
9263 Do not call a function of type T using a call that assumes the
9264 function is of a different type U. Standard C requires that a
9265 function must be called with a type that is compatible with its
9266 definition.
9267 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9268 New decls.
9269 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9270 New functions.
9271 * lib/ebitset.c (PFV): Remove.
9272 * lib/lbitset.c (PFV): Likewise.
9273 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9274 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9275 decls.
9276 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9277 (ebitset_vtable): Use them.
9278 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9279 lbitset_xor): New functions.
9280 (lbitset_vtable): Use them.
9281
9282 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9283 Declare.
9284
9285 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9286 GCC warning.
9287 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9288 Use offsetof, for simplicity.
9289
9290 2002-10-06 Paul Eggert <eggert@twinsun.com>
9291
9292 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9293 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9294 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9295 which was inadvertently undone by the 2002-09-30 patch.
9296 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9297 the same width as int.
9298
9299 2002-10-04 Paul Eggert <eggert@twinsun.com>
9300
9301 Version 1.50.
9302
9303 * configure.ac (AC_INIT), NEWS: Increment version number.
9304
9305 * doc/bison.texinfo: Minor spelling, grammar, and white space
9306 fixes.
9307 (Symbols): Mention that any negative value returned from yylex
9308 signifies end-of-input. Warn about negative chars. Mention
9309 the portable Standard C character set.
9310
9311 The GNU coding standard says CFLAGS and YFLAGS are reserved
9312 for the installer to set.
9313 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9314 * src/Makefile.am (AM_CFLAGS): Likewise.
9315 (AM_YFLAGS): Renamed from YFLAGS.
9316
9317 Fix some MAX and MIN problems.
9318 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9319 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9320 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9321 * src/reader.c (reader): Use it.
9322
9323 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9324 POSIX 1003.1-2001 has removed fgrep.
9325
9326 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9327
9328 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9329 interpreted as signed.
9330 * lib/ebitset.c (ebitset_list): Fix bug.
9331
9332 2002-10-01 Paul Eggert <eggert@twinsun.com>
9333
9334 More fixes for 64-bit hosts and large bitsets.
9335
9336 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9337 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9338 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9339 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9340 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9341 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9342 bitset_count_): Likewise.
9343 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9344 bitset_first, bitset_last): Likewise.
9345 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9346 bitset_stats_list_reverse, bitset_stats_size,
9347 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9348 Likewise.
9349 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9350 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9351 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9352 bitsetv_reflexive_transitive_closure): Likewise.
9353 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9354 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9355 Likewise.
9356 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9357 Likewise.
9358
9359 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9360 Use size_t, not unsigned int, to count bytes.
9361 * lib/abitset.h (abitset_bytes): Likewise.
9362 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9363 Likewise.
9364 * lib/bitset.h (bitset_bytes): Likewise.
9365 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9366 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9367 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9368 * lib/ebitset.c (ebitset_bytes): Likewise.
9369 * lib/ebitset.h (ebitset_bytes): Likewise.
9370 * lib/lbitset.c (lbitset_bytes): Likewise.
9371 * lib/lbitset.h (lbitset_bytes): Likewise.
9372
9373 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9374 abitset_subset_p, abitset_disjoint_p, abitset_and,
9375 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9376 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9377 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9378 abitset_or_and, abitset_or_and_cmp):
9379 Use bitset_windex instead of unsigned int.
9380 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9381 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9382 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9383 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9384 Likewise.
9385 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9386
9387 * lib/bitset.c (bitset_print):
9388 Use proper printf formats for widths of integer types.
9389 * lib/bitset_stats.c (bitset_percent_histogram_print,
9390 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9391 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9392 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9393 * lib/lbitset.c (lbitset_bytes): Likewise.
9394
9395 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9396 BITSET_SIZE_MAX): New macros.
9397 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9398 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9399 to BITSET_WINDEX_MAX.
9400
9401 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9402 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9403 since we now return the bitset_bindex type (not int).
9404
9405 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9406 when computing sizes.
9407 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9408
9409 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9410 and avoid cast to unsigned.
9411
9412 2002-09-30 Akim Demaille <akim@epita.fr>
9413
9414 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9415 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9416 Updates from Michael Hayes.
9417
9418 2002-09-30 Art Haas <ahaas@neosoft.com>
9419
9420 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9421 invocations.
9422 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9423 defined.
9424
9425 2002-09-27 Akim Demaille <akim@epita.fr>
9426
9427 Version 1.49c.
9428
9429 2002-09-27 Akim Demaille <akim@epita.fr>
9430
9431 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9432 (Because of AC_LIBSOURCE).
9433
9434 2002-09-27 Akim Demaille <akim@epita.fr>
9435
9436 Playing with Autoscan.
9437
9438 * configure.ac: Remove the old LIBOBJ tweaks.
9439 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9440 * lib/strrchr.c: New.
9441 * lib/strtol.c: New, from the Coreutils 4.5.1.
9442
9443 2002-09-27 Akim Demaille <akim@epita.fr>
9444
9445 Playing with Autoscan.
9446
9447 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9448 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9449 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9450 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9451 Coreutils 4.5.1.
9452
9453 2002-09-24 Akim Demaille <akim@epita.fr>
9454
9455 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9456 (Frequently Asked Questions, Parser Stack Overflow): New.
9457
9458 2002-09-13 Akim Demaille <akim@epita.fr>
9459
9460 Playing with autoscan.
9461
9462 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9463 * src/files.c (skeleton_find): Remove, unused.
9464 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9465 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9466
9467 2002-09-13 Akim Demaille <akim@epita.fr>
9468
9469 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9470 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9471
9472 2002-09-13 Akim Demaille <akim@epita.fr>
9473
9474 * configure.ac: Require 2.54.
9475 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9476 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9477 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9478 Remove, provided by Autoconf macros.
9479
9480 2002-09-12 Akim Demaille <akim@epita.fr>
9481
9482 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9483
9484 2002-09-12 Akim Demaille <akim@epita.fr>
9485
9486 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9487 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9488 Reported by Martin Mokrejs.
9489
9490 2002-09-10 Akim Demaille <akim@epita.fr>
9491
9492 * src/parse-gram.y: Associate a human readable string to each
9493 token type.
9494 * tests/regression.at (Invalid inputs): Adjust.
9495
9496 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9497
9498 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9499 with an Autoconf-2.5x style configure.ac.
9500
9501 2002-09-06 Paul Eggert <eggert@twinsun.com>
9502
9503 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9504 exception applies only to yacc.c. This is a modification of a
9505 patch originally suggested by Akim Demaille.
9506
9507 2002-09-06 Akim Demaille <akim@epita.fr>
9508
9509 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9510 here to...
9511 * data/yacc.c: here.
9512
9513 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9514 LocationType.
9515 (b4_ltype): Default to yy::Location from location.hh.
9516
9517 2002-09-04 Jim Meyering <jim@meyering.net>
9518
9519 * data/yacc.c: Guard the declaration of yytoknum also with
9520 `#ifdef YYPRINT', so it is declared only when used.
9521
9522 2002-09-04 Akim Demaille <akim@epita.fr>
9523
9524 * configure.in: Rename as...
9525 * configure.ac: this.
9526 Bump to 1.49c.
9527
9528 2002-09-04 Akim Demaille <akim@epita.fr>
9529
9530 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9531 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9532 translate maintainer only messages.
9533
9534 2002-08-12 Paul Eggert <eggert@twinsun.com>
9535
9536 Version 1.49b.
9537
9538 * Makefile.am (SUBDIRS): Remove intl.
9539 (DISTCLEANFILES): Remove.
9540 * NEWS: Mention that GNU M4 is now required. Clarify what is
9541 meant by "larger grammars". Mention the pt_BR translation.
9542 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9543 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9544 Bump version from 0.11.2 to 0.11.5.
9545 (BISON_PREREQ_STAGE): Remove.
9546 (AM_GNU_GETTEXT): Use external gettext.
9547 (AC_OUTPUT): Remove intl/Makefile.
9548
9549 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9550
9551 * data/glr.c: Include string.h, for strlen.
9552 (yyreportParseError): Use size_t for yysize.
9553 (yy_yypstack): No longer nested inside yypstates, as nested
9554 functions are not portable. Do not assume size_t is the
9555 same width as int.
9556 (yypstates): Do not assume that ptrdiff_t is the same width
9557 as int, and similarly for yyposn and YYINDEX.
9558
9559 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9560
9561 * lib/Makefile.am (INCLUDES): Do not include from the intl
9562 directory, which has been removed.
9563 * src/Makefile.am (INCLUDES): Likewise.
9564
9565 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9566 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9567 New vars.
9568
9569 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9570 * tests/Makefile.am (EXTRA_DIST): Likewise.
9571
9572 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9573 Do not assume that bitset_windex is the same width as unsigned.
9574
9575 * lib/abitset.c (abitset_unused_clear): Do not assume that
9576 bitset_word is the same width as int.
9577 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9578 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9579 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9580 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9581 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9582
9583 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9584 portability to one's complement hosts!).
9585 * lib/ebitset.c (ebitset_op1): Likewise.
9586 * lib/lbitset.c (lbitset_op1): Likewise.
9587
9588 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9589 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9590 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9591 Sync with fileutils.
9592 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9593 lib/gettext.h: Sync with diffutils.
9594
9595 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9596 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9597
9598 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9599 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9600 check for void *.
9601
9602 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9603 size_t; the old version tried to do this but casted improperly.
9604 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9605 (bitset_test): Now returns int, not unsigned long.
9606
9607 * lib/bitset_stats.c: Include "gettext.h".
9608 (_): New macro.
9609 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9610 name locals "index", as it generates unnecessary warnings on some
9611 hosts that have an "index" function.
9612
9613 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9614 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9615 they need translation.
9616 * src/LR0.c (state_list_append, new_itemsets, get_state,
9617 append_states, generate_states): Likewise.
9618 * src/assoc.c (assoc_to_string): Likewise.
9619 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9620 * src/gram.c (grammar_dump): Likewise.
9621 * src/injections.c (injections_compute): Likewise.
9622 * src/lalr.c (lookaheads_print): Likewise.
9623 * src/relation.c (relation_transpose): Likewise.
9624 * src/scan-gram.l: Likewise.
9625 * src/tables.c (table_grow, pack_vector): Likewise.
9626
9627 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9628 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9629 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9630 * m4/mbstate_t.m4: Sync with fileutils.
9631 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9632
9633 * po/LINGUAS: Add pt_BR.
9634 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9635 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9636 lib/timevar.c.
9637 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9638 manual recommends.
9639 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9640
9641 * src/complain.c (strerror_r): Remove decl; not needed.
9642 (strerror): Use same pattern as ../lib/error.c.
9643
9644 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9645
9646 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9647
9648 * src/main.c (main): Cast result of bindtextdomain and textdomain
9649 to void, to avoid a GCC warning when --disable-nls is in effect.
9650
9651 * src/scan-gram.l: Use strings rather than escapes when possible,
9652 to minimize the number of warnings from xgettext.
9653 (handle_action_dollar, handle_action_at): Don't use isdigit,
9654 as it mishandles negative chars and it may not work as expected
9655 outside the C locale.
9656
9657 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9658 this is a GCC extension and is not portable to other compilers.
9659
9660 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9661 Do not include <ctype.h>; no longer needed.
9662 Do not include <malloc.h>; no longer needed (and generates
9663 warnings on OpenBSD 3.0).
9664
9665 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9666 it's not portable.
9667
9668 * tests/regression.at: Do not use 'cc -c input.c -o input';
9669 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9670
9671 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9672 exit status as failure, not just exit status 1. Sun C exits
9673 with status 2 sometimes.
9674
9675 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9676 Use it for the two large tests.
9677
9678 2002-08-02 Akim Demaille <akim@epita.fr>
9679
9680 * src/conflicts.c (conflicts_output): Don't output rules never
9681 reduced here, since anyway that computation doesn't work.
9682 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9683 (rule_useless_p, rule_never_reduced_p): New.
9684 (grammar_rules_partial_print): Use a filter instead of a range.
9685 Display the title only if needed.
9686 (grammar_rules_print): Adjust.
9687 (grammar_rules_never_reduced_report): New.
9688 * src/tables.c (action_row): Move the computation of rules never
9689 reduced to...
9690 (token_actions): here.
9691 * src/main.c (main): Make the parser before making the report, so
9692 that rules never reduced are computed.
9693 Call grammar_rules_never_reduced_report.
9694 * src/print.c (print_results): Report rules never reduced.
9695 * tests/conflicts.at, tests/reduce.at: Adjust.
9696
9697 2002-08-01 Akim Demaille <akim@epita.fr>
9698
9699 Instead of attaching lookaheads and duplicating the rules being
9700 reduced by a state, attach the lookaheads to the reductions.
9701
9702 * src/state.h (state_t): Remove the `lookaheads',
9703 `lookaheads_rule' member.
9704 (reductions_t): Add a `lookaheads' member.
9705 Use a regular array for the `rules'.
9706 * src/state.c (reductions_new): Initialize the lookaheads member
9707 to 0.
9708 (state_rule_lookaheads_print): Adjust.
9709 * src/state.h, src/state.c (state_reductions_find): New.
9710 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9711 (count_rr_conflicts): Adjust.
9712 * src/lalr.c (LArule): Remove.
9713 (add_lookback_edge): Adjust.
9714 (state_lookaheads_count): New.
9715 (states_lookaheads_initialize): Merge into...
9716 (initialize_LA): this.
9717 (lalr_free): Adjust.
9718 * src/main.c (main): Don't free nullable and derives too early: it
9719 is used by --verbose.
9720 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9721
9722 2002-08-01 Akim Demaille <akim@epita.fr>
9723
9724 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9725 `rule_number_t**'.
9726 (set_derives, free_derives): Rename as...
9727 (derives_compute, derives_free): this.
9728 Adjust all dependencies.
9729 * src/nullable.c (set_nullable, free_nullable): Rename as...
9730 (nullable_compute, nullable_free): these.
9731 (rule_list_t): Store rule_t *, not rule_number_t.
9732 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9733 pointers, instead of their numbers.
9734 * src/main.c (main): Call nullable_free, and derives_free earlier,
9735 as they were lo longer used.
9736
9737 2002-08-01 Akim Demaille <akim@epita.fr>
9738
9739 * lib/timevar.c (get_time): Include children time.
9740 * src/lalr.h (LA, LArule): Don't export them: used with the
9741 state_t.
9742 * src/lalr.c (LA, LArule): Static.
9743 * src/lalr.h, src/lalr.c (lalr_free): New.
9744 * src/main.c (main): Call it.
9745 * src/tables.c (pack_vector): Check whether loc is >= to the
9746 table_size, not >.
9747 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9748 (tables_generate): do it, since that's also it which allocates
9749 them.
9750 Don't free LA and LArule, main does.
9751
9752 2002-07-31 Akim Demaille <akim@epita.fr>
9753
9754 Separate parser tables computation and output.
9755
9756 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9757 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9758 (yydefgoto, yydefact, high): Move to...
9759 * src/tables.h, src/tables.c: here.
9760 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9761 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9762 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9763 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9764 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9765 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9766 (action_row, save_row, token_actions, save_column, default_goto)
9767 (goto_actions, sort_actions, matching_state, pack_vector)
9768 (table_ninf_remap, pack_table, prepare_actions): Move to...
9769 * src/tables.c: here.
9770 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9771 * src/output.c (token_actions, output_base, output_conflicts)
9772 (output_check): Merge into...
9773 (prepare_actions): this.
9774 (actions_output): Rename as...
9775 (user_actions_output): this.
9776 * src/main.c (main): Call tables_generate and tables_free.
9777
9778 2002-07-31 Akim Demaille <akim@epita.fr>
9779
9780 Steal GCC's --time-report support.
9781
9782 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9783 stolen/adjusted from GCC.
9784 * m4/stage.m4: Remove time related checks.
9785 * m4/timevar.m4: New.
9786 * configure.in: Adjust.
9787 * src/system.h: Adjust to using timevar.h.
9788 * src/getargs.h, src/getargs.c: Support trace_time for
9789 --trace=time.
9790 * src/main.c (stage): Remove.
9791 (main): Replace `stage' invocations with timevar calls.
9792 * src/output.c: Insert pertinent timevar calls.
9793
9794 2002-07-31 Akim Demaille <akim@epita.fr>
9795
9796 Let --trace have arguments.
9797
9798 * src/getargs.h (enum trace_e): New.
9799 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9800 (long_options, short_options): --trace/-T takes an optional
9801 argument.
9802 Change all the uses of trace_flag to reflect the new flags.
9803 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9804
9805 Strengthen `stage' portability.
9806
9807 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9808 * configure.in: Use it.
9809 Don't check for malloc.h and sys/times.h.
9810 * src/system.h: Include them when appropriate.
9811 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9812 times and struct tms are available.
9813
9814 2002-07-30 Akim Demaille <akim@epita.fr>
9815
9816 In verbose parse error message, don't report `error' as an
9817 expected token.
9818 * tests/actions.at (Printers and Destructors): Adjust.
9819 * tests/calc.at (Calculator $1): Adjust.
9820 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9821 error message, do not report the parser accepts the error token in
9822 that state.
9823
9824 2002-07-30 Akim Demaille <akim@epita.fr>
9825
9826 Normalize conflict related messages.
9827
9828 * src/complain.h, src/complain.c (warn, complain): New.
9829 * src/conflicts.c (conflicts_print): Use them.
9830 (conflict_report_yacc): New, extracted from...
9831 (conflicts_print): here.
9832 * tests/conflicts.at, tests/existing.at: Adjust.
9833
9834 2002-07-30 Akim Demaille <akim@epita.fr>
9835
9836 Report rules which are never reduced by the parser: those hidden
9837 by conflicts.
9838
9839 * src/LR0.c (save_reductions): Don't make the final state too
9840 different: save its reduction (accept) instead of having a state
9841 without any action (no shift or goto, no reduce).
9842 Note: the final state is now a ``regular'' state, i.e., the
9843 parsers now contain `reduce 0' as default reduction.
9844 Nevertheless, since they decide to `accept' when yystate =
9845 final_state, they still will not reduce rule 0.
9846 * src/print.c (print_actions, print_reduction): Adjust.
9847 * src/output.c (action_row): Track reduced rules.
9848 (token_actions): Report rules never reduced.
9849 * tests/conflicts.at, tests/regression.at: Adjust.
9850
9851 2002-07-30 Akim Demaille <akim@epita.fr>
9852
9853 `stage' was accidently included in a previous patch.
9854 Initiate its autoconfiscation.
9855
9856 * configure.in: Look for malloc.h and sys/times.h.
9857 * src/main.c (stage): Adjust.
9858 Report only when trace_flag.
9859
9860 2002-07-29 Akim Demaille <akim@epita.fr>
9861
9862 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9863 state_number_t.
9864 (errs_t): symbol_t*, not symbol_number_t.
9865 (reductions_t): rule_t*, not rule_number_t.
9866 (FOR_EACH_SHIFT): New.
9867 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9868 * src/print.c, src/print_graph.c: Adjust.
9869
9870 2002-07-29 Akim Demaille <akim@epita.fr>
9871
9872 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9873
9874 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9875 (endtoken, accept): these.
9876 * src/reader.c (reader): Set endtoken's default tag to "$end".
9877 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9878 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9879 Adjust.
9880
9881 2002-07-29 Akim Demaille <akim@epita.fr>
9882
9883 * src/reduce.c (reduce_grammar): When the language is empty,
9884 complain about the start symbol, not the axiom.
9885 Use its location.
9886 * tests/reduce.at (Empty Language): New.
9887
9888 2002-07-26 Akim Demaille <akim@epita.fr>
9889
9890 * src/reader.h, src/reader.c (gram_error): ... can't get
9891 yycontrol without making too strong assumptions on the parser
9892 itself.
9893 * src/output.c (prepare_tokens): Use the real 0th value of
9894 token_translations instead of `0'.
9895 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9896 visible here.
9897 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9898 for the time being: %locations ought to provide it to yyerror.
9899
9900 2002-07-25 Akim Demaille <akim@epita.fr>
9901
9902 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9903 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9904 * tests/regression.at (Web2c Actions): Adjust.
9905
9906 2002-07-25 Akim Demaille <akim@epita.fr>
9907
9908 Stop storing rules from 1 to nrules + 1.
9909
9910 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9911 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9912 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9913 Iterate from 0 to nrules.
9914 Use rule_number_as_item_number and item_number_as_rule_number.
9915 Adjust to `derive' now containing possibly 0.
9916 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9917 Handle the `- 1' part in rule numbers from/to item numbers.
9918 * src/conflicts.c (log_resolution): Fix the message which reversed
9919 shift and reduce.
9920 * src/output.c (action_row): Initialize default_rule to -1.
9921 (token_actions): Adjust.
9922 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9923 expected output.
9924 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9925
9926 2002-07-25 Akim Demaille <akim@epita.fr>
9927
9928 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9929 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9930 (b4_c_knr_arg_decl): New.
9931 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9932 yyreport_parse_error.
9933
9934 2002-07-25 Akim Demaille <akim@epita.fr>
9935
9936 * data/yacc.c (yyreport_parse_error): New, extracted from...
9937 (yyparse): here.
9938 (yydestruct, yysymprint): Move above yyparse.
9939 Be K&R compliant.
9940
9941 2002-07-25 Akim Demaille <akim@epita.fr>
9942
9943 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9944 replace...
9945 (b4_sint_type, b4_uint_type): these.
9946 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9947 * tests/regression.at (Web2c Actions): Adjust.
9948
9949 2002-07-25 Akim Demaille <akim@epita.fr>
9950
9951 * src/gram.h (TIEM_NUMBER_MAX): New.
9952 (item_number_of_rule_number, rule_number_of_item_number): Rename
9953 as...
9954 (rule_number_as_item_number, item_number_as_rule_number): these.
9955 Adjust dependencies.
9956 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9957 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9958 (symbol_number_to_vector_number): New.
9959 (order): Of vector_number_t* type.
9960 (base_t, BASE_MAX, BASE_MIN): New.
9961 (froms, tos, width, pos, check): Of base_t type.
9962 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9963 (actrow): Of action_number_t type.
9964 (conflrow): Of unsigned int type.
9965 (table_ninf, base_ninf): New.
9966 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9967 (muscle_insert_int_table, muscle_insert_base_table)
9968 (muscle_insert_rule_number_table): New.
9969 (prepare_tokens): Output `toknum' as int_table.
9970 (action_row): Returns a rule_number_t.
9971 Use ACTION_MIN, not SHRT_MIN.
9972 (token_actions): yydefact is rule_number_t*.
9973 (table_ninf_remap): New.
9974 (pack_table): Use it for `base' and `table'.
9975 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9976 replaced with...
9977 (YYPACT_NINF, YYTABLE_NINF): these.
9978 (yypact, yytable): Compute their types instead of hard-coded
9979 `short'.
9980 * tests/regression.at (Web2c Actions): Adjust.
9981
9982 2002-07-19 Akim Demaille <akim@epita.fr>
9983
9984 * src/scan-gram.l (id): Can start with an underscore.
9985
9986 2002-07-16 Akim Demaille <akim@epita.fr>
9987
9988 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9989 Adjust all former `associativity' dependencies.
9990 * src/symtab.c (symbol_new): Default associativity is `undef', not
9991 `right'.
9992 (symbol_check_alias_consistence): Adjust.
9993
9994 2002-07-09 Akim Demaille <akim@epita.fr>
9995
9996 * doc/bison.texinfo: Properly set the ``header'' part.
9997 Use @dircategory ``GNU programming tools'' as per Texinfo's
9998 documentation.
9999 Use @copying.
10000
10001 2002-07-09 Akim Demaille <akim@epita.fr>
10002
10003 * lib/quotearg.h: Protect against multiple inclusions.
10004 * src/location.h (location_t): Add a `file' member.
10005 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10006 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10007 `error_one_per_line' support.
10008
10009 2002-07-09 Akim Demaille <akim@epita.fr>
10010
10011 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10012 * src/reader.c (lineno): Remove.
10013 Adjust all dependencies.
10014 (get_merge_function): Take a location and use complain_at.
10015 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10016 * tests/regression.at (Invalid inputs, Mixing %token styles):
10017 Adjust.
10018
10019 2002-07-09 Akim Demaille <akim@epita.fr>
10020
10021 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10022 recovery rule, and forbid extensions when --yacc.
10023 (gram_error): Use complain_at.
10024 * src/reader.c (reader): Exit if there were parse errors.
10025
10026 2002-07-09 Akim Demaille <akim@epita.fr>
10027
10028 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10029 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10030 Reported by R Blake <blakers@mac.com>.
10031
10032 2002-07-09 Akim Demaille <akim@epita.fr>
10033
10034 * data/yacc.c: Output the copyright notive in the header.
10035
10036 2002-07-03 Akim Demaille <akim@epita.fr>
10037
10038 * src/output.c (froms, tos): Are state_number_t.
10039 (save_column): sp, sp1, and sp2 are state_number_t.
10040 (prepare): Rename `final' as `final_state_number', `nnts' as
10041 `nterms_number', `nrules' as `rules_number', `nstates' as
10042 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10043 unused.
10044 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10045 * data/lalr1.cc (nsym_): Remove, unused.
10046
10047 2002-07-03 Akim Demaille <akim@epita.fr>
10048
10049 * src/lalr.h, src/lalr.c (goto_number_t): New.
10050 * src/lalr.c (goto_list_t): New.
10051 Propagate them.
10052 * src/nullable.c (rule_list_t): New.
10053 Propagate.
10054 * src/types.h: Remove.
10055
10056 2002-07-03 Akim Demaille <akim@epita.fr>
10057
10058 * src/closure.c (print_fderives): Use rule_rhs_print.
10059 * src/derives.c (print_derives): Use rule_rhs_print.
10060 (rule_list_t): New, replaces `shorts'.
10061 (set_derives): Add comments.
10062 * tests/sets.at (Nullable, Firsts): Adjust.
10063
10064 2002-07-03 Akim Demaille <akim@epita.fr>
10065
10066 * src/output.c (prepare_actions): Free `tally' and `width'.
10067 (prepare_actions): Allocate and free `order'.
10068 * src/symtab.c (symbols_free): Free `symbols'.
10069 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10070 * src/output.c (m4_invoke): Move to...
10071 * src/scan-skel.l: here.
10072 (<<EOF>>): Close yyout, and free its name.
10073
10074 2002-07-03 Akim Demaille <akim@epita.fr>
10075
10076 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10077
10078 * src/LR0.c (new_state): Merge into...
10079 (state_list_append): this.
10080 (new_states): Merge into...
10081 (generate_states): here.
10082 (set_states): Don't ensure a proper `errs' state member here, do it...
10083 * src/conflicts.c (conflicts_solve): here.
10084 * src/state.h, src/state.c: Comment changes.
10085 (state_t): Rename member `shifts' as `transitions'.
10086 Adjust all dependencies.
10087 (errs_new): For consistency, also take the values as argument.
10088 (errs_dup): Remove.
10089 (state_errs_set): New.
10090 (state_reductions_set, state_transitions_set): Assert that no
10091 previous value was assigned.
10092 (state_free): New.
10093 (states_free): Use it.
10094 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10095 temporary storage: use `errs' and `nerrs' as elsewhere.
10096 (set_conflicts): Allocate and free this `errs'.
10097
10098 2002-07-02 Akim Demaille <akim@epita.fr>
10099
10100 * lib/libiberty.h: New.
10101 * lib: Update the bitset implementation from upstream.
10102 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10103 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10104 * src/main.c: Adjust bitset stats calls.
10105
10106 2002-07-01 Paul Eggert <eggert@twinsun.com>
10107
10108 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10109 char, so that negative chars don't collide with $.
10110
10111 2002-06-30 Akim Demaille <akim@epita.fr>
10112
10113 Have the GLR tests be `warning' checked, and fix the warnings.
10114
10115 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10116 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10117 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10118 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10119 (yyaddDeferredAction): static.
10120 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10121 (yyreportParseError): yyprefix is const.
10122 yytokenp is used only when verbose.
10123 (yy__GNUC__): Replace with __GNUC__.
10124 (yypdumpstack): yyi is size_t.
10125 (yypreference): Un-yy local variables and arguments, to avoid
10126 clashes with `yyr1'. Anyway, we are not in the user name space.
10127 (yytname_size): be an int, as is compared with ints.
10128 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10129 Use them.
10130 * tests/cxx-gram.at: Use quotation to protect $1.
10131 Use AT_COMPILE to enable warnings hunts.
10132 Prototype yylex and yyerror.
10133 `Use' argc.
10134 Include `string.h', not `strings.h'.
10135 Produce and prototype stmtMerge only when used.
10136 yylex takes a location.
10137
10138 2002-06-30 Akim Demaille <akim@epita.fr>
10139
10140 We spend a lot of time in quotearg, in particular when --verbose.
10141
10142 * src/symtab.c (symbol_get): Store a quoted version of the key.
10143 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10144 Adjust all callers.
10145
10146 2002-06-30 Akim Demaille <akim@epita.fr>
10147
10148 * src/state.h (reductions_t): Rename member `nreds' as num.
10149 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10150 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10151
10152 2002-06-30 Akim Demaille <akim@epita.fr>
10153
10154 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10155 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10156 (shifts_to): Rename as...
10157 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10158 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10159 (TRANSITION_IS_DISABLED, transitions_to): these.
10160
10161 2002-06-30 Akim Demaille <akim@epita.fr>
10162
10163 * src/print.c (print_shifts, print_gotos): Merge into...
10164 (print_transitions): this.
10165 (print_transitions, print_errs, print_reductions): Align the
10166 lookaheads columns.
10167 (print_core, print_transitions, print_errs, print_state,
10168 print_grammar): Output empty lines separator before, not after.
10169 (state_default_rule_compute): Rename as...
10170 (state_default_rule): this.
10171 * tests/conflicts.at (Defaulted Conflicted Reduction),
10172 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10173 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10174
10175 2002-06-30 Akim Demaille <akim@epita.fr>
10176
10177 Display items as we display rules.
10178
10179 * src/gram.h, src/gram.c (rule_lhs_print): New.
10180 * src/gram.c (grammar_rules_partial_print): Use it.
10181 * src/print.c (print_core): Likewise.
10182 * tests/conflicts.at (Defaulted Conflicted Reduction),
10183 (Unresolved SR Conflicts): Adjust.
10184 (Unresolved SR Conflicts): Adjust and rename as...
10185 (Resolved SR Conflicts): this, as was meant.
10186 * tests/regression.at (Web2c Report): Adjust.
10187
10188 2002-06-30 Akim Demaille <akim@epita.fr>
10189
10190 * src/print.c (state_default_rule_compute): New, extracted from...
10191 (print_reductions): here.
10192 Pessimize, but clarify the code.
10193 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10194
10195 2002-06-30 Akim Demaille <akim@epita.fr>
10196
10197 * src/output.c (action_row): Let default_rule be always a rule
10198 number.
10199
10200 2002-06-30 Akim Demaille <akim@epita.fr>
10201
10202 * src/closure.c (print_firsts, print_fderives, closure):
10203 Use BITSET_EXECUTE.
10204 * src/lalr.c (lookaheads_print): Likewise.
10205 * src/state.c (state_rule_lookaheads_print): Likewise.
10206 * src/print_graph.c (print_core): Likewise.
10207 * src/print.c (print_reductions): Likewise.
10208 * src/output.c (action_row): Likewise.
10209 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10210
10211 2002-06-30 Akim Demaille <akim@epita.fr>
10212
10213 * src/print_graph.c: Use report_flag.
10214
10215 2002-06-30 Akim Demaille <akim@epita.fr>
10216
10217 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10218 to...
10219 * src/relation.h, src/relation.c (traverse, relation_digraph)
10220 (relation_print, relation_transpose): New.
10221
10222 2002-06-30 Akim Demaille <akim@epita.fr>
10223
10224 * src/state.h, src/state.c (shifts_to): New.
10225 * src/lalr.c (build_relations): Use it.
10226
10227 2002-06-30 Akim Demaille <akim@epita.fr>
10228
10229 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10230 (item_number_of_rule_number, rule_number_of_item_number): New.
10231 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10232 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10233 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10234 Propagate their use.
10235 Much remains to be done, in particular wrt `shorts' from types.h.
10236
10237 2002-06-30 Akim Demaille <akim@epita.fr>
10238
10239 * src/symtab.c (symbol_new): Initialize the `printer' member.
10240
10241 2002-06-30 Akim Demaille <akim@epita.fr>
10242
10243 * src/LR0.c (save_reductions): Remove, replaced by...
10244 * src/state.h, src/state.c (state_reductions_set): New.
10245 (reductions, errs): Rename as...
10246 (reductions_t, errs_t): these.
10247 Adjust all dependencies.
10248
10249 2002-06-30 Akim Demaille <akim@epita.fr>
10250
10251 * src/LR0.c (state_list_t, state_list_append): New.
10252 (first_state, last_state): Now symbol_list_t.
10253 (this_state): Remove.
10254 (new_itemsets, append_states, save_reductions): Take a state_t as
10255 argument.
10256 (set_states, generate_states): Adjust.
10257 (save_shifts): Remove, replaced by...
10258 * src/state.h, src/state.c (state_shifts_set): New.
10259 (shifts): Rename as...
10260 (shifts_t): this.
10261 Adjust all dependencies.
10262 * src/state.h (state_t): Remove the `next' member.
10263
10264 2002-06-30 Akim Demaille <akim@epita.fr>
10265
10266 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10267 escaped in slot 0.
10268
10269 2002-06-30 Akim Demaille <akim@epita.fr>
10270
10271 Use hash.h for the state hash table.
10272
10273 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10274 (allocate_storage): Use state_hash_new.
10275 (free_storage): Use state_hash_free.
10276 (new_state, get_state): Adjust.
10277 * src/lalr.h, src/lalr.c (states): Move to...
10278 * src/states.h (state_t): Remove the `link' member, no longer
10279 used.
10280 * src/states.h, src/states.c: here.
10281 (state_hash_new, state_hash_free, state_hash_lookup)
10282 (state_hash_insert, states_free): New.
10283 * src/states.c (state_table, state_compare, state_hash): New.
10284 * src/output.c (output_actions): Do not free states now, since we
10285 still need to know the final_state number in `prepare', called
10286 afterwards. Do it...
10287 * src/main.c (main): here: call states_free after `output'.
10288
10289 2002-06-30 Akim Demaille <akim@epita.fr>
10290
10291 * src/state.h, src/state.c (state_new): New, extracted from...
10292 * src/LR0.c (new_state): here.
10293 * src/state.h (STATE_ALLOC): Move to...
10294 * src/state.c: here.
10295 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10296 * src/state.h, src/state.c: here.
10297
10298 2002-06-30 Akim Demaille <akim@epita.fr>
10299
10300 * src/reader.c (gensym): Rename as...
10301 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10302 (getsym): Rename as...
10303 (symbol_get): this.
10304
10305 2002-06-30 Akim Demaille <akim@epita.fr>
10306
10307 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10308 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10309 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10310 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10311
10312 2002-06-30 Akim Demaille <akim@epita.fr>
10313
10314 Make the test suite pass with warnings checked.
10315
10316 * tests/actions.at (Printers and Destructors): Improve.
10317 Avoid unsigned vs. signed issues.
10318 * tests/calc.at: Don't exercise the scanner here, do it...
10319 * tests/input.at (Torturing the Scanner): here.
10320
10321 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10322
10323 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10324 reorganize first lines parallel to yacc.c.
10325
10326 2002-06-28 Akim Demaille <akim@epita.fr>
10327
10328 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10329 (b4_token_enum, b4_token_defines): New, factored from...
10330 * data/lalr1.cc, data/yacc.c, glr.c: here.
10331
10332 2002-06-28 Akim Demaille <akim@epita.fr>
10333
10334 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10335 unused variables.
10336 * src/output.c (merger_output): static.
10337
10338 2002-06-28 Akim Demaille <akim@epita.fr>
10339
10340 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10341 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10342 pacify GCC.
10343 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10344
10345 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10346
10347 Accumulated changelog for new GLR parsing features.
10348
10349 * src/conflicts.c (count_total_conflicts): Change name to
10350 conflicts_total_count.
10351 * src/conflicts.h: Ditto.
10352 * src/output.c (token_actions): Use the new name.
10353 (output_conflicts): Change conflp => conflict_list_heads, and
10354 confl => conflict_list for better readability.
10355 * data/glr.c: Use the new names.
10356 * NEWS: Add self to GLR announcement.
10357
10358 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10359
10360 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10361 Akim Demaille.
10362
10363 * data/bison.glr: Change name to glr.c
10364 * data/glr.c: Renamed from bison.glr.
10365 * data/Makefile.am: Add glr.c
10366
10367 * src/getargs.c:
10368
10369 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10370 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10371
10372 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10373
10374 * data/bison.glr: Be sure to restore the
10375 current #line when returning to the skeleton contents after having
10376 exposed the input file's #line.
10377
10378 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10379
10380 * data/bison.glr: Bring up to date with changes to bison.simple.
10381
10382 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10383
10384 * data/bison.glr: Correct definitions that use b4_prefix.
10385 Various reformatting.
10386 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10387 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10388 yytokenp argument; now part of stack.
10389 (yychar): Define to behave as documented.
10390 (yyclearin): Ditto.
10391
10392 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10393
10394 * src/reader.h: Add declaration for free_merger_functions.
10395
10396 * src/reader.c (merge_functions): New variable.
10397 (get_merge_function): New function.
10398 (free_merger_functions): New function.
10399 (readgram): Check for %prec that is not followed by a symbol.
10400 Handle %dprec and %merge declarations.
10401 (packgram): Initialize dprec and merger fields in rules array.
10402
10403 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10404 conflict_list_cnt, conflict_list_free): New variables.
10405 (table_grow): Also grow conflict_table.
10406 (prepare_rules): Output dprec and merger tables.
10407 (conflict_row): New function.
10408 (action_row): Output conflict lists for GLR parser. Don't use
10409 default reduction in conflicted states for GLR parser so that there
10410 are spaces for the conflict lists.
10411 (save_row): Also save conflict information.
10412 (token_actions): Allocate conflict list.
10413 (merger_output): New function.
10414 (pack_vector): Pack conflict table, too.
10415 (output_conflicts): New function to output yyconflp and yyconfl.
10416 (output_check): Allocate conflict_tos.
10417 (output_actions): Output conflict tables, also.
10418 (output_skeleton): Output b4_mergers definition.
10419 (prepare): Output b4_max_rhs_length definition.
10420 Use 'bison.glr' as default skeleton for GLR parsers.
10421
10422 * src/gram.c (glr_parser): New flag.
10423 (grammar_free): Call free_merger_functions.
10424
10425 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10426 all pairs of conflicting reductions, rather than just all tokens
10427 causing conflicts. Needed to size conflict tables.
10428 (conflicts_output): Modify call to count_rr_conflicts for new
10429 interface.
10430 (conflicts_print): Ditto.
10431 (count_total_conflicts): New function.
10432
10433 * src/reader.h (merger_list): New type.
10434 (merge_functions): New variable.
10435
10436 * src/lex.h (tok_dprec, tok_merge): New token types.
10437
10438 * src/gram.h (rule_s): Add dprec and merger fields.
10439 (glr_parser): New flag.
10440
10441 * src/conflicts.h (count_total_conflicts): New function.
10442
10443 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10444
10445 * doc/bison.texinfo (Generalized LR Parsing): New section.
10446 (GLR Parsers): New section.
10447 (Language and Grammar): Mention GLR parsing.
10448 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10449 Correct typo ("tge" -> "the").
10450
10451 * data/bison.glr: New skeleton for GLR parsing.
10452
10453 * tests/cxx-gram.at: New tests for GLR parsing.
10454
10455 * tests/testsuite.at: Include cxx-gram.at.
10456
10457 * tests/Makefile.am: Add cxx-gram.at.
10458
10459 * src/parse-gram.y:
10460
10461 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10462
10463 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10464
10465 2002-06-27 Akim Demaille <akim@epita.fr>
10466
10467 * src/options.h, src/options.c: Remove.
10468 * src/getargs.c (short_options, long_options): New.
10469
10470 2002-06-27 Akim Demaille <akim@epita.fr>
10471
10472 * data/bison.simple, data/bison.c++: Rename as...
10473 * data/yacc.c, data/lalr1.cc: these.
10474 * doc/bison.texinfo (Environment Variables): Remove.
10475
10476 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10477
10478 * src/getargs.c (report_argmatch): Initialize strtok().
10479
10480 2002-06-20 Akim Demaille <akim@epita.fr>
10481
10482 * data/bison.simple (b4_symbol_actions): New, replaces...
10483 (b4_symbol_destructor, b4_symbol_printer): these.
10484 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10485 user token numbers.
10486
10487 2002-06-20 Akim Demaille <akim@epita.fr>
10488
10489 * data/bison.simple (yydestructor): Rename as...
10490 (yydestruct): this.
10491
10492 2002-06-20 Akim Demaille <akim@epita.fr>
10493
10494 * src/symtab.h, src/symtab.c (symbol_type_set)
10495 (symbol_destructor_set, symbol_precedence_set): The location is
10496 the last argument.
10497 Adjust all callers.
10498
10499 2002-06-20 Akim Demaille <akim@epita.fr>
10500
10501 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10502 internals.
10503 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10504 Takes a location.
10505 * src/symtab.h, src/symtab.c (symbol_class_set)
10506 (symbol_user_token_number_set): Likewise.
10507 Adjust all callers.
10508 Promote complain_at.
10509 * tests/input.at (Type Clashes): Adjust.
10510
10511 2002-06-20 Akim Demaille <akim@epita.fr>
10512
10513 * data/bison.simple (YYLEX): Fix the declaration when
10514 %pure-parser.
10515
10516 2002-06-20 Akim Demaille <akim@epita.fr>
10517
10518 * data/bison.simple (yysymprint): Don't print the token number,
10519 just its name.
10520 * tests/actions.at (Destructors): Rename as...
10521 (Printers and Destructors): this.
10522 Also exercise %printer.
10523
10524 2002-06-20 Akim Demaille <akim@epita.fr>
10525
10526 * data/bison.simple (YYDSYMPRINT): New.
10527 Use it to remove many of the #if YYDEBUG/if (yydebug).
10528
10529 2002-06-20 Akim Demaille <akim@epita.fr>
10530
10531 * src/symtab.h, src/symtab.c (symbol_t): printer and
10532 printer_location are new members.
10533 (symbol_printer_set): New.
10534 * src/parse-gram.y (PERCENT_PRINTER): New token.
10535 Handle its associated rule.
10536 * src/scan-gram.l: Adjust.
10537 (handle_destructor_at, handle_destructor_dollar): Rename as...
10538 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10539 * src/output.c (symbol_printers_output): New.
10540 (output_skeleton): Call it.
10541 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10542 since there are already many grammar files with a user `yyprint'.
10543 Replace the calls to YYPRINT to calls to yysymprint.
10544 * tests/calc.at: Adjust.
10545 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10546 taking advantage of parser very internal details (stack size!).
10547
10548 2002-06-20 Akim Demaille <akim@epita.fr>
10549
10550 * src/scan-gram.l: Complete the scanner with the missing patterns
10551 to pacify Flex.
10552 Use `quote' and `symbol_tag_get' where appropriate.
10553
10554 2002-06-19 Akim Demaille <akim@epita.fr>
10555
10556 * tests/actions.at (Destructors): Augment to test locations.
10557 * data/bison.simple (yydestructor): Pass it the current location
10558 if locations are enabled.
10559 Prototype only when __STDC__ or C++.
10560 Change the argument names to move into the yy name space: there is
10561 user code here.
10562
10563 2002-06-19 Akim Demaille <akim@epita.fr>
10564
10565 * data/bison.simple (b4_pure_if): New.
10566 Use it instead of #ifdef YYPURE.
10567
10568 2002-06-19 Akim Demaille <akim@epita.fr>
10569
10570 * data/bison.simple (b4_location_if): New.
10571 Use it instead of #ifdef YYLSP_NEEDED.
10572
10573 2002-06-19 Akim Demaille <akim@epita.fr>
10574
10575 Prepare @$ in %destructor, but currently don't bind it in the
10576 skeleton, as %location use is not cleaned up yet.
10577
10578 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10579 (handle_action_at): New.
10580 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10581 a braced_code_t and a location as additional arguments.
10582 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10583 unquote one when outputting `b4_dollar_dollar'.
10584 Adjust callers.
10585 * data/bison.simple (b4_eval): Remove.
10586 (b4_symbol_destructor): Adjust.
10587 * tests/input.at (Invalid @n): Adjust.
10588
10589 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10590
10591 * doc/bison.texinfo: Document ability to have multiple
10592 prologue sections.
10593
10594 2002-06-18 Akim Demaille <akim@epita.fr>
10595
10596 * src/files.c (compute_base_names): When computing the output file
10597 names from the input file name, strip the directory part.
10598
10599 2002-06-18 Akim Demaille <akim@epita.fr>
10600
10601 * data/bison.simple.new: Comment changes.
10602 Reported by Andreas Schwab.
10603
10604 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10605
10606 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10607 there are no `label `yyoverflowlab' defined but not used' warnings
10608 when yyoverflow is defined.
10609
10610 2002-06-18 Akim Demaille <akim@epita.fr>
10611
10612 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10613 new member.
10614 (symbol_destructor_set): Adjust.
10615 * src/output.c (symbol_destructors_output): Output the destructor
10616 locations.
10617 Output the symbol name.
10618 * data/bison.simple (b4_symbol_destructor): Adjust.
10619
10620 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10621 and Akim Demaille <akim@epita.fr>
10622
10623 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10624 what's left on the stack when the error recovery hits EOF.
10625 * tests/actions.at (Destructors): Complete to exercise this case.
10626
10627 2002-06-17 Akim Demaille <akim@epita.fr>
10628
10629 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10630 arguments is really empty, not only equal to `[]'.
10631 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10632 member.
10633 (symbol_destructor_set): New.
10634 * src/output.c (symbol_destructors_output): New.
10635 * src/reader.h (brace_code_t, current_braced_code): New.
10636 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10637 (handle_dollar): Rename as...
10638 (handle_action_dollar): this.
10639 (handle_destructor_dollar): New.
10640 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10641 (grammar_declaration): Use it.
10642 * data/bison.simple (yystos): Is always defined.
10643 (yydestructor): New.
10644 * tests/actions.at (Destructors): New.
10645 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10646
10647 2002-06-17 Akim Demaille <akim@epita.fr>
10648
10649 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10650 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10651 rule_length only when needed.
10652 * src/output.c (actions_output, token_definitions_output): Output
10653 the full M4 block.
10654 * src/symtab.c: Don't access directly to the symbol tag, use
10655 symbol_tag_get.
10656 * src/parse-gram.y: Use symbol_list_free.
10657
10658 2002-06-17 Akim Demaille <akim@epita.fr>
10659
10660 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10661 (symbol_list_prepend, get_type_name): Move to...
10662 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10663 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10664 Adjust all callers.
10665 (symbol_list_free): New.
10666 * src/scan-gram.l (handle_dollar): Takes a location.
10667 * tests/input.at (Invalid $n): Adjust.
10668
10669 2002-06-17 Akim Demaille <akim@epita.fr>
10670
10671 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10672 (symbol_list_prepend): New.
10673 * src/parse-gram.y (%union): `list' is a new member.
10674 (symbols.1): New, replaces...
10675 (terms_to_prec.1, nterms_to_type.1): these.
10676 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10677 Take a location as additional argument.
10678 Adjust all callers.
10679
10680 2002-06-15 Akim Demaille <akim@epita.fr>
10681
10682 * src/parse-gram.y: Move %token in the declaration section so that
10683 we don't depend upon CVS Bison.
10684
10685 2002-06-15 Akim Demaille <akim@epita.fr>
10686
10687 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10688 * src/print.c (print_core): Use it.
10689
10690 2002-06-15 Akim Demaille <akim@epita.fr>
10691
10692 * src/conflicts.c (log_resolution): Accept the rule involved in
10693 the sr conflicts instead of the lookahead number that points to
10694 that rule.
10695 (flush_reduce): Accept the current lookahead vector as argument,
10696 instead of the index in LA.
10697 (resolve_sr_conflict): Accept the current number of lookahead
10698 bitset to consider for the STATE, instead of the index in LA.
10699 (set_conflicts): Adjust.
10700 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10701
10702 2002-06-15 Akim Demaille <akim@epita.fr>
10703
10704 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10705 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10706 Adjust all dependencies.
10707 * src/lalr.c (initialize_lookaheads): Split into...
10708 (states_lookaheads_count, states_lookaheads_initialize): these.
10709 (lalr): Adjust.
10710
10711 2002-06-15 Akim Demaille <akim@epita.fr>
10712
10713 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10714 out of...
10715 (grammar_rules_print): here.
10716 * src/reduce.c (reduce_output): Use it.
10717 * tests/reduce.at (Useless Rules, Reduced Automaton)
10718 (Underivable Rules): Adjust.
10719
10720 2002-06-15 Akim Demaille <akim@epita.fr>
10721
10722 Copy BYacc's nice way to report the grammar.
10723
10724 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10725 New.
10726 Don't print the rules' location, it is confusing and useless.
10727 (rule_print): Use grammar_rhs_print.
10728 * src/print.c (print_grammar): Use grammar_rules_print.
10729
10730 2002-06-15 Akim Demaille <akim@epita.fr>
10731
10732 Complete and rationalize `useless thing' warnings.
10733
10734 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10735 (symbol_tag_print): New.
10736 Use them everywhere in place of accessing directly the tag member.
10737 * src/gram.h, src/gram.c (rule_print): New.
10738 Use it where a rule used to be printed `by hand'.
10739 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10740 (reduce_grammar_tables): Report the useless rules.
10741 (reduce_print): Useless things are a warning, not an error.
10742 Report it as such.
10743 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10744 (Reduced Automaton, Underivable Rules): Adjust.
10745 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10746 * tests/conflicts.at (Unresolved SR Conflicts)
10747 (Solved SR Conflicts): Adjust.
10748
10749 2002-06-15 Akim Demaille <akim@epita.fr>
10750
10751 Let symbols have a location.
10752
10753 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10754 (getsym): Adjust.
10755 Adjust all callers.
10756 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10757 Use location_t, not int.
10758 * src/symtab.c (symbol_check_defined): Take advantage of the
10759 location.
10760 * tests/regression.at (Invalid inputs): Adjust.
10761
10762 2002-06-15 Akim Demaille <akim@epita.fr>
10763
10764 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10765 (input): Don't try to initialize yylloc here, do it in the
10766 scanner.
10767 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10768 * src/gram.h (rule_t): Change line and action_line into location
10769 and action_location, of location_t type.
10770 Adjust all dependencies.
10771 * src/location.h, src/location.c (empty_location): New.
10772 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10773 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10774 (grammar_current_rule_symbol_append)
10775 (grammar_current_rule_action_append): Expect a location as argument.
10776 * src/reader.c (grammar_midrule_action): Adjust to attach an
10777 action's location as dummy symbol location.
10778 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10779 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10780 the line numbers.
10781
10782 2002-06-14 Akim Demaille <akim@epita.fr>
10783
10784 Grammar declarations may be found in the grammar section.
10785
10786 * src/parse-gram.y (rules_or_grammar_declaration): New.
10787 (declarations): Each declaration may end with a semicolon, not
10788 just...
10789 (grammar_declaration): `"%union"'.
10790 (grammar): Branch to rules_or_grammar_declaration.
10791
10792 2002-06-14 Akim Demaille <akim@epita.fr>
10793
10794 * src/main.c (main): Invoke scanner_free.
10795
10796 2002-06-14 Akim Demaille <akim@epita.fr>
10797
10798 * src/output.c (m4_invoke): Extracted from...
10799 (output_skeleton): here.
10800 Free tempfile.
10801
10802 2002-06-14 Akim Demaille <akim@epita.fr>
10803
10804 * src/parse-gram.y (directives, directive, gram)
10805 (grammar_directives, precedence_directives, precedence_directive):
10806 Rename as...
10807 (declarations, declaration, grammar, grammar_declaration)
10808 (precedence_declaration, precedence_declarator): these.
10809 (symbol_declaration): New.
10810
10811 2002-06-14 Akim Demaille <akim@epita.fr>
10812
10813 * src/files.c (action_obstack): Remove, unused.
10814 (output_obstack): Remove it, and all its dependencies, as it is no
10815 longer needed.
10816 * src/reader.c (epilogue_set): Build the epilogue in the
10817 muscle_obstack.
10818 * src/output.h, src/output.c (muscle_obstack): Move to...
10819 * src/muscle_tab.h, src/muscle_tab.h: here.
10820 (muscle_init): Initialize muscle_obstack.
10821 (muscle_free): New.
10822 * src/main.c (main): Call it.
10823
10824 2002-06-14 Akim Demaille <akim@epita.fr>
10825
10826 * src/location.h: New, extracted from...
10827 * src/reader.h: here.
10828 * src/Makefile.am (noinst_HEADERS): Merge into
10829 (bison_SOURCES): this.
10830 Add location.h.
10831 * src/parse-gram.y: Use location_t instead of Bison's.
10832 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10833 Use location_t instead of ints.
10834
10835 2002-06-14 Akim Demaille <akim@epita.fr>
10836
10837 * data/bison.simple, data/bison.c++: Be sure to restore the
10838 current #line when returning to the skeleton contents after having
10839 exposed the input file's #line.
10840
10841 2002-06-12 Akim Demaille <akim@epita.fr>
10842
10843 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10844 eager.
10845 * tests/actions.at (Exotic Dollars): New.
10846
10847 2002-06-12 Akim Demaille <akim@epita.fr>
10848
10849 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10850 ['"/] too eagerly.
10851 * tests/input.at (Torturing the Scanner): New.
10852
10853 2002-06-11 Akim Demaille <akim@epita.fr>
10854
10855 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10856 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10857 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10858 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10859 * src/reader.c (reader): Use it.
10860
10861 2002-06-11 Akim Demaille <akim@epita.fr>
10862
10863 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10864 Adjust all callers.
10865 (scanner_last_string_free): New.
10866
10867 2002-06-11 Akim Demaille <akim@epita.fr>
10868
10869 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10870 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10871 (last_string, YY_OBS_FREE): New.
10872 Use them when returning an ID.
10873
10874 2002-06-11 Akim Demaille <akim@epita.fr>
10875
10876 Have Bison grammars parsed by a Bison grammar.
10877
10878 * src/reader.c, src/reader.h (prologue_augment): New.
10879 * src/reader.c (copy_definition): Remove.
10880
10881 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10882 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10883 (grammar_current_rule_prec_set, grammar_current_rule_check)
10884 (grammar_current_rule_symbol_append)
10885 (grammar_current_rule_action_append): Export.
10886 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10887 (symbol_list_action_append): Remove.
10888 Hook the routines from reader.
10889 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10890 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10891
10892 * src/reader.c (read_declarations): Remove, unused.
10893
10894 * src/parse-gram.y: Handle the epilogue.
10895 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10896 (grammar_start_symbol_set): this.
10897 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10898 * src/reader.c (readgram): Remove, unused.
10899 (reader): Adjust to insert eoftoken and axiom where appropriate.
10900
10901 * src/reader.c (copy_dollar): Replace with...
10902 * src/scan-gram.h (handle_dollar): this.
10903 * src/parse-gram.y: Remove `%thong'.
10904
10905 * src/reader.c (copy_at): Replace with...
10906 * src/scan-gram.h (handle_at): this.
10907
10908 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10909 New.
10910
10911 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10912 time being.
10913
10914 * src/reader.h, src/reader.c (grammar_rule_end): New.
10915
10916 * src/parse.y (current_type, current_class): New.
10917 Implement `%nterm', `%token' support.
10918 Merge `%term' into `%token'.
10919 (string_as_id): New.
10920 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10921 type name.
10922
10923 * src/parse-gram.y: Be sure to handle properly the beginning of
10924 rules.
10925
10926 * src/parse-gram.y: Handle %type.
10927 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10928
10929 * src/parse-gram.y: More directives support.
10930 * src/options.c: No longer handle source directives.
10931
10932 * src/parse-gram.y: Fix %output.
10933
10934 * src/parse-gram.y: Handle %union.
10935 Use the prologue locations.
10936 * src/reader.c (parse_union_decl): Remove.
10937
10938 * src/reader.h, src/reader.c (epilogue_set): New.
10939 * src/parse-gram.y: Use it.
10940
10941 * data/bison.simple, data/bison.c++: b4_stype is now either not
10942 defined, then default to int, or to the contents of %union,
10943 without `union' itself.
10944 Adjust.
10945 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10946
10947 * src/output.c (actions_output): Don't output braces, as they are
10948 already handled by the scanner.
10949
10950 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10951 characters to themselves.
10952
10953 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10954 that the epilogue has a proper #line.
10955
10956 * src/parse-gram.y: Handle precedence/associativity.
10957
10958 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10959 a terminal.
10960 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10961 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10962 at all to define terminals that cannot be emitted.
10963
10964 * src/scan-gram.l: Escape M4 characters.
10965
10966 * src/scan-gram.l: Working properly with escapes in user
10967 strings/characters.
10968
10969 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10970 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10971 grammar.
10972 Use more modest sizes, as for the time being the parser does not
10973 release memory, and therefore the process swallows a huge amount
10974 of memory.
10975
10976 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10977 stricter %token grammar.
10978
10979 * src/symtab.h (associativity): Add `undef_assoc'.
10980 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10981 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10982
10983 * tests/regression.at (Invalid %directive): Remove, as it is now
10984 meaningless.
10985 (Invalid inputs): Adjust to the new error messages.
10986 (Token definitions): The new grammar doesn't allow too many
10987 eccentricities.
10988
10989 * src/lex.h, src/lex.c: Remove.
10990 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10991 (copy_character, copy_string2, copy_string, copy_identifier)
10992 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10993 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10994 (parse_action): Remove.
10995 * po/POTFILES.in: Adjust.
10996
10997 2002-06-11 Akim Demaille <akim@epita.fr>
10998
10999 * src/reader.c (parse_action): Don't store directly into the
11000 rule's action member: return the action as a string.
11001 Don't require `rule_length' as an argument: compute it.
11002 (grammar_current_rule_symbol_append)
11003 (grammar_current_rule_action_append): New, eved out from
11004 (readgram): here.
11005 Remove `action_flag', `rulelength', unused now.
11006
11007 2002-06-11 Akim Demaille <akim@epita.fr>
11008
11009 * src/reader.c (grammar_current_rule_prec_set).
11010 (grammar_current_rule_check): New, eved out from...
11011 (readgram): here.
11012 Remove `xaction', `first_rhs': useless.
11013 * tests/input.at (Type clashes): New.
11014 * tests/existing.at (GNU Cim Grammar): Adjust.
11015
11016 2002-06-11 Akim Demaille <akim@epita.fr>
11017
11018 * src/reader.c (grammar_midrule_action): New, Eved out from
11019 (readgram): here.
11020
11021 2002-06-11 Akim Demaille <akim@epita.fr>
11022
11023 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11024 New.
11025 (readgram): Use them as replacement of inlined code, crule and
11026 crule1.
11027
11028 2002-06-11 Akim Demaille <akim@epita.fr>
11029
11030 * src/reader.c (grammar_end, grammar_symbol_append): New.
11031 (readgram): Use them.
11032 Make the use of `p' as local as possible.
11033
11034 2002-06-10 Akim Demaille <akim@epita.fr>
11035
11036 GCJ's parser requires the tokens to be defined before the prologue.
11037
11038 * data/bison.simple: Output the token definition before the user's
11039 prologue.
11040 * tests/regression.at (Braces parsing, Duplicate string)
11041 (Mixing %token styles): Check the output from bison.
11042 (Early token definitions): New.
11043
11044 2002-06-10 Akim Demaille <akim@epita.fr>
11045
11046 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11047 assigning twice the same user number to a token, so that we can
11048 use it in...
11049 * src/lex.c (lex): here.
11050 Also use `symbol_class_set' instead of hand written code.
11051 * src/reader.c (parse_assoc_decl): Likewise.
11052
11053 2002-06-10 Akim Demaille <akim@epita.fr>
11054
11055 * src/symtab.c, src/symtab.c (symbol_class_set)
11056 (symbol_user_token_number_set): New.
11057 * src/reader.c (parse_token_decl): Use them.
11058 Use a switch instead of ifs.
11059 Use a single argument.
11060
11061 2002-06-10 Akim Demaille <akim@epita.fr>
11062
11063 Remove `%thong' support as it is undocumented, unused, duplicates
11064 `%token's job, and creates useless e-mail traffic with people who
11065 want to know what it is, why it is undocumented, unused, and
11066 duplicates `%token's job.
11067
11068 * src/reader.c (parse_thong_decl): Remove.
11069 * src/options.c (option_table): Remove "thong".
11070 * src/lex.h (tok_thong): Remove.
11071
11072 2002-06-10 Akim Demaille <akim@epita.fr>
11073
11074 * src/symtab.c, src/symtab.c (symbol_type_set)
11075 (symbol_precedence_set): New.
11076 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11077 (value_components_used): Remove, unused.
11078
11079 2002-06-09 Akim Demaille <akim@epita.fr>
11080
11081 Move symbols handling code out of the reader.
11082
11083 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11084 (axiom): Move to...
11085 * src/symtab.h, src/symtab.c: here.
11086
11087 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11088 * src/reader.c (startval): Rename as...
11089 * src/symtab.h, src/symtab.c (startsymbol): this.
11090 * src/reader.c: Adjust.
11091
11092 * src/reader.c (symbol_check_defined, symbol_make_alias)
11093 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11094 (token_translations_init)
11095 Move to...
11096 * src/symtab.c: here.
11097 * src/reader.c (packsymbols): Move to...
11098 * src/symtab.h, src/symtab.c (symbols_pack): here.
11099 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11100 argument.
11101
11102 2002-06-03 Akim Demaille <akim@epita.fr>
11103
11104 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11105 then statements.
11106
11107 2002-06-03 Akim Demaille <akim@epita.fr>
11108
11109 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11110 structs with non literals.
11111 * src/scan-skel.l: never-interactive.
11112 * src/conflicts.c (enum conflict_resolution_e): No trailing
11113 comma.
11114 * src/getargs.c (usage): Split long literal strings.
11115 Reported by Hans Aberg.
11116
11117 2002-05-28 Akim Demaille <akim@epita.fr>
11118
11119 * data/bison.c++: Use C++ ostreams.
11120 (cdebug_): New member.
11121
11122 2002-05-28 Akim Demaille <akim@epita.fr>
11123
11124 * src/output.c (output_skeleton): Be sure to allocate enough room
11125 for `/' _and_ for `\0' in full_skeleton.
11126
11127 2002-05-28 Akim Demaille <akim@epita.fr>
11128
11129 * data/bison.c++: Catch up with bison.simple:
11130 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11131 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11132 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11133 and popping traces.
11134
11135 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11136
11137 * src/output.c (output_skeleton): Put an explicit path in front of
11138 the skeleton file name, rather than relying on the -I directory,
11139 to partially alleviate effects of having a skeleton file lying around
11140 in the current directory.
11141
11142 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11143
11144 * src/conflicts.c (log_resolution): Correct typo:
11145 obstack_printf should be obstack_fgrow1.
11146
11147 2002-05-26 Akim Demaille <akim@epita.fr>
11148
11149 * src/state.h (state_t): `solved_conflicts' is a new member.
11150 * src/LR0.c (new_state): Set it to 0.
11151 * src/conflicts.h, src/conflicts.c (print_conflicts)
11152 (free_conflicts, solve_conflicts): Rename as...
11153 (conflicts_print, conflicts_free, conflicts_solve): these.
11154 Adjust callers.
11155 * src/conflicts.c (enum conflict_resolution_e)
11156 (solved_conflicts_obstack): New, used by...
11157 (log_resolution): this.
11158 Adjust to attach the conflict resolution to each state.
11159 Complete the description with the precedence/associativity
11160 information.
11161 (resolve_sr_conflict): Adjust.
11162 * src/print.c (print_state): Output its solved_conflicts.
11163 * tests/conflicts.at (Unresolved SR Conflicts)
11164 (Solved SR Conflicts): Exercise --report=all.
11165
11166 2002-05-26 Akim Demaille <akim@epita.fr>
11167
11168 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11169 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11170 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11171 (token_number_t, item_number_as_token_number)
11172 (token_number_as_item_number, muscle_insert_token_number_table):
11173 Rename as...
11174 (symbol_number_t, item_number_as_symbol_number)
11175 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11176 these, since it is more appropriate.
11177
11178 2002-05-26 Akim Demaille <akim@epita.fr>
11179
11180 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11181 `Error:' lines.
11182 * data/bison.simple (yystos) [YYDEBUG]: New.
11183 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11184 error recovery.
11185 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11186
11187 2002-05-25 Akim Demaille <akim@epita.fr>
11188
11189 * doc/bison.texinfo (Debugging): Split into...
11190 (Tracing): this new section, its former contents, and...
11191 (Understanding): this new section.
11192 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11193 by...
11194 (report_flag): this.
11195 Adjust all dependencies.
11196 (report_args, report_types, report_argmatch): New.
11197 (usage, getargs): Report/support -r, --report.
11198 * src/options.h
11199 (struct option_table_struct): Rename as..,
11200 (struct option_table_s): this.
11201 Rename the `set_flag' member to `flag' to match with getopt_long's
11202 struct.
11203 * src/options.c (option_table): Split verbose into an entry for
11204 %verbose, and another for --verbose.
11205 Support --report/-r, so remove -r from the obsolete --raw.
11206 * src/print.c: Attach full item sets and lookaheads reports to
11207 report_flag instead of trace_flag.
11208 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11209
11210 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11211 and Paul Eggert <eggert@twinsun.com>
11212
11213 * data/bison.simple (yyparse): Correct error handling to conform to
11214 POSIX and yacc. Specifically, after syntax error is discovered,
11215 do not reduce further before shifting the error token.
11216 Clean up the code a bit by removing the labels yyerrdefault,
11217 yyerrhandle, yyerrpop.
11218 * NEWS: Document the above.
11219
11220 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11221
11222 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11223 type; it isn't always big enough, since it doesn't necessarily
11224 include non-terminals.
11225 (yytranslate): Expand definition of yy_token_number_type, so that
11226 the latter can be removed.
11227 (yy_token_number_type): Remove, only one use.
11228 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11229 don't use TokenNumberType as element type.
11230
11231 * tests/regression.at: Modify expected output to agree with change
11232 to yyr1 and yytranslate.
11233
11234 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11235
11236 * src/reader.c (parse_action): Use copy_character instead of
11237 obstack_1grow.
11238
11239 2002-05-13 Akim Demaille <akim@epita.fr>
11240
11241 * tests/regression.at (Token definitions): Prototype yylex and
11242 yyerror.
11243
11244 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11245
11246 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11247 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11248 32-bit arithmetic.
11249 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11250
11251 2002-05-07 Akim Demaille <akim@epita.fr>
11252
11253 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11254 avoid GCC warnings.
11255
11256 2002-05-07 Akim Demaille <akim@epita.fr>
11257
11258 Kill GCC warnings.
11259
11260 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11261 over the RHS of each rule.
11262 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11263 * src/state.h (state_t): Member `nitems' is unsigned short.
11264 * src/LR0.c (get_state): Adjust.
11265 * src/reader.c (packgram): Likewise.
11266 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11267 `Type'.
11268 (muscle_insert_int_table): Remove, unused.
11269 (prepare_rules): Remove `max'.
11270
11271 2002-05-06 Akim Demaille <akim@epita.fr>
11272
11273 * src/closure.c (print_firsts): Display of the symbol tags.
11274 (bitmatrix_print): Move to...
11275 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11276 here.
11277 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11278
11279 2002-05-06 Akim Demaille <akim@epita.fr>
11280
11281 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11282 hash_do_for_each.
11283
11284 2002-05-06 Akim Demaille <akim@epita.fr>
11285
11286 * src/LR0.c (new_state, get_state): Instead of using the global
11287 `kernel_size' and `kernel_base', have two new arguments:
11288 `core_size' and `core'.
11289 Adjust callers.
11290
11291 2002-05-06 Akim Demaille <akim@epita.fr>
11292
11293 * src/reader.c (packgram): No longer end `ritem' with a 0
11294 sentinel: it is not used.
11295
11296 2002-05-05 Akim Demaille <akim@epita.fr>
11297
11298 New experimental feature: display the lookaheads in the report and
11299 graph.
11300
11301 * src/print (print_core): When --trace-flag, display the rules
11302 lookaheads.
11303 * src/print_graph.c (print_core): Likewise.
11304 Swap the arguments.
11305 Adjust caller.
11306
11307 2002-05-05 Akim Demaille <akim@epita.fr>
11308
11309 * tests/torture.at (Many lookaheads): New test.
11310
11311 2002-05-05 Akim Demaille <akim@epita.fr>
11312
11313 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11314 (GENERATE_MUSCLE_INSERT_TABLE): this.
11315 (output_int_table, output_unsigned_int_table, output_short_table)
11316 (output_token_number_table, output_item_number_table): Replace with...
11317 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11318 (muscle_insert_short_table, muscle_insert_token_number_table)
11319 (muscle_insert_item_number_table): these.
11320 Adjust all callers.
11321 (prepare_tokens): Don't free `translations', since...
11322 * src/reader.h, src/reader.c (grammar_free): do it.
11323 Move to...
11324 * src/gram.h, src/gram.c (grammar_free): here.
11325 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11326 b4_translate_max.
11327
11328 2002-05-05 Akim Demaille <akim@epita.fr>
11329
11330 * src/output.c (output_unsigned_int_table): New.
11331 (prepare_rules): `i' is unsigned.
11332 `prhs', `rline', `r2' are unsigned int.
11333 Rename muscle `rhs_number_max' as `rhs_max'.
11334 Output muscles `prhs_max', `rline_max', and `r2_max'.
11335 Free rline and r1.
11336 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11337 to compute types instead of constant types.
11338 * tests/regression.at (Web2c Actions): Adjust.
11339
11340 2002-05-04 Akim Demaille <akim@epita.fr>
11341
11342 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11343 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11344 Adjust dependencies.
11345 * src/output.c (token_definitions_output): Be sure not to output a
11346 `#define 'a'' when fed with `%token 'a' "a"'.
11347 * tests/regression.at (Token definitions): New.
11348
11349 2002-05-03 Paul Eggert <eggert@twinsun.com>
11350
11351 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11352 for K&R C.
11353
11354 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11355
11356 * Makefile.am (SUBDIRS): Remove intl.
11357 (EXTRA_DIST): Add config/config.rpath.
11358
11359 2002-05-03 Akim Demaille <akim@epita.fr>
11360
11361 * data/bison.simple (m4_if): Don't output empty enums.
11362 And actually, output valid enum definitions :(.
11363
11364 2002-05-03 Akim Demaille <akim@epita.fr>
11365
11366 * configure.bat: Remove, completely obsolete.
11367 * Makefile.am (EXTRA_DIST): Adjust.
11368 Don't distribute config.rpath...
11369 * config/Makefile.am (EXTRA_DIST): Do it.
11370
11371 2002-05-03 Akim Demaille <akim@epita.fr>
11372
11373 * configure.in (GETTEXT_VERSION): New.
11374 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11375
11376 2002-05-03 Akim Demaille <akim@epita.fr>
11377
11378 * data/bison.simple (b4_token_enum): New.
11379 (b4_token_defines): Use it to output tokens both as #define and
11380 enums.
11381 Suggested by Paul Eggert.
11382 * src/output.c (token_definitions_output): Don't output spurious
11383 white spaces.
11384
11385 2002-05-03 Akim Demaille <akim@epita.fr>
11386
11387 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11388
11389 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11390
11391 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11392 Update the stack class, give a try to deque as the default container.
11393
11394 2002-05-02 Akim Demaille <akim@epita.fr>
11395
11396 * data/bison.simple (yyparse): Do not implement @$ = @1.
11397 (YYLLOC_DEFAULT): Adjust to do it.
11398 * doc/bison.texinfo (Location Default Action): Fix.
11399
11400 2002-05-02 Akim Demaille <akim@epita.fr>
11401
11402 * src/reader.c (parse_braces): Merge into...
11403 (parse_action): this.
11404
11405 2002-05-02 Akim Demaille <akim@epita.fr>
11406
11407 * configure.in (ALL_LINGUAS): Remove.
11408 * po/LINGUAS, hr.po: New.
11409
11410 2002-05-02 Akim Demaille <akim@epita.fr>
11411
11412 Remove the so called hairy (semantic) parsers.
11413
11414 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11415 * src/gram.h, src/gram.c (semantic_parser): Remove.
11416 (rule_t): Remove the guard and guard_line members.
11417 * src/lex.h (token_t): remove tok_guard.
11418 * src/options.c (option_table): Remove %guard and %semantic_parser
11419 support.
11420 * src/output.c, src/output.h (guards_output): Remove.
11421 (prepare): Adjust.
11422 (token_definitions_output): Don't output the `T'
11423 tokens (???).
11424 (output_skeleton): Don't output the guards.
11425 * src/files.c, src/files.c (attrsfile): Remove.
11426 * src/reader.c (symbol_list): Remove the guard and guard_line
11427 members.
11428 Adjust dependencies.
11429 (parse_guard): Remove.
11430 * data/bison.hairy: Remove.
11431 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11432 BISON_HAIRY.
11433
11434 2002-05-02 Akim Demaille <akim@epita.fr>
11435
11436 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11437 (parse_guard): Rename the formal argument `stack_offset' as
11438 `rule_length', which is more readable.
11439 Adjust callers.
11440 (copy_at, copy_dollar): Instead of outputting the hard coded
11441 values of $$, $n and so forth, output invocation to b4_lhs_value,
11442 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11443 Note: this patch partially drops `semantic-parser' support: it
11444 always does `rule_length - n', where semantic parsers ought to
11445 always use `-n'.
11446 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11447 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11448
11449 2002-05-02 Akim Demaille <akim@epita.fr>
11450
11451 * configure.in (AC_INIT): Bump to 1.49b.
11452 (AM_INIT_AUTOMAKE): Short invocation.
11453
11454 2002-05-02 Akim Demaille <akim@epita.fr>
11455
11456 Version 1.49a.
11457
11458 2002-05-01 Akim Demaille <akim@epita.fr>
11459
11460 * src/skeleton.h: Remove.
11461
11462 2002-05-01 Akim Demaille <akim@epita.fr>
11463
11464 * src/skeleton.h: Fix the #endif.
11465 Reported by Magnus Fromreide.
11466
11467 2002-04-26 Paul Eggert <eggert@twinsun.com>
11468
11469 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11470 Define if we define YYSTYPE and YYLTYPE, respectively.
11471 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11472
11473 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11474
11475 * src/scan-skel.l: Postprocess quadrigraphs.
11476
11477 * src/reader.c (copy_character): New function, used to output
11478 single characters while replacing `[' and `]' with quadrigraphs, to
11479 avoid troubles with M4 quotes.
11480 (copy_comment): Output characters with copy_character.
11481 (read_additionnal_code): Likewise.
11482 (copy_string2): Likewise.
11483 (copy_definition): Likewise.
11484
11485 * tests/calc.at: Exercise M4 quoting.
11486
11487 2002-04-25 Akim Demaille <akim@epita.fr>
11488
11489 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11490 between `!' and the command.
11491 Reported by Paul Eggert.
11492
11493 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11494
11495 * tests/calc.at: Exercise prologue splitting.
11496
11497 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11498 `b4_post_prologue' instead of `b4_prologue'.
11499
11500 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11501 muscles.
11502 (output): Free pre_prologue_obstack and post_prologue_obstack.
11503 * src/files.h, src/files.c (attrs_obstack): Remove.
11504 (pre_prologue_obstack, post_prologue_obstack): New.
11505 * src/reader.c (copy_definition): Add a parameter to specify the
11506 obstack to fill, instead of using attrs_obstack unconditionally.
11507 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11508 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11509
11510 2002-04-23 Paul Eggert <eggert@twinsun.com>
11511
11512 * data/bison.simple: Remove unnecessary commentary and white
11513 space differences from 1_29-branch.
11514 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11515
11516 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11517 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11518 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11519 constructors or destructors.
11520
11521 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11522
11523 2002-04-23 Akim Demaille <akim@epita.fr>
11524
11525 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11526 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11527 location with columns.
11528 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11529 All reported by Paul Eggert.
11530
11531 2002-04-22 Akim Demaille <akim@epita.fr>
11532
11533 * src/reduce.c (dump_grammar): Move to...
11534 * src/gram.h, src/gram.c (grammar_dump): here.
11535 Be sure to separate long item numbers.
11536 Don't read the members of a rule's prec if its nil.
11537
11538 2002-04-22 Akim Demaille <akim@epita.fr>
11539
11540 * src/output.c (table_size, table_grow): New.
11541 (MAXTABLE): Remove, replace uses with table_size.
11542 (pack_vector): Instead of dying when the table is too big, grow it.
11543
11544 2002-04-22 Akim Demaille <akim@epita.fr>
11545
11546 * data/bison.simple (yyr1): Its type is that of a token number.
11547 * data/bison.c++ (r1_): Likewise.
11548 * tests/regression.at (Web2c Actions): Adjust.
11549
11550 2002-04-22 Akim Demaille <akim@epita.fr>
11551
11552 * src/reader.c (token_translations_init): 256 is now the default
11553 value for the error token, i.e., it will be assigned another
11554 number if the user assigned 256 to one of her tokens.
11555 (reader): Don't force 256 to error.
11556 * doc/bison.texinfo (Symbols): Adjust.
11557 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11558 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11559 etc. instead of 10, 20, 30 (which was used to `jump' over error
11560 (256) and undefined (2)).
11561
11562 2002-04-22 Akim Demaille <akim@epita.fr>
11563
11564 Propagate more token_number_t.
11565
11566 * src/gram.h (token_number_as_item_number)
11567 (item_number_as_token_number): New.
11568 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11569 Use it to create output_item_number_table and
11570 output_token_number_table.
11571 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11572 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11573 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11574 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11575
11576 2002-04-22 Akim Demaille <akim@epita.fr>
11577
11578 * src/output.h, src/output.c (get_lines_number): Remove.
11579
11580 2002-04-19 Akim Demaille <akim@epita.fr>
11581
11582 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11583 as Lex/Flex'.
11584 (Debugging): More details about enabling the debugging features.
11585 (Table of Symbols): Describe $$, $n, @$, and @n.
11586 Suggested by Tim Josling.
11587
11588 2002-04-19 Akim Demaille <akim@epita.fr>
11589
11590 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11591
11592 2002-04-10 Akim Demaille <akim@epita.fr>
11593
11594 * src/system.h: Rely on HAVE_LIMITS_H.
11595 Suggested by Paul Eggert.
11596
11597 2002-04-09 Akim Demaille <akim@epita.fr>
11598
11599 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11600 full stderr, and strip it according to the bison options, instead
11601 of composing the error message from different bits.
11602 This makes it easier to check for several error messages.
11603 Adjust all the invocations.
11604 Add an invocation exercising the error token.
11605 Add an invocation demonstrating a stupid error message.
11606 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11607 Adjust the tests.
11608 Error message are for stderr, not stdout.
11609
11610 2002-04-09 Akim Demaille <akim@epita.fr>
11611
11612 * src/gram.h, src/gram.c (error_token_number): Remove, use
11613 errtoken->number.
11614 * src/reader.c (reader): Don't specify the user token number (2)
11615 for $undefined, as it uselessly prevents using it.
11616 * src/gram.h (token_number_t): Move to...
11617 * src/symtab.h: here.
11618 (state_t.number): Is a token_number_t.
11619 * src/print.c, src/reader.c: Use undeftoken->number instead of
11620 hard coded 2.
11621 (Even though this 2 is not the same as above: the number of the
11622 undeftoken remains being 2, it is its user token number which
11623 might not be 2).
11624 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11625 `user_token_number_max'.
11626 Output `undef_token_number'.
11627 * data/bison.simple, data/bison.c++: Use them.
11628 Be sure to map invalid yylex return values to
11629 `undef_token_number'. This saves us from gratuitous SEGV.
11630
11631 * tests/conflicts.at (Solved SR Conflicts)
11632 (Unresolved SR Conflicts): Adjust.
11633 * tests/regression.at (Web2c Actions): Adjust.
11634
11635 2002-04-08 Akim Demaille <akim@epita.fr>
11636
11637 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11638 Adding #line.
11639 Remove the duplicate `typedefs'.
11640 (RhsNumberType): Fix the declaration and various other typos.
11641 Use __ofile__.
11642 * data/bison.simple: Use __ofile__.
11643 * src/scan-skel.l: Handle __ofile__.
11644
11645 2002-04-08 Akim Demaille <akim@epita.fr>
11646
11647 * src/gram.h (item_number_t): New, the type of item numbers in
11648 RITEM. Note that it must be able to code symbol numbers as
11649 positive number, and the negation of rule numbers as negative
11650 numbers.
11651 Adjust all dependencies (pretty many).
11652 * src/reduce.c (rule): Remove this `short *' pointer: use
11653 item_number_t.
11654 * src/system.h (MINSHORT, MAXSHORT): Remove.
11655 Include `limits.h'.
11656 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11657 (shortcpy): Remove.
11658 (MAXTABLE): Move to...
11659 * src/output.c (MAXTABLE): here.
11660 (prepare_rules): Use output_int_table to output rhs.
11661 * data/bison.simple, data/bison.c++: Adjust.
11662 * tests/torture.at (Big triangle): Move the limit from 254 to
11663 500.
11664 * tests/regression.at (Web2c Actions): Ajust.
11665
11666 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11667 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11668 passes, but produces negative #line number, once fixed, GCC is
11669 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11670 C), it passes.
11671 * src/state.h (state_h): Code input lines on ints, not shorts.
11672
11673 2002-04-08 Akim Demaille <akim@epita.fr>
11674
11675 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11676 and then the grammar.
11677
11678 2002-04-08 Akim Demaille <akim@epita.fr>
11679
11680 * src/system.h: No longer using strndup.
11681
11682 2002-04-07 Akim Demaille <akim@epita.fr>
11683
11684 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11685 * src/output.c (output_table_data): Return the longest number.
11686 (prepare_tokens): Output `token_number_max').
11687 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11688 New.
11689 Use them to define yy_token_number_type/TokenNumberType.
11690 Use this type for yytranslate.
11691 * tests/torture.at (Big triangle): Push the limit from 124 to
11692 253.
11693 * tests/regression.at (Web2c Actions): Adjust.
11694
11695 2002-04-07 Akim Demaille <akim@epita.fr>
11696
11697 * tests/torture.at (Big triangle): New.
11698 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11699 * tests/existing.at: here.
11700
11701 2002-04-07 Akim Demaille <akim@epita.fr>
11702
11703 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11704 nritems.
11705 Adjust dependencies.
11706
11707 2002-04-07 Akim Demaille <akim@epita.fr>
11708
11709 * src/reader.c: Normalize increments to prefix form.
11710
11711 2002-04-07 Akim Demaille <akim@epita.fr>
11712
11713 * src/reader.c, symtab.c: Remove debugging code.
11714
11715 2002-04-07 Akim Demaille <akim@epita.fr>
11716
11717 Rename all the `bucket's as `symbol_t'.
11718
11719 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11720 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11721 * src/symtab.c, src/symtab.h (bucket): Rename as...
11722 (symbol_t): this.
11723 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11724 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11725 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11726 (buckets_new, buckets_free, buckets_do): Rename as...
11727 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11728 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11729 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11730 (symbols_new, symbols_free, symbols_do): these.
11731
11732 2002-04-07 Akim Demaille <akim@epita.fr>
11733
11734 Use lib/hash for the symbol table.
11735
11736 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11737 EOF.
11738 * src/lex.c (lex): Set the `number' member of new terminals.
11739 * src/reader.c (bucket_check_defined, bucket_make_alias)
11740 (bucket_check_alias_consistence, bucket_translation): New.
11741 (reader, grammar_free, readgram, token_translations_init)
11742 (packsymbols): Adjust.
11743 (reader): Number the predefined tokens.
11744 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11745 for predefined tokens.
11746 * src/symtab.h (bucket): Remove all the hash table related
11747 members.
11748 * src/symtab.c (symtab): Replace by...
11749 (bucket_table): this.
11750 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11751 (buckets_new, buckets_do): New.
11752
11753 2002-04-07 Akim Demaille <akim@epita.fr>
11754
11755 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11756 (start_symbol, max_user_token_number, semantic_parser)
11757 (error_token_number): Initialize.
11758 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11759 Initialize.
11760 (reader): Don't.
11761 (errtoken, eoftoken, undeftoken, axiom): Extern.
11762
11763 2002-04-07 Akim Demaille <akim@epita.fr>
11764
11765 * src/gram.h (rule_s): prec and precsym are now pointers
11766 to the bucket giving the priority/associativity.
11767 Member `associativity' removed: useless.
11768 * src/reduce.c, src/conflicts.c: Adjust.
11769
11770 2002-04-07 Akim Demaille <akim@epita.fr>
11771
11772 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11773 Properly escape the symbols' TAG when outputting them.
11774
11775 2002-04-07 Akim Demaille <akim@epita.fr>
11776
11777 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11778
11779 2002-04-07 Akim Demaille <akim@epita.fr>
11780
11781 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11782 (LArule): this, which is an array to rule_t*.
11783 * src/print.c, src/conflicts.c: Adjust.
11784
11785 2002-04-07 Akim Demaille <akim@epita.fr>
11786
11787 * src/gram.h (rule_t): Rename `number' as `user_number'.
11788 `number' is a new member.
11789 Adjust dependencies.
11790 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11791
11792 2002-04-07 Akim Demaille <akim@epita.fr>
11793
11794 As a result of the previous patch, it is no longer needed
11795 to reorder ritem itself.
11796
11797 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11798
11799 2002-04-07 Akim Demaille <akim@epita.fr>
11800
11801 Be sure never to walk through RITEMS, but use only data related to
11802 the rules themselves. RITEMS should be banished.
11803
11804 * src/output.c (output_token_translations): Rename as...
11805 (prepare_tokens): this.
11806 In addition to `translate', prepare the muscles `tname' and
11807 `toknum', which were handled by...
11808 (output_rule_data): this.
11809 Remove, and move the remainder of its outputs into...
11810 (prepare_rules): this new routines, which also merges content from
11811 (output_gram): this.
11812 (prepare_rules): Be sure never to walk through RITEMS.
11813 (output_stos): Rename as...
11814 (prepare_stos): this.
11815 (output): Always invoke prepare_states, after all, just don't use it
11816 in the output if you don't need it.
11817
11818 2002-04-07 Akim Demaille <akim@epita.fr>
11819
11820 * src/LR0.c (new_state): Display `nstates' as the name of the
11821 newly created state.
11822 Adjust to initialize first_state and last_state if needed.
11823 Be sure to distinguish the initial from the final state.
11824 (new_states): Create the itemset of the initial state, and use
11825 new_state.
11826 * src/closure.c (closure): Now that the initial state has its
11827 items properly set, there is no need for a special case when
11828 creating `ruleset'.
11829
11830 As a result, now the rule 0, reducing to $axiom, is visible in the
11831 outputs. Adjust the test suite.
11832
11833 * tests/conflicts.at (Solved SR Conflicts)
11834 (Unresolved SR Conflicts): Adjust.
11835 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11836 * tests/conflicts.at (S/R in initial): New.
11837
11838 2002-04-07 Akim Demaille <akim@epita.fr>
11839
11840 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11841 the RHS of the rules.
11842 * src/output.c (output_gram): Likewise.
11843
11844 2002-04-07 Akim Demaille <akim@epita.fr>
11845
11846 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11847 bucket.
11848 Adjust all dependencies.
11849 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11850 `number' of the buckets too.
11851 * src/gram.h: Include `symtab.h'.
11852 (associativity): Move to...
11853 * src/symtab.h: here.
11854 No longer include `gram.h'.
11855
11856 2002-04-07 Akim Demaille <akim@epita.fr>
11857
11858 * src/gram.h, src/gram.c (rules_rhs_length): New.
11859 (ritem_longest_rhs): Use it.
11860 * src/gram.h (rule_t): `number' is a new member.
11861 * src/reader.c (packgram): Set it.
11862 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11863 the end of `rules', and count them out of `nrules'.
11864 (reduce_output, dump_grammar): Adjust.
11865 * src/print.c (print_grammar): It is no longer needed to check for
11866 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11867 * tests/reduce.at (Reduced Automaton): New test.
11868
11869 2002-04-07 Akim Demaille <akim@epita.fr>
11870
11871 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11872 lacking `+ 1' to nrules, Bison reported as useless a token if it
11873 was used solely to set the precedence of the last rule...
11874
11875 2002-04-07 Akim Demaille <akim@epita.fr>
11876
11877 * data/bison.c++, data/bison.simple: Don't output the current file
11878 name in #line, to avoid useless diffs between two identical
11879 outputs under different names.
11880
11881 2002-04-07 Akim Demaille <akim@epita.fr>
11882
11883 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11884 Normalize loops to using `< nrules + 1', not `<= nrules'.
11885
11886 2002-04-07 Akim Demaille <akim@epita.fr>
11887
11888 * TODO: Update.
11889
11890 2002-04-07 Akim Demaille <akim@epita.fr>
11891
11892 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11893 bucket.value as bucket.number.
11894
11895 2002-04-07 Akim Demaille <akim@epita.fr>
11896
11897 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11898 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11899 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11900 RHS, instead of being an index in RITEMS.
11901
11902 2002-04-04 Paul Eggert <eggert@twinsun.com>
11903
11904 * doc/bison.texinfo: Update copyright date.
11905 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11906 (Symbols): Warn about running Bison in one character set,
11907 but compiling and/or running in an incompatible one.
11908 Warn about character code 256, too.
11909
11910 2002-04-03 Paul Eggert <eggert@twinsun.com>
11911
11912 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11913 YYERROR_VERBOSE is nonzero, not whether it is defined.
11914
11915 Merge changes from bison-1_29-branch.
11916
11917 2002-03-20 Paul Eggert <eggert@twinsun.com>
11918
11919 Merge fixes from Debian bison_1.34-1.diff.
11920
11921 * configure.in (AC_PREREQ): 2.53.
11922
11923 2002-03-20 Akim Demaille <akim@epita.fr>
11924
11925 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11926
11927 2002-03-19 Paul Eggert <eggert@twinsun.com>
11928
11929 * src/bison.simple (YYCOPY): New macro.
11930 (YYSTACK_RELOCATE): Use it.
11931 Remove Type arg; no longer needed. All callers changed.
11932 (yymemcpy): Remove; no longer needed.
11933
11934 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11935 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11936
11937 2002-03-19 Akim Demaille <akim@epita.fr>
11938
11939 Test and fix the #line outputs.
11940
11941 * tests/atlocal.at (GCC): New.
11942 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11943 (Prologue synch line, %union synch line, Postprologue synch line)
11944 (Action synch line, Epilogue synch line): New tests.
11945 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11946 * data/bison.simple, data/bison.c++: Use it.
11947
11948 2002-03-19 Akim Demaille <akim@epita.fr>
11949
11950 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11951 (Solved SR Conflicts, %expect not enough, %expect right)
11952 (%expect too much): Move to...
11953 * tests/conflicts.at: this new file.
11954
11955 2002-03-19 Akim Demaille <akim@epita.fr>
11956
11957 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11958 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11959 that we can move to enums for instance.
11960 * src/output.c (token_definitions_output): Output a list of
11961 `token-name, token-number' instead of the #define.
11962 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11963
11964 2002-03-14 Akim Demaille <akim@epita.fr>
11965
11966 Use Gettext 0.11.1.
11967
11968 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11969
11970 * data/bison.c++: Make the user able to add members to the generated
11971 parser by subclassing.
11972
11973 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11974
11975 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11976 a character.
11977 Reported by Nicolas Tisserand and Nicolas Burrus.
11978
11979 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11980
11981 * src/reader.c: Warn about lacking semi-colons, do not complain.
11982
11983 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11984
11985 * data/bison.c++: Remove a debug line.
11986
11987 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11988
11989 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11990 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11991 provide a default implementation.
11992
11993 2002-03-04 Akim Demaille <akim@epita.fr>
11994
11995 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11996 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11997 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11998 * tests/semantic.at (Parsing Guards): Similarly.
11999 * src/reader.at (readgram): Complain if the last rule is not ended
12000 with a semi-colon.
12001
12002 2002-03-04 Akim Demaille <akim@epita.fr>
12003
12004 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12005 * src/closure.c: here.
12006 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12007 RTC.
12008 * src/warshall.h, src/warshall.c: Remove.
12009 * tests/sets.at (Broken Closure): Adjust.
12010
12011 2002-03-04 Akim Demaille <akim@epita.fr>
12012
12013 * src/output.c (output_skeleton): tempdir is const.
12014 bytes_read is unused.
12015
12016 2002-03-04 Akim Demaille <akim@epita.fr>
12017
12018 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12019 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12020 Update.
12021 From Michael Hayes.
12022
12023 2002-03-04 Akim Demaille <akim@epita.fr>
12024
12025 * src/closure.c (closure): `r' is unused.
12026
12027 2002-03-04 Akim Demaille <akim@epita.fr>
12028
12029 * tests/sets.at (Broken Closure): Add the ending `;'.
12030 * src/reader.at (readgram): Complain if a rule is not ended with a
12031 semi-colon.
12032
12033 2002-03-04 Akim Demaille <akim@epita.fr>
12034
12035 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12036 (count_sr_conflicts): Use bitset_count.
12037 * src/reduce.c (inaccessable_symbols): Ditto.
12038 (bits_size): Remove.
12039 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12040
12041 2002-03-04 Akim Demaille <akim@epita.fr>
12042
12043 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12044 * src/reduce.c: Remove the `bitset_zero's following the
12045 `bitset_create's, as now it is performed by the latter.
12046
12047 2002-03-04 Akim Demaille <akim@epita.fr>
12048
12049 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12050 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12051 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12052 latest sources from Michael.
12053
12054 2002-03-04 Akim Demaille <akim@epita.fr>
12055
12056 * src/output.c (output): Don't free the grammar.
12057 * src/reader.c (grammar_free): New.
12058 * src/main.c (main): Call it and don't free symtab here.
12059
12060 2002-03-04 Akim Demaille <akim@epita.fr>
12061
12062 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12063 before returning.
12064 Reported by Benoit Perrot.
12065
12066 2002-03-04 Akim Demaille <akim@epita.fr>
12067
12068 Use bitset operations when possible, not loops over bits.
12069
12070 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12071 bitset_or.
12072 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12073 * src/reduce.c (useless_nonterminals): Formatting changes.
12074 * src/warshall.c (TC): Use bitset_or.
12075
12076 2002-03-04 Akim Demaille <akim@epita.fr>
12077
12078 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12079 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12080 Ditto.
12081
12082 2002-03-04 Akim Demaille <akim@epita.fr>
12083
12084 * src/lalr.c (F): Now a bitset*.
12085 Adjust all dependencies.
12086
12087 2002-03-04 Akim Demaille <akim@epita.fr>
12088
12089 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12090 Adjust all dependencies.
12091
12092 2002-03-04 Akim Demaille <akim@epita.fr>
12093
12094 * src/L0.c, src/LR0.h (nstates): Be size_t.
12095 Adjust comparisons (signed vs unsigned).
12096 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12097 bitset*.
12098 Adjust all dependencies.
12099
12100 2002-03-04 Akim Demaille <akim@epita.fr>
12101
12102 * src/closure.c (firsts): Now, also a bitset.
12103 Adjust all dependencies.
12104 (varsetsize): Remove, now unused.
12105 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12106
12107 2002-03-04 Akim Demaille <akim@epita.fr>
12108
12109 * src/print.c: Convert to use bitset.h, not hand coded iterations
12110 over ints.
12111
12112 2002-03-04 Akim Demaille <akim@epita.fr>
12113
12114 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12115
12116 2002-03-04 Akim Demaille <akim@epita.fr>
12117
12118 * src/closure.c (ruleset): Be a bitset.
12119 (rulesetsize): Remove.
12120
12121 2002-03-04 Akim Demaille <akim@epita.fr>
12122
12123 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12124 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12125 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12126 * src/closure.c (fderives): Be an array of bitsets.
12127
12128 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
12129
12130 * data/bison.c++: Merge the two generated headers. Insert a copyright
12131 notice in each output file.
12132
12133 2002-02-28 Akim Demaille <akim@epita.fr>
12134
12135 * data/bison.c++: Copy the prologue of bison.simple to fetch
12136 useful M4 definitions, such as b4_header_guard.
12137
12138 2002-02-25 Akim Demaille <akim@epita.fr>
12139
12140 * src/getargs.c (version): Give the name of the authors, and use a
12141 translator friendly scheme for the bgr
12142 copyright notice.
12143
12144 2002-02-25 Akim Demaille <akim@epita.fr>
12145
12146 * src/output.c (header_output): Remove, now handled completely via
12147 M4.
12148
12149 2002-02-25 Akim Demaille <akim@epita.fr>
12150
12151 * m4/m4.m4: New, from CVS Autoconf.
12152 * configure.in: Invoke it.
12153 * src/output.c (output_skeleton): Use its result instead of the
12154 hard coded name.
12155
12156 2002-02-25 Akim Demaille <akim@epita.fr>
12157
12158 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12159 Fileutils 4.1.5.
12160 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12161 * src/output.c (output_skeleton): Use mkstemp to create a real
12162 temporary file.
12163 Move the filling of `skeleton' and its muscle to...
12164 (prepare): here.
12165 (output): Move the definition of the prologue muscle to...
12166 (prepare): here.
12167 * src/system.h (DEFAULT_TMPDIR): New.
12168
12169 2002-02-14 Paul Eggert <eggert@twinsun.com>
12170
12171 Remove the support for C++ namespace cleanliness; it was
12172 causing more problems than it was curing, since it didn't work
12173 properly on some nonstandard C++ compilers. This can wait
12174 for a proper C++ parser.
12175
12176 * NEWS: Document this.
12177 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12178 of C++, as it's treated like C now.
12179 * src/bison.simple (YYSTD): Remove.
12180 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12181 Treat C++ just like Standard C instead of trying to support
12182 namespace cleanliness.
12183
12184 2002-02-14 Akim Demaille <akim@epita.fr>
12185
12186 * tests/regression.at (else): Adjust to Andreas' change.
12187
12188 2002-02-14 Akim Demaille <akim@epita.fr>
12189
12190 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12191
12192 2002-02-13 Andreas Schwab <schwab@suse.de>
12193
12194 * src/output.c (output_rule_data): Don't output NULL, it might
12195 not be defined yet.
12196
12197 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12198
12199 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12200 (Copyright notice): Update.
12201
12202 2002-02-11 Akim Demaille <akim@epita.fr>
12203
12204 * tests/regression.at (%nonassoc and eof): Don't include
12205 nonportable headers.
12206
12207 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12208
12209 * data/bison.c++: Correct error recovery. Make the user able to
12210 initialize the starting location.
12211
12212 2002-02-07 Akim Demaille <akim@epita.fr>
12213
12214 * tests/input.at: New.
12215
12216 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12217
12218 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12219 more consistent when naming methods and variables. Put preprocessor
12220 directives around tables only needed for debugging.
12221
12222 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12223
12224 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12225 C++ parsers.
12226 (yy::b4_name::parse): Use print_.
12227
12228 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12229
12230 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12231
12232 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12233
12234 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12235 C++ parsers.
12236 (yy::b4_name::parse): Build verbose error messages, and use error_.
12237
12238 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12239
12240 * data/bison.c++: Fix m4 quoting in comments.
12241
12242 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12243
12244 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12245 not expanded by m4.
12246
12247 2002-02-05 Akim Demaille <akim@epita.fr>
12248
12249 * data/bison.c++: Adjust to the M4 back end.
12250 More is certainly needed.
12251
12252 2002-02-05 Akim Demaille <akim@epita.fr>
12253
12254 Give a try to M4 as a back end.
12255
12256 * lib/readpipe.c: New, from wdiff.
12257 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12258 BISON_HAIRY.
12259 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12260 specific values. Now it is m4 that performs the lookup.
12261 * src/parse-skel.y: Remove.
12262 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12263 * src/output.c (actions_output, guards_output)
12264 (token_definitions_output): No longer keeps track of the output
12265 line number, hence remove the second argument.
12266 (guards_output): Check against the guard member of a rule, not the
12267 action member.
12268 Adjust callers.
12269 (output_skeleton): Don't look for the skeleton location, let m4 do
12270 that.
12271 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12272 file will be used.
12273 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12274 (prepare): Given that for the time being changesyntax is not
12275 usable in M4, rename the muscles using `-' to `_'.
12276 Define `defines_flag', `output_parser_name' and `output_header_name'.
12277 * src/output.h (actions_output, guards_output)
12278 (token_definitions_output): Adjust prototypes.
12279 * src/scan-skel.l: Instead of scanning the skeletons, it now
12280 processes the output of m4: `__oline__' and `#output'.
12281 * data/bison.simple: Adjust to be used by M4(sugar).
12282 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12283 to date.
12284 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12285 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12286 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12287 shamelessly stolen from CVS Autoconf.
12288
12289 2002-02-05 Akim Demaille <akim@epita.fr>
12290
12291 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12292 * configure.in: Check for the declarations of free and malloc.
12293 * src/muscle_tab.c: Adjust.
12294
12295 2002-02-05 Akim Demaille <akim@epita.fr>
12296
12297 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12298 which have no values.
12299
12300 2002-02-05 Akim Demaille <akim@epita.fr>
12301
12302 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12303 * data/: here.
12304
12305 2002-01-29 Paul Eggert <eggert@twinsun.com>
12306
12307 * src/bison.simple (YYSIZE_T): Do not define merely because
12308 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12309 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12310
12311 2002-01-27 Akim Demaille <akim@epita.fr>
12312
12313 Fix `%nonassoc and eof'.
12314
12315 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12316 which were not properly copied! Replace
12317 memcpy (res->errs, src->errs, src->nerrs);
12318 with
12319 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12320 !!!
12321 * tests/regression.at (%nonassoc and eof): Adjust to newest
12322 Autotest: `.' is not in the PATH.
12323
12324 2002-01-27 Akim Demaille <akim@epita.fr>
12325
12326 * tests/sets.at (AT_EXTRACT_SETS): New.
12327 (Nullable): Use it.
12328 (Firsts): New.
12329
12330 2002-01-26 Akim Demaille <akim@epita.fr>
12331
12332 * tests/actions.at, tests/calc.at, tests/headers.at,
12333 * tests/torture.at: Adjust to the newest Autotest which no longer
12334 forces `.' in the PATH.
12335
12336 2002-01-25 Akim Demaille <akim@epita.fr>
12337
12338 * tests/regression.at (%nonassoc and eof): New.
12339 Suggested by Robert Anisko.
12340
12341 2002-01-24 Akim Demaille <akim@epita.fr>
12342
12343 Bison dumps core when trying to complain about broken input files.
12344 Reported by Cris van Pelt.
12345
12346 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12347 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12348 into...
12349 (Invalid inputs): Strengthen: exercise parse_percent_token.
12350
12351 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12352
12353 * src/Makefile.am: Add bison.c++.
12354 * src/bison.c++: New skeleton.
12355
12356 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12357
12358 * po/it.po: New.
12359
12360 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12361
12362 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12363
12364 2002-01-20 Marc Autret <marc@gnu.org>
12365
12366 * src/files.c (compute_output_file_names): Fix
12367
12368 2002-01-20 Marc Autret <marc@gnu.org>
12369
12370 * tests/output.at: New test.
12371 * src/files.c (compute_base_names): Don't map extensions when
12372 the YACC flag is set, use defaults.
12373 Reported by Evgeny Stambulchik.
12374
12375 2002-01-20 Marc Autret <marc@gnu.org>
12376
12377 * src/system.h: Need to define __attribute__ away for non-GCC
12378 compilers as well (i.e., the vendor C compiler).
12379 Suggested by Albert Chin-A-Young.
12380
12381 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12382
12383 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12384 canonical definition.
12385 * src/system.h: Use the canonical definition for PARAMS (avoids
12386 a conflict with the macro from lib/hash.h).
12387
12388 2002-01-11 Akim Demaille <akim@epita.fr>
12389
12390 * configure.in: Use AC_FUNC_STRNLEN.
12391 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12392
12393 2002-01-09 Akim Demaille <akim@epita.fr>
12394
12395 * src/files.c, src/files.h (output_infix): New.
12396 (tab_extension): Remove.
12397 (compute_base_names): Compute the former, drop the latter.
12398 * src/output.c (prepare): Insert the muscles `output-infix', and
12399 `output-suffix'.
12400 * src/parse-skel.y (string, string.1): New.
12401 (section.header): Use it.
12402 (section.yacc): Remove.
12403 (prefix): Remove too.
12404 * src/scan-skel.l: Adjust.
12405 * src/bison.simple, src/bison.hairy: Adjust.
12406
12407 2002-01-09 Akim Demaille <akim@epita.fr>
12408
12409 * configure.in (WERROR_CFLAGS): Compute it.
12410 * src/Makefile.am (CFLAGS): Pass it.
12411 * tests/atlocal.in (CFLAGS): Idem.
12412 * src/files.c: Fix a few warnings.
12413 (get_extension_index): Remove, unused.
12414
12415 2002-01-08 Akim Demaille <akim@epita.fr>
12416
12417 * src/getargs.c (AS_FILE_NAME): New.
12418 (getargs): Use it to convert DOSish file names.
12419 * src/files.c (base_name): Rename as full_base_name to avoid
12420 clashes with `base_name ()'.
12421 (filename_split): New.
12422 (compute_base_names): N-th rewrite, using filename_split.
12423
12424 2002-01-08 Akim Demaille <akim@epita.fr>
12425
12426 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12427 New, stolen from the Fileutils 4.1.
12428 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12429 * configure.in: Check for the presence of memrchr, and of its
12430 prototype.
12431
12432 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12433
12434 * lib/hash.h (__P): Added definition for this macro.
12435 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12436 BUILT_SOURCES, to ensure they are generated first.
12437 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12438 %error-verbose to allow bootstrapping with bison 1.30x.
12439
12440 2002-01-06 Akim Demaille <akim@epita.fr>
12441
12442 * src/reader.c (parse_braces): Don't fetch the next char, the
12443 convention is to fetch on entry.
12444 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12445 'switch' without a following semicolon.
12446 * tests/regression.at (braces parsing): New.
12447
12448 2002-01-06 Akim Demaille <akim@epita.fr>
12449
12450 Bison is dead wrong in its RR conflict reports.
12451
12452 * tests/torture.at (GNU Cim Grammar): New.
12453 * src/conflicts.c (count_rr_conflicts): Fix.
12454
12455 2002-01-06 Akim Demaille <akim@epita.fr>
12456
12457 Creating package.m4 from configure.ac causes too many problems.
12458
12459 * tests/Makefile.am (package.m4): Create it by hand,
12460 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12461
12462 2002-01-06 Akim Demaille <akim@epita.fr>
12463
12464 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12465 skeleton.h.
12466
12467 2002-01-04 Paul Eggert <eggert@twinsun.com>
12468
12469 * doc/bison.texinfo (Debugging):
12470 Remove YYSTDERR; it's no longer defined or used.
12471 Also, s/cstdio.h/cstdio/.
12472
12473 2002-01-03 Akim Demaille <akim@epita.fr>
12474
12475 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12476
12477 2002-01-03 Akim Demaille <akim@epita.fr>
12478
12479 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12480 tracing code to --trace, wait for a better --trace option, with
12481 args.
12482
12483 2002-01-03 Akim Demaille <akim@epita.fr>
12484
12485 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12486 The ISO C++ standard is extremely clear about it: stderr is
12487 considered a macro, not a regular symbol (see table 94 `Header
12488 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12489 Therefore std:: does not apply to it. It still does with fprintf.
12490 Also, s/cstdio.h/cstdio/.
12491
12492 2002-01-03 Akim Demaille <akim@epita.fr>
12493
12494 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12495 for non system headers.
12496
12497 2002-01-02 Akim Demaille <akim@epita.fr>
12498
12499 Equip the skeleton chain with location tracking, runtime trace,
12500 pure parser and scanner.
12501
12502 * src/parse-skel.y: Request a pure parser, locations, and prefix
12503 renaming.
12504 (%union): Having several members with the same type does not help
12505 type mismatches, simplify.
12506 (YYPRINT, yyprint): New.
12507 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12508 (skel_error): this.
12509 Handle locations.
12510 * src/scan-skel.l: Adjust to these changes.
12511 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12512 (LOCATION_PRINT, skel_control_t): New.
12513
12514 2001-12-30 Akim Demaille <akim@epita.fr>
12515
12516 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12517 replace `gb' with BLANKS.
12518 * src/scan-skel.l: Adjust.
12519
12520 2001-12-30 Akim Demaille <akim@epita.fr>
12521
12522 * src/system.h: We don't need nor want bcopy.
12523 Throw away MS-DOS crap: we don't need getpid.
12524 * configure.in: We don't need strndup. It was even causing
12525 problems: because Flex includes the headers *before* us,
12526 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12527 not visible.
12528 * lib/xstrndup.c: New.
12529 * src/scan-skel.l: Use it.
12530 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12531 * src/parse-skel.y: Use %directives instead of #defines.
12532
12533 2001-12-30 Akim Demaille <akim@epita.fr>
12534
12535 * src/skeleton.h: New.
12536 * src/output.c (output_parser, output_master_parser): Remove, dead
12537 code.
12538 * src/output.h (get_lines_number, actions_output, guards_output)
12539 (token_definitions_output): Prototype them.
12540 * src/parse-skel.y: Add the license notice.
12541 Include output.h and skeleton.h.
12542 (process_skeleton): Returns void, and takes a single parameter.
12543 * src/scan-skel.l: Add the license notice.
12544 Include skeleton.h.
12545 Don't use %option yylineno: it seems that then Flex imagines
12546 REJECT has been used, and therefore it won't reallocate its
12547 buffers (which makes no other sense to me than a bug). It results
12548 in warnings for `unused: yy_flex_realloc'.
12549
12550 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12551
12552 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12553 (MUSCLE_INSERT_PREFIX): ...to there.
12554 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12555 (MUSCLE_INSERT_PREFIX): Move from here...
12556
12557 * src/bison.hairy: Add a section directive. Put braces around muscle
12558 names. This parser skeleton is still broken, but Bison should not
12559 choke on a bad muscle 'syntax'.
12560 * src/bison.simple: Add a section directive. Put braces around muscle
12561 names.
12562
12563 * src/files.h (strsuffix, stringappend): Add declarations.
12564 (tab_extension): Add declaration.
12565 (short_base_name): Add declaration.
12566
12567 * src/files.c (strsuffix, stringappend): No longer static. These
12568 functions are used in the skeleton parser.
12569 (tab_extension): New.
12570 (compute_base_names): Use the computations done in this function
12571 to guess if the generated parsers should have '.tab' in their
12572 names.
12573 (short_base_name): No longer static.
12574
12575 * src/output.c (output_skeleton): New.
12576 (output): Disable call to output_master_parser, and give a try to
12577 a new skeleton handling system.
12578 (guards_output, actions_output): No longer static.
12579 (token_definitions_output, get_lines_number): No longer static.
12580
12581 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12582
12583 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12584 parse-skel.y.
12585
12586 * src/parse-skel.y: New file.
12587 * src/scan-skel.l: New file.
12588
12589 2001-12-29 Akim Demaille <akim@epita.fr>
12590
12591 %name-prefix is broken.
12592
12593 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12594 Adjust all dependencies.
12595 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12596 %name-prefix.
12597
12598 Renaming yylval but not yylloc is not consistent. Now we do.
12599
12600 * src/bison.simple: Prefix yylloc if used.
12601 * doc/bison.texinfo (Decl Summary): Document that.
12602
12603 2001-12-29 Akim Demaille <akim@epita.fr>
12604
12605 * doc/bison.texinfo: Promote `%long-directive' over
12606 `%long_directive'.
12607 Remove all references to fixed-output-files, yacc is enough.
12608
12609 2001-12-29 Akim Demaille <akim@epita.fr>
12610
12611 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12612 user prologue. These are defaults.
12613 * tests/actions.at (Mid-rule actions): Make sure the user can
12614 define YYDEBUG and YYERROR_VERBOSE.
12615
12616 2001-12-29 Akim Demaille <akim@epita.fr>
12617
12618 * src/output.c (header_output): Don't forget to export YYLTYPE and
12619 yylloc.
12620 * tests/headers.at (export YYLTYPE): New, make sure it does.
12621 * tests/regression.at (%union and --defines, Invalid CPP headers):
12622 Move to...
12623 * tests/headers.at: here.
12624
12625 2001-12-29 Akim Demaille <akim@epita.fr>
12626
12627 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12628
12629 2001-12-29 Akim Demaille <akim@epita.fr>
12630
12631 * tests/actions.at (Mid-rule actions): Output on a single line
12632 instead of several.
12633
12634 2001-12-29 Akim Demaille <akim@epita.fr>
12635
12636 * doc/bison.texinfo: Formatting changes.
12637
12638 2001-12-29 Akim Demaille <akim@epita.fr>
12639
12640 Don't store the token defs in a muscle, just be ready to output it
12641 on command. Now possible via `symbols'. Fixes a memory leak.
12642
12643 * src/output.c (token_definitions_output): New.
12644 (output_parser, header_output): Use it.
12645 * src/reader.c (symbols_save): Remove.
12646
12647 2001-12-29 Akim Demaille <akim@epita.fr>
12648
12649 * src/bison.simple: Do not provide a default for YYSTYPE and
12650 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12651 default.
12652
12653 2001-12-29 Akim Demaille <akim@epita.fr>
12654
12655 Mid-rule actions are simply... ignored!
12656
12657 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12658 the empty-rule associated to the dummy symbol, not to the host
12659 rule.
12660 * tests/actions.at (Mid-rule actions): New.
12661
12662 2001-12-29 Akim Demaille <akim@epita.fr>
12663
12664 Memory leak.
12665
12666 * src/reader.c (reader): Free grammar.
12667
12668 2001-12-29 Akim Demaille <akim@epita.fr>
12669
12670 Memory leak.
12671
12672 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12673 since it allocates it for each state, although only one is needed.
12674 (allocate_storage): Do it here.
12675
12676 2001-12-29 Akim Demaille <akim@epita.fr>
12677
12678 * src/options.h, src/options.c (create_long_option_table): Rename
12679 as...
12680 (long_option_table_new): this, with a clearer prototype.
12681 (percent_table): Remove, unused,
12682 * src/getargs.c (getargs): Adjust.
12683
12684 2001-12-29 Akim Demaille <akim@epita.fr>
12685
12686 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12687 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12688 as states.
12689
12690 2001-12-29 Akim Demaille <akim@epita.fr>
12691
12692 * src/lalr.c (build_relations): Rename `states' as `states1'.
12693 Sorry, I don't understand exactly what it is, no better name...
12694
12695 2001-12-29 Akim Demaille <akim@epita.fr>
12696
12697 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12698 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12699 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12700 as rules.
12701
12702 2001-12-29 Akim Demaille <akim@epita.fr>
12703
12704 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12705 ago.
12706
12707 2001-12-29 Akim Demaille <akim@epita.fr>
12708
12709 * src/reader.c, src/reader.h (user_toknums): Remove.
12710 Adjust all users to use symbols[i]->user_token_number.
12711
12712 2001-12-29 Akim Demaille <akim@epita.fr>
12713
12714 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12715 Adjust all users to use symbols[i]->prec or ->assoc.
12716
12717 2001-12-29 Akim Demaille <akim@epita.fr>
12718
12719 * src/reader.c, src/reader.h (tags): Remove.
12720 Adjust all users to use symbols[i]->tag.
12721
12722 2001-12-29 Akim Demaille <akim@epita.fr>
12723
12724 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12725 and rule_table.
12726 * src/reader.c (packsymbols): Fill this table.
12727 Drop sprec.
12728 * src/conflicts.c (resolve_sr_conflict): Adjust.
12729 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12730 single table.
12731 Use symbols[i]->tag instead of tags[i].
12732
12733 2001-12-29 Akim Demaille <akim@epita.fr>
12734
12735 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12736 In addition, put a comment in there, to replace...
12737 * tests/regression.at (%union and C comments): Remove.
12738
12739 2001-12-29 Akim Demaille <akim@epita.fr>
12740
12741 * tests/regression.at (Web2c Actions): Blindly move the actual
12742 output as expected output. The contents *seem* right to me, but I
12743 can't pretend reading perfectly parser tables... Nonetheless, all
12744 the other tests pass correctly, the table look OK, even though the
12745 presence of `$axiom' is to be noted: AFAICS it is useless (but
12746 harmless).
12747
12748 2001-12-29 Akim Demaille <akim@epita.fr>
12749
12750 * src/reader.c (readgram): Don't add the rule 0 if there were no
12751 rules read. In other words, add it _after_ having performed
12752 grammar sanity checks.
12753 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12754
12755 2001-12-29 Akim Demaille <akim@epita.fr>
12756
12757 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12758 visible, and some states have now a different number.
12759
12760 2001-12-29 Akim Demaille <akim@epita.fr>
12761
12762 * src/reader.c (readgram): Bind the initial rule's lineno to that
12763 of the first rule.
12764 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12765 (Solved SR Conflicts): Adjust rule 0's line number.
12766
12767 2001-12-29 Akim Demaille <akim@epita.fr>
12768
12769 Fix the `GAWK Grammar' failure.
12770
12771 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12772 the reductions of the first state which was mistakenly confused
12773 with the final state because precisely final_state was initialized
12774 to 0.
12775 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12776 now noticed by Bison.
12777 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12778 have a reduction on $default.
12779
12780 2001-12-29 Akim Demaille <akim@epita.fr>
12781
12782 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12783 rule line numbers.
12784 * src/closure.c (print_closure): Likewise.
12785 * src/derives.c (print_derives): Likewise.
12786 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12787 now.
12788
12789 2001-12-29 Akim Demaille <akim@epita.fr>
12790
12791 * src/lalr.c (lookaheads_print): New.
12792 (lalr): Call it when --trace-flag.
12793 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12794 are dumped.
12795
12796 2001-12-29 Akim Demaille <akim@epita.fr>
12797
12798 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12799 when walking through ritem, even via rule->rhs.
12800 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12801 (useful_production, useless_nonterminals): Likewise.
12802 (reduce_grammar_tables): Likewise, plus update nritems.
12803 * src/nullable.c (set_nullable): Likewise.
12804 * src/lalr.c (build_relations): Likewise.
12805 * tests/sets.at (Nullable): Adjust.
12806 Fortunately, now, the $axiom is no longer nullable.
12807
12808 2001-12-29 Akim Demaille <akim@epita.fr>
12809
12810 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12811 the 0-sentinel.
12812 * src/gram.c (ritem_longest_rhs): Likewise.
12813 * src/reduce.c (nonterminals_reduce): Likewise.
12814 * src/print_graph.c (print_graph): Likewise.
12815 * src/output.c (output_rule_data): Likewise.
12816 * src/nullable.c (set_nullable): Likewise.
12817
12818 2001-12-29 Akim Demaille <akim@epita.fr>
12819
12820 * src/output.c: Comment changes.
12821
12822 2001-12-27 Paul Eggert <eggert@twinsun.com>
12823
12824 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12825 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12826 Sparc, as they were causing more porting problems than the
12827 (minor) performance improvement was worth.
12828
12829 Also, catch up with 1.31's YYSTD.
12830
12831 2001-12-27 Akim Demaille <akim@epita.fr>
12832
12833 * src/output.c (output_gram): Rely on nritems, not the
12834 0-sentinel. See below.
12835 Use -1 as separator, not 0.
12836 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12837 Rely on -1 as separator in yyrhs, instead of 0.
12838 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12839 twice `Now at end of input', therefore there are two lines less to
12840 expect.
12841
12842 2001-12-27 Akim Demaille <akim@epita.fr>
12843
12844 * tests/regression.at (Unresolved SR Conflicts):
12845 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12846 below.
12847
12848 2001-12-27 Akim Demaille <akim@epita.fr>
12849
12850 * src/LR0.c (new_state): Recognize the final state by the fact it
12851 is reached by eoftoken.
12852 (insert_start_shifting_state, insert_eof_shifting_state)
12853 (insert_accepting_state, augment_automaton): Remove, since now
12854 these states are automatically computed from the initial state.
12855 (generate_states): Adjust.
12856 * src/print.c: When reporting a rule number to the user, substract
12857 1, so that the axiom rule is rule 0, and the first user rule is 1.
12858 * src/reduce.c: Likewise.
12859 * src/print_graph.c (print_core): For the time being, just as for
12860 the report, depend upon --trace-flags to dump the full set of
12861 items.
12862 * src/reader.c (readgram): Once the grammar read, insert the rule
12863 0: `$axiom: START-SYMBOL $'.
12864 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12865 number of the states has changed (the final state is no longer
12866 necessarily the last), catch up.
12867
12868 2001-12-27 Akim Demaille <akim@epita.fr>
12869
12870 Try to make the use of the eoftoken valid. Given that its value
12871 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12872 is used instead of > 0 where appropriate, (ii), depend upon nritems
12873 instead of the 0-sentinel.
12874
12875 * src/gram.h, src/gram.c (nritems): New.
12876 Expected to be duplication of nitems, but for the time being...
12877 * src/reader.c (packgram): Assert nritems and nitems are equal.
12878 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12879 * src/closure.c (print_closure, print_fderives): Likewise.
12880 * src/gram.c (ritem_print): Likewise.
12881 * src/print.c (print_core, print_grammar): Likewise.
12882 * src/print_graph.c: Likewise.
12883
12884 2001-12-27 Akim Demaille <akim@epita.fr>
12885
12886 * src/main.c (main): If there are complains after grammar
12887 reductions, then output the report anyway if requested, then die.
12888 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12889 * src/reader.c (eoftoken): New.
12890 (parse_token_decl): If the token being defined has value `0', it
12891 is the eoftoken.
12892 (packsymbols): No longer hack `tags' to insert `$' by hand.
12893 Be sure to preserve the value of the eoftoken.
12894 (reader): Make sure eoftoken is defined.
12895 Initialize nsyms to 0: now eoftoken is created just like the others.
12896 * src/print.c (print_grammar): Don't special case the eof token.
12897 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12898 lie anyway, albeit pleasant.
12899 * tests/calc.at: Exercise error messages with eoftoken.
12900 Change the grammar so that empty input is invalid.
12901 Adjust expectations.
12902 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12903
12904 2001-12-27 Akim Demaille <akim@epita.fr>
12905
12906 * configure.in: Check the protos of strchr ans strspn.
12907 Replace strchr if needed.
12908 * src/system.h: Provide the protos of strchr, strspn and memchr if
12909 missing.
12910 * lib/strchr.c: New.
12911 * src/reader.c (symbols_save): Use strchr.
12912
12913 2001-12-27 Akim Demaille <akim@epita.fr>
12914
12915 * src/print.c, src/print_graph.c (escape): New.
12916 Use it to quote the TAGS outputs.
12917 * src/print_graph.c (print_state): Now errors are in red, and
12918 reductions in green.
12919 Prefer high to wide: output the state number on a line of its own.
12920
12921 2001-12-27 Akim Demaille <akim@epita.fr>
12922
12923 * src/state.h, src/state.c (reductions_new): New.
12924 * src/LR0.c (set_state_table): Let all the states have a
12925 `reductions', even if reduced to 0.
12926 (save_reductions): Adjust.
12927 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12928 * src/print.c (print_reductions, print_actions): Adjust.
12929 * src/output.c (action_row): Adjust.
12930
12931 2001-12-27 Akim Demaille <akim@epita.fr>
12932
12933 * src/state.h, src/state.c (errs_new, errs_dup): New.
12934 * src/LR0.c (set_state_table): Let all the states have an errs,
12935 even if reduced to 0.
12936 * src/print.c (print_errs, print_reductions): Adjust.
12937 * src/output.c (output_actions, action_row): Adjust.
12938 * src/conflicts.c (resolve_sr_conflict): Adjust.
12939
12940 2001-12-27 Akim Demaille <akim@epita.fr>
12941
12942 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12943
12944 2001-12-27 Akim Demaille <akim@epita.fr>
12945
12946 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12947 * src/print.c: here.
12948 (lookaheadset, shiftset): New, used as additional storage by
12949 print_reductions.
12950 (print_results): Adjust.
12951 (print_shifts, print_gotos, print_errs): New, extracted from...
12952 (print_actions): here.
12953 * src/print_graph.c (print_actions): Remove dead code.
12954
12955 2001-12-27 Akim Demaille <akim@epita.fr>
12956
12957 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12958 `$n' and `@n'.
12959
12960 2001-12-27 Akim Demaille <akim@epita.fr>
12961
12962 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12963 (build_relations): Adjust.
12964
12965 2001-12-27 Akim Demaille <akim@epita.fr>
12966
12967 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12968 duplication.
12969
12970 2001-12-27 Akim Demaille <akim@epita.fr>
12971
12972 * src/reader.c (packgram): Catch nitems overflows.
12973
12974 2001-12-27 Akim Demaille <akim@epita.fr>
12975
12976 * src/files.c, src/files.h (guard_obstack): Remove.
12977 * src/output.c (output): Adjust.
12978 * src/reader.c (parse_braces): New, factoring...
12979 (copy_action, copy_guard): these two which are renamed as...
12980 (parse_action, parse_guard): these.
12981 As a voluntary consequence, using braces around guards is now
12982 mandatory.
12983
12984 2001-12-27 Akim Demaille <akim@epita.fr>
12985
12986 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12987 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12988 members.
12989 (symbol_list_new): Adjust.
12990 (copy_action): action_line is the first line, not the last.
12991 (copy_guard): Just as for actions, store the `action' only, not
12992 the switch/case/break flesh.
12993 Don't parse the user action that might follow the guard, let...
12994 (readgram): do it, i.e., now, there can be an action after a
12995 guard.
12996 In other words the guard is just explicitly optional.
12997 (packgram): Adjust.
12998 * src/output.c (guards_output): New.
12999 (output_parser): Call it when needed.
13000 (output): Also free the guard and attrs obstacks.
13001 * src/files.c, src/files.h (obstack_save): Remove.
13002 (output_files): Remove.
13003 As a result, if one needs the former `.act' file, using an
13004 appropriate skeleton which requires actions and guards is now
13005 required.
13006 * src/main.c (main): Adjust.
13007 * tests/semantic.at: New.
13008 * tests/regression.at: Use `input.y' as input file name.
13009 Avoid 8+3 problems by requiring input.c when the test needs the
13010 parser.
13011
13012 2001-12-27 Akim Demaille <akim@epita.fr>
13013
13014 * src/reader.c (symbol_list_new): Be sure to initialize all the
13015 fields.
13016
13017 2001-12-27 Akim Demaille <akim@epita.fr>
13018
13019 All the hacks using a final pseudo state are now useless.
13020
13021 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13022 * src/lalr.c (nLA): New.
13023 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13024 instead of lookaheadsp from the pseudo state (nstate + 1).
13025
13026 2001-12-27 Akim Demaille <akim@epita.fr>
13027
13028 * src/output.c (action_row, token_actions): Use a state_t instead
13029 of a integer, and nlookaheads instead of the following state's
13030 lookaheadsp.
13031
13032 2001-12-27 Akim Demaille <akim@epita.fr>
13033
13034 * src/conflicts.c (log_resolution, flush_shift)
13035 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13036 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13037 (conflicts_print, print_reductions): Use a state_t instead of an
13038 integer when referring to a state.
13039 As much as possible, depend upon nlookaheads, instead of the
13040 `lookaheadsp' member of the following state (since lookaheads of
13041 successive states are successive, the difference between state n + 1
13042 and n served as the number of lookaheads for state n).
13043 * src/lalr.c (add_lookback_edge): Likewise.
13044 * src/print.c (print_core, print_actions, print_state)
13045 (print_results): Likewise.
13046 * src/print_graph.c (print_core, print_actions, print_state)
13047 (print_graph): Likewise.
13048 * src/conflicts.h: Adjust.
13049
13050 2001-12-27 Akim Demaille <akim@epita.fr>
13051
13052 * src/bison.hairy: Formatting/comment changes.
13053 ANSIfy.
13054 Remove `register' indications.
13055 Add plenty of `static'.
13056
13057 2001-12-27 Akim Demaille <akim@epita.fr>
13058
13059 * src/output.c (prepare): Drop the muscle `ntbase' which
13060 duplicates ntokens.
13061 * src/bison.simple: Formatting/comment changes.
13062 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13063 is an undocumented synonym.
13064
13065 2001-12-22 Akim Demaille <akim@epita.fr>
13066
13067 * src/output.c (output_table_data): Change the prototype to use
13068 `int' for array ranges: some invocations do pass an int, not a
13069 short.
13070 Reported by Wayne Green.
13071
13072 2001-12-22 Akim Demaille <akim@epita.fr>
13073
13074 Some actions of web2c.y are improperly triggered.
13075 Reported by Mike Castle.
13076
13077 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13078 * tests/regression.at (Web2c): Rename as...
13079 (Web2c Report): this.
13080 (Web2c Actions): New.
13081
13082 2001-12-22 Akim Demaille <akim@epita.fr>
13083
13084 Reductions in web2c.y are improperly reported.
13085 Reported by Mike Castle.
13086
13087 * src/conflicts.c (print_reductions): Fix.
13088 * tests/regression.at (Web2c): New.
13089
13090 2001-12-18 Akim Demaille <akim@epita.fr>
13091
13092 Some host fail on `assert (!"foo")', which expands to
13093 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13094 Reported by Nelson Beebee.
13095
13096 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13097 `#define it_succeeded 0' and `assert (it_succeeded)'.
13098
13099 2001-12-17 Marc Autret <autret_m@epita.fr>
13100
13101 * src/bison.simple: Don't hard code the skeleton line and filename.
13102 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13103 New line counter 'skeleton_line' (skeleton-line muscle).
13104
13105 2001-12-17 Paul Eggert <eggert@twinsun.com>
13106
13107 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13108 YYDEBUG must be defined to a nonzero value.
13109
13110 * src/bison.simple (yytname): Do not assume that the user defines
13111 YYDEBUG to a properly parenthesized expression.
13112
13113 2001-12-17 Akim Demaille <akim@epita.fr>
13114
13115 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13116 nlookaheads is a new member.
13117 Adjust all users.
13118 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13119 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13120 state.
13121
13122 2001-12-17 Akim Demaille <akim@epita.fr>
13123
13124 * src/files.h, src/files.c (open_files, close_files): Remove.
13125 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13126 let...
13127 * src/reader.c (reader): Do it.
13128
13129 2001-12-17 Akim Demaille <akim@epita.fr>
13130
13131 * src/conflicts.c (print_reductions): Formatting changes.
13132
13133 2001-12-17 Akim Demaille <akim@epita.fr>
13134
13135 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13136 (flush_reduce): New.
13137 (resolve_sr_conflict): Adjust.
13138
13139 2001-12-17 Akim Demaille <akim@epita.fr>
13140
13141 * src/output.c (output_obstack): Be static and rename as...
13142 (format_obstack): this, to avoid any confusion with files.c's
13143 output_obstack.
13144 * src/reader.h (muscle_obstack): Move to...
13145 * src/output.h: here, since it's defined in output.c.
13146
13147 2001-12-17 Akim Demaille <akim@epita.fr>
13148
13149 * src/output.c (action_row, save_column, default_goto)
13150 (sort_actions, matching_state, pack_vector): Better variable
13151 locality.
13152
13153 2001-12-17 Akim Demaille <akim@epita.fr>
13154
13155 * src/output.c: Various formatting changes.
13156
13157 2001-12-17 Akim Demaille <akim@epita.fr>
13158
13159 * src/files.c (output_files): Free the output_obstack.
13160 * src/main.c (main): Call print and print_graph conditionally.
13161 * src/print.c (print): Work unconditionally.
13162 * src/print_graph.c (print_graph): Work unconditionally.
13163 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13164
13165 2001-12-16 Marc Autret <autret_m@epita.fr>
13166
13167 * src/output.c (actions_output): Fix. When we use %no-lines,
13168 there is one less line per action.
13169
13170 2001-12-16 Marc Autret <autret_m@epita.fr>
13171
13172 * src/bison.simple: Remove a useless #line directive.
13173 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13174 * src/output.c (get_lines_number): New.
13175 (output_parser): Adjust, now takes care about the lines of a
13176 output muscles.
13177 Fix line numbering.
13178 (actions_output): Computes the number of lines taken by actions.
13179 (output_master_parser): Insert new skeleton which is the name of
13180 the output parser file name.
13181
13182 2001-12-15 Marc Autret <autret_m@epita.fr>
13183
13184 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13185
13186 2001-12-15 Marc Autret <autret_m@epita.fr>
13187
13188 * src/output.c (output_gram): Keep track of the hairy one.
13189
13190 2001-12-15 Akim Demaille <akim@epita.fr>
13191
13192 Make `make distcheck' work.
13193
13194 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13195 system.h which uses libgettext.h.
13196
13197 2001-12-15 Akim Demaille <akim@epita.fr>
13198
13199 * src/nullable.c (set_nullable): Useless rules must be skipped,
13200 otherwise, since we range over their symbols, we might look at a
13201 nonterminal which no longer ``exists'', i.e., it is not counted in
13202 `nvars', hence we overflow our arrays.
13203
13204 2001-12-15 Akim Demaille <akim@epita.fr>
13205
13206 The header can also be produced directly, without any obstack!
13207 Yahoo!
13208
13209 * src/files.c, src/files.h (defines_obstack): Remove.
13210 (compute_header_macro): Global.
13211 (defines_obstack_save): Remove.
13212 * src/reader.c (parse_union_decl): No longer output to
13213 defines_obstack: its content can be found in the `stype' muscle
13214 anyway.
13215 (output_token_translations): Merge into...
13216 (symbols_output): this.
13217 Rename as...
13218 (symbols_save): this.
13219 (reader): Adjust.
13220 * src/output.c (header_output): New.
13221 (output): Call it.
13222
13223 2001-12-15 Akim Demaille <akim@epita.fr>
13224
13225 * src/reader.c (parse_union_decl): Instead of handling two obstack
13226 simultaneously, use one to define the `stype' muscle, and use the
13227 value of the latter to fill defines_obstack.
13228 (copy_comment): Remove.
13229 (copy_comment2): Work for a single obstack.
13230 Rename as...
13231 (copy_comment): this.
13232
13233 2001-12-15 Akim Demaille <akim@epita.fr>
13234
13235 * src/lex.c, src/lex.h (xgetc): No longer static.
13236 * src/reader.c (parse_union_decl): Revamp.
13237
13238 2001-12-15 Akim Demaille <akim@epita.fr>
13239
13240 Still making progress in separating Bison into (i) input, (ii)
13241 process, (iii) output: now we can directly output the parser file
13242 without using table_obstack at all.
13243
13244 * src/files.c, src/files.h (table_obstack): Bye bye.
13245 (parser_file_name): New.
13246 * src/files.c (compute_output_file_names): Compute it.
13247 * src/output.c (actions_output, output_parser)
13248 (output_master_parser): To a file instead of an obstack.
13249
13250 2001-12-15 Akim Demaille <akim@epita.fr>
13251
13252 Attach actions to rules, instead of pre-outputting them to
13253 actions_obstack.
13254
13255 * src/gram.h (rule_t): action and action_line are new members.
13256 * src/reader.c (symbol_list): Likewise.
13257 (copy_action): Save the actions within the rule.
13258 (packgram): Save them in rule_table.
13259 * src/output.c (actions_output): New.
13260 (output_parser): Use it on `%%actions'.
13261 (output_rule_data): Don't free rule_table.
13262 (output): Do it.
13263 (prepare): Don't save the `action' muscle.
13264 * src/bison.simple: s/%%action/%%actions/.
13265
13266 2001-12-15 Akim Demaille <akim@epita.fr>
13267
13268 * src/reader.c (copy_action): When --yacc, don't append a `;'
13269 to the user action: let it fail if lacking.
13270 Suggested by Arnold Robbins and Tom Tromey.
13271
13272 2001-12-14 Akim Demaille <akim@epita.fr>
13273
13274 * src/lex.c (literalchar): Simply return the char you decoded, non
13275 longer mess around with obstacks and int pointers.
13276 Adjust all callers.
13277
13278 2001-12-14 Akim Demaille <akim@epita.fr>
13279
13280 * src/lex.c (literalchar): Don't escape the special characters,
13281 just decode them, and keep them as char (before, eol was output as
13282 the 2 char string `\n' etc.).
13283 * src/output.c (output_rule_data): Use quotearg to output the
13284 token strings.
13285
13286 2001-12-13 Paul Eggert <eggert@twinsun.com>
13287
13288 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13289 Do not infringe on the global user namespace when using C++.
13290 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13291 All uses of `fprintf' and `stderr' changed.
13292
13293 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13294
13295 2001-12-13 Akim Demaille <akim@epita.fr>
13296
13297 The computation of nullable is broken: it doesn't handle empty
13298 RHS's properly.
13299
13300 * tests/torture.at (GNU AWK Grammar): New.
13301 * tests/sets.at (Nullable): New.
13302 * src/nullable.c (set_nullable): Instead of blindly looping over
13303 `ritems', loop over the rules, and then over their rhs's.
13304
13305 Work around Autotest bugs.
13306
13307 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13308 frame, because Autotest understand lines starting with a `+' as
13309 traces from the shell. Then, they are not processed properly.
13310 Admittedly an Autotest bug, but we don't have time to wait for
13311 Autotest to catch up.
13312 * tests/regression.at (Broken Closure): Adjust to the new table
13313 frames.
13314 Move to...
13315 * tests/sets.at: here.
13316
13317 2001-12-13 Akim Demaille <akim@epita.fr>
13318
13319 * src/closure.c (closure): Use nrules instead of playing tricks
13320 with BITS_PER_WORD.
13321
13322 2001-12-13 Akim Demaille <akim@epita.fr>
13323
13324 * src/print.c (print_actions): Output the handling of `$' as the
13325 traces do: shifting the token EOF. Before EOF was treated as a
13326 nonterminal.
13327 * tests/regression.at: Adjust some tests.
13328 * src/print_graph.c (print_core): Complete the set of items via
13329 closure. The next-to-final and final states are still unsatisfying,
13330 but that's to be addressed elsewhere.
13331 No longer output the rule numbers, but do output the state number.
13332 A single loop for the shifts + gotos is enough, but picked a
13333 distinct color for each.
13334 (print_graph): Initialize and finalize closure.
13335
13336 2001-12-13 Akim Demaille <akim@epita.fr>
13337
13338 * src/reader.c (readgram): Remove dead code, an strip useless
13339 braces.
13340 (get_type): Remove, unused.
13341
13342 2001-12-12 Akim Demaille <akim@epita.fr>
13343
13344 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13345 on that of lib/error.c.
13346
13347 2001-12-12 Akim Demaille <akim@epita.fr>
13348
13349 Some hosts don't like `/' in includes.
13350
13351 * src/system.h: Include libgettext.h without qualifying the path.
13352 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13353 $(top_srcdir).
13354
13355 2001-12-11 Marc Autret <autret_m@epita.fr>
13356
13357 * src/output.c (output_parser): Remove useless muscle.
13358
13359 2001-12-11 Marc Autret <autret_m@epita.fr>
13360
13361 * src/bison.simple: Remove #line just before %%epilogue. It
13362 is now handled in ...
13363 * src/reader.c (read_additionnal_code): Add the output of a
13364 #line for the epilogue.
13365
13366 2001-12-10 Marc Autret <autret_m@epita.fr>
13367
13368 * src/reader.c (copy_definition): Re-use CPP-outed code which
13369 replace precedent remove.
13370 * src/bison.simple: Remove #line before %%prologue because
13371 %%input-line is wrong at this time.
13372
13373 2001-12-10 Marc Autret <autret_m@epita.fr>
13374
13375 * src/reader.c (symbols_output): Clean up.
13376 * src/output.c (output_gram, output): Clean up.
13377
13378 2001-12-10 Akim Demaille <akim@epita.fr>
13379
13380 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13381 * src/LR0.c (set_state_table): here.
13382 * src/lalr.c (lalr): Call it.
13383
13384 2001-12-10 Akim Demaille <akim@epita.fr>
13385
13386 * src/state.h (shifts): Remove the `number' member: shifts are
13387 attached to state, hence no longer need to be labelled with a
13388 state number.
13389
13390 2001-12-10 Akim Demaille <akim@epita.fr>
13391
13392 Now that states have a complete set of members, the linked list of
13393 shifts is useless: just fill directly the state's shifts member.
13394
13395 * src/state.h (shifts): Remove the `next' member.
13396 * src/LR0.c (first_state, last_state): Remove.
13397 Adjust the callers.
13398 (augment_automaton): Don't look for the shifts that must be added
13399 a shift on EOF: it is those of the state we looked for! But now,
13400 since shifts are attached, it is no longer needed to looking
13401 merely by its id: its number.
13402
13403 2001-12-10 Akim Demaille <akim@epita.fr>
13404
13405 * src/LR0.c (augment_automaton): Better variable locality.
13406 Remove an impossible branch: if there is a state corresponding to
13407 the start symbol being shifted, then there is shift for the start
13408 symbol from the initial state.
13409
13410 2001-12-10 Akim Demaille <akim@epita.fr>
13411
13412 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13413 only when appropriate: when insert_start_shifting_state' is not
13414 invoked.
13415 * tests/regression.at (Rule Line Numbers): Adjust.
13416
13417 2001-12-10 Akim Demaille <akim@epita.fr>
13418
13419 * src/LR0.c (augment_automaton): Now that all states have shifts,
13420 merge the two cases addition shifts to the initial state.
13421
13422 2001-12-10 Akim Demaille <akim@epita.fr>
13423
13424 * src/lalr.c (set_state_table): Move to...
13425 * src/LR0.c: here.
13426 * src/lalr.c (lalr): Don't call it...
13427 * src/LR0.c (generate_states): do it.
13428 * src/LR0.h (first_state): Remove, only the table is used.
13429
13430 2001-12-10 Akim Demaille <akim@epita.fr>
13431
13432 * src/LR0.h (first_shift, first_reduction): Remove.
13433 * src/lalr.c: Don't use first_shift: find shifts through the
13434 states.
13435
13436 2001-12-10 Akim Demaille <akim@epita.fr>
13437
13438 * src/LR0.c: Attach shifts to states as soon as they are
13439 computed.
13440 * src/lalr.c (set_state_table): Instead of assigning shifts to
13441 state, just assert that the mapping was properly done.
13442
13443 2001-12-10 Akim Demaille <akim@epita.fr>
13444
13445 * src/LR0.c (insert_start_shift): Rename as...
13446 (insert_start_shifting_state): this.
13447 (insert_eof_shifting_state, insert_accepting_state): New.
13448 (augment_automaton): Adjust.
13449 Better locality of the variables.
13450 When looking if the start_symbol is shifted from the initial
13451 state, using `while (... symbol != start_symbol ...)' sounds
13452 better than `while (... symbol < start_symbol ...)': If fail
13453 to see how the order between symbols could be relevant!
13454
13455 2001-12-10 Akim Demaille <akim@epita.fr>
13456
13457 * src/getargs.h: Don't declare `spec_name_prefix' and
13458 `spec_file_prefix', declared by src/files.h.
13459 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13460 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13461 * src/output.c (prepare): Adjust.
13462 * src/reader.c (symbols_output): Likewise.
13463 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13464
13465 2001-12-10 Akim Demaille <akim@epita.fr>
13466
13467 * src/muscle_tab.c (muscle_init): NULL is a better default than
13468 `"0"'.
13469
13470 2001-12-10 Akim Demaille <akim@epita.fr>
13471
13472 * src/reader.c (reader): Calling symbols_output once is enough.
13473
13474 2001-12-10 Akim Demaille <akim@epita.fr>
13475
13476 Now that states have a complete set of members, the linked list of
13477 reductions is useless: just fill directly the state's reductions
13478 member.
13479
13480 * src/state.h (struct reductions): Remove member `number' and
13481 `next'.
13482 * src/LR0.c (first_reduction, last_reduction): Remove.
13483 (save_reductions): Don't link the new reductions, store them in
13484 this_state.
13485 * src/lalr.c (set_state_table): No need to attach reductions to
13486 states, it's already done.
13487 * src/output.c (output_actions): No longer free the shifts, then
13488 the reductions, then the states: free all the states and their
13489 members.
13490
13491 2001-12-10 Akim Demaille <akim@epita.fr>
13492
13493 * src/options.c (OPTN, DRTV, BOTH): New.
13494 (option_table): Use them.
13495
13496 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13497 the job of system.h.
13498 * src/options.c: Don't include stdio.h and xalloc.h for the same
13499 reasons.
13500
13501 2001-12-10 Akim Demaille <akim@epita.fr>
13502
13503 * src/output.c (output, prepare): Make sure the values of the
13504 muscles `action' and `prologue' are 0-terminated.
13505
13506 2001-12-10 Akim Demaille <akim@epita.fr>
13507
13508 Clean up GCC warnings.
13509
13510 * src/reader.c (copy_action): `buf' is not used.
13511 (parse_skel_decl): Be static.
13512 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13513 * src/options.h (create_long_option_table): Have a real prototype.
13514 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13515 (hash_delete_at): Return const void *.
13516 Adjust casts to preserve the const.
13517
13518 2001-12-10 Akim Demaille <akim@epita.fr>
13519
13520 * configure.in: Require 2.52g.
13521 M4 is not needed, but AUTOM4TE is.
13522 * m4/m4.m4: Remove.
13523 * tests/Makefile.am: Adjust.
13524
13525 2001-12-10 Akim Demaille <akim@epita.fr>
13526
13527 One structure for states is enough, even though theoretically
13528 there are LR(0) states and LALR(1) states.
13529
13530 * src/lalr.h (state_t): Remove.
13531 (state_table): Be state_t **, not state_t *.
13532 * src/state.h (core, CORE_ALLOC): Rename as...
13533 (state_t, STATE_ALLOC): this.
13534 Add the LALR(1) members: shifts, reductions, errs.
13535 * src/LR0.c (state_table): Rename as...
13536 (state_hash): this, to avoid name clashes with the global
13537 `state_table'.
13538 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13539 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13540
13541 2001-12-10 Akim Demaille <akim@epita.fr>
13542
13543 Bison dumps core on bash.y.
13544 Reported by Pascal Bart.
13545
13546 * src/warshall.c (bitmatrix_print): New.
13547 (TC): Use it.
13548 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13549 j must be the outer loop.
13550 * tests/regression.at (Broken Closure): New.
13551
13552 2001-12-05 Akim Demaille <akim@epita.fr>
13553
13554 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13555 its argument.
13556 Reported by Peter Hamorsky.
13557
13558 2001-12-05 Akim Demaille <akim@epita.fr>
13559
13560 * src/conflicts.c (err_table): Remove.
13561 (resolve_sr_conflict): Adjust.
13562 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13563 Rename as...
13564 (state_t.reductions, state_t.shifts): this.
13565
13566 2001-12-05 Akim Demaille <akim@epita.fr>
13567
13568 * src/reduce.c (reduce_grammar_tables): No longer disable the
13569 removal of useless rules via CPP but via `if (0)', so that the
13570 compiler still check the code is valid.
13571 For instance, it should have noticed `rline' no longer exists: use
13572 the `line' member of rule_t.
13573 * src/gram.c (dummy, rline): Remove, unused.
13574
13575 2001-12-05 Akim Demaille <akim@epita.fr>
13576
13577 * src/output.c (pack_vector): Use assert, not berror.
13578 * src/main.c (berror): Remove, unused.
13579
13580 2001-12-05 Akim Demaille <akim@epita.fr>
13581
13582 New experimental feature: if --verbose --trace output all the
13583 items of a state, not only its kernel.
13584
13585 * src/print.c (print_core): If `trace_flag', then invoke closure
13586 before outputting the items of the state (print_core is no longer
13587 a correct name them).
13588 (print_results): Invoke new_closure/free_closure if needed.
13589
13590 2001-12-05 Akim Demaille <akim@epita.fr>
13591
13592 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13593 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13594 (nitemset): for consistency with the rest of the project.
13595
13596 2001-12-05 Akim Demaille <akim@epita.fr>
13597
13598 * src/closure.c (print_closure): Improve.
13599 (closure): Use it for printing input and output.
13600
13601 2001-12-05 Akim Demaille <akim@epita.fr>
13602
13603 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13604 indexed by nonterminals.
13605
13606 2001-12-05 Akim Demaille <akim@epita.fr>
13607
13608 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13609 what it was!).
13610 * src/warshall.h: Remove accidental duplication of the content.
13611
13612 2001-12-05 Akim Demaille <akim@epita.fr>
13613
13614 * src/closure.c (set_fderives): De-obfuscate.
13615
13616 2001-12-05 Akim Demaille <akim@epita.fr>
13617
13618 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13619
13620 2001-12-05 Akim Demaille <akim@epita.fr>
13621
13622 * src/closure.c (set_firsts): De-obfuscate.
13623
13624 2001-12-05 Akim Demaille <akim@epita.fr>
13625
13626 * src/output.c (action_row): De-obfuscate
13627 using the good o' techniques: arrays not pointers, variable
13628 locality, BITISSET, RESETBIT etc.
13629
13630 2001-12-05 Akim Demaille <akim@epita.fr>
13631
13632 Pessimize the code to simplify it: from now on, all the states
13633 have a valid SHIFTS, which NSHIFTS is possibly 0.
13634
13635 * src/LR0.c (shifts_new): Be global and move to..
13636 * src/state.c, src/state.h: here.
13637 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13638 * src/print_graph: Adjust.
13639
13640 2001-12-05 Akim Demaille <akim@epita.fr>
13641
13642 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13643 * src/conflicts.c: Use it.
13644 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13645 incorrectly ``simplified''.
13646
13647 2001-12-05 Akim Demaille <akim@epita.fr>
13648
13649 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13650 using the good o' techniques: arrays not pointers, variable
13651 locality, BITISSET, RESETBIT etc.
13652
13653 2001-12-05 Akim Demaille <akim@epita.fr>
13654
13655 * src/state.h (SHIFT_SYMBOL): New.
13656 * src/conflicts.c: Use it to deobfuscate.
13657
13658 2001-12-05 Akim Demaille <akim@epita.fr>
13659
13660 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13661 (print_reductions): De-obfuscate using the good o' techniques:
13662 arrays not pointers, variable locality, BITISSET.
13663
13664 2001-12-05 Akim Demaille <akim@epita.fr>
13665
13666 * src/conflicts.c (print_reductions): Arrays, not pointers.
13667 Use BITISSET.
13668
13669 2001-12-05 Akim Demaille <akim@epita.fr>
13670
13671 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13672
13673 2001-12-05 Akim Demaille <akim@epita.fr>
13674
13675 * src/conflicts.c (print_reductions): Improve variable locality.
13676
13677 2001-12-05 Akim Demaille <akim@epita.fr>
13678
13679 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13680
13681 2001-12-05 Akim Demaille <akim@epita.fr>
13682
13683 * src/conflicts.c (print_reductions): Improve variable locality.
13684
13685 2001-12-05 Akim Demaille <akim@epita.fr>
13686
13687 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13688 * src/lalr.c: Use them.
13689
13690 2001-12-05 Akim Demaille <akim@epita.fr>
13691
13692 * src/LR0.c (augment_automaton): Formatting changes.
13693 Better variable locality.
13694
13695 2001-12-05 Akim Demaille <akim@epita.fr>
13696
13697 * src/lalr.c (matrix_print): New.
13698 (transpose): Use it.
13699 Use arrays instead of pointers.
13700
13701 2001-12-05 Akim Demaille <akim@epita.fr>
13702
13703 * src/lalr.c (maxrhs): Move to...
13704 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13705 * src/lalr.c (build_relations): Adjust.
13706
13707 2001-12-05 Akim Demaille <akim@epita.fr>
13708
13709 * src/lalr.c (transpose): Free the memory allocated to the
13710 argument, as it is replaced by the results by the unique caller.
13711 (build_relations): Merely invoke transpose: it handles the memory
13712 deallocation.
13713 Improve variable locality.
13714 Avoid variables used as mere abbreviations.
13715 (compute_lookaheads): Use arrays instead of pointers.
13716
13717 2001-12-05 Akim Demaille <akim@epita.fr>
13718
13719 * src/lalr.c (initialize_F): Improve variable locality.
13720 Avoid variables used as mere abbreviations.
13721
13722 2001-12-05 Akim Demaille <akim@epita.fr>
13723
13724 * src/derives.c (print_derives): Display the ruleno.
13725 * src/lalr.c (initialize_F, transpose): Better variable locality
13726 to improve readability.
13727 Avoid variables used as mere abbreviations.
13728
13729 2001-12-05 Akim Demaille <akim@epita.fr>
13730
13731 * src/lalr.c (traverse): Use arrays instead of pointers.
13732
13733 2001-12-05 Akim Demaille <akim@epita.fr>
13734
13735 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13736 the handling of squeue.
13737 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13738
13739 2001-12-05 Akim Demaille <akim@epita.fr>
13740
13741 Because useless nonterminals are now kept alive (instead of being
13742 `destroyed'), we now sometimes examine them, and store information
13743 related to them. Hence we need to know their number, and adjust
13744 memory allocations.
13745
13746 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13747 static.
13748 * src/LR0.c (allocate_itemsets): The memory allocated to
13749 `symbol_count' was used for two different purpose: once to count
13750 the number of occurrences of each symbol, and later reassigned to
13751 `shift_symbol', containing the symbol that can be shifted from a
13752 given state.
13753 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13754 only, and...
13755 (new_itemsets): Allocate `shift_symbol' here.
13756 (allocate_itemsets): symbol_count includes useless nonterminals.
13757 Make room for them.
13758 (free_storage): Use `free', not `XFREE', for pointers that cannot
13759 be null.
13760
13761 2001-12-05 Akim Demaille <akim@epita.fr>
13762
13763 * src/nullable.c (set_nullable): Deobfuscate the handling of
13764 ritem.
13765 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13766
13767 2001-12-05 Akim Demaille <akim@epita.fr>
13768
13769 * src/gram.c, src/gram.h (ritem_print): New.
13770 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13771 (This useless function was defined only to work around VMS linkers
13772 that can't handle compilation units with variables only).
13773 * src/reduce.c (dump_grammar): Use it to trace the construction of
13774 ritem.
13775
13776 2001-12-04 Paul Eggert <eggert@twinsun.com>
13777
13778 * src/bison.simple (union yyalloc): Change member names
13779 to be the same as the stack names.
13780 (yyparse): yyptr is now union yyalloc *, not char *.
13781 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13782 and may generate better code on some machines.
13783 (yystpcpy): Use prototype if __STDC__ is defined, not just
13784 if __cplusplus is defined.
13785
13786 2001-11-30 Akim Demaille <akim@epita.fr>
13787
13788 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13789 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13790 Gettext doesn't compile cleanly, and dies with -Werror.
13791 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13792 Include WARNING_CFLAGS here.
13793 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13794 before being defined.
13795
13796 2001-11-27 Paul Eggert <eggert@twinsun.com>
13797
13798 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13799 First arg is int, not unsigned.
13800 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13801 (SIZE_MAX, UINT_MAX): New macros.
13802 (quotearg_n_options): Abort if N is negative.
13803 Avoid overflow check on hosts where size_t is 64 bits and int
13804 is 32 bits, as overflow is impossible there.
13805 Fix off-by-one typo that caused unnecessary reallocation.
13806
13807 2001-11-29 Paul Eggert <eggert@twinsun.com>
13808
13809 Name space cleanup in generated parser.
13810
13811 * doc/bison.texinfo (Bison Parser): Discuss system headers
13812 and their effect on the user name space.
13813
13814 * src/bison.simple:
13815 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13816 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13817 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13818
13819 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13820 on user names when possible.
13821
13822 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13823 Simplify test for whather <alloca.h> exists.
13824
13825 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13826
13827 (<stdio.h>): Include if YYDEBUG.
13828
13829 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13830 ! defined (yyoverflow) && ! defined (yymemcpy).
13831
13832 (yymemcpy, yyparse): Rename local variables as needed so that
13833 they all begin with 'yy'.
13834
13835 (yystrlen, yystpcpy): New functions.
13836
13837 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13838 All uses changed.
13839
13840 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13841 instead of relying on string.h functions. Use YYSTACK_ALLOC
13842 and YYSTACK_FREE instead of malloc and free.
13843
13844 2001-11-30 Akim Demaille <akim@epita.fr>
13845
13846 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13847 before their first uses.
13848 (YYBISON, YYPURE): Move to the top of the output.
13849
13850 2001-11-30 Akim Demaille <akim@epita.fr>
13851
13852 * tests/reduce.at (Useless Nonterminals): Fix.
13853
13854 2001-11-30 Akim Demaille <akim@epita.fr>
13855
13856 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13857 if body instead of `;' to pacify GCC's warnings.
13858
13859 2001-11-30 Akim Demaille <akim@epita.fr>
13860
13861 Instead of mapping the LHS of unused rules to -1, keep the LHS
13862 valid, but flag the rules as invalid.
13863
13864 * src/gram.h (rule_t): `useful' is a new member.
13865 * src/print.c (print_grammar): Adjust.
13866 * src/derives.c (set_derives): Likewise.
13867 * src/reader.c (packgram, reduce_output): Likewise.
13868 * src/reduce.c (reduce_grammar_tables): Likewise.
13869 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13870
13871 2001-11-30 Akim Demaille <akim@epita.fr>
13872
13873 * src/reduce.c (reduce_output): Formatting changes.
13874 * src/print.c (print_results, print_grammar): Likewise.
13875 * tests/regression.at (Rule Line Numbers)
13876 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13877
13878 2001-11-30 Akim Demaille <akim@epita.fr>
13879
13880 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13881 useless nonterminals, move them at the end of the symbol arrays.
13882 (reduce_output): Adjust.
13883 * tests/reduce.at (Useless Nonterminals): Adjust.
13884
13885 2001-11-30 Akim Demaille <akim@epita.fr>
13886
13887 * src/reduce.c: Various comment/formatting changes.
13888 (nonterminals_reduce): New, extracted from...
13889 (reduce_grammar_tables): here.
13890 (reduce_grammar): Call nonterminals_reduce.
13891
13892 2001-11-29 Paul Eggert <eggert@twinsun.com>
13893
13894 * src/bison.simple (YYSTACK_REALLOC): Remove.
13895 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13896 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13897 New macros.
13898 (union yyalloc): New type.
13899 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13900 an arbitrary restriction on hosts where size_t is wider than int.
13901
13902 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13903 a parser stack overflow. Allocate just one block of memory for all
13904 three stacks, instead of allocating three blocks; this typically is
13905 faster and reduces fragmentation.
13906
13907 Do not limit the number of items in the stack to a value that fits
13908 in 'int', as this is an arbitrary limit on hosts with 64-bit
13909 size_t and 32-bit int.
13910
13911 2001-11-29 Marc Autret <autret_m@epita.fr>
13912
13913 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13914 of defining YYERROR_VERBOSE.
13915 [AT_DATA]: $4 is now out of C declarations in the prologue.
13916
13917 2001-11-28 Marc Autret <autret_m@epita.fr>
13918
13919 * src/reader.c (parse_dquoted_param): New.
13920 (parse_skel_decl): Use it.
13921 * src/lex.h: Add its prototype.
13922 * src/lex.c (literalchar): Become not static.
13923
13924 2001-11-28 Marc Autret <autret_m@epita.fr>
13925
13926 * src/output.h: And put its extern declaration here.
13927 * src/output.c (error_verbose): Define here.
13928 (prepare): Echo name modification.
13929 * src/getargs.h: Clean its extern declaration.
13930 * src/getargs.c (error_verbose_flag): Remove.
13931 (getargs): Remove case 'e'.
13932 * src/options.c (option_table): 'error-verbose' is now seen as simple
13933 percent option.
13934 Include output.h.
13935
13936 * src/reader.c (read_declarations): Remove case tok_include.
13937 (parse_include_decl): Remove.
13938 * src/lex.h (token_t): Remove tok_include.
13939 * src/options.c (option_table): 'include' is now a simple command line
13940 option.
13941
13942 2001-11-28 Marc Autret <autret_m@epita.fr>
13943
13944 * src/bison.simple: Adjust muscle names.
13945 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13946 * src/output.c (prepare): s/_/-/ for the muscles names.
13947 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13948
13949 2001-11-28 Marc Autret <autret_m@epita.fr>
13950
13951 * src/bison.simple: Fix debug.
13952 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13953
13954 2001-11-28 Akim Demaille <akim@epita.fr>
13955
13956 * src/LR0.c (shifts_new): New.
13957 (save_shifts, insert_start_shift, augment_automaton): Use it.
13958
13959 2001-11-28 Akim Demaille <akim@epita.fr>
13960
13961 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13962 keep ruleno only.
13963
13964 2001-11-28 Akim Demaille <akim@epita.fr>
13965
13966 * src/closure.c (closure): Instead of looping over word in array
13967 then bits in words, loop over bits in array.
13968
13969 2001-11-28 Akim Demaille <akim@epita.fr>
13970
13971 * src/closure.c (closure): No longer optimize the special case
13972 where all the bits of `ruleset[r]' are set to 0, to make the code
13973 clearer.
13974
13975 2001-11-28 Akim Demaille <akim@epita.fr>
13976
13977 * src/closure.c (closure): `r' and `c' are new variables, used to
13978 de-obfuscate accesses to RULESET and CORE.
13979
13980 2001-11-28 Akim Demaille <akim@epita.fr>
13981
13982 * src/reduce.c (reduce_print): Use ngettext.
13983 (dump_grammar): Improve the trace accuracy.
13984
13985 2001-11-28 Akim Demaille <akim@epita.fr>
13986
13987 * src/reduce.c (dump_grammar): Don't translate trace messages.
13988
13989 2001-11-28 Akim Demaille <akim@epita.fr>
13990
13991 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13992 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13993 as all tags are free'ed afterwards.
13994 From Enrico Scholz.
13995
13996 2001-11-27 Paul Eggert <eggert@twinsun.com>
13997
13998 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13999 use alloca when we didn't want to, and vice versa.
14000
14001 2001-11-27 Marc Autret <autret_m@epita.fr>
14002
14003 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14004 initialization.
14005 * src/output.c (prepare): Remove its update.
14006
14007 2001-11-27 Marc Autret <autret_m@epita.fr>
14008
14009 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14010 Use %error-verbose.
14011
14012 2001-11-27 Marc Autret <autret_m@epita.fr>
14013
14014 * src/bison.simple: Remove YYERROR_VERBOSE using.
14015 Use %%error_verbose.
14016 (yyparse): Likewise.
14017 * src/output.c (prepare): Give its final value.
14018 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14019 * src/getargs.h: Add its extern declaration.
14020 * src/getargs.c (error_verbose_flag): New int.
14021 (getargs): Update to catch new case.
14022 * src/options.c (option_table): 'error-verbose' is a new option.
14023 (shortopts): Update.
14024
14025 2001-11-27 Akim Demaille <akim@epita.fr>
14026
14027 * src/system.h: Use intl/libgettext.h.
14028 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14029
14030 2001-11-27 Akim Demaille <akim@epita.fr>
14031
14032 * tests/torture.at (Exploding the Stack Size with Malloc):
14033 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14034
14035 2001-11-27 Akim Demaille <akim@epita.fr>
14036
14037 * src/files.c: Include error.h.
14038 Reported by Hans Aberg.
14039
14040 2001-11-26 Marc Autret <autret_m@epita.fr>
14041
14042 * src/reader.c (parse_include_decl): New, not yet implemented.
14043 (read_declarations): Add case tok_include.
14044 * src/getargs.h (include): Add its extern definition.
14045 * src/getargs.c (include): New const char *.
14046 (getargs): Add case '-I'.
14047 * src/options.c (option_table): Add include as command line and
14048 percent option.
14049 * src/lex.h (token_t): Add tok_include.
14050
14051 2001-11-26 Akim Demaille <akim@epita.fr>
14052
14053 * src/reader.c (readgram): Make sure rules for mid-rule actions
14054 have a lineno equal to that of their host rule.
14055 Reported by Hans Aberg.
14056 * tests/regression.at (Rule Line Numbers): New.
14057
14058 2001-11-26 Akim Demaille <akim@epita.fr>
14059
14060 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14061 size_ts.
14062
14063 2001-11-26 Akim Demaille <akim@epita.fr>
14064
14065 * src/complain.c, src/complain.h (error): Remove, provided by
14066 lib/error.[ch].
14067
14068 2001-11-26 Akim Demaille <akim@epita.fr>
14069
14070 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14071 issue an error message.
14072 * tests/regression.at (Invalid %directive): New.
14073 Reported by Hans Aberg.
14074
14075 2001-11-26 Akim Demaille <akim@epita.fr>
14076
14077 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14078 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14079
14080 2001-11-26 Akim Demaille <akim@epita.fr>
14081
14082 * src/conflicts.c (conflicts_print): Don't complain at all when
14083 there are no reduce/reduce conflicts, and as many shift/reduce
14084 conflicts as expected.
14085 * tests/regression.at (%expect right): Adjust.
14086
14087 2001-11-23 Akim Demaille <akim@epita.fr>
14088
14089 * lib/alloca.c: Update, from fileutils.
14090
14091 2001-11-23 Akim Demaille <akim@epita.fr>
14092
14093 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14094
14095 2001-11-23 Akim Demaille <akim@epita.fr>
14096
14097 * src/system.h: Include alloca.h.
14098 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14099
14100 2001-11-23 Akim Demaille <akim@epita.fr>
14101
14102 * src/print_graph.c (print_actions): Remove `rule', unused.
14103 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14104 pacify GCC's signed < unsigned warnings.
14105 * src/closure.c (itemsetsize): Likewise.
14106 * src/reader.c (symbol_list_new): Static.
14107
14108 2001-11-23 Akim Demaille <akim@epita.fr>
14109
14110 Attaching lineno to buckets is stupid, since only one copy of each
14111 symbol is kept, only the line of the first occurrence is kept too.
14112
14113 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14114 * src/reader.c (rline_allocated): Remove, unused.
14115 (symbol_list): Have a `line' member.
14116 (symbol_list_new): New.
14117 (readgram): Use it.
14118 * src/print.c (print_grammar): Output the rule line numbers.
14119 * tests/regression.at (Solved SR Conflicts)
14120 (Unresolved SR Conflicts): Adjust.
14121 Reported by Hans Aberg.
14122
14123 2001-11-22 Marc Autret <autret_m@epita.fr>
14124
14125 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14126
14127 2001-11-22 Marc Autret <autret_m@epita.fr>
14128
14129 * src/muscle_tab.c (muscle_init): Remove initialization of
14130 skeleton muscle.
14131 * src/output.c (output_master_parser): Do it here.
14132
14133 2001-11-20 Akim Demaille <akim@epita.fr>
14134
14135 * po/sv.po: New.
14136 * configure.in (ALL_LINGUAS): Adjust.
14137 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14138 longer contains strings to translate.
14139
14140 2001-11-19 Akim Demaille <akim@epita.fr>
14141
14142 * src/conflicts.c (conflicts_print): Add a missing \n.
14143
14144 2001-11-19 Akim Demaille <akim@epita.fr>
14145
14146 * src/nullable.c (nullable_print): New.
14147 (set_nullable): Call it when tracing.
14148 Better locality of variables.
14149
14150 2001-11-19 Akim Demaille <akim@epita.fr>
14151
14152 * src/print.c (print_actions): Better locality of variables.
14153
14154 2001-11-19 Akim Demaille <akim@epita.fr>
14155
14156 * src/derives.c (print_derives): Fix and enrich.
14157 * src/closure.c (print_fderives): Likewise.
14158
14159 2001-11-19 Akim Demaille <akim@epita.fr>
14160
14161 * src/closure.c (itemsetend): Remove, replaced with...
14162 (itemsetsize): new.
14163
14164 2001-11-19 Akim Demaille <akim@epita.fr>
14165
14166 * src/LR0.c (kernel_end): Remove, replaced with...
14167 (kernel_size): new.
14168
14169 2001-11-19 Akim Demaille <akim@epita.fr>
14170
14171 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14172 to clarify.
14173
14174 2001-11-19 Akim Demaille <akim@epita.fr>
14175
14176 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14177
14178 2001-11-19 Akim Demaille <akim@epita.fr>
14179
14180 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14181 trace messages.
14182 * src/LR0.c: Likewise.
14183 (allocate_itemsets): Use arrays instead of pointers to clarify.
14184
14185 2001-11-19 Akim Demaille <akim@epita.fr>
14186
14187 * src/getargs.c (statistics_flag): Replace with...
14188 (trace_flag): New.
14189 (longopts): Accept --trace instead of --statistics.
14190 * src/getargs.h, src/options.c: Adjust.
14191 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14192 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14193
14194 2001-11-19 Akim Demaille <akim@epita.fr>
14195
14196 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14197 pointers to clarify the code.
14198 (save_reductions, save_shifts): Factor common parts of alternatives.
14199
14200 2001-11-19 Akim Demaille <akim@epita.fr>
14201
14202 * src/LR0.c (new_state, get_state): Complete TRACE code.
14203 * src/closure.c: Include `reader.h' to get `tags', needed by the
14204 trace code.
14205 Rename the conditional DEBUG as TRACE.
14206 Output consistently TRACEs to stderr, not stdout.
14207 * src/derives.c: Likewise.
14208 * src/reduce.c: (inaccessable_symbols): Using if is better style
14209 than goto.
14210 Use `#if TRACE' instead of `#if 0' for tracing code.
14211
14212 2001-11-19 Akim Demaille <akim@epita.fr>
14213
14214 * src/system.h (LIST_FREE, shortcpy): New.
14215 * src/LR0.c: Use them.
14216 * src/output.c (free_itemsets, free_reductions, free_shifts):
14217 Remove, replaced by LIST_FREE.
14218
14219 2001-11-19 Akim Demaille <akim@epita.fr>
14220
14221 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14222 (REDUCTIONS_ALLOC): New.
14223 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14224 allocation.
14225
14226 2001-11-19 Akim Demaille <akim@epita.fr>
14227
14228 * src/LR0.c (new_state): Complete trace code.
14229 * src/nullable.c (set_nullable): Don't translate traces.
14230
14231 2001-11-19 Akim Demaille <akim@epita.fr>
14232
14233 * src/print_graph.c (print_core): Better locality of variables.
14234 * src/print.c (print_core): Likewise.
14235
14236 2001-11-19 Akim Demaille <akim@epita.fr>
14237
14238 * src/vcg.c: You do the output, so you are responsible of the
14239 handling of VCG syntax, in particular: use quotearg.
14240 * src/print_graph.c: Don't.
14241 (print_actions): Don't output the actions as part of the nodes,
14242 since that's the job of the edges.
14243 (print_state): Don't output by hand: fill the node description,
14244 and ask for its output.
14245
14246 2001-11-19 Akim Demaille <akim@epita.fr>
14247
14248 * src/bison.simple (yyparse): When verbosely reporting an error,
14249 no longer put additional quotes around token names.
14250 * tests/calc.at: Adjust.
14251
14252 2001-11-19 Akim Demaille <akim@epita.fr>
14253
14254 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14255 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14256 * src/output.c: Adjust.
14257
14258 2001-11-19 Akim Demaille <akim@epita.fr>
14259
14260 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14261 (rule_t): this.
14262 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14263
14264 2001-11-19 Akim Demaille <akim@epita.fr>
14265
14266 * src/gram.h (rule_t): New.
14267 (rule_table): New.
14268 (rrhs, rlhs): Remove, part of state_t.
14269 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14270 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14271 * src/reader.c, src/reduce.c: Adjust.
14272
14273 2001-11-19 Akim Demaille <akim@epita.fr>
14274
14275 * src/reader.c (symbols_output): New, extracted from...
14276 (packsymbols): Here.
14277 (reader): Call it.
14278
14279 2001-11-19 Akim Demaille <akim@epita.fr>
14280
14281 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14282 (maxrhs): this new function.
14283
14284 2001-11-19 Akim Demaille <akim@epita.fr>
14285
14286 * src/lalr.c (F): New macro to access the variable F.
14287 Adjust.
14288
14289 2001-11-19 Akim Demaille <akim@epita.fr>
14290
14291 * src/lalr.h (LA): New macro to access the variable LA.
14292 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14293 * src/lalr.c: Adjust.
14294
14295 2001-11-19 Akim Demaille <akim@epita.fr>
14296
14297 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14298 (set_state_table): handle the `lookaheads' members.
14299
14300 2001-11-19 Akim Demaille <akim@epita.fr>
14301
14302 * src/lalr.h (lookaheads): Removed array, whose contents is now
14303 a member of...
14304 (state_t): this structure.
14305 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14306 Adjust.
14307
14308 2001-11-19 Akim Demaille <akim@epita.fr>
14309
14310 * src/lalr.h (consistent): Removed array, whose contents is now
14311 a member of...
14312 (state_t): this structure.
14313 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14314 Adjust.
14315
14316 2001-11-19 Akim Demaille <akim@epita.fr>
14317
14318 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14319 contents are now members of...
14320 (state_t): this structure.
14321 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14322 Adjust.
14323
14324 2001-11-19 Akim Demaille <akim@epita.fr>
14325
14326 * src/lalr.h (state_t): New.
14327 (state_table): Be a state_t * instead of a core **.
14328 (accessing_symbol): Remove, part of state_t.
14329 * src/lalr.c: Adjust.
14330 (set_accessing_symbol): Merge into...
14331 (set_state_table): this.
14332 * src/print_graph.c, src/conflicts.c: Adjust.
14333
14334 2001-11-14 Akim Demaille <akim@epita.fr>
14335
14336 * tests/calc.at, tests/output.at, tests/regression.at,
14337 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14338 now the tests are run in private dirs, therefore AC_CLEANUP and
14339 family can be simplified to 0-ary.
14340 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14341 use abs. path to find config.h.
14342 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14343 stderr, there can be way too much random noise.
14344 Instead pass -Werror to GCC and rely on the exit status.
14345 Reported by Wolfram Wagner.
14346
14347 2001-11-14 Akim Demaille <akim@epita.fr>
14348
14349 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14350 defined only if yyoverflow is defined, to avoid `warning: unused
14351 variable `yyvs1''.
14352 Reported by The Test Suite.
14353
14354 2001-11-14 Akim Demaille <akim@epita.fr>
14355
14356 * src/print.c: Include reduce.h.
14357 Reported by Hans Aberg.
14358
14359 2001-11-14 Akim Demaille <akim@epita.fr>
14360
14361 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14362 Revert a previous patch: these are really const.
14363 * src/conflicts.c (conflict_report): Additional useless pair of
14364 braces to pacify GCC's warnings for `if () if () {} else {}'.
14365 * src/lex.c (parse_percent_token): Replace equal_offset with
14366 arg_offset.
14367 arg is const.
14368 Be sure to strdup `arg' when used, since there is no reason for
14369 token_buffer not to change.
14370
14371 2001-11-14 Akim Demaille <akim@epita.fr>
14372
14373 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14374 definition.
14375 * src/main.c (main): Use them.
14376 Suggested by Hans Aberg.
14377
14378 2001-11-12 Akim Demaille <akim@epita.fr>
14379
14380 * src/system.h (ngettext): Now that we use ngettext, be sure to
14381 provide a default definition when NLS are not used.
14382
14383 2001-11-12 Akim Demaille <akim@epita.fr>
14384
14385 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14386 Use @kbd to denote user input.
14387 (Language and Grammar): ANSIfy the example.
14388 Adjust its layout for info/notinfo.
14389 (Location Tracking Calc): Output error messages to stderr.
14390 Output locations in a more GNUtically correct way.
14391 Fix a couple of Englishos.
14392 Adjust @group/@end group pairs.
14393
14394 2001-11-12 Akim Demaille <akim@epita.fr>
14395
14396 %expect was not functioning at all.
14397
14398 * src/conflicts.c (expected_conflicts): Set to -1.
14399 (conflict_report): Use ngettext.
14400 (conflicts_print): Check %expect and make its violation an error.
14401 * doc/bison.texinfo (Expect Decl): Adjust.
14402 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14403 * tests/regression.at (%expect not enough, %expect right)
14404 (%expect too much): New.
14405
14406 2001-11-12 Akim Demaille <akim@epita.fr>
14407
14408 * tests/regression.at (Conflicts): Rename as...
14409 (Unresolved SR Conflicts): this.
14410 (Solved SR Conflicts): New.
14411
14412 2001-11-12 Akim Demaille <akim@epita.fr>
14413
14414 * src/reduce.c (print_results): Rename as...
14415 (reduce_output): This.
14416 Output to OUT, passed as argument, instead of output_obstack.
14417 (dump_grammar): Likewise.
14418 (reduce_free): New.
14419 Also free V1.
14420 (reduce_grammar): No longer call reduce_output, since...
14421 * src/print.c (print_results): do it.
14422 * src/main.c (main): Call reduce_free;
14423
14424 2001-11-12 Akim Demaille <akim@epita.fr>
14425
14426 * src/conflicts.c (print_reductions): Accept OUT as argument.
14427 Output to it, not to output_obstack.
14428 * src/print.c (print_actions): Adjust.
14429
14430 2001-11-12 Akim Demaille <akim@epita.fr>
14431
14432 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14433 the result instead of using...
14434 (src_total, rrc_total, src_count, rrc_count): Remove.
14435 (any_conflicts): Remove.
14436 (print_conflicts): Split into...
14437 (conflicts_print, conflicts_output): New.
14438 * src/conflicts.h: Adjust.
14439 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14440 * src/print.c (print_grammar): Issue `\n' between two rules.
14441 * tests/regression.at (Conflicts): New.
14442 Reported by Tom Lane.
14443
14444 2001-11-12 Akim Demaille <akim@epita.fr>
14445
14446 * tests/regression.at (Invalid input): Remove, duplicate with
14447 ``Invalid input: 1''.
14448
14449 2001-11-12 Akim Demaille <akim@epita.fr>
14450
14451 * tests/torture.at (AT_DATA_STACK_TORTURE)
14452 (Exploding the Stack Size with Alloca)
14453 (Exploding the Stack Size with Malloc): New.
14454
14455 2001-11-12 Akim Demaille <akim@epita.fr>
14456
14457 * src/bison.simple (YYSTACK_REALLOC): New.
14458 (yyparse) [!yyoverflow]: Use it and free the old stack.
14459 Reported by Per Allansson.
14460
14461 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14462
14463 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14464 define CPP macro, which substitute YYSTYPE by yystype.
14465 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14466 with yyltype/YYLTYPE. This allows inclusion of the generated
14467 header within the parser if the compiler, such as GGC, accepts
14468 multiple equivalent #defines.
14469 From Akim.
14470
14471 2001-11-05 Akim Demaille <akim@epita.fr>
14472
14473 * src/reader.c (symbols_output): New, extracted from...
14474 (packsymbols): here.
14475 (reader): Adjust.
14476
14477 2001-11-05 Akim Demaille <akim@epita.fr>
14478
14479 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14480
14481 2001-11-05 Akim Demaille <akim@epita.fr>
14482
14483 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14484 pattern.
14485
14486 2001-11-05 Akim Demaille <akim@epita.fr>
14487
14488 * src/options.h (struct option_table_struct): set_flags is void*.
14489 * src/options.c (longopts): Support `--output' and `%output'.
14490 (usage): Adjust.
14491 * src/lex.h (tok_setopt): Remove, replaced with...
14492 (tok_intopt, tok_stropt): these new guys.
14493 * src/lex.c (getopt.h): Not needed.
14494 (token_buffer, unlexed_token_buffer): Not const.
14495 (percent_table): Promote `-' over `_' in directive names.
14496 Active `%name-prefix', `file-prefix', and `output'.
14497 (parse_percent_token): Accept possible arguments to directives.
14498 Promote `-' over `_' in directive names.
14499
14500 2001-11-04 Akim Demaille <akim@epita.fr>
14501
14502 * doc/bison.texinfo (Decl Summary): Split the list into
14503 `directives for grammars' and `directives for bison'.
14504 Sort'em.
14505 Add description of `%name-prefix', `file-prefix', and `output'.
14506 Promote `-' over `_' in directive names.
14507 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14508 Simplify the description of `--name-prefix'.
14509 Promote `-' over `_' in directive names.
14510 Promote `--output' over `--output-file'.
14511 Fix the description of `--defines'.
14512 * tests/output.at: Exercise %file-prefix and %output.
14513
14514 2001-11-02 Akim Demaille <akim@epita.fr>
14515
14516 * doc/refcard.tex: Update.
14517
14518 2001-11-02 Akim Demaille <akim@epita.fr>
14519
14520 * src/symtab.h (SUNDEF): New.
14521 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14522 stand for `uninitialized', instead of 0.
14523 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14524 * src/lex.c (lex): Adjust.
14525
14526 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14527 Number it 0.
14528 Let yylex return it instead of a plain 0.
14529 Reported by Dick Streefland.
14530
14531 2001-11-02 Akim Demaille <akim@epita.fr>
14532
14533 * tests/regression.at (Mixing %token styles): New test.
14534
14535 2001-11-02 Akim Demaille <akim@epita.fr>
14536
14537 * src/reader.c (parse_thong_decl): Formatting changes.
14538 (token_translations_init): New, extracted from...
14539 (packsymbols): Here.
14540 Adjust.
14541
14542 2001-11-01 Akim Demaille <akim@epita.fr>
14543
14544 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14545 Check that `9foo.y' produces correct cpp guards.
14546 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14547 guards.
14548 Reported by Wwp.
14549
14550 2001-11-01 Akim Demaille <akim@epita.fr>
14551
14552 * tests/regression.at (Invalid input: 2): New.
14553 * src/lex.c (unlexed_token_buffer): New.
14554 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14555 too.
14556 Reported by Wwp.
14557
14558 2001-11-01 Akim Demaille <akim@epita.fr>
14559
14560 * tests/calc.at: Catch up with 1.30.
14561 * configure.in: Bump to 1.49a.
14562 Adjust to newer Autotest.
14563
14564 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14565
14566 * src/conflicts.c: Move global variables rrc_total and src_total ...
14567 (print_conflicts): here.
14568 * src/output.c (output): Free global variable user_toknums.
14569 * src/lex.c (token_obstack): Become static.
14570
14571 2001-10-18 Akim Demaille <akim@epita.fr>
14572
14573 * tests/atlocal.in (GCC): Add.
14574 * tests/calc.at: s/m4_match/m4_bmatch/.
14575 s/m4_patsubst/m4_bpatsubst/.
14576 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14577 * configure.in: AC_SUBST(GCC).
14578
14579 2001-10-14 Marc Autret <autret_m@epita.fr>
14580
14581 * src/options.c (create_long_option_table): Fix.
14582
14583 2001-10-10 Akim Demaille <akim@epita.fr>
14584
14585 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14586
14587 2001-10-04 Akim Demaille <akim@epita.fr>
14588
14589 * src/reader.c (parse_union_decl): Push the caracters in
14590 union_obstack, not attrs_obstack.
14591
14592 2001-10-04 Akim Demaille <akim@epita.fr>
14593
14594 Merge in the branch 1.29.
14595
14596 * src/reader.c (packsymbols): Use a temporary obstack for
14597 `%%tokendef', since output_stack is already used elsewhere.
14598
14599 2001-10-02 Akim Demaille <akim@epita.fr>
14600
14601 Bump 1.29d.
14602
14603 2001-10-02 Akim Demaille <akim@epita.fr>
14604
14605 Version 1.29c.
14606
14607 2001-10-02 Akim Demaille <akim@epita.fr>
14608
14609 * tests/regression.at (Invalid CPP headers): New.
14610 From Alexander Belopolsky.
14611 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14612
14613 2001-10-02 Akim Demaille <akim@epita.fr>
14614
14615 * tests/regression.at (Invalid input): New.
14616 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14617 Reported by Shura.
14618
14619 2001-10-02 Akim Demaille <akim@epita.fr>
14620
14621 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14622
14623 2001-10-02 Akim Demaille <akim@epita.fr>
14624
14625 * src/output.c (output_parser): Assert `skeleton'.
14626 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14627 systems.
14628 From Shura.
14629
14630 2001-10-01 Marc Autret <autret_m@epita.fr>
14631
14632 * src/lex.h: Echo modifications.
14633 * src/lex.c (unlex): Parameter is now token_t.
14634 From Hans Aberg.
14635
14636 2001-10-01 Marc Autret <autret_m@epita.fr>
14637
14638 * src/main.c: Include lex.h.
14639 From Hans Aberg.
14640
14641 2001-09-29 Akim Demaille <akim@epita.fr>
14642
14643 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14644
14645 2001-09-28 Akim Demaille <akim@epita.fr>
14646
14647 * tests/testsuite.at: Update to newer Autotest.
14648 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14649
14650 2001-09-27 Akim Demaille <akim@epita.fr>
14651
14652 Position independent wrapper.
14653
14654 * tests/bison: Remove.
14655 * tests/bison.in: New.
14656 * configure.in: Adjust.
14657
14658 2001-09-27 Paul Eggert <eggert@twinsun.com>
14659
14660 Port quotearg fixes from tar 1.13.24.
14661
14662 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14663 tm to be declared.
14664 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14665 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14666
14667 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14668 * m4/mbrtowc.m4: New file.
14669 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14670 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14671
14672 2001-09-27 Akim Demaille <akim@epita.fr>
14673
14674 Bump to 1.29c.
14675
14676 2001-09-27 Akim Demaille <akim@epita.fr>
14677
14678 Version 1.29b.
14679
14680 2001-09-25 Akim Demaille <akim@epita.fr>
14681
14682 * src/system.h: Include `xalloc.h'.
14683 Remove it from the C files.
14684 * src/files.c (output_files): Free the obstacks.
14685 * src/lex.c (init_lex): Rename as...
14686 (lex_init): this.
14687 (lex_free): New.
14688 * src/main.c (main): Use it.
14689
14690 2001-09-24 Marc Autret <autret_m@epita.fr>
14691
14692 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14693 to output informations in fout (FILE*).
14694 (open_graph, close_graph): Likewise.
14695 (output_graph, output_edge, output_node): Likewise.
14696 * src/vcg.h: Update function prototypes.
14697 * src/print_graph.c (print_graph): Open output graph file.
14698 (print_actions): Adjust.
14699 * src/files.h: Remove extern declaration.
14700 * src/files.c: Remove graph_obstack declaration.
14701 (open_files): Remove graph_obstack initialization.
14702 (output_files): Remove graph_obstack saving.
14703
14704 2001-09-24 Marc Autret <autret_m@epita.fr>
14705
14706 * src/files.c (compute_output_file_names): Fix.
14707
14708 2001-09-24 Marc Autret <autret_m@epita.fr>,
14709 Akim Demaille <akim@epita.fr>
14710
14711 * src/reader.c (reader): Remove call to free_symtab ().
14712 * src/main.c (main): Call it here.
14713 Include symtab.h.
14714 * src/conflicts.c (initialize_conflicts): Rename as...
14715 (solve_conflicts): this.
14716 * src/print.c (print_core, print_actions, print_state)
14717 (print_grammar): Dump to a file instead a `output_obstack'.
14718 (print_results): Dump `output_obstack', and then proceed with the
14719 FILE *.
14720 * src/files.c (compute_output_file_names, close_files): New.
14721 (output_files): Adjust.
14722 * src/main.c (main): Adjust.
14723
14724 2001-09-23 Marc Autret <autret_m@epita.fr>
14725
14726 * src/files.c (compute_header_macro): Computes header macro name
14727 from spec_defines_file when given.
14728
14729 2001-09-23 Marc Autret <autret_m@epita.fr>
14730
14731 * src/files.c (output_files): Add default extensions.
14732
14733 2001-09-22 Akim Demaille <akim@epita.fr>
14734
14735 * src/conflicts.c (finalize_conflicts): Rename as...
14736 (free_conflicts): this.
14737
14738 2001-09-22 Akim Demaille <akim@epita.fr>
14739
14740 * src/gram.c (gram_free): Rename back as...
14741 (dummy): this.
14742 (output_token_translations): Free `token_translations'.
14743 * src/symtab.c (free_symtab): Free the tag field.
14744
14745 2001-09-22 Akim Demaille <akim@epita.fr>
14746
14747 Remove `translations' as it is always set to true.
14748
14749 * src/gram.h: Adjust.
14750 * src/reader.c (packsymbols, parse_token_decl): Adjust
14751 * src/print.c (print_grammar): Adjust.
14752 * src/output.c (output_token_translations): Adjust.
14753 * src/lex.c (lex): Adjust.
14754 * src/gram.c: Be sure the set pointers to NULL.
14755 (dummy): Rename as...
14756 (gram_free): this.
14757
14758 2001-09-22 Akim Demaille <akim@epita.fr>
14759
14760 * configure.in: Invoke AM_LIB_DMALLOC.
14761 * src/system.h: Use dmalloc.
14762 * src/LR0.c: Be sure to have pointers initialized to NULL.
14763 (allocate_itemsets): Allocate kernel_items only if needed.
14764
14765 2001-09-22 Akim Demaille <akim@epita.fr>
14766
14767 * configure.in: Bump to 1.29b.
14768 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14769 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14770 need xmalloc.c in calc.y.
14771 From Pascal Bart.
14772
14773 2001-09-21 Akim Demaille <akim@epita.fr>
14774
14775 Version 1.29a.
14776 * Makefile.maint, config/config.guess, config/config.sub,
14777 * config/missing: Update from masters.
14778 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14779 upon package.m4.
14780 * configure.in (ALL_LINGUAS): Add `tr'.
14781
14782 2001-09-21 Akim Demaille <akim@epita.fr>
14783
14784 * tests/Makefile.am (package.m4): Move to...
14785 ($(srcdir)/$(TESTSUITE)): here.
14786
14787 2001-09-20 Akim Demaille <akim@epita.fr>
14788
14789 * src/complain.c: No longer try to be standalone: use system.h.
14790 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14791 * src/complain.h: Likewise.
14792 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14793 Remove the unused variable `n'.
14794 From Albert Chin-A-Young.
14795
14796 2001-09-18 Marc Autret <autret_m@epita.fr>
14797
14798 * doc/bison.1: Update.
14799 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14800 descriptions.
14801 (Option Cross Key): Update.
14802 Add --graph.
14803
14804 2001-09-18 Marc Autret <autret_m@epita.fr>
14805
14806 * tests/regression.at: New test (comment in %union).
14807
14808 2001-09-18 Marc Autret <autret_m@epita.fr>
14809
14810 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14811 do that.
14812 Reported by Keith Browne.
14813
14814 2001-09-18 Marc Autret <autret_m@epita.fr>
14815
14816 * tests/output.at: Add tests for --defines and --graph.
14817
14818 2001-09-18 Marc Autret <autret_m@epita.fr>
14819
14820 * tests/output.at: Removes tests of %{header,src}_extension features.
14821
14822 2001-09-18 Akim Demaille <akim@epita.fr>
14823
14824 * tests/Makefile.am (package.m4): New.
14825 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14826 (_AT_CHECK_CALC_ERROR): Likewise.
14827 Factor the `, ' part of verbose error messages.
14828
14829 2001-09-18 Marc Autret <autret_m@epita.fr>
14830
14831 * src/getargs.c (longopts): Declare --defines and --graph as options
14832 with optional arguments.
14833 * src/files.h: Add extern declarations.
14834 * src/files.c (spec_graph_file, spec_defines_file): New.
14835 (output_files): Update.
14836 Remove CPP-outed code.
14837
14838 2001-09-18 Marc Autret <autret_m@epita.fr>
14839
14840 Turn off %{source,header}_extension feature.
14841
14842 * src/files.c (compute_exts_from_gf): Update.
14843 (compute_exts_from_src): Update.
14844 (output_files): CPP-out useless code.
14845 * src/files.h: Remove {header,source}_extension extern declarations.
14846 * src/reader.c (parse_dquoted_param): CPP-out.
14847 (parse_header_extension_decl): Remove.
14848 (parse_source_extension_decl): Remove.
14849 (read_declarations): Remove cases tok_{hdrext,srcext}.
14850 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14851 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14852
14853 2001-09-10 Akim Demaille <akim@epita.fr>
14854
14855 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14856 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14857 (AT_CHECK_OUTPUT): this.
14858 Merely check ls' exit status, its output is useless.
14859
14860 2001-09-10 Akim Demaille <akim@epita.fr>
14861
14862 * tests/calc.at: Use m4_match.
14863 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14864
14865 2001-09-10 Marc Autret <autret_m@epita.fr>,
14866 Akim Demaille <akim@epita.fr>
14867
14868 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14869 enum color_e.
14870 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14871 to `normal'.
14872 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14873 * src/lex.h: Adjust prototype.
14874 (token_t): Add `tok_undef'.
14875 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14876 (parse_percent_token): Now returns token_t.
14877 Add default statement in switch.
14878 (lex): Separate `c' as an input variable, from the token_t result
14879 part.
14880 (unlexed): Is a token_t.
14881
14882 2001-09-10 Akim Demaille <akim@epita.fr>
14883
14884 * configure.in: Bump to 1.29a.
14885
14886 2001-09-07 Akim Demaille <akim@epita.fr>
14887
14888 Version 1.29.
14889
14890 2001-08-30 Akim Demaille <akim@epita.fr>
14891
14892 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14893 * m4/atconfig.m4: Remove.
14894 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14895 * tests/bison: New.
14896 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14897 m4_if, m4_patsubst, and m4_regexp.
14898 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14899 `input' file instead of echo.
14900
14901 2001-08-29 Akim Demaille <akim@epita.fr>
14902
14903 Bump to 1.28e.
14904
14905 2001-08-29 Akim Demaille <akim@epita.fr>
14906
14907 Version 1.28d.
14908
14909 2001-08-29 Paul Eggert <eggert@twinsun.com>
14910
14911 * src/bison.simple (yyparse): Don't take the address of an
14912 item before the start of an array, as that doesn't conform to
14913 the C Standard.
14914
14915 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14916
14917 * doc/bison.texinfo (Location Tracking Calc): New node.
14918
14919 2001-08-29 Paul Eggert <eggert@twinsun.com>
14920
14921 * src/output.c (output): Do not define const, as this now
14922 causes more problems than it cures.
14923
14924 2001-08-29 Akim Demaille <akim@epita.fr>
14925
14926 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14927 the nodes.
14928 Be sure to tag the `detailmenu'.
14929
14930 2001-08-29 Akim Demaille <akim@epita.fr>
14931
14932 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14933 download in a tmp dir.
14934
14935 2001-08-28 Marc Autret <autret_m@epita.fr>
14936
14937 * config/depcomp: New file.
14938
14939 2001-08-28 Marc Autret <autret_m@epita.fr>
14940
14941 * doc/bison.1 (mandoc): Adjust.
14942 From Juan Manuel Guerrero.
14943
14944 2001-08-28 Marc Autret <autret_m@epita.fr>
14945
14946 * src/print_graph.c (print_state): Fix.
14947
14948 2001-08-27 Marc Autret <autret_m@epita.fr>
14949
14950 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14951 char * members.
14952 Echo modifications to the functions prototypes.
14953 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14954
14955 2001-08-27 Marc Autret <autret_m@epita.fr>
14956
14957 * src/vcg.c: Include `xalloc.h'.
14958 (add_colorentry): New.
14959 (add_classname): New.
14960 (add_infoname): New.
14961 * src/vcg.h: Add new prototypes.
14962
14963 2001-08-27 Akim Demaille <akim@epita.fr>
14964
14965 * Makefile.maint: Sync. again with CVS Autoconf.
14966
14967 2001-08-27 Akim Demaille <akim@epita.fr>
14968
14969 * Makefile.maint: Formatting changes.
14970 (po-update, cvs-update, update): New targets.
14971 (AMTAR): Remove.
14972
14973 2001-08-27 Akim Demaille <akim@epita.fr>
14974
14975 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14976 * Makefile.maint: Sync. with CVS Autoconf.
14977
14978 2001-08-27 Marc Autret <autret_m@epita.fr>
14979
14980 * src/vcg.h (struct infoname_s): New.
14981 (struct colorentry_s): New.
14982 (graph_s): New fields {vertical,horizontal}_order in structure.
14983 Add `infoname' field.
14984 Add `colorentry' field;
14985 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14986 (G_HORIZONTAL_ORDER): New.
14987 (G_INFONAME): New.
14988 (G_COLORENTRY): New.
14989 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14990 Add output of `infoname'.
14991 Add output of `colorentry'.
14992
14993 2001-08-27 Marc Autret <autret_m@epita.fr>
14994
14995 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14996 This one shadowed a global parameter.
14997
14998 2001-08-24 Marc Autret <autret_m@epita.fr>
14999
15000 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15001 instead of `unsigned'.
15002 (print_state): Do not call obstack_object_size () in obstack_grow ()
15003 to avoid macro variables shadowing.
15004
15005 2001-08-23 Marc Autret <autret_m@epita.fr>
15006
15007 * src/lex.c (percent_table): Typo: s/naem/name/.
15008 Add graph option.
15009 Normalize new options declarations.
15010
15011 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15012
15013 * tests/suite.at: Exercise %header_extension and %source_extension.
15014
15015 2001-08-16 Marc Autret <autret_m@epita.fr>
15016
15017 * src/reader.c (parse_dquoted_param): New.
15018 (parse_header_extension_decl): Use it.
15019 (parse_source_extension_decl): Likewise.
15020
15021 2001-08-16 Marc Autret <autret_m@epita.fr>
15022
15023 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15024 (get_xxxx_str): Use assert () instead of complain ().
15025 Remove return invokations in default cases.
15026 (get_decision_str): Modify default behaviour. Remove second argument.
15027 Echo modifications on calls.
15028 (output_graph): Fix.
15029
15030 2001-08-16 Marc Autret <autret_m@epita.fr>
15031
15032 * src/getargs.c (usage): Update with ``-g, --graph''.
15033
15034 2001-08-16 Marc Autret <autret_m@epita.fr>
15035
15036 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15037 (Option Cross Key): Likewise.
15038 * doc/bison.1: Update.
15039
15040 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
15041
15042 * src/output.c (output_master_parser): Don't finish action_obstack.
15043 (output_parser): Don't care about the muscle action, here.
15044 (prepare): Copy the action_obstack in the action muscle.
15045 (output): Free action_obstack.
15046
15047 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15048
15049 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15050 will contain `%union' declaration.
15051 (parse_union_decl): Delete #line directive output.
15052 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15053 informations about %union.
15054 (parse_union_decl): Copy the union_obstack in the muscle stype.
15055 * src/bison.simple: Add new #line directive.
15056 Add typdef %%stype YYSTYPE.
15057
15058 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15059
15060 * src/bison.simple: Add new `#line' directive.
15061
15062 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
15063
15064 * src/bison.simple: New `#line' directive.
15065 * src/output.c (output_parser): Support new dynamic muscle input_line.
15066
15067 2001-09-22 Marc Autret <autret_m@epita.fr>
15068
15069 * src/output.c (output_master_parser): New.
15070 (output_parser): Be more re-entrant.
15071
15072 2001-09-21 Marc Autret <autret_m@epita.fr>
15073
15074 * src/reader.c (copy_definition, parse_union_decl): Update and use
15075 `linef' muscle.
15076 (copy_action): Likewise.
15077 Use obstack_1grow ().
15078 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15079
15080 2001-09-21 Marc Autret <autret_m@epita.fr>
15081
15082 * src/options.c (option_table): Adjust.
15083 * src/lex.c (parse_percent_token): Fix.
15084
15085 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15086
15087 * src/options.c (symtab.h): Include it, need by lex.h.
15088
15089 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15090
15091 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15092 is now an option_table_struct*.
15093 (option_strcmp): New function option_strcmp.
15094 (parse_percent_token): Call option_strcmp.
15095 * src/getargs.c (xalloc.h, options.h): Include it.
15096 (getargs): Call create_long_option_table.
15097 (getargs): Free longopts at the end of the function.
15098 (shortopts): Move in options.c.
15099 * src/options.c (create_long_option_table): New function. Convert
15100 information from option_table to option structure.
15101 * src/reader.c (options.h): Include it.
15102
15103 * src/Makefile.am: Adjust.
15104 * src/options.c (option_table): Create from longopts and percent_table.
15105 * src/getargs.c (longopts): Delete.
15106 * src/lex.c (struct percent_table_struct): Delete.
15107 (percent_table): Delete.
15108 (options.h): Include it.
15109 * src/options.c: Create.
15110 * src/options.h: Create.
15111 Declare enum opt_access_e.
15112 Define struct option_table_struct.
15113
15114 2001-09-20 Marc Autret <autret_m@epita.fr>
15115
15116 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15117 sections of Bison.
15118
15119 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
15120
15121 * src/bison.simple: s/%%filename/%%skeleton.
15122 * src/muscle_tab.c (getargs.h): Include it.
15123 (muscle_init): Insert new muscle skeleton.
15124
15125 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
15126
15127 * src/output.c (output_parser): Delete unused variable actions_dumped.
15128
15129 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
15130
15131 * src/output.c (output): Delete call to reader_output_yylsp.
15132 * src/reader.c (reader): Likewise.
15133 * src/reader.h: Delete declaration of reader_output_yylsp.
15134
15135 2001-09-02 Marc Autret <autret_m@epita.fr>
15136
15137 * src/reader.c: Include muscle_tab.h.
15138 (parse_union_decl): Update.
15139 (parse_macro_decl): Rename parse_muscle_decl.
15140 Update to use renamed functions and variable.
15141 (read_declarations, copy_action, read_additionnal_code, : Updated
15142 with correct variables and functions names.
15143 (packsymbols, reader): Likewise.
15144
15145 * src/reader.h (muscle_obstack): Extern declaration update.
15146
15147 * src/output.c: Include muscle_tab.h
15148 In all functions using macro_insert, change by using muscle_insert ().
15149 (macro_obstack): Rename muscle_obstack.
15150 Echo modifications in the whole file.
15151 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15152 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15153 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15154
15155 * src/muscle_tab.h: Update double inclusion macros.
15156 (macro_entry_s): Rename muscle_entry_s.
15157 Update prototypes.
15158
15159 * src/muscle_tab.c: Include muscle_tab.h.
15160 Rename macro_tabble to muscle_table.
15161 (mhash1, mhash2, mcmp): Use muscle_entry.
15162 (macro_init): Rename muscle_init. Update.
15163 (macro_insert): Rename muscle_insert. Update.
15164 (macro_find): Rename muscle_find. Update.
15165
15166 * src/main.c: Include muscle_tab.h.
15167 (main): Call muscle_init ().
15168 * src/Makefile.am (bison_SOURCES): Echo modifications.
15169
15170 2001-09-02 Marc Autret <autret_m@epita.fr>
15171
15172 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15173
15174 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15175
15176 2001-09-02 Marc Autret <autret_m@epita.fr>
15177
15178 * src/macrotab.c, src/macrotab.h: Remove.
15179
15180 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15181
15182 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15183 filename.
15184
15185 2001-09-01 Marc Autret <autret_m@epita.fr>
15186
15187 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15188 to an explicit value to activate the feature. We do it here.
15189
15190 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15191
15192 * src/output.c (prepare): Delete the `filename' muscule insertion.
15193 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15194 (parse_union_decl): Likewise.
15195 * src/macrotab.c (macro_init): Initialize filename by infile.
15196
15197 2001-08-31 Marc Autret <autret_m@epita.fr>
15198
15199 * src/bison.simple (YYLSP_NEEDED): New definition.
15200 * src/output.c (prepare): Add macro insertion of `locations_flag'
15201
15202 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15203
15204 * src/output.c (prepare): Delete insertion of previous muscles,
15205 and insert the `prefix' muscles.
15206 * src/macrotab.c (macro_init): Likewise.
15207 (macro_init): Initialization prefix directive by `yy'.
15208 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15209 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15210 yylval, yydebug, yyerror, yynerrs and yyparse.
15211 New directive `#define' to substitute yydebug, ... with option
15212 name_prefix.
15213
15214 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15215
15216 * src/main.c (main): Standardize.
15217 * src/output.c (output_table_data, output_parser): Likewise.
15218 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15219
15220 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15221
15222 * src/reader.c (read_additionnal_code): Rename %%user_code to
15223 %%epilogue.
15224 * src/output.c (output): Rename %%declarations to %%prologue.
15225 * src/bison.simple: Echo modifications.
15226
15227 2001-08-31 Marc Autret <autret_m@epita.fr>
15228
15229 * src/reader.c (readgram): CleanUp.
15230 (output_token_defines): Likewise.
15231 (packsymbols): Likewise.
15232 (reader): Likewise.
15233 * src/output.c (output): CPP-out useless code.
15234
15235 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15236
15237 * src/reader.c (reader): Delete obsolete call to function
15238 output_trailers and output_headers.
15239 * src/output.h: Remove obsolete functions prototypes of output_headers
15240 and output_trailers.
15241
15242 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15243
15244 * src/main.c: Include macrotab.h.
15245 * src/macrotab.h (macro_entry_s): Constify fields.
15246 Adjust functions prototypes.
15247 * src/macrotab.c (macro_insert): Constify key and value.
15248 (macro_find): Constify key.
15249 (macro_insert): Include 'xalloc.h'
15250 (macro_insert): Use XMALLOC.
15251 (macro_find): Constify return value.
15252 * src/output.c (output_table_data): Rename table to table_data.
15253 (output_parser): Constify macro_key, macro_value.
15254
15255 2001-08-30 Marc Autret <autret_m@epita.fr>
15256
15257 * src/reader.c (parse_skel_decl): New.
15258 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15259 * src/lex.h (token_t): New token `tok_skel'.
15260 * src/lex.c (percent_table): Add skeleton option entry.
15261 Standardize.
15262
15263 2001-08-29 Marc Autret <autret_m@epita.fr>
15264
15265 * src/bison.simple: Add %%user_code directive at the end.
15266 * src/reader.c (read_additionnal_code): New.
15267 (reader): Use it.
15268 * src/output.c (output_program): Remove.
15269 (output): Update.
15270
15271 2001-08-28 Marc Autret <autret_m@epita.fr>
15272
15273 * src/output.c (output_actions): Clean up.
15274 (output_gram): CPP-out useless code.
15275 * src/reader.c (reader): Clean up, CPP-out useless code.
15276
15277 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15278
15279 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15280 directive.
15281 * src/bison.simple: Add `%%definitions'.
15282
15283 2001-08-28 Marc Autret <autret_m@epita.fr>
15284
15285 * config/depcomp: New file.
15286
15287 2001-08-27 Paul Eggert <eggert@twinsun.com>
15288
15289 * src/bison.simple (yyparse): Don't take the address of an
15290 item before the start of an array, as that doesn't conform to
15291 the C Standard.
15292
15293 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15294
15295 * src/output.c (output): Remove the initialization of the macro
15296 obstack. It was done too late here.
15297
15298 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15299 completely wrong.
15300 (reader): Initialize the macro obstack here, since we need it to grow
15301 '%define' directives.
15302
15303 * src/reader.h: Declare the macro obstack as extern.
15304
15305 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15306
15307 * src/output.c (output_parser): Fix. Store single '%' characters in
15308 the output obstack instead of throwing them away.
15309
15310 2001-08-27 Akim Demaille <akim@epita.fr>
15311
15312 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15313
15314 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15315
15316 * lib/Makefile.am: Adjust.
15317
15318 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15319
15320 * src/bison.simple: Update and add '%%' directives.
15321
15322 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15323
15324 * src/reader.c (reader): Remove calls to 'output_headers' and
15325 'output_trailers'. Remove some C output.
15326 (readgram): Disable a piece of code that was writing a default
15327 definition for 'YYSTYPE'.
15328 (reader_output_yylsp): Remove.
15329 (packsymbols): Output token defintions to a macro.
15330 (copy_definition): Disable C output.
15331
15332 * src/reader.c (parse_macro_decl): New function used to parse macro
15333 declarations.
15334 (copy_string2): Put the body of copy_string into this new function.
15335 Add a parameter to let the caller choose whether he wants to copy the
15336 string delimiters or not.
15337 (copy_string): Be a simple call to copy_string2 with the last argument
15338 bound to true.
15339 (read_declarations): Add case for macro definition.
15340 (copy_identifier): New.
15341 (parse_macro_decl): Read macro identifiers using copy_identifier
15342 rather than lex.
15343
15344 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15345
15346 * src/output.c (prepare): Add prefixed names.
15347 (output_parser): Output semantic actions.
15348 (output_parser): Fix bug on '%%line' directives.
15349
15350 * src/output.c (output_headers): Remove. The C code printed by this
15351 function should now be in the skeletons.
15352 (output_trailers): Remove.
15353 (output): Disable call to 'reader_output_yylsp'.
15354 (output_rule_data): Do not output tables to the table obstack.
15355
15356 * src/output.c: Remove some C dedicated output.
15357 Improve the use of macro and output obstacks.
15358 (output_defines): Remove.
15359
15360 * src/output.c (output_token_translations): Associate 'translate'
15361 table with a macro. No output to the table obstack.
15362 (output_gram): Same for 'rhs' and 'prhs'.
15363 (output_stos): Same for 'stos'.
15364 (output_rule_data): Same for 'r1' and 'r2'.
15365 (token_actions): Same for 'defact'.
15366 (goto_actions): Same for 'defgoto'.
15367 (output_base): Same for 'pact' and 'pgoto'.
15368 (output_table): Same for 'table'.
15369 (output_check): Same for 'check'.
15370
15371 * src/output.c (output_table_data): New function.
15372 (output_short_table): Remove.
15373 (output_short_or_char_table): Remove.
15374
15375 * src/output.c (output_parser): Replace most of the skeleton copy code
15376 with something new. Skeletons are now processed character by character
15377 rather than line by line, and Bison looks for '%%' macros. This is the
15378 first step in making Bison's output process (a lot) more flexible.
15379 (output_parser): Use the macro table.
15380
15381 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15382
15383 * src/main.c (main): Initialize the macro table.
15384
15385 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15386
15387 * src/lex.c (percent_table): Add tok_define.
15388 * src/lex.h: Add tok_define.
15389
15390 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15391
15392 * src/macrotab.c: New file.
15393 * src/macrotab.h: New file.
15394 * src/Makefile.am: Update.
15395
15396 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15397
15398 * lib/hash.c: New file.
15399 * lib/hash.h: New file.
15400 * lib/Makefile.am: Update.
15401
15402 2001-08-15 Akim Demaille <akim@epita.fr>
15403
15404 Version 1.28c.
15405
15406 2001-08-15 Marc Autret <autret_m@epita.fr>
15407
15408 * src/reader.c (readgram): Indent output macro YYSTYPE.
15409 (packsymbols): Likewise.
15410 (output_token_defines): Likewise.
15411 * src/files.c: Standardize.
15412 (compute_header_macro): New.
15413 (defines_obstack_save): New. Use compute_header_macro.
15414 (output_files): Update. Use defines_obstack_save.
15415
15416 2001-08-15 Akim Demaille <akim@epita.fr>
15417
15418 * doc/bison.texinfo (Table of Symbols): Document
15419 YYSTACK_USE_ALLOCA.
15420
15421 2001-08-15 Akim Demaille <akim@epita.fr>
15422
15423 * missing: Update from CVS Automake.
15424 * config/config.guess, config/config.sub, config/texinfo.tex:
15425 Update from gnu.org.
15426
15427 2001-08-15 Akim Demaille <akim@epita.fr>
15428
15429 * Makefile.maint: Sync with CVS Autoconf.
15430
15431 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15432
15433 * doc/bison.texinfo: Include GNU Free Documentation License from
15434 `fdl.texi'.
15435 * doc/fdl.texi: Add to package.
15436
15437 2001-08-14 Marc Autret <autret_m@epita.fr>
15438
15439 Turn on %{source,header}_extension features.
15440
15441 * src/lex.c (percent_table): Un-CPP out header_extension and
15442 source_extension.
15443 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15444 (compute_exts_from_src): Remove conditions. It restores priorities
15445 between options.
15446
15447 2001-08-14 Marc Autret <autret_m@epita.fr>
15448
15449 * src/files.c (compute_base_names): Add extensions computing when
15450 `--file-prefix' used.
15451 Standardize function calls.
15452
15453 2001-08-13 Marc Autret <autret_m@epita.fr>
15454
15455 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15456 defining it (defined but null disables alloca).
15457
15458 2001-08-13 Marc Autret <autret_m@epita.fr>
15459
15460 * src/bison.simple (_yy_memcpy): CPP reformat.
15461
15462 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15463
15464 * tests/atconfig.in (CPPFLAGS): Fix.
15465
15466 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15467
15468 * doc/bison.texinfo: Include GNU General Public License from
15469 `gpl.texi'.
15470 * doc/gpl.texi: Add to package.
15471
15472 2001-08-10 Marc Autret <autret_m@epita.fr>
15473
15474 * src/print_graph.h: Fix.
15475 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15476
15477 2001-08-10 Akim Demaille <akim@epita.fr>
15478
15479 * src/system.h: Provide default declarations for stpcpy, strndup,
15480 and strnlen.
15481
15482 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15483
15484 * doc/bison.texinfo (Locations): Update @$ stuff.
15485
15486 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15487
15488 * src/bison.simple (YYLLOC_DEFAULT): Update.
15489 (yyparse): Adjust.
15490
15491 2001-08-08 Marc Autret <autret_m@epita.fr>
15492
15493 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15494 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15495 Reported by Fabrice Bauzac.
15496
15497 2001-08-08 Marc Autret <autret_m@epita.fr>
15498
15499 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15500 * src/vcg.c (output_node): Fix.
15501 * src/vcg.h: Cleanup.
15502 * src/print_graph.c: Add comments.
15503 (node_output_size): New global variable. Simplify the formatting of
15504 the VCG graph output.
15505 (print_actions): Unused code is now used. It notifies the final state
15506 and no action states in the VCG graph. It also give the reduce actions.
15507 The `shift and goto' edges are red and the `go to state' edges are
15508 blue.
15509 Get the current node name and node_obstack by argument.
15510 (node_obstack): New variable.
15511 (print_state): Manage node_obstack.
15512 (print_core): Use node_obstack given by argument.
15513 A node is not only computed here but in print_actions also.
15514 (print_graph): CPP out useless code instead of commenting it.
15515
15516 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15517
15518 * tests/atconfig.in (CPPFLAGS): Fix.
15519
15520 2001-08-07 Akim Demaille <akim@epita.fr>
15521
15522 * src/print_graph.c (quote): New.
15523 (print_core): Use it.
15524
15525 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15526
15527 * src/vcg.c (complain.h): Include it.
15528 Unepitaize `return' invocations.
15529 [NDEBUG] (main): Remove.
15530 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15531 * src/files.c (open_files): Initialize graph_obstack.
15532 * src/print_graph.c (print_actions): CPP out useless code.
15533 (print_core): Don't output the last `\n' in labels.
15534 Use `quote'.
15535 * src/files.c (output_files): Output the VCG file.
15536 * src/main.c (main): Invoke print_graph ();
15537
15538 2001-08-06 Marc Autret <autret_m@epita.fr>
15539
15540 Automaton VCG graph output.
15541 Using option ``-g'' or long option ``--graph'', you can generate
15542 a gram_filename.vcg file containing a VCG description of the LALR (1)
15543 automaton of your grammar.
15544
15545 * src/main.c: Call to print_graph() function.
15546 * src/getargs.h: Update.
15547 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15548 (graph_flag): New flag.
15549 (longopts): Update.
15550 (getargs): Add case `g'.
15551 * src/files.c (graph_obstack): New obstack struct.
15552 (open_files): Initialize new obstack.
15553 (output_files): Saves graph_obstack if required.
15554 * src/files.h (graph_obstack): New extern declaration.
15555 * src/Makefile.am: Add new source files.
15556
15557 2001-08-06 Marc Autret <autret_m@epita.fr>
15558
15559 * src/print_graph.c, src/print_graph.h (graph): New.
15560 * src/vcg.h: New file.
15561 * src/vcg.c: New file, VCG graph handling.
15562
15563 2001-08-06 Marc Autret <autret_m@epita.fr>
15564
15565 Add of %source_extension and %header_extension which specify
15566 the source or/and the header output file extension.
15567
15568 * src/files.c (compute_base_names): Remove initialisation of
15569 src_extension and header_extension.
15570 (compute_exts_from_gf): Update.
15571 (compute_exts_from_src): Update.
15572 (output_files): Update.
15573 * src/reader.c (parse_header_extension_decl): New.
15574 (parse_source_extension_decl): New.
15575 (read_declarations): New case statements for the new tokens.
15576 * src/lex.c (percent_table): Add entries for %source_extension
15577 and %header_extension.
15578 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15579
15580 2001-08-06 Marc Autret <autret_m@epita.fr>
15581
15582 * configure.in: Bump to 1.28c.
15583 * doc/bison.texinfo: Texinfo thingies.
15584
15585 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15586
15587 * tests/atconfig.in (CPPFLAGS): Add.
15588 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15589
15590 2001-08-03 Akim Demaille <akim@epita.fr>
15591
15592 Version 1.28b.
15593
15594 2001-08-03 Akim Demaille <akim@epita.fr>
15595
15596 * tests/Makefile.am (check-local): Ship testsuite.
15597 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15598 Include `string.h'.
15599
15600 2001-08-03 Akim Demaille <akim@epita.fr>
15601
15602 * configure.in: Try using -Wformat when compiling.
15603
15604 2001-08-03 Akim Demaille <akim@epita.fr>
15605
15606 * configure.in: Bump to 1.28b.
15607
15608 2001-08-03 Akim Demaille <akim@epita.fr>
15609
15610 * src/complain.c: Adjust strerror_r portability issues.
15611
15612 2001-08-03 Akim Demaille <akim@epita.fr>
15613
15614 Version 1.28a.
15615
15616 2001-08-03 Akim Demaille <akim@epita.fr>
15617
15618 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15619 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15620 * src/getargs.c: Include complain.h.
15621 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15622 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15623
15624 2001-08-03 Akim Demaille <akim@epita.fr>
15625
15626 * src/reader.c (readgram): Display hidden chars in error messages.
15627
15628 2001-08-03 Akim Demaille <akim@epita.fr>
15629
15630 Update to gettext 0.10.39.
15631
15632 2001-08-03 Akim Demaille <akim@epita.fr>
15633
15634 * lib/strspn.c: New.
15635
15636 2001-08-01 Marc Autret <autret_m@epita.fr>
15637
15638 * doc/bison.texinfo: Update.
15639 * doc/bison.1 (mandoc): Update.
15640 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15641 * src/files.c: Support output files extensions computing.
15642 (src_extension): New static variable.
15643 (header_extension): New static variable.
15644 (tr): New function.
15645 (get_extension_index): New function, gets the index of an extension
15646 filename in a string.
15647 (compute_exts_from_gf): New function, computes extensions from the
15648 grammar file extension.
15649 (compute_exts_from_src): New functions, computes extensions from the
15650 C source file extension, file given by ``-o'' option.
15651 (compute_base_names): Update.
15652 (output_files): Update.
15653
15654 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15655
15656 * doc/bison.texi: Document @$.
15657 (Locations): New section.
15658
15659 2001-07-18 Akim Demaille <akim@epita.fr>
15660
15661 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15662 * config/prev-version.txt, config/move-if-change: New.
15663 * Makefile.am: Adjust.
15664
15665 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15666
15667 * src/bison.simple (yyparse): Suppress warning `comparaison
15668 between signed and unsigned'.
15669
15670 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15671
15672 * src/getargs.h (raw_flag): Remove.
15673 * src/getargs.c: Die on `-r'/`--raw'.
15674 * src/lex.c (parse_percent_token): Die on `%raw'.
15675 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15676 * tests/calc.at: Suppress test with option `--raw'.
15677
15678 2001-07-14 Akim Demaille <akim@epita.fr>
15679
15680 * config/: New.
15681 * configure.in: Require Autoconf 2.50.
15682 Update to gettext 0.10.38.
15683
15684 2001-03-16 Akim Demaille <akim@epita.fr>
15685
15686 * doc/bison.texinfo: ANSIfy the examples.
15687
15688 2001-03-16 Akim Demaille <akim@epita.fr>
15689
15690 * getargs.c (skeleton): New variable.
15691 (longopts): --skeleton is a new option.
15692 (shortopts, getargs): -S is a new option.
15693 * getargs.h: Declare skeleton.
15694 * output.c (output_parser): Use it.
15695
15696 2001-03-16 Akim Demaille <akim@epita.fr>
15697
15698 * m4/strerror_r.m4: New.
15699 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15700 * lib/error.h, lib/error.c: Update.
15701
15702 2001-03-16 Akim Demaille <akim@epita.fr>
15703
15704 * src/getargs.c (longopts): Clean up.
15705
15706 2001-02-21 Akim Demaille <akim@epita.fr>
15707
15708 * src/reader.c (gensym): `gensym_count' is your own.
15709 Use a static buf to create the symbol name, as token_buffer is no
15710 longer a buffer.
15711
15712 2001-02-08 Akim Demaille <akim@epita.fr>
15713
15714 * src/conflicts.c (conflict_report): Be sure not to append to res
15715 between two calls, which could happen if both first sprintf were
15716 skipped, but not the first cp += strlen.
15717
15718 2001-02-08 Akim Demaille <akim@epita.fr>
15719
15720 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15721 New, from fileutils 4.0.37.
15722 * configure.in: Require Autoconf 2.49c. I took some time before
15723 making this decision. This is the only way out for portability
15724 issues in Bison, it would mean way too much duplicate effort to
15725 import in Bison features implemented in 2.49c since 2.13.
15726 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15727
15728 2001-02-02 Akim Demaille <akim@epita.fr>
15729
15730 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15731 * lib/xalloc.h, lib/xmalloc.c: Update.
15732
15733 2001-01-19 Akim Demaille <akim@epita.fr>
15734
15735 Get rid of the ad hoc handling of token_buffer in the scanner: use
15736 the obstacks.
15737
15738 * src/lex.c (token_obstack): New.
15739 (init_lex): Initialize it. No longer call...
15740 (grow_token_buffer): this. Remove it.
15741 Adjust all the places which used it to use the obstack.
15742
15743 2001-01-19 Akim Demaille <akim@epita.fr>
15744
15745 * src/lex.h: Rename all the tokens:
15746 s/\bENDFILE\b/tok_eof/g;
15747 s/\bIDENTIFIER\b/tok_identifier/g;
15748 etc.
15749 Let them be enums, not #define, to ease debugging.
15750 Adjust all the code.
15751
15752 2001-01-18 Akim Demaille <akim@epita.fr>
15753
15754 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15755 * src/lex.c (maxtoken, grow_token_buffer): Static.
15756
15757 2001-01-18 Akim Demaille <akim@epita.fr>
15758
15759 Since we now use obstacks, more % directives can be enabled.
15760
15761 * src/lex.c (percent_table): Also accept `%yacc',
15762 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15763 `%debug'.
15764 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15765 instead of returning a token.
15766 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15767 * src/reader.c (read_declarations): Adjust.
15768 * src/files.c (open_files): Don't call `compute_base_names', don't
15769 compute `attrsfile' since they depend upon data which might be
15770 *in* the input file now.
15771 (output_files): Do it here.
15772 * src/output.c (output_headers): Document the fact that this patch
15773 introduces a guaranteed SEGV for semantic parsers.
15774 * doc/bison.texinfo: Document them.
15775 * tests/suite.at: Exercise these %options.
15776
15777 2000-12-20 Akim Demaille <akim@epita.fr>
15778
15779 Also handle the output file (--verbose) with obstacks.
15780
15781 * files.c (foutput): Remove.
15782 (output_obstack): New.
15783 Adjust all dependencies.
15784 * src/conflicts.c: Return a string.
15785 * src/system.h (obstack_grow_string): Rename as...
15786 (obstack_sgrow): this. Be ready to work with non literals.
15787 (obstack_fgrow4): New.
15788
15789 2000-12-20 Akim Demaille <akim@epita.fr>
15790
15791 * src/files.c (open_files): Fix the computation of short_base_name
15792 in the case of `-o foo.tab.c'.
15793
15794 2000-12-20 Akim Demaille <akim@epita.fr>
15795
15796 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15797 (copy_dollar): Now that everything uses obstacks, get rid of the
15798 FILE * parameters.
15799
15800 2000-12-20 Akim Demaille <akim@epita.fr>
15801
15802 * src/files.c (open_files): Actually the `.output' file is based
15803 on the short_base_name, not base_name.
15804 * tests/suite.at (Checking output file names): Adjust.
15805
15806 2000-12-20 Akim Demaille <akim@epita.fr>
15807
15808 * src/bison.s1: Remove, we now use directly...
15809 * src/bison.simple: this.
15810 * src/Makefile.am: Use pkgdata instead of data.
15811
15812 2000-12-20 Akim Demaille <akim@epita.fr>
15813
15814 * src/files.c (guard_obstack): New.
15815 (open_files): Initialize it.
15816 (output_files): Dump it...
15817 * src/files.h: Export it.
15818 * src/reader.c (copy_guard): Use it.
15819
15820 2000-12-19 Akim Demaille <akim@epita.fr>
15821
15822 * src/files.c (outfile, defsfile, actfile): Removed as global
15823 vars.
15824 (open_files): Don't compute them.
15825 (output_files): Adjust.
15826 (base_name, short_base_name): Be global.
15827 Adjust dependencies.
15828
15829 2000-12-19 Akim Demaille <akim@epita.fr>
15830
15831 * src/files.c (strsuffix): New.
15832 (stringappend): Be just like strcat but allocate.
15833 (base_names): Eve out from open_files.
15834 Try to simplify the rather hairy computation of base_name and
15835 short_base_name.
15836 (open_files): Use it.
15837 * tests/suite.at (Checking output file names): New test.
15838
15839 2000-12-19 Akim Demaille <akim@epita.fr>
15840
15841 * src/system.h (obstack_grow_literal_string): Rename as...
15842 (obstack_grow_string): this.
15843 * src/output.c (output_parser): Recognize `%% actions' instead of
15844 `$'.
15845 * src/bison.s1: s/$/%% actions/.
15846 * src/bison.hairy: Likewise.
15847
15848 2000-12-19 Akim Demaille <akim@epita.fr>
15849
15850 * src/output.c (output_parser): Compute the `#line' lines when
15851 there are.
15852 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15853 Suggested by Hans Aberg.
15854
15855 2000-12-19 Akim Demaille <akim@epita.fr>
15856
15857 Let the handling of the skeleton files be local to the procedures
15858 that use it.
15859
15860 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15861 longer static.
15862 (fparser, open_extra_files): Remove.
15863 (open_files, output_files): Don't take care of fparser.
15864 * src/files.h: Adjust.
15865 * src/output.c (output_parser): Open and close the file to the
15866 skeleton.
15867 * src/reader.c (read_declarations): When %semantic_parser, open
15868 fguard.
15869
15870 2000-12-19 Akim Demaille <akim@epita.fr>
15871
15872 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15873 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15874
15875 2000-12-19 Akim Demaille <akim@epita.fr>
15876
15877 * src/files.c (open_files): Yipee! We no longer need all the code
15878 looking for `/tmp' since we have no tmp file.
15879
15880 2000-12-19 Akim Demaille <akim@epita.fr>
15881
15882 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15883 New macros.
15884 * src/files.c (open_files): Less dependency on MSDOS etc.
15885
15886 2000-12-14 Akim Demaille <akim@epita.fr>
15887
15888 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15889 Provide a default definition.
15890 Use it when executing the default @ action.
15891 * src/reader.c (reader_output_yylsp): No longer include
15892 `timestamp' and `text' in the default YYLTYPE.
15893
15894 2000-12-12 Akim Demaille <akim@epita.fr>
15895
15896 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15897 (copy_guard): Quote the file names.
15898 Reported by Laurent Mascherpa.
15899
15900 2000-12-12 Akim Demaille <akim@epita.fr>
15901
15902 * src/output.c (output_headers, output_program, output): Be sure
15903 to escape special characters when outputting filenames.
15904 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15905 (output_headers): Don't depend on them, Use ACTSTR.
15906
15907 2000-11-17 Akim Demaille <akim@epita.fr>
15908
15909 * lib/obstack.h: Formatting changes.
15910 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15911 prevents type checking.
15912 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15913 cast the value to (void *): assigning a `foo *' to a `void *'
15914 variable is valid.
15915 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15916 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15917 append characters.
15918
15919 2000-11-17 Akim Demaille <akim@epita.fr>
15920
15921 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15922 as...
15923 (suite.m4, regression.m4, calc.m4): these.
15924 * tests/atgeneral.m4: Update from CVS Autoconf.
15925
15926 2000-11-17 Akim Demaille <akim@epita.fr>
15927
15928 * tests/regression.m4 (%union and --defines): New test,
15929 demonstrating a current bug in the obstack implementation.
15930
15931 2000-11-17 Akim Demaille <akim@epita.fr>
15932
15933 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15934 macros.
15935 Use them to declare the variables which are global or local to
15936 `yyparse'.
15937
15938 2000-11-17 Akim Demaille <akim@epita.fr>
15939
15940 * acconfig.h: Remove, no longer used.
15941
15942 2000-11-07 Akim Demaille <akim@epita.fr>
15943
15944 * src: s/Copyright (C)/Copyright/g.
15945
15946 2000-11-07 Akim Demaille <akim@epita.fr>
15947
15948 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15949 defining.
15950 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15951
15952 2000-11-07 Akim Demaille <akim@epita.fr>
15953
15954 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15955 Merge in a single CPP if/else.
15956
15957 2000-11-07 Akim Demaille <akim@epita.fr>
15958
15959 * src/output.c (output): Remove useless variables.
15960 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15961 argument `data' for consistency with the prototypes.
15962 Qualify it `const'.
15963 (obstack_copy, obstack_copy0): Rename the second argument as
15964 `address' for consistency. Qualify it `const'.
15965 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15966 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15967 `const' their input argument (`data' or `address').
15968 Adjust the corresponding macros to include `const' in casts.
15969
15970 2000-11-03 Akim Demaille <akim@epita.fr>
15971
15972 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15973 s/PFILE1/BISON_HAIRY/.
15974 Adjust dependencies.
15975
15976 2000-11-03 Akim Demaille <akim@epita.fr>
15977
15978 For some reason, this was not applied.
15979
15980 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15981 `unlink': it's no longer used.
15982
15983 2000-11-03 Akim Demaille <akim@epita.fr>
15984
15985 * src/files.c (skeleton_find): New function, eved out of...
15986 (open_files, open_extra_files): here.
15987
15988 2000-11-03 Akim Demaille <akim@epita.fr>
15989
15990 Don't use `atexit'.
15991
15992 * src/files.c (obstack_save): New function.
15993 (done): Rename as...
15994 (output_files): this.
15995 Use `obstack_save'.
15996 * src/main.c (main): Don't use `atexit' to register `done', since
15997 it no longer has to remove tmp files, just call `output_files'
15998 when there are no errors.
15999
16000 2000-11-02 Akim Demaille <akim@epita.fr>
16001
16002 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16003 `unlink': it's no longer used.
16004 * src/files.h: Formatting changes.
16005
16006 2000-11-02 Akim Demaille <akim@epita.fr>
16007
16008 Remove the last uses of mktemp and unlink/delete.
16009
16010 * src/files.c (fdefines, ftable): Removed.
16011 (defines_ostack, table_obstack): New.
16012 Adjust dependencies of the former into uses of the latter.
16013 * src/output.c (output_short_or_char_table, output_short_table):
16014 Convert to using obstacks.
16015 * src/reader.c (copy_comment2): Accept one FILE * and two
16016 obstacks.
16017 (output_token_defines, reader_output_yylsp): Use obstacks.
16018 * src/system.h (obstack_fgrow3): New.
16019 * po/POTFILES.in: Adjust.
16020
16021 2000-11-01 Akim Demaille <akim@epita.fr>
16022
16023 Change each use of `fattrs' into a use of `attrs_obstack'.
16024
16025 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16026 * src/files.c (fattrs): Remove.
16027 (attrs_obstack): New.
16028 Adjust all dependencies.
16029 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16030
16031 2000-11-01 Akim Demaille <akim@epita.fr>
16032
16033 Introduce obstacks.
16034 Change each use of `faction' into a use of `action_obstack'.
16035
16036 * lib/obstack.h, lib/obstack.c: New files.
16037 * src/files.c (faction): Remove.
16038 (action_obstack): New.
16039 Adjust all dependencies.
16040
16041 2000-10-20 Akim Demaille <akim@epita.fr>
16042
16043 * lib/quote.h (PARAMS): New macro. Use it.
16044
16045 2000-10-16 Akim Demaille <akim@epita.fr>
16046
16047 * src/output.c (output_short_or_char_table): New function.
16048 (output_short_table, output_token_translations): Use it.
16049 (goto_actions): Use output_short_table.
16050
16051 2000-10-16 Akim Demaille <akim@epita.fr>
16052
16053 * src/symtab.c (bucket_new): New function.
16054 (getsym): Use it.
16055
16056 * src/output.c (output_short_table): New argument to display the
16057 comment associated with the table.
16058 Adjust dependencies.
16059 (output_gram): Use it.
16060 (output_rule_data): Nicer output layout for YYTNAME.
16061
16062 2000-10-16 Akim Demaille <akim@epita.fr>
16063
16064 * src/lex.c (read_typename): New function.
16065 (lex): Use it.
16066 * src/reader.c (copy_dollar): Likewise.
16067
16068 2000-10-16 Akim Demaille <akim@epita.fr>
16069
16070 * src/reader.c (copy_comment2): Expect the input stream to be on
16071 the `/' which is suspected to open a comment, instead of being
16072 called after `//' or `/*' was read.
16073 (copy_comment, copy_definition, parse_union_decl, copy_action)
16074 (copy_guard): Adjust.
16075
16076 2000-10-16 Akim Demaille <akim@epita.fr>
16077
16078 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16079 `read_signed_integer'.
16080
16081 2000-10-16 Akim Demaille <akim@epita.fr>
16082
16083 * src/reader.c (copy_dollar): New function.
16084 (copy_guard, copy_action): Use it.
16085
16086 2000-10-16 Akim Demaille <akim@epita.fr>
16087
16088 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16089 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16090 New files, from Fileutils 4.0.27.
16091 * src/main.c (printable_version): Remove.
16092 * src/lex.c, src/reader.c: Use `quote'.
16093
16094 2000-10-04 Akim Demaille <akim@epita.fr>
16095
16096 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16097
16098 2000-10-04 Akim Demaille <akim@epita.fr>
16099
16100 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16101
16102 2000-10-04 Akim Demaille <akim@epita.fr>
16103
16104 When a literal string is used to define two different tokens,
16105 `bison -v' segfaults.
16106 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16107
16108 * tests/regression.m4: New file.
16109 Include the core of the sample provided by Piotr Gackiewicz.
16110 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16111 properly.
16112
16113 2000-10-04 Akim Demaille <akim@epita.fr>
16114
16115 * src/reader.c (parse_expect_decl): Keep `count' within the size
16116 of `buffer'.
16117 From Neil Booth.
16118
16119 2000-10-02 Paul Eggert <eggert@twinsun.com>
16120
16121 * bison.s1 (yyparse): Assign the default value
16122 unconditionally, to avoid a GCC warning and make the parser a
16123 tad smaller.
16124
16125 2000-10-02 Akim Demaille <akim@epita.fr>
16126
16127 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16128 options.
16129
16130 2000-10-02 Akim Demaille <akim@epita.fr>
16131
16132 * src/derives.c, src/print.c, src/reduce.c: To ease the
16133 translation, move some `\n' out of the translated strings.
16134
16135 2000-10-02 Akim Demaille <akim@epita.fr>
16136
16137 The location tracking mechanism is precious for parse error
16138 messages. Nevertheless, it is enabled only when `@n' is used in
16139 the grammar, which is a different issue (you can use it in error
16140 message, but not in the grammar per se). Therefore, there should
16141 be another means to enable it.
16142
16143 * src/getargs.c (getargs): Support `--locations'.
16144 (usage): Report it.
16145 * src/getargs.h (locationsflag): Export it.
16146 * src/lex.c (percent_table): Support `%locations'.
16147 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16148 with `locationsflag'.
16149 * doc/bison.texinfo: Document `--locations' and `%locations'.
16150 Sort the options.
16151 * tests/calc.m4: Test it.
16152
16153 For regularity of the names, replace each
16154 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16155 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16156 In addition replace each `flag' with `_flag'.
16157
16158 2000-10-02 Akim Demaille <akim@epita.fr>
16159
16160 Also test parse error messages, including with YYERROR_VERBOSE.
16161
16162 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16163 associative).
16164 Use it to check the computations.
16165 Use it to check `nonassoc' is honored.
16166 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16167 `--yyerror-verbose'.
16168 (_AT_CHECK_CALC): Adjust to this option.
16169 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16170
16171 2000-10-02 Akim Demaille <akim@epita.fr>
16172
16173 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16174 the latter demonstrates a flaw in the handling of non debugging
16175 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16176 was used in order to simplify:
16177
16178 #if YYDEBUG
16179 if (yydebug)
16180 {
16181 ...
16182 }
16183 #endif
16184
16185 into
16186
16187 if (yydebug)
16188 {
16189 ...
16190 }
16191
16192 unfortunately this leads to a CPP conflict when
16193 `--name-prefix=foo' is used since it produces `#define yydebug
16194 foodebug'.
16195
16196 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16197 (YYDPRINTF): New macro.
16198 Spread its use.
16199 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16200 the bison options.
16201 Also test `--verbose', `--defines' and `--name-prefix'.
16202
16203 2000-10-02 Akim Demaille <akim@epita.fr>
16204
16205 Improve the readability of the produced parsers.
16206
16207 * src/bison.s1: Formatting changes.
16208 Improve the comment related to the `$' mark.
16209 (yydefault): Don't fall through to `yyresume': `goto' there.
16210 * src/output.c (output_parser): When the `$' is met, skip the end
16211 of its line.
16212 New variable, `number_of_dollar_signs', to check there's exactly
16213 one `$' in the parser skeleton.
16214
16215 2000-10-02 Akim Demaille <akim@epita.fr>
16216
16217 * lib/xstrdup.c: New file, from the fileutils.
16218 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16219 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16220 instead of strlen + xmalloc + strcpy.
16221 * src/symtab.c (copys): Remove, use xstrdup instead.
16222
16223 2000-10-02 Akim Demaille <akim@epita.fr>
16224
16225 * src/gram.h (associativity): New enum type which replaces the
16226 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16227 `right_assoc', `left_assoc' and `non_assoc'.
16228 Adjust all dependencies.
16229 * src/reader.c: Formatting changes.
16230 (LTYPESTR): Don't define it, use it as a literal in
16231 `reader_output_yylsp'.
16232 * src/symtab.h (symbol_class): New enum type which replaces the
16233 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16234 `sunknown', `stoken and `snterm'.
16235
16236 2000-10-02 Akim Demaille <akim@epita.fr>
16237
16238 * src/getargs.c (fixed_outfiles): Rename as...
16239 (yaccflag): for consistency and accuracy.
16240 Adjust dependencies.
16241
16242 2000-10-02 Akim Demaille <akim@epita.fr>
16243
16244 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16245 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16246 difficult and introduced a lot of core dump. It turns out that
16247 Bison used an implementation of `xmalloc' based on `calloc', and
16248 at various places it does depend upon the initialization to 0. I
16249 have not tried to isolate the pertinent places, and all the former
16250 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16251 someone should address this issue.
16252
16253 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16254 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16255 files.
16256 Adjust dependencies.
16257 * src/warshall.h: New file.
16258 Propagate.
16259
16260 2000-10-02 Akim Demaille <akim@epita.fr>
16261
16262 Various anti-`extern in *.c' changes.
16263
16264 * src/system.h: Include `assert.h'.
16265
16266 2000-10-02 Akim Demaille <akim@epita.fr>
16267
16268 * src/state.h (nstates, final_state, first_state, first_shift)
16269 (first_reduction): Move their exportation from here...
16270 * src/LR0.h: to here.
16271 Adjust dependencies.
16272 * src/getargs.c (statisticsflag): New variable.
16273 Add support for `--statistics'.
16274 Adjust dependencies.
16275
16276 Remove a lot of now useless `extern' statements in most files.
16277
16278 2000-10-02 Akim Demaille <akim@epita.fr>
16279
16280 * src/LR0.h: New file.
16281 Propagate its use.
16282
16283 2000-10-02 Akim Demaille <akim@epita.fr>
16284
16285 * src/print.h: New file.
16286 Propagate its use.
16287 * src/print.c: Formatting and ordering changes.
16288 (verbose, terse): Replace with...
16289 (print_results): this new function.
16290 Adjust dependencies.
16291
16292 2000-10-02 Akim Demaille <akim@epita.fr>
16293
16294 * src/conflicts.c (conflict_report): New function.
16295 (conflict_log, verbose_conflict_log): Replace with...
16296 (print_conflicts): this function.
16297 Adjust dependencies.
16298 * src/conflicts.h: New file.
16299 Propagate its inclusion.
16300
16301 2000-10-02 Akim Demaille <akim@epita.fr>
16302
16303 * src/nullable.h: New file.
16304 Propagate its inclusion.
16305 * src/nullable.c: Formatting changes.
16306
16307 2000-10-02 Akim Demaille <akim@epita.fr>
16308
16309 * src/reduce.h: New file.
16310 Propagate its inclusion.
16311 * src/reduce.c: Topological sort and other formatting changes.
16312 (bool, TRUE, FALSE): Move their definition to...
16313 * src/system.h: here.
16314
16315 2000-10-02 Akim Demaille <akim@epita.fr>
16316
16317 * src/files.c: Formatting changes.
16318 (tryopen, tryclose, openfiles): Rename as...
16319 (xfopen, xfclose, open_files): this.
16320 (stringappend): static.
16321 * src/files.h: Complete the list of exported symbols.
16322 Propagate its use.
16323
16324 2000-10-02 Akim Demaille <akim@epita.fr>
16325
16326 * src/reader.h: New file.
16327 Propagate its use instead of tedious list of `extern' and
16328 prototypes.
16329 * src/reader.c: Formatting changes, topological sort,
16330 s/register//.
16331
16332 2000-10-02 Akim Demaille <akim@epita.fr>
16333
16334 * src/lex.h: Prototype `lex.c' exported functions.
16335 * src/reader.c: Adjust.
16336 * src/lex.c: Formatting changes.
16337 (safegetc): Rename as...
16338 (xgetc): this.
16339
16340 2000-10-02 Akim Demaille <akim@epita.fr>
16341
16342 * src/lalr.h: New file.
16343 Propagate its inclusion instead of prototypes and `extern'.
16344 * src/lalr.c: Formatting changes, topological sorting etc.
16345
16346 2000-10-02 Akim Demaille <akim@epita.fr>
16347
16348 * src/output.c (token_actions): Introduce a temporary array,
16349 YYDEFACT, that makes it possible for this function to use
16350 output_short_table.
16351
16352 2000-10-02 Akim Demaille <akim@epita.fr>
16353
16354 `user_toknums' is output as a `short[]' in `output.c', while it is
16355 defined as a `int[]' in `reader.c'. For consistency with the
16356 other output tables, `user_toknums' is now defined as a table of
16357 shorts.
16358
16359 * src/reader.c (user_toknums): Be a short table instead of an int
16360 table.
16361 Adjust dependencies.
16362
16363 Factor the short table outputs.
16364
16365 * src/output.c (output_short_table): New function.
16366 * src/output.c (output_gram, output_stos, output_rule_data)
16367 (output_base, output_table, output_check): Use it.
16368
16369 2000-10-02 Akim Demaille <akim@epita.fr>
16370
16371 * src/output.c (output): Topological sort of the functions, in
16372 order to get rid of the `static' prototypes.
16373 No longer use `register'.
16374 * src/output.h: New file.
16375 Propagate its inclusion in files explicitly prototyping functions
16376 from output.c.
16377
16378 2000-09-21 Akim Demaille <akim@epita.fr>
16379
16380 * src/atgeneral.m4: Update from Autoconf.
16381
16382 2000-09-21 Akim Demaille <akim@epita.fr>
16383
16384 * src/closure.h: New file.
16385 * src/closure.c: Formatting changes, topological sort over the
16386 functions, use of closure.h.
16387 (initialize_closure, finalize_closure): Rename as...
16388 (new_closure, free_closure): these. Adjust dependencies.
16389 * src/LR0.c: Formatting changes, topological sort, use of
16390 cloture.h.
16391 (initialize_states): Rename as...
16392 (new_states): this.
16393 * src/Makefile.am (noinst_HEADERS): Adjust.
16394
16395 2000-09-20 Akim Demaille <akim@epita.fr>
16396
16397 * src/acconfig.h: Don't protect config.h against multiple
16398 inclusion.
16399 Don't define PARAMS.
16400 * src/system.h: Define PARAMS.
16401 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16402 purpose of config.h. system.h must not try to fix wrong
16403 definitions in config.h.
16404
16405 2000-09-20 Akim Demaille <akim@epita.fr>
16406
16407 * src/derives.h: New file.
16408 * src/main.c, src/derives.h: Use it.
16409 Formatting changes.
16410 * src/Makefile.am (noinst_HEADERS): Adjust.
16411
16412 2000-09-20 Akim Demaille <akim@epita.fr>
16413
16414 * tests/atgeneral.m4: Update from Autoconf.
16415 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16416 (AT_CHECK_CALC): New macros.
16417 Use these macros to test bison with options `', `--raw',
16418 `--debug', `--yacc', `--yacc --debug'.
16419
16420 2000-09-19 Akim Demaille <akim@epita.fr>
16421
16422 * src/output.c: Formatting changes.
16423 * src/machine.h: Remove, leaving its contents in...
16424 * src/system.h: here.
16425 Include stdio.h.
16426 Adjust all dependencies on stdio.h and machine.h.
16427 * src/getargs.h: New file.
16428 Let all `extern' declarations about getargs.c be replaced with
16429 inclusion of `getargs.h'.
16430 * src/Makefile.am (noinst_HEADERS): Adjust.
16431
16432 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16433 scope.
16434 (yyerror): Returns void, not int.
16435 * doc/bison.texinfo: Formatting changes.
16436
16437 2000-09-19 Akim Demaille <akim@epita.fr>
16438
16439 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16440 portable.
16441
16442 2000-09-18 Akim Demaille <akim@epita.fr>
16443
16444 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16445 * src/Makefile.am (INCLUDES): Don't.
16446 Be ready to fetch headers in lib/.
16447
16448 2000-09-18 Akim Demaille <akim@epita.fr>
16449
16450 * doc/bison.texinfo: Update the copyright.
16451 ANSIfy and GNUify the examples.
16452 Remove the old menu.
16453
16454 2000-09-18 Akim Demaille <akim@epita.fr>
16455
16456 First set of tests: use the `calc' example from the documentation.
16457
16458 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16459 is defined only when YYDEBUG is.
16460 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16461 * src/files.c (tryopen, tryclose): Formatting changes.
16462 Move to the top and be static.
16463 * src/reader.c (read_signed_integer): Likewise.
16464 * tests/calc.m4: New file.
16465 * Makefile.am, suite.m4: Adjust.
16466 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16467
16468 2000-09-18 Akim Demaille <akim@epita.fr>
16469
16470 Add support for an Autotest test suite for Bison.
16471
16472 * m4/m4.m4, m4/atconfig.m4: New files.
16473 * m4/Makefile.am (EXTRA_DIST): Adjust.
16474 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16475 files.
16476 * src/getargs.c: Display a more standard --version message.
16477 * src/reader.c (reader): Formatting changes.
16478 No longer depend upon VERSION_STRING.
16479 * configure.in: No longer use `dnl'.
16480 Set up the test suite and the new directory `tests/.
16481 (VERSION_STRING): Remove.
16482
16483 2000-04-14 Akim Demaille <akim@epita.fr>
16484
16485 * src/reader.c (copy_comment2): New function, same as former
16486 `copy_comment', but outputs into two FILE *.
16487 (copy_comment): Use it.
16488 (parse_union_decl): Use it.
16489 (get_type, parse_start_decl): Use the same `invalid' message.
16490 (parse_start_decl, parse_union_decl): Use the same `multiple'
16491 message.
16492 (parse_union_decl, copy_guard, copy_action): Use the same
16493 `unmatched' message.
16494 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16495
16496 2000-03-31 Akim Demaille <akim@epita.fr>
16497
16498 * src/files.c (tryopen, tryclose): Move to the top.
16499 Be static.
16500
16501 2000-03-31 Akim Demaille <akim@epita.fr>
16502
16503 * src/main.c (main): Don't call `done', exit does it.
16504
16505 2000-03-31 Akim Demaille <akim@epita.fr>
16506
16507 * allocate.c: s/return (foo)/return foo/.
16508 * lalr.c: Likewise.
16509 * LR0.c: Likewise.
16510 * output.c: Likewise.
16511 * reader.c: Likewise.
16512 * symtab.c: Likewise.
16513 * vmsgetargs.c: Likewise.
16514
16515 2000-03-31 Akim Demaille <akim@epita.fr>
16516
16517 Clean up the error reporting functions.
16518
16519 * src/report.c: New file.
16520 * src/report.h: Likewise.
16521 * src/Makefile.am: Adjust.
16522 * m4/error.m4: New file.
16523 * m4/Makefile.am: Adjust.
16524 * configure.in (jm_PREREQ_ERROR): Call it.
16525 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16526 Remove.
16527 (fatal, fatals): Remove. All callers use complain.c::fatal.
16528 (warn, warni, warns, warnss, warnss): Remove. All callers use
16529 complain.c::complain.
16530 (toomany): Remove, use fatal instead.
16531 * src/files.c (done): No argument, use complain_message_count.
16532 * src/main.c (main): Register `done' to `atexit'.
16533
16534 * src/getargs.c (usage): More `fputs', less `fprintf'.
16535
16536 2000-03-28 Akim Demaille <akim@epita.fr>
16537
16538 * lib/: New directory.
16539 * Makefile.am (SUBDIRS): Adjust.
16540 * configure.in: Adjust.
16541 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16542 useless.
16543 * src/alloca.c: Moved to lib/.
16544 * src/getopt.c: Likewise.
16545 * src/getopt1.c: Likewise.
16546 * src/getopt.h: Likewise.
16547 * src/ansi2knr.c: Likewise.
16548 * src/ansi2knr.1: Likewise.
16549 * src/Makefile.am: Adjust.
16550 * lib/Makefile.am: New file.
16551
16552 2000-03-28 Akim Demaille <akim@epita.fr>
16553
16554 * src/getargs.c (usage): Refresh the help message.
16555
16556 2000-03-17 Akim Demaille <akim@epita.fr>
16557
16558 * src/getopt1.c: Updated from textutils 2.0e
16559 * src/getopt.c: Likewise.
16560 * src/getopt.h: Likewise.
16561
16562 2000-03-17 Akim Demaille <akim@epita.fr>
16563
16564 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16565 the file name, not the whole `#line LINE FILE'.
16566
16567 2000-03-17 Akim Demaille <akim@epita.fr>
16568
16569 On syntax errors, report the token on which we choked.
16570
16571 * src/bison.s1 (yyparse): In the label yyerrlab, when
16572 YYERROR_VERBOSE, add yychar in msg.
16573
16574 2000-03-17 Akim Demaille <akim@epita.fr>
16575
16576 * src/reader.c (copy_at): New function.
16577 (copy_guard): Use it.
16578 (copy_action): Use it.
16579
16580 2000-03-17 Akim Demaille <akim@epita.fr>
16581
16582 Be kind to translators, save some useless translations.
16583
16584 * src/main.c (banner): New function.
16585 (fatal_banner): Use it.
16586 (warn_banner): Use it.
16587
16588 2000-03-17 Akim Demaille <akim@epita.fr>
16589
16590 * src/reader.c (copy_definition): Use copy_string and
16591 copy_comment. Removed now unused `match', `ended',
16592 `cplus_comment'.
16593 (copy_comment, copy_string): Moved, to be visible from
16594 copy_definition.
16595
16596 2000-03-17 Akim Demaille <akim@epita.fr>
16597
16598 * src/reader.c (copy_string): Declare `static inline'. No
16599 problems with inline, since it is checked by configure.
16600 (copy_comment): Likewise.
16601
16602 2000-03-17 Akim Demaille <akim@epita.fr>
16603
16604 * src/reader.c (packsymbols): Formatting changes.
16605
16606 2000-03-17 Akim Demaille <akim@epita.fr>
16607
16608 * src/reader.c (copy_comment): New function, factored out from:
16609 (copy_action): Use it. Removed now unused `match', `ended',
16610 `cplus_comment'.
16611 (copy_guard): Likewise.
16612
16613 2000-03-17 Akim Demaille <akim@epita.fr>
16614
16615 * src/reader.c (copy_string): New function, factored out from:
16616 (copy_action): Use it.
16617 (copy_guard): Likewise.
16618
16619 2000-03-17 Akim Demaille <akim@epita.fr>
16620
16621 Change the handling of @s so that they behave exactly like $s.
16622 There is now a pseudo variable @$ (readble and writable), location
16623 of the lhs of the rule (by default ranging from the location of
16624 the first symbol of the rhs, to the location of the last symbol,
16625 or, if the rhs is empty, YYLLOC).
16626
16627 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16628 yyval.
16629 (yyparse): When providing a default semantic action, provide a
16630 default location action.
16631 (after the $): No longer change `*YYLSP', just stack YYLOC the
16632 same way you stack YYVAL.
16633 * src/reader.c (read_declarations): Use warns.
16634 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16635 (copy_action, case '@'): Likewise.
16636 Use a standard error message, to save useless work from
16637 translators.
16638
16639 2000-03-17 Akim Demaille <akim@epita.fr>
16640
16641 * src/bison.s1: Formatting and cosmetics changes.
16642 * src/reader.c: Likewise.
16643 Update the Copyright notice.
16644
16645 2000-03-17 Akim Demaille <akim@epita.fr>
16646
16647 * src/bison.s1 (#line): All set to `#line' only, since the
16648 Makefile now handles them.
16649
16650 2000-03-16 Akim Demaille <akim@epita.fr>
16651
16652 * src/output.c (output_rule_data): Output the documentation of
16653 some of the tables.
16654 (Copyright notice): Update.
16655 Formatting changes.
16656
16657 2000-03-16 Akim Demaille <akim@epita.fr>
16658
16659 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16660 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16661 One `#if YYDEBUG' remains, since it uses variables which are
16662 defined only if `YYDEBUG != 0'.
16663
16664 2000-03-16 Akim Demaille <akim@epita.fr>
16665
16666 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16667 and related variables so that the similarities are highlighted.
16668
16669 2000-03-16 Akim Demaille <akim@epita.fr>
16670
16671 * src/bison.s1: Properly indent CPP directives.
16672
16673 2000-03-16 Akim Demaille <akim@epita.fr>
16674
16675 * src/bison.s1: Properly indent the `alloca' CPP section.
16676
16677 2000-03-16 Akim Demaille <akim@epita.fr>
16678
16679 Do not hard code values of directories in `configure.in'.
16680 Update the `configure' tool chain.
16681
16682 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16683 src/makefile.am.
16684 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16685 (AC_OUTPUT): Add m4/Makefile.
16686 Bump to bison 1.28a, 1.29 has never been released.
16687 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16688 handled via src/Makefile.am.
16689 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16690 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16691 autoheader.
16692 * Makefile.am (SUBDIRS): Add m4.
16693 (ACLOCAL_AM_FLAGS): New variable.
16694 (AUTOMAKE_OPTIONS): Add check-news.
16695 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16696 the proper line number and file name.
16697 (DEFS): Propagate the location of bison library files and of the
16698 locale files.
16699 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16700 builddir.
16701 * acinclude.m4: Remove, replaced by the directory m4.
16702 * m4/Makefile.am (EXTRA_DIST): New variable.
16703 * m4/gettext.m4: New file, from the fileutils.
16704 * m4/lcmessage.m4: Likewise
16705 * m4/progtest.m4: Likewise.
16706 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16707
16708 2000-03-10 Akim Demaille <akim@epita.fr>
16709
16710 * src/closure.c:
16711 Formatting changes of various comments.
16712 Respect the GNU coding standards at various places.
16713 Don't use `_()' when no translation is needed.
16714
16715 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16716
16717 * src/files.c:
16718 OS/2 honors TMPDIR environment variable.
16719
16720 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16721
16722 * doc/bison.texinfo: Tweaked spelling and grammar.
16723 Updated ISBN.
16724 Removed reference to price of printed copy.
16725 Mention BISON_SIMPLE and BISON_HAIRY.
16726
16727 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16728
16729 * configure.in, NEWS:
16730 Bison 1.29 released.
16731
16732 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16733
16734 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16735 Added reference card.
16736
16737 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16738
16739 * po/ru.po: Added Russian translation.
16740
16741 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16742
16743 * configure.in: Added Russian translation.
16744
16745 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16746
16747 * configure.in, NEWS, README:
16748 Released version 1.28.
16749
16750 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16751
16752 * src/system.h:
16753 Squashed redefinition warning on some systems.
16754
16755 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16756 Have configure build version string instead of relying on ANSI string
16757 concatentation.
16758
16759 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16760
16761 * po/POTFILES.in: Got rid of version.c.
16762
16763 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16764
16765 * acconfig.h, configure.in:
16766 Have configure build version string instead of relying on ANSI string
16767 concatentation.
16768
16769 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16770
16771 * doc/bison.1:
16772 Dropped mention of `+' for long-named options.
16773
16774 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16775
16776 * src/files.c: Added <unistd.h> for unlink().
16777
16778 * src/Makefile.am, src/system.h:
16779 I18n fixes.
16780
16781 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16782
16783 * README: Added a FAQ list.
16784
16785 * configure.in, acconfig.h:
16786 I18n fixes.
16787
16788 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16789
16790 * doc/FAQ, doc/Makefile.am:
16791 Added a FAQ list.
16792
16793 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16794
16795 * src/alloc.h, src/symtab.h, src/version.c:
16796 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16797
16798 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16799
16800 * src/.cvsignore, src/Makefile.am:
16801 Reorganized: sources in `src', documentation in `doc'.
16802
16803 * src/lex.c (literalchar):
16804 fixed the code for escaping double quotes (thanks
16805 Jonathan Czisny.)
16806
16807 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16808
16809 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16810 Adjusted paths to reflect directory reorganization.
16811
16812 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16813
16814 * doc/.cvsignore, doc/Makefile.am:
16815 Reorganized: sources in `src', documentation in `doc'.
16816
16817 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16818
16819 * configure.in:
16820 Updated AC_INIT file to reflect directory reorganization.
16821
16822 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16823 Reorganized: sources in `src', documentation in `doc'.
16824
16825 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16826
16827 * src/allocate.c:
16828 Don't declare calloc() and realloc() if not necessary.
16829
16830 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16831
16832 * configure.in, acconfig.h, acinclude.m4:
16833 Don't declare calloc() and realloc() if not necessary.
16834
16835 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16836
16837 * po/.cvsignore: Added i18n support.
16838
16839 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16840
16841 * acconfig.h, configure.in, Makefile.am:
16842 Added i18n support.
16843
16844 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16845
16846 * src/bison.s1: Fixed #line numbers.
16847
16848 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16849
16850 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16851 Added PO files from Translation Project.
16852
16853 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16854
16855 * Makefile.am:
16856 Added support for non-ANSI compilers (ansi2knr).
16857
16858 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16859
16860 * configure.in: Bumped version number to 1.27.
16861
16862 * Makefile.am:
16863 Added `bison.simple' to list of files removed by `make distclean'.
16864
16865 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16866
16867 * src/files.c, src/files.h:
16868 Defined locations of parser files in config.h instead of Makefile.
16869
16870 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16871
16872 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16873 Defined locations of parser files in config.h instead of Makefile.
16874
16875 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16876
16877 * Makefile.am:
16878 Removed inappropriate use of $< macro.
16879
16880 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16881
16882 * po/Makefile.in.in, po/POTFILES.in:
16883 Add `po' directory skeleton.
16884
16885 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16886
16887 * README: Document help-bison list.
16888
16889 * configure.in: Add check for mkstemp().
16890
16891 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16892
16893 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16894 Hush a few compiler warnings.
16895
16896 * src/files.c:
16897 Add tryclose(), which verifies that fclose was successful.
16898 Hush a couple of compiler warnings.
16899
16900 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16901
16902 * Makefile.am, OChangeLog:
16903 ChangeLog is now automatically generated. Include the old version as
16904 OChangeLog.
16905
16906 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16907
16908 * 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:
16909 Update FSF address.
16910
16911 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16912
16913 * doc/bison.texinfo: Fix formatting glitch.
16914
16915 * doc/bison.texinfo: Update FSF address.
16916
16917 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16918
16919 * acconfig.h: Update FSF address.
16920
16921 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16922
16923 * src/system.h:
16924 Don't define PACKAGE here, since config.h defines it.
16925
16926 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16927
16928 * src/reader.c: Update copyright date.
16929
16930 * src/main.c:
16931 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16932 favor of output directly to stderr (avoids buffer overruns).
16933
16934 * src/reader.c: Some checks for premature EOF.
16935
16936 * 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:
16937 Use prototypes if the compiler understands them.
16938
16939 * src/files.c: Honor TMPDIR on Unix hosts.
16940 Use prototypes if the compiler understands them.
16941
16942 * src/reader.c:
16943 Fix a couple of buffer overrun bugs.
16944 Use prototypes if the compiler understands them.
16945
16946 * src/system.h: Include unistd.h and ctype.h.
16947 Use #ifdef instead of #if for NLS symbols.
16948
16949 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16950
16951 * doc/bison.texinfo:
16952 Delete comment "consider using @set for edition number, etc..." since
16953 we now are doing so.
16954
16955 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16956
16957 * configure.in:
16958 Use prototypes if the compiler understands them.
16959
16960 * NEWS: Document 1.26 highlights.
16961
16962 * Makefile.am: Require Automake 1.3 or later.
16963
16964 * acconfig.h:
16965 Use prototypes if the compiler understands them.
16966
16967 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16968
16969 * src/version.c:
16970 Use VERSION symbol from automake for version number.
16971
16972 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16973
16974 * acconfig.h, configure.in, version.cin:
16975 Use VERSION symbol from automake for version number.
16976
16977 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16978
16979 * Makefile.am:
16980 Distribute original version of simple parser (bison.s1), not built
16981 version (bison.simple).
16982
16983 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16984
16985 * doc/bison.texinfo: Add info dir entry.
16986
16987 * doc/bison.texinfo:
16988 Let automake put version number into documentation.
16989
16990 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16991
16992 * src/bison.cld, src/build.com, src/vmshlp.mar:
16993 Add non-RCS files from /gd/gnu/bison.
16994
16995 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16996
16997 * doc/bison.1:
16998 Document the BISON_HAIRY and BISON_SIMPLE variables.
16999
17000 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17001
17002 * src/version.c: Build version.c automatically.
17003
17004 * src/reader.c:
17005 Fix token numbering (used to start at 258, not 257).
17006
17007 * src/system.h: Include config.h.
17008
17009 * src/getargs.c: Update bug report address.
17010
17011 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17012 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17013
17014 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17015
17016 * Makefile.am:
17017 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17018
17019 * configure.in, version.cin:
17020 Build version.c automatically.
17021
17022 * AUTHORS: Add AUTHORS file.
17023
17024 * README: Update bug report address.
17025
17026 * bison.simple:
17027 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17028
17029 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17030 Add automake stuff.
17031
17032 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17033
17034 * doc/bison.texinfo: Clean up some formatting.
17035
17036 1998-05-05 Richard Stallman <rms@gnu.org>
17037
17038 * doc/bison.texinfo:
17039 Explain better why to make a pure parser.
17040
17041 1998-01-05 Richard Stallman <rms@gnu.org>
17042
17043 * src/files.c (openfiles):
17044 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17045 find a temporary directory, if possible. Do not unlink files while
17046 they are open.
17047
17048 1997-08-25 Richard Stallman <rms@gnu.org>
17049
17050 * src/reader.c (stack_offset;):
17051 Change some warni to warns.
17052
17053 * src/lex.c (literalchar): Use warns, not warni.
17054
17055 1997-06-28 Richard Stallman <rms@gnu.org>
17056
17057 * src/bison.s1: Add a Bison version comment.
17058
17059 * src/main.c (fatal, warn, berror):
17060 Use program_name.
17061
17062 1997-06-28 Richard Stallman <rms@gnu.org>
17063
17064 * Makefile.in (bison_version): New variable.
17065 (dist): Use that variable.
17066 (bison.s1): Substitute the Bison version into bison.simple.
17067
17068 * bison.simple: Add a Bison version comment.
17069
17070 1997-06-18 Richard Stallman <rms@gnu.org>
17071
17072 * src/main.c (fatal, warn, berror):
17073 Make error messages standard.
17074 (toomany): Improve error message text.
17075
17076 * 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:
17077 new.h renamed to alloc.h.
17078
17079 1997-06-18 Richard Stallman <rms@gnu.org>
17080
17081 * Makefile.in: new.h renamed to alloc.h.
17082
17083 1997-05-24 Richard Stallman <rms@gnu.org>
17084
17085 * src/lex.c (literalchar):
17086 Fix the code for escaping \, " and '.
17087
17088 (lex): Avoid trouble when there are many chars
17089 to discard in a char literal with just several chars in it.
17090
17091 1997-05-17 Richard Stallman <rms@gnu.org>
17092
17093 * src/bison.s1:
17094 Use malloc, if using alloca is troublesome.
17095 (YYSTACK_USE_ALLOCA): New flag macro.
17096 Define it for some systems and compilers.
17097 (YYSTACK_ALLOC): New macro.
17098 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17099 If it was malloc'd, free it.
17100
17101 1997-05-17 Richard Stallman <rms@gnu.org>
17102
17103 * bison.simple:
17104 Use malloc, if using alloca is troublesome.
17105 (YYSTACK_USE_ALLOCA): New flag macro.
17106 Define it for some systems and compilers.
17107 (YYSTACK_ALLOC): New macro.
17108 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17109 If it was malloc'd, free it.
17110
17111 1997-04-23 Richard Stallman <rms@gnu.org>
17112
17113 * src/bison.s1:
17114 (alloca) [__hpux]: Always define as __builtin_alloca.
17115
17116 1997-04-23 Richard Stallman <rms@gnu.org>
17117
17118 * bison.simple:
17119 (alloca) [__hpux]: Always define as __builtin_alloca.
17120
17121 1997-04-22 Richard Stallman <rms@gnu.org>
17122
17123 * src/bison.s1:
17124 [__hpux]: Include alloca.h (right for HPUX 10)
17125 instead of declaring alloca (right for HPUX 9).
17126
17127 * src/bison.s1 (__yy_memcpy):
17128 Declare arg `count' as unsigned int.
17129 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17130
17131 1997-04-22 Richard Stallman <rms@gnu.org>
17132
17133 * bison.simple:
17134 [__hpux]: Include alloca.h (right for HPUX 10)
17135 instead of declaring alloca (right for HPUX 9).
17136
17137 * bison.simple (__yy_memcpy):
17138 Declare arg `count' as unsigned int.
17139 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17140
17141 1997-01-03 Richard Stallman <rms@gnu.org>
17142
17143 * src/allocate.c: [__STDC__ or _MSC_VER]:
17144 Declare calloc and realloc to return void *.
17145
17146 1997-01-02 Richard Stallman <rms@gnu.org>
17147
17148 * src/system.h:
17149 [_MSC_VER]: Include stdlib.h and process.h.
17150 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17151
17152 * src/main.c (main): Return FAILURE as a value.
17153 (printable_version): Declare arg as int, not char.
17154
17155 1997-01-02 Richard Stallman <rms@gnu.org>
17156
17157 * Makefile.in (dist):
17158 Explicitly check for symlinks, and copy them.
17159
17160 1996-12-19 Richard Stallman <rms@gnu.org>
17161
17162 * src/files.c:
17163 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17164
17165 1996-12-18 Paul Eggert <eggert@gnu.org>
17166
17167 * src/bison.s1 (yyparse):
17168 If __GNUC__ and YYPARSE_PARAM are both defined,
17169 declare yyparse to have a void * argument.
17170
17171 1996-12-18 Paul Eggert <eggert@gnu.org>
17172
17173 * bison.simple (yyparse):
17174 If __GNUC__ and YYPARSE_PARAM are both defined,
17175 declare yyparse to have a void * argument.
17176
17177 1996-12-17 Richard Stallman <rms@gnu.org>
17178
17179 * src/reduce.c (nbits): Add some casts.
17180
17181 1996-08-12 Richard Stallman <rms@gnu.org>
17182
17183 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17184
17185 1996-08-12 Richard Stallman <rms@gnu.org>
17186
17187 * bison.simple: Test _MSDOS as well as _MSDOS_.
17188
17189 1996-07-31 Richard Stallman <rms@gnu.org>
17190
17191 * src/bison.s1:
17192 [__sun && __i386]: Include alloca.h.
17193
17194 1996-07-31 Richard Stallman <rms@gnu.org>
17195
17196 * bison.simple:
17197 [__sun && __i386]: Include alloca.h.
17198
17199 1996-07-30 Richard Stallman <rms@gnu.org>
17200
17201 * src/bison.s1: Comment change.
17202
17203 * src/bison.s1: Test _MSDOS_, not MSDOS.
17204
17205 1996-07-30 Richard Stallman <rms@gnu.org>
17206
17207 * bison.simple: Comment change.
17208
17209 * bison.simple: Test _MSDOS_, not MSDOS.
17210
17211 1996-06-01 Richard Stallman <rms@gnu.org>
17212
17213 * 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:
17214 Insert `_' macro around many string constants.
17215
17216 * src/main.c:
17217 Insert `_' macro around many string constants.
17218
17219 (main): Call setlocale, bindtextdomain and textdomain.
17220
17221 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17222 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17223 [ENABLE_NLS]: Include libintl.h.
17224 [ENABLE_NLS] (gettext): Define.
17225 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17226 (N_, PACKAGE, LOCALEDIR): New macros.
17227
17228 1996-06-01 Richard Stallman <rms@gnu.org>
17229
17230 * POTFILES.in: New file.
17231
17232 * Makefile.in (allocate.o):
17233 Define target explicitly.
17234
17235 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17236 (LDFLAGS): Set to @LDFLAGS@.
17237 (configure): Run autoconf only if preceding `cd' succeeds.
17238 (bison.s1): Redirect output to temporary file then move the
17239 temporary to the target, rather than redirecting directly to bison.s1.
17240 (clean): Remove config.status and config.log.
17241 (distclean): Don't remove config.status here.
17242
17243 1996-05-12 Richard Stallman <rms@gnu.org>
17244
17245 * src/bison.s1:
17246 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17247
17248 1996-05-12 Richard Stallman <rms@gnu.org>
17249
17250 * bison.simple:
17251 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17252
17253 1996-05-11 Richard Stallman <rms@gnu.org>
17254
17255 * src/bison.s1 (__yy_memcpy):
17256 Really reorder the args, as was supposedly done on Feb 14 1995.
17257 (yyparse): Calls changed accordingly.
17258
17259 1996-05-11 Richard Stallman <rms@gnu.org>
17260
17261 * Makefile.in (dist): Don't use $(srcdir).
17262
17263 * bison.simple (__yy_memcpy):
17264 Really reorder the args, as was supposedly done on Feb 14 1995.
17265 (yyparse): Calls changed accordingly.
17266
17267 1996-01-27 Richard Stallman <rms@gnu.org>
17268
17269 * src/output.c (output_rule_data):
17270 Test YYERROR_VERBOSE in the conditional
17271 around the definition of ttyname.
17272
17273 1995-12-29 Richard Stallman <rms@gnu.org>
17274
17275 * src/bison.s1:
17276 Fix line numbers in #line commands.
17277
17278 1995-12-29 Richard Stallman <rms@gnu.org>
17279
17280 * bison.simple:
17281 Fix line numbers in #line commands.
17282
17283 1995-12-27 Richard Stallman <rms@gnu.org>
17284
17285 * src/bison.s1 (YYPARSE_PARAM_DECL):
17286 In C++, make it always null.
17287 (YYPARSE_PARAM_ARG): New macro.
17288 (yyparse): Use YYPARSE_PARAM_ARG.
17289
17290 1995-12-27 Richard Stallman <rms@gnu.org>
17291
17292 * bison.simple (YYPARSE_PARAM_DECL):
17293 In C++, make it always null.
17294 (YYPARSE_PARAM_ARG): New macro.
17295 (yyparse): Use YYPARSE_PARAM_ARG.
17296
17297 1995-11-29 Richard Stallman <rms@gnu.org>
17298
17299 * doc/bison.texinfo:
17300 Describe literal string tokens, %raw, %no_lines, %token_table.
17301
17302 1995-11-29 Daniel Hagerty <hag@gnu.org>
17303
17304 * doc/bison.texinfo: Fixed update date
17305
17306 1995-10-16 Richard Stallman <rms@gnu.org>
17307
17308 * src/version.c: Version 1.25.
17309
17310 1995-10-16 Richard Stallman <rms@gnu.org>
17311
17312 * NEWS: *** empty log message ***
17313
17314 1995-10-16 Richard Stallman <rms@gnu.org>
17315
17316 * doc/bison.1, doc/bison.rnh:
17317 Add new options.
17318
17319 1995-10-15 Richard Stallman <rms@gnu.org>
17320
17321 * src/vmsgetargs.c, src/getargs.c:
17322 Added -n, -k, and -raw switches.
17323 (noparserflag, toknumflag, rawtoknumflag): New variables.
17324
17325 * src/symtab.h (SALIAS):
17326 New #define for adding aliases to %token.
17327 (struct bucket): Added `alias' field.
17328
17329 * src/reduce.c (reduce_grammar):
17330 Revise error message.
17331 (print_notices): Remove final `.' from error message.
17332
17333 * src/reader.c (reader_output_yylsp):
17334 New function.
17335 (readgram): Use `#if 0' around code that accepted %command
17336 inside grammar rules: The documentation doesn't allow it,
17337 and it will fail since the %command processors scan for the next %.
17338 (parse_token_decl): Extended the %token
17339 declaration to allow a multi-character symbol as an alias.
17340 (parse_thong_decl): New function.
17341 (read_declarations): Added %thong declarations.
17342 (read_declarations): Handle NOOP to deal with allowing
17343 % declarations as another means to specify the flags.
17344 (readgram): Allow %prec prior to semantics embedded in a rule.
17345 (skip_to_char, read_declarations, copy_definition)
17346 (parse_token_decl, parse_start_decl, parse_type_decl)
17347 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17348 (get_type_name, copy_guard, copy_action, readgram)
17349 (get_type, packsymbols): Revised most error messages.
17350 Changed `fatal' to `warnxxx' to avoid aborting for error.
17351 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17352 (read_declarations): Improve the error message for
17353 an invalid character. Do not abort.
17354 (read_declarations, copy_guard, copy_action): Use
17355 printable_version to avoid unprintable characters in printed output.
17356 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17357 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17358 Allow the type of a non-terminal can be given
17359 more than once, as long as all specifications give the same type.
17360
17361 * src/output.c:
17362 (output_headers, output_trailers, output, output_gram)
17363 (output_rule_data): Implement noparserflag variable.
17364 Implement toknumflag variable.
17365 (output): Call reader_output_yylsp to output LTYPESTR.
17366
17367 * src/main.c (main):
17368 If reader sees an error, don't process the grammar.
17369 (fatals): Updated to not use VARARGS1.
17370 (printable_version, int_to_string, warn, warni, warns, warnss)
17371 (warnsss): New error reporting functions. Avoid abort for error.
17372
17373 * src/lex.h:
17374 Added THONG and NOOP for alias processing.
17375 Added SETOPT for the new code that allows setting options with %flags.
17376
17377 * src/lex.c:
17378 Include getopt.h. Add some extern decls.
17379 (safegetc): New function to deal with EOF gracefully.
17380 (literalchar); new function to deal with reading \ escapes.
17381 (lex): Use literalchar.
17382 (lex): Implemented "..." tokens.
17383 (literalchar, lex, parse_percent_token): Made tokenbuffer
17384 always contain the token. This includes growing the token
17385 buffer while reading an integer.
17386 (parse_percent_token): Replaced if-else statement with percent_table.
17387 (parse_percent_token): Added % declarations as another
17388 way to specify the flags -n, -l, and -r. Also added hooks for
17389 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17390 major changes to files.c.
17391 (lex) Retain in the incoming stream a character following
17392 an incorrect '/'.
17393 (skip_white_space, lex): Revised most error messages
17394 and changed fatal to warn to avoid aborting.
17395 (percent_table): Added %thong declarations.
17396
17397 * src/gram.h: Comment changes.
17398
17399 * src/files.c (openfiles, open_extra_files, done):
17400 Add faction flag
17401 and actfile file. Handle noparserflag. Both for -n switch.
17402
17403 * src/conflicts.c (resolve_sr_conflict):
17404 Remove use of alloca.
17405
17406 1995-06-01 Jim Meyering <meyering@gnu.org>
17407
17408 * doc/bison.texinfo: *** empty log message ***
17409
17410 1995-05-06 Richard Stallman <rms@gnu.org>
17411
17412 * src/bison.s1: Comment change.
17413
17414 1995-05-06 Richard Stallman <rms@gnu.org>
17415
17416 * bison.simple: Comment change.
17417
17418 1995-05-03 Richard Stallman <rms@gnu.org>
17419
17420 * src/version.c: Version now 1.24.
17421
17422 * src/bison.s1: Change distribution terms.
17423
17424 * src/version.c: Version now 1.23.
17425
17426 1995-05-03 Richard Stallman <rms@gnu.org>
17427
17428 * doc/bison.texinfo:
17429 Rewrite "Conditions for Using Bison".
17430 Update version to 1.24.
17431
17432 1995-05-03 Richard Stallman <rms@gnu.org>
17433
17434 * bison.simple: Change distribution terms.
17435
17436 1995-02-23 Richard Stallman <rms@gnu.org>
17437
17438 * src/files.c: Test __VMS_POSIX as well as VMS.
17439
17440 1995-02-14 Jim Meyering <meyering@gnu.org>
17441
17442 * src/bison.s1 (__yy_memcpy):
17443 Renamed from __yy_bcopy to avoid
17444 confusion. Reverse FROM and TO arguments to be consistent with
17445 those of memcpy.
17446
17447 1995-02-14 Jim Meyering <meyering@gnu.org>
17448
17449 * bison.simple (__yy_memcpy):
17450 Renamed from __yy_bcopy to avoid
17451 confusion. Reverse FROM and TO arguments to be consistent with
17452 those of memcpy.
17453
17454 1994-11-10 David J. MacKenzie <djm@gnu.org>
17455
17456 * NEWS: reformat
17457
17458 * NEWS: New file.
17459
17460 * Makefile.in (DISTFILES): Include NEWS.
17461
17462 * Makefile.in (DISTFILES):
17463 Include install-sh, not install.sh.
17464
17465 * configure.in: Update to Autoconf v2 macro names.
17466
17467 1994-10-05 David J. MacKenzie <djm@gnu.org>
17468
17469 * Makefile.in: fix typo
17470
17471 * Makefile.in (prefix, exec_prefix):
17472 Let configure set them.
17473
17474 1994-09-28 David J. MacKenzie <djm@gnu.org>
17475
17476 * Makefile.in: Set datadir to $(prefix)/share.
17477
17478 1994-09-15 Richard Stallman <rms@gnu.org>
17479
17480 * src/bison.s1:
17481 Update copyright notice and GPL version.
17482
17483 1994-09-15 Richard Stallman <rms@gnu.org>
17484
17485 * bison.simple:
17486 Update copyright notice and GPL version.
17487
17488 1994-07-12 Richard Stallman <rms@gnu.org>
17489
17490 * src/reduce.c, src/reader.c:
17491 entered into RCS
17492
17493 1994-05-05 David J. MacKenzie <djm@gnu.org>
17494
17495 * Makefile.in: entered into RCS
17496
17497 1994-03-26 Richard Stallman <rms@gnu.org>
17498
17499 * src/bison.s1: entered into RCS
17500
17501 1994-03-26 Richard Stallman <rms@gnu.org>
17502
17503 * bison.simple: entered into RCS
17504
17505 1994-03-25 Richard Stallman <rms@gnu.org>
17506
17507 * src/main.c: entered into RCS
17508
17509 1994-03-24 Richard Stallman <rms@gnu.org>
17510
17511 * src/conflicts.c: entered into RCS
17512
17513 1994-01-02 Richard Stallman <rms@gnu.org>
17514
17515 * Makefile.in: *** empty log message ***
17516
17517 1993-11-21 Richard Stallman <rms@gnu.org>
17518
17519 * src/bison.s1: *** empty log message ***
17520
17521 1993-11-21 Richard Stallman <rms@gnu.org>
17522
17523 * doc/bison.texinfo: entered into RCS
17524
17525 * doc/bison.texinfo: *** empty log message ***
17526
17527 1993-11-21 Richard Stallman <rms@gnu.org>
17528
17529 * bison.simple: *** empty log message ***
17530
17531 1993-10-25 David J. MacKenzie <djm@gnu.org>
17532
17533 * doc/bison.texinfo: *** empty log message ***
17534
17535 1993-10-19 Richard Stallman <rms@gnu.org>
17536
17537 * src/bison.s1: *** empty log message ***
17538
17539 1993-10-19 Richard Stallman <rms@gnu.org>
17540
17541 * bison.simple: *** empty log message ***
17542
17543 1993-10-14 Richard Stallman <rms@gnu.org>
17544
17545 * src/bison.s1: *** empty log message ***
17546
17547 1993-10-14 Richard Stallman <rms@gnu.org>
17548
17549 * bison.simple: *** empty log message ***
17550
17551 1993-09-14 David J. MacKenzie <djm@gnu.org>
17552
17553 * doc/bison.texinfo: *** empty log message ***
17554
17555 1993-09-13 Noah Friedman <friedman@gnu.org>
17556
17557 * Makefile.in: *** empty log message ***
17558
17559 1993-09-10 Richard Stallman <rms@gnu.org>
17560
17561 * src/conflicts.c: *** empty log message ***
17562
17563 * src/system.h: entered into RCS
17564
17565 1993-09-10 Richard Stallman <rms@gnu.org>
17566
17567 * doc/bison.1: entered into RCS
17568
17569 1993-09-06 Noah Friedman <friedman@gnu.org>
17570
17571 * src/version.c: entered into RCS
17572
17573 1993-09-06 Noah Friedman <friedman@gnu.org>
17574
17575 * Makefile.in: *** empty log message ***
17576
17577 1993-07-30 David J. MacKenzie <djm@gnu.org>
17578
17579 * Makefile.in: *** empty log message ***
17580
17581 1993-07-24 Richard Stallman <rms@gnu.org>
17582
17583 * src/bison.s1: *** empty log message ***
17584
17585 1993-07-24 Richard Stallman <rms@gnu.org>
17586
17587 * bison.simple: *** empty log message ***
17588
17589 1993-07-08 David J. MacKenzie <djm@gnu.org>
17590
17591 * Makefile.in: *** empty log message ***
17592
17593 1993-07-04 Richard Stallman <rms@gnu.org>
17594
17595 * src/bison.s1: *** empty log message ***
17596
17597 1993-07-04 Richard Stallman <rms@gnu.org>
17598
17599 * bison.simple: *** empty log message ***
17600
17601 1993-06-26 David J. MacKenzie <djm@gnu.org>
17602
17603 * src/getargs.c: entered into RCS
17604
17605 1993-06-26 David J. MacKenzie <djm@gnu.org>
17606
17607 * doc/bison.texinfo: *** empty log message ***
17608
17609 * doc/bison.1: New file.
17610
17611 1993-06-25 Richard Stallman <rms@gnu.org>
17612
17613 * src/getargs.c: New file.
17614
17615 1993-06-16 Richard Stallman <rms@gnu.org>
17616
17617 * src/bison.s1: *** empty log message ***
17618
17619 1993-06-16 Richard Stallman <rms@gnu.org>
17620
17621 * bison.simple: *** empty log message ***
17622
17623 1993-06-03 Richard Stallman <rms@gnu.org>
17624
17625 * src/bison.s1: New file.
17626
17627 1993-06-03 Richard Stallman <rms@gnu.org>
17628
17629 * doc/bison.texinfo: *** empty log message ***
17630
17631 1993-06-03 Richard Stallman <rms@gnu.org>
17632
17633 * bison.simple: New file.
17634
17635 1993-05-19 Richard Stallman <rms@gnu.org>
17636
17637 * doc/bison.texinfo: New file.
17638
17639 1993-05-07 Noah Friedman <friedman@gnu.org>
17640
17641 * Makefile.in: *** empty log message ***
17642
17643 1993-04-28 Noah Friedman <friedman@gnu.org>
17644
17645 * src/reader.c: *** empty log message ***
17646
17647 1993-04-23 Noah Friedman <friedman@gnu.org>
17648
17649 * src/alloc.h: entered into RCS
17650
17651 1993-04-20 David J. MacKenzie <djm@gnu.org>
17652
17653 * src/version.c: *** empty log message ***
17654
17655 * src/files.c, src/allocate.c:
17656 entered into RCS
17657
17658 * src/reader.c: *** empty log message ***
17659
17660 * src/lex.c: entered into RCS
17661
17662 * src/conflicts.c: New file.
17663
17664 * src/symtab.c: entered into RCS
17665
17666 * src/alloc.h: New file.
17667
17668 * src/LR0.c: entered into RCS
17669
17670 1993-04-18 Noah Friedman <friedman@gnu.org>
17671
17672 * src/reader.c: New file.
17673
17674 * src/version.c: *** empty log message ***
17675
17676 1993-04-18 Noah Friedman <friedman@gnu.org>
17677
17678 * Makefile.in: *** empty log message ***
17679
17680 1993-04-17 Noah Friedman <friedman@gnu.org>
17681
17682 * Makefile.in: *** empty log message ***
17683
17684 1993-04-15 Richard Stallman <rms@gnu.org>
17685
17686 * src/main.c, src/files.c:
17687 New file.
17688
17689 1993-04-15 Noah Friedman <friedman@gnu.org>
17690
17691 * configure.in: entered into RCS
17692
17693 * configure.in: *** empty log message ***
17694
17695 * configure.in: New file.
17696
17697 1993-04-14 Richard Stallman <rms@gnu.org>
17698
17699 * Makefile.in: New file.
17700
17701 1993-04-13 Richard Stallman <rms@gnu.org>
17702
17703 * src/version.c: New file.
17704
17705 1993-03-25 Richard Stallman <rms@gnu.org>
17706
17707 * src/output.c: entered into RCS
17708
17709 1992-09-25 Richard Stallman <rms@gnu.org>
17710
17711 * configure.bat: entered into RCS
17712
17713 1992-06-22 Richard Stallman <rms@gnu.org>
17714
17715 * src/vmsgetargs.c: entered into RCS
17716
17717 1992-06-22 Richard Stallman <rms@gnu.org>
17718
17719 * doc/bison.rnh: entered into RCS
17720
17721 1992-04-20 David J. MacKenzie <djm@gnu.org>
17722
17723 * README: entered into RCS
17724
17725 1992-01-22 Richard Stallman <rms@gnu.org>
17726
17727 * src/machine.h: entered into RCS
17728
17729 1991-12-21 Richard Stallman <rms@gnu.org>
17730
17731 * src/lalr.c, src/closure.c:
17732 entered into RCS
17733
17734 1991-12-20 Richard Stallman <rms@gnu.org>
17735
17736 * src/state.h: entered into RCS
17737
17738 1991-12-18 Richard Stallman <rms@gnu.org>
17739
17740 * src/print.c, src/nullable.c, src/derives.c:
17741 entered into RCS
17742
17743 1991-11-03 David J. MacKenzie <djm@gnu.org>
17744
17745 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17746 entered into RCS
17747
17748 1988-09-09 Richard Stallman <rms@gnu.org>
17749
17750 * src/bison.hairy: entered into RCS
17751
17752 1987-12-16 Richard Stallman <rms@gnu.org>
17753
17754 * REFERENCES: entered into RCS
17755
17756
17757 -----
17758
17759 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17760 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17761 Software Foundation, Inc.
17762
17763 Copying and distribution of this file, with or without
17764 modification, are permitted provided the copyright notice and this
17765 notice are preserved.
17766
17767 $Id$