]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Don't let %prec take a nonterminal.
[bison.git] / ChangeLog
... / ...
CommitLineData
12006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Don't let %prec take a nonterminal.
4 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5 token.
6 * tests/input.at (%prec takes a token): New test checking that %prec
7 won't take a nonterminal.
8
92006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
10
11 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
12 it was double-quoted.
13 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
14 grammar is maintained with Bison's highest standards.
15 * src/getargs.c: Fix some typos in Doxygen comments.
16
172006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
18
19 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
20 later. Reported by Paul Eggert in
21 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
22 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
23 * src/scan-code.l (translate_action): Don't bother invoking
24 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
25 (code_scanner_free): Instead of invoking
26 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
27 which frees more.
28 * src/scan-gram.l (gram_scanner_free): Likewise.
29 * src/scan-skel.l (scan_skel): Likewise.
30
312006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
32
33 * src/files.c (tr): Change return type to void.
34 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
35 has been called previously for the same key.
36 (muscle_find): Return storage instead of value so that
37 --enable-gcc-warnings doesn't produce warnings that the return discards
38 const. aver that the value and storage are the same since storage
39 could potentially be NULL when value is not.
40 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
41 same as 0.
42
432006-11-08 Paul Eggert <eggert@cs.ucla.edu>
44
45 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
46 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
47 us a slightly cleaner distribution, and also works.
48 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
49 gnulib changes.
50
512006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
52 and Paul Eggert <eggert@cs.ucla.edu>
53
54 Don't let Bison leak memory except when it complains.
55 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
56 (spec_defines_file, dir_prefix): Now char *, not const char *,
57 since they are freed.
58 * src/files.c: Likewise.
59 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
60 Likewise.
61 (tr): Now operates in-place. All uses changed.
62 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
63 values.
64 (compute_file_name_parts, compute_output_file_names): Don't store
65 read-only data in variables that will be freed.
66 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
67 src_extension, and header_extension.
68 (output_file_names_free): New public function to free
69 spec_verbose_file, spec_graph_file, spec_defines_file,
70 parser_file_name, and dir_prefix.
71 * src/getargs.c (getargs): Don't store read-only data in variables that
72 will be freed.
73 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
74 (which previously existed but was unused), and quotearg_free.
75 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
76 * src/muscle_tab.c: Likewise.
77 (muscle_entry): Make the value char const *,
78 and add a new storage member that is char * and can be freed.
79 (muscle_entry_free): New private function.
80 (muscle_init): Use it instead of free.
81 (muscle_insert, muscle_grow): Update and use new storage member.
82 (muscle_code_grow): Free the string passed to muscle_grow
83 since it's not needed anymore.
84 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
85 add a new `char *code' member.
86 ("{...}"): Declare semantic type as code.
87 * src/scan-code.h (translate_rule_action):
88 (translate_symbol_action, translate_code, translate_action): Return
89 `char const *' rather than `char *' since external code should not free
90 these strings.
91 * src/scan-code.l: Likewise.
92 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
93 which is "{...}" in the parser.
94 * tests/Makefile.am (maintainer-check-valgrind): Set
95 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
96 Valgrind.
97 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
98 complain.
99 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
100 expecting a non-zero exit status sets --leak-check=summary and
101 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
102 this case, and we don't want to hear about it.
103
1042006-11-08 Paul Eggert <eggert@cs.ucla.edu>
105
106 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
107 instead of from the template, to simplify configuration a bit.
108 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
109 and m4/wint_t.m4, as they are needed with the latest gnulib.
110
1112006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
112
113 Disable unset/unused mid-rule value warnings by default, and recognize
114 --warnings=midrule-values to enable them. Discussed starting at
115 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
116 * NEWS (2.3a+): Mention.
117 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
118 warnings): Add entry for midrule-values subargument.
119 * src/reader.c (symbol_should_be_used): Don't return true just because
120 the value is a set/used mid-rule value unless
121 --warnings=midrule-values was specified.
122 * tests/input.at (Unused values, Unused values before symbol
123 declarations): Run tests with and without --warnings=midrule-values.
124
125 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
126 than LIST_FREE directly.
127
1282006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
129
130 Finish implementing --warnings=error, which should not be implied by
131 --warnings=all (or by its synonyms -W and --warnings without
132 subarguments).
133 * src/complain.c (set_warning_issued): New function to report that
134 warnings are being treated as errors and to record an error if so.
135 Invoke...
136 (warn_at, warn): ... here.
137 * src/getargs.c (warnings_args, warnings_types): Reorder so that
138 "error - warnings are errors" does not appear above "all - all of the
139 above".
140 (getargs): For -W and --warnings without subarguments, don't let
141 FLAGS_ARGMATCH set warnings_error in warnings_flag.
142 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
143
1442006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
145
146 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
147 empty subargument list. For example: `bison --warnings= parser.y'.
148
1492006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
150
151 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
152 the parser header file so that gcc doesn't warn.
153
1542006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
155
156 Split the default %destructor/%printer into two kinds: <*> and <!>.
157 Discussed starting at
158 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
159 * NEWS (2.3a+): Mention.
160 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
161 previous change today related to mid-rules.
162 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
163 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
164 (TYPE_TAG_ANY): Add as <*>.
165 (TYPE_TAG_NONE): Add as <!>.
166 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
167 for <*> and <!>.
168 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
169 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
170 * src/symlist.c (symbol_list_default_new): Split into tagged and
171 tagless versions.
172 (symbol_list_destructor_set, symbol_list_printer_set): Split
173 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
174 SYMLIST_DEFAULT_TAGLESS.
175 * src/symlist.h: Update symbol_list_default*_new prototypes.
176 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
177 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
178 * src/symtab.c (default_destructor, default_destructor_location,
179 default_printer, default_printer_location): Split each into tagged and
180 tagless versions.
181 (symbol_destructor_get, symbol_destructor_location_get,
182 symbol_printer_get, symbol_printer_location_get): Implement tagged
183 default and tagless default cases.
184 (default_destructor_set, default_printer_set): Split each into tagged
185 and tagless versions.
186 * src/symtab.h: Update prototypes.
187 * tests/actions.at (Default %printer and %destructor): Rename to...
188 (Default tagless %printer and %destructor): ... this, and extend.
189 (Per-type %printer and %destructor): Rename to...
190 (Default tagged and per-type %printer and %destructor): ... this, and
191 extend.
192 (Default %printer and %destructor for user-defined end token): Extend.
193 (Default %printer and %destructor are not for error or $undefined):
194 Update.
195 (Default %printer and %destructor are not for $accept): Update.
196 (Default %printer and %destructor for mid-rule values): Extend.
197 * tests/input.at (Default %printer and %destructor redeclared): Extend.
198 (Unused values with default %destructor): Extend.
199
2002006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
201
202 Don't apply the default %destructor/%printer to an unreferenced midrule
203 value. Mentioned at
204 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
205 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
206 like $@n instead of just @n so that the default %destructor/%printer
207 logic doesn't see them as user-defined symbols.
208 (symbol_is_dummy): Check for both forms of the name.
209 * src/reader.c (packgram): Remove the `$' from each midrule symbol
210 name for which the midrule value is referenced in any action.
211 * tests/actions.at (Default %printer and %destructor for mid-rule
212 values): New test.
213 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
214 for change to dummy symbol names.
215
2162006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
217
218 Warn about unset midrule $$ if the corresponding $n is used.
219 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
220 $n usage.
221 (packgram): Before invoking grammar_rule_check on any rule, make sure
222 all actions have already been scanned in order to set `used' flags.
223 Otherwise, checking that a midrule's $$ is set will not always work
224 properly because the midrule check must forward-reference the midrule's
225 parent rule.
226 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
227 warning.
228
2292006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
230
231 More improvements to the documentation of the prologue alternatives:
232 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
233 Bison manual.
234 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
235 some text to clarify the relative importance of the new directives and
236 to show how these directives may be viewed as code labels.
237
2382006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
239
240 Similar to the recently removed %before-header, add %code-top as the
241 alternative to the pre-prologue. Mentioned at
242 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
243 Also, let the prologue alternatives appear in the grammar section.
244 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
245 (prologue_declaration): Move the existing prologue alternatives to...
246 (grammar_declaration): ... here and add %code-top.
247 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
248
249 Clean up and extend documentation for the prologue alternatives.
250 * NEWS (2.3a+): Describe prologue alternatives.
251 * doc/bison.texinfo (Prologue): Move discussion of prologue
252 alternatives to...
253 (Prologue Alternatives): ... this new section, and extend it to discuss
254 all 4 directives in detail.
255 (Bison Symbols): Clean up discussion of prologue alternatives and add
256 %code-top.
257
2582006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
259
260 DJGPP specific issues.
261
262 * djgpp/config.bat: config.hin has been moved to lib. Adjust
263 config.bat accordingly.
264 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
265 * djgpp/config.site: Likewise.
266
2672006-10-16 Paolo Bonzini <bonzini@gnu.org>
268
269 Replace %*-header with %provides, %requires, %code. See discussion at
270 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
271
272 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
273 (b4_user_start_header): Remove.
274 * data/glr.c: Use new macros instead of b4_*start_header
275 and b4_*end_header.
276 * data/glr.cc: Likewise.
277 * data/lalr1.cc: Likewise.
278 * data/push.c: Likewise.
279 * data/yacc.c: Likewise.
280
281 * doc/bison.texinfo: Remove %before-header, rename
282 %{start,end,after}-header to %requires, %provides, %code.
283
284 * src/parse-gram.y: Likewise (also rename token names accordingly).
285 * src/scan-gram.l: Likewise.
286 * tests/actions.at: Likewise.
287
2882006-10-14 Paul Eggert <eggert@cs.ucla.edu>
289
290 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
291 Problem reported by Joel E. Denny.
292
2932006-10-14 Jim Meyering <jim@meyering.net>
294
295 (Sync from coreutils.)
296 Work also when the working directory (with e.g. coreutils sources)
297 is version controlled with git, rather than CVS.
298 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
299 rather than CVS.
300 In messages and comments, say e.g., "checked-out sources",
301 rather than "CVS sources".
302 (version_controlled_file): New function. Work for git as well as
303 for CVS. Don't use grep's -q option.
304 (slurp): Call it here, in place of CVS-specific code.
305
3062006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
307
308 Fix testsuite for ./configure --enable-gcc-warnings:
309 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
310 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
311 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
312 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
313 * test/regression.at (Diagnostic that expects two alternatives):
314 Likewise.
315
3162006-10-12 Paul Eggert <eggert@cs.ucla.edu>
317
318 * bootstrap.conf (gnulib_modules): Add config-h.
319 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
320 worry about HAVE_CONFIG_H.
321 * lib/abitset.c: Likewise.
322 * lib/bitset.c: Likewise.
323 * lib/bitset_stats.c: Likewise.
324 * lib/bitsetv-print.c: Likewise.
325 * lib/bitsetv.c: Likewise.
326 * lib/ebitset.c: Likewise.
327 * lib/get-errno.c: Likewise.
328 * lib/lbitset.c: Likewise.
329 * lib/subpipe.c: Likewise.
330 * lib/timevar.c: Likewise.
331 * lib/vbitset.c: Likewise.
332 * lib/bitset.c: Include "bitset.h" first, to test interface.
333 * lib/bitset_stats.c: Include "bitset_stats.h" first.
334 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
335 * lib/bitsetv.c: Include "bitsetv.h" first.
336 * lib/get-errno.c: Include "get-errno.h" first.
337 * m4/.cvsignore: Add config-h.m4.
338 * tests/actions.at (Default %printer and %destructor for ...):
339 Adjust expected line numbers in output to reflect removal of #if
340 HAVE_CONFIG_H lines.
341 * tests/glr-regression.at (Missed %merge type warnings when ...):
342 Likewise.
343 * tests/regression.at (Braced code in declaration in rules section):
344 Likewise.
345 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
346 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
347 Include <config.h> unconditionally.
348
349 * bootstrap: Sync from coreutils, as follows:
350
351 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
352
353 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
354 variable was sometimes used without being initialized. This
355 messed up the installation of the INSTALL file in some cases.
356
357 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
358
359 * bootstrap (usage, main program, symlink_to_gnulib): Add option
360 --copy. Inspired by a suggestion from Bruno Haible.
361
362 2006-10-03 Jim Meyering <jim@meyering.net>
363
364 * bootstrap: Undo last change to this file, since now gnulib-tool
365 sticks with the automake default in generating dependencies.
366
3672006-10-12 Paul Eggert <eggert@cs.ucla.edu>
368
369 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
370 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
371
372 * doc/bison.1: Add copyright notice.
373
374 * data/glr.c: Don't include <stdarg.h>; not used.
375
376 * NEWS: The -g and --graph options now output graphs in Graphviz
377 DOT format, not VCG format.
378 * doc/bison.1: Likewise.
379 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
380 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
381 of this change in
382 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
383 * TODO: Remove Graphviz entry.
384 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
385 remove vcg.c, vcg.h, vcg_defaults.h.
386 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
387 * src/graphviz.c, src/graphviz.h: New files.
388 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
389 * src/files.h: Make comment more generic.
390 * src/main.c (main): Likewise.
391 * src/print_graph.h: Likewise.
392 * src/getargs.c (usage): Make usage description more generic.
393 * src/print_graph.c: Include graphviz.h rather than vcg.h.
394 (static_graph, fgraph): Remove. All uses changed to pass
395 arguments instead of sharing a static var.
396 (print_core, print_actions, print_state, print_graph):
397 Output graphviz format rather than VCG format.
398 * tests/.cvsignore: Remove *.vcg; add *.dot.
399 * tests/output.at: Expect *.dot files, not *.vcg files.
400
401 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
402 accommodates the 2006-10-08 change.
403
4042006-10-11 Bob Rossi <bob@brasko.net>
405
406 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
407 (b4_yyssa, b4_yyerror_range): New macros.
408 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
409 (yypvarsinit): Remove init of removed fields.
410 (yypushparse): Remove use of removed fields; use new macros instead.
411
4122006-10-11 Paul Eggert <eggert@cs.ucla.edu>
413
414 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
415 in a push parser. Reindent slightly to match yacc.c better.
416
4172006-10-11 Bob Rossi <bob@brasko.net>
418
419 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
420 yymsg_alloc fields.
421 (yypvarsinit, yypushparse): Remove init of removed fields.
422 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
423
4242006-10-09 Paul Eggert <eggert@cs.ucla.edu>
425
426 * THANKS: Add Paolo Bonzini and Bob Rossi.
427
4282006-10-08 Paolo Bonzini <bonzini@gnu.org>
429
430 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
431 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
432 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
433 b4_define_user_cde and uses): Remove.
434 (b4_comment, b4_prefix, b4_sync_start): New.
435 * data/bison.m4: New file, with most of the content removed from c.m4.
436 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
437 * src/output.c (output_skeleton): Pass bison.m4.
438 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
439 only if specified.
440
4412006-10-05 Paul Eggert <eggert@cs.ucla.edu>
442
443 Fix test failure reported by Tom Lane in
444 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
445 and try to make such failures easier to catch in the future.
446 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
447 that's now the caller's responsibility.
448 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
449 Set yychar = YYEOF if it's negative.
450 * tests/actions.at (yylex): Abort if asked to read past EOF.
451 * tests/conflicts.at (yylex): Likewise.
452 * tests/cxx-type.at (yylex): Likewise.
453 * tests/glr-regression.at (yylex): Likewise.
454 * tests/input.at (yylex): Likewise.
455 * tests/regression.at (yylex): Likewise.
456 * tests/torture.at (yylex): Likewise.
457
4582006-10-01 Paul Eggert <eggert@cs.ucla.edu>
459
460 Fix problems with translating English-language diagnostics.
461 * bootstrap: Fix bug introduced in recent bootstrap changes, with
462 respect to bison-runtime pot generation. The YY_ stuff
463 wasn't being captured.
464 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
465 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
466 * runtime-po/POTFILES.in: Add data/push.c.
467
4682006-09-29 Paul Eggert <eggert@cs.ucla.edu>
469
470 Merge bootstrap changes from coreutils.
471
472 2006-09-28 Jim Meyering <jim@meyering.net>
473
474 Automatically generated dependencies are important even
475 when all of the sources in a directory come from gnulib.
476 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
477 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
478
479 2006-09-23 Jim Meyering <jim@meyering.net>
480
481 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
482
483 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
484
485 * bootstrap: Add support for --force.
486 (usage): New function. Describe usage less tersely.
487 (CVS_only_file): New var.
488
4892006-09-21 Paul Eggert <eggert@cs.ucla.edu>
490
491 * data/push.c (YYPUSH_MORE): Make it an enum instead.
492 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
493 Adjust white space and comments to match GNU style better.
494
4952006-09-20 Bob Rossi <bob@brasko.net>
496
497 * data/push.c (yyresult_get): Remove function.
498 (YYPUSH_MORE): Add #define.
499 (yypushparse): Modify return value.
500
5012006-09-20 Paul Eggert <eggert@cs.ucla.edu>
502
503 * stamp-h.in: Remove; no longer needed.
504 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
505 Remove config.h, config.hin, intl (no longer created).
506 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
507 stamp-h1.
508
509 Sync bootstrap from coreutils, as follows:
510
511 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
512
513 * bootstrap (symlink_to_gnulib): New function.
514 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
515 to copies-of-gnulib.
516 (cp_mark_as_generated, slurp, gnulib_files):
517 Avoid making a copy if it's the same as the old version.
518 (gnulib_files): Add support for this variable (used by Bison).
519
5202006-09-20 Paul Eggert <eggert@cs.ucla.edu>
521
522 * src/getargs.c (usage): Rework to use conventions similar to
523 coreutils, to make translation a bit easier and the code a bit
524 smaller. Problem reported by Tim Van Holder.
525
5262006-09-15 Paul Eggert <eggert@cs.ucla.edu>
527
528 Use some of gnulib's new modules, taken from coreutils.
529
530 * bootstrap: Sync from coreutils, except add support for gnulib_files.
531 * bootstrap.conf: New file.
532 (gnulib_modules): Add configmake, inttypes, unistd.
533 (XGETTEXT_OPTIONS): Add complain, complain_at,
534 fatal, fatal_at, warn, warn_at, unexpected_end.
535 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
536 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
537 (gl_EARLY): Add.
538 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
539 (gl_INIT): Add
540 (GNULIB_AUTOCONF_SNIPPET): Remove.
541 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
542 the pickiest.
543 * lib/.cvsignore: Add inttypes_.h.
544 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
545 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
546 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
547 no-longer-necessary initializations.
548 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
549 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
550 use the unistd module.
551 * src/system.h: Likewise.
552 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
553 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
554 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
555 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
556 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
557 * src/system.h: Include inttypes.h unconditionally, now that we
558 use the inttypes module. Don't bother to include stdint.h, since
559 inttypes.h now does that for us.
560 (LOCALEDIR): Remove, now that we use the configmake module.
561 * src/getargs.c: Include configmake.h.
562 * src/main.c: Likewise.
563 * src/output.c: Likewise.
564 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
565 not from $abs_top_builddir, since config.h moved.
566
567
568 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
569 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
570
571 * src/parse-gram.y (symbol_declaration): Don't put statements
572 before declarations; it's not portable to C89.
573 * src/scan-code.l (handle_action_at): Likewise.
574
575 * src/scan-code.l: Always initialize braces_level; the old code
576 left it uninitialized and therefore had undefined behavior.
577
578 Don't attempt to redefine 'assert', since it runs afoul of
579 systems where standard headers (mistakenly) include <assert.h>.
580 Instead, define and use our own alternative, called 'aver'.
581 * src/reader.c: Don't include assert.h, since we no longer
582 use assert.
583 * src/scan-code.l: Likewise.
584 * src/system.h (assert): Remove, replacing with....
585 (aver): New function, taking a bool arg. All uses changed.
586 * src/tables.c (pack_vector): Ensure that aver arg is bool,
587 not merely an integer.
588
5892006-09-15 Bob Rossi <bob@brasko.net>
590
591 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
592 * data/c.m4 (YYPUSH): New.
593 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
594 * src/getargs.c (push_parser): New var.
595 * src/getargs.h (push_parser): New declaration.
596 * src/output.c (prepare): Add macro insertion of `push_flag'.
597 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
598 (prologue_declaration): Parse %push-parser.
599 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
600 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
601 list of removed lines from the traces observed.
602 (AT_CHECK_CALC_LALR): Added push parser tests.
603
6042006-09-13 Paul Eggert <eggert@cs.ucla.edu>
605
606 * NEWS: Version 2.3a.
607 * configure.ac (AC_INIT): Likewise.
608
609 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
610 "#define YYSTYPE int" that caused "make maintainer-check" to fail
611 due to header ordering dependencies. I don't know why the #define
612 was there.
613
614 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
615 runtime cost when YYDEBUG is not defined, and so that some tests
616 that used to fail now work. Problem and initial suggestion by
617 Paolo Bonzini.
618 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
619 * data/glr.cc (b4_parser_class_name):
620 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
621 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
622 (yydebug_) [YYDEBUG]: New member.
623 (yycdebug_): Now defined only if YYDEBUG.
624 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
625 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
626 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
627 if YYYDEBUG.
628 (debug_stream, set_debug_stream, debug_level, set_debug_level):
629 Define only if YYDEBUG.
630 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
631 set_debug_level.
632 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
633 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
634 AT_CHECK_CALC_GLR_CC that are working now.
635
6362006-09-12 Paul Eggert <eggert@cs.ucla.edu>
637
638 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
639 We don't need them in glr.cc, and glr.c defines them.
640 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
641 assumes that defining it to anything is the same as defining
642 it to 1. Problem reported by Paolo Bonzini.
643
6442006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
645
646 * data/c.m4 (b4_null, b4_case): Define.
647 * src/output.c (prepare_symbols): Use b4_null.
648 (user_actions_output): Use b4_case.
649
6502006-09-11 Paul Eggert <eggert@cs.ucla.edu>
651
652 * data/glr.c (b4_shared_declarations): Put start-header first,
653 before any #includes that we generate, so that feature-test
654 macros work. Problem reported by Michael Deutschmann in
655 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
656 * data/lalr1.cc: Likewise.
657 * doc/bison.texinfo (Prologue): Document that feature-test macros
658 should be defined before any Bison declarations.
659 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
660 that depend on location.hh after, not before, Bison decls, since
661 we now include location.hh after the first user prologue.
662
663 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
664 Sander Brandenburg in
665 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
666 Also, fix minor white space and comment issues.
667 (Prologue): Mention that it's better to define feature-test macros
668 before Bison declarations. Problem reported by Michael Deutschmann.
669
670 * README-cvs: Fix typo: "&" should be "&&". Problem reported
671 by Jim Meyering.
672 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
673 This adjusts to recent gnulib changes.
674
6752006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
676
677 Finish implementation of per-type %destructor/%printer. Discussed
678 starting at
679 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
680 and
681 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
682 * NEWS (2.3+): Add a description of this feature to the default
683 %destructor/%printer description.
684 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
685 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
686 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
687 list node contains a semantic type.
688 * src/symtab.c, src/symtab.h: Extend with a table that associates
689 semantic types with their %destructor's and %printer's.
690 (semantic_type_from_uniqstr, semantic_type_get,
691 semantic_type_destructor_set, semantic_type_printer_set): New functions
692 composing the public interface of that table.
693 (symbol_destructor_get, symbol_destructor_location_get,
694 symbol_printer_get, symbol_printer_location_get): If there's no
695 per-symbol %destructor/%printer, look up the per-type before trying
696 the default.
697 * tests/actions.at (Per-type %printer and %destructor): New test case.
698 * tests/input.at (Default %printer and %destructor redeclared):
699 Extend to check that multiple occurrences of %symbol-default in a
700 single %destructor/%printer declaration is an error.
701 (Per-type %printer and %destructor redeclared, Unused values with
702 per-type %destructor): New test cases.
703
7042006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
705
706 Require default %destructor/%printer to be declared using
707 %symbol-default instead of an empty symbol list, and start working on
708 new per-type %destructor/%printer. Discussed at
709 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
710 * NEWS (2.3+): Add %symbol-default to example.
711 * bison.texinfo (Freeing Discarded Symbols): Likewise.
712 (Bison Symbols): Add entry for %symbol-default.
713 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
714 (generic_symlist, generic_symlist_item): New nonterminals for creating
715 a list in which each item is a symbol, semantic type, or
716 %symbol-default.
717 (grammar_declaration): Use generic_symlist in %destructor and %printer
718 declarations instead of symbols.1 or an empty list.
719 (symbol_declaration, precedence_declaration, symbols.1): Update actions
720 for changes to symbol_list.
721 * src/reader.c: Update for changes to symbol_list.
722 * src/scan-code.l: Likewise.
723 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
724 * src/symlist.c, src/symlist.h: Extend such that a list node may
725 represent a semantic type or a %symbol-default in addition to just an
726 ordinary symbol. Add switched functions for setting %destructor's and
727 %printer's.
728 * tests/actions.at, tests/input.at: Add %symbol-default to all default
729 %destructor/%printer declarations.
730
7312006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
732
733 Whether the default %destructor/%printer applies to a particular symbol
734 isn't a question of whether the user *declares* that symbol (in %token,
735 for example). It's a question of whether the user by any means
736 *defines* the symbol at all (by simply using a char token, for
737 example). $end is defined by Bison whereas any other token with token
738 number 0 is defined by the user. The error token is always defined by
739 Bison regardless of whether the user declares it with %token, but we
740 may one day let the user define error as a nonterminal instead.
741 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
742 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
743 the meaning of "user-defined".
744 * tests/actions.at (Default %printer and %destructor for user-declared
745 end token): Rename to...
746 (Default %printer and %destructor for user-defined end token): ...
747 this.
748
749 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
750 computation of whether to apply the default, don't maintain a list of
751 every Bison-defined symbol. Instead, just check for a first character
752 of '$', which a user symbol cannot have, and check for the error token.
753
7542006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
755
756 Don't apply the default %destructor or %printer to the error token,
757 $undefined, or $accept. This change fits the general rule that the
758 default %destructor and %printer are only for user-declared symbols,
759 and it solves several difficulties that are described in the new test
760 cases listed below.
761 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
762 * tests/actions.at (Default %printer and %destructor are not for error
763 or $undefined, Default %printer and %destructor are not for $accept):
764 New test cases.
765
7662006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
767
768 Allow %start after the first rule.
769 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
770 when parsing the first rule.
771 (check_and_convert_grammar): Search for it here after all grammar
772 declarations have been parsed. Skip midrules, which have dummy LHS
773 nonterminals.
774 * src/symtab.c (symbol_is_dummy): New function.
775 * src/symtab.h (symbol_is_dummy): Declare it.
776 * tests/input.at (%start after first rule): New test.
777
7782006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
779
780 Redo some of the previous commit: add back the ability to use
781 non-aliased/undeclared string literals since it might be useful to
782 those declaring %token-table.
783 * src/reader.c (check_and_convert_grammar): Undo changes in previous
784 commit: don't worry about complaints from symbols_pack.
785 * src/symtab.c (symbol_new, symbol_class_set,
786 symbol_check_alias_consistency): Undo changes in previous commit: count
787 each string literal as a new symbol and token, assign it a symbol
788 number, and don't complain about non-aliased string literals.
789 (symbols_pack): Since symbol_make_alias still does not decrement symbol
790 and token counts but does still set aliased tokens to the same number,
791 symbol_pack_processor now leaves empty slots in the symbols array.
792 Remove those slots.
793 * tests/regression.at (Undeclared string literal): Remove test case
794 added in previous commit since non-aliased string literals are allowed
795 again.
796 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
797 remove unnecessary string literal declarations.
798 * tests/sets.at (Firsts): Likewise.
799
8002006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
801
802 Don't allow an undeclared string literal, but allow a string literal to
803 be used before its declaration.
804 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
805 symbols_pack complained.
806 * src/symtab.c (symbol_new): Don't count a string literal as a new
807 symbol.
808 (symbol_class_set): Don't count a string literal as a new token, and
809 don't assign it a symbol number since symbol_make_alias does that.
810 (symbol_make_alias): It's not necessary to decrement the symbol and
811 token counts anymore. Don't assume that an alias declaration occurs
812 before any uses of the identifier or string, and thus don't assert that
813 one of them has the highest symbol number so far.
814 (symbol_check_alias_consistency): Complain if there's a string literal
815 that wasn't declared as an alias.
816 (symbols_pack): Bail if symbol_check_alias_consistency failed since
817 symbol_pack asserts that every token has been assigned a symbol number
818 although undeclared string literals have not.
819 * tests/regression.at (String alias declared after use, Undeclared
820 string literal): New test cases.
821 (Characters Escapes, Web2c Actions): Declare string literals as
822 aliases.
823 * tests/sets.at (Firsts): Likewise.
824
8252006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
826
827 In the grammar scanner, STRING_FINISH unclosed constructs and return
828 them to the parser in order to improve error messages.
829 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
830 SC_BRACED_CODE, SC_PROLOGUE): Implement.
831 * tests/input.at (Unclosed constructs): New test case.
832 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
833 seen.
834
835 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
836 unused global.
837
8382006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
839
840 Handle string aliases for character tokens correctly.
841 * src/symtab.c (symbol_user_token_number_set): If the token has an
842 alias, check and set its alias's user token number instead of its own,
843 which is set to indicate the alias. Previously, every occurrence of
844 the character token in the grammar overwrote that alias indicator with
845 the character code.
846 * tests/input.at (String aliases for character tokens): New test.
847
8482006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
849
850 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
851
8522006-08-11 Paul Eggert <eggert@cs.ucla.edu>
853
854 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
855 to prevent failures when building on older platforms.
856 Check for autopoint failure.
857 Set XGETTEXT_OPTIONS to values that check for C format strings,
858 so that translators are warned about them (this also helps
859 prevent core dumps).
860
861 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
862 function, since it simplifies our code a bit.
863
864 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
865 rather than -W, so we don't get bogus warnings about sign comparisons.
866 Add -Wpointer-arith, since that warning is useful (it reports code
867 that does not conform to C89 and that some compilers reject).
868 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
869 since it's no longer needed.
870
8712006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
872
873 Clean up scanners a bit.
874 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
875 definitions so gcc won't warn when obstack_for_string is unused.
876 * src/scan-code.l: config.h and system.h are already #include'd by
877 scan-code-c.c, so get rid of them here.
878 * src/scan-gram.l: Likewise.
879 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
880 definitions rather than duplicating the rest of it.
881 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
882
8832006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
884
885 Suppress signed/unsigned comparison warnings for yycheck.
886 * data/c.m4 (b4_safest_int_type): New macro.
887 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
888 a signed int type, cast it to b4_safest_int_type first.
889 * data/yacc.c: Likewise.
890 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
891 also overwritten.
892
8932006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
894
895 * doc/bison.texinfo: Fix some typos.
896
8972006-08-02 Paul Eggert <eggert@cs.ucla.edu>
898
899 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
900 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
901
902 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
903 the latest gnulib does this a different way.
904 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
905 translation was patched, so stop omitting it.
906
9072006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
908
909 Enable declaration of default %printer/%destructor. Make the parser
910 use these for all user-declared grammar symbols for which the user does
911 not declare a specific %printer/%destructor. Thus, the parser uses it
912 for token 0 if the user declares it but not if Bison generates it as
913 $end. Discussed starting at
914 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
915 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
916 and
917 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
918 * NEWS (2.3+): Mention.
919 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
920 declare a %destructor for a mid-rule's semantic value. It's just
921 impossible to declare one specific to it.
922 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
923 code. Describe default %destructor form.
924 * src/parse-gram.y (grammar_declaration): Parse default
925 %printer/%destructor declarations.
926 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
927 and symbol_destructor_location_get rather than accessing the destructor
928 and destructor_location members of struct symbol.
929 (symbol_printers_output): Likewise but for %printer's.
930 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
931 again.
932 * src/symtab.c (default_destructor, default_destructor_location,
933 default_printer, default_printer_location): New static global
934 variables to record the default %destructor and %printer.
935 (symbol_destructor_get, symbol_destructor_location_get,
936 symbol_printer_get, symbol_printer_location_get): New functions to
937 compute the appropriate %destructor and %printer for a symbol.
938 (default_destructor_set, default_printer_set): New functions to set the
939 default %destructor and %printer.
940 * src/symtab.h: Prototype all those new functions.
941 * tests/actions.at (Default %printer and %destructor): New test to
942 check that the right %printer and %destructor are called, that they're
943 not called for $end, and that $$ and @$ work correctly.
944 (Default %printer and %destructor for user-declared end token): New
945 test to check that the default %printer and %destructor are called for
946 a user-declared end token.
947 * tests/input.at (Default %printer and %destructor redeclared, Unused
948 values with default %destructor): New tests to check related grammar
949 warnings and errors.
950
9512006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
952
953 Clean up handling of %destructor for the end token (token 0).
954 Discussed starting at
955 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
956 and
957 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
958
959 Make the skeletons consistent in how they pop the end token and invoke
960 its %destructor.
961 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
962 state, which has token number 0, since this would invoke the
963 %destructor for the end token.
964 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
965 until after shifting the end token, or else it won't be popped.
966 * data/yacc.c (yyparse): Likewise.
967
968 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
969 it's the end token. Upon termination, destroy an unshifted lookahead
970 even when it's the end token.
971 * data/lalr1.cc (yy::parser::parse): Likewise.
972 * data/yacc.c (yyparse): Likewise.
973
974 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
975 value warnings for the end token when the user gives the end token a
976 %destructor.
977
978 * tests/actions.at (Printers and Destructors): Test all the above.
979
9802006-07-24 Paul Eggert <eggert@cs.ucla.edu>
981
982 Update to latest gnulib and gettext versions.
983 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
984 Add fopen-safer.
985 (gnulib_files): Add m4/warning.m4. Don't worry about files
986 overwritten by autopoint.
987 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
988 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
989 rejects them.
990 Don't use autoreconf; instead, invoke autopoint etc. by hand,
991 so that we can remove the intl files at a better time.
992 (intl_files_to_remove): Remove aclocal.m4, since it gets
993 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
994 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
995 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
996 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
997 Remove datarootdir hack; no longer needed.
998 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
999 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1000 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1001 strdup.h.
1002 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1003 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1004
10052006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1006
1007 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1008 it with --assume-autoconf='latest-stable'.
1009
10102006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1011
1012 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1013 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1014 YYSTYPE' and `{'.
1015 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1016 those from muscle_tab.c since the old ones are misleading.
1017
10182006-07-13 Akim Demaille <akim@epita.fr>
1019
1020 Support %define "KEY" {VALUE}.
1021 * src/scan-code.h, src/scan-code.l (translate_action)
1022 (translate_rule_action, translate_symbol_action, translate_code):
1023 Return char *, not const char *.
1024 * src/parse-gram.y (declaration): Rename as...
1025 (prologue_declaration): this.
1026 (string_content): Remove this nonterminal, use STRING.
1027 (braceless, content, content.opt): New nonterminal.
1028 Use them.
1029 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1030 as value.
1031 * src/scan-gram.l (getargs.h): Don't include it.
1032
10332006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1034
1035 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1036 rather than a for-loop that declares a local bool variable. This
1037 should work around a compatibility problem with a Cray x1e C++
1038 compiler reported by Hung Nguyen in
1039 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1040 The for-loop was introduced in the 2004-11-17 change but I don't
1041 know why it was needed.
1042
10432006-07-12 Akim Demaille <akim@epita.fr>
1044
1045 * data/c.m4: Comment changes.
1046
10472006-07-10 Akim Demaille <akim@lrde.epita.fr>
1048
1049 * src/complain.c (error_message, ERROR_MESSAGE): New.
1050 To factor...
1051 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1052 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1053
10542006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1055
1056 * NEWS: Instead of %union, you can define and use your own union type
1057 YYSTYPE if your grammar contains at least one <type> tag.
1058 Your YYSTYPE need not be a macro; it can be a typedef.
1059 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1060 (Union Decl, Decl Summary): Document this.
1061 * data/glr.c (YYSTYPE): Implement this.
1062 * data/glr.cc (YYSTYPE): Likewise.
1063 * data/lalr1.cc (YYSTYPE): Likewise.
1064 * data/yacc.c (YYSTYPE): Likewise.
1065 * src/output.c (prepare): Output tag_seen_flag.
1066 * src/parse-gram.y (declaration, grammar_declaration):
1067 Use 'union_seen' rather than 'typed' to determine whether
1068 %union has been seen, since grammars can now be typed without
1069 %union.
1070 (symbol_declaration, type.opt, symbol_def):
1071 Keep track of whether a tag has been seen.
1072 * src/reader.c (union_seen, tag_seen): New vars.
1073 (typed): remove.
1074 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1075 * src/scan-code.l (untyped_var_seen): New variable.
1076 (handle_action_dollar): Adjust to above changes.
1077 (handle_action_dollar, handle_action_at):
1078 Improve overflow checking for outlandish numbers.
1079 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1080 avoid new diagnostics generated by above changes.
1081 * tests/regression.at (YYSTYPE typedef): Add test to check
1082 for type tags without %union.
1083
1084 * src/symlist.c (symbol_list_length): Return int, not unsigned
1085 int, since callers expect int. This may need to get revisited
1086 once we have proper integer overflow checking.
1087
1088 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1089 object is now static.
1090
1091 * src/getargs.c (flags_argmatch): Return void, not int,
1092 to pacify ./configure --enable-gcc-warnings.
1093
1094 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1095 since last_string is already defined to FLEX_PREFIX (last_string).
1096
10972006-07-09 Akim Demaille <akim@lrde.epita.fr>
1098
1099 Implement --warnings/-W.
1100 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1101 replaced by...
1102 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1103 Adjust callers.
1104 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1105 (warnings_args, warnings_types): New.
1106 (getargs, short_options, long_options): Accept -W/--warnings.
1107 Sort the options by alphabetical order, upper case letter right
1108 before its lower case.
1109
11102006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1111
1112 Change %merge result type clash warnings to errors. Discussed at
1113 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1114 * src/reader.c (record_merge_function_type): Use complain_at.
1115 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1116 declared later): Update test case results.
1117
11182006-07-09 Akim Demaille <akim@lrde.epita.fr>
1119
1120 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1121 to be in alphabetical order.
1122 (trace_args): Spelling fixes.
1123
11242006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1125
1126 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1127 so they don't collide with user-defined macros.
1128 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1129 this was never guaranteed, and now that we're using gnulib stdint,
1130 which defines int_fast16_t to long int, the problem is exposed.
1131
11322006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1133
1134 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1135 need the full POSIX semantics (and weren't implementing them
1136 anyway).
1137
1138 Adjust to Autoconf 2.60 and today's gnulib.
1139 * bootstrap (gnulib_modules): Add stdint.
1140 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1141 no longer copies it.
1142 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1143 since stdint needs the former and wcwidth (which is now required
1144 by mbswidth) needs the latter.
1145 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1146 work around a compatibility glitch between gettext 0.14.6 and
1147 Autoconf 2.60.
1148 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1149 Do not check for uintptr_t, since new stdint module does the right
1150 thing.
1151 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1152 Add stdint.h, stdint_.h, wcwidth.h.
1153 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1154 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1155 stdint.m4, wchar_t.m4, wcwidth.m4.
1156 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1157 usual order for ../lib/*.h files.
1158 (file_name_split): Use last_component, not base_name, to adjust
1159 to gnulib changes.
1160 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1161 for ../lib/*.h files.
1162 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1163 Define unconditionally, since we now assume the stdint module.
1164 * src/scan-skel.l: Include <dirname.h>.
1165 (BASE_QPUTS): Use last_component, not base_name.
1166 * src/system.h: Include <unlocked-io.h> in the usual order
1167 for ../lib/*.h files. Include <stdint.h> unconditionally,
1168 since we now use the stdint module.
1169 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1170 HAVE_UINTPTR_T, since we now use the stdint module.
1171 (base_name): Remove decl, since files now include <dirname.h>
1172 to get the decl.
1173
11742006-07-08 Akim Demaille <akim@lrde.epita.fr>
1175
1176 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1177 New, default to 1.
1178 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1179 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1180 default.
1181 * tests/calc.at: Adjust.
1182
11832006-07-08 Akim Demaille <akim@lrde.epita.fr>
1184
1185 * data/c.m4 (b4_basename): New.
1186 (b4_syncline): Also output the location of its invocation (from
1187 the skeleton).
1188 (b4_user_action, b4_define_user_action, b4_user_actions)
1189 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1190 (b4_user_stype): New.
1191 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1192
11932006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1194
1195 In the grammar file, the first column is 1 not 0 on the first line as
1196 on every other line.
1197 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1198 * tests/input.at (Torturing the Scanner): Update output.
1199
1200 * src/scan-gram.l (scanner_cursor): Declare it static.
1201
12022006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1203
1204 In warnings, say "previous declaration" rather than "first
1205 declaration".
1206 * src/symtab.c (redeclaration): Do that here.
1207 * src/reader.c (record_merge_function_type): In the case of a result
1208 type clash, report the previous declaration rather than the very first
1209 one in the grammar file.
1210 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1211 declared later): Add a third declaration to check this behavior.
1212 * tests/input.at (Incompatible Aliases): Update output.
1213
12142006-06-27 Akim Demaille <akim@epita.fr>
1215
1216 * doc/Doxyfile.in: New.
1217 * doc/Makefile.am: Use it.
1218 * src/lalr.h, src/symtab.h: Initial doxygenation.
1219
12202006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1221
1222 Don't miss %merge result type warnings just because the LHS types are
1223 declared after the %merge. This continues the effort of the previous
1224 patch.
1225 * src/reader.c (get_merge_function): Don't set the merger type yet.
1226 (record_merge_function_type): New function for setting the merger type
1227 and checking for clashes.
1228 (grammar_current_rule_merge_set): Set the location of the %merge for
1229 the current rule.
1230 (packgram): Invoke record_merge_function_type for each rule now that
1231 all symbol type declarations have been parsed.
1232 * src/reader.h (merger_list.type_declaration_location): New member
1233 storing the location of the first %merge from which the type for this
1234 merging function was derived.
1235 * src/symlist.h (symbol_list.merger_declaration_location): New member
1236 storing the location of a rule's %merge, if any.
1237 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1238 declared later): New test to catch the error fixed by the above patch.
1239
12402006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1241
1242 Get action warnings (grammar_rule_check) right even when symbol
1243 declarations appear after the rules. Discussed at
1244 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1245 and
1246 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1247 Don't mistake the type of $$ in a midrule to be that of its parent
1248 rule's $$.
1249 * src/reader.c (grammar_current_rule_end): Don't invoke
1250 grammar_rule_check yet since not all symbol declarations may have been
1251 parsed yet.
1252 (grammar_midrule_action): Likewise.
1253 Don't record whether the midrule's $$ has been used yet since actions
1254 haven't been translated yet.
1255 Record the midrule's parent rule and its RHS index within the parent
1256 rule.
1257 (grammar_current_rule_action_append): Don't translate the action yet
1258 since not all symbol declarations may have been parsed yet and, thus,
1259 warnings about types for $$, $n, @$, and @n can't be reported yet.
1260 (packgram): Translate the action and invoke grammar_rule_check now that
1261 all symbol declarations have been parsed.
1262 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1263 after parsing the entire grammar file, the symbol list here in the case
1264 of a midrule is actually the midrule's empty RHS, so reference its
1265 parent rule's RHS where necessary.
1266 On the other hand, now that you can already know it's a midrule, you
1267 aren't forced to think $$ has the same type as its parent rule's $$.
1268 (handle_action_at): In the case of a midrule, reference the parent rule
1269 where necessary.
1270 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1271 members.
1272 (symbol_list_length): Now that this is invoked after all rules have
1273 been parsed, a NULL symbol (rather than a NULL symbol list node)
1274 terminates a rule. symbol_list_print already does this correctly.
1275 * src/symlist.h (symbol_list.midrule_parent_rule,
1276 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1277 remember their relationships with their parents.
1278 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1279 fixed by the above patch.
1280 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1281 implementing...
1282 (Unused values): ... this old test case and...
1283 (Unused values before symbol declarations): ... this new test case.
1284 This one is the same as `Unused values' except that all symbol
1285 declarations appear after the rules in order to catch the rest of the
1286 errors fixed by the above patch.
1287
12882006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1289
1290 More cleanup.
1291 * src/reader.c (current_rule): Declare it static since it's no longer
1292 used outside this file.
1293 (grammar_current_rule_action_append): Remove redundant arguments from
1294 translate_rule_action invocation.
1295 * src/reader.h (current_rule): Remove this unused extern.
1296 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1297 * src/scan-code.l (translate_rule_action): Likewise.
1298
12992006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1300
1301 Clean up yesterday's patch.
1302 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1303 to...
1304 * src/reader.c (grammar_current_rule_action_append): ... here for
1305 consistency with grammar_current_rule_symbol_append.
1306 * tests/regression.at (Braced code in declaration in rules section):
1307 Make yyerror and yylex static as usual.
1308
13092006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1310
1311 Fix bug that mistakes braced code in a declaration in the rules section
1312 to be a rule action. Mentioned at
1313 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1314 * src/scan-gram.l: Move midrule action detection from the start of the
1315 scanning of any braced code to...
1316 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1317 action. For readability, use $2 and @2 rather than the equivalent
1318 global variables.
1319 * tests/regression.at (Braced code in declaration in rules section):
1320 New test to catch the error fixed by the above patch.
1321
1322 Work on code readability some.
1323 * src/scan-code.l (current_rule): Get rid of this misleading and
1324 redundant declaration: it's actually extern'ed in reader.h.
1325 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1326 translate_action): Add a rule argument and use it instead of the global
1327 current_rule.
1328 (translate_rule_action): This already receives current_rule through an
1329 argument, so pass it on to translate_action instead of assigning
1330 current_rule to current_rule.
1331 (translate_symbol_action, translate_code): Pass rule = NULL to
1332 translate_action.
1333
13342006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1335
1336 Rename %before-definitions to %start-header and %after-definitions to
1337 %end-header. Don't use these declarations to separate pre-prologue
1338 blocks from post-prologue blocks. Add new order-independent
1339 declarations %before-header and %after-header as alternatives to the
1340 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1341 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1342 * NEWS (2.3+): Update for these changes.
1343 * data/glr.c (b4_before_definitions): Update to...
1344 (b4_start_header): ... this.
1345 (b4_after_definitions): Update to...
1346 (b4_end_header): ... this.
1347 * data/glr.cc: Likewise.
1348 * data/lalr1.cc: Likewise.
1349 * data/yacc.c: Likewise.
1350 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1351 prologue blocks with %*-header declarations.
1352 (Calc++ Parser): Likewise.
1353 (Bison Declaration Summary): Update names.
1354 (Bison Symbols): Update description.
1355 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1356 (PERCENT_END_HEADER): ... this.
1357 (PERCENT_BEFORE_DEFINITIONS): Update to...
1358 (PERCENT_START_HEADER): ... this.
1359 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1360 (declaration): Update token names and m4 macro names.
1361 When parsing %end-header and %start-header, invoke translate_code
1362 before muscle_code_grow, and no longer set global booleans to remember
1363 whether these declarations have been seen.
1364 Parse new %after-header and %before-header.
1365 * src/reader.c (before_definitions, after_definitions): Remove.
1366 (prologue_augment): Accept a new bool argument to specify whether to
1367 augment the pre-prologue or post-prologue.
1368 * src/reader.h (before_definitions, after_definitions): Remove these
1369 extern's.
1370 (prologue_augment): Add new bool argument.
1371 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1372 (PERCENT_END_HEADER): ... this.
1373 (PERCENT_BEFORE_DEFINITIONS): Update to...
1374 (PERCENT_START_HEADER): ... this.
1375 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1376 * tests/actions.at (Printers and Destructors): Update names.
1377
13782006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1379
1380 Add comparison operators for C++ location classes. Discussed at
1381 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1382 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1383 declaration indicating whether filename_type has an operator==. If
1384 filename_type is `std::string', it defaults to `1', `0' otherwise.
1385 * data/location.cc: Iff b4_define_location_comparison is `1', add
1386 operator== and operator!= for class position and for class location.
1387
1388 Some minor fixes.
1389 * src/scan-action.l: Remove unused file.
1390 * src/symtab.c (symbol_printer_set): Use printer_location not
1391 destructor_location.
1392 * src/symtab.h (struct symbol): Replace incorrect source comment for
1393 printer members.
1394 * tests/input.at (Incompatible Aliases): Update output with correct
1395 printer location.
1396
13972006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 Don't put the pre-prologue in the header file. For the yacc.c code
1400 file and the glr.c header and code files, move the pre-prologue before
1401 the token definitions. Add new %before-definitions and
1402 %after-definitions to declare code that will go in both the header file
1403 and code file. Discussed at
1404 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1405 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1406 and
1407 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1408 * NEWS (2.3+): Describe these changes.
1409 * data/glr.c (b4_pre_prologue): Move from within to before...
1410 (b4_shared_declarations): ... this.
1411 Add new b4_before_definitions before b4_token_enums.
1412 Add new b4_after_definitions at the end.
1413 * data/glr.cc (b4_pre_prologue): Replace with...
1414 (b4_before_definitions): ... this in the header file.
1415 (b4_after_definitions): New near the end of the header file.
1416 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1417 code file right before including the header file.
1418 (b4_before_definitions): New in the previous position of
1419 b4_pre_prologue in the header file.
1420 (b4_after_definitions): New near the end of the header file.
1421 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1422 (b4_token_enums_defines): In the code file, move to right before
1423 YYSTYPE for consistency with the header file.
1424 (b4_before_definitions): New right before b4_token_enums_defines in
1425 both the header and code file.
1426 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1427 header and code file.
1428 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1429 of prologues for %union dependencies.
1430 (Bison Declaration Summary): In %defines description, mention the
1431 effect of %before-definitions and %after-definitions on the header
1432 file.
1433 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1434 than in the pre-prologue so that make check succeeds.
1435 (Bison Symbols): Add entries for %before-definitions and
1436 %after-definitions.
1437 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1438 %before-definitions.
1439 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1440 (declaration): Parse those declarations and append to
1441 b4_before_definitions and b4_after_definitions, respectively.
1442 * src/reader.c (before_definitions, after_definitions): New bools to
1443 track whether those declarations have been seen.
1444 (prologue_augment): Add to the post-prologue if %union,
1445 %before-definitions, or %after-definitions has been seen.
1446 * src/reader.h (before_definitions, after_definitions): New extern's.
1447 * src/scan-gram.l: Scan the new declarations.
1448 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1449 prologue block in a %before-definitions or a %after-definitions based
1450 on whether the %union is declared.
1451 * tests/regression.at (Early token definitions with --yacc, Early token
1452 definitions without --yacc): Move tests for token definitions into the
1453 post-prologue since token names are no longer defined in the
1454 pre-prologue.
1455
14562006-06-20 Akim Demaille <akim@epita.fr>
1457
1458 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1459 (symbol_get): Use it.
1460 * src/parse-gram.y: Use it.
1461
14622006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1463
1464 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1465 build succeeds when configured with --enable-gcc-warnings.
1466
14672006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1468
1469 * src/parse-gram.y (char_name): New function.
1470 (CHAR, STRING, string_content): For %printer, properly escape.
1471 (ID): Prefer fputs to fprintf.
1472 (id): Reindent to be consistent with other rules.
1473 Properly quote char.
1474
1475 The Translation Project changed its way of publishing translations
1476 to maintainers. I haven't received any responses to my request
1477 for supporting the old way, or for documenting the new way. I
1478 have modified 'bootstrap' to use screen scraping
1479 (in this case, HTML scraping). This is unreliable and inelegant,
1480 but I don't see any better way. Yuck.
1481 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1482 (get_translations): New function, which uses HTML scraping to
1483 deduce locations of latest translations.
1484 Use this function to grab both bison and bison-runtime .po files.
1485 Don't bother priming the pump for the runtime-po domain any more,
1486 as it's now translated better than bison is.
1487
14882006-06-19 Akim Demaille <akim@epita.fr>
1489
1490 * src/scan-gram.l: No longer "parse" things after `%union' until
1491 `{'. Rather, return a single "%union" token.
1492 No longer make symbols: return strings, and leave the conversion
1493 to symbols to the parser.
1494 (SC_PRE_CODE, token_type): Remove.
1495 * src/parse-gram.y (%union): New field `character'.
1496 Sort tokens.
1497 (CHAR): New token.
1498 (ID, ID_COLON): Now that the scanner no longer makes them
1499 identifiers, adjust all uses to invoke symbol_get.
1500 (id_colon): New, wraps the conversion from string to symbol.
1501 (%union): Accept a possible union_name.
1502 (symbol): Now can be a char.
1503 * data/c.m4 (b4_union_name): Leave a default value.
1504 * data/glr.c, data/yacc.c: Use it.
1505
15062006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1507
1508 For associating token numbers with token names for "yacc.c", don't use
1509 #define statements unless `--yacc' is specified; always use enum
1510 yytokentype. Most important discussions start at:
1511 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1512 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1513 and
1514 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1515 * NEWS (2.3+): Mention.
1516 * data/c.m4 (b4_yacc_if): New.
1517 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1518 token #define's.
1519 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1520 on token name definitions.
1521 * src/getargs.c (usage): Capitalize `Yacc' in English.
1522 * src/output.c (prepare): Define b4_yacc_flag.
1523 * tests/regression.at (Early token definitions): Test that tokens names
1524 are defined before the pre-prologue not just before the post-prologue.
1525 Remove this test case and copy to...
1526 (Early token definitions with --yacc): ... this to test #define's.
1527 (Early token definitions without --yacc): ... and this to test enums.
1528
15292006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1530
1531 * NEWS: Reword the post-2.3 change to not be so optimistic about
1532 removing the old "look-ahead" spelling.
1533 Update previous look-ahead/lookahead change reports.
1534 * REFERENCES: look-ahead -> lookahead (since that's
1535 what he actually wrote).
1536 * doc/refcard.tex: look ahead -> lookahead,
1537 look-ahead -> lookahead
1538
15392006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1540
1541 For consistency, use `lookahead' instead of `look-ahead' or
1542 `look_ahead'. Discussed starting at
1543 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1544 and then at
1545 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1546 * NEWS: For the next release, note the change to `--report'.
1547 * TODO, doc/bison.1: Update English.
1548 * doc/bison.texinfo: Update English.
1549 (Understanding Your Parser, Bison Options): Document as
1550 `--report=lookahead' rather than `--report=look-ahead'.
1551 * src/conflicts.c: Update English in comments.
1552 (lookahead_set): Rename from look_ahead_set.
1553 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1554 (resolve_sr_conflict): Rename local look_ahead_tokens to
1555 lookahead_tokens, and update other uses.
1556 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1557 count_rr_conflicts, conflicts_free): Update uses.
1558 * src/getargs.c (report_args): Move "lookahead" before alternate
1559 spellings.
1560 (report_types): Update uses.
1561 (usage): For `--report' usage description, state `lookahead' spelling
1562 rather than `look-ahead'.
1563 * src/getargs.h (report.report_lookahead_tokens): Rename from
1564 report_look_ahead_tokens.
1565 * src/lalr.c: Update English in comments.
1566 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1567 (state_lookahead_tokens_count): Rename from
1568 state_look_ahead_tokens_count.
1569 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1570 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1571 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1572 Update other uses.
1573 Update English in output.
1574 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1575 * src/print.c: Update English in comments.
1576 (lookahead_set): Rename from look_ahead_set.
1577 (print_reduction): Rename argument lookahead_token from
1578 look_ahead_token.
1579 (print_core, state_default_rule, print_reductions, print_results):
1580 Update uses.
1581 * src/print_graph.c: Update English in comments.
1582 (print_core): Update uses.
1583 * src/state.c: Update English in comments.
1584 (reductions_new): Update uses.
1585 (state_rule_lookahead_tokens_print): Rename from
1586 state_rule_look_ahead_tokens_print, and update other uses.
1587 * src/state.h: Update English in comments.
1588 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1589 (state_rule_lookahead_tokens_print): Rename from
1590 state_rule_look_ahead_tokens_print.
1591 * src/tables.c: Update English in comments.
1592 (conflict_row, action_row): Update uses.
1593 * tests/glr-regression.at
1594 (Incorrect lookahead during deterministic GLR,
1595 Incorrect lookahead during nondeterministic GLR): Rename
1596 print_look_ahead to print_lookahead.
1597 * tests/torture.at: Update English in comments.
1598 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1599 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1600 (Many lookahead tokens): Update uses.
1601 * data/glr.c: Update English in comments.
1602 * lalr1.cc: Likewise.
1603 * yacc.c: Likewise.
1604 * src/conflicts.h: Likewise.
1605 * src/lalr.h: Likewise.
1606 * src/main.c: Likewise.
1607 * src/output.c: Likewise.
1608 * src/parse-gram.c: Likewise.
1609 * src/tables.h: Likewise.
1610 * tests/calc.at: Likewise.
1611
16122006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1613
1614 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1615
16162006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1617
1618 * TODO: Add request from Nelson H. F. Beebe to be able to install
1619 Bison without installing the yacc script.
1620
16212006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1622
1623 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1624 and yytext if they're already #define'd.
1625 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1626 * src/scan-code-c.c: ... here.
1627 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1628 <config.h>.
1629
16302006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1631
1632 Get Bison to build again when configured with --enable-gcc-warnings.
1633 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1634 missing #include's.
1635 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1636 loc argument as it shadows a global.
1637 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1638 invocation.
1639
1640 * src/.cvsignore: Add scan-code.c.
1641
16422006-06-07 Akim Demaille <akim@epita.fr>
1643
1644 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1645 to...
1646 * src/scan-code.l: here.
1647 * tests/input.at (Torturing the Scanner): Fix another location
1648 error.
1649
16502006-06-07 Akim Demaille <akim@epita.fr>
1651
1652 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1653
16542006-06-06 Akim Demaille <akim@epita.fr>
1655
1656 Extract the parsing of user actions from the grammar scanner.
1657 As a consequence, the relation between the grammar scanner and
1658 parser is much simpler. We can also split "composite tokens" back
1659 into simple tokens.
1660 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1661 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1662 rename as...
1663 * src/location.h, src/location.c (add_column_width)
1664 (location_compute): these.
1665 Fix the column count: the initial column is 0.
1666 (location_print): Be robust to ending column being 0.
1667 * src/location.h (boundary_set): New.
1668 * src/main.c: Adjust to scanner_free being renamed as
1669 gram_scanner_free.
1670 * src/output.c: Include scan-code.h.
1671 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1672 Use boundary_set.
1673 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1674 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1675 which is now, again, a separate token.
1676 Adjust all dependencies.
1677 Whereever actions with $ and @ are used, use translate_code.
1678 (action): Remove this nonterminal which is now useless.
1679 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1680 (grammar_current_rule_action_append): Use translate_code.
1681 (packgram): Bound check ruleno, itemno, and rule_length.
1682 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1683 (last_string, last_braced_code_loc, max_left_semantic_context)
1684 (scanner_initialize, scanner_free, scanner_last_string_free)
1685 (gram_out, gram_lineno, YY_DECL_): Move to...
1686 * src/scan-gram.h: this new file.
1687 (YY_DECL): Rename as...
1688 (GRAM_DECL): this.
1689 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1690 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1691 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1692 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1693 Move these declarations, and...
1694 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1695 these to...
1696 * src/flex-scanner.h: this new file.
1697 * src/scan-gram.l (rule_length, rule_length_overflow)
1698 (increment_rule_length): Remove.
1699 (last_braced_code_loc): Rename as...
1700 (gram_last_braced_code_loc): this.
1701 Adjust to the changes of the parser.
1702 Move all the handling of $ and @ into...
1703 * src/scan-code.l: here.
1704 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1705 (handle_action_dollar, handle_action_at): Move to...
1706 * src/scan-code.l: here.
1707 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1708 scan-code.h, scan-code-c.c, scan-gram.h.
1709 (EXTRA_bison_SOURCES): Add scan-code.l.
1710 (BUILT_SOURCES): Add scan-code.c.
1711 (yacc): Be robust to white spaces.
1712
1713 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1714 * tests/regression.at: Adjust the column numbers.
1715 * tests/regression.at: Adjust the error message.
1716
17172006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1718
1719 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1720 Use Akim's wording from
1721 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1722
17232006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1724
1725 Between Bison releases, manually append `+' to the previous Bison
1726 release number, and use that as a signal to automatically print the
1727 ChangeLog's CVS Id keyword from --version. Discussed starting at
1728 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1729 * ChangeLog: Add Id header.
1730 * configure.ac (AC_INIT): Append `+' to `2.3'.
1731 * src/.cvsignore: Add revision.c.
1732 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1733 (BUILT_SOURCES): Add revision.c.
1734 (revision.c): New target rule. This file defines a new global variable
1735 named revision. It initializes it with either the Id from ChangeLog
1736 or, if VERSION doesn't contain `+', with the empty string.
1737 * src/getargs.c (version): Print the value of revision.
1738 * src/revision.h: Extern revision.
1739
17402006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1741
1742 * NEWS: Version 2.3.
1743 * configure.ac (AC_INIT): Likewise.
1744
17452006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1746
1747 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1748 with no arguments, not as an object-like macro. This is for
1749 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1750 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1751 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1752 Document this.
1753
17542006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1755
1756 * src/getargs.c (usage): Back out yesterday's modification of the
1757 --help output so that we don't have to wait for translation before
1758 releasing 2.3.
1759
17602006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1761
1762 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1763 Problem reported by Akim Demaille.
1764
17652006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1766
1767 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1768
17692006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1770
1771 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1772 generated source code. Problem reported by Frans Englich in
1773 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1774
17752006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1776
1777 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1778 shell, not within 'make', so that 'make' by an ordinary builder
1779 (using GNU make) does not worry about configuring gzip. This also
1780 works around a bug reported independently by Keith Thompson and by
1781 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1782 stderr rather than stdout, messing up the build logs.
1783
17842006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1785
1786 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1787 to make sure that YYID will never be unused. This fixes a 'make
1788 maintainer-check' failure caused by the recent changes to the 'Trivial
1789 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1790 not used.
1791 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1792
17932006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1794
1795 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1796 state before an empty RHS is always resolved here. Only the location
1797 of that state is guaranteed to be resolved, and that's enough. This
1798 fixes the remaining bug reported by Derek M. Jones in
1799 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1800 * tests/glr-regression.at (Uninitialized location when reporting
1801 ambiguity): Test the above case.
1802 Also, the embedded comments in this test case claim it checks the case
1803 of an empty RHS that has inherited the initial location. However, the
1804 corresponding LHS was already resolved, so yyresolveLocations didn't
1805 actually have reason to modify it. Fix this by forcing
1806 nondeterministic operation at the beginning of the parse.
1807
18082006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1809
1810 * data/c.m4 (b4_yy_symbol_print_generate):
1811 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1812 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1813 of the bugs reported today by Derek M Jones in
1814 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1815 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1816 defined to be a type name without parens or brackets.
1817 (Location Type): Similarly for YYLTYPE.
1818 * tests/regression.at (Trivial grammars): Put in a test for this
1819 bug that will be caught by 'make maintainer-check' (though not,
1820 alas, by 'make check' unless your compiler is picky).
1821
18222006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1823
1824 * NEWS: Version 2.2.
1825 * configure.ac (AC_INIT): Likewise.
1826
18272006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1828
1829 * data/glr.c (yyreportTree): Make room in yystates for the state
1830 preceding the RHS. This fixes the segmentation fault reported by Derek
1831 M. Jones in
1832 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1833 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1834 to the user. Reported for yyreportTree by Derek M. Jones later in the
1835 same thread.
1836 * THANKS: Add Derek M. Jones.
1837 Update my email address.
1838 Fix typo in Steve Murphy's name.
1839
18402006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1841
1842 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1843 checking against YYLAST that caused the parser to miss a potential
1844 alternative in its diagnostic.
1845 Problem reported by Maria Jose Moron Fernandez in
1846 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1847 * data/lalr1.cc (yysyntax_error_): Likewise.
1848 * data/yacc.c (yysyntax_error): Likewise.
1849 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1850 tokens, in case we run into an older C compiler.
1851 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1852 Use them to check for the off-by-one error fixed above.
1853
1854 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1855 YYSIZE_T, not size_t.
1856 * tests/regression.at (Trivial grammars): New test, to catch
1857 the error fixed by the above patch.
1858
18592006-05-14 Akim Demaille <akim@lrde.epita.fr>
1860
1861 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1862 scheme.
1863 Reported by Steve Murphy.
1864
18652006-05-14 Akim Demaille <akim@lrde.epita.fr>
1866
1867 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1868 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1869
18702006-05-14 Akim Demaille <akim@lrde.epita.fr>
1871
1872 Implement --trace=m4.
1873 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1874 * src/output.c (output_skeleton): When set, pass -dV to m4.
1875
1876 Factor the handling of flags in m4.
1877 * src/output.c (prepare): Rename the muscle names debug, defines,
1878 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1879 * data/c.m4: Adjust.
1880 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1881 Use b4_define_flag_if to define other b4_FLAG_if macros.
1882 (b4_location_if): As a consequence, rename as...
1883 (b4_locations_if): this, for consistency.
1884 Adjust all the skeletons.
1885
18862006-05-14 Akim Demaille <akim@lrde.epita.fr>
1887
1888 * etc/bench.pm: Shorten bench names.
1889
18902006-05-14 Akim Demaille <akim@lrde.epita.fr>
1891
1892 * src/output.h, src/output.c (error_verbose): Move to...
1893 * src/getargs.h, src/getargs.c: here.
1894 Sort the flags.
1895 Adjust dependencies.
1896
18972006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1898
1899 * data/c.m4 (b4_copyright): Put the special exception for Bison
1900 skeletons here, so we don't have to put it in each skeleton. All
1901 uses changed. Suggested by Akim Demaille. Also, wrap the
1902 copyright notice, in case it is longer than 80 columns. Replace
1903 comma by newline after title.
1904
19052006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1906
1907 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1908 incompatibility, not a bug. Mention that it wasn't fixed as of
1909 flex 2.5.33.
1910
19112006-05-11 Akim Demaille <akim@lrde.epita.fr>
1912
1913 * examples/extexi: Enforce the precedence of concatenation over
1914 >>.
1915 Reported by Tommy Nordgren.
1916
19172006-05-11 Akim Demaille <akim@lrde.epita.fr>
1918
1919 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1920 with the member "token".
1921 Reported by Martin Nylin.
1922
19232006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1924
1925 * data/glr.c: Switch to Bison 2.2 special-exception language in
1926 the copyright notice. Use more-regular format for titles and
1927 copyright notices.
1928 * data/glr.cc: Likewise.
1929 * data/location.cc: Likewise.
1930 * data/yacc.cc: Likewise.
1931 * doc/bison.texinfo (Conditions): Document this.
1932 * NEWS: likewise. Upgrade version to 2.2.
1933
19342006-04-27 Akim Demaille <akim@lrde.epita.fr>
1935
1936 * data/glr.cc: Remove dead code.
1937
19382006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1939
1940 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1941 that variable and the line breaks the bootstrap. Problem reported
1942 by Juan M. Guerrero.
1943
19442006-04-24 Akim Demaille <akim@lrde.epita.fr>
1945
1946 * doc/bison.texinfo (Multiple start-symbols): New.
1947
19482006-04-24 Akim Demaille <akim@lrde.epita.fr>
1949
1950 * etc/README, etc/bench.pl: New.
1951
19522006-04-03 Akim Demaille <akim@lrde.epita.fr>
1953
1954 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1955 rule.
1956 Reported by Mickael Labau.
1957 * tests/input.at (Torturing the Scanner): Test it.
1958
19592006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1960
1961 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1962 Problem reported by Bob Rossi.
1963
19642006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1965
1966 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1967 and didn't really work.
1968 For the index, use @ifnotinfo, not @iftex.
1969 Minor cleanups of spacing and terminology.
1970
19712006-03-12 Akim Demaille <akim@lrde.epita.fr>
1972
1973 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1974 of AT_NAME_PREFIX when %name-prefix is not used.
1975
19762006-03-12 Akim Demaille <akim@lrde.epita.fr>
1977
1978 Apply --prefix to C++ skeletons too: they change the namespace.
1979 The test suite already exercize these cases.
1980 * data/c++.m4 (b4_namespace): New.
1981 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1982 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1983 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1984 * doc/bison.texinfo: Document it.
1985 (Option Cross Key): Use @multitable in all formats. It looks
1986 nicer, even in TeX outputs.
1987 (Rules): Use the same code whatever the output type is.
1988 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1989 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1990 * tests/calc.at: Use it, instead of hard coding `yy'.
1991
19922006-03-10 Akim Demaille <akim@lrde.epita.fr>
1993
1994 * TODO: Remove dead items.
1995
19962006-03-10 Akim Demaille <akim@lrde.epita.fr>
1997
1998 * doc/FAQ: Remove, merged into...
1999 * doc/bison.texinfo (FAQ): this.
2000 * doc/Makefile.am (EXTRA_DIST): Adjust.
2001
20022006-03-10 Akim Demaille <akim@lrde.epita.fr>
2003
2004 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2005 even if empty.
2006 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2007 * doc/bison.texinfo (Calc++ Scanner): Use it.
2008
20092006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2010
2011 Fix two nits reported by twlevo, plus one more that I discovered.
2012
2013 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2014 this is the usual Bison style.
2015 * src/location.h (location_print): Likewise.
2016
2017 * src/reader.h (token_name): Likewise.
2018
20192006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2020
2021 Fix some nits reported by twlevo.
2022 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2023 and "POSIX". Use more-modern syntax for URLs. Mention C++
2024 and ask for Java. Don't hardwire OS version numbers. Add
2025 copyright notice.
2026 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2027 * src/conflicts.c (solved_conflicts_obstack): Now static.
2028
20292006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2030
2031 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2032 page. Say "you can use it" not "you may use it" as on the web page;
2033 we're describing capabilities not granting permission.
2034
20352006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2036
2037 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2038 shadowing warnings. Use usual patter for iterating through RHS.
2039 * tests/glr-regression.at
2040 (Uninitialized location when reporting ambiguity):
2041 Modify yylex so that it uses its argument, rather than trying
2042 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2043 const char -> char const.
2044
2045 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2046 Don't use tabs inside commands; it messes up 'ps'.
2047 Problem reported by twlevo.
2048
20492006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2050
2051 * tests/glr-regression.at (Uninitialized location when reporting
2052 ambiguity): New test case.
2053 * data/glr.c (yyresolveLocations): New function, which uses
2054 YYLLOC_DEFAULT.
2055 (yyresolveValue): Invoke yyresolveLocations before reporting an
2056 ambiguity.
2057 * doc/bison.texinfo (Default Action for Locations): Note
2058 YYLLOC_DEFAULT's usage for ambiguity locations.
2059 (GLR Semantic Actions): Cross-reference those notes.
2060
20612006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2062
2063 * tests/glr-regression.at (Leaked semantic values when reporting
2064 ambiguity): Remove unnecessary union and type declarations.
2065 (Leaked lookahead after nondeterministic parse syntax error): New test
2066 case.
2067 * data/glr.c (yyparse): Check for zero stacks remaining before
2068 attempting to shift the lookahead so that you don't lose it.
2069
20702006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2071
2072 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2073 * tests/glr-regression.at (Leaked semantic values when reporting
2074 ambiguity): New test case.
2075 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2076 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2077 now unnecessary yystackp parameter.
2078 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2079 destructors can be called.
2080
2081 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2082 in existing testcases.
2083
20842006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2085
2086 Don't leak semantic values for parent RHS when a user action cuts the
2087 parser, and clean up related code a bit.
2088 * tests/glr-regression.at (Leaked merged semantic value if user action
2089 cuts parse): Rename to...
2090 (Leaked semantic values if user action cuts parse): ... this. Add check
2091 for leaked parent RHS values.
2092 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2093 between an unresolved state (non-empty chain of semantic options) and
2094 an incomplete one (signaled by an empty chain).
2095 (yyresolveStates): Document the interface. Move all manipulation of a
2096 successfully or unsuccessfully resolved yyGLRState to...
2097 (yyresolveValue): ... here so that yyresolveValue always leaves a
2098 yyGLRState with consistent data and thus is easier to understand.
2099 Remove the yyvalp and yylocp parameters since they are always just
2100 taken from the yys parameter. When reporting a discarded merged value
2101 in debugging output, note that it is incompletely merged. Document the
2102 interface.
2103 (yyresolveAction): If resolving any of the RHS states fails, destroy
2104 them all rather than leaking them. Thus, as long as user actions are
2105 written to clean up the RHS correctly, yyresolveAction always cleans up
2106 the RHS of a semantic option. Document the interface.
2107
21082006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2109
2110 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2111 led to a segmentation fault in GNU Pascal. Problem reported
2112 by Waldek Hebisch.
2113
21142006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2115
2116 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2117 mid-rule action inside a nonterminal symbol in order to declare a
2118 destructor for its semantic value.
2119
21202006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2121
2122 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2123 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2124 __cplusplus && ! defined _STDLIB_H && !
2125 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2126 defined free))]: Include <stdlib.h> rather than rolling our own
2127 declarations of malloc and free, to avoid problems with
2128 incompatible declarations (using 'throw') C++'s stdlib.h. This
2129 should fix Debian bug 340012
2130 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2131 reported by Guillaume Melquiond.
2132
21332006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2134
2135 * NEWS: Clarify symbols versus types in unused-value warnings.
2136
2137 * configure.ac (AC_INIT): Bump version number.
2138
21392006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2140
2141 * NEWS: Version 2.1a.
2142 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2143 since C99 requires this.
2144
21452006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2146
2147 * m4/c-working.m4: New file.
2148 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2149
21502006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2151
2152 * Makefile.maint: Merge from coreutils.
2153
21542006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2155
2156 More portability fixes for problems summarized by Nelson H. F. Beebe.
2157
2158 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2159 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2160 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2161 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2162 messes up because C++ code is compiled in 32-bit mode but linked
2163 in 64-bit mode.
2164
21652006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2166
2167 More portability fixes for problems summarized by Nelson H. F. Beebe.
2168
2169 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2170 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2171
2172 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2173 nodist_PROGRAMS, since we don't need to actually compile the
2174 example if we're just doing a plain 'make'. This avoids bothering
2175 the installer unnecessarily about problems due to weird C++
2176 compilers.
2177
21782006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2179
2180 More portability fixes for problems summarized by Nelson H. F. Beebe.
2181
2182 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2183 than #include "...", and compile with -I'.'. The old method was
2184 not portable, according to Posix and the C standard, and it does
2185 not work with Sun C 5.7, where previous #line directives affect
2186 the working directory used in later #include "..." directives.
2187
21882006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2189
2190 Various DJGGP specific issues in /djgpp
2191
21922006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2193
2194 More portability fixes for problems summarized by Nelson H. F. Beebe.
2195
2196 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2197 '#include <map>' works and that you can apply ++ to iterators.
2198
21992006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2200
2201 Work around portability problems summarized by Nelson H. F. Beebe in
2202 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2203
2204 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2205 that '#include <string>' works.
2206
2207 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2208 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2209 "warning: sorry: semantics of inline function static data `const
2210 unsigned char translate_table[262]' are wrong (you'll wind up with
2211 multiple copies)".
2212
2213 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2214 or, xor to not_, and_, or_, and xor_, respectively. This works
2215 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2216 random system header somewhere that includes the equivalent of
2217 <iso646.h>.
2218
2219 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2220 -E" works; it apparently doesn't work with PathScale EKO Compiler
2221 Suite Version 2.0.
2222
22232006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2224
2225 During deterministic GLR operation, user actions should be able to
2226 influence the parse by changing yychar. To make this easier to fix and
2227 to make glr.c easier to evolve in general, don't maintain yytoken in
2228 parallel with yychar; just compute yytoken when needed.
2229 * tests/glr-regression.at (Incorrect lookahead during deterministic
2230 GLR): Check that setting yychar in a user action has the intended
2231 effect.
2232 * data/glr.c (yyGLRStack): Remove yytokenp member.
2233 (yyclearin): Don't set *yytokenp.
2234 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2235 yychar rather than *yytokenp to determine the current lookahead.
2236 Compute yytoken locally when needed.
2237 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2238 point to.
2239
2240 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2241 after `--report' documentation.
2242
22432006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2244
2245 * src/parse-gram.y (grammar_declaration): Location of printer
2246 symbol is @1, not list->location. Bug reported by twlevo.
2247 * tests/input.at (Incompatible Aliases): Adjust to above change.
2248
22492006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2250
2251 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2252 all the test at once. This makes the output easier to read in the
2253 normal case.
2254
2255 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2256 got from <http://bro-ids.org/download.html>. The bug is that
2257 when two actions appeared in succession, the second one was
2258 scanned before the first one was added to the grammar rule
2259 as a midrule action. Bison then output the incorrect warning
2260 "parse.y:905.17-906.36: warning: unused value: $3".
2261 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2262 associated with a value.
2263 (rhs): Don't invoke grammar_current_rule_action_append.
2264 (action): Invoke it here instead.
2265 * src/reader.c (grammar_midrule_action): Now extern.
2266 (grammar_current_rule_action_append): Don't invoke
2267 grammar_midrule_action; that is now the scanner's job.
2268 * src/reader.h (last_string, last_braced_code_loc):
2269 (grammar_midrule_action): New decls.
2270 * src/scan-gram.l (last_string): Now extern, sigh.
2271 (last_braced_code_loc): New extern variable.
2272 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2273 rule already has an action.
2274 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2275 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2276 Add some tests to check that the above changes fixed the bug.
2277
22782006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2279
2280 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2281 All used changed. Check whether the symbol has a destructor,
2282 not whether it is typed.
2283 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2284 that the values are still reported as unused. All line numbers
2285 adjusted.
2286
22872006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2288
2289 Work around a bug in bro 0.8, which underparenthesizes its
2290 definition of YYLLOC_DEFAULT.
2291 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2292 their arguments.
2293 * data/lalr1.cc: Likewise.
2294 * data/yacc.cc: Likewise.
2295
22962006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2297
2298 Work around a bug in Pike 7.0, and give the Pike folks a
2299 better way to override the usual int widths.
2300 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2301 user can override the types.
2302 (short): #undef, to work around a bug in Pike 7.0.
2303 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2304 (union yyalloc.yyss): Use yytype_int16 rather than short.
2305 All uses changed.
2306 (yysigned_char): Remove.
2307 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2308 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2309 * tests/regression.at (Web2c Actions): Adjust to above changes.
2310
2311 * src/reader.c (check_and_convert_grammar): New function.
2312 (reader): Close the input file even if something went wrong during
2313 parsing. Minor file descriptor leak reported by twlevo.
2314
2315 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2316 to pacify gcc -Wswitch-default.
2317 * src/scan-gram.l (adjust_location): Use a default: break; case
2318 to pacify gcc -Wswitch-default.
2319 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2320 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2321 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2322 Move these decls to scan-skel.l, since they don't need to be
2323 visible elsewhere.
2324 * src/scan-skel.l: Accept the above decls.
2325 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2326 is used.
2327
23282006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2329
2330 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2331 since we don't want to insist on a version number at the start
2332 of the changelog every time.
2333 * Makefile.maint: Sync from coreutils a bit better.
2334 (sc_trailing_blank): Renamed from sc_trailing_space.
2335 All uses changed.
2336 (sc_no_if_have_config_h, sc_require_config_h):
2337 (sc_prohibit_assert_without_use): New rules.
2338 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2339 (sc_dd_max_sym_length): Fix leading spaces in rule.
2340 (sc_system_h_headers): Prefix with @.
2341 (sc_useless_cpp_parens, m4-check): Output line numbers.
2342 (changelog-check): Allow version only in head.
2343 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2344 satisfy new Makefile.maint rule.
2345 * data/glr.c: Likewise.
2346 * data/glr.cc: Likewise.
2347 * data/lalr1.cc: Likewise.
2348 * data/yacc.c: Likewise.
2349 * lib/ebitsetv.c: Likewise.
2350 * lib/lbitset.c: Likewise.
2351 * lib/subpipe.c: Likewise.
2352 * lib/timevar.c: Likewise.
2353 * src/system.h: Likewise.
2354 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2355 * djgpp/Makefile.maint: Add copyright notice.
2356 * djgpp/README.in: Likewise.
2357 * djgpp/config.bat: Likewise.
2358 * djgpp/config.site: Likewise.
2359 * djgpp/config_h.sed: Likewise.
2360 * djgpp/djunpack.bat: Likewise.
2361 * djgpp/config.sed: Fix copyright notice to match standard format.
2362 * djgpp/subpipe.h: Likewise.
2363 * lib/bitsetv-print.c: Likewise.
2364 * lib/bitsetv.c: Likewise.
2365 * lib/subpipe.h: Likewise.
2366 * lib/timevar.c: Likewise.
2367 * lib/timevar.h: Likewise.
2368 * djgpp/subpipe.c: Use standard recipe for config.h.
2369 * lib/abitset.c: Likewise.
2370 * lib/bitset.c: Likewise.
2371 * lib/bitset_stats.c: Likewise.
2372 * lib/bitsetv-print.c: Likewise.
2373 * lib/bitsetv.c: Likewise.
2374 * lib/ebitsetv.c: Likewise.
2375 * lib/get-errno.c: Likewise.
2376 * lib/lbitset.c: Likewise.
2377 * lib/subpipe.c: Likewise.
2378 * lib/timevar.c: Likewise.
2379 * lib/vbitset.c: Likewise.
2380 * tests/local.at: Likewise.
2381 * src/scan-gram.l: Don't include verify.h, since system.h does
2382 that for us.
2383 * .x-sc_require_config_h: New file.
2384 * .x-sc_unmarked_diagnostics: New file.
2385
23862006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2387
2388 Be a bit more systematic about using 'abort'.
2389 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2390 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2391 Put 'default: abort ();' before some other case, to satisfy older
2392 pedantic compilers.
2393 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2394 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2395 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2396 * src/conflicts.c (resolve_sr_conflict): Likewise.
2397 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2398 (get_decision_str, get_orientation_str, get_node_alignment_str):
2399 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2400 (get_linestyle_str, get_arrowstyle_str): Likewise.
2401 * src/conflicts.c (resolve_sr_conflict):
2402 Use a default case rather than one for the one remaining enum
2403 value, to catch invalid enum values as well.
2404 * src/lalr.c (set_goto_map, map_goto):
2405 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2406 * src/nullable.c (nullable_compute, token_definitions_output):
2407 Likewise.
2408 * src/reader.c (packgram, reader): Likewise.
2409 * src/state.c (transitions_to, state_new, state_reduction_find):
2410 Likewise.
2411 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2412 (symbol_pack): Likewise.
2413 * src/tables.c (conflict_row, pack_vector): Likewise.
2414 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2415 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2416 * src/system.h: Don't include <assert.h>.
2417 (assert): New macro.
2418
2419 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2420 (Destructor Decl, Parser Function, Pure Calling):
2421 Describe rules for braces inside C code more carefully.
2422
24232006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2424
2425 Fix some porting glitches found by Nelson H. F. Beebe.
2426 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2427 compilers that don't understand that abort () does not return.
2428 * src/state.c (transitions_to): Likewise.
2429 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2430 that '#include <cstdlib>' works.
2431 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2432 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2433 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2434 for the benefit of some pre-C99 compilers.
2435
2436 * bootstrap: Undo changes to gnulib files that autoreconf made.
2437
2438 Minor fixups to get 'make maintainer-check' to work.
2439 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2440 with the new verify.h implementation.
2441 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2442 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2443 * data/yacc.c (YYUSE): Likewise.
2444 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2445 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2446 * src/parse-gram.y (declaration): Don't pass a string constant
2447 to a function that expects char *, since GCC might complain
2448 about the constant value.
2449 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2450 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2451 before #defining them.
2452 * tests/glr-regression.at
2453 (Incorrectly initialized location for empty right-hand side in GLR):
2454 In yyerror, use the msg arg.
2455 (Corrupted semantic options if user action cuts parse):
2456 (Incorrect lookahead during deterministic GLR):
2457 (Incorrect lookahead during nondeterministic GLR):
2458 Don't name a local var 'index'; it shadows string.h's 'index'.
2459
24602006-01-19 Akim Demaille <akim@epita.fr>
2461
2462 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2463 location, not just parts of it.
2464
24652006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2466
2467 * NEWS: Document the fact that multiple %unions are now allowed.
2468 * doc/bison.texinfo (Union Decl): Likewise.
2469 * TODO: This feature is now implemented, so remove it from
2470 the wishlist.
2471
2472 * Makefile.maint: Merge with coreutils Makefile.maint.
2473 (CVS_LIST): Use build-aux version if available.
2474 (VERSION_REGEXP): New macro.
2475 (syntax-check-rules): Add sc_no_if_have_config_h,
2476 sc_prohibit_assert_without_use, sc_require_config_h,
2477 sc_useless_cpp_parens.
2478 (sc_obsolete_symbols): Check for O_NDELAY.
2479 (sc_dd_max_sym_length): Track coreutils.
2480 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2481 (sc_useless_cpp_parens): New rule.
2482 (news-date-check): Look for version or today's date.
2483 (changelog-check): Don't require version number near head.
2484 (copyright-check): Use current year instead of hardwiring 2005.
2485 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2486 (announcement): Add --gpg-key-ID.
2487
2488 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2489 with "file system".
2490
2491 Avoid undefined behavior that addressed just before the start of an
2492 array. Problem reported by twlevo.
2493 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2494 * src/lalr.c (build_relations): Rely on new sentinel.
2495 * src/gram.c (gram_free): Adjust to new sentinel.
2496
24972006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2498
2499 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2500 yylookaheadNeeds. All uses updated.
2501 (yysplitStack): Rename local yynewLookaheadStatuses to
2502 yynewLookaheadNeeds.
2503 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2504 GLR): In comments, change `lookahead status' to `lookahead need'.
2505
25062006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2507
2508 * data/glr.c (yysplitStack): A little stylistic rewrite.
2509
25102006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2511
2512 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2513
25142006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2515
2516 * doc/bison.texinfo: Fix some typos.
2517 (GLR Semantic Actions): New subsection discussing special
2518 considerations because GLR semantic actions might be deferred.
2519 (Actions): Mention look-ahead usage of yylval.
2520 (Actions and Locations): Mention look-ahead usage of yylloc.
2521 (Special Features for Use in Actions): Add YYEOF entry and mention it
2522 in the yychar entry.
2523 In the yychar entry, remove mention of the local yychar case (pure
2524 parser) since this is irrelevant information when writing semantic
2525 actions and since it's already discussed in `Bison Symbols' where
2526 yychar is otherwise described as an external variable.
2527 In the yychar entry, don't call it the `current' look-ahead since it
2528 isn't when semantic actions are deferred.
2529 In the yychar and yyclearin entries, add note about deferred semantic
2530 actions.
2531 Add yylloc and yylval entries discussing look-ahead usage.
2532 (Look-Ahead Tokens): When discussing yychar, don't call it the
2533 `current' look-ahead, and do mention yylval and yylloc.
2534 (Error Recovery): Cross-reference `Action Features' when mentioning
2535 yyclearin.
2536 (Bison Symbols): In the yychar entry, don't call it the `current'
2537 look-ahead.
2538 In the yylloc and yylval entries, mention look-ahead usage.
2539
25402006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2541
2542 * tests/glr-regression.at: Update copyright year to 2006.
2543
25442006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2545
2546 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2547 use during nondeterministic operation to track which stacks have
2548 actually needed the current lookahead.
2549 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2550 Allocate, deallocate, resize, and otherwise shuffle space for
2551 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2552 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2553 appropriately during nondeterministic operation.
2554 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2555 members to store the current lookahead to be used by the deferred
2556 user action.
2557 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2558 from which the RHS is taken. Set the lookahead members of the new
2559 yySemanticOption according to the lookahead status for stack yyk.
2560 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2561 yyaddDeferredAction.
2562 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2563 members of yySemanticOption before invoking yyuserAction, and then set
2564 them back to their current values afterward.
2565 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2566 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2567 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2568 titles for consistency.
2569 (Leaked merged semantic value if user action cuts parse): In order to
2570 suppress lint warnings, use arguments in merge function, and assign
2571 char value < 128 in main.
2572 (Incorrect lookahead during deterministic GLR): New test case.
2573 (Incorrect lookahead during nondeterministic GLR): New test case.
2574
25752006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2576
2577 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2578 !yyvaluep as signal that no semantic value is available to print.
2579 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2580 to print a semantic value.
2581
25822006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2583
2584 * tests/glr-regression.at: For consistency with my newer test cases,
2585 don't thank myself.
2586
25872006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2588
2589 * data/glr.c (yyresolveValue): When merging semantic options, if at
2590 least one user action succeeds but a later one cuts the parse, then
2591 destroy the semantic value before returning rather than leaking it.
2592 (yyresolveStates): If a user action cuts the parse and thus
2593 yyresolveValue fails, ignore the (unset) semantic value rather than
2594 corrupting the yyGLRState, and empty the semantic options list since
2595 the user actions should have called all necessary destructors.
2596 Simplify code with YYCHK.
2597 * tests/glr-regression.at (Corrupted semantic options if user action
2598 cuts parse): New test case.
2599 (Undesirable destructors if user action cuts parse): New test case.
2600 Before applying any of this patch, this test case never actually failed
2601 for me... but only because the corrupted semantic options usually
2602 masked this bug.
2603 (Leaked merged semantic value if user action cuts parse): New test
2604 case.
2605
26062006-01-05 Akim Demaille <akim@epita.fr>
2607
2608 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2609
26102006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2611
2612 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2613 _MSC_VER. Problem reported by Cenzato Marco.
2614 (b4_c_function_def): Use it.
2615 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2616 b4_c_modern.
2617 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2618 than rolling our own.
2619
26202006-01-04 Akim Demaille <akim@epita.fr>
2621
2622 Also warn about non-used mid-rule values.
2623 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2624 member.
2625 (symbol_list_new): Adjust.
2626 * src/reader.c (symbol_typed_p): New.
2627 (grammar_rule_check): Use it.
2628 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2629 Check its rule.
2630 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2631 Use it.
2632 * tests/actions.at (Exotic Dollars): Adjust.
2633
26342006-01-04 Akim Demaille <akim@epita.fr>
2635
2636 * src/reader.c (grammar_midrule_action): If $$ is set in a
2637 mid-rule, move the `used' bit to its lhs.
2638 * tests/input.at (Unused values): New.
2639 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2640
26412006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2642
2643 * doc/bison.texinfo (Bison Options): Say more accurately what
2644 --yacc does.
2645 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2646 about declarations in the grammar when in Yacc mode, as POSIX does
2647 not require a diagnostic when the grammar uses extensions.
2648
2649 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2650
2651 Warn about dubious constructions like "%token T T".
2652 Reported by twlevo.
2653 * src/symtab.h (struct symbol.declared): New member.
2654 * src/symtab.c (symbol_new): Initialize it to false.
2655 (symbol_class_set): New arg DECLARING, specifying whether
2656 this is a declaration that we want to warn about, if there
2657 is more than one of them. All uses changed.
2658
2659 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2660 Allow multiple %union directives, whose contents concatenate.
2661 * src/parse-gram.y (grammar_declaration): Likewise.
2662 Use muscle_code_grow, so that we don't need stype_line any more.
2663 All uses changed.
2664
2665 * src/muscle_tab.c (muscle_grow): Fix comment.
2666
2667 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2668 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2669 Update copyright year to 2006.
2670
26712006-01-03 Akim Demaille <akim@epita.fr>
2672
2673 Have glr.cc pass (some of) the calc.at tests.
2674 * data/glr.cc (b4_parse_param_orig): New.
2675 (b4_parse_param): Improve its definition, and bound it more
2676 clearly in the skeleton.
2677 (b4_epilogue): Append, instead of prepending, in order to keep
2678 #line consistency.
2679 Simplify the generation of auxiliary functions: locations and
2680 purity are mandated.
2681 (b4_global_tokens_and_yystype): Honor it.
2682 * data/location.cc (c++.m4): Don't include it.
2683 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2684 and AT_SKEL_CC_IF.
2685 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2686 AT_LALR1_CC_IF.
2687 Be sure to initialize the first position's filename.
2688 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2689 mandated anyway.
2690 (AT_CHECK_CALC_GLR_CC): New.
2691 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2692
26932006-01-02 Akim Demaille <akim@epita.fr>
2694
2695 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2696 c.m4.
2697 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2698 * data/glr.cc: Do not include stack.hh.
2699
27002006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 * data/glr.c: Reformat whitespace with tabs.
2703 (b4_lpure_formals): Remove this unused m4 macro.
2704 * tests/cxx-type.at: Reformat whitespace with tabs.
2705 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2706 since it's a member. Rename type to isNterm for clarity.
2707
27082005-12-29 Akim <akim@sulaco.local>
2709
2710 Let glr.cc catch up with symbol_value_print.
2711 * data/glr.cc (b4_yysymprint_generate): Replace by...
2712 (b4_yy_symbol_print_generate): this.
2713 (yy_symbol_print, yy_symbol_value_print): Declare them.
2714
27152005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2716
2717 * src/location.h (boundary): Note that a line or column equal
2718 to INT_MAX indicates an overflow.
2719 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2720 (rule_length_overflow, increment_rule_length, add_column_width):
2721 New functions.
2722 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2723 (<SC_BRACED_CODE>"}"):
2724 Use increment_rule_length rather than incrementing it by hand.
2725 (adjust_location, handle_syncline): Diagnose overflow.
2726 (handle_action_dollar, handle_action_at):
2727 Fix bug with monstrosities like $-2147483648.
2728 Remove now-unnecessary checks.
2729 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2730 (convert_ucn_to_byte): Verify assumptions.
2731 (handle_syncline): New arg LOC. All callers changed.
2732 Don't store through a value derived from char const * pointer.
2733
2734 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2735 GCC warnings.
2736
27372005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2738
2739 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2740 Remove unnecessary forward static decls.
2741
27422005-12-27 Akim Demaille <akim@epita.fr>
2743
2744 * src/reader.c (grammar_current_rule_check): Also check that $$
2745 is used.
2746 Take the rule to check as argument, hence rename as...
2747 (grammar_rule_check): this.
2748 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2749 Rename as...
2750 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2751 (grammar_midrule_action, grammar_symbol_append): Now static.
2752 * tests/torture.at (input): Don't rely on the default action
2753 being always performed.
2754 * tests/calc.at: "Set" $$ even when the action is "cut" with
2755 YYERROR or other.
2756 * tests/actions.at (Exotic Dollars): Instead of using unused
2757 values, check that the warning is issued.
2758
27592005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2760
2761 * NEWS: Improve wording for unused-value warnings.
2762
27632005-12-22 Akim Demaille <akim@epita.fr>
2764
2765 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2766 (b4_yysymprint_generate): Rename as...
2767 (b4_yy_symbol_print_generate): this.
2768 Generate yy_symbol_print instead of yysymprint.
2769 Generate also yy_symbol_value_print, and use it.
2770
27712005-12-22 Akim Demaille <akim@epita.fr>
2772
2773 * NEWS: Warn about unused values.
2774 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2775 a `used' member.
2776 (symbol_list_n_get, symbol_list_n_used_set): New.
2777 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2778 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2779 * src/reader.c (grammar_current_rule_check): Check that values are
2780 used.
2781 * src/symtab.c (symbol_print): Accept 0.
2782 * tests/existing.at: Remove the type information.
2783 Empty the actions.
2784 Remove useless actions (beware of mid-rule actions: perl -000
2785 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2786 * tests/actions.at (Exotic Dollars): Use unused values.
2787 * tests/calc.at: Likewise.
2788 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2789 Likewise.
2790
2791 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2792 rule_useful_p.
2793
27942005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2795
2796 Undo 2005-12-01 tentative license wording change. The wording is
2797 still being reviewed by the lawyers, and we don't want to wait for
2798 them before publishing a test release. For now, revert to the
2799 previous wording.
2800 * NEWS: Undo 2005-12-01 change.
2801 * data/glr.c: Revert to previous license wording.
2802 * data/glr.cc: Likewise.
2803 * data/lalr1.cc: Likewise.
2804 * data/location.cc: Likewise.
2805 * data/yacc.c: Likewise.
2806
2807 * NEWS: Reword %destructor vs YYABORT etc.
2808 * data/glr.c: Use American spacing, for consistency.
2809 * data/glr.cc: Likewise.
2810 * data/lalr1.cc: Likewise.
2811 * data/yacc.c: Likewise.
2812 * data/yacc.c: Reformat comments slightly.
2813 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2814 for consistency. Fix some spelling errors and reword recently-included
2815 text slightly.
2816 * tests/cxx-type.at: Cast results of malloc, for C++.
2817
28182005-12-21 Joel E. Denny <address@hidden>
2819
2820 * tests/cxx-type.at: Construct a tree, count the parents of shared
2821 nodes, and free each node once and only once. Previously, the memory
2822 for semantic values was leaked instead.
2823
28242005-12-21 Joel E. Denny <address@hidden>
2825
2826 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2827 (yylval, yylloc): If pure, #define to yystackp->yyval and
2828 yystackp->yyloc similar to yychar and yynerrs.
2829 (yyparse): If pure, remove local yylval and yylloc. Add local
2830 yystackp to accommodate pure definitions of yylval and yylloc.
2831 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2832 yylvalp and yyllocp to &yylval and &yylloc.
2833 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2834 namespace. Previously, nerrs and char were missing, but lval and lloc
2835 weren't necessary.
2836 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2837 yylvalp and yyllocp parameters since, if pure, these are now always
2838 accessible through yystackp. If not pure, they are still accessible
2839 globally.
2840 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2841 `if (YYID (N))' to pacify lint.
2842
28432005-12-21 Akim Demaille <akim@epita.fr>
2844
2845 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2846 destroy the RHS symbols of a rule.
2847 * data/yacc.c (yylen): Initialize to 0.
2848 Keep its value to the number of items to possibly shift.
2849 In particular, a regular successful parse that ends on YYFINAL by
2850 a (internal) YYACCEPT must not have yylen != 0.
2851 (yyerrorlab, yyreturn): Pop the RHS.
2852 Reorder a bit to emphasize the `shifting' bits of code.
2853 (YYPOPSTACK): Now accept a number of items to pop.
2854 * data/lalr1.cc: Likewise.
2855 * data/glr.c: Formatting changes.
2856 Use goto instead of fall through.
2857 * doc/bison.texinfo (Destructor Decl): Complete.
2858
28592005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2860
2861 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2862 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2863 * djgpp/config.bat: Replace every occurence of the file name
2864 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2865 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2866 * djgpp/config.sed: Replace every occurence of the file name
2867 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2868 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2869 * djgpp/djunpack.bat: DJGPP specific file.
2870 * djgpp/fnchange.lst: DJGPP specific file.
2871 * djgpp/README.in: Add new information about how to unpack the bison
2872 source on MSDOS and other systems which have 8.3 file name restrictions
2873 using djunpack.bat and fnchange.lst.
2874
28752005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2876
2877 * bootstrap (build_cvs_prefix): Remove; unused.
2878 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2879 when getting gnulib.
2880
28812005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2882
2883 * data/glr.c: Reorder typedef declarations for structs to match order
2884 of struct declarations.
2885 Rename yystack everywhere to yystackp except in yyparse where it's not
2886 a pointer.
2887 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2888 consistency.
2889 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2890 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2891 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2892 lint.
2893
28942005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2895
2896 * tests/sets.at (Accept): Fix typos in regular expression used to
2897 sed out the final state number.
2898
2899 Work around portability problem on Solaris 10: flex-generated
2900 files include <stdio.h> before <config.h>, which messes up
2901 because the latter defines __EXTENSIONS__. Address the problem
2902 by creating two new little files that include <config.h> first,
2903 then include the flex-generated files. Rewrite everyone else
2904 to include <config.h> first, as well.
2905 * lib/timevar.c: Always include "config.h".
2906 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2907 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2908 (EXTRA_bison_SOURCES): New macro.
2909 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2910 * src/system.h: Don't include config.h.
2911 * src/LR0.c: Include <config.h> first.
2912 * src/assoc.c: Likewise.
2913 * src/closure.c: Likewise.
2914 * src/complain.c: Likewise.
2915 * src/conflicts.c: Likewise.
2916 * src/derives.c: Likewise.
2917 * src/files.c: Likewise.
2918 * src/getargs.c: Likewise.
2919 * src/gram.c: Likewise.
2920 * src/lalr.c: Likewise.
2921 * src/location.c: Likewise.
2922 * src/main.c: Likewise.
2923 * src/muscle_tab.c: Likewise.
2924 * src/nullable.c: Likewise.
2925 * src/output.c: Likewise.
2926 * src/parse-gram.y: Likewise.
2927 * src/print.c: Likewise.
2928 * src/print_graph.c: Likewise.
2929 * src/reader.c: Likewise.
2930 * src/reduce.c: Likewise.
2931 * src/relation.c: Likewise.
2932 * src/state.c: Likewise.
2933 * src/symlist.c: Likewise.
2934 * src/symtab.c: Likewise.
2935 * src/tables.c: Likewise.
2936 * src/uniqstr.c: Likewise.
2937 * src/vcg.c: Likewise.
2938
2939 * src/parse-gram.y: Fix minor problems uncovered by lint.
2940 (current_lhs, current_lhs_location): Now static.
2941 (current_assoc): Remove unused variable.
2942
2943 Cleanups so that Bison-generated parsers have less lint.
2944 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2945 Prepend /*ARGSUSED*/, for lint's sake.
2946 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2947 definition if 'lint' is defined.
2948 (YYID): New macro (or function, if lint).
2949 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2950 * data/yacc.c: Likewise.
2951 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2952 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2953 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2954 is C++ only.
2955 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2956 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2957 Use YYID(0) rather than 0, for lint.
2958 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2959 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2960
29612005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2962
2963 * tests/glr-regression.at
2964 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2965 Close memory leak reported by twlevo.
2966
29672005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2968
2969 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2970 all stacks.
2971 (yyparse): Iterate another stack in order to call user destructors.
2972 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2973 New test case.
2974 (Duplicated user destructor for lookahead): This test now is expected
2975 to succeed.
2976
29772005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2978
2979 * NEWS: Document the following change.
2980 * data/yacc.c: Say "parser skeleton" rather than "file", since
2981 it's no longer just a file.
2982 * data/glr.c: Grant a special exception for C GLR parsers, that
2983 reads like the already-existing exception for C LALR(1) parsers.
2984 * data/glr.cc: Likewise.
2985 * data/lalr1.cc: Likewise.
2986 * data/location.cc: Likewise.
2987 * data/yacc.c: Reword the "written by" statement to clarify that
2988 it was the parser skeleton, not the entire output file.
2989 * data/glr.c: Written by Paul Hilfinger.
2990 * data/glr.cc: Written by Akim Demaille.
2991 * data/lalr1.cc: Likewise.
2992
29932005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2994
2995 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2996 Fix typos in previous change that broke 'make check'.
2997 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2998 supported in C.
2999 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3000 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3001 We can revert this once things settle down.
3002
3003 * src/conflicts.c (conflicts_print): Don't print file name twice
3004 when %expect fails because there were no conflicts.
3005 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3006 change.
3007 * tests/conflicts.at (%expect not enough, %expect too much):
3008 (%expect with reduce conflicts): Adjust to new behavior.
3009
30102005-11-18 Akim Demaille <akim@epita.fr>
3011
3012 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3013 errors.
3014 * NEWS: Document this.
3015 * doc/bison.texinfo (Expect Decl): Likewise.
3016
30172005-11-16 Akim Demaille <akim@epita.fr>
3018
3019 Generalize the display of semantic values and locations in traces.
3020 * data/glr.c (yy_reduce_print): Fix indices (again).
3021 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3022 literal integers.
3023 * data/lalr1.cc (yyreduce_print): Rename as...
3024 (yy_reduce_print): this.
3025 Display values and locations.
3026 * data/yacc.c (yy_reduce_print): Likewise.
3027 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3028 (yysymprint): Move higher to be visible from yy_reduce_print).
3029 (yyparse): Adjust.
3030 * tests/calc.at: Adjust the expected length of the traces.
3031
30322005-11-14 Akim Demaille <akim@epita.fr>
3033
3034 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3035 from 1 to N, while values and location start at 0.
3036 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3037
30382005-11-14 Akim Demaille <akim@epita.fr>
3039
3040 * data/glr.c (yy_reduce_print): Fix the $ number.
3041
30422005-11-14 Akim Demaille <akim@epita.fr>
3043
3044 "Use" parse parameters.
3045 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3046 * data/glr.c, data/glr.cc: Use them.
3047 * data/glr.c (YYUSE): Have a C++ definition that supports
3048 non-pointer types.
3049
30502005-11-14 Akim Demaille <akim@epita.fr>
3051
3052 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3053
30542005-11-14 Akim Demaille <akim@epita.fr>
3055
3056 * data/glr.cc: New.
3057 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3058
30592005-11-12 Akim Demaille <akim@epita.fr>
3060
3061 Let position and location be PODs.
3062 * data/location.cc (position::initialize, location::initialize): New.
3063 (position::position, location::location): Define only if
3064 b4_location_constructors is defined.
3065 * data/lalr1.cc (b4_location_constructors): Define it for backward
3066 compatibility.
3067 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3068
30692005-11-12 Akim Demaille <akim@epita.fr>
3070
3071 * data/lalr1.cc: Move the body of the ctor and dtor into the
3072 parser file (instead of the header).
3073 Wrap the implementations in a "namespace yy".
3074
30752005-11-12 Akim Demaille <akim@epita.fr>
3076
3077 Have glr.c include its header file when created.
3078 * data/glr.c (b4_shared_declarations): New.
3079 Output them verbatim in the parser if !%defines, otherwise
3080 output then in the header file, and include it instead.
3081
30822005-11-11 Akim Demaille <akim@epita.fr>
3083
3084 * data/glr.c: Comment changes.
3085
30862005-11-11 Akim Demaille <akim@epita.fr>
3087
3088 When yydebug, report semantic and location values for reductions.
3089 * data/glr.c (yy_reduce_print): Report the semantic values and the
3090 locations.
3091 (YY_REDUCE_PRINT): Adjust.
3092 (yyglrReduce): Use them.
3093 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3094 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3095 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3096 traces.
3097
30982005-11-10 Akim Demaille <akim@epita.fr>
3099
3100 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3101 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3102 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3103
31042005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3105
3106 * m4/cxx.m4, examples/Makefile.am: Don't build
3107 examples/calc++ if no C++ compiler is available. (trivial change)
3108
31092005-11-09 Akim Demaille <akim@epita.fr>
3110
3111 * src/scan-skel.l: Use a couple of asserts.
3112
31132005-11-03 Akim Demaille <akim@epita.fr>
3114
3115 In some (weird) cases, the final state number is incorrect.
3116 Reported by Alexandre Duret-Lutz.
3117 * src/LR0.c (state_list_append): Remove the computation of
3118 final_state.
3119 (save_reductions): Do it here.
3120 (get_state): Alpha conversion.
3121 (generate_states): Use a for loop.
3122 * src/gram.h (item_number_is_rule_number)
3123 (item_number_is_symbol_number): New.
3124 * src/state.c: Use assert.
3125 * src/system.h: Include assert.h.
3126 * tests/sets.at (Accept): New.
3127
31282005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3129
3130 * data/glr.c (yyfill): Adjust comment.
3131 (yyresolveAction): Initialize default location properly
3132 for empty right-hand sides.
3133 (yydoAction): Ditto.
3134 Add comment explaining apparently dead code.
3135 * tests/glr-regression.at
3136 (Incorrectly initialized location for empty right-hand side in GLR):
3137 New test.
3138
31392005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3140
3141 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3142 gnulib when interrupted. This fixes some race conditions and
3143 works around some portability problems (one noted by Paul
3144 Hilfinger).
3145
31462005-10-22 Akim <akim@epita.fr>
3147
3148 * Makefile.cfg: Adjust to config -> build-aux.
3149 Reported by twledo.
3150
31512005-10-21 Akim Demaille <akim@epita.fr>
3152
3153 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3154 the %parse-params.
3155 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3156 * data/yacc.c (b4_Pure_if): Rename as...
3157 (b4_yacc_pure_if): this.
3158 (YY_SYMBOL_PRINT, yyparse): Adjust.
3159 * doc/bison.texinfo: Formatting changes.
3160
31612005-10-21 Akim Demaille <akim@epita.fr>
3162
3163 Finish the transition config -> build-aux.
3164 * configure.ac, Makefile.am: Use build-aux.
3165 * config/prev-version, config/announce-gen, config/Makefile.am:
3166 Move to...
3167 * build-aux/prev-version, build-aux/announce-gen,
3168 * build-aux/Makefile.am: here.
3169
31702005-10-14 Akim Demaille <akim@epita.fr>
3171
3172 * examples/calc++/test: Use set -x only when VERBOSE.
3173
31742005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3175
3176 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3177 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3178
31792005-10-13 Akim Demaille <akim@epita.fr>
3180
3181 * src/scan-skel.l: Output the base name parts of the parser and
3182 header file names.
3183 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3184 additional checks.
3185 Use this to exercise C++ outputs in subdirs.
3186 Reported by Oleg Smolsky.
3187
31882005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3189
3190 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3191 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3192 Problem reported by John P. Hartmann.
3193 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3194 already defined it.
3195
31962005-10-12 Akim Demaille <akim@epita.fr>
3197
3198 * src/parse-gram.y (version_check): Exit 63 to please missing
3199 (stands for "version mismatch).
3200 * tests/input.at, doc/bison.texinfo: Adjust.
3201
32022005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3203
3204 Work around portability problems with Visual Age C compiler
3205 (xlc and xlC_r) reported by John P. Hartmann.
3206 * data/location.cc (initial_column, initial_line): Remove.
3207 All uses replaced by 0 and 1.
3208 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3209 that xlc complains about.
3210 * src/scan-skel.l (skel_wrap): Likewise.
3211 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3212 as __STDC__.
3213 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3214 __STDC_VERSION__. Use it everywhere instead of looking at
3215 __STDC__ and __cplusplus.
3216
32172005-10-10 Akim Demaille <akim@epita.fr>
3218
3219 * examples/calc++/test: Be quiet unless VERBOSE.
3220
32212005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3222
3223 * data/c.m4 (yydestruct, yysymprint):
3224 Use YYUSE instead of casting to void.
3225 * data/glr.c (YYUSE): New macro.
3226 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3227 Use it instead of rolling our own.
3228 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3229 (YYCHK1):
3230 Use /*CONSTCOND*/ to suppress lint warnings.
3231 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3232 (YY_STACK_PRINT): Use 'false' not '0'.
3233 (YYUSE): New macro.
3234 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3235 * data/yacc.c (YYUSE): New macro.
3236 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3237 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3238 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3239
3240
3241 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3242 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3243
32442005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3245
3246 Undo the parts of the unlocked-I/O change that substituted
3247 putc or puts for printf. This might hurt performance a bit,
3248 but some people prefer the printf style.
3249 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3250 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3251 All uses replaced by YYFPRINTF and YYDPRINTF.
3252 * data/yacc.c: Likewise.
3253 * lib/bitset.c (bitset_print): Likewise.
3254 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3255 putc and puts.
3256 * lib/lbitset.c (debug_lbitset): Likewise.
3257 * src/closure.c (print_firsts, print_fderives): Likewise.
3258 * src/gram.c (grammar_dump): Likewise.
3259 * src/lalr.c (look_ahead_tokens_print): Likewise.
3260 * src/output.c (escaped_output): Likewise.
3261 (user_actions_output): Break apart two printfs.
3262 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3263 * src/reduce.c (reduce_print): Likewise.
3264 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3265 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3266
3267 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3268 Use assignments rather than casts-to-void to suppress
3269 unused-variable warnings. This pacifies 'lint'.
3270 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3271 unused-variable warnings.
3272
32732005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3274
3275 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3276
32772005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3278
3279 Use unlocked I/O for a minor performance improvement on hosts like
3280 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3281 is to use the gnlib unlocked-io module, and to prefer putc and
3282 puts to printf when either will work (since the latter doesn't
3283 come in an unlocked flavor).
3284 * bootstrap (gnulib_modules): Add unlocked-io.
3285 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3286 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3287 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3288 and similarly for puts and putc and printf.
3289 * data/yacc.c: Likewise.
3290 * lib/bitset.c (bitset_print): Likewise.
3291 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3292 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3293 to printf.
3294 * lib/lbitset.c (debug_lbitset): Likewise.
3295 * src/closure.c (print_firsts, print_fderives): Likewise.
3296 * src/gram.c (grammar_dump): Likewise.
3297 * src/lalr.c (look_ahead_tokens_print): Likewise.
3298 * src/output.c (escaped_output): Likewise.
3299 (user_actions_output): Coalesce two printfs.
3300 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3301 * src/reduce.c (reduce_print): Likewise.
3302 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3303 * src/system.h: Include unlocked-io.h rather than stdio.h.
3304
3305 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3306 this confuses xgettext.
3307
33082005-10-02 Akim Demaille <akim@epita.fr>
3309
3310 * bootstrap (gnulib_modules): Add strverscmp.
3311 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3312 * m4/.cvsignore: Add strverscmp.m4.
3313 * src/parse-gram.y (%require): New token, new rule.
3314 (version_check): New.
3315 * src/scan-gram.l (%require): Adjust.
3316 * tests/input.at (AT_REQUIRE): New.
3317 Use it.
3318 * doc/bison.texinfo (Require Decl): New.
3319 (Calc++ Parser): Use %require.
3320
33212005-10-02 Akim Demaille <akim@epita.fr>
3322
3323 * data/location.cc: New.
3324
33252005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3326 Akim Demaille <akim@epita.fr>
3327
3328 Make sure -odir/foo.cc creates dir/location.hh etc.
3329 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3330 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3331 (spec_defines_file): Now const.
3332 (dir_prefix): New.
3333 (short_base_name): Remove.
3334 * src/files.c: Adjust.
3335 (dirname.h): Include.
3336 (base_name): Don't prototype it.
3337 (finput): Remove, duplicates gram_in.
3338 (full_base_name, short_base_name): Replace by...
3339 (all_but_ext, all_but_tab_ext): these.
3340 (compute_base_names): Rename as...
3341 (compute_file_name_parts): this.
3342 Update to compute the new variables, including dir_prefix.
3343 Adjust dependencies.
3344 * src/output.c (prepare): Output them.
3345 * src/reader.c: Adjust to use gram_in, not finput.
3346 * src/scan-skel.l (@dir_prefix@): New.
3347
33482005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3349
3350 * lib/subpipe.c: New function end_of_output_subpipe() added
3351 to allow support for non-posix systems. This is a no-op function
3352 for posix systems.
3353
3354 * lib/subpipe.h: New function end_of_output_subpipe() added
3355 to allow support for non-posix systems. This is a no-op function
3356 for posix systems.
3357
3358 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3359 handle the lack of pipe/fork functionality on non-posix systems.
3360
3361 * djgpp/Makefile.maint: DJGPP specific file.
3362
3363 * djgpp/README.in: DJGPP specific file.
3364
3365 * djgpp/config.bat: DJGPP specific configuration file.
3366
3367 * djgpp/config.sed: DJGPP specific configuration file.
3368
3369 * djgpp/config.site: DJGPP specific configuration file.
3370
3371 * djgpp/config_h.sed: DJGPP specific configuration file.
3372
3373 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3374
3375 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3376
33772005-10-02 Akim Demaille <akim@epita.fr>
3378
3379 * data/location.cc: New, extract from...
3380 * data/lalr1.cc: here.
3381 (location.hh): Include it after the user prologue, in case the
3382 filename type is defined by the user.
3383 Forward declation location and position before the pre-prologue.
3384 (yyresult_): Rename as...
3385 (yyresult): this, it's a local variable, not an attribute.
3386 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3387
33882005-10-01 Akim Demaille <akim@epita.fr>
3389
3390 * examples/extexi: Restore the #line generation.
3391
33922005-09-30 Akim Demaille <akim@epita.fr>,
3393 Alexandre Duret-Lutz <adl@gnu.org>
3394
3395 Move the token type and YYSTYPE in the parser class.
3396 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3397 (parser::token): New, from the moved free definition of tokens.
3398 (parser::semantic_value): Now a full definition instead of an
3399 indirection to YYSTYPE.
3400 (b4_post_prologue): No longer included in the header file, but
3401 in the implementation file.
3402 * doc/bison.texi (C+ Language Interface): Update.
3403 * src/parse-gram.y: Support unary %define.
3404 * tests/actions.at: Define global_tokens_and_yystype for backward
3405 compatibility until we update the tests.
3406 * tests/calc.at: Idem.
3407 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3408 to simplify the code.
3409
34102005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3411
3412 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3413 Ah, the good old days! Problem reported by Peter Klein.
3414 * bootstrap (gnulib_modules): Add strerror, strtoul.
3415 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3416 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3417
34182005-09-29 Akim Demaille <akim@epita.fr>
3419
3420 * data/c.m4 (b4_error_verbose_if): New.
3421 * data/lalr1.cc: Use it.
3422 (YYERROR_VERBOSE_IF): Remove.
3423 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3424 parser members, replaced by...
3425 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3426 local variables.
3427 (yysyntax_error_): Takes the state number as argument.
3428 (yyreduce_print_): Use the argument yyrule, not the former
3429 attribute yyn_.
3430
34312005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 * bootstrap (gnulib_modules): Add verify.
3434 * lib/.cvsignore: Add verify.h.
3435 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3436 * src/system.h (verify): Remove.
3437 Include verify.h instead.
3438 * src/tables.c (tables_generate): Use new API for 'verify'.
3439
34402005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3441
3442 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3443 local variables whose names begin with 'yy'.
3444 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3445 Trivial changes from Joel E. Denny.
3446
3447 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3448 it itself.
3449 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3450 don't use alloca any more.
3451
3452 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3453 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3454 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3455 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3456 to match yacc.c, to test more hosts.
3457
34582005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3459
3460 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3461 doesn't affect behavior.
3462 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3463 Solaris, AIX, MSC.
3464 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3465 This works a bit better with glibc, if user code has already included
3466 stdlib.h.
3467 * doc/bison.texinfo (Bison Parser): Document that users can't
3468 arbitrarily use malloc and free for other purposes. Document
3469 that <alloca.h> and <malloc.h> might be included.
3470 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3471 user must declare alloca.
3472
3473 * HACKING (release): Forwarn the Translation Project about
3474 stable releses.
3475
34762005-09-20 Akim Demaille <akim@epita.fr>
3477
3478 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3479
34802005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3481
3482 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3483 (YYSTACK_ALLOC_MAXIMUM): Use it.
3484 (yysyntax_error): New function.
3485 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3486 multiple syntax errors are reported, and alloca is being used.
3487 Instead, reallocate buffers twice as big each time, so that
3488 we waste at most half the allocated memory. Start with a small
3489 (128-byte) buffer that will suffice in most cases anyway.
3490 Use yysyntax_error to do most of the work.
3491
3492 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3493 yynerrs is the number of errors reported, not the number of
3494 errors encountered.
3495
3496 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3497 Mark it as expected to fail.
3498 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3499 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3500 Don't start user-code symbols with "yy", to avoid name space problems.
3501
35022005-09-19 Akim Demaille <akim@epita.fr>
3503
3504 Remove the traits, failed experiment.
3505 It never proved useful, and anyway because of the current
3506 definition, it was not possible to have several specialization of
3507 this traits, making it useless.
3508 * data/lalr1.cc (yy:traits): Remove.
3509 Inline its definitions in the parser class.
3510
35112005-09-19 Akim Demaille <akim@epita.fr>
3512
3513 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3514 least Mac OSX with a /usr/local install of gettext.
3515
35162005-09-19 Akim Demaille <akim@epita.fr>
3517
3518 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3519 and yytoken for similarity with the other skeletons.
3520
35212005-09-19 Akim Demaille <akim@epita.fr>
3522
3523 * NEWS, configure.ac: update version number to 2.1a.
3524
35252005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3526
3527 * NEWS: Version 2.1.
3528
3529 * NEWS: Remove notice of yytname change, since it was never in an
3530 official release.
3531 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3532 diagnostic.
3533 * src/output.c (prepare): Likewise.
3534 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3535 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3536 is not defined. This is an awful hack, but it's enough for now.
3537 All callers changed.
3538 * tests/glr-regression-at (make_value): Args are const pointers now,
3539 to avoid GCC warning.
3540 (Duplicated user destructor for lookahead): New test. Currently
3541 skipped. It fails on my host but I'm not sure it'll always fail.
3542
35432005-09-16 Akim Demaille <akim@epita.fr>
3544
3545 * src/symtab.h (struct symbol): Declare the printer and destructor
3546 as const, to avoid accidental calls to free.
3547 (symbol_destructor_set, symbol_printer_set): Adjust.
3548 * src/symtab.c: Adjust.
3549
35502005-09-16 Akim Demaille <akim@epita.fr>
3551
3552 * data/c.m4 (b4_token_enums): New.
3553 (b4_token_defines): Rename as...
3554 (b4_token_enums_defines): this.
3555 (b4_token_defines): New, output only the #defines.
3556 * data/yacc.c, data/glr.c: Adjust.
3557 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3558 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3559 as default values.
3560
35612005-09-16 Akim Demaille <akim@epita.fr>
3562
3563 * data/lalr1.cc (yylex_): Remove, inline its code.
3564 (yyreport_syntax_error_): Remove, replaced by...
3565 (yysyntax_error_): this which returns a string and leaves to the
3566 caller the call to the users' error function.
3567 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3568 Move from members of the parser object...
3569 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3570 to local variables of the parse function.
3571
35722005-09-16 Akim Demaille <akim@epita.fr>
3573
3574 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3575 since it's in Bison's name space.
3576
35772005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3578
3579 * data/glr.c (yyresolveValue): Add default case to pacify
3580 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3581
3582 * NEWS: Document when yyparse started to return 2.
3583 * doc/bison.texinfo (Parser Function): Document when yyparse
3584 returns 2.
3585
3586 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3587 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3588 changed.
3589 (class position): file_name -> filename (reverting). All uses changed.
3590
35912005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3592
3593 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3594 do anything if $@ exists. This reverts part of the 2005-07-07
3595 patch.
3596
35972005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3598
3599 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3600 contains obsolete information and isn't worth distributing as a
3601 separate file anyway.
3602 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3603 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3604 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3605 (yyparse): Abort if user code uses longjmp to throw an unexpected
3606 value.
3607
36082005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3609
3610 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3611 Suggested by twlevo@xs4all.nl.
3612
3613 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3614 This avoids a diagnostic from gcc -Wswitch-enum.
3615 Problem reported by twlevo@xs4all.nl.
3616
3617 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3618 standards. Use "file name" or "file" or "name", depending on
3619 the context.
3620 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3621 not to hack/foo.tab.c.
3622 (Calc++ Top Level): 2nd arg of main is not const.
3623 * data/glr.c: b4_filename -> b4_file_name.
3624 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3625 All uses changed.
3626 (class position): filename -> file_name. All uses changed.
3627 * data/yacc.c: b4_filename -> b4_file_name.
3628 * lib/bitset.h: filename -> file_name in local vars.
3629 * lib/bitset_stats.c: Likewise.
3630 * src/files.c: Likewise.
3631 * src/scan-skel.l ("@output ".*\n): Likewise.
3632 * src/files.c (file_name_split): Renamed from filename_split.
3633 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3634
36352005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3636
3637 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3638 to accommodate latest gnulib.
3639
3640 * tests/glr-regression.at (Duplicate representation of merged trees):
3641 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3642
3643 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3644 needed.
3645
36462005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3647
3648 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3649 All uses changed. Invoke user destructor after an error during a
3650 split parse (trivial change from Joel E. Denny).
3651
3652 * tests/glr-regression.at
3653 (User destructor after an error during a split parse): New test case.
3654 Problem reported by Joel E. Denny in:
3655 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3656
36572005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3658
3659 * README-cvs: Give URLs for recommended tools.
3660 Mention Gzip version problem, and bootstrapping issues.
3661 Remove troubleshooting section, as it's somewhat obsolete.
3662
3663 * bootstrap (no_cache): New var, to accommodate different wget
3664 variants. Use it instead of '-C off'. Problem reported by
3665 twlevo@xs4all.nl.
3666
3667 * data/glr.c (yydestroyStackItem): New function.
3668 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3669 debugging information. Problem reported by Joel E. Denny.
3670
36712005-08-25 Akim Demaille <akim@epita.fr>
3672
3673 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3674
36752005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3676
3677 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3678 Don't invoke destructor on unresolved entries.
3679 * tests/glr-regression.at
3680 (User destructor for unresolved GLR semantic value): New test case.
3681 Problem reported by Joel E. Denny in:
3682 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3683
36842005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3685
3686 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3687 Add strnlen.c.
3688 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3689 lib-prefix.m4, po.m4.
3690
3691 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3692 in yydestruct diagnostic, since it might not be an error.
3693 Problem reported by Joel Denny near end of
3694 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3695 * data/lalr1.cc (yyerturn): Likewise.
3696 * data/yacc.c (yyreturn): Likewise.
3697 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3698
3699 * src/files.c: Remove obsolete FIXME comment.
3700
3701 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3702 with the other templates, and to fix bogus run-on messages such
3703 as the one reported at the end of
3704 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3705 All callers changed to avoid the newline.
3706 (yyprocessOneStack): Output two lines rather than one, to accommodate
3707 the above change. This changes the debug output format slightly.
3708
3709 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3710 reported by Joel E. Denny in
3711 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3712 (trivial change).
3713 * tests/glr-regression.at (Duplicate representation of merged trees):
3714 New test, from Joel E. Denny in:
3715 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3716 * THANKS: Add Joel E. Denny.
3717
3718 * configure.ac (AC_INIT): Bump to 2.0c.
3719
37202005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3721
3722 * NEWS: Version 2.0b.
3723
3724 * Makefile.am (SUBDIRS): Put examples before tests, so that
3725 "make check" doesn't finish with "All 1 tests passed".
3726
3727 * tests/regression.at (Token definitions): Don't rely on
3728 AT_PARSER_CHECK for data that contains backslashes. It currently
3729 uses 'echo', and 'echo' isn't portable if its argument contains
3730 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3731 that the byte '\0xff' is not printable in the C locale; it is,
3732 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3733 not printable, so use '\0x81' to test.
3734
3735 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3736 version of GCC, since the macro is used with non-GCC compilers.
3737
3738 Fix core dump reported by Pablo De Napoli in
3739 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3740 * tests/regression.at (Invalid inputs with {}): New test.
3741 * src/parse-gram.y (token_name): Translate type before using
3742 it as an index.
3743
3744 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3745 the user's name space. All uses changed to __attribute__
3746 ((__unused__)).
3747 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3748 Add __attribute__ ((__noreturn__)).
3749
3750 * etc/clcommit: Remove. We weren't using it, and it failed
3751 "make maintainer-distcheck".
3752 * Makefile.maint: Merge from coreutils.
3753 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3754 (syntax-check-rules): Change list of rules as described below.
3755 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3756 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3757 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3758 (sc_trailing_space): New rules.
3759 (sc_xalloc_h_in_src): Remove.
3760 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3761 (sc_space_tab, sc_error_exit_success, sc_changelog):
3762 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3763 (makefile-check, po-check, author_mark_check):
3764 (makefile_path_separator_check, copyright-check):
3765 Use grep -n, to make it easier to find violations.
3766 Use CVS_LIST and CVS_LIST_EXCEPT.
3767 (header_regexp, h_re): Remove.
3768 (dd_c): New macro.
3769 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3770 (my-distcheck): Use more-modern GCC flags.
3771 (signatures, %.asc): Remove.
3772 (rel-files, announcement): Remove signatures.
3773 Restore old updating code, even though we don't use it, so
3774 that we're the same as coreutils.
3775 (alpha, beta, major): Depend on news-date-check.
3776 Make the upload commands.
3777
3778 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3779 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3780 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3781 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3782 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3783 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3784 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3785 * tests/sets.at: Likewise.
3786
3787 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3788 we comment out the Autoconf version number.
3789 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3790 it's error-prone and "make maintainer-distcheck" rejects it.
3791
3792 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3793 Indent calls to "error" to pacify "make maintainer-distcheck",
3794 when the calls are not intended to be translated.
3795 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3796
3797 * src/Makefile.am (DEFS): Use +=, to pacify
3798 "make maintainer-distcheck".
3799 (bison_SOURCES): Add scan-skel.h.
3800 (sc_tight_scope): New rule, from coreutils.
3801
3802 * src/files.c (src_extension, header_extension):
3803 Now static, not extern.
3804 * src/getargs.c (short_options): Likewise.
3805 * src/muscle_tab.c (muscle_table): Likewise.
3806 * src/parse-gram.y (current_class, current_type, current_prec):
3807 Likewise.
3808 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3809 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3810 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3811 void, to avoid warning when NLS is disabled.
3812 * src/output.c: Include scan-skel.h.
3813 (scan_skel): Remove decl, since scan-skel.h does this.
3814 (output_skeleton):
3815 Indent calls to "error" to pacify "make maintainer-distcheck".
3816 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3817 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3818 "make maintainer-distcheck".
3819 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3820 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3821 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3822 (skel_lex_destroy, scan_skel): Move these decls to...
3823 * src/scan-skel.h: New file.
3824 * src/uniqstr.c (uniqstr_assert):
3825 Indent calls to "error" to pacify "make maintainer-distcheck".
3826
3827 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3828 not @VAR@.
3829
3830 * tests/torture.at: Revamp to avoid misuse of atoi that
3831 "make maintainer-distcheck" complained about.
3832
3833 * examples/extexi (message): Don't print a message more than once,
3834 and omit line-number decoration that makes Emacs compile think
3835 that informative messages are worth worrying about.
3836
38372005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3838
3839 * configure.ac: Update version number.
3840
3841 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3842 accidentally.
3843 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3844 autogenerated by the maintainer.
3845 * examples/calc++/.cvsignore: Add *.yy.
3846
3847 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3848 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3849 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3850
3851 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3852
3853 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3854 from maintainer-distcheck about casting the argument of 'free'.
3855
3856 * NEWS: Mention recent yytname changes.
3857 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3858
3859 * bootstrap: For translations that have not yet been upgraded to
3860 the new runtime-po domain, prime the pump by extracting the
3861 relevant strings from the obsolete translations. This code can be
3862 removed once the bison-runtime domain has been translated by each
3863 team.
3864
3865 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3866 now that token names are already quoted.
3867
3868 Fix problem reported by Anthony Heading.
3869 * data/glr.c (YYTOKEN_TABLE): New macro.
3870 (yytname): Define if YYTOKEN_TABLE.
3871 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3872 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3873 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3874 * src/output.c (prepare_symbols): Output token_table_flag.
3875
38762005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3877
3878 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3879 again if the first call fails.
3880
3881 * data/glr.c (yytnamerr): New function.
3882 (yyreportSyntaxError): Use it to dequote most string literals.
3883 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3884 with other skeletons. All uses changed.
3885 (yytnameerr_): New function.
3886 (yyreport_syntax_error): Use it to dequote most string literals.
3887 * data/yacc.c (yytnamerr): New function.
3888 (yyerrlab): Use it to decode most string literals.
3889 * doc/bison.texinfo (Decl Summary, Calling Convention):
3890 Clarify quoting convention of yytname.
3891 * src/output.c (prepare_symbols): Quote all names. This undoes
3892 the 2005-04-17 change, which is now accomplished (mostly) via
3893 changes in the parsers as described above.
3894 * tests/regression.at (Token definitions, Web2c Actions):
3895 Undo most 2005-04-17 change here, too.
3896
38972005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3898
3899 Fix more problems reported by twlevo@xs4all.nl.
3900 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3901 remove trailing spaces. This loses the exit status of ./types,
3902 and isn't needed since ./types shouldn't be emitting trailing
3903 spaces.
3904 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3905 as the stack isn't valid in that case.
3906
3907 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3908 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3909 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3910 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3911 is used.
3912 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3913 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3914 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3915 Likewise.
3916
3917 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3918 overly-picky compilers that reject 'char *foo = "bar";'.
3919
3920 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3921 to FILE * parameter, not to stderr. This fixes a typo introduced
3922 in the 2005-07-12 change.
3923
3924 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3925 warnings from GCC 4.
3926
3927 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3928 (yyglrShiftDefer, yysplitStack):
3929 Remove unused parameters b4_pure_formals. All uses changed.
3930 (yyglrShift): Remove unused parameters b4_user_formals.
3931 All uses changed.
3932 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3933
39342005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3935
3936 Destructor cleanups and regularization among the three skeletons.
3937 * NEWS: Document the behavior changes.
3938 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3939 stack before failing, as the cleanup code will do it for us now.
3940 * data/lalr1.cc (yyerrlab): Likewise.
3941 * data/glr.c (yyparse): Pop everything off the stack before
3942 freeing it, so that destructors get called properly.
3943 * data/lalr1.cc (yyreturn): Likewise.
3944 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3945 This is more consistent.
3946 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3947 why destructors might be called. 1.875 -> 2.1.
3948 (Destructor Decl, Decl Summary, Table of Symbols):
3949 Some English-language cleanups for %destructor.
3950 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3951 Add output line for destructor of start symbol.
3952 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3953 because of that same extra output line.
3954
3955 * NEWS: Document minor wording changes in diagnostics of
3956 Bison-generated parsers.
3957 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3958 Remove unused formals. All uses changed.
3959 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3960 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3961 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3962 Rename yyoverflowab to yyexhaustedlab.
3963 When memory exhaustion occurs during syntax-error reporting,
3964 report it separately rather than in a single diagnostic; this
3965 eases translation.
3966 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3967 (Memory Exhausted): Renamed from Parser Stack Overflow.
3968 Revamp wording slightly to prefer "memory exhaustion".
3969 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3970
3971 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3972
3973 Add i18n support to the GLR skeleton. Partially fix the C++
3974 skeleton; a C++ expert needs to finish this. Remove debugging
3975 msgids; there's little point to having them translated, since they
3976 can be understood only by someone who can read the
3977 (English-language) source code.
3978
3979 Generate runtime-po/bison-runtime.pot automatically, so that we
3980 don't have to worry about garbage getting in that file. We'll
3981 make sure after the next official release that old msgids don't
3982 get lost. See
3983 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3984
3985 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3986 Now auto-generated.
3987 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3988 Fix typos in explanations of the runtime file.
3989 * bootstrap: Change gettext keyword from YYI18N to YY_.
3990 Use standard Makefile.in.in in runtime-po, since we'll arrange
3991 for backward-compatible bison-runtime.po files in a different way.
3992 * data/glr.c (YY_): New macro, from yacc.c.
3993 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3994 Translate messages intended for users.
3995 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3996 the wording in the other skeletons. We don't know that the memory
3997 is virtual.
3998 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3999 Use same method that yacc.c uses.
4000 Don't translate debugging messages.
4001 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4002 it doesn't work (yet), and requires C++ expertise to fix.
4003 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4004 Move defn to a more logical place, to be consistent with other
4005 skeletons.
4006 Don't translate debugging messages.
4007 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4008 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4009 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4010 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4011
4012 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4013 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4014 void, not int.
4015 * tests/glr-regression.at (Badly Collapsed GLR States):
4016 Likewise.
4017 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4018 yylex should return 0 at EOF rather than aborting.
4019
4020 Improve tests for stack overflow in GLR parser.
4021 Problem reported by twlevo@xs4all.nl.
4022 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4023 All uses removed.
4024 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4025 can handle the problem.
4026 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4027 (yyparse): New local variable yyresult to record the result.
4028 Use result of setjmp to set it, rather than storing itinto
4029 struct.
4030 (yyDone): Remove label.
4031 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4032 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4033 if YYABORT is used).
4034 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4035 yyparse status; put status > 1 into diagnostic.
4036 Check that status==2 works.
4037 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4038 Use exit status 3 for failure to open (which shouldn't happen).
4039
40402005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4041
4042 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4043 1 on syntax error; just let yyparse do its thing.
4044 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4045 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4046 (Exploding the Stack Size with Alloca):
4047 (Exploding the Stack Size with Malloc):
4048 Expect exit status 2, not 1, since the parser is supposed to blow
4049 its stack. Problem reported by twlevo@xs4all.nl.
4050
4051 * data/glr.c (yyparse): Don't assume that the initial calls
4052 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4053 Print a stack-overflow message and fail instead.
4054 Initialize the line-number information before creating the stack,
4055 so that the stack-overflow message can report line zero safely.
4056
40572005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4058
4059 Fix problems reported by twlevo@xs4all.nl.
4060 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4061 (yyuserMerge): Provide a default case if b4_mergers is empty.
4062 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4063 * tests/glr-regression.at
4064 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4065 Add casts to pacify C++ compilers.
4066 * tests/glr-regression.at (Improper merging of GLR delayed action
4067 sets): Declare yylex before using it.
4068 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4069 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4070 test for valgrind; valgrind is independent of g++.
4071 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4072 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4073 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4074 Use a destructor, so that we can expand the stack. Change
4075 YYSTYPE to char * so that we can free it. Cast result of malloc.
4076
40772005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4078
4079 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4080 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4081
40822005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4083
4084 * PACKAGING: New file, suggested by Bruno Haible and taken from
4085 similar wording in gettext's PACKAGING file.
4086 * NEWS: Mention PACKAGING.
4087 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4088
40892005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4090
4091 * NEWS: Document recent i18n improvements.
4092 * bootstrap: Get runtime translations into runtime-po.
4093 Create runtime-po files automatically, if possible.
4094 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4095 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4096 does not infringe on the user's name space.
4097 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4098 * doc/bison.texinfo (Internationalization): Revamp the English
4099 and Texinfo syntax a bit, to try to make it clearer.
4100 (Bison Options, Option Cross Key): Mention --print-localedir.
4101 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4102 YYENABLE_NLS. Quote a bit more.
4103 * runtime-po/.cvsignore: New file.
4104 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4105 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4106 * runtime-po/quot.sed: Likewise.
4107 * runtime-po/boldquot.sed: Likewise.
4108 * runtime-po/en@quot.header: Likewise.
4109 * runtime-po/en@boldquot.header: Likewise.
4110 * runtime-po/insert-header.sin: Likewise.
4111 * runtime-po/remove-potcdate.sin: Likewise.
4112 * runtime-po/Makevars: Likewise.
4113 * runtime-po/LINGUAS: Likewise.
4114 * runtime-po/de.po: Likewise; we will rely on the translation project
4115 to maintain this, so "bootstrap" should get it.
4116 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4117 its value.
4118 * src/main.c (main): Bind the bison-runtime domain, too.
4119
41202005-07-12 Bruno Haible <bruno@clisp.org>
4121
4122 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4123 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4124 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4125 * runtime-po: New directory.
4126 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4127 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4128 * runtime-po/Rules-quot: New file, copied from po/.
4129 * runtime-po/quot.sed: Likewise.
4130 * runtime-po/boldquot.sed: Likewise.
4131 * runtime-po/en@quot.header: Likewise.
4132 * runtime-po/en@boldquot.header: Likewise.
4133 * runtime-po/insert-header.sin: Likewise.
4134 * runtime-po/remove-potcdate.sin: Likewise.
4135 * runtime-po/Makevars: New file.
4136 * runtime-po/POTFILES.in: New file.
4137 * runtime-po/LINGUAS: New file.
4138 * runtime-po/bison-runtime.pot: New file.
4139 * runtime-po/de.po: New file.
4140 * m4/bison.m4: New file.
4141 * Makefile.am (SUBDIRS): Add runtime-po.
4142 (aclocaldir, aclocal_DATA): New variables.
4143 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4144 Define aclocaldir.
4145 * src/getargs.c (usage): Document --print-localedir option.
4146 (PRINT_LOCALEDIR_OPTION): New enum item.
4147 (long_options): Add --print-localedir option.
4148 (getargs): Handle --print-localedir option.
4149 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4150 (Internationalization): New section.
4151
41522005-07-12 Akim Demaille <akim@epita.fr>
4153
4154 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4155 for consistency with the rest of the code.
4156 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4157 Add separators.
4158
41592005-07-12 Akim Demaille <akim@epita.fr>
4160
4161 * src/parse-gram.y: Use %printer instead of YYPRINT.
4162
41632005-07-12 Akim Demaille <akim@epita.fr>
4164
4165 * src/symtab.h, src/symtab.c (symbol_print): New.
4166 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4167 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4168
41692005-07-12 Akim Demaille <akim@epita.fr>
4170
4171 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4172 b4_at_dollar and b4_dollar_dollar.
4173
41742005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4175
4176 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4177 and Pennello's paper.
4178
41792005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4180
4181 * data/yacc.c (yyparse): Undo previous patch. Instead,
4182 set yylsp[0] and yyvsp[0] only if the initial action
4183 sets yylloc and yylval, respectively.
4184
4185 * data/yacc.c (yyparse): In the initial action, set
4186 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4187 This avoids the use of undefined variables if the initial
4188 action does not set yylloc and/or yylval.
4189
41902005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4191
4192 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4193 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4194 Remove from CVS. These files are automatically generated.
4195 * examples/extexi: Clarify that this file is now part of Bison,
4196 not GNU M4, and that it works with any POSIX-compatible Awk.
4197 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4198 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4199 so that we also get calc++-parser.yy. Geneate it.
4200 Use $(AWK), not gawk, since any conforming Awk will do.
4201 Put comment before action, since older 'make' can't handle comment
4202 in action.
4203 $(BUILT_SOURCES): List all built sources, not just some of them.
4204 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4205 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4206 $($(calc_sources_generated)): Remove unnecessary test for existence
4207 of target. (This had a shell syntax error anyway; a stray "x".)
4208 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4209 calc++-parser.yy.
4210 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4211
4212 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4213 implied by the other modules.
4214
42152005-07-06 Akim Demaille <akim@epita.fr>
4216
4217 Bind examples/calc++ to the package.
4218 * examples/calc++/Makefile: Remove, replaced by...
4219 * examples/calc++/Makefile.am: ... this new file.
4220 * examples/calc++/test: Remove input.
4221 * examples/calc++/compile: Remove.
4222 * examples/Makefile.am: New.
4223 * configure.ac, Makefile.am: Adjust.
4224 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4225
42262005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4227
4228 * data/glr.c (yyFail): Drastically simplify; since the format argument
4229 never had any % directives, we can simply pass it to yyerror.
4230 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4231 be modified later, as that is the usual style in glr.c.
4232 Problems reported by Paul Hilfinger.
4233
4234 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4235 and size overflow errors.
4236 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4237 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4238 (YYSIZEMAX): New macro.
4239 (yystpcpy): New function, taken from yacc.c.
4240 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4241 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4242 so that we don't have to maintain their signatures.
4243 (yyFail): Check for buffer overflow, by using vsnprintf rather
4244 than vsprintf. Allocate a bigger buffer if possible.
4245 Report an error if buffer allocation fails.
4246 (yyStackOverflow): New function.
4247 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4248 the initialization was successful. It might fail if storage was
4249 exhausted.
4250 (yyexpandGLRStack): Add more checks for storage allocation failure.
4251 Use yyStackOverflow to report failures.
4252 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4253 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4254 Don't assume stack number fits in int.
4255 (yysplitStack): Check for storage allocation failure.
4256 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4257 can print diagnostics on storage allocation failure. All callers
4258 changed.
4259 (yyresolveValue): Use yybool for boolean.
4260 (yyreportSyntaxError): Check for size-calculation overflow.
4261 This code is taken from yacc.c.
4262 (yyparse): Check for storage allocation errors when allocating
4263 the initial stack.
4264
42652005-07-05 Akim Demaille <akim@epita.fr>
4266
4267 Extract calc++ from the documentation.
4268 * doc/bison.texinfo (Calc++): Add the extraction marks.
4269 * examples/extexi: New, from the aborted GNU Programming 2E.
4270 Separate the different paragraph of a file with empty lines.
4271 * examples/Makefile: Use it to extract the whole calc++ example.
4272
42732005-06-24 Akim Demaille <akim@epita.fr>
4274
4275 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4276 class typedefs.
4277
42782005-06-22 Akim Demaille <akim@epita.fr>
4279
4280 * doc/bison.texinfo (C++ Language Interface): First stab.
4281 (C++ Parsers): Remove.
4282
42832005-06-22 Akim Demaille <akim@epita.fr>
4284
4285 * data/lalr1.cc (yylex_): Honor %lex-param.
4286
42872005-06-22 Akim Demaille <akim@epita.fr>
4288
4289 Start a set of simple examples.
4290 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4291 * examples/calc++/calc++-driver.hh,
4292 * examples/calc++/calc++-parser.yy,
4293 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4294 * examples/calc++/compile, examples/calc++/test: New.
4295
42962005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4297
4298 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4299 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4300 which stems from the 2005-05-27 patch.
4301
43022005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4303
4304 * data/glr.c: Modify treatment of unused parameters to permit use
4305 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4306
43072005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4308
4309 Fix infringement on user name space reported by Janos Zoltan Szabo.
4310 * data/yacc.c (yyparse): strlen -> yystrlen.
4311
43122005-05-30 Akim Demaille <akim@epita.fr>
4313
4314 * data/lalr1.cc (_): New.
4315 Translate the various messages.
4316
43172005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4318
4319 Fix infringement on user name space reported by Bruno Haible.
4320 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4321 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4322 the user's name space.
4323 (alloca): Include <stdlib.h> to get it, if it's not built in.
4324 (YYMALLOC, YYFREE): Define only if needed.
4325 (malloc, free): Declare, but only if needed, as this infringes on
4326 the user name space.
4327
43282005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4329
4330 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4331 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4332 with %d format.
4333 * lib/ebitset.c (min, max): Undef before defining.
4334 * lib/vbitset.c (min, max): Likewise.
4335 * lib/subpipe.c (create_subpipe): Save local variables in case
4336 vfork clobbers them.
4337
43382005-05-24 Bruno Haible <bruno@clisp.org>
4339
4340 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4341 error message syntax used by gcc-4.0.
4342
43432005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4344
4345 * README: Mention m4 1.4.3. Remove obsolete advice about
4346 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4347
4348 * bootstrap: Remove workaround for problem I encountered with
4349 gettext 0.14.1; it seems to be fixed now.
4350
43512005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4352
4353 * NEWS: Version 2.0a.
4354
4355 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4356 the previous change.
4357
4358 Various maintainer cleanups.
4359 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4360 conftest*, for benefit of CVS commands run at the same time as
4361 "configure". Add build-aux, since "bootstrap" now creates it and
4362 its subfiles.
4363 * Makefile.cfg (move_if_change): Remove.
4364 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4365 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4366 (po_repo, do-po-update, po-update, wget_files, get-targets):
4367 (config.guess-url_prefix, config.sub-url_prefix):
4368 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4369 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4370 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4371 Remove.
4372 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4373 this is now the recommended name.
4374 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4375 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4376 ylwrap. These files now go into build-aux.
4377 * config/move-if-change: Remove.
4378 * config/prev-version.txt: Bump from 1.75 to 2.0.
4379
4380 * bootstrap: Add stdio-safer, unistd-safer modules.
4381 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4382 we don't need it).
4383 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4384 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4385 * lib/subpipe.c: Include "unistd-safer.h".
4386 (create_subpipe): Make sure all the newly-created
4387 file descriptors are > 2, so that diagnostics don't
4388 get sent down them (which might cause Bison to hang, in theory).
4389 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4390 * src/files.c (xfopen): Use fopen_safer, not fopen.
4391
4392 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4393 yesterday's yacc.c fix.
4394
43952005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4396
4397 * data/glr.c, data/lalr1.cc: Update copyright date.
4398
4399 Fix a destructor bug reported by Wolfgang Spraul in
4400 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4401 * data/yacc.c (yyabortlab): Don't call destructor, and
4402 don't set yychar to EMPTY.
4403 (yyoverflowlab): Don't call destructor.
4404 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4405 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4406 since we no longer output the message "discarding lookahead token
4407 end of input ()".
4408
44092005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4410
4411 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4412 fix a small glitch in debugging output.
4413 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4414 after YY_SYMBOL_PRINT where needed.
4415
4416 (struct yyGLRState): Add some comments.
4417 (struct yySemanticOption): Add some comments.
4418 (union yyGLRStackItem): Add comment.
4419
4420 (yymergeOptionSets): Correct this to properly perform the union,
4421 avoiding infinite reported by Michael Rosien.
4422 Update comment.
4423
4424 * tests/glr-regression.at: Add test for GLR merging error reported
4425 by M. Rosien.
4426
44272005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4428
4429 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4430 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4431 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4432 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4433 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4434 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4435 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4436 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4437 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4438 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4439 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4440 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4441 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4442 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4443 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4444 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4445 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4446 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4447 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4448 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4449 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4450 src/output.h, src/parse-gram.c, src/parse-gram.h,
4451 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4452 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4453 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4454 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4455 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4456 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4457 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4458 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4459 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4460 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4461 tests/reduce.at, tests/regression.at, tests/sets.at,
4462 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4463 Update FSF postal mail address.
4464
44652005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4466
4467 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4468 Problem reported by Ralf Menzel.
4469
44702005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4471
4472 * tests/actions.at: Test that stack overflow invokes destructors.
4473 From Marcus Holland-Moritz.
4474 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4475 from here....
4476 (yyreturn): to here. That way, destructors are called properly
4477 even if the stack overflows, or the user calls YYACCEPT or
4478 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4479 (yyoverflowlab): Destroy the lookahead.
4480
44812005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4482
4483 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4484
44852005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4486
4487 * NEWS: Bison-generated C parsers no longer quote literal strings
4488 associated with tokens.
4489 * src/output.c (prepare_symbols): Don't escape strings,
4490 since users don't want to see C escapes.
4491 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4492 in diagnostics.
4493 * tests/input.at (Torturing the Scanner): Likewise.
4494 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4495
44962005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4497
4498 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4499 the data size is known to be too small and we can't increase it.
4500 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4501
45022005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4503
4504 * src/parse-gram.y: Include quotearg.h.
4505 (string_as_id): Quote $1 before using it as a key, since the
4506 lexer no longer quotes it for us.
4507 (string_content): Don't strip quotes, since lexer no longer
4508 quotes it for us.
4509 * src/scan-gram.l: Include quotearg.h.
4510 ("\""): Omit quote.
4511 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4512 a key, since the rest of the lexer doesn't quote it.
4513 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4514 * tests/regression.at (Token definitions): Check for backslashes
4515 in token strings.
4516
4517 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4518 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4519 (yyparse): Revamp code to generate long syntax error message, to
4520 make it easier to translate, and to avoid problems with arithmetic
4521 overflow. Change "virtual memory" to "memory" in diagnostic, since
4522 we don't know whether the memory is virtual.
4523
45242005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4525
4526 * NEWS: Bison-generated C parsers now use the _ macro to
4527 translate strings.
4528 * data/yacc.c (_) [!defined _]: New macro.
4529 All English strings wrapped inside this macro.
4530 * doc/bison.texinfo (Bison Parser): Document _.
4531 * po/POTFILES.in: Include src/parse-gram.c, since it now
4532 includes translateable strings that parse-gram.y doesn't.
4533
45342005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4535
4536 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4537 reverting the 2004-10-11 change to this function.
4538 (symbol_check_alias_consistency): Don't call symbol_type_set
4539 if the type name is already correct.
4540 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4541
45422005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4543
4544 * tests/regression.at (Token definitions): Don't use a token named
4545 c, as that generates a "#define c ..." that runs afoul of buggy
4546 stdlib.h that uses the identifier c as a member of struct
4547 drand48_data. Problem reported by Horst Wente.
4548
45492005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4550
4551 * bootstrap: Change translation URL from
4552 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4553 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4554 redirection glitches. Problem reported by twlevo@xs4all.nl.
4555
45562005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4559 after operands; POSIX says this isn't portable for the c99 command.
4560
45612005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4562
4563 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4564 immediately if a data overrun has occurred; this may help us track
4565 down what may be a spurious failure on MacOS.
4566
45672005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4568
4569 Respond to problems reported by twlevo@xs4all.nl.
4570
4571 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4572
4573 * src/vcg.h: Comment fix.
4574 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4575 (G_CMAX): Change to -1 instead of INT_MAX.
4576
4577 * data/yacc.c (yyparse): Omit spaces before #line.
4578
45792005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4580
4581 * src/tables.c (state_number_to_vector_number): Put it inside an
4582 "#if 0", since it's not currently used. Problem reported by
4583 Roland McGrath.
4584
45852005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4586
4587 * src/output.c (escaped_output): Renamed from
4588 escaped_file_name_output, since we now use it for symbol tags as
4589 well. All uses changed.
4590 (symbol_destructors_output, symbol_printers_output):
4591 Escape symbol tags too.
4592 Problem reported by Matyas Forstner in
4593 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4594
4595 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4596 not needed.
4597 * src/output.c (user_actions_output, token_definitions_output,
4598 symbol_destructors_output, symbol_printers_output): Likewise.
4599 * src/reader.c (prologue_augment): Likewise.
4600 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4601
4602 * src/vcg.c (output_edge): Don't quote linestyle arg.
4603 Problem reported by twlevo@xs4all.nl.
4604
46052005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4606
4607 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4608 example, reported by Derek M Jones. Also, make the example even
4609 more outrageous, to better illustrate how bad the problem is.
4610
46112005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4612
4613 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4614 putsym. Typo reported by Sebastian Piping.
4615
46162005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4617
4618 * doc/bison.texinfo (Language and Grammar): some -> same
4619 (Epilogue): int he -> in the
4620 Typos reported by Sebastian Piping via Justin Pence.
4621
46222005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4623
4624 * tests/glr-regression.at (Improper handling of embedded actions
4625 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4626 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4627 with dollar signs in test names.
4628 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4629 for a similar reason.
4630
46312005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4632
4633 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4634 wants to redefine G_VIEW.
4635
46362005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4637
4638 * src/vcg.c (get_view_str): Remove case for normal_view.
4639 Problem reported by twlevo@xs4all.nl.
4640
46412005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4642
4643 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4644 Problem reported by twlevo@xs4all.nl.
4645
4646 * doc/bison.texinfo: Change @dircategory from "GNU programming
4647 tools" to "Software development". Requested by Richard Stallman
4648 via Karl Berry.
4649
46502005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4651
4652 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4653 Problem reported by twlevo@xs4all.nl.
4654
46552005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4656
4657 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4658 keyword; it's not needed with modern compilers, and it doesn't
4659 affect correctness with older compilers. Suggested by
4660 twlevo@xs4all.nl.
4661
46622005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4663
4664 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4665 gcc -Wswitch-default.
4666 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4667 * data/yacc.c (yyparse): Likewise.
4668
46692005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4670
4671 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4672 already. Let config.h define any nonstandard values.
4673
46742005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4675
4676 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4677 for the benefit of slower hosts. Problem reported by
4678 Nelson H. F. Beebe.
4679
46802005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4681
4682 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4683 being defined and not used.
4684 * data/lalr1.cc (yyparse): Likewise.
4685 Use "if (false)" rather than "if (0)".
4686
46872005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4688
4689 * TODO: Mention that we should allow NUL bytes in tokens.
4690
46912005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4692
4693 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4694 Problem reported by Hans Aberg.
4695
46962005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4697
4698 * src/getargs.c (version): Happy new year; update overall
4699 program copyright date from 2004 to 2005.
4700
4701 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4702 Problem reported by Hans Aberg.
4703 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4704 (Output file names.): Add a test for the case when standard output
4705 is closed.
4706
47072004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4708
4709 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4710 to fix an oversight in the Bison 2.0 manual.
4711
47122004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4713
4714 * NEWS: Version 2.0. Reformat the existing news items since
4715 1.875, so that related items are grouped together.
4716 * configure.ac (AC_INIT): Bump version to 2.0.
4717 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4718
4719 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4720 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4721 otherwise, we're not testing alloca. Unfortunately there's no
4722 simple way to consult HAVE_ALLOCA here.
4723
4724 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4725 for yymsg, too.
4726
4727 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4728 hand. This avoids a warning about comparing int to size_t when
4729 GCC warnings are enabled.
4730
47312004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4732
4733 * NEWS: Bison-generated parsers no longer default to using the
4734 alloca function (when available) to extend the parser stack, due
4735 to widespread problems in unchecked stack-overflow detection.
4736 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4737 responsibility to set it to a positive value. This lets the user
4738 specify a value that is not a preprocessor constant.
4739 * data/yacc.c (YYMAXDEPTH): Likewise.
4740 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4741 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4742 to be a compile-time constant. However, explain the constraints on it.
4743 Also, explain the constraints on YYINITDEPTH.
4744 (Table of Symbols): Explain that alloca is no longer the default.
4745 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4746 to 1.
4747
4748 * doc/bison.texinfo (Location Default Action): Mention that n must
4749 be zero when k is zero. Suggested by Frank Heckenbach.
4750
47512004-12-22 Akim Demaille <akim@epita.fr>
4752
4753 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4754 (parser::state_type, parser::semantic_type, parser::location_type):
4755 Private, not public.
4756 (parser::parse): Return ints, not bool.
4757 Returning a bool introduces a problem: 0 corresponds to false, and
4758 it seems weird to return false on success. Returning true changes
4759 the conventions for yyparse.
4760 Alternatively we could return void and send an exception.
4761 There is no clear consensus (yet?).
4762 (state_stack, semantic_stack, location_stack): Rename as...
4763 (state_stack_type, semantic_stack_type, location_stack_type): these.
4764 Private, not public.
4765 * tests/c++.at: New.
4766 * tests/testsuite.at, tests/Makefile.am: Adjust.
4767
47682004-12-21 Akim Demaille <akim@epita.fr>
4769
4770 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4771
47722004-12-21 Akim Demaille <akim@epita.fr>
4773
4774 Don't impose std::string for filenames.
4775
4776 * data/lalr1.cc (b4_filename_type): New.
4777 (position::filename): Use it.
4778 (parser.hh): Move the inclusion of stack.hh and location.hh below
4779 the user code, so that needed headers for the filename type can be
4780 included first.
4781 Forward declare them before the user code.
4782 * tests/Makefile.am (check-local, installcheck-local): Pass
4783 TESTSUITEFLAGS to the TESTSUITE.
4784
47852004-12-20 Akim Demaille <akim@epita.fr>
4786
4787 Use more STL like names: my_class instead of MyClass.
4788
4789 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4790 (SemanticStack, SemanticType, StateStack, StateType)
4791 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4792 (Parser::value): Rename as...
4793 (location_stack, location_type, rhs_number_type, semantic_stack)
4794 (semantic_type, state_stack, state_type, token_number_type, stack)
4795 (slice, traits, parser::yylloc, parser::yylval): these.
4796
4797 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4798
47992004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4800
4801 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4802 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4803
48042004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4805
4806 Remove uses of 'short int' and 'unsigned short int'. This raises
4807 some arbitrary limits. It uses more memory but nowadays that's
4808 not much of an issue.
4809
4810 This change does not affect the generated parsers; that's a different
4811 task, as some users will want to conserve memory there.
4812
4813 Ideally we should use size_t to represent all object counts, and
4814 something like ptrdiff_t to represent signed differences of object
4815 counts; but that will require more code-cleanup than I have the
4816 time to do right now.
4817
4818 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4819 Use size_t, not int or short int, to count objects.
4820 * src/closure.c (nritemset, closure): Likewise.
4821 * src/closure.h (nritemset, closure): Likewise.
4822 * src/nullable.c (nullable_compute): Likewise.
4823 * src/print.c (print_core): Likewise.
4824 * src/print_graph.c (print_core): Likewise.
4825 * src/state.c (state_compare, state_hash): Likewise.
4826 * src/state.h (struct state): Likewise.
4827 * src/tables.c (default_goto, goto_actions): Likewise.
4828
4829 * src/gram.h (rule_number, rule): Use int, not short int.
4830 * src/output.c (prepare_rules): Likewise.
4831 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4832 errs, reductions): Likewise.
4833 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4834 Likewise.
4835 * src/tables.c (vector_number, tally, action_number,
4836 ACTION_NUMBER_MINIMUM): Likewise.
4837 * src/output.c (muscle_insert_short_int_table): Remove.
4838
48392004-12-17 Akim Demaille <akim@epita.fr>
4840
4841 * data/lalr1.cc: Extensive Doxygenation.
4842 (error_): Rename as...
4843 (error): this, since it is visible to the user.
4844 Adjust callers.
4845 (Parser::message): Now an automatic variable from...
4846 (Parser::yyreport_syntax_error_): here.
4847 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4848 Parser::error.
4849 * tests/input.at: Escape $.
4850
48512004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4852
4853 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4854 Parenthesize rhs to avoid obscure problems with mistakes like
4855 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4856 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4857 b4_rhs_location): Likewise.
4858 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4859 b4_rhs_location): Likewise.
4860
48612004-12-16 Akim Demaille <akim@epita.fr>
4862
4863 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4864 yacc.c: be sure to stay within yycheck_.
4865 * tests/actions.at: Re-enable C++ tests.
4866
48672004-12-16 Akim Demaille <akim@epita.fr>
4868
4869 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4870 real.
4871
48722004-12-16 Akim Demaille <akim@epita.fr>
4873
4874 Use #define to handle the %name-prefix.
4875
4876 * data/glr.c, data/yacc.c: Comment changes.
4877 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4878 so that one can refer to yylex in the parser file, and have it
4879 renamed, as is the case with other skeletons.
4880
48812004-12-16 Akim Demaille <akim@epita.fr>
4882
4883 Move lalr1.cc internals into yy*.
4884
4885 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4886 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4887 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4888 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4889 (empty_, final_, terror_, errcode_, ntokens_)
4890 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4891 (looka_, ilooka_, error_range_, nerrs_):
4892 Rename as...
4893 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4894 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4895 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4896 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4897 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4898 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4899 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4900 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4901 these.
4902
49032004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4904
4905 Fix some problems reported by twlevo at xs4all.
4906 * src/symtab.c (symbol_new): Report an error if the input grammar
4907 contains too many symbols. This is better than calling abort() later.
4908 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4909 (struct node, struct graph):
4910 Rename member expand to stretch. All uses changed.
4911 (struct graph): Remove member layoutalgorithm. All uses removed.
4912 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4913 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4914 All uses changed.
4915 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4916
49172004-12-15 Akim Demaille <akim@epita.fr>
4918
4919 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4920 Add more Doxygen comments.
4921 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4922 (report_syntax_error_, translate_): Rename as...
4923 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4924 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4925
49262004-12-15 Akim Demaille <akim@epita.fr>
4927
4928 * data/lalr1.cc (lex_): Rename as...
4929 (yylex_): this.
4930 Move the trace here.
4931 Take the %name-prefix into account.
4932 Reported by Alexandre Duret-Lutz.
4933
49342004-12-15 Akim Demaille <akim@epita.fr>
4935
4936 Simplify the C++ parser constructor.
4937
4938 * data/lalr1.cc (debug_): Rename as...
4939 (yydebug_): so that the parser's internals are always in the yy*
4940 pseudo namespace.
4941 Adjust uses.
4942 (b4_parse_param_decl): Remove the leading comma as it is now only
4943 called as unique argument list.
4944 (Parser::Parser): Remove the constructor accepting a location and
4945 an initial debugging level.
4946 Remove from the other ctor the argument for the debugging level.
4947 (debug_level_type, debug_level, set_debug_level): New.
4948
4949 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4950 constructor calls.
4951
49522004-12-15 Akim Demaille <akim@epita.fr>
4953
4954 Remove b4_root related material: failure experiment
4955 (which goal was to allow to derive from a class).
4956
4957 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4958 definitions and uses.
4959
49602004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4961
4962 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4963 not 2, since it's not portable to subtract 1 from the start of an
4964 array. The new item 0 is never set or used. All uses changed.
4965
4966 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4967 the default definition of YYLLOC_DEFAULT. Problem reported
4968 by Frank Heckenbach.
4969
49702004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4971
4972 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4973 the normal case and one for the error case. Just use the
4974 first one uniformly. Problem reported by Frank Heckenbach.
4975 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4976 use exactly the same macro in both places.
4977 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4978 so that the normal-case YYRHSLOC works for the error case too.
4979 All uses changed.
4980 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4981 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4982 * doc/bison.texinfo (Location Default Action): Don't claim that
4983 we have an array of locations. Use the same macro for both glr
4984 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4985 the index is 0.
4986
49872004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4988
4989 * HACKING: Update email addresses to send announcements to.
4990
4991 * configure.ac (AC_INIT): Bump version to 1.875f.
4992
49932004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4994
4995 * NEWS: Version 1.875e.
4996 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4997
4998 * src/scan-skel.l: Include "complain.h", for "fatal".
4999
5000 * src/relation.h (relation_print, relation_digraph):
5001 Relation sizes are of type relation_node, not size_t (this is
5002 merely a doc fix, since the two types are equivalent).
5003 (relation_transpose): Relation sizes are of type relation_node,
5004 not int.
5005 * src/relation.c: Likewise.
5006 (top, infinity): Now of type relation_node, not int.
5007 (traverse, relation_transpose): Use relation_node, not int.
5008
5009 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5010 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5011 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5012
5013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5014 specifying whether the test should be skipped. Use it tp
5015 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5016 fail on some hosts, and should be skipped.
5017
50182004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5019
5020 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5021 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5022 unless otherwise specified below.
5023
5024 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5025 to allocate kernel_base, kernel_items, kernel_size, since
5026 they needn't be initialized to 0.
5027 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5028 * src/closure.c (new_closure): Likewise, for itemset.
5029 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5030 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5031 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5032 (build_relations): Likewise for edge, states1, includes.
5033 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5034 * src/reader.c (packgram): Likewise, for ritem, rules.
5035 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5036 * src/relation.c (relation_digraph): Likewise for VERTICES.
5037 (relation_transpose): Likewise for new_R, end_R.
5038 * src/symtab.c (symbols_token_translations_init): Likewise for
5039 token_translations.
5040 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5041 (token_actions): Likewise for yydefact, actrow, conflrow,
5042 conflict_list.
5043 (save_column): Likewise for froms[symno], tos[symno].
5044 (goto_actions): Likewise for state_count.
5045 (pack_table): Likewise for base, pos, check.
5046 (tables_generate): Likewise for width.
5047
5048 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5049 for initial core. Just have a separate core, so we needn't worry
5050 about whether kernel_size and kernel_base are initialized.
5051
5052 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5053 kernel_size, kernel_items): Remove unnecessary initialization.
5054 * src/conflicts.c (conflicts): Likewise.
5055 * src/derives.c (derives): Likewise.
5056 * src/muscle_tablc (muscle_insert): Likewise.
5057 * src/relation.c (relation_digraph): Likewise.
5058 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5059 conflrow, conflict_table, conflict_list, table, check):
5060 Likewise.
5061
5062 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5063 This is because all callers pass unsigned int.
5064 * src/closure.h (new_closure): Likewise.
5065
5066 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5067 (build_relations): Initialize includes[i] in all cases.
5068 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5069 and rules[ruleno].precsym. Initialize members in order.
5070 * src/relation.c (relation_transpose): Always initialize new_R[i]
5071 and end_R[i].
5072 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5073
5074 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5075 conflict_list[0] was always 0, but now it isn't initialized.
5076
5077 * src/table.c (table_grow): When conflict_table grew, the grown
5078 area wasn't cleared. Fix this.
5079
5080 * lib/.cvsignore: Add strdup.c, strdup.h.
5081 * m4/.cvsignore: Add strdup.m4.
5082
50832004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5084
5085 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5086 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5087 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5088 ngotos + 1 without checking for overflow.
5089 (build_relations): Use END_NODE, not -1, to denote end of edges.
5090 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5091 build_relations): Use goto_number, not int, for goto numbers.
5092 * src/tables.c (save_column, default_goto): Likewise.
5093
50942004-11-23 Akim Demaille <akim@epita.fr>
5095
5096 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5097 of #defining from yystype.
5098 Don't typedef yystype, C++ does not need it.
5099 This lets it possible to forward declare it as union.
5100
51012004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5102
5103 * bootstrap (gnulib_modules): Add extensions.
5104 Problem reported by Jim Meyering.
5105
51062004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5107
5108 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5109 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5110 src/system.h, src/tables.c: XFREE -> free, to accommodate
5111 recent change to gnulib xalloc.h.
5112 Problem reported by Jim Meyering.
5113
51142004-11-17 Akim Demaille <akim@epita.fr>
5115
5116 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5117
51182004-11-17 Akim Demaille <akim@epita.fr>,
5119 Alexandre Duret-Lutz <adl@gnu.org>
5120
5121 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5122 changes.
5123 (YYCDEBUG): Adjust.
5124 Use it instead of cdebug_.
5125 (Parser::debug_stream, Parser::set_debug_stream): New.
5126 (Parser::symprint_): Define cdebug_ for temporary backward
5127 compatibility.
5128 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5129 debug_stream ().
5130
51312004-11-17 Akim Demaille <akim@epita.fr>
5132
5133 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5134 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5135 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5136 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5137
51382004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5139
5140 * data/glr.c (yyloc_default): Remove; not used.
5141 Problem reported by Frank Heckenbach.
5142
51432004-10-25 Akim Demaille <akim@epita.fr>
5144
5145 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5146 Introduce another definition to address simple location arrays.
5147 (yyGLRStack): New member: yyerror_range.
5148 (yyrecoverSyntaxError, yyparse): Update it.
5149 (yyrecoverSyntaxError): Use it when shifting the error token to
5150 have an accurate range, equivalent to the one computed by both
5151 yacc.c and lalr1.cc.
5152 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5153 that column numbers start at column 0, as per GNU Coding
5154 Standards, the others tests, and the doc.
5155 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5156 Adjust to the above change (first column is 0).
5157 And adjust the location of the "<error>", now covering the whole
5158 line.
5159
51602004-10-22 Akim Demaille <akim@epita.fr>
5161 and Paul Eggert <eggert@cs.ucla.edu>
5162
5163 Remove some arbitrary limits on goto numbers and relations.
5164 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5165 initial values, since they're never used.
5166 (set_goto_map): ngotos is now unsigned, so test for overflow
5167 by seeing whether it wraps around to zero.
5168 * src/lalr.h (goto_number): Now size_t, not short int.
5169 (GOTO_NUMBER_MAXIMUM): Remove.
5170 * src/relation.c (relation_print, traverse, relation_transpose):
5171 Check for END_NODE rather than looking at sign.
5172 * src/relation.h (END_NODE): New macro.
5173 (relation_node): Now size_t, not short int.
5174
51752004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5176
5177 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5178 keyword, not an identifier. Problem reported by Baron Schwartz in
5179 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5180
51812004-10-11 Akim Demaille <akim@epita.fr>
5182
5183 * src/symtab.c (symbol_check_alias_consistency): Also check
5184 type names, destructors, and printers.
5185 Reported by Alexandre Duret-Lutz.
5186 Recode the handling of associativity and precedence in terms
5187 of symbol_precedence_set.
5188 Accept no redeclaration at all, not even equal to the previous
5189 value.
5190 (redeclaration): New.
5191 Use it to factor redeclaration complaints.
5192 (symbol_make_alias): Don't set the type of the alias, let
5193 symbol_check_alias_consistency do it as for other features.
5194 * src/symtab.h (symbol): Add new member prec_location, and
5195 type_location.
5196 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5197 * tests/input.at (Incompatible Aliases): New.
5198
51992004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5200
5201 .cvsignore fixes to accommodate gnulib changes,
5202 and the practice of naming build directories "_build".
5203 * .cvsignore: Add "_*". Sort.
5204 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5205 * m4/.cvsignore: Add "*_gl.m4".
5206
52072004-10-06 Akim Demaille <akim@epita.fr>
5208
5209 * src/parse-gram.y (add_param): Fix the truncation of trailing
5210 spaces.
5211
52122004-10-05 Akim Demaille <akim@epita.fr>
5213
5214 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5215 whether the reducion was empty or not. This leaves room to
5216 improve the use of YYLLOC_DEFAULT in such a case.
5217 lalr1.cc is still experimental, so changing this is acceptable.
5218 And finally, there are probably not many users who changed the
5219 handling of locations in GLR, so changing is admissible too.
5220
5221 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5222 empty reduction, set @$ to an empty location ending the previously
5223 stacked symbol.
5224 Adjust uses to make sure the code is triggered on empty
5225 reductions.
5226 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5227 expected output: empty reductions have empty locations.
5228
52292004-09-29 Akim Demaille <akim@epita.fr>
5230
5231 * data/lalr1.cc: Move towards a more standard C++ coding style
5232 for templates: Class < T > -> Class<T>.
5233
52342004-09-29 Akim Demaille <akim@epita.fr>
5235
5236 * data/lalr1.cc: Reinstall the former ctor, for sake of
5237 compatibility, but warn it will be removed.
5238 Move towards a more standard C++ coding style (i.e., type *var ->
5239 type* var).
5240
52412004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5242
5243 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5244 since it's less likely to work if NULs are involved in the future.
5245
52462004-09-27 Akim Demaille <akim@epita.fr>
5247
5248 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5249
52502004-09-27 Akim Demaille <akim@epita.fr>
5251
5252 * data/lalr1.cc (b4_parse_param_decl_1): New.
5253 (b4_parse_param_decl): Use it to have different names between attribute
5254 and argument names.
5255 (b4_cc_constructor_call): Likewise.
5256
52572004-09-24 Akim Demaille <akim@epita.fr>
5258
5259 * src/parse-gram.y (add_param): Strip the leading and trailing
5260 blanks from a formal argument declaration.
5261 (YY_LOCATION_PRINT): New.
5262
52632004-09-24 Akim Demaille <akim@epita.fr>
5264
5265 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5266 after the location.
5267
52682004-09-24 Akim Demaille <akim@epita.fr>
5269
5270 * doc/bison.texinfo (Table of Symbols): Sort.
5271
52722004-09-21 Akim Demaille <akim@epita.fr>
5273
5274 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5275 the useless parentheses.
5276 Suggested by Paul Eggert.
5277
52782004-09-20 Akim Demaille <akim@epita.fr>
5279
5280 Let the initial-action act on the look-ahead, and use it for the
5281 "initial push" (corresponding to an hypothetical beginning-of-file).
5282 And let lalr1.cc honor %initial-action.
5283
5284 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5285 example.
5286 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5287 (Parser::Parser): Remove the ctor that used to initialize it.
5288 (Parser::parse): Like in the other skeletons, issue the "starting
5289 parse" message before any action.
5290 Honor %initial-action.
5291 Initialize the stacks with the lookahead.
5292 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5293 look-ahead.
5294 Push them in the stacks.
5295 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5296
52972004-09-20 Akim Demaille <akim@epita.fr>
5298
5299 * doc/bison.texinfo (Initial Action Decl): New.
5300
53012004-09-20 Akim Demaille <akim@epita.fr>
5302
5303 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5304 clearer criterion to define it.
5305 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5306 When reducing on an empty RHS, use the latest stacked location as
5307 location.
5308 yylloc is not always available.
5309 * data/glr.c: Likewise.
5310 Also, honor initial-actions.
5311
53122004-09-20 Akim Demaille <akim@epita.fr>
5313
5314 * data/yacc.c (YY_LOCATION_PRINT): New.
5315 Define when we know YYLTYPE's structure, i.e., when the default
5316 YYLLOC_DEFAULT is used.
5317 * data/c.m4 (b4_yysymprint_generate): Use it.
5318 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5319 value of the result.
5320 (error_start_): Replace with...
5321 (error_range_): this location array.
5322 This allows to replace code relying on the implementation of
5323 locations by portable code.
5324 * data/yacc.c (yylerrsp): Replace with...
5325 (yyerror_range): this.
5326 Every time a token is popped, update yyerror_range[0], to have an
5327 accurate location for the error token.
5328 * data/glr.c (YY_LOCATION_PRINT): New.
5329 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5330 deference a pointer.
5331 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5332 report the location in %printers.
5333
5334 * src/scan-skel.l: Instead of abort, report error messages to ease
5335 understanding skeleton scanning failures.
5336
53372004-09-16 Akim Demaille <akim@epita.fr>
5338
5339 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5340 (iterator, const_iterator): these, to be more in the C++ spirit.
5341 Also, return reverse iterators so that when displaying the stack
5342 we display its bottom first.
5343 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5344 from yacc.c.
5345 We should probably use vector here though.
5346
53472004-09-16 Akim Demaille <akim@epita.fr>
5348
5349 Have more complete shift traces.
5350
5351 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5352 to report Shifts instead of ad hoc YYDPRINTF invocations,
5353 including for the error token.
5354 * data/lalr1.cc (symprint_): Output the location.
5355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5356 output the location within the %printer.
5357 Activate GLR tests, at least to make sure they compile properly.
5358 They still don't pass though.
5359 * tests/calc.at: Adjust expect verbose output, since now "Entering
5360 state..." is on a different line than the "Shifting" message.
5361
53622004-09-08 Akim Demaille <akim@epita.fr>
5363
5364 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5365 Bison directive from the Bison file to the invocation of this
5366 macro, so that these directives are passed to
5367 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5368 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5369 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5370 the extra Bison directives instead of the whole series.
5371 Change the grammar so that there are recoverable errors, and
5372 unrecoverable errors. Now we can have the parser give up before
5373 consuming the whole input. As a result we now can observe that
5374 the lookahead is freed when needed.
5375 Change the parser source to parse argv[1] instead of a hard coded
5376 string.
5377 Simplify yylex, and give a value and location to EOF.
5378 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5379 passed directives already coded in the file.
5380 Add some tests to check the location of "error".
5381 For some tests, the C++ parser is correct, and not yacc.c.
5382 For other tests, they provide different, but unsatisfying, values,
5383 so keep the C++ value so that at least one parser is "correct"
5384 according to the test suite.
5385 (Actions after errors): Remove, this is subsumed by the
5386 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5387
53882004-09-06 Akim Demaille <akim@epita.fr>
5389
5390 * data/lalr1.cc: Adjust the indentation of the labels.
5391 (Parser::pop): New.
5392 Use it.
5393
53942004-09-06 Akim Demaille <akim@epita.fr>
5395
5396 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5397 argument, an informative message.
5398 Call YY_SYMBOL_PRINT.
5399 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5400 * data/lalr1.cc (destruct_): Likewise.
5401 In addition, no longer depend on b4_yysymprint_generate and
5402 b4_yydestruct_generate to generate these functions, do it "by
5403 hand".
5404
54052004-09-03 Akim Demaille <akim@epita.fr>
5406
5407 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5408 invoked, yydestruct the lookahead.
5409 * tests/calc.at (Calculator $1): Update the expected lengths of
5410 traces: there is an added line for the discarded lookahead.
5411 * doc/bison.texinfo (Destructor Decl): Some rewording.
5412 Define "discarded" symbols.
5413
54142004-09-02 Akim Demaille <akim@epita.fr>
5415
5416 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5417
54182004-09-02 Akim Demaille <akim@epita.fr>
5419
5420 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5421 (YYDSYMPRINTF): Rename as...
5422 (YY_SYMBOL_PRINT): this.
5423 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5424 two.
5425 Use it instead of direct symprint_ calls.
5426 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5427 one.
5428
54292004-09-02 Akim Demaille <akim@epita.fr>
5430
5431 * data/lalr1.cc (b4_yysymprint_generate): New.
5432 (symprint_): New member function, defined when YYDEBUG.
5433 Use it consistently instead of token/nterm debugging output by
5434 hand.
5435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5436 %printer calls to use cdebug_ when using lalr1.cc.
5437
54382004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5439
5440 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5441 with #ifdef YYDEBUG.
5442
54432004-08-26 Akim Demaille <akim@epita.fr>
5444
5445 * doc/bison.texinfo (Implementing Loops): Rename as...
5446 (Implementing Gotos/Loops): this.
5447
54482004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5449
5450 Adjust to latest gnulib.
5451 * bootstrap (gnulib_modules): Add xalloc-die.
5452 Set LC_ALL=C so that file names sort consistently.
5453 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5454 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5455 uintmax_t.m4, ulonglong.m4.
5456 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5457 po.m4 since we are now using _gl.m4 instead.
5458
54592004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5460
5461 * src/scan-action.l: Remove. Scanning of semantic actions is
5462 handled in scan-gram.l.
5463
54642004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5465
5466 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5467
5468 * src/location.h (struct): The file member is a uniqstr.
5469 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5470
54712004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5472
5473 Fix bug with non-%union parsers that have printers or destructors,
5474 which led to a Bison core dump. Reported by Peter Fales in
5475 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5476
5477 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5478 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5479 not to our own type.
5480 * src/output.c (symbol_destructors_output, symbol_printers_output):
5481 Don't assume %union.
5482 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5483 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5484 UNION-FLAG. All callers changed.
5485 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5486 Use type char, not unsigned int, when declaring an array of char;
5487 this lets us remove a cast.
5488 (Printers and Destructors): Add non-%union test cases.
5489
54902004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5491
5492 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5493 GLR writeups. E.g., avoid frenchspacing and the future tense,
5494 change "lookahead" to "look-ahead", and change "wrt" to "with
5495 respect to".
5496
54972004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5498
5499 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5500 New sections, split off from the GLR Parsers section. Put the new
5501 Simple GLR Parser near the start of the GLR section, for clarity.
5502 Rewrite connective text.
5503
55042004-06-21 Frank Heckenbach <frank@g-n-u.de>
5505
5506 * doc/bison.texinfo (Simple GLR Parsers): New section.
5507
55082004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5509
5510 * NEWS, TODO, doc/bison.texinfo:
5511 Use "look-ahead" instead of "lookahead", to be consistent.
5512 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5513 while we're fixing "look-ahead".
5514 * src/conflicts.c (shift_set): Renamed from shiftset.
5515 (look_ahead_set): Renamed from lookaheadset.
5516 * src/print.c: Likewise.
5517 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5518 name for "lookahead".
5519 (report_types, usage): Likewise.
5520 * src/getargs.h (report_look_ahead_tokens): Renamed from
5521 report_lookaheads.
5522 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5523 compute_lookaheads.
5524 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5525 (look_ahead_tokens_print): Renamed from lookaheads_print.
5526 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5527 state_rule_lookaheads_print.
5528 * src/state.h: Likewise.
5529 (reductions.look_ahead_tokens): Renamed from lookaheads.
5530 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5531 AT_DATA_LOOKAHEADS_GRAMMAR.
5532
55332004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5534
5535 * README: Update location of patched M4 distribution.
5536
55372004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5538
5539 Don't assume the C++ compiler takes the same arguments as the C compiler
5540 (trivial change).
5541 * configure.ac (O0CXXFLAGS): New var.
5542 * tests/atlocal.in (CXXFLAGS): Use it.
5543
55442004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5545
5546 Fix some "make check" problems with C++ reported by
5547 Albert Chin-A-Young for Tru64 C++ in this thread:
5548 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5549
5550 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5551 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5552 Output to a .cc file for C++, not to a .c file.
5553 * tests/calc.at (AT_CHECK_CALC): Likewise.
5554 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5555 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5556
55572004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5558
5559 * tests/calc.at, tests/actions.at: Workaround for SGI
5560 C++ compiler. (trivial change)
5561
55622004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5563
5564 Spent a few hours checking out which prerequisite versions the
5565 current sources actually require. I went all the way back to
5566 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5567 a seemingly endless set of combinations of versions more recent
5568 than that. The bottom line is that the current sources require
5569 fairly recent versions of the build tools, and it'll be some work
5570 to change this.
5571 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5572 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5573 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5574 Add comments explaining why those particular versions are
5575 currently needed.
5576
5577 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5578 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5579 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5580
5581 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5582 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5583
55842004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5585
5586 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5587 0.11.5. Suggested by Bruno Haible.
5588 * bootstrap: Remove gettext version checking.
5589
5590 * doc/bison.texinfo (Decl Summary): Also mention that %union
5591 can depend on prerequisite types. Problem reported by Tim
5592 Van Holder.
5593
55942004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5595
5596 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5597 * README-alpha: Don't tell people not to package this.
5598
5599 * bootstrap: Don't assume $(...) works; use `...` instead.
5600 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5601 gettext better.
5602
5603 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5604 put into the -d output file, and mention what to do if YYSTYPE is
5605 defined as a macro.
5606
56072004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5608
5609 Undo change made earlier today: it caused autopoint to not bring
5610 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5611 autopoint's.
5612
5613 * bootstrap: Check that gettext version matches what's in
5614 configure.ac. Warn users to ignore robots.txt ERROR 404.
5615 * bootstrap: Undo today's earlier change (logged below).
5616 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5617
5618 The gettext version checking is causing more trouble than it's
5619 curing; remove it. Problem reported by Paul Hilfinger.
5620
5621 * bootstrap: Issue a warning that one can expect a message
5622 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5623 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5624
56252004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5626
5627 Ensure that the C++ compiler used for testing actually works on a
5628 simple test program; if not, skip the C++-related tests. Problem
5629 reported by Vin Shelton in:
5630 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5631
5632 * m4/cxx.m4: New file.
5633 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5634 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5635 * tests/local.at (AT_COMPILE_CXX): Use it.
5636
56372004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5638
5639 * data/glr.c (yylloc): Output this macro even if locations are not
5640 being generated, as the GLR parser needs it even in that case.
5641 Problem reported by Troy A. Johnson
5642 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5643
5644 * configure.ac (AC_INIT): Update to 1.875e.
5645
56462004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5647
5648 * NEWS: Version 1.875d.
5649 * configure.ac (AC_INIT): Likewise.
5650 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5651
5652 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5653 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5654 lalr1.cc runs afoul of the first, and the last two are no longer
5655 supported by GCC 3.4.0.
5656 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5657 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5658
56592004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5660
5661 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5662 unsigned int, for compatibility with latest gnulib hash module.
5663 * src/state.c (state_hash, state_hasher): Likewise.
5664 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5665 * src/uniqstr.c (hash_uniqstr): Likewise.
5666
56672004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5668
5669 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5670
5671 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5672 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5673 character and string literals.
5674 (unexpected_end): New function.
5675 (unexpected_eof): Use it.
5676 (unexpected_newline): New function.
5677 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5678 actions.
5679
5680 * NEWS: Document %expect-rr.
5681
5682 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5683 Fix typo by replacing $1 with $option.
5684 Remove more 'intl'-related files.
5685 Don't DEFUN AM_INTL_SUBDIR twice.
5686
5687 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5688 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5689 strtoul.c.
5690 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5691 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5692 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5693 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5694 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5695 * src/.cvsignore: Add *.output.
5696
5697 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5698 gets copied to the output file.
5699
57002004-04-28 Paul Eggert <eggert@twinsun.com>
5701
5702 Get files from the gnulib and po repositories, instead of relying
5703 on them being in our CVS. Upgrade to latest versions of gnulib
5704 and Automake.
5705
5706 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5707 * bootstrap: Bootstrap from gnulib and po repositories.
5708 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5709 * README-cvs: Document these changes. Remove version numbers from
5710 mentions of build tools, since they change so often. Mention Flex.
5711
5712 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5713 (gl_USE_SYSTEM_EXTENSIONS): Add.
5714 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5715 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5716 does this for us.
5717 (AC_ISC_POSIX): Remove; we no longer support this
5718 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5719 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5720 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5721 Do not check for C89 headers, except for locale.h which is used
5722 by the Yacc library and must port to K&R hosts.
5723 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5724 Do not check for C89 functions, except for setlocale which is
5725 used by the Yacc library.
5726 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5727 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5728 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5729 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5730 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5731 AM_GNU_GETTEXT): Remove; now done by:
5732 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5733 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5734 for us.
5735
5736 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5737 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5738 Define to empty, as gnulib.mk will do the rest for us.
5739 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5740 for us.
5741 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5742 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5743
5744 * src/files.c: Include gnulib's xstrndup.h.
5745
5746 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5747 (REALLOC): Use xnrealloc, for likewise.
5748 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5749 (strnlen, memrchr): Remove decls; functions no longer used.
5750 Include <stpcpy.h>.
5751
5752 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5753 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5754 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5755 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5756 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5757 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5758 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5759 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5760 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5761 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5762 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5763 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5764 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5765 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5766 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5767 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5768 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5769 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5770 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5771 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5772 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5773 Remove, as these files are now generated automatically
5774 by bootstrap or automake.
5775
5776 * po/ChangeLog: Remove: all but one entry was a duplicate
5777 of this file, and I moved that 2000-11-02 entry here.
5778
5779 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5780 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5781 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5782 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5783 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5784 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5785 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5786 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5787 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5788 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5789 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5790 xstrndup.h.
5791 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5792 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5793 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5794 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5795 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5796 * src/.cvsignore: Remove *_.c.
5797
5798
5799 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5800 support it. (The latest stable gzip doesn't.)
5801
58022004-04-27 Paul Eggert <eggert@twinsun.com>
5803
5804 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5805 case, as stos_ is now used by destructors due to the 2004-02-09
5806 change.
5807
5808 Remove more K&R C support.
5809 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5810 * lib/subpipe.c (errno): Remove decl.
5811 Include <stdlib.h> unconditionally.
5812 (EXIT_FAILURE): Remove macro.
5813 * src/complain.c (vfprintf, strerror): Remove.
5814 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5815 unconditionally.
5816 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5817 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5818 (strchr, strspn, memchr): Remove decls.
5819 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5820 unconditionally. Do not declare perror.
5821 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5822 unconditionally.
5823
5824 * src/complain.c (_): Remove useless defn, as system.h defines this.
5825
5826 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5827 with latest obstack.h.
5828 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5829 to procedure types, as obstack.h now does that for us.
5830 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5831
5832 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5833 so that this include file can stand alone.
5834 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5835 does this now. Include subpipe.h first after config.h, to
5836 test whether it can stand alone.
5837
5838 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5839 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5840 unused declaration.
5841
5842 * tests/synclines.at (%union synch line): Put a dummy member in
5843 the union, because empty unions aren't allowed in C. Caught
5844 by GCC 3.4.0.
5845
58462004-04-13 Jim Meyering <jim@meyering.net>
5847
5848 * src/conflicts.c (conflicts_print): Correct format string typo:
5849 use `%%' to produce literal `%'. (trivial change)
5850
58512004-03-30 Paul Eggert <eggert@twinsun.com>
5852
5853 * src/getargs.c (version): Update copyright year to 2004.
5854
5855 * data/c.m4 (b4_int_type): Use 'short int' rather than
5856 'short', and similarly for 'long', 'unsigned', etc.
5857 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5858 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5859 yy_yypstack, yydumpstack): Likewise.
5860 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5861 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5862 Likewise.
5863 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5864 yy_stack_print, yyparse): Likewise.
5865 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5866 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5867 * lib/bitset.c (bitset_print): Likewise.
5868 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5869 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5870 * lib/bitsetv.c (bitsetv_dump): Likewise.
5871 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5872 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5873 Likewise.
5874 * src/LR0.c (allocate_itemsets): Likewise.
5875 * src/gram.h (rule_number, rule): Likewise.
5876 * src/lalr.h (goto_number): Likewise.
5877 * src/nullable.c (nullable_compute): Likewise.
5878 * src/output.c (prepare_rules): Likewise.
5879 * src/relation.c (relation_print, relation_digraph): Likewise.
5880 * src/relation.h (relation_node): Likewise.
5881 * src/state.h (state_number, transitions, errs, reductions,
5882 struct state): Likewise.
5883 * src/symtab.h (symbol_number, struct symbol): Likewise.
5884 * src/tables.c (vector_number, tally, action_number,
5885 default_goto, goto_actions): Likewise.
5886 * tests/existing.at (GNU Cim Grammar): Likewise.
5887 * tests/regression.at (Web2c Actions): Likewise.
5888
5889 * src/output.c (muscle_insert_short_int_table): Renamed from
5890 muscle_insert_short_table. All uses changed.
5891
58922004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5893
5894 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5895 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5896 Add %expect-rr rule.
5897
5898 * src/scan-gram.l: Recognize %expect-rr.
5899
5900 * src/conflicts.h (expected_sr_conflicts): Rename from
5901 expected_conflicts.
5902 (expected_rr_conflicts): Declare.
5903
5904 * src/conflicts.c (expected_sr_conflicts): Rename from
5905 expected_conflicts.
5906 (expected_rr_conflicts): Define.
5907 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5908 for GLR parsers.
5909 Use expected_sr_conflicts in place of expected_conflicts.
5910 Warn if expected_rr_conflicts used in non-GLR parser.
5911
5912 * doc/bison.texinfo: Add documentation for %expect-rr.
5913
59142004-03-08 Paul Eggert <eggert@gnu.org>
5915
5916 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5917 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5918
5919 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5920 in lalr1.cc.
5921 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5922 * src/scan-gram.l (scan_integer): New function.
5923 ({int}): Use it.
5924 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5925 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5926 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5927 Say "long int", not "long", for uniformity with GNU style.
5928
59292004-02-25 Paul Eggert <eggert@twinsun.com>
5930
5931 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5932 compilers. This fixes a problem with Intel's C++ compiler being
5933 chatty, reported by Guido Trentalancia in
5934 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5935
59362004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5937
5938 Support %destructor and merge error locations in lalr1.cc.
5939
5940 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5941 (Parser::stos_): Define unconditionally.
5942 (Parser::destruct_): New method. Generate its body with
5943 b4_yydestruct_generate.
5944 (Parser::error_start_): New attribute.
5945 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5946 token which are discarded.
5947 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5948 error_start_ when erroneous token are discarded.
5949 (Parser::parse) <yyerrlab1>: Compute the location of the error
5950 token so that it covers all the discarded tokens.
5951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5952 it can be called with `%skeleton "lalr1.cc"', and do that.
5953
59542004-02-02 Paul Eggert <eggert@twinsun.com>
5955
5956 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5957 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5958 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5959 There's no need to mention top_builddir since Automake does that
5960 for us.
5961 (INCLUDES): Remove, as Automake says it's obsolescent.
5962 Contents migrated into AM_CPPFLAGS as described above.
5963 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5964
59652004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5966
5967 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5968 (yyreportSyntaxError): Handle case where lookahead token is
5969 YYEMPTY.
5970
59712004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5972
5973 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5974 resulting parsers are compilable with C++.
5975
59762003-12-23 Paul Eggert <eggert@twinsun.com>
5977
5978 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5979 * src/output.c (output_skeleton): Rename local var.
5980 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5981 Bison tokens, as this runs afoul of the 2003-10-07 change that
5982 disallowed NUL bytes in character constants or string literals.
5983
5984 * tests/local.at: Require Autoconf 2.59's Autotest.
5985 * tests/testsuite.at: Don't include local.at, since we now assume
5986 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5987 including it.
5988 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5989 multiple inclusion warnings.
5990
59912003-12-02 Akim Demaille <akim@epita.fr>
5992
5993 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5994 conditions.
5995 From Bruno Haible.
5996
59972003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5998
5999 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6000
60012003-10-07 Paul Eggert <eggert@twinsun.com>
6002
6003 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6004 if testsuite doesn't exist.
6005
6006 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6007 literals, unfortunately.
6008 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6009 Complain about NUL bytes in character constants or string literals.
6010
60112003-10-05 Paul Eggert <eggert@twinsun.com>
6012
6013 * NEWS: Don't document %no-default-prec, as it's still
6014 too experimental.
6015 * doc/bison.texinfo: Document %no-default-prec only if
6016 the defaultprec flag is set. Normally it's not.
6017
60182003-10-04 Paul Eggert <eggert@twinsun.com>
6019
6020 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6021 non-modifiable lvalue, instead of a modifiable one.
6022 * doc/bison.texinfo (Actions): Document that $$ can
6023 be assigned to. Do not claim that $$ and $N are
6024 array element references: user code should not rely on this.
6025
60262003-10-01 Paul Eggert <eggert@twinsun.com>
6027
6028 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6029 (grammar_declaration): Use it.
6030 * src/scan-gram.l: New token %no-default-prec.
6031 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6032 * NEWS, doc/bison.texinfo: Document the above.
6033
60342003-10-01 Akim Demaille <akim@epita.fr>
6035
6036 VCG no longer supports long_straight_phase.
6037
6038 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6039 * src/print_graph.c (print_graph): Adjust.
6040
60412003-09-30 Frank Heckenbach <frank@g-n-u.de>
6042 and Paul Eggert <eggert@twinsun.com>
6043
6044 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6045 Table of Symbols): Document %default-prec.
6046 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6047 (grammar_declaration): Set default_prec on %default-prec.
6048 * src/scan-gram.l (%default-prec): New token.
6049 * src/reader.h (default_prec): New flag.
6050 * src/reader.c: Likewise.
6051 (packgram): Handle it.
6052 * tests/conflicts.at (%default-prec without %prec,
6053 %default-prec with %prec, %default-prec 1): New tests.
6054
60552003-09-30 Paul Eggert <eggert@twinsun.com>
6056
6057 * tests/testsuite.at: Include local.at, not input.at, fixing
6058 a typo in the 2003-08-25 patch.
6059
60602003-08-27 Akim Demaille <akim@epita.fr>
6061
6062 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6063 GCC warnings.
6064
60652003-08-26 Akim Demaille <akim@epita.fr>
6066
6067 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6068 "<\#" to avoid magic from Gnus when posting parts of this script.
6069
60702003-08-26 Akim Demaille <akim@epita.fr>
6071
6072 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6073 (Parser::parse): here.
6074 Adjust: nerrs and errstatus is now replaced by...
6075 (Parser::nerrs_, Parser::errstatus_): New.
6076
60772003-08-25 Akim Demaille <akim@epita.fr>
6078
6079 * config/announce-gen, Makefile.cfg: New.
6080 * Makefile.am: Adjust.
6081 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6082 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6083
60842003-08-25 Akim Demaille <akim@epita.fr>
6085
6086 When reducing initial empty rules, Bison parser read an initial
6087 location that is not defined. This results in garbage, and that
6088 affects Bison's own parser. Therefore we need (i) to extend Bison
6089 to support a means to initialize this location, and (ii) to use
6090 this CVS Bison to fix CVS Bison's parser.
6091
6092 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6093 with...
6094 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6095 * src/parse-gram.y: Adjust.
6096 (%initial-action): New.
6097 (%error-verbose): Since we require CVS Bison, there is no reason
6098 not to use it.
6099 * src/scan-gram.l: Adjust.
6100 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6101 * data/yacc.c (yyparse): Use b4_initial_action.
6102
61032003-08-25 Akim Demaille <akim@epita.fr>
6104
6105 * doc/bison.texinfo: Don't promote stdout for error messages.
6106
61072003-08-25 Akim Demaille <akim@epita.fr>
6108
6109 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6110 From Alexandre Duret-Lutz.
6111
61122003-08-25 Akim Demaille <akim@epita.fr>
6113
6114 Version 1.875c.
6115
61162003-08-25 Akim Demaille <akim@epita.fr>
6117
6118 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6119 Use them.
6120
61212003-08-25 Akim Demaille <akim@epita.fr>
6122
6123 * data/lalr1.cc (Parser::reduce_print_): New.
6124 Use it.
6125
61262003-08-25 Akim Demaille <akim@epita.fr>
6127
6128 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6129 error recovery loops. This patch is based on
6130 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6131 Also, augment the similarity between lalr1.cc and yacc.c.
6132 Note: the locations of error recovery rules are not correct yet.
6133
6134 * data/lalr1.cc: Comment changes to augment the similarity between
6135 lalr1.cc and yacc.c.
6136 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6137 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6138 yyerrlab), when hitting EOF, pop the whole stack here instead of
6139 merely falling thru the default error handling mechanism.
6140 (yyerrorlab): New label, with the old contents of YYERROR,
6141 plus the following change: pop the stack of rhs corresponding
6142 to the production that invoked YYERROR. That is how Yacc
6143 behaves (required by POSIX).
6144 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6145 fail.
6146
61472003-08-25 Akim Demaille <akim@epita.fr>
6148
6149 Tune local.at so that people can "autom4te -l autotest calc.at -o
6150 calc" for instance, to extract a sub test suite.
6151
6152 * tests/testsuite.at: Move the initialization, Autotest version
6153 requirement, and AT_TESTED invocation into...
6154 * tests/local.at: here.
6155 * tests/testsuite.at: Include it for compatibility with Autoconf
6156 2.57.
6157 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6158 be ignore.
6159
61602003-08-04 Paul Eggert <eggert@twinsun.com>
6161
6162 Rework code slightly to avoid gcc -Wtraditional warnings.
6163 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6164 The returned value is now stored in *YY0. All callers changed.
6165 * src/output.c (merge_output): Adjust to the above change.
6166
61672003-07-26 Paul Eggert <eggert@twinsun.com>
6168
6169 * data/glr.c (YYASSERT): New macro.
6170 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6171 yyresolveStates, yyprocessOneStack):
6172 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6173 Derived from a suggestion by Frank Heckenbach.
6174
61752003-07-25 Paul Eggert <eggert@twinsun.com>
6176
6177 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6178 for portability to K&R C (after ansi2knr, presumably). See
6179 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6180 by Frank Heckenbach, though I have omitted the structure-initialization
6181 part of his glr-knr.diff patch since I recall that the Portable
6182 C Compiler didn't require that change.
6183
6184 Let the user specify how to allocate and free memory.
6185 Derived from a suggestion by Frank Heckenbach in
6186 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6187 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6188 All uses of free, malloc, realloc changed to use these macros,
6189 and unnecessary casts removed.
6190 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6191
61922003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6193
6194 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6195 use s.empty() rather than s == "" to test for empty string; see
6196 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6197 (trivial change)
6198
61992003-06-25 Akim Demaille <akim@epita.fr>
6200
6201 * config/depcomp, config/install-sh: Update from masters.
6202
62032003-06-20 Paul Eggert <eggert@twinsun.com>
6204
6205 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6206 and return properly parenthesized result.
6207 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6208 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6209 Remove unnecessary parentheses from uses.
6210 * doc/bison.texinfo (Location Default Action): Describe the
6211 conventions for parentheses.
6212
62132003-06-19 Paul Eggert <eggert@twinsun.com>
6214
6215 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6216 yyreportTree): Do not assume that size_t is the same width as int,
6217 when printing sizes. Print sizes using an unsigned format.
6218 Problem reported by Frank Heckenbach in
6219 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6220
6221 Port to Forte Developer 7 C compiler.
6222 * data/glr.c (struct YYLTYPE): If locations are not being used,
6223 declare a single dummy member, as empty structs do not conform
6224 to the C standard.
6225 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6226 the Forte Developer 7 C compiler complains that end-of-loop
6227 code is not reached.
6228
62292003-06-17 Paul Eggert <eggert@twinsun.com>
6230
6231 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6232 avoid warnings from picky compilers about redefinition of PARAMS.
6233
62342003-06-17 Paul Eggert <eggert@twinsun.com>
6235
6236 Version 1.875b.
6237
6238 * NEWS: Document 1.875b.
6239
6240 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6241 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6242 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6243 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6244 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6245 per recent gettext manual's suggestion.
6246 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6247 Use prototypes, not old-style definitions.
6248 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6249 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6250 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6251 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6252 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6253 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6254 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6255 vbitset_or_and_cmp, vbitset_copy): Likewise.
6256
6257 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6258 Do not include <stdlib.h>.
6259 (PARAMS): Define unconditionally for C89.
6260 (ATTRIBUTE_NORETURN): Remove.
6261 (ATTRIBUTE_UNUSED): Define unconditionally.
6262
6263 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6264 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6265 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6266 * lib/vbitset.c, lib/vbitset.h: New files.
6267 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6268 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6269 from libbitset.
6270
6271 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6272 `How Can I Reset @code{yyparse}', since texinfo does not allow
6273 arbitrary @ in node names.
6274
6275 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6276 shouldn't be needed according to the gettext 0.12.1 documentation
6277 but which seem to be needed anyway: codeset.m4 glibc21.m4
6278 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6279 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6280 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6281
6282 * lib/.cvsignore: Add stdbool.h.
6283 * m4/.cvsignore: Add nls.m4, po.m4.
6284
6285 Upgrade to CVS gnulib.
6286 * stdbool_.h: File renamed from stdbool.h.in.
6287 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6288 AC_HEADER_STDBOOL.
6289 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6290 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6291 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6292 (MOSTLYCLEANFILES): New var.
6293 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6294 (stdbool.h): New rule.
6295 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6296 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6297 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6298 m4/quote.m4: Upgrade to today's gnulib.
6299
6300 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6301 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6302 the tests right now.
6303 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6304 yyerror are declared before use; C99 requires this.
6305
63062003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6307
6308 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6309 first.
6310 (yyrecoverSyntaxError): Correct the logic for setting and testing
6311 yyerrState.
6312 Correct comment on handling EOF.
6313 Allow states with only a default reduction, rather than failing
6314 (I can't quite reconstruct why these were not allowed before).
6315
6316 Fixes to avoid problem that $-N rules in GLR parsers can cause
6317 buffer overruns, corrupting state.
6318
6319 * src/output.c (prepare_rules): Output max_left_semantic_context
6320 definition.
6321 * src/reader.h (max_left_semantic_context): New variable declaration.
6322 * src/scan-gram.l (max_left_semantic_context): Define.
6323 (handle_action_dollar): Update max_left_semantic_context.
6324 * data/glr.c (YYMAXLEFT): New definition.
6325 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6326 (yyresolveAction): Ditto.
6327
6328 Fixes to problems with location handling in GLR parsers reported by
6329 Frank Heckenbach (2003/06/05).
6330
6331 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6332 (YYRHSLOC): Add parentheses, and define only if locations used.
6333 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6334 locations not used.
6335 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6336 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6337
6338 * tests/cxx-type.at: Exercise location information; update tests
6339 to differentiate output with and without locations.
6340 Remove forward declarations of yylex and yyerror---caused errors
6341 because default YYLTYPE not yet defined.
6342 Change semantic actions to compute strings, rather than printing
6343 them directly (to test proper passing of semantics values). Change
6344 output to prefix notation and update test data and expected results.
6345 (yylex): Track locations.
6346 (stmtMerge): Return value rather than printing, and include arguments
6347 in value.
6348
63492003-06-03 Paul Eggert <eggert@twinsun.com>
6350
6351 Avoid warnings generated by GCC 2.95.4 when Bison is
6352 configured with --enable-gcc-warnings.
6353 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6354 yy::]b4_parser_class_name[::translate_,
6355 yy::Stack::operator[] (unsigned),
6356 yy::Stack::operator[] (unsigned) const,
6357 yy::Slice::operator[] (unsigned),
6358 yy::Slice::operator[] (unsigned) const):
6359 Rename local vars to avoid warnings.
6360 * tests/glr-regression.at (Improper handling of embedded actions
6361 and $-N in GLR parsers): Remove unused local variable from yylex.
6362 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6363 (void) as arg when not pure, since we now assume C89 when building
6364 Bison. Pacify GCC by using parameter.
6365
63662003-06-02 Paul Eggert <eggert@twinsun.com>
6367
6368 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6369 yy::Location::lines, yy::Location::columns): Rename arguments
6370 to avoid shadowing; this removes a warning generated by GCC 3.3.
6371
63722003-06-01 Paul Eggert <eggert@twinsun.com>
6373
6374 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6375 to g++, as GCC 3.3 complains if you do it.
6376 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6377 everything that WARNING_CFLAGS has, except omit warnings
6378 not suitable for C++.
6379 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6380 * tests/atlocal.in (CXXFLAGS): New var.
6381 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6382
6383 Fix a GLR parser bug I reported in February; see
6384 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6385 The problem was that GLR parsers did not conform to the C standard,
6386 because actions like { $1 = $2 + $3; } expanded to expressions
6387 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6388 to a local variable. The C standard says that expressions
6389 like (var = f ()) + (var = f ()) have undefined behavior.
6390 Another problem was that GCC sometimes issues warnings that
6391 yyfill and its parameters are unused.
6392
6393 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6394 as possibly unused.
6395 (yyfill): New function.
6396 (YYFILL): Use it.
6397 (yyuserAction): Change type of yynormal to bool, so that it matches
6398 the new yyfill signature. Mark it as possibly unused.
6399
6400
6401 Follow up on a bug I reported in February, where a Bison-generated
6402 parser can loop. Provide a test case and a fix for yacc.c. I
6403 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6404 The original bug report is in:
6405 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6406
6407 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6408 macro's size was becoming unwieldy.
6409 (yyerrlab): Do not discard an empty lookahead symbol, as this
6410 might destroy garbage.
6411 (yyerrorlab): New label, with the old contents of YYERROR,
6412 plus the following change: pop the stack of rhs corresponding
6413 to the production that invoked YYERROR. That is how Yacc
6414 behaves, and POSIX requires this behavior.
6415 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6416 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6417 Define 'alarm' to do nothing if unistd.h is not available.
6418 Add a new rule "exp: '-' error;" to test the above change to
6419 data/yacc.c. Use 'alarm' to abort any test taking longer than
6420 10 seconds, as it's probably looping.
6421 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6422 Also, the new yacc.c generates two fewer diagnostics for an
6423 existing test.
6424
64252003-05-24 Paul Eggert <eggert@twinsun.com>
6426
6427 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6428 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6429 This fixes a problem reported by John Bowman when the Compaq/HP
6430 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6431 -ansi -Wall -gall).
6432 * data/yacc.c (union yyalloc): Likewise.
6433 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6434
6435 Switch from 'int' to 'bool' where that makes sense.
6436
6437 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6438 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6439 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6440 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6441 Return or accept bool, not int. All callers changed.
6442 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6443 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6444 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6445 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6446 bitset_or_and_cmp_): Likewise.
6447 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6448 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6449 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6450 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6451 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6452 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6453 bitset_stats_or_and_cmp): Likewise.
6454 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6455 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6456 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6457 ebitset_xor_cmp): Likewise.
6458 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6459 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6460 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6461 lbitset_xor_cmp): Likewise.
6462 * lib/bbitset.h: Include <stdbool.h>.
6463 (struct bitset_vtable): The following members now return bool, not
6464 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6465 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6466 or_and_cmp).
6467 * src/conflicts.c (count_rr_conflicts): Likewise.
6468 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6469 All uses changed.
6470 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6471 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6472 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6473 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6474 graph_flag): Likewise.
6475 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6476 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6477 graph_flag): Likewise.
6478 * src/output.c (error_verbose): Likewise.
6479 * src/output.h (error_verbose): Likewise.
6480 * src/reader.c (start_flag, typed): Likewise.
6481 * src/reader.h (typed): Likewise.
6482 * src/getargs.c (LOCATIONS_OPTION): New constant.
6483 (long_options, getargs): Use it.
6484 * src/lalr.c (build_relations): Use bool, not int.
6485 * src/nullable.c (nullable_compute): Likewise.
6486 * src/print.c (print_reductions): Likewise.
6487 * src/tables.c (action_row, pack_vector): Likewise.
6488 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6489 * src/output.c (prepare): Use it.
6490 * src/output.c (token_definitions_output,
6491 symbol_destructors_output, symbol_destructors_output): Use string,
6492 not boolean integer, to keep track of whether to output separator.
6493 * src/print_graph.c (print_core): Likewise.
6494 * src/state.c (state_rule_lookaheads_print): Likewise.
6495
6496 * config/install-sh: Sync from automake 1.7.5.
6497
64982003-05-14 Paul Eggert <eggert@twinsun.com>
6499
6500 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6501 semicolon after a grammar declaration, in the interest of possible
6502 future changes to the Bison input language.
6503 Do not allow a stray semicolon at the start of the grammar.
6504 (rhses.1): Allow one or more semicolons after any rule, including
6505 just before "|" as required by POSIX.
6506 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6507 grammar.
6508
65092003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6510
6511 %parse-param support for lalr1.cc.
6512
6513 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6514 b4_cc_constructor_calls, b4_cc_constructor_call,
6515 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6516 definitions.
6517 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6518 parse-param arguments.
6519 (yy::b4_parser_class_name): Declare instance variables to
6520 hold parse-param arguments.
6521 * tests/calc.at: s/value/semantic_value/ because value clashes
6522 with a member of yy::b4_parser_class_name. Adjust C++ code
6523 to handle %parse-param. Enable %parse-param test in C++.
6524
65252003-05-12 Paul Eggert <eggert@twinsun.com>
6526
6527 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6528 English a bit. Fix fclose typo. Change "const char" to "char
6529 const", and use ANSI C rather than K&R for "main". Suggest
6530 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6531 and suggest yy_switch_to_buffer.
6532
65332003-05-05 Paul Eggert <eggert@twinsun.com>
6534
6535 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6536 C89. This avoids a diagnostic on compilers that define __STDC__
6537 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6538 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6539
65402003-05-03 Paul Eggert <eggert@twinsun.com>
6541
6542 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6543 Do not overrun array bounds.
6544 This should fix a bug reported today by Olatunji Oluwabukunmi in
6545 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6546
65472003-04-29 Akim Demaille <akim@epita.fr>
6548
6549 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6550 * src/getargs.c, src/getargs.h: here, as bool, not int.
6551 (nondeterministic_parser): New.
6552 * src/parse-gram.y, src/scan-gram.l: Support
6553 %nondeterministic-parser.
6554 * src/output.c (prepare): Use nondeterministic_parser instead
6555 of glr_parser where appropriate.
6556 * src/tables.c (conflict_row, action_row, save_row)
6557 (token_actions, token_actions, pack_vector): Ditto.
6558
65592003-04-29 Akim Demaille <akim@epita.fr>
6560
6561 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6562
65632003-04-29 Akim Demaille <akim@epita.fr>
6564
6565 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6566 with %pure-parser and %locations to exercise the patch from Yakov
6567 Markovitch below.
6568
65692003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6570
6571 * data/yacc.c: (b4_lex_param): Corrected for the case where
6572 %lex-param is provided and %pure-parser isn't.
6573
65742003-04-27 Paul Eggert <eggert@twinsun.com>
6575
6576 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6577 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6578 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6579 if it is not defined.
6580 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6581
65822003-04-26 Paul Eggert <eggert@twinsun.com>
6583
6584 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6585 Declare to be of type suitable for the ninf value itself, not of
6586 type suitable for the corresponding table, since the latter might
6587 be unsigned but the ninf value might be negative. This fixes a
6588 bug reported by Alexandre Duret-Lutz in
6589 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6590
6591 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6592 invokes it. We shouldn't invoke it twice because it will attempt
6593 to put error.o in the archive twice. This fixes a glitch reported
6594 by Martin Mokrejs in
6595 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6596
65972003-04-21 Paul Eggert <eggert@twinsun.com>
6598
6599 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6600 to gnulib.
6601
66022003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6603
6604 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6605 Fix obvious typo that results in uncompilable GLR parsers
6606 when both %pure-parser and %locations are used. (trivial change)
6607
66082003-04-17 Paul Eggert <eggert@twinsun.com>
6609
6610 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6611 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6612 Do not insert the expected token via unput, as this runs afoul
6613 of a POSIX-compatibility bug in flex 2.5.31.
6614 All uses changed to BEGIN the parent state,
6615 since we no longer insert the expected token via unput.
6616 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6617 that is no longer emitted after the above change.
6618
6619 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6620 the first one. This change is from Paul Hilfinger, and it fixes
6621 regression reported by Werner Lemberg in
6622 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6623
6624 (resolve_sr_conflict): Don't invoke state_errs_set
6625 unless one or more tokens have been explicitly made errors.
6626 Otherwise, the above change causes Bison to abort.
6627
6628 * tests/existing.at (GNU pic Grammar): New test case, taken from
6629 Lemberg's email.
6630
66312003-03-31 Akim Demaille <akim@epita.fr>
6632
6633 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6634
66352003-03-31 Akim Demaille <akim@epita.fr>
6636
6637 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6638 output.
6639
66402003-03-31 Akim Demaille <akim@epita.fr>
6641
6642 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6643 From Paul Hilfinger.
6644
66452003-03-29 Akim Demaille <akim@epita.fr>
6646
6647 * m4/error.m4: Do not put under dynamic conditions some code which
6648 expansion is under static control.
6649
66502003-03-29 Akim Demaille <akim@epita.fr>
6651
6652 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6653
66542003-03-29 Akim Demaille <akim@epita.fr>
6655
6656 * doc/bison.texinfo (Strings are Destroyed): New.
6657
66582003-03-13 Paul Eggert <eggert@twinsun.com>
6659
6660 * .cvsignore: Add configure.lineno.
6661 * src/.cvsignore: Add yacc.
6662 * tests/.cvsignore: Add testsuite.log.
6663 * doc/fdl.texi: Sync with latest FSF version.
6664
66652003-03-12 Paul Eggert <eggert@twinsun.com>
6666
6667 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6668 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6669 cursor, instead of leaving it undefined. This fixes a bug
6670 reported by Tim Van Holder in
6671 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6672 * tests/input.at (Torturing the Scanner): Test the scanner on
6673 an empty input file, which was Tim Van Holder's test case.
6674
6675 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6676 <sys/resource.h> can be included, include sys/time.h and
6677 sys/times.h first, if available. This works around the SunOS
6678 4.1.4 porting bug reported by Bruce Becker in
6679 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6680
6681 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6682 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6683 AC_HEADER_SYS_WAIT.
6684
6685 Merge changes from gnulib. This was prompted because the CVS
6686 snapshot didn't build on Solaris 7 due to strnlen problems.
6687
6688 These changes need to be merged back into gnulib:
6689 * lib/hash.c: Include <stdbool.h> unconditionally.
6690 * m4/onceonly.m4 (m4_quote): New macro.
6691 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6692 Quote AC_FOREACH variable-expansions properly.
6693 The 2003-01-03 obstack.h change also needs merging.
6694 {end of changes requiring merging}
6695
6696 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6697 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6698 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6699 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6700 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6701 New files, imported from gnulib.
6702 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6703 above.
6704
6705 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6706 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6707 gnulib sources.
6708
6709 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6710 Add.
6711 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6712 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6713 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6714 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6715 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6716 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6717 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6718 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6719 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6720 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6721 (jm_PREREQ_ARGMATCH): Remove.
6722 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6723 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6724
6725 * src/system.h: Include <stdbool.h> unconditionally.
6726
6727 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6728 assuming at least C89 in the bitset code for some time now.
6729
67302003-03-03 Akim Demaille <akim@epita.fr>
6731
6732 * ro.po: New.
6733
67342003-03-02 Akim Demaille <akim@epita.fr>
6735
6736 * doc/bison.texinfo (Table of Symbols): Reactivate the
6737 documentation for %lex-param, and %parse-param.
6738
67392003-03-02 Akim Demaille <akim@epita.fr>
6740
6741 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6742 generate verbose error messages.
6743 Use the number of tokens as an upper bound in yytname, as it
6744 cannot be a non terminal.
6745
67462003-03-02 Akim Demaille <akim@epita.fr>
6747
6748 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6749 message.
6750
67512003-03-02 Akim Demaille <akim@epita.fr>
6752
6753 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6754 Use them to exercise yycheck overrun.
6755 Based on Andrew Suffield's grammar.
6756
67572003-03-02 Akim Demaille <akim@epita.fr>
6758
6759 Create tests/local.at for Bison generic testing macros.
6760
6761 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6762 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6763 This new file.
6764 * tests/calc.at (AT_CHECK_CALC): Adjust.
6765 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6766 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6767 * tests/local.at: here.
6768 (AT_COMPILE_CXX): Tags the tests using it as c++.
6769 Ignore the test if CXX is not functional.
6770
67712003-03-01 Paul Eggert <eggert@twinsun.com>
6772
6773 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6774 not loc->end, since loc->end might contain garbage and this leads
6775 to undefined behavior on some platforms.
6776 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6777 depend on *loc, so that the reader doesn't give the the false
6778 impression that *loc is initialized.
6779 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6780 does not survive the return.
6781
67822003-03-01 Akim Demaille <akim@epita.fr>
6783
6784 * src/scan-gram.l (code_start): Always initialize it when entering
6785 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6786 yylex invocation. An alternative would be making it static, but
6787 then it starts with the second %%'s beginning, instead of its end.
6788
67892003-02-28 Paul Eggert <eggert@twinsun.com>
6790
6791 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6792 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6793 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6794
67952003-02-26 Paul Eggert <eggert@twinsun.com>
6796
6797 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6798 Remove Sequent/Pyramid discussion (nobody uses them any more).
6799 Merge VMS and MS-DOS discussion; these ports may well be dead
6800 but let's keep mentioning them for now. Put <> around email
6801 addresses. Add copyright notice.
6802
68032003-02-24 Paul Eggert <eggert@twinsun.com>
6804
6805 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6806 to avoid collision with flex use of yylineno.
6807 Problem reported by Bruce Lilly in
6808 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6809 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6810 * data/yacc.c (yy_reduce_print): Likewise.
6811
6812 * config/depcomp: Sync with Automake 1.7.3.
6813
68142003-02-21 Akim Demaille <akim@epita.fr>
6815
6816 * data/lalr1.cc: Use temporary variables instead of casts to
6817 change integer types.
6818 Suggested by Paul Eggert.
6819
68202003-02-21 Akim Demaille <akim@epita.fr>
6821
6822 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6823 to avoid confusions with lalr1.cc's notion of Position.
6824 Suggested by Paul Eggert.
6825
68262003-02-20 Akim Demaille <akim@epita.fr>
6827
6828 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6829 before initial_columns.
6830 (location.hh): Use consistent variable names when defining the
6831 operator<<.
6832 Use "last" so that we subtract from Positions, not from unsigned.
6833
68342003-02-20 Akim Demaille <akim@epita.fr>
6835
6836 * data/lalr1.cc (position.hh): New subfile, including the extended
6837 and Doxygen'ed documentation of class Position.
6838 (location.hh): Use it.
6839 Document a` la Doxygen.
6840 With the help of Benoit Perrot.
6841
68422003-02-20 Akim Demaille <akim@epita.fr>
6843
6844 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6845 AT_YACC_IF.
6846 Redefine AT_YYERROR_SEES_LOC_IF using it.
6847 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6848 not defined.
6849 Don't use the location in yy::Parser::error_ and
6850 yy::Parser::print_ when not %locations.
6851 Activate more lalr1.cc tests.
6852
68532003-02-19 Akim Demaille <akim@epita.fr>
6854
6855 * data/lalr1.cc: When displaying a line number, be sure to make it
6856 an int.
6857
68582003-02-19 Akim Demaille <akim@epita.fr>
6859
6860 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6861 Remove, useless.
6862 (YYABORT, YYACCEPT, YYERROR): New.
6863 * tests/calc.at: Renable the lalr1.cc test.
6864
68652003-02-19 Akim Demaille <akim@epita.fr>
6866
6867 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6868 error recovery, mixing with/without pops and discarding of the
6869 lookahead.
6870 Exercise YYERROR.
6871 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6872
68732003-02-17 Paul Eggert <eggert@twinsun.com>
6874
6875 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6876 * tests/testsuite.at (AT_COMPILE): Use them.
6877 This fixes the testsuite problem reported by Robert Lentz in
6878 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6879
68802003-02-12 Paul Eggert <eggert@twinsun.com>
6881
6882 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6883 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6884 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6885 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6886 Check for malloc failure, for consistency with yacc.c.
6887 (yytname_size): Remove, for consistency with yacc.c.
6888
6889 The bug still remains in data/lalr1.cc, as I didn't have time
6890 to fix it there.
6891
68922003-02-06 Akim Demaille <akim@epita.fr>
6893
6894 * configure.ac (GXX): Rename as...
6895 (CXX): this, to keep the original Autoconf semantics.
6896 Require 2.57.
6897 * data/lalr1.cc: Fix b4_copyright invocations.
6898 If YYDEBUG is not defined, don't depend upon name_ being defined.
6899 (location.hh): Include string and iostream.
6900 (Position::filename): New member.
6901 (Position::Position ()): New.
6902 (operator<< (Position)): New.
6903 (operator- (Position, int)): New.
6904 (Location::first, Location::last): Rename as...
6905 (Location::begin, Location::end): these, to mock the conventional
6906 iterator names.
6907 (operator<< (Location)): New.
6908 * tests/atlocal.in (CXX): New.
6909 * tests/testsuite.at (AT_COMPILE_CXX): New.
6910 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6911 locations in a more synthetic way.
6912 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6913 lalr1.cc is used.
6914 Adjust the C locations to match those from Emacs: first column is
6915 column 0.
6916 Change all the expected results.
6917 Conform to the GCS: simplify the locations when applicable.
6918 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6919 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6920 these CPP macros with the m4 macros new defined by...
6921 (AT_CHECK_PUSHDEFS): this, i.e.:
6922 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6923 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6924 New macros.
6925 (AT_CHECK_POPDEFS): Undefine them.
6926 (AT_CHECK_CALC_LALR1_CC): New.
6927 Use it for the first lalr1.cc test.
6928
69292003-02-04 Akim Demaille <akim@epita.fr>
6930
6931 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6932 Location as is defined.
6933
69342003-02-04 Akim Demaille <akim@epita.fr>
6935
6936 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6937 name_ being defined.
6938
69392003-02-03 Paul Eggert <eggert@twinsun.com>
6940
6941 * src/gram.h (start_symbol): Remove unused decl.
6942
6943 Use more-consistent naming conventions for local vars.
6944
6945 * src/derives.c (derives_compute): Change type of local var from
6946 int to rule_number.
6947 * src/gram.c (grammar_rules_partial_print): Likewise.
6948 * src/print.c (print_core): Likewise.
6949 * src/reduce.c (reduce_grammar_tables): Likewise.
6950
6951 * src/gram.c (grammar_dump): Change name of item_number *
6952 local var from r to rp.
6953 * src/nullable.c (nullable_compute): Likewise.
6954
6955 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6956
6957 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6958 for symbol or symbol_number var.
6959 * src/reader.c (grammar_start_symbol_set): Likewise.
6960 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6961 Likewise.
6962 * src/state.c (transitions_to): Likewise.
6963 * src/state.h: Likewise.
6964 * src/tables.c (symbol_number_to_vector_number): Likewise.
6965
6966 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6967 char * var.
6968
6969 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6970 var.
6971
6972 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6973 var.
6974
6975 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6976 Use str, not s, for char * var. Use ch, not c, for character var.
6977 Use size for size var.
6978
6979 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6980 char * var.
6981 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6982 uniqstr var.
6983 * src/uniqstr.h: Likewise.
6984
6985 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6986 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6987 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6988 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6989 param to have same name as that of enum, so that we don't use
6990 "s" to stand for a non-state.
6991
69922003-02-02 Akim Demaille <akim@epita.fr>
6993
6994 * src/scan-skel.l: Scan more than one inert character per yylex
6995 invocation.
6996
69972003-02-01 Paul Eggert <eggert@twinsun.com>
6998
6999 Version 1.875a.
7000
7001 * po/LINGUAS: Add ms.
7002
70032003-01-30 Akim Demaille <akim@epita.fr>
7004
7005 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7006
70072003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7008
7009 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7010 of $1.
7011
7012 Changes in response to error report by S. Eken: GLR mode does not
7013 handle negative $ indices or $ indices in embedded rules correctly.
7014 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7015
7016 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7017 (b4_rhs_location): Ditto.
7018 (yyfill): New function to copy from stack tree into array
7019 incrementally.
7020 (yyuserAction): Modify to allow incremental move of semantic values
7021 to rhs array when in GLR mode.
7022 Define YYFILL to use in user-defined actions to fill semantic array
7023 as needed.
7024 Remove dummy use of yystack, as there is now a guaranteed use.
7025 (yydoAction): Modify to allow incremental move of semantic values
7026 to rhs array when in GLR mode.
7027 (yyresolveAction): Ditto.
7028 (yyglrShiftDefer): Update comment.
7029 (yyresolveStates): Use X == NULL for pointers, not !X.
7030 (yyglrReduce): Ditto.
7031 (yydoAction): Ditto
7032
7033 * tests/glr-regr1.at: Rename to ...
7034 * tests/glr-regression.at: Add new regression test for the problems
7035 described above (adapted from S. Eken).
7036 Update copyright notice.
7037 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7038 * tests/Makefile.am: Ditto.
7039
70402003-01-28 Paul Eggert <eggert@twinsun.com>
7041
7042 * data/lalr1.cc: Do not use @output_header_name@ unless
7043 b4_defines_flag is set. This fixes two bugs reported by
7044 Tim Van Holder in
7045 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7046 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7047
70482003-01-21 Paul Eggert <eggert@twinsun.com>
7049
7050 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7051 we don't need to worry about yyerrlab1 being reported as an
7052 "unused label" by non-GCC C compilers. The downside is that if
7053 locations are used then a couple of statements are duplicated each
7054 time YYERROR is invoked, but the upside is that the warnings
7055 should vanish.
7056 (yyerrlab1): Move code to YERROR.
7057 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7058 This reverts some of the 2002-12-27 change.
7059
70602003-01-17 Paul Eggert <eggert@twinsun.com>
7061
7062 * src/output.c (symbol_printers_output): Fix typo that led
7063 to core dump. Problem reported by Antonio Rus in
7064 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7065
70662003-01-13 Akim Demaille <akim@epita.fr>,
7067 Quoc Peyrot <chojin@lrde.epita.fr>,
7068 Robert Anisko <anisko_r@lrde.epita.fr>
7069
7070 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7071 when the stacks contain one element, as the loop would otherwise
7072 free the last state, and then use the top state (the one we just
7073 popped). This means that the initial elements will not be freed
7074 explicitly, as is the case in yacc.c; it is not a problem, as
7075 these elements have fake values.
7076
70772003-01-11 Paul Eggert <eggert@twinsun.com>
7078
7079 * NEWS: %expect-violations are now just warnings, reverting
7080 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7081 bootstrapping problem reported by Matthias Klose; see
7082 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7083 * src/conflicts.c (conflicts_print): Likewise.
7084 * tests/conflicts.at (%expect not enough, %expect too much,
7085 %expect with reduce conflicts): Likewise.
7086 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7087 that the warning is enabled if the number of conflicts changes
7088 (not necessarily increases).
7089
7090 * src/getargs.c (version): Update copyright year.
7091
70922003-01-09 Akim Demaille <akim@epita.fr>
7093
7094 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7095
70962003-01-08 Paul Eggert <eggert@twinsun.com>
7097
7098 * Makefile.maint (WGETFLAGS):
7099 New macro, containing "-C off" to disable proxy caches.
7100 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7101 (rel-check): Use $(WGET) instead of wget.
7102
71032003-01-06 Paul Eggert <eggert@twinsun.com>
7104
7105 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7106 the GLR paper of Scott, Johnstone and Hussain.
7107
71082003-01-04 Paul Eggert <eggert@twinsun.com>
7109
7110 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7111 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7112 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7113 (EXTRA_LIBRARIES): New var, for liby.a.
7114 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7115 (EXTRA_SCRIPTS): New var, for yacc.
7116
7117 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7118 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7119 Problem reported by Nelson H. F. Beebe.
7120
71212003-01-03 Paul Eggert <eggert@twinsun.com>
7122
7123 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7124 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7125 when compiling Bison 1.875's `bitset bset = obstack_alloc
7126 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7127
7128 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7129 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7130 grow to a huge size with typical invocation.
7131
7132 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7133 Use the pattern recommended by Autoconf 2.57, except also protect
7134 against double-definition.
7135 * src/system.h: Likewise.
7136 Portability issues reported by Nelson H. F. Beebe.
7137
7138 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7139 All uses changed. Provide a definition in both C and C++.
7140 (yytrue, yyfalse): Define even if defined (__cplusplus).
7141
7142 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7143 Reported by Nelson H. F. Beebe.
7144
7145 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7146
71472003-01-02 Paul Eggert <eggert@twinsun.com>
7148
7149 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7150 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7151 Bug reported by Nelson H. F. Beebe.
7152
71532003-01-01 Paul Eggert <eggert@twinsun.com>
7154
7155 * Version 1.875.
7156
71572002-12-30 Paul Eggert <eggert@twinsun.com>
7158
7159 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7160 Moved here from...
7161 (<INITIAL>","): Here. This causes stray "," to be treated
7162 more uniformly.
7163
7164 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7165 last brace in braced code when not in Yacc mode, for compatibility
7166 with Bison 1.35. This resurrects the 2001-12-15 patch to
7167 src/reader.c.
7168
7169 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7170 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7171
71722002-12-28 Paul Eggert <eggert@twinsun.com>
7173
7174 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7175 that of SYM's type. This fixes Debian bug 168069, reported by
7176 Thomas Olsson.
7177
71782002-12-28 Paul Eggert <eggert@twinsun.com>
7179
7180 Version 1.75f.
7181
7182 Switch back to the Yacc style of conflict reports, undoing some
7183 of the 2002-07-30 change.
7184 * doc/bison.texinfo (Understanding): Use Yacc style for
7185 conflict reports. Also, use new way of locating rules.
7186 * src/conflicts.c (conflict_report):
7187 Renamed from conflict_report_yacc, removing the old
7188 'conflict_report'. Translate the entire conflict report at once,
7189 so that we don't assume that "," has the same interpretation in
7190 all languages.
7191 (conflicts_output): Use Yacc-style conflict report for each state,
7192 instead of our more-complicated style.
7193 (conflicts_print): Use Yacc-style conflict report, except print
7194 the input file name when not emulating Yacc.
7195 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7196 Conflicted Reduction, %expect not enough, %expect too much,
7197 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7198 * tests/existing.at (GNU Cim Grammar): Likewise.
7199 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7200
7201 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7202 fatal): Don't invoke fflush; it's not needed and it might even be
7203 harmful for stdout, as stdout might not be open.
7204 * src/reduce.c (reduce_print): Likewise.
7205
72062002-12-27 Paul Eggert <eggert@twinsun.com>
7207
7208 Fix a bug where error locations were not being recorded correctly.
7209 This problem was originally reported by Paul Hilfinger in
7210 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7211
7212 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7213 top of the location stack's error locations.
7214 (yyerrlab): Set it. When discarding a token, push its location
7215 onto yylerrsp so that we don't lose track of the error's end.
7216 (yyerrlab1): Now is only the target of YYERROR, so that we can
7217 properly record the location of the action that failed. For GCC
7218 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7219 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7220 (yyerrlab2): New label, which yyerrlab now falls through to.
7221 Compute the error's location by applying YYLLOC_DEFAULT to
7222 the locations of all the symbols that went into the error.
7223 * doc/bison.texinfo (Location Default Action): Mention that
7224 YYLLOC_DEFAULT is also invoked for syntax errors.
7225 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7226 Error locations include the locations of all the tokens that were
7227 discarded, not just the last token.
7228
72292002-12-26 Paul Eggert <eggert@twinsun.com>
7230
7231 * src/files.c: Include quote.h.
7232 (compute_output_file_names): Warn if we detect conflicting
7233 outputs to the same file. This should catch the misunderstanding
7234 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7235
7236 * src/conflicts.c (conflicts_print): If the user specifies
7237 "%expect N", report an error if there are any reduce/reduce
7238 conflicts. This is what the manual says should happen.
7239 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7240 * tests/conflicts.at (%expect with reduce conflicts): New test.
7241
7242 Don't use m4_include on relative file names, as it doesn't work as
7243 desired if there happens to be a file with that name under ".".
7244
7245 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7246 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7247 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7248 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7249 * src/output.c (output_skeleton): Use full path names when
7250 specifying a file to include; don't rely on include path, as
7251 it's unreliable when the working file contains a file with
7252 that name.
7253
72542002-12-25 Paul Eggert <eggert@twinsun.com>
7255
7256 Remove obsolete references to bison.simple and bison.hairy.
7257 Problem mentioned by Aubin Mahe in
7258 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7259 * data/glr.c: Comment fix.
7260 * doc/bison.1: Remove references. Also, mention "yacc".
7261
7262 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7263 with -g option.
7264
7265 * src/parse-gram.y (declaration): Use enum "report_states" rather
7266 than its numeric value 1.
7267
7268 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7269 opening a new one. This fixes Debian bug 165349, reported by
7270 Bruce Stephens.
7271
72722002-12-24 Paul Eggert <eggert@twinsun.com>
7273
7274 Version 1.75e.
7275
7276 * Makefile.maint (cvs-update): Don't assume that the shell
7277 supports $(...), as Solaris sh doesn't.
7278
7279 * src/parse-gram.y (lloc_default): Remove test for empty
7280 nonterminals at the end, since it didn't change the result.
7281
72822002-12-24 Paul Eggert <eggert@twinsun.com>
7283
7284 If the user does not define YYSTYPE as a macro, Bison now declares it
7285 using typedef instead of defining it as a macro. POSIX requires this.
7286 For consistency, YYLTYPE is also declared instead of defined.
7287
7288 %union directives can now have a tag before the `{', e.g., the
7289 directive `%union foo {...}' now generates the C code
7290 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7291 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7292 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7293 instead of `yyltype'.
7294
7295 `yystype' and `yyltype' are now obsolescent macros instead of being
7296 typedefs or tags; they are no longer documented and will be
7297 withdrawn in a future release.
7298
7299 * data/glr.c (b4_location_type): Remove.
7300 (YYSTYPE): Renamed from yystype.
7301 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7302 (struct YYLTYPE): Renamed from struct yyltype.
7303 (YYLTYPE): Renamed from yyltype.
7304 (yyltype, yystype): New (and obsolescent) macros,
7305 for backward compatibility.
7306 * data/yacc.c: Likewise.
7307
7308 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7309 does not specify a union tag. This is for compatibility with
7310 Solaris 9 yacc.
7311
7312 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7313 const *, since it is now modified by stripping surrounding { }.
7314 (current_braced_code): Remove.
7315 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7316 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7317 trailing " {...}". Now of type <chars>.
7318 (grammar_declaration): Adjust to bundled tokens.
7319 (code_content): Remove; stripping is now done by add_param.
7320 (print_token_value): Print contents of bundled tokens.
7321 (token_name): New function.
7322
7323 * src/reader.h (braced_code, current_braced_code): Remove.
7324 (token_name): New decl.
7325
7326 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7327 token_type, not braced_code code_kind. All uses changed.
7328 (SC_PRE_CODE): New state, for scanning after a keyword that
7329 has (or usually has) an immediately-following braced code.
7330 (token_type): New local var, to keep track of which token type
7331 to return when scanning braced code.
7332 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7333 <INITIAL>"%parse-param", <INITIAL>"%printer",
7334 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7335 instead of returning a token type immediately.
7336 (<INITIAL>"{"): Set token type.
7337 (<SC_BRACED_CODE>"}"): Use it.
7338 (handle_action_dollar, handle_action_at): Now returns bool
7339 indicating success. Fail if ! current_rule; this prevents a core dump.
7340 (handle_symbol_code_dollar, handle_symbol_code_at):
7341 Remove; merge body into caller.
7342 (handle_dollar, handle_at): Complain in invalid contexts.
7343
7344 * NEWS, doc/bison.texinfo: Document the above.
7345 * NEWS: Fix years and program names in copyright notice.
7346
73472002-12-17 Paul Eggert <eggert@twinsun.com>
7348
7349 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7350 Reporting, Table of Symbols): Omit mentions of %lex-param and
7351 %parse-param from the documentation for now.
7352
73532002-12-15 Paul Eggert <eggert@twinsun.com>
7354
7355 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7356 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7357 lookahead symbol, and which sets yychar in parser actions) and it
7358 disagreed with the Bison documentation. Bug
7359 reported by Andrew Walrond.
7360
7361 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7362 as the caller now does that.
7363 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7364 (YYEMPTY): Parenthesize right hand side, since others use it.
7365 (yyparse): Don't assume that our generated code is the only code
7366 that sets yychar.
7367
73682002-12-13 Paul Eggert <eggert@twinsun.com>
7369
7370 Version 1.75d.
7371
7372 POSIX requires a "yacc" command.
7373 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7374 (MOSTLYCLEANFILES): Add yacc.
7375 (yacc): New rule.
7376 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7377 as an alias for bison y.
7378
7379 * po/LINGUAS: Add da.
7380
7381 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7382 problem with latest <getopt.h>.
7383 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7384
7385 * doc/fdl.texi: Upgrade to 1.2.
7386 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7387 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7388 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7389 gnulib.
7390 * config/install-sh: Sync with autotools.
7391
7392 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7393 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7394 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7395 locations are requested.
7396 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7397 locations are requested.
7398
73992002-12-12 Paul Eggert <eggert@twinsun.com>
7400
7401 Remove unportable casts and storage allocation tricks.
7402 While we're at it, remove almost all casts, since they
7403 usually aren't needed and are a sign of trouble.
7404
7405 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7406
7407 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7408 the pointer DSET returned by malloc; this isn't portable.
7409 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7410 Similarly for DERIVES.
7411 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7412 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7413 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7414
7415 * src/derives.c (derives_compute): Do not bother invoking
7416 int_of_rule_number, since rule numbers are integers.
7417
7418 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7419 rather than XMALLOC (char, N).
7420
7421 * src/files.c (filename_split): Rewrite to avoid cast.
7422
7423 * src/gram.h (symbol_number_as_item_number,
7424 item_number_as_symbol_number, rule_number_as_item_number,
7425 item_number_as_rule_number):
7426 Now inline functions rather than macros, to avoid casts.
7427 * src/state.h (state_number_as_int): Likewise.
7428 * src/tables.c (state_number_to_vector_number,
7429 symbol_number_to_vector_number): Likewise.
7430
7431 * src/gram.h (int_of_rule_number): Remove; no longer used.
7432
7433 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7434 since the resulting storage is always stored into.
7435
7436 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7437 where it's needed.
7438
7439 * src/muscle_tab.c (muscle_m4_output):
7440 Now inline. Return bool, not int.
7441 * src/state.c (state_compare): Likewise.
7442 * src/symtab.c (symbol_check_defined,
7443 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7444 hash_compare_symbol, hash_symbol):
7445 Likewise.
7446 * src/uniqstr.c (uniqstr_print): Likewise.
7447 * src/muscle_tab.c (muscle_m4_output_processor):
7448 New function, to avoid casts.
7449 * src/state.c (state_comparator, stage_hasher): Likewise.
7450 * src/symtab.c (symbol_check_defined_processor,
7451 symbol_check_alias_consistency_processor, symbol_pack_processor,
7452 symbol_translation_processor, hash_symbol_comparator,
7453 hash_symbol_hasher): Likewise.
7454 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7455 * src/muscle_tab.c (muscles_m4_output):
7456 Use new functions instead of casting old functions unportably.
7457 * src/state.c (state_hash_new): Likewise.
7458 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7459 symbols_token_translations_init):
7460 Likewise.
7461 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7462
7463 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7464 var instead of casting to long, to avoid casts.
7465 (prepare_states): Use MALLOC rather than alloca, so that we don't
7466 have to worry about alloca.
7467 * src/state.c (state_hash_lookup): Likewise.
7468
7469 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7470 local var instead of casting to unsigned char, to avoid casts.
7471
7472 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7473 STATE_ALLOC): Remove.
7474 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7475 rather than calloc, and use offsetof to avoid allocating slightly
7476 too much storage.
7477 (state_new): Initialize all members.
7478
7479 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7480
7481 * src/symtab.c (symbol_free): Remove; unused.
7482 (symbol_get): Remove cast in lhs of assignment.
7483 (symbols_do): Now static. Accept generic arguments, not
7484 hashing-related ones.
7485
7486 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7487 (symbol_processor): Remove.
7488 (symbols_do): Remove decl; now static.
7489
7490 * src/system.h (alloca): Remove; decl no longer needed.
7491 (<stddef.h>): Include, for offsetof.
7492 (<inttypes.>, <stdint.h>): Include if available.
7493 (uintptr_t): New type, if system lacks it.
7494 (CALLOC, MALLOC, REALLOC): New macros.
7495 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7496 new macros.
7497
7498 * src/tables.c (table_size): Now int, to pacify GCC.
7499 (table_grow, table_ninf_remap): Use signed table size.
7500 (save_row): Don't bother initializing locals when not needed.
7501 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7502 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7503
7504 * src/vcg.h: Correct misspellings.
7505
7506 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7507
7508
7509 * src/getargs.c (getargs): Don't assume EOF == -1.
7510
75112002-12-09 Paul Eggert <eggert@twinsun.com>
7512
7513 Change identifier spellings to avoid collisions with names
7514 that are reserved by POSIX.
7515
7516 Don't use names ending in _t, since POSIX reserves them.
7517 For consistency, remove _e and _s endings -- they're weren't
7518 needed to remove ambiguity. All uses changed.
7519 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7520 turn was just renamed from struniq_t.
7521 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7522 which in turn was just renamed from struniq_processor_t.
7523 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7524 in turn was renamed from hash_compare_struniq_t.
7525 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7526 (state_list): Renamed from state_list_t.
7527 * src/assoc.h (assoc): Renamed from assoc_t.
7528 * src/conflicts.c (enum conflict_resolution): Renamed from
7529 enum conflict_resolution_e.
7530 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7531 (rule_list): Renamed from rule_list_t.
7532 * src/getargs.h (enum trace): Renamed from enum trace_e.
7533 (enum report): Renamed from enum report_e.
7534 * src/gram.h (item_number): Renamed from item_number_t.
7535 (rule_number): Renamed from rule_number_t.
7536 (struct rule_s): Remove the "rule_s" part; not used.
7537 (rule): Renamed from rule_t.
7538 (rule_filter): Renamed from rule_filter_t.
7539 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7540 (goto_list): Renamed from goto_list_t.
7541 * src/lalr.h (goto_number): Renamed from goto_number_t.
7542 * src/location.h (location): Renamed from location_t.
7543 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7544 and moved here from:
7545 * src/muscle_tab.h (muscle_entry_t): here.
7546 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7547 (rule_list): Renamed from rule_list_t.
7548 * src/print_graph.c (static_graph): Renamed from graph.
7549 * src/reader.h (braced_code): Renamed from braced_code_t.
7550 Remove brace_code_e tag.
7551 * src/relation.h (relation_node): Renamed from relation_node_t.
7552 (relation_nodes): Renamed from relation_nodes_t.
7553 (relation): Renamed from relation_t.
7554 * src/state.h (state_number): Renamed from state_number_t.
7555 (struct state): Renamed from struct state_s.
7556 (state): Renamed from state_t.
7557 (transitions): Renamed from transitions_t. Unused (and
7558 misspelled) transtion_s tag removed.
7559 (errs): Renamed from errs_t. Unused errs_s tag removed.
7560 (reductions): Renamed from reductions_t. Unused tag
7561 reductions_s removed.
7562 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7563 (struct symbol_list): Renamed from struct symbol_list_s.
7564 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7565 (struct symbol): Renamed from struct symbol_s.
7566 (symbol): Renamed from symbol_t.
7567 * src/tables.c (vector_number): Renamed from vector_number_t.
7568 (action_number): Renamed from action_t.
7569 * src/tables.h (base_number): Renamed from base_t.
7570 * src/vcg.h (enum color): Renamed from enum color_e.
7571 (enum textmode): Renamed from enum textmode_e.
7572 (enum shape): Renamed from enum shape_e.
7573 (struct colorentry): Renamed from struct colorentry_s.
7574 (struct classname): Renamed from struct classname_s.
7575 (struct infoname): Renamed from struct infoname_s.
7576 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7577 (enum decision): Renamed from enum decision_e.
7578 (enum orientation): Renamed from enum orientation_e.
7579 (enum alignment): Renamed from enum alignment_e.
7580 (enum arrow_mode): Renamed from enum arrow_mode_e.
7581 (enum crossing_type): Renamed from enum crossing_type_e.
7582 (enum view): Renamed from enum view_e.
7583 (struct node): Renamed from struct node_s.
7584 (node): Renamed from node_t.
7585 (enum linestyle): Renamed from enum linestyle_e.
7586 (enum arrowstyle): Renamed from enum arrowstyle_e.
7587 (struct edge): Renamed from struct edge.
7588 (edge): Renamed from edge_t.
7589 (struct graph): Renamed from struct graph_s.
7590 (graph): Renamed from graph_t.
7591 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7592 Rename value_t -> value.
7593 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7594 value_t_as_yystype -> value_as_yystype.
7595
7596 Don't include <errno.h> in the mainstream code, since it
7597 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7598 * lib/get-errno.c, lib/get-errno.h: New files.
7599 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7600 get-errno.c.
7601 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7602 * src/output.c (output_skeleton): Likewise.
7603 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7604 instead of errno.
7605 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7606 Likewise.
7607 (handle_action_dollar, handle_action_at): Likewise.
7608 * src/system.h: Do not include <errno.h>.
7609 (TAB_EXT): Renamed from EXT_TAB.
7610 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7611
7612 Avoid str[a-z]*, since <string.h> reserves that name space.
7613 Change all instances of "struniq" in names to "uniqstr", and
7614 likewise for "STRUNIQ" and "UNIQSTR".
7615 * src/uniqstr.c: Renamed from src/struniq.c.
7616 * src/uniqstr.h: Renamed from src/struniq.h.
7617 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7618 * src/files.c (strsuffix): Remove; unused.
7619 (concat2): Renamed from stringappend. Now static.
7620 * src/files.h (strsuffix, stringappend): Remove; unused.
7621 * src/parse-gram.y (<chars>): Renamed from <string>.
7622 (<uniqstr>): Renamed from <struniq>.
7623 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7624 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7625 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7626 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7627 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7628 (N_EXPAND): Renamed from N_STRETCH.
7629
7630 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7631 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7632 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7633 Remove; unused.
7634 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7635 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7636 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7637 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7638 (BASE_MAXIMUM): Renamed from BASE_MAX.
7639 (BASE_MINIMUM): Renamed from BASE_MIN.
7640 (ACTION_MAX): Remove; unused.
7641 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7642 Unnecessary casts removed from above defines.
7643
7644
7645 Fix misspelling in names.
7646 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7647 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7648 G_NODE_ALIGNEMENT.
7649
7650
7651 * lib/timevar.c (timevar_report): Renamed from time_report,
7652 for consistency with other names.
7653 * lib/timevar.h (timevar_report): New decl.
7654 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7655
7656
7657 Sort include-file uses.
7658
7659 Reorder all include files under src to be in the order "system.h".
7660 then the ../lib include files in angle brackets (alphabetized),
7661 then the . include files in double-quotes (alphabetized). Fix
7662 dependency breakages encountered in this process, as follows:
7663 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7664 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7665 * src/state.h: Include "symtab.h".
7666
76672002-12-08 Paul Eggert <eggert@twinsun.com>
7668
7669 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7670 since this causes problems when __file__ contains character
7671 sequences like "@" that are treated specially by src/scan-skel.l.
7672 Instead, just use the file's basename. This fixes the bug
7673 reported by Martin Mokrejs in
7674 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7675
76762002-12-06 Paul Eggert <eggert@twinsun.com>
7677
7678 Add support for rules that do not have trailing semicolons, as
7679 POSIX requires. Improve the quality of locations in Bison
7680 diagnostics.
7681
7682 * src/location.c: Include <quotearg.h>.
7683 (empty_location): Now const.
7684 (location_print): New function. Follow the recommendation of the
7685 GNU Coding Standards for locations that span file boundaries.
7686 * src/location.h: Do not include <quotearg.h>; no longer needed.
7687 (boundary): New type.
7688 (location_t): Use it. This allows locations to span file boundaries.
7689 All member uses changed: file -> start.file or end.file (as needed),
7690 first_line -> start.line, first_column -> start.column,
7691 last_line -> end.line, last_column -> end.column.
7692 (equal_boundaries): New function.
7693 (LOCATION_RESET, LOCATION_STEP): Remove.
7694 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7695 (empty_location): Now const.
7696 (location_print): New decl.
7697 * src/parse-gram.y (lloc_default): New function, which handles
7698 empty locations more accurately.
7699 (YYLLOC_DEFAULT): Use it.
7700 (%token COLON): Remove.
7701 (%token ID_COLON): New token.
7702 (rules): Use it.
7703 (declarations, rules): Remove trailing semicolon.
7704 (declaration, rules_or_grammar_declaration):
7705 Allow empty (";") declaration.
7706 (symbol_def): Remove empty actions; no longer needed.
7707 (rules_or_grammar_declaration): Remove trailing semicolon.
7708 (semi_colon.opt): Remove.
7709 * src/reader.h: Include location.h.
7710 (scanner_cursor): New decl.
7711 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7712 rolling our own.
7713 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7714 of *loc.
7715 (STEP): Remove. No longer needed, now that adjust_location does
7716 the work. All uses removed.
7717 (scanner_cursor): New var.
7718 (adjust_location): Renamed from extend_location. It now sets
7719 *loc and adjusts the scanner cursor. All uses changed.
7720 Don't bother testing for CR.
7721 (handle_syncline): Remove location arg; now updates scanner cursor.
7722 All callers changed.
7723 (unexpected_end_of_file): Now accepts start boundary of token or
7724 comment, not location. All callers changed. Update scanner cursor,
7725 not the location.
7726 (SC_AFTER_IDENTIFIER): New state.
7727 (context_state): Renamed from c_context. All uses changed.
7728 (id_loc, code_start, token_start): New local vars.
7729 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7730 processing of Yacc white space and equivalents here.
7731 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7732 instead of returning ID immediately, since we need to search for
7733 a subsequent colon.
7734 (<INITIAL>"'", "\""): Save token_start.
7735 (<INITIAL>"%{", "{", "%%"): Save code_start.
7736 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7737 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7738 BEGIN context_state at end, not INITIAL.
7739 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7740 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7741 Return correct token start.
7742 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7743 the start of a character, string or multiline comment is found.
7744 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7745 Reduction): Adjust reported locations to match the more-precise
7746 results now expected.
7747 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7748 * tests/reduce.at (Useless Rules, Reduced Automaton,
7749 Underivable Rules): Likewise.
7750 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7751 or "|"' now that so many other tokens are allowed by the new grammar.
7752
7753 * src/complain.h (current_file): Remove duplicate decl;
7754 current_file is now owned by files.h.
7755 * src/complain.c, src/scan-gram.l: Include files.h.
7756
77572002-12-06 Paul Eggert <eggert@twinsun.com>
7758
7759 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7760 promotes to int; it might be unsigned int.
7761 * data/yacc.c (yy_reduce_print): Likewise.
7762
7763 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7764 be #defined in the prologue, not in the Bison declarations.
7765 This fixes Debian Bug 102878, reported by Shaul Karl.
7766
77672002-12-02 Paul Eggert <eggert@twinsun.com>
7768
7769 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7770 * lib/strtoul.c: New file, from gnulib.
7771 This fixes a porting bug reported by Peter Klein in
7772 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7773
77742002-11-30 Paul Eggert <eggert@twinsun.com>
7775
7776 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7777 and put only a forward declaration in the prologue. This is for
7778 consistency with the other scanner helper functions.
7779
7780 Type clashes now generate warnings, not errors, since it
7781 appears that POSIX may allow some grammars with type clashes.
7782 * src/reader.c (grammar_current_rule_check): Warn about
7783 type clashes instead of complaining.
7784 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7785
7786 Add Yacc library, since POSIX requires it.
7787 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7788 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7789 * lib/main.c, lib/yyerror.c: New files.
7790
7791 gram_error can be static; it need not be extern.
7792 * src/reader.h (gram_error): Remove decl.
7793 * src/parse-gram.y (gram_error): Now static. Add static decl.
7794 (print_token_value): Omit parameter names from forward decl,
7795 for consistency.
7796
77972002-11-29 Paul Eggert <eggert@twinsun.com>
7798
7799 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7800 be declared before being used. E.g., one should typically
7801 declare them in the prologue. Use GNU coding style in examples.
7802 Put "const" consistently after the type it modifies. Mention
7803 that C99 supports "inline". Mention that yyerror traditionally
7804 returns "int".
7805
7806 %parse-param and %lex-param now take just one argument, the
7807 declaration; the argument name is deduced from the declaration.
7808
7809 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7810 Reporting, Table of Symbols): Document this.
7811 * src/parse-gram.y (add_param): New function.
7812 (COMMA): Remove.
7813 (declaration): Implement new rule for %parse-param and %lex-param.
7814 * src/scan-gram.l: "," now elicits a warning, rather than being
7815 a token; this is more compatible with byacc.
7816 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7817
78182002-11-27 Paul Eggert <eggert@twinsun.com>
7819
7820 Rename identifiers to avoid real and potential collisions.
7821
7822 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7823 to avoid collision with lex macro described by Bruce Lilly in
7824 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7826 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7827 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7828 All uses changed.
7829 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7830 The name "yycontrol" violates the name space rules, and this stuff
7831 wasn't being used anyway.
7832 (input): Remove action; this stuff wasn't being used.
7833 (gram_error): Rename local variable yylloc -> loc.
7834 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7835 (YY_DECL): Don't use "yy" at start of local variables.
7836 All uses changed, e.g., yylloc -> loc.
7837 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7838 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7839 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7840 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7841
7842 * src/parse-gram.y (gram_error): loc is now const *.
7843 * src/reader.h (gram_error): Likewise.
7844
78452002-11-24 Paul Eggert <eggert@twinsun.com>
7846
7847 Version 1.75c.
7848
7849 * tests/actions.at (Actions after errors): Use an output format
7850 more similar to that of the Printers and Destructors test.
7851 Test the position of the ';' token too.
7852 (Printers and Destructors): Likewise.
7853 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7854 unnecessarily alarming people when the test fails.
7855
7856 * data/yacc.c (yyerrlab1): Move this label down, so that the
7857 parser does not discard the lookahead token if the user code
7858 invokes YYERROR. This change is required for POSIX conformance.
7859
7860 * lib/error.c: Sync with gnulib.
7861
78622002-11-22 Paul Eggert <eggert@twinsun.com>
7863
7864 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7865 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7866 * lib/xmalloc.c: Likewise.
7867
78682002-11-20 Paul Eggert <eggert@twinsun.com>
7869
7870 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7871
78722002-11-20 Paul Eggert <eggert@twinsun.com>
7873
7874 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7875 should use `if (! x) abort ();' rather than `assert (x);', and
7876 anyway it's one less thing to worry about configuring.
7877
7878 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7879 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7880 and replace all instances of assert with abort.
7881 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7882 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7883
7884 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7885 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7886 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7887 hash_find_entry, hash_rehash, hash_insert): Likewise.
7888 * src/conflicts.c (resolve_sr_conflict): Likewise.
7889 * src/lalr.c (set_goto_map, map_goto): Likewise.
7890 * src/nullable.c (nullable_compute): Likewise.
7891 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7892 * src/reader.c (packgram, reader): Likewise.
7893 * src/state.c (state_new, state_free, state_transitions_set,
7894 state_reduction_find): Likewise.
7895 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7896 symbol_pack): Likewise.
7897 * src/tables.c (conflict_row, pack_vector): Likewise.
7898 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7899 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7900 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7901 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7902
7903 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7904 (ARGMATCH_CONSTRAINT): New macro.
7905 (ARGMATCH_ASSERT): Use it.
7906
7907 * src/system.h (verify): New macro.
7908 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7909 rather than assert.
7910 * src/tables.c (tables_generate): Likewise.
7911
7912 * src/struniq.c (struniq_assert): Now returns void, and aborts
7913 if the assertion is false.
7914 (struniq_assert_p): Remove.
7915 * src/struniq.h: Likewise.
7916
79172002-11-18 Paul Eggert <eggert@twinsun.com>
7918
7919 * data/glr.c (yygetLRActions): Replace `yyindex' with
7920 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7921 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7922 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7923
79242002-11-18 Akim Demaille <akim@epita.fr>
7925
7926 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7927 space.
7928 From Tim Van Holder.
7929
79302002-11-17 Paul Eggert <eggert@twinsun.com>
7931
7932 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7933 to "SyntaxError" for consistency with my 2002-11-15 change.
7934
7935 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7936 not define to {}, since this breaks the common use of `YYDPRINTF
7937 ((...));' if a single statement is desired (e.g. before `else').
7938 Work around GCC warnings by surrounding corresponding calls with
7939 {} if needed.
7940 (yyhasResolvedValue): Remove unused function.
7941 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7942 loop body.
7943 (yyreportSyntaxError): Renamed from yyreportParseError.
7944 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7945 All uses changed.
7946 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7947 extern when possible. Remove unused initializations.
7948
79492002-11-16 Akim Demaille <akim@epita.fr>
7950
7951 Augment the similarity between GLR and LALR traces.
7952
7953 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7954 (YY_REDUCE_PRINT): New.
7955 (yyparse): Use them.
7956 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7957 YYDPRINT here.
7958 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7959 state reached after the reduction/recovery, since...
7960 (yyparse, yyprocessOneStack): Report the state we are entering in.
7961
79622002-11-16 Akim Demaille <akim@epita.fr>
7963
7964 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7965 Add support for --trace=skeleton.
7966 * src/scan-skel.l: %option debug.
7967 Scan strings of non-@ or \n instead of character by character.
7968 (scan_skel): Handle trace_skeleton.
7969 (QPUTS): New.
7970 (@output_parser_name@, @output_header_name@): ``Restore'' their
7971 support (used to be M4 macros).
7972 * data/yacc.c: Quote larger chunks, a la glr.c.
7973 * data/lalr1.cc: Likewise.
7974 The header guards are no longer available, so use some other
7975 string than `YYLSP_NEEDED'.
7976
79772002-11-16 Akim Demaille <akim@epita.fr>
7978
7979 Make the ``Printers and Destructors'' test more verbose, taking
7980 `yacc.c''s behavior as (possibly wrong) reference.
7981
7982 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7983 instead of fprint on stdout.
7984 Set and report the last_line of the symbols.
7985 Consistently display values and locations.
7986
79872002-11-16 Paul Eggert <eggert@twinsun.com>
7988
7989 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7990
79912002-11-15 Paul Eggert <eggert@twinsun.com>
7992
7993 * tests/actions.at (Actions after errors): New test case.
7994
7995 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7996 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7997 tests/action.at, tests/calc.at, tests/conflicts.at,
7998 tests/cxx-type.at, tests/regression.at:
7999 "parse error" -> "syntax error" for POSIX compatibility.
8000 "parsing stack overflow..." -> "parser stack overflow" so
8001 that code matches Bison documentation.
8002
80032002-11-15 Akim Demaille <akim@epita.fr>
8004
8005 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8006 take two BRACED_CODE, not two string_content.
8007 Free the scanner's obstack when we are done.
8008 (code_content): New.
8009 * tests/calc.at: Adjust.
8010 * doc/bison.texinfo: Adjust.
8011 Also, make sure to include the `,' for these declarations.
8012
80132002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8014
8015 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8016 definition; avoids potential autoreconf problems.
8017
80182002-11-15 Akim Demaille <akim@epita.fr>
8019
8020 Always check the value returned by yyparse.
8021
8022 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8023 returned by yyparse.
8024 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8025 Adjust calls.
8026 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8027 returned by yyparse.
8028
80292002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8030
8031 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8032 on input.at test.
8033
80342002-11-14 Paul Eggert <eggert@twinsun.com>
8035
8036 * src/output.c (output_skeleton): Call xfopen instead of
8037 duplicating xfopen's body.
8038
8039 Fix bugs reported by Nelson H. F. Beebe in
8040 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8041
8042 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8043 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8044 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8045 file twice in the grammar, as an extra check.
8046
8047 * tests/input.at (Torturing the Scanner): Surround the
8048 backslash-newline tests with "#if 0", to make it less likely that
8049 we'll run into compiler bugs. Bring back solitary \ inside
8050 comment, but add a closing comment to work around HP C bug. Don't
8051 test backslash-newline in C character constant.
8052
80532002-11-14 Akim Demaille <akim@epita.fr>
8054
8055 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8056 status of the compiler.
8057 Calling `exit 1' is no longer needed.
8058 Reported by Nelson H. F. Beebe.
8059
80602002-11-14 Akim Demaille <akim@epita.fr>
8061
8062 * tests/atlocal.in (CPPFLAGS): We have config.h.
8063 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8064 New.
8065 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8066 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8067 * tests/regression.at, tests/torture.at: Use them for all the
8068 grammars that are to be compiled.
8069 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8070 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8071 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8072
80732002-11-14 Akim Demaille <akim@epita.fr>
8074
8075 * doc/bison.texinfo: Various formatting changes (alignments in
8076 samples, additional @group/@end group, GCS in samples.
8077 Use @deffn instead of simple @table to define the directives,
8078 macros, variables etc.
8079
80802002-11-13 Paul Eggert <eggert@twinsun.com>
8081
8082 Fix some bugs reported by Albert Chin-A-Young in
8083 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8084
8085 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8086 -o c"; the HP C compiler chatters during compilation.
8087 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8088 * tests/headers.at (export YYLTYPE): Likewise.
8089
8090 * tests/input.at (Torturing the Scanner): Remove lines containing
8091 solitary backslashes, as they tickle a bug in the HP C compiler.
8092
8093 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8094 comments, since they're not portable. Use GNU coding style.
8095
80962002-11-13 Akim Demaille <akim@epita.fr>
8097
8098 * data/yacc.c: Leave bigger chunks of quoted text.
8099 (YYDSYMPRINTF): New.
8100 Use it to report symbol activities.
8101 * data/glr.c (YYDSYMPRINTF): New.
8102 Use it.
8103
81042002-11-12 Paul Eggert <eggert@twinsun.com>
8105
8106 Version 1.75b.
8107
8108 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8109 (yyglrReduce): Return yyok, not 0.
8110 This should avoid the enumerated-type warnings reported
8111 by Nelson H. F. Beebe in
8112 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8113
8114 * lib/bbitset.h (BITSET_INLINE): Remove.
8115 * lib/bitset.h [! BITSET_INLINE]: Remove.
8116 (bitset_set, bitset_reset, bitset_test): Rename local vars
8117 to avoid shadowing warnings by GCC.
8118
8119 * data/glr.c (inline): Remove #define. It's the user's
8120 responsibility to #define it away, just like 'const'.
8121 This fixes one of the bugs reported by Nelson H. F. Beebe in
8122 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8123
8124 * Makefile.maint (po-check): Scan .l and .y files instead of the
8125 .c and the .h files that they generate. This fixes the bug
8126 reported by Tim Van Holder in:
8127 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8128 Look for N_ as well as for _. Try to avoid matching #define for
8129 N_ and _.
8130 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8131 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8132 * src/scan-gram.l: Revamp regular expressions so that " and '
8133 do not confuse xgettext.
8134
8135 * src/struniq.h (struniq_new): Do not declare the return type
8136 to be 'const'; this violates the C standard.
8137 * src/struniq.c (struniq_new): Likewise.
8138
81392002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8140
8141 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8142 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8143 linker.
8144
81452002-11-12 Akim Demaille <akim@epita.fr>
8146
8147 * Makefile.maint: Sync with Autoconf:
8148 (local_updates): New.
8149
81502002-11-12 Akim Demaille <akim@epita.fr>
8151
8152 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8153
81542002-11-12 Akim Demaille <akim@epita.fr>
8155
8156 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8157 locations.
8158
81592002-11-12 Akim Demaille <akim@epita.fr>
8160
8161 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8162 not yyvalue.
8163
81642002-11-12 Akim Demaille <akim@epita.fr>
8165
8166 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8167 Use it to test the GLR parser.
8168
81692002-11-12 Akim Demaille <akim@epita.fr>
8170
8171 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8172 defines it.
8173 * data/glr.c (yystos): New.
8174 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8175 (YYDSYMPRINT): New.
8176 (yyval): Don't define it, it is handled via M4.
8177 (yyrecoverParseError): Free verbosely the discarded symbols.
8178 * data/yacc.c (yysymprint): Remove, rather...
8179 (b4_yysymprint_generate): invoke.
8180 * data/c.m4 (b4_yysymprint_generate): New.
8181 Accept pointers as arguments, as opposed to the version from
8182 yacc.c.
8183 (b4_yydestruct_generate): Likewise.
8184 * tests/cations.at (Printers and Destructors): Use Bison directives
8185 instead of CPP macros.
8186 Don't rely on internal details.
8187
81882002-11-12 Akim Demaille <akim@epita.fr>
8189
8190 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8191 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8192 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8193 it against YYEMPTY and so forth), work on yytoken (i.e., set
8194 it to YYEMPTY etc.).
8195 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8196 (b4_symbol_actions): Remove.
8197 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8198 for 0, end-of-input.
8199
82002002-11-12 Akim Demaille <akim@epita.fr>
8201
8202 * doc/bison.texinfo (Destructor Decl): New.
8203
82042002-11-12 Akim Demaille <akim@epita.fr>
8205
8206 * src/tables.c (tables_generate): Use free for pointers that
8207 cannot be NULL, not XFREE.
8208 (pack_vector): Use assert, not fatal, for bound violations.
8209 * src/state.c (state_new): Likewise.
8210 * src/reader.c (reader): Likewise.
8211 * src/lalr.c (set_goto_map): Likewise.
8212 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8213 the file name.
8214
82152002-11-12 Akim Demaille <akim@epita.fr>
8216
8217 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8218 Restore.
8219 * src/scan-gram.l (last_string): Is global to the file, not to
8220 yylex.
8221 * src/parse-gram.y (input): Don't append the epilogue here,
8222 (epilogue.opt): do it here, and free the scanner's obstack.
8223 * src/reader.c (epilogue_set): Rename as...
8224 (epilogue_augment): this.
8225 * data/c.m4 (b4_epilogue): Defaults to empty.
8226
82272002-11-12 Akim Demaille <akim@epita.fr>
8228
8229 * src/getargs.c (long_options): Remove duplicates.
8230 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8231 Remove.
8232 * doc/bison.rnh: Remove.
8233 * doc/bison.texinfo (VMS Invocation): Remove.
8234
82352002-11-12 Akim Demaille <akim@epita.fr>
8236
8237 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8238 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8239
8240 Use struniq for symbols.
8241
8242 * src/symtab.h (symbol_t): The tag member is a struniq.
8243 (symbol_type_set): Adjust.
8244 * src/symtab.c (symbol_new): Takes a struniq.
8245 (symbol_free): Don't free the tag member.
8246 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8247 (hash_compare_symbol, hash_symbol): these.
8248 Use the fact that tags as struniqs.
8249 (symbol_get): Use struniq_new.
8250 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8251 Returns a strniq.
8252 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8253 and type members are struniqs.
8254 * src/reader.c (get_merge_function)
8255 (grammar_current_rule_merge_set): Adjust.
8256 (TYPE, current_type): Are struniq.
8257
8258 Use struniq for file names.
8259
8260 * src/files.h, src/files.c (infile): Split into...
8261 (grammar_file, current_file): these.
8262 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8263 * src/reduce.c (reduce_print): Likewise.
8264 * src/getargs.c (getargs): Likewise.
8265 * src/complain.h, src/complain.c: Likewise.
8266 * src/main.c (main): Call struniqs_new early enough to use it for
8267 file names.
8268 Don't free the input file name.
8269
82702002-11-12 Akim Demaille <akim@epita.fr>
8271
8272 * src/symtab.c (symbol_free): Remove dead deactivated code:
8273 type_name are properly removed.
8274 Don't use XFREE to free items that cannot be NULL.
8275 * src/struniq.h, src/struniq.c: New.
8276 * src/main.c (main): Initialize/free struniqs.
8277 * src/parse-gram.y (%union): Add astruniq member.
8278 (yyprint): Adjust.
8279 * src/scan-gram.l (<{tag}>): Return a struniq.
8280 Free the obstack bit that used to store it.
8281 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8282
82832002-11-11 Paul Eggert <eggert@twinsun.com>
8284
8285 Revamp to fix many (but not all) of the C- and M4-related quoting
8286 problems. Among other things, this fixes the Bison bug reported
8287 by Jan Hubicka when processing the Bash grammar; see:
8288 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8289
8290 Use new @ escapes consistently. Represent brackets with @{ and @}
8291 rather than @<:@ and @:>@, since this works a bit better with dumb
8292 editors like vi. Represent @ with @@, since @ is now consistently
8293 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8294 __ofile__, to avoid unexpected expansions. Similarly, use @output
8295 rather than #output.
8296
8297 * data/c.m4 (b4_copyright): Omit file name from comment, since
8298 the file name could contain "*/".
8299 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8300 be quoted. All uses changed.
8301
8302 * data/glr.c: Use new @ escapes consistently.
8303 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8304 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8305 Remove, since they couldn't handle arbitrary characters in file
8306 names.
8307 * data/lalr1.cc: Likewise.
8308 * data/yacc.c: Likewise.
8309
8310 * src/files.c (output_infix): Remove; all uses removed.
8311 * src/files.h: Likewise.
8312
8313 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8314 mishandled funny characters in file names, and anyway it isn't
8315 needed any more.
8316 * data/yacc.c: Likewise.
8317 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8318
8319 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8320 * data/yacc.c: Likewise.
8321
8322 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8323 strings now.
8324 (muscle_init): Quote filename as a C string.
8325 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8326 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8327 * src/output.c (escaped_file_name_output): New function.
8328 (prepare_symbols): Quote tokens for M4.
8329 (prepare): Don't insert output_infix, output_prefix,
8330 output_parser_name, output_header_name; this is now down by scan-skel.
8331 Insert skeleton as a C string.
8332
8333 * src/output.c (user_actions_output, symbol_destructors_output,
8334 symbol_printers_output): Quote filenames for C and M4.
8335 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8336
8337 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8338 escapes other than \\ and \'; this simplifies the code.
8339 (<SC_STRING>): Likewise, for \\ and \".
8340 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8341 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8342 Use new escapes @{ and @} for [ and ].
8343
8344 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8345 them with auto vars.
8346 Switch to new escape scheme, where @ is the escape character uniformly.
8347 Abort if a stray escape character is found. Avoid unbounded input
8348 buffer when parsing non-escaped text.
8349
8350 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8351 __oline__, #output, $@, and @{ do not have unintended meanings.
8352
83532002-11-09 Paul Eggert <eggert@twinsun.com>
8354
8355 Fix the test failure due to GCC warnings described in
8356 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8357 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8358 evaluate to 0 if it's impossible for NINF to be in the respective
8359 table.
8360 (yygetLRActions, yyrecoverParseError): Use them.
8361
8362 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8363 counted in the token inserted at end of file. Now takes
8364 location_t *, not location_t, so that the location can be
8365 adjusted. All uses changed.
8366
8367 * tests/regression.at (Invalid inputs): Adjust wording in
8368 diagnostic to match the new behavior.
8369
8370 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8371 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8372 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8373 abort ();'. This reduces the runtime of the "Many lookaheads"
8374 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8375 GCC 3.2.
8376
83772002-11-07 Paul Eggert <eggert@twinsun.com>
8378
8379 * src/parse-gram.y (CHARACTER): Remove unused token.
8380 All uses removed.
8381
8382 * src/scan-gram.l: Remove stack option. We no longer use the
8383 stack, since the stack was never deeper than 1; instead, use the
8384 new auto var c_context to record the stacked value.
8385
8386 Remove nounput option. At an unexpected end of file, we now unput
8387 the minimal input necessary to end cleanly; this simplifies the
8388 code.
8389
8390 Avoid unbounded token sizes where this is easy.
8391
8392 (unexpected_end_of_file): New function.
8393 Use it to systematize the error message on unexpected EOF.
8394 (last-string): Now auto, not static.
8395 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8396 (scanner_last_string_free): Remove; not used.
8397 (percent_percent_count): Move decl to just before use.
8398 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8399 not the (never otherwised-used) CHARACTER.
8400
84012002-11-07 Akim Demaille <akim@epita.fr>
8402
8403 Let yyerror always receive the msg as last argument, so that
8404 yyerror can be variadic.
8405
8406 * data/yacc.c (b4_yyerror_args): New.
8407 Use it when calling yyerror.
8408 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8409 Use it when calling yyerror.
8410 * doc/bison.texinfo (Error Reporting): Adjust.
8411 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8412 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8413
84142002-11-06 Akim Demaille <akim@epita.fr>
8415
8416 #line should have quoted strings.
8417 Ideally, this should be done by m4_quotearg.
8418
8419 * src/scan-skel.l: Include quotearg.h.
8420 Quote __ofile__.
8421 * src/output.c (symbol_printers_output)
8422 (symbol_destructors_output): Quote the file name.
8423
84242002-11-06 Akim Demaille <akim@epita.fr>
8425
8426 * tests/regression.at (Invalid inputs): Adjust to the recent
8427 messages.
8428
84292002-11-06 Akim Demaille <akim@epita.fr>
8430
8431 Restore --no-lines.
8432 Reported by Jim Kent.
8433
8434 * data/c.m4 (b4_syncline): New.
8435 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8436 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8437 * src/output.c (user_actions_output): Likewise.
8438 (prepare): Define 'b4_synclines_flag'.
8439 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8440
84412002-11-06 Akim Demaille <akim@epita.fr>
8442
8443 * src/main.c (main): Free `infile'.
8444 * src/scan-gram.l (handle_syncline): New.
8445 Recognize `#line'.
8446 * src/output.c (user_actions_output, symbol_destructors_output)
8447 (symbol_printers_output): Use the location's file name, not
8448 infile.
8449 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8450
84512002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8452
8453 * src/tables.c (matching_state): Don't allow states to match if
8454 either has GLR conflict entries.
8455
84562002-11-05 Paul Eggert <eggert@twinsun.com>
8457
8458 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8459 "integer out of range" rather than "invalid value".
8460 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8461 accordingly.
8462
8463 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8464 Also, remove one static variable in the scanner.
8465
8466 * src/scan-gram.l (braces_level): Now auto, not static.
8467 Initialize to zero if the compiler is being picky.
8468 (INITIAL): Clear braces_level instead of incrementing it.
8469 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8470 as POSIX 1003.1-2001 requires.
8471 * src/system.h (IF_LINT): New macro, taken from coreutils.
8472 * configure.ac: Define "lint" if --enable-gcc-warnings.
8473
84742002-11-05 Akim Demaille <akim@epita.fr>
8475
8476 * src/scan-gram.l: When it starts with `%', complain about the
8477 whole directive, not just that `invalid character: %'.
8478
84792002-11-04 Akim Demaille <akim@epita.fr>
8480
8481 * Makefile.maint: Update from Autoconf.
8482 (update, cvs-update, po-update, do-po-update): New.
8483
84842002-11-04 Akim Demaille <akim@epita.fr>
8485
8486 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8487 and yyerror.
8488 Have yyerror `use' its arguments.
8489 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8490 returns true when location & yacc & pure & parse-param.
8491 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8492
84932002-11-04 Akim Demaille <akim@epita.fr>
8494
8495 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8496 clashes.
8497 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8498 font-lock-mode.
8499 Use complain_at.
8500 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8501 slot 0.
8502
85032002-11-03 Paul Eggert <eggert@twinsun.com>
8504
8505 * src/reader.c (get_merge_function, grammar_current_rule_check):
8506 Use consistent diagnostics for reporting type name clashes.
8507 Quote the types with <>, for consistency with Yacc.
8508 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8509
85102002-11-03 Akim Demaille <akim@epita.fr>
8511
8512 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8513 New.
8514 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8515 (b4_parse_param): Remove.
8516 Use b4_identification.
8517 Propagate b4_pure_args where needed to pass them to yyerror.
8518 * data/glr.m4 (b4_parse_param): Remove.
8519 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8520 (b4_lpure_formals): New.
8521 Use b4_identification.
8522 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8523 b4_user_formals and b4_user_args.
8524 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8525 (yyreportAmbiguity): When using a pure parser, also need
8526 the location, and the parse-params.
8527 Adjust callers.
8528 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8529 When using a pure parser, also need the parse-params.
8530 Adjust callers.
8531 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8532 (%pure-parser + %parse-param) LALR and GLR parsers.
8533 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8534 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8535 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8536 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8537 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8538 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8539 * doc/bison.texinfo: Untabify the whole file.
8540 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8541 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8542 (Error Reporting): Adjust to these new directives.
8543 Document %error-verbose, deprecate YYERROR_VERBOSE.
8544
85452002-11-03 Akim Demaille <akim@epita.fr>
8546
8547 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8548 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8549 command line options.
8550 * tests/cxx-type.at: Formatting changes.
8551
85522002-11-03 Paul Eggert <eggert@twinsun.com>
8553
8554 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8555 to count columns correctly, and to check for invalid inputs.
8556
8557 Use mbsnwidth to count columns correctly. Account for tabs, too.
8558 Include mbswidth.h.
8559 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8560 (extend_location): New function.
8561 (YY_LINES): Remove.
8562
8563 Handle CRLF in C code rather than in Lex code.
8564 (YY_INPUT): New macro.
8565 (no_cr_read): New function.
8566
8567 Scan UCNs, even though we don't fully handle them yet.
8568 (convert_ucn_to_byte): New function.
8569
8570 Handle backslash-newline correctly in C code.
8571 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8572 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8573 all uses changed.
8574 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8575 Use {splice} wherever C allows backslash-newline.
8576 YY_STEP after space, newline, vertical-tab.
8577 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8578
8579 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8580
8581 ({int}, handle_action_dollar, handle_action_at): Check for integer
8582 overflow.
8583
8584 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8585
8586 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8587 as well as \000. Check for UCHAR_MAX, not 255.
8588 Allow \x with an arbitrary positive number of digits, as in C.
8589 Check for overflow here.
8590 Allow \? and UCNs, for compatibility with C.
8591
8592 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8593 with quote slot used by complain_at.
8594
8595 * tests/input.at: Add tests for backslash-newline, m4 quotes
8596 in symbols, long literals, and funny escapes in strings.
8597
8598 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8599 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8600 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8601 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8602 * m4/mbswidth.m4: New file, from GNU coreutils.
8603
8604 * doc/bison.texinfo (Grammar Outline): Document // comments.
8605 (Symbols): Document that trigraphs have no special meaning in Bison,
8606 nor is backslash-newline allowed.
8607 (Actions): Document that trigraphs have no special meaning.
8608
8609 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8610 no longer used.
8611
86122002-11-02 Paul Eggert <eggert@twinsun.com>
8613
8614 * src/reader.c: Don't include quote.h; not needed.
8615 (get_merge_function): Reword warning to be consistent with
8616 type clash diagnostic in grammar_current_rule_check.
8617
8618 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8619 bug in trigraph handling.
8620
8621 * src/output.c (prepare_symbols): When printing token names,
8622 escape "[" as "@<:@" and likewise for "]".
8623
8624 * src/system.h (errno): Remove declaration, as we are now
8625 assuming C89 or better, and C89 guarantees errno.
8626
86272002-10-30 Paul Eggert <eggert@twinsun.com>
8628
8629 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8630 Check for close failures.
8631 * src/files.h (xfclose): Return void, not int, since it always
8632 returned zero.
8633 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8634 indicates one.
8635 * src/output.c (output_skeleton): Use xfclose rather than fclose
8636 and ferror. xfclose now checks ferror.
8637
8638 * data/glr.c (YYLEFTMOST_STATE): Remove.
8639 (yyreportTree): Use a stack-based leftmost state. This avoids
8640 our continuing battles with bogus warnings about initializers.
8641
86422002-10-30 Akim Demaille <akim@epita.fr>
8643
8644 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8645 #if.
8646
86472002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8648
8649 * tests/glr-regr1.at: New test for reported regressions.
8650 * tests/testsuite.at: Add glr-regr1.at test.
8651 * tests/Makefile.am: Add glr-regr1.at test.
8652
86532002-10-24 Paul Eggert <eggert@twinsun.com>
8654
8655 Version 1.75a.
8656
8657 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8658 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8659 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8660 Don't assume strdup exists; POSIX says its an XSI extension.
8661 Check for buffer overflow on input.
8662
86632002-10-24 Akim Demaille <akim@epita.fr>
8664
8665 * src/output.c (output_skeleton): Don't disable M4sugar comments
8666 too soon: it results in comments being expanded.
8667 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8668 first output.
8669
86702002-10-24 Akim Demaille <akim@epita.fr>
8671
8672 * data/yacc.c (m4_int_type): New.
8673 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8674 char' as only yacc.c wants K&R portability.
8675 * data/glr.c (yysigned_char): Remove.
8676 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8677 Reported by Quoc Peyrot.
8678
86792002-10-23 Paul Eggert <eggert@twinsun.com>
8680
8681 * src/main.c (main): With --trace=time, report times even if a
8682 non-fatal error occurs. Formerly, the times were reported in some
8683 such cases but not in others.
8684 * src/reader.c (reader): Just return if a complaint has been issued,
8685 instead of exiting, so that 'main' can report times.
8686
86872002-10-22 Akim Demaille <akim@epita.fr>
8688
8689 * src/system.h: Include sys/types.
8690 Reported by Bert Deknuydt.
8691
86922002-10-23 Paul Eggert <eggert@twinsun.com>
8693
8694 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8695 Suggested by Art Haas.
8696
86972002-10-22 Paul Eggert <eggert@twinsun.com>
8698
8699 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8700 decl; not needed any more.
8701 * src/main.c (main): Use return to exit, undoing yesterday's change.
8702 The last OS that we could find where this wouldn't work is
8703 SunOS 3.5, and that's too old to worry about now.
8704
8705 * data/glr.c (struct yyltype): Define members even when not
8706 doing locations. This is more consistent with yacc.c, and it
8707 works around the following bug reports:
8708 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8709 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8710
8711 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8712 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8713 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8714
87152002-10-22 Akim Demaille <akim@epita.fr>
8716
8717 * data/README: New.
8718
87192002-10-21 Paul Eggert <eggert@twinsun.com>
8720
8721 Be consistent about 'bool'; the old code used an enum in one
8722 module and an int in another, and this violates the C standard.
8723 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8724 * configure.ac (AC_HEADER_STDBOOL): Add.
8725 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8726 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8727 * src/symtab.c (hash_compare_symbol_t): Likewise.
8728 * src/system.h (bool, false, true): Use a definition consistent
8729 with ../lib/hash.c. All uses changed.
8730
8731 * src/complain.c (warning_issued): Renamed from warn_message_count,
8732 so that we needn't worry about integer overflow (!).
8733 Now of type bool. All uses changed.
8734 (complaint_issued): Renamed from complain_message_count; likewise.
8735
8736 * src/main.c (main): Use exit to exit with failure.
8737
8738 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8739 rather than 1 and 0.
8740 * src/main.c (main): Likewise.
8741 * src/getargs.c (getargs): Likewise.
8742 * src/reader.c (reader): Likewise.
8743
8744 * src/getarg.c (getargs): Remove duplicate code for
8745 "Try `bison --help'".
8746
8747 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8748 What was that "2" for?
8749
8750 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8751 * src/getargs.c (usage): Likewise.
8752
8753 * src/getargs.c (getargs): When there are too few operands, report
8754 the last one. When there are too many, report the first extra
8755 one. This is how diffutils does it.
8756
87572002-10-20 Paul Eggert <eggert@twinsun.com>
8758
8759 Remove K&R vestiges.
8760 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8761 * src/complain.c (VA_START): Remove. Assume prototypes.
8762 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8763 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8764 fatal): Assume prototypes.
8765 * src/complain.h: Assume prototypes.
8766 * src/system.h (PARAMS): Remove.
8767 Include <limits.h> unconditionally, since it's guaranteeed even
8768 for a freestanding C89 compiler.
8769 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8770 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8771
87722002-10-20 Akim Demaille <akim@epita.fr>
8773
8774 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8775 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8776 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8777 (yyresolveStates, yyresolveAction, yyresolveStack)
8778 (yyprocessOneStack): Use them.
8779 (yy_reduce_print): New.
8780 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8781
87822002-10-20 Akim Demaille <akim@epita.fr>
8783
8784 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8785 arguments and output `void'.
8786 (b4_c_function): Rename as...
8787 (b4_c_function_def): this.
8788 (b4_c_function_decl, b4_c_ansi_function_def)
8789 (b4_c_ansi_function_decl): New.
8790 Change the interpretation of the arguments: before `int, foo', now
8791 `int foo, foo'.
8792 * data/yacc.c (yyparse): Prototype and define thanks to these.
8793 Adjust b4_c_function_def uses.
8794 * data/glr.c (yyparse): Likewise, but ANSI only.
8795
87962002-10-20 Akim Demaille <akim@epita.fr>
8797
8798 * src/output.c (prepare): Move the definition of `tokens_number',
8799 `nterms_number', `undef_token_number', `user_token_number_max'
8800 to...
8801 (prepare_tokens): Here.
8802 (prepare_tokens): Rename as...
8803 (prepare_symbols): this.
8804 (prepare): Move the definition of `rules_number' to...
8805 (prepare_rules): here.
8806 (prepare): Move the definition of `last', `final_state_number',
8807 `states_number' to...
8808 (prepare_states): here.
8809 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8810
88112002-10-20 Akim Demaille <akim@epita.fr>
8812
8813 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8814
88152002-10-20 Akim Demaille <akim@epita.fr>
8816
8817 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8818 * data/c.m4: here.
8819
88202002-10-20 Akim Demaille <akim@epita.fr>
8821
8822 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8823 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8824 `pair'.
8825 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8826 `name' to...
8827 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8828 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8829 These.
8830
88312002-10-19 Paul Eggert <eggert@twinsun.com>
8832
8833 Do not create a temporary file, as that involves security and
8834 cleanup headaches. Instead, use a pair of pipes.
8835 Derived from a suggestion by Florian Krohm.
8836 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8837 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8838 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8839 (BISON_PREREQ_SUBPIPE): Add.
8840 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8841 Add subpipe.h, subpipe.c.
8842 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8843 * po/POTFILES.in: Add lib/subpipe.c.
8844 * src/output.c: Include "subpipe.h".
8845 (m4_invoke): Remove decl.
8846 (scan_skel): New decl.
8847 (output_skeleton): Use pipe rather than temporary file for m4 input.
8848 Check that m4sugar.m4 is readable, to avoid deadlock.
8849 Check for pipe I/O error.
8850 * src/scan-skel.l (readpipe): Remove decl.
8851 (scan_skel): New function, to be used in place of m4_invoke.
8852 Read from stream rather than file.
8853
8854 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8855 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8856 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8857 this generates a more-accurate value anyway.
8858
8859 * lib/timevar.c (timervar_accumulate): Rename locals to
8860 avoid confusion with similarly-named more-global.
8861 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8862
8863 * src/output.c (prepare): Use xstrdup to convert char const *
8864 to char *, to avoid GCC warning.
8865
88662002-10-19 Akim Demaille <akim@epita.fr>
8867
8868 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8869 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8870 Use them to have `calc.y' ready for %pure-parser.
8871 * data/yacc.c (YYLEX): Pass a yylex return type to
8872 b4_c_function_call.
8873
88742002-10-19 Akim Demaille <akim@epita.fr>
8875
8876 Prototype support of %lex-param and %parse-param.
8877
8878 * src/parse-gram.y: Add the definition of the %lex-param and
8879 %parse-param tokens, plus their rules.
8880 Drop the `_' version of %glr-parser.
8881 Add the "," token.
8882 * src/scan-gram.l (INITIAL): Scan them.
8883 * src/muscle_tab.c: Comment changes.
8884 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8885 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8886 (muscle_entry_s): The `value' member is no longer const.
8887 Adjust all dependencies.
8888 * src/muscle_tab.c (muscle_init): Adjust: use
8889 MUSCLE_INSERT_STRING.
8890 Initialize the obstack earlier.
8891 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8892 (muscle_pair_list_grow): New.
8893 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8894 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8895 * tests/calc.at: Use %locations, not --locations.
8896 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8897
88982002-10-19 Akim Demaille <akim@epita.fr>
8899
8900 * src/getargs.c (usage): Take status as argument and exit
8901 accordingly.
8902 Report the traditional `Try ... --help' message when status != 0.
8903 (usage, version): Don't take a FILE * as arg, it is pointless.
8904 (getargs): When there is an incorrect number of arguments, make it
8905 an error, and report it GNUlically thanks to `usage ()'.
8906
89072002-10-18 Paul Eggert <eggert@twinsun.com>
8908
8909 * data/glr.c (yyreportParseError): Don't assume that sprintf
8910 yields the length of the printed string, as this is not true
8911 on SunOS 4.1.4. Reported by Peter Klein.
8912
8913 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8914 * tests/conflicts.at (%nonassoc and eof): Likewise.
8915 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8916
89172002-10-17 Akim Demaille <akim@epita.fr>
8918
8919 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8920 * src/getargs.c (trace_types, trace_args): Adjust.
8921 * src/reader.c (grammar_current_rule_prec_set)
8922 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8923 Standardize error messages.
8924 And s/@prec/%prec/!
8925 (reader): Use trace_flag to enable scanner/parser debugging,
8926 instead of an adhoc scheme.
8927 * src/scan-gram.l: Remove trailing debugging code.
8928
89292002-10-16 Paul Eggert <eggert@twinsun.com>
8930
8931 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8932 MUSCLE_TAB_H.
8933
8934 * NEWS: Officially drop support for building Bison with K&R C,
8935 since it didn't work anyway and it's not worth worrying about.
8936 * Makefile.maint (wget_files): Remove ansi2knr.c.
8937 (ansi2knr.c-url_prefix): Remove.
8938 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8939 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8940 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8941
89422002-10-15 Paul Eggert <eggert@twinsun.com>
8943
8944 Stop using the "enum_" trick for K&R-style function definitions;
8945 it confused me, and I was the author! Instead, assume that people
8946 who want to use K&R C compilers (when using these modules in GCC,
8947 perhaps?) will run ansi2knr.
8948
8949 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8950 All uses of "enum_" changed to "enum ".
8951 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8952 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8953
8954 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8955 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8956 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8957 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8958 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8959 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8960 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8961 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8962 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8963 Use function prototypes; this removes the need for declaring
8964 static functions simply to provide their prototypes.
8965 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8966 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8967 bitset_count_, bitset_create, bitset_dump, bitset_first,
8968 bitset_free, bitset_init, bitset_last, bitset_next,
8969 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8970 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8971 bitset_print, bitset_release_memory, bitset_toggle_,
8972 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8973 debug_bitset): Likewise.
8974 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8975 * lib/bitset_stats.c (bitset_log_histogram_print,
8976 bitset_percent_histogram_print, bitset_stats_and,
8977 bitset_stats_and_cmp, bitset_stats_and_or,
8978 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8979 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8980 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8981 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8982 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8983 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8984 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8985 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8986 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8987 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8988 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8989 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8990 bitset_stats_zero): Likewise.
8991 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8992 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8993 bitsetv_dump, debug_bitsetv): Likewise.
8994 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8995 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8996 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8997 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8998 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8999 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9000 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9001 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9002 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9003 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9004 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9005 Likewise.
9006 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9007 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9008 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9009 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9010 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9011 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9012 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9013 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9014 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9015 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9016 lbitset_xor_cmp, lbitset_zero): Likewise.
9017
90182002-10-14 Akim Demaille <akim@epita.fr>
9019
9020 Version 1.75.
9021
90222002-10-14 Akim Demaille <akim@epita.fr>
9023
9024 * tests/Makefile.am (maintainer-check-posix): New.
9025
90262002-10-14 Akim Demaille <akim@epita.fr>
9027
9028 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9029 member.
9030
90312002-10-14 Akim Demaille <akim@epita.fr>
9032
9033 * src/tables.c (table_ninf_remap): base -> tab.
9034 Reported by Matt Rosing.
9035
90362002-10-14 Paul Eggert <eggert@twinsun.com>
9037
9038 * tests/action.at, tests/calc.at, tests/conflicts.at,
9039 tests/cxx-type.at, tests/headers.at, tests/input.at,
9040 tests/regression.at, tests/synclines.at, tests/torture.at:
9041 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9042 so that the tests still work even if POSIXLY_CORRECT is set.
9043 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9044
9045 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9046 for portability to K&R hosts. Fix typo: signed char is guaranteed
9047 only to 127, not to 128.
9048 * data/glr.c (yysigned_char): New type.
9049 * data/yacc.c (yysigned_char): Likewise.
9050 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9051
90522002-10-13 Paul Eggert <eggert@twinsun.com>
9053
9054 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9055 true due to limited range of data type" warning from GCC.
9056
9057 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9058 by wrapping enum yytokentype's definition inside #ifndef
9059 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9060
90612002-10-13 Akim Demaille <akim@epita.fr>
9062
9063 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9064 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9065
90662002-10-13 Akim Demaille <akim@epita.fr>
9067
9068 * Makefile.maint: Update from Autoconf 2.54.
9069 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9070
90712002-10-13 Akim Demaille <akim@epita.fr>
9072
9073 * src/print.c (print_state): Separate the list of solved conflicts
9074 from the other items.
9075 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9076
90772002-10-13 Akim Demaille <akim@epita.fr>
9078
9079 Let nondeterministic skeletons be usable with deterministic
9080 tables.
9081
9082 With the patch, GAWK compiled by GCC without -O2 passes its test
9083 suite using a GLR parser driven by LALR tables. It fails with -O2
9084 because `struct stat' gives two different answers on my machine:
9085 88 (definition of an auto var) and later 96 (memset on this var).
9086 Hence the stack is badly corrumpted. The headers inclusion is to
9087 blame: if I move the awk.h inclusion before GLR's system header
9088 inclusion, the two struct stat have the same size.
9089
9090 * src/tables.c (pack_table): Always create conflict_table.
9091 (token_actions): Always create conflict_list.
9092 * data/glr.c (YYFLAG): Remove, unused.
9093
90942002-10-13 Akim Demaille <akim@epita.fr>
9095
9096 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9097 (O0FLAGS): New.
9098 (VALGRIND, GXX): New.
9099 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9100 * tests/bison.in: Run $PREBISON a pre-command.
9101 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9102 (maintainer-check-g++): New.
9103 * Makefile.am (maintainer-check): New.
9104
91052002-10-13 Akim Demaille <akim@epita.fr>
9106
9107 * data/glr.c: Formatting changes.
9108 Tweak some trace messages to match yacc.c's.
9109
91102002-10-13 Akim Demaille <akim@epita.fr>
9111
9112 GLR parsers sometimes raise parse errors instead of performing the
9113 default reduction.
9114 Reported by Charles-Henry de Boysson.
9115
9116 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9117 check the length of the traces when %glr.
9118 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9119 GLR's traces.
9120 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9121 Test GLR parsers.
9122 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9123 (yyltype): Remove the yy prefix from the member names.
9124 (yytable): Complete its comment.
9125 (yygetLRActions): Map error action number from YYTABLE from
9126 YYTABLE_NINF to 0.
9127 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9128 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9129 not satisfying as we could compare an YYACTION computed from
9130 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9131 only value for error actions.
9132 (yyreportParseError): In verbose parse error messages, don't issue
9133 `error' in the list of expected tokens.
9134 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9135 next action to perform to match glr.c's decoding.
9136 (yytable): Complete its comment.
9137
91382002-10-13 Paul Eggert <eggert@twinsun.com>
9139
9140 Fix problem reported by Henrik Grubbstroem in
9141 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9142 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9143 because the Bison parser reads the second action before reducing
9144 the first one.
9145 * src/scan-gram.l (rule_length): New static var.
9146 Use it to keep track of the rule length in the scanner, since
9147 we can't expect the parser to be in lock-step sync with the scanner.
9148 (handle_action_dollar, handle_action_at): Use this var.
9149 * tests/actions.at (Exotic Dollars): Test for the problem.
9150
91512002-10-12 Paul Eggert <eggert@twinsun.com>
9152
9153 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9154 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9155 Include <sys/time.h> when checking for clock_t and struct tms.
9156 Use same include order as source.
9157 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9158 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9159
9160 * lib/timevar.c: Update copyright date and clarify comments.
9161 (get_time) [IN_GCC]: Keep the GCC version for reference.
9162
9163 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9164 GCC version as of today, then merge Bison's changes.
9165 Change "GCC" to "Bison" in copyright notice. timevar.def's
9166 author is Akim, so change that too.
9167
9168 * src/reader.c (grammar_current_rule_check):
9169 Don't worry about the default action if $$ is untyped.
9170 Prevents bogus warnings reported by Jim Gifford in
9171 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9172
9173 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9174 * data/glr.c, data/lalr1.cc, data/yacc.c:
9175 Output token definitions before the first part of user declarations.
9176 Fixes compatibility problem reported by Jim Gifford for kbd in
9177 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9178
91792002-10-11 Paul Eggert <eggert@twinsun.com>
9180
9181 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9182 (yyparse): here. This undoes some of the 2002-07-25 change.
9183 Compatibility problem reported by Ralf S. Engelschall with
9184 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9185
91862002-10-11 Akim Demaille <akim@epita.fr>
9187
9188 * tests/regression.at Characters Escapes): New.
9189 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9190 characters.
9191 Reported by Jan Nieuwenhuizen.
9192
91932002-10-11 Akim Demaille <akim@epita.fr>
9194
9195 * po/id.po: New.
9196
91972002-10-10 Paul Eggert <eggert@twinsun.com>
9198
9199 Portability fixes for bitsets; this also avoids several GCC
9200 warnings.
9201
9202 * lib/abitset.c: Include <stddef.h>, for offsetof.
9203 * lib/lbitset.c: Likewise.
9204
9205 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9206 properly for vectors of objects. Do not assume that adding a
9207 header size to a multiple of a word size yields a value that is
9208 properly aligned for the whole union.
9209 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9210
9211 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9212 unique names for structures.
9213 * lib/ebitset.c (ebitset_bytes): Likewise.
9214 * lib/lbitset.c (lbitset_bytes): Likewise.
9215
9216 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9217 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9218 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9219 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9220 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9221 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9222 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9223 to improve the type-checking that GCC can do.
9224 * lib/bitset.c (bitset_op4_cmp): Likewise.
9225 * lib/bitset_stats.c (bitset_stats_count,
9226 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9227 bitset_stats_copy, bitset_stats_disjoint_p,
9228 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9229 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9230 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9231 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9232 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9233 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9234 bitset_stats_or_and_cmp): Likewise.
9235 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9236 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9237 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9238 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9239
9240 * lib/abitset.h: Include bitset.h, not bbitset.h.
9241 * lib/ebitset.h: Likewise.
9242 * lib/lbitset.h: Likewise.
9243
9244 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9245 All instances of parameters of type enum bitset_opts are now of
9246 type enum_bitset_opts, to conform to the C Standard, and similarly
9247 for enum_bitset_type.
9248 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9249 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9250
9251 Do not use "struct bitset_struct" to mean different things in
9252 different modules. Not only is this confusing, it violates
9253 the C Standard, which requires that structure types in different
9254 modules must be compatible if one is to be passed to the other.
9255 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9256 All instances of "struct bitset_struct *" replaced with "bitset".
9257 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9258 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9259 struct lbitset_struct, struct bitset_stats_struct): New types.
9260 All uses of struct bitset_struct changed to union bitset_union,
9261 etc.
9262 * lib/abitset.c (struct abitset_struct, abitset,
9263 struct bitset_struct): Remove.
9264 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9265 struct bitset_struct): Remove.
9266 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9267 bitset_struct): Remove.
9268 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9269 Likewise.
9270
9271 Do not call a function of type T using a call that assumes the
9272 function is of a different type U. Standard C requires that a
9273 function must be called with a type that is compatible with its
9274 definition.
9275 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9276 New decls.
9277 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9278 New functions.
9279 * lib/ebitset.c (PFV): Remove.
9280 * lib/lbitset.c (PFV): Likewise.
9281 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9282 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9283 decls.
9284 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9285 (ebitset_vtable): Use them.
9286 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9287 lbitset_xor): New functions.
9288 (lbitset_vtable): Use them.
9289
9290 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9291 Declare.
9292
9293 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9294 GCC warning.
9295 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9296 Use offsetof, for simplicity.
9297
92982002-10-06 Paul Eggert <eggert@twinsun.com>
9299
9300 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9301 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9302 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9303 which was inadvertently undone by the 2002-09-30 patch.
9304 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9305 the same width as int.
9306
93072002-10-04 Paul Eggert <eggert@twinsun.com>
9308
9309 Version 1.50.
9310
9311 * configure.ac (AC_INIT), NEWS: Increment version number.
9312
9313 * doc/bison.texinfo: Minor spelling, grammar, and white space
9314 fixes.
9315 (Symbols): Mention that any negative value returned from yylex
9316 signifies end-of-input. Warn about negative chars. Mention
9317 the portable Standard C character set.
9318
9319 The GNU coding standard says CFLAGS and YFLAGS are reserved
9320 for the installer to set.
9321 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9322 * src/Makefile.am (AM_CFLAGS): Likewise.
9323 (AM_YFLAGS): Renamed from YFLAGS.
9324
9325 Fix some MAX and MIN problems.
9326 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9327 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9328 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9329 * src/reader.c (reader): Use it.
9330
9331 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9332 POSIX 1003.1-2001 has removed fgrep.
9333
93342002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9335
9336 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9337 interpreted as signed.
9338 * lib/ebitset.c (ebitset_list): Fix bug.
9339
93402002-10-01 Paul Eggert <eggert@twinsun.com>
9341
9342 More fixes for 64-bit hosts and large bitsets.
9343
9344 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9345 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9346 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9347 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9348 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9349 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9350 bitset_count_): Likewise.
9351 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9352 bitset_first, bitset_last): Likewise.
9353 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9354 bitset_stats_list_reverse, bitset_stats_size,
9355 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9356 Likewise.
9357 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9358 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9359 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9360 bitsetv_reflexive_transitive_closure): Likewise.
9361 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9362 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9363 Likewise.
9364 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9365 Likewise.
9366
9367 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9368 Use size_t, not unsigned int, to count bytes.
9369 * lib/abitset.h (abitset_bytes): Likewise.
9370 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9371 Likewise.
9372 * lib/bitset.h (bitset_bytes): Likewise.
9373 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9374 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9375 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9376 * lib/ebitset.c (ebitset_bytes): Likewise.
9377 * lib/ebitset.h (ebitset_bytes): Likewise.
9378 * lib/lbitset.c (lbitset_bytes): Likewise.
9379 * lib/lbitset.h (lbitset_bytes): Likewise.
9380
9381 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9382 abitset_subset_p, abitset_disjoint_p, abitset_and,
9383 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9384 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9385 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9386 abitset_or_and, abitset_or_and_cmp):
9387 Use bitset_windex instead of unsigned int.
9388 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9389 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9390 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9391 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9392 Likewise.
9393 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9394
9395 * lib/bitset.c (bitset_print):
9396 Use proper printf formats for widths of integer types.
9397 * lib/bitset_stats.c (bitset_percent_histogram_print,
9398 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9399 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9400 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9401 * lib/lbitset.c (lbitset_bytes): Likewise.
9402
9403 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9404 BITSET_SIZE_MAX): New macros.
9405 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9406 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9407 to BITSET_WINDEX_MAX.
9408
9409 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9410 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9411 since we now return the bitset_bindex type (not int).
9412
9413 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9414 when computing sizes.
9415 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9416
9417 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9418 and avoid cast to unsigned.
9419
94202002-09-30 Akim Demaille <akim@epita.fr>
9421
9422 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9423 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9424 Updates from Michael Hayes.
9425
94262002-09-30 Art Haas <ahaas@neosoft.com>
9427
9428 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9429 invocations.
9430 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9431 defined.
9432
94332002-09-27 Akim Demaille <akim@epita.fr>
9434
9435 Version 1.49c.
9436
94372002-09-27 Akim Demaille <akim@epita.fr>
9438
9439 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9440 (Because of AC_LIBSOURCE).
9441
94422002-09-27 Akim Demaille <akim@epita.fr>
9443
9444 Playing with Autoscan.
9445
9446 * configure.ac: Remove the old LIBOBJ tweaks.
9447 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9448 * lib/strrchr.c: New.
9449 * lib/strtol.c: New, from the Coreutils 4.5.1.
9450
94512002-09-27 Akim Demaille <akim@epita.fr>
9452
9453 Playing with Autoscan.
9454
9455 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9456 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9457 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9458 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9459 Coreutils 4.5.1.
9460
94612002-09-24 Akim Demaille <akim@epita.fr>
9462
9463 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9464 (Frequently Asked Questions, Parser Stack Overflow): New.
9465
94662002-09-13 Akim Demaille <akim@epita.fr>
9467
9468 Playing with autoscan.
9469
9470 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9471 * src/files.c (skeleton_find): Remove, unused.
9472 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9473 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9474
94752002-09-13 Akim Demaille <akim@epita.fr>
9476
9477 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9478 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9479
94802002-09-13 Akim Demaille <akim@epita.fr>
9481
9482 * configure.ac: Require 2.54.
9483 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9484 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9485 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9486 Remove, provided by Autoconf macros.
9487
94882002-09-12 Akim Demaille <akim@epita.fr>
9489
9490 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9491
94922002-09-12 Akim Demaille <akim@epita.fr>
9493
9494 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9495 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9496 Reported by Martin Mokrejs.
9497
94982002-09-10 Akim Demaille <akim@epita.fr>
9499
9500 * src/parse-gram.y: Associate a human readable string to each
9501 token type.
9502 * tests/regression.at (Invalid inputs): Adjust.
9503
95042002-09-10 Gary V. Vaughan <gary@gnu.org>
9505
9506 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9507 with an Autoconf-2.5x style configure.ac.
9508
95092002-09-06 Paul Eggert <eggert@twinsun.com>
9510
9511 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9512 exception applies only to yacc.c. This is a modification of a
9513 patch originally suggested by Akim Demaille.
9514
95152002-09-06 Akim Demaille <akim@epita.fr>
9516
9517 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9518 here to...
9519 * data/yacc.c: here.
9520
9521 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9522 LocationType.
9523 (b4_ltype): Default to yy::Location from location.hh.
9524
95252002-09-04 Jim Meyering <jim@meyering.net>
9526
9527 * data/yacc.c: Guard the declaration of yytoknum also with
9528 `#ifdef YYPRINT', so it is declared only when used.
9529
95302002-09-04 Akim Demaille <akim@epita.fr>
9531
9532 * configure.in: Rename as...
9533 * configure.ac: this.
9534 Bump to 1.49c.
9535
95362002-09-04 Akim Demaille <akim@epita.fr>
9537
9538 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9539 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9540 translate maintainer only messages.
9541
95422002-08-12 Paul Eggert <eggert@twinsun.com>
9543
9544 Version 1.49b.
9545
9546 * Makefile.am (SUBDIRS): Remove intl.
9547 (DISTCLEANFILES): Remove.
9548 * NEWS: Mention that GNU M4 is now required. Clarify what is
9549 meant by "larger grammars". Mention the pt_BR translation.
9550 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9551 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9552 Bump version from 0.11.2 to 0.11.5.
9553 (BISON_PREREQ_STAGE): Remove.
9554 (AM_GNU_GETTEXT): Use external gettext.
9555 (AC_OUTPUT): Remove intl/Makefile.
9556
9557 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9558
9559 * data/glr.c: Include string.h, for strlen.
9560 (yyreportParseError): Use size_t for yysize.
9561 (yy_yypstack): No longer nested inside yypstates, as nested
9562 functions are not portable. Do not assume size_t is the
9563 same width as int.
9564 (yypstates): Do not assume that ptrdiff_t is the same width
9565 as int, and similarly for yyposn and YYINDEX.
9566
9567 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9568
9569 * lib/Makefile.am (INCLUDES): Do not include from the intl
9570 directory, which has been removed.
9571 * src/Makefile.am (INCLUDES): Likewise.
9572
9573 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9574 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9575 New vars.
9576
9577 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9578 * tests/Makefile.am (EXTRA_DIST): Likewise.
9579
9580 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9581 Do not assume that bitset_windex is the same width as unsigned.
9582
9583 * lib/abitset.c (abitset_unused_clear): Do not assume that
9584 bitset_word is the same width as int.
9585 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9586 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9587 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9588 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9589 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9590
9591 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9592 portability to one's complement hosts!).
9593 * lib/ebitset.c (ebitset_op1): Likewise.
9594 * lib/lbitset.c (lbitset_op1): Likewise.
9595
9596 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9597 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9598 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9599 Sync with fileutils.
9600 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9601 lib/gettext.h: Sync with diffutils.
9602
9603 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9604 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9605
9606 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9607 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9608 check for void *.
9609
9610 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9611 size_t; the old version tried to do this but casted improperly.
9612 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9613 (bitset_test): Now returns int, not unsigned long.
9614
9615 * lib/bitset_stats.c: Include "gettext.h".
9616 (_): New macro.
9617 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9618 name locals "index", as it generates unnecessary warnings on some
9619 hosts that have an "index" function.
9620
9621 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9622 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9623 they need translation.
9624 * src/LR0.c (state_list_append, new_itemsets, get_state,
9625 append_states, generate_states): Likewise.
9626 * src/assoc.c (assoc_to_string): Likewise.
9627 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9628 * src/gram.c (grammar_dump): Likewise.
9629 * src/injections.c (injections_compute): Likewise.
9630 * src/lalr.c (lookaheads_print): Likewise.
9631 * src/relation.c (relation_transpose): Likewise.
9632 * src/scan-gram.l: Likewise.
9633 * src/tables.c (table_grow, pack_vector): Likewise.
9634
9635 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9636 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9637 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9638 * m4/mbstate_t.m4: Sync with fileutils.
9639 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9640
9641 * po/LINGUAS: Add pt_BR.
9642 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9643 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9644 lib/timevar.c.
9645 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9646 manual recommends.
9647 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9648
9649 * src/complain.c (strerror_r): Remove decl; not needed.
9650 (strerror): Use same pattern as ../lib/error.c.
9651
9652 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9653
9654 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9655
9656 * src/main.c (main): Cast result of bindtextdomain and textdomain
9657 to void, to avoid a GCC warning when --disable-nls is in effect.
9658
9659 * src/scan-gram.l: Use strings rather than escapes when possible,
9660 to minimize the number of warnings from xgettext.
9661 (handle_action_dollar, handle_action_at): Don't use isdigit,
9662 as it mishandles negative chars and it may not work as expected
9663 outside the C locale.
9664
9665 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9666 this is a GCC extension and is not portable to other compilers.
9667
9668 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9669 Do not include <ctype.h>; no longer needed.
9670 Do not include <malloc.h>; no longer needed (and generates
9671 warnings on OpenBSD 3.0).
9672
9673 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9674 it's not portable.
9675
9676 * tests/regression.at: Do not use 'cc -c input.c -o input';
9677 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9678
9679 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9680 exit status as failure, not just exit status 1. Sun C exits
9681 with status 2 sometimes.
9682
9683 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9684 Use it for the two large tests.
9685
96862002-08-02 Akim Demaille <akim@epita.fr>
9687
9688 * src/conflicts.c (conflicts_output): Don't output rules never
9689 reduced here, since anyway that computation doesn't work.
9690 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9691 (rule_useless_p, rule_never_reduced_p): New.
9692 (grammar_rules_partial_print): Use a filter instead of a range.
9693 Display the title only if needed.
9694 (grammar_rules_print): Adjust.
9695 (grammar_rules_never_reduced_report): New.
9696 * src/tables.c (action_row): Move the computation of rules never
9697 reduced to...
9698 (token_actions): here.
9699 * src/main.c (main): Make the parser before making the report, so
9700 that rules never reduced are computed.
9701 Call grammar_rules_never_reduced_report.
9702 * src/print.c (print_results): Report rules never reduced.
9703 * tests/conflicts.at, tests/reduce.at: Adjust.
9704
97052002-08-01 Akim Demaille <akim@epita.fr>
9706
9707 Instead of attaching lookaheads and duplicating the rules being
9708 reduced by a state, attach the lookaheads to the reductions.
9709
9710 * src/state.h (state_t): Remove the `lookaheads',
9711 `lookaheads_rule' member.
9712 (reductions_t): Add a `lookaheads' member.
9713 Use a regular array for the `rules'.
9714 * src/state.c (reductions_new): Initialize the lookaheads member
9715 to 0.
9716 (state_rule_lookaheads_print): Adjust.
9717 * src/state.h, src/state.c (state_reductions_find): New.
9718 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9719 (count_rr_conflicts): Adjust.
9720 * src/lalr.c (LArule): Remove.
9721 (add_lookback_edge): Adjust.
9722 (state_lookaheads_count): New.
9723 (states_lookaheads_initialize): Merge into...
9724 (initialize_LA): this.
9725 (lalr_free): Adjust.
9726 * src/main.c (main): Don't free nullable and derives too early: it
9727 is used by --verbose.
9728 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9729
97302002-08-01 Akim Demaille <akim@epita.fr>
9731
9732 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9733 `rule_number_t**'.
9734 (set_derives, free_derives): Rename as...
9735 (derives_compute, derives_free): this.
9736 Adjust all dependencies.
9737 * src/nullable.c (set_nullable, free_nullable): Rename as...
9738 (nullable_compute, nullable_free): these.
9739 (rule_list_t): Store rule_t *, not rule_number_t.
9740 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9741 pointers, instead of their numbers.
9742 * src/main.c (main): Call nullable_free, and derives_free earlier,
9743 as they were lo longer used.
9744
97452002-08-01 Akim Demaille <akim@epita.fr>
9746
9747 * lib/timevar.c (get_time): Include children time.
9748 * src/lalr.h (LA, LArule): Don't export them: used with the
9749 state_t.
9750 * src/lalr.c (LA, LArule): Static.
9751 * src/lalr.h, src/lalr.c (lalr_free): New.
9752 * src/main.c (main): Call it.
9753 * src/tables.c (pack_vector): Check whether loc is >= to the
9754 table_size, not >.
9755 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9756 (tables_generate): do it, since that's also it which allocates
9757 them.
9758 Don't free LA and LArule, main does.
9759
97602002-07-31 Akim Demaille <akim@epita.fr>
9761
9762 Separate parser tables computation and output.
9763
9764 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9765 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9766 (yydefgoto, yydefact, high): Move to...
9767 * src/tables.h, src/tables.c: here.
9768 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9769 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9770 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9771 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9772 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9773 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9774 (action_row, save_row, token_actions, save_column, default_goto)
9775 (goto_actions, sort_actions, matching_state, pack_vector)
9776 (table_ninf_remap, pack_table, prepare_actions): Move to...
9777 * src/tables.c: here.
9778 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9779 * src/output.c (token_actions, output_base, output_conflicts)
9780 (output_check): Merge into...
9781 (prepare_actions): this.
9782 (actions_output): Rename as...
9783 (user_actions_output): this.
9784 * src/main.c (main): Call tables_generate and tables_free.
9785
97862002-07-31 Akim Demaille <akim@epita.fr>
9787
9788 Steal GCC's --time-report support.
9789
9790 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9791 stolen/adjusted from GCC.
9792 * m4/stage.m4: Remove time related checks.
9793 * m4/timevar.m4: New.
9794 * configure.in: Adjust.
9795 * src/system.h: Adjust to using timevar.h.
9796 * src/getargs.h, src/getargs.c: Support trace_time for
9797 --trace=time.
9798 * src/main.c (stage): Remove.
9799 (main): Replace `stage' invocations with timevar calls.
9800 * src/output.c: Insert pertinent timevar calls.
9801
98022002-07-31 Akim Demaille <akim@epita.fr>
9803
9804 Let --trace have arguments.
9805
9806 * src/getargs.h (enum trace_e): New.
9807 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9808 (long_options, short_options): --trace/-T takes an optional
9809 argument.
9810 Change all the uses of trace_flag to reflect the new flags.
9811 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9812
9813 Strengthen `stage' portability.
9814
9815 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9816 * configure.in: Use it.
9817 Don't check for malloc.h and sys/times.h.
9818 * src/system.h: Include them when appropriate.
9819 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9820 times and struct tms are available.
9821
98222002-07-30 Akim Demaille <akim@epita.fr>
9823
9824 In verbose parse error message, don't report `error' as an
9825 expected token.
9826 * tests/actions.at (Printers and Destructors): Adjust.
9827 * tests/calc.at (Calculator $1): Adjust.
9828 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9829 error message, do not report the parser accepts the error token in
9830 that state.
9831
98322002-07-30 Akim Demaille <akim@epita.fr>
9833
9834 Normalize conflict related messages.
9835
9836 * src/complain.h, src/complain.c (warn, complain): New.
9837 * src/conflicts.c (conflicts_print): Use them.
9838 (conflict_report_yacc): New, extracted from...
9839 (conflicts_print): here.
9840 * tests/conflicts.at, tests/existing.at: Adjust.
9841
98422002-07-30 Akim Demaille <akim@epita.fr>
9843
9844 Report rules which are never reduced by the parser: those hidden
9845 by conflicts.
9846
9847 * src/LR0.c (save_reductions): Don't make the final state too
9848 different: save its reduction (accept) instead of having a state
9849 without any action (no shift or goto, no reduce).
9850 Note: the final state is now a ``regular'' state, i.e., the
9851 parsers now contain `reduce 0' as default reduction.
9852 Nevertheless, since they decide to `accept' when yystate =
9853 final_state, they still will not reduce rule 0.
9854 * src/print.c (print_actions, print_reduction): Adjust.
9855 * src/output.c (action_row): Track reduced rules.
9856 (token_actions): Report rules never reduced.
9857 * tests/conflicts.at, tests/regression.at: Adjust.
9858
98592002-07-30 Akim Demaille <akim@epita.fr>
9860
9861 `stage' was accidently included in a previous patch.
9862 Initiate its autoconfiscation.
9863
9864 * configure.in: Look for malloc.h and sys/times.h.
9865 * src/main.c (stage): Adjust.
9866 Report only when trace_flag.
9867
98682002-07-29 Akim Demaille <akim@epita.fr>
9869
9870 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9871 state_number_t.
9872 (errs_t): symbol_t*, not symbol_number_t.
9873 (reductions_t): rule_t*, not rule_number_t.
9874 (FOR_EACH_SHIFT): New.
9875 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9876 * src/print.c, src/print_graph.c: Adjust.
9877
98782002-07-29 Akim Demaille <akim@epita.fr>
9879
9880 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9881
9882 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9883 (endtoken, accept): these.
9884 * src/reader.c (reader): Set endtoken's default tag to "$end".
9885 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9886 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9887 Adjust.
9888
98892002-07-29 Akim Demaille <akim@epita.fr>
9890
9891 * src/reduce.c (reduce_grammar): When the language is empty,
9892 complain about the start symbol, not the axiom.
9893 Use its location.
9894 * tests/reduce.at (Empty Language): New.
9895
98962002-07-26 Akim Demaille <akim@epita.fr>
9897
9898 * src/reader.h, src/reader.c (gram_error): ... can't get
9899 yycontrol without making too strong assumptions on the parser
9900 itself.
9901 * src/output.c (prepare_tokens): Use the real 0th value of
9902 token_translations instead of `0'.
9903 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9904 visible here.
9905 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9906 for the time being: %locations ought to provide it to yyerror.
9907
99082002-07-25 Akim Demaille <akim@epita.fr>
9909
9910 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9911 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9912 * tests/regression.at (Web2c Actions): Adjust.
9913
99142002-07-25 Akim Demaille <akim@epita.fr>
9915
9916 Stop storing rules from 1 to nrules + 1.
9917
9918 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9919 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9920 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9921 Iterate from 0 to nrules.
9922 Use rule_number_as_item_number and item_number_as_rule_number.
9923 Adjust to `derive' now containing possibly 0.
9924 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9925 Handle the `- 1' part in rule numbers from/to item numbers.
9926 * src/conflicts.c (log_resolution): Fix the message which reversed
9927 shift and reduce.
9928 * src/output.c (action_row): Initialize default_rule to -1.
9929 (token_actions): Adjust.
9930 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9931 expected output.
9932 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9933
99342002-07-25 Akim Demaille <akim@epita.fr>
9935
9936 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9937 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9938 (b4_c_knr_arg_decl): New.
9939 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9940 yyreport_parse_error.
9941
99422002-07-25 Akim Demaille <akim@epita.fr>
9943
9944 * data/yacc.c (yyreport_parse_error): New, extracted from...
9945 (yyparse): here.
9946 (yydestruct, yysymprint): Move above yyparse.
9947 Be K&R compliant.
9948
99492002-07-25 Akim Demaille <akim@epita.fr>
9950
9951 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9952 replace...
9953 (b4_sint_type, b4_uint_type): these.
9954 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9955 * tests/regression.at (Web2c Actions): Adjust.
9956
99572002-07-25 Akim Demaille <akim@epita.fr>
9958
9959 * src/gram.h (TIEM_NUMBER_MAX): New.
9960 (item_number_of_rule_number, rule_number_of_item_number): Rename
9961 as...
9962 (rule_number_as_item_number, item_number_as_rule_number): these.
9963 Adjust dependencies.
9964 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9965 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9966 (symbol_number_to_vector_number): New.
9967 (order): Of vector_number_t* type.
9968 (base_t, BASE_MAX, BASE_MIN): New.
9969 (froms, tos, width, pos, check): Of base_t type.
9970 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9971 (actrow): Of action_number_t type.
9972 (conflrow): Of unsigned int type.
9973 (table_ninf, base_ninf): New.
9974 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9975 (muscle_insert_int_table, muscle_insert_base_table)
9976 (muscle_insert_rule_number_table): New.
9977 (prepare_tokens): Output `toknum' as int_table.
9978 (action_row): Returns a rule_number_t.
9979 Use ACTION_MIN, not SHRT_MIN.
9980 (token_actions): yydefact is rule_number_t*.
9981 (table_ninf_remap): New.
9982 (pack_table): Use it for `base' and `table'.
9983 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9984 replaced with...
9985 (YYPACT_NINF, YYTABLE_NINF): these.
9986 (yypact, yytable): Compute their types instead of hard-coded
9987 `short'.
9988 * tests/regression.at (Web2c Actions): Adjust.
9989
99902002-07-19 Akim Demaille <akim@epita.fr>
9991
9992 * src/scan-gram.l (id): Can start with an underscore.
9993
99942002-07-16 Akim Demaille <akim@epita.fr>
9995
9996 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9997 Adjust all former `associativity' dependencies.
9998 * src/symtab.c (symbol_new): Default associativity is `undef', not
9999 `right'.
10000 (symbol_check_alias_consistence): Adjust.
10001
100022002-07-09 Akim Demaille <akim@epita.fr>
10003
10004 * doc/bison.texinfo: Properly set the ``header'' part.
10005 Use @dircategory ``GNU programming tools'' as per Texinfo's
10006 documentation.
10007 Use @copying.
10008
100092002-07-09 Akim Demaille <akim@epita.fr>
10010
10011 * lib/quotearg.h: Protect against multiple inclusions.
10012 * src/location.h (location_t): Add a `file' member.
10013 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10014 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10015 `error_one_per_line' support.
10016
100172002-07-09 Akim Demaille <akim@epita.fr>
10018
10019 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10020 * src/reader.c (lineno): Remove.
10021 Adjust all dependencies.
10022 (get_merge_function): Take a location and use complain_at.
10023 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10024 * tests/regression.at (Invalid inputs, Mixing %token styles):
10025 Adjust.
10026
100272002-07-09 Akim Demaille <akim@epita.fr>
10028
10029 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10030 recovery rule, and forbid extensions when --yacc.
10031 (gram_error): Use complain_at.
10032 * src/reader.c (reader): Exit if there were parse errors.
10033
100342002-07-09 Akim Demaille <akim@epita.fr>
10035
10036 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10037 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10038 Reported by R Blake <blakers@mac.com>.
10039
100402002-07-09 Akim Demaille <akim@epita.fr>
10041
10042 * data/yacc.c: Output the copyright notive in the header.
10043
100442002-07-03 Akim Demaille <akim@epita.fr>
10045
10046 * src/output.c (froms, tos): Are state_number_t.
10047 (save_column): sp, sp1, and sp2 are state_number_t.
10048 (prepare): Rename `final' as `final_state_number', `nnts' as
10049 `nterms_number', `nrules' as `rules_number', `nstates' as
10050 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10051 unused.
10052 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10053 * data/lalr1.cc (nsym_): Remove, unused.
10054
100552002-07-03 Akim Demaille <akim@epita.fr>
10056
10057 * src/lalr.h, src/lalr.c (goto_number_t): New.
10058 * src/lalr.c (goto_list_t): New.
10059 Propagate them.
10060 * src/nullable.c (rule_list_t): New.
10061 Propagate.
10062 * src/types.h: Remove.
10063
100642002-07-03 Akim Demaille <akim@epita.fr>
10065
10066 * src/closure.c (print_fderives): Use rule_rhs_print.
10067 * src/derives.c (print_derives): Use rule_rhs_print.
10068 (rule_list_t): New, replaces `shorts'.
10069 (set_derives): Add comments.
10070 * tests/sets.at (Nullable, Firsts): Adjust.
10071
100722002-07-03 Akim Demaille <akim@epita.fr>
10073
10074 * src/output.c (prepare_actions): Free `tally' and `width'.
10075 (prepare_actions): Allocate and free `order'.
10076 * src/symtab.c (symbols_free): Free `symbols'.
10077 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10078 * src/output.c (m4_invoke): Move to...
10079 * src/scan-skel.l: here.
10080 (<<EOF>>): Close yyout, and free its name.
10081
100822002-07-03 Akim Demaille <akim@epita.fr>
10083
10084 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10085
10086 * src/LR0.c (new_state): Merge into...
10087 (state_list_append): this.
10088 (new_states): Merge into...
10089 (generate_states): here.
10090 (set_states): Don't ensure a proper `errs' state member here, do it...
10091 * src/conflicts.c (conflicts_solve): here.
10092 * src/state.h, src/state.c: Comment changes.
10093 (state_t): Rename member `shifts' as `transitions'.
10094 Adjust all dependencies.
10095 (errs_new): For consistency, also take the values as argument.
10096 (errs_dup): Remove.
10097 (state_errs_set): New.
10098 (state_reductions_set, state_transitions_set): Assert that no
10099 previous value was assigned.
10100 (state_free): New.
10101 (states_free): Use it.
10102 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10103 temporary storage: use `errs' and `nerrs' as elsewhere.
10104 (set_conflicts): Allocate and free this `errs'.
10105
101062002-07-02 Akim Demaille <akim@epita.fr>
10107
10108 * lib/libiberty.h: New.
10109 * lib: Update the bitset implementation from upstream.
10110 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10111 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10112 * src/main.c: Adjust bitset stats calls.
10113
101142002-07-01 Paul Eggert <eggert@twinsun.com>
10115
10116 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10117 char, so that negative chars don't collide with $.
10118
101192002-06-30 Akim Demaille <akim@epita.fr>
10120
10121 Have the GLR tests be `warning' checked, and fix the warnings.
10122
10123 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10124 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10125 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10126 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10127 (yyaddDeferredAction): static.
10128 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10129 (yyreportParseError): yyprefix is const.
10130 yytokenp is used only when verbose.
10131 (yy__GNUC__): Replace with __GNUC__.
10132 (yypdumpstack): yyi is size_t.
10133 (yypreference): Un-yy local variables and arguments, to avoid
10134 clashes with `yyr1'. Anyway, we are not in the user name space.
10135 (yytname_size): be an int, as is compared with ints.
10136 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10137 Use them.
10138 * tests/cxx-gram.at: Use quotation to protect $1.
10139 Use AT_COMPILE to enable warnings hunts.
10140 Prototype yylex and yyerror.
10141 `Use' argc.
10142 Include `string.h', not `strings.h'.
10143 Produce and prototype stmtMerge only when used.
10144 yylex takes a location.
10145
101462002-06-30 Akim Demaille <akim@epita.fr>
10147
10148 We spend a lot of time in quotearg, in particular when --verbose.
10149
10150 * src/symtab.c (symbol_get): Store a quoted version of the key.
10151 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10152 Adjust all callers.
10153
101542002-06-30 Akim Demaille <akim@epita.fr>
10155
10156 * src/state.h (reductions_t): Rename member `nreds' as num.
10157 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10158 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10159
101602002-06-30 Akim Demaille <akim@epita.fr>
10161
10162 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10163 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10164 (shifts_to): Rename as...
10165 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10166 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10167 (TRANSITION_IS_DISABLED, transitions_to): these.
10168
101692002-06-30 Akim Demaille <akim@epita.fr>
10170
10171 * src/print.c (print_shifts, print_gotos): Merge into...
10172 (print_transitions): this.
10173 (print_transitions, print_errs, print_reductions): Align the
10174 lookaheads columns.
10175 (print_core, print_transitions, print_errs, print_state,
10176 print_grammar): Output empty lines separator before, not after.
10177 (state_default_rule_compute): Rename as...
10178 (state_default_rule): this.
10179 * tests/conflicts.at (Defaulted Conflicted Reduction),
10180 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10181 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10182
101832002-06-30 Akim Demaille <akim@epita.fr>
10184
10185 Display items as we display rules.
10186
10187 * src/gram.h, src/gram.c (rule_lhs_print): New.
10188 * src/gram.c (grammar_rules_partial_print): Use it.
10189 * src/print.c (print_core): Likewise.
10190 * tests/conflicts.at (Defaulted Conflicted Reduction),
10191 (Unresolved SR Conflicts): Adjust.
10192 (Unresolved SR Conflicts): Adjust and rename as...
10193 (Resolved SR Conflicts): this, as was meant.
10194 * tests/regression.at (Web2c Report): Adjust.
10195
101962002-06-30 Akim Demaille <akim@epita.fr>
10197
10198 * src/print.c (state_default_rule_compute): New, extracted from...
10199 (print_reductions): here.
10200 Pessimize, but clarify the code.
10201 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10202
102032002-06-30 Akim Demaille <akim@epita.fr>
10204
10205 * src/output.c (action_row): Let default_rule be always a rule
10206 number.
10207
102082002-06-30 Akim Demaille <akim@epita.fr>
10209
10210 * src/closure.c (print_firsts, print_fderives, closure):
10211 Use BITSET_EXECUTE.
10212 * src/lalr.c (lookaheads_print): Likewise.
10213 * src/state.c (state_rule_lookaheads_print): Likewise.
10214 * src/print_graph.c (print_core): Likewise.
10215 * src/print.c (print_reductions): Likewise.
10216 * src/output.c (action_row): Likewise.
10217 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10218
102192002-06-30 Akim Demaille <akim@epita.fr>
10220
10221 * src/print_graph.c: Use report_flag.
10222
102232002-06-30 Akim Demaille <akim@epita.fr>
10224
10225 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10226 to...
10227 * src/relation.h, src/relation.c (traverse, relation_digraph)
10228 (relation_print, relation_transpose): New.
10229
102302002-06-30 Akim Demaille <akim@epita.fr>
10231
10232 * src/state.h, src/state.c (shifts_to): New.
10233 * src/lalr.c (build_relations): Use it.
10234
102352002-06-30 Akim Demaille <akim@epita.fr>
10236
10237 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10238 (item_number_of_rule_number, rule_number_of_item_number): New.
10239 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10240 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10241 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10242 Propagate their use.
10243 Much remains to be done, in particular wrt `shorts' from types.h.
10244
102452002-06-30 Akim Demaille <akim@epita.fr>
10246
10247 * src/symtab.c (symbol_new): Initialize the `printer' member.
10248
102492002-06-30 Akim Demaille <akim@epita.fr>
10250
10251 * src/LR0.c (save_reductions): Remove, replaced by...
10252 * src/state.h, src/state.c (state_reductions_set): New.
10253 (reductions, errs): Rename as...
10254 (reductions_t, errs_t): these.
10255 Adjust all dependencies.
10256
102572002-06-30 Akim Demaille <akim@epita.fr>
10258
10259 * src/LR0.c (state_list_t, state_list_append): New.
10260 (first_state, last_state): Now symbol_list_t.
10261 (this_state): Remove.
10262 (new_itemsets, append_states, save_reductions): Take a state_t as
10263 argument.
10264 (set_states, generate_states): Adjust.
10265 (save_shifts): Remove, replaced by...
10266 * src/state.h, src/state.c (state_shifts_set): New.
10267 (shifts): Rename as...
10268 (shifts_t): this.
10269 Adjust all dependencies.
10270 * src/state.h (state_t): Remove the `next' member.
10271
102722002-06-30 Akim Demaille <akim@epita.fr>
10273
10274 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10275 escaped in slot 0.
10276
102772002-06-30 Akim Demaille <akim@epita.fr>
10278
10279 Use hash.h for the state hash table.
10280
10281 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10282 (allocate_storage): Use state_hash_new.
10283 (free_storage): Use state_hash_free.
10284 (new_state, get_state): Adjust.
10285 * src/lalr.h, src/lalr.c (states): Move to...
10286 * src/states.h (state_t): Remove the `link' member, no longer
10287 used.
10288 * src/states.h, src/states.c: here.
10289 (state_hash_new, state_hash_free, state_hash_lookup)
10290 (state_hash_insert, states_free): New.
10291 * src/states.c (state_table, state_compare, state_hash): New.
10292 * src/output.c (output_actions): Do not free states now, since we
10293 still need to know the final_state number in `prepare', called
10294 afterwards. Do it...
10295 * src/main.c (main): here: call states_free after `output'.
10296
102972002-06-30 Akim Demaille <akim@epita.fr>
10298
10299 * src/state.h, src/state.c (state_new): New, extracted from...
10300 * src/LR0.c (new_state): here.
10301 * src/state.h (STATE_ALLOC): Move to...
10302 * src/state.c: here.
10303 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10304 * src/state.h, src/state.c: here.
10305
103062002-06-30 Akim Demaille <akim@epita.fr>
10307
10308 * src/reader.c (gensym): Rename as...
10309 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10310 (getsym): Rename as...
10311 (symbol_get): this.
10312
103132002-06-30 Akim Demaille <akim@epita.fr>
10314
10315 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10316 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10317 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10318 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10319
103202002-06-30 Akim Demaille <akim@epita.fr>
10321
10322 Make the test suite pass with warnings checked.
10323
10324 * tests/actions.at (Printers and Destructors): Improve.
10325 Avoid unsigned vs. signed issues.
10326 * tests/calc.at: Don't exercise the scanner here, do it...
10327 * tests/input.at (Torturing the Scanner): here.
10328
103292002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10330
10331 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10332 reorganize first lines parallel to yacc.c.
10333
103342002-06-28 Akim Demaille <akim@epita.fr>
10335
10336 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10337 (b4_token_enum, b4_token_defines): New, factored from...
10338 * data/lalr1.cc, data/yacc.c, glr.c: here.
10339
103402002-06-28 Akim Demaille <akim@epita.fr>
10341
10342 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10343 unused variables.
10344 * src/output.c (merger_output): static.
10345
103462002-06-28 Akim Demaille <akim@epita.fr>
10347
10348 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10349 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10350 pacify GCC.
10351 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10352
103532002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10354
10355 Accumulated changelog for new GLR parsing features.
10356
10357 * src/conflicts.c (count_total_conflicts): Change name to
10358 conflicts_total_count.
10359 * src/conflicts.h: Ditto.
10360 * src/output.c (token_actions): Use the new name.
10361 (output_conflicts): Change conflp => conflict_list_heads, and
10362 confl => conflict_list for better readability.
10363 * data/glr.c: Use the new names.
10364 * NEWS: Add self to GLR announcement.
10365
10366 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10367
10368 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10369 Akim Demaille.
10370
10371 * data/bison.glr: Change name to glr.c
10372 * data/glr.c: Renamed from bison.glr.
10373 * data/Makefile.am: Add glr.c
10374
10375 * src/getargs.c:
10376
10377 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10378 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10379
10380 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10381
10382 * data/bison.glr: Be sure to restore the
10383 current #line when returning to the skeleton contents after having
10384 exposed the input file's #line.
10385
10386 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10387
10388 * data/bison.glr: Bring up to date with changes to bison.simple.
10389
10390 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10391
10392 * data/bison.glr: Correct definitions that use b4_prefix.
10393 Various reformatting.
10394 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10395 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10396 yytokenp argument; now part of stack.
10397 (yychar): Define to behave as documented.
10398 (yyclearin): Ditto.
10399
10400 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10401
10402 * src/reader.h: Add declaration for free_merger_functions.
10403
10404 * src/reader.c (merge_functions): New variable.
10405 (get_merge_function): New function.
10406 (free_merger_functions): New function.
10407 (readgram): Check for %prec that is not followed by a symbol.
10408 Handle %dprec and %merge declarations.
10409 (packgram): Initialize dprec and merger fields in rules array.
10410
10411 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10412 conflict_list_cnt, conflict_list_free): New variables.
10413 (table_grow): Also grow conflict_table.
10414 (prepare_rules): Output dprec and merger tables.
10415 (conflict_row): New function.
10416 (action_row): Output conflict lists for GLR parser. Don't use
10417 default reduction in conflicted states for GLR parser so that there
10418 are spaces for the conflict lists.
10419 (save_row): Also save conflict information.
10420 (token_actions): Allocate conflict list.
10421 (merger_output): New function.
10422 (pack_vector): Pack conflict table, too.
10423 (output_conflicts): New function to output yyconflp and yyconfl.
10424 (output_check): Allocate conflict_tos.
10425 (output_actions): Output conflict tables, also.
10426 (output_skeleton): Output b4_mergers definition.
10427 (prepare): Output b4_max_rhs_length definition.
10428 Use 'bison.glr' as default skeleton for GLR parsers.
10429
10430 * src/gram.c (glr_parser): New flag.
10431 (grammar_free): Call free_merger_functions.
10432
10433 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10434 all pairs of conflicting reductions, rather than just all tokens
10435 causing conflicts. Needed to size conflict tables.
10436 (conflicts_output): Modify call to count_rr_conflicts for new
10437 interface.
10438 (conflicts_print): Ditto.
10439 (count_total_conflicts): New function.
10440
10441 * src/reader.h (merger_list): New type.
10442 (merge_functions): New variable.
10443
10444 * src/lex.h (tok_dprec, tok_merge): New token types.
10445
10446 * src/gram.h (rule_s): Add dprec and merger fields.
10447 (glr_parser): New flag.
10448
10449 * src/conflicts.h (count_total_conflicts): New function.
10450
10451 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10452
10453 * doc/bison.texinfo (Generalized LR Parsing): New section.
10454 (GLR Parsers): New section.
10455 (Language and Grammar): Mention GLR parsing.
10456 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10457 Correct typo ("tge" -> "the").
10458
10459 * data/bison.glr: New skeleton for GLR parsing.
10460
10461 * tests/cxx-gram.at: New tests for GLR parsing.
10462
10463 * tests/testsuite.at: Include cxx-gram.at.
10464
10465 * tests/Makefile.am: Add cxx-gram.at.
10466
10467 * src/parse-gram.y:
10468
10469 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10470
10471 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10472
104732002-06-27 Akim Demaille <akim@epita.fr>
10474
10475 * src/options.h, src/options.c: Remove.
10476 * src/getargs.c (short_options, long_options): New.
10477
104782002-06-27 Akim Demaille <akim@epita.fr>
10479
10480 * data/bison.simple, data/bison.c++: Rename as...
10481 * data/yacc.c, data/lalr1.cc: these.
10482 * doc/bison.texinfo (Environment Variables): Remove.
10483
104842002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10485
10486 * src/getargs.c (report_argmatch): Initialize strtok().
10487
104882002-06-20 Akim Demaille <akim@epita.fr>
10489
10490 * data/bison.simple (b4_symbol_actions): New, replaces...
10491 (b4_symbol_destructor, b4_symbol_printer): these.
10492 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10493 user token numbers.
10494
104952002-06-20 Akim Demaille <akim@epita.fr>
10496
10497 * data/bison.simple (yydestructor): Rename as...
10498 (yydestruct): this.
10499
105002002-06-20 Akim Demaille <akim@epita.fr>
10501
10502 * src/symtab.h, src/symtab.c (symbol_type_set)
10503 (symbol_destructor_set, symbol_precedence_set): The location is
10504 the last argument.
10505 Adjust all callers.
10506
105072002-06-20 Akim Demaille <akim@epita.fr>
10508
10509 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10510 internals.
10511 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10512 Takes a location.
10513 * src/symtab.h, src/symtab.c (symbol_class_set)
10514 (symbol_user_token_number_set): Likewise.
10515 Adjust all callers.
10516 Promote complain_at.
10517 * tests/input.at (Type Clashes): Adjust.
10518
105192002-06-20 Akim Demaille <akim@epita.fr>
10520
10521 * data/bison.simple (YYLEX): Fix the declaration when
10522 %pure-parser.
10523
105242002-06-20 Akim Demaille <akim@epita.fr>
10525
10526 * data/bison.simple (yysymprint): Don't print the token number,
10527 just its name.
10528 * tests/actions.at (Destructors): Rename as...
10529 (Printers and Destructors): this.
10530 Also exercise %printer.
10531
105322002-06-20 Akim Demaille <akim@epita.fr>
10533
10534 * data/bison.simple (YYDSYMPRINT): New.
10535 Use it to remove many of the #if YYDEBUG/if (yydebug).
10536
105372002-06-20 Akim Demaille <akim@epita.fr>
10538
10539 * src/symtab.h, src/symtab.c (symbol_t): printer and
10540 printer_location are new members.
10541 (symbol_printer_set): New.
10542 * src/parse-gram.y (PERCENT_PRINTER): New token.
10543 Handle its associated rule.
10544 * src/scan-gram.l: Adjust.
10545 (handle_destructor_at, handle_destructor_dollar): Rename as...
10546 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10547 * src/output.c (symbol_printers_output): New.
10548 (output_skeleton): Call it.
10549 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10550 since there are already many grammar files with a user `yyprint'.
10551 Replace the calls to YYPRINT to calls to yysymprint.
10552 * tests/calc.at: Adjust.
10553 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10554 taking advantage of parser very internal details (stack size!).
10555
105562002-06-20 Akim Demaille <akim@epita.fr>
10557
10558 * src/scan-gram.l: Complete the scanner with the missing patterns
10559 to pacify Flex.
10560 Use `quote' and `symbol_tag_get' where appropriate.
10561
105622002-06-19 Akim Demaille <akim@epita.fr>
10563
10564 * tests/actions.at (Destructors): Augment to test locations.
10565 * data/bison.simple (yydestructor): Pass it the current location
10566 if locations are enabled.
10567 Prototype only when __STDC__ or C++.
10568 Change the argument names to move into the yy name space: there is
10569 user code here.
10570
105712002-06-19 Akim Demaille <akim@epita.fr>
10572
10573 * data/bison.simple (b4_pure_if): New.
10574 Use it instead of #ifdef YYPURE.
10575
105762002-06-19 Akim Demaille <akim@epita.fr>
10577
10578 * data/bison.simple (b4_location_if): New.
10579 Use it instead of #ifdef YYLSP_NEEDED.
10580
105812002-06-19 Akim Demaille <akim@epita.fr>
10582
10583 Prepare @$ in %destructor, but currently don't bind it in the
10584 skeleton, as %location use is not cleaned up yet.
10585
10586 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10587 (handle_action_at): New.
10588 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10589 a braced_code_t and a location as additional arguments.
10590 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10591 unquote one when outputting `b4_dollar_dollar'.
10592 Adjust callers.
10593 * data/bison.simple (b4_eval): Remove.
10594 (b4_symbol_destructor): Adjust.
10595 * tests/input.at (Invalid @n): Adjust.
10596
105972002-06-19 Zack Weinberg <zack@codesourcery.com>
10598
10599 * doc/bison.texinfo: Document ability to have multiple
10600 prologue sections.
10601
106022002-06-18 Akim Demaille <akim@epita.fr>
10603
10604 * src/files.c (compute_base_names): When computing the output file
10605 names from the input file name, strip the directory part.
10606
106072002-06-18 Akim Demaille <akim@epita.fr>
10608
10609 * data/bison.simple.new: Comment changes.
10610 Reported by Andreas Schwab.
10611
106122002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10613
10614 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10615 there are no `label `yyoverflowlab' defined but not used' warnings
10616 when yyoverflow is defined.
10617
106182002-06-18 Akim Demaille <akim@epita.fr>
10619
10620 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10621 new member.
10622 (symbol_destructor_set): Adjust.
10623 * src/output.c (symbol_destructors_output): Output the destructor
10624 locations.
10625 Output the symbol name.
10626 * data/bison.simple (b4_symbol_destructor): Adjust.
10627
106282002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10629 and Akim Demaille <akim@epita.fr>
10630
10631 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10632 what's left on the stack when the error recovery hits EOF.
10633 * tests/actions.at (Destructors): Complete to exercise this case.
10634
106352002-06-17 Akim Demaille <akim@epita.fr>
10636
10637 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10638 arguments is really empty, not only equal to `[]'.
10639 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10640 member.
10641 (symbol_destructor_set): New.
10642 * src/output.c (symbol_destructors_output): New.
10643 * src/reader.h (brace_code_t, current_braced_code): New.
10644 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10645 (handle_dollar): Rename as...
10646 (handle_action_dollar): this.
10647 (handle_destructor_dollar): New.
10648 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10649 (grammar_declaration): Use it.
10650 * data/bison.simple (yystos): Is always defined.
10651 (yydestructor): New.
10652 * tests/actions.at (Destructors): New.
10653 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10654
106552002-06-17 Akim Demaille <akim@epita.fr>
10656
10657 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10658 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10659 rule_length only when needed.
10660 * src/output.c (actions_output, token_definitions_output): Output
10661 the full M4 block.
10662 * src/symtab.c: Don't access directly to the symbol tag, use
10663 symbol_tag_get.
10664 * src/parse-gram.y: Use symbol_list_free.
10665
106662002-06-17 Akim Demaille <akim@epita.fr>
10667
10668 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10669 (symbol_list_prepend, get_type_name): Move to...
10670 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10671 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10672 Adjust all callers.
10673 (symbol_list_free): New.
10674 * src/scan-gram.l (handle_dollar): Takes a location.
10675 * tests/input.at (Invalid $n): Adjust.
10676
106772002-06-17 Akim Demaille <akim@epita.fr>
10678
10679 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10680 (symbol_list_prepend): New.
10681 * src/parse-gram.y (%union): `list' is a new member.
10682 (symbols.1): New, replaces...
10683 (terms_to_prec.1, nterms_to_type.1): these.
10684 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10685 Take a location as additional argument.
10686 Adjust all callers.
10687
106882002-06-15 Akim Demaille <akim@epita.fr>
10689
10690 * src/parse-gram.y: Move %token in the declaration section so that
10691 we don't depend upon CVS Bison.
10692
106932002-06-15 Akim Demaille <akim@epita.fr>
10694
10695 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10696 * src/print.c (print_core): Use it.
10697
106982002-06-15 Akim Demaille <akim@epita.fr>
10699
10700 * src/conflicts.c (log_resolution): Accept the rule involved in
10701 the sr conflicts instead of the lookahead number that points to
10702 that rule.
10703 (flush_reduce): Accept the current lookahead vector as argument,
10704 instead of the index in LA.
10705 (resolve_sr_conflict): Accept the current number of lookahead
10706 bitset to consider for the STATE, instead of the index in LA.
10707 (set_conflicts): Adjust.
10708 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10709
107102002-06-15 Akim Demaille <akim@epita.fr>
10711
10712 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10713 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10714 Adjust all dependencies.
10715 * src/lalr.c (initialize_lookaheads): Split into...
10716 (states_lookaheads_count, states_lookaheads_initialize): these.
10717 (lalr): Adjust.
10718
107192002-06-15 Akim Demaille <akim@epita.fr>
10720
10721 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10722 out of...
10723 (grammar_rules_print): here.
10724 * src/reduce.c (reduce_output): Use it.
10725 * tests/reduce.at (Useless Rules, Reduced Automaton)
10726 (Underivable Rules): Adjust.
10727
107282002-06-15 Akim Demaille <akim@epita.fr>
10729
10730 Copy BYacc's nice way to report the grammar.
10731
10732 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10733 New.
10734 Don't print the rules' location, it is confusing and useless.
10735 (rule_print): Use grammar_rhs_print.
10736 * src/print.c (print_grammar): Use grammar_rules_print.
10737
107382002-06-15 Akim Demaille <akim@epita.fr>
10739
10740 Complete and rationalize `useless thing' warnings.
10741
10742 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10743 (symbol_tag_print): New.
10744 Use them everywhere in place of accessing directly the tag member.
10745 * src/gram.h, src/gram.c (rule_print): New.
10746 Use it where a rule used to be printed `by hand'.
10747 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10748 (reduce_grammar_tables): Report the useless rules.
10749 (reduce_print): Useless things are a warning, not an error.
10750 Report it as such.
10751 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10752 (Reduced Automaton, Underivable Rules): Adjust.
10753 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10754 * tests/conflicts.at (Unresolved SR Conflicts)
10755 (Solved SR Conflicts): Adjust.
10756
107572002-06-15 Akim Demaille <akim@epita.fr>
10758
10759 Let symbols have a location.
10760
10761 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10762 (getsym): Adjust.
10763 Adjust all callers.
10764 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10765 Use location_t, not int.
10766 * src/symtab.c (symbol_check_defined): Take advantage of the
10767 location.
10768 * tests/regression.at (Invalid inputs): Adjust.
10769
107702002-06-15 Akim Demaille <akim@epita.fr>
10771
10772 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10773 (input): Don't try to initialize yylloc here, do it in the
10774 scanner.
10775 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10776 * src/gram.h (rule_t): Change line and action_line into location
10777 and action_location, of location_t type.
10778 Adjust all dependencies.
10779 * src/location.h, src/location.c (empty_location): New.
10780 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10781 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10782 (grammar_current_rule_symbol_append)
10783 (grammar_current_rule_action_append): Expect a location as argument.
10784 * src/reader.c (grammar_midrule_action): Adjust to attach an
10785 action's location as dummy symbol location.
10786 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10787 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10788 the line numbers.
10789
107902002-06-14 Akim Demaille <akim@epita.fr>
10791
10792 Grammar declarations may be found in the grammar section.
10793
10794 * src/parse-gram.y (rules_or_grammar_declaration): New.
10795 (declarations): Each declaration may end with a semicolon, not
10796 just...
10797 (grammar_declaration): `"%union"'.
10798 (grammar): Branch to rules_or_grammar_declaration.
10799
108002002-06-14 Akim Demaille <akim@epita.fr>
10801
10802 * src/main.c (main): Invoke scanner_free.
10803
108042002-06-14 Akim Demaille <akim@epita.fr>
10805
10806 * src/output.c (m4_invoke): Extracted from...
10807 (output_skeleton): here.
10808 Free tempfile.
10809
108102002-06-14 Akim Demaille <akim@epita.fr>
10811
10812 * src/parse-gram.y (directives, directive, gram)
10813 (grammar_directives, precedence_directives, precedence_directive):
10814 Rename as...
10815 (declarations, declaration, grammar, grammar_declaration)
10816 (precedence_declaration, precedence_declarator): these.
10817 (symbol_declaration): New.
10818
108192002-06-14 Akim Demaille <akim@epita.fr>
10820
10821 * src/files.c (action_obstack): Remove, unused.
10822 (output_obstack): Remove it, and all its dependencies, as it is no
10823 longer needed.
10824 * src/reader.c (epilogue_set): Build the epilogue in the
10825 muscle_obstack.
10826 * src/output.h, src/output.c (muscle_obstack): Move to...
10827 * src/muscle_tab.h, src/muscle_tab.h: here.
10828 (muscle_init): Initialize muscle_obstack.
10829 (muscle_free): New.
10830 * src/main.c (main): Call it.
10831
108322002-06-14 Akim Demaille <akim@epita.fr>
10833
10834 * src/location.h: New, extracted from...
10835 * src/reader.h: here.
10836 * src/Makefile.am (noinst_HEADERS): Merge into
10837 (bison_SOURCES): this.
10838 Add location.h.
10839 * src/parse-gram.y: Use location_t instead of Bison's.
10840 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10841 Use location_t instead of ints.
10842
108432002-06-14 Akim Demaille <akim@epita.fr>
10844
10845 * data/bison.simple, data/bison.c++: Be sure to restore the
10846 current #line when returning to the skeleton contents after having
10847 exposed the input file's #line.
10848
108492002-06-12 Akim Demaille <akim@epita.fr>
10850
10851 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10852 eager.
10853 * tests/actions.at (Exotic Dollars): New.
10854
108552002-06-12 Akim Demaille <akim@epita.fr>
10856
10857 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10858 ['"/] too eagerly.
10859 * tests/input.at (Torturing the Scanner): New.
10860
108612002-06-11 Akim Demaille <akim@epita.fr>
10862
10863 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10864 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10865 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10866 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10867 * src/reader.c (reader): Use it.
10868
108692002-06-11 Akim Demaille <akim@epita.fr>
10870
10871 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10872 Adjust all callers.
10873 (scanner_last_string_free): New.
10874
108752002-06-11 Akim Demaille <akim@epita.fr>
10876
10877 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10878 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10879 (last_string, YY_OBS_FREE): New.
10880 Use them when returning an ID.
10881
108822002-06-11 Akim Demaille <akim@epita.fr>
10883
10884 Have Bison grammars parsed by a Bison grammar.
10885
10886 * src/reader.c, src/reader.h (prologue_augment): New.
10887 * src/reader.c (copy_definition): Remove.
10888
10889 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10890 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10891 (grammar_current_rule_prec_set, grammar_current_rule_check)
10892 (grammar_current_rule_symbol_append)
10893 (grammar_current_rule_action_append): Export.
10894 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10895 (symbol_list_action_append): Remove.
10896 Hook the routines from reader.
10897 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10898 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10899
10900 * src/reader.c (read_declarations): Remove, unused.
10901
10902 * src/parse-gram.y: Handle the epilogue.
10903 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10904 (grammar_start_symbol_set): this.
10905 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10906 * src/reader.c (readgram): Remove, unused.
10907 (reader): Adjust to insert eoftoken and axiom where appropriate.
10908
10909 * src/reader.c (copy_dollar): Replace with...
10910 * src/scan-gram.h (handle_dollar): this.
10911 * src/parse-gram.y: Remove `%thong'.
10912
10913 * src/reader.c (copy_at): Replace with...
10914 * src/scan-gram.h (handle_at): this.
10915
10916 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10917 New.
10918
10919 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10920 time being.
10921
10922 * src/reader.h, src/reader.c (grammar_rule_end): New.
10923
10924 * src/parse.y (current_type, current_class): New.
10925 Implement `%nterm', `%token' support.
10926 Merge `%term' into `%token'.
10927 (string_as_id): New.
10928 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10929 type name.
10930
10931 * src/parse-gram.y: Be sure to handle properly the beginning of
10932 rules.
10933
10934 * src/parse-gram.y: Handle %type.
10935 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10936
10937 * src/parse-gram.y: More directives support.
10938 * src/options.c: No longer handle source directives.
10939
10940 * src/parse-gram.y: Fix %output.
10941
10942 * src/parse-gram.y: Handle %union.
10943 Use the prologue locations.
10944 * src/reader.c (parse_union_decl): Remove.
10945
10946 * src/reader.h, src/reader.c (epilogue_set): New.
10947 * src/parse-gram.y: Use it.
10948
10949 * data/bison.simple, data/bison.c++: b4_stype is now either not
10950 defined, then default to int, or to the contents of %union,
10951 without `union' itself.
10952 Adjust.
10953 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10954
10955 * src/output.c (actions_output): Don't output braces, as they are
10956 already handled by the scanner.
10957
10958 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10959 characters to themselves.
10960
10961 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10962 that the epilogue has a proper #line.
10963
10964 * src/parse-gram.y: Handle precedence/associativity.
10965
10966 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10967 a terminal.
10968 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10969 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10970 at all to define terminals that cannot be emitted.
10971
10972 * src/scan-gram.l: Escape M4 characters.
10973
10974 * src/scan-gram.l: Working properly with escapes in user
10975 strings/characters.
10976
10977 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10978 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10979 grammar.
10980 Use more modest sizes, as for the time being the parser does not
10981 release memory, and therefore the process swallows a huge amount
10982 of memory.
10983
10984 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10985 stricter %token grammar.
10986
10987 * src/symtab.h (associativity): Add `undef_assoc'.
10988 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10989 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10990
10991 * tests/regression.at (Invalid %directive): Remove, as it is now
10992 meaningless.
10993 (Invalid inputs): Adjust to the new error messages.
10994 (Token definitions): The new grammar doesn't allow too many
10995 eccentricities.
10996
10997 * src/lex.h, src/lex.c: Remove.
10998 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10999 (copy_character, copy_string2, copy_string, copy_identifier)
11000 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11001 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11002 (parse_action): Remove.
11003 * po/POTFILES.in: Adjust.
11004
110052002-06-11 Akim Demaille <akim@epita.fr>
11006
11007 * src/reader.c (parse_action): Don't store directly into the
11008 rule's action member: return the action as a string.
11009 Don't require `rule_length' as an argument: compute it.
11010 (grammar_current_rule_symbol_append)
11011 (grammar_current_rule_action_append): New, eved out from
11012 (readgram): here.
11013 Remove `action_flag', `rulelength', unused now.
11014
110152002-06-11 Akim Demaille <akim@epita.fr>
11016
11017 * src/reader.c (grammar_current_rule_prec_set).
11018 (grammar_current_rule_check): New, eved out from...
11019 (readgram): here.
11020 Remove `xaction', `first_rhs': useless.
11021 * tests/input.at (Type clashes): New.
11022 * tests/existing.at (GNU Cim Grammar): Adjust.
11023
110242002-06-11 Akim Demaille <akim@epita.fr>
11025
11026 * src/reader.c (grammar_midrule_action): New, Eved out from
11027 (readgram): here.
11028
110292002-06-11 Akim Demaille <akim@epita.fr>
11030
11031 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11032 New.
11033 (readgram): Use them as replacement of inlined code, crule and
11034 crule1.
11035
110362002-06-11 Akim Demaille <akim@epita.fr>
11037
11038 * src/reader.c (grammar_end, grammar_symbol_append): New.
11039 (readgram): Use them.
11040 Make the use of `p' as local as possible.
11041
110422002-06-10 Akim Demaille <akim@epita.fr>
11043
11044 GCJ's parser requires the tokens to be defined before the prologue.
11045
11046 * data/bison.simple: Output the token definition before the user's
11047 prologue.
11048 * tests/regression.at (Braces parsing, Duplicate string)
11049 (Mixing %token styles): Check the output from bison.
11050 (Early token definitions): New.
11051
110522002-06-10 Akim Demaille <akim@epita.fr>
11053
11054 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11055 assigning twice the same user number to a token, so that we can
11056 use it in...
11057 * src/lex.c (lex): here.
11058 Also use `symbol_class_set' instead of hand written code.
11059 * src/reader.c (parse_assoc_decl): Likewise.
11060
110612002-06-10 Akim Demaille <akim@epita.fr>
11062
11063 * src/symtab.c, src/symtab.c (symbol_class_set)
11064 (symbol_user_token_number_set): New.
11065 * src/reader.c (parse_token_decl): Use them.
11066 Use a switch instead of ifs.
11067 Use a single argument.
11068
110692002-06-10 Akim Demaille <akim@epita.fr>
11070
11071 Remove `%thong' support as it is undocumented, unused, duplicates
11072 `%token's job, and creates useless e-mail traffic with people who
11073 want to know what it is, why it is undocumented, unused, and
11074 duplicates `%token's job.
11075
11076 * src/reader.c (parse_thong_decl): Remove.
11077 * src/options.c (option_table): Remove "thong".
11078 * src/lex.h (tok_thong): Remove.
11079
110802002-06-10 Akim Demaille <akim@epita.fr>
11081
11082 * src/symtab.c, src/symtab.c (symbol_type_set)
11083 (symbol_precedence_set): New.
11084 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11085 (value_components_used): Remove, unused.
11086
110872002-06-09 Akim Demaille <akim@epita.fr>
11088
11089 Move symbols handling code out of the reader.
11090
11091 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11092 (axiom): Move to...
11093 * src/symtab.h, src/symtab.c: here.
11094
11095 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11096 * src/reader.c (startval): Rename as...
11097 * src/symtab.h, src/symtab.c (startsymbol): this.
11098 * src/reader.c: Adjust.
11099
11100 * src/reader.c (symbol_check_defined, symbol_make_alias)
11101 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11102 (token_translations_init)
11103 Move to...
11104 * src/symtab.c: here.
11105 * src/reader.c (packsymbols): Move to...
11106 * src/symtab.h, src/symtab.c (symbols_pack): here.
11107 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11108 argument.
11109
111102002-06-03 Akim Demaille <akim@epita.fr>
11111
11112 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11113 then statements.
11114
111152002-06-03 Akim Demaille <akim@epita.fr>
11116
11117 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11118 structs with non literals.
11119 * src/scan-skel.l: never-interactive.
11120 * src/conflicts.c (enum conflict_resolution_e): No trailing
11121 comma.
11122 * src/getargs.c (usage): Split long literal strings.
11123 Reported by Hans Aberg.
11124
111252002-05-28 Akim Demaille <akim@epita.fr>
11126
11127 * data/bison.c++: Use C++ ostreams.
11128 (cdebug_): New member.
11129
111302002-05-28 Akim Demaille <akim@epita.fr>
11131
11132 * src/output.c (output_skeleton): Be sure to allocate enough room
11133 for `/' _and_ for `\0' in full_skeleton.
11134
111352002-05-28 Akim Demaille <akim@epita.fr>
11136
11137 * data/bison.c++: Catch up with bison.simple:
11138 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11139 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11140 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11141 and popping traces.
11142
111432002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11144
11145 * src/output.c (output_skeleton): Put an explicit path in front of
11146 the skeleton file name, rather than relying on the -I directory,
11147 to partially alleviate effects of having a skeleton file lying around
11148 in the current directory.
11149
111502002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11151
11152 * src/conflicts.c (log_resolution): Correct typo:
11153 obstack_printf should be obstack_fgrow1.
11154
111552002-05-26 Akim Demaille <akim@epita.fr>
11156
11157 * src/state.h (state_t): `solved_conflicts' is a new member.
11158 * src/LR0.c (new_state): Set it to 0.
11159 * src/conflicts.h, src/conflicts.c (print_conflicts)
11160 (free_conflicts, solve_conflicts): Rename as...
11161 (conflicts_print, conflicts_free, conflicts_solve): these.
11162 Adjust callers.
11163 * src/conflicts.c (enum conflict_resolution_e)
11164 (solved_conflicts_obstack): New, used by...
11165 (log_resolution): this.
11166 Adjust to attach the conflict resolution to each state.
11167 Complete the description with the precedence/associativity
11168 information.
11169 (resolve_sr_conflict): Adjust.
11170 * src/print.c (print_state): Output its solved_conflicts.
11171 * tests/conflicts.at (Unresolved SR Conflicts)
11172 (Solved SR Conflicts): Exercise --report=all.
11173
111742002-05-26 Akim Demaille <akim@epita.fr>
11175
11176 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11177 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11178 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11179 (token_number_t, item_number_as_token_number)
11180 (token_number_as_item_number, muscle_insert_token_number_table):
11181 Rename as...
11182 (symbol_number_t, item_number_as_symbol_number)
11183 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11184 these, since it is more appropriate.
11185
111862002-05-26 Akim Demaille <akim@epita.fr>
11187
11188 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11189 `Error:' lines.
11190 * data/bison.simple (yystos) [YYDEBUG]: New.
11191 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11192 error recovery.
11193 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11194
111952002-05-25 Akim Demaille <akim@epita.fr>
11196
11197 * doc/bison.texinfo (Debugging): Split into...
11198 (Tracing): this new section, its former contents, and...
11199 (Understanding): this new section.
11200 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11201 by...
11202 (report_flag): this.
11203 Adjust all dependencies.
11204 (report_args, report_types, report_argmatch): New.
11205 (usage, getargs): Report/support -r, --report.
11206 * src/options.h
11207 (struct option_table_struct): Rename as..,
11208 (struct option_table_s): this.
11209 Rename the `set_flag' member to `flag' to match with getopt_long's
11210 struct.
11211 * src/options.c (option_table): Split verbose into an entry for
11212 %verbose, and another for --verbose.
11213 Support --report/-r, so remove -r from the obsolete --raw.
11214 * src/print.c: Attach full item sets and lookaheads reports to
11215 report_flag instead of trace_flag.
11216 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11217
112182002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11219 and Paul Eggert <eggert@twinsun.com>
11220
11221 * data/bison.simple (yyparse): Correct error handling to conform to
11222 POSIX and yacc. Specifically, after syntax error is discovered,
11223 do not reduce further before shifting the error token.
11224 Clean up the code a bit by removing the labels yyerrdefault,
11225 yyerrhandle, yyerrpop.
11226 * NEWS: Document the above.
11227
112282002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11229
11230 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11231 type; it isn't always big enough, since it doesn't necessarily
11232 include non-terminals.
11233 (yytranslate): Expand definition of yy_token_number_type, so that
11234 the latter can be removed.
11235 (yy_token_number_type): Remove, only one use.
11236 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11237 don't use TokenNumberType as element type.
11238
11239 * tests/regression.at: Modify expected output to agree with change
11240 to yyr1 and yytranslate.
11241
112422002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11243
11244 * src/reader.c (parse_action): Use copy_character instead of
11245 obstack_1grow.
11246
112472002-05-13 Akim Demaille <akim@epita.fr>
11248
11249 * tests/regression.at (Token definitions): Prototype yylex and
11250 yyerror.
11251
112522002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11253
11254 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11255 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11256 32-bit arithmetic.
11257 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11258
112592002-05-07 Akim Demaille <akim@epita.fr>
11260
11261 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11262 avoid GCC warnings.
11263
112642002-05-07 Akim Demaille <akim@epita.fr>
11265
11266 Kill GCC warnings.
11267
11268 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11269 over the RHS of each rule.
11270 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11271 * src/state.h (state_t): Member `nitems' is unsigned short.
11272 * src/LR0.c (get_state): Adjust.
11273 * src/reader.c (packgram): Likewise.
11274 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11275 `Type'.
11276 (muscle_insert_int_table): Remove, unused.
11277 (prepare_rules): Remove `max'.
11278
112792002-05-06 Akim Demaille <akim@epita.fr>
11280
11281 * src/closure.c (print_firsts): Display of the symbol tags.
11282 (bitmatrix_print): Move to...
11283 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11284 here.
11285 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11286
112872002-05-06 Akim Demaille <akim@epita.fr>
11288
11289 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11290 hash_do_for_each.
11291
112922002-05-06 Akim Demaille <akim@epita.fr>
11293
11294 * src/LR0.c (new_state, get_state): Instead of using the global
11295 `kernel_size' and `kernel_base', have two new arguments:
11296 `core_size' and `core'.
11297 Adjust callers.
11298
112992002-05-06 Akim Demaille <akim@epita.fr>
11300
11301 * src/reader.c (packgram): No longer end `ritem' with a 0
11302 sentinel: it is not used.
11303
113042002-05-05 Akim Demaille <akim@epita.fr>
11305
11306 New experimental feature: display the lookaheads in the report and
11307 graph.
11308
11309 * src/print (print_core): When --trace-flag, display the rules
11310 lookaheads.
11311 * src/print_graph.c (print_core): Likewise.
11312 Swap the arguments.
11313 Adjust caller.
11314
113152002-05-05 Akim Demaille <akim@epita.fr>
11316
11317 * tests/torture.at (Many lookaheads): New test.
11318
113192002-05-05 Akim Demaille <akim@epita.fr>
11320
11321 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11322 (GENERATE_MUSCLE_INSERT_TABLE): this.
11323 (output_int_table, output_unsigned_int_table, output_short_table)
11324 (output_token_number_table, output_item_number_table): Replace with...
11325 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11326 (muscle_insert_short_table, muscle_insert_token_number_table)
11327 (muscle_insert_item_number_table): these.
11328 Adjust all callers.
11329 (prepare_tokens): Don't free `translations', since...
11330 * src/reader.h, src/reader.c (grammar_free): do it.
11331 Move to...
11332 * src/gram.h, src/gram.c (grammar_free): here.
11333 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11334 b4_translate_max.
11335
113362002-05-05 Akim Demaille <akim@epita.fr>
11337
11338 * src/output.c (output_unsigned_int_table): New.
11339 (prepare_rules): `i' is unsigned.
11340 `prhs', `rline', `r2' are unsigned int.
11341 Rename muscle `rhs_number_max' as `rhs_max'.
11342 Output muscles `prhs_max', `rline_max', and `r2_max'.
11343 Free rline and r1.
11344 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11345 to compute types instead of constant types.
11346 * tests/regression.at (Web2c Actions): Adjust.
11347
113482002-05-04 Akim Demaille <akim@epita.fr>
11349
11350 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11351 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11352 Adjust dependencies.
11353 * src/output.c (token_definitions_output): Be sure not to output a
11354 `#define 'a'' when fed with `%token 'a' "a"'.
11355 * tests/regression.at (Token definitions): New.
11356
113572002-05-03 Paul Eggert <eggert@twinsun.com>
11358
11359 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11360 for K&R C.
11361
113622002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11363
11364 * Makefile.am (SUBDIRS): Remove intl.
11365 (EXTRA_DIST): Add config/config.rpath.
11366
113672002-05-03 Akim Demaille <akim@epita.fr>
11368
11369 * data/bison.simple (m4_if): Don't output empty enums.
11370 And actually, output valid enum definitions :(.
11371
113722002-05-03 Akim Demaille <akim@epita.fr>
11373
11374 * configure.bat: Remove, completely obsolete.
11375 * Makefile.am (EXTRA_DIST): Adjust.
11376 Don't distribute config.rpath...
11377 * config/Makefile.am (EXTRA_DIST): Do it.
11378
113792002-05-03 Akim Demaille <akim@epita.fr>
11380
11381 * configure.in (GETTEXT_VERSION): New.
11382 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11383
113842002-05-03 Akim Demaille <akim@epita.fr>
11385
11386 * data/bison.simple (b4_token_enum): New.
11387 (b4_token_defines): Use it to output tokens both as #define and
11388 enums.
11389 Suggested by Paul Eggert.
11390 * src/output.c (token_definitions_output): Don't output spurious
11391 white spaces.
11392
113932002-05-03 Akim Demaille <akim@epita.fr>
11394
11395 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11396
113972002-05-02 Robert Anisko <robert@lrde.epita.fr>
11398
11399 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11400 Update the stack class, give a try to deque as the default container.
11401
114022002-05-02 Akim Demaille <akim@epita.fr>
11403
11404 * data/bison.simple (yyparse): Do not implement @$ = @1.
11405 (YYLLOC_DEFAULT): Adjust to do it.
11406 * doc/bison.texinfo (Location Default Action): Fix.
11407
114082002-05-02 Akim Demaille <akim@epita.fr>
11409
11410 * src/reader.c (parse_braces): Merge into...
11411 (parse_action): this.
11412
114132002-05-02 Akim Demaille <akim@epita.fr>
11414
11415 * configure.in (ALL_LINGUAS): Remove.
11416 * po/LINGUAS, hr.po: New.
11417
114182002-05-02 Akim Demaille <akim@epita.fr>
11419
11420 Remove the so called hairy (semantic) parsers.
11421
11422 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11423 * src/gram.h, src/gram.c (semantic_parser): Remove.
11424 (rule_t): Remove the guard and guard_line members.
11425 * src/lex.h (token_t): remove tok_guard.
11426 * src/options.c (option_table): Remove %guard and %semantic_parser
11427 support.
11428 * src/output.c, src/output.h (guards_output): Remove.
11429 (prepare): Adjust.
11430 (token_definitions_output): Don't output the `T'
11431 tokens (???).
11432 (output_skeleton): Don't output the guards.
11433 * src/files.c, src/files.c (attrsfile): Remove.
11434 * src/reader.c (symbol_list): Remove the guard and guard_line
11435 members.
11436 Adjust dependencies.
11437 (parse_guard): Remove.
11438 * data/bison.hairy: Remove.
11439 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11440 BISON_HAIRY.
11441
114422002-05-02 Akim Demaille <akim@epita.fr>
11443
11444 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11445 (parse_guard): Rename the formal argument `stack_offset' as
11446 `rule_length', which is more readable.
11447 Adjust callers.
11448 (copy_at, copy_dollar): Instead of outputting the hard coded
11449 values of $$, $n and so forth, output invocation to b4_lhs_value,
11450 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11451 Note: this patch partially drops `semantic-parser' support: it
11452 always does `rule_length - n', where semantic parsers ought to
11453 always use `-n'.
11454 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11455 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11456
114572002-05-02 Akim Demaille <akim@epita.fr>
11458
11459 * configure.in (AC_INIT): Bump to 1.49b.
11460 (AM_INIT_AUTOMAKE): Short invocation.
11461
114622002-05-02 Akim Demaille <akim@epita.fr>
11463
11464 Version 1.49a.
11465
114662002-05-01 Akim Demaille <akim@epita.fr>
11467
11468 * src/skeleton.h: Remove.
11469
114702002-05-01 Akim Demaille <akim@epita.fr>
11471
11472 * src/skeleton.h: Fix the #endif.
11473 Reported by Magnus Fromreide.
11474
114752002-04-26 Paul Eggert <eggert@twinsun.com>
11476
11477 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11478 Define if we define YYSTYPE and YYLTYPE, respectively.
11479 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11480
114812002-04-25 Robert Anisko <robert@lrde.epita.fr>
11482
11483 * src/scan-skel.l: Postprocess quadrigraphs.
11484
11485 * src/reader.c (copy_character): New function, used to output
11486 single characters while replacing `[' and `]' with quadrigraphs, to
11487 avoid troubles with M4 quotes.
11488 (copy_comment): Output characters with copy_character.
11489 (read_additionnal_code): Likewise.
11490 (copy_string2): Likewise.
11491 (copy_definition): Likewise.
11492
11493 * tests/calc.at: Exercise M4 quoting.
11494
114952002-04-25 Akim Demaille <akim@epita.fr>
11496
11497 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11498 between `!' and the command.
11499 Reported by Paul Eggert.
11500
115012002-04-24 Robert Anisko <robert@lrde.epita.fr>
11502
11503 * tests/calc.at: Exercise prologue splitting.
11504
11505 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11506 `b4_post_prologue' instead of `b4_prologue'.
11507
11508 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11509 muscles.
11510 (output): Free pre_prologue_obstack and post_prologue_obstack.
11511 * src/files.h, src/files.c (attrs_obstack): Remove.
11512 (pre_prologue_obstack, post_prologue_obstack): New.
11513 * src/reader.c (copy_definition): Add a parameter to specify the
11514 obstack to fill, instead of using attrs_obstack unconditionally.
11515 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11516 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11517
115182002-04-23 Paul Eggert <eggert@twinsun.com>
11519
11520 * data/bison.simple: Remove unnecessary commentary and white
11521 space differences from 1_29-branch.
11522 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11523
11524 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11525 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11526 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11527 constructors or destructors.
11528
11529 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11530
115312002-04-23 Akim Demaille <akim@epita.fr>
11532
11533 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11534 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11535 location with columns.
11536 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11537 All reported by Paul Eggert.
11538
115392002-04-22 Akim Demaille <akim@epita.fr>
11540
11541 * src/reduce.c (dump_grammar): Move to...
11542 * src/gram.h, src/gram.c (grammar_dump): here.
11543 Be sure to separate long item numbers.
11544 Don't read the members of a rule's prec if its nil.
11545
115462002-04-22 Akim Demaille <akim@epita.fr>
11547
11548 * src/output.c (table_size, table_grow): New.
11549 (MAXTABLE): Remove, replace uses with table_size.
11550 (pack_vector): Instead of dying when the table is too big, grow it.
11551
115522002-04-22 Akim Demaille <akim@epita.fr>
11553
11554 * data/bison.simple (yyr1): Its type is that of a token number.
11555 * data/bison.c++ (r1_): Likewise.
11556 * tests/regression.at (Web2c Actions): Adjust.
11557
115582002-04-22 Akim Demaille <akim@epita.fr>
11559
11560 * src/reader.c (token_translations_init): 256 is now the default
11561 value for the error token, i.e., it will be assigned another
11562 number if the user assigned 256 to one of her tokens.
11563 (reader): Don't force 256 to error.
11564 * doc/bison.texinfo (Symbols): Adjust.
11565 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11566 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11567 etc. instead of 10, 20, 30 (which was used to `jump' over error
11568 (256) and undefined (2)).
11569
115702002-04-22 Akim Demaille <akim@epita.fr>
11571
11572 Propagate more token_number_t.
11573
11574 * src/gram.h (token_number_as_item_number)
11575 (item_number_as_token_number): New.
11576 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11577 Use it to create output_item_number_table and
11578 output_token_number_table.
11579 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11580 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11581 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11582 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11583
115842002-04-22 Akim Demaille <akim@epita.fr>
11585
11586 * src/output.h, src/output.c (get_lines_number): Remove.
11587
115882002-04-19 Akim Demaille <akim@epita.fr>
11589
11590 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11591 as Lex/Flex'.
11592 (Debugging): More details about enabling the debugging features.
11593 (Table of Symbols): Describe $$, $n, @$, and @n.
11594 Suggested by Tim Josling.
11595
115962002-04-19 Akim Demaille <akim@epita.fr>
11597
11598 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11599
116002002-04-10 Akim Demaille <akim@epita.fr>
11601
11602 * src/system.h: Rely on HAVE_LIMITS_H.
11603 Suggested by Paul Eggert.
11604
116052002-04-09 Akim Demaille <akim@epita.fr>
11606
11607 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11608 full stderr, and strip it according to the bison options, instead
11609 of composing the error message from different bits.
11610 This makes it easier to check for several error messages.
11611 Adjust all the invocations.
11612 Add an invocation exercising the error token.
11613 Add an invocation demonstrating a stupid error message.
11614 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11615 Adjust the tests.
11616 Error message are for stderr, not stdout.
11617
116182002-04-09 Akim Demaille <akim@epita.fr>
11619
11620 * src/gram.h, src/gram.c (error_token_number): Remove, use
11621 errtoken->number.
11622 * src/reader.c (reader): Don't specify the user token number (2)
11623 for $undefined, as it uselessly prevents using it.
11624 * src/gram.h (token_number_t): Move to...
11625 * src/symtab.h: here.
11626 (state_t.number): Is a token_number_t.
11627 * src/print.c, src/reader.c: Use undeftoken->number instead of
11628 hard coded 2.
11629 (Even though this 2 is not the same as above: the number of the
11630 undeftoken remains being 2, it is its user token number which
11631 might not be 2).
11632 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11633 `user_token_number_max'.
11634 Output `undef_token_number'.
11635 * data/bison.simple, data/bison.c++: Use them.
11636 Be sure to map invalid yylex return values to
11637 `undef_token_number'. This saves us from gratuitous SEGV.
11638
11639 * tests/conflicts.at (Solved SR Conflicts)
11640 (Unresolved SR Conflicts): Adjust.
11641 * tests/regression.at (Web2c Actions): Adjust.
11642
116432002-04-08 Akim Demaille <akim@epita.fr>
11644
11645 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11646 Adding #line.
11647 Remove the duplicate `typedefs'.
11648 (RhsNumberType): Fix the declaration and various other typos.
11649 Use __ofile__.
11650 * data/bison.simple: Use __ofile__.
11651 * src/scan-skel.l: Handle __ofile__.
11652
116532002-04-08 Akim Demaille <akim@epita.fr>
11654
11655 * src/gram.h (item_number_t): New, the type of item numbers in
11656 RITEM. Note that it must be able to code symbol numbers as
11657 positive number, and the negation of rule numbers as negative
11658 numbers.
11659 Adjust all dependencies (pretty many).
11660 * src/reduce.c (rule): Remove this `short *' pointer: use
11661 item_number_t.
11662 * src/system.h (MINSHORT, MAXSHORT): Remove.
11663 Include `limits.h'.
11664 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11665 (shortcpy): Remove.
11666 (MAXTABLE): Move to...
11667 * src/output.c (MAXTABLE): here.
11668 (prepare_rules): Use output_int_table to output rhs.
11669 * data/bison.simple, data/bison.c++: Adjust.
11670 * tests/torture.at (Big triangle): Move the limit from 254 to
11671 500.
11672 * tests/regression.at (Web2c Actions): Ajust.
11673
11674 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11675 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11676 passes, but produces negative #line number, once fixed, GCC is
11677 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11678 C), it passes.
11679 * src/state.h (state_h): Code input lines on ints, not shorts.
11680
116812002-04-08 Akim Demaille <akim@epita.fr>
11682
11683 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11684 and then the grammar.
11685
116862002-04-08 Akim Demaille <akim@epita.fr>
11687
11688 * src/system.h: No longer using strndup.
11689
116902002-04-07 Akim Demaille <akim@epita.fr>
11691
11692 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11693 * src/output.c (output_table_data): Return the longest number.
11694 (prepare_tokens): Output `token_number_max').
11695 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11696 New.
11697 Use them to define yy_token_number_type/TokenNumberType.
11698 Use this type for yytranslate.
11699 * tests/torture.at (Big triangle): Push the limit from 124 to
11700 253.
11701 * tests/regression.at (Web2c Actions): Adjust.
11702
117032002-04-07 Akim Demaille <akim@epita.fr>
11704
11705 * tests/torture.at (Big triangle): New.
11706 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11707 * tests/existing.at: here.
11708
117092002-04-07 Akim Demaille <akim@epita.fr>
11710
11711 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11712 nritems.
11713 Adjust dependencies.
11714
117152002-04-07 Akim Demaille <akim@epita.fr>
11716
11717 * src/reader.c: Normalize increments to prefix form.
11718
117192002-04-07 Akim Demaille <akim@epita.fr>
11720
11721 * src/reader.c, symtab.c: Remove debugging code.
11722
117232002-04-07 Akim Demaille <akim@epita.fr>
11724
11725 Rename all the `bucket's as `symbol_t'.
11726
11727 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11728 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11729 * src/symtab.c, src/symtab.h (bucket): Rename as...
11730 (symbol_t): this.
11731 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11732 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11733 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11734 (buckets_new, buckets_free, buckets_do): Rename as...
11735 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11736 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11737 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11738 (symbols_new, symbols_free, symbols_do): these.
11739
117402002-04-07 Akim Demaille <akim@epita.fr>
11741
11742 Use lib/hash for the symbol table.
11743
11744 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11745 EOF.
11746 * src/lex.c (lex): Set the `number' member of new terminals.
11747 * src/reader.c (bucket_check_defined, bucket_make_alias)
11748 (bucket_check_alias_consistence, bucket_translation): New.
11749 (reader, grammar_free, readgram, token_translations_init)
11750 (packsymbols): Adjust.
11751 (reader): Number the predefined tokens.
11752 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11753 for predefined tokens.
11754 * src/symtab.h (bucket): Remove all the hash table related
11755 members.
11756 * src/symtab.c (symtab): Replace by...
11757 (bucket_table): this.
11758 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11759 (buckets_new, buckets_do): New.
11760
117612002-04-07 Akim Demaille <akim@epita.fr>
11762
11763 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11764 (start_symbol, max_user_token_number, semantic_parser)
11765 (error_token_number): Initialize.
11766 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11767 Initialize.
11768 (reader): Don't.
11769 (errtoken, eoftoken, undeftoken, axiom): Extern.
11770
117712002-04-07 Akim Demaille <akim@epita.fr>
11772
11773 * src/gram.h (rule_s): prec and precsym are now pointers
11774 to the bucket giving the priority/associativity.
11775 Member `associativity' removed: useless.
11776 * src/reduce.c, src/conflicts.c: Adjust.
11777
117782002-04-07 Akim Demaille <akim@epita.fr>
11779
11780 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11781 Properly escape the symbols' TAG when outputting them.
11782
117832002-04-07 Akim Demaille <akim@epita.fr>
11784
11785 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11786
117872002-04-07 Akim Demaille <akim@epita.fr>
11788
11789 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11790 (LArule): this, which is an array to rule_t*.
11791 * src/print.c, src/conflicts.c: Adjust.
11792
117932002-04-07 Akim Demaille <akim@epita.fr>
11794
11795 * src/gram.h (rule_t): Rename `number' as `user_number'.
11796 `number' is a new member.
11797 Adjust dependencies.
11798 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11799
118002002-04-07 Akim Demaille <akim@epita.fr>
11801
11802 As a result of the previous patch, it is no longer needed
11803 to reorder ritem itself.
11804
11805 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11806
118072002-04-07 Akim Demaille <akim@epita.fr>
11808
11809 Be sure never to walk through RITEMS, but use only data related to
11810 the rules themselves. RITEMS should be banished.
11811
11812 * src/output.c (output_token_translations): Rename as...
11813 (prepare_tokens): this.
11814 In addition to `translate', prepare the muscles `tname' and
11815 `toknum', which were handled by...
11816 (output_rule_data): this.
11817 Remove, and move the remainder of its outputs into...
11818 (prepare_rules): this new routines, which also merges content from
11819 (output_gram): this.
11820 (prepare_rules): Be sure never to walk through RITEMS.
11821 (output_stos): Rename as...
11822 (prepare_stos): this.
11823 (output): Always invoke prepare_states, after all, just don't use it
11824 in the output if you don't need it.
11825
118262002-04-07 Akim Demaille <akim@epita.fr>
11827
11828 * src/LR0.c (new_state): Display `nstates' as the name of the
11829 newly created state.
11830 Adjust to initialize first_state and last_state if needed.
11831 Be sure to distinguish the initial from the final state.
11832 (new_states): Create the itemset of the initial state, and use
11833 new_state.
11834 * src/closure.c (closure): Now that the initial state has its
11835 items properly set, there is no need for a special case when
11836 creating `ruleset'.
11837
11838 As a result, now the rule 0, reducing to $axiom, is visible in the
11839 outputs. Adjust the test suite.
11840
11841 * tests/conflicts.at (Solved SR Conflicts)
11842 (Unresolved SR Conflicts): Adjust.
11843 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11844 * tests/conflicts.at (S/R in initial): New.
11845
118462002-04-07 Akim Demaille <akim@epita.fr>
11847
11848 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11849 the RHS of the rules.
11850 * src/output.c (output_gram): Likewise.
11851
118522002-04-07 Akim Demaille <akim@epita.fr>
11853
11854 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11855 bucket.
11856 Adjust all dependencies.
11857 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11858 `number' of the buckets too.
11859 * src/gram.h: Include `symtab.h'.
11860 (associativity): Move to...
11861 * src/symtab.h: here.
11862 No longer include `gram.h'.
11863
118642002-04-07 Akim Demaille <akim@epita.fr>
11865
11866 * src/gram.h, src/gram.c (rules_rhs_length): New.
11867 (ritem_longest_rhs): Use it.
11868 * src/gram.h (rule_t): `number' is a new member.
11869 * src/reader.c (packgram): Set it.
11870 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11871 the end of `rules', and count them out of `nrules'.
11872 (reduce_output, dump_grammar): Adjust.
11873 * src/print.c (print_grammar): It is no longer needed to check for
11874 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11875 * tests/reduce.at (Reduced Automaton): New test.
11876
118772002-04-07 Akim Demaille <akim@epita.fr>
11878
11879 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11880 lacking `+ 1' to nrules, Bison reported as useless a token if it
11881 was used solely to set the precedence of the last rule...
11882
118832002-04-07 Akim Demaille <akim@epita.fr>
11884
11885 * data/bison.c++, data/bison.simple: Don't output the current file
11886 name in #line, to avoid useless diffs between two identical
11887 outputs under different names.
11888
118892002-04-07 Akim Demaille <akim@epita.fr>
11890
11891 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11892 Normalize loops to using `< nrules + 1', not `<= nrules'.
11893
118942002-04-07 Akim Demaille <akim@epita.fr>
11895
11896 * TODO: Update.
11897
118982002-04-07 Akim Demaille <akim@epita.fr>
11899
11900 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11901 bucket.value as bucket.number.
11902
119032002-04-07 Akim Demaille <akim@epita.fr>
11904
11905 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11906 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11907 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11908 RHS, instead of being an index in RITEMS.
11909
119102002-04-04 Paul Eggert <eggert@twinsun.com>
11911
11912 * doc/bison.texinfo: Update copyright date.
11913 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11914 (Symbols): Warn about running Bison in one character set,
11915 but compiling and/or running in an incompatible one.
11916 Warn about character code 256, too.
11917
119182002-04-03 Paul Eggert <eggert@twinsun.com>
11919
11920 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11921 YYERROR_VERBOSE is nonzero, not whether it is defined.
11922
11923 Merge changes from bison-1_29-branch.
11924
119252002-03-20 Paul Eggert <eggert@twinsun.com>
11926
11927 Merge fixes from Debian bison_1.34-1.diff.
11928
11929 * configure.in (AC_PREREQ): 2.53.
11930
119312002-03-20 Akim Demaille <akim@epita.fr>
11932
11933 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11934
119352002-03-19 Paul Eggert <eggert@twinsun.com>
11936
11937 * src/bison.simple (YYCOPY): New macro.
11938 (YYSTACK_RELOCATE): Use it.
11939 Remove Type arg; no longer needed. All callers changed.
11940 (yymemcpy): Remove; no longer needed.
11941
11942 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11943 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11944
119452002-03-19 Akim Demaille <akim@epita.fr>
11946
11947 Test and fix the #line outputs.
11948
11949 * tests/atlocal.at (GCC): New.
11950 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11951 (Prologue synch line, %union synch line, Postprologue synch line)
11952 (Action synch line, Epilogue synch line): New tests.
11953 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11954 * data/bison.simple, data/bison.c++: Use it.
11955
119562002-03-19 Akim Demaille <akim@epita.fr>
11957
11958 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11959 (Solved SR Conflicts, %expect not enough, %expect right)
11960 (%expect too much): Move to...
11961 * tests/conflicts.at: this new file.
11962
119632002-03-19 Akim Demaille <akim@epita.fr>
11964
11965 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11966 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11967 that we can move to enums for instance.
11968 * src/output.c (token_definitions_output): Output a list of
11969 `token-name, token-number' instead of the #define.
11970 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11971
119722002-03-14 Akim Demaille <akim@epita.fr>
11973
11974 Use Gettext 0.11.1.
11975
119762002-03-09 Robert Anisko <robert@lrde.epita.fr>
11977
11978 * data/bison.c++: Make the user able to add members to the generated
11979 parser by subclassing.
11980
119812002-03-05 Robert Anisko <robert@lrde.epita.fr>
11982
11983 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11984 a character.
11985 Reported by Nicolas Tisserand and Nicolas Burrus.
11986
119872002-03-04 Robert Anisko <robert@lrde.epita.fr>
11988
11989 * src/reader.c: Warn about lacking semi-colons, do not complain.
11990
119912002-03-04 Robert Anisko <robert@lrde.epita.fr>
11992
11993 * data/bison.c++: Remove a debug line.
11994
119952002-03-04 Robert Anisko <robert@lrde.epita.fr>
11996
11997 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11998 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11999 provide a default implementation.
12000
120012002-03-04 Akim Demaille <akim@epita.fr>
12002
12003 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12004 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12005 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12006 * tests/semantic.at (Parsing Guards): Similarly.
12007 * src/reader.at (readgram): Complain if the last rule is not ended
12008 with a semi-colon.
12009
120102002-03-04 Akim Demaille <akim@epita.fr>
12011
12012 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12013 * src/closure.c: here.
12014 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12015 RTC.
12016 * src/warshall.h, src/warshall.c: Remove.
12017 * tests/sets.at (Broken Closure): Adjust.
12018
120192002-03-04 Akim Demaille <akim@epita.fr>
12020
12021 * src/output.c (output_skeleton): tempdir is const.
12022 bytes_read is unused.
12023
120242002-03-04 Akim Demaille <akim@epita.fr>
12025
12026 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12027 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12028 Update.
12029 From Michael Hayes.
12030
120312002-03-04 Akim Demaille <akim@epita.fr>
12032
12033 * src/closure.c (closure): `r' is unused.
12034
120352002-03-04 Akim Demaille <akim@epita.fr>
12036
12037 * tests/sets.at (Broken Closure): Add the ending `;'.
12038 * src/reader.at (readgram): Complain if a rule is not ended with a
12039 semi-colon.
12040
120412002-03-04 Akim Demaille <akim@epita.fr>
12042
12043 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12044 (count_sr_conflicts): Use bitset_count.
12045 * src/reduce.c (inaccessable_symbols): Ditto.
12046 (bits_size): Remove.
12047 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12048
120492002-03-04 Akim Demaille <akim@epita.fr>
12050
12051 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12052 * src/reduce.c: Remove the `bitset_zero's following the
12053 `bitset_create's, as now it is performed by the latter.
12054
120552002-03-04 Akim Demaille <akim@epita.fr>
12056
12057 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12058 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12059 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12060 latest sources from Michael.
12061
120622002-03-04 Akim Demaille <akim@epita.fr>
12063
12064 * src/output.c (output): Don't free the grammar.
12065 * src/reader.c (grammar_free): New.
12066 * src/main.c (main): Call it and don't free symtab here.
12067
120682002-03-04 Akim Demaille <akim@epita.fr>
12069
12070 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12071 before returning.
12072 Reported by Benoit Perrot.
12073
120742002-03-04 Akim Demaille <akim@epita.fr>
12075
12076 Use bitset operations when possible, not loops over bits.
12077
12078 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12079 bitset_or.
12080 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12081 * src/reduce.c (useless_nonterminals): Formatting changes.
12082 * src/warshall.c (TC): Use bitset_or.
12083
120842002-03-04 Akim Demaille <akim@epita.fr>
12085
12086 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12087 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12088 Ditto.
12089
120902002-03-04 Akim Demaille <akim@epita.fr>
12091
12092 * src/lalr.c (F): Now a bitset*.
12093 Adjust all dependencies.
12094
120952002-03-04 Akim Demaille <akim@epita.fr>
12096
12097 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12098 Adjust all dependencies.
12099
121002002-03-04 Akim Demaille <akim@epita.fr>
12101
12102 * src/L0.c, src/LR0.h (nstates): Be size_t.
12103 Adjust comparisons (signed vs unsigned).
12104 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12105 bitset*.
12106 Adjust all dependencies.
12107
121082002-03-04 Akim Demaille <akim@epita.fr>
12109
12110 * src/closure.c (firsts): Now, also a bitset.
12111 Adjust all dependencies.
12112 (varsetsize): Remove, now unused.
12113 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12114
121152002-03-04 Akim Demaille <akim@epita.fr>
12116
12117 * src/print.c: Convert to use bitset.h, not hand coded iterations
12118 over ints.
12119
121202002-03-04 Akim Demaille <akim@epita.fr>
12121
12122 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12123
121242002-03-04 Akim Demaille <akim@epita.fr>
12125
12126 * src/closure.c (ruleset): Be a bitset.
12127 (rulesetsize): Remove.
12128
121292002-03-04 Akim Demaille <akim@epita.fr>
12130
12131 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12132 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12133 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12134 * src/closure.c (fderives): Be an array of bitsets.
12135
121362002-02-28 Robert Anisko <robert@lrde.epita.fr>
12137
12138 * data/bison.c++: Merge the two generated headers. Insert a copyright
12139 notice in each output file.
12140
121412002-02-28 Akim Demaille <akim@epita.fr>
12142
12143 * data/bison.c++: Copy the prologue of bison.simple to fetch
12144 useful M4 definitions, such as b4_header_guard.
12145
121462002-02-25 Akim Demaille <akim@epita.fr>
12147
12148 * src/getargs.c (version): Give the name of the authors, and use a
12149 translator friendly scheme for the bgr
12150 copyright notice.
12151
121522002-02-25 Akim Demaille <akim@epita.fr>
12153
12154 * src/output.c (header_output): Remove, now handled completely via
12155 M4.
12156
121572002-02-25 Akim Demaille <akim@epita.fr>
12158
12159 * m4/m4.m4: New, from CVS Autoconf.
12160 * configure.in: Invoke it.
12161 * src/output.c (output_skeleton): Use its result instead of the
12162 hard coded name.
12163
121642002-02-25 Akim Demaille <akim@epita.fr>
12165
12166 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12167 Fileutils 4.1.5.
12168 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12169 * src/output.c (output_skeleton): Use mkstemp to create a real
12170 temporary file.
12171 Move the filling of `skeleton' and its muscle to...
12172 (prepare): here.
12173 (output): Move the definition of the prologue muscle to...
12174 (prepare): here.
12175 * src/system.h (DEFAULT_TMPDIR): New.
12176
121772002-02-14 Paul Eggert <eggert@twinsun.com>
12178
12179 Remove the support for C++ namespace cleanliness; it was
12180 causing more problems than it was curing, since it didn't work
12181 properly on some nonstandard C++ compilers. This can wait
12182 for a proper C++ parser.
12183
12184 * NEWS: Document this.
12185 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12186 of C++, as it's treated like C now.
12187 * src/bison.simple (YYSTD): Remove.
12188 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12189 Treat C++ just like Standard C instead of trying to support
12190 namespace cleanliness.
12191
121922002-02-14 Akim Demaille <akim@epita.fr>
12193
12194 * tests/regression.at (else): Adjust to Andreas' change.
12195
121962002-02-14 Akim Demaille <akim@epita.fr>
12197
12198 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12199
122002002-02-13 Andreas Schwab <schwab@suse.de>
12201
12202 * src/output.c (output_rule_data): Don't output NULL, it might
12203 not be defined yet.
12204
122052002-02-11 Robert Anisko <robert@lrde.epita.fr>
12206
12207 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12208 (Copyright notice): Update.
12209
122102002-02-11 Akim Demaille <akim@epita.fr>
12211
12212 * tests/regression.at (%nonassoc and eof): Don't include
12213 nonportable headers.
12214
122152002-02-08 Robert Anisko <robert@lrde.epita.fr>
12216
12217 * data/bison.c++: Correct error recovery. Make the user able to
12218 initialize the starting location.
12219
122202002-02-07 Akim Demaille <akim@epita.fr>
12221
12222 * tests/input.at: New.
12223
122242002-02-07 Robert Anisko <robert@lrde.epita.fr>
12225
12226 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12227 more consistent when naming methods and variables. Put preprocessor
12228 directives around tables only needed for debugging.
12229
122302002-02-07 Robert Anisko <robert@lrde.epita.fr>
12231
12232 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12233 C++ parsers.
12234 (yy::b4_name::parse): Use print_.
12235
122362002-02-07 Robert Anisko <robert@lrde.epita.fr>
12237
12238 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12239
122402002-02-07 Robert Anisko <robert@lrde.epita.fr>
12241
12242 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12243 C++ parsers.
12244 (yy::b4_name::parse): Build verbose error messages, and use error_.
12245
122462002-02-06 Robert Anisko <robert@lrde.epita.fr>
12247
12248 * data/bison.c++: Fix m4 quoting in comments.
12249
122502002-02-06 Robert Anisko <robert@lrde.epita.fr>
12251
12252 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12253 not expanded by m4.
12254
122552002-02-05 Akim Demaille <akim@epita.fr>
12256
12257 * data/bison.c++: Adjust to the M4 back end.
12258 More is certainly needed.
12259
122602002-02-05 Akim Demaille <akim@epita.fr>
12261
12262 Give a try to M4 as a back end.
12263
12264 * lib/readpipe.c: New, from wdiff.
12265 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12266 BISON_HAIRY.
12267 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12268 specific values. Now it is m4 that performs the lookup.
12269 * src/parse-skel.y: Remove.
12270 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12271 * src/output.c (actions_output, guards_output)
12272 (token_definitions_output): No longer keeps track of the output
12273 line number, hence remove the second argument.
12274 (guards_output): Check against the guard member of a rule, not the
12275 action member.
12276 Adjust callers.
12277 (output_skeleton): Don't look for the skeleton location, let m4 do
12278 that.
12279 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12280 file will be used.
12281 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12282 (prepare): Given that for the time being changesyntax is not
12283 usable in M4, rename the muscles using `-' to `_'.
12284 Define `defines_flag', `output_parser_name' and `output_header_name'.
12285 * src/output.h (actions_output, guards_output)
12286 (token_definitions_output): Adjust prototypes.
12287 * src/scan-skel.l: Instead of scanning the skeletons, it now
12288 processes the output of m4: `__oline__' and `#output'.
12289 * data/bison.simple: Adjust to be used by M4(sugar).
12290 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12291 to date.
12292 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12293 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12294 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12295 shamelessly stolen from CVS Autoconf.
12296
122972002-02-05 Akim Demaille <akim@epita.fr>
12298
12299 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12300 * configure.in: Check for the declarations of free and malloc.
12301 * src/muscle_tab.c: Adjust.
12302
123032002-02-05 Akim Demaille <akim@epita.fr>
12304
12305 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12306 which have no values.
12307
123082002-02-05 Akim Demaille <akim@epita.fr>
12309
12310 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12311 * data/: here.
12312
123132002-01-29 Paul Eggert <eggert@twinsun.com>
12314
12315 * src/bison.simple (YYSIZE_T): Do not define merely because
12316 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12317 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12318
123192002-01-27 Akim Demaille <akim@epita.fr>
12320
12321 Fix `%nonassoc and eof'.
12322
12323 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12324 which were not properly copied! Replace
12325 memcpy (res->errs, src->errs, src->nerrs);
12326 with
12327 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12328 !!!
12329 * tests/regression.at (%nonassoc and eof): Adjust to newest
12330 Autotest: `.' is not in the PATH.
12331
123322002-01-27 Akim Demaille <akim@epita.fr>
12333
12334 * tests/sets.at (AT_EXTRACT_SETS): New.
12335 (Nullable): Use it.
12336 (Firsts): New.
12337
123382002-01-26 Akim Demaille <akim@epita.fr>
12339
12340 * tests/actions.at, tests/calc.at, tests/headers.at,
12341 * tests/torture.at: Adjust to the newest Autotest which no longer
12342 forces `.' in the PATH.
12343
123442002-01-25 Akim Demaille <akim@epita.fr>
12345
12346 * tests/regression.at (%nonassoc and eof): New.
12347 Suggested by Robert Anisko.
12348
123492002-01-24 Akim Demaille <akim@epita.fr>
12350
12351 Bison dumps core when trying to complain about broken input files.
12352 Reported by Cris van Pelt.
12353
12354 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12355 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12356 into...
12357 (Invalid inputs): Strengthen: exercise parse_percent_token.
12358
123592002-01-24 Robert Anisko <robert.anisko@epita.fr>
12360
12361 * src/Makefile.am: Add bison.c++.
12362 * src/bison.c++: New skeleton.
12363
123642002-01-21 Paolo Bonzini <bonzini@gnu.org>
12365
12366 * po/it.po: New.
12367
123682002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12369
12370 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12371
123722002-01-20 Marc Autret <marc@gnu.org>
12373
12374 * src/files.c (compute_output_file_names): Fix
12375
123762002-01-20 Marc Autret <marc@gnu.org>
12377
12378 * tests/output.at: New test.
12379 * src/files.c (compute_base_names): Don't map extensions when
12380 the YACC flag is set, use defaults.
12381 Reported by Evgeny Stambulchik.
12382
123832002-01-20 Marc Autret <marc@gnu.org>
12384
12385 * src/system.h: Need to define __attribute__ away for non-GCC
12386 compilers as well (i.e., the vendor C compiler).
12387 Suggested by Albert Chin-A-Young.
12388
123892002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12390
12391 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12392 canonical definition.
12393 * src/system.h: Use the canonical definition for PARAMS (avoids
12394 a conflict with the macro from lib/hash.h).
12395
123962002-01-11 Akim Demaille <akim@epita.fr>
12397
12398 * configure.in: Use AC_FUNC_STRNLEN.
12399 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12400
124012002-01-09 Akim Demaille <akim@epita.fr>
12402
12403 * src/files.c, src/files.h (output_infix): New.
12404 (tab_extension): Remove.
12405 (compute_base_names): Compute the former, drop the latter.
12406 * src/output.c (prepare): Insert the muscles `output-infix', and
12407 `output-suffix'.
12408 * src/parse-skel.y (string, string.1): New.
12409 (section.header): Use it.
12410 (section.yacc): Remove.
12411 (prefix): Remove too.
12412 * src/scan-skel.l: Adjust.
12413 * src/bison.simple, src/bison.hairy: Adjust.
12414
124152002-01-09 Akim Demaille <akim@epita.fr>
12416
12417 * configure.in (WERROR_CFLAGS): Compute it.
12418 * src/Makefile.am (CFLAGS): Pass it.
12419 * tests/atlocal.in (CFLAGS): Idem.
12420 * src/files.c: Fix a few warnings.
12421 (get_extension_index): Remove, unused.
12422
124232002-01-08 Akim Demaille <akim@epita.fr>
12424
12425 * src/getargs.c (AS_FILE_NAME): New.
12426 (getargs): Use it to convert DOSish file names.
12427 * src/files.c (base_name): Rename as full_base_name to avoid
12428 clashes with `base_name ()'.
12429 (filename_split): New.
12430 (compute_base_names): N-th rewrite, using filename_split.
12431
124322002-01-08 Akim Demaille <akim@epita.fr>
12433
12434 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12435 New, stolen from the Fileutils 4.1.
12436 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12437 * configure.in: Check for the presence of memrchr, and of its
12438 prototype.
12439
124402002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12441
12442 * lib/hash.h (__P): Added definition for this macro.
12443 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12444 BUILT_SOURCES, to ensure they are generated first.
12445 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12446 %error-verbose to allow bootstrapping with bison 1.30x.
12447
124482002-01-06 Akim Demaille <akim@epita.fr>
12449
12450 * src/reader.c (parse_braces): Don't fetch the next char, the
12451 convention is to fetch on entry.
12452 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12453 'switch' without a following semicolon.
12454 * tests/regression.at (braces parsing): New.
12455
124562002-01-06 Akim Demaille <akim@epita.fr>
12457
12458 Bison is dead wrong in its RR conflict reports.
12459
12460 * tests/torture.at (GNU Cim Grammar): New.
12461 * src/conflicts.c (count_rr_conflicts): Fix.
12462
124632002-01-06 Akim Demaille <akim@epita.fr>
12464
12465 Creating package.m4 from configure.ac causes too many problems.
12466
12467 * tests/Makefile.am (package.m4): Create it by hand,
12468 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12469
124702002-01-06 Akim Demaille <akim@epita.fr>
12471
12472 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12473 skeleton.h.
12474
124752002-01-04 Paul Eggert <eggert@twinsun.com>
12476
12477 * doc/bison.texinfo (Debugging):
12478 Remove YYSTDERR; it's no longer defined or used.
12479 Also, s/cstdio.h/cstdio/.
12480
124812002-01-03 Akim Demaille <akim@epita.fr>
12482
12483 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12484
124852002-01-03 Akim Demaille <akim@epita.fr>
12486
12487 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12488 tracing code to --trace, wait for a better --trace option, with
12489 args.
12490
124912002-01-03 Akim Demaille <akim@epita.fr>
12492
12493 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12494 The ISO C++ standard is extremely clear about it: stderr is
12495 considered a macro, not a regular symbol (see table 94 `Header
12496 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12497 Therefore std:: does not apply to it. It still does with fprintf.
12498 Also, s/cstdio.h/cstdio/.
12499
125002002-01-03 Akim Demaille <akim@epita.fr>
12501
12502 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12503 for non system headers.
12504
125052002-01-02 Akim Demaille <akim@epita.fr>
12506
12507 Equip the skeleton chain with location tracking, runtime trace,
12508 pure parser and scanner.
12509
12510 * src/parse-skel.y: Request a pure parser, locations, and prefix
12511 renaming.
12512 (%union): Having several members with the same type does not help
12513 type mismatches, simplify.
12514 (YYPRINT, yyprint): New.
12515 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12516 (skel_error): this.
12517 Handle locations.
12518 * src/scan-skel.l: Adjust to these changes.
12519 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12520 (LOCATION_PRINT, skel_control_t): New.
12521
125222001-12-30 Akim Demaille <akim@epita.fr>
12523
12524 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12525 replace `gb' with BLANKS.
12526 * src/scan-skel.l: Adjust.
12527
125282001-12-30 Akim Demaille <akim@epita.fr>
12529
12530 * src/system.h: We don't need nor want bcopy.
12531 Throw away MS-DOS crap: we don't need getpid.
12532 * configure.in: We don't need strndup. It was even causing
12533 problems: because Flex includes the headers *before* us,
12534 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12535 not visible.
12536 * lib/xstrndup.c: New.
12537 * src/scan-skel.l: Use it.
12538 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12539 * src/parse-skel.y: Use %directives instead of #defines.
12540
125412001-12-30 Akim Demaille <akim@epita.fr>
12542
12543 * src/skeleton.h: New.
12544 * src/output.c (output_parser, output_master_parser): Remove, dead
12545 code.
12546 * src/output.h (get_lines_number, actions_output, guards_output)
12547 (token_definitions_output): Prototype them.
12548 * src/parse-skel.y: Add the license notice.
12549 Include output.h and skeleton.h.
12550 (process_skeleton): Returns void, and takes a single parameter.
12551 * src/scan-skel.l: Add the license notice.
12552 Include skeleton.h.
12553 Don't use %option yylineno: it seems that then Flex imagines
12554 REJECT has been used, and therefore it won't reallocate its
12555 buffers (which makes no other sense to me than a bug). It results
12556 in warnings for `unused: yy_flex_realloc'.
12557
125582001-12-30 Robert Anisko <robert.anisko@epita.fr>
12559
12560 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12561 (MUSCLE_INSERT_PREFIX): ...to there.
12562 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12563 (MUSCLE_INSERT_PREFIX): Move from here...
12564
12565 * src/bison.hairy: Add a section directive. Put braces around muscle
12566 names. This parser skeleton is still broken, but Bison should not
12567 choke on a bad muscle 'syntax'.
12568 * src/bison.simple: Add a section directive. Put braces around muscle
12569 names.
12570
12571 * src/files.h (strsuffix, stringappend): Add declarations.
12572 (tab_extension): Add declaration.
12573 (short_base_name): Add declaration.
12574
12575 * src/files.c (strsuffix, stringappend): No longer static. These
12576 functions are used in the skeleton parser.
12577 (tab_extension): New.
12578 (compute_base_names): Use the computations done in this function
12579 to guess if the generated parsers should have '.tab' in their
12580 names.
12581 (short_base_name): No longer static.
12582
12583 * src/output.c (output_skeleton): New.
12584 (output): Disable call to output_master_parser, and give a try to
12585 a new skeleton handling system.
12586 (guards_output, actions_output): No longer static.
12587 (token_definitions_output, get_lines_number): No longer static.
12588
12589 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12590
12591 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12592 parse-skel.y.
12593
12594 * src/parse-skel.y: New file.
12595 * src/scan-skel.l: New file.
12596
125972001-12-29 Akim Demaille <akim@epita.fr>
12598
12599 %name-prefix is broken.
12600
12601 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12602 Adjust all dependencies.
12603 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12604 %name-prefix.
12605
12606 Renaming yylval but not yylloc is not consistent. Now we do.
12607
12608 * src/bison.simple: Prefix yylloc if used.
12609 * doc/bison.texinfo (Decl Summary): Document that.
12610
126112001-12-29 Akim Demaille <akim@epita.fr>
12612
12613 * doc/bison.texinfo: Promote `%long-directive' over
12614 `%long_directive'.
12615 Remove all references to fixed-output-files, yacc is enough.
12616
126172001-12-29 Akim Demaille <akim@epita.fr>
12618
12619 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12620 user prologue. These are defaults.
12621 * tests/actions.at (Mid-rule actions): Make sure the user can
12622 define YYDEBUG and YYERROR_VERBOSE.
12623
126242001-12-29 Akim Demaille <akim@epita.fr>
12625
12626 * src/output.c (header_output): Don't forget to export YYLTYPE and
12627 yylloc.
12628 * tests/headers.at (export YYLTYPE): New, make sure it does.
12629 * tests/regression.at (%union and --defines, Invalid CPP headers):
12630 Move to...
12631 * tests/headers.at: here.
12632
126332001-12-29 Akim Demaille <akim@epita.fr>
12634
12635 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12636
126372001-12-29 Akim Demaille <akim@epita.fr>
12638
12639 * tests/actions.at (Mid-rule actions): Output on a single line
12640 instead of several.
12641
126422001-12-29 Akim Demaille <akim@epita.fr>
12643
12644 * doc/bison.texinfo: Formatting changes.
12645
126462001-12-29 Akim Demaille <akim@epita.fr>
12647
12648 Don't store the token defs in a muscle, just be ready to output it
12649 on command. Now possible via `symbols'. Fixes a memory leak.
12650
12651 * src/output.c (token_definitions_output): New.
12652 (output_parser, header_output): Use it.
12653 * src/reader.c (symbols_save): Remove.
12654
126552001-12-29 Akim Demaille <akim@epita.fr>
12656
12657 * src/bison.simple: Do not provide a default for YYSTYPE and
12658 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12659 default.
12660
126612001-12-29 Akim Demaille <akim@epita.fr>
12662
12663 Mid-rule actions are simply... ignored!
12664
12665 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12666 the empty-rule associated to the dummy symbol, not to the host
12667 rule.
12668 * tests/actions.at (Mid-rule actions): New.
12669
126702001-12-29 Akim Demaille <akim@epita.fr>
12671
12672 Memory leak.
12673
12674 * src/reader.c (reader): Free grammar.
12675
126762001-12-29 Akim Demaille <akim@epita.fr>
12677
12678 Memory leak.
12679
12680 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12681 since it allocates it for each state, although only one is needed.
12682 (allocate_storage): Do it here.
12683
126842001-12-29 Akim Demaille <akim@epita.fr>
12685
12686 * src/options.h, src/options.c (create_long_option_table): Rename
12687 as...
12688 (long_option_table_new): this, with a clearer prototype.
12689 (percent_table): Remove, unused,
12690 * src/getargs.c (getargs): Adjust.
12691
126922001-12-29 Akim Demaille <akim@epita.fr>
12693
12694 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12695 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12696 as states.
12697
126982001-12-29 Akim Demaille <akim@epita.fr>
12699
12700 * src/lalr.c (build_relations): Rename `states' as `states1'.
12701 Sorry, I don't understand exactly what it is, no better name...
12702
127032001-12-29 Akim Demaille <akim@epita.fr>
12704
12705 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12706 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12707 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12708 as rules.
12709
127102001-12-29 Akim Demaille <akim@epita.fr>
12711
12712 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12713 ago.
12714
127152001-12-29 Akim Demaille <akim@epita.fr>
12716
12717 * src/reader.c, src/reader.h (user_toknums): Remove.
12718 Adjust all users to use symbols[i]->user_token_number.
12719
127202001-12-29 Akim Demaille <akim@epita.fr>
12721
12722 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12723 Adjust all users to use symbols[i]->prec or ->assoc.
12724
127252001-12-29 Akim Demaille <akim@epita.fr>
12726
12727 * src/reader.c, src/reader.h (tags): Remove.
12728 Adjust all users to use symbols[i]->tag.
12729
127302001-12-29 Akim Demaille <akim@epita.fr>
12731
12732 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12733 and rule_table.
12734 * src/reader.c (packsymbols): Fill this table.
12735 Drop sprec.
12736 * src/conflicts.c (resolve_sr_conflict): Adjust.
12737 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12738 single table.
12739 Use symbols[i]->tag instead of tags[i].
12740
127412001-12-29 Akim Demaille <akim@epita.fr>
12742
12743 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12744 In addition, put a comment in there, to replace...
12745 * tests/regression.at (%union and C comments): Remove.
12746
127472001-12-29 Akim Demaille <akim@epita.fr>
12748
12749 * tests/regression.at (Web2c Actions): Blindly move the actual
12750 output as expected output. The contents *seem* right to me, but I
12751 can't pretend reading perfectly parser tables... Nonetheless, all
12752 the other tests pass correctly, the table look OK, even though the
12753 presence of `$axiom' is to be noted: AFAICS it is useless (but
12754 harmless).
12755
127562001-12-29 Akim Demaille <akim@epita.fr>
12757
12758 * src/reader.c (readgram): Don't add the rule 0 if there were no
12759 rules read. In other words, add it _after_ having performed
12760 grammar sanity checks.
12761 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12762
127632001-12-29 Akim Demaille <akim@epita.fr>
12764
12765 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12766 visible, and some states have now a different number.
12767
127682001-12-29 Akim Demaille <akim@epita.fr>
12769
12770 * src/reader.c (readgram): Bind the initial rule's lineno to that
12771 of the first rule.
12772 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12773 (Solved SR Conflicts): Adjust rule 0's line number.
12774
127752001-12-29 Akim Demaille <akim@epita.fr>
12776
12777 Fix the `GAWK Grammar' failure.
12778
12779 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12780 the reductions of the first state which was mistakenly confused
12781 with the final state because precisely final_state was initialized
12782 to 0.
12783 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12784 now noticed by Bison.
12785 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12786 have a reduction on $default.
12787
127882001-12-29 Akim Demaille <akim@epita.fr>
12789
12790 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12791 rule line numbers.
12792 * src/closure.c (print_closure): Likewise.
12793 * src/derives.c (print_derives): Likewise.
12794 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12795 now.
12796
127972001-12-29 Akim Demaille <akim@epita.fr>
12798
12799 * src/lalr.c (lookaheads_print): New.
12800 (lalr): Call it when --trace-flag.
12801 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12802 are dumped.
12803
128042001-12-29 Akim Demaille <akim@epita.fr>
12805
12806 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12807 when walking through ritem, even via rule->rhs.
12808 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12809 (useful_production, useless_nonterminals): Likewise.
12810 (reduce_grammar_tables): Likewise, plus update nritems.
12811 * src/nullable.c (set_nullable): Likewise.
12812 * src/lalr.c (build_relations): Likewise.
12813 * tests/sets.at (Nullable): Adjust.
12814 Fortunately, now, the $axiom is no longer nullable.
12815
128162001-12-29 Akim Demaille <akim@epita.fr>
12817
12818 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12819 the 0-sentinel.
12820 * src/gram.c (ritem_longest_rhs): Likewise.
12821 * src/reduce.c (nonterminals_reduce): Likewise.
12822 * src/print_graph.c (print_graph): Likewise.
12823 * src/output.c (output_rule_data): Likewise.
12824 * src/nullable.c (set_nullable): Likewise.
12825
128262001-12-29 Akim Demaille <akim@epita.fr>
12827
12828 * src/output.c: Comment changes.
12829
128302001-12-27 Paul Eggert <eggert@twinsun.com>
12831
12832 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12833 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12834 Sparc, as they were causing more porting problems than the
12835 (minor) performance improvement was worth.
12836
12837 Also, catch up with 1.31's YYSTD.
12838
128392001-12-27 Akim Demaille <akim@epita.fr>
12840
12841 * src/output.c (output_gram): Rely on nritems, not the
12842 0-sentinel. See below.
12843 Use -1 as separator, not 0.
12844 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12845 Rely on -1 as separator in yyrhs, instead of 0.
12846 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12847 twice `Now at end of input', therefore there are two lines less to
12848 expect.
12849
128502001-12-27 Akim Demaille <akim@epita.fr>
12851
12852 * tests/regression.at (Unresolved SR Conflicts):
12853 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12854 below.
12855
128562001-12-27 Akim Demaille <akim@epita.fr>
12857
12858 * src/LR0.c (new_state): Recognize the final state by the fact it
12859 is reached by eoftoken.
12860 (insert_start_shifting_state, insert_eof_shifting_state)
12861 (insert_accepting_state, augment_automaton): Remove, since now
12862 these states are automatically computed from the initial state.
12863 (generate_states): Adjust.
12864 * src/print.c: When reporting a rule number to the user, substract
12865 1, so that the axiom rule is rule 0, and the first user rule is 1.
12866 * src/reduce.c: Likewise.
12867 * src/print_graph.c (print_core): For the time being, just as for
12868 the report, depend upon --trace-flags to dump the full set of
12869 items.
12870 * src/reader.c (readgram): Once the grammar read, insert the rule
12871 0: `$axiom: START-SYMBOL $'.
12872 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12873 number of the states has changed (the final state is no longer
12874 necessarily the last), catch up.
12875
128762001-12-27 Akim Demaille <akim@epita.fr>
12877
12878 Try to make the use of the eoftoken valid. Given that its value
12879 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12880 is used instead of > 0 where appropriate, (ii), depend upon nritems
12881 instead of the 0-sentinel.
12882
12883 * src/gram.h, src/gram.c (nritems): New.
12884 Expected to be duplication of nitems, but for the time being...
12885 * src/reader.c (packgram): Assert nritems and nitems are equal.
12886 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12887 * src/closure.c (print_closure, print_fderives): Likewise.
12888 * src/gram.c (ritem_print): Likewise.
12889 * src/print.c (print_core, print_grammar): Likewise.
12890 * src/print_graph.c: Likewise.
12891
128922001-12-27 Akim Demaille <akim@epita.fr>
12893
12894 * src/main.c (main): If there are complains after grammar
12895 reductions, then output the report anyway if requested, then die.
12896 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12897 * src/reader.c (eoftoken): New.
12898 (parse_token_decl): If the token being defined has value `0', it
12899 is the eoftoken.
12900 (packsymbols): No longer hack `tags' to insert `$' by hand.
12901 Be sure to preserve the value of the eoftoken.
12902 (reader): Make sure eoftoken is defined.
12903 Initialize nsyms to 0: now eoftoken is created just like the others.
12904 * src/print.c (print_grammar): Don't special case the eof token.
12905 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12906 lie anyway, albeit pleasant.
12907 * tests/calc.at: Exercise error messages with eoftoken.
12908 Change the grammar so that empty input is invalid.
12909 Adjust expectations.
12910 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12911
129122001-12-27 Akim Demaille <akim@epita.fr>
12913
12914 * configure.in: Check the protos of strchr ans strspn.
12915 Replace strchr if needed.
12916 * src/system.h: Provide the protos of strchr, strspn and memchr if
12917 missing.
12918 * lib/strchr.c: New.
12919 * src/reader.c (symbols_save): Use strchr.
12920
129212001-12-27 Akim Demaille <akim@epita.fr>
12922
12923 * src/print.c, src/print_graph.c (escape): New.
12924 Use it to quote the TAGS outputs.
12925 * src/print_graph.c (print_state): Now errors are in red, and
12926 reductions in green.
12927 Prefer high to wide: output the state number on a line of its own.
12928
129292001-12-27 Akim Demaille <akim@epita.fr>
12930
12931 * src/state.h, src/state.c (reductions_new): New.
12932 * src/LR0.c (set_state_table): Let all the states have a
12933 `reductions', even if reduced to 0.
12934 (save_reductions): Adjust.
12935 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12936 * src/print.c (print_reductions, print_actions): Adjust.
12937 * src/output.c (action_row): Adjust.
12938
129392001-12-27 Akim Demaille <akim@epita.fr>
12940
12941 * src/state.h, src/state.c (errs_new, errs_dup): New.
12942 * src/LR0.c (set_state_table): Let all the states have an errs,
12943 even if reduced to 0.
12944 * src/print.c (print_errs, print_reductions): Adjust.
12945 * src/output.c (output_actions, action_row): Adjust.
12946 * src/conflicts.c (resolve_sr_conflict): Adjust.
12947
129482001-12-27 Akim Demaille <akim@epita.fr>
12949
12950 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12951
129522001-12-27 Akim Demaille <akim@epita.fr>
12953
12954 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12955 * src/print.c: here.
12956 (lookaheadset, shiftset): New, used as additional storage by
12957 print_reductions.
12958 (print_results): Adjust.
12959 (print_shifts, print_gotos, print_errs): New, extracted from...
12960 (print_actions): here.
12961 * src/print_graph.c (print_actions): Remove dead code.
12962
129632001-12-27 Akim Demaille <akim@epita.fr>
12964
12965 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12966 `$n' and `@n'.
12967
129682001-12-27 Akim Demaille <akim@epita.fr>
12969
12970 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12971 (build_relations): Adjust.
12972
129732001-12-27 Akim Demaille <akim@epita.fr>
12974
12975 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12976 duplication.
12977
129782001-12-27 Akim Demaille <akim@epita.fr>
12979
12980 * src/reader.c (packgram): Catch nitems overflows.
12981
129822001-12-27 Akim Demaille <akim@epita.fr>
12983
12984 * src/files.c, src/files.h (guard_obstack): Remove.
12985 * src/output.c (output): Adjust.
12986 * src/reader.c (parse_braces): New, factoring...
12987 (copy_action, copy_guard): these two which are renamed as...
12988 (parse_action, parse_guard): these.
12989 As a voluntary consequence, using braces around guards is now
12990 mandatory.
12991
129922001-12-27 Akim Demaille <akim@epita.fr>
12993
12994 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12995 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12996 members.
12997 (symbol_list_new): Adjust.
12998 (copy_action): action_line is the first line, not the last.
12999 (copy_guard): Just as for actions, store the `action' only, not
13000 the switch/case/break flesh.
13001 Don't parse the user action that might follow the guard, let...
13002 (readgram): do it, i.e., now, there can be an action after a
13003 guard.
13004 In other words the guard is just explicitly optional.
13005 (packgram): Adjust.
13006 * src/output.c (guards_output): New.
13007 (output_parser): Call it when needed.
13008 (output): Also free the guard and attrs obstacks.
13009 * src/files.c, src/files.h (obstack_save): Remove.
13010 (output_files): Remove.
13011 As a result, if one needs the former `.act' file, using an
13012 appropriate skeleton which requires actions and guards is now
13013 required.
13014 * src/main.c (main): Adjust.
13015 * tests/semantic.at: New.
13016 * tests/regression.at: Use `input.y' as input file name.
13017 Avoid 8+3 problems by requiring input.c when the test needs the
13018 parser.
13019
130202001-12-27 Akim Demaille <akim@epita.fr>
13021
13022 * src/reader.c (symbol_list_new): Be sure to initialize all the
13023 fields.
13024
130252001-12-27 Akim Demaille <akim@epita.fr>
13026
13027 All the hacks using a final pseudo state are now useless.
13028
13029 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13030 * src/lalr.c (nLA): New.
13031 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13032 instead of lookaheadsp from the pseudo state (nstate + 1).
13033
130342001-12-27 Akim Demaille <akim@epita.fr>
13035
13036 * src/output.c (action_row, token_actions): Use a state_t instead
13037 of a integer, and nlookaheads instead of the following state's
13038 lookaheadsp.
13039
130402001-12-27 Akim Demaille <akim@epita.fr>
13041
13042 * src/conflicts.c (log_resolution, flush_shift)
13043 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13044 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13045 (conflicts_print, print_reductions): Use a state_t instead of an
13046 integer when referring to a state.
13047 As much as possible, depend upon nlookaheads, instead of the
13048 `lookaheadsp' member of the following state (since lookaheads of
13049 successive states are successive, the difference between state n + 1
13050 and n served as the number of lookaheads for state n).
13051 * src/lalr.c (add_lookback_edge): Likewise.
13052 * src/print.c (print_core, print_actions, print_state)
13053 (print_results): Likewise.
13054 * src/print_graph.c (print_core, print_actions, print_state)
13055 (print_graph): Likewise.
13056 * src/conflicts.h: Adjust.
13057
130582001-12-27 Akim Demaille <akim@epita.fr>
13059
13060 * src/bison.hairy: Formatting/comment changes.
13061 ANSIfy.
13062 Remove `register' indications.
13063 Add plenty of `static'.
13064
130652001-12-27 Akim Demaille <akim@epita.fr>
13066
13067 * src/output.c (prepare): Drop the muscle `ntbase' which
13068 duplicates ntokens.
13069 * src/bison.simple: Formatting/comment changes.
13070 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13071 is an undocumented synonym.
13072
130732001-12-22 Akim Demaille <akim@epita.fr>
13074
13075 * src/output.c (output_table_data): Change the prototype to use
13076 `int' for array ranges: some invocations do pass an int, not a
13077 short.
13078 Reported by Wayne Green.
13079
130802001-12-22 Akim Demaille <akim@epita.fr>
13081
13082 Some actions of web2c.y are improperly triggered.
13083 Reported by Mike Castle.
13084
13085 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13086 * tests/regression.at (Web2c): Rename as...
13087 (Web2c Report): this.
13088 (Web2c Actions): New.
13089
130902001-12-22 Akim Demaille <akim@epita.fr>
13091
13092 Reductions in web2c.y are improperly reported.
13093 Reported by Mike Castle.
13094
13095 * src/conflicts.c (print_reductions): Fix.
13096 * tests/regression.at (Web2c): New.
13097
130982001-12-18 Akim Demaille <akim@epita.fr>
13099
13100 Some host fail on `assert (!"foo")', which expands to
13101 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13102 Reported by Nelson Beebee.
13103
13104 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13105 `#define it_succeeded 0' and `assert (it_succeeded)'.
13106
131072001-12-17 Marc Autret <autret_m@epita.fr>
13108
13109 * src/bison.simple: Don't hard code the skeleton line and filename.
13110 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13111 New line counter 'skeleton_line' (skeleton-line muscle).
13112
131132001-12-17 Paul Eggert <eggert@twinsun.com>
13114
13115 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13116 YYDEBUG must be defined to a nonzero value.
13117
13118 * src/bison.simple (yytname): Do not assume that the user defines
13119 YYDEBUG to a properly parenthesized expression.
13120
131212001-12-17 Akim Demaille <akim@epita.fr>
13122
13123 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13124 nlookaheads is a new member.
13125 Adjust all users.
13126 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13127 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13128 state.
13129
131302001-12-17 Akim Demaille <akim@epita.fr>
13131
13132 * src/files.h, src/files.c (open_files, close_files): Remove.
13133 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13134 let...
13135 * src/reader.c (reader): Do it.
13136
131372001-12-17 Akim Demaille <akim@epita.fr>
13138
13139 * src/conflicts.c (print_reductions): Formatting changes.
13140
131412001-12-17 Akim Demaille <akim@epita.fr>
13142
13143 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13144 (flush_reduce): New.
13145 (resolve_sr_conflict): Adjust.
13146
131472001-12-17 Akim Demaille <akim@epita.fr>
13148
13149 * src/output.c (output_obstack): Be static and rename as...
13150 (format_obstack): this, to avoid any confusion with files.c's
13151 output_obstack.
13152 * src/reader.h (muscle_obstack): Move to...
13153 * src/output.h: here, since it's defined in output.c.
13154
131552001-12-17 Akim Demaille <akim@epita.fr>
13156
13157 * src/output.c (action_row, save_column, default_goto)
13158 (sort_actions, matching_state, pack_vector): Better variable
13159 locality.
13160
131612001-12-17 Akim Demaille <akim@epita.fr>
13162
13163 * src/output.c: Various formatting changes.
13164
131652001-12-17 Akim Demaille <akim@epita.fr>
13166
13167 * src/files.c (output_files): Free the output_obstack.
13168 * src/main.c (main): Call print and print_graph conditionally.
13169 * src/print.c (print): Work unconditionally.
13170 * src/print_graph.c (print_graph): Work unconditionally.
13171 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13172
131732001-12-16 Marc Autret <autret_m@epita.fr>
13174
13175 * src/output.c (actions_output): Fix. When we use %no-lines,
13176 there is one less line per action.
13177
131782001-12-16 Marc Autret <autret_m@epita.fr>
13179
13180 * src/bison.simple: Remove a useless #line directive.
13181 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13182 * src/output.c (get_lines_number): New.
13183 (output_parser): Adjust, now takes care about the lines of a
13184 output muscles.
13185 Fix line numbering.
13186 (actions_output): Computes the number of lines taken by actions.
13187 (output_master_parser): Insert new skeleton which is the name of
13188 the output parser file name.
13189
131902001-12-15 Marc Autret <autret_m@epita.fr>
13191
13192 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13193
131942001-12-15 Marc Autret <autret_m@epita.fr>
13195
13196 * src/output.c (output_gram): Keep track of the hairy one.
13197
131982001-12-15 Akim Demaille <akim@epita.fr>
13199
13200 Make `make distcheck' work.
13201
13202 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13203 system.h which uses libgettext.h.
13204
132052001-12-15 Akim Demaille <akim@epita.fr>
13206
13207 * src/nullable.c (set_nullable): Useless rules must be skipped,
13208 otherwise, since we range over their symbols, we might look at a
13209 nonterminal which no longer ``exists'', i.e., it is not counted in
13210 `nvars', hence we overflow our arrays.
13211
132122001-12-15 Akim Demaille <akim@epita.fr>
13213
13214 The header can also be produced directly, without any obstack!
13215 Yahoo!
13216
13217 * src/files.c, src/files.h (defines_obstack): Remove.
13218 (compute_header_macro): Global.
13219 (defines_obstack_save): Remove.
13220 * src/reader.c (parse_union_decl): No longer output to
13221 defines_obstack: its content can be found in the `stype' muscle
13222 anyway.
13223 (output_token_translations): Merge into...
13224 (symbols_output): this.
13225 Rename as...
13226 (symbols_save): this.
13227 (reader): Adjust.
13228 * src/output.c (header_output): New.
13229 (output): Call it.
13230
132312001-12-15 Akim Demaille <akim@epita.fr>
13232
13233 * src/reader.c (parse_union_decl): Instead of handling two obstack
13234 simultaneously, use one to define the `stype' muscle, and use the
13235 value of the latter to fill defines_obstack.
13236 (copy_comment): Remove.
13237 (copy_comment2): Work for a single obstack.
13238 Rename as...
13239 (copy_comment): this.
13240
132412001-12-15 Akim Demaille <akim@epita.fr>
13242
13243 * src/lex.c, src/lex.h (xgetc): No longer static.
13244 * src/reader.c (parse_union_decl): Revamp.
13245
132462001-12-15 Akim Demaille <akim@epita.fr>
13247
13248 Still making progress in separating Bison into (i) input, (ii)
13249 process, (iii) output: now we can directly output the parser file
13250 without using table_obstack at all.
13251
13252 * src/files.c, src/files.h (table_obstack): Bye bye.
13253 (parser_file_name): New.
13254 * src/files.c (compute_output_file_names): Compute it.
13255 * src/output.c (actions_output, output_parser)
13256 (output_master_parser): To a file instead of an obstack.
13257
132582001-12-15 Akim Demaille <akim@epita.fr>
13259
13260 Attach actions to rules, instead of pre-outputting them to
13261 actions_obstack.
13262
13263 * src/gram.h (rule_t): action and action_line are new members.
13264 * src/reader.c (symbol_list): Likewise.
13265 (copy_action): Save the actions within the rule.
13266 (packgram): Save them in rule_table.
13267 * src/output.c (actions_output): New.
13268 (output_parser): Use it on `%%actions'.
13269 (output_rule_data): Don't free rule_table.
13270 (output): Do it.
13271 (prepare): Don't save the `action' muscle.
13272 * src/bison.simple: s/%%action/%%actions/.
13273
132742001-12-15 Akim Demaille <akim@epita.fr>
13275
13276 * src/reader.c (copy_action): When --yacc, don't append a `;'
13277 to the user action: let it fail if lacking.
13278 Suggested by Arnold Robbins and Tom Tromey.
13279
132802001-12-14 Akim Demaille <akim@epita.fr>
13281
13282 * src/lex.c (literalchar): Simply return the char you decoded, non
13283 longer mess around with obstacks and int pointers.
13284 Adjust all callers.
13285
132862001-12-14 Akim Demaille <akim@epita.fr>
13287
13288 * src/lex.c (literalchar): Don't escape the special characters,
13289 just decode them, and keep them as char (before, eol was output as
13290 the 2 char string `\n' etc.).
13291 * src/output.c (output_rule_data): Use quotearg to output the
13292 token strings.
13293
132942001-12-13 Paul Eggert <eggert@twinsun.com>
13295
13296 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13297 Do not infringe on the global user namespace when using C++.
13298 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13299 All uses of `fprintf' and `stderr' changed.
13300
13301 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13302
133032001-12-13 Akim Demaille <akim@epita.fr>
13304
13305 The computation of nullable is broken: it doesn't handle empty
13306 RHS's properly.
13307
13308 * tests/torture.at (GNU AWK Grammar): New.
13309 * tests/sets.at (Nullable): New.
13310 * src/nullable.c (set_nullable): Instead of blindly looping over
13311 `ritems', loop over the rules, and then over their rhs's.
13312
13313 Work around Autotest bugs.
13314
13315 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13316 frame, because Autotest understand lines starting with a `+' as
13317 traces from the shell. Then, they are not processed properly.
13318 Admittedly an Autotest bug, but we don't have time to wait for
13319 Autotest to catch up.
13320 * tests/regression.at (Broken Closure): Adjust to the new table
13321 frames.
13322 Move to...
13323 * tests/sets.at: here.
13324
133252001-12-13 Akim Demaille <akim@epita.fr>
13326
13327 * src/closure.c (closure): Use nrules instead of playing tricks
13328 with BITS_PER_WORD.
13329
133302001-12-13 Akim Demaille <akim@epita.fr>
13331
13332 * src/print.c (print_actions): Output the handling of `$' as the
13333 traces do: shifting the token EOF. Before EOF was treated as a
13334 nonterminal.
13335 * tests/regression.at: Adjust some tests.
13336 * src/print_graph.c (print_core): Complete the set of items via
13337 closure. The next-to-final and final states are still unsatisfying,
13338 but that's to be addressed elsewhere.
13339 No longer output the rule numbers, but do output the state number.
13340 A single loop for the shifts + gotos is enough, but picked a
13341 distinct color for each.
13342 (print_graph): Initialize and finalize closure.
13343
133442001-12-13 Akim Demaille <akim@epita.fr>
13345
13346 * src/reader.c (readgram): Remove dead code, an strip useless
13347 braces.
13348 (get_type): Remove, unused.
13349
133502001-12-12 Akim Demaille <akim@epita.fr>
13351
13352 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13353 on that of lib/error.c.
13354
133552001-12-12 Akim Demaille <akim@epita.fr>
13356
13357 Some hosts don't like `/' in includes.
13358
13359 * src/system.h: Include libgettext.h without qualifying the path.
13360 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13361 $(top_srcdir).
13362
133632001-12-11 Marc Autret <autret_m@epita.fr>
13364
13365 * src/output.c (output_parser): Remove useless muscle.
13366
133672001-12-11 Marc Autret <autret_m@epita.fr>
13368
13369 * src/bison.simple: Remove #line just before %%epilogue. It
13370 is now handled in ...
13371 * src/reader.c (read_additionnal_code): Add the output of a
13372 #line for the epilogue.
13373
133742001-12-10 Marc Autret <autret_m@epita.fr>
13375
13376 * src/reader.c (copy_definition): Re-use CPP-outed code which
13377 replace precedent remove.
13378 * src/bison.simple: Remove #line before %%prologue because
13379 %%input-line is wrong at this time.
13380
133812001-12-10 Marc Autret <autret_m@epita.fr>
13382
13383 * src/reader.c (symbols_output): Clean up.
13384 * src/output.c (output_gram, output): Clean up.
13385
133862001-12-10 Akim Demaille <akim@epita.fr>
13387
13388 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13389 * src/LR0.c (set_state_table): here.
13390 * src/lalr.c (lalr): Call it.
13391
133922001-12-10 Akim Demaille <akim@epita.fr>
13393
13394 * src/state.h (shifts): Remove the `number' member: shifts are
13395 attached to state, hence no longer need to be labelled with a
13396 state number.
13397
133982001-12-10 Akim Demaille <akim@epita.fr>
13399
13400 Now that states have a complete set of members, the linked list of
13401 shifts is useless: just fill directly the state's shifts member.
13402
13403 * src/state.h (shifts): Remove the `next' member.
13404 * src/LR0.c (first_state, last_state): Remove.
13405 Adjust the callers.
13406 (augment_automaton): Don't look for the shifts that must be added
13407 a shift on EOF: it is those of the state we looked for! But now,
13408 since shifts are attached, it is no longer needed to looking
13409 merely by its id: its number.
13410
134112001-12-10 Akim Demaille <akim@epita.fr>
13412
13413 * src/LR0.c (augment_automaton): Better variable locality.
13414 Remove an impossible branch: if there is a state corresponding to
13415 the start symbol being shifted, then there is shift for the start
13416 symbol from the initial state.
13417
134182001-12-10 Akim Demaille <akim@epita.fr>
13419
13420 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13421 only when appropriate: when insert_start_shifting_state' is not
13422 invoked.
13423 * tests/regression.at (Rule Line Numbers): Adjust.
13424
134252001-12-10 Akim Demaille <akim@epita.fr>
13426
13427 * src/LR0.c (augment_automaton): Now that all states have shifts,
13428 merge the two cases addition shifts to the initial state.
13429
134302001-12-10 Akim Demaille <akim@epita.fr>
13431
13432 * src/lalr.c (set_state_table): Move to...
13433 * src/LR0.c: here.
13434 * src/lalr.c (lalr): Don't call it...
13435 * src/LR0.c (generate_states): do it.
13436 * src/LR0.h (first_state): Remove, only the table is used.
13437
134382001-12-10 Akim Demaille <akim@epita.fr>
13439
13440 * src/LR0.h (first_shift, first_reduction): Remove.
13441 * src/lalr.c: Don't use first_shift: find shifts through the
13442 states.
13443
134442001-12-10 Akim Demaille <akim@epita.fr>
13445
13446 * src/LR0.c: Attach shifts to states as soon as they are
13447 computed.
13448 * src/lalr.c (set_state_table): Instead of assigning shifts to
13449 state, just assert that the mapping was properly done.
13450
134512001-12-10 Akim Demaille <akim@epita.fr>
13452
13453 * src/LR0.c (insert_start_shift): Rename as...
13454 (insert_start_shifting_state): this.
13455 (insert_eof_shifting_state, insert_accepting_state): New.
13456 (augment_automaton): Adjust.
13457 Better locality of the variables.
13458 When looking if the start_symbol is shifted from the initial
13459 state, using `while (... symbol != start_symbol ...)' sounds
13460 better than `while (... symbol < start_symbol ...)': If fail
13461 to see how the order between symbols could be relevant!
13462
134632001-12-10 Akim Demaille <akim@epita.fr>
13464
13465 * src/getargs.h: Don't declare `spec_name_prefix' and
13466 `spec_file_prefix', declared by src/files.h.
13467 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13468 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13469 * src/output.c (prepare): Adjust.
13470 * src/reader.c (symbols_output): Likewise.
13471 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13472
134732001-12-10 Akim Demaille <akim@epita.fr>
13474
13475 * src/muscle_tab.c (muscle_init): NULL is a better default than
13476 `"0"'.
13477
134782001-12-10 Akim Demaille <akim@epita.fr>
13479
13480 * src/reader.c (reader): Calling symbols_output once is enough.
13481
134822001-12-10 Akim Demaille <akim@epita.fr>
13483
13484 Now that states have a complete set of members, the linked list of
13485 reductions is useless: just fill directly the state's reductions
13486 member.
13487
13488 * src/state.h (struct reductions): Remove member `number' and
13489 `next'.
13490 * src/LR0.c (first_reduction, last_reduction): Remove.
13491 (save_reductions): Don't link the new reductions, store them in
13492 this_state.
13493 * src/lalr.c (set_state_table): No need to attach reductions to
13494 states, it's already done.
13495 * src/output.c (output_actions): No longer free the shifts, then
13496 the reductions, then the states: free all the states and their
13497 members.
13498
134992001-12-10 Akim Demaille <akim@epita.fr>
13500
13501 * src/options.c (OPTN, DRTV, BOTH): New.
13502 (option_table): Use them.
13503
13504 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13505 the job of system.h.
13506 * src/options.c: Don't include stdio.h and xalloc.h for the same
13507 reasons.
13508
135092001-12-10 Akim Demaille <akim@epita.fr>
13510
13511 * src/output.c (output, prepare): Make sure the values of the
13512 muscles `action' and `prologue' are 0-terminated.
13513
135142001-12-10 Akim Demaille <akim@epita.fr>
13515
13516 Clean up GCC warnings.
13517
13518 * src/reader.c (copy_action): `buf' is not used.
13519 (parse_skel_decl): Be static.
13520 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13521 * src/options.h (create_long_option_table): Have a real prototype.
13522 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13523 (hash_delete_at): Return const void *.
13524 Adjust casts to preserve the const.
13525
135262001-12-10 Akim Demaille <akim@epita.fr>
13527
13528 * configure.in: Require 2.52g.
13529 M4 is not needed, but AUTOM4TE is.
13530 * m4/m4.m4: Remove.
13531 * tests/Makefile.am: Adjust.
13532
135332001-12-10 Akim Demaille <akim@epita.fr>
13534
13535 One structure for states is enough, even though theoretically
13536 there are LR(0) states and LALR(1) states.
13537
13538 * src/lalr.h (state_t): Remove.
13539 (state_table): Be state_t **, not state_t *.
13540 * src/state.h (core, CORE_ALLOC): Rename as...
13541 (state_t, STATE_ALLOC): this.
13542 Add the LALR(1) members: shifts, reductions, errs.
13543 * src/LR0.c (state_table): Rename as...
13544 (state_hash): this, to avoid name clashes with the global
13545 `state_table'.
13546 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13547 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13548
135492001-12-10 Akim Demaille <akim@epita.fr>
13550
13551 Bison dumps core on bash.y.
13552 Reported by Pascal Bart.
13553
13554 * src/warshall.c (bitmatrix_print): New.
13555 (TC): Use it.
13556 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13557 j must be the outer loop.
13558 * tests/regression.at (Broken Closure): New.
13559
135602001-12-05 Akim Demaille <akim@epita.fr>
13561
13562 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13563 its argument.
13564 Reported by Peter Hamorsky.
13565
135662001-12-05 Akim Demaille <akim@epita.fr>
13567
13568 * src/conflicts.c (err_table): Remove.
13569 (resolve_sr_conflict): Adjust.
13570 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13571 Rename as...
13572 (state_t.reductions, state_t.shifts): this.
13573
135742001-12-05 Akim Demaille <akim@epita.fr>
13575
13576 * src/reduce.c (reduce_grammar_tables): No longer disable the
13577 removal of useless rules via CPP but via `if (0)', so that the
13578 compiler still check the code is valid.
13579 For instance, it should have noticed `rline' no longer exists: use
13580 the `line' member of rule_t.
13581 * src/gram.c (dummy, rline): Remove, unused.
13582
135832001-12-05 Akim Demaille <akim@epita.fr>
13584
13585 * src/output.c (pack_vector): Use assert, not berror.
13586 * src/main.c (berror): Remove, unused.
13587
135882001-12-05 Akim Demaille <akim@epita.fr>
13589
13590 New experimental feature: if --verbose --trace output all the
13591 items of a state, not only its kernel.
13592
13593 * src/print.c (print_core): If `trace_flag', then invoke closure
13594 before outputting the items of the state (print_core is no longer
13595 a correct name them).
13596 (print_results): Invoke new_closure/free_closure if needed.
13597
135982001-12-05 Akim Demaille <akim@epita.fr>
13599
13600 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13601 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13602 (nitemset): for consistency with the rest of the project.
13603
136042001-12-05 Akim Demaille <akim@epita.fr>
13605
13606 * src/closure.c (print_closure): Improve.
13607 (closure): Use it for printing input and output.
13608
136092001-12-05 Akim Demaille <akim@epita.fr>
13610
13611 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13612 indexed by nonterminals.
13613
136142001-12-05 Akim Demaille <akim@epita.fr>
13615
13616 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13617 what it was!).
13618 * src/warshall.h: Remove accidental duplication of the content.
13619
136202001-12-05 Akim Demaille <akim@epita.fr>
13621
13622 * src/closure.c (set_fderives): De-obfuscate.
13623
136242001-12-05 Akim Demaille <akim@epita.fr>
13625
13626 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13627
136282001-12-05 Akim Demaille <akim@epita.fr>
13629
13630 * src/closure.c (set_firsts): De-obfuscate.
13631
136322001-12-05 Akim Demaille <akim@epita.fr>
13633
13634 * src/output.c (action_row): De-obfuscate
13635 using the good o' techniques: arrays not pointers, variable
13636 locality, BITISSET, RESETBIT etc.
13637
136382001-12-05 Akim Demaille <akim@epita.fr>
13639
13640 Pessimize the code to simplify it: from now on, all the states
13641 have a valid SHIFTS, which NSHIFTS is possibly 0.
13642
13643 * src/LR0.c (shifts_new): Be global and move to..
13644 * src/state.c, src/state.h: here.
13645 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13646 * src/print_graph: Adjust.
13647
136482001-12-05 Akim Demaille <akim@epita.fr>
13649
13650 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13651 * src/conflicts.c: Use it.
13652 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13653 incorrectly ``simplified''.
13654
136552001-12-05 Akim Demaille <akim@epita.fr>
13656
13657 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13658 using the good o' techniques: arrays not pointers, variable
13659 locality, BITISSET, RESETBIT etc.
13660
136612001-12-05 Akim Demaille <akim@epita.fr>
13662
13663 * src/state.h (SHIFT_SYMBOL): New.
13664 * src/conflicts.c: Use it to deobfuscate.
13665
136662001-12-05 Akim Demaille <akim@epita.fr>
13667
13668 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13669 (print_reductions): De-obfuscate using the good o' techniques:
13670 arrays not pointers, variable locality, BITISSET.
13671
136722001-12-05 Akim Demaille <akim@epita.fr>
13673
13674 * src/conflicts.c (print_reductions): Arrays, not pointers.
13675 Use BITISSET.
13676
136772001-12-05 Akim Demaille <akim@epita.fr>
13678
13679 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13680
136812001-12-05 Akim Demaille <akim@epita.fr>
13682
13683 * src/conflicts.c (print_reductions): Improve variable locality.
13684
136852001-12-05 Akim Demaille <akim@epita.fr>
13686
13687 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13688
136892001-12-05 Akim Demaille <akim@epita.fr>
13690
13691 * src/conflicts.c (print_reductions): Improve variable locality.
13692
136932001-12-05 Akim Demaille <akim@epita.fr>
13694
13695 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13696 * src/lalr.c: Use them.
13697
136982001-12-05 Akim Demaille <akim@epita.fr>
13699
13700 * src/LR0.c (augment_automaton): Formatting changes.
13701 Better variable locality.
13702
137032001-12-05 Akim Demaille <akim@epita.fr>
13704
13705 * src/lalr.c (matrix_print): New.
13706 (transpose): Use it.
13707 Use arrays instead of pointers.
13708
137092001-12-05 Akim Demaille <akim@epita.fr>
13710
13711 * src/lalr.c (maxrhs): Move to...
13712 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13713 * src/lalr.c (build_relations): Adjust.
13714
137152001-12-05 Akim Demaille <akim@epita.fr>
13716
13717 * src/lalr.c (transpose): Free the memory allocated to the
13718 argument, as it is replaced by the results by the unique caller.
13719 (build_relations): Merely invoke transpose: it handles the memory
13720 deallocation.
13721 Improve variable locality.
13722 Avoid variables used as mere abbreviations.
13723 (compute_lookaheads): Use arrays instead of pointers.
13724
137252001-12-05 Akim Demaille <akim@epita.fr>
13726
13727 * src/lalr.c (initialize_F): Improve variable locality.
13728 Avoid variables used as mere abbreviations.
13729
137302001-12-05 Akim Demaille <akim@epita.fr>
13731
13732 * src/derives.c (print_derives): Display the ruleno.
13733 * src/lalr.c (initialize_F, transpose): Better variable locality
13734 to improve readability.
13735 Avoid variables used as mere abbreviations.
13736
137372001-12-05 Akim Demaille <akim@epita.fr>
13738
13739 * src/lalr.c (traverse): Use arrays instead of pointers.
13740
137412001-12-05 Akim Demaille <akim@epita.fr>
13742
13743 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13744 the handling of squeue.
13745 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13746
137472001-12-05 Akim Demaille <akim@epita.fr>
13748
13749 Because useless nonterminals are now kept alive (instead of being
13750 `destroyed'), we now sometimes examine them, and store information
13751 related to them. Hence we need to know their number, and adjust
13752 memory allocations.
13753
13754 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13755 static.
13756 * src/LR0.c (allocate_itemsets): The memory allocated to
13757 `symbol_count' was used for two different purpose: once to count
13758 the number of occurrences of each symbol, and later reassigned to
13759 `shift_symbol', containing the symbol that can be shifted from a
13760 given state.
13761 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13762 only, and...
13763 (new_itemsets): Allocate `shift_symbol' here.
13764 (allocate_itemsets): symbol_count includes useless nonterminals.
13765 Make room for them.
13766 (free_storage): Use `free', not `XFREE', for pointers that cannot
13767 be null.
13768
137692001-12-05 Akim Demaille <akim@epita.fr>
13770
13771 * src/nullable.c (set_nullable): Deobfuscate the handling of
13772 ritem.
13773 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13774
137752001-12-05 Akim Demaille <akim@epita.fr>
13776
13777 * src/gram.c, src/gram.h (ritem_print): New.
13778 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13779 (This useless function was defined only to work around VMS linkers
13780 that can't handle compilation units with variables only).
13781 * src/reduce.c (dump_grammar): Use it to trace the construction of
13782 ritem.
13783
137842001-12-04 Paul Eggert <eggert@twinsun.com>
13785
13786 * src/bison.simple (union yyalloc): Change member names
13787 to be the same as the stack names.
13788 (yyparse): yyptr is now union yyalloc *, not char *.
13789 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13790 and may generate better code on some machines.
13791 (yystpcpy): Use prototype if __STDC__ is defined, not just
13792 if __cplusplus is defined.
13793
137942001-11-30 Akim Demaille <akim@epita.fr>
13795
13796 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13797 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13798 Gettext doesn't compile cleanly, and dies with -Werror.
13799 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13800 Include WARNING_CFLAGS here.
13801 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13802 before being defined.
13803
138042001-11-27 Paul Eggert <eggert@twinsun.com>
13805
13806 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13807 First arg is int, not unsigned.
13808 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13809 (SIZE_MAX, UINT_MAX): New macros.
13810 (quotearg_n_options): Abort if N is negative.
13811 Avoid overflow check on hosts where size_t is 64 bits and int
13812 is 32 bits, as overflow is impossible there.
13813 Fix off-by-one typo that caused unnecessary reallocation.
13814
138152001-11-29 Paul Eggert <eggert@twinsun.com>
13816
13817 Name space cleanup in generated parser.
13818
13819 * doc/bison.texinfo (Bison Parser): Discuss system headers
13820 and their effect on the user name space.
13821
13822 * src/bison.simple:
13823 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13824 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13825 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13826
13827 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13828 on user names when possible.
13829
13830 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13831 Simplify test for whather <alloca.h> exists.
13832
13833 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13834
13835 (<stdio.h>): Include if YYDEBUG.
13836
13837 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13838 ! defined (yyoverflow) && ! defined (yymemcpy).
13839
13840 (yymemcpy, yyparse): Rename local variables as needed so that
13841 they all begin with 'yy'.
13842
13843 (yystrlen, yystpcpy): New functions.
13844
13845 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13846 All uses changed.
13847
13848 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13849 instead of relying on string.h functions. Use YYSTACK_ALLOC
13850 and YYSTACK_FREE instead of malloc and free.
13851
138522001-11-30 Akim Demaille <akim@epita.fr>
13853
13854 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13855 before their first uses.
13856 (YYBISON, YYPURE): Move to the top of the output.
13857
138582001-11-30 Akim Demaille <akim@epita.fr>
13859
13860 * tests/reduce.at (Useless Nonterminals): Fix.
13861
138622001-11-30 Akim Demaille <akim@epita.fr>
13863
13864 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13865 if body instead of `;' to pacify GCC's warnings.
13866
138672001-11-30 Akim Demaille <akim@epita.fr>
13868
13869 Instead of mapping the LHS of unused rules to -1, keep the LHS
13870 valid, but flag the rules as invalid.
13871
13872 * src/gram.h (rule_t): `useful' is a new member.
13873 * src/print.c (print_grammar): Adjust.
13874 * src/derives.c (set_derives): Likewise.
13875 * src/reader.c (packgram, reduce_output): Likewise.
13876 * src/reduce.c (reduce_grammar_tables): Likewise.
13877 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13878
138792001-11-30 Akim Demaille <akim@epita.fr>
13880
13881 * src/reduce.c (reduce_output): Formatting changes.
13882 * src/print.c (print_results, print_grammar): Likewise.
13883 * tests/regression.at (Rule Line Numbers)
13884 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13885
138862001-11-30 Akim Demaille <akim@epita.fr>
13887
13888 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13889 useless nonterminals, move them at the end of the symbol arrays.
13890 (reduce_output): Adjust.
13891 * tests/reduce.at (Useless Nonterminals): Adjust.
13892
138932001-11-30 Akim Demaille <akim@epita.fr>
13894
13895 * src/reduce.c: Various comment/formatting changes.
13896 (nonterminals_reduce): New, extracted from...
13897 (reduce_grammar_tables): here.
13898 (reduce_grammar): Call nonterminals_reduce.
13899
139002001-11-29 Paul Eggert <eggert@twinsun.com>
13901
13902 * src/bison.simple (YYSTACK_REALLOC): Remove.
13903 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13904 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13905 New macros.
13906 (union yyalloc): New type.
13907 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13908 an arbitrary restriction on hosts where size_t is wider than int.
13909
13910 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13911 a parser stack overflow. Allocate just one block of memory for all
13912 three stacks, instead of allocating three blocks; this typically is
13913 faster and reduces fragmentation.
13914
13915 Do not limit the number of items in the stack to a value that fits
13916 in 'int', as this is an arbitrary limit on hosts with 64-bit
13917 size_t and 32-bit int.
13918
139192001-11-29 Marc Autret <autret_m@epita.fr>
13920
13921 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13922 of defining YYERROR_VERBOSE.
13923 [AT_DATA]: $4 is now out of C declarations in the prologue.
13924
139252001-11-28 Marc Autret <autret_m@epita.fr>
13926
13927 * src/reader.c (parse_dquoted_param): New.
13928 (parse_skel_decl): Use it.
13929 * src/lex.h: Add its prototype.
13930 * src/lex.c (literalchar): Become not static.
13931
139322001-11-28 Marc Autret <autret_m@epita.fr>
13933
13934 * src/output.h: And put its extern declaration here.
13935 * src/output.c (error_verbose): Define here.
13936 (prepare): Echo name modification.
13937 * src/getargs.h: Clean its extern declaration.
13938 * src/getargs.c (error_verbose_flag): Remove.
13939 (getargs): Remove case 'e'.
13940 * src/options.c (option_table): 'error-verbose' is now seen as simple
13941 percent option.
13942 Include output.h.
13943
13944 * src/reader.c (read_declarations): Remove case tok_include.
13945 (parse_include_decl): Remove.
13946 * src/lex.h (token_t): Remove tok_include.
13947 * src/options.c (option_table): 'include' is now a simple command line
13948 option.
13949
139502001-11-28 Marc Autret <autret_m@epita.fr>
13951
13952 * src/bison.simple: Adjust muscle names.
13953 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13954 * src/output.c (prepare): s/_/-/ for the muscles names.
13955 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13956
139572001-11-28 Marc Autret <autret_m@epita.fr>
13958
13959 * src/bison.simple: Fix debug.
13960 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13961
139622001-11-28 Akim Demaille <akim@epita.fr>
13963
13964 * src/LR0.c (shifts_new): New.
13965 (save_shifts, insert_start_shift, augment_automaton): Use it.
13966
139672001-11-28 Akim Demaille <akim@epita.fr>
13968
13969 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13970 keep ruleno only.
13971
139722001-11-28 Akim Demaille <akim@epita.fr>
13973
13974 * src/closure.c (closure): Instead of looping over word in array
13975 then bits in words, loop over bits in array.
13976
139772001-11-28 Akim Demaille <akim@epita.fr>
13978
13979 * src/closure.c (closure): No longer optimize the special case
13980 where all the bits of `ruleset[r]' are set to 0, to make the code
13981 clearer.
13982
139832001-11-28 Akim Demaille <akim@epita.fr>
13984
13985 * src/closure.c (closure): `r' and `c' are new variables, used to
13986 de-obfuscate accesses to RULESET and CORE.
13987
139882001-11-28 Akim Demaille <akim@epita.fr>
13989
13990 * src/reduce.c (reduce_print): Use ngettext.
13991 (dump_grammar): Improve the trace accuracy.
13992
139932001-11-28 Akim Demaille <akim@epita.fr>
13994
13995 * src/reduce.c (dump_grammar): Don't translate trace messages.
13996
139972001-11-28 Akim Demaille <akim@epita.fr>
13998
13999 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14000 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14001 as all tags are free'ed afterwards.
14002 From Enrico Scholz.
14003
140042001-11-27 Paul Eggert <eggert@twinsun.com>
14005
14006 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14007 use alloca when we didn't want to, and vice versa.
14008
140092001-11-27 Marc Autret <autret_m@epita.fr>
14010
14011 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14012 initialization.
14013 * src/output.c (prepare): Remove its update.
14014
140152001-11-27 Marc Autret <autret_m@epita.fr>
14016
14017 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14018 Use %error-verbose.
14019
140202001-11-27 Marc Autret <autret_m@epita.fr>
14021
14022 * src/bison.simple: Remove YYERROR_VERBOSE using.
14023 Use %%error_verbose.
14024 (yyparse): Likewise.
14025 * src/output.c (prepare): Give its final value.
14026 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14027 * src/getargs.h: Add its extern declaration.
14028 * src/getargs.c (error_verbose_flag): New int.
14029 (getargs): Update to catch new case.
14030 * src/options.c (option_table): 'error-verbose' is a new option.
14031 (shortopts): Update.
14032
140332001-11-27 Akim Demaille <akim@epita.fr>
14034
14035 * src/system.h: Use intl/libgettext.h.
14036 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14037
140382001-11-27 Akim Demaille <akim@epita.fr>
14039
14040 * tests/torture.at (Exploding the Stack Size with Malloc):
14041 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14042
140432001-11-27 Akim Demaille <akim@epita.fr>
14044
14045 * src/files.c: Include error.h.
14046 Reported by Hans Aberg.
14047
140482001-11-26 Marc Autret <autret_m@epita.fr>
14049
14050 * src/reader.c (parse_include_decl): New, not yet implemented.
14051 (read_declarations): Add case tok_include.
14052 * src/getargs.h (include): Add its extern definition.
14053 * src/getargs.c (include): New const char *.
14054 (getargs): Add case '-I'.
14055 * src/options.c (option_table): Add include as command line and
14056 percent option.
14057 * src/lex.h (token_t): Add tok_include.
14058
140592001-11-26 Akim Demaille <akim@epita.fr>
14060
14061 * src/reader.c (readgram): Make sure rules for mid-rule actions
14062 have a lineno equal to that of their host rule.
14063 Reported by Hans Aberg.
14064 * tests/regression.at (Rule Line Numbers): New.
14065
140662001-11-26 Akim Demaille <akim@epita.fr>
14067
14068 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14069 size_ts.
14070
140712001-11-26 Akim Demaille <akim@epita.fr>
14072
14073 * src/complain.c, src/complain.h (error): Remove, provided by
14074 lib/error.[ch].
14075
140762001-11-26 Akim Demaille <akim@epita.fr>
14077
14078 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14079 issue an error message.
14080 * tests/regression.at (Invalid %directive): New.
14081 Reported by Hans Aberg.
14082
140832001-11-26 Akim Demaille <akim@epita.fr>
14084
14085 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14086 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14087
140882001-11-26 Akim Demaille <akim@epita.fr>
14089
14090 * src/conflicts.c (conflicts_print): Don't complain at all when
14091 there are no reduce/reduce conflicts, and as many shift/reduce
14092 conflicts as expected.
14093 * tests/regression.at (%expect right): Adjust.
14094
140952001-11-23 Akim Demaille <akim@epita.fr>
14096
14097 * lib/alloca.c: Update, from fileutils.
14098
140992001-11-23 Akim Demaille <akim@epita.fr>
14100
14101 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14102
141032001-11-23 Akim Demaille <akim@epita.fr>
14104
14105 * src/system.h: Include alloca.h.
14106 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14107
141082001-11-23 Akim Demaille <akim@epita.fr>
14109
14110 * src/print_graph.c (print_actions): Remove `rule', unused.
14111 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14112 pacify GCC's signed < unsigned warnings.
14113 * src/closure.c (itemsetsize): Likewise.
14114 * src/reader.c (symbol_list_new): Static.
14115
141162001-11-23 Akim Demaille <akim@epita.fr>
14117
14118 Attaching lineno to buckets is stupid, since only one copy of each
14119 symbol is kept, only the line of the first occurrence is kept too.
14120
14121 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14122 * src/reader.c (rline_allocated): Remove, unused.
14123 (symbol_list): Have a `line' member.
14124 (symbol_list_new): New.
14125 (readgram): Use it.
14126 * src/print.c (print_grammar): Output the rule line numbers.
14127 * tests/regression.at (Solved SR Conflicts)
14128 (Unresolved SR Conflicts): Adjust.
14129 Reported by Hans Aberg.
14130
141312001-11-22 Marc Autret <autret_m@epita.fr>
14132
14133 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14134
141352001-11-22 Marc Autret <autret_m@epita.fr>
14136
14137 * src/muscle_tab.c (muscle_init): Remove initialization of
14138 skeleton muscle.
14139 * src/output.c (output_master_parser): Do it here.
14140
141412001-11-20 Akim Demaille <akim@epita.fr>
14142
14143 * po/sv.po: New.
14144 * configure.in (ALL_LINGUAS): Adjust.
14145 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14146 longer contains strings to translate.
14147
141482001-11-19 Akim Demaille <akim@epita.fr>
14149
14150 * src/conflicts.c (conflicts_print): Add a missing \n.
14151
141522001-11-19 Akim Demaille <akim@epita.fr>
14153
14154 * src/nullable.c (nullable_print): New.
14155 (set_nullable): Call it when tracing.
14156 Better locality of variables.
14157
141582001-11-19 Akim Demaille <akim@epita.fr>
14159
14160 * src/print.c (print_actions): Better locality of variables.
14161
141622001-11-19 Akim Demaille <akim@epita.fr>
14163
14164 * src/derives.c (print_derives): Fix and enrich.
14165 * src/closure.c (print_fderives): Likewise.
14166
141672001-11-19 Akim Demaille <akim@epita.fr>
14168
14169 * src/closure.c (itemsetend): Remove, replaced with...
14170 (itemsetsize): new.
14171
141722001-11-19 Akim Demaille <akim@epita.fr>
14173
14174 * src/LR0.c (kernel_end): Remove, replaced with...
14175 (kernel_size): new.
14176
141772001-11-19 Akim Demaille <akim@epita.fr>
14178
14179 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14180 to clarify.
14181
141822001-11-19 Akim Demaille <akim@epita.fr>
14183
14184 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14185
141862001-11-19 Akim Demaille <akim@epita.fr>
14187
14188 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14189 trace messages.
14190 * src/LR0.c: Likewise.
14191 (allocate_itemsets): Use arrays instead of pointers to clarify.
14192
141932001-11-19 Akim Demaille <akim@epita.fr>
14194
14195 * src/getargs.c (statistics_flag): Replace with...
14196 (trace_flag): New.
14197 (longopts): Accept --trace instead of --statistics.
14198 * src/getargs.h, src/options.c: Adjust.
14199 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14200 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14201
142022001-11-19 Akim Demaille <akim@epita.fr>
14203
14204 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14205 pointers to clarify the code.
14206 (save_reductions, save_shifts): Factor common parts of alternatives.
14207
142082001-11-19 Akim Demaille <akim@epita.fr>
14209
14210 * src/LR0.c (new_state, get_state): Complete TRACE code.
14211 * src/closure.c: Include `reader.h' to get `tags', needed by the
14212 trace code.
14213 Rename the conditional DEBUG as TRACE.
14214 Output consistently TRACEs to stderr, not stdout.
14215 * src/derives.c: Likewise.
14216 * src/reduce.c: (inaccessable_symbols): Using if is better style
14217 than goto.
14218 Use `#if TRACE' instead of `#if 0' for tracing code.
14219
142202001-11-19 Akim Demaille <akim@epita.fr>
14221
14222 * src/system.h (LIST_FREE, shortcpy): New.
14223 * src/LR0.c: Use them.
14224 * src/output.c (free_itemsets, free_reductions, free_shifts):
14225 Remove, replaced by LIST_FREE.
14226
142272001-11-19 Akim Demaille <akim@epita.fr>
14228
14229 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14230 (REDUCTIONS_ALLOC): New.
14231 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14232 allocation.
14233
142342001-11-19 Akim Demaille <akim@epita.fr>
14235
14236 * src/LR0.c (new_state): Complete trace code.
14237 * src/nullable.c (set_nullable): Don't translate traces.
14238
142392001-11-19 Akim Demaille <akim@epita.fr>
14240
14241 * src/print_graph.c (print_core): Better locality of variables.
14242 * src/print.c (print_core): Likewise.
14243
142442001-11-19 Akim Demaille <akim@epita.fr>
14245
14246 * src/vcg.c: You do the output, so you are responsible of the
14247 handling of VCG syntax, in particular: use quotearg.
14248 * src/print_graph.c: Don't.
14249 (print_actions): Don't output the actions as part of the nodes,
14250 since that's the job of the edges.
14251 (print_state): Don't output by hand: fill the node description,
14252 and ask for its output.
14253
142542001-11-19 Akim Demaille <akim@epita.fr>
14255
14256 * src/bison.simple (yyparse): When verbosely reporting an error,
14257 no longer put additional quotes around token names.
14258 * tests/calc.at: Adjust.
14259
142602001-11-19 Akim Demaille <akim@epita.fr>
14261
14262 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14263 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14264 * src/output.c: Adjust.
14265
142662001-11-19 Akim Demaille <akim@epita.fr>
14267
14268 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14269 (rule_t): this.
14270 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14271
142722001-11-19 Akim Demaille <akim@epita.fr>
14273
14274 * src/gram.h (rule_t): New.
14275 (rule_table): New.
14276 (rrhs, rlhs): Remove, part of state_t.
14277 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14278 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14279 * src/reader.c, src/reduce.c: Adjust.
14280
142812001-11-19 Akim Demaille <akim@epita.fr>
14282
14283 * src/reader.c (symbols_output): New, extracted from...
14284 (packsymbols): Here.
14285 (reader): Call it.
14286
142872001-11-19 Akim Demaille <akim@epita.fr>
14288
14289 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14290 (maxrhs): this new function.
14291
142922001-11-19 Akim Demaille <akim@epita.fr>
14293
14294 * src/lalr.c (F): New macro to access the variable F.
14295 Adjust.
14296
142972001-11-19 Akim Demaille <akim@epita.fr>
14298
14299 * src/lalr.h (LA): New macro to access the variable LA.
14300 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14301 * src/lalr.c: Adjust.
14302
143032001-11-19 Akim Demaille <akim@epita.fr>
14304
14305 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14306 (set_state_table): handle the `lookaheads' members.
14307
143082001-11-19 Akim Demaille <akim@epita.fr>
14309
14310 * src/lalr.h (lookaheads): 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
143162001-11-19 Akim Demaille <akim@epita.fr>
14317
14318 * src/lalr.h (consistent): Removed array, whose contents is now
14319 a member of...
14320 (state_t): this structure.
14321 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14322 Adjust.
14323
143242001-11-19 Akim Demaille <akim@epita.fr>
14325
14326 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14327 contents are now members of...
14328 (state_t): this structure.
14329 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14330 Adjust.
14331
143322001-11-19 Akim Demaille <akim@epita.fr>
14333
14334 * src/lalr.h (state_t): New.
14335 (state_table): Be a state_t * instead of a core **.
14336 (accessing_symbol): Remove, part of state_t.
14337 * src/lalr.c: Adjust.
14338 (set_accessing_symbol): Merge into...
14339 (set_state_table): this.
14340 * src/print_graph.c, src/conflicts.c: Adjust.
14341
143422001-11-14 Akim Demaille <akim@epita.fr>
14343
14344 * tests/calc.at, tests/output.at, tests/regression.at,
14345 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14346 now the tests are run in private dirs, therefore AC_CLEANUP and
14347 family can be simplified to 0-ary.
14348 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14349 use abs. path to find config.h.
14350 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14351 stderr, there can be way too much random noise.
14352 Instead pass -Werror to GCC and rely on the exit status.
14353 Reported by Wolfram Wagner.
14354
143552001-11-14 Akim Demaille <akim@epita.fr>
14356
14357 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14358 defined only if yyoverflow is defined, to avoid `warning: unused
14359 variable `yyvs1''.
14360 Reported by The Test Suite.
14361
143622001-11-14 Akim Demaille <akim@epita.fr>
14363
14364 * src/print.c: Include reduce.h.
14365 Reported by Hans Aberg.
14366
143672001-11-14 Akim Demaille <akim@epita.fr>
14368
14369 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14370 Revert a previous patch: these are really const.
14371 * src/conflicts.c (conflict_report): Additional useless pair of
14372 braces to pacify GCC's warnings for `if () if () {} else {}'.
14373 * src/lex.c (parse_percent_token): Replace equal_offset with
14374 arg_offset.
14375 arg is const.
14376 Be sure to strdup `arg' when used, since there is no reason for
14377 token_buffer not to change.
14378
143792001-11-14 Akim Demaille <akim@epita.fr>
14380
14381 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14382 definition.
14383 * src/main.c (main): Use them.
14384 Suggested by Hans Aberg.
14385
143862001-11-12 Akim Demaille <akim@epita.fr>
14387
14388 * src/system.h (ngettext): Now that we use ngettext, be sure to
14389 provide a default definition when NLS are not used.
14390
143912001-11-12 Akim Demaille <akim@epita.fr>
14392
14393 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14394 Use @kbd to denote user input.
14395 (Language and Grammar): ANSIfy the example.
14396 Adjust its layout for info/notinfo.
14397 (Location Tracking Calc): Output error messages to stderr.
14398 Output locations in a more GNUtically correct way.
14399 Fix a couple of Englishos.
14400 Adjust @group/@end group pairs.
14401
144022001-11-12 Akim Demaille <akim@epita.fr>
14403
14404 %expect was not functioning at all.
14405
14406 * src/conflicts.c (expected_conflicts): Set to -1.
14407 (conflict_report): Use ngettext.
14408 (conflicts_print): Check %expect and make its violation an error.
14409 * doc/bison.texinfo (Expect Decl): Adjust.
14410 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14411 * tests/regression.at (%expect not enough, %expect right)
14412 (%expect too much): New.
14413
144142001-11-12 Akim Demaille <akim@epita.fr>
14415
14416 * tests/regression.at (Conflicts): Rename as...
14417 (Unresolved SR Conflicts): this.
14418 (Solved SR Conflicts): New.
14419
144202001-11-12 Akim Demaille <akim@epita.fr>
14421
14422 * src/reduce.c (print_results): Rename as...
14423 (reduce_output): This.
14424 Output to OUT, passed as argument, instead of output_obstack.
14425 (dump_grammar): Likewise.
14426 (reduce_free): New.
14427 Also free V1.
14428 (reduce_grammar): No longer call reduce_output, since...
14429 * src/print.c (print_results): do it.
14430 * src/main.c (main): Call reduce_free;
14431
144322001-11-12 Akim Demaille <akim@epita.fr>
14433
14434 * src/conflicts.c (print_reductions): Accept OUT as argument.
14435 Output to it, not to output_obstack.
14436 * src/print.c (print_actions): Adjust.
14437
144382001-11-12 Akim Demaille <akim@epita.fr>
14439
14440 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14441 the result instead of using...
14442 (src_total, rrc_total, src_count, rrc_count): Remove.
14443 (any_conflicts): Remove.
14444 (print_conflicts): Split into...
14445 (conflicts_print, conflicts_output): New.
14446 * src/conflicts.h: Adjust.
14447 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14448 * src/print.c (print_grammar): Issue `\n' between two rules.
14449 * tests/regression.at (Conflicts): New.
14450 Reported by Tom Lane.
14451
144522001-11-12 Akim Demaille <akim@epita.fr>
14453
14454 * tests/regression.at (Invalid input): Remove, duplicate with
14455 ``Invalid input: 1''.
14456
144572001-11-12 Akim Demaille <akim@epita.fr>
14458
14459 * tests/torture.at (AT_DATA_STACK_TORTURE)
14460 (Exploding the Stack Size with Alloca)
14461 (Exploding the Stack Size with Malloc): New.
14462
144632001-11-12 Akim Demaille <akim@epita.fr>
14464
14465 * src/bison.simple (YYSTACK_REALLOC): New.
14466 (yyparse) [!yyoverflow]: Use it and free the old stack.
14467 Reported by Per Allansson.
14468
144692001-11-12 Pascal Bart <pascal.bart@epita.fr>
14470
14471 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14472 define CPP macro, which substitute YYSTYPE by yystype.
14473 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14474 with yyltype/YYLTYPE. This allows inclusion of the generated
14475 header within the parser if the compiler, such as GGC, accepts
14476 multiple equivalent #defines.
14477 From Akim.
14478
144792001-11-05 Akim Demaille <akim@epita.fr>
14480
14481 * src/reader.c (symbols_output): New, extracted from...
14482 (packsymbols): here.
14483 (reader): Adjust.
14484
144852001-11-05 Akim Demaille <akim@epita.fr>
14486
14487 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14488
144892001-11-05 Akim Demaille <akim@epita.fr>
14490
14491 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14492 pattern.
14493
144942001-11-05 Akim Demaille <akim@epita.fr>
14495
14496 * src/options.h (struct option_table_struct): set_flags is void*.
14497 * src/options.c (longopts): Support `--output' and `%output'.
14498 (usage): Adjust.
14499 * src/lex.h (tok_setopt): Remove, replaced with...
14500 (tok_intopt, tok_stropt): these new guys.
14501 * src/lex.c (getopt.h): Not needed.
14502 (token_buffer, unlexed_token_buffer): Not const.
14503 (percent_table): Promote `-' over `_' in directive names.
14504 Active `%name-prefix', `file-prefix', and `output'.
14505 (parse_percent_token): Accept possible arguments to directives.
14506 Promote `-' over `_' in directive names.
14507
145082001-11-04 Akim Demaille <akim@epita.fr>
14509
14510 * doc/bison.texinfo (Decl Summary): Split the list into
14511 `directives for grammars' and `directives for bison'.
14512 Sort'em.
14513 Add description of `%name-prefix', `file-prefix', and `output'.
14514 Promote `-' over `_' in directive names.
14515 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14516 Simplify the description of `--name-prefix'.
14517 Promote `-' over `_' in directive names.
14518 Promote `--output' over `--output-file'.
14519 Fix the description of `--defines'.
14520 * tests/output.at: Exercise %file-prefix and %output.
14521
145222001-11-02 Akim Demaille <akim@epita.fr>
14523
14524 * doc/refcard.tex: Update.
14525
145262001-11-02 Akim Demaille <akim@epita.fr>
14527
14528 * src/symtab.h (SUNDEF): New.
14529 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14530 stand for `uninitialized', instead of 0.
14531 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14532 * src/lex.c (lex): Adjust.
14533
14534 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14535 Number it 0.
14536 Let yylex return it instead of a plain 0.
14537 Reported by Dick Streefland.
14538
145392001-11-02 Akim Demaille <akim@epita.fr>
14540
14541 * tests/regression.at (Mixing %token styles): New test.
14542
145432001-11-02 Akim Demaille <akim@epita.fr>
14544
14545 * src/reader.c (parse_thong_decl): Formatting changes.
14546 (token_translations_init): New, extracted from...
14547 (packsymbols): Here.
14548 Adjust.
14549
145502001-11-01 Akim Demaille <akim@epita.fr>
14551
14552 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14553 Check that `9foo.y' produces correct cpp guards.
14554 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14555 guards.
14556 Reported by Wwp.
14557
145582001-11-01 Akim Demaille <akim@epita.fr>
14559
14560 * tests/regression.at (Invalid input: 2): New.
14561 * src/lex.c (unlexed_token_buffer): New.
14562 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14563 too.
14564 Reported by Wwp.
14565
145662001-11-01 Akim Demaille <akim@epita.fr>
14567
14568 * tests/calc.at: Catch up with 1.30.
14569 * configure.in: Bump to 1.49a.
14570 Adjust to newer Autotest.
14571
145722001-10-19 Pascal Bart <pascal.bart@epita.fr>
14573
14574 * src/conflicts.c: Move global variables rrc_total and src_total ...
14575 (print_conflicts): here.
14576 * src/output.c (output): Free global variable user_toknums.
14577 * src/lex.c (token_obstack): Become static.
14578
145792001-10-18 Akim Demaille <akim@epita.fr>
14580
14581 * tests/atlocal.in (GCC): Add.
14582 * tests/calc.at: s/m4_match/m4_bmatch/.
14583 s/m4_patsubst/m4_bpatsubst/.
14584 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14585 * configure.in: AC_SUBST(GCC).
14586
145872001-10-14 Marc Autret <autret_m@epita.fr>
14588
14589 * src/options.c (create_long_option_table): Fix.
14590
145912001-10-10 Akim Demaille <akim@epita.fr>
14592
14593 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14594
145952001-10-04 Akim Demaille <akim@epita.fr>
14596
14597 * src/reader.c (parse_union_decl): Push the caracters in
14598 union_obstack, not attrs_obstack.
14599
146002001-10-04 Akim Demaille <akim@epita.fr>
14601
14602 Merge in the branch 1.29.
14603
14604 * src/reader.c (packsymbols): Use a temporary obstack for
14605 `%%tokendef', since output_stack is already used elsewhere.
14606
14607 2001-10-02 Akim Demaille <akim@epita.fr>
14608
14609 Bump 1.29d.
14610
14611 2001-10-02 Akim Demaille <akim@epita.fr>
14612
14613 Version 1.29c.
14614
14615 2001-10-02 Akim Demaille <akim@epita.fr>
14616
14617 * tests/regression.at (Invalid CPP headers): New.
14618 From Alexander Belopolsky.
14619 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14620
14621 2001-10-02 Akim Demaille <akim@epita.fr>
14622
14623 * tests/regression.at (Invalid input): New.
14624 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14625 Reported by Shura.
14626
14627 2001-10-02 Akim Demaille <akim@epita.fr>
14628
14629 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14630
14631 2001-10-02 Akim Demaille <akim@epita.fr>
14632
14633 * src/output.c (output_parser): Assert `skeleton'.
14634 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14635 systems.
14636 From Shura.
14637
14638 2001-10-01 Marc Autret <autret_m@epita.fr>
14639
14640 * src/lex.h: Echo modifications.
14641 * src/lex.c (unlex): Parameter is now token_t.
14642 From Hans Aberg.
14643
14644 2001-10-01 Marc Autret <autret_m@epita.fr>
14645
14646 * src/main.c: Include lex.h.
14647 From Hans Aberg.
14648
14649 2001-09-29 Akim Demaille <akim@epita.fr>
14650
14651 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14652
14653 2001-09-28 Akim Demaille <akim@epita.fr>
14654
14655 * tests/testsuite.at: Update to newer Autotest.
14656 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14657
14658 2001-09-27 Akim Demaille <akim@epita.fr>
14659
14660 Position independent wrapper.
14661
14662 * tests/bison: Remove.
14663 * tests/bison.in: New.
14664 * configure.in: Adjust.
14665
14666 2001-09-27 Paul Eggert <eggert@twinsun.com>
14667
14668 Port quotearg fixes from tar 1.13.24.
14669
14670 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14671 tm to be declared.
14672 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14673 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14674
14675 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14676 * m4/mbrtowc.m4: New file.
14677 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14678 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14679
14680 2001-09-27 Akim Demaille <akim@epita.fr>
14681
14682 Bump to 1.29c.
14683
14684 2001-09-27 Akim Demaille <akim@epita.fr>
14685
14686 Version 1.29b.
14687
14688 2001-09-25 Akim Demaille <akim@epita.fr>
14689
14690 * src/system.h: Include `xalloc.h'.
14691 Remove it from the C files.
14692 * src/files.c (output_files): Free the obstacks.
14693 * src/lex.c (init_lex): Rename as...
14694 (lex_init): this.
14695 (lex_free): New.
14696 * src/main.c (main): Use it.
14697
14698 2001-09-24 Marc Autret <autret_m@epita.fr>
14699
14700 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14701 to output informations in fout (FILE*).
14702 (open_graph, close_graph): Likewise.
14703 (output_graph, output_edge, output_node): Likewise.
14704 * src/vcg.h: Update function prototypes.
14705 * src/print_graph.c (print_graph): Open output graph file.
14706 (print_actions): Adjust.
14707 * src/files.h: Remove extern declaration.
14708 * src/files.c: Remove graph_obstack declaration.
14709 (open_files): Remove graph_obstack initialization.
14710 (output_files): Remove graph_obstack saving.
14711
14712 2001-09-24 Marc Autret <autret_m@epita.fr>
14713
14714 * src/files.c (compute_output_file_names): Fix.
14715
14716 2001-09-24 Marc Autret <autret_m@epita.fr>,
14717 Akim Demaille <akim@epita.fr>
14718
14719 * src/reader.c (reader): Remove call to free_symtab ().
14720 * src/main.c (main): Call it here.
14721 Include symtab.h.
14722 * src/conflicts.c (initialize_conflicts): Rename as...
14723 (solve_conflicts): this.
14724 * src/print.c (print_core, print_actions, print_state)
14725 (print_grammar): Dump to a file instead a `output_obstack'.
14726 (print_results): Dump `output_obstack', and then proceed with the
14727 FILE *.
14728 * src/files.c (compute_output_file_names, close_files): New.
14729 (output_files): Adjust.
14730 * src/main.c (main): Adjust.
14731
14732 2001-09-23 Marc Autret <autret_m@epita.fr>
14733
14734 * src/files.c (compute_header_macro): Computes header macro name
14735 from spec_defines_file when given.
14736
14737 2001-09-23 Marc Autret <autret_m@epita.fr>
14738
14739 * src/files.c (output_files): Add default extensions.
14740
14741 2001-09-22 Akim Demaille <akim@epita.fr>
14742
14743 * src/conflicts.c (finalize_conflicts): Rename as...
14744 (free_conflicts): this.
14745
14746 2001-09-22 Akim Demaille <akim@epita.fr>
14747
14748 * src/gram.c (gram_free): Rename back as...
14749 (dummy): this.
14750 (output_token_translations): Free `token_translations'.
14751 * src/symtab.c (free_symtab): Free the tag field.
14752
14753 2001-09-22 Akim Demaille <akim@epita.fr>
14754
14755 Remove `translations' as it is always set to true.
14756
14757 * src/gram.h: Adjust.
14758 * src/reader.c (packsymbols, parse_token_decl): Adjust
14759 * src/print.c (print_grammar): Adjust.
14760 * src/output.c (output_token_translations): Adjust.
14761 * src/lex.c (lex): Adjust.
14762 * src/gram.c: Be sure the set pointers to NULL.
14763 (dummy): Rename as...
14764 (gram_free): this.
14765
14766 2001-09-22 Akim Demaille <akim@epita.fr>
14767
14768 * configure.in: Invoke AM_LIB_DMALLOC.
14769 * src/system.h: Use dmalloc.
14770 * src/LR0.c: Be sure to have pointers initialized to NULL.
14771 (allocate_itemsets): Allocate kernel_items only if needed.
14772
14773 2001-09-22 Akim Demaille <akim@epita.fr>
14774
14775 * configure.in: Bump to 1.29b.
14776 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14777 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14778 need xmalloc.c in calc.y.
14779 From Pascal Bart.
14780
14781 2001-09-21 Akim Demaille <akim@epita.fr>
14782
14783 Version 1.29a.
14784 * Makefile.maint, config/config.guess, config/config.sub,
14785 * config/missing: Update from masters.
14786 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14787 upon package.m4.
14788 * configure.in (ALL_LINGUAS): Add `tr'.
14789
14790 2001-09-21 Akim Demaille <akim@epita.fr>
14791
14792 * tests/Makefile.am (package.m4): Move to...
14793 ($(srcdir)/$(TESTSUITE)): here.
14794
14795 2001-09-20 Akim Demaille <akim@epita.fr>
14796
14797 * src/complain.c: No longer try to be standalone: use system.h.
14798 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14799 * src/complain.h: Likewise.
14800 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14801 Remove the unused variable `n'.
14802 From Albert Chin-A-Young.
14803
14804 2001-09-18 Marc Autret <autret_m@epita.fr>
14805
14806 * doc/bison.1: Update.
14807 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14808 descriptions.
14809 (Option Cross Key): Update.
14810 Add --graph.
14811
14812 2001-09-18 Marc Autret <autret_m@epita.fr>
14813
14814 * tests/regression.at: New test (comment in %union).
14815
14816 2001-09-18 Marc Autret <autret_m@epita.fr>
14817
14818 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14819 do that.
14820 Reported by Keith Browne.
14821
14822 2001-09-18 Marc Autret <autret_m@epita.fr>
14823
14824 * tests/output.at: Add tests for --defines and --graph.
14825
14826 2001-09-18 Marc Autret <autret_m@epita.fr>
14827
14828 * tests/output.at: Removes tests of %{header,src}_extension features.
14829
14830 2001-09-18 Akim Demaille <akim@epita.fr>
14831
14832 * tests/Makefile.am (package.m4): New.
14833 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14834 (_AT_CHECK_CALC_ERROR): Likewise.
14835 Factor the `, ' part of verbose error messages.
14836
14837 2001-09-18 Marc Autret <autret_m@epita.fr>
14838
14839 * src/getargs.c (longopts): Declare --defines and --graph as options
14840 with optional arguments.
14841 * src/files.h: Add extern declarations.
14842 * src/files.c (spec_graph_file, spec_defines_file): New.
14843 (output_files): Update.
14844 Remove CPP-outed code.
14845
14846 2001-09-18 Marc Autret <autret_m@epita.fr>
14847
14848 Turn off %{source,header}_extension feature.
14849
14850 * src/files.c (compute_exts_from_gf): Update.
14851 (compute_exts_from_src): Update.
14852 (output_files): CPP-out useless code.
14853 * src/files.h: Remove {header,source}_extension extern declarations.
14854 * src/reader.c (parse_dquoted_param): CPP-out.
14855 (parse_header_extension_decl): Remove.
14856 (parse_source_extension_decl): Remove.
14857 (read_declarations): Remove cases tok_{hdrext,srcext}.
14858 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14859 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14860
14861 2001-09-10 Akim Demaille <akim@epita.fr>
14862
14863 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14864 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14865 (AT_CHECK_OUTPUT): this.
14866 Merely check ls' exit status, its output is useless.
14867
14868 2001-09-10 Akim Demaille <akim@epita.fr>
14869
14870 * tests/calc.at: Use m4_match.
14871 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14872
14873 2001-09-10 Marc Autret <autret_m@epita.fr>,
14874 Akim Demaille <akim@epita.fr>
14875
14876 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14877 enum color_e.
14878 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14879 to `normal'.
14880 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14881 * src/lex.h: Adjust prototype.
14882 (token_t): Add `tok_undef'.
14883 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14884 (parse_percent_token): Now returns token_t.
14885 Add default statement in switch.
14886 (lex): Separate `c' as an input variable, from the token_t result
14887 part.
14888 (unlexed): Is a token_t.
14889
14890 2001-09-10 Akim Demaille <akim@epita.fr>
14891
14892 * configure.in: Bump to 1.29a.
14893
14894 2001-09-07 Akim Demaille <akim@epita.fr>
14895
14896 Version 1.29.
14897
14898 2001-08-30 Akim Demaille <akim@epita.fr>
14899
14900 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14901 * m4/atconfig.m4: Remove.
14902 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14903 * tests/bison: New.
14904 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14905 m4_if, m4_patsubst, and m4_regexp.
14906 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14907 `input' file instead of echo.
14908
14909 2001-08-29 Akim Demaille <akim@epita.fr>
14910
14911 Bump to 1.28e.
14912
14913 2001-08-29 Akim Demaille <akim@epita.fr>
14914
14915 Version 1.28d.
14916
14917 2001-08-29 Paul Eggert <eggert@twinsun.com>
14918
14919 * src/bison.simple (yyparse): Don't take the address of an
14920 item before the start of an array, as that doesn't conform to
14921 the C Standard.
14922
14923 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14924
14925 * doc/bison.texinfo (Location Tracking Calc): New node.
14926
14927 2001-08-29 Paul Eggert <eggert@twinsun.com>
14928
14929 * src/output.c (output): Do not define const, as this now
14930 causes more problems than it cures.
14931
14932 2001-08-29 Akim Demaille <akim@epita.fr>
14933
14934 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14935 the nodes.
14936 Be sure to tag the `detailmenu'.
14937
14938 2001-08-29 Akim Demaille <akim@epita.fr>
14939
14940 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14941 download in a tmp dir.
14942
14943 2001-08-28 Marc Autret <autret_m@epita.fr>
14944
14945 * config/depcomp: New file.
14946
14947 2001-08-28 Marc Autret <autret_m@epita.fr>
14948
14949 * doc/bison.1 (mandoc): Adjust.
14950 From Juan Manuel Guerrero.
14951
14952 2001-08-28 Marc Autret <autret_m@epita.fr>
14953
14954 * src/print_graph.c (print_state): Fix.
14955
14956 2001-08-27 Marc Autret <autret_m@epita.fr>
14957
14958 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14959 char * members.
14960 Echo modifications to the functions prototypes.
14961 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14962
14963 2001-08-27 Marc Autret <autret_m@epita.fr>
14964
14965 * src/vcg.c: Include `xalloc.h'.
14966 (add_colorentry): New.
14967 (add_classname): New.
14968 (add_infoname): New.
14969 * src/vcg.h: Add new prototypes.
14970
14971 2001-08-27 Akim Demaille <akim@epita.fr>
14972
14973 * Makefile.maint: Sync. again with CVS Autoconf.
14974
14975 2001-08-27 Akim Demaille <akim@epita.fr>
14976
14977 * Makefile.maint: Formatting changes.
14978 (po-update, cvs-update, update): New targets.
14979 (AMTAR): Remove.
14980
14981 2001-08-27 Akim Demaille <akim@epita.fr>
14982
14983 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14984 * Makefile.maint: Sync. with CVS Autoconf.
14985
14986 2001-08-27 Marc Autret <autret_m@epita.fr>
14987
14988 * src/vcg.h (struct infoname_s): New.
14989 (struct colorentry_s): New.
14990 (graph_s): New fields {vertical,horizontal}_order in structure.
14991 Add `infoname' field.
14992 Add `colorentry' field;
14993 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14994 (G_HORIZONTAL_ORDER): New.
14995 (G_INFONAME): New.
14996 (G_COLORENTRY): New.
14997 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14998 Add output of `infoname'.
14999 Add output of `colorentry'.
15000
15001 2001-08-27 Marc Autret <autret_m@epita.fr>
15002
15003 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15004 This one shadowed a global parameter.
15005
15006 2001-08-24 Marc Autret <autret_m@epita.fr>
15007
15008 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15009 instead of `unsigned'.
15010 (print_state): Do not call obstack_object_size () in obstack_grow ()
15011 to avoid macro variables shadowing.
15012
15013 2001-08-23 Marc Autret <autret_m@epita.fr>
15014
15015 * src/lex.c (percent_table): Typo: s/naem/name/.
15016 Add graph option.
15017 Normalize new options declarations.
15018
15019 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15020
15021 * tests/suite.at: Exercise %header_extension and %source_extension.
15022
15023 2001-08-16 Marc Autret <autret_m@epita.fr>
15024
15025 * src/reader.c (parse_dquoted_param): New.
15026 (parse_header_extension_decl): Use it.
15027 (parse_source_extension_decl): Likewise.
15028
15029 2001-08-16 Marc Autret <autret_m@epita.fr>
15030
15031 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15032 (get_xxxx_str): Use assert () instead of complain ().
15033 Remove return invokations in default cases.
15034 (get_decision_str): Modify default behaviour. Remove second argument.
15035 Echo modifications on calls.
15036 (output_graph): Fix.
15037
15038 2001-08-16 Marc Autret <autret_m@epita.fr>
15039
15040 * src/getargs.c (usage): Update with ``-g, --graph''.
15041
15042 2001-08-16 Marc Autret <autret_m@epita.fr>
15043
15044 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15045 (Option Cross Key): Likewise.
15046 * doc/bison.1: Update.
15047
150482001-09-25 Pascal Bart <pascal.bart@epita.fr>
15049
15050 * src/output.c (output_master_parser): Don't finish action_obstack.
15051 (output_parser): Don't care about the muscle action, here.
15052 (prepare): Copy the action_obstack in the action muscle.
15053 (output): Free action_obstack.
15054
150552001-09-23 Pascal Bart <pascal.bart@epita.fr>
15056
15057 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15058 will contain `%union' declaration.
15059 (parse_union_decl): Delete #line directive output.
15060 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15061 informations about %union.
15062 (parse_union_decl): Copy the union_obstack in the muscle stype.
15063 * src/bison.simple: Add new #line directive.
15064 Add typdef %%stype YYSTYPE.
15065
150662001-09-23 Pascal Bart <pascal.bart@epita.fr>
15067
15068 * src/bison.simple: Add new `#line' directive.
15069
150702001-09-22 Pascal Bart <pascal.bart@epita.fr>
15071
15072 * src/bison.simple: New `#line' directive.
15073 * src/output.c (output_parser): Support new dynamic muscle input_line.
15074
150752001-09-22 Marc Autret <autret_m@epita.fr>
15076
15077 * src/output.c (output_master_parser): New.
15078 (output_parser): Be more re-entrant.
15079
150802001-09-21 Marc Autret <autret_m@epita.fr>
15081
15082 * src/reader.c (copy_definition, parse_union_decl): Update and use
15083 `linef' muscle.
15084 (copy_action): Likewise.
15085 Use obstack_1grow ().
15086 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15087
150882001-09-21 Marc Autret <autret_m@epita.fr>
15089
15090 * src/options.c (option_table): Adjust.
15091 * src/lex.c (parse_percent_token): Fix.
15092
150932001-09-20 Pascal Bart <pascal.bart@epita.fr>
15094
15095 * src/options.c (symtab.h): Include it, need by lex.h.
15096
150972001-09-20 Pascal Bart <pascal.bart@epita.fr>
15098
15099 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15100 is now an option_table_struct*.
15101 (option_strcmp): New function option_strcmp.
15102 (parse_percent_token): Call option_strcmp.
15103 * src/getargs.c (xalloc.h, options.h): Include it.
15104 (getargs): Call create_long_option_table.
15105 (getargs): Free longopts at the end of the function.
15106 (shortopts): Move in options.c.
15107 * src/options.c (create_long_option_table): New function. Convert
15108 information from option_table to option structure.
15109 * src/reader.c (options.h): Include it.
15110
15111 * src/Makefile.am: Adjust.
15112 * src/options.c (option_table): Create from longopts and percent_table.
15113 * src/getargs.c (longopts): Delete.
15114 * src/lex.c (struct percent_table_struct): Delete.
15115 (percent_table): Delete.
15116 (options.h): Include it.
15117 * src/options.c: Create.
15118 * src/options.h: Create.
15119 Declare enum opt_access_e.
15120 Define struct option_table_struct.
15121
151222001-09-20 Marc Autret <autret_m@epita.fr>
15123
15124 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15125 sections of Bison.
15126
151272001-09-19 Pascal Bart <pascal.bart@epita.fr>
15128
15129 * src/bison.simple: s/%%filename/%%skeleton.
15130 * src/muscle_tab.c (getargs.h): Include it.
15131 (muscle_init): Insert new muscle skeleton.
15132
151332001-09-18 Pascal Bart <pascal.bart@epita.fr>
15134
15135 * src/output.c (output_parser): Delete unused variable actions_dumped.
15136
151372001-09-07 Pascal Bart <pascal.bart@epita.fr>
15138
15139 * src/output.c (output): Delete call to reader_output_yylsp.
15140 * src/reader.c (reader): Likewise.
15141 * src/reader.h: Delete declaration of reader_output_yylsp.
15142
151432001-09-02 Marc Autret <autret_m@epita.fr>
15144
15145 * src/reader.c: Include muscle_tab.h.
15146 (parse_union_decl): Update.
15147 (parse_macro_decl): Rename parse_muscle_decl.
15148 Update to use renamed functions and variable.
15149 (read_declarations, copy_action, read_additionnal_code, : Updated
15150 with correct variables and functions names.
15151 (packsymbols, reader): Likewise.
15152
15153 * src/reader.h (muscle_obstack): Extern declaration update.
15154
15155 * src/output.c: Include muscle_tab.h
15156 In all functions using macro_insert, change by using muscle_insert ().
15157 (macro_obstack): Rename muscle_obstack.
15158 Echo modifications in the whole file.
15159 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15160 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15161 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15162
15163 * src/muscle_tab.h: Update double inclusion macros.
15164 (macro_entry_s): Rename muscle_entry_s.
15165 Update prototypes.
15166
15167 * src/muscle_tab.c: Include muscle_tab.h.
15168 Rename macro_tabble to muscle_table.
15169 (mhash1, mhash2, mcmp): Use muscle_entry.
15170 (macro_init): Rename muscle_init. Update.
15171 (macro_insert): Rename muscle_insert. Update.
15172 (macro_find): Rename muscle_find. Update.
15173
15174 * src/main.c: Include muscle_tab.h.
15175 (main): Call muscle_init ().
15176 * src/Makefile.am (bison_SOURCES): Echo modifications.
15177
151782001-09-02 Marc Autret <autret_m@epita.fr>
15179
15180 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15181
15182 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15183
151842001-09-02 Marc Autret <autret_m@epita.fr>
15185
15186 * src/macrotab.c, src/macrotab.h: Remove.
15187
151882001-09-01 Pascal Bart <pascal.bart@epita.fr>
15189
15190 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15191 filename.
15192
151932001-09-01 Marc Autret <autret_m@epita.fr>
15194
15195 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15196 to an explicit value to activate the feature. We do it here.
15197
151982001-08-31 Pascal Bart <pascal.bart@epita.fr>
15199
15200 * src/output.c (prepare): Delete the `filename' muscule insertion.
15201 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15202 (parse_union_decl): Likewise.
15203 * src/macrotab.c (macro_init): Initialize filename by infile.
15204
152052001-08-31 Marc Autret <autret_m@epita.fr>
15206
15207 * src/bison.simple (YYLSP_NEEDED): New definition.
15208 * src/output.c (prepare): Add macro insertion of `locations_flag'
15209
152102001-08-31 Pascal Bart <pascal.bart@epita.fr>
15211
15212 * src/output.c (prepare): Delete insertion of previous muscles,
15213 and insert the `prefix' muscles.
15214 * src/macrotab.c (macro_init): Likewise.
15215 (macro_init): Initialization prefix directive by `yy'.
15216 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15217 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15218 yylval, yydebug, yyerror, yynerrs and yyparse.
15219 New directive `#define' to substitute yydebug, ... with option
15220 name_prefix.
15221
152222001-08-31 Pascal Bart <pascal.bart@epita.fr>
15223
15224 * src/main.c (main): Standardize.
15225 * src/output.c (output_table_data, output_parser): Likewise.
15226 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15227
152282001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15229
15230 * src/reader.c (read_additionnal_code): Rename %%user_code to
15231 %%epilogue.
15232 * src/output.c (output): Rename %%declarations to %%prologue.
15233 * src/bison.simple: Echo modifications.
15234
152352001-08-31 Marc Autret <autret_m@epita.fr>
15236
15237 * src/reader.c (readgram): CleanUp.
15238 (output_token_defines): Likewise.
15239 (packsymbols): Likewise.
15240 (reader): Likewise.
15241 * src/output.c (output): CPP-out useless code.
15242
152432001-08-31 Pascal Bart <pascal.bart@epita.fr>
15244
15245 * src/reader.c (reader): Delete obsolete call to function
15246 output_trailers and output_headers.
15247 * src/output.h: Remove obsolete functions prototypes of output_headers
15248 and output_trailers.
15249
152502001-08-30 Pascal Bart <pascal.bart@epita.fr>
15251
15252 * src/main.c: Include macrotab.h.
15253 * src/macrotab.h (macro_entry_s): Constify fields.
15254 Adjust functions prototypes.
15255 * src/macrotab.c (macro_insert): Constify key and value.
15256 (macro_find): Constify key.
15257 (macro_insert): Include 'xalloc.h'
15258 (macro_insert): Use XMALLOC.
15259 (macro_find): Constify return value.
15260 * src/output.c (output_table_data): Rename table to table_data.
15261 (output_parser): Constify macro_key, macro_value.
15262
152632001-08-30 Marc Autret <autret_m@epita.fr>
15264
15265 * src/reader.c (parse_skel_decl): New.
15266 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15267 * src/lex.h (token_t): New token `tok_skel'.
15268 * src/lex.c (percent_table): Add skeleton option entry.
15269 Standardize.
15270
152712001-08-29 Marc Autret <autret_m@epita.fr>
15272
15273 * src/bison.simple: Add %%user_code directive at the end.
15274 * src/reader.c (read_additionnal_code): New.
15275 (reader): Use it.
15276 * src/output.c (output_program): Remove.
15277 (output): Update.
15278
152792001-08-28 Marc Autret <autret_m@epita.fr>
15280
15281 * src/output.c (output_actions): Clean up.
15282 (output_gram): CPP-out useless code.
15283 * src/reader.c (reader): Clean up, CPP-out useless code.
15284
152852001-08-28 Pascal Bart <pascal.bart@epita.fr>
15286
15287 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15288 directive.
15289 * src/bison.simple: Add `%%definitions'.
15290
152912001-08-28 Marc Autret <autret_m@epita.fr>
15292
15293 * config/depcomp: New file.
15294
152952001-08-27 Paul Eggert <eggert@twinsun.com>
15296
15297 * src/bison.simple (yyparse): Don't take the address of an
15298 item before the start of an array, as that doesn't conform to
15299 the C Standard.
15300
153012001-08-27 Robert Anisko <robert.anisko@epita.fr>
15302
15303 * src/output.c (output): Remove the initialization of the macro
15304 obstack. It was done too late here.
15305
15306 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15307 completely wrong.
15308 (reader): Initialize the macro obstack here, since we need it to grow
15309 '%define' directives.
15310
15311 * src/reader.h: Declare the macro obstack as extern.
15312
153132001-08-27 Robert Anisko <robert.anisko@epita.fr>
15314
15315 * src/output.c (output_parser): Fix. Store single '%' characters in
15316 the output obstack instead of throwing them away.
15317
153182001-08-27 Akim Demaille <akim@epita.fr>
15319
15320 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15321
153222001-08-25 Robert Anisko <robert.anisko@epita.fr>
15323
15324 * lib/Makefile.am: Adjust.
15325
153262001-08-25 Robert Anisko <robert.anisko@epita.fr>
15327
15328 * src/bison.simple: Update and add '%%' directives.
15329
153302001-08-25 Robert Anisko <robert.anisko@epita.fr>
15331
15332 * src/reader.c (reader): Remove calls to 'output_headers' and
15333 'output_trailers'. Remove some C output.
15334 (readgram): Disable a piece of code that was writing a default
15335 definition for 'YYSTYPE'.
15336 (reader_output_yylsp): Remove.
15337 (packsymbols): Output token defintions to a macro.
15338 (copy_definition): Disable C output.
15339
15340 * src/reader.c (parse_macro_decl): New function used to parse macro
15341 declarations.
15342 (copy_string2): Put the body of copy_string into this new function.
15343 Add a parameter to let the caller choose whether he wants to copy the
15344 string delimiters or not.
15345 (copy_string): Be a simple call to copy_string2 with the last argument
15346 bound to true.
15347 (read_declarations): Add case for macro definition.
15348 (copy_identifier): New.
15349 (parse_macro_decl): Read macro identifiers using copy_identifier
15350 rather than lex.
15351
153522001-08-25 Robert Anisko <robert.anisko@epita.fr>
15353
15354 * src/output.c (prepare): Add prefixed names.
15355 (output_parser): Output semantic actions.
15356 (output_parser): Fix bug on '%%line' directives.
15357
15358 * src/output.c (output_headers): Remove. The C code printed by this
15359 function should now be in the skeletons.
15360 (output_trailers): Remove.
15361 (output): Disable call to 'reader_output_yylsp'.
15362 (output_rule_data): Do not output tables to the table obstack.
15363
15364 * src/output.c: Remove some C dedicated output.
15365 Improve the use of macro and output obstacks.
15366 (output_defines): Remove.
15367
15368 * src/output.c (output_token_translations): Associate 'translate'
15369 table with a macro. No output to the table obstack.
15370 (output_gram): Same for 'rhs' and 'prhs'.
15371 (output_stos): Same for 'stos'.
15372 (output_rule_data): Same for 'r1' and 'r2'.
15373 (token_actions): Same for 'defact'.
15374 (goto_actions): Same for 'defgoto'.
15375 (output_base): Same for 'pact' and 'pgoto'.
15376 (output_table): Same for 'table'.
15377 (output_check): Same for 'check'.
15378
15379 * src/output.c (output_table_data): New function.
15380 (output_short_table): Remove.
15381 (output_short_or_char_table): Remove.
15382
15383 * src/output.c (output_parser): Replace most of the skeleton copy code
15384 with something new. Skeletons are now processed character by character
15385 rather than line by line, and Bison looks for '%%' macros. This is the
15386 first step in making Bison's output process (a lot) more flexible.
15387 (output_parser): Use the macro table.
15388
153892001-08-25 Robert Anisko <robert.anisko@epita.fr>
15390
15391 * src/main.c (main): Initialize the macro table.
15392
153932001-08-25 Robert Anisko <robert.anisko@epita.fr>
15394
15395 * src/lex.c (percent_table): Add tok_define.
15396 * src/lex.h: Add tok_define.
15397
153982001-08-25 Robert Anisko <robert.anisko@epita.fr>
15399
15400 * src/macrotab.c: New file.
15401 * src/macrotab.h: New file.
15402 * src/Makefile.am: Update.
15403
154042001-08-25 Robert Anisko <robert.anisko@epita.fr>
15405
15406 * lib/hash.c: New file.
15407 * lib/hash.h: New file.
15408 * lib/Makefile.am: Update.
15409
154102001-08-15 Akim Demaille <akim@epita.fr>
15411
15412 Version 1.28c.
15413
154142001-08-15 Marc Autret <autret_m@epita.fr>
15415
15416 * src/reader.c (readgram): Indent output macro YYSTYPE.
15417 (packsymbols): Likewise.
15418 (output_token_defines): Likewise.
15419 * src/files.c: Standardize.
15420 (compute_header_macro): New.
15421 (defines_obstack_save): New. Use compute_header_macro.
15422 (output_files): Update. Use defines_obstack_save.
15423
154242001-08-15 Akim Demaille <akim@epita.fr>
15425
15426 * doc/bison.texinfo (Table of Symbols): Document
15427 YYSTACK_USE_ALLOCA.
15428
154292001-08-15 Akim Demaille <akim@epita.fr>
15430
15431 * missing: Update from CVS Automake.
15432 * config/config.guess, config/config.sub, config/texinfo.tex:
15433 Update from gnu.org.
15434
154352001-08-15 Akim Demaille <akim@epita.fr>
15436
15437 * Makefile.maint: Sync with CVS Autoconf.
15438
154392001-08-14 Pascal Bart <pascal.bart@epita.fr>
15440
15441 * doc/bison.texinfo: Include GNU Free Documentation License from
15442 `fdl.texi'.
15443 * doc/fdl.texi: Add to package.
15444
154452001-08-14 Marc Autret <autret_m@epita.fr>
15446
15447 Turn on %{source,header}_extension features.
15448
15449 * src/lex.c (percent_table): Un-CPP out header_extension and
15450 source_extension.
15451 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15452 (compute_exts_from_src): Remove conditions. It restores priorities
15453 between options.
15454
154552001-08-14 Marc Autret <autret_m@epita.fr>
15456
15457 * src/files.c (compute_base_names): Add extensions computing when
15458 `--file-prefix' used.
15459 Standardize function calls.
15460
154612001-08-13 Marc Autret <autret_m@epita.fr>
15462
15463 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15464 defining it (defined but null disables alloca).
15465
154662001-08-13 Marc Autret <autret_m@epita.fr>
15467
15468 * src/bison.simple (_yy_memcpy): CPP reformat.
15469
154702001-08-13 Pascal Bart <pascal.bart@epita.fr>
15471
15472 * tests/atconfig.in (CPPFLAGS): Fix.
15473
154742001-08-10 Pascal Bart <pascal.bart@epita.fr>
15475
15476 * doc/bison.texinfo: Include GNU General Public License from
15477 `gpl.texi'.
15478 * doc/gpl.texi: Add to package.
15479
154802001-08-10 Marc Autret <autret_m@epita.fr>
15481
15482 * src/print_graph.h: Fix.
15483 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15484
154852001-08-10 Akim Demaille <akim@epita.fr>
15486
15487 * src/system.h: Provide default declarations for stpcpy, strndup,
15488 and strnlen.
15489
154902001-08-10 Robert Anisko <anisko_r@epita.fr>
15491
15492 * doc/bison.texinfo (Locations): Update @$ stuff.
15493
154942001-08-09 Robert Anisko <anisko_r@epita.fr>
15495
15496 * src/bison.simple (YYLLOC_DEFAULT): Update.
15497 (yyparse): Adjust.
15498
154992001-08-08 Marc Autret <autret_m@epita.fr>
15500
15501 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15502 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15503 Reported by Fabrice Bauzac.
15504
155052001-08-08 Marc Autret <autret_m@epita.fr>
15506
15507 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15508 * src/vcg.c (output_node): Fix.
15509 * src/vcg.h: Cleanup.
15510 * src/print_graph.c: Add comments.
15511 (node_output_size): New global variable. Simplify the formatting of
15512 the VCG graph output.
15513 (print_actions): Unused code is now used. It notifies the final state
15514 and no action states in the VCG graph. It also give the reduce actions.
15515 The `shift and goto' edges are red and the `go to state' edges are
15516 blue.
15517 Get the current node name and node_obstack by argument.
15518 (node_obstack): New variable.
15519 (print_state): Manage node_obstack.
15520 (print_core): Use node_obstack given by argument.
15521 A node is not only computed here but in print_actions also.
15522 (print_graph): CPP out useless code instead of commenting it.
15523
155242001-08-07 Pascal Bart <pascal.bart@epita.fr>
15525
15526 * tests/atconfig.in (CPPFLAGS): Fix.
15527
155282001-08-07 Akim Demaille <akim@epita.fr>
15529
15530 * src/print_graph.c (quote): New.
15531 (print_core): Use it.
15532
155332001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15534
15535 * src/vcg.c (complain.h): Include it.
15536 Unepitaize `return' invocations.
15537 [NDEBUG] (main): Remove.
15538 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15539 * src/files.c (open_files): Initialize graph_obstack.
15540 * src/print_graph.c (print_actions): CPP out useless code.
15541 (print_core): Don't output the last `\n' in labels.
15542 Use `quote'.
15543 * src/files.c (output_files): Output the VCG file.
15544 * src/main.c (main): Invoke print_graph ();
15545
155462001-08-06 Marc Autret <autret_m@epita.fr>
15547
15548 Automaton VCG graph output.
15549 Using option ``-g'' or long option ``--graph'', you can generate
15550 a gram_filename.vcg file containing a VCG description of the LALR (1)
15551 automaton of your grammar.
15552
15553 * src/main.c: Call to print_graph() function.
15554 * src/getargs.h: Update.
15555 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15556 (graph_flag): New flag.
15557 (longopts): Update.
15558 (getargs): Add case `g'.
15559 * src/files.c (graph_obstack): New obstack struct.
15560 (open_files): Initialize new obstack.
15561 (output_files): Saves graph_obstack if required.
15562 * src/files.h (graph_obstack): New extern declaration.
15563 * src/Makefile.am: Add new source files.
15564
155652001-08-06 Marc Autret <autret_m@epita.fr>
15566
15567 * src/print_graph.c, src/print_graph.h (graph): New.
15568 * src/vcg.h: New file.
15569 * src/vcg.c: New file, VCG graph handling.
15570
155712001-08-06 Marc Autret <autret_m@epita.fr>
15572
15573 Add of %source_extension and %header_extension which specify
15574 the source or/and the header output file extension.
15575
15576 * src/files.c (compute_base_names): Remove initialisation of
15577 src_extension and header_extension.
15578 (compute_exts_from_gf): Update.
15579 (compute_exts_from_src): Update.
15580 (output_files): Update.
15581 * src/reader.c (parse_header_extension_decl): New.
15582 (parse_source_extension_decl): New.
15583 (read_declarations): New case statements for the new tokens.
15584 * src/lex.c (percent_table): Add entries for %source_extension
15585 and %header_extension.
15586 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15587
155882001-08-06 Marc Autret <autret_m@epita.fr>
15589
15590 * configure.in: Bump to 1.28c.
15591 * doc/bison.texinfo: Texinfo thingies.
15592
155932001-08-04 Pascal Bart <pascal.bart@epita.fr>
15594
15595 * tests/atconfig.in (CPPFLAGS): Add.
15596 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15597
155982001-08-03 Akim Demaille <akim@epita.fr>
15599
15600 Version 1.28b.
15601
156022001-08-03 Akim Demaille <akim@epita.fr>
15603
15604 * tests/Makefile.am (check-local): Ship testsuite.
15605 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15606 Include `string.h'.
15607
156082001-08-03 Akim Demaille <akim@epita.fr>
15609
15610 * configure.in: Try using -Wformat when compiling.
15611
156122001-08-03 Akim Demaille <akim@epita.fr>
15613
15614 * configure.in: Bump to 1.28b.
15615
156162001-08-03 Akim Demaille <akim@epita.fr>
15617
15618 * src/complain.c: Adjust strerror_r portability issues.
15619
156202001-08-03 Akim Demaille <akim@epita.fr>
15621
15622 Version 1.28a.
15623
156242001-08-03 Akim Demaille <akim@epita.fr>
15625
15626 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15627 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15628 * src/getargs.c: Include complain.h.
15629 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15630 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15631
156322001-08-03 Akim Demaille <akim@epita.fr>
15633
15634 * src/reader.c (readgram): Display hidden chars in error messages.
15635
156362001-08-03 Akim Demaille <akim@epita.fr>
15637
15638 Update to gettext 0.10.39.
15639
156402001-08-03 Akim Demaille <akim@epita.fr>
15641
15642 * lib/strspn.c: New.
15643
156442001-08-01 Marc Autret <autret_m@epita.fr>
15645
15646 * doc/bison.texinfo: Update.
15647 * doc/bison.1 (mandoc): Update.
15648 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15649 * src/files.c: Support output files extensions computing.
15650 (src_extension): New static variable.
15651 (header_extension): New static variable.
15652 (tr): New function.
15653 (get_extension_index): New function, gets the index of an extension
15654 filename in a string.
15655 (compute_exts_from_gf): New function, computes extensions from the
15656 grammar file extension.
15657 (compute_exts_from_src): New functions, computes extensions from the
15658 C source file extension, file given by ``-o'' option.
15659 (compute_base_names): Update.
15660 (output_files): Update.
15661
156622001-08-01 Robert Anisko <anisko_r@epita.fr>
15663
15664 * doc/bison.texi: Document @$.
15665 (Locations): New section.
15666
156672001-07-18 Akim Demaille <akim@epita.fr>
15668
15669 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15670 * config/prev-version.txt, config/move-if-change: New.
15671 * Makefile.am: Adjust.
15672
156732001-07-08 Pascal Bart <pascal.bart@epita.fr>
15674
15675 * src/bison.simple (yyparse): Suppress warning `comparaison
15676 between signed and unsigned'.
15677
156782001-07-05 Pascal Bart <pascal.bart@epita.fr>
15679
15680 * src/getargs.h (raw_flag): Remove.
15681 * src/getargs.c: Die on `-r'/`--raw'.
15682 * src/lex.c (parse_percent_token): Die on `%raw'.
15683 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15684 * tests/calc.at: Suppress test with option `--raw'.
15685
156862001-07-14 Akim Demaille <akim@epita.fr>
15687
15688 * config/: New.
15689 * configure.in: Require Autoconf 2.50.
15690 Update to gettext 0.10.38.
15691
156922001-03-16 Akim Demaille <akim@epita.fr>
15693
15694 * doc/bison.texinfo: ANSIfy the examples.
15695
156962001-03-16 Akim Demaille <akim@epita.fr>
15697
15698 * getargs.c (skeleton): New variable.
15699 (longopts): --skeleton is a new option.
15700 (shortopts, getargs): -S is a new option.
15701 * getargs.h: Declare skeleton.
15702 * output.c (output_parser): Use it.
15703
157042001-03-16 Akim Demaille <akim@epita.fr>
15705
15706 * m4/strerror_r.m4: New.
15707 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15708 * lib/error.h, lib/error.c: Update.
15709
157102001-03-16 Akim Demaille <akim@epita.fr>
15711
15712 * src/getargs.c (longopts): Clean up.
15713
157142001-02-21 Akim Demaille <akim@epita.fr>
15715
15716 * src/reader.c (gensym): `gensym_count' is your own.
15717 Use a static buf to create the symbol name, as token_buffer is no
15718 longer a buffer.
15719
157202001-02-08 Akim Demaille <akim@epita.fr>
15721
15722 * src/conflicts.c (conflict_report): Be sure not to append to res
15723 between two calls, which could happen if both first sprintf were
15724 skipped, but not the first cp += strlen.
15725
157262001-02-08 Akim Demaille <akim@epita.fr>
15727
15728 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15729 New, from fileutils 4.0.37.
15730 * configure.in: Require Autoconf 2.49c. I took some time before
15731 making this decision. This is the only way out for portability
15732 issues in Bison, it would mean way too much duplicate effort to
15733 import in Bison features implemented in 2.49c since 2.13.
15734 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15735
157362001-02-02 Akim Demaille <akim@epita.fr>
15737
15738 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15739 * lib/xalloc.h, lib/xmalloc.c: Update.
15740
157412001-01-19 Akim Demaille <akim@epita.fr>
15742
15743 Get rid of the ad hoc handling of token_buffer in the scanner: use
15744 the obstacks.
15745
15746 * src/lex.c (token_obstack): New.
15747 (init_lex): Initialize it. No longer call...
15748 (grow_token_buffer): this. Remove it.
15749 Adjust all the places which used it to use the obstack.
15750
157512001-01-19 Akim Demaille <akim@epita.fr>
15752
15753 * src/lex.h: Rename all the tokens:
15754 s/\bENDFILE\b/tok_eof/g;
15755 s/\bIDENTIFIER\b/tok_identifier/g;
15756 etc.
15757 Let them be enums, not #define, to ease debugging.
15758 Adjust all the code.
15759
157602001-01-18 Akim Demaille <akim@epita.fr>
15761
15762 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15763 * src/lex.c (maxtoken, grow_token_buffer): Static.
15764
157652001-01-18 Akim Demaille <akim@epita.fr>
15766
15767 Since we now use obstacks, more % directives can be enabled.
15768
15769 * src/lex.c (percent_table): Also accept `%yacc',
15770 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15771 `%debug'.
15772 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15773 instead of returning a token.
15774 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15775 * src/reader.c (read_declarations): Adjust.
15776 * src/files.c (open_files): Don't call `compute_base_names', don't
15777 compute `attrsfile' since they depend upon data which might be
15778 *in* the input file now.
15779 (output_files): Do it here.
15780 * src/output.c (output_headers): Document the fact that this patch
15781 introduces a guaranteed SEGV for semantic parsers.
15782 * doc/bison.texinfo: Document them.
15783 * tests/suite.at: Exercise these %options.
15784
157852000-12-20 Akim Demaille <akim@epita.fr>
15786
15787 Also handle the output file (--verbose) with obstacks.
15788
15789 * files.c (foutput): Remove.
15790 (output_obstack): New.
15791 Adjust all dependencies.
15792 * src/conflicts.c: Return a string.
15793 * src/system.h (obstack_grow_string): Rename as...
15794 (obstack_sgrow): this. Be ready to work with non literals.
15795 (obstack_fgrow4): New.
15796
157972000-12-20 Akim Demaille <akim@epita.fr>
15798
15799 * src/files.c (open_files): Fix the computation of short_base_name
15800 in the case of `-o foo.tab.c'.
15801
158022000-12-20 Akim Demaille <akim@epita.fr>
15803
15804 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15805 (copy_dollar): Now that everything uses obstacks, get rid of the
15806 FILE * parameters.
15807
158082000-12-20 Akim Demaille <akim@epita.fr>
15809
15810 * src/files.c (open_files): Actually the `.output' file is based
15811 on the short_base_name, not base_name.
15812 * tests/suite.at (Checking output file names): Adjust.
15813
158142000-12-20 Akim Demaille <akim@epita.fr>
15815
15816 * src/bison.s1: Remove, we now use directly...
15817 * src/bison.simple: this.
15818 * src/Makefile.am: Use pkgdata instead of data.
15819
158202000-12-20 Akim Demaille <akim@epita.fr>
15821
15822 * src/files.c (guard_obstack): New.
15823 (open_files): Initialize it.
15824 (output_files): Dump it...
15825 * src/files.h: Export it.
15826 * src/reader.c (copy_guard): Use it.
15827
158282000-12-19 Akim Demaille <akim@epita.fr>
15829
15830 * src/files.c (outfile, defsfile, actfile): Removed as global
15831 vars.
15832 (open_files): Don't compute them.
15833 (output_files): Adjust.
15834 (base_name, short_base_name): Be global.
15835 Adjust dependencies.
15836
158372000-12-19 Akim Demaille <akim@epita.fr>
15838
15839 * src/files.c (strsuffix): New.
15840 (stringappend): Be just like strcat but allocate.
15841 (base_names): Eve out from open_files.
15842 Try to simplify the rather hairy computation of base_name and
15843 short_base_name.
15844 (open_files): Use it.
15845 * tests/suite.at (Checking output file names): New test.
15846
158472000-12-19 Akim Demaille <akim@epita.fr>
15848
15849 * src/system.h (obstack_grow_literal_string): Rename as...
15850 (obstack_grow_string): this.
15851 * src/output.c (output_parser): Recognize `%% actions' instead of
15852 `$'.
15853 * src/bison.s1: s/$/%% actions/.
15854 * src/bison.hairy: Likewise.
15855
158562000-12-19 Akim Demaille <akim@epita.fr>
15857
15858 * src/output.c (output_parser): Compute the `#line' lines when
15859 there are.
15860 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15861 Suggested by Hans Aberg.
15862
158632000-12-19 Akim Demaille <akim@epita.fr>
15864
15865 Let the handling of the skeleton files be local to the procedures
15866 that use it.
15867
15868 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15869 longer static.
15870 (fparser, open_extra_files): Remove.
15871 (open_files, output_files): Don't take care of fparser.
15872 * src/files.h: Adjust.
15873 * src/output.c (output_parser): Open and close the file to the
15874 skeleton.
15875 * src/reader.c (read_declarations): When %semantic_parser, open
15876 fguard.
15877
158782000-12-19 Akim Demaille <akim@epita.fr>
15879
15880 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15881 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15882
158832000-12-19 Akim Demaille <akim@epita.fr>
15884
15885 * src/files.c (open_files): Yipee! We no longer need all the code
15886 looking for `/tmp' since we have no tmp file.
15887
158882000-12-19 Akim Demaille <akim@epita.fr>
15889
15890 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15891 New macros.
15892 * src/files.c (open_files): Less dependency on MSDOS etc.
15893
158942000-12-14 Akim Demaille <akim@epita.fr>
15895
15896 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15897 Provide a default definition.
15898 Use it when executing the default @ action.
15899 * src/reader.c (reader_output_yylsp): No longer include
15900 `timestamp' and `text' in the default YYLTYPE.
15901
159022000-12-12 Akim Demaille <akim@epita.fr>
15903
15904 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15905 (copy_guard): Quote the file names.
15906 Reported by Laurent Mascherpa.
15907
159082000-12-12 Akim Demaille <akim@epita.fr>
15909
15910 * src/output.c (output_headers, output_program, output): Be sure
15911 to escape special characters when outputting filenames.
15912 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15913 (output_headers): Don't depend on them, Use ACTSTR.
15914
159152000-11-17 Akim Demaille <akim@epita.fr>
15916
15917 * lib/obstack.h: Formatting changes.
15918 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15919 prevents type checking.
15920 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15921 cast the value to (void *): assigning a `foo *' to a `void *'
15922 variable is valid.
15923 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15924 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15925 append characters.
15926
159272000-11-17 Akim Demaille <akim@epita.fr>
15928
15929 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15930 as...
15931 (suite.m4, regression.m4, calc.m4): these.
15932 * tests/atgeneral.m4: Update from CVS Autoconf.
15933
159342000-11-17 Akim Demaille <akim@epita.fr>
15935
15936 * tests/regression.m4 (%union and --defines): New test,
15937 demonstrating a current bug in the obstack implementation.
15938
159392000-11-17 Akim Demaille <akim@epita.fr>
15940
15941 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15942 macros.
15943 Use them to declare the variables which are global or local to
15944 `yyparse'.
15945
159462000-11-17 Akim Demaille <akim@epita.fr>
15947
15948 * acconfig.h: Remove, no longer used.
15949
159502000-11-07 Akim Demaille <akim@epita.fr>
15951
15952 * src: s/Copyright (C)/Copyright/g.
15953
159542000-11-07 Akim Demaille <akim@epita.fr>
15955
15956 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15957 defining.
15958 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15959
159602000-11-07 Akim Demaille <akim@epita.fr>
15961
15962 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15963 Merge in a single CPP if/else.
15964
159652000-11-07 Akim Demaille <akim@epita.fr>
15966
15967 * src/output.c (output): Remove useless variables.
15968 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15969 argument `data' for consistency with the prototypes.
15970 Qualify it `const'.
15971 (obstack_copy, obstack_copy0): Rename the second argument as
15972 `address' for consistency. Qualify it `const'.
15973 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15974 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15975 `const' their input argument (`data' or `address').
15976 Adjust the corresponding macros to include `const' in casts.
15977
159782000-11-03 Akim Demaille <akim@epita.fr>
15979
15980 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15981 s/PFILE1/BISON_HAIRY/.
15982 Adjust dependencies.
15983
159842000-11-03 Akim Demaille <akim@epita.fr>
15985
15986 For some reason, this was not applied.
15987
15988 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15989 `unlink': it's no longer used.
15990
159912000-11-03 Akim Demaille <akim@epita.fr>
15992
15993 * src/files.c (skeleton_find): New function, eved out of...
15994 (open_files, open_extra_files): here.
15995
159962000-11-03 Akim Demaille <akim@epita.fr>
15997
15998 Don't use `atexit'.
15999
16000 * src/files.c (obstack_save): New function.
16001 (done): Rename as...
16002 (output_files): this.
16003 Use `obstack_save'.
16004 * src/main.c (main): Don't use `atexit' to register `done', since
16005 it no longer has to remove tmp files, just call `output_files'
16006 when there are no errors.
16007
160082000-11-02 Akim Demaille <akim@epita.fr>
16009
16010 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16011 `unlink': it's no longer used.
16012 * src/files.h: Formatting changes.
16013
160142000-11-02 Akim Demaille <akim@epita.fr>
16015
16016 Remove the last uses of mktemp and unlink/delete.
16017
16018 * src/files.c (fdefines, ftable): Removed.
16019 (defines_ostack, table_obstack): New.
16020 Adjust dependencies of the former into uses of the latter.
16021 * src/output.c (output_short_or_char_table, output_short_table):
16022 Convert to using obstacks.
16023 * src/reader.c (copy_comment2): Accept one FILE * and two
16024 obstacks.
16025 (output_token_defines, reader_output_yylsp): Use obstacks.
16026 * src/system.h (obstack_fgrow3): New.
16027 * po/POTFILES.in: Adjust.
16028
160292000-11-01 Akim Demaille <akim@epita.fr>
16030
16031 Change each use of `fattrs' into a use of `attrs_obstack'.
16032
16033 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16034 * src/files.c (fattrs): Remove.
16035 (attrs_obstack): New.
16036 Adjust all dependencies.
16037 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16038
160392000-11-01 Akim Demaille <akim@epita.fr>
16040
16041 Introduce obstacks.
16042 Change each use of `faction' into a use of `action_obstack'.
16043
16044 * lib/obstack.h, lib/obstack.c: New files.
16045 * src/files.c (faction): Remove.
16046 (action_obstack): New.
16047 Adjust all dependencies.
16048
160492000-10-20 Akim Demaille <akim@epita.fr>
16050
16051 * lib/quote.h (PARAMS): New macro. Use it.
16052
160532000-10-16 Akim Demaille <akim@epita.fr>
16054
16055 * src/output.c (output_short_or_char_table): New function.
16056 (output_short_table, output_token_translations): Use it.
16057 (goto_actions): Use output_short_table.
16058
160592000-10-16 Akim Demaille <akim@epita.fr>
16060
16061 * src/symtab.c (bucket_new): New function.
16062 (getsym): Use it.
16063
16064 * src/output.c (output_short_table): New argument to display the
16065 comment associated with the table.
16066 Adjust dependencies.
16067 (output_gram): Use it.
16068 (output_rule_data): Nicer output layout for YYTNAME.
16069
160702000-10-16 Akim Demaille <akim@epita.fr>
16071
16072 * src/lex.c (read_typename): New function.
16073 (lex): Use it.
16074 * src/reader.c (copy_dollar): Likewise.
16075
160762000-10-16 Akim Demaille <akim@epita.fr>
16077
16078 * src/reader.c (copy_comment2): Expect the input stream to be on
16079 the `/' which is suspected to open a comment, instead of being
16080 called after `//' or `/*' was read.
16081 (copy_comment, copy_definition, parse_union_decl, copy_action)
16082 (copy_guard): Adjust.
16083
160842000-10-16 Akim Demaille <akim@epita.fr>
16085
16086 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16087 `read_signed_integer'.
16088
160892000-10-16 Akim Demaille <akim@epita.fr>
16090
16091 * src/reader.c (copy_dollar): New function.
16092 (copy_guard, copy_action): Use it.
16093
160942000-10-16 Akim Demaille <akim@epita.fr>
16095
16096 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16097 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16098 New files, from Fileutils 4.0.27.
16099 * src/main.c (printable_version): Remove.
16100 * src/lex.c, src/reader.c: Use `quote'.
16101
161022000-10-04 Akim Demaille <akim@epita.fr>
16103
16104 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16105
161062000-10-04 Akim Demaille <akim@epita.fr>
16107
16108 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16109
161102000-10-04 Akim Demaille <akim@epita.fr>
16111
16112 When a literal string is used to define two different tokens,
16113 `bison -v' segfaults.
16114 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16115
16116 * tests/regression.m4: New file.
16117 Include the core of the sample provided by Piotr Gackiewicz.
16118 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16119 properly.
16120
161212000-10-04 Akim Demaille <akim@epita.fr>
16122
16123 * src/reader.c (parse_expect_decl): Keep `count' within the size
16124 of `buffer'.
16125 From Neil Booth.
16126
161272000-10-02 Paul Eggert <eggert@twinsun.com>
16128
16129 * bison.s1 (yyparse): Assign the default value
16130 unconditionally, to avoid a GCC warning and make the parser a
16131 tad smaller.
16132
161332000-10-02 Akim Demaille <akim@epita.fr>
16134
16135 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16136 options.
16137
161382000-10-02 Akim Demaille <akim@epita.fr>
16139
16140 * src/derives.c, src/print.c, src/reduce.c: To ease the
16141 translation, move some `\n' out of the translated strings.
16142
161432000-10-02 Akim Demaille <akim@epita.fr>
16144
16145 The location tracking mechanism is precious for parse error
16146 messages. Nevertheless, it is enabled only when `@n' is used in
16147 the grammar, which is a different issue (you can use it in error
16148 message, but not in the grammar per se). Therefore, there should
16149 be another means to enable it.
16150
16151 * src/getargs.c (getargs): Support `--locations'.
16152 (usage): Report it.
16153 * src/getargs.h (locationsflag): Export it.
16154 * src/lex.c (percent_table): Support `%locations'.
16155 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16156 with `locationsflag'.
16157 * doc/bison.texinfo: Document `--locations' and `%locations'.
16158 Sort the options.
16159 * tests/calc.m4: Test it.
16160
16161 For regularity of the names, replace each
16162 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16163 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16164 In addition replace each `flag' with `_flag'.
16165
161662000-10-02 Akim Demaille <akim@epita.fr>
16167
16168 Also test parse error messages, including with YYERROR_VERBOSE.
16169
16170 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16171 associative).
16172 Use it to check the computations.
16173 Use it to check `nonassoc' is honored.
16174 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16175 `--yyerror-verbose'.
16176 (_AT_CHECK_CALC): Adjust to this option.
16177 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16178
161792000-10-02 Akim Demaille <akim@epita.fr>
16180
16181 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16182 the latter demonstrates a flaw in the handling of non debugging
16183 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16184 was used in order to simplify:
16185
16186 #if YYDEBUG
16187 if (yydebug)
16188 {
16189 ...
16190 }
16191 #endif
16192
16193 into
16194
16195 if (yydebug)
16196 {
16197 ...
16198 }
16199
16200 unfortunately this leads to a CPP conflict when
16201 `--name-prefix=foo' is used since it produces `#define yydebug
16202 foodebug'.
16203
16204 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16205 (YYDPRINTF): New macro.
16206 Spread its use.
16207 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16208 the bison options.
16209 Also test `--verbose', `--defines' and `--name-prefix'.
16210
162112000-10-02 Akim Demaille <akim@epita.fr>
16212
16213 Improve the readability of the produced parsers.
16214
16215 * src/bison.s1: Formatting changes.
16216 Improve the comment related to the `$' mark.
16217 (yydefault): Don't fall through to `yyresume': `goto' there.
16218 * src/output.c (output_parser): When the `$' is met, skip the end
16219 of its line.
16220 New variable, `number_of_dollar_signs', to check there's exactly
16221 one `$' in the parser skeleton.
16222
162232000-10-02 Akim Demaille <akim@epita.fr>
16224
16225 * lib/xstrdup.c: New file, from the fileutils.
16226 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16227 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16228 instead of strlen + xmalloc + strcpy.
16229 * src/symtab.c (copys): Remove, use xstrdup instead.
16230
162312000-10-02 Akim Demaille <akim@epita.fr>
16232
16233 * src/gram.h (associativity): New enum type which replaces the
16234 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16235 `right_assoc', `left_assoc' and `non_assoc'.
16236 Adjust all dependencies.
16237 * src/reader.c: Formatting changes.
16238 (LTYPESTR): Don't define it, use it as a literal in
16239 `reader_output_yylsp'.
16240 * src/symtab.h (symbol_class): New enum type which replaces the
16241 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16242 `sunknown', `stoken and `snterm'.
16243
162442000-10-02 Akim Demaille <akim@epita.fr>
16245
16246 * src/getargs.c (fixed_outfiles): Rename as...
16247 (yaccflag): for consistency and accuracy.
16248 Adjust dependencies.
16249
162502000-10-02 Akim Demaille <akim@epita.fr>
16251
16252 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16253 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16254 difficult and introduced a lot of core dump. It turns out that
16255 Bison used an implementation of `xmalloc' based on `calloc', and
16256 at various places it does depend upon the initialization to 0. I
16257 have not tried to isolate the pertinent places, and all the former
16258 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16259 someone should address this issue.
16260
16261 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16262 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16263 files.
16264 Adjust dependencies.
16265 * src/warshall.h: New file.
16266 Propagate.
16267
162682000-10-02 Akim Demaille <akim@epita.fr>
16269
16270 Various anti-`extern in *.c' changes.
16271
16272 * src/system.h: Include `assert.h'.
16273
162742000-10-02 Akim Demaille <akim@epita.fr>
16275
16276 * src/state.h (nstates, final_state, first_state, first_shift)
16277 (first_reduction): Move their exportation from here...
16278 * src/LR0.h: to here.
16279 Adjust dependencies.
16280 * src/getargs.c (statisticsflag): New variable.
16281 Add support for `--statistics'.
16282 Adjust dependencies.
16283
16284 Remove a lot of now useless `extern' statements in most files.
16285
162862000-10-02 Akim Demaille <akim@epita.fr>
16287
16288 * src/LR0.h: New file.
16289 Propagate its use.
16290
162912000-10-02 Akim Demaille <akim@epita.fr>
16292
16293 * src/print.h: New file.
16294 Propagate its use.
16295 * src/print.c: Formatting and ordering changes.
16296 (verbose, terse): Replace with...
16297 (print_results): this new function.
16298 Adjust dependencies.
16299
163002000-10-02 Akim Demaille <akim@epita.fr>
16301
16302 * src/conflicts.c (conflict_report): New function.
16303 (conflict_log, verbose_conflict_log): Replace with...
16304 (print_conflicts): this function.
16305 Adjust dependencies.
16306 * src/conflicts.h: New file.
16307 Propagate its inclusion.
16308
163092000-10-02 Akim Demaille <akim@epita.fr>
16310
16311 * src/nullable.h: New file.
16312 Propagate its inclusion.
16313 * src/nullable.c: Formatting changes.
16314
163152000-10-02 Akim Demaille <akim@epita.fr>
16316
16317 * src/reduce.h: New file.
16318 Propagate its inclusion.
16319 * src/reduce.c: Topological sort and other formatting changes.
16320 (bool, TRUE, FALSE): Move their definition to...
16321 * src/system.h: here.
16322
163232000-10-02 Akim Demaille <akim@epita.fr>
16324
16325 * src/files.c: Formatting changes.
16326 (tryopen, tryclose, openfiles): Rename as...
16327 (xfopen, xfclose, open_files): this.
16328 (stringappend): static.
16329 * src/files.h: Complete the list of exported symbols.
16330 Propagate its use.
16331
163322000-10-02 Akim Demaille <akim@epita.fr>
16333
16334 * src/reader.h: New file.
16335 Propagate its use instead of tedious list of `extern' and
16336 prototypes.
16337 * src/reader.c: Formatting changes, topological sort,
16338 s/register//.
16339
163402000-10-02 Akim Demaille <akim@epita.fr>
16341
16342 * src/lex.h: Prototype `lex.c' exported functions.
16343 * src/reader.c: Adjust.
16344 * src/lex.c: Formatting changes.
16345 (safegetc): Rename as...
16346 (xgetc): this.
16347
163482000-10-02 Akim Demaille <akim@epita.fr>
16349
16350 * src/lalr.h: New file.
16351 Propagate its inclusion instead of prototypes and `extern'.
16352 * src/lalr.c: Formatting changes, topological sorting etc.
16353
163542000-10-02 Akim Demaille <akim@epita.fr>
16355
16356 * src/output.c (token_actions): Introduce a temporary array,
16357 YYDEFACT, that makes it possible for this function to use
16358 output_short_table.
16359
163602000-10-02 Akim Demaille <akim@epita.fr>
16361
16362 `user_toknums' is output as a `short[]' in `output.c', while it is
16363 defined as a `int[]' in `reader.c'. For consistency with the
16364 other output tables, `user_toknums' is now defined as a table of
16365 shorts.
16366
16367 * src/reader.c (user_toknums): Be a short table instead of an int
16368 table.
16369 Adjust dependencies.
16370
16371 Factor the short table outputs.
16372
16373 * src/output.c (output_short_table): New function.
16374 * src/output.c (output_gram, output_stos, output_rule_data)
16375 (output_base, output_table, output_check): Use it.
16376
163772000-10-02 Akim Demaille <akim@epita.fr>
16378
16379 * src/output.c (output): Topological sort of the functions, in
16380 order to get rid of the `static' prototypes.
16381 No longer use `register'.
16382 * src/output.h: New file.
16383 Propagate its inclusion in files explicitly prototyping functions
16384 from output.c.
16385
163862000-09-21 Akim Demaille <akim@epita.fr>
16387
16388 * src/atgeneral.m4: Update from Autoconf.
16389
163902000-09-21 Akim Demaille <akim@epita.fr>
16391
16392 * src/closure.h: New file.
16393 * src/closure.c: Formatting changes, topological sort over the
16394 functions, use of closure.h.
16395 (initialize_closure, finalize_closure): Rename as...
16396 (new_closure, free_closure): these. Adjust dependencies.
16397 * src/LR0.c: Formatting changes, topological sort, use of
16398 cloture.h.
16399 (initialize_states): Rename as...
16400 (new_states): this.
16401 * src/Makefile.am (noinst_HEADERS): Adjust.
16402
164032000-09-20 Akim Demaille <akim@epita.fr>
16404
16405 * src/acconfig.h: Don't protect config.h against multiple
16406 inclusion.
16407 Don't define PARAMS.
16408 * src/system.h: Define PARAMS.
16409 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16410 purpose of config.h. system.h must not try to fix wrong
16411 definitions in config.h.
16412
164132000-09-20 Akim Demaille <akim@epita.fr>
16414
16415 * src/derives.h: New file.
16416 * src/main.c, src/derives.h: Use it.
16417 Formatting changes.
16418 * src/Makefile.am (noinst_HEADERS): Adjust.
16419
164202000-09-20 Akim Demaille <akim@epita.fr>
16421
16422 * tests/atgeneral.m4: Update from Autoconf.
16423 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16424 (AT_CHECK_CALC): New macros.
16425 Use these macros to test bison with options `', `--raw',
16426 `--debug', `--yacc', `--yacc --debug'.
16427
164282000-09-19 Akim Demaille <akim@epita.fr>
16429
16430 * src/output.c: Formatting changes.
16431 * src/machine.h: Remove, leaving its contents in...
16432 * src/system.h: here.
16433 Include stdio.h.
16434 Adjust all dependencies on stdio.h and machine.h.
16435 * src/getargs.h: New file.
16436 Let all `extern' declarations about getargs.c be replaced with
16437 inclusion of `getargs.h'.
16438 * src/Makefile.am (noinst_HEADERS): Adjust.
16439
16440 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16441 scope.
16442 (yyerror): Returns void, not int.
16443 * doc/bison.texinfo: Formatting changes.
16444
164452000-09-19 Akim Demaille <akim@epita.fr>
16446
16447 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16448 portable.
16449
164502000-09-18 Akim Demaille <akim@epita.fr>
16451
16452 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16453 * src/Makefile.am (INCLUDES): Don't.
16454 Be ready to fetch headers in lib/.
16455
164562000-09-18 Akim Demaille <akim@epita.fr>
16457
16458 * doc/bison.texinfo: Update the copyright.
16459 ANSIfy and GNUify the examples.
16460 Remove the old menu.
16461
164622000-09-18 Akim Demaille <akim@epita.fr>
16463
16464 First set of tests: use the `calc' example from the documentation.
16465
16466 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16467 is defined only when YYDEBUG is.
16468 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16469 * src/files.c (tryopen, tryclose): Formatting changes.
16470 Move to the top and be static.
16471 * src/reader.c (read_signed_integer): Likewise.
16472 * tests/calc.m4: New file.
16473 * Makefile.am, suite.m4: Adjust.
16474 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16475
164762000-09-18 Akim Demaille <akim@epita.fr>
16477
16478 Add support for an Autotest test suite for Bison.
16479
16480 * m4/m4.m4, m4/atconfig.m4: New files.
16481 * m4/Makefile.am (EXTRA_DIST): Adjust.
16482 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16483 files.
16484 * src/getargs.c: Display a more standard --version message.
16485 * src/reader.c (reader): Formatting changes.
16486 No longer depend upon VERSION_STRING.
16487 * configure.in: No longer use `dnl'.
16488 Set up the test suite and the new directory `tests/.
16489 (VERSION_STRING): Remove.
16490
164912000-04-14 Akim Demaille <akim@epita.fr>
16492
16493 * src/reader.c (copy_comment2): New function, same as former
16494 `copy_comment', but outputs into two FILE *.
16495 (copy_comment): Use it.
16496 (parse_union_decl): Use it.
16497 (get_type, parse_start_decl): Use the same `invalid' message.
16498 (parse_start_decl, parse_union_decl): Use the same `multiple'
16499 message.
16500 (parse_union_decl, copy_guard, copy_action): Use the same
16501 `unmatched' message.
16502 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16503
165042000-03-31 Akim Demaille <akim@epita.fr>
16505
16506 * src/files.c (tryopen, tryclose): Move to the top.
16507 Be static.
16508
165092000-03-31 Akim Demaille <akim@epita.fr>
16510
16511 * src/main.c (main): Don't call `done', exit does it.
16512
165132000-03-31 Akim Demaille <akim@epita.fr>
16514
16515 * allocate.c: s/return (foo)/return foo/.
16516 * lalr.c: Likewise.
16517 * LR0.c: Likewise.
16518 * output.c: Likewise.
16519 * reader.c: Likewise.
16520 * symtab.c: Likewise.
16521 * vmsgetargs.c: Likewise.
16522
165232000-03-31 Akim Demaille <akim@epita.fr>
16524
16525 Clean up the error reporting functions.
16526
16527 * src/report.c: New file.
16528 * src/report.h: Likewise.
16529 * src/Makefile.am: Adjust.
16530 * m4/error.m4: New file.
16531 * m4/Makefile.am: Adjust.
16532 * configure.in (jm_PREREQ_ERROR): Call it.
16533 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16534 Remove.
16535 (fatal, fatals): Remove. All callers use complain.c::fatal.
16536 (warn, warni, warns, warnss, warnss): Remove. All callers use
16537 complain.c::complain.
16538 (toomany): Remove, use fatal instead.
16539 * src/files.c (done): No argument, use complain_message_count.
16540 * src/main.c (main): Register `done' to `atexit'.
16541
16542 * src/getargs.c (usage): More `fputs', less `fprintf'.
16543
165442000-03-28 Akim Demaille <akim@epita.fr>
16545
16546 * lib/: New directory.
16547 * Makefile.am (SUBDIRS): Adjust.
16548 * configure.in: Adjust.
16549 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16550 useless.
16551 * src/alloca.c: Moved to lib/.
16552 * src/getopt.c: Likewise.
16553 * src/getopt1.c: Likewise.
16554 * src/getopt.h: Likewise.
16555 * src/ansi2knr.c: Likewise.
16556 * src/ansi2knr.1: Likewise.
16557 * src/Makefile.am: Adjust.
16558 * lib/Makefile.am: New file.
16559
165602000-03-28 Akim Demaille <akim@epita.fr>
16561
16562 * src/getargs.c (usage): Refresh the help message.
16563
165642000-03-17 Akim Demaille <akim@epita.fr>
16565
16566 * src/getopt1.c: Updated from textutils 2.0e
16567 * src/getopt.c: Likewise.
16568 * src/getopt.h: Likewise.
16569
165702000-03-17 Akim Demaille <akim@epita.fr>
16571
16572 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16573 the file name, not the whole `#line LINE FILE'.
16574
165752000-03-17 Akim Demaille <akim@epita.fr>
16576
16577 On syntax errors, report the token on which we choked.
16578
16579 * src/bison.s1 (yyparse): In the label yyerrlab, when
16580 YYERROR_VERBOSE, add yychar in msg.
16581
165822000-03-17 Akim Demaille <akim@epita.fr>
16583
16584 * src/reader.c (copy_at): New function.
16585 (copy_guard): Use it.
16586 (copy_action): Use it.
16587
165882000-03-17 Akim Demaille <akim@epita.fr>
16589
16590 Be kind to translators, save some useless translations.
16591
16592 * src/main.c (banner): New function.
16593 (fatal_banner): Use it.
16594 (warn_banner): Use it.
16595
165962000-03-17 Akim Demaille <akim@epita.fr>
16597
16598 * src/reader.c (copy_definition): Use copy_string and
16599 copy_comment. Removed now unused `match', `ended',
16600 `cplus_comment'.
16601 (copy_comment, copy_string): Moved, to be visible from
16602 copy_definition.
16603
166042000-03-17 Akim Demaille <akim@epita.fr>
16605
16606 * src/reader.c (copy_string): Declare `static inline'. No
16607 problems with inline, since it is checked by configure.
16608 (copy_comment): Likewise.
16609
166102000-03-17 Akim Demaille <akim@epita.fr>
16611
16612 * src/reader.c (packsymbols): Formatting changes.
16613
166142000-03-17 Akim Demaille <akim@epita.fr>
16615
16616 * src/reader.c (copy_comment): New function, factored out from:
16617 (copy_action): Use it. Removed now unused `match', `ended',
16618 `cplus_comment'.
16619 (copy_guard): Likewise.
16620
166212000-03-17 Akim Demaille <akim@epita.fr>
16622
16623 * src/reader.c (copy_string): New function, factored out from:
16624 (copy_action): Use it.
16625 (copy_guard): Likewise.
16626
166272000-03-17 Akim Demaille <akim@epita.fr>
16628
16629 Change the handling of @s so that they behave exactly like $s.
16630 There is now a pseudo variable @$ (readble and writable), location
16631 of the lhs of the rule (by default ranging from the location of
16632 the first symbol of the rhs, to the location of the last symbol,
16633 or, if the rhs is empty, YYLLOC).
16634
16635 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16636 yyval.
16637 (yyparse): When providing a default semantic action, provide a
16638 default location action.
16639 (after the $): No longer change `*YYLSP', just stack YYLOC the
16640 same way you stack YYVAL.
16641 * src/reader.c (read_declarations): Use warns.
16642 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16643 (copy_action, case '@'): Likewise.
16644 Use a standard error message, to save useless work from
16645 translators.
16646
166472000-03-17 Akim Demaille <akim@epita.fr>
16648
16649 * src/bison.s1: Formatting and cosmetics changes.
16650 * src/reader.c: Likewise.
16651 Update the Copyright notice.
16652
166532000-03-17 Akim Demaille <akim@epita.fr>
16654
16655 * src/bison.s1 (#line): All set to `#line' only, since the
16656 Makefile now handles them.
16657
166582000-03-16 Akim Demaille <akim@epita.fr>
16659
16660 * src/output.c (output_rule_data): Output the documentation of
16661 some of the tables.
16662 (Copyright notice): Update.
16663 Formatting changes.
16664
166652000-03-16 Akim Demaille <akim@epita.fr>
16666
16667 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16668 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16669 One `#if YYDEBUG' remains, since it uses variables which are
16670 defined only if `YYDEBUG != 0'.
16671
166722000-03-16 Akim Demaille <akim@epita.fr>
16673
16674 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16675 and related variables so that the similarities are highlighted.
16676
166772000-03-16 Akim Demaille <akim@epita.fr>
16678
16679 * src/bison.s1: Properly indent CPP directives.
16680
166812000-03-16 Akim Demaille <akim@epita.fr>
16682
16683 * src/bison.s1: Properly indent the `alloca' CPP section.
16684
166852000-03-16 Akim Demaille <akim@epita.fr>
16686
16687 Do not hard code values of directories in `configure.in'.
16688 Update the `configure' tool chain.
16689
16690 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16691 src/makefile.am.
16692 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16693 (AC_OUTPUT): Add m4/Makefile.
16694 Bump to bison 1.28a, 1.29 has never been released.
16695 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16696 handled via src/Makefile.am.
16697 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16698 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16699 autoheader.
16700 * Makefile.am (SUBDIRS): Add m4.
16701 (ACLOCAL_AM_FLAGS): New variable.
16702 (AUTOMAKE_OPTIONS): Add check-news.
16703 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16704 the proper line number and file name.
16705 (DEFS): Propagate the location of bison library files and of the
16706 locale files.
16707 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16708 builddir.
16709 * acinclude.m4: Remove, replaced by the directory m4.
16710 * m4/Makefile.am (EXTRA_DIST): New variable.
16711 * m4/gettext.m4: New file, from the fileutils.
16712 * m4/lcmessage.m4: Likewise
16713 * m4/progtest.m4: Likewise.
16714 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16715
167162000-03-10 Akim Demaille <akim@epita.fr>
16717
16718 * src/closure.c:
16719 Formatting changes of various comments.
16720 Respect the GNU coding standards at various places.
16721 Don't use `_()' when no translation is needed.
16722
167231999-12-13 Jesse Thilo <jthilo@gnu.org>
16724
16725 * src/files.c:
16726 OS/2 honors TMPDIR environment variable.
16727
167281999-12-13 Jesse Thilo <jthilo@gnu.org>
16729
16730 * doc/bison.texinfo: Tweaked spelling and grammar.
16731 Updated ISBN.
16732 Removed reference to price of printed copy.
16733 Mention BISON_SIMPLE and BISON_HAIRY.
16734
167351999-12-13 Jesse Thilo <jthilo@gnu.org>
16736
16737 * configure.in, NEWS:
16738 Bison 1.29 released.
16739
167401999-10-27 Jesse Thilo <jthilo@gnu.org>
16741
16742 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16743 Added reference card.
16744
167451999-07-26 Jesse Thilo <jthilo@gnu.org>
16746
16747 * po/ru.po: Added Russian translation.
16748
167491999-07-26 Jesse Thilo <jthilo@gnu.org>
16750
16751 * configure.in: Added Russian translation.
16752
167531999-07-06 Jesse Thilo <jthilo@gnu.org>
16754
16755 * configure.in, NEWS, README:
16756 Released version 1.28.
16757
167581999-06-14 Jesse Thilo <jthilo@gnu.org>
16759
16760 * src/system.h:
16761 Squashed redefinition warning on some systems.
16762
16763 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16764 Have configure build version string instead of relying on ANSI string
16765 concatentation.
16766
167671999-06-14 Jesse Thilo <jthilo@gnu.org>
16768
16769 * po/POTFILES.in: Got rid of version.c.
16770
167711999-06-14 Jesse Thilo <jthilo@gnu.org>
16772
16773 * acconfig.h, configure.in:
16774 Have configure build version string instead of relying on ANSI string
16775 concatentation.
16776
167771999-06-08 Jesse Thilo <jthilo@gnu.org>
16778
16779 * doc/bison.1:
16780 Dropped mention of `+' for long-named options.
16781
167821999-05-30 Jesse Thilo <jthilo@gnu.org>
16783
16784 * src/files.c: Added <unistd.h> for unlink().
16785
16786 * src/Makefile.am, src/system.h:
16787 I18n fixes.
16788
167891999-05-30 Jesse Thilo <jthilo@gnu.org>
16790
16791 * README: Added a FAQ list.
16792
16793 * configure.in, acconfig.h:
16794 I18n fixes.
16795
167961999-05-30 Jesse Thilo <jthilo@gnu.org>
16797
16798 * doc/FAQ, doc/Makefile.am:
16799 Added a FAQ list.
16800
168011999-05-19 Jesse Thilo <jthilo@gnu.org>
16802
16803 * src/alloc.h, src/symtab.h, src/version.c:
16804 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16805
168061999-04-18 Jesse Thilo <jthilo@gnu.org>
16807
16808 * src/.cvsignore, src/Makefile.am:
16809 Reorganized: sources in `src', documentation in `doc'.
16810
16811 * src/lex.c (literalchar):
16812 fixed the code for escaping double quotes (thanks
16813 Jonathan Czisny.)
16814
168151999-04-18 Jesse Thilo <jthilo@gnu.org>
16816
16817 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16818 Adjusted paths to reflect directory reorganization.
16819
168201999-04-18 Jesse Thilo <jthilo@gnu.org>
16821
16822 * doc/.cvsignore, doc/Makefile.am:
16823 Reorganized: sources in `src', documentation in `doc'.
16824
168251999-04-18 Jesse Thilo <jthilo@gnu.org>
16826
16827 * configure.in:
16828 Updated AC_INIT file to reflect directory reorganization.
16829
16830 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16831 Reorganized: sources in `src', documentation in `doc'.
16832
168331999-04-13 Jesse Thilo <jthilo@gnu.org>
16834
16835 * src/allocate.c:
16836 Don't declare calloc() and realloc() if not necessary.
16837
168381999-04-13 Jesse Thilo <jthilo@gnu.org>
16839
16840 * configure.in, acconfig.h, acinclude.m4:
16841 Don't declare calloc() and realloc() if not necessary.
16842
168431999-03-23 Jesse Thilo <jthilo@gnu.org>
16844
16845 * po/.cvsignore: Added i18n support.
16846
168471999-03-23 Jesse Thilo <jthilo@gnu.org>
16848
16849 * acconfig.h, configure.in, Makefile.am:
16850 Added i18n support.
16851
168521999-03-22 Jesse Thilo <jthilo@gnu.org>
16853
16854 * src/bison.s1: Fixed #line numbers.
16855
168561999-03-15 Jesse Thilo <jthilo@gnu.org>
16857
16858 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16859 Added PO files from Translation Project.
16860
168611999-03-03 Jesse Thilo <jthilo@gnu.org>
16862
16863 * Makefile.am:
16864 Added support for non-ANSI compilers (ansi2knr).
16865
168661999-02-16 Jesse Thilo <jthilo@gnu.org>
16867
16868 * configure.in: Bumped version number to 1.27.
16869
16870 * Makefile.am:
16871 Added `bison.simple' to list of files removed by `make distclean'.
16872
168731999-02-12 Jesse Thilo <jthilo@gnu.org>
16874
16875 * src/files.c, src/files.h:
16876 Defined locations of parser files in config.h instead of Makefile.
16877
168781999-02-12 Jesse Thilo <jthilo@gnu.org>
16879
16880 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16881 Defined locations of parser files in config.h instead of Makefile.
16882
168831999-02-09 Jesse Thilo <jthilo@gnu.org>
16884
16885 * Makefile.am:
16886 Removed inappropriate use of $< macro.
16887
168881999-02-05 Jesse Thilo <jthilo@gnu.org>
16889
16890 * po/Makefile.in.in, po/POTFILES.in:
16891 Add `po' directory skeleton.
16892
168931999-01-27 Jesse Thilo <jthilo@gnu.org>
16894
16895 * README: Document help-bison list.
16896
16897 * configure.in: Add check for mkstemp().
16898
168991999-01-20 Jesse Thilo <jthilo@gnu.org>
16900
16901 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16902 Hush a few compiler warnings.
16903
16904 * src/files.c:
16905 Add tryclose(), which verifies that fclose was successful.
16906 Hush a couple of compiler warnings.
16907
169081999-01-20 Jesse Thilo <jthilo@gnu.org>
16909
16910 * Makefile.am, OChangeLog:
16911 ChangeLog is now automatically generated. Include the old version as
16912 OChangeLog.
16913
169141999-01-14 Jesse Thilo <jthilo@gnu.org>
16915
16916 * 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:
16917 Update FSF address.
16918
169191999-01-14 Jesse Thilo <jthilo@gnu.org>
16920
16921 * doc/bison.texinfo: Fix formatting glitch.
16922
16923 * doc/bison.texinfo: Update FSF address.
16924
169251999-01-14 Jesse Thilo <jthilo@gnu.org>
16926
16927 * acconfig.h: Update FSF address.
16928
169291999-01-08 Jesse Thilo <jthilo@gnu.org>
16930
16931 * src/system.h:
16932 Don't define PACKAGE here, since config.h defines it.
16933
169341998-12-30 Jesse Thilo <jthilo@gnu.org>
16935
16936 * src/reader.c: Update copyright date.
16937
16938 * src/main.c:
16939 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16940 favor of output directly to stderr (avoids buffer overruns).
16941
16942 * src/reader.c: Some checks for premature EOF.
16943
16944 * 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:
16945 Use prototypes if the compiler understands them.
16946
16947 * src/files.c: Honor TMPDIR on Unix hosts.
16948 Use prototypes if the compiler understands them.
16949
16950 * src/reader.c:
16951 Fix a couple of buffer overrun bugs.
16952 Use prototypes if the compiler understands them.
16953
16954 * src/system.h: Include unistd.h and ctype.h.
16955 Use #ifdef instead of #if for NLS symbols.
16956
169571998-12-30 Jesse Thilo <jthilo@gnu.org>
16958
16959 * doc/bison.texinfo:
16960 Delete comment "consider using @set for edition number, etc..." since
16961 we now are doing so.
16962
169631998-12-30 Jesse Thilo <jthilo@gnu.org>
16964
16965 * configure.in:
16966 Use prototypes if the compiler understands them.
16967
16968 * NEWS: Document 1.26 highlights.
16969
16970 * Makefile.am: Require Automake 1.3 or later.
16971
16972 * acconfig.h:
16973 Use prototypes if the compiler understands them.
16974
169751998-12-29 Jesse Thilo <jthilo@gnu.org>
16976
16977 * src/version.c:
16978 Use VERSION symbol from automake for version number.
16979
169801998-12-29 Jesse Thilo <jthilo@gnu.org>
16981
16982 * acconfig.h, configure.in, version.cin:
16983 Use VERSION symbol from automake for version number.
16984
169851998-11-28 Jesse Thilo <jthilo@gnu.org>
16986
16987 * Makefile.am:
16988 Distribute original version of simple parser (bison.s1), not built
16989 version (bison.simple).
16990
169911998-11-28 Jesse Thilo <jthilo@gnu.org>
16992
16993 * doc/bison.texinfo: Add info dir entry.
16994
16995 * doc/bison.texinfo:
16996 Let automake put version number into documentation.
16997
169981998-11-26 Jesse Thilo <jthilo@gnu.org>
16999
17000 * src/bison.cld, src/build.com, src/vmshlp.mar:
17001 Add non-RCS files from /gd/gnu/bison.
17002
170031998-11-26 Jesse Thilo <jthilo@gnu.org>
17004
17005 * doc/bison.1:
17006 Document the BISON_HAIRY and BISON_SIMPLE variables.
17007
170081998-11-25 Jesse Thilo <jthilo@gnu.org>
17009
17010 * src/version.c: Build version.c automatically.
17011
17012 * src/reader.c:
17013 Fix token numbering (used to start at 258, not 257).
17014
17015 * src/system.h: Include config.h.
17016
17017 * src/getargs.c: Update bug report address.
17018
17019 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17020 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17021
170221998-11-25 Jesse Thilo <jthilo@gnu.org>
17023
17024 * Makefile.am:
17025 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17026
17027 * configure.in, version.cin:
17028 Build version.c automatically.
17029
17030 * AUTHORS: Add AUTHORS file.
17031
17032 * README: Update bug report address.
17033
17034 * bison.simple:
17035 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17036
17037 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17038 Add automake stuff.
17039
170401998-11-25 Jesse Thilo <jthilo@gnu.org>
17041
17042 * doc/bison.texinfo: Clean up some formatting.
17043
170441998-05-05 Richard Stallman <rms@gnu.org>
17045
17046 * doc/bison.texinfo:
17047 Explain better why to make a pure parser.
17048
170491998-01-05 Richard Stallman <rms@gnu.org>
17050
17051 * src/files.c (openfiles):
17052 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17053 find a temporary directory, if possible. Do not unlink files while
17054 they are open.
17055
170561997-08-25 Richard Stallman <rms@gnu.org>
17057
17058 * src/reader.c (stack_offset;):
17059 Change some warni to warns.
17060
17061 * src/lex.c (literalchar): Use warns, not warni.
17062
170631997-06-28 Richard Stallman <rms@gnu.org>
17064
17065 * src/bison.s1: Add a Bison version comment.
17066
17067 * src/main.c (fatal, warn, berror):
17068 Use program_name.
17069
170701997-06-28 Richard Stallman <rms@gnu.org>
17071
17072 * Makefile.in (bison_version): New variable.
17073 (dist): Use that variable.
17074 (bison.s1): Substitute the Bison version into bison.simple.
17075
17076 * bison.simple: Add a Bison version comment.
17077
170781997-06-18 Richard Stallman <rms@gnu.org>
17079
17080 * src/main.c (fatal, warn, berror):
17081 Make error messages standard.
17082 (toomany): Improve error message text.
17083
17084 * 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:
17085 new.h renamed to alloc.h.
17086
170871997-06-18 Richard Stallman <rms@gnu.org>
17088
17089 * Makefile.in: new.h renamed to alloc.h.
17090
170911997-05-24 Richard Stallman <rms@gnu.org>
17092
17093 * src/lex.c (literalchar):
17094 Fix the code for escaping \, " and '.
17095
17096 (lex): Avoid trouble when there are many chars
17097 to discard in a char literal with just several chars in it.
17098
170991997-05-17 Richard Stallman <rms@gnu.org>
17100
17101 * src/bison.s1:
17102 Use malloc, if using alloca is troublesome.
17103 (YYSTACK_USE_ALLOCA): New flag macro.
17104 Define it for some systems and compilers.
17105 (YYSTACK_ALLOC): New macro.
17106 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17107 If it was malloc'd, free it.
17108
171091997-05-17 Richard Stallman <rms@gnu.org>
17110
17111 * bison.simple:
17112 Use malloc, if using alloca is troublesome.
17113 (YYSTACK_USE_ALLOCA): New flag macro.
17114 Define it for some systems and compilers.
17115 (YYSTACK_ALLOC): New macro.
17116 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17117 If it was malloc'd, free it.
17118
171191997-04-23 Richard Stallman <rms@gnu.org>
17120
17121 * src/bison.s1:
17122 (alloca) [__hpux]: Always define as __builtin_alloca.
17123
171241997-04-23 Richard Stallman <rms@gnu.org>
17125
17126 * bison.simple:
17127 (alloca) [__hpux]: Always define as __builtin_alloca.
17128
171291997-04-22 Richard Stallman <rms@gnu.org>
17130
17131 * src/bison.s1:
17132 [__hpux]: Include alloca.h (right for HPUX 10)
17133 instead of declaring alloca (right for HPUX 9).
17134
17135 * src/bison.s1 (__yy_memcpy):
17136 Declare arg `count' as unsigned int.
17137 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17138
171391997-04-22 Richard Stallman <rms@gnu.org>
17140
17141 * bison.simple:
17142 [__hpux]: Include alloca.h (right for HPUX 10)
17143 instead of declaring alloca (right for HPUX 9).
17144
17145 * bison.simple (__yy_memcpy):
17146 Declare arg `count' as unsigned int.
17147 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17148
171491997-01-03 Richard Stallman <rms@gnu.org>
17150
17151 * src/allocate.c: [__STDC__ or _MSC_VER]:
17152 Declare calloc and realloc to return void *.
17153
171541997-01-02 Richard Stallman <rms@gnu.org>
17155
17156 * src/system.h:
17157 [_MSC_VER]: Include stdlib.h and process.h.
17158 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17159
17160 * src/main.c (main): Return FAILURE as a value.
17161 (printable_version): Declare arg as int, not char.
17162
171631997-01-02 Richard Stallman <rms@gnu.org>
17164
17165 * Makefile.in (dist):
17166 Explicitly check for symlinks, and copy them.
17167
171681996-12-19 Richard Stallman <rms@gnu.org>
17169
17170 * src/files.c:
17171 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17172
171731996-12-18 Paul Eggert <eggert@gnu.org>
17174
17175 * src/bison.s1 (yyparse):
17176 If __GNUC__ and YYPARSE_PARAM are both defined,
17177 declare yyparse to have a void * argument.
17178
171791996-12-18 Paul Eggert <eggert@gnu.org>
17180
17181 * bison.simple (yyparse):
17182 If __GNUC__ and YYPARSE_PARAM are both defined,
17183 declare yyparse to have a void * argument.
17184
171851996-12-17 Richard Stallman <rms@gnu.org>
17186
17187 * src/reduce.c (nbits): Add some casts.
17188
171891996-08-12 Richard Stallman <rms@gnu.org>
17190
17191 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17192
171931996-08-12 Richard Stallman <rms@gnu.org>
17194
17195 * bison.simple: Test _MSDOS as well as _MSDOS_.
17196
171971996-07-31 Richard Stallman <rms@gnu.org>
17198
17199 * src/bison.s1:
17200 [__sun && __i386]: Include alloca.h.
17201
172021996-07-31 Richard Stallman <rms@gnu.org>
17203
17204 * bison.simple:
17205 [__sun && __i386]: Include alloca.h.
17206
172071996-07-30 Richard Stallman <rms@gnu.org>
17208
17209 * src/bison.s1: Comment change.
17210
17211 * src/bison.s1: Test _MSDOS_, not MSDOS.
17212
172131996-07-30 Richard Stallman <rms@gnu.org>
17214
17215 * bison.simple: Comment change.
17216
17217 * bison.simple: Test _MSDOS_, not MSDOS.
17218
172191996-06-01 Richard Stallman <rms@gnu.org>
17220
17221 * 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:
17222 Insert `_' macro around many string constants.
17223
17224 * src/main.c:
17225 Insert `_' macro around many string constants.
17226
17227 (main): Call setlocale, bindtextdomain and textdomain.
17228
17229 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17230 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17231 [ENABLE_NLS]: Include libintl.h.
17232 [ENABLE_NLS] (gettext): Define.
17233 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17234 (N_, PACKAGE, LOCALEDIR): New macros.
17235
172361996-06-01 Richard Stallman <rms@gnu.org>
17237
17238 * POTFILES.in: New file.
17239
17240 * Makefile.in (allocate.o):
17241 Define target explicitly.
17242
17243 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17244 (LDFLAGS): Set to @LDFLAGS@.
17245 (configure): Run autoconf only if preceding `cd' succeeds.
17246 (bison.s1): Redirect output to temporary file then move the
17247 temporary to the target, rather than redirecting directly to bison.s1.
17248 (clean): Remove config.status and config.log.
17249 (distclean): Don't remove config.status here.
17250
172511996-05-12 Richard Stallman <rms@gnu.org>
17252
17253 * src/bison.s1:
17254 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17255
172561996-05-12 Richard Stallman <rms@gnu.org>
17257
17258 * bison.simple:
17259 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17260
172611996-05-11 Richard Stallman <rms@gnu.org>
17262
17263 * src/bison.s1 (__yy_memcpy):
17264 Really reorder the args, as was supposedly done on Feb 14 1995.
17265 (yyparse): Calls changed accordingly.
17266
172671996-05-11 Richard Stallman <rms@gnu.org>
17268
17269 * Makefile.in (dist): Don't use $(srcdir).
17270
17271 * bison.simple (__yy_memcpy):
17272 Really reorder the args, as was supposedly done on Feb 14 1995.
17273 (yyparse): Calls changed accordingly.
17274
172751996-01-27 Richard Stallman <rms@gnu.org>
17276
17277 * src/output.c (output_rule_data):
17278 Test YYERROR_VERBOSE in the conditional
17279 around the definition of ttyname.
17280
172811995-12-29 Richard Stallman <rms@gnu.org>
17282
17283 * src/bison.s1:
17284 Fix line numbers in #line commands.
17285
172861995-12-29 Richard Stallman <rms@gnu.org>
17287
17288 * bison.simple:
17289 Fix line numbers in #line commands.
17290
172911995-12-27 Richard Stallman <rms@gnu.org>
17292
17293 * src/bison.s1 (YYPARSE_PARAM_DECL):
17294 In C++, make it always null.
17295 (YYPARSE_PARAM_ARG): New macro.
17296 (yyparse): Use YYPARSE_PARAM_ARG.
17297
172981995-12-27 Richard Stallman <rms@gnu.org>
17299
17300 * bison.simple (YYPARSE_PARAM_DECL):
17301 In C++, make it always null.
17302 (YYPARSE_PARAM_ARG): New macro.
17303 (yyparse): Use YYPARSE_PARAM_ARG.
17304
173051995-11-29 Richard Stallman <rms@gnu.org>
17306
17307 * doc/bison.texinfo:
17308 Describe literal string tokens, %raw, %no_lines, %token_table.
17309
173101995-11-29 Daniel Hagerty <hag@gnu.org>
17311
17312 * doc/bison.texinfo: Fixed update date
17313
173141995-10-16 Richard Stallman <rms@gnu.org>
17315
17316 * src/version.c: Version 1.25.
17317
173181995-10-16 Richard Stallman <rms@gnu.org>
17319
17320 * NEWS: *** empty log message ***
17321
173221995-10-16 Richard Stallman <rms@gnu.org>
17323
17324 * doc/bison.1, doc/bison.rnh:
17325 Add new options.
17326
173271995-10-15 Richard Stallman <rms@gnu.org>
17328
17329 * src/vmsgetargs.c, src/getargs.c:
17330 Added -n, -k, and -raw switches.
17331 (noparserflag, toknumflag, rawtoknumflag): New variables.
17332
17333 * src/symtab.h (SALIAS):
17334 New #define for adding aliases to %token.
17335 (struct bucket): Added `alias' field.
17336
17337 * src/reduce.c (reduce_grammar):
17338 Revise error message.
17339 (print_notices): Remove final `.' from error message.
17340
17341 * src/reader.c (reader_output_yylsp):
17342 New function.
17343 (readgram): Use `#if 0' around code that accepted %command
17344 inside grammar rules: The documentation doesn't allow it,
17345 and it will fail since the %command processors scan for the next %.
17346 (parse_token_decl): Extended the %token
17347 declaration to allow a multi-character symbol as an alias.
17348 (parse_thong_decl): New function.
17349 (read_declarations): Added %thong declarations.
17350 (read_declarations): Handle NOOP to deal with allowing
17351 % declarations as another means to specify the flags.
17352 (readgram): Allow %prec prior to semantics embedded in a rule.
17353 (skip_to_char, read_declarations, copy_definition)
17354 (parse_token_decl, parse_start_decl, parse_type_decl)
17355 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17356 (get_type_name, copy_guard, copy_action, readgram)
17357 (get_type, packsymbols): Revised most error messages.
17358 Changed `fatal' to `warnxxx' to avoid aborting for error.
17359 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17360 (read_declarations): Improve the error message for
17361 an invalid character. Do not abort.
17362 (read_declarations, copy_guard, copy_action): Use
17363 printable_version to avoid unprintable characters in printed output.
17364 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17365 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17366 Allow the type of a non-terminal can be given
17367 more than once, as long as all specifications give the same type.
17368
17369 * src/output.c:
17370 (output_headers, output_trailers, output, output_gram)
17371 (output_rule_data): Implement noparserflag variable.
17372 Implement toknumflag variable.
17373 (output): Call reader_output_yylsp to output LTYPESTR.
17374
17375 * src/main.c (main):
17376 If reader sees an error, don't process the grammar.
17377 (fatals): Updated to not use VARARGS1.
17378 (printable_version, int_to_string, warn, warni, warns, warnss)
17379 (warnsss): New error reporting functions. Avoid abort for error.
17380
17381 * src/lex.h:
17382 Added THONG and NOOP for alias processing.
17383 Added SETOPT for the new code that allows setting options with %flags.
17384
17385 * src/lex.c:
17386 Include getopt.h. Add some extern decls.
17387 (safegetc): New function to deal with EOF gracefully.
17388 (literalchar); new function to deal with reading \ escapes.
17389 (lex): Use literalchar.
17390 (lex): Implemented "..." tokens.
17391 (literalchar, lex, parse_percent_token): Made tokenbuffer
17392 always contain the token. This includes growing the token
17393 buffer while reading an integer.
17394 (parse_percent_token): Replaced if-else statement with percent_table.
17395 (parse_percent_token): Added % declarations as another
17396 way to specify the flags -n, -l, and -r. Also added hooks for
17397 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17398 major changes to files.c.
17399 (lex) Retain in the incoming stream a character following
17400 an incorrect '/'.
17401 (skip_white_space, lex): Revised most error messages
17402 and changed fatal to warn to avoid aborting.
17403 (percent_table): Added %thong declarations.
17404
17405 * src/gram.h: Comment changes.
17406
17407 * src/files.c (openfiles, open_extra_files, done):
17408 Add faction flag
17409 and actfile file. Handle noparserflag. Both for -n switch.
17410
17411 * src/conflicts.c (resolve_sr_conflict):
17412 Remove use of alloca.
17413
174141995-06-01 Jim Meyering <meyering@gnu.org>
17415
17416 * doc/bison.texinfo: *** empty log message ***
17417
174181995-05-06 Richard Stallman <rms@gnu.org>
17419
17420 * src/bison.s1: Comment change.
17421
174221995-05-06 Richard Stallman <rms@gnu.org>
17423
17424 * bison.simple: Comment change.
17425
174261995-05-03 Richard Stallman <rms@gnu.org>
17427
17428 * src/version.c: Version now 1.24.
17429
17430 * src/bison.s1: Change distribution terms.
17431
17432 * src/version.c: Version now 1.23.
17433
174341995-05-03 Richard Stallman <rms@gnu.org>
17435
17436 * doc/bison.texinfo:
17437 Rewrite "Conditions for Using Bison".
17438 Update version to 1.24.
17439
174401995-05-03 Richard Stallman <rms@gnu.org>
17441
17442 * bison.simple: Change distribution terms.
17443
174441995-02-23 Richard Stallman <rms@gnu.org>
17445
17446 * src/files.c: Test __VMS_POSIX as well as VMS.
17447
174481995-02-14 Jim Meyering <meyering@gnu.org>
17449
17450 * src/bison.s1 (__yy_memcpy):
17451 Renamed from __yy_bcopy to avoid
17452 confusion. Reverse FROM and TO arguments to be consistent with
17453 those of memcpy.
17454
174551995-02-14 Jim Meyering <meyering@gnu.org>
17456
17457 * bison.simple (__yy_memcpy):
17458 Renamed from __yy_bcopy to avoid
17459 confusion. Reverse FROM and TO arguments to be consistent with
17460 those of memcpy.
17461
174621994-11-10 David J. MacKenzie <djm@gnu.org>
17463
17464 * NEWS: reformat
17465
17466 * NEWS: New file.
17467
17468 * Makefile.in (DISTFILES): Include NEWS.
17469
17470 * Makefile.in (DISTFILES):
17471 Include install-sh, not install.sh.
17472
17473 * configure.in: Update to Autoconf v2 macro names.
17474
174751994-10-05 David J. MacKenzie <djm@gnu.org>
17476
17477 * Makefile.in: fix typo
17478
17479 * Makefile.in (prefix, exec_prefix):
17480 Let configure set them.
17481
174821994-09-28 David J. MacKenzie <djm@gnu.org>
17483
17484 * Makefile.in: Set datadir to $(prefix)/share.
17485
174861994-09-15 Richard Stallman <rms@gnu.org>
17487
17488 * src/bison.s1:
17489 Update copyright notice and GPL version.
17490
174911994-09-15 Richard Stallman <rms@gnu.org>
17492
17493 * bison.simple:
17494 Update copyright notice and GPL version.
17495
174961994-07-12 Richard Stallman <rms@gnu.org>
17497
17498 * src/reduce.c, src/reader.c:
17499 entered into RCS
17500
175011994-05-05 David J. MacKenzie <djm@gnu.org>
17502
17503 * Makefile.in: entered into RCS
17504
175051994-03-26 Richard Stallman <rms@gnu.org>
17506
17507 * src/bison.s1: entered into RCS
17508
175091994-03-26 Richard Stallman <rms@gnu.org>
17510
17511 * bison.simple: entered into RCS
17512
175131994-03-25 Richard Stallman <rms@gnu.org>
17514
17515 * src/main.c: entered into RCS
17516
175171994-03-24 Richard Stallman <rms@gnu.org>
17518
17519 * src/conflicts.c: entered into RCS
17520
175211994-01-02 Richard Stallman <rms@gnu.org>
17522
17523 * Makefile.in: *** empty log message ***
17524
175251993-11-21 Richard Stallman <rms@gnu.org>
17526
17527 * src/bison.s1: *** empty log message ***
17528
175291993-11-21 Richard Stallman <rms@gnu.org>
17530
17531 * doc/bison.texinfo: entered into RCS
17532
17533 * doc/bison.texinfo: *** empty log message ***
17534
175351993-11-21 Richard Stallman <rms@gnu.org>
17536
17537 * bison.simple: *** empty log message ***
17538
175391993-10-25 David J. MacKenzie <djm@gnu.org>
17540
17541 * doc/bison.texinfo: *** empty log message ***
17542
175431993-10-19 Richard Stallman <rms@gnu.org>
17544
17545 * src/bison.s1: *** empty log message ***
17546
175471993-10-19 Richard Stallman <rms@gnu.org>
17548
17549 * bison.simple: *** empty log message ***
17550
175511993-10-14 Richard Stallman <rms@gnu.org>
17552
17553 * src/bison.s1: *** empty log message ***
17554
175551993-10-14 Richard Stallman <rms@gnu.org>
17556
17557 * bison.simple: *** empty log message ***
17558
175591993-09-14 David J. MacKenzie <djm@gnu.org>
17560
17561 * doc/bison.texinfo: *** empty log message ***
17562
175631993-09-13 Noah Friedman <friedman@gnu.org>
17564
17565 * Makefile.in: *** empty log message ***
17566
175671993-09-10 Richard Stallman <rms@gnu.org>
17568
17569 * src/conflicts.c: *** empty log message ***
17570
17571 * src/system.h: entered into RCS
17572
175731993-09-10 Richard Stallman <rms@gnu.org>
17574
17575 * doc/bison.1: entered into RCS
17576
175771993-09-06 Noah Friedman <friedman@gnu.org>
17578
17579 * src/version.c: entered into RCS
17580
175811993-09-06 Noah Friedman <friedman@gnu.org>
17582
17583 * Makefile.in: *** empty log message ***
17584
175851993-07-30 David J. MacKenzie <djm@gnu.org>
17586
17587 * Makefile.in: *** empty log message ***
17588
175891993-07-24 Richard Stallman <rms@gnu.org>
17590
17591 * src/bison.s1: *** empty log message ***
17592
175931993-07-24 Richard Stallman <rms@gnu.org>
17594
17595 * bison.simple: *** empty log message ***
17596
175971993-07-08 David J. MacKenzie <djm@gnu.org>
17598
17599 * Makefile.in: *** empty log message ***
17600
176011993-07-04 Richard Stallman <rms@gnu.org>
17602
17603 * src/bison.s1: *** empty log message ***
17604
176051993-07-04 Richard Stallman <rms@gnu.org>
17606
17607 * bison.simple: *** empty log message ***
17608
176091993-06-26 David J. MacKenzie <djm@gnu.org>
17610
17611 * src/getargs.c: entered into RCS
17612
176131993-06-26 David J. MacKenzie <djm@gnu.org>
17614
17615 * doc/bison.texinfo: *** empty log message ***
17616
17617 * doc/bison.1: New file.
17618
176191993-06-25 Richard Stallman <rms@gnu.org>
17620
17621 * src/getargs.c: New file.
17622
176231993-06-16 Richard Stallman <rms@gnu.org>
17624
17625 * src/bison.s1: *** empty log message ***
17626
176271993-06-16 Richard Stallman <rms@gnu.org>
17628
17629 * bison.simple: *** empty log message ***
17630
176311993-06-03 Richard Stallman <rms@gnu.org>
17632
17633 * src/bison.s1: New file.
17634
176351993-06-03 Richard Stallman <rms@gnu.org>
17636
17637 * doc/bison.texinfo: *** empty log message ***
17638
176391993-06-03 Richard Stallman <rms@gnu.org>
17640
17641 * bison.simple: New file.
17642
176431993-05-19 Richard Stallman <rms@gnu.org>
17644
17645 * doc/bison.texinfo: New file.
17646
176471993-05-07 Noah Friedman <friedman@gnu.org>
17648
17649 * Makefile.in: *** empty log message ***
17650
176511993-04-28 Noah Friedman <friedman@gnu.org>
17652
17653 * src/reader.c: *** empty log message ***
17654
176551993-04-23 Noah Friedman <friedman@gnu.org>
17656
17657 * src/alloc.h: entered into RCS
17658
176591993-04-20 David J. MacKenzie <djm@gnu.org>
17660
17661 * src/version.c: *** empty log message ***
17662
17663 * src/files.c, src/allocate.c:
17664 entered into RCS
17665
17666 * src/reader.c: *** empty log message ***
17667
17668 * src/lex.c: entered into RCS
17669
17670 * src/conflicts.c: New file.
17671
17672 * src/symtab.c: entered into RCS
17673
17674 * src/alloc.h: New file.
17675
17676 * src/LR0.c: entered into RCS
17677
176781993-04-18 Noah Friedman <friedman@gnu.org>
17679
17680 * src/reader.c: New file.
17681
17682 * src/version.c: *** empty log message ***
17683
176841993-04-18 Noah Friedman <friedman@gnu.org>
17685
17686 * Makefile.in: *** empty log message ***
17687
176881993-04-17 Noah Friedman <friedman@gnu.org>
17689
17690 * Makefile.in: *** empty log message ***
17691
176921993-04-15 Richard Stallman <rms@gnu.org>
17693
17694 * src/main.c, src/files.c:
17695 New file.
17696
176971993-04-15 Noah Friedman <friedman@gnu.org>
17698
17699 * configure.in: entered into RCS
17700
17701 * configure.in: *** empty log message ***
17702
17703 * configure.in: New file.
17704
177051993-04-14 Richard Stallman <rms@gnu.org>
17706
17707 * Makefile.in: New file.
17708
177091993-04-13 Richard Stallman <rms@gnu.org>
17710
17711 * src/version.c: New file.
17712
177131993-03-25 Richard Stallman <rms@gnu.org>
17714
17715 * src/output.c: entered into RCS
17716
177171992-09-25 Richard Stallman <rms@gnu.org>
17718
17719 * configure.bat: entered into RCS
17720
177211992-06-22 Richard Stallman <rms@gnu.org>
17722
17723 * src/vmsgetargs.c: entered into RCS
17724
177251992-06-22 Richard Stallman <rms@gnu.org>
17726
17727 * doc/bison.rnh: entered into RCS
17728
177291992-04-20 David J. MacKenzie <djm@gnu.org>
17730
17731 * README: entered into RCS
17732
177331992-01-22 Richard Stallman <rms@gnu.org>
17734
17735 * src/machine.h: entered into RCS
17736
177371991-12-21 Richard Stallman <rms@gnu.org>
17738
17739 * src/lalr.c, src/closure.c:
17740 entered into RCS
17741
177421991-12-20 Richard Stallman <rms@gnu.org>
17743
17744 * src/state.h: entered into RCS
17745
177461991-12-18 Richard Stallman <rms@gnu.org>
17747
17748 * src/print.c, src/nullable.c, src/derives.c:
17749 entered into RCS
17750
177511991-11-03 David J. MacKenzie <djm@gnu.org>
17752
17753 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17754 entered into RCS
17755
177561988-09-09 Richard Stallman <rms@gnu.org>
17757
17758 * src/bison.hairy: entered into RCS
17759
177601987-12-16 Richard Stallman <rms@gnu.org>
17761
17762 * REFERENCES: entered into RCS
17763
17764
17765 -----
17766
17767 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17768 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17769 Software Foundation, Inc.
17770
17771 Copying and distribution of this file, with or without
17772 modification, are permitted provided the copyright notice and this
17773 notice are preserved.
17774
17775$Id$