]> git.saurik.com Git - bison.git/blame - ChangeLog
* data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
[bison.git] / ChangeLog
CommitLineData
8def5cd0
JD
12006-12-08 Bob Rossi <bob@brasko.net>
2
3 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
4 Rename to...
5 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6 update all uses.
7 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8 (yypush_parse): Rename yypvars argument to yyps and remove redundant
9 local pv.
10 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
11 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
12
ea17f233
JD
132006-12-07 Bob Rossi <bob@brasko.net>
14 and Joel Denny <jdenny@ces.clemson.edu>
15
16 * data/push.c (yypvarsinit): Change return type from void* to struct
17 yypvars*. No longer cast to void* on return.
18 (struct yypvars): Remove yylen since it need not be remembered between
19 yypushparse invocations.
20 (yypushparse): Don't copy between yylen and pv->yylen.
21
55a30bda
JD
222006-12-05 Bob Rossi <bob@brasko.net>
23
24 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
25 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
26 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
27 (struct yypvars): Remove b4_declare_parser_variables.
28 (yypvarsinit): Remove init code for removed variables.
29 (global scope): Do not declare b4_declare_parser_variables if
30 push or pure mode.
31 (yypushparse): Add b4_declare_parser_variables.
32 Init new local variables, and remove init code for removed
33 yypvars variables.
34 (yyparse): Delete.
35 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
36 and yyparse for other modes.
37 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
38 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
39 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
40 (AT_PURE_LEX_IF): True if pure or push parser.
41
85894313
JD
422006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
43
44 Document Yacc prologue alternatives and default %destructor's and
45 %printer's as experimental. Don't mention Java yet. Discussed at
46 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
47 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
48 (2.3a): Annotate this entry to say the old forms of these features were
49 also experimental.
50 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
51 Bison Symbols): Say they're experimental. Comment out any mention
52 of Java (we'll want this back eventually).
53
02975b9a
JD
542006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
55
56 Support a file name argument to %defines. Deprecate `=' in
57 %file-prefix, %name-prefix, and %output. Discussed at
58 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
59 * NEWS (2.3a+): Mention.
60 * doc/bison.texinfo (Decl Summary, Bison Symbols): Add entry for new
61 form of %defines, and remove `=' from entries for %file-prefix,
62 %name-prefix, and %output.
63 * src/parse-gram.y (prologue_declaration): Implement.
64 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
65 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
66 all but one occurrence of %name-prefix.
67 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
68 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
69 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
70 occurrence of each of %file-prefix and %output. Add check for %defines
71 with argument.
72 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
73 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
74 Remove the `=' from %output.
75
287b314e
JD
762006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
77
78 Don't escape $ in test case titles since Autoconf 2.61 now does that
79 correctly.
80 * tests/actions.at (Default %printer and %destructor are not for error
81 or $undefined): Here.
82 (Default %printer and %destructor are not for $accept): Here.
83 * tests/input.at (Invalid $n and @n): Here.
84
3ebecc24
JD
852006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
86
87 Rename <!> to <>. Discussed starting at
88 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
89 * NEWS (2.3a+): Update.
90 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
91 Update.
92 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
93 * src/scan-gram.l (INITIAL): Implement.
94 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
95 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
96 comment.
97 * tests/actions.at (Default tagless %printer and %destructor,
98 Default tagged and per-type %printer and %destructor,
99 Default %printer and %destructor are not for error or $undefined,
100 Default %printer and %destructor are not for $accept,
101 Default %printer and %destructor for mid-rule values): Update.
102 * tests/input.at (Default %printer and %destructor redeclared,
103 Unused values with default %destructor): Update.
104
26b8a438
JD
1052006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
106
107 Don't let %prec take a nonterminal.
108 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
109 token.
110 * tests/input.at (%prec takes a token): New test checking that %prec
111 won't take a nonterminal.
112
07c39ae9
JD
1132006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
114
405d53b7
JD
115 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
116 it was double-quoted.
07c39ae9
JD
117 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
118 grammar is maintained with Bison's highest standards.
119 * src/getargs.c: Fix some typos in Doxygen comments.
120
580b8926
JD
1212006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
122
123 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
124 later. Reported by Paul Eggert in
125 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
126 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
127 * src/scan-code.l (translate_action): Don't bother invoking
128 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
129 (code_scanner_free): Instead of invoking
130 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
131 which frees more.
132 * src/scan-gram.l (gram_scanner_free): Likewise.
133 * src/scan-skel.l (scan_skel): Likewise.
134
4502eadc
JD
1352006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
136
137 * src/files.c (tr): Change return type to void.
138 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
139 has been called previously for the same key.
140 (muscle_find): Return storage instead of value so that
141 --enable-gcc-warnings doesn't produce warnings that the return discards
142 const. aver that the value and storage are the same since storage
143 could potentially be NULL when value is not.
144 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
145 same as 0.
146
7746c8f6
PE
1472006-11-08 Paul Eggert <eggert@cs.ucla.edu>
148
149 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
150 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
151 us a slightly cleaner distribution, and also works.
152 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
153 gnulib changes.
154
eb095650
PE
1552006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
156 and Paul Eggert <eggert@cs.ucla.edu>
157
158 Don't let Bison leak memory except when it complains.
159 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
160 (spec_defines_file, dir_prefix): Now char *, not const char *,
161 since they are freed.
162 * src/files.c: Likewise.
163 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
164 Likewise.
165 (tr): Now operates in-place. All uses changed.
166 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
167 values.
168 (compute_file_name_parts, compute_output_file_names): Don't store
169 read-only data in variables that will be freed.
170 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
171 src_extension, and header_extension.
172 (output_file_names_free): New public function to free
173 spec_verbose_file, spec_graph_file, spec_defines_file,
174 parser_file_name, and dir_prefix.
175 * src/getargs.c (getargs): Don't store read-only data in variables that
176 will be freed.
177 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
178 (which previously existed but was unused), and quotearg_free.
179 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
180 * src/muscle_tab.c: Likewise.
181 (muscle_entry): Make the value char const *,
182 and add a new storage member that is char * and can be freed.
183 (muscle_entry_free): New private function.
184 (muscle_init): Use it instead of free.
185 (muscle_insert, muscle_grow): Update and use new storage member.
186 (muscle_code_grow): Free the string passed to muscle_grow
187 since it's not needed anymore.
188 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
189 add a new `char *code' member.
190 ("{...}"): Declare semantic type as code.
191 * src/scan-code.h (translate_rule_action):
192 (translate_symbol_action, translate_code, translate_action): Return
193 `char const *' rather than `char *' since external code should not free
194 these strings.
195 * src/scan-code.l: Likewise.
196 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
197 which is "{...}" in the parser.
198 * tests/Makefile.am (maintainer-check-valgrind): Set
199 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
200 Valgrind.
201 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
202 complain.
203 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
204 expecting a non-zero exit status sets --leak-check=summary and
205 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
206 this case, and we don't want to hear about it.
207
ac564be4
PE
2082006-11-08 Paul Eggert <eggert@cs.ucla.edu>
209
210 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
211 instead of from the template, to simplify configuration a bit.
212 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
213 and m4/wint_t.m4, as they are needed with the latest gnulib.
214
17bd8a73
JD
2152006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
216
217 Disable unset/unused mid-rule value warnings by default, and recognize
218 --warnings=midrule-values to enable them. Discussed starting at
219 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
220 * NEWS (2.3a+): Mention.
221 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
222 warnings): Add entry for midrule-values subargument.
223 * src/reader.c (symbol_should_be_used): Don't return true just because
224 the value is a set/used mid-rule value unless
225 --warnings=midrule-values was specified.
226 * tests/input.at (Unused values, Unused values before symbol
227 declarations): Run tests with and without --warnings=midrule-values.
228
229 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
230 than LIST_FREE directly.
231
89eb3c76
JD
2322006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
233
234 Finish implementing --warnings=error, which should not be implied by
235 --warnings=all (or by its synonyms -W and --warnings without
236 subarguments).
237 * src/complain.c (set_warning_issued): New function to report that
238 warnings are being treated as errors and to record an error if so.
239 Invoke...
240 (warn_at, warn): ... here.
241 * src/getargs.c (warnings_args, warnings_types): Reorder so that
242 "error - warnings are errors" does not appear above "all - all of the
243 above".
244 (getargs): For -W and --warnings without subarguments, don't let
245 FLAGS_ARGMATCH set warnings_error in warnings_flag.
246 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
247
ba7560e2
JD
2482006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
249
250 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
251 empty subargument list. For example: `bison --warnings= parser.y'.
252
31283fc3
JD
2532006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
254
255 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
256 the parser header file so that gcc doesn't warn.
257
12e35840
JD
2582006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
259
260 Split the default %destructor/%printer into two kinds: <*> and <!>.
261 Discussed starting at
262 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
263 * NEWS (2.3a+): Mention.
264 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
265 previous change today related to mid-rules.
266 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 267 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
268 (TYPE_TAG_ANY): Add as <*>.
269 (TYPE_TAG_NONE): Add as <!>.
270 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
271 for <*> and <!>.
272 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
273 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
274 * src/symlist.c (symbol_list_default_new): Split into tagged and
275 tagless versions.
276 (symbol_list_destructor_set, symbol_list_printer_set): Split
277 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
278 SYMLIST_DEFAULT_TAGLESS.
279 * src/symlist.h: Update symbol_list_default*_new prototypes.
280 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
281 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
282 * src/symtab.c (default_destructor, default_destructor_location,
283 default_printer, default_printer_location): Split each into tagged and
284 tagless versions.
285 (symbol_destructor_get, symbol_destructor_location_get,
286 symbol_printer_get, symbol_printer_location_get): Implement tagged
287 default and tagless default cases.
288 (default_destructor_set, default_printer_set): Split each into tagged
289 and tagless versions.
290 * src/symtab.h: Update prototypes.
291 * tests/actions.at (Default %printer and %destructor): Rename to...
292 (Default tagless %printer and %destructor): ... this, and extend.
293 (Per-type %printer and %destructor): Rename to...
294 (Default tagged and per-type %printer and %destructor): ... this, and
295 extend.
296 (Default %printer and %destructor for user-defined end token): Extend.
297 (Default %printer and %destructor are not for error or $undefined):
298 Update.
299 (Default %printer and %destructor are not for $accept): Update.
300 (Default %printer and %destructor for mid-rule values): Extend.
301 * tests/input.at (Default %printer and %destructor redeclared): Extend.
302 (Unused values with default %destructor): Extend.
303
f91b1629
JD
3042006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
305
306 Don't apply the default %destructor/%printer to an unreferenced midrule
307 value. Mentioned at
308 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
309 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
310 like $@n instead of just @n so that the default %destructor/%printer
311 logic doesn't see them as user-defined symbols.
312 (symbol_is_dummy): Check for both forms of the name.
313 * src/reader.c (packgram): Remove the `$' from each midrule symbol
314 name for which the midrule value is referenced in any action.
315 * tests/actions.at (Default %printer and %destructor for mid-rule
316 values): New test.
317 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
318 for change to dummy symbol names.
319
519d0004
JD
3202006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
321
322 Warn about unset midrule $$ if the corresponding $n is used.
323 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
324 $n usage.
325 (packgram): Before invoking grammar_rule_check on any rule, make sure
326 all actions have already been scanned in order to set `used' flags.
327 Otherwise, checking that a midrule's $$ is set will not always work
328 properly because the midrule check must forward-reference the midrule's
329 parent rule.
330 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
331 warning.
332
a501eca9
JD
3332006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
334
335 More improvements to the documentation of the prologue alternatives:
336 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
337 Bison manual.
338 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
339 some text to clarify the relative importance of the new directives and
340 to show how these directives may be viewed as code labels.
341
2cbe6b7f
JD
3422006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
343
344 Similar to the recently removed %before-header, add %code-top as the
345 alternative to the pre-prologue. Mentioned at
346 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
347 Also, let the prologue alternatives appear in the grammar section.
348 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
349 (prologue_declaration): Move the existing prologue alternatives to...
350 (grammar_declaration): ... here and add %code-top.
351 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
352
353 Clean up and extend documentation for the prologue alternatives.
354 * NEWS (2.3a+): Describe prologue alternatives.
355 * doc/bison.texinfo (Prologue): Move discussion of prologue
356 alternatives to...
357 (Prologue Alternatives): ... this new section, and extend it to discuss
358 all 4 directives in detail.
359 (Bison Symbols): Clean up discussion of prologue alternatives and add
360 %code-top.
361
e557d3ea
JMG
3622006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
363
364 DJGPP specific issues.
365
366 * djgpp/config.bat: config.hin has been moved to lib. Adjust
367 config.bat accordingly.
368 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
369 * djgpp/config.site: Likewise.
370
136a0f76
PB
3712006-10-16 Paolo Bonzini <bonzini@gnu.org>
372
27bd5d67
PB
373 Replace %*-header with %provides, %requires, %code. See discussion at
374 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
375
136a0f76
PB
376 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
377 (b4_user_start_header): Remove.
378 * data/glr.c: Use new macros instead of b4_*start_header
379 and b4_*end_header.
380 * data/glr.cc: Likewise.
381 * data/lalr1.cc: Likewise.
382 * data/push.c: Likewise.
383 * data/yacc.c: Likewise.
384
385 * doc/bison.texinfo: Remove %before-header, rename
386 %{start,end,after}-header to %requires, %provides, %code.
387
388 * src/parse-gram.y: Likewise (also rename token names accordingly).
389 * src/scan-gram.l: Likewise.
390 * tests/actions.at: Likewise.
391
10f429ef
PE
3922006-10-14 Paul Eggert <eggert@cs.ucla.edu>
393
394 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
395 Problem reported by Joel E. Denny.
396
3972006-10-14 Jim Meyering <jim@meyering.net>
398
399 (Sync from coreutils.)
400 Work also when the working directory (with e.g. coreutils sources)
401 is version controlled with git, rather than CVS.
402 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
403 rather than CVS.
404 In messages and comments, say e.g., "checked-out sources",
405 rather than "CVS sources".
406 (version_controlled_file): New function. Work for git as well as
407 for CVS. Don't use grep's -q option.
408 (slurp): Call it here, in place of CVS-specific code.
409
c4bd5bf7
JD
4102006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Fix testsuite for ./configure --enable-gcc-warnings:
413 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
414 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
415 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
416 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
417 * test/regression.at (Diagnostic that expects two alternatives):
418 Likewise.
419
46356ea4
PE
4202006-10-12 Paul Eggert <eggert@cs.ucla.edu>
421
231ed89a
PE
422 * bootstrap.conf (gnulib_modules): Add config-h.
423 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
424 worry about HAVE_CONFIG_H.
425 * lib/abitset.c: Likewise.
426 * lib/bitset.c: Likewise.
427 * lib/bitset_stats.c: Likewise.
428 * lib/bitsetv-print.c: Likewise.
429 * lib/bitsetv.c: Likewise.
430 * lib/ebitset.c: Likewise.
431 * lib/get-errno.c: Likewise.
432 * lib/lbitset.c: Likewise.
433 * lib/subpipe.c: Likewise.
434 * lib/timevar.c: Likewise.
435 * lib/vbitset.c: Likewise.
436 * lib/bitset.c: Include "bitset.h" first, to test interface.
437 * lib/bitset_stats.c: Include "bitset_stats.h" first.
438 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
439 * lib/bitsetv.c: Include "bitsetv.h" first.
440 * lib/get-errno.c: Include "get-errno.h" first.
441 * m4/.cvsignore: Add config-h.m4.
442 * tests/actions.at (Default %printer and %destructor for ...):
443 Adjust expected line numbers in output to reflect removal of #if
444 HAVE_CONFIG_H lines.
445 * tests/glr-regression.at (Missed %merge type warnings when ...):
446 Likewise.
447 * tests/regression.at (Braced code in declaration in rules section):
448 Likewise.
449 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
450 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
451 Include <config.h> unconditionally.
452
46356ea4
PE
453 * bootstrap: Sync from coreutils, as follows:
454
455 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
456
457 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
458 variable was sometimes used without being initialized. This
459 messed up the installation of the INSTALL file in some cases.
460
461 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
462
463 * bootstrap (usage, main program, symlink_to_gnulib): Add option
464 --copy. Inspired by a suggestion from Bruno Haible.
465
466 2006-10-03 Jim Meyering <jim@meyering.net>
467
468 * bootstrap: Undo last change to this file, since now gnulib-tool
469 sticks with the automake default in generating dependencies.
470
dd4bf078
PE
4712006-10-12 Paul Eggert <eggert@cs.ucla.edu>
472
cf2a5f7c
PE
473 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
474 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
475
476 * doc/bison.1: Add copyright notice.
477
478 * data/glr.c: Don't include <stdarg.h>; not used.
479
35fe0834
PE
480 * NEWS: The -g and --graph options now output graphs in Graphviz
481 DOT format, not VCG format.
482 * doc/bison.1: Likewise.
483 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
484 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
485 of this change in
486 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
487 * TODO: Remove Graphviz entry.
488 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
489 remove vcg.c, vcg.h, vcg_defaults.h.
490 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
491 * src/graphviz.c, src/graphviz.h: New files.
492 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
493 * src/files.h: Make comment more generic.
494 * src/main.c (main): Likewise.
495 * src/print_graph.h: Likewise.
496 * src/getargs.c (usage): Make usage description more generic.
497 * src/print_graph.c: Include graphviz.h rather than vcg.h.
498 (static_graph, fgraph): Remove. All uses changed to pass
499 arguments instead of sharing a static var.
500 (print_core, print_actions, print_state, print_graph):
501 Output graphviz format rather than VCG format.
502 * tests/.cvsignore: Remove *.vcg; add *.dot.
503 * tests/output.at: Expect *.dot files, not *.vcg files.
504
dd4bf078
PE
505 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
506 accommodates the 2006-10-08 change.
507
efdd7421
PE
5082006-10-11 Bob Rossi <bob@brasko.net>
509
510 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
511 (b4_yyssa, b4_yyerror_range): New macros.
512 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
513 (yypvarsinit): Remove init of removed fields.
514 (yypushparse): Remove use of removed fields; use new macros instead.
515
96a1981a
PE
5162006-10-11 Paul Eggert <eggert@cs.ucla.edu>
517
518 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
519 in a push parser. Reindent slightly to match yacc.c better.
520
5212006-10-11 Bob Rossi <bob@brasko.net>
522
46356ea4
PE
523 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
524 yymsg_alloc fields.
525 (yypvarsinit, yypushparse): Remove init of removed fields.
526 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 527
c1630a8b
PE
5282006-10-09 Paul Eggert <eggert@cs.ucla.edu>
529
530 * THANKS: Add Paolo Bonzini and Bob Rossi.
531
90b9908d
PB
5322006-10-08 Paolo Bonzini <bonzini@gnu.org>
533
534 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
535 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
536 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
537 b4_define_user_cde and uses): Remove.
538 (b4_comment, b4_prefix, b4_sync_start): New.
539 * data/bison.m4: New file, with most of the content removed from c.m4.
540 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
541 * src/output.c (output_skeleton): Pass bison.m4.
542 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
543 only if specified.
544
cf806753
PE
5452006-10-05 Paul Eggert <eggert@cs.ucla.edu>
546
547 Fix test failure reported by Tom Lane in
548 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
549 and try to make such failures easier to catch in the future.
550 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
551 that's now the caller's responsibility.
552 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
553 Set yychar = YYEOF if it's negative.
554 * tests/actions.at (yylex): Abort if asked to read past EOF.
555 * tests/conflicts.at (yylex): Likewise.
556 * tests/cxx-type.at (yylex): Likewise.
557 * tests/glr-regression.at (yylex): Likewise.
558 * tests/input.at (yylex): Likewise.
559 * tests/regression.at (yylex): Likewise.
560 * tests/torture.at (yylex): Likewise.
561
0e2f006a
PE
5622006-10-01 Paul Eggert <eggert@cs.ucla.edu>
563
564 Fix problems with translating English-language diagnostics.
565 * bootstrap: Fix bug introduced in recent bootstrap changes, with
566 respect to bison-runtime pot generation. The YY_ stuff
567 wasn't being captured.
568 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
569 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
570 * runtime-po/POTFILES.in: Add data/push.c.
571
e3ddc1e3
PE
5722006-09-29 Paul Eggert <eggert@cs.ucla.edu>
573
574 Merge bootstrap changes from coreutils.
575
576 2006-09-28 Jim Meyering <jim@meyering.net>
577
578 Automatically generated dependencies are important even
579 when all of the sources in a directory come from gnulib.
580 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
581 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
582
583 2006-09-23 Jim Meyering <jim@meyering.net>
584
585 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
586
587 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
588
589 * bootstrap: Add support for --force.
590 (usage): New function. Describe usage less tersely.
591 (CVS_only_file): New var.
592
01e972b3
PE
5932006-09-21 Paul Eggert <eggert@cs.ucla.edu>
594
595 * data/push.c (YYPUSH_MORE): Make it an enum instead.
596 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
597 Adjust white space and comments to match GNU style better.
598
c63d3e90
PE
5992006-09-20 Bob Rossi <bob@brasko.net>
600
601 * data/push.c (yyresult_get): Remove function.
602 (YYPUSH_MORE): Add #define.
603 (yypushparse): Modify return value.
604
e70f46d1
PE
6052006-09-20 Paul Eggert <eggert@cs.ucla.edu>
606
607 * stamp-h.in: Remove; no longer needed.
608 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
609 Remove config.h, config.hin, intl (no longer created).
610 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
611 stamp-h1.
612
613 Sync bootstrap from coreutils, as follows:
614
615 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
616
617 * bootstrap (symlink_to_gnulib): New function.
618 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
619 to copies-of-gnulib.
620 (cp_mark_as_generated, slurp, gnulib_files):
621 Avoid making a copy if it's the same as the old version.
622 (gnulib_files): Add support for this variable (used by Bison).
623
a92be413
PE
6242006-09-20 Paul Eggert <eggert@cs.ucla.edu>
625
626 * src/getargs.c (usage): Rework to use conventions similar to
627 coreutils, to make translation a bit easier and the code a bit
628 smaller. Problem reported by Tim Van Holder.
629
4f82b42a
PE
6302006-09-15 Paul Eggert <eggert@cs.ucla.edu>
631
3b2942e6
PE
632 Use some of gnulib's new modules, taken from coreutils.
633
634 * bootstrap: Sync from coreutils, except add support for gnulib_files.
635 * bootstrap.conf: New file.
636 (gnulib_modules): Add configmake, inttypes, unistd.
637 (XGETTEXT_OPTIONS): Add complain, complain_at,
638 fatal, fatal_at, warn, warn_at, unexpected_end.
639 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
640 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
641 (gl_EARLY): Add.
642 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
643 (gl_INIT): Add
644 (GNULIB_AUTOCONF_SNIPPET): Remove.
645 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
646 the pickiest.
647 * lib/.cvsignore: Add inttypes_.h.
648 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
649 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
650 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
651 no-longer-necessary initializations.
652 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
653 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
654 use the unistd module.
655 * src/system.h: Likewise.
656 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
657 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
658 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
659 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
660 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
661 * src/system.h: Include inttypes.h unconditionally, now that we
662 use the inttypes module. Don't bother to include stdint.h, since
663 inttypes.h now does that for us.
664 (LOCALEDIR): Remove, now that we use the configmake module.
665 * src/getargs.c: Include configmake.h.
666 * src/main.c: Likewise.
667 * src/output.c: Likewise.
668 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
669 not from $abs_top_builddir, since config.h moved.
670
671
4f82b42a
PE
672 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
673 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
674
675 * src/parse-gram.y (symbol_declaration): Don't put statements
676 before declarations; it's not portable to C89.
677 * src/scan-code.l (handle_action_at): Likewise.
678
679 * src/scan-code.l: Always initialize braces_level; the old code
680 left it uninitialized and therefore had undefined behavior.
681
682 Don't attempt to redefine 'assert', since it runs afoul of
683 systems where standard headers (mistakenly) include <assert.h>.
684 Instead, define and use our own alternative, called 'aver'.
685 * src/reader.c: Don't include assert.h, since we no longer
686 use assert.
687 * src/scan-code.l: Likewise.
688 * src/system.h (assert): Remove, replacing with....
689 (aver): New function, taking a bool arg. All uses changed.
690 * src/tables.c (pack_vector): Ensure that aver arg is bool,
691 not merely an integer.
692
31c10e38
PE
6932006-09-15 Bob Rossi <bob@brasko.net>
694
695 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
696 * data/c.m4 (YYPUSH): New.
697 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
698 * src/getargs.c (push_parser): New var.
699 * src/getargs.h (push_parser): New declaration.
700 * src/output.c (prepare): Add macro insertion of `push_flag'.
701 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
702 (prologue_declaration): Parse %push-parser.
703 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
704 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
705 list of removed lines from the traces observed.
706 (AT_CHECK_CALC_LALR): Added push parser tests.
707
fa7b79c0
PE
7082006-09-13 Paul Eggert <eggert@cs.ucla.edu>
709
21fe08ca
PE
710 * NEWS: Version 2.3a.
711 * configure.ac (AC_INIT): Likewise.
712
e8ec4d9b
PE
713 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
714 "#define YYSTYPE int" that caused "make maintainer-check" to fail
715 due to header ordering dependencies. I don't know why the #define
716 was there.
717
fa7b79c0
PE
718 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
719 runtime cost when YYDEBUG is not defined, and so that some tests
720 that used to fail now work. Problem and initial suggestion by
721 Paolo Bonzini.
722 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
723 * data/glr.cc (b4_parser_class_name):
724 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
725 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
726 (yydebug_) [YYDEBUG]: New member.
727 (yycdebug_): Now defined only if YYDEBUG.
728 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
729 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
730 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
731 if YYYDEBUG.
732 (debug_stream, set_debug_stream, debug_level, set_debug_level):
733 Define only if YYDEBUG.
734 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
735 set_debug_level.
736 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
737 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
738 AT_CHECK_CALC_GLR_CC that are working now.
739
4ec13d60
PE
7402006-09-12 Paul Eggert <eggert@cs.ucla.edu>
741
742 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
743 We don't need them in glr.cc, and glr.c defines them.
744 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
745 assumes that defining it to anything is the same as defining
746 it to 1. Problem reported by Paolo Bonzini.
747
8e1687ae
PE
7482006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
749
750 * data/c.m4 (b4_null, b4_case): Define.
751 * src/output.c (prepare_symbols): Use b4_null.
752 (user_actions_output): Use b4_case.
753
3dc5e96b
PE
7542006-09-11 Paul Eggert <eggert@cs.ucla.edu>
755
aef3da86
PE
756 * data/glr.c (b4_shared_declarations): Put start-header first,
757 before any #includes that we generate, so that feature-test
758 macros work. Problem reported by Michael Deutschmann in
759 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
760 * data/lalr1.cc: Likewise.
761 * doc/bison.texinfo (Prologue): Document that feature-test macros
762 should be defined before any Bison declarations.
763 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
764 that depend on location.hh after, not before, Bison decls, since
765 we now include location.hh after the first user prologue.
766
3dc5e96b
PE
767 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
768 Sander Brandenburg in
769 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
770 Also, fix minor white space and comment issues.
aef3da86
PE
771 (Prologue): Mention that it's better to define feature-test macros
772 before Bison declarations. Problem reported by Michael Deutschmann.
773
774 * README-cvs: Fix typo: "&" should be "&&". Problem reported
775 by Jim Meyering.
776 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
777 This adjusts to recent gnulib changes.
3dc5e96b 778
b2a0b7ca
JD
7792006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
780
781 Finish implementation of per-type %destructor/%printer. Discussed
782 starting at
783 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
784 and
785 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
786 * NEWS (2.3+): Add a description of this feature to the default
787 %destructor/%printer description.
788 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
789 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
790 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
791 list node contains a semantic type.
792 * src/symtab.c, src/symtab.h: Extend with a table that associates
793 semantic types with their %destructor's and %printer's.
794 (semantic_type_from_uniqstr, semantic_type_get,
795 semantic_type_destructor_set, semantic_type_printer_set): New functions
796 composing the public interface of that table.
797 (symbol_destructor_get, symbol_destructor_location_get,
798 symbol_printer_get, symbol_printer_location_get): If there's no
799 per-symbol %destructor/%printer, look up the per-type before trying
800 the default.
801 * tests/actions.at (Per-type %printer and %destructor): New test case.
802 * tests/input.at (Default %printer and %destructor redeclared):
803 Extend to check that multiple occurrences of %symbol-default in a
804 single %destructor/%printer declaration is an error.
805 (Per-type %printer and %destructor redeclared, Unused values with
806 per-type %destructor): New test cases.
807
3be03b13
JD
8082006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
809
810 Require default %destructor/%printer to be declared using
811 %symbol-default instead of an empty symbol list, and start working on
812 new per-type %destructor/%printer. Discussed at
813 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
814 * NEWS (2.3+): Add %symbol-default to example.
815 * bison.texinfo (Freeing Discarded Symbols): Likewise.
816 (Bison Symbols): Add entry for %symbol-default.
817 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
818 (generic_symlist, generic_symlist_item): New nonterminals for creating
819 a list in which each item is a symbol, semantic type, or
820 %symbol-default.
821 (grammar_declaration): Use generic_symlist in %destructor and %printer
822 declarations instead of symbols.1 or an empty list.
823 (symbol_declaration, precedence_declaration, symbols.1): Update actions
824 for changes to symbol_list.
825 * src/reader.c: Update for changes to symbol_list.
826 * src/scan-code.l: Likewise.
827 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
828 * src/symlist.c, src/symlist.h: Extend such that a list node may
829 represent a semantic type or a %symbol-default in addition to just an
830 ordinary symbol. Add switched functions for setting %destructor's and
831 %printer's.
832 * tests/actions.at, tests/input.at: Add %symbol-default to all default
833 %destructor/%printer declarations.
834
3508ce36
JD
8352006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
836
837 Whether the default %destructor/%printer applies to a particular symbol
838 isn't a question of whether the user *declares* that symbol (in %token,
839 for example). It's a question of whether the user by any means
840 *defines* the symbol at all (by simply using a char token, for
841 example). $end is defined by Bison whereas any other token with token
842 number 0 is defined by the user. The error token is always defined by
843 Bison regardless of whether the user declares it with %token, but we
844 may one day let the user define error as a nonterminal instead.
845 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
846 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
847 the meaning of "user-defined".
848 * tests/actions.at (Default %printer and %destructor for user-declared
849 end token): Rename to...
850 (Default %printer and %destructor for user-defined end token): ...
851 this.
852
853 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
854 computation of whether to apply the default, don't maintain a list of
855 every Bison-defined symbol. Instead, just check for a first character
856 of '$', which a user symbol cannot have, and check for the error token.
857
9350499c
JD
8582006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
859
860 Don't apply the default %destructor or %printer to the error token,
861 $undefined, or $accept. This change fits the general rule that the
862 default %destructor and %printer are only for user-declared symbols,
863 and it solves several difficulties that are described in the new test
864 cases listed below.
865 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
866 * tests/actions.at (Default %printer and %destructor are not for error
867 or $undefined, Default %printer and %destructor are not for $accept):
868 New test cases.
869
4d7370cb
JD
8702006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
871
872 Allow %start after the first rule.
873 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
874 when parsing the first rule.
875 (check_and_convert_grammar): Search for it here after all grammar
876 declarations have been parsed. Skip midrules, which have dummy LHS
877 nonterminals.
878 * src/symtab.c (symbol_is_dummy): New function.
879 * src/symtab.h (symbol_is_dummy): Declare it.
880 * tests/input.at (%start after first rule): New test.
881
6d0ef4ec
JD
8822006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
883
884 Redo some of the previous commit: add back the ability to use
885 non-aliased/undeclared string literals since it might be useful to
886 those declaring %token-table.
887 * src/reader.c (check_and_convert_grammar): Undo changes in previous
888 commit: don't worry about complaints from symbols_pack.
889 * src/symtab.c (symbol_new, symbol_class_set,
890 symbol_check_alias_consistency): Undo changes in previous commit: count
891 each string literal as a new symbol and token, assign it a symbol
892 number, and don't complain about non-aliased string literals.
893 (symbols_pack): Since symbol_make_alias still does not decrement symbol
894 and token counts but does still set aliased tokens to the same number,
895 symbol_pack_processor now leaves empty slots in the symbols array.
896 Remove those slots.
897 * tests/regression.at (Undeclared string literal): Remove test case
898 added in previous commit since non-aliased string literals are allowed
899 again.
900 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
901 remove unnecessary string literal declarations.
902 * tests/sets.at (Firsts): Likewise.
903
965537bc
JD
9042006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
905
906 Don't allow an undeclared string literal, but allow a string literal to
907 be used before its declaration.
908 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
909 symbols_pack complained.
910 * src/symtab.c (symbol_new): Don't count a string literal as a new
911 symbol.
912 (symbol_class_set): Don't count a string literal as a new token, and
913 don't assign it a symbol number since symbol_make_alias does that.
914 (symbol_make_alias): It's not necessary to decrement the symbol and
915 token counts anymore. Don't assume that an alias declaration occurs
916 before any uses of the identifier or string, and thus don't assert that
917 one of them has the highest symbol number so far.
918 (symbol_check_alias_consistency): Complain if there's a string literal
919 that wasn't declared as an alias.
920 (symbols_pack): Bail if symbol_check_alias_consistency failed since
921 symbol_pack asserts that every token has been assigned a symbol number
922 although undeclared string literals have not.
923 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 924 string literal): New test cases.
965537bc
JD
925 (Characters Escapes, Web2c Actions): Declare string literals as
926 aliases.
927 * tests/sets.at (Firsts): Likewise.
928
47aee066
JD
9292006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
930
931 In the grammar scanner, STRING_FINISH unclosed constructs and return
932 them to the parser in order to improve error messages.
933 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
934 SC_BRACED_CODE, SC_PROLOGUE): Implement.
935 * tests/input.at (Unclosed constructs): New test case.
936 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
937 seen.
938
939 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
940 unused global.
941
1f6b3679
JD
9422006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
943
944 Handle string aliases for character tokens correctly.
945 * src/symtab.c (symbol_user_token_number_set): If the token has an
946 alias, check and set its alias's user token number instead of its own,
947 which is set to indicate the alias. Previously, every occurrence of
948 the character token in the grammar overwrote that alias indicator with
949 the character code.
950 * tests/input.at (String aliases for character tokens): New test.
951
219741d8
JD
9522006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
953
954 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
955
11daa4e7
PE
9562006-08-11 Paul Eggert <eggert@cs.ucla.edu>
957
958 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
959 to prevent failures when building on older platforms.
960 Check for autopoint failure.
961 Set XGETTEXT_OPTIONS to values that check for C format strings,
962 so that translators are warned about them (this also helps
963 prevent core dumps).
964
965 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
966 function, since it simplifies our code a bit.
967
968 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
969 rather than -W, so we don't get bogus warnings about sign comparisons.
970 Add -Wpointer-arith, since that warning is useful (it reports code
971 that does not conform to C89 and that some compilers reject).
972 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
973 since it's no longer needed.
974
f9bfc42a
JD
9752006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
976
977 Clean up scanners a bit.
978 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
979 definitions so gcc won't warn when obstack_for_string is unused.
980 * src/scan-code.l: config.h and system.h are already #include'd by
981 scan-code-c.c, so get rid of them here.
982 * src/scan-gram.l: Likewise.
983 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
984 definitions rather than duplicating the rest of it.
985 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
986
06e8700a
JD
9872006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
988
989 Suppress signed/unsigned comparison warnings for yycheck.
990 * data/c.m4 (b4_safest_int_type): New macro.
991 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
992 a signed int type, cast it to b4_safest_int_type first.
993 * data/yacc.c: Likewise.
994 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
995 also overwritten.
996
9c437126
PE
9972006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
998
999 * doc/bison.texinfo: Fix some typos.
1000
284d8a13
PE
10012006-08-02 Paul Eggert <eggert@cs.ucla.edu>
1002
1003 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
1004 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
1005
1006 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
1007 the latest gnulib does this a different way.
1008 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
1009 translation was patched, so stop omitting it.
1010
ec5479ce
JD
10112006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1012
1013 Enable declaration of default %printer/%destructor. Make the parser
1014 use these for all user-declared grammar symbols for which the user does
1015 not declare a specific %printer/%destructor. Thus, the parser uses it
1016 for token 0 if the user declares it but not if Bison generates it as
1017 $end. Discussed starting at
1018 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
1019 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
1020 and
1021 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
1022 * NEWS (2.3+): Mention.
1023 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
1024 declare a %destructor for a mid-rule's semantic value. It's just
1025 impossible to declare one specific to it.
1026 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
1027 code. Describe default %destructor form.
1028 * src/parse-gram.y (grammar_declaration): Parse default
1029 %printer/%destructor declarations.
1030 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
1031 and symbol_destructor_location_get rather than accessing the destructor
1032 and destructor_location members of struct symbol.
1033 (symbol_printers_output): Likewise but for %printer's.
1034 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
1035 again.
1036 * src/symtab.c (default_destructor, default_destructor_location,
1037 default_printer, default_printer_location): New static global
1038 variables to record the default %destructor and %printer.
1039 (symbol_destructor_get, symbol_destructor_location_get,
1040 symbol_printer_get, symbol_printer_location_get): New functions to
1041 compute the appropriate %destructor and %printer for a symbol.
1042 (default_destructor_set, default_printer_set): New functions to set the
1043 default %destructor and %printer.
1044 * src/symtab.h: Prototype all those new functions.
1045 * tests/actions.at (Default %printer and %destructor): New test to
1046 check that the right %printer and %destructor are called, that they're
1047 not called for $end, and that $$ and @$ work correctly.
1048 (Default %printer and %destructor for user-declared end token): New
1049 test to check that the default %printer and %destructor are called for
1050 a user-declared end token.
1051 * tests/input.at (Default %printer and %destructor redeclared, Unused
1052 values with default %destructor): New tests to check related grammar
1053 warnings and errors.
1054
868d2d96
JD
10552006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1056
1057 Clean up handling of %destructor for the end token (token 0).
1058 Discussed starting at
1059 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1060 and
1061 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1062
1063 Make the skeletons consistent in how they pop the end token and invoke
1064 its %destructor.
1065 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1066 state, which has token number 0, since this would invoke the
1067 %destructor for the end token.
1068 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1069 until after shifting the end token, or else it won't be popped.
1070 * data/yacc.c (yyparse): Likewise.
1071
1072 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1073 it's the end token. Upon termination, destroy an unshifted lookahead
1074 even when it's the end token.
1075 * data/lalr1.cc (yy::parser::parse): Likewise.
1076 * data/yacc.c (yyparse): Likewise.
1077
1078 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1079 value warnings for the end token when the user gives the end token a
1080 %destructor.
1081
1082 * tests/actions.at (Printers and Destructors): Test all the above.
1083
62a9592d
PE
10842006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1085
1086 Update to latest gnulib and gettext versions.
1087 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1088 Add fopen-safer.
1089 (gnulib_files): Add m4/warning.m4. Don't worry about files
1090 overwritten by autopoint.
1091 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1092 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1093 rejects them.
1094 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1095 so that we can remove the intl files at a better time.
1096 (intl_files_to_remove): Remove aclocal.m4, since it gets
1097 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1098 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1099 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1100 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1101 Remove datarootdir hack; no longer needed.
1102 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1103 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1104 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1105 strdup.h.
1106 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1107 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1108
10d6970f
PE
11092006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1110
1111 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1112 it with --assume-autoconf='latest-stable'.
1113
50a33993
JD
11142006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1115
1116 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1117 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1118 YYSTYPE' and `{'.
1119 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1120 those from muscle_tab.c since the old ones are misleading.
1121
2ce4ed68
AD
11222006-07-13 Akim Demaille <akim@epita.fr>
1123
1124 Support %define "KEY" {VALUE}.
1125 * src/scan-code.h, src/scan-code.l (translate_action)
1126 (translate_rule_action, translate_symbol_action, translate_code):
1127 Return char *, not const char *.
1128 * src/parse-gram.y (declaration): Rename as...
1129 (prologue_declaration): this.
1130 (string_content): Remove this nonterminal, use STRING.
1131 (braceless, content, content.opt): New nonterminal.
1132 Use them.
1133 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1134 as value.
1135 * src/scan-gram.l (getargs.h): Don't include it.
1136
db7e5eb5
PE
11372006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1138
1139 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1140 rather than a for-loop that declares a local bool variable. This
1141 should work around a compatibility problem with a Cray x1e C++
1142 compiler reported by Hung Nguyen in
1143 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1144 The for-loop was introduced in the 2004-11-17 change but I don't
1145 know why it was needed.
1146
a5d80ba5
AD
11472006-07-12 Akim Demaille <akim@epita.fr>
1148
1149 * data/c.m4: Comment changes.
1150
23eb2a69
AD
11512006-07-10 Akim Demaille <akim@lrde.epita.fr>
1152
1153 * src/complain.c (error_message, ERROR_MESSAGE): New.
1154 To factor...
1155 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1156 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1157
ddc8ede1
PE
11582006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1159
1160 * NEWS: Instead of %union, you can define and use your own union type
1161 YYSTYPE if your grammar contains at least one <type> tag.
1162 Your YYSTYPE need not be a macro; it can be a typedef.
1163 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1164 (Union Decl, Decl Summary): Document this.
1165 * data/glr.c (YYSTYPE): Implement this.
1166 * data/glr.cc (YYSTYPE): Likewise.
1167 * data/lalr1.cc (YYSTYPE): Likewise.
1168 * data/yacc.c (YYSTYPE): Likewise.
1169 * src/output.c (prepare): Output tag_seen_flag.
1170 * src/parse-gram.y (declaration, grammar_declaration):
1171 Use 'union_seen' rather than 'typed' to determine whether
1172 %union has been seen, since grammars can now be typed without
1173 %union.
1174 (symbol_declaration, type.opt, symbol_def):
1175 Keep track of whether a tag has been seen.
1176 * src/reader.c (union_seen, tag_seen): New vars.
1177 (typed): remove.
1178 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1179 * src/scan-code.l (untyped_var_seen): New variable.
1180 (handle_action_dollar): Adjust to above changes.
1181 (handle_action_dollar, handle_action_at):
1182 Improve overflow checking for outlandish numbers.
1183 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1184 avoid new diagnostics generated by above changes.
1185 * tests/regression.at (YYSTYPE typedef): Add test to check
1186 for type tags without %union.
1187
1188 * src/symlist.c (symbol_list_length): Return int, not unsigned
1189 int, since callers expect int. This may need to get revisited
1190 once we have proper integer overflow checking.
1191
1192 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1193 object is now static.
1194
1195 * src/getargs.c (flags_argmatch): Return void, not int,
1196 to pacify ./configure --enable-gcc-warnings.
1197
1198 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1199 since last_string is already defined to FLEX_PREFIX (last_string).
1200
7b42569e
AD
12012006-07-09 Akim Demaille <akim@lrde.epita.fr>
1202
1203 Implement --warnings/-W.
1204 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1205 replaced by...
1206 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1207 Adjust callers.
1208 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1209 (warnings_args, warnings_types): New.
1210 (getargs, short_options, long_options): Accept -W/--warnings.
1211 Sort the options by alphabetical order, upper case letter right
1212 before its lower case.
1213
3b452f4e
JD
12142006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1215
1216 Change %merge result type clash warnings to errors. Discussed at
1217 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1218 * src/reader.c (record_merge_function_type): Use complain_at.
1219 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1220 declared later): Update test case results.
1221
b8a41559
AD
12222006-07-09 Akim Demaille <akim@lrde.epita.fr>
1223
1224 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1225 to be in alphabetical order.
1226 (trace_args): Spelling fixes.
1227
cd9e1ba2
PE
12282006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1229
1230 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1231 so they don't collide with user-defined macros.
1232 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1233 this was never guaranteed, and now that we're using gnulib stdint,
1234 which defines int_fast16_t to long int, the problem is exposed.
1235
cb48f191
PE
12362006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1237
b8445a15
PE
1238 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1239 need the full POSIX semantics (and weren't implementing them
1240 anyway).
1241
cb48f191
PE
1242 Adjust to Autoconf 2.60 and today's gnulib.
1243 * bootstrap (gnulib_modules): Add stdint.
1244 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1245 no longer copies it.
1246 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1247 since stdint needs the former and wcwidth (which is now required
1248 by mbswidth) needs the latter.
1249 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1250 work around a compatibility glitch between gettext 0.14.6 and
1251 Autoconf 2.60.
1252 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1253 Do not check for uintptr_t, since new stdint module does the right
1254 thing.
1255 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1256 Add stdint.h, stdint_.h, wcwidth.h.
1257 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1258 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1259 stdint.m4, wchar_t.m4, wcwidth.m4.
1260 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1261 usual order for ../lib/*.h files.
1262 (file_name_split): Use last_component, not base_name, to adjust
1263 to gnulib changes.
1264 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1265 for ../lib/*.h files.
1266 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1267 Define unconditionally, since we now assume the stdint module.
1268 * src/scan-skel.l: Include <dirname.h>.
1269 (BASE_QPUTS): Use last_component, not base_name.
1270 * src/system.h: Include <unlocked-io.h> in the usual order
1271 for ../lib/*.h files. Include <stdint.h> unconditionally,
1272 since we now use the stdint module.
1273 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1274 HAVE_UINTPTR_T, since we now use the stdint module.
1275 (base_name): Remove decl, since files now include <dirname.h>
1276 to get the decl.
1277
cd48d21d
AD
12782006-07-08 Akim Demaille <akim@lrde.epita.fr>
1279
1280 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1281 New, default to 1.
1282 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1283 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1284 default.
1285 * tests/calc.at: Adjust.
1286
8ec0a172
AD
12872006-07-08 Akim Demaille <akim@lrde.epita.fr>
1288
b8445a15 1289 * data/c.m4 (b4_basename): New.
8ec0a172
AD
1290 (b4_syncline): Also output the location of its invocation (from
1291 the skeleton).
1292 (b4_user_action, b4_define_user_action, b4_user_actions)
1293 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1294 (b4_user_stype): New.
1295 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1296
4a678af8
JD
12972006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1298
1299 In the grammar file, the first column is 1 not 0 on the first line as
1300 on every other line.
1301 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1302 * tests/input.at (Torturing the Scanner): Update output.
1303
1304 * src/scan-gram.l (scanner_cursor): Declare it static.
1305
dd60572a
JD
13062006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1307
1308 In warnings, say "previous declaration" rather than "first
1309 declaration".
1310 * src/symtab.c (redeclaration): Do that here.
1311 * src/reader.c (record_merge_function_type): In the case of a result
1312 type clash, report the previous declaration rather than the very first
1313 one in the grammar file.
1314 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1315 declared later): Add a third declaration to check this behavior.
1316 * tests/input.at (Incompatible Aliases): Update output.
1317
2073e1b6
AD
13182006-06-27 Akim Demaille <akim@epita.fr>
1319
1320 * doc/Doxyfile.in: New.
1321 * doc/Makefile.am: Use it.
1322 * src/lalr.h, src/symtab.h: Initial doxygenation.
1323
8ee5b538
JD
13242006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1325
1326 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
1327 declared after the %merge. This continues the effort of the previous
1328 patch.
8ee5b538
JD
1329 * src/reader.c (get_merge_function): Don't set the merger type yet.
1330 (record_merge_function_type): New function for setting the merger type
1331 and checking for clashes.
1332 (grammar_current_rule_merge_set): Set the location of the %merge for
1333 the current rule.
1334 (packgram): Invoke record_merge_function_type for each rule now that
1335 all symbol type declarations have been parsed.
1336 * src/reader.h (merger_list.type_declaration_location): New member
1337 storing the location of the first %merge from which the type for this
1338 merging function was derived.
1339 * src/symlist.h (symbol_list.merger_declaration_location): New member
1340 storing the location of a rule's %merge, if any.
1341 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1342 declared later): New test to catch the error fixed by the above patch.
1343
ffa4ba3a
JD
13442006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1345
1346 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
1347 declarations appear after the rules. Discussed at
1348 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1349 and
1350 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1351 Don't mistake the type of $$ in a midrule to be that of its parent
1352 rule's $$.
ffa4ba3a
JD
1353 * src/reader.c (grammar_current_rule_end): Don't invoke
1354 grammar_rule_check yet since not all symbol declarations may have been
1355 parsed yet.
1356 (grammar_midrule_action): Likewise.
1357 Don't record whether the midrule's $$ has been used yet since actions
1358 haven't been translated yet.
1359 Record the midrule's parent rule and its RHS index within the parent
1360 rule.
1361 (grammar_current_rule_action_append): Don't translate the action yet
1362 since not all symbol declarations may have been parsed yet and, thus,
1363 warnings about types for $$, $n, @$, and @n can't be reported yet.
1364 (packgram): Translate the action and invoke grammar_rule_check now that
1365 all symbol declarations have been parsed.
1366 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1367 after parsing the entire grammar file, the symbol list here in the case
1368 of a midrule is actually the midrule's empty RHS, so reference its
1369 parent rule's RHS where necessary.
1370 On the other hand, now that you can already know it's a midrule, you
1371 aren't forced to think $$ has the same type as its parent rule's $$.
1372 (handle_action_at): In the case of a midrule, reference the parent rule
1373 where necessary.
1374 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1375 members.
1376 (symbol_list_length): Now that this is invoked after all rules have
1377 been parsed, a NULL symbol (rather than a NULL symbol list node)
1378 terminates a rule. symbol_list_print already does this correctly.
1379 * src/symlist.h (symbol_list.midrule_parent_rule,
1380 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1381 remember their relationships with their parents.
1382 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1383 fixed by the above patch.
1384 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1385 implementing...
1386 (Unused values): ... this old test case and...
1387 (Unused values before symbol declarations): ... this new test case.
1388 This one is the same as `Unused values' except that all symbol
1389 declarations appear after the rules in order to catch the rest of the
1390 errors fixed by the above patch.
1391
e256e17f
JD
13922006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1393
300a1930
JD
1394 More cleanup.
1395 * src/reader.c (current_rule): Declare it static since it's no longer
1396 used outside this file.
1397 (grammar_current_rule_action_append): Remove redundant arguments from
1398 translate_rule_action invocation.
1399 * src/reader.h (current_rule): Remove this unused extern.
1400 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1401 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 1402
381ecb06
JD
14032006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1404
1405 Clean up yesterday's patch.
1406 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1407 to...
1408 * src/reader.c (grammar_current_rule_action_append): ... here for
1409 consistency with grammar_current_rule_symbol_append.
1410 * tests/regression.at (Braced code in declaration in rules section):
1411 Make yyerror and yylex static as usual.
1412
4210cd0b
JD
14132006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1414
1415 Fix bug that mistakes braced code in a declaration in the rules section
1416 to be a rule action. Mentioned at
1417 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1418 * src/scan-gram.l: Move midrule action detection from the start of the
1419 scanning of any braced code to...
1420 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1421 action. For readability, use $2 and @2 rather than the equivalent
1422 global variables.
1423 * tests/regression.at (Braced code in declaration in rules section):
1424 New test to catch the error fixed by the above patch.
1425
1426 Work on code readability some.
1427 * src/scan-code.l (current_rule): Get rid of this misleading and
1428 redundant declaration: it's actually extern'ed in reader.h.
1429 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1430 translate_action): Add a rule argument and use it instead of the global
1431 current_rule.
1432 (translate_rule_action): This already receives current_rule through an
1433 argument, so pass it on to translate_action instead of assigning
1434 current_rule to current_rule.
1435 (translate_symbol_action, translate_code): Pass rule = NULL to
1436 translate_action.
1437
34f98f46
JD
14382006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1439
1440 Rename %before-definitions to %start-header and %after-definitions to
1441 %end-header. Don't use these declarations to separate pre-prologue
1442 blocks from post-prologue blocks. Add new order-independent
1443 declarations %before-header and %after-header as alternatives to the
1444 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1445 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1446 * NEWS (2.3+): Update for these changes.
1447 * data/glr.c (b4_before_definitions): Update to...
1448 (b4_start_header): ... this.
1449 (b4_after_definitions): Update to...
1450 (b4_end_header): ... this.
1451 * data/glr.cc: Likewise.
1452 * data/lalr1.cc: Likewise.
1453 * data/yacc.c: Likewise.
1454 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1455 prologue blocks with %*-header declarations.
1456 (Calc++ Parser): Likewise.
1457 (Bison Declaration Summary): Update names.
1458 (Bison Symbols): Update description.
1459 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1460 (PERCENT_END_HEADER): ... this.
1461 (PERCENT_BEFORE_DEFINITIONS): Update to...
1462 (PERCENT_START_HEADER): ... this.
1463 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1464 (declaration): Update token names and m4 macro names.
1465 When parsing %end-header and %start-header, invoke translate_code
1466 before muscle_code_grow, and no longer set global booleans to remember
1467 whether these declarations have been seen.
1468 Parse new %after-header and %before-header.
1469 * src/reader.c (before_definitions, after_definitions): Remove.
1470 (prologue_augment): Accept a new bool argument to specify whether to
1471 augment the pre-prologue or post-prologue.
1472 * src/reader.h (before_definitions, after_definitions): Remove these
1473 extern's.
1474 (prologue_augment): Add new bool argument.
1475 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1476 (PERCENT_END_HEADER): ... this.
1477 (PERCENT_BEFORE_DEFINITIONS): Update to...
1478 (PERCENT_START_HEADER): ... this.
1479 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1480 * tests/actions.at (Printers and Destructors): Update names.
1481
31b2b07e
JD
14822006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1483
1484 Add comparison operators for C++ location classes. Discussed at
1485 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1486 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1487 declaration indicating whether filename_type has an operator==. If
1488 filename_type is `std::string', it defaults to `1', `0' otherwise.
1489 * data/location.cc: Iff b4_define_location_comparison is `1', add
1490 operator== and operator!= for class position and for class location.
1491
1492 Some minor fixes.
1493 * src/scan-action.l: Remove unused file.
1494 * src/symtab.c (symbol_printer_set): Use printer_location not
1495 destructor_location.
1496 * src/symtab.h (struct symbol): Replace incorrect source comment for
1497 printer members.
1498 * tests/input.at (Incompatible Aliases): Update output with correct
1499 printer location.
1500
9bc0dd67
JD
15012006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1502
1503 Don't put the pre-prologue in the header file. For the yacc.c code
1504 file and the glr.c header and code files, move the pre-prologue before
1505 the token definitions. Add new %before-definitions and
1506 %after-definitions to declare code that will go in both the header file
1507 and code file. Discussed at
1508 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1509 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1510 and
1511 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1512 * NEWS (2.3+): Describe these changes.
1513 * data/glr.c (b4_pre_prologue): Move from within to before...
1514 (b4_shared_declarations): ... this.
1515 Add new b4_before_definitions before b4_token_enums.
1516 Add new b4_after_definitions at the end.
1517 * data/glr.cc (b4_pre_prologue): Replace with...
1518 (b4_before_definitions): ... this in the header file.
1519 (b4_after_definitions): New near the end of the header file.
1520 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1521 code file right before including the header file.
1522 (b4_before_definitions): New in the previous position of
1523 b4_pre_prologue in the header file.
1524 (b4_after_definitions): New near the end of the header file.
1525 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1526 (b4_token_enums_defines): In the code file, move to right before
1527 YYSTYPE for consistency with the header file.
1528 (b4_before_definitions): New right before b4_token_enums_defines in
1529 both the header and code file.
1530 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1531 header and code file.
1532 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1533 of prologues for %union dependencies.
1534 (Bison Declaration Summary): In %defines description, mention the
1535 effect of %before-definitions and %after-definitions on the header
1536 file.
1537 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1538 than in the pre-prologue so that make check succeeds.
1539 (Bison Symbols): Add entries for %before-definitions and
1540 %after-definitions.
1541 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1542 %before-definitions.
1543 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1544 (declaration): Parse those declarations and append to
1545 b4_before_definitions and b4_after_definitions, respectively.
1546 * src/reader.c (before_definitions, after_definitions): New bools to
1547 track whether those declarations have been seen.
1548 (prologue_augment): Add to the post-prologue if %union,
1549 %before-definitions, or %after-definitions has been seen.
1550 * src/reader.h (before_definitions, after_definitions): New extern's.
1551 * src/scan-gram.l: Scan the new declarations.
1552 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1553 prologue block in a %before-definitions or a %after-definitions based
1554 on whether the %union is declared.
1555 * tests/regression.at (Early token definitions with --yacc, Early token
1556 definitions without --yacc): Move tests for token definitions into the
1557 post-prologue since token names are no longer defined in the
1558 pre-prologue.
1559
203b9274
AD
15602006-06-20 Akim Demaille <akim@epita.fr>
1561
1562 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1563 (symbol_get): Use it.
1564 * src/parse-gram.y: Use it.
1565
a7ee59cf
JD
15662006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1567
1568 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1569 build succeeds when configured with --enable-gcc-warnings.
1570
5a2baae7
PE
15712006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1572
33ad1a9c
PE
1573 * src/parse-gram.y (char_name): New function.
1574 (CHAR, STRING, string_content): For %printer, properly escape.
1575 (ID): Prefer fputs to fprintf.
1576 (id): Reindent to be consistent with other rules.
1577 Properly quote char.
1578
5a2baae7
PE
1579 The Translation Project changed its way of publishing translations
1580 to maintainers. I haven't received any responses to my request
1581 for supporting the old way, or for documenting the new way. I
1582 have modified 'bootstrap' to use screen scraping
1583 (in this case, HTML scraping). This is unreliable and inelegant,
1584 but I don't see any better way. Yuck.
1585 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1586 (get_translations): New function, which uses HTML scraping to
1587 deduce locations of latest translations.
1588 Use this function to grab both bison and bison-runtime .po files.
1589 Don't bother priming the pump for the runtime-po domain any more,
1590 as it's now translated better than bison is.
1591
58d7a1a1
AD
15922006-06-19 Akim Demaille <akim@epita.fr>
1593
1594 * src/scan-gram.l: No longer "parse" things after `%union' until
1595 `{'. Rather, return a single "%union" token.
1596 No longer make symbols: return strings, and leave the conversion
1597 to symbols to the parser.
1598 (SC_PRE_CODE, token_type): Remove.
1599 * src/parse-gram.y (%union): New field `character'.
1600 Sort tokens.
1601 (CHAR): New token.
1602 (ID, ID_COLON): Now that the scanner no longer makes them
1603 identifiers, adjust all uses to invoke symbol_get.
1604 (id_colon): New, wraps the conversion from string to symbol.
1605 (%union): Accept a possible union_name.
1606 (symbol): Now can be a char.
1607 * data/c.m4 (b4_union_name): Leave a default value.
1608 * data/glr.c, data/yacc.c: Use it.
1609
b931235e
JD
16102006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1611
1612 For associating token numbers with token names for "yacc.c", don't use
1613 #define statements unless `--yacc' is specified; always use enum
1614 yytokentype. Most important discussions start at:
1615 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1616 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1617 and
1618 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1619 * NEWS (2.3+): Mention.
1620 * data/c.m4 (b4_yacc_if): New.
1621 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1622 token #define's.
1623 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1624 on token name definitions.
1625 * src/getargs.c (usage): Capitalize `Yacc' in English.
1626 * src/output.c (prepare): Define b4_yacc_flag.
1627 * tests/regression.at (Early token definitions): Test that tokens names
1628 are defined before the pre-prologue not just before the post-prologue.
1629 Remove this test case and copy to...
1630 (Early token definitions with --yacc): ... this to test #define's.
1631 (Early token definitions without --yacc): ... and this to test enums.
1632
9e6e7ed2
PE
16332006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1634
1635 * NEWS: Reword the post-2.3 change to not be so optimistic about
1636 removing the old "look-ahead" spelling.
1637 Update previous look-ahead/lookahead change reports.
1638 * REFERENCES: look-ahead -> lookahead (since that's
1639 what he actually wrote).
1640 * doc/refcard.tex: look ahead -> lookahead,
1641 look-ahead -> lookahead
1642
742e4900
JD
16432006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1644
1645 For consistency, use `lookahead' instead of `look-ahead' or
1646 `look_ahead'. Discussed starting at
1647 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1648 and then at
1649 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1650 * NEWS: For the next release, note the change to `--report'.
1651 * TODO, doc/bison.1: Update English.
1652 * doc/bison.texinfo: Update English.
1653 (Understanding Your Parser, Bison Options): Document as
1654 `--report=lookahead' rather than `--report=look-ahead'.
1655 * src/conflicts.c: Update English in comments.
1656 (lookahead_set): Rename from look_ahead_set.
1657 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1658 (resolve_sr_conflict): Rename local look_ahead_tokens to
1659 lookahead_tokens, and update other uses.
1660 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1661 count_rr_conflicts, conflicts_free): Update uses.
1662 * src/getargs.c (report_args): Move "lookahead" before alternate
1663 spellings.
1664 (report_types): Update uses.
1665 (usage): For `--report' usage description, state `lookahead' spelling
1666 rather than `look-ahead'.
1667 * src/getargs.h (report.report_lookahead_tokens): Rename from
1668 report_look_ahead_tokens.
1669 * src/lalr.c: Update English in comments.
1670 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1671 (state_lookahead_tokens_count): Rename from
1672 state_look_ahead_tokens_count.
1673 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1674 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1675 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1676 Update other uses.
1677 Update English in output.
1678 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1679 * src/print.c: Update English in comments.
1680 (lookahead_set): Rename from look_ahead_set.
1681 (print_reduction): Rename argument lookahead_token from
1682 look_ahead_token.
1683 (print_core, state_default_rule, print_reductions, print_results):
1684 Update uses.
1685 * src/print_graph.c: Update English in comments.
1686 (print_core): Update uses.
1687 * src/state.c: Update English in comments.
1688 (reductions_new): Update uses.
1689 (state_rule_lookahead_tokens_print): Rename from
1690 state_rule_look_ahead_tokens_print, and update other uses.
1691 * src/state.h: Update English in comments.
1692 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1693 (state_rule_lookahead_tokens_print): Rename from
1694 state_rule_look_ahead_tokens_print.
1695 * src/tables.c: Update English in comments.
1696 (conflict_row, action_row): Update uses.
1697 * tests/glr-regression.at
1698 (Incorrect lookahead during deterministic GLR,
1699 Incorrect lookahead during nondeterministic GLR): Rename
1700 print_look_ahead to print_lookahead.
1701 * tests/torture.at: Update English in comments.
1702 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1703 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1704 (Many lookahead tokens): Update uses.
1705 * data/glr.c: Update English in comments.
1706 * lalr1.cc: Likewise.
1707 * yacc.c: Likewise.
1708 * src/conflicts.h: Likewise.
1709 * src/lalr.h: Likewise.
1710 * src/main.c: Likewise.
1711 * src/output.c: Likewise.
1712 * src/parse-gram.c: Likewise.
1713 * src/tables.h: Likewise.
1714 * tests/calc.at: Likewise.
1715
3c40d0b5
JD
17162006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1717
1718 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1719
5d278082
PE
17202006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1721
1722 * TODO: Add request from Nelson H. F. Beebe to be able to install
1723 Bison without installing the yacc script.
1724
9e668899
JD
17252006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1726
1727 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1728 and yytext if they're already #define'd.
1729 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1730 * src/scan-code-c.c: ... here.
1731 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1732 <config.h>.
1733
0c8e079f
JD
17342006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1735
1736 Get Bison to build again when configured with --enable-gcc-warnings.
1737 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1738 missing #include's.
1739 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1740 loc argument as it shadows a global.
1741 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1742 invocation.
1743
1744 * src/.cvsignore: Add scan-code.c.
1745
2346344a
AD
17462006-06-07 Akim Demaille <akim@epita.fr>
1747
1748 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1749 to...
1750 * src/scan-code.l: here.
1751 * tests/input.at (Torturing the Scanner): Fix another location
1752 error.
1753
4862bdfd
AD
17542006-06-07 Akim Demaille <akim@epita.fr>
1755
1756 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1757
e9071366
AD
17582006-06-06 Akim Demaille <akim@epita.fr>
1759
1760 Extract the parsing of user actions from the grammar scanner.
1761 As a consequence, the relation between the grammar scanner and
1762 parser is much simpler. We can also split "composite tokens" back
1763 into simple tokens.
1764 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1765 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1766 rename as...
1767 * src/location.h, src/location.c (add_column_width)
1768 (location_compute): these.
1769 Fix the column count: the initial column is 0.
1770 (location_print): Be robust to ending column being 0.
1771 * src/location.h (boundary_set): New.
1772 * src/main.c: Adjust to scanner_free being renamed as
1773 gram_scanner_free.
1774 * src/output.c: Include scan-code.h.
1775 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1776 Use boundary_set.
1777 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1778 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1779 which is now, again, a separate token.
1780 Adjust all dependencies.
1781 Whereever actions with $ and @ are used, use translate_code.
1782 (action): Remove this nonterminal which is now useless.
1783 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1784 (grammar_current_rule_action_append): Use translate_code.
1785 (packgram): Bound check ruleno, itemno, and rule_length.
1786 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1787 (last_string, last_braced_code_loc, max_left_semantic_context)
1788 (scanner_initialize, scanner_free, scanner_last_string_free)
1789 (gram_out, gram_lineno, YY_DECL_): Move to...
1790 * src/scan-gram.h: this new file.
1791 (YY_DECL): Rename as...
1792 (GRAM_DECL): this.
1793 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1794 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1795 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1796 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1797 Move these declarations, and...
1798 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1799 these to...
1800 * src/flex-scanner.h: this new file.
1801 * src/scan-gram.l (rule_length, rule_length_overflow)
1802 (increment_rule_length): Remove.
1803 (last_braced_code_loc): Rename as...
1804 (gram_last_braced_code_loc): this.
1805 Adjust to the changes of the parser.
1806 Move all the handling of $ and @ into...
1807 * src/scan-code.l: here.
1808 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1809 (handle_action_dollar, handle_action_at): Move to...
1810 * src/scan-code.l: here.
1811 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1812 scan-code.h, scan-code-c.c, scan-gram.h.
1813 (EXTRA_bison_SOURCES): Add scan-code.l.
1814 (BUILT_SOURCES): Add scan-code.c.
1815 (yacc): Be robust to white spaces.
1816
1817 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1818 * tests/regression.at: Adjust the column numbers.
1819 * tests/regression.at: Adjust the error message.
7891a7c4 1820
184e42f0
JD
18212006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1822
1823 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1824 Use Akim's wording from
1825 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1826
7891a7c4
JD
18272006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1828
1829 Between Bison releases, manually append `+' to the previous Bison
1830 release number, and use that as a signal to automatically print the
1831 ChangeLog's CVS Id keyword from --version. Discussed starting at
1832 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1833 * ChangeLog: Add Id header.
1834 * configure.ac (AC_INIT): Append `+' to `2.3'.
1835 * src/.cvsignore: Add revision.c.
1836 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1837 (BUILT_SOURCES): Add revision.c.
1838 (revision.c): New target rule. This file defines a new global variable
1839 named revision. It initializes it with either the Id from ChangeLog
1840 or, if VERSION doesn't contain `+', with the empty string.
1841 * src/getargs.c (version): Print the value of revision.
1842 * src/revision.h: Extern revision.
1843
4ad3ed84
PE
18442006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1845
1846 * NEWS: Version 2.3.
1847 * configure.ac (AC_INIT): Likewise.
1848
02103984
PE
18492006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1850
1851 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1852 with no arguments, not as an object-like macro. This is for
1853 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1854 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1855 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1856 Document this.
1857
2c08afa5
JD
18582006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 * src/getargs.c (usage): Back out yesterday's modification of the
1861 --help output so that we don't have to wait for translation before
1862 releasing 2.3.
1863
6077da58
PE
18642006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1865
1866 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1867 Problem reported by Akim Demaille.
1868
2a26b6c2
JD
18692006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1870
1871 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1872
aefef0d6
PE
18732006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1874
1875 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1876 generated source code. Problem reported by Frans Englich in
1877 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1878
fcd8e201
PE
18792006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1880
1881 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1882 shell, not within 'make', so that 'make' by an ordinary builder
1883 (using GNU make) does not worry about configuring gzip. This also
1884 works around a bug reported independently by Keith Thompson and by
1885 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1886 stderr rather than stdout, messing up the build logs.
1887
7b5cdcbd
JD
18882006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1889
1890 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1891 to make sure that YYID will never be unused. This fixes a 'make
1892 maintainer-check' failure caused by the recent changes to the 'Trivial
1893 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1894 not used.
1895 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1896
5ad0a449
JD
18972006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1898
1899 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1900 state before an empty RHS is always resolved here. Only the location
1901 of that state is guaranteed to be resolved, and that's enough. This
1902 fixes the remaining bug reported by Derek M. Jones in
1903 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1904 * tests/glr-regression.at (Uninitialized location when reporting
1905 ambiguity): Test the above case.
1906 Also, the embedded comments in this test case claim it checks the case
1907 of an empty RHS that has inherited the initial location. However, the
1908 corresponding LHS was already resolved, so yyresolveLocations didn't
1909 actually have reason to modify it. Fix this by forcing
1910 nondeterministic operation at the beginning of the parse.
1911
50cce58e
PE
19122006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1913
1914 * data/c.m4 (b4_yy_symbol_print_generate):
1915 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1916 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1917 of the bugs reported today by Derek M Jones in
1918 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1919 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1920 defined to be a type name without parens or brackets.
1921 (Location Type): Similarly for YYLTYPE.
1922 * tests/regression.at (Trivial grammars): Put in a test for this
1923 bug that will be caught by 'make maintainer-check' (though not,
1924 alas, by 'make check' unless your compiler is picky).
1925
ab8d9dc5
PE
19262006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1927
0d2c8934 1928 * NEWS: Version 2.2.
ab8d9dc5
PE
1929 * configure.ac (AC_INIT): Likewise.
1930
9138c575
JD
19312006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1932
1933 * data/glr.c (yyreportTree): Make room in yystates for the state
1934 preceding the RHS. This fixes the segmentation fault reported by Derek
1935 M. Jones in
1936 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1937 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1938 to the user. Reported for yyreportTree by Derek M. Jones later in the
1939 same thread.
1940 * THANKS: Add Derek M. Jones.
1941 Update my email address.
1942 Fix typo in Steve Murphy's name.
1943
276f48df
PE
19442006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1945
d6645148
PE
1946 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1947 checking against YYLAST that caused the parser to miss a potential
1948 alternative in its diagnostic.
1949 Problem reported by Maria Jose Moron Fernandez in
1950 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1951 * data/lalr1.cc (yysyntax_error_): Likewise.
1952 * data/yacc.c (yysyntax_error): Likewise.
1953 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1954 tokens, in case we run into an older C compiler.
1955 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1956 Use them to check for the off-by-one error fixed above.
1957
276f48df
PE
1958 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1959 YYSIZE_T, not size_t.
1960 * tests/regression.at (Trivial grammars): New test, to catch
1961 the error fixed by the above patch.
1962
cd8b5791
AD
19632006-05-14 Akim Demaille <akim@lrde.epita.fr>
1964
1965 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1966 scheme.
1967 Reported by Steve Murphy.
1968
34376418
AD
19692006-05-14 Akim Demaille <akim@lrde.epita.fr>
1970
1971 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1972 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1973
327afc7c
AD
19742006-05-14 Akim Demaille <akim@lrde.epita.fr>
1975
1976 Implement --trace=m4.
1977 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1978 * src/output.c (output_skeleton): When set, pass -dV to m4.
1979
1980 Factor the handling of flags in m4.
1981 * src/output.c (prepare): Rename the muscle names debug, defines,
1982 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1983 * data/c.m4: Adjust.
1984 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1985 Use b4_define_flag_if to define other b4_FLAG_if macros.
1986 (b4_location_if): As a consequence, rename as...
1987 (b4_locations_if): this, for consistency.
1988 Adjust all the skeletons.
1989
ba9ecd19
AD
19902006-05-14 Akim Demaille <akim@lrde.epita.fr>
1991
1992 * etc/bench.pm: Shorten bench names.
1993
4e83ea15
AD
19942006-05-14 Akim Demaille <akim@lrde.epita.fr>
1995
1996 * src/output.h, src/output.c (error_verbose): Move to...
1997 * src/getargs.h, src/getargs.c: here.
1998 Sort the flags.
1999 Adjust dependencies.
2000
6e93d810
PE
20012006-05-13 Paul Eggert <eggert@cs.ucla.edu>
2002
2003 * data/c.m4 (b4_copyright): Put the special exception for Bison
2004 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
2005 uses changed. Suggested by Akim Demaille. Also, wrap the
2006 copyright notice, in case it is longer than 80 columns. Replace
2007 comma by newline after title.
6e93d810 2008
eaea13f5
PE
20092006-05-11 Paul Eggert <eggert@cs.ucla.edu>
2010
2011 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
2012 incompatibility, not a bug. Mention that it wasn't fixed as of
2013 flex 2.5.33.
2014
3cf084ec
AD
20152006-05-11 Akim Demaille <akim@lrde.epita.fr>
2016
2017 * examples/extexi: Enforce the precedence of concatenation over
2018 >>.
0a9f1c7d 2019 Reported by Tommy Nordgren.
3cf084ec 2020
32c96bd7
AD
20212006-05-11 Akim Demaille <akim@lrde.epita.fr>
2022
2023 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
2024 with the member "token".
f94705b2 2025 Reported by Martin Nylin.
32c96bd7 2026
eaea13f5
PE
20272006-05-08 Paul Eggert <eggert@cs.ucla.edu>
2028
2029 * data/glr.c: Switch to Bison 2.2 special-exception language in
2030 the copyright notice. Use more-regular format for titles and
2031 copyright notices.
2032 * data/glr.cc: Likewise.
2033 * data/location.cc: Likewise.
2034 * data/yacc.cc: Likewise.
2035 * doc/bison.texinfo (Conditions): Document this.
2036 * NEWS: likewise. Upgrade version to 2.2.
2037
6e2d1146
AD
20382006-04-27 Akim Demaille <akim@lrde.epita.fr>
2039
2040 * data/glr.cc: Remove dead code.
2041
47671055
PE
20422006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2043
2044 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2045 that variable and the line breaks the bootstrap. Problem reported
2046 by Juan M. Guerrero.
2047
ed2e6384
AD
20482006-04-24 Akim Demaille <akim@lrde.epita.fr>
2049
2050 * doc/bison.texinfo (Multiple start-symbols): New.
2051
3cedc2dc
AD
20522006-04-24 Akim Demaille <akim@lrde.epita.fr>
2053
2054 * etc/README, etc/bench.pl: New.
2055
b2ddc3f3
AD
20562006-04-03 Akim Demaille <akim@lrde.epita.fr>
2057
2058 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2059 rule.
2060 Reported by Mickael Labau.
2061 * tests/input.at (Torturing the Scanner): Test it.
2062
91e3ac9a
PE
20632006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2064
2065 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2066 Problem reported by Bob Rossi.
2067
20682006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2069
2070 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2071 and didn't really work.
2072 For the index, use @ifnotinfo, not @iftex.
2073 Minor cleanups of spacing and terminology.
2074
5cf61e93
AD
20752006-03-12 Akim Demaille <akim@lrde.epita.fr>
2076
2077 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2078 of AT_NAME_PREFIX when %name-prefix is not used.
2079
aa08666d
AD
20802006-03-12 Akim Demaille <akim@lrde.epita.fr>
2081
2082 Apply --prefix to C++ skeletons too: they change the namespace.
2083 The test suite already exercize these cases.
2084 * data/c++.m4 (b4_namespace): New.
2085 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2086 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2087 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2088 * doc/bison.texinfo: Document it.
2089 (Option Cross Key): Use @multitable in all formats. It looks
2090 nicer, even in TeX outputs.
2091 (Rules): Use the same code whatever the output type is.
2092 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2093 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2094 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 2095
45567173
AD
20962006-03-10 Akim Demaille <akim@lrde.epita.fr>
2097
2098 * TODO: Remove dead items.
2099
e9d8f881 21002006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
2101
2102 * doc/FAQ: Remove, merged into...
2103 * doc/bison.texinfo (FAQ): this.
2104 * doc/Makefile.am (EXTRA_DIST): Adjust.
2105
c095d689
AD
21062006-03-10 Akim Demaille <akim@lrde.epita.fr>
2107
2108 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2109 even if empty.
2110 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2111 * doc/bison.texinfo (Calc++ Scanner): Use it.
2112
6e0f8287
PE
21132006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2114
2115 Fix two nits reported by twlevo, plus one more that I discovered.
2116
2117 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2118 this is the usual Bison style.
2119 * src/location.h (location_print): Likewise.
2120
2121 * src/reader.h (token_name): Likewise.
2122
d6b771c3
PE
21232006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2124
2125 Fix some nits reported by twlevo.
2126 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2127 and "POSIX". Use more-modern syntax for URLs. Mention C++
2128 and ask for Java. Don't hardwire OS version numbers. Add
2129 copyright notice.
2130 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2131 * src/conflicts.c (solved_conflicts_obstack): Now static.
2132
1e137b71
JD
21332006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2134
2135 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2136 page. Say "you can use it" not "you may use it" as on the web page;
2137 we're describing capabilities not granting permission.
2138
73f2e47e
PE
21392006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2140
6d05403d
PE
2141 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2142 shadowing warnings. Use usual patter for iterating through RHS.
2143 * tests/glr-regression.at
2144 (Uninitialized location when reporting ambiguity):
2145 Modify yylex so that it uses its argument, rather than trying
2146 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2147 const char -> char const.
2148
73f2e47e
PE
2149 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2150 Don't use tabs inside commands; it messes up 'ps'.
2151 Problem reported by twlevo.
2152
8710fc41
JD
21532006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2154
2155 * tests/glr-regression.at (Uninitialized location when reporting
2156 ambiguity): New test case.
2157 * data/glr.c (yyresolveLocations): New function, which uses
2158 YYLLOC_DEFAULT.
2159 (yyresolveValue): Invoke yyresolveLocations before reporting an
2160 ambiguity.
2161 * doc/bison.texinfo (Default Action for Locations): Note
2162 YYLLOC_DEFAULT's usage for ambiguity locations.
2163 (GLR Semantic Actions): Cross-reference those notes.
2164
ae952af2
JD
21652006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2166
2167 * tests/glr-regression.at (Leaked semantic values when reporting
2168 ambiguity): Remove unnecessary union and type declarations.
2169 (Leaked lookahead after nondeterministic parse syntax error): New test
2170 case.
2171 * data/glr.c (yyparse): Check for zero stacks remaining before
2172 attempting to shift the lookahead so that you don't lose it.
2173
35ee866a
JD
21742006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2175
2176 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2177 * tests/glr-regression.at (Leaked semantic values when reporting
2178 ambiguity): New test case.
2179 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2180 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2181 now unnecessary yystackp parameter.
2182 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2183 destructors can be called.
2184
2185 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2186 in existing testcases.
2187
520181ab
JD
21882006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 Don't leak semantic values for parent RHS when a user action cuts the
2191 parser, and clean up related code a bit.
2192 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
2193 cuts parse): Rename to...
2194 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
2195 for leaked parent RHS values.
2196 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2197 between an unresolved state (non-empty chain of semantic options) and
2198 an incomplete one (signaled by an empty chain).
ae952af2 2199 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
2200 successfully or unsuccessfully resolved yyGLRState to...
2201 (yyresolveValue): ... here so that yyresolveValue always leaves a
2202 yyGLRState with consistent data and thus is easier to understand.
2203 Remove the yyvalp and yylocp parameters since they are always just
2204 taken from the yys parameter. When reporting a discarded merged value
2205 in debugging output, note that it is incompletely merged. Document the
2206 interface.
2207 (yyresolveAction): If resolving any of the RHS states fails, destroy
2208 them all rather than leaking them. Thus, as long as user actions are
2209 written to clean up the RHS correctly, yyresolveAction always cleans up
2210 the RHS of a semantic option. Document the interface.
2211
18d9185c
PE
22122006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2213
2214 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2215 led to a segmentation fault in GNU Pascal. Problem reported
2216 by Waldek Hebisch.
2217
841a7737
JD
22182006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2219
2220 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2221 mid-rule action inside a nonterminal symbol in order to declare a
2222 destructor for its semantic value.
2223
fc3f467f
PE
22242006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2225
2226 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2227 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2228 __cplusplus && ! defined _STDLIB_H && !
2229 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2230 defined free))]: Include <stdlib.h> rather than rolling our own
2231 declarations of malloc and free, to avoid problems with
2232 incompatible declarations (using 'throw') C++'s stdlib.h. This
2233 should fix Debian bug 340012
2234 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2235 reported by Guillaume Melquiond.
2236
a3af26dd
PE
22372006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2238
4d7bc38c
PE
2239 * NEWS: Clarify symbols versus types in unused-value warnings.
2240
a3af26dd
PE
2241 * configure.ac (AC_INIT): Bump version number.
2242
4e26c69e
PE
22432006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2244
2245 * NEWS: Version 2.1a.
2246 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2247 since C99 requires this.
2248
498e897c
PE
22492006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2250
2251 * m4/c-working.m4: New file.
2252 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2253
57bb17ca
PE
22542006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2255
2256 * Makefile.maint: Merge from coreutils.
2257
0be105dc
PE
22582006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2259
2260 More portability fixes for problems summarized by Nelson H. F. Beebe.
2261
2262 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2263 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2264 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2265 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2266 messes up because C++ code is compiled in 32-bit mode but linked
2267 in 64-bit mode.
2268
6fc0c024
PE
22692006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2270
2271 More portability fixes for problems summarized by Nelson H. F. Beebe.
2272
7870f699
PE
2273 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2274 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2275
6fc0c024
PE
2276 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2277 nodist_PROGRAMS, since we don't need to actually compile the
2278 example if we're just doing a plain 'make'. This avoids bothering
2279 the installer unnecessarily about problems due to weird C++
2280 compilers.
2281
fe6c2fde
PE
22822006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2283
2284 More portability fixes for problems summarized by Nelson H. F. Beebe.
2285
2286 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2287 than #include "...", and compile with -I'.'. The old method was
2288 not portable, according to Posix and the C standard, and it does
2289 not work with Sun C 5.7, where previous #line directives affect
2290 the working directory used in later #include "..." directives.
2291
927b425b
JMG
22922006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2293
2294 Various DJGGP specific issues in /djgpp
2295
d9735e9e
PE
22962006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2297
2298 More portability fixes for problems summarized by Nelson H. F. Beebe.
2299
2300 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2301 '#include <map>' works and that you can apply ++ to iterators.
2302
5a6755af
PE
23032006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2304
67a0dc4f
PE
2305 Work around portability problems summarized by Nelson H. F. Beebe in
2306 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2307
8c86f0ef
PE
2308 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2309 that '#include <string>' works.
2310
de35dd59
PE
2311 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2312 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2313 "warning: sorry: semantics of inline function static data `const
2314 unsigned char translate_table[262]' are wrong (you'll wind up with
2315 multiple copies)".
2316
67a0dc4f
PE
2317 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2318 or, xor to not_, and_, or_, and xor_, respectively. This works
2319 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2320 random system header somewhere that includes the equivalent of
2321 <iso646.h>.
2322
5a6755af
PE
2323 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2324 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 2325 Suite Version 2.0.
5a6755af 2326
3f001415
JD
23272006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2328
2329 During deterministic GLR operation, user actions should be able to
2330 influence the parse by changing yychar. To make this easier to fix and
2331 to make glr.c easier to evolve in general, don't maintain yytoken in
2332 parallel with yychar; just compute yytoken when needed.
2333 * tests/glr-regression.at (Incorrect lookahead during deterministic
2334 GLR): Check that setting yychar in a user action has the intended
2335 effect.
2336 * data/glr.c (yyGLRStack): Remove yytokenp member.
2337 (yyclearin): Don't set *yytokenp.
2338 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2339 yychar rather than *yytokenp to determine the current lookahead.
2340 Compute yytoken locally when needed.
2341 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2342 point to.
2343
2344 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2345 after `--report' documentation.
2346
e2a8c0f5
PE
23472006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2348
2349 * src/parse-gram.y (grammar_declaration): Location of printer
2350 symbol is @1, not list->location. Bug reported by twlevo.
2351 * tests/input.at (Incompatible Aliases): Adjust to above change.
2352
6b702268
PE
23532006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2354
27622431
PE
2355 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2356 all the test at once. This makes the output easier to read in the
2357 normal case.
2358
6b702268
PE
2359 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2360 got from <http://bro-ids.org/download.html>. The bug is that
2361 when two actions appeared in succession, the second one was
2362 scanned before the first one was added to the grammar rule
2363 as a midrule action. Bison then output the incorrect warning
2364 "parse.y:905.17-906.36: warning: unused value: $3".
2365 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2366 associated with a value.
2367 (rhs): Don't invoke grammar_current_rule_action_append.
2368 (action): Invoke it here instead.
2369 * src/reader.c (grammar_midrule_action): Now extern.
2370 (grammar_current_rule_action_append): Don't invoke
2371 grammar_midrule_action; that is now the scanner's job.
2372 * src/reader.h (last_string, last_braced_code_loc):
2373 (grammar_midrule_action): New decls.
2374 * src/scan-gram.l (last_string): Now extern, sigh.
2375 (last_braced_code_loc): New extern variable.
2376 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2377 rule already has an action.
2378 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2379 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2380 Add some tests to check that the above changes fixed the bug.
2381
d40ba6c2
PE
23822006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2383
2384 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2385 All used changed. Check whether the symbol has a destructor,
2386 not whether it is typed.
2387 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2388 that the values are still reported as unused. All line numbers
2389 adjusted.
2390
401aace6
PE
23912006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2392
2393 Work around a bug in bro 0.8, which underparenthesizes its
2394 definition of YYLLOC_DEFAULT.
2395 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2396 their arguments.
2397 * data/lalr1.cc: Likewise.
2398 * data/yacc.cc: Likewise.
2399
06f01bc4
PE
24002006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2401
401aace6
PE
2402 Work around a bug in Pike 7.0, and give the Pike folks a
2403 better way to override the usual int widths.
2404 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2405 user can override the types.
2406 (short): #undef, to work around a bug in Pike 7.0.
2407 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2408 (union yyalloc.yyss): Use yytype_int16 rather than short.
2409 All uses changed.
2410 (yysigned_char): Remove.
2411 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2412 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2413 * tests/regression.at (Web2c Actions): Adjust to above changes.
2414
2415 * src/reader.c (check_and_convert_grammar): New function.
2416 (reader): Close the input file even if something went wrong during
2417 parsing. Minor file descriptor leak reported by twlevo.
2418
06f01bc4
PE
2419 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2420 to pacify gcc -Wswitch-default.
2421 * src/scan-gram.l (adjust_location): Use a default: break; case
2422 to pacify gcc -Wswitch-default.
2423 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2424 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2425 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2426 Move these decls to scan-skel.l, since they don't need to be
2427 visible elsewhere.
2428 * src/scan-skel.l: Accept the above decls.
2429 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2430 is used.
2431
02650b7f
PE
24322006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2435 since we don't want to insist on a version number at the start
2436 of the changelog every time.
2437 * Makefile.maint: Sync from coreutils a bit better.
2438 (sc_trailing_blank): Renamed from sc_trailing_space.
2439 All uses changed.
2440 (sc_no_if_have_config_h, sc_require_config_h):
2441 (sc_prohibit_assert_without_use): New rules.
2442 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2443 (sc_dd_max_sym_length): Fix leading spaces in rule.
2444 (sc_system_h_headers): Prefix with @.
2445 (sc_useless_cpp_parens, m4-check): Output line numbers.
2446 (changelog-check): Allow version only in head.
2447 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2448 satisfy new Makefile.maint rule.
2449 * data/glr.c: Likewise.
2450 * data/glr.cc: Likewise.
2451 * data/lalr1.cc: Likewise.
2452 * data/yacc.c: Likewise.
2453 * lib/ebitsetv.c: Likewise.
2454 * lib/lbitset.c: Likewise.
2455 * lib/subpipe.c: Likewise.
2456 * lib/timevar.c: Likewise.
2457 * src/system.h: Likewise.
2458 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2459 * djgpp/Makefile.maint: Add copyright notice.
2460 * djgpp/README.in: Likewise.
2461 * djgpp/config.bat: Likewise.
2462 * djgpp/config.site: Likewise.
2463 * djgpp/config_h.sed: Likewise.
2464 * djgpp/djunpack.bat: Likewise.
2465 * djgpp/config.sed: Fix copyright notice to match standard format.
2466 * djgpp/subpipe.h: Likewise.
2467 * lib/bitsetv-print.c: Likewise.
2468 * lib/bitsetv.c: Likewise.
2469 * lib/subpipe.h: Likewise.
2470 * lib/timevar.c: Likewise.
2471 * lib/timevar.h: Likewise.
2472 * djgpp/subpipe.c: Use standard recipe for config.h.
2473 * lib/abitset.c: Likewise.
2474 * lib/bitset.c: Likewise.
2475 * lib/bitset_stats.c: Likewise.
2476 * lib/bitsetv-print.c: Likewise.
2477 * lib/bitsetv.c: Likewise.
2478 * lib/ebitsetv.c: Likewise.
2479 * lib/get-errno.c: Likewise.
2480 * lib/lbitset.c: Likewise.
2481 * lib/subpipe.c: Likewise.
2482 * lib/timevar.c: Likewise.
2483 * lib/vbitset.c: Likewise.
2484 * tests/local.at: Likewise.
2485 * src/scan-gram.l: Don't include verify.h, since system.h does
2486 that for us.
2487 * .x-sc_require_config_h: New file.
2488 * .x-sc_unmarked_diagnostics: New file.
2489
287c78f6
PE
24902006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2491
287c78f6
PE
2492 Be a bit more systematic about using 'abort'.
2493 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2494 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2495 Put 'default: abort ();' before some other case, to satisfy older
2496 pedantic compilers.
2497 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2498 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2499 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2500 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
2501 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2502 (get_decision_str, get_orientation_str, get_node_alignment_str):
2503 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2504 (get_linestyle_str, get_arrowstyle_str): Likewise.
2505 * src/conflicts.c (resolve_sr_conflict):
2506 Use a default case rather than one for the one remaining enum
2507 value, to catch invalid enum values as well.
2508 * src/lalr.c (set_goto_map, map_goto):
2509 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2510 * src/nullable.c (nullable_compute, token_definitions_output):
2511 Likewise.
2512 * src/reader.c (packgram, reader): Likewise.
2513 * src/state.c (transitions_to, state_new, state_reduction_find):
2514 Likewise.
2515 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2516 (symbol_pack): Likewise.
2517 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
2518 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2519 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
2520 * src/system.h: Don't include <assert.h>.
2521 (assert): New macro.
2522
2523 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2524 (Destructor Decl, Parser Function, Pure Calling):
2525 Describe rules for braces inside C code more carefully.
287c78f6 2526
c66dfadd
PE
25272006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2528
c21493b8
PE
2529 Fix some porting glitches found by Nelson H. F. Beebe.
2530 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2531 compilers that don't understand that abort () does not return.
2532 * src/state.c (transitions_to): Likewise.
2533 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2534 that '#include <cstdlib>' works.
2535 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2536 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2537 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2538 for the benefit of some pre-C99 compilers.
2539
b6e3facf
PE
2540 * bootstrap: Undo changes to gnulib files that autoreconf made.
2541
c66dfadd
PE
2542 Minor fixups to get 'make maintainer-check' to work.
2543 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2544 with the new verify.h implementation.
2545 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2546 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2547 * data/yacc.c (YYUSE): Likewise.
2548 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2549 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2550 * src/parse-gram.y (declaration): Don't pass a string constant
2551 to a function that expects char *, since GCC might complain
2552 about the constant value.
2553 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2554 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2555 before #defining them.
2556 * tests/glr-regression.at
2557 (Incorrectly initialized location for empty right-hand side in GLR):
2558 In yyerror, use the msg arg.
2559 (Corrupted semantic options if user action cuts parse):
2560 (Incorrect lookahead during deterministic GLR):
2561 (Incorrect lookahead during nondeterministic GLR):
2562 Don't name a local var 'index'; it shadows string.h's 'index'.
2563
ed94ef2a
AD
25642006-01-19 Akim Demaille <akim@epita.fr>
2565
2566 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2567 location, not just parts of it.
2568
e9ad4aec
PE
25692006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2570
d6ca7905
PE
2571 * NEWS: Document the fact that multiple %unions are now allowed.
2572 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
2573 * TODO: This feature is now implemented, so remove it from
2574 the wishlist.
d6ca7905 2575
ef1b70e0
PE
2576 * Makefile.maint: Merge with coreutils Makefile.maint.
2577 (CVS_LIST): Use build-aux version if available.
2578 (VERSION_REGEXP): New macro.
2579 (syntax-check-rules): Add sc_no_if_have_config_h,
2580 sc_prohibit_assert_without_use, sc_require_config_h,
2581 sc_useless_cpp_parens.
2582 (sc_obsolete_symbols): Check for O_NDELAY.
2583 (sc_dd_max_sym_length): Track coreutils.
2584 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2585 (sc_useless_cpp_parens): New rule.
2586 (news-date-check): Look for version or today's date.
2587 (changelog-check): Don't require version number near head.
2588 (copyright-check): Use current year instead of hardwiring 2005.
2589 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2590 (announcement): Add --gpg-key-ID.
2591
2592 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2593 with "file system".
2594
2073ce56 2595 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
2596 array. Problem reported by twlevo.
2597 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2598 * src/lalr.c (build_relations): Rely on new sentinel.
2599 * src/gram.c (gram_free): Adjust to new sentinel.
2600
b7691f15
JD
26012006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2602
2603 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2604 yylookaheadNeeds. All uses updated.
2605 (yysplitStack): Rename local yynewLookaheadStatuses to
2606 yynewLookaheadNeeds.
2607 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2608 GLR): In comments, change `lookahead status' to `lookahead need'.
2609
ddee1b06
PH
26102006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2611
2612 * data/glr.c (yysplitStack): A little stylistic rewrite.
2613
12f4614d
PH
26142006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2615
2616 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2617
32c29292
JD
26182006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 * doc/bison.texinfo: Fix some typos.
2621 (GLR Semantic Actions): New subsection discussing special
2622 considerations because GLR semantic actions might be deferred.
2623 (Actions): Mention look-ahead usage of yylval.
2624 (Actions and Locations): Mention look-ahead usage of yylloc.
2625 (Special Features for Use in Actions): Add YYEOF entry and mention it
2626 in the yychar entry.
2627 In the yychar entry, remove mention of the local yychar case (pure
2628 parser) since this is irrelevant information when writing semantic
2629 actions and since it's already discussed in `Bison Symbols' where
2630 yychar is otherwise described as an external variable.
2631 In the yychar entry, don't call it the `current' look-ahead since it
2632 isn't when semantic actions are deferred.
2633 In the yychar and yyclearin entries, add note about deferred semantic
2634 actions.
2635 Add yylloc and yylval entries discussing look-ahead usage.
2636 (Look-Ahead Tokens): When discussing yychar, don't call it the
2637 `current' look-ahead, and do mention yylval and yylloc.
2638 (Error Recovery): Cross-reference `Action Features' when mentioning
2639 yyclearin.
2640 (Bison Symbols): In the yychar entry, don't call it the `current'
2641 look-ahead.
2642 In the yylloc and yylval entries, mention look-ahead usage.
2643
de366a2f 26442006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
2645
2646 * tests/glr-regression.at: Update copyright year to 2006.
2647
bf70fa87
JD
26482006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2649
2650 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2651 use during nondeterministic operation to track which stacks have
2652 actually needed the current lookahead.
2653 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2654 Allocate, deallocate, resize, and otherwise shuffle space for
2655 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2656 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2657 appropriately during nondeterministic operation.
2658 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2659 members to store the current lookahead to be used by the deferred
2660 user action.
2661 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2662 from which the RHS is taken. Set the lookahead members of the new
2663 yySemanticOption according to the lookahead status for stack yyk.
2664 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2665 yyaddDeferredAction.
2666 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2667 members of yySemanticOption before invoking yyuserAction, and then set
2668 them back to their current values afterward.
2669 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2670 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2671 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2672 titles for consistency.
2673 (Leaked merged semantic value if user action cuts parse): In order to
2674 suppress lint warnings, use arguments in merge function, and assign
2675 char value < 128 in main.
2676 (Incorrect lookahead during deterministic GLR): New test case.
2677 (Incorrect lookahead during nondeterministic GLR): New test case.
2678
05449a2c
JD
26792006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2680
de366a2f 2681 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
2682 !yyvaluep as signal that no semantic value is available to print.
2683 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2684 to print a semantic value.
2685
4158e0a1 26862006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 2687
4158e0a1
JD
2688 * tests/glr-regression.at: For consistency with my newer test cases,
2689 don't thank myself.
2690
d659304d
JD
26912006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2692
2693 * data/glr.c (yyresolveValue): When merging semantic options, if at
2694 least one user action succeeds but a later one cuts the parse, then
2695 destroy the semantic value before returning rather than leaking it.
2696 (yyresolveStates): If a user action cuts the parse and thus
2697 yyresolveValue fails, ignore the (unset) semantic value rather than
2698 corrupting the yyGLRState, and empty the semantic options list since
2699 the user actions should have called all necessary destructors.
2700 Simplify code with YYCHK.
2701 * tests/glr-regression.at (Corrupted semantic options if user action
2702 cuts parse): New test case.
2703 (Undesirable destructors if user action cuts parse): New test case.
2704 Before applying any of this patch, this test case never actually failed
2705 for me... but only because the corrupted semantic options usually
2706 masked this bug.
2707 (Leaked merged semantic value if user action cuts parse): New test
2708 case.
2709
6ec2c0f2
AD
27102006-01-05 Akim Demaille <akim@epita.fr>
2711
2712 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2713
1b9c21fb
PE
27142006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2715
2716 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2717 _MSC_VER. Problem reported by Cenzato Marco.
2718 (b4_c_function_def): Use it.
2719 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2720 b4_c_modern.
2721 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2722 than rolling our own.
2723
84866159
AD
27242006-01-04 Akim Demaille <akim@epita.fr>
2725
2726 Also warn about non-used mid-rule values.
2727 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2728 member.
2729 (symbol_list_new): Adjust.
2730 * src/reader.c (symbol_typed_p): New.
2731 (grammar_rule_check): Use it.
2732 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2733 Check its rule.
2734 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2735 Use it.
2736 * tests/actions.at (Exotic Dollars): Adjust.
2737
378f4bd8
AD
27382006-01-04 Akim Demaille <akim@epita.fr>
2739
2740 * src/reader.c (grammar_midrule_action): If $$ is set in a
2741 mid-rule, move the `used' bit to its lhs.
2742 * tests/input.at (Unused values): New.
2743 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2744
e2a21b6f
PE
27452006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2746
54662697
PE
2747 * doc/bison.texinfo (Bison Options): Say more accurately what
2748 --yacc does.
2749 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2750 about declarations in the grammar when in Yacc mode, as POSIX does
2751 not require a diagnostic when the grammar uses extensions.
2752
2753 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2754
073f9288
PE
2755 Warn about dubious constructions like "%token T T".
2756 Reported by twlevo.
2757 * src/symtab.h (struct symbol.declared): New member.
2758 * src/symtab.c (symbol_new): Initialize it to false.
2759 (symbol_class_set): New arg DECLARING, specifying whether
2760 this is a declaration that we want to warn about, if there
2761 is more than one of them. All uses changed.
2762
1221b78a
PE
2763 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2764 Allow multiple %union directives, whose contents concatenate.
2765 * src/parse-gram.y (grammar_declaration): Likewise.
2766 Use muscle_code_grow, so that we don't need stype_line any more.
2767 All uses changed.
2768
2769 * src/muscle_tab.c (muscle_grow): Fix comment.
2770
e2a21b6f
PE
2771 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2772 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2773 Update copyright year to 2006.
2774
8f7e3cf9
AD
27752006-01-03 Akim Demaille <akim@epita.fr>
2776
2777 Have glr.cc pass (some of) the calc.at tests.
2778 * data/glr.cc (b4_parse_param_orig): New.
2779 (b4_parse_param): Improve its definition, and bound it more
2780 clearly in the skeleton.
2781 (b4_epilogue): Append, instead of prepending, in order to keep
2782 #line consistency.
2783 Simplify the generation of auxiliary functions: locations and
2784 purity are mandated.
2785 (b4_global_tokens_and_yystype): Honor it.
2786 * data/location.cc (c++.m4): Don't include it.
2787 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2788 and AT_SKEL_CC_IF.
2789 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2790 AT_LALR1_CC_IF.
2791 Be sure to initialize the first position's filename.
2792 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2793 mandated anyway.
2794 (AT_CHECK_CALC_GLR_CC): New.
2795 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2796
3953ed88
AD
27972006-01-02 Akim Demaille <akim@epita.fr>
2798
2799 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2800 c.m4.
0a96ba81 2801 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
2802 * data/glr.cc: Do not include stack.hh.
2803
9ecafbbf
AD
28042006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2805
2806 * data/glr.c: Reformat whitespace with tabs.
2807 (b4_lpure_formals): Remove this unused m4 macro.
2808 * tests/cxx-type.at: Reformat whitespace with tabs.
2809 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2810 since it's a member. Rename type to isNterm for clarity.
2811
c4d497a0
AD
28122005-12-29 Akim <akim@sulaco.local>
2813
2814 Let glr.cc catch up with symbol_value_print.
2815 * data/glr.cc (b4_yysymprint_generate): Replace by...
2816 (b4_yy_symbol_print_generate): this.
2817 (yy_symbol_print, yy_symbol_value_print): Declare them.
2818
4517da37
PE
28192005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2820
2821 * src/location.h (boundary): Note that a line or column equal
2822 to INT_MAX indicates an overflow.
2823 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2824 (rule_length_overflow, increment_rule_length, add_column_width):
2825 New functions.
2826 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2827 (<SC_BRACED_CODE>"}"):
2828 Use increment_rule_length rather than incrementing it by hand.
2829 (adjust_location, handle_syncline): Diagnose overflow.
2830 (handle_action_dollar, handle_action_at):
2831 Fix bug with monstrosities like $-2147483648.
2832 Remove now-unnecessary checks.
2833 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2834 (convert_ucn_to_byte): Verify assumptions.
2835 (handle_syncline): New arg LOC. All callers changed.
2836 Don't store through a value derived from char const * pointer.
2837
2838 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2839 GCC warnings.
2840
e3233bf6
PE
28412005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2842
2843 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2844 Remove unnecessary forward static decls.
2845
8f3596a6
AD
28462005-12-27 Akim Demaille <akim@epita.fr>
2847
2848 * src/reader.c (grammar_current_rule_check): Also check that $$
2849 is used.
2850 Take the rule to check as argument, hence rename as...
2851 (grammar_rule_check): this.
2852 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2853 Rename as...
2854 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2855 (grammar_midrule_action, grammar_symbol_append): Now static.
2856 * tests/torture.at (input): Don't rely on the default action
2857 being always performed.
2858 * tests/calc.at: "Set" $$ even when the action is "cut" with
2859 YYERROR or other.
2860 * tests/actions.at (Exotic Dollars): Instead of using unused
2861 values, check that the warning is issued.
2862
721be13c
PE
28632005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2864
2865 * NEWS: Improve wording for unused-value warnings.
2866
a0af42fc
AD
28672005-12-22 Akim Demaille <akim@epita.fr>
2868
2869 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2870 (b4_yysymprint_generate): Rename as...
2871 (b4_yy_symbol_print_generate): this.
2872 Generate yy_symbol_print instead of yysymprint.
2873 Generate also yy_symbol_value_print, and use it.
2874
affac613
AD
28752005-12-22 Akim Demaille <akim@epita.fr>
2876
721be13c 2877 * NEWS: Warn about unused values.
affac613
AD
2878 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2879 a `used' member.
2880 (symbol_list_n_get, symbol_list_n_used_set): New.
2881 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2882 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2883 * src/reader.c (grammar_current_rule_check): Check that values are
2884 used.
2885 * src/symtab.c (symbol_print): Accept 0.
2886 * tests/existing.at: Remove the type information.
2887 Empty the actions.
2888 Remove useless actions (beware of mid-rule actions: perl -000
2889 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2890 * tests/actions.at (Exotic Dollars): Use unused values.
2891 * tests/calc.at: Likewise.
2892 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2893 Likewise.
2894
2895 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2896 rule_useful_p.
2897
9d9b8b70
PE
28982005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2899
8bb4c753
PE
2900 Undo 2005-12-01 tentative license wording change. The wording is
2901 still being reviewed by the lawyers, and we don't want to wait for
2902 them before publishing a test release. For now, revert to the
2903 previous wording.
2904 * NEWS: Undo 2005-12-01 change.
2905 * data/glr.c: Revert to previous license wording.
2906 * data/glr.cc: Likewise.
2907 * data/lalr1.cc: Likewise.
2908 * data/location.cc: Likewise.
2909 * data/yacc.c: Likewise.
2910
9d9b8b70
PE
2911 * NEWS: Reword %destructor vs YYABORT etc.
2912 * data/glr.c: Use American spacing, for consistency.
2913 * data/glr.cc: Likewise.
2914 * data/lalr1.cc: Likewise.
2915 * data/yacc.c: Likewise.
2916 * data/yacc.c: Reformat comments slightly.
2917 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2918 for consistency. Fix some spelling errors and reword recently-included
2919 text slightly.
2920 * tests/cxx-type.at: Cast results of malloc, for C++.
2921
2c3b392a
AD
29222005-12-21 Joel E. Denny <address@hidden>
2923
2924 * tests/cxx-type.at: Construct a tree, count the parents of shared
2925 nodes, and free each node once and only once. Previously, the memory
2926 for semantic values was leaked instead.
2927
d6cff4dc
AD
29282005-12-21 Joel E. Denny <address@hidden>
2929
2930 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2931 (yylval, yylloc): If pure, #define to yystackp->yyval and
2932 yystackp->yyloc similar to yychar and yynerrs.
2933 (yyparse): If pure, remove local yylval and yylloc. Add local
2934 yystackp to accommodate pure definitions of yylval and yylloc.
2935 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2936 yylvalp and yyllocp to &yylval and &yylloc.
2937 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2938 namespace. Previously, nerrs and char were missing, but lval and lloc
2939 weren't necessary.
2940 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2941 yylvalp and yyllocp parameters since, if pure, these are now always
2942 accessible through yystackp. If not pure, they are still accessible
2943 globally.
2944 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2945 `if (YYID (N))' to pacify lint.
2946
a85284cf
AD
29472005-12-21 Akim Demaille <akim@epita.fr>
2948
2949 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2950 destroy the RHS symbols of a rule.
2951 * data/yacc.c (yylen): Initialize to 0.
2952 Keep its value to the number of items to possibly shift.
2953 In particular, a regular successful parse that ends on YYFINAL by
2954 a (internal) YYACCEPT must not have yylen != 0.
2955 (yyerrorlab, yyreturn): Pop the RHS.
2956 Reorder a bit to emphasize the `shifting' bits of code.
2957 (YYPOPSTACK): Now accept a number of items to pop.
2958 * data/lalr1.cc: Likewise.
2959 * data/glr.c: Formatting changes.
2960 Use goto instead of fall through.
2961 * doc/bison.texinfo (Destructor Decl): Complete.
2962
d508c281
JMG
29632005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2964
2965 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2966 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2967 * djgpp/config.bat: Replace every occurence of the file name
2968 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2969 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2970 * djgpp/config.sed: Replace every occurence of the file name
2971 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2972 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2973 * djgpp/djunpack.bat: DJGPP specific file.
2974 * djgpp/fnchange.lst: DJGPP specific file.
2975 * djgpp/README.in: Add new information about how to unpack the bison
2976 source on MSDOS and other systems which have 8.3 file name restrictions
2977 using djunpack.bat and fnchange.lst.
2978
3e7a2cd9
PE
29792005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2980
2981 * bootstrap (build_cvs_prefix): Remove; unused.
2982 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2983 when getting gnulib.
2984
29852005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2986
2987 * data/glr.c: Reorder typedef declarations for structs to match order
2988 of struct declarations.
2989 Rename yystack everywhere to yystackp except in yyparse where it's not
2990 a pointer.
2991 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2992 consistency.
2993 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2994 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2995 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2996 lint.
2997
877519f8
PE
29982005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2999
0eca5a39
PE
3000 * tests/sets.at (Accept): Fix typos in regular expression used to
3001 sed out the final state number.
3002
2cec9080
PE
3003 Work around portability problem on Solaris 10: flex-generated
3004 files include <stdio.h> before <config.h>, which messes up
3005 because the latter defines __EXTENSIONS__. Address the problem
3006 by creating two new little files that include <config.h> first,
3007 then include the flex-generated files. Rewrite everyone else
3008 to include <config.h> first, as well.
3009 * lib/timevar.c: Always include "config.h".
3010 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
3011 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
3012 (EXTRA_bison_SOURCES): New macro.
3013 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
3014 * src/system.h: Don't include config.h.
3015 * src/LR0.c: Include <config.h> first.
3016 * src/assoc.c: Likewise.
3017 * src/closure.c: Likewise.
3018 * src/complain.c: Likewise.
3019 * src/conflicts.c: Likewise.
3020 * src/derives.c: Likewise.
3021 * src/files.c: Likewise.
3022 * src/getargs.c: Likewise.
3023 * src/gram.c: Likewise.
3024 * src/lalr.c: Likewise.
3025 * src/location.c: Likewise.
3026 * src/main.c: Likewise.
3027 * src/muscle_tab.c: Likewise.
3028 * src/nullable.c: Likewise.
3029 * src/output.c: Likewise.
3030 * src/parse-gram.y: Likewise.
3031 * src/print.c: Likewise.
3032 * src/print_graph.c: Likewise.
3033 * src/reader.c: Likewise.
3034 * src/reduce.c: Likewise.
3035 * src/relation.c: Likewise.
3036 * src/state.c: Likewise.
3037 * src/symlist.c: Likewise.
3038 * src/symtab.c: Likewise.
3039 * src/tables.c: Likewise.
3040 * src/uniqstr.c: Likewise.
3041 * src/vcg.c: Likewise.
3042
877519f8
PE
3043 * src/parse-gram.y: Fix minor problems uncovered by lint.
3044 (current_lhs, current_lhs_location): Now static.
3045 (current_assoc): Remove unused variable.
3046
3047 Cleanups so that Bison-generated parsers have less lint.
3048 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3049 Prepend /*ARGSUSED*/, for lint's sake.
3050 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3051 definition if 'lint' is defined.
3052 (YYID): New macro (or function, if lint).
3053 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3054 * data/yacc.c: Likewise.
3055 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3056 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3057 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3058 is C++ only.
3059 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3060 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3061 Use YYID(0) rather than 0, for lint.
3062 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3063 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3064
f5228370
PE
30652005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3066
3067 * tests/glr-regression.at
3068 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3069 Close memory leak reported by twlevo.
3070
69ce078b
PE
30712005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3072
6ff99711
PE
3073 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3074 all stacks.
3075 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
3076 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3077 New test case.
3078 (Duplicated user destructor for lookahead): This test now is expected
3079 to succeed.
3080
af3412cd
PE
30812005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3082
32b5b719 3083 * NEWS: Document the following change.
af3412cd
PE
3084 * data/yacc.c: Say "parser skeleton" rather than "file", since
3085 it's no longer just a file.
3086 * data/glr.c: Grant a special exception for C GLR parsers, that
3087 reads like the already-existing exception for C LALR(1) parsers.
3088 * data/glr.cc: Likewise.
3089 * data/lalr1.cc: Likewise.
3090 * data/location.cc: Likewise.
3091 * data/yacc.c: Reword the "written by" statement to clarify that
3092 it was the parser skeleton, not the entire output file.
3093 * data/glr.c: Written by Paul Hilfinger.
3094 * data/glr.cc: Written by Akim Demaille.
3095 * data/lalr1.cc: Likewise.
3096
035aa4a0
PE
30972005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3098
d9963c85
PE
3099 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3100 Fix typos in previous change that broke 'make check'.
3101 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3102 supported in C.
3103 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3104 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3105 We can revert this once things settle down.
3106
035aa4a0
PE
3107 * src/conflicts.c (conflicts_print): Don't print file name twice
3108 when %expect fails because there were no conflicts.
3109 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3110 change.
3111 * tests/conflicts.at (%expect not enough, %expect too much):
3112 (%expect with reduce conflicts): Adjust to new behavior.
3113
31142005-11-18 Akim Demaille <akim@epita.fr>
3115
3116 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3117 errors.
3118 * NEWS: Document this.
3119 * doc/bison.texinfo (Expect Decl): Likewise.
3120
d1ff7a7c
AD
31212005-11-16 Akim Demaille <akim@epita.fr>
3122
3123 Generalize the display of semantic values and locations in traces.
3124 * data/glr.c (yy_reduce_print): Fix indices (again).
3125 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3126 literal integers.
3127 * data/lalr1.cc (yyreduce_print): Rename as...
3128 (yy_reduce_print): this.
3129 Display values and locations.
3130 * data/yacc.c (yy_reduce_print): Likewise.
3131 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3132 (yysymprint): Move higher to be visible from yy_reduce_print).
3133 (yyparse): Adjust.
3134 * tests/calc.at: Adjust the expected length of the traces.
3135
6de5398d
AD
31362005-11-14 Akim Demaille <akim@epita.fr>
3137
3138 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3139 from 1 to N, while values and location start at 0.
3140 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3141
a1373f55
AD
31422005-11-14 Akim Demaille <akim@epita.fr>
3143
3144 * data/glr.c (yy_reduce_print): Fix the $ number.
3145
613d8952
AD
31462005-11-14 Akim Demaille <akim@epita.fr>
3147
3148 "Use" parse parameters.
3149 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3150 * data/glr.c, data/glr.cc: Use them.
3151 * data/glr.c (YYUSE): Have a C++ definition that supports
3152 non-pointer types.
3153
b2741627
AD
31542005-11-14 Akim Demaille <akim@epita.fr>
3155
3156 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3157
5059b5c8
AD
31582005-11-14 Akim Demaille <akim@epita.fr>
3159
42249483
AD
3160 * data/glr.cc: New.
3161 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 3162
4626a15d
AD
31632005-11-12 Akim Demaille <akim@epita.fr>
3164
3165 Let position and location be PODs.
3166 * data/location.cc (position::initialize, location::initialize): New.
3167 (position::position, location::location): Define only if
3168 b4_location_constructors is defined.
3169 * data/lalr1.cc (b4_location_constructors): Define it for backward
3170 compatibility.
3171 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3172
31732005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
3174
3175 * data/lalr1.cc: Move the body of the ctor and dtor into the
3176 parser file (instead of the header).
3177 Wrap the implementations in a "namespace yy".
3178
31792005-11-12 Akim Demaille <akim@epita.fr>
3180
3181 Have glr.c include its header file when created.
3182 * data/glr.c (b4_shared_declarations): New.
3183 Output them verbatim in the parser if !%defines, otherwise
3184 output then in the header file, and include it instead.
3185
1989d947
AD
31862005-11-11 Akim Demaille <akim@epita.fr>
3187
3188 * data/glr.c: Comment changes.
3189
31902005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
3191
3192 When yydebug, report semantic and location values for reductions.
3193 * data/glr.c (yy_reduce_print): Report the semantic values and the
3194 locations.
3195 (YY_REDUCE_PRINT): Adjust.
3196 (yyglrReduce): Use them.
3197 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3198 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3199 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3200 traces.
3201
02998094
AD
32022005-11-10 Akim Demaille <akim@epita.fr>
3203
3204 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3205 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3206 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3207
5210672f
PE
32082005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3209
3210 * m4/cxx.m4, examples/Makefile.am: Don't build
3211 examples/calc++ if no C++ compiler is available. (trivial change)
3212
a8991a1d
AD
32132005-11-09 Akim Demaille <akim@epita.fr>
3214
3215 * src/scan-skel.l: Use a couple of asserts.
3216
36b5e963
AD
32172005-11-03 Akim Demaille <akim@epita.fr>
3218
3219 In some (weird) cases, the final state number is incorrect.
3220 Reported by Alexandre Duret-Lutz.
3221 * src/LR0.c (state_list_append): Remove the computation of
3222 final_state.
3223 (save_reductions): Do it here.
3224 (get_state): Alpha conversion.
3225 (generate_states): Use a for loop.
3226 * src/gram.h (item_number_is_rule_number)
3227 (item_number_is_symbol_number): New.
3228 * src/state.c: Use assert.
3229 * src/system.h: Include assert.h.
3230 * tests/sets.at (Accept): New.
3231
44e7ead1
PH
32322005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3233
3234 * data/glr.c (yyfill): Adjust comment.
36b5e963 3235 (yyresolveAction): Initialize default location properly
44e7ead1
PH
3236 for empty right-hand sides.
3237 (yydoAction): Ditto.
3238 Add comment explaining apparently dead code.
36b5e963
AD
3239 * tests/glr-regression.at
3240 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 3241 New test.
36b5e963 3242
e10a80ee
PE
32432005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3244
3245 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3246 gnulib when interrupted. This fixes some race conditions and
3247 works around some portability problems (one noted by Paul
3248 Hilfinger).
3249
067b32ee
AD
32502005-10-22 Akim <akim@epita.fr>
3251
3252 * Makefile.cfg: Adjust to config -> build-aux.
3253 Reported by twledo.
3254
4b367315
AD
32552005-10-21 Akim Demaille <akim@epita.fr>
3256
3257 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3258 the %parse-params.
3259 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3260 * data/yacc.c (b4_Pure_if): Rename as...
3261 (b4_yacc_pure_if): this.
3262 (YY_SYMBOL_PRINT, yyparse): Adjust.
3263 * doc/bison.texinfo: Formatting changes.
3264
24cc23d9
AD
32652005-10-21 Akim Demaille <akim@epita.fr>
3266
3267 Finish the transition config -> build-aux.
3268 * configure.ac, Makefile.am: Use build-aux.
3269 * config/prev-version, config/announce-gen, config/Makefile.am:
3270 Move to...
3271 * build-aux/prev-version, build-aux/announce-gen,
3272 * build-aux/Makefile.am: here.
3273
d4476375
AD
32742005-10-14 Akim Demaille <akim@epita.fr>
3275
3276 * examples/calc++/test: Use set -x only when VERBOSE.
3277
302c0aee
PE
32782005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3279
3280 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3281 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3282
7625ec2c
AD
32832005-10-13 Akim Demaille <akim@epita.fr>
3284
3285 * src/scan-skel.l: Output the base name parts of the parser and
3286 header file names.
302c0aee 3287 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
3288 additional checks.
3289 Use this to exercise C++ outputs in subdirs.
3290 Reported by Oleg Smolsky.
3291
ba0fe3c7
PE
32922005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3293
3294 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3295 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3296 Problem reported by John P. Hartmann.
3297 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3298 already defined it.
3299
9b8a5ce0
AD
33002005-10-12 Akim Demaille <akim@epita.fr>
3301
3302 * src/parse-gram.y (version_check): Exit 63 to please missing
3303 (stands for "version mismatch).
3304 * tests/input.at, doc/bison.texinfo: Adjust.
3305
4f6e011e
PE
33062005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3307
3308 Work around portability problems with Visual Age C compiler
3309 (xlc and xlC_r) reported by John P. Hartmann.
3310 * data/location.cc (initial_column, initial_line): Remove.
3311 All uses replaced by 0 and 1.
3312 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3313 that xlc complains about.
3314 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 3315 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 3316 as __STDC__.
4d7aa45e
PE
3317 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3318 __STDC_VERSION__. Use it everywhere instead of looking at
3319 __STDC__ and __cplusplus.
4f6e011e 3320
a1b3bf8c
AD
33212005-10-10 Akim Demaille <akim@epita.fr>
3322
3323 * examples/calc++/test: Be quiet unless VERBOSE.
3324
412e44aa
PE
33252005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3326
2a4647a3
PE
3327 * data/c.m4 (yydestruct, yysymprint):
3328 Use YYUSE instead of casting to void.
3329 * data/glr.c (YYUSE): New macro.
3330 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3331 Use it instead of rolling our own.
3332 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3333 (YYCHK1):
3334 Use /*CONSTCOND*/ to suppress lint warnings.
3335 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3336 (YY_STACK_PRINT): Use 'false' not '0'.
3337 (YYUSE): New macro.
3338 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3339 * data/yacc.c (YYUSE): New macro.
3340 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3341 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3342 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3343
3344
412e44aa
PE
3345 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3346 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3347
88c6637f
PE
33482005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3349
2f4f028d
PE
3350 Undo the parts of the unlocked-I/O change that substituted
3351 putc or puts for printf. This might hurt performance a bit,
3352 but some people prefer the printf style.
3353 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3354 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3355 All uses replaced by YYFPRINTF and YYDPRINTF.
3356 * data/yacc.c: Likewise.
3357 * lib/bitset.c (bitset_print): Likewise.
3358 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3359 putc and puts.
3360 * lib/lbitset.c (debug_lbitset): Likewise.
3361 * src/closure.c (print_firsts, print_fderives): Likewise.
3362 * src/gram.c (grammar_dump): Likewise.
3363 * src/lalr.c (look_ahead_tokens_print): Likewise.
3364 * src/output.c (escaped_output): Likewise.
3365 (user_actions_output): Break apart two printfs.
3366 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3367 * src/reduce.c (reduce_print): Likewise.
3368 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3369 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3370
88c6637f
PE
3371 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3372 Use assignments rather than casts-to-void to suppress
3373 unused-variable warnings. This pacifies 'lint'.
3374 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3375 unused-variable warnings.
3376
fb32e373
JMG
33772005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3378
3379 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3380
edb8f44f
PE
33812005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3382
fb9c0b33
PE
3383 Use unlocked I/O for a minor performance improvement on hosts like
3384 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3385 is to use the gnlib unlocked-io module, and to prefer putc and
3386 puts to printf when either will work (since the latter doesn't
3387 come in an unlocked flavor).
3388 * bootstrap (gnulib_modules): Add unlocked-io.
3389 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3390 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3391 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3392 and similarly for puts and putc and printf.
3393 * data/yacc.c: Likewise.
3394 * lib/bitset.c (bitset_print): Likewise.
3395 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3396 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3397 to printf.
3398 * lib/lbitset.c (debug_lbitset): Likewise.
3399 * src/closure.c (print_firsts, print_fderives): Likewise.
3400 * src/gram.c (grammar_dump): Likewise.
3401 * src/lalr.c (look_ahead_tokens_print): Likewise.
3402 * src/output.c (escaped_output): Likewise.
3403 (user_actions_output): Coalesce two printfs.
2f4f028d 3404 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
3405 * src/reduce.c (reduce_print): Likewise.
3406 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 3407 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 3408
edb8f44f
PE
3409 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3410 this confuses xgettext.
3411
b50d2359
AD
34122005-10-02 Akim Demaille <akim@epita.fr>
3413
3414 * bootstrap (gnulib_modules): Add strverscmp.
3415 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3416 * m4/.cvsignore: Add strverscmp.m4.
3417 * src/parse-gram.y (%require): New token, new rule.
3418 (version_check): New.
3419 * src/scan-gram.l (%require): Adjust.
3420 * tests/input.at (AT_REQUIRE): New.
3421 Use it.
3422 * doc/bison.texinfo (Require Decl): New.
3423 (Calc++ Parser): Use %require.
3424
21667f64
AD
34252005-10-02 Akim Demaille <akim@epita.fr>
3426
3427 * data/location.cc: New.
3428
2b81e969
AD
34292005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3430 Akim Demaille <akim@epita.fr>
3431
3432 Make sure -odir/foo.cc creates dir/location.hh etc.
3433 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3434 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3435 (spec_defines_file): Now const.
3436 (dir_prefix): New.
3437 (short_base_name): Remove.
3438 * src/files.c: Adjust.
3439 (dirname.h): Include.
3440 (base_name): Don't prototype it.
3441 (finput): Remove, duplicates gram_in.
3442 (full_base_name, short_base_name): Replace by...
3443 (all_but_ext, all_but_tab_ext): these.
3444 (compute_base_names): Rename as...
3445 (compute_file_name_parts): this.
3446 Update to compute the new variables, including dir_prefix.
3447 Adjust dependencies.
3448 * src/output.c (prepare): Output them.
3449 * src/reader.c: Adjust to use gram_in, not finput.
3450 * src/scan-skel.l (@dir_prefix@): New.
3451
ad6a9b97
JMG
34522005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3453
3454 * lib/subpipe.c: New function end_of_output_subpipe() added
3455 to allow support for non-posix systems. This is a no-op function
3456 for posix systems.
3457
3458 * lib/subpipe.h: New function end_of_output_subpipe() added
3459 to allow support for non-posix systems. This is a no-op function
3460 for posix systems.
3461
3462 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3463 handle the lack of pipe/fork functionality on non-posix systems.
3464
3465 * djgpp/Makefile.maint: DJGPP specific file.
3466
3467 * djgpp/README.in: DJGPP specific file.
3468
3469 * djgpp/config.bat: DJGPP specific configuration file.
3470
3471 * djgpp/config.sed: DJGPP specific configuration file.
3472
3473 * djgpp/config.site: DJGPP specific configuration file.
3474
3475 * djgpp/config_h.sed: DJGPP specific configuration file.
3476
3477 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3478
3479 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3480
fc695704
AD
34812005-10-02 Akim Demaille <akim@epita.fr>
3482
3483 * data/location.cc: New, extract from...
3484 * data/lalr1.cc: here.
3485 (location.hh): Include it after the user prologue, in case the
3486 filename type is defined by the user.
3487 Forward declation location and position before the pre-prologue.
3488 (yyresult_): Rename as...
3489 (yyresult): this, it's a local variable, not an attribute.
3490 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3491
34922005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
3493
3494 * examples/extexi: Restore the #line generation.
3495
fb9712a9
AD
34962005-09-30 Akim Demaille <akim@epita.fr>,
3497 Alexandre Duret-Lutz <adl@gnu.org>
3498
3499 Move the token type and YYSTYPE in the parser class.
3500 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3501 (parser::token): New, from the moved free definition of tokens.
3502 (parser::semantic_value): Now a full definition instead of an
3503 indirection to YYSTYPE.
3504 (b4_post_prologue): No longer included in the header file, but
3505 in the implementation file.
3506 * doc/bison.texi (C+ Language Interface): Update.
3507 * src/parse-gram.y: Support unary %define.
3508 * tests/actions.at: Define global_tokens_and_yystype for backward
3509 compatibility until we update the tests.
3510 * tests/calc.at: Idem.
3511 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3512 to simplify the code.
3513
55f0c7b1
PE
35142005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3515
3516 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3517 Ah, the good old days! Problem reported by Peter Klein.
3518 * bootstrap (gnulib_modules): Add strerror, strtoul.
3519 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3520 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3521
fb9712a9 35222005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
3523
3524 * data/c.m4 (b4_error_verbose_if): New.
3525 * data/lalr1.cc: Use it.
3526 (YYERROR_VERBOSE_IF): Remove.
3527 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3528 parser members, replaced by...
3529 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3530 local variables.
3531 (yysyntax_error_): Takes the state number as argument.
3532 (yyreduce_print_): Use the argument yyrule, not the former
3533 attribute yyn_.
3534
8a6f72f3
PE
35352005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3536
3537 * bootstrap (gnulib_modules): Add verify.
3538 * lib/.cvsignore: Add verify.h.
3539 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3540 * src/system.h (verify): Remove.
3541 Include verify.h instead.
3542 * src/tables.c (tables_generate): Use new API for 'verify'.
3543
0d50976f
PE
35442005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3545
ebc3737e
PE
3546 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3547 local variables whose names begin with 'yy'.
3548 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3549 Trivial changes from Joel E. Denny.
3550
0d50976f
PE
3551 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3552 it itself.
3553 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3554 don't use alloca any more.
3555
3556 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3557 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 3558 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
3559 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3560 to match yacc.c, to test more hosts.
3561
a05b79df
PE
35622005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3563
55289366
PE
3564 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3565 doesn't affect behavior.
3566 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3567 Solaris, AIX, MSC.
3568 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3569 This works a bit better with glibc, if user code has already included
3570 stdlib.h.
3571 * doc/bison.texinfo (Bison Parser): Document that users can't
3572 arbitrarily use malloc and free for other purposes. Document
3573 that <alloca.h> and <malloc.h> might be included.
3574 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3575 user must declare alloca.
3576
a05b79df
PE
3577 * HACKING (release): Forwarn the Translation Project about
3578 stable releses.
3579
3ab2ca22
AD
35802005-09-20 Akim Demaille <akim@epita.fr>
3581
3582 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3583
a9739e7c
PE
35842005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3585
a702593e
PE
3586 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3587 (YYSTACK_ALLOC_MAXIMUM): Use it.
3588 (yysyntax_error): New function.
3589 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3590 multiple syntax errors are reported, and alloca is being used.
3591 Instead, reallocate buffers twice as big each time, so that
3592 we waste at most half the allocated memory. Start with a small
3593 (128-byte) buffer that will suffice in most cases anyway.
3594 Use yysyntax_error to do most of the work.
3595
3596 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3597 yynerrs is the number of errors reported, not the number of
3598 errors encountered.
3599
a9739e7c
PE
3600 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3601 Mark it as expected to fail.
3602 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3603 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3604 Don't start user-code symbols with "yy", to avoid name space problems.
3605
f479c6c6
AD
36062005-09-19 Akim Demaille <akim@epita.fr>
3607
3608 Remove the traits, failed experiment.
3609 It never proved useful, and anyway because of the current
3610 definition, it was not possible to have several specialization of
3611 this traits, making it useless.
3612 * data/lalr1.cc (yy:traits): Remove.
3613 Inline its definitions in the parser class.
3614
e2586f82
AD
36152005-09-19 Akim Demaille <akim@epita.fr>
3616
3617 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3618 least Mac OSX with a /usr/local install of gettext.
3619
2e8cf949
AD
36202005-09-19 Akim Demaille <akim@epita.fr>
3621
3622 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3623 and yytoken for similarity with the other skeletons.
3624
c7fb0b90
AD
36252005-09-19 Akim Demaille <akim@epita.fr>
3626
4e26c69e 3627 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 3628
1bd0deda
PE
36292005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3630
3631 * NEWS: Version 2.1.
3632
3633 * NEWS: Remove notice of yytname change, since it was never in an
3634 official release.
3635 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3636 diagnostic.
3637 * src/output.c (prepare): Likewise.
3638 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3639 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3640 is not defined. This is an awful hack, but it's enough for now.
3641 All callers changed.
3642 * tests/glr-regression-at (make_value): Args are const pointers now,
3643 to avoid GCC warning.
3644 (Duplicated user destructor for lookahead): New test. Currently
3645 skipped. It fails on my host but I'm not sure it'll always fail.
3646
36472005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
3648
3649 * src/symtab.h (struct symbol): Declare the printer and destructor
3650 as const, to avoid accidental calls to free.
3651 (symbol_destructor_set, symbol_printer_set): Adjust.
3652 * src/symtab.c: Adjust.
3653
1bd0deda 36542005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
3655
3656 * data/c.m4 (b4_token_enums): New.
3657 (b4_token_defines): Rename as...
3658 (b4_token_enums_defines): this.
3659 (b4_token_defines): New, output only the #defines.
3660 * data/yacc.c, data/glr.c: Adjust.
3661 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3662 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3663 as default values.
3664
dbcdae2d
AD
36652005-09-16 Akim Demaille <akim@epita.fr>
3666
3667 * data/lalr1.cc (yylex_): Remove, inline its code.
3668 (yyreport_syntax_error_): Remove, replaced by...
3669 (yysyntax_error_): this which returns a string and leaves to the
3670 caller the call to the users' error function.
3671 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3672 Move from members of the parser object...
3673 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3674 to local variables of the parse function.
3675
70d8f291
AD
36762005-09-16 Akim Demaille <akim@epita.fr>
3677
3678 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3679 since it's in Bison's name space.
3680
b47dbebe
PE
36812005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3682
ae199bf1
PE
3683 * data/glr.c (yyresolveValue): Add default case to pacify
3684 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3685
b47dbebe
PE
3686 * NEWS: Document when yyparse started to return 2.
3687 * doc/bison.texinfo (Parser Function): Document when yyparse
3688 returns 2.
3689
3690 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3691 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3692 changed.
3693 (class position): file_name -> filename (reverting). All uses changed.
3694
36952005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3696
3697 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3698 do anything if $@ exists. This reverts part of the 2005-07-07
3699 patch.
3700
00292f66
PE
37012005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3702
3703 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3704 contains obsolete information and isn't worth distributing as a
3705 separate file anyway.
3706 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3707 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3708 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3709 (yyparse): Abort if user code uses longjmp to throw an unexpected
3710 value.
3711
a420f962
PE
37122005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3713
00292f66
PE
3714 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3715 Suggested by twlevo@xs4all.nl.
3716
127287e9
PE
3717 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3718 This avoids a diagnostic from gcc -Wswitch-enum.
3719 Problem reported by twlevo@xs4all.nl.
3720
a420f962
PE
3721 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3722 standards. Use "file name" or "file" or "name", depending on
3723 the context.
3724 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3725 not to hack/foo.tab.c.
3726 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
3727 * data/glr.c: b4_filename -> b4_file_name.
3728 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3729 All uses changed.
3730 (class position): filename -> file_name. All uses changed.
3731 * data/yacc.c: b4_filename -> b4_file_name.
3732 * lib/bitset.h: filename -> file_name in local vars.
3733 * lib/bitset_stats.c: Likewise.
3734 * src/files.c: Likewise.
3735 * src/scan-skel.l ("@output ".*\n): Likewise.
3736 * src/files.c (file_name_split): Renamed from filename_split.
3737 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
3738
37392005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3740
3741 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3742 to accommodate latest gnulib.
3743
3744 * tests/glr-regression.at (Duplicate representation of merged trees):
3745 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3746
3747 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3748 needed.
3749
42a6501d
PE
37502005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3751
3752 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3753 All uses changed. Invoke user destructor after an error during a
3754 split parse (trivial change from Joel E. Denny).
3755
3756 * tests/glr-regression.at
3757 (User destructor after an error during a split parse): New test case.
3758 Problem reported by Joel E. Denny in:
3759 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3760
ef9a1faf
PE
37612005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3762
5b4aaf78
PE
3763 * README-cvs: Give URLs for recommended tools.
3764 Mention Gzip version problem, and bootstrapping issues.
3765 Remove troubleshooting section, as it's somewhat obsolete.
3766
b5240ba5
PE
3767 * bootstrap (no_cache): New var, to accommodate different wget
3768 variants. Use it instead of '-C off'. Problem reported by
3769 twlevo@xs4all.nl.
3770
ef9a1faf
PE
3771 * data/glr.c (yydestroyStackItem): New function.
3772 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3773 debugging information. Problem reported by Joel E. Denny.
3774
e6efa9da
AD
37752005-08-25 Akim Demaille <akim@epita.fr>
3776
3777 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3778
adc90f13
PE
37792005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3780
3781 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3782 Don't invoke destructor on unresolved entries.
3783 * tests/glr-regression.at
3784 (User destructor for unresolved GLR semantic value): New test case.
3785 Problem reported by Joel E. Denny in:
3786 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3787
f9315de5
PE
37882005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3789
15d29c1f
PE
3790 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3791 Add strnlen.c.
3792 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3793 lib-prefix.m4, po.m4.
3794
dd5f2af2
PE
3795 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3796 in yydestruct diagnostic, since it might not be an error.
3797 Problem reported by Joel Denny near end of
3798 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 3799 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
3800 * data/yacc.c (yyreturn): Likewise.
3801 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3802
3803 * src/files.c: Remove obsolete FIXME comment.
3804
3805 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3806 with the other templates, and to fix bogus run-on messages such
3807 as the one reported at the end of
3808 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3809 All callers changed to avoid the newline.
3810 (yyprocessOneStack): Output two lines rather than one, to accommodate
3811 the above change. This changes the debug output format slightly.
3812
f9315de5
PE
3813 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3814 reported by Joel E. Denny in
3815 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3816 (trivial change).
3817 * tests/glr-regression.at (Duplicate representation of merged trees):
3818 New test, from Joel E. Denny in:
3819 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3820 * THANKS: Add Joel E. Denny.
3821
3822 * configure.ac (AC_INIT): Bump to 2.0c.
3823
04098407
PE
38242005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3825
3826 * NEWS: Version 2.0b.
3827
ca5d2013
PE
3828 * Makefile.am (SUBDIRS): Put examples before tests, so that
3829 "make check" doesn't finish with "All 1 tests passed".
3830
3d54b576
PE
3831 * tests/regression.at (Token definitions): Don't rely on
3832 AT_PARSER_CHECK for data that contains backslashes. It currently
3833 uses 'echo', and 'echo' isn't portable if its argument contains
3834 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3835 that the byte '\0xff' is not printable in the C locale; it is,
3836 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3837 not printable, so use '\0x81' to test.
3838
d53ae497
PE
3839 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3840 version of GCC, since the macro is used with non-GCC compilers.
3841
fc01665e
PE
3842 Fix core dump reported by Pablo De Napoli in
3843 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3844 * tests/regression.at (Invalid inputs with {}): New test.
3845 * src/parse-gram.y (token_name): Translate type before using
3846 it as an index.
3847
04098407
PE
3848 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3849 the user's name space. All uses changed to __attribute__
3850 ((__unused__)).
3851 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3852 Add __attribute__ ((__noreturn__)).
3853
3854 * etc/clcommit: Remove. We weren't using it, and it failed
3855 "make maintainer-distcheck".
3856 * Makefile.maint: Merge from coreutils.
3857 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3858 (syntax-check-rules): Change list of rules as described below.
3859 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3860 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3861 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3862 (sc_trailing_space): New rules.
3863 (sc_xalloc_h_in_src): Remove.
3864 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3865 (sc_space_tab, sc_error_exit_success, sc_changelog):
3866 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3867 (makefile-check, po-check, author_mark_check):
3868 (makefile_path_separator_check, copyright-check):
3869 Use grep -n, to make it easier to find violations.
3870 Use CVS_LIST and CVS_LIST_EXCEPT.
3871 (header_regexp, h_re): Remove.
3872 (dd_c): New macro.
3873 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3874 (my-distcheck): Use more-modern GCC flags.
3875 (signatures, %.asc): Remove.
3876 (rel-files, announcement): Remove signatures.
3877 Restore old updating code, even though we don't use it, so
3878 that we're the same as coreutils.
3879 (alpha, beta, major): Depend on news-date-check.
3880 Make the upload commands.
3881
3882 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3883 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3884 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3885 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3886 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3887 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3888 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3889 * tests/sets.at: Likewise.
3890
3891 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3892 we comment out the Autoconf version number.
3893 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3894 it's error-prone and "make maintainer-distcheck" rejects it.
3895
3896 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3897 Indent calls to "error" to pacify "make maintainer-distcheck",
3898 when the calls are not intended to be translated.
3899 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3900
3901 * src/Makefile.am (DEFS): Use +=, to pacify
3902 "make maintainer-distcheck".
3903 (bison_SOURCES): Add scan-skel.h.
3904 (sc_tight_scope): New rule, from coreutils.
3905
3906 * src/files.c (src_extension, header_extension):
3907 Now static, not extern.
3908 * src/getargs.c (short_options): Likewise.
3909 * src/muscle_tab.c (muscle_table): Likewise.
3910 * src/parse-gram.y (current_class, current_type, current_prec):
3911 Likewise.
3912 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3913 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3914 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3915 void, to avoid warning when NLS is disabled.
3916 * src/output.c: Include scan-skel.h.
3917 (scan_skel): Remove decl, since scan-skel.h does this.
3918 (output_skeleton):
3919 Indent calls to "error" to pacify "make maintainer-distcheck".
3920 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3921 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3922 "make maintainer-distcheck".
3923 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3924 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3925 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3926 (skel_lex_destroy, scan_skel): Move these decls to...
3927 * src/scan-skel.h: New file.
3928 * src/uniqstr.c (uniqstr_assert):
3929 Indent calls to "error" to pacify "make maintainer-distcheck".
3930
3931 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3932 not @VAR@.
3933
3934 * tests/torture.at: Revamp to avoid misuse of atoi that
3935 "make maintainer-distcheck" complained about.
3936
3937 * examples/extexi (message): Don't print a message more than once,
3938 and omit line-number decoration that makes Emacs compile think
3939 that informative messages are worth worrying about.
3940
39412005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3942
3943 * configure.ac: Update version number.
3944
3945 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3946 accidentally.
3947 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3948 autogenerated by the maintainer.
3949 * examples/calc++/.cvsignore: Add *.yy.
3950
3951 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3952 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3953 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3954
3955 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3956
3957 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3958 from maintainer-distcheck about casting the argument of 'free'.
3959
3960 * NEWS: Mention recent yytname changes.
3961 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3962
3963 * bootstrap: For translations that have not yet been upgraded to
3964 the new runtime-po domain, prime the pump by extracting the
3965 relevant strings from the obsolete translations. This code can be
3966 removed once the bison-runtime domain has been translated by each
3967 team.
3968
3969 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3970 now that token names are already quoted.
3971
3972 Fix problem reported by Anthony Heading.
3973 * data/glr.c (YYTOKEN_TABLE): New macro.
3974 (yytname): Define if YYTOKEN_TABLE.
3975 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3976 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3977 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3978 * src/output.c (prepare_symbols): Output token_table_flag.
3979
0ffda363
PE
39802005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3981
3982 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3983 again if the first call fails.
3984
3985 * data/glr.c (yytnamerr): New function.
3986 (yyreportSyntaxError): Use it to dequote most string literals.
3987 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3988 with other skeletons. All uses changed.
3989 (yytnameerr_): New function.
3990 (yyreport_syntax_error): Use it to dequote most string literals.
3991 * data/yacc.c (yytnamerr): New function.
3992 (yyerrlab): Use it to decode most string literals.
3993 * doc/bison.texinfo (Decl Summary, Calling Convention):
3994 Clarify quoting convention of yytname.
3995 * src/output.c (prepare_symbols): Quote all names. This undoes
3996 the 2005-04-17 change, which is now accomplished (mostly) via
3997 changes in the parsers as described above.
3998 * tests/regression.at (Token definitions, Web2c Actions):
3999 Undo most 2005-04-17 change here, too.
4000
40012005-07-20 Paul Eggert <eggert@cs.ucla.edu>
4002
4003 Fix more problems reported by twlevo@xs4all.nl.
4004 * tests/cxx-type.at: Don't pipe output of ./types through sed to
4005 remove trailing spaces. This loses the exit status of ./types,
4006 and isn't needed since ./types shouldn't be emitting trailing
4007 spaces.
4008 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
4009 as the stack isn't valid in that case.
4010
4011 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4012 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4013 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4014 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
4015 is used.
4016 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
4017 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4018 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4019 Likewise.
4020
4021 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
4022 overly-picky compilers that reject 'char *foo = "bar";'.
4023
4024 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
4025 to FILE * parameter, not to stderr. This fixes a typo introduced
4026 in the 2005-07-12 change.
4027
4028 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
4029 warnings from GCC 4.
4030
4031 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
4032 (yyglrShiftDefer, yysplitStack):
4033 Remove unused parameters b4_pure_formals. All uses changed.
4034 (yyglrShift): Remove unused parameters b4_user_formals.
4035 All uses changed.
4036 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4037
6100a9aa
PE
40382005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4039
258b75ca
PE
4040 Destructor cleanups and regularization among the three skeletons.
4041 * NEWS: Document the behavior changes.
4042 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4043 stack before failing, as the cleanup code will do it for us now.
4044 * data/lalr1.cc (yyerrlab): Likewise.
4045 * data/glr.c (yyparse): Pop everything off the stack before
4046 freeing it, so that destructors get called properly.
4047 * data/lalr1.cc (yyreturn): Likewise.
4048 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4049 This is more consistent.
4050 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4051 why destructors might be called. 1.875 -> 2.1.
4052 (Destructor Decl, Decl Summary, Table of Symbols):
4053 Some English-language cleanups for %destructor.
4054 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4055 Add output line for destructor of start symbol.
4056 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4057 because of that same extra output line.
4058
1a059451
PE
4059 * NEWS: Document minor wording changes in diagnostics of
4060 Bison-generated parsers.
4061 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4062 Remove unused formals. All uses changed.
4063 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4064 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4065 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4066 Rename yyoverflowab to yyexhaustedlab.
4067 When memory exhaustion occurs during syntax-error reporting,
4068 report it separately rather than in a single diagnostic; this
4069 eases translation.
4070 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4071 (Memory Exhausted): Renamed from Parser Stack Overflow.
4072 Revamp wording slightly to prefer "memory exhaustion".
4073 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4074
97460c78
PE
4075 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4076
30757c8c
PE
4077 Add i18n support to the GLR skeleton. Partially fix the C++
4078 skeleton; a C++ expert needs to finish this. Remove debugging
4079 msgids; there's little point to having them translated, since they
4080 can be understood only by someone who can read the
4081 (English-language) source code.
4082
4083 Generate runtime-po/bison-runtime.pot automatically, so that we
4084 don't have to worry about garbage getting in that file. We'll
4085 make sure after the next official release that old msgids don't
4086 get lost. See
4087 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4088
4089 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4090 Now auto-generated.
4091 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4092 Fix typos in explanations of the runtime file.
4093 * bootstrap: Change gettext keyword from YYI18N to YY_.
4094 Use standard Makefile.in.in in runtime-po, since we'll arrange
4095 for backward-compatible bison-runtime.po files in a different way.
4096 * data/glr.c (YY_): New macro, from yacc.c.
4097 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4098 Translate messages intended for users.
4099 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4100 the wording in the other skeletons. We don't know that the memory
4101 is virtual.
4102 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4103 Use same method that yacc.c uses.
4104 Don't translate debugging messages.
4105 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4106 it doesn't work (yet), and requires C++ expertise to fix.
4107 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4108 Move defn to a more logical place, to be consistent with other
4109 skeletons.
4110 Don't translate debugging messages.
4111 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4112 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4113 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4114 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4115
ac8c5689
PE
4116 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4117 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4118 void, not int.
4119 * tests/glr-regression.at (Badly Collapsed GLR States):
4120 Likewise.
4121 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4122 yylex should return 0 at EOF rather than aborting.
4123
6100a9aa
PE
4124 Improve tests for stack overflow in GLR parser.
4125 Problem reported by twlevo@xs4all.nl.
4126 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4127 All uses removed.
4128 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4129 can handle the problem.
4130 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4131 (yyparse): New local variable yyresult to record the result.
4132 Use result of setjmp to set it, rather than storing itinto
4133 struct.
4134 (yyDone): Remove label.
4135 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4136 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4137 if YYABORT is used).
4138 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4139 yyparse status; put status > 1 into diagnostic.
4140 Check that status==2 works.
4141 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4142 Use exit status 3 for failure to open (which shouldn't happen).
4143
15f40952
PE
41442005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4145
67fd79c4
PE
4146 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4147 1 on syntax error; just let yyparse do its thing.
4148 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4149 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4150 (Exploding the Stack Size with Alloca):
4151 (Exploding the Stack Size with Malloc):
4152 Expect exit status 2, not 1, since the parser is supposed to blow
4153 its stack. Problem reported by twlevo@xs4all.nl.
4154
15f40952
PE
4155 * data/glr.c (yyparse): Don't assume that the initial calls
4156 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4157 Print a stack-overflow message and fail instead.
4158 Initialize the line-number information before creating the stack,
4159 so that the stack-overflow message can report line zero safely.
4160
f32c66b5
PE
41612005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4162
a22ff96f 4163 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
4164 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4165 (yyuserMerge): Provide a default case if b4_mergers is empty.
4166 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4167 * tests/glr-regression.at
4168 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 4169 Add casts to pacify C++ compilers.
1beb0b24
PE
4170 * tests/glr-regression.at (Improper merging of GLR delayed action
4171 sets): Declare yylex before using it.
f32c66b5 4172 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
4173 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4174 test for valgrind; valgrind is independent of g++.
4175 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4176 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4177 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4178 Use a destructor, so that we can expand the stack. Change
4179 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 4180
d741bd1b
PE
41812005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4182
4183 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4184 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4185
0410a6e0
PE
41862005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4187
4188 * PACKAGING: New file, suggested by Bruno Haible and taken from
4189 similar wording in gettext's PACKAGING file.
4190 * NEWS: Mention PACKAGING.
4191 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4192
f7ab6a50
PE
41932005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4194
baf785db 4195 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
4196 * bootstrap: Get runtime translations into runtime-po.
4197 Create runtime-po files automatically, if possible.
4198 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4199 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4200 does not infringe on the user's name space.
4201 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4202 * doc/bison.texinfo (Internationalization): Revamp the English
4203 and Texinfo syntax a bit, to try to make it clearer.
4204 (Bison Options, Option Cross Key): Mention --print-localedir.
4205 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4206 YYENABLE_NLS. Quote a bit more.
4207 * runtime-po/.cvsignore: New file.
4208 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4209 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4210 * runtime-po/quot.sed: Likewise.
4211 * runtime-po/boldquot.sed: Likewise.
4212 * runtime-po/en@quot.header: Likewise.
4213 * runtime-po/en@boldquot.header: Likewise.
4214 * runtime-po/insert-header.sin: Likewise.
4215 * runtime-po/remove-potcdate.sin: Likewise.
4216 * runtime-po/Makevars: Likewise.
4217 * runtime-po/LINGUAS: Likewise.
4218 * runtime-po/de.po: Likewise; we will rely on the translation project
4219 to maintain this, so "bootstrap" should get it.
0410a6e0 4220 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
4221 its value.
4222 * src/main.c (main): Bind the bison-runtime domain, too.
4223
42242005-07-12 Bruno Haible <bruno@clisp.org>
4225
4226 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4227 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4228 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4229 * runtime-po: New directory.
4230 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4231 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4232 * runtime-po/Rules-quot: New file, copied from po/.
4233 * runtime-po/quot.sed: Likewise.
4234 * runtime-po/boldquot.sed: Likewise.
4235 * runtime-po/en@quot.header: Likewise.
4236 * runtime-po/en@boldquot.header: Likewise.
4237 * runtime-po/insert-header.sin: Likewise.
4238 * runtime-po/remove-potcdate.sin: Likewise.
4239 * runtime-po/Makevars: New file.
4240 * runtime-po/POTFILES.in: New file.
4241 * runtime-po/LINGUAS: New file.
4242 * runtime-po/bison-runtime.pot: New file.
4243 * runtime-po/de.po: New file.
4244 * m4/bison.m4: New file.
4245 * Makefile.am (SUBDIRS): Add runtime-po.
4246 (aclocaldir, aclocal_DATA): New variables.
4247 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4248 Define aclocaldir.
4249 * src/getargs.c (usage): Document --print-localedir option.
4250 (PRINT_LOCALEDIR_OPTION): New enum item.
4251 (long_options): Add --print-localedir option.
4252 (getargs): Handle --print-localedir option.
4253 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4254 (Internationalization): New section.
4255
22dda0f0
AD
42562005-07-12 Akim Demaille <akim@epita.fr>
4257
4258 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4259 for consistency with the rest of the code.
4260 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4261 Add separators.
4262
82b248ad
AD
42632005-07-12 Akim Demaille <akim@epita.fr>
4264
4265 * src/parse-gram.y: Use %printer instead of YYPRINT.
4266
fa0e9314
AD
42672005-07-12 Akim Demaille <akim@epita.fr>
4268
867a3e00
AD
4269 * src/symtab.h, src/symtab.c (symbol_print): New.
4270 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4271 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4272
42732005-07-12 Akim Demaille <akim@epita.fr>
4274
4275 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
4276 b4_at_dollar and b4_dollar_dollar.
4277
e054b190
PE
42782005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4279
4280 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4281 and Pennello's paper.
4282
34160ec4
PE
42832005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4284
407d4a75
PE
4285 * data/yacc.c (yyparse): Undo previous patch. Instead,
4286 set yylsp[0] and yyvsp[0] only if the initial action
4287 sets yylloc and yylval, respectively.
4288
34160ec4
PE
4289 * data/yacc.c (yyparse): In the initial action, set
4290 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4291 This avoids the use of undefined variables if the initial
4292 action does not set yylloc and/or yylval.
4293
c3d5a4a7
PE
42942005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4295
b34d96c1
PE
4296 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4297 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4298 Remove from CVS. These files are automatically generated.
4299 * examples/extexi: Clarify that this file is now part of Bison,
4300 not GNU M4, and that it works with any POSIX-compatible Awk.
4301 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4302 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4303 so that we also get calc++-parser.yy. Geneate it.
4304 Use $(AWK), not gawk, since any conforming Awk will do.
4305 Put comment before action, since older 'make' can't handle comment
4306 in action.
4307 $(BUILT_SOURCES): List all built sources, not just some of them.
4308 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4309 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4310 $($(calc_sources_generated)): Remove unnecessary test for existence
4311 of target. (This had a shell syntax error anyway; a stray "x".)
4312 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4313 calc++-parser.yy.
4314 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4315
c3d5a4a7
PE
4316 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4317 implied by the other modules.
4318
828c373b
AD
43192005-07-06 Akim Demaille <akim@epita.fr>
4320
4321 Bind examples/calc++ to the package.
4322 * examples/calc++/Makefile: Remove, replaced by...
4323 * examples/calc++/Makefile.am: ... this new file.
4324 * examples/calc++/test: Remove input.
4325 * examples/calc++/compile: Remove.
4326 * examples/Makefile.am: New.
4327 * configure.ac, Makefile.am: Adjust.
4328 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4329
63cb01d6
PE
43302005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4331
fd2df2ed
PE
4332 * data/glr.c (yyFail): Drastically simplify; since the format argument
4333 never had any % directives, we can simply pass it to yyerror.
4334 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4335 be modified later, as that is the usual style in glr.c.
4336 Problems reported by Paul Hilfinger.
4337
63cb01d6
PE
4338 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4339 and size overflow errors.
4340 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4341 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4342 (YYSIZEMAX): New macro.
4343 (yystpcpy): New function, taken from yacc.c.
4344 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4345 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4346 so that we don't have to maintain their signatures.
4347 (yyFail): Check for buffer overflow, by using vsnprintf rather
4348 than vsprintf. Allocate a bigger buffer if possible.
4349 Report an error if buffer allocation fails.
4350 (yyStackOverflow): New function.
4351 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4352 the initialization was successful. It might fail if storage was
4353 exhausted.
4354 (yyexpandGLRStack): Add more checks for storage allocation failure.
4355 Use yyStackOverflow to report failures.
4356 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4357 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4358 Don't assume stack number fits in int.
4359 (yysplitStack): Check for storage allocation failure.
4360 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4361 can print diagnostics on storage allocation failure. All callers
4362 changed.
4363 (yyresolveValue): Use yybool for boolean.
4364 (yyreportSyntaxError): Check for size-calculation overflow.
4365 This code is taken from yacc.c.
4366 (yyparse): Check for storage allocation errors when allocating
4367 the initial stack.
4368
1c59e0a1
AD
43692005-07-05 Akim Demaille <akim@epita.fr>
4370
4371 Extract calc++ from the documentation.
4372 * doc/bison.texinfo (Calc++): Add the extraction marks.
4373 * examples/extexi: New, from the aborted GNU Programming 2E.
4374 Separate the different paragraph of a file with empty lines.
4375 * examples/Makefile: Use it to extract the whole calc++ example.
4376
8a0adb01
AD
43772005-06-24 Akim Demaille <akim@epita.fr>
4378
4379 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4380 class typedefs.
4381
12545799
AD
43822005-06-22 Akim Demaille <akim@epita.fr>
4383
4384 * doc/bison.texinfo (C++ Language Interface): First stab.
4385 (C++ Parsers): Remove.
4386
99be0235
AD
43872005-06-22 Akim Demaille <akim@epita.fr>
4388
4389 * data/lalr1.cc (yylex_): Honor %lex-param.
4390
0ffd4fd1
AD
43912005-06-22 Akim Demaille <akim@epita.fr>
4392
4393 Start a set of simple examples.
4394 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4395 * examples/calc++/calc++-driver.hh,
4396 * examples/calc++/calc++-parser.yy,
4397 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4398 * examples/calc++/compile, examples/calc++/test: New.
4399
0925ebb4
PE
44002005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4401
4402 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4403 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4404 which stems from the 2005-05-27 patch.
4405
43d3b664
PH
44062005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4407
4408 * data/glr.c: Modify treatment of unused parameters to permit use
4409 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4410
3062864d
PE
44112005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4412
4413 Fix infringement on user name space reported by Janos Zoltan Szabo.
4414 * data/yacc.c (yyparse): strlen -> yystrlen.
4415
989b5b8e
AD
44162005-05-30 Akim Demaille <akim@epita.fr>
4417
4418 * data/lalr1.cc (_): New.
4419 Translate the various messages.
4420
bedf57f5
PE
44212005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4422
4423 Fix infringement on user name space reported by Bruno Haible.
4424 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4425 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4426 the user's name space.
4427 (alloca): Include <stdlib.h> to get it, if it's not built in.
4428 (YYMALLOC, YYFREE): Define only if needed.
4429 (malloc, free): Declare, but only if needed, as this infringes on
4430 the user name space.
4431
4d1801f1
PE
44322005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4433
4434 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4435 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4436 with %d format.
4437 * lib/ebitset.c (min, max): Undef before defining.
4438 * lib/vbitset.c (min, max): Likewise.
4439 * lib/subpipe.c (create_subpipe): Save local variables in case
4440 vfork clobbers them.
4441
44422005-05-24 Bruno Haible <bruno@clisp.org>
4443
4444 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4445 error message syntax used by gcc-4.0.
4446
b94a9e1e
PE
44472005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4448
85ac3861
PE
4449 * README: Mention m4 1.4.3. Remove obsolete advice about
4450 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4451
b94a9e1e
PE
4452 * bootstrap: Remove workaround for problem I encountered with
4453 gettext 0.14.1; it seems to be fixed now.
4454
51c30d21
PE
44552005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4456
009ce67d
PE
4457 * NEWS: Version 2.0a.
4458
f2a97c62
PE
4459 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4460 the previous change.
4461
c8775f93
PE
4462 Various maintainer cleanups.
4463 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4464 conftest*, for benefit of CVS commands run at the same time as
4465 "configure". Add build-aux, since "bootstrap" now creates it and
4466 its subfiles.
4467 * Makefile.cfg (move_if_change): Remove.
4468 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4469 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4470 (po_repo, do-po-update, po-update, wget_files, get-targets):
4471 (config.guess-url_prefix, config.sub-url_prefix):
4472 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4473 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4474 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4475 Remove.
4476 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4477 this is now the recommended name.
4478 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4479 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4480 ylwrap. These files now go into build-aux.
4481 * config/move-if-change: Remove.
4482 * config/prev-version.txt: Bump from 1.75 to 2.0.
4483
3ea5f0ec
PE
4484 * bootstrap: Add stdio-safer, unistd-safer modules.
4485 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4486 we don't need it).
4487 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4488 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4489 * lib/subpipe.c: Include "unistd-safer.h".
4490 (create_subpipe): Make sure all the newly-created
4491 file descriptors are > 2, so that diagnostics don't
4492 get sent down them (which might cause Bison to hang, in theory).
4493 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4494 * src/files.c (xfopen): Use fopen_safer, not fopen.
4495
51c30d21
PE
4496 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4497 yesterday's yacc.c fix.
4498
cea1469d
PE
44992005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4500
3ea5f0ec
PE
4501 * data/glr.c, data/lalr1.cc: Update copyright date.
4502
cea1469d
PE
4503 Fix a destructor bug reported by Wolfgang Spraul in
4504 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4505 * data/yacc.c (yyabortlab): Don't call destructor, and
4506 don't set yychar to EMPTY.
4507 (yyoverflowlab): Don't call destructor.
4508 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4509 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4510 since we no longer output the message "discarding lookahead token
4511 end of input ()".
4512
5e6f62f2
PH
45132005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4514
4515 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4516 fix a small glitch in debugging output.
4517 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4518 after YY_SYMBOL_PRINT where needed.
4519
4520 (struct yyGLRState): Add some comments.
4521 (struct yySemanticOption): Add some comments.
4522 (union yyGLRStackItem): Add comment.
4523
4524 (yymergeOptionSets): Correct this to properly perform the union,
4525 avoiding infinite reported by Michael Rosien.
4526 Update comment.
4527
4528 * tests/glr-regression.at: Add test for GLR merging error reported
4529 by M. Rosien.
cea1469d 4530
0fb669f9
PE
45312005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4532
4533 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4534 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4535 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4536 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4537 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4538 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4539 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4540 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4541 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4542 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4543 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4544 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4545 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4546 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4547 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4548 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4549 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4550 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4551 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4552 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4553 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4554 src/output.h, src/parse-gram.c, src/parse-gram.h,
4555 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4556 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4557 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4558 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4559 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4560 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4561 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4562 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4563 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4564 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4565 tests/reduce.at, tests/regression.at, tests/sets.at,
4566 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4567 Update FSF postal mail address.
4568
51f4735e
PE
45692005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4572 Problem reported by Ralf Menzel.
4573
80ce3401
PE
45742005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4575
4576 * tests/actions.at: Test that stack overflow invokes destructors.
4577 From Marcus Holland-Moritz.
4578 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4579 from here....
4580 (yyreturn): to here. That way, destructors are called properly
4581 even if the stack overflows, or the user calls YYACCEPT or
4582 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4583 (yyoverflowlab): Destroy the lookahead.
4584
45852005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4586
4587 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4588
72f000b0
PE
45892005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4590
4591 * NEWS: Bison-generated C parsers no longer quote literal strings
4592 associated with tokens.
4593 * src/output.c (prepare_symbols): Don't escape strings,
4594 since users don't want to see C escapes.
4595 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4596 in diagnostics.
c19683bb 4597 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
4598 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4599
1094323f
PE
46002005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4601
4602 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4603 the data size is known to be too small and we can't increase it.
4604 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4605
ca407bdf
PE
46062005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4607
4608 * src/parse-gram.y: Include quotearg.h.
4609 (string_as_id): Quote $1 before using it as a key, since the
4610 lexer no longer quotes it for us.
4611 (string_content): Don't strip quotes, since lexer no longer
4612 quotes it for us.
4613 * src/scan-gram.l: Include quotearg.h.
4614 ("\""): Omit quote.
4615 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4616 a key, since the rest of the lexer doesn't quote it.
4617 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4618 * tests/regression.at (Token definitions): Check for backslashes
4619 in token strings.
4620
4621 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4622 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4623 (yyparse): Revamp code to generate long syntax error message, to
4624 make it easier to translate, and to avoid problems with arithmetic
4625 overflow. Change "virtual memory" to "memory" in diagnostic, since
4626 we don't know whether the memory is virtual.
4627
1ce59070
PE
46282005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4629
4630 * NEWS: Bison-generated C parsers now use the _ macro to
4631 translate strings.
4632 * data/yacc.c (_) [!defined _]: New macro.
4633 All English strings wrapped inside this macro.
4634 * doc/bison.texinfo (Bison Parser): Document _.
4635 * po/POTFILES.in: Include src/parse-gram.c, since it now
4636 includes translateable strings that parse-gram.y doesn't.
4637
a749a695
PE
46382005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4639
4640 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4641 reverting the 2004-10-11 change to this function.
4642 (symbol_check_alias_consistency): Don't call symbol_type_set
4643 if the type name is already correct.
4644 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4645
8fb1053b
PE
46462005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4647
4648 * tests/regression.at (Token definitions): Don't use a token named
4649 c, as that generates a "#define c ..." that runs afoul of buggy
4650 stdlib.h that uses the identifier c as a member of struct
4651 drand48_data. Problem reported by Horst Wente.
4652
ff498c4a
PE
46532005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4654
4655 * bootstrap: Change translation URL from
4656 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4657 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4658 redirection glitches. Problem reported by twlevo@xs4all.nl.
4659
65211d70
PE
46602005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4661
4662 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4663 after operands; POSIX says this isn't portable for the c99 command.
4664
9577fb1f
PE
46652005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4666
4667 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4668 immediately if a data overrun has occurred; this may help us track
4669 down what may be a spurious failure on MacOS.
4670
78b178f7
PE
46712005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4672
a2599d0f
PE
4673 Respond to problems reported by twlevo@xs4all.nl.
4674
4675 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4676
78b178f7
PE
4677 * src/vcg.h: Comment fix.
4678 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4679 (G_CMAX): Change to -1 instead of INT_MAX.
4680
4681 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 4682
7296e729
PE
46832005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4684
4685 * src/tables.c (state_number_to_vector_number): Put it inside an
4686 "#if 0", since it's not currently used. Problem reported by
4687 Roland McGrath.
4688
05ac60f3
PE
46892005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4690
4691 * src/output.c (escaped_output): Renamed from
4692 escaped_file_name_output, since we now use it for symbol tags as
4693 well. All uses changed.
4694 (symbol_destructors_output, symbol_printers_output):
4695 Escape symbol tags too.
4696 Problem reported by Matyas Forstner in
4697 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4698
4699 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4700 not needed.
4701 * src/output.c (user_actions_output, token_definitions_output,
4702 symbol_destructors_output, symbol_printers_output): Likewise.
4703 * src/reader.c (prologue_augment): Likewise.
4704 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4705
4706 * src/vcg.c (output_edge): Don't quote linestyle arg.
4707 Problem reported by twlevo@xs4all.nl.
4708
7eb453ac
PE
47092005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4710
4711 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4712 example, reported by Derek M Jones. Also, make the example even
4713 more outrageous, to better illustrate how bad the problem is.
4714
4c04c52a
PE
47152005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4716
4717 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4718 putsym. Typo reported by Sebastian Piping.
4719
a61e1620
PE
47202005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4721
4722 * doc/bison.texinfo (Language and Grammar): some -> same
4723 (Epilogue): int he -> in the
4724 Typos reported by Sebastian Piping via Justin Pence.
4725
9ec93868
PE
47262005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4727
4728 * tests/glr-regression.at (Improper handling of embedded actions
4729 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4730 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4731 with dollar signs in test names.
4732 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4733 for a similar reason.
4734
73ce7e7e
PE
47352005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4736
4737 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4738 wants to redefine G_VIEW.
4739
2e72b98e
PE
47402005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4741
4742 * src/vcg.c (get_view_str): Remove case for normal_view.
4743 Problem reported by twlevo@xs4all.nl.
4744
e0d634e5
PE
47452005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4746
ccf830a4
PE
4747 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4748 Problem reported by twlevo@xs4all.nl.
4749
e0d634e5
PE
4750 * doc/bison.texinfo: Change @dircategory from "GNU programming
4751 tools" to "Software development". Requested by Richard Stallman
4752 via Karl Berry.
4753
7bbc8cb0
PE
47542005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4755
4756 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4757 Problem reported by twlevo@xs4all.nl.
4758
08b770bc
PE
47592005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4760
4761 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4762 keyword; it's not needed with modern compilers, and it doesn't
4763 affect correctness with older compilers. Suggested by
4764 twlevo@xs4all.nl.
4765
95f22ad2
PE
47662005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4767
4768 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4769 gcc -Wswitch-default.
4770 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4771 * data/yacc.c (yyparse): Likewise.
4772
d229d15c
PE
47732005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4774
4775 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4776 already. Let config.h define any nonstandard values.
4777
ecadd90f
PE
47782005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4779
4780 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4781 for the benefit of slower hosts. Problem reported by
4782 Nelson H. F. Beebe.
4783
213744b5
PE
47842005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4785
4786 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4787 being defined and not used.
4788 * data/lalr1.cc (yyparse): Likewise.
4789 Use "if (false)" rather than "if (0)".
4790
249d3236
PE
47912005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4792
4793 * TODO: Mention that we should allow NUL bytes in tokens.
4794
987cc1fb
PE
47952005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4796
4797 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4798 Problem reported by Hans Aberg.
4799
08fe02d9
PE
48002005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4801
4802 * src/getargs.c (version): Happy new year; update overall
4803 program copyright date from 2004 to 2005.
4804
4805 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4806 Problem reported by Hans Aberg.
4807 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4808 (Output file names.): Add a test for the case when standard output
4809 is closed.
4810
010c0266
PE
48112004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4812
4813 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4814 to fix an oversight in the Bison 2.0 manual.
4815
da12206a
PE
48162004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * NEWS: Version 2.0. Reformat the existing news items since
4819 1.875, so that related items are grouped together.
3a4734aa 4820 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
4821 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4822
c935d934
PE
4823 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4824 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4825 otherwise, we're not testing alloca. Unfortunately there's no
4826 simple way to consult HAVE_ALLOCA here.
4827
da12206a
PE
4828 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4829 for yymsg, too.
4830
4831 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4832 hand. This avoids a warning about comparing int to size_t when
4833 GCC warnings are enabled.
4834
0a2c5137
PE
48352004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4836
d7e14fc0
PE
4837 * NEWS: Bison-generated parsers no longer default to using the
4838 alloca function (when available) to extend the parser stack, due
4839 to widespread problems in unchecked stack-overflow detection.
4840 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4841 responsibility to set it to a positive value. This lets the user
4842 specify a value that is not a preprocessor constant.
4843 * data/yacc.c (YYMAXDEPTH): Likewise.
4844 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4845 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4846 to be a compile-time constant. However, explain the constraints on it.
4847 Also, explain the constraints on YYINITDEPTH.
4848 (Table of Symbols): Explain that alloca is no longer the default.
4849 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4850 to 1.
4851
0a2c5137
PE
4852 * doc/bison.texinfo (Location Default Action): Mention that n must
4853 be zero when k is zero. Suggested by Frank Heckenbach.
4854
e019c247
AD
48552004-12-22 Akim Demaille <akim@epita.fr>
4856
4857 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4858 (parser::state_type, parser::semantic_type, parser::location_type):
4859 Private, not public.
4860 (parser::parse): Return ints, not bool.
4861 Returning a bool introduces a problem: 0 corresponds to false, and
4862 it seems weird to return false on success. Returning true changes
4863 the conventions for yyparse.
4864 Alternatively we could return void and send an exception.
4865 There is no clear consensus (yet?).
4866 (state_stack, semantic_stack, location_stack): Rename as...
4867 (state_stack_type, semantic_stack_type, location_stack_type): these.
4868 Private, not public.
4869 * tests/c++.at: New.
4870 * tests/testsuite.at, tests/Makefile.am: Adjust.
4871
72731bb7
AD
48722004-12-21 Akim Demaille <akim@epita.fr>
4873
4874 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4875
9a0d8bec
AD
48762004-12-21 Akim Demaille <akim@epita.fr>
4877
4878 Don't impose std::string for filenames.
4879
4880 * data/lalr1.cc (b4_filename_type): New.
4881 (position::filename): Use it.
4882 (parser.hh): Move the inclusion of stack.hh and location.hh below
4883 the user code, so that needed headers for the filename type can be
4884 included first.
72731bb7
AD
4885 Forward declare them before the user code.
4886 * tests/Makefile.am (check-local, installcheck-local): Pass
4887 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 4888
99880de5
AD
48892004-12-20 Akim Demaille <akim@epita.fr>
4890
4891 Use more STL like names: my_class instead of MyClass.
4892
4893 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4894 (SemanticStack, SemanticType, StateStack, StateType)
4895 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4896 (Parser::value): Rename as...
4897 (location_stack, location_type, rhs_number_type, semantic_stack)
4898 (semantic_type, state_stack, state_type, token_number_type, stack)
4899 (slice, traits, parser::yylloc, parser::yylval): these.
4900
4901 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4902
9bec482e
PE
49032004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4904
4905 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4906 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4907
f6fbd3da
PE
49082004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4909
4910 Remove uses of 'short int' and 'unsigned short int'. This raises
4911 some arbitrary limits. It uses more memory but nowadays that's
4912 not much of an issue.
4913
4914 This change does not affect the generated parsers; that's a different
4915 task, as some users will want to conserve memory there.
4916
4917 Ideally we should use size_t to represent all object counts, and
4918 something like ptrdiff_t to represent signed differences of object
4919 counts; but that will require more code-cleanup than I have the
4920 time to do right now.
4921
4922 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4923 Use size_t, not int or short int, to count objects.
4924 * src/closure.c (nritemset, closure): Likewise.
4925 * src/closure.h (nritemset, closure): Likewise.
4926 * src/nullable.c (nullable_compute): Likewise.
4927 * src/print.c (print_core): Likewise.
4928 * src/print_graph.c (print_core): Likewise.
4929 * src/state.c (state_compare, state_hash): Likewise.
4930 * src/state.h (struct state): Likewise.
4931 * src/tables.c (default_goto, goto_actions): Likewise.
4932
4933 * src/gram.h (rule_number, rule): Use int, not short int.
4934 * src/output.c (prepare_rules): Likewise.
4935 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4936 errs, reductions): Likewise.
4937 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4938 Likewise.
4939 * src/tables.c (vector_number, tally, action_number,
4940 ACTION_NUMBER_MINIMUM): Likewise.
4941 * src/output.c (muscle_insert_short_int_table): Remove.
4942
efeed023
AD
49432004-12-17 Akim Demaille <akim@epita.fr>
4944
4945 * data/lalr1.cc: Extensive Doxygenation.
4946 (error_): Rename as...
4947 (error): this, since it is visible to the user.
4948 Adjust callers.
4949 (Parser::message): Now an automatic variable from...
4950 (Parser::yyreport_syntax_error_): here.
4951 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4952 Parser::error.
4953 * tests/input.at: Escape $.
4954
bc82c5a5
PE
49552004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4956
4957 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4958 Parenthesize rhs to avoid obscure problems with mistakes like
4959 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4960 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4961 b4_rhs_location): Likewise.
4962 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4963 b4_rhs_location): Likewise.
4964
fd19f271
AD
49652004-12-16 Akim Demaille <akim@epita.fr>
4966
4967 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4968 yacc.c: be sure to stay within yycheck_.
4969 * tests/actions.at: Re-enable C++ tests.
4970
10454ea4
AD
49712004-12-16 Akim Demaille <akim@epita.fr>
4972
4973 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4974 real.
4975
c5b95ccf
AD
49762004-12-16 Akim Demaille <akim@epita.fr>
4977
4978 Use #define to handle the %name-prefix.
4979
4980 * data/glr.c, data/yacc.c: Comment changes.
4981 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4982 so that one can refer to yylex in the parser file, and have it
4983 renamed, as is the case with other skeletons.
4984
617a8f12
AD
49852004-12-16 Akim Demaille <akim@epita.fr>
4986
4987 Move lalr1.cc internals into yy*.
4988
4989 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4990 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4991 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4992 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4993 (empty_, final_, terror_, errcode_, ntokens_)
4994 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4995 (looka_, ilooka_, error_range_, nerrs_):
4996 Rename as...
4997 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4998 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4999 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
5000 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
5001 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
5002 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
5003 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
5004 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
5005 these.
5006
1e547e6e
PE
50072004-12-15 Paul Eggert <eggert@cs.ucla.edu>
5008
5009 Fix some problems reported by twlevo at xs4all.
5010 * src/symtab.c (symbol_new): Report an error if the input grammar
5011 contains too many symbols. This is better than calling abort() later.
5012 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
5013 (struct node, struct graph):
5014 Rename member expand to stretch. All uses changed.
5015 (struct graph): Remove member layoutalgorithm. All uses removed.
5016 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
5017 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
5018 All uses changed.
5019 (N_STRETCH): Rename from N_EXPAND. All uses changed.
5020
735d6bd4
AD
50212004-12-15 Akim Demaille <akim@epita.fr>
5022
5023 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
5024 Add more Doxygen comments.
5025 (symprint_, stack_print_, reduce_print_, destruct_, pop)
5026 (report_syntax_error_, translate_): Rename as...
5027 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
5028 (yypop_, yyreport_syntax_error_, yytranslate_): this.
5029
2e1f5829
AD
50302004-12-15 Akim Demaille <akim@epita.fr>
5031
5032 * data/lalr1.cc (lex_): Rename as...
5033 (yylex_): this.
5034 Move the trace here.
5035 Take the %name-prefix into account.
5036 Reported by Alexandre Duret-Lutz.
5037
a3cb6248
AD
50382004-12-15 Akim Demaille <akim@epita.fr>
5039
5040 Simplify the C++ parser constructor.
5041
5042 * data/lalr1.cc (debug_): Rename as...
5043 (yydebug_): so that the parser's internals are always in the yy*
5044 pseudo namespace.
5045 Adjust uses.
5046 (b4_parse_param_decl): Remove the leading comma as it is now only
5047 called as unique argument list.
5048 (Parser::Parser): Remove the constructor accepting a location and
5049 an initial debugging level.
5050 Remove from the other ctor the argument for the debugging level.
5051 (debug_level_type, debug_level, set_debug_level): New.
5052
5053 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5054 constructor calls.
5055
07fed891
AD
50562004-12-15 Akim Demaille <akim@epita.fr>
5057
5058 Remove b4_root related material: failure experiment
a3cb6248 5059 (which goal was to allow to derive from a class).
07fed891
AD
5060
5061 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5062 definitions and uses.
5063
e603eaa5
PE
50642004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5065
5066 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5067 not 2, since it's not portable to subtract 1 from the start of an
5068 array. The new item 0 is never set or used. All uses changed.
5069
5070 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5071 the default definition of YYLLOC_DEFAULT. Problem reported
5072 by Frank Heckenbach.
5073
fafb007d
PE
50742004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5075
5076 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5077 the normal case and one for the error case. Just use the
5078 first one uniformly. Problem reported by Frank Heckenbach.
5079 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5080 use exactly the same macro in both places.
5081 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5082 so that the normal-case YYRHSLOC works for the error case too.
5083 All uses changed.
5084 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5085 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5086 * doc/bison.texinfo (Location Default Action): Don't claim that
5087 we have an array of locations. Use the same macro for both glr
5088 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5089 the index is 0.
5090
48814dcd
PE
50912004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5092
a4e1a53b
PE
5093 * HACKING: Update email addresses to send announcements to.
5094
48814dcd
PE
5095 * configure.ac (AC_INIT): Bump version to 1.875f.
5096
337116ba
PE
50972004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5098
5099 * NEWS: Version 1.875e.
5100 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5101
5102 * src/scan-skel.l: Include "complain.h", for "fatal".
5103
5104 * src/relation.h (relation_print, relation_digraph):
5105 Relation sizes are of type relation_node, not size_t (this is
5106 merely a doc fix, since the two types are equivalent).
5107 (relation_transpose): Relation sizes are of type relation_node,
5108 not int.
5109 * src/relation.c: Likewise.
5110 (top, infinity): Now of type relation_node, not int.
5111 (traverse, relation_transpose): Use relation_node, not int.
5112
5113 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5114 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5115 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5116
5117 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 5118 specifying whether the test should be skipped. Use it tp
337116ba 5119 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 5120 fail on some hosts, and should be skipped.
337116ba 5121
da2a7671
PE
51222004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5123
5124 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5125 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5126 unless otherwise specified below.
5127
5128 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5129 to allocate kernel_base, kernel_items, kernel_size, since
5130 they needn't be initialized to 0.
5131 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5132 * src/closure.c (new_closure): Likewise, for itemset.
5133 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5134 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5135 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5136 (build_relations): Likewise for edge, states1, includes.
5137 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5138 * src/reader.c (packgram): Likewise, for ritem, rules.
5139 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5140 * src/relation.c (relation_digraph): Likewise for VERTICES.
5141 (relation_transpose): Likewise for new_R, end_R.
5142 * src/symtab.c (symbols_token_translations_init): Likewise for
5143 token_translations.
5144 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5145 (token_actions): Likewise for yydefact, actrow, conflrow,
5146 conflict_list.
5147 (save_column): Likewise for froms[symno], tos[symno].
5148 (goto_actions): Likewise for state_count.
5149 (pack_table): Likewise for base, pos, check.
5150 (tables_generate): Likewise for width.
5151
5152 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5153 for initial core. Just have a separate core, so we needn't worry
5154 about whether kernel_size and kernel_base are initialized.
5155
5156 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5157 kernel_size, kernel_items): Remove unnecessary initialization.
5158 * src/conflicts.c (conflicts): Likewise.
5159 * src/derives.c (derives): Likewise.
5160 * src/muscle_tablc (muscle_insert): Likewise.
5161 * src/relation.c (relation_digraph): Likewise.
5162 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5163 conflrow, conflict_table, conflict_list, table, check):
5164 Likewise.
5165
5166 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5167 This is because all callers pass unsigned int.
5168 * src/closure.h (new_closure): Likewise.
5169
5170 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5171 (build_relations): Initialize includes[i] in all cases.
5172 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5173 and rules[ruleno].precsym. Initialize members in order.
5174 * src/relation.c (relation_transpose): Always initialize new_R[i]
5175 and end_R[i].
5176 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5177
5178 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5179 conflict_list[0] was always 0, but now it isn't initialized.
5180
5181 * src/table.c (table_grow): When conflict_table grew, the grown
5182 area wasn't cleared. Fix this.
5183
5184 * lib/.cvsignore: Add strdup.c, strdup.h.
5185 * m4/.cvsignore: Add strdup.m4.
5186
00baeeac
PE
51872004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5188
5189 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5190 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5191 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5192 ngotos + 1 without checking for overflow.
5193 (build_relations): Use END_NODE, not -1, to denote end of edges.
5194 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5195 build_relations): Use goto_number, not int, for goto numbers.
5196 * src/tables.c (save_column, default_goto): Likewise.
5197
be3d9d42
AD
51982004-11-23 Akim Demaille <akim@epita.fr>
5199
5200 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5201 of #defining from yystype.
5202 Don't typedef yystype, C++ does not need it.
5203 This lets it possible to forward declare it as union.
5204
78e526d5
PE
52052004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5206
5207 * bootstrap (gnulib_modules): Add extensions.
5208 Problem reported by Jim Meyering.
5209
afbb696d
PE
52102004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5211
5212 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5213 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5214 src/system.h, src/tables.c: XFREE -> free, to accommodate
5215 recent change to gnulib xalloc.h.
78e526d5 5216 Problem reported by Jim Meyering.
afbb696d 5217
c1f8f16a
AD
52182004-11-17 Akim Demaille <akim@epita.fr>
5219
5220 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5221
db7e5eb5 52222004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
5223 Alexandre Duret-Lutz <adl@gnu.org>
5224
5225 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5226 changes.
5227 (YYCDEBUG): Adjust.
5228 Use it instead of cdebug_.
5229 (Parser::debug_stream, Parser::set_debug_stream): New.
5230 (Parser::symprint_): Define cdebug_ for temporary backward
5231 compatibility.
5232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5233 debug_stream ().
5234
68e11668
AD
52352004-11-17 Akim Demaille <akim@epita.fr>
5236
5237 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5238 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5239 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5240 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5241
97cbc73e
PE
52422004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5243
5244 * data/glr.c (yyloc_default): Remove; not used.
5245 Problem reported by Frank Heckenbach.
5246
e342c3be
AD
52472004-10-25 Akim Demaille <akim@epita.fr>
5248
5249 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5250 Introduce another definition to address simple location arrays.
5251 (yyGLRStack): New member: yyerror_range.
5252 (yyrecoverSyntaxError, yyparse): Update it.
5253 (yyrecoverSyntaxError): Use it when shifting the error token to
5254 have an accurate range, equivalent to the one computed by both
5255 yacc.c and lalr1.cc.
5256 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5257 that column numbers start at column 0, as per GNU Coding
5258 Standards, the others tests, and the doc.
5259 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5260 Adjust to the above change (first column is 0).
5261 And adjust the location of the "<error>", now covering the whole
5262 line.
5263
93602feb 52642004-10-22 Akim Demaille <akim@epita.fr>
04098407 5265 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
5266
5267 Remove some arbitrary limits on goto numbers and relations.
5268 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5269 initial values, since they're never used.
5270 (set_goto_map): ngotos is now unsigned, so test for overflow
5271 by seeing whether it wraps around to zero.
5272 * src/lalr.h (goto_number): Now size_t, not short int.
5273 (GOTO_NUMBER_MAXIMUM): Remove.
5274 * src/relation.c (relation_print, traverse, relation_transpose):
5275 Check for END_NODE rather than looking at sign.
5276 * src/relation.h (END_NODE): New macro.
5277 (relation_node): Now size_t, not short int.
5278
dba08b04
PE
52792004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5280
5281 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5282 keyword, not an identifier. Problem reported by Baron Schwartz in
5283 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5284
df09ef2e
AD
52852004-10-11 Akim Demaille <akim@epita.fr>
5286
5287 * src/symtab.c (symbol_check_alias_consistency): Also check
5288 type names, destructors, and printers.
5289 Reported by Alexandre Duret-Lutz.
5290 Recode the handling of associativity and precedence in terms
5291 of symbol_precedence_set.
5292 Accept no redeclaration at all, not even equal to the previous
5293 value.
5294 (redeclaration): New.
5295 Use it to factor redeclaration complaints.
5296 (symbol_make_alias): Don't set the type of the alias, let
5297 symbol_check_alias_consistency do it as for other features.
5298 * src/symtab.h (symbol): Add new member prec_location, and
5299 type_location.
5300 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5301 * tests/input.at (Incompatible Aliases): New.
5302
146bc99d
PE
53032004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5304
5305 .cvsignore fixes to accommodate gnulib changes,
5306 and the practice of naming build directories "_build".
5307 * .cvsignore: Add "_*". Sort.
5308 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5309 * m4/.cvsignore: Add "*_gl.m4".
5310
e503aa60
AD
53112004-10-06 Akim Demaille <akim@epita.fr>
5312
5313 * src/parse-gram.y (add_param): Fix the truncation of trailing
5314 spaces.
5315
b4a20338
AD
53162004-10-05 Akim Demaille <akim@epita.fr>
5317
5318 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5319 whether the reducion was empty or not. This leaves room to
5320 improve the use of YYLLOC_DEFAULT in such a case.
5321 lalr1.cc is still experimental, so changing this is acceptable.
5322 And finally, there are probably not many users who changed the
5323 handling of locations in GLR, so changing is admissible too.
5324
5325 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5326 empty reduction, set @$ to an empty location ending the previously
5327 stacked symbol.
5328 Adjust uses to make sure the code is triggered on empty
5329 reductions.
5330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5331 expected output: empty reductions have empty locations.
5332
f85a5e6f
AD
53332004-09-29 Akim Demaille <akim@epita.fr>
5334
5335 * data/lalr1.cc: Move towards a more standard C++ coding style
5336 for templates: Class < T > -> Class<T>.
5337
b203fc2c
AD
53382004-09-29 Akim Demaille <akim@epita.fr>
5339
5340 * data/lalr1.cc: Reinstall the former ctor, for sake of
5341 compatibility, but warn it will be removed.
5342 Move towards a more standard C++ coding style (i.e., type *var ->
5343 type* var).
5344
5b7e1e73
PE
53452004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5346
3fee967f
PE
5347 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5348 since it's less likely to work if NULs are involved in the future.
5b7e1e73 5349
0dcca5c2
AD
53502004-09-27 Akim Demaille <akim@epita.fr>
5351
5352 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5353
6dde1c82
AD
53542004-09-27 Akim Demaille <akim@epita.fr>
5355
5356 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 5357 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
5358 and argument names.
5359 (b4_cc_constructor_call): Likewise.
5360
b233d555
AD
53612004-09-24 Akim Demaille <akim@epita.fr>
5362
5363 * src/parse-gram.y (add_param): Strip the leading and trailing
5364 blanks from a formal argument declaration.
5365 (YY_LOCATION_PRINT): New.
5366
619404e3
AD
53672004-09-24 Akim Demaille <akim@epita.fr>
5368
5369 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5370 after the location.
5371
dd8d9022
AD
53722004-09-24 Akim Demaille <akim@epita.fr>
5373
5374 * doc/bison.texinfo (Table of Symbols): Sort.
5375
0092f063
AD
53762004-09-21 Akim Demaille <akim@epita.fr>
5377
5378 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5379 the useless parentheses.
5380 Suggested by Paul Eggert.
5381
451364ed
AD
53822004-09-20 Akim Demaille <akim@epita.fr>
5383
5384 Let the initial-action act on the look-ahead, and use it for the
5385 "initial push" (corresponding to an hypothetical beginning-of-file).
5386 And let lalr1.cc honor %initial-action.
5387
5388 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5389 example.
5390 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5391 (Parser::Parser): Remove the ctor that used to initialize it.
5392 (Parser::parse): Like in the other skeletons, issue the "starting
5393 parse" message before any action.
5394 Honor %initial-action.
5395 Initialize the stacks with the lookahead.
5396 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5397 look-ahead.
5398 Push them in the stacks.
5399 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5400
18d192f0
AD
54012004-09-20 Akim Demaille <akim@epita.fr>
5402
5403 * doc/bison.texinfo (Initial Action Decl): New.
5404
b8458aa5
AD
54052004-09-20 Akim Demaille <akim@epita.fr>
5406
5407 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5408 clearer criterion to define it.
5409 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5410 When reducing on an empty RHS, use the latest stacked location as
5411 location.
5412 yylloc is not always available.
5413 * data/glr.c: Likewise.
5414 Also, honor initial-actions.
5415
3fc16193
AD
54162004-09-20 Akim Demaille <akim@epita.fr>
5417
5418 * data/yacc.c (YY_LOCATION_PRINT): New.
5419 Define when we know YYLTYPE's structure, i.e., when the default
5420 YYLLOC_DEFAULT is used.
5421 * data/c.m4 (b4_yysymprint_generate): Use it.
5422 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5423 value of the result.
5424 (error_start_): Replace with...
5425 (error_range_): this location array.
5426 This allows to replace code relying on the implementation of
5427 locations by portable code.
5428 * data/yacc.c (yylerrsp): Replace with...
5429 (yyerror_range): this.
5430 Every time a token is popped, update yyerror_range[0], to have an
5431 accurate location for the error token.
5432 * data/glr.c (YY_LOCATION_PRINT): New.
5433 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5434 deference a pointer.
5435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5436 report the location in %printers.
5437
5438 * src/scan-skel.l: Instead of abort, report error messages to ease
5439 understanding skeleton scanning failures.
5440
ecfe33e7
AD
54412004-09-16 Akim Demaille <akim@epita.fr>
5442
5443 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5444 (iterator, const_iterator): these, to be more in the C++ spirit.
5445 Also, return reverse iterators so that when displaying the stack
5446 we display its bottom first.
5447 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5448 from yacc.c.
5449 We should probably use vector here though.
5450
1576d44d
AD
54512004-09-16 Akim Demaille <akim@epita.fr>
5452
5453 Have more complete shift traces.
5454
5455 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5456 to report Shifts instead of ad hoc YYDPRINTF invocations,
5457 including for the error token.
5458 * data/lalr1.cc (symprint_): Output the location.
5459 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5460 output the location within the %printer.
5461 Activate GLR tests, at least to make sure they compile properly.
5462 They still don't pass though.
5463 * tests/calc.at: Adjust expect verbose output, since now "Entering
5464 state..." is on a different line than the "Shifting" message.
5465
9c66f418
AD
54662004-09-08 Akim Demaille <akim@epita.fr>
5467
5468 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5469 Bison directive from the Bison file to the invocation of this
5470 macro, so that these directives are passed to
5471 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5472 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5473 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5474 the extra Bison directives instead of the whole series.
5475 Change the grammar so that there are recoverable errors, and
5476 unrecoverable errors. Now we can have the parser give up before
5477 consuming the whole input. As a result we now can observe that
5478 the lookahead is freed when needed.
5479 Change the parser source to parse argv[1] instead of a hard coded
5480 string.
5481 Simplify yylex, and give a value and location to EOF.
5482 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5483 passed directives already coded in the file.
5484 Add some tests to check the location of "error".
5485 For some tests, the C++ parser is correct, and not yacc.c.
5486 For other tests, they provide different, but unsatisfying, values,
5487 so keep the C++ value so that at least one parser is "correct"
5488 according to the test suite.
5489 (Actions after errors): Remove, this is subsumed by the
5490 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5491
52d5733f
AD
54922004-09-06 Akim Demaille <akim@epita.fr>
5493
5494 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 5495 (Parser::pop): New.
52d5733f
AD
5496 Use it.
5497
a0e68930
AD
54982004-09-06 Akim Demaille <akim@epita.fr>
5499
5500 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5501 argument, an informative message.
5502 Call YY_SYMBOL_PRINT.
5503 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5504 * data/lalr1.cc (destruct_): Likewise.
5505 In addition, no longer depend on b4_yysymprint_generate and
5506 b4_yydestruct_generate to generate these functions, do it "by
5507 hand".
5508
e757bb10
AD
55092004-09-03 Akim Demaille <akim@epita.fr>
5510
5511 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5512 invoked, yydestruct the lookahead.
5513 * tests/calc.at (Calculator $1): Update the expected lengths of
5514 traces: there is an added line for the discarded lookahead.
5515 * doc/bison.texinfo (Destructor Decl): Some rewording.
5516 Define "discarded" symbols.
5517
0fe1f06d
AD
55182004-09-02 Akim Demaille <akim@epita.fr>
5519
5520 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5521
284acc8b
AD
55222004-09-02 Akim Demaille <akim@epita.fr>
5523
5524 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5525 (YYDSYMPRINTF): Rename as...
5526 (YY_SYMBOL_PRINT): this.
5527 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5528 two.
5529 Use it instead of direct symprint_ calls.
5530 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5531 one.
5532
a5eb1ed2
AD
55332004-09-02 Akim Demaille <akim@epita.fr>
5534
b7c72fe1
AD
5535 * data/lalr1.cc (b4_yysymprint_generate): New.
5536 (symprint_): New member function, defined when YYDEBUG.
5537 Use it consistently instead of token/nterm debugging output by
5538 hand.
a5eb1ed2
AD
5539 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5540 %printer calls to use cdebug_ when using lalr1.cc.
5541
417141dd
AD
55422004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5543
5544 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5545 with #ifdef YYDEBUG.
5546
2fa09258
AD
55472004-08-26 Akim Demaille <akim@epita.fr>
5548
5549 * doc/bison.texinfo (Implementing Loops): Rename as...
5550 (Implementing Gotos/Loops): this.
5551
9378b508
PE
55522004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5553
5554 Adjust to latest gnulib.
5555 * bootstrap (gnulib_modules): Add xalloc-die.
5556 Set LC_ALL=C so that file names sort consistently.
5557 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5558 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5559 uintmax_t.m4, ulonglong.m4.
5560 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5561 po.m4 since we are now using _gl.m4 instead.
5562
87a8ad5c
PE
55632004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5564
5565 * src/scan-action.l: Remove. Scanning of semantic actions is
5566 handled in scan-gram.l.
5567
dca81a78
PE
55682004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5569
5570 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5571
5572 * src/location.h (struct): The file member is a uniqstr.
5573 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5574
c9cbf7c5
PE
55752004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5576
5577 Fix bug with non-%union parsers that have printers or destructors,
5578 which led to a Bison core dump. Reported by Peter Fales in
5579 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 5580
c9cbf7c5
PE
5581 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5582 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5583 not to our own type.
5584 * src/output.c (symbol_destructors_output, symbol_printers_output):
5585 Don't assume %union.
5586 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5587 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5588 UNION-FLAG. All callers changed.
5589 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5590 Use type char, not unsigned int, when declaring an array of char;
5591 this lets us remove a cast.
5592 (Printers and Destructors): Add non-%union test cases.
5593
fa7e68c3
PE
55942004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5595
5596 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5597 GLR writeups. E.g., avoid frenchspacing and the future tense,
5598 change "lookahead" to "look-ahead", and change "wrt" to "with
5599 respect to".
2fa09258 5600
fa7e68c3
PE
56012004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5602
5603 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5604 New sections, split off from the GLR Parsers section. Put the new
5605 Simple GLR Parser near the start of the GLR section, for clarity.
5606 Rewrite connective text.
5607
99a9344e
PE
56082004-06-21 Frank Heckenbach <frank@g-n-u.de>
5609
5610 * doc/bison.texinfo (Simple GLR Parsers): New section.
5611
8dd162d3
PE
56122004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 * NEWS, TODO, doc/bison.texinfo:
5615 Use "look-ahead" instead of "lookahead", to be consistent.
5616 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5617 while we're fixing "look-ahead".
5618 * src/conflicts.c (shift_set): Renamed from shiftset.
5619 (look_ahead_set): Renamed from lookaheadset.
5620 * src/print.c: Likewise.
5621 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5622 name for "lookahead".
5623 (report_types, usage): Likewise.
5624 * src/getargs.h (report_look_ahead_tokens): Renamed from
5625 report_lookaheads.
5626 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5627 compute_lookaheads.
5628 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5629 (look_ahead_tokens_print): Renamed from lookaheads_print.
5630 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5631 state_rule_lookaheads_print.
5632 * src/state.h: Likewise.
5633 (reductions.look_ahead_tokens): Renamed from lookaheads.
5634 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5635 AT_DATA_LOOKAHEADS_GRAMMAR.
5636
57a90331
PE
56372004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5638
5639 * README: Update location of patched M4 distribution.
5640
8ed3234a
PE
56412004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5642
5643 Don't assume the C++ compiler takes the same arguments as the C compiler
5644 (trivial change).
5645 * configure.ac (O0CXXFLAGS): New var.
5646 * tests/atlocal.in (CXXFLAGS): Use it.
5647
07971983
PE
56482004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5649
5650 Fix some "make check" problems with C++ reported by
5651 Albert Chin-A-Young for Tru64 C++ in this thread:
5652 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5653
5654 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5656 Output to a .cc file for C++, not to a .c file.
5657 * tests/calc.at (AT_CHECK_CALC): Likewise.
5658 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5659 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5660
29058652
PE
56612004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5662
5663 * tests/calc.at, tests/actions.at: Workaround for SGI
5664 C++ compiler. (trivial change)
5665
62cb8a99
PE
56662004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5667
fd418816
PE
5668 Spent a few hours checking out which prerequisite versions the
5669 current sources actually require. I went all the way back to
5670 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5671 a seemingly endless set of combinations of versions more recent
5672 than that. The bottom line is that the current sources require
5673 fairly recent versions of the build tools, and it'll be some work
5674 to change this.
5675 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5676 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5677 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5678 Add comments explaining why those particular versions are
5679 currently needed.
2fa09258 5680
62cb8a99
PE
5681 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5682 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 5683 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
5684
5685 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5686 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5687
caa52c10
PE
56882004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5689
5690 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5691 0.11.5. Suggested by Bruno Haible.
5692 * bootstrap: Remove gettext version checking.
5693
5694 * doc/bison.texinfo (Decl Summary): Also mention that %union
5695 can depend on prerequisite types. Problem reported by Tim
5696 Van Holder.
5697
4bfd5e4e
PE
56982004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5699
2cef3017
PE
5700 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5701 * README-alpha: Don't tell people not to package this.
5702
b9c85d5c
PE
5703 * bootstrap: Don't assume $(...) works; use `...` instead.
5704 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5705 gettext better.
5706
4bfd5e4e
PE
5707 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5708 put into the -d output file, and mention what to do if YYSTYPE is
5709 defined as a macro.
5710
6a36ff94
PE
57112004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5712
6712933e
PE
5713 Undo change made earlier today: it caused autopoint to not bring
5714 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5715 autopoint's.
5716
5717 * bootstrap: Check that gettext version matches what's in
5718 configure.ac. Warn users to ignore robots.txt ERROR 404.
5719 * bootstrap: Undo today's earlier change (logged below).
5720 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 5721
6a36ff94
PE
5722 The gettext version checking is causing more trouble than it's
5723 curing; remove it. Problem reported by Paul Hilfinger.
5724
5725 * bootstrap: Issue a warning that one can expect a message
5726 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5727 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5728
209ea708
PE
57292004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5730
5731 Ensure that the C++ compiler used for testing actually works on a
5732 simple test program; if not, skip the C++-related tests. Problem
5733 reported by Vin Shelton in:
161a71f3 5734 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
5735
5736 * m4/cxx.m4: New file.
5737 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5738 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5739 * tests/local.at (AT_COMPILE_CXX): Use it.
5740
41ca2549
PE
57412004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5742
383e69dc
PE
5743 * data/glr.c (yylloc): Output this macro even if locations are not
5744 being generated, as the GLR parser needs it even in that case.
5745 Problem reported by Troy A. Johnson
5746 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5747
41ca2549
PE
5748 * configure.ac (AC_INIT): Update to 1.875e.
5749
e476c87d
PE
57502004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5751
5752 * NEWS: Version 1.875d.
5753 * configure.ac (AC_INIT): Likewise.
5754 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5755
5756 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5757 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5758 lalr1.cc runs afoul of the first, and the last two are no longer
5759 supported by GCC 3.4.0.
5760 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5761 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5762
233a88ad
PE
57632004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5764
5765 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5766 unsigned int, for compatibility with latest gnulib hash module.
5767 * src/state.c (state_hash, state_hasher): Likewise.
5768 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5769 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 5770
12ffdd28
PE
57712004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5772
5773 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5774
5775 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5776 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5777 character and string literals.
5778 (unexpected_end): New function.
5779 (unexpected_eof): Use it.
5780 (unexpected_newline): New function.
5781 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5782 actions.
e476c87d 5783
12ffdd28
PE
5784 * NEWS: Document %expect-rr.
5785
5786 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5787 Fix typo by replacing $1 with $option.
5788 Remove more 'intl'-related files.
9668e2be 5789 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
5790
5791 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5792 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5793 strtoul.c.
5794 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5795 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5796 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5797 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5798 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5799 * src/.cvsignore: Add *.output.
5800
5801 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5802 gets copied to the output file.
e476c87d 5803
1f65350a
PE
58042004-04-28 Paul Eggert <eggert@twinsun.com>
5805
5806 Get files from the gnulib and po repositories, instead of relying
5807 on them being in our CVS. Upgrade to latest versions of gnulib
5808 and Automake.
5809
5810 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5811 * bootstrap: Bootstrap from gnulib and po repositories.
5812 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5813 * README-cvs: Document these changes. Remove version numbers from
5814 mentions of build tools, since they change so often. Mention Flex.
5815
5816 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5817 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
5818 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5819 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 5820 does this for us.
12ffdd28
PE
5821 (AC_ISC_POSIX): Remove; we no longer support this
5822 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
5823 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5824 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5825 Do not check for C89 headers, except for locale.h which is used
5826 by the Yacc library and must port to K&R hosts.
5827 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5828 Do not check for C89 functions, except for setlocale which is
5829 used by the Yacc library.
5830 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5831 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5832 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5833 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5834 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5835 AM_GNU_GETTEXT): Remove; now done by:
5836 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5837 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5838 for us.
5839
5840 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5841 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5842 Define to empty, as gnulib.mk will do the rest for us.
5843 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5844 for us.
5845 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5846 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5847
5848 * src/files.c: Include gnulib's xstrndup.h.
5849
5850 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5851 (REALLOC): Use xnrealloc, for likewise.
5852 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5853 (strnlen, memrchr): Remove decls; functions no longer used.
5854 Include <stpcpy.h>.
5855
5856 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5857 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5858 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5859 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5860 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5861 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5862 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5863 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5864 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5865 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5866 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5867 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5868 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5869 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5870 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5871 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5872 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5873 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5874 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5875 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5876 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5877 Remove, as these files are now generated automatically
5878 by bootstrap or automake.
5879
5880 * po/ChangeLog: Remove: all but one entry was a duplicate
5881 of this file, and I moved that 2000-11-02 entry here.
5882
5883 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5884 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5885 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5886 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5887 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5888 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5889 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5890 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5891 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5892 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5893 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5894 xstrndup.h.
5895 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5896 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5897 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5898 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5899 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5900 * src/.cvsignore: Remove *_.c.
5901
5902
5903 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5904 support it. (The latest stable gzip doesn't.)
5905
59062004-04-27 Paul Eggert <eggert@twinsun.com>
5907
5908 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5909 case, as stos_ is now used by destructors due to the 2004-02-09
5910 change.
5911
5912 Remove more K&R C support.
5913 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5914 * lib/subpipe.c (errno): Remove decl.
5915 Include <stdlib.h> unconditionally.
5916 (EXIT_FAILURE): Remove macro.
5917 * src/complain.c (vfprintf, strerror): Remove.
5918 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5919 unconditionally.
5920 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5921 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5922 (strchr, strspn, memchr): Remove decls.
5923 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5924 unconditionally. Do not declare perror.
5925 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5926 unconditionally.
5927
5928 * src/complain.c (_): Remove useless defn, as system.h defines this.
5929
5930 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5931 with latest obstack.h.
5932 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5933 to procedure types, as obstack.h now does that for us.
5934 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5935
5936 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5937 so that this include file can stand alone.
5938 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5939 does this now. Include subpipe.h first after config.h, to
5940 test whether it can stand alone.
5941
5942 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5943 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5944 unused declaration.
5945
5946 * tests/synclines.at (%union synch line): Put a dummy member in
5947 the union, because empty unions aren't allowed in C. Caught
5948 by GCC 3.4.0.
5949
4f16766c
PE
59502004-04-13 Jim Meyering <jim@meyering.net>
5951
5952 * src/conflicts.c (conflicts_print): Correct format string typo:
5953 use `%%' to produce literal `%'. (trivial change)
5954
779e7ceb
PE
59552004-03-30 Paul Eggert <eggert@twinsun.com>
5956
5957 * src/getargs.c (version): Update copyright year to 2004.
5958
5959 * data/c.m4 (b4_int_type): Use 'short int' rather than
5960 'short', and similarly for 'long', 'unsigned', etc.
5961 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5962 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5963 yy_yypstack, yydumpstack): Likewise.
5964 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5965 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5966 Likewise.
5967 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5968 yy_stack_print, yyparse): Likewise.
5969 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5970 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5971 * lib/bitset.c (bitset_print): Likewise.
5972 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5973 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5974 * lib/bitsetv.c (bitsetv_dump): Likewise.
5975 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5976 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5977 Likewise.
5978 * src/LR0.c (allocate_itemsets): Likewise.
5979 * src/gram.h (rule_number, rule): Likewise.
5980 * src/lalr.h (goto_number): Likewise.
5981 * src/nullable.c (nullable_compute): Likewise.
5982 * src/output.c (prepare_rules): Likewise.
5983 * src/relation.c (relation_print, relation_digraph): Likewise.
5984 * src/relation.h (relation_node): Likewise.
5985 * src/state.h (state_number, transitions, errs, reductions,
5986 struct state): Likewise.
5987 * src/symtab.h (symbol_number, struct symbol): Likewise.
5988 * src/tables.c (vector_number, tally, action_number,
5989 default_goto, goto_actions): Likewise.
5990 * tests/existing.at (GNU Cim Grammar): Likewise.
5991 * tests/regression.at (Web2c Actions): Likewise.
5992
5993 * src/output.c (muscle_insert_short_int_table): Renamed from
5994 muscle_insert_short_table. All uses changed.
5995
d6328241
PH
59962004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5997
5998 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5999 (declaration): Replace expected_conflicts with expected_sr_conflicts.
6000 Add %expect-rr rule.
4f16766c 6001
d6328241
PH
6002 * src/scan-gram.l: Recognize %expect-rr.
6003
4f16766c 6004 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 6005 expected_conflicts.
4f16766c 6006 (expected_rr_conflicts): Declare.
d6328241
PH
6007
6008 * src/conflicts.c (expected_sr_conflicts): Rename from
6009 expected_conflicts.
6010 (expected_rr_conflicts): Define.
6011 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
6012 for GLR parsers.
6013 Use expected_sr_conflicts in place of expected_conflicts.
6014 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 6015
d6328241 6016 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 6017
1452af69
PE
60182004-03-08 Paul Eggert <eggert@gnu.org>
6019
6020 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 6021 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
6022
6023 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
6024 in lalr1.cc.
6025 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
6026 * src/scan-gram.l (scan_integer): New function.
6027 ({int}): Use it.
6028 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
6029 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
6030 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
6031 Say "long int", not "long", for uniformity with GNU style.
6032
006d217d
PE
60332004-02-25 Paul Eggert <eggert@twinsun.com>
6034
6035 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6036 compilers. This fixes a problem with Intel's C++ compiler being
6037 chatty, reported by Guido Trentalancia in
161a71f3 6038 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 6039
c2729758
ADL
60402004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6041
6042 Support %destructor and merge error locations in lalr1.cc.
6043
6044 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6045 (Parser::stos_): Define unconditionally.
6046 (Parser::destruct_): New method. Generate its body with
6047 b4_yydestruct_generate.
6048 (Parser::error_start_): New attribute.
6049 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6050 token which are discarded.
6051 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6052 error_start_ when erroneous token are discarded.
6053 (Parser::parse) <yyerrlab1>: Compute the location of the error
6054 token so that it covers all the discarded tokens.
6055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6056 it can be called with `%skeleton "lalr1.cc"', and do that.
6057
dd0e0635
PE
60582004-02-02 Paul Eggert <eggert@twinsun.com>
6059
6060 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6061 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6062 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6063 There's no need to mention top_builddir since Automake does that
6064 for us.
6065 (INCLUDES): Remove, as Automake says it's obsolescent.
6066 Contents migrated into AM_CPPFLAGS as described above.
6067 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6068
60692004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6070
6071 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6072 (yyreportSyntaxError): Handle case where lookahead token is
6073 YYEMPTY.
6074
be16239b
PH
60752004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6076
6077 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6078 resulting parsers are compilable with C++.
6079
5fa90832
PE
60802003-12-23 Paul Eggert <eggert@twinsun.com>
6081
6082 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6083 * src/output.c (output_skeleton): Rename local var.
6084 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6085 Bison tokens, as this runs afoul of the 2003-10-07 change that
6086 disallowed NUL bytes in character constants or string literals.
6087
6088 * tests/local.at: Require Autoconf 2.59's Autotest.
6089 * tests/testsuite.at: Don't include local.at, since we now assume
6090 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6091 including it.
6092 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6093 multiple inclusion warnings.
dd0e0635 6094
b165c324
AD
60952003-12-02 Akim Demaille <akim@epita.fr>
6096
6097 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6098 conditions.
6099 From Bruno Haible.
6100
26e06a21
ADL
61012003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6102
6103 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6104
92ac3705
PE
61052003-10-07 Paul Eggert <eggert@twinsun.com>
6106
6a5ecb38
PE
6107 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6108 if testsuite doesn't exist.
6109
92ac3705
PE
6110 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6111 literals, unfortunately.
6112 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6113 Complain about NUL bytes in character constants or string literals.
6114
91d2c560
PE
61152003-10-05 Paul Eggert <eggert@twinsun.com>
6116
6117 * NEWS: Don't document %no-default-prec, as it's still
6118 too experimental.
6119 * doc/bison.texinfo: Document %no-default-prec only if
6120 the defaultprec flag is set. Normally it's not.
6121
0cc3da3a
PE
61222003-10-04 Paul Eggert <eggert@twinsun.com>
6123
6124 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6125 non-modifiable lvalue, instead of a modifiable one.
6126 * doc/bison.texinfo (Actions): Document that $$ can
6127 be assigned to. Do not claim that $$ and $N are
6128 array element references: user code should not rely on this.
6129
22fccf95
PE
61302003-10-01 Paul Eggert <eggert@twinsun.com>
6131
6132 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6133 (grammar_declaration): Use it.
6134 * src/scan-gram.l: New token %no-default-prec.
6135 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6136 * NEWS, doc/bison.texinfo: Document the above.
6137
fc8f2965
AD
61382003-10-01 Akim Demaille <akim@epita.fr>
6139
6140 VCG no longer supports long_straight_phase.
6141
6142 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6143 * src/print_graph.c (print_graph): Adjust.
6144
39a06c25
PE
61452003-09-30 Frank Heckenbach <frank@g-n-u.de>
6146 and Paul Eggert <eggert@twinsun.com>
6147
6148 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6149 Table of Symbols): Document %default-prec.
6150 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6151 (grammar_declaration): Set default_prec on %default-prec.
6152 * src/scan-gram.l (%default-prec): New token.
6153 * src/reader.h (default_prec): New flag.
6154 * src/reader.c: Likewise.
6155 (packgram): Handle it.
6156 * tests/conflicts.at (%default-prec without %prec,
6157 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 6158
39a06c25
PE
61592003-09-30 Paul Eggert <eggert@twinsun.com>
6160
6161 * tests/testsuite.at: Include local.at, not input.at, fixing
6162 a typo in the 2003-08-25 patch.
6163
62b6aef9
AD
61642003-08-27 Akim Demaille <akim@epita.fr>
6165
6166 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6167 GCC warnings.
6168
89e1cc61
AD
61692003-08-26 Akim Demaille <akim@epita.fr>
6170
6171 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6172 "<\#" to avoid magic from Gnus when posting parts of this script.
6173
a08460b0
AD
61742003-08-26 Akim Demaille <akim@epita.fr>
6175
6176 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6177 (Parser::parse): here.
6178 Adjust: nerrs and errstatus is now replaced by...
6179 (Parser::nerrs_, Parser::errstatus_): New.
6180
603f1cfd
AD
61812003-08-25 Akim Demaille <akim@epita.fr>
6182
6183 * config/announce-gen, Makefile.cfg: New.
6184 * Makefile.am: Adjust.
6185 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6186 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6187
cd3684cf
AD
61882003-08-25 Akim Demaille <akim@epita.fr>
6189
6190 When reducing initial empty rules, Bison parser read an initial
6191 location that is not defined. This results in garbage, and that
6192 affects Bison's own parser. Therefore we need (i) to extend Bison
6193 to support a means to initialize this location, and (ii) to use
6194 this CVS Bison to fix CVS Bison's parser.
6195
6196 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6197 with...
6198 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6199 * src/parse-gram.y: Adjust.
6200 (%initial-action): New.
6201 (%error-verbose): Since we require CVS Bison, there is no reason
6202 not to use it.
6203 * src/scan-gram.l: Adjust.
6204 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6205 * data/yacc.c (yyparse): Use b4_initial_action.
6206
4e03e201
AD
62072003-08-25 Akim Demaille <akim@epita.fr>
6208
6209 * doc/bison.texinfo: Don't promote stdout for error messages.
6210
8c182d05
AD
62112003-08-25 Akim Demaille <akim@epita.fr>
6212
6213 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6214 From Alexandre Duret-Lutz.
6215
6a60c4cf
PE
62162003-08-25 Akim Demaille <akim@epita.fr>
6217
6218 Version 1.875c.
6219
25f66e1a
AD
62202003-08-25 Akim Demaille <akim@epita.fr>
6221
6222 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6223 Use them.
6224
5348bfbe
AD
62252003-08-25 Akim Demaille <akim@epita.fr>
6226
6227 * data/lalr1.cc (Parser::reduce_print_): New.
6228 Use it.
6229
47301314
AD
62302003-08-25 Akim Demaille <akim@epita.fr>
6231
6232 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6233 error recovery loops. This patch is based on
161a71f3 6234 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
6235 Also, augment the similarity between lalr1.cc and yacc.c.
6236 Note: the locations of error recovery rules are not correct yet.
6237
6238 * data/lalr1.cc: Comment changes to augment the similarity between
6239 lalr1.cc and yacc.c.
6240 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6241 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6242 yyerrlab), when hitting EOF, pop the whole stack here instead of
6243 merely falling thru the default error handling mechanism.
6244 (yyerrorlab): New label, with the old contents of YYERROR,
6245 plus the following change: pop the stack of rhs corresponding
6246 to the production that invoked YYERROR. That is how Yacc
6247 behaves (required by POSIX).
6248 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6249 fail.
6250
1f7a61ff
AD
62512003-08-25 Akim Demaille <akim@epita.fr>
6252
6253 Tune local.at so that people can "autom4te -l autotest calc.at -o
6254 calc" for instance, to extract a sub test suite.
6255
6256 * tests/testsuite.at: Move the initialization, Autotest version
6257 requirement, and AT_TESTED invocation into...
6258 * tests/local.at: here.
6259 * tests/testsuite.at: Include it for compatibility with Autoconf
6260 2.57.
6261 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6262 be ignore.
6263
327b5b56
PE
62642003-08-04 Paul Eggert <eggert@twinsun.com>
6265
6266 Rework code slightly to avoid gcc -Wtraditional warnings.
6267 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6268 The returned value is now stored in *YY0. All callers changed.
6269 * src/output.c (merge_output): Adjust to the above change.
6270
0051e3ed
PE
62712003-07-26 Paul Eggert <eggert@twinsun.com>
6272
6273 * data/glr.c (YYASSERT): New macro.
6274 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6275 yyresolveStates, yyprocessOneStack):
6276 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6277 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 6278
137437c6
PE
62792003-07-25 Paul Eggert <eggert@twinsun.com>
6280
5b620e06
PE
6281 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6282 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 6283 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
6284 by Frank Heckenbach, though I have omitted the structure-initialization
6285 part of his glr-knr.diff patch since I recall that the Portable
6286 C Compiler didn't require that change.
6287
137437c6
PE
6288 Let the user specify how to allocate and free memory.
6289 Derived from a suggestion by Frank Heckenbach in
161a71f3 6290 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
6291 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6292 All uses of free, malloc, realloc changed to use these macros,
6293 and unnecessary casts removed.
6294 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6295
ddb85ca5
PE
62962003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6297
6298 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6299 use s.empty() rather than s == "" to test for empty string; see
161a71f3 6300 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
6301 (trivial change)
6302
39910e09
AD
63032003-06-25 Akim Demaille <akim@epita.fr>
6304
6305 * config/depcomp, config/install-sh: Update from masters.
6306
0ae99356
PE
63072003-06-20 Paul Eggert <eggert@twinsun.com>
6308
6309 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6310 and return properly parenthesized result.
6311 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6312 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6313 Remove unnecessary parentheses from uses.
6314 * doc/bison.texinfo (Location Default Action): Describe the
6315 conventions for parentheses.
6316
cd05d13c
PE
63172003-06-19 Paul Eggert <eggert@twinsun.com>
6318
81fd08ca
PE
6319 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6320 yyreportTree): Do not assume that size_t is the same width as int,
6321 when printing sizes. Print sizes using an unsigned format.
6322 Problem reported by Frank Heckenbach in
161a71f3 6323 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 6324
cd05d13c
PE
6325 Port to Forte Developer 7 C compiler.
6326 * data/glr.c (struct YYLTYPE): If locations are not being used,
6327 declare a single dummy member, as empty structs do not conform
6328 to the C standard.
6329 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6330 the Forte Developer 7 C compiler complains that end-of-loop
6331 code is not reached.
6332
4dcf140b
PE
63332003-06-17 Paul Eggert <eggert@twinsun.com>
6334
6335 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6336 avoid warnings from picky compilers about redefinition of PARAMS.
6337
8dd76bee
PE
63382003-06-17 Paul Eggert <eggert@twinsun.com>
6339
6340 Version 1.875b.
6341
6342 * NEWS: Document 1.875b.
6343
6344 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6345 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6346 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6347 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6348 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6349 per recent gettext manual's suggestion.
6350 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6351 Use prototypes, not old-style definitions.
6352 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6353 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6354 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6355 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6356 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6357 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6358 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6359 vbitset_or_and_cmp, vbitset_copy): Likewise.
6360
6361 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6362 Do not include <stdlib.h>.
6363 (PARAMS): Define unconditionally for C89.
6364 (ATTRIBUTE_NORETURN): Remove.
6365 (ATTRIBUTE_UNUSED): Define unconditionally.
6366
6367 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 6368 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
6369 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6370 * lib/vbitset.c, lib/vbitset.h: New files.
6371 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6372 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6373 from libbitset.
6374
6375 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6376 `How Can I Reset @code{yyparse}', since texinfo does not allow
6377 arbitrary @ in node names.
6378
6379 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6380 shouldn't be needed according to the gettext 0.12.1 documentation
6381 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 6382 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 6383 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 6384 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 6385
8dd76bee
PE
6386 * lib/.cvsignore: Add stdbool.h.
6387 * m4/.cvsignore: Add nls.m4, po.m4.
6388
6389 Upgrade to CVS gnulib.
6390 * stdbool_.h: File renamed from stdbool.h.in.
6391 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6392 AC_HEADER_STDBOOL.
6393 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6394 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6395 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6396 (MOSTLYCLEANFILES): New var.
6397 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6398 (stdbool.h): New rule.
6399 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6400 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6401 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6402 m4/quote.m4: Upgrade to today's gnulib.
6403
6404 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6405 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6406 the tests right now.
6407 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6408 yyerror are declared before use; C99 requires this.
6409
25005f6a
PH
64102003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6411
6412 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6413 first.
6414 (yyrecoverSyntaxError): Correct the logic for setting and testing
6415 yyerrState.
6416 Correct comment on handling EOF.
6417 Allow states with only a default reduction, rather than failing
8dd76bee 6418 (I can't quite reconstruct why these were not allowed before).
25005f6a 6419
137437c6 6420 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 6421 buffer overruns, corrupting state.
8dd76bee
PE
6422
6423 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
6424 definition.
6425 * src/reader.h (max_left_semantic_context): New variable declaration.
6426 * src/scan-gram.l (max_left_semantic_context): Define.
6427 (handle_action_dollar): Update max_left_semantic_context.
6428 * data/glr.c (YYMAXLEFT): New definition.
6429 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6430 (yyresolveAction): Ditto.
6431
6432 Fixes to problems with location handling in GLR parsers reported by
6433 Frank Heckenbach (2003/06/05).
6434
6435 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6436 (YYRHSLOC): Add parentheses, and define only if locations used.
6437 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6438 locations not used.
6439 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6440 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 6441
25005f6a
PH
6442 * tests/cxx-type.at: Exercise location information; update tests
6443 to differentiate output with and without locations.
8dd76bee 6444 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
6445 because default YYLTYPE not yet defined.
6446 Change semantic actions to compute strings, rather than printing
6447 them directly (to test proper passing of semantics values). Change
6448 output to prefix notation and update test data and expected results.
6449 (yylex): Track locations.
6450 (stmtMerge): Return value rather than printing, and include arguments
6451 in value.
8dd76bee 6452
711f40b7
PE
64532003-06-03 Paul Eggert <eggert@twinsun.com>
6454
6455 Avoid warnings generated by GCC 2.95.4 when Bison is
6456 configured with --enable-gcc-warnings.
6457 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6458 yy::]b4_parser_class_name[::translate_,
6459 yy::Stack::operator[] (unsigned),
6460 yy::Stack::operator[] (unsigned) const,
6461 yy::Slice::operator[] (unsigned),
6462 yy::Slice::operator[] (unsigned) const):
6463 Rename local vars to avoid warnings.
6464 * tests/glr-regression.at (Improper handling of embedded actions
6465 and $-N in GLR parsers): Remove unused local variable from yylex.
6466 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6467 (void) as arg when not pure, since we now assume C89 when building
6468 Bison. Pacify GCC by using parameter.
6469
ac695f7d
PE
64702003-06-02 Paul Eggert <eggert@twinsun.com>
6471
6472 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6473 yy::Location::lines, yy::Location::columns): Rename arguments
6474 to avoid shadowing; this removes a warning generated by GCC 3.3.
6475
26ec81e0
PE
64762003-06-01 Paul Eggert <eggert@twinsun.com>
6477
6478 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6479 to g++, as GCC 3.3 complains if you do it.
6480 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6481 everything that WARNING_CFLAGS has, except omit warnings
6482 not suitable for C++.
6483 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6484 * tests/atlocal.in (CXXFLAGS): New var.
6485 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6486
6487 Fix a GLR parser bug I reported in February; see
161a71f3 6488 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
6489 The problem was that GLR parsers did not conform to the C standard,
6490 because actions like { $1 = $2 + $3; } expanded to expressions
6491 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6492 to a local variable. The C standard says that expressions
6493 like (var = f ()) + (var = f ()) have undefined behavior.
6494 Another problem was that GCC sometimes issues warnings that
6495 yyfill and its parameters are unused.
6496
6497 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6498 as possibly unused.
6499 (yyfill): New function.
6500 (YYFILL): Use it.
6501 (yyuserAction): Change type of yynormal to bool, so that it matches
6502 the new yyfill signature. Mark it as possibly unused.
6503
6504
6505 Follow up on a bug I reported in February, where a Bison-generated
6506 parser can loop. Provide a test case and a fix for yacc.c. I
6507 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6508 The original bug report is in:
161a71f3 6509 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
6510
6511 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6512 macro's size was becoming unwieldy.
6513 (yyerrlab): Do not discard an empty lookahead symbol, as this
6514 might destroy garbage.
6515 (yyerrorlab): New label, with the old contents of YYERROR,
6516 plus the following change: pop the stack of rhs corresponding
6517 to the production that invoked YYERROR. That is how Yacc
6518 behaves, and POSIX requires this behavior.
6519 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6520 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6521 Define 'alarm' to do nothing if unistd.h is not available.
6522 Add a new rule "exp: '-' error;" to test the above change to
6523 data/yacc.c. Use 'alarm' to abort any test taking longer than
6524 10 seconds, as it's probably looping.
6525 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6526 Also, the new yacc.c generates two fewer diagnostics for an
6527 existing test.
6528
d0829076
PE
65292003-05-24 Paul Eggert <eggert@twinsun.com>
6530
c6ae27df
PE
6531 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6532 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6533 This fixes a problem reported by John Bowman when the Compaq/HP
6534 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6535 -ansi -Wall -gall).
6536 * data/yacc.c (union yyalloc): Likewise.
6537 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 6538
d0829076
PE
6539 Switch from 'int' to 'bool' where that makes sense.
6540
6541 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6542 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6543 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6544 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6545 Return or accept bool, not int. All callers changed.
6546 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6547 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6548 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6549 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6550 bitset_or_and_cmp_): Likewise.
6551 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6552 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6553 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6554 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6555 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6556 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6557 bitset_stats_or_and_cmp): Likewise.
6558 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6559 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6560 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6561 ebitset_xor_cmp): Likewise.
6562 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6563 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6564 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6565 lbitset_xor_cmp): Likewise.
6566 * lib/bbitset.h: Include <stdbool.h>.
6567 (struct bitset_vtable): The following members now return bool, not
6568 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6569 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6570 or_and_cmp).
6571 * src/conflicts.c (count_rr_conflicts): Likewise.
6572 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6573 All uses changed.
6574 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6575 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6576 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6577 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6578 graph_flag): Likewise.
6579 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6580 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6581 graph_flag): Likewise.
6582 * src/output.c (error_verbose): Likewise.
6583 * src/output.h (error_verbose): Likewise.
6584 * src/reader.c (start_flag, typed): Likewise.
6585 * src/reader.h (typed): Likewise.
6586 * src/getargs.c (LOCATIONS_OPTION): New constant.
6587 (long_options, getargs): Use it.
6588 * src/lalr.c (build_relations): Use bool, not int.
6589 * src/nullable.c (nullable_compute): Likewise.
6590 * src/print.c (print_reductions): Likewise.
6591 * src/tables.c (action_row, pack_vector): Likewise.
6592 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6593 * src/output.c (prepare): Use it.
6594 * src/output.c (token_definitions_output,
6595 symbol_destructors_output, symbol_destructors_output): Use string,
6596 not boolean integer, to keep track of whether to output separator.
6597 * src/print_graph.c (print_core): Likewise.
6598 * src/state.c (state_rule_lookaheads_print): Likewise.
6599
6600 * config/install-sh: Sync from automake 1.7.5.
6601
6b2584b7
PE
66022003-05-14 Paul Eggert <eggert@twinsun.com>
6603
6604 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6605 semicolon after a grammar declaration, in the interest of possible
6606 future changes to the Bison input language.
6607 Do not allow a stray semicolon at the start of the grammar.
6608 (rhses.1): Allow one or more semicolons after any rule, including
6609 just before "|" as required by POSIX.
6610 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6611 grammar.
6612
caf37a36
ADL
66132003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6614
6615 %parse-param support for lalr1.cc.
6616
6617 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6618 b4_cc_constructor_calls, b4_cc_constructor_call,
6619 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6620 definitions.
6621 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6622 parse-param arguments.
6623 (yy::b4_parser_class_name): Declare instance variables to
6624 hold parse-param arguments.
6625 * tests/calc.at: s/value/semantic_value/ because value clashes
6626 with a member of yy::b4_parser_class_name. Adjust C++ code
6627 to handle %parse-param. Enable %parse-param test in C++.
6628
3ab37077
PE
66292003-05-12 Paul Eggert <eggert@twinsun.com>
6630
6631 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6632 English a bit. Fix fclose typo. Change "const char" to "char
6633 const", and use ANSI C rather than K&R for "main". Suggest
6634 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6635 and suggest yy_switch_to_buffer.
6636
66372003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
6638
6639 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6640 C89. This avoids a diagnostic on compilers that define __STDC__
6641 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 6642 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 6643
e743727f
PE
66442003-05-03 Paul Eggert <eggert@twinsun.com>
6645
6646 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6647 Do not overrun array bounds.
6648 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 6649 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 6650
916708d5
AD
66512003-04-29 Akim Demaille <akim@epita.fr>
6652
6653 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6654 * src/getargs.c, src/getargs.h: here, as bool, not int.
6655 (nondeterministic_parser): New.
6656 * src/parse-gram.y, src/scan-gram.l: Support
6657 %nondeterministic-parser.
6658 * src/output.c (prepare): Use nondeterministic_parser instead
6659 of glr_parser where appropriate.
6660 * src/tables.c (conflict_row, action_row, save_row)
6661 (token_actions, token_actions, pack_vector): Ditto.
6662
a06ea4aa
AD
66632003-04-29 Akim Demaille <akim@epita.fr>
6664
6665 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6666
211074ca
AD
66672003-04-29 Akim Demaille <akim@epita.fr>
6668
6669 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6670 with %pure-parser and %locations to exercise the patch from Yakov
6671 Markovitch below.
6672
6175ffe3
PE
66732003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6674
6675 * data/yacc.c: (b4_lex_param): Corrected for the case where
6676 %lex-param is provided and %pure-parser isn't.
6677
b1e95857
PE
66782003-04-27 Paul Eggert <eggert@twinsun.com>
6679
6680 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 6681 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
6682 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6683 if it is not defined.
6684 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6685
acda9df6
PE
66862003-04-26 Paul Eggert <eggert@twinsun.com>
6687
3470c57b
PE
6688 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6689 Declare to be of type suitable for the ninf value itself, not of
6690 type suitable for the corresponding table, since the latter might
6691 be unsigned but the ninf value might be negative. This fixes a
6692 bug reported by Alexandre Duret-Lutz in
161a71f3 6693 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 6694
acda9df6
PE
6695 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6696 invokes it. We shouldn't invoke it twice because it will attempt
6697 to put error.o in the archive twice. This fixes a glitch reported
6698 by Martin Mokrejs in
161a71f3 6699 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 6700
b5250f26
PE
67012003-04-21 Paul Eggert <eggert@twinsun.com>
6702
6703 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6704 to gnulib.
6705
089ac0f1
PE
67062003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6707
6708 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6709 Fix obvious typo that results in uncompilable GLR parsers
6710 when both %pure-parser and %locations are used. (trivial change)
6711
5ededac6
PE
67122003-04-17 Paul Eggert <eggert@twinsun.com>
6713
1b8f2fff
PE
6714 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6715 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6716 Do not insert the expected token via unput, as this runs afoul
6717 of a POSIX-compatibility bug in flex 2.5.31.
6718 All uses changed to BEGIN the parent state,
6719 since we no longer insert the expected token via unput.
6720 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6721 that is no longer emitted after the above change.
6722
5ededac6
PE
6723 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6724 the first one. This change is from Paul Hilfinger, and it fixes
6725 regression reported by Werner Lemberg in
161a71f3 6726 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
6727
6728 (resolve_sr_conflict): Don't invoke state_errs_set
6729 unless one or more tokens have been explicitly made errors.
6730 Otherwise, the above change causes Bison to abort.
6731
6732 * tests/existing.at (GNU pic Grammar): New test case, taken from
6733 Lemberg's email.
6734
b8be9132
AD
67352003-03-31 Akim Demaille <akim@epita.fr>
6736
6737 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6738
d423d460
AD
67392003-03-31 Akim Demaille <akim@epita.fr>
6740
6741 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6742 output.
6743
c7e441b4
AD
67442003-03-31 Akim Demaille <akim@epita.fr>
6745
6746 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6747 From Paul Hilfinger.
6748
231897ad
AD
67492003-03-29 Akim Demaille <akim@epita.fr>
6750
6751 * m4/error.m4: Do not put under dynamic conditions some code which
6752 expansion is under static control.
6753
5b066063
AD
67542003-03-29 Akim Demaille <akim@epita.fr>
6755
6756 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6757
22a74fec
AD
67582003-03-29 Akim Demaille <akim@epita.fr>
6759
6760 * doc/bison.texinfo (Strings are Destroyed): New.
6761
0eee27e7
PE
67622003-03-13 Paul Eggert <eggert@twinsun.com>
6763
6764 * .cvsignore: Add configure.lineno.
6765 * src/.cvsignore: Add yacc.
6766 * tests/.cvsignore: Add testsuite.log.
6767 * doc/fdl.texi: Sync with latest FSF version.
6768
f61aad93
PE
67692003-03-12 Paul Eggert <eggert@twinsun.com>
6770
537636c7
PE
6771 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6772 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6773 cursor, instead of leaving it undefined. This fixes a bug
6774 reported by Tim Van Holder in
161a71f3 6775 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
6776 * tests/input.at (Torturing the Scanner): Test the scanner on
6777 an empty input file, which was Tim Van Holder's test case.
6778
6779 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6780 <sys/resource.h> can be included, include sys/time.h and
6781 sys/times.h first, if available. This works around the SunOS
6782 4.1.4 porting bug reported by Bruce Becker in
161a71f3 6783 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
6784
6785 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6786 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6787 AC_HEADER_SYS_WAIT.
6788
f61aad93
PE
6789 Merge changes from gnulib. This was prompted because the CVS
6790 snapshot didn't build on Solaris 7 due to strnlen problems.
6791
6792 These changes need to be merged back into gnulib:
6793 * lib/hash.c: Include <stdbool.h> unconditionally.
6794 * m4/onceonly.m4 (m4_quote): New macro.
6795 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6796 Quote AC_FOREACH variable-expansions properly.
6797 The 2003-01-03 obstack.h change also needs merging.
6798 {end of changes requiring merging}
5b066063 6799
f61aad93
PE
6800 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6801 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6802 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6803 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6804 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6805 New files, imported from gnulib.
6806 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6807 above.
6808
6809 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6810 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6811 gnulib sources.
6812
6813 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6814 Add.
6815 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6816 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6817 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6818 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6819 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6820 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6821 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6822 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6823 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6824 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6825 (jm_PREREQ_ARGMATCH): Remove.
6826 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6827 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6828
6829 * src/system.h: Include <stdbool.h> unconditionally.
6830
6831 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6832 assuming at least C89 in the bitset code for some time now.
6833
d2ffe116
AD
68342003-03-03 Akim Demaille <akim@epita.fr>
6835
6836 * ro.po: New.
6837
052826fd
AD
68382003-03-02 Akim Demaille <akim@epita.fr>
6839
6840 * doc/bison.texinfo (Table of Symbols): Reactivate the
6841 documentation for %lex-param, and %parse-param.
6842
c4749565
AD
68432003-03-02 Akim Demaille <akim@epita.fr>
6844
6845 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6846 generate verbose error messages.
6847 Use the number of tokens as an upper bound in yytname, as it
6848 cannot be a non terminal.
6849
d5286af1
AD
68502003-03-02 Akim Demaille <akim@epita.fr>
6851
6852 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6853 message.
6854
22e304a6
AD
68552003-03-02 Akim Demaille <akim@epita.fr>
6856
22e304a6
AD
6857 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6858 Use them to exercise yycheck overrun.
6859 Based on Andrew Suffield's grammar.
6860
67a25fed
AD
68612003-03-02 Akim Demaille <akim@epita.fr>
6862
6863 Create tests/local.at for Bison generic testing macros.
6864
6865 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6866 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6867 This new file.
6868 * tests/calc.at (AT_CHECK_CALC): Adjust.
6869 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6870 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6871 * tests/local.at: here.
6872 (AT_COMPILE_CXX): Tags the tests using it as c++.
6873 Ignore the test if CXX is not functional.
6874
9c2b381f
PE
68752003-03-01 Paul Eggert <eggert@twinsun.com>
6876
6877 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6878 not loc->end, since loc->end might contain garbage and this leads
6879 to undefined behavior on some platforms.
6880 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6881 depend on *loc, so that the reader doesn't give the the false
6882 impression that *loc is initialized.
6883 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6884 does not survive the return.
6885
0433ba88
AD
68862003-03-01 Akim Demaille <akim@epita.fr>
6887
6888 * src/scan-gram.l (code_start): Always initialize it when entering
6889 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6890 yylex invocation. An alternative would be making it static, but
6891 then it starts with the second %%'s beginning, instead of its end.
6892
b305ea69
PE
68932003-02-28 Paul Eggert <eggert@twinsun.com>
6894
6895 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6896 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 6897 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 6898
c3d25e01
PE
68992003-02-26 Paul Eggert <eggert@twinsun.com>
6900
6901 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6902 Remove Sequent/Pyramid discussion (nobody uses them any more).
6903 Merge VMS and MS-DOS discussion; these ports may well be dead
6904 but let's keep mentioning them for now. Put <> around email
6905 addresses. Add copyright notice.
6906
c267ffbc
PE
69072003-02-24 Paul Eggert <eggert@twinsun.com>
6908
6909 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6910 to avoid collision with flex use of yylineno.
6911 Problem reported by Bruce Lilly in
161a71f3 6912 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
6913 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6914 * data/yacc.c (yy_reduce_print): Likewise.
6915
6916 * config/depcomp: Sync with Automake 1.7.3.
6917
f939fc12
AD
69182003-02-21 Akim Demaille <akim@epita.fr>
6919
6920 * data/lalr1.cc: Use temporary variables instead of casts to
6921 change integer types.
6922 Suggested by Paul Eggert.
6923
95923bd6
AD
69242003-02-21 Akim Demaille <akim@epita.fr>
6925
6926 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6927 to avoid confusions with lalr1.cc's notion of Position.
6928 Suggested by Paul Eggert.
6929
2cdc240e
AD
69302003-02-20 Akim Demaille <akim@epita.fr>
6931
6932 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6933 before initial_columns.
6934 (location.hh): Use consistent variable names when defining the
6935 operator<<.
6936 Use "last" so that we subtract from Positions, not from unsigned.
6937
5d003116
AD
69382003-02-20 Akim Demaille <akim@epita.fr>
6939
6940 * data/lalr1.cc (position.hh): New subfile, including the extended
6941 and Doxygen'ed documentation of class Position.
6942 (location.hh): Use it.
6943 Document a` la Doxygen.
ba1ecc07 6944 With the help of Benoit Perrot.
5d003116 6945
d02b25f9
AD
69462003-02-20 Akim Demaille <akim@epita.fr>
6947
6948 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6949 AT_YACC_IF.
6950 Redefine AT_YYERROR_SEES_LOC_IF using it.
6951 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6952 not defined.
6953 Don't use the location in yy::Parser::error_ and
6954 yy::Parser::print_ when not %locations.
6955 Activate more lalr1.cc tests.
6956
0d1c3a04
AD
69572003-02-19 Akim Demaille <akim@epita.fr>
6958
6959 * data/lalr1.cc: When displaying a line number, be sure to make it
6960 an int.
6961
60a777aa
AD
69622003-02-19 Akim Demaille <akim@epita.fr>
6963
6964 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6965 Remove, useless.
6966 (YYABORT, YYACCEPT, YYERROR): New.
6967 * tests/calc.at: Renable the lalr1.cc test.
6968
0b86fc41
AD
69692003-02-19 Akim Demaille <akim@epita.fr>
6970
6971 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6972 error recovery, mixing with/without pops and discarding of the
6973 lookahead.
6974 Exercise YYERROR.
6975 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6976
da99a5dc
PE
69772003-02-17 Paul Eggert <eggert@twinsun.com>
6978
6979 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6980 * tests/testsuite.at (AT_COMPILE): Use them.
6981 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 6982 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 6983
93b8c255
PE
69842003-02-12 Paul Eggert <eggert@twinsun.com>
6985
6986 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6987 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6988 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6989 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6990 Check for malloc failure, for consistency with yacc.c.
6991 (yytname_size): Remove, for consistency with yacc.c.
6992
6993 The bug still remains in data/lalr1.cc, as I didn't have time
6994 to fix it there.
6995
7548fed2
AD
69962003-02-06 Akim Demaille <akim@epita.fr>
6997
6998 * configure.ac (GXX): Rename as...
6999 (CXX): this, to keep the original Autoconf semantics.
7000 Require 2.57.
7001 * data/lalr1.cc: Fix b4_copyright invocations.
7002 If YYDEBUG is not defined, don't depend upon name_ being defined.
7003 (location.hh): Include string and iostream.
7004 (Position::filename): New member.
7005 (Position::Position ()): New.
7006 (operator<< (Position)): New.
7007 (operator- (Position, int)): New.
7008 (Location::first, Location::last): Rename as...
7009 (Location::begin, Location::end): these, to mock the conventional
7010 iterator names.
7011 (operator<< (Location)): New.
7012 * tests/atlocal.in (CXX): New.
7013 * tests/testsuite.at (AT_COMPILE_CXX): New.
7014 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
7015 locations in a more synthetic way.
7016 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
7017 lalr1.cc is used.
7018 Adjust the C locations to match those from Emacs: first column is
7019 column 0.
7020 Change all the expected results.
7021 Conform to the GCS: simplify the locations when applicable.
7022 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
7023 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
7024 these CPP macros with the m4 macros new defined by...
7025 (AT_CHECK_PUSHDEFS): this, i.e.:
7026 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 7027 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
7028 New macros.
7029 (AT_CHECK_POPDEFS): Undefine them.
7030 (AT_CHECK_CALC_LALR1_CC): New.
7031 Use it for the first lalr1.cc test.
7032
43a176ef
AD
70332003-02-04 Akim Demaille <akim@epita.fr>
7034
7035 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7036 Location as is defined.
7037
fc049e9c
AD
70382003-02-04 Akim Demaille <akim@epita.fr>
7039
7040 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7041 name_ being defined.
7042
a737b216
PE
70432003-02-03 Paul Eggert <eggert@twinsun.com>
7044
7045 * src/gram.h (start_symbol): Remove unused decl.
7046
7047 Use more-consistent naming conventions for local vars.
7048
7049 * src/derives.c (derives_compute): Change type of local var from
7050 int to rule_number.
7051 * src/gram.c (grammar_rules_partial_print): Likewise.
7052 * src/print.c (print_core): Likewise.
7053 * src/reduce.c (reduce_grammar_tables): Likewise.
7054
7055 * src/gram.c (grammar_dump): Change name of item_number *
7056 local var from r to rp.
7057 * src/nullable.c (nullable_compute): Likewise.
7058
7059 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7060
7061 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7062 for symbol or symbol_number var.
7063 * src/reader.c (grammar_start_symbol_set): Likewise.
7064 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7065 Likewise.
7066 * src/state.c (transitions_to): Likewise.
7067 * src/state.h: Likewise.
7068 * src/tables.c (symbol_number_to_vector_number): Likewise.
7069
7070 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7071 char * var.
7072
7073 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7074 var.
7075
7076 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7077 var.
7078
7079 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7080 Use str, not s, for char * var. Use ch, not c, for character var.
7081 Use size for size var.
7082
7083 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7084 char * var.
7085 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7086 uniqstr var.
7087 * src/uniqstr.h: Likewise.
7088
7089 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7090 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7091 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7092 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7093 param to have same name as that of enum, so that we don't use
7094 "s" to stand for a non-state.
7095
68e93ad5
AD
70962003-02-02 Akim Demaille <akim@epita.fr>
7097
7098 * src/scan-skel.l: Scan more than one inert character per yylex
7099 invocation.
7100
92898986
PE
71012003-02-01 Paul Eggert <eggert@twinsun.com>
7102
7103 Version 1.875a.
7104
1d9d5d71
PE
7105 * po/LINGUAS: Add ms.
7106
0435d061
AD
71072003-01-30 Akim Demaille <akim@epita.fr>
7108
7109 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7110
6029a57f
PH
71112003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7112
7113 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7114 of $1.
0435d061
AD
7115
7116 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 7117 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 7118 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 7119
6029a57f
PH
7120 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7121 (b4_rhs_location): Ditto.
0435d061 7122 (yyfill): New function to copy from stack tree into array
6029a57f 7123 incrementally.
0435d061
AD
7124 (yyuserAction): Modify to allow incremental move of semantic values
7125 to rhs array when in GLR mode.
7126 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
7127 as needed.
7128 Remove dummy use of yystack, as there is now a guaranteed use.
7129 (yydoAction): Modify to allow incremental move of semantic values
7130 to rhs array when in GLR mode.
7131 (yyresolveAction): Ditto.
7132 (yyglrShiftDefer): Update comment.
0435d061 7133 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
7134 (yyglrReduce): Ditto.
7135 (yydoAction): Ditto
0435d061 7136
6029a57f
PH
7137 * tests/glr-regr1.at: Rename to ...
7138 * tests/glr-regression.at: Add new regression test for the problems
7139 described above (adapted from S. Eken).
7140 Update copyright notice.
7141 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7142 * tests/Makefile.am: Ditto.
7143
6cee6297
PE
71442003-01-28 Paul Eggert <eggert@twinsun.com>
7145
7146 * data/lalr1.cc: Do not use @output_header_name@ unless
7147 b4_defines_flag is set. This fixes two bugs reported by
7148 Tim Van Holder in
161a71f3
PE
7149 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7150 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 7151
b2a836b5
PE
71522003-01-21 Paul Eggert <eggert@twinsun.com>
7153
7154 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7155 we don't need to worry about yyerrlab1 being reported as an
7156 "unused label" by non-GCC C compilers. The downside is that if
7157 locations are used then a couple of statements are duplicated each
7158 time YYERROR is invoked, but the upside is that the warnings
7159 should vanish.
7160 (yyerrlab1): Move code to YERROR.
7161 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7162 This reverts some of the 2002-12-27 change.
7163
4196b931
PE
71642003-01-17 Paul Eggert <eggert@twinsun.com>
7165
7166 * src/output.c (symbol_printers_output): Fix typo that led
7167 to core dump. Problem reported by Antonio Rus in
161a71f3 7168 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 7169
3ae831b4
AD
71702003-01-13 Akim Demaille <akim@epita.fr>,
7171 Quoc Peyrot <chojin@lrde.epita.fr>,
7172 Robert Anisko <anisko_r@lrde.epita.fr>
7173
7174 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7175 when the stacks contain one element, as the loop would otherwise
7176 free the last state, and then use the top state (the one we just
7177 popped). This means that the initial elements will not be freed
7178 explicitly, as is the case in yacc.c; it is not a problem, as
7179 these elements have fake values.
7180
e3aa65c5
PE
71812003-01-11 Paul Eggert <eggert@twinsun.com>
7182
7183 * NEWS: %expect-violations are now just warnings, reverting
7184 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7185 bootstrapping problem reported by Matthias Klose; see
161a71f3 7186 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
7187 * src/conflicts.c (conflicts_print): Likewise.
7188 * tests/conflicts.at (%expect not enough, %expect too much,
7189 %expect with reduce conflicts): Likewise.
7190 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7191 that the warning is enabled if the number of conflicts changes
7192 (not necessarily increases).
7193
7194 * src/getargs.c (version): Update copyright year.
7195
f0057011
AD
71962003-01-09 Akim Demaille <akim@epita.fr>
7197
7198 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7199
1ee6d2a0
PE
72002003-01-08 Paul Eggert <eggert@twinsun.com>
7201
7202 * Makefile.maint (WGETFLAGS):
7203 New macro, containing "-C off" to disable proxy caches.
7204 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7205 (rel-check): Use $(WGET) instead of wget.
7206
d4fd77c4
PE
72072003-01-06 Paul Eggert <eggert@twinsun.com>
7208
7209 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7210 the GLR paper of Scott, Johnstone and Hussain.
7211
464c6927
PE
72122003-01-04 Paul Eggert <eggert@twinsun.com>
7213
d600ee67
PE
7214 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7215 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7216 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7217 (EXTRA_LIBRARIES): New var, for liby.a.
7218 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7219 (EXTRA_SCRIPTS): New var, for yacc.
7220
464c6927
PE
7221 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7222 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7223 Problem reported by Nelson H. F. Beebe.
7224
72252003-01-03 Paul Eggert <eggert@twinsun.com>
7226
7227 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7228 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7229 when compiling Bison 1.875's `bitset bset = obstack_alloc
7230 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7231
7232 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7233 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7234 grow to a huge size with typical invocation.
d600ee67 7235
464c6927
PE
7236 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7237 Use the pattern recommended by Autoconf 2.57, except also protect
7238 against double-definition.
7239 * src/system.h: Likewise.
7240 Portability issues reported by Nelson H. F. Beebe.
d600ee67 7241
464c6927
PE
7242 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7243 All uses changed. Provide a definition in both C and C++.
7244 (yytrue, yyfalse): Define even if defined (__cplusplus).
7245
7246 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7247 Reported by Nelson H. F. Beebe.
d600ee67 7248
464c6927
PE
7249 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7250
0f42c7d5
PE
72512003-01-02 Paul Eggert <eggert@twinsun.com>
7252
7253 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7254 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7255 Bug reported by Nelson H. F. Beebe.
7256
dc546b0f
PE
72572003-01-01 Paul Eggert <eggert@twinsun.com>
7258
7259 * Version 1.875.
7260
2c09b6a7
PE
72612002-12-30 Paul Eggert <eggert@twinsun.com>
7262
7263 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7264 Moved here from...
7265 (<INITIAL>","): Here. This causes stray "," to be treated
7266 more uniformly.
7267
dc546b0f 7268 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
7269 last brace in braced code when not in Yacc mode, for compatibility
7270 with Bison 1.35. This resurrects the 2001-12-15 patch to
7271 src/reader.c.
7272
7273 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7274 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7275
535c0f63
PE
72762002-12-28 Paul Eggert <eggert@twinsun.com>
7277
7278 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7279 that of SYM's type. This fixes Debian bug 168069, reported by
7280 Thomas Olsson.
d600ee67 7281
963fcc17
PE
72822002-12-28 Paul Eggert <eggert@twinsun.com>
7283
7284 Version 1.75f.
7285
7286 Switch back to the Yacc style of conflict reports, undoing some
7287 of the 2002-07-30 change.
7288 * doc/bison.texinfo (Understanding): Use Yacc style for
7289 conflict reports. Also, use new way of locating rules.
7290 * src/conflicts.c (conflict_report):
7291 Renamed from conflict_report_yacc, removing the old
7292 'conflict_report'. Translate the entire conflict report at once,
7293 so that we don't assume that "," has the same interpretation in
7294 all languages.
7295 (conflicts_output): Use Yacc-style conflict report for each state,
7296 instead of our more-complicated style.
7297 (conflicts_print): Use Yacc-style conflict report, except print
7298 the input file name when not emulating Yacc.
7299 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7300 Conflicted Reduction, %expect not enough, %expect too much,
7301 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7302 * tests/existing.at (GNU Cim Grammar): Likewise.
7303 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7304
7305 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7306 fatal): Don't invoke fflush; it's not needed and it might even be
7307 harmful for stdout, as stdout might not be open.
7308 * src/reduce.c (reduce_print): Likewise.
7309
b1efe548
PE
73102002-12-27 Paul Eggert <eggert@twinsun.com>
7311
7312 Fix a bug where error locations were not being recorded correctly.
7313 This problem was originally reported by Paul Hilfinger in
161a71f3 7314 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
7315
7316 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7317 top of the location stack's error locations.
7318 (yyerrlab): Set it. When discarding a token, push its location
7319 onto yylerrsp so that we don't lose track of the error's end.
7320 (yyerrlab1): Now is only the target of YYERROR, so that we can
7321 properly record the location of the action that failed. For GCC
7322 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7323 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7324 (yyerrlab2): New label, which yyerrlab now falls through to.
7325 Compute the error's location by applying YYLLOC_DEFAULT to
7326 the locations of all the symbols that went into the error.
7327 * doc/bison.texinfo (Location Default Action): Mention that
7328 YYLLOC_DEFAULT is also invoked for syntax errors.
7329 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7330 Error locations include the locations of all the tokens that were
7331 discarded, not just the last token.
d600ee67 7332
983c5c2c
PE
73332002-12-26 Paul Eggert <eggert@twinsun.com>
7334
b1efe548
PE
7335 * src/files.c: Include quote.h.
7336 (compute_output_file_names): Warn if we detect conflicting
7337 outputs to the same file. This should catch the misunderstanding
7338 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7339
7340 * src/conflicts.c (conflicts_print): If the user specifies
7341 "%expect N", report an error if there are any reduce/reduce
7342 conflicts. This is what the manual says should happen.
7343 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7344 * tests/conflicts.at (%expect with reduce conflicts): New test.
7345
983c5c2c
PE
7346 Don't use m4_include on relative file names, as it doesn't work as
7347 desired if there happens to be a file with that name under ".".
d600ee67 7348
983c5c2c
PE
7349 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7350 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7351 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7352 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7353 * src/output.c (output_skeleton): Use full path names when
7354 specifying a file to include; don't rely on include path, as
7355 it's unreliable when the working file contains a file with
7356 that name.
d600ee67 7357
983c5c2c
PE
73582002-12-25 Paul Eggert <eggert@twinsun.com>
7359
7360 Remove obsolete references to bison.simple and bison.hairy.
7361 Problem mentioned by Aubin Mahe in
161a71f3 7362 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
7363 * data/glr.c: Comment fix.
7364 * doc/bison.1: Remove references. Also, mention "yacc".
7365
7366 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7367 with -g option.
7368
7369 * src/parse-gram.y (declaration): Use enum "report_states" rather
7370 than its numeric value 1.
7371
7372 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7373 opening a new one. This fixes Debian bug 165349, reported by
7374 Bruce Stephens.
7375
23f2d9dc
PE
73762002-12-24 Paul Eggert <eggert@twinsun.com>
7377
7378 Version 1.75e.
7379
7380 * Makefile.maint (cvs-update): Don't assume that the shell
7381 supports $(...), as Solaris sh doesn't.
7382
7383 * src/parse-gram.y (lloc_default): Remove test for empty
7384 nonterminals at the end, since it didn't change the result.
7385
73862002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
7387
7388 If the user does not define YYSTYPE as a macro, Bison now declares it
7389 using typedef instead of defining it as a macro. POSIX requires this.
7390 For consistency, YYLTYPE is also declared instead of defined.
7391
7392 %union directives can now have a tag before the `{', e.g., the
7393 directive `%union foo {...}' now generates the C code
7394 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7395 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7396 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7397 instead of `yyltype'.
7398
7399 `yystype' and `yyltype' are now obsolescent macros instead of being
7400 typedefs or tags; they are no longer documented and will be
7401 withdrawn in a future release.
7402
7403 * data/glr.c (b4_location_type): Remove.
7404 (YYSTYPE): Renamed from yystype.
7405 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7406 (struct YYLTYPE): Renamed from struct yyltype.
7407 (YYLTYPE): Renamed from yyltype.
7408 (yyltype, yystype): New (and obsolescent) macros,
7409 for backward compatibility.
7410 * data/yacc.c: Likewise.
7411
7412 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7413 does not specify a union tag. This is for compatibility with
7414 Solaris 9 yacc.
7415
7416 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7417 const *, since it is now modified by stripping surrounding { }.
7418 (current_braced_code): Remove.
7419 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7420 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7421 trailing " {...}". Now of type <chars>.
7422 (grammar_declaration): Adjust to bundled tokens.
7423 (code_content): Remove; stripping is now done by add_param.
7424 (print_token_value): Print contents of bundled tokens.
7425 (token_name): New function.
7426
7427 * src/reader.h (braced_code, current_braced_code): Remove.
7428 (token_name): New decl.
7429
7430 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7431 token_type, not braced_code code_kind. All uses changed.
7432 (SC_PRE_CODE): New state, for scanning after a keyword that
7433 has (or usually has) an immediately-following braced code.
7434 (token_type): New local var, to keep track of which token type
7435 to return when scanning braced code.
7436 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 7437 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
7438 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7439 instead of returning a token type immediately.
7440 (<INITIAL>"{"): Set token type.
7441 (<SC_BRACED_CODE>"}"): Use it.
7442 (handle_action_dollar, handle_action_at): Now returns bool
7443 indicating success. Fail if ! current_rule; this prevents a core dump.
7444 (handle_symbol_code_dollar, handle_symbol_code_at):
7445 Remove; merge body into caller.
7446 (handle_dollar, handle_at): Complain in invalid contexts.
7447
7448 * NEWS, doc/bison.texinfo: Document the above.
7449 * NEWS: Fix years and program names in copyright notice.
7450
879ca4f8
PE
74512002-12-17 Paul Eggert <eggert@twinsun.com>
7452
7453 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7454 Reporting, Table of Symbols): Omit mentions of %lex-param and
7455 %parse-param from the documentation for now.
7456
1c5fe69d
PE
74572002-12-15 Paul Eggert <eggert@twinsun.com>
7458
7459 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7460 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7461 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
7462 disagreed with the Bison documentation. Bug
7463 reported by Andrew Walrond.
d600ee67 7464
1c5fe69d
PE
7465 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7466 as the caller now does that.
7467 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7468 (YYEMPTY): Parenthesize right hand side, since others use it.
7469 (yyparse): Don't assume that our generated code is the only code
7470 that sets yychar.
7471
d1de5372
PE
74722002-12-13 Paul Eggert <eggert@twinsun.com>
7473
7474 Version 1.75d.
7475
7476 POSIX requires a "yacc" command.
7477 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7478 (MOSTLYCLEANFILES): Add yacc.
7479 (yacc): New rule.
1c5fe69d 7480 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
7481 as an alias for bison y.
7482
7483 * po/LINGUAS: Add da.
d600ee67 7484
d1de5372
PE
7485 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7486 problem with latest <getopt.h>.
7487 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7488
7489 * doc/fdl.texi: Upgrade to 1.2.
7490 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7491 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7492 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7493 gnulib.
7494 * config/install-sh: Sync with autotools.
7495
7496 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 7497 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
7498 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7499 locations are requested.
7500 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7501 locations are requested.
7502
d0f3fe23
PE
75032002-12-12 Paul Eggert <eggert@twinsun.com>
7504
7505 Remove unportable casts and storage allocation tricks.
7506 While we're at it, remove almost all casts, since they
7507 usually aren't needed and are a sign of trouble.
7508
7509 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7510
7511 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7512 the pointer DSET returned by malloc; this isn't portable.
7513 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7514 Similarly for DERIVES.
7515 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7516 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7517 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7518
7519 * src/derives.c (derives_compute): Do not bother invoking
7520 int_of_rule_number, since rule numbers are integers.
7521
7522 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7523 rather than XMALLOC (char, N).
7524
7525 * src/files.c (filename_split): Rewrite to avoid cast.
7526
7527 * src/gram.h (symbol_number_as_item_number,
7528 item_number_as_symbol_number, rule_number_as_item_number,
7529 item_number_as_rule_number):
7530 Now inline functions rather than macros, to avoid casts.
7531 * src/state.h (state_number_as_int): Likewise.
7532 * src/tables.c (state_number_to_vector_number,
7533 symbol_number_to_vector_number): Likewise.
7534
7535 * src/gram.h (int_of_rule_number): Remove; no longer used.
7536
7537 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7538 since the resulting storage is always stored into.
7539
7540 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7541 where it's needed.
7542
7543 * src/muscle_tab.c (muscle_m4_output):
7544 Now inline. Return bool, not int.
7545 * src/state.c (state_compare): Likewise.
7546 * src/symtab.c (symbol_check_defined,
7547 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7548 hash_compare_symbol, hash_symbol):
7549 Likewise.
7550 * src/uniqstr.c (uniqstr_print): Likewise.
7551 * src/muscle_tab.c (muscle_m4_output_processor):
7552 New function, to avoid casts.
7553 * src/state.c (state_comparator, stage_hasher): Likewise.
7554 * src/symtab.c (symbol_check_defined_processor,
7555 symbol_check_alias_consistency_processor, symbol_pack_processor,
7556 symbol_translation_processor, hash_symbol_comparator,
7557 hash_symbol_hasher): Likewise.
7558 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7559 * src/muscle_tab.c (muscles_m4_output):
7560 Use new functions instead of casting old functions unportably.
7561 * src/state.c (state_hash_new): Likewise.
7562 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7563 symbols_token_translations_init):
7564 Likewise.
7565 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7566
7567 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7568 var instead of casting to long, to avoid casts.
7569 (prepare_states): Use MALLOC rather than alloca, so that we don't
7570 have to worry about alloca.
7571 * src/state.c (state_hash_lookup): Likewise.
7572
7573 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7574 local var instead of casting to unsigned char, to avoid casts.
7575
7576 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7577 STATE_ALLOC): Remove.
7578 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7579 rather than calloc, and use offsetof to avoid allocating slightly
7580 too much storage.
7581 (state_new): Initialize all members.
7582
7583 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7584
7585 * src/symtab.c (symbol_free): Remove; unused.
7586 (symbol_get): Remove cast in lhs of assignment.
7587 (symbols_do): Now static. Accept generic arguments, not
7588 hashing-related ones.
7589
7590 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7591 (symbol_processor): Remove.
7592 (symbols_do): Remove decl; now static.
7593
7594 * src/system.h (alloca): Remove; decl no longer needed.
7595 (<stddef.h>): Include, for offsetof.
7596 (<inttypes.>, <stdint.h>): Include if available.
7597 (uintptr_t): New type, if system lacks it.
7598 (CALLOC, MALLOC, REALLOC): New macros.
7599 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7600 new macros.
7601
7602 * src/tables.c (table_size): Now int, to pacify GCC.
7603 (table_grow, table_ninf_remap): Use signed table size.
7604 (save_row): Don't bother initializing locals when not needed.
7605 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7606 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7607
7608 * src/vcg.h: Correct misspellings.
7609
7610 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7611
7612
7613 * src/getargs.c (getargs): Don't assume EOF == -1.
7614
26b4a969
PE
76152002-12-09 Paul Eggert <eggert@twinsun.com>
7616
7617 Change identifier spellings to avoid collisions with names
7618 that are reserved by POSIX.
7619
7620 Don't use names ending in _t, since POSIX reserves them.
7621 For consistency, remove _e and _s endings -- they're weren't
7622 needed to remove ambiguity. All uses changed.
7623 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7624 turn was just renamed from struniq_t.
7625 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7626 which in turn was just renamed from struniq_processor_t.
7627 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7628 in turn was renamed from hash_compare_struniq_t.
7629 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7630 (state_list): Renamed from state_list_t.
7631 * src/assoc.h (assoc): Renamed from assoc_t.
7632 * src/conflicts.c (enum conflict_resolution): Renamed from
7633 enum conflict_resolution_e.
7634 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7635 (rule_list): Renamed from rule_list_t.
7636 * src/getargs.h (enum trace): Renamed from enum trace_e.
7637 (enum report): Renamed from enum report_e.
7638 * src/gram.h (item_number): Renamed from item_number_t.
7639 (rule_number): Renamed from rule_number_t.
7640 (struct rule_s): Remove the "rule_s" part; not used.
7641 (rule): Renamed from rule_t.
7642 (rule_filter): Renamed from rule_filter_t.
7643 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7644 (goto_list): Renamed from goto_list_t.
7645 * src/lalr.h (goto_number): Renamed from goto_number_t.
7646 * src/location.h (location): Renamed from location_t.
7647 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7648 and moved here from:
7649 * src/muscle_tab.h (muscle_entry_t): here.
7650 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7651 (rule_list): Renamed from rule_list_t.
7652 * src/print_graph.c (static_graph): Renamed from graph.
7653 * src/reader.h (braced_code): Renamed from braced_code_t.
7654 Remove brace_code_e tag.
7655 * src/relation.h (relation_node): Renamed from relation_node_t.
7656 (relation_nodes): Renamed from relation_nodes_t.
7657 (relation): Renamed from relation_t.
7658 * src/state.h (state_number): Renamed from state_number_t.
7659 (struct state): Renamed from struct state_s.
7660 (state): Renamed from state_t.
7661 (transitions): Renamed from transitions_t. Unused (and
7662 misspelled) transtion_s tag removed.
7663 (errs): Renamed from errs_t. Unused errs_s tag removed.
7664 (reductions): Renamed from reductions_t. Unused tag
7665 reductions_s removed.
7666 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7667 (struct symbol_list): Renamed from struct symbol_list_s.
7668 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7669 (struct symbol): Renamed from struct symbol_s.
7670 (symbol): Renamed from symbol_t.
7671 * src/tables.c (vector_number): Renamed from vector_number_t.
7672 (action_number): Renamed from action_t.
7673 * src/tables.h (base_number): Renamed from base_t.
7674 * src/vcg.h (enum color): Renamed from enum color_e.
7675 (enum textmode): Renamed from enum textmode_e.
7676 (enum shape): Renamed from enum shape_e.
7677 (struct colorentry): Renamed from struct colorentry_s.
7678 (struct classname): Renamed from struct classname_s.
7679 (struct infoname): Renamed from struct infoname_s.
7680 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7681 (enum decision): Renamed from enum decision_e.
7682 (enum orientation): Renamed from enum orientation_e.
7683 (enum alignment): Renamed from enum alignment_e.
7684 (enum arrow_mode): Renamed from enum arrow_mode_e.
7685 (enum crossing_type): Renamed from enum crossing_type_e.
7686 (enum view): Renamed from enum view_e.
7687 (struct node): Renamed from struct node_s.
7688 (node): Renamed from node_t.
7689 (enum linestyle): Renamed from enum linestyle_e.
7690 (enum arrowstyle): Renamed from enum arrowstyle_e.
7691 (struct edge): Renamed from struct edge.
7692 (edge): Renamed from edge_t.
7693 (struct graph): Renamed from struct graph_s.
7694 (graph): Renamed from graph_t.
7695 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7696 Rename value_t -> value.
7697 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7698 value_t_as_yystype -> value_as_yystype.
7699
7700 Don't include <errno.h> in the mainstream code, since it
7701 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7702 * lib/get-errno.c, lib/get-errno.h: New files.
7703 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7704 get-errno.c.
7705 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7706 * src/output.c (output_skeleton): Likewise.
7707 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7708 instead of errno.
7709 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7710 Likewise.
7711 (handle_action_dollar, handle_action_at): Likewise.
7712 * src/system.h: Do not include <errno.h>.
7713 (TAB_EXT): Renamed from EXT_TAB.
7714 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7715
7716 Avoid str[a-z]*, since <string.h> reserves that name space.
7717 Change all instances of "struniq" in names to "uniqstr", and
7718 likewise for "STRUNIQ" and "UNIQSTR".
7719 * src/uniqstr.c: Renamed from src/struniq.c.
7720 * src/uniqstr.h: Renamed from src/struniq.h.
7721 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7722 * src/files.c (strsuffix): Remove; unused.
7723 (concat2): Renamed from stringappend. Now static.
7724 * src/files.h (strsuffix, stringappend): Remove; unused.
7725 * src/parse-gram.y (<chars>): Renamed from <string>.
7726 (<uniqstr>): Renamed from <struniq>.
7727 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7728 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7729 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7730 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7731 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7732 (N_EXPAND): Renamed from N_STRETCH.
7733
7734 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7735 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7736 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7737 Remove; unused.
7738 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7739 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7740 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7741 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7742 (BASE_MAXIMUM): Renamed from BASE_MAX.
7743 (BASE_MINIMUM): Renamed from BASE_MIN.
7744 (ACTION_MAX): Remove; unused.
7745 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7746 Unnecessary casts removed from above defines.
7747
7748
7749 Fix misspelling in names.
7750 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7751 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7752 G_NODE_ALIGNEMENT.
7753
7754
7755 * lib/timevar.c (timevar_report): Renamed from time_report,
7756 for consistency with other names.
7757 * lib/timevar.h (timevar_report): New decl.
7758 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7759
7760
7761 Sort include-file uses.
7762
7763 Reorder all include files under src to be in the order "system.h".
7764 then the ../lib include files in angle brackets (alphabetized),
7765 then the . include files in double-quotes (alphabetized). Fix
7766 dependency breakages encountered in this process, as follows:
7767 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7768 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7769 * src/state.h: Include "symtab.h".
7770
996b1c7e
PE
77712002-12-08 Paul Eggert <eggert@twinsun.com>
7772
7773 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7774 since this causes problems when __file__ contains character
7775 sequences like "@" that are treated specially by src/scan-skel.l.
7776 Instead, just use the file's basename. This fixes the bug
7777 reported by Martin Mokrejs in
161a71f3 7778 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 7779
e19c4e5d
PE
77802002-12-06 Paul Eggert <eggert@twinsun.com>
7781
7782 Add support for rules that do not have trailing semicolons, as
7783 POSIX requires. Improve the quality of locations in Bison
7784 diagnostics.
26b4a969 7785
e19c4e5d
PE
7786 * src/location.c: Include <quotearg.h>.
7787 (empty_location): Now const.
7788 (location_print): New function. Follow the recommendation of the
7789 GNU Coding Standards for locations that span file boundaries.
7790 * src/location.h: Do not include <quotearg.h>; no longer needed.
7791 (boundary): New type.
7792 (location_t): Use it. This allows locations to span file boundaries.
7793 All member uses changed: file -> start.file or end.file (as needed),
7794 first_line -> start.line, first_column -> start.column,
7795 last_line -> end.line, last_column -> end.column.
7796 (equal_boundaries): New function.
7797 (LOCATION_RESET, LOCATION_STEP): Remove.
7798 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7799 (empty_location): Now const.
7800 (location_print): New decl.
7801 * src/parse-gram.y (lloc_default): New function, which handles
7802 empty locations more accurately.
7803 (YYLLOC_DEFAULT): Use it.
7804 (%token COLON): Remove.
7805 (%token ID_COLON): New token.
26b4a969 7806 (rules): Use it.
e19c4e5d
PE
7807 (declarations, rules): Remove trailing semicolon.
7808 (declaration, rules_or_grammar_declaration):
7809 Allow empty (";") declaration.
7810 (symbol_def): Remove empty actions; no longer needed.
7811 (rules_or_grammar_declaration): Remove trailing semicolon.
7812 (semi_colon.opt): Remove.
7813 * src/reader.h: Include location.h.
7814 (scanner_cursor): New decl.
7815 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7816 rolling our own.
7817 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7818 of *loc.
7819 (STEP): Remove. No longer needed, now that adjust_location does
7820 the work. All uses removed.
7821 (scanner_cursor): New var.
7822 (adjust_location): Renamed from extend_location. It now sets
7823 *loc and adjusts the scanner cursor. All uses changed.
7824 Don't bother testing for CR.
7825 (handle_syncline): Remove location arg; now updates scanner cursor.
7826 All callers changed.
7827 (unexpected_end_of_file): Now accepts start boundary of token or
7828 comment, not location. All callers changed. Update scanner cursor,
7829 not the location.
7830 (SC_AFTER_IDENTIFIER): New state.
7831 (context_state): Renamed from c_context. All uses changed.
7832 (id_loc, code_start, token_start): New local vars.
7833 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7834 processing of Yacc white space and equivalents here.
7835 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7836 instead of returning ID immediately, since we need to search for
7837 a subsequent colon.
7838 (<INITIAL>"'", "\""): Save token_start.
7839 (<INITIAL>"%{", "{", "%%"): Save code_start.
7840 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7841 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7842 BEGIN context_state at end, not INITIAL.
7843 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7844 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7845 Return correct token start.
7846 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7847 the start of a character, string or multiline comment is found.
7848 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7849 Reduction): Adjust reported locations to match the more-precise
7850 results now expected.
7851 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7852 * tests/reduce.at (Useless Rules, Reduced Automaton,
7853 Underivable Rules): Likewise.
7854 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7855 or "|"' now that so many other tokens are allowed by the new grammar.
7856
7857 * src/complain.h (current_file): Remove duplicate decl;
7858 current_file is now owned by files.h.
7859 * src/complain.c, src/scan-gram.l: Include files.h.
7860
78612002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 7862
e19c4e5d
PE
7863 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7864 promotes to int; it might be unsigned int.
7865 * data/yacc.c (yy_reduce_print): Likewise.
7866
7867 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7868 be #defined in the prologue, not in the Bison declarations.
7869 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 7870
b64755e3
PE
78712002-12-02 Paul Eggert <eggert@twinsun.com>
7872
7873 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7874 * lib/strtoul.c: New file, from gnulib.
7875 This fixes a porting bug reported by Peter Klein in
161a71f3 7876 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 7877
6e746484
PE
78782002-11-30 Paul Eggert <eggert@twinsun.com>
7879
b64755e3
PE
7880 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7881 and put only a forward declaration in the prologue. This is for
7882 consistency with the other scanner helper functions.
7883
6ba55592
PE
7884 Type clashes now generate warnings, not errors, since it
7885 appears that POSIX may allow some grammars with type clashes.
7886 * src/reader.c (grammar_current_rule_check): Warn about
7887 type clashes instead of complaining.
7888 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7889
6e746484
PE
7890 Add Yacc library, since POSIX requires it.
7891 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7892 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7893 * lib/main.c, lib/yyerror.c: New files.
7894
7895 gram_error can be static; it need not be extern.
7896 * src/reader.h (gram_error): Remove decl.
7897 * src/parse-gram.y (gram_error): Now static. Add static decl.
7898 (print_token_value): Omit parameter names from forward decl,
7899 for consistency.
7900
88510f9c
PE
79012002-11-29 Paul Eggert <eggert@twinsun.com>
7902
6e746484
PE
7903 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7904 be declared before being used. E.g., one should typically
7905 declare them in the prologue. Use GNU coding style in examples.
7906 Put "const" consistently after the type it modifies. Mention
7907 that C99 supports "inline". Mention that yyerror traditionally
7908 returns "int".
7909
88510f9c
PE
7910 %parse-param and %lex-param now take just one argument, the
7911 declaration; the argument name is deduced from the declaration.
7912
7913 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7914 Reporting, Table of Symbols): Document this.
7915 * src/parse-gram.y (add_param): New function.
7916 (COMMA): Remove.
7917 (declaration): Implement new rule for %parse-param and %lex-param.
7918 * src/scan-gram.l: "," now elicits a warning, rather than being
7919 a token; this is more compatible with byacc.
7920 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7921
bb92250c
PE
79222002-11-27 Paul Eggert <eggert@twinsun.com>
7923
7924 Rename identifiers to avoid real and potential collisions.
7925
7926 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7927 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 7928 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
7929 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7930 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7931 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7932 All uses changed.
7933 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7934 The name "yycontrol" violates the name space rules, and this stuff
7935 wasn't being used anyway.
7936 (input): Remove action; this stuff wasn't being used.
7937 (gram_error): Rename local variable yylloc -> loc.
7938 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7939 (YY_DECL): Don't use "yy" at start of local variables.
7940 All uses changed, e.g., yylloc -> loc.
7941 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7942 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7943 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7944 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7945
7946 * src/parse-gram.y (gram_error): loc is now const *.
7947 * src/reader.h (gram_error): Likewise.
7948
3af4feb2
PE
79492002-11-24 Paul Eggert <eggert@twinsun.com>
7950
7951 Version 1.75c.
7952
7953 * tests/actions.at (Actions after errors): Use an output format
7954 more similar to that of the Printers and Destructors test.
7955 Test the position of the ';' token too.
7956 (Printers and Destructors): Likewise.
7957 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7958 unnecessarily alarming people when the test fails.
7959
7960 * data/yacc.c (yyerrlab1): Move this label down, so that the
7961 parser does not discard the lookahead token if the user code
7962 invokes YYERROR. This change is required for POSIX conformance.
7963
7964 * lib/error.c: Sync with gnulib.
7965
79662002-11-22 Paul Eggert <eggert@twinsun.com>
7967
7968 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7969 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7970 * lib/xmalloc.c: Likewise.
26b4a969 7971
58004308
PE
79722002-11-20 Paul Eggert <eggert@twinsun.com>
7973
7974 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7975
79762002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 7977
58004308
PE
7978 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7979 should use `if (! x) abort ();' rather than `assert (x);', and
7980 anyway it's one less thing to worry about configuring.
7981
7982 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7984 and replace all instances of assert with abort.
7985 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7986 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7987
7988 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7989 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7990 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7991 hash_find_entry, hash_rehash, hash_insert): Likewise.
7992 * src/conflicts.c (resolve_sr_conflict): Likewise.
7993 * src/lalr.c (set_goto_map, map_goto): Likewise.
7994 * src/nullable.c (nullable_compute): Likewise.
7995 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7996 * src/reader.c (packgram, reader): Likewise.
7997 * src/state.c (state_new, state_free, state_transitions_set,
7998 state_reduction_find): Likewise.
7999 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
8000 symbol_pack): Likewise.
8001 * src/tables.c (conflict_row, pack_vector): Likewise.
8002 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8003 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8004 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
8005 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
8006
8007 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
8008 (ARGMATCH_CONSTRAINT): New macro.
8009 (ARGMATCH_ASSERT): Use it.
8010
8011 * src/system.h (verify): New macro.
8012 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
8013 rather than assert.
8014 * src/tables.c (tables_generate): Likewise.
8015
8016 * src/struniq.c (struniq_assert): Now returns void, and aborts
8017 if the assertion is false.
8018 (struniq_assert_p): Remove.
8019 * src/struniq.h: Likewise.
8020
76ae8198
PE
80212002-11-18 Paul Eggert <eggert@twinsun.com>
8022
8023 * data/glr.c (yygetLRActions): Replace `yyindex' with
8024 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
8025 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 8026 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 8027
d3c4e709
AD
80282002-11-18 Akim Demaille <akim@epita.fr>
8029
8030 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
8031 space.
8032 From Tim Van Holder.
8033
8d8a7238
PE
80342002-11-17 Paul Eggert <eggert@twinsun.com>
8035
8036 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8037 to "SyntaxError" for consistency with my 2002-11-15 change.
8038
8039 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8040 not define to {}, since this breaks the common use of `YYDPRINTF
8041 ((...));' if a single statement is desired (e.g. before `else').
8042 Work around GCC warnings by surrounding corresponding calls with
8043 {} if needed.
8044 (yyhasResolvedValue): Remove unused function.
8045 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8046 loop body.
8047 (yyreportSyntaxError): Renamed from yyreportParseError.
8048 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8049 All uses changed.
8050 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8051 extern when possible. Remove unused initializations.
8052
b0937b22
AD
80532002-11-16 Akim Demaille <akim@epita.fr>
8054
8055 Augment the similarity between GLR and LALR traces.
8056
8057 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8058 (YY_REDUCE_PRINT): New.
8059 (yyparse): Use them.
8060 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8061 YYDPRINT here.
8062 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8063 state reached after the reduction/recovery, since...
8064 (yyparse, yyprocessOneStack): Report the state we are entering in.
8065
c5e3e510
AD
80662002-11-16 Akim Demaille <akim@epita.fr>
8067
8068 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8069 Add support for --trace=skeleton.
8070 * src/scan-skel.l: %option debug.
8071 Scan strings of non-@ or \n instead of character by character.
8072 (scan_skel): Handle trace_skeleton.
8073 (QPUTS): New.
8074 (@output_parser_name@, @output_header_name@): ``Restore'' their
8075 support (used to be M4 macros).
8076 * data/yacc.c: Quote larger chunks, a la glr.c.
8077 * data/lalr1.cc: Likewise.
8078 The header guards are no longer available, so use some other
8079 string than `YYLSP_NEEDED'.
8080
4c6cc1db
AD
80812002-11-16 Akim Demaille <akim@epita.fr>
8082
8083 Make the ``Printers and Destructors'' test more verbose, taking
8084 `yacc.c''s behavior as (possibly wrong) reference.
8085
8086 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8087 instead of fprint on stdout.
8088 Set and report the last_line of the symbols.
8089 Consistently display values and locations.
8090
6d9e8019
PE
80912002-11-16 Paul Eggert <eggert@twinsun.com>
8092
8093 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8094
6e649e65
PE
80952002-11-15 Paul Eggert <eggert@twinsun.com>
8096
b25d88f6
PE
8097 * tests/actions.at (Actions after errors): New test case.
8098
6e649e65
PE
8099 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8100 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8101 tests/action.at, tests/calc.at, tests/conflicts.at,
8102 tests/cxx-type.at, tests/regression.at:
8103 "parse error" -> "syntax error" for POSIX compatibility.
8104 "parsing stack overflow..." -> "parser stack overflow" so
8105 that code matches Bison documentation.
8106
0f39aab9
AD
81072002-11-15 Akim Demaille <akim@epita.fr>
8108
8109 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8110 take two BRACED_CODE, not two string_content.
8111 Free the scanner's obstack when we are done.
8112 (code_content): New.
8113 * tests/calc.at: Adjust.
8114 * doc/bison.texinfo: Adjust.
8115 Also, make sure to include the `,' for these declarations.
8116
761c1926
AD
81172002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8118
8119 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8120 definition; avoids potential autoreconf problems.
8121
b0f98b10
AD
81222002-11-15 Akim Demaille <akim@epita.fr>
8123
8124 Always check the value returned by yyparse.
8125
8126 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8127 returned by yyparse.
8128 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8129 Adjust calls.
8130 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8131 returned by yyparse.
8132
970785f1
PH
81332002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8134
8135 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8136 on input.at test.
8137
8fcc7db1
PE
81382002-11-14 Paul Eggert <eggert@twinsun.com>
8139
7ec1b48e
PE
8140 * src/output.c (output_skeleton): Call xfopen instead of
8141 duplicating xfopen's body.
8142
cfff7583 8143 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 8144 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 8145
8fcc7db1
PE
8146 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8147 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8148 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8149 file twice in the grammar, as an extra check.
8150
8151 * tests/input.at (Torturing the Scanner): Surround the
8152 backslash-newline tests with "#if 0", to make it less likely that
8153 we'll run into compiler bugs. Bring back solitary \ inside
8154 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 8155 test backslash-newline in C character constant.
8fcc7db1 8156
4e8d992c
AD
81572002-11-14 Akim Demaille <akim@epita.fr>
8158
8159 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8160 status of the compiler.
f32b346d 8161 Calling `exit 1' is no longer needed.
4e8d992c
AD
8162 Reported by Nelson H. F. Beebe.
8163
9501dc6e
AD
81642002-11-14 Akim Demaille <akim@epita.fr>
8165
8166 * tests/atlocal.in (CPPFLAGS): We have config.h.
8167 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8168 New.
8169 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8170 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8171 * tests/regression.at, tests/torture.at: Use them for all the
8172 grammars that are to be compiled.
8173 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8174 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8175 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8176
18b519c0
AD
81772002-11-14 Akim Demaille <akim@epita.fr>
8178
8179 * doc/bison.texinfo: Various formatting changes (alignments in
8180 samples, additional @group/@end group, GCS in samples.
8181 Use @deffn instead of simple @table to define the directives,
8182 macros, variables etc.
8183
9a86cdb9
PE
81842002-11-13 Paul Eggert <eggert@twinsun.com>
8185
daa33def 8186 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 8187 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 8188
daa33def 8189 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 8190 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
8191 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8192 * tests/headers.at (export YYLTYPE): Likewise.
8193
8194 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 8195 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 8196
9a86cdb9
PE
8197 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8198 comments, since they're not portable. Use GNU coding style.
8199
9c1e26bd
AD
82002002-11-13 Akim Demaille <akim@epita.fr>
8201
8202 * data/yacc.c: Leave bigger chunks of quoted text.
8203 (YYDSYMPRINTF): New.
8204 Use it to report symbol activities.
8205 * data/glr.c (YYDSYMPRINTF): New.
8206 Use it.
8207
87f721cc
PE
82082002-11-12 Paul Eggert <eggert@twinsun.com>
8209
8210 Version 1.75b.
8211
8212 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8213 (yyglrReduce): Return yyok, not 0.
8214 This should avoid the enumerated-type warnings reported
464c6927 8215 by Nelson H. F. Beebe in
161a71f3 8216 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
8217
8218 * lib/bbitset.h (BITSET_INLINE): Remove.
8219 * lib/bitset.h [! BITSET_INLINE]: Remove.
8220 (bitset_set, bitset_reset, bitset_test): Rename local vars
8221 to avoid shadowing warnings by GCC.
8222
8223 * data/glr.c (inline): Remove #define. It's the user's
8224 responsibility to #define it away, just like 'const'.
464c6927 8225 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 8226 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 8227
87f721cc
PE
8228 * Makefile.maint (po-check): Scan .l and .y files instead of the
8229 .c and the .h files that they generate. This fixes the bug
8230 reported by Tim Van Holder in:
161a71f3 8231 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
8232 Look for N_ as well as for _. Try to avoid matching #define for
8233 N_ and _.
8234 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8235 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8236 * src/scan-gram.l: Revamp regular expressions so that " and '
8237 do not confuse xgettext.
8238
8239 * src/struniq.h (struniq_new): Do not declare the return type
8240 to be 'const'; this violates the C standard.
8241 * src/struniq.c (struniq_new): Likewise.
8242
be14ade5
AD
82432002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8244
8245 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8246 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8247 linker.
8248
05291fbc
AD
82492002-11-12 Akim Demaille <akim@epita.fr>
8250
8251 * Makefile.maint: Sync with Autoconf:
8252 (local_updates): New.
8253
1f5fd52e
AD
82542002-11-12 Akim Demaille <akim@epita.fr>
8255
8256 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8257
283f1e64
AD
82582002-11-12 Akim Demaille <akim@epita.fr>
8259
8260 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8261 locations.
8262
886b69d1
AD
82632002-11-12 Akim Demaille <akim@epita.fr>
8264
8265 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8266 not yyvalue.
8267
3df37415
AD
82682002-11-12 Akim Demaille <akim@epita.fr>
8269
8270 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8271 Use it to test the GLR parser.
8272
7bd6c77e
AD
82732002-11-12 Akim Demaille <akim@epita.fr>
8274
8275 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8276 defines it.
8277 * data/glr.c (yystos): New.
8278 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8279 (YYDSYMPRINT): New.
8280 (yyval): Don't define it, it is handled via M4.
8281 (yyrecoverParseError): Free verbosely the discarded symbols.
8282 * data/yacc.c (yysymprint): Remove, rather...
8283 (b4_yysymprint_generate): invoke.
8284 * data/c.m4 (b4_yysymprint_generate): New.
8285 Accept pointers as arguments, as opposed to the version from
8286 yacc.c.
8287 (b4_yydestruct_generate): Likewise.
8288 * tests/cations.at (Printers and Destructors): Use Bison directives
8289 instead of CPP macros.
8290 Don't rely on internal details.
8291
b0400cc6
AD
82922002-11-12 Akim Demaille <akim@epita.fr>
8293
8294 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8295 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8296 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8297 it against YYEMPTY and so forth), work on yytoken (i.e., set
8298 it to YYEMPTY etc.).
8299 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8300 (b4_symbol_actions): Remove.
8301 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8302 for 0, end-of-input.
8303
72f889cc
AD
83042002-11-12 Akim Demaille <akim@epita.fr>
8305
8306 * doc/bison.texinfo (Destructor Decl): New.
8307
b1ae9233
AD
83082002-11-12 Akim Demaille <akim@epita.fr>
8309
8310 * src/tables.c (tables_generate): Use free for pointers that
8311 cannot be NULL, not XFREE.
8312 (pack_vector): Use assert, not fatal, for bound violations.
8313 * src/state.c (state_new): Likewise.
8314 * src/reader.c (reader): Likewise.
8315 * src/lalr.c (set_goto_map): Likewise.
72f889cc 8316 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
8317 the file name.
8318
7ec2d4cd
AD
83192002-11-12 Akim Demaille <akim@epita.fr>
8320
8321 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8322 Restore.
8323 * src/scan-gram.l (last_string): Is global to the file, not to
8324 yylex.
8325 * src/parse-gram.y (input): Don't append the epilogue here,
8326 (epilogue.opt): do it here, and free the scanner's obstack.
8327 * src/reader.c (epilogue_set): Rename as...
8328 (epilogue_augment): this.
8329 * data/c.m4 (b4_epilogue): Defaults to empty.
8330
573a6cd3
AD
83312002-11-12 Akim Demaille <akim@epita.fr>
8332
8333 * src/getargs.c (long_options): Remove duplicates.
8334 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8335 Remove.
8336 * doc/bison.rnh: Remove.
8337 * doc/bison.texinfo (VMS Invocation): Remove.
8338
95612cfa
AD
83392002-11-12 Akim Demaille <akim@epita.fr>
8340
8341 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8342 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8343
8344 Use struniq for symbols.
8345
8346 * src/symtab.h (symbol_t): The tag member is a struniq.
8347 (symbol_type_set): Adjust.
8348 * src/symtab.c (symbol_new): Takes a struniq.
8349 (symbol_free): Don't free the tag member.
8350 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8351 (hash_compare_symbol, hash_symbol): these.
8352 Use the fact that tags as struniqs.
8353 (symbol_get): Use struniq_new.
8354 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8355 Returns a strniq.
8356 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8357 and type members are struniqs.
8358 * src/reader.c (get_merge_function)
8359 (grammar_current_rule_merge_set): Adjust.
8360 (TYPE, current_type): Are struniq.
8361
8362 Use struniq for file names.
8363
8364 * src/files.h, src/files.c (infile): Split into...
8365 (grammar_file, current_file): these.
8366 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8367 * src/reduce.c (reduce_print): Likewise.
8368 * src/getargs.c (getargs): Likewise.
8369 * src/complain.h, src/complain.c: Likewise.
8370 * src/main.c (main): Call struniqs_new early enough to use it for
8371 file names.
8372 Don't free the input file name.
8373
3e6656f9
AD
83742002-11-12 Akim Demaille <akim@epita.fr>
8375
8376 * src/symtab.c (symbol_free): Remove dead deactivated code:
8377 type_name are properly removed.
8378 Don't use XFREE to free items that cannot be NULL.
8379 * src/struniq.h, src/struniq.c: New.
8380 * src/main.c (main): Initialize/free struniqs.
8381 * src/parse-gram.y (%union): Add astruniq member.
8382 (yyprint): Adjust.
8383 * src/scan-gram.l (<{tag}>): Return a struniq.
8384 Free the obstack bit that used to store it.
8385 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8386
7672019c
PE
83872002-11-11 Paul Eggert <eggert@twinsun.com>
8388
8389 Revamp to fix many (but not all) of the C- and M4-related quoting
8390 problems. Among other things, this fixes the Bison bug reported
8391 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 8392 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
8393
8394 Use new @ escapes consistently. Represent brackets with @{ and @}
8395 rather than @<:@ and @:>@, since this works a bit better with dumb
8396 editors like vi. Represent @ with @@, since @ is now consistently
8397 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8398 __ofile__, to avoid unexpected expansions. Similarly, use @output
8399 rather than #output.
8400
8401 * data/c.m4 (b4_copyright): Omit file name from comment, since
8402 the file name could contain "*/".
8403 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8404 be quoted. All uses changed.
8405
8406 * data/glr.c: Use new @ escapes consistently.
8407 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8408 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8409 Remove, since they couldn't handle arbitrary characters in file
8410 names.
8411 * data/lalr1.cc: Likewise.
8412 * data/yacc.c: Likewise.
8413
8414 * src/files.c (output_infix): Remove; all uses removed.
8415 * src/files.h: Likewise.
8416
8417 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8418 mishandled funny characters in file names, and anyway it isn't
8419 needed any more.
8420 * data/yacc.c: Likewise.
8421 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8422
8423 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8424 * data/yacc.c: Likewise.
8425
8426 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8427 strings now.
8428 (muscle_init): Quote filename as a C string.
8429 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8430 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8431 * src/output.c (escaped_file_name_output): New function.
8432 (prepare_symbols): Quote tokens for M4.
8433 (prepare): Don't insert output_infix, output_prefix,
8434 output_parser_name, output_header_name; this is now down by scan-skel.
8435 Insert skeleton as a C string.
8436
8437 * src/output.c (user_actions_output, symbol_destructors_output,
8438 symbol_printers_output): Quote filenames for C and M4.
8439 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8440
8441 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8442 escapes other than \\ and \'; this simplifies the code.
8443 (<SC_STRING>): Likewise, for \\ and \".
8444 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8445 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8446 Use new escapes @{ and @} for [ and ].
8447
8448 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8449 them with auto vars.
8450 Switch to new escape scheme, where @ is the escape character uniformly.
8451 Abort if a stray escape character is found. Avoid unbounded input
8452 buffer when parsing non-escaped text.
8453
8454 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8455 __oline__, #output, $@, and @{ do not have unintended meanings.
8456
acea4f3b
PE
84572002-11-09 Paul Eggert <eggert@twinsun.com>
8458
8459 Fix the test failure due to GCC warnings described in
161a71f3 8460 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
8461 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8462 evaluate to 0 if it's impossible for NINF to be in the respective
8463 table.
8464 (yygetLRActions, yyrecoverParseError): Use them.
8465
8466 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8467 counted in the token inserted at end of file. Now takes
8468 location_t *, not location_t, so that the location can be
8469 adjusted. All uses changed.
8470
8471 * tests/regression.at (Invalid inputs): Adjust wording in
8472 diagnostic to match the new behavior.
8473
8474 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8475 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8476 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8477 abort ();'. This reduces the runtime of the "Many lookaheads"
8478 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8479 GCC 3.2.
8480
20ef1ad5
PE
84812002-11-07 Paul Eggert <eggert@twinsun.com>
8482
8483 * src/parse-gram.y (CHARACTER): Remove unused token.
8484 All uses removed.
8485
8486 * src/scan-gram.l: Remove stack option. We no longer use the
8487 stack, since the stack was never deeper than 1; instead, use the
8488 new auto var c_context to record the stacked value.
8489
8490 Remove nounput option. At an unexpected end of file, we now unput
8491 the minimal input necessary to end cleanly; this simplifies the
8492 code.
8493
8494 Avoid unbounded token sizes where this is easy.
8495
8496 (unexpected_end_of_file): New function.
8497 Use it to systematize the error message on unexpected EOF.
8498 (last-string): Now auto, not static.
8499 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8500 (scanner_last_string_free): Remove; not used.
8501 (percent_percent_count): Move decl to just before use.
8502 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8503 not the (never otherwised-used) CHARACTER.
8504
93724f13
AD
85052002-11-07 Akim Demaille <akim@epita.fr>
8506
8507 Let yyerror always receive the msg as last argument, so that
8508 yyerror can be variadic.
8509
8510 * data/yacc.c (b4_yyerror_args): New.
8511 Use it when calling yyerror.
8512 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8513 Use it when calling yyerror.
8514 * doc/bison.texinfo (Error Reporting): Adjust.
8515 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8516 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8517
6e40b4eb
AD
85182002-11-06 Akim Demaille <akim@epita.fr>
8519
8520 #line should have quoted strings.
8521 Ideally, this should be done by m4_quotearg.
8522
8523 * src/scan-skel.l: Include quotearg.h.
8524 Quote __ofile__.
8525 * src/output.c (symbol_printers_output)
8526 (symbol_destructors_output): Quote the file name.
8527
2dfbfc12
AD
85282002-11-06 Akim Demaille <akim@epita.fr>
8529
8530 * tests/regression.at (Invalid inputs): Adjust to the recent
8531 messages.
8532
437c2d80
AD
85332002-11-06 Akim Demaille <akim@epita.fr>
8534
8535 Restore --no-lines.
8536 Reported by Jim Kent.
8537
8538 * data/c.m4 (b4_syncline): New.
8539 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8540 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8541 * src/output.c (user_actions_output): Likewise.
8542 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 8543 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 8544
900c5db5
AD
85452002-11-06 Akim Demaille <akim@epita.fr>
8546
8547 * src/main.c (main): Free `infile'.
8548 * src/scan-gram.l (handle_syncline): New.
8549 Recognize `#line'.
8550 * src/output.c (user_actions_output, symbol_destructors_output)
8551 (symbol_printers_output): Use the location's file name, not
8552 infile.
8553 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8554
e183b123 85552002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 8556
e183b123 8557 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 8558 either has GLR conflict entries.
e183b123 8559
193eb6b7
PE
85602002-11-05 Paul Eggert <eggert@twinsun.com>
8561
e183b123
PE
8562 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8563 "integer out of range" rather than "invalid value".
8564 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8565 accordingly.
8566
193eb6b7
PE
8567 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8568 Also, remove one static variable in the scanner.
8569
8570 * src/scan-gram.l (braces_level): Now auto, not static.
8571 Initialize to zero if the compiler is being picky.
8572 (INITIAL): Clear braces_level instead of incrementing it.
8573 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8574 as POSIX 1003.1-2001 requires.
8575 * src/system.h (IF_LINT): New macro, taken from coreutils.
8576 * configure.ac: Define "lint" if --enable-gcc-warnings.
8577
29c01725
AD
85782002-11-05 Akim Demaille <akim@epita.fr>
8579
8580 * src/scan-gram.l: When it starts with `%', complain about the
8581 whole directive, not just that `invalid character: %'.
8582
8aeac3ca
AD
85832002-11-04 Akim Demaille <akim@epita.fr>
8584
8585 * Makefile.maint: Update from Autoconf.
8586 (update, cvs-update, po-update, do-po-update): New.
8587
793a58bb
AD
85882002-11-04 Akim Demaille <akim@epita.fr>
8589
8590 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8591 and yyerror.
8592 Have yyerror `use' its arguments.
8593 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8594 returns true when location & yacc & pure & parse-param.
8595 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8596
c4d720cd
AD
85972002-11-04 Akim Demaille <akim@epita.fr>
8598
8599 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8600 clashes.
8601 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8602 font-lock-mode.
8603 Use complain_at.
8604 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8605 slot 0.
8606
613a0dc5
PE
86072002-11-03 Paul Eggert <eggert@twinsun.com>
8608
8609 * src/reader.c (get_merge_function, grammar_current_rule_check):
8610 Use consistent diagnostics for reporting type name clashes.
8611 Quote the types with <>, for consistency with Yacc.
8612 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8613
2a8d363a
AD
86142002-11-03 Akim Demaille <akim@epita.fr>
8615
8616 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8617 New.
8618 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8619 (b4_parse_param): Remove.
8620 Use b4_identification.
8621 Propagate b4_pure_args where needed to pass them to yyerror.
8622 * data/glr.m4 (b4_parse_param): Remove.
8623 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8624 (b4_lpure_formals): New.
8625 Use b4_identification.
8626 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8627 b4_user_formals and b4_user_args.
8628 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8629 (yyreportAmbiguity): When using a pure parser, also need
8630 the location, and the parse-params.
8631 Adjust callers.
8632 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8633 When using a pure parser, also need the parse-params.
8634 Adjust callers.
8635 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8636 (%pure-parser + %parse-param) LALR and GLR parsers.
8637 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8638 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8639 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8640 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8641 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8642 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8643 * doc/bison.texinfo: Untabify the whole file.
8644 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8645 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8646 (Error Reporting): Adjust to these new directives.
8647 Document %error-verbose, deprecate YYERROR_VERBOSE.
8648
9e32add8
AD
86492002-11-03 Akim Demaille <akim@epita.fr>
8650
8651 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8652 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8653 command line options.
8654 * tests/cxx-type.at: Formatting changes.
8655
b02d90a5
PE
86562002-11-03 Paul Eggert <eggert@twinsun.com>
8657
8658 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8659 to count columns correctly, and to check for invalid inputs.
9e32add8 8660
b02d90a5
PE
8661 Use mbsnwidth to count columns correctly. Account for tabs, too.
8662 Include mbswidth.h.
8663 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8664 (extend_location): New function.
8665 (YY_LINES): Remove.
8666
8667 Handle CRLF in C code rather than in Lex code.
8668 (YY_INPUT): New macro.
8669 (no_cr_read): New function.
8670
8671 Scan UCNs, even though we don't fully handle them yet.
8672 (convert_ucn_to_byte): New function.
8673
8674 Handle backslash-newline correctly in C code.
8675 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8676 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8677 all uses changed.
8678 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8679 Use {splice} wherever C allows backslash-newline.
8680 YY_STEP after space, newline, vertical-tab.
8681 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 8682
b02d90a5
PE
8683 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8684
8685 ({int}, handle_action_dollar, handle_action_at): Check for integer
8686 overflow.
9e32add8 8687
b02d90a5
PE
8688 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8689
8690 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8691 as well as \000. Check for UCHAR_MAX, not 255.
8692 Allow \x with an arbitrary positive number of digits, as in C.
8693 Check for overflow here.
8694 Allow \? and UCNs, for compatibility with C.
8695
8696 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8697 with quote slot used by complain_at.
8698
8699 * tests/input.at: Add tests for backslash-newline, m4 quotes
8700 in symbols, long literals, and funny escapes in strings.
8701
8702 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8703 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8704 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8705 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8706 * m4/mbswidth.m4: New file, from GNU coreutils.
8707
8708 * doc/bison.texinfo (Grammar Outline): Document // comments.
8709 (Symbols): Document that trigraphs have no special meaning in Bison,
8710 nor is backslash-newline allowed.
8711 (Actions): Document that trigraphs have no special meaning.
8712
8713 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8714 no longer used.
8715
87162002-11-02 Paul Eggert <eggert@twinsun.com>
8717
8718 * src/reader.c: Don't include quote.h; not needed.
8719 (get_merge_function): Reword warning to be consistent with
8720 type clash diagnostic in grammar_current_rule_check.
8721
8722 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8723 bug in trigraph handling.
8724
8725 * src/output.c (prepare_symbols): When printing token names,
8726 escape "[" as "@<:@" and likewise for "]".
8727
8728 * src/system.h (errno): Remove declaration, as we are now
8729 assuming C89 or better, and C89 guarantees errno.
8730
762b212b
PE
87312002-10-30 Paul Eggert <eggert@twinsun.com>
8732
8733 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8734 Check for close failures.
8735 * src/files.h (xfclose): Return void, not int, since it always
8736 returned zero.
8737 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8738 indicates one.
8739 * src/output.c (output_skeleton): Use xfclose rather than fclose
8740 and ferror. xfclose now checks ferror.
8741
8742 * data/glr.c (YYLEFTMOST_STATE): Remove.
8743 (yyreportTree): Use a stack-based leftmost state. This avoids
8744 our continuing battles with bogus warnings about initializers.
8745
56100c60
AD
87462002-10-30 Akim Demaille <akim@epita.fr>
8747
8748 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8749 #if.
8750
51b4a04c
PH
87512002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8752
8753 * tests/glr-regr1.at: New test for reported regressions.
8754 * tests/testsuite.at: Add glr-regr1.at test.
8755 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 8756
bf1ebda2
PE
87572002-10-24 Paul Eggert <eggert@twinsun.com>
8758
5c16c6b1
PE
8759 Version 1.75a.
8760
bf1ebda2
PE
8761 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8762 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8763 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8764 Don't assume strdup exists; POSIX says its an XSI extension.
8765 Check for buffer overflow on input.
8766
b526ee61
AD
87672002-10-24 Akim Demaille <akim@epita.fr>
8768
8769 * src/output.c (output_skeleton): Don't disable M4sugar comments
8770 too soon: it results in comments being expanded.
8771 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8772 first output.
8773
f1886bb2
AD
87742002-10-24 Akim Demaille <akim@epita.fr>
8775
8776 * data/yacc.c (m4_int_type): New.
8777 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8778 char' as only yacc.c wants K&R portability.
8779 * data/glr.c (yysigned_char): Remove.
8780 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8781 Reported by Quoc Peyrot.
8782
c5576256
PE
87832002-10-23 Paul Eggert <eggert@twinsun.com>
8784
8785 * src/main.c (main): With --trace=time, report times even if a
8786 non-fatal error occurs. Formerly, the times were reported in some
8787 such cases but not in others.
8788 * src/reader.c (reader): Just return if a complaint has been issued,
8789 instead of exiting, so that 'main' can report times.
8790
27b0ffea
AD
87912002-10-22 Akim Demaille <akim@epita.fr>
8792
8793 * src/system.h: Include sys/types.
8794 Reported by Bert Deknuydt.
8795
223a7883
PE
87962002-10-23 Paul Eggert <eggert@twinsun.com>
8797
8798 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8799 Suggested by Art Haas.
8800
88012002-10-22 Paul Eggert <eggert@twinsun.com>
8802
8803 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8804 decl; not needed any more.
8805 * src/main.c (main): Use return to exit, undoing yesterday's change.
8806 The last OS that we could find where this wouldn't work is
8807 SunOS 3.5, and that's too old to worry about now.
8808
8809 * data/glr.c (struct yyltype): Define members even when not
8810 doing locations. This is more consistent with yacc.c, and it
8811 works around the following bug reports:
161a71f3
PE
8812 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8813 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 8814
223a7883
PE
8815 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8816 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8817 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8818
8b76775a
AD
88192002-10-22 Akim Demaille <akim@epita.fr>
8820
8821 * data/README: New.
8822
6db10d14
PE
88232002-10-21 Paul Eggert <eggert@twinsun.com>
8824
8825 Be consistent about 'bool'; the old code used an enum in one
8826 module and an int in another, and this violates the C standard.
8827 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8828 * configure.ac (AC_HEADER_STDBOOL): Add.
8829 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8830 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8831 * src/symtab.c (hash_compare_symbol_t): Likewise.
8832 * src/system.h (bool, false, true): Use a definition consistent
8833 with ../lib/hash.c. All uses changed.
8834
8835 * src/complain.c (warning_issued): Renamed from warn_message_count,
8836 so that we needn't worry about integer overflow (!).
8837 Now of type bool. All uses changed.
8838 (complaint_issued): Renamed from complain_message_count; likewise.
8839
8840 * src/main.c (main): Use exit to exit with failure.
27b0ffea 8841
6db10d14
PE
8842 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8843 rather than 1 and 0.
8844 * src/main.c (main): Likewise.
8845 * src/getargs.c (getargs): Likewise.
8846 * src/reader.c (reader): Likewise.
8847
8848 * src/getarg.c (getargs): Remove duplicate code for
8849 "Try `bison --help'".
8850
8851 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8852 What was that "2" for?
8853
8854 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8855 * src/getargs.c (usage): Likewise.
8856
8857 * src/getargs.c (getargs): When there are too few operands, report
8858 the last one. When there are too many, report the first extra
8859 one. This is how diffutils does it.
8860
92a060fd
PE
88612002-10-20 Paul Eggert <eggert@twinsun.com>
8862
8863 Remove K&R vestiges.
8864 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8865 * src/complain.c (VA_START): Remove. Assume prototypes.
8866 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8867 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8868 fatal): Assume prototypes.
8869 * src/complain.h: Assume prototypes.
8870 * src/system.h (PARAMS): Remove.
8871 Include <limits.h> unconditionally, since it's guaranteeed even
8872 for a freestanding C89 compiler.
8873 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8874 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 8875
e7cb57c0
AD
88762002-10-20 Akim Demaille <akim@epita.fr>
8877
8878 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8879 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8880 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8881 (yyresolveStates, yyresolveAction, yyresolveStack)
8882 (yyprocessOneStack): Use them.
8883 (yy_reduce_print): New.
8884 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8885
0245f82d
AD
88862002-10-20 Akim Demaille <akim@epita.fr>
8887
8888 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8889 arguments and output `void'.
8890 (b4_c_function): Rename as...
8891 (b4_c_function_def): this.
8892 (b4_c_function_decl, b4_c_ansi_function_def)
8893 (b4_c_ansi_function_decl): New.
8894 Change the interpretation of the arguments: before `int, foo', now
8895 `int foo, foo'.
8896 * data/yacc.c (yyparse): Prototype and define thanks to these.
8897 Adjust b4_c_function_def uses.
8898 * data/glr.c (yyparse): Likewise, but ANSI only.
8899
39912f52
AD
89002002-10-20 Akim Demaille <akim@epita.fr>
8901
8902 * src/output.c (prepare): Move the definition of `tokens_number',
8903 `nterms_number', `undef_token_number', `user_token_number_max'
8904 to...
8905 (prepare_tokens): Here.
8906 (prepare_tokens): Rename as...
8907 (prepare_symbols): this.
8908 (prepare): Move the definition of `rules_number' to...
8909 (prepare_rules): here.
8910 (prepare): Move the definition of `last', `final_state_number',
8911 `states_number' to...
8912 (prepare_states): here.
8913 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8914
20c1e2ad
AD
89152002-10-20 Akim Demaille <akim@epita.fr>
8916
8917 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8918
21964f43
AD
89192002-10-20 Akim Demaille <akim@epita.fr>
8920
8921 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8922 * data/c.m4: here.
8923
66d30cd4
AD
89242002-10-20 Akim Demaille <akim@epita.fr>
8925
8926 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8927 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8928 `pair'.
8929 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8930 `name' to...
8931 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8932 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8933 These.
8934
95f2c9fe
PE
89352002-10-19 Paul Eggert <eggert@twinsun.com>
8936
8937 Do not create a temporary file, as that involves security and
8938 cleanup headaches. Instead, use a pair of pipes.
8939 Derived from a suggestion by Florian Krohm.
8940 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8941 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8942 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8943 (BISON_PREREQ_SUBPIPE): Add.
8944 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8945 Add subpipe.h, subpipe.c.
8946 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8947 * po/POTFILES.in: Add lib/subpipe.c.
8948 * src/output.c: Include "subpipe.h".
8949 (m4_invoke): Remove decl.
8950 (scan_skel): New decl.
8951 (output_skeleton): Use pipe rather than temporary file for m4 input.
8952 Check that m4sugar.m4 is readable, to avoid deadlock.
8953 Check for pipe I/O error.
8954 * src/scan-skel.l (readpipe): Remove decl.
8955 (scan_skel): New function, to be used in place of m4_invoke.
8956 Read from stream rather than file.
66d30cd4 8957
95f2c9fe
PE
8958 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8959 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8960 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8961 this generates a more-accurate value anyway.
8962
8963 * lib/timevar.c (timervar_accumulate): Rename locals to
8964 avoid confusion with similarly-named more-global.
8965 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8966
8967 * src/output.c (prepare): Use xstrdup to convert char const *
8968 to char *, to avoid GCC warning.
8969
c19988b7
AD
89702002-10-19 Akim Demaille <akim@epita.fr>
8971
8972 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8973 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8974 Use them to have `calc.y' ready for %pure-parser.
8975 * data/yacc.c (YYLEX): Pass a yylex return type to
8976 b4_c_function_call.
8977
ae7453f2
AD
89782002-10-19 Akim Demaille <akim@epita.fr>
8979
8980 Prototype support of %lex-param and %parse-param.
8981
8982 * src/parse-gram.y: Add the definition of the %lex-param and
8983 %parse-param tokens, plus their rules.
8984 Drop the `_' version of %glr-parser.
8985 Add the "," token.
8986 * src/scan-gram.l (INITIAL): Scan them.
8987 * src/muscle_tab.c: Comment changes.
8988 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8989 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8990 (muscle_entry_s): The `value' member is no longer const.
8991 Adjust all dependencies.
8992 * src/muscle_tab.c (muscle_init): Adjust: use
8993 MUSCLE_INSERT_STRING.
8994 Initialize the obstack earlier.
8995 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8996 (muscle_pair_list_grow): New.
8997 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8998 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8999 * tests/calc.at: Use %locations, not --locations.
9000 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
9001
0e575721
AD
90022002-10-19 Akim Demaille <akim@epita.fr>
9003
9004 * src/getargs.c (usage): Take status as argument and exit
9005 accordingly.
9006 Report the traditional `Try ... --help' message when status != 0.
9007 (usage, version): Don't take a FILE * as arg, it is pointless.
9008 (getargs): When there is an incorrect number of arguments, make it
9009 an error, and report it GNUlically thanks to `usage ()'.
9010
724ce7f5
PE
90112002-10-18 Paul Eggert <eggert@twinsun.com>
9012
3a781eb2
PE
9013 * data/glr.c (yyreportParseError): Don't assume that sprintf
9014 yields the length of the printed string, as this is not true
9015 on SunOS 4.1.4. Reported by Peter Klein.
9016
724ce7f5
PE
9017 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
9018 * tests/conflicts.at (%nonassoc and eof): Likewise.
9019 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
9020
473d0a75
AD
90212002-10-17 Akim Demaille <akim@epita.fr>
9022
9023 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
9024 * src/getargs.c (trace_types, trace_args): Adjust.
9025 * src/reader.c (grammar_current_rule_prec_set)
9026 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
9027 Standardize error messages.
9028 And s/@prec/%prec/!
9029 (reader): Use trace_flag to enable scanner/parser debugging,
9030 instead of an adhoc scheme.
9031 * src/scan-gram.l: Remove trailing debugging code.
9032
e76d2469
PE
90332002-10-16 Paul Eggert <eggert@twinsun.com>
9034
93e2236a
PE
9035 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9036 MUSCLE_TAB_H.
9037
e76d2469
PE
9038 * NEWS: Officially drop support for building Bison with K&R C,
9039 since it didn't work anyway and it's not worth worrying about.
9040 * Makefile.maint (wget_files): Remove ansi2knr.c.
9041 (ansi2knr.c-url_prefix): Remove.
9042 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9043 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9044 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9045
5bd1c419
PE
90462002-10-15 Paul Eggert <eggert@twinsun.com>
9047
9048 Stop using the "enum_" trick for K&R-style function definitions;
9049 it confused me, and I was the author! Instead, assume that people
9050 who want to use K&R C compilers (when using these modules in GCC,
9051 perhaps?) will run ansi2knr.
9052
9053 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9054 All uses of "enum_" changed to "enum ".
9055 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9056 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 9057
5bd1c419
PE
9058 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9059 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9060 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9061 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9062 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9063 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9064 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9065 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9066 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9067 Use function prototypes; this removes the need for declaring
9068 static functions simply to provide their prototypes.
9069 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9070 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9071 bitset_count_, bitset_create, bitset_dump, bitset_first,
9072 bitset_free, bitset_init, bitset_last, bitset_next,
9073 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9074 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9075 bitset_print, bitset_release_memory, bitset_toggle_,
9076 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9077 debug_bitset): Likewise.
9078 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9079 * lib/bitset_stats.c (bitset_log_histogram_print,
9080 bitset_percent_histogram_print, bitset_stats_and,
9081 bitset_stats_and_cmp, bitset_stats_and_or,
9082 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9083 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9084 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9085 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9086 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9087 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9088 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9089 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9090 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9091 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9092 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9093 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9094 bitset_stats_zero): Likewise.
9095 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9096 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9097 bitsetv_dump, debug_bitsetv): Likewise.
9098 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9099 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9100 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9101 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9102 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9103 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9104 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9105 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9106 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9107 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9108 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9109 Likewise.
9110 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9111 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9112 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9113 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9114 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9115 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9116 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9117 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9118 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9119 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9120 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 9121
ae26e1f0
AD
91222002-10-14 Akim Demaille <akim@epita.fr>
9123
9124 Version 1.75.
9125
d43baf71
AD
91262002-10-14 Akim Demaille <akim@epita.fr>
9127
9128 * tests/Makefile.am (maintainer-check-posix): New.
9129
7ebc83e3
AD
91302002-10-14 Akim Demaille <akim@epita.fr>
9131
9132 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9133 member.
9134
05846dae
AD
91352002-10-14 Akim Demaille <akim@epita.fr>
9136
9137 * src/tables.c (table_ninf_remap): base -> tab.
9138 Reported by Matt Rosing.
9139
1318e37d
PE
91402002-10-14 Paul Eggert <eggert@twinsun.com>
9141
447fbb17
PE
9142 * tests/action.at, tests/calc.at, tests/conflicts.at,
9143 tests/cxx-type.at, tests/headers.at, tests/input.at,
9144 tests/regression.at, tests/synclines.at, tests/torture.at:
9145 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9146 so that the tests still work even if POSIXLY_CORRECT is set.
9147 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 9148
1318e37d
PE
9149 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9150 for portability to K&R hosts. Fix typo: signed char is guaranteed
9151 only to 127, not to 128.
9152 * data/glr.c (yysigned_char): New type.
9153 * data/yacc.c (yysigned_char): Likewise.
9154 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9155
cc0f0794
PE
91562002-10-13 Paul Eggert <eggert@twinsun.com>
9157
5038f418
PE
9158 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9159 true due to limited range of data type" warning from GCC.
9160
cc0f0794
PE
9161 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9162 by wrapping enum yytokentype's definition inside #ifndef
9163 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9164
6fed0802
AD
91652002-10-13 Akim Demaille <akim@epita.fr>
9166
9167 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9168 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9169
32f0598d
AD
91702002-10-13 Akim Demaille <akim@epita.fr>
9171
9172 * Makefile.maint: Update from Autoconf 2.54.
9173 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9174
7ea9a33f
AD
91752002-10-13 Akim Demaille <akim@epita.fr>
9176
9177 * src/print.c (print_state): Separate the list of solved conflicts
9178 from the other items.
9179 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9180
ea99527d
AD
91812002-10-13 Akim Demaille <akim@epita.fr>
9182
9183 Let nondeterministic skeletons be usable with deterministic
9184 tables.
9185
9186 With the patch, GAWK compiled by GCC without -O2 passes its test
9187 suite using a GLR parser driven by LALR tables. It fails with -O2
9188 because `struct stat' gives two different answers on my machine:
9189 88 (definition of an auto var) and later 96 (memset on this var).
9190 Hence the stack is badly corrumpted. The headers inclusion is to
9191 blame: if I move the awk.h inclusion before GLR's system header
9192 inclusion, the two struct stat have the same size.
9193
9194 * src/tables.c (pack_table): Always create conflict_table.
9195 (token_actions): Always create conflict_list.
9196 * data/glr.c (YYFLAG): Remove, unused.
9197
f377f69f
AD
91982002-10-13 Akim Demaille <akim@epita.fr>
9199
9200 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9201 (O0FLAGS): New.
9202 (VALGRIND, GXX): New.
9203 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9204 * tests/bison.in: Run $PREBISON a pre-command.
9205 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9206 (maintainer-check-g++): New.
9207 * Makefile.am (maintainer-check): New.
9208
2a1fe6ed
AD
92092002-10-13 Akim Demaille <akim@epita.fr>
9210
9211 * data/glr.c: Formatting changes.
9212 Tweak some trace messages to match yacc.c's.
9213
f50adbbd
AD
92142002-10-13 Akim Demaille <akim@epita.fr>
9215
9216 GLR parsers sometimes raise parse errors instead of performing the
9217 default reduction.
9218 Reported by Charles-Henry de Boysson.
9219
9220 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 9221 check the length of the traces when %glr.
f50adbbd
AD
9222 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9223 GLR's traces.
9224 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9225 Test GLR parsers.
9226 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9227 (yyltype): Remove the yy prefix from the member names.
9228 (yytable): Complete its comment.
9229 (yygetLRActions): Map error action number from YYTABLE from
9230 YYTABLE_NINF to 0.
9231 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9232 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9233 not satisfying as we could compare an YYACTION computed from
9234 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9235 only value for error actions.
9236 (yyreportParseError): In verbose parse error messages, don't issue
9237 `error' in the list of expected tokens.
9238 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9239 next action to perform to match glr.c's decoding.
9240 (yytable): Complete its comment.
9241
bcbad5b9
PE
92422002-10-13 Paul Eggert <eggert@twinsun.com>
9243
9244 Fix problem reported by Henrik Grubbstroem in
161a71f3 9245 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
9246 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9247 because the Bison parser reads the second action before reducing
9248 the first one.
9249 * src/scan-gram.l (rule_length): New static var.
9250 Use it to keep track of the rule length in the scanner, since
9251 we can't expect the parser to be in lock-step sync with the scanner.
9252 (handle_action_dollar, handle_action_at): Use this var.
9253 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 9254
14904b89
PE
92552002-10-12 Paul Eggert <eggert@twinsun.com>
9256
1fe611e5
PE
9257 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9258 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9259 Include <sys/time.h> when checking for clock_t and struct tms.
9260 Use same include order as source.
9261 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 9262 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 9263
1fe611e5
PE
9264 * lib/timevar.c: Update copyright date and clarify comments.
9265 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 9266
1fe611e5
PE
9267 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9268 GCC version as of today, then merge Bison's changes.
9269 Change "GCC" to "Bison" in copyright notice. timevar.def's
9270 author is Akim, so change that too.
9271
98194095
PE
9272 * src/reader.c (grammar_current_rule_check):
9273 Don't worry about the default action if $$ is untyped.
9274 Prevents bogus warnings reported by Jim Gifford in
161a71f3 9275 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 9276
14904b89
PE
9277 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9278 * data/glr.c, data/lalr1.cc, data/yacc.c:
9279 Output token definitions before the first part of user declarations.
9280 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 9281 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 9282
ff6dca18
PE
92832002-10-11 Paul Eggert <eggert@twinsun.com>
9284
9285 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9286 (yyparse): here. This undoes some of the 2002-07-25 change.
9287 Compatibility problem reported by Ralf S. Engelschall with
9288 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9289
eb714592
AD
92902002-10-11 Akim Demaille <akim@epita.fr>
9291
9292 * tests/regression.at Characters Escapes): New.
9293 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9294 characters.
9295 Reported by Jan Nieuwenhuizen.
9296
b7195100
AD
92972002-10-11 Akim Demaille <akim@epita.fr>
9298
9299 * po/id.po: New.
9300
f28a0f2d
PE
93012002-10-10 Paul Eggert <eggert@twinsun.com>
9302
9303 Portability fixes for bitsets; this also avoids several GCC
9304 warnings.
9305
9306 * lib/abitset.c: Include <stddef.h>, for offsetof.
9307 * lib/lbitset.c: Likewise.
9308
9309 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9310 properly for vectors of objects. Do not assume that adding a
9311 header size to a multiple of a word size yields a value that is
9312 properly aligned for the whole union.
9313 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9314
9315 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9316 unique names for structures.
9317 * lib/ebitset.c (ebitset_bytes): Likewise.
9318 * lib/lbitset.c (lbitset_bytes): Likewise.
9319
9320 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9321 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9322 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9323 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9324 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9325 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9326 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9327 to improve the type-checking that GCC can do.
9328 * lib/bitset.c (bitset_op4_cmp): Likewise.
9329 * lib/bitset_stats.c (bitset_stats_count,
9330 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9331 bitset_stats_copy, bitset_stats_disjoint_p,
9332 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9333 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9334 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9335 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9336 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9337 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9338 bitset_stats_or_and_cmp): Likewise.
9339 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9340 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9341 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9342 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9343
9344 * lib/abitset.h: Include bitset.h, not bbitset.h.
9345 * lib/ebitset.h: Likewise.
9346 * lib/lbitset.h: Likewise.
9347
9348 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9349 All instances of parameters of type enum bitset_opts are now of
9350 type enum_bitset_opts, to conform to the C Standard, and similarly
9351 for enum_bitset_type.
9352 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9353 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9354
9355 Do not use "struct bitset_struct" to mean different things in
9356 different modules. Not only is this confusing, it violates
9357 the C Standard, which requires that structure types in different
9358 modules must be compatible if one is to be passed to the other.
9359 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9360 All instances of "struct bitset_struct *" replaced with "bitset".
9361 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9362 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9363 struct lbitset_struct, struct bitset_stats_struct): New types.
9364 All uses of struct bitset_struct changed to union bitset_union,
9365 etc.
ba0fe3c7 9366 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
9367 struct bitset_struct): Remove.
9368 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9369 struct bitset_struct): Remove.
9370 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9371 bitset_struct): Remove.
9372 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9373 Likewise.
9374
9375 Do not call a function of type T using a call that assumes the
9376 function is of a different type U. Standard C requires that a
9377 function must be called with a type that is compatible with its
9378 definition.
9379 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9380 New decls.
9381 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9382 New functions.
9383 * lib/ebitset.c (PFV): Remove.
9384 * lib/lbitset.c (PFV): Likewise.
9385 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9386 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9387 decls.
9388 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9389 (ebitset_vtable): Use them.
9390 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9391 lbitset_xor): New functions.
9392 (lbitset_vtable): Use them.
9393
9394 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9395 Declare.
9396
9397 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9398 GCC warning.
9399 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9400 Use offsetof, for simplicity.
9401
6fbe4984
PE
94022002-10-06 Paul Eggert <eggert@twinsun.com>
9403
9404 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9405 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 9406 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
9407 which was inadvertently undone by the 2002-09-30 patch.
9408 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9409 the same width as int.
9410
420f93c8
PE
94112002-10-04 Paul Eggert <eggert@twinsun.com>
9412
9413 Version 1.50.
9414
9415 * configure.ac (AC_INIT), NEWS: Increment version number.
9416
9417 * doc/bison.texinfo: Minor spelling, grammar, and white space
9418 fixes.
9419 (Symbols): Mention that any negative value returned from yylex
9420 signifies end-of-input. Warn about negative chars. Mention
9421 the portable Standard C character set.
9422
9423 The GNU coding standard says CFLAGS and YFLAGS are reserved
9424 for the installer to set.
9425 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9426 * src/Makefile.am (AM_CFLAGS): Likewise.
9427 (AM_YFLAGS): Renamed from YFLAGS.
9428
9429 Fix some MAX and MIN problems.
9430 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9431 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9432 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9433 * src/reader.c (reader): Use it.
9434
9435 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9436 POSIX 1003.1-2001 has removed fgrep.
9437
94382002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9439
9440 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9441 interpreted as signed.
9442 * lib/ebitset.c (ebitset_list): Fix bug.
9443
ff68026d
PE
94442002-10-01 Paul Eggert <eggert@twinsun.com>
9445
9446 More fixes for 64-bit hosts and large bitsets.
9447
9448 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9449 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9450 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9451 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9452 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9453 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9454 bitset_count_): Likewise.
9455 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9456 bitset_first, bitset_last): Likewise.
9457 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9458 bitset_stats_list_reverse, bitset_stats_size,
9459 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9460 Likewise.
9461 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9462 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9463 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9464 bitsetv_reflexive_transitive_closure): Likewise.
9465 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9466 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9467 Likewise.
9468 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9469 Likewise.
420f93c8 9470
ff68026d
PE
9471 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9472 Use size_t, not unsigned int, to count bytes.
9473 * lib/abitset.h (abitset_bytes): Likewise.
9474 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9475 Likewise.
9476 * lib/bitset.h (bitset_bytes): Likewise.
9477 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9478 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9479 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9480 * lib/ebitset.c (ebitset_bytes): Likewise.
9481 * lib/ebitset.h (ebitset_bytes): Likewise.
9482 * lib/lbitset.c (lbitset_bytes): Likewise.
9483 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 9484
ff68026d
PE
9485 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9486 abitset_subset_p, abitset_disjoint_p, abitset_and,
9487 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9488 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9489 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9490 abitset_or_and, abitset_or_and_cmp):
9491 Use bitset_windex instead of unsigned int.
9492 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9493 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9494 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9495 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9496 Likewise.
9497 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 9498
ff68026d
PE
9499 * lib/bitset.c (bitset_print):
9500 Use proper printf formats for widths of integer types.
9501 * lib/bitset_stats.c (bitset_percent_histogram_print,
9502 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9503 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9504 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9505 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 9506
ff68026d
PE
9507 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9508 BITSET_SIZE_MAX): New macros.
9509 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9510 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9511 to BITSET_WINDEX_MAX.
9512
9513 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9514 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9515 since we now return the bitset_bindex type (not int).
9516
9517 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9518 when computing sizes.
9519 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9520
9521 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9522 and avoid cast to unsigned.
9523
6aa452a6
AD
95242002-09-30 Akim Demaille <akim@epita.fr>
9525
9526 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9527 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9528 Updates from Michael Hayes.
9529
927f7817
AD
95302002-09-30 Art Haas <ahaas@neosoft.com>
9531
9532 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9533 invocations.
9534 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9535 defined.
9536
9738f41e
AD
95372002-09-27 Akim Demaille <akim@epita.fr>
9538
9539 Version 1.49c.
9540
a5c75d7f
AD
95412002-09-27 Akim Demaille <akim@epita.fr>
9542
9543 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9544 (Because of AC_LIBSOURCE).
9545
8280e179
AD
95462002-09-27 Akim Demaille <akim@epita.fr>
9547
9548 Playing with Autoscan.
9549
9550 * configure.ac: Remove the old LIBOBJ tweaks.
9551 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9552 * lib/strrchr.c: New.
9553 * lib/strtol.c: New, from the Coreutils 4.5.1.
9554
ae64af35
AD
95552002-09-27 Akim Demaille <akim@epita.fr>
9556
9557 Playing with Autoscan.
9558
9559 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9560 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9561 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9562 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9563 Coreutils 4.5.1.
9564
d1a1114f
AD
95652002-09-24 Akim Demaille <akim@epita.fr>
9566
9567 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9568 (Frequently Asked Questions, Parser Stack Overflow): New.
9569
b906441c
AD
95702002-09-13 Akim Demaille <akim@epita.fr>
9571
9572 Playing with autoscan.
9573
9574 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9575 * src/files.c (skeleton_find): Remove, unused.
9576 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9577 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9578
bd701811
AD
95792002-09-13 Akim Demaille <akim@epita.fr>
9580
9581 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9582 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9583
e0a13e7b
AD
95842002-09-13 Akim Demaille <akim@epita.fr>
9585
9586 * configure.ac: Require 2.54.
9587 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9588 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9589 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9590 Remove, provided by Autoconf macros.
9591
c97011bf
AD
95922002-09-12 Akim Demaille <akim@epita.fr>
9593
9594 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9595
d862b1be
AD
95962002-09-12 Akim Demaille <akim@epita.fr>
9597
9598 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9599 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9600 Reported by Martin Mokrejs.
9601
3d38c03a
AD
96022002-09-10 Akim Demaille <akim@epita.fr>
9603
9604 * src/parse-gram.y: Associate a human readable string to each
9605 token type.
9606 * tests/regression.at (Invalid inputs): Adjust.
9607
b6347355
AD
96082002-09-10 Gary V. Vaughan <gary@gnu.org>
9609
9610 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9611 with an Autoconf-2.5x style configure.ac.
9612
09ba4ab2
PE
96132002-09-06 Paul Eggert <eggert@twinsun.com>
9614
9615 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9616 exception applies only to yacc.c. This is a modification of a
9617 patch originally suggested by Akim Demaille.
9618
21846f69
AD
96192002-09-06 Akim Demaille <akim@epita.fr>
9620
09ba4ab2
PE
9621 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9622 here to...
9623 * data/yacc.c: here.
9624
21846f69
AD
9625 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9626 LocationType.
9627 (b4_ltype): Default to yy::Location from location.hh.
9628
c0ad8bf3
AD
96292002-09-04 Jim Meyering <jim@meyering.net>
9630
9631 * data/yacc.c: Guard the declaration of yytoknum also with
9632 `#ifdef YYPRINT', so it is declared only when used.
9633
3a93251e
AD
96342002-09-04 Akim Demaille <akim@epita.fr>
9635
9636 * configure.in: Rename as...
9637 * configure.ac: this.
9638 Bump to 1.49c.
9639
427c0dda
AD
96402002-09-04 Akim Demaille <akim@epita.fr>
9641
9642 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9643 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9644 translate maintainer only messages.
9645
6a254321
PE
96462002-08-12 Paul Eggert <eggert@twinsun.com>
9647
645e30d1
PE
9648 Version 1.49b.
9649
6a254321
PE
9650 * Makefile.am (SUBDIRS): Remove intl.
9651 (DISTCLEANFILES): Remove.
9652 * NEWS: Mention that GNU M4 is now required. Clarify what is
9653 meant by "larger grammars". Mention the pt_BR translation.
9654 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9655 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9656 Bump version from 0.11.2 to 0.11.5.
9657 (BISON_PREREQ_STAGE): Remove.
9658 (AM_GNU_GETTEXT): Use external gettext.
9659 (AC_OUTPUT): Remove intl/Makefile.
9660
9661 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9662
9663 * data/glr.c: Include string.h, for strlen.
9664 (yyreportParseError): Use size_t for yysize.
9665 (yy_yypstack): No longer nested inside yypstates, as nested
9666 functions are not portable. Do not assume size_t is the
9667 same width as int.
9668 (yypstates): Do not assume that ptrdiff_t is the same width
9669 as int, and similarly for yyposn and YYINDEX.
9670
9671 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9672
9673 * lib/Makefile.am (INCLUDES): Do not include from the intl
9674 directory, which has been removed.
9675 * src/Makefile.am (INCLUDES): Likewise.
9676
9677 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9678 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9679 New vars.
9680
9681 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9682 * tests/Makefile.am (EXTRA_DIST): Likewise.
9683
9684 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9685 Do not assume that bitset_windex is the same width as unsigned.
9686
9687 * lib/abitset.c (abitset_unused_clear): Do not assume that
9688 bitset_word is the same width as int.
9689 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9690 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9691 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9692 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9693 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9694
9695 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9696 portability to one's complement hosts!).
9697 * lib/ebitset.c (ebitset_op1): Likewise.
9698 * lib/lbitset.c (lbitset_op1): Likewise.
9699
9700 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9701 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9702 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9703 Sync with fileutils.
9704 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9705 lib/gettext.h: Sync with diffutils.
9706
9707 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9708 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9709
9710 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9711 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9712 check for void *.
9713
9714 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9715 size_t; the old version tried to do this but casted improperly.
9716 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9717 (bitset_test): Now returns int, not unsigned long.
9718
9719 * lib/bitset_stats.c: Include "gettext.h".
9720 (_): New macro.
9721 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9722 name locals "index", as it generates unnecessary warnings on some
9723 hosts that have an "index" function.
9724
9725 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9726 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9727 they need translation.
9728 * src/LR0.c (state_list_append, new_itemsets, get_state,
9729 append_states, generate_states): Likewise.
9730 * src/assoc.c (assoc_to_string): Likewise.
9731 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9732 * src/gram.c (grammar_dump): Likewise.
9733 * src/injections.c (injections_compute): Likewise.
9734 * src/lalr.c (lookaheads_print): Likewise.
9735 * src/relation.c (relation_transpose): Likewise.
9736 * src/scan-gram.l: Likewise.
9737 * src/tables.c (table_grow, pack_vector): Likewise.
9738
9739 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9740 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9741 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9742 * m4/mbstate_t.m4: Sync with fileutils.
9743 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9744
9745 * po/LINGUAS: Add pt_BR.
9746 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9747 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9748 lib/timevar.c.
9749 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9750 manual recommends.
9751 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9752
9753 * src/complain.c (strerror_r): Remove decl; not needed.
9754 (strerror): Use same pattern as ../lib/error.c.
9755
9756 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9757
9758 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9759
9760 * src/main.c (main): Cast result of bindtextdomain and textdomain
9761 to void, to avoid a GCC warning when --disable-nls is in effect.
9762
9763 * src/scan-gram.l: Use strings rather than escapes when possible,
9764 to minimize the number of warnings from xgettext.
9765 (handle_action_dollar, handle_action_at): Don't use isdigit,
9766 as it mishandles negative chars and it may not work as expected
9767 outside the C locale.
9768
9769 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9770 this is a GCC extension and is not portable to other compilers.
9771
9772 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9773 Do not include <ctype.h>; no longer needed.
9774 Do not include <malloc.h>; no longer needed (and generates
9775 warnings on OpenBSD 3.0).
9776
9777 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9778 it's not portable.
9779
9780 * tests/regression.at: Do not use 'cc -c input.c -o input';
9781 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9782
9783 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9784 exit status as failure, not just exit status 1. Sun C exits
9785 with status 2 sometimes.
9786
9787 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9788 Use it for the two large tests.
9789
c8f002c7
AD
97902002-08-02 Akim Demaille <akim@epita.fr>
9791
9792 * src/conflicts.c (conflicts_output): Don't output rules never
9793 reduced here, since anyway that computation doesn't work.
9794 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9795 (rule_useless_p, rule_never_reduced_p): New.
9796 (grammar_rules_partial_print): Use a filter instead of a range.
9797 Display the title only if needed.
9798 (grammar_rules_print): Adjust.
9799 (grammar_rules_never_reduced_report): New.
9800 * src/tables.c (action_row): Move the computation of rules never
9801 reduced to...
9802 (token_actions): here.
9803 * src/main.c (main): Make the parser before making the report, so
9804 that rules never reduced are computed.
9805 Call grammar_rules_never_reduced_report.
9806 * src/print.c (print_results): Report rules never reduced.
9807 * tests/conflicts.at, tests/reduce.at: Adjust.
9808
cd08e51e
AD
98092002-08-01 Akim Demaille <akim@epita.fr>
9810
9811 Instead of attaching lookaheads and duplicating the rules being
9812 reduced by a state, attach the lookaheads to the reductions.
9813
9814 * src/state.h (state_t): Remove the `lookaheads',
9815 `lookaheads_rule' member.
9816 (reductions_t): Add a `lookaheads' member.
9817 Use a regular array for the `rules'.
9818 * src/state.c (reductions_new): Initialize the lookaheads member
9819 to 0.
9820 (state_rule_lookaheads_print): Adjust.
9821 * src/state.h, src/state.c (state_reductions_find): New.
9822 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9823 (count_rr_conflicts): Adjust.
9824 * src/lalr.c (LArule): Remove.
9825 (add_lookback_edge): Adjust.
9826 (state_lookaheads_count): New.
9827 (states_lookaheads_initialize): Merge into...
9828 (initialize_LA): this.
9829 (lalr_free): Adjust.
9830 * src/main.c (main): Don't free nullable and derives too early: it
9831 is used by --verbose.
9832 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9833
bb0027a9
AD
98342002-08-01 Akim Demaille <akim@epita.fr>
9835
9836 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9837 `rule_number_t**'.
9838 (set_derives, free_derives): Rename as...
9839 (derives_compute, derives_free): this.
9840 Adjust all dependencies.
9841 * src/nullable.c (set_nullable, free_nullable): Rename as...
9842 (nullable_compute, nullable_free): these.
9843 (rule_list_t): Store rule_t *, not rule_number_t.
9844 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9845 pointers, instead of their numbers.
9846 * src/main.c (main): Call nullable_free, and derives_free earlier,
9847 as they were lo longer used.
9848
3325ddc4
AD
98492002-08-01 Akim Demaille <akim@epita.fr>
9850
9851 * lib/timevar.c (get_time): Include children time.
9852 * src/lalr.h (LA, LArule): Don't export them: used with the
9853 state_t.
9854 * src/lalr.c (LA, LArule): Static.
9855 * src/lalr.h, src/lalr.c (lalr_free): New.
9856 * src/main.c (main): Call it.
9857 * src/tables.c (pack_vector): Check whether loc is >= to the
9858 table_size, not >.
9859 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9860 (tables_generate): do it, since that's also it which allocates
9861 them.
9862 Don't free LA and LArule, main does.
9863
c6f1a33c
AD
98642002-07-31 Akim Demaille <akim@epita.fr>
9865
9866 Separate parser tables computation and output.
9867
9868 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9869 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9870 (yydefgoto, yydefact, high): Move to...
9871 * src/tables.h, src/tables.c: here.
9872 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9873 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9874 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9875 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9876 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9877 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9878 (action_row, save_row, token_actions, save_column, default_goto)
9879 (goto_actions, sort_actions, matching_state, pack_vector)
9880 (table_ninf_remap, pack_table, prepare_actions): Move to...
9881 * src/tables.c: here.
9882 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9883 * src/output.c (token_actions, output_base, output_conflicts)
9884 (output_check): Merge into...
9885 (prepare_actions): this.
9886 (actions_output): Rename as...
9887 (user_actions_output): this.
9888 * src/main.c (main): Call tables_generate and tables_free.
9889
1509d42f
AD
98902002-07-31 Akim Demaille <akim@epita.fr>
9891
9892 Steal GCC's --time-report support.
9893
9894 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9895 stolen/adjusted from GCC.
9896 * m4/stage.m4: Remove time related checks.
9897 * m4/timevar.m4: New.
9898 * configure.in: Adjust.
9899 * src/system.h: Adjust to using timevar.h.
9900 * src/getargs.h, src/getargs.c: Support trace_time for
9901 --trace=time.
9902 * src/main.c (stage): Remove.
9903 (main): Replace `stage' invocations with timevar calls.
9904 * src/output.c: Insert pertinent timevar calls.
9905
273a74fa
AD
99062002-07-31 Akim Demaille <akim@epita.fr>
9907
9908 Let --trace have arguments.
9909
9910 * src/getargs.h (enum trace_e): New.
9911 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9912 (long_options, short_options): --trace/-T takes an optional
9913 argument.
9914 Change all the uses of trace_flag to reflect the new flags.
9915 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9916
9917 Strengthen `stage' portability.
9918
9919 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9920 * configure.in: Use it.
9921 Don't check for malloc.h and sys/times.h.
9922 * src/system.h: Include them when appropriate.
9923 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9924 times and struct tms are available.
9925
217598da
AD
99262002-07-30 Akim Demaille <akim@epita.fr>
9927
9928 In verbose parse error message, don't report `error' as an
9929 expected token.
9930 * tests/actions.at (Printers and Destructors): Adjust.
9931 * tests/calc.at (Calculator $1): Adjust.
9932 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9933 error message, do not report the parser accepts the error token in
9934 that state.
9935
52489d44
AD
99362002-07-30 Akim Demaille <akim@epita.fr>
9937
9938 Normalize conflict related messages.
9939
9940 * src/complain.h, src/complain.c (warn, complain): New.
9941 * src/conflicts.c (conflicts_print): Use them.
9942 (conflict_report_yacc): New, extracted from...
9943 (conflicts_print): here.
9944 * tests/conflicts.at, tests/existing.at: Adjust.
9945
e8832397
AD
99462002-07-30 Akim Demaille <akim@epita.fr>
9947
9948 Report rules which are never reduced by the parser: those hidden
9949 by conflicts.
9950
9951 * src/LR0.c (save_reductions): Don't make the final state too
9952 different: save its reduction (accept) instead of having a state
9953 without any action (no shift or goto, no reduce).
9954 Note: the final state is now a ``regular'' state, i.e., the
9955 parsers now contain `reduce 0' as default reduction.
9956 Nevertheless, since they decide to `accept' when yystate =
9957 final_state, they still will not reduce rule 0.
9958 * src/print.c (print_actions, print_reduction): Adjust.
9959 * src/output.c (action_row): Track reduced rules.
9960 (token_actions): Report rules never reduced.
9961 * tests/conflicts.at, tests/regression.at: Adjust.
9962
caf23d24
AD
99632002-07-30 Akim Demaille <akim@epita.fr>
9964
9965 `stage' was accidently included in a previous patch.
9966 Initiate its autoconfiscation.
9967
9968 * configure.in: Look for malloc.h and sys/times.h.
9969 * src/main.c (stage): Adjust.
9970 Report only when trace_flag.
9971
640748ee
AD
99722002-07-29 Akim Demaille <akim@epita.fr>
9973
9974 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9975 state_number_t.
9976 (errs_t): symbol_t*, not symbol_number_t.
9977 (reductions_t): rule_t*, not rule_number_t.
9978 (FOR_EACH_SHIFT): New.
9979 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9980 * src/print.c, src/print_graph.c: Adjust.
9981
88bce5a2
AD
99822002-07-29 Akim Demaille <akim@epita.fr>
9983
9984 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9985
9986 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9987 (endtoken, accept): these.
9988 * src/reader.c (reader): Set endtoken's default tag to "$end".
9989 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9990 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9991 Adjust.
9992
1bfb97db
AD
99932002-07-29 Akim Demaille <akim@epita.fr>
9994
9995 * src/reduce.c (reduce_grammar): When the language is empty,
9996 complain about the start symbol, not the axiom.
9997 Use its location.
9998 * tests/reduce.at (Empty Language): New.
9999
fc5734fe
AD
100002002-07-26 Akim Demaille <akim@epita.fr>
10001
10002 * src/reader.h, src/reader.c (gram_error): ... can't get
10003 yycontrol without making too strong assumptions on the parser
10004 itself.
10005 * src/output.c (prepare_tokens): Use the real 0th value of
10006 token_translations instead of `0'.
10007 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
10008 visible here.
10009 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
10010 for the time being: %locations ought to provide it to yyerror.
10011
3650b4b8
AD
100122002-07-25 Akim Demaille <akim@epita.fr>
10013
10014 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
10015 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
10016 * tests/regression.at (Web2c Actions): Adjust.
10017
4b3d3a8e
AD
100182002-07-25 Akim Demaille <akim@epita.fr>
10019
10020 Stop storing rules from 1 to nrules + 1.
10021
10022 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
10023 * src/nullable.c, src/output.c, src/print.c, src/reader.c
10024 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
10025 Iterate from 0 to nrules.
10026 Use rule_number_as_item_number and item_number_as_rule_number.
10027 Adjust to `derive' now containing possibly 0.
10028 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
10029 Handle the `- 1' part in rule numbers from/to item numbers.
10030 * src/conflicts.c (log_resolution): Fix the message which reversed
10031 shift and reduce.
10032 * src/output.c (action_row): Initialize default_rule to -1.
10033 (token_actions): Adjust.
10034 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
10035 expected output.
10036 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10037
4a2a22f4
AD
100382002-07-25 Akim Demaille <akim@epita.fr>
10039
10040 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10041 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10042 (b4_c_knr_arg_decl): New.
10043 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10044 yyreport_parse_error.
10045
b8df3223
AD
100462002-07-25 Akim Demaille <akim@epita.fr>
10047
10048 * data/yacc.c (yyreport_parse_error): New, extracted from...
10049 (yyparse): here.
10050 (yydestruct, yysymprint): Move above yyparse.
10051 Be K&R compliant.
10052
a762e609
AD
100532002-07-25 Akim Demaille <akim@epita.fr>
10054
10055 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10056 replace...
10057 (b4_sint_type, b4_uint_type): these.
10058 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10059 * tests/regression.at (Web2c Actions): Adjust.
10060
12b0043a
AD
100612002-07-25 Akim Demaille <akim@epita.fr>
10062
10063 * src/gram.h (TIEM_NUMBER_MAX): New.
10064 (item_number_of_rule_number, rule_number_of_item_number): Rename
10065 as...
10066 (rule_number_as_item_number, item_number_as_rule_number): these.
10067 Adjust dependencies.
10068 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10069 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10070 (symbol_number_to_vector_number): New.
10071 (order): Of vector_number_t* type.
10072 (base_t, BASE_MAX, BASE_MIN): New.
10073 (froms, tos, width, pos, check): Of base_t type.
10074 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10075 (actrow): Of action_number_t type.
10076 (conflrow): Of unsigned int type.
10077 (table_ninf, base_ninf): New.
10078 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10079 (muscle_insert_int_table, muscle_insert_base_table)
10080 (muscle_insert_rule_number_table): New.
10081 (prepare_tokens): Output `toknum' as int_table.
10082 (action_row): Returns a rule_number_t.
10083 Use ACTION_MIN, not SHRT_MIN.
10084 (token_actions): yydefact is rule_number_t*.
10085 (table_ninf_remap): New.
10086 (pack_table): Use it for `base' and `table'.
10087 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10088 replaced with...
10089 (YYPACT_NINF, YYTABLE_NINF): these.
10090 (yypact, yytable): Compute their types instead of hard-coded
10091 `short'.
10092 * tests/regression.at (Web2c Actions): Adjust.
10093
5dde258a
AD
100942002-07-19 Akim Demaille <akim@epita.fr>
10095
10096 * src/scan-gram.l (id): Can start with an underscore.
10097
a945ec39
AD
100982002-07-16 Akim Demaille <akim@epita.fr>
10099
10100 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10101 Adjust all former `associativity' dependencies.
10102 * src/symtab.c (symbol_new): Default associativity is `undef', not
10103 `right'.
10104 (symbol_check_alias_consistence): Adjust.
10105
fae437e8
AD
101062002-07-09 Akim Demaille <akim@epita.fr>
10107
10108 * doc/bison.texinfo: Properly set the ``header'' part.
10109 Use @dircategory ``GNU programming tools'' as per Texinfo's
10110 documentation.
10111 Use @copying.
10112
1a715ef2
AD
101132002-07-09 Akim Demaille <akim@epita.fr>
10114
10115 * lib/quotearg.h: Protect against multiple inclusions.
10116 * src/location.h (location_t): Add a `file' member.
10117 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10118 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10119 `error_one_per_line' support.
10120
a5d50994
AD
101212002-07-09 Akim Demaille <akim@epita.fr>
10122
10123 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10124 * src/reader.c (lineno): Remove.
10125 Adjust all dependencies.
10126 (get_merge_function): Take a location and use complain_at.
10127 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10128 * tests/regression.at (Invalid inputs, Mixing %token styles):
10129 Adjust.
10130
b275314e
AD
101312002-07-09 Akim Demaille <akim@epita.fr>
10132
10133 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10134 recovery rule, and forbid extensions when --yacc.
10135 (gram_error): Use complain_at.
10136 * src/reader.c (reader): Exit if there were parse errors.
10137
865b9df1
AD
101382002-07-09 Akim Demaille <akim@epita.fr>
10139
10140 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10141 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10142 Reported by R Blake <blakers@mac.com>.
10143
c76e14da
AD
101442002-07-09 Akim Demaille <akim@epita.fr>
10145
10146 * data/yacc.c: Output the copyright notive in the header.
10147
7db2ed2d
AD
101482002-07-03 Akim Demaille <akim@epita.fr>
10149
10150 * src/output.c (froms, tos): Are state_number_t.
10151 (save_column): sp, sp1, and sp2 are state_number_t.
10152 (prepare): Rename `final' as `final_state_number', `nnts' as
10153 `nterms_number', `nrules' as `rules_number', `nstates' as
10154 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10155 unused.
10156 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10157 * data/lalr1.cc (nsym_): Remove, unused.
10158
e68e0410
AD
101592002-07-03 Akim Demaille <akim@epita.fr>
10160
10161 * src/lalr.h, src/lalr.c (goto_number_t): New.
10162 * src/lalr.c (goto_list_t): New.
10163 Propagate them.
10164 * src/nullable.c (rule_list_t): New.
10165 Propagate.
10166 * src/types.h: Remove.
10167
e1a4f3a4
AD
101682002-07-03 Akim Demaille <akim@epita.fr>
10169
10170 * src/closure.c (print_fderives): Use rule_rhs_print.
10171 * src/derives.c (print_derives): Use rule_rhs_print.
10172 (rule_list_t): New, replaces `shorts'.
10173 (set_derives): Add comments.
10174 * tests/sets.at (Nullable, Firsts): Adjust.
10175
536545f3
AD
101762002-07-03 Akim Demaille <akim@epita.fr>
10177
10178 * src/output.c (prepare_actions): Free `tally' and `width'.
10179 (prepare_actions): Allocate and free `order'.
10180 * src/symtab.c (symbols_free): Free `symbols'.
10181 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10182 * src/output.c (m4_invoke): Move to...
10183 * src/scan-skel.l: here.
10184 (<<EOF>>): Close yyout, and free its name.
10185
8b752b00
AD
101862002-07-03 Akim Demaille <akim@epita.fr>
10187
10188 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10189
10190 * src/LR0.c (new_state): Merge into...
10191 (state_list_append): this.
10192 (new_states): Merge into...
10193 (generate_states): here.
10194 (set_states): Don't ensure a proper `errs' state member here, do it...
10195 * src/conflicts.c (conflicts_solve): here.
10196 * src/state.h, src/state.c: Comment changes.
10197 (state_t): Rename member `shifts' as `transitions'.
10198 Adjust all dependencies.
10199 (errs_new): For consistency, also take the values as argument.
10200 (errs_dup): Remove.
10201 (state_errs_set): New.
10202 (state_reductions_set, state_transitions_set): Assert that no
10203 previous value was assigned.
10204 (state_free): New.
10205 (states_free): Use it.
10206 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10207 temporary storage: use `errs' and `nerrs' as elsewhere.
10208 (set_conflicts): Allocate and free this `errs'.
10209
613f5e1a
AD
102102002-07-02 Akim Demaille <akim@epita.fr>
10211
10212 * lib/libiberty.h: New.
10213 * lib: Update the bitset implementation from upstream.
10214 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10215 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10216 * src/main.c: Adjust bitset stats calls.
10217
26e0cadc
PE
102182002-07-01 Paul Eggert <eggert@twinsun.com>
10219
10220 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10221 char, so that negative chars don't collide with $.
10222
1154cced
AD
102232002-06-30 Akim Demaille <akim@epita.fr>
10224
10225 Have the GLR tests be `warning' checked, and fix the warnings.
10226
10227 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10228 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10229 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10230 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10231 (yyaddDeferredAction): static.
10232 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10233 (yyreportParseError): yyprefix is const.
10234 yytokenp is used only when verbose.
10235 (yy__GNUC__): Replace with __GNUC__.
10236 (yypdumpstack): yyi is size_t.
10237 (yypreference): Un-yy local variables and arguments, to avoid
10238 clashes with `yyr1'. Anyway, we are not in the user name space.
10239 (yytname_size): be an int, as is compared with ints.
10240 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10241 Use them.
10242 * tests/cxx-gram.at: Use quotation to protect $1.
10243 Use AT_COMPILE to enable warnings hunts.
10244 Prototype yylex and yyerror.
10245 `Use' argc.
10246 Include `string.h', not `strings.h'.
10247 Produce and prototype stmtMerge only when used.
10248 yylex takes a location.
10249
97650f4e
AD
102502002-06-30 Akim Demaille <akim@epita.fr>
10251
10252 We spend a lot of time in quotearg, in particular when --verbose.
10253
10254 * src/symtab.c (symbol_get): Store a quoted version of the key.
10255 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10256 Adjust all callers.
10257
d2576365
AD
102582002-06-30 Akim Demaille <akim@epita.fr>
10259
10260 * src/state.h (reductions_t): Rename member `nreds' as num.
10261 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10262 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10263
ccaf65bc
AD
102642002-06-30 Akim Demaille <akim@epita.fr>
10265
10266 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10267 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10268 (shifts_to): Rename as...
10269 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10270 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10271 (TRANSITION_IS_DISABLED, transitions_to): these.
10272
87675353
AD
102732002-06-30 Akim Demaille <akim@epita.fr>
10274
10275 * src/print.c (print_shifts, print_gotos): Merge into...
10276 (print_transitions): this.
10277 (print_transitions, print_errs, print_reductions): Align the
10278 lookaheads columns.
10279 (print_core, print_transitions, print_errs, print_state,
10280 print_grammar): Output empty lines separator before, not after.
10281 (state_default_rule_compute): Rename as...
10282 (state_default_rule): this.
10283 * tests/conflicts.at (Defaulted Conflicted Reduction),
10284 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10285 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10286
ce4ccb4b
AD
102872002-06-30 Akim Demaille <akim@epita.fr>
10288
10289 Display items as we display rules.
10290
10291 * src/gram.h, src/gram.c (rule_lhs_print): New.
10292 * src/gram.c (grammar_rules_partial_print): Use it.
10293 * src/print.c (print_core): Likewise.
10294 * tests/conflicts.at (Defaulted Conflicted Reduction),
10295 (Unresolved SR Conflicts): Adjust.
10296 (Unresolved SR Conflicts): Adjust and rename as...
10297 (Resolved SR Conflicts): this, as was meant.
10298 * tests/regression.at (Web2c Report): Adjust.
10299
bc933ef1
AD
103002002-06-30 Akim Demaille <akim@epita.fr>
10301
10302 * src/print.c (state_default_rule_compute): New, extracted from...
10303 (print_reductions): here.
10304 Pessimize, but clarify the code.
10305 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10306
53d4308d
AD
103072002-06-30 Akim Demaille <akim@epita.fr>
10308
10309 * src/output.c (action_row): Let default_rule be always a rule
10310 number.
10311
574fb2d5
AD
103122002-06-30 Akim Demaille <akim@epita.fr>
10313
10314 * src/closure.c (print_firsts, print_fderives, closure):
10315 Use BITSET_EXECUTE.
10316 * src/lalr.c (lookaheads_print): Likewise.
10317 * src/state.c (state_rule_lookaheads_print): Likewise.
10318 * src/print_graph.c (print_core): Likewise.
10319 * src/print.c (print_reductions): Likewise.
10320 * src/output.c (action_row): Likewise.
10321 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10322
05811fd7
AD
103232002-06-30 Akim Demaille <akim@epita.fr>
10324
10325 * src/print_graph.c: Use report_flag.
10326
0e4d5753
AD
103272002-06-30 Akim Demaille <akim@epita.fr>
10328
10329 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10330 to...
10331 * src/relation.h, src/relation.c (traverse, relation_digraph)
10332 (relation_print, relation_transpose): New.
10333
24c7d800
AD
103342002-06-30 Akim Demaille <akim@epita.fr>
10335
10336 * src/state.h, src/state.c (shifts_to): New.
10337 * src/lalr.c (build_relations): Use it.
10338
9222837b
AD
103392002-06-30 Akim Demaille <akim@epita.fr>
10340
10341 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10342 (item_number_of_rule_number, rule_number_of_item_number): New.
10343 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10344 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10345 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10346 Propagate their use.
10347 Much remains to be done, in particular wrt `shorts' from types.h.
10348
260008e5
AD
103492002-06-30 Akim Demaille <akim@epita.fr>
10350
10351 * src/symtab.c (symbol_new): Initialize the `printer' member.
10352
8a731ca8
AD
103532002-06-30 Akim Demaille <akim@epita.fr>
10354
10355 * src/LR0.c (save_reductions): Remove, replaced by...
10356 * src/state.h, src/state.c (state_reductions_set): New.
10357 (reductions, errs): Rename as...
10358 (reductions_t, errs_t): these.
10359 Adjust all dependencies.
10360
32e1e0a4
AD
103612002-06-30 Akim Demaille <akim@epita.fr>
10362
10363 * src/LR0.c (state_list_t, state_list_append): New.
10364 (first_state, last_state): Now symbol_list_t.
10365 (this_state): Remove.
10366 (new_itemsets, append_states, save_reductions): Take a state_t as
10367 argument.
10368 (set_states, generate_states): Adjust.
10369 (save_shifts): Remove, replaced by...
10370 * src/state.h, src/state.c (state_shifts_set): New.
10371 (shifts): Rename as...
10372 (shifts_t): this.
10373 Adjust all dependencies.
10374 * src/state.h (state_t): Remove the `next' member.
10375
e5fb6710
AD
103762002-06-30 Akim Demaille <akim@epita.fr>
10377
10378 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10379 escaped in slot 0.
10380
c7ca99d4
AD
103812002-06-30 Akim Demaille <akim@epita.fr>
10382
10383 Use hash.h for the state hash table.
10384
10385 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10386 (allocate_storage): Use state_hash_new.
10387 (free_storage): Use state_hash_free.
10388 (new_state, get_state): Adjust.
10389 * src/lalr.h, src/lalr.c (states): Move to...
10390 * src/states.h (state_t): Remove the `link' member, no longer
10391 used.
10392 * src/states.h, src/states.c: here.
10393 (state_hash_new, state_hash_free, state_hash_lookup)
10394 (state_hash_insert, states_free): New.
10395 * src/states.c (state_table, state_compare, state_hash): New.
10396 * src/output.c (output_actions): Do not free states now, since we
10397 still need to know the final_state number in `prepare', called
10398 afterwards. Do it...
10399 * src/main.c (main): here: call states_free after `output'.
10400
df0e7316
AD
104012002-06-30 Akim Demaille <akim@epita.fr>
10402
10403 * src/state.h, src/state.c (state_new): New, extracted from...
10404 * src/LR0.c (new_state): here.
10405 * src/state.h (STATE_ALLOC): Move to...
10406 * src/state.c: here.
10407 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10408 * src/state.h, src/state.c: here.
10409
39f41916
AD
104102002-06-30 Akim Demaille <akim@epita.fr>
10411
10412 * src/reader.c (gensym): Rename as...
10413 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10414 (getsym): Rename as...
10415 (symbol_get): this.
10416
d57650a5
AD
104172002-06-30 Akim Demaille <akim@epita.fr>
10418
10419 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10420 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10421 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10422 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10423
5a08f1ce
AD
104242002-06-30 Akim Demaille <akim@epita.fr>
10425
10426 Make the test suite pass with warnings checked.
10427
10428 * tests/actions.at (Printers and Destructors): Improve.
10429 Avoid unsigned vs. signed issues.
10430 * tests/calc.at: Don't exercise the scanner here, do it...
10431 * tests/input.at (Torturing the Scanner): here.
10432
720623af
PH
104332002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10434
88e7e941 10435 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
10436 reorganize first lines parallel to yacc.c.
10437
fb8135fa
AD
104382002-06-28 Akim Demaille <akim@epita.fr>
10439
10440 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10441 (b4_token_enum, b4_token_defines): New, factored from...
10442 * data/lalr1.cc, data/yacc.c, glr.c: here.
10443
41442480
AD
104442002-06-28 Akim Demaille <akim@epita.fr>
10445
10446 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10447 unused variables.
10448 * src/output.c (merger_output): static.
10449
e0e5bf84
AD
104502002-06-28 Akim Demaille <akim@epita.fr>
10451
ba0fe3c7 10452 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
10453 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10454 pacify GCC.
10455 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 10456
676385e2
PH
104572002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10458
10459 Accumulated changelog for new GLR parsing features.
10460
6a254321 10461 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
10462 conflicts_total_count.
10463 * src/conflicts.h: Ditto.
10464 * src/output.c (token_actions): Use the new name.
10465 (output_conflicts): Change conflp => conflict_list_heads, and
10466 confl => conflict_list for better readability.
10467 * data/glr.c: Use the new names.
10468 * NEWS: Add self to GLR announcement.
e0e5bf84 10469
676385e2
PH
10470 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10471
10472 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10473 Akim Demaille.
10474
10475 * data/bison.glr: Change name to glr.c
10476 * data/glr.c: Renamed from bison.glr.
10477 * data/Makefile.am: Add glr.c
e0e5bf84
AD
10478
10479 * src/getargs.c:
10480
676385e2 10481 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 10482 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 10483
676385e2
PH
10484 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10485
10486 * data/bison.glr: Be sure to restore the
10487 current #line when returning to the skeleton contents after having
10488 exposed the input file's #line.
10489
10490 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10491
10492 * data/bison.glr: Bring up to date with changes to bison.simple.
10493
10494 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10495
10496 * data/bison.glr: Correct definitions that use b4_prefix.
10497 Various reformatting.
10498 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10499 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10500 yytokenp argument; now part of stack.
10501 (yychar): Define to behave as documented.
10502 (yyclearin): Ditto.
e0e5bf84 10503
676385e2
PH
10504 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10505
10506 * src/reader.h: Add declaration for free_merger_functions.
10507
10508 * src/reader.c (merge_functions): New variable.
10509 (get_merge_function): New function.
10510 (free_merger_functions): New function.
10511 (readgram): Check for %prec that is not followed by a symbol.
10512 Handle %dprec and %merge declarations.
10513 (packgram): Initialize dprec and merger fields in rules array.
10514
10515 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10516 conflict_list_cnt, conflict_list_free): New variables.
10517 (table_grow): Also grow conflict_table.
e0e5bf84 10518 (prepare_rules): Output dprec and merger tables.
676385e2 10519 (conflict_row): New function.
e0e5bf84 10520 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
10521 default reduction in conflicted states for GLR parser so that there
10522 are spaces for the conflict lists.
10523 (save_row): Also save conflict information.
10524 (token_actions): Allocate conflict list.
10525 (merger_output): New function.
10526 (pack_vector): Pack conflict table, too.
10527 (output_conflicts): New function to output yyconflp and yyconfl.
10528 (output_check): Allocate conflict_tos.
10529 (output_actions): Output conflict tables, also.
10530 (output_skeleton): Output b4_mergers definition.
10531 (prepare): Output b4_max_rhs_length definition.
10532 Use 'bison.glr' as default skeleton for GLR parsers.
10533
10534 * src/gram.c (glr_parser): New flag.
10535 (grammar_free): Call free_merger_functions.
10536
10537 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10538 all pairs of conflicting reductions, rather than just all tokens
10539 causing conflicts. Needed to size conflict tables.
e0e5bf84 10540 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
10541 interface.
10542 (conflicts_print): Ditto.
10543 (count_total_conflicts): New function.
10544
10545 * src/reader.h (merger_list): New type.
10546 (merge_functions): New variable.
10547
10548 * src/lex.h (tok_dprec, tok_merge): New token types.
10549
10550 * src/gram.h (rule_s): Add dprec and merger fields.
10551 (glr_parser): New flag.
10552
10553 * src/conflicts.h (count_total_conflicts): New function.
10554
10555 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10556
10557 * doc/bison.texinfo (Generalized LR Parsing): New section.
10558 (GLR Parsers): New section.
10559 (Language and Grammar): Mention GLR parsing.
10560 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10561 Correct typo ("tge" -> "the").
10562
10563 * data/bison.glr: New skeleton for GLR parsing.
10564
10565 * tests/cxx-gram.at: New tests for GLR parsing.
10566
10567 * tests/testsuite.at: Include cxx-gram.at.
10568
10569 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 10570
676385e2
PH
10571 * src/parse-gram.y:
10572
10573 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10574
10575 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 10576
b5480d74 105772002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
10578
10579 * src/options.h, src/options.c: Remove.
10580 * src/getargs.c (short_options, long_options): New.
10581
60491a94
AD
105822002-06-27 Akim Demaille <akim@epita.fr>
10583
10584 * data/bison.simple, data/bison.c++: Rename as...
10585 * data/yacc.c, data/lalr1.cc: these.
10586 * doc/bison.texinfo (Environment Variables): Remove.
10587
9be0c25b
AD
105882002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10589
10590 * src/getargs.c (report_argmatch): Initialize strtok().
10591
1ae72863
AD
105922002-06-20 Akim Demaille <akim@epita.fr>
10593
10594 * data/bison.simple (b4_symbol_actions): New, replaces...
10595 (b4_symbol_destructor, b4_symbol_printer): these.
10596 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10597 user token numbers.
10598
87542d29
AD
105992002-06-20 Akim Demaille <akim@epita.fr>
10600
10601 * data/bison.simple (yydestructor): Rename as...
10602 (yydestruct): this.
10603
1a31ed21
AD
106042002-06-20 Akim Demaille <akim@epita.fr>
10605
10606 * src/symtab.h, src/symtab.c (symbol_type_set)
10607 (symbol_destructor_set, symbol_precedence_set): The location is
10608 the last argument.
10609 Adjust all callers.
10610
e776192e
AD
106112002-06-20 Akim Demaille <akim@epita.fr>
10612
10613 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10614 internals.
10615 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10616 Takes a location.
10617 * src/symtab.h, src/symtab.c (symbol_class_set)
10618 (symbol_user_token_number_set): Likewise.
10619 Adjust all callers.
10620 Promote complain_at.
10621 * tests/input.at (Type Clashes): Adjust.
10622
5c1180b3
AD
106232002-06-20 Akim Demaille <akim@epita.fr>
10624
10625 * data/bison.simple (YYLEX): Fix the declaration when
10626 %pure-parser.
10627
e3170060
AD
106282002-06-20 Akim Demaille <akim@epita.fr>
10629
10630 * data/bison.simple (yysymprint): Don't print the token number,
10631 just its name.
10632 * tests/actions.at (Destructors): Rename as...
10633 (Printers and Destructors): this.
10634 Also exercise %printer.
10635
253862fd
AD
106362002-06-20 Akim Demaille <akim@epita.fr>
10637
10638 * data/bison.simple (YYDSYMPRINT): New.
10639 Use it to remove many of the #if YYDEBUG/if (yydebug).
10640
366eea36
AD
106412002-06-20 Akim Demaille <akim@epita.fr>
10642
10643 * src/symtab.h, src/symtab.c (symbol_t): printer and
10644 printer_location are new members.
10645 (symbol_printer_set): New.
10646 * src/parse-gram.y (PERCENT_PRINTER): New token.
10647 Handle its associated rule.
10648 * src/scan-gram.l: Adjust.
10649 (handle_destructor_at, handle_destructor_dollar): Rename as...
10650 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10651 * src/output.c (symbol_printers_output): New.
10652 (output_skeleton): Call it.
10653 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10654 since there are already many grammar files with a user `yyprint'.
10655 Replace the calls to YYPRINT to calls to yysymprint.
10656 * tests/calc.at: Adjust.
10657 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10658 taking advantage of parser very internal details (stack size!).
10659
4f25ebb0
AD
106602002-06-20 Akim Demaille <akim@epita.fr>
10661
10662 * src/scan-gram.l: Complete the scanner with the missing patterns
10663 to pacify Flex.
10664 Use `quote' and `symbol_tag_get' where appropriate.
10665
93b68a0e
AD
106662002-06-19 Akim Demaille <akim@epita.fr>
10667
10668 * tests/actions.at (Destructors): Augment to test locations.
10669 * data/bison.simple (yydestructor): Pass it the current location
10670 if locations are enabled.
10671 Prototype only when __STDC__ or C++.
10672 Change the argument names to move into the yy name space: there is
10673 user code here.
10674
58612f1d
AD
106752002-06-19 Akim Demaille <akim@epita.fr>
10676
74310291
AD
10677 * data/bison.simple (b4_pure_if): New.
10678 Use it instead of #ifdef YYPURE.
10679
106802002-06-19 Akim Demaille <akim@epita.fr>
10681
10682 * data/bison.simple (b4_location_if): New.
58612f1d
AD
10683 Use it instead of #ifdef YYLSP_NEEDED.
10684
f25bfb75
AD
106852002-06-19 Akim Demaille <akim@epita.fr>
10686
10687 Prepare @$ in %destructor, but currently don't bind it in the
10688 skeleton, as %location use is not cleaned up yet.
10689
10690 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10691 (handle_action_at): New.
10692 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10693 a braced_code_t and a location as additional arguments.
10694 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10695 unquote one when outputting `b4_dollar_dollar'.
10696 Adjust callers.
10697 * data/bison.simple (b4_eval): Remove.
10698 (b4_symbol_destructor): Adjust.
10699 * tests/input.at (Invalid @n): Adjust.
10700
c732d2c6
AD
107012002-06-19 Zack Weinberg <zack@codesourcery.com>
10702
10703 * doc/bison.texinfo: Document ability to have multiple
10704 prologue sections.
10705
8c165d89
AD
107062002-06-18 Akim Demaille <akim@epita.fr>
10707
10708 * src/files.c (compute_base_names): When computing the output file
10709 names from the input file name, strip the directory part.
10710
ca98bf57
AD
107112002-06-18 Akim Demaille <akim@epita.fr>
10712
10713 * data/bison.simple.new: Comment changes.
10714 Reported by Andreas Schwab.
10715
0bfb02ff
AD
107162002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10717
10718 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10719 there are no `label `yyoverflowlab' defined but not used' warnings
10720 when yyoverflow is defined.
10721
24c0aad7
AD
107222002-06-18 Akim Demaille <akim@epita.fr>
10723
10724 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10725 new member.
10726 (symbol_destructor_set): Adjust.
10727 * src/output.c (symbol_destructors_output): Output the destructor
10728 locations.
10729 Output the symbol name.
10730 * data/bison.simple (b4_symbol_destructor): Adjust.
10731
5719c109
AD
107322002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10733 and Akim Demaille <akim@epita.fr>
10734
10735 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10736 what's left on the stack when the error recovery hits EOF.
10737 * tests/actions.at (Destructors): Complete to exercise this case.
10738
9280d3ef
AD
107392002-06-17 Akim Demaille <akim@epita.fr>
10740
10741 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10742 arguments is really empty, not only equal to `[]'.
10743 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10744 member.
10745 (symbol_destructor_set): New.
10746 * src/output.c (symbol_destructors_output): New.
10747 * src/reader.h (brace_code_t, current_braced_code): New.
10748 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10749 (handle_dollar): Rename as...
10750 (handle_action_dollar): this.
10751 (handle_destructor_dollar): New.
10752 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10753 (grammar_declaration): Use it.
10754 * data/bison.simple (yystos): Is always defined.
10755 (yydestructor): New.
10756 * tests/actions.at (Destructors): New.
10757 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10758
dafdc66f
AD
107592002-06-17 Akim Demaille <akim@epita.fr>
10760
10761 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10762 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10763 rule_length only when needed.
10764 * src/output.c (actions_output, token_definitions_output): Output
10765 the full M4 block.
10766 * src/symtab.c: Don't access directly to the symbol tag, use
10767 symbol_tag_get.
10768 * src/parse-gram.y: Use symbol_list_free.
10769
56c47203
AD
107702002-06-17 Akim Demaille <akim@epita.fr>
10771
10772 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10773 (symbol_list_prepend, get_type_name): Move to...
10774 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10775 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10776 Adjust all callers.
10777 (symbol_list_free): New.
10778 * src/scan-gram.l (handle_dollar): Takes a location.
10779 * tests/input.at (Invalid $n): Adjust.
10780
1e0bab92
AD
107812002-06-17 Akim Demaille <akim@epita.fr>
10782
10783 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10784 (symbol_list_prepend): New.
10785 * src/parse-gram.y (%union): `list' is a new member.
10786 (symbols.1): New, replaces...
10787 (terms_to_prec.1, nterms_to_type.1): these.
10788 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10789 Take a location as additional argument.
10790 Adjust all callers.
10791
04e60654
AD
107922002-06-15 Akim Demaille <akim@epita.fr>
10793
10794 * src/parse-gram.y: Move %token in the declaration section so that
10795 we don't depend upon CVS Bison.
10796
10e5b8bd
AD
107972002-06-15 Akim Demaille <akim@epita.fr>
10798
10799 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10800 * src/print.c (print_core): Use it.
10801
9801d40c
AD
108022002-06-15 Akim Demaille <akim@epita.fr>
10803
10804 * src/conflicts.c (log_resolution): Accept the rule involved in
10805 the sr conflicts instead of the lookahead number that points to
10806 that rule.
10807 (flush_reduce): Accept the current lookahead vector as argument,
10808 instead of the index in LA.
10809 (resolve_sr_conflict): Accept the current number of lookahead
10810 bitset to consider for the STATE, instead of the index in LA.
10811 (set_conflicts): Adjust.
10812 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10813
c0263492
AD
108142002-06-15 Akim Demaille <akim@epita.fr>
10815
10816 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10817 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10818 Adjust all dependencies.
10819 * src/lalr.c (initialize_lookaheads): Split into...
10820 (states_lookaheads_count, states_lookaheads_initialize): these.
10821 (lalr): Adjust.
10822
9757c359
AD
108232002-06-15 Akim Demaille <akim@epita.fr>
10824
10825 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10826 out of...
10827 (grammar_rules_print): here.
10828 * src/reduce.c (reduce_output): Use it.
10829 * tests/reduce.at (Useless Rules, Reduced Automaton)
10830 (Underivable Rules): Adjust.
10831
6b98e4b5
AD
108322002-06-15 Akim Demaille <akim@epita.fr>
10833
10834 Copy BYacc's nice way to report the grammar.
10835
10836 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10837 New.
10838 Don't print the rules' location, it is confusing and useless.
10839 (rule_print): Use grammar_rhs_print.
10840 * src/print.c (print_grammar): Use grammar_rules_print.
10841
6b98e4b5
AD
108422002-06-15 Akim Demaille <akim@epita.fr>
10843
10844 Complete and rationalize `useless thing' warnings.
10845
10846 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10847 (symbol_tag_print): New.
10848 Use them everywhere in place of accessing directly the tag member.
10849 * src/gram.h, src/gram.c (rule_print): New.
10850 Use it where a rule used to be printed `by hand'.
10851 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10852 (reduce_grammar_tables): Report the useless rules.
10853 (reduce_print): Useless things are a warning, not an error.
10854 Report it as such.
10855 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10856 (Reduced Automaton, Underivable Rules): Adjust.
10857 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10858 * tests/conflicts.at (Unresolved SR Conflicts)
10859 (Solved SR Conflicts): Adjust.
10860
ee000ba4
AD
108612002-06-15 Akim Demaille <akim@epita.fr>
10862
10863 Let symbols have a location.
10864
10865 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10866 (getsym): Adjust.
10867 Adjust all callers.
10868 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10869 Use location_t, not int.
10870 * src/symtab.c (symbol_check_defined): Take advantage of the
10871 location.
10872 * tests/regression.at (Invalid inputs): Adjust.
10873
8efe435c
AD
108742002-06-15 Akim Demaille <akim@epita.fr>
10875
10876 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10877 (input): Don't try to initialize yylloc here, do it in the
10878 scanner.
10879 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10880 * src/gram.h (rule_t): Change line and action_line into location
10881 and action_location, of location_t type.
10882 Adjust all dependencies.
10883 * src/location.h, src/location.c (empty_location): New.
10884 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10885 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10886 (grammar_current_rule_symbol_append)
10887 (grammar_current_rule_action_append): Expect a location as argument.
10888 * src/reader.c (grammar_midrule_action): Adjust to attach an
10889 action's location as dummy symbol location.
10890 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10891 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10892 the line numbers.
10893
1921f1d7
AD
108942002-06-14 Akim Demaille <akim@epita.fr>
10895
10896 Grammar declarations may be found in the grammar section.
10897
10898 * src/parse-gram.y (rules_or_grammar_declaration): New.
10899 (declarations): Each declaration may end with a semicolon, not
10900 just...
10901 (grammar_declaration): `"%union"'.
10902 (grammar): Branch to rules_or_grammar_declaration.
10903
4515534c
AD
109042002-06-14 Akim Demaille <akim@epita.fr>
10905
10906 * src/main.c (main): Invoke scanner_free.
10907
f958596b
AD
109082002-06-14 Akim Demaille <akim@epita.fr>
10909
10910 * src/output.c (m4_invoke): Extracted from...
10911 (output_skeleton): here.
10912 Free tempfile.
10913
2c569025
AD
109142002-06-14 Akim Demaille <akim@epita.fr>
10915
10916 * src/parse-gram.y (directives, directive, gram)
10917 (grammar_directives, precedence_directives, precedence_directive):
10918 Rename as...
10919 (declarations, declaration, grammar, grammar_declaration)
10920 (precedence_declaration, precedence_declarator): these.
10921 (symbol_declaration): New.
10922
592e8d4d
AD
109232002-06-14 Akim Demaille <akim@epita.fr>
10924
10925 * src/files.c (action_obstack): Remove, unused.
10926 (output_obstack): Remove it, and all its dependencies, as it is no
10927 longer needed.
10928 * src/reader.c (epilogue_set): Build the epilogue in the
10929 muscle_obstack.
10930 * src/output.h, src/output.c (muscle_obstack): Move to...
10931 * src/muscle_tab.h, src/muscle_tab.h: here.
10932 (muscle_init): Initialize muscle_obstack.
10933 (muscle_free): New.
10934 * src/main.c (main): Call it.
10935
0c15323d
AD
109362002-06-14 Akim Demaille <akim@epita.fr>
10937
10938 * src/location.h: New, extracted from...
10939 * src/reader.h: here.
10940 * src/Makefile.am (noinst_HEADERS): Merge into
10941 (bison_SOURCES): this.
10942 Add location.h.
10943 * src/parse-gram.y: Use location_t instead of Bison's.
10944 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10945 Use location_t instead of ints.
10946
e96c9728
AD
109472002-06-14 Akim Demaille <akim@epita.fr>
10948
10949 * data/bison.simple, data/bison.c++: Be sure to restore the
10950 current #line when returning to the skeleton contents after having
10951 exposed the input file's #line.
10952
75d1fe16
AD
109532002-06-12 Akim Demaille <akim@epita.fr>
10954
10955 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10956 eager.
10957 * tests/actions.at (Exotic Dollars): New.
10958
6c35d22c
AD
109592002-06-12 Akim Demaille <akim@epita.fr>
10960
10961 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10962 ['"/] too eagerly.
10963 * tests/input.at (Torturing the Scanner): New.
10964
1d6412ad
AD
109652002-06-11 Akim Demaille <akim@epita.fr>
10966
10967 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10968 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10969 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10970 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10971 * src/reader.c (reader): Use it.
10972
4cdb01db
AD
109732002-06-11 Akim Demaille <akim@epita.fr>
10974
10975 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10976 Adjust all callers.
10977 (scanner_last_string_free): New.
10978
44995b2e
AD
109792002-06-11 Akim Demaille <akim@epita.fr>
10980
10981 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10982 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10983 (last_string, YY_OBS_FREE): New.
10984 Use them when returning an ID.
10985
e9955c83
AD
109862002-06-11 Akim Demaille <akim@epita.fr>
10987
10988 Have Bison grammars parsed by a Bison grammar.
10989
10990 * src/reader.c, src/reader.h (prologue_augment): New.
10991 * src/reader.c (copy_definition): Remove.
10992
10993 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10994 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10995 (grammar_current_rule_prec_set, grammar_current_rule_check)
10996 (grammar_current_rule_symbol_append)
10997 (grammar_current_rule_action_append): Export.
10998 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10999 (symbol_list_action_append): Remove.
11000 Hook the routines from reader.
11001 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
11002 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
11003
11004 * src/reader.c (read_declarations): Remove, unused.
11005
11006 * src/parse-gram.y: Handle the epilogue.
11007 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
11008 (grammar_start_symbol_set): this.
11009 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
11010 * src/reader.c (readgram): Remove, unused.
11011 (reader): Adjust to insert eoftoken and axiom where appropriate.
11012
11013 * src/reader.c (copy_dollar): Replace with...
11014 * src/scan-gram.h (handle_dollar): this.
11015 * src/parse-gram.y: Remove `%thong'.
11016
11017 * src/reader.c (copy_at): Replace with...
11018 * src/scan-gram.h (handle_at): this.
11019
11020 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
11021 New.
11022
11023 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
11024 time being.
11025
11026 * src/reader.h, src/reader.c (grammar_rule_end): New.
11027
11028 * src/parse.y (current_type, current_class): New.
11029 Implement `%nterm', `%token' support.
11030 Merge `%term' into `%token'.
11031 (string_as_id): New.
11032 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
11033 type name.
11034
11035 * src/parse-gram.y: Be sure to handle properly the beginning of
11036 rules.
11037
11038 * src/parse-gram.y: Handle %type.
11039 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11040
11041 * src/parse-gram.y: More directives support.
11042 * src/options.c: No longer handle source directives.
11043
11044 * src/parse-gram.y: Fix %output.
11045
11046 * src/parse-gram.y: Handle %union.
11047 Use the prologue locations.
11048 * src/reader.c (parse_union_decl): Remove.
11049
11050 * src/reader.h, src/reader.c (epilogue_set): New.
11051 * src/parse-gram.y: Use it.
11052
11053 * data/bison.simple, data/bison.c++: b4_stype is now either not
11054 defined, then default to int, or to the contents of %union,
11055 without `union' itself.
11056 Adjust.
11057 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11058
11059 * src/output.c (actions_output): Don't output braces, as they are
11060 already handled by the scanner.
11061
11062 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11063 characters to themselves.
11064
11065 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11066 that the epilogue has a proper #line.
11067
11068 * src/parse-gram.y: Handle precedence/associativity.
11069
11070 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11071 a terminal.
11072 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11073 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11074 at all to define terminals that cannot be emitted.
11075
11076 * src/scan-gram.l: Escape M4 characters.
11077
11078 * src/scan-gram.l: Working properly with escapes in user
11079 strings/characters.
11080
11081 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11082 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11083 grammar.
11084 Use more modest sizes, as for the time being the parser does not
11085 release memory, and therefore the process swallows a huge amount
11086 of memory.
11087
11088 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11089 stricter %token grammar.
11090
11091 * src/symtab.h (associativity): Add `undef_assoc'.
11092 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11093 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11094
11095 * tests/regression.at (Invalid %directive): Remove, as it is now
11096 meaningless.
11097 (Invalid inputs): Adjust to the new error messages.
11098 (Token definitions): The new grammar doesn't allow too many
11099 eccentricities.
11100
11101 * src/lex.h, src/lex.c: Remove.
11102 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11103 (copy_character, copy_string2, copy_string, copy_identifier)
11104 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11105 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11106 (parse_action): Remove.
11107 * po/POTFILES.in: Adjust.
11108
2e047461
AD
111092002-06-11 Akim Demaille <akim@epita.fr>
11110
cd05d13c 11111 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
11112 rule's action member: return the action as a string.
11113 Don't require `rule_length' as an argument: compute it.
11114 (grammar_current_rule_symbol_append)
11115 (grammar_current_rule_action_append): New, eved out from
11116 (readgram): here.
11117 Remove `action_flag', `rulelength', unused now.
11118
9af3fbce
AD
111192002-06-11 Akim Demaille <akim@epita.fr>
11120
11121 * src/reader.c (grammar_current_rule_prec_set).
11122 (grammar_current_rule_check): New, eved out from...
11123 (readgram): here.
11124 Remove `xaction', `first_rhs': useless.
11125 * tests/input.at (Type clashes): New.
11126 * tests/existing.at (GNU Cim Grammar): Adjust.
11127
1485e106
AD
111282002-06-11 Akim Demaille <akim@epita.fr>
11129
11130 * src/reader.c (grammar_midrule_action): New, Eved out from
11131 (readgram): here.
11132
da4160c3
AD
111332002-06-11 Akim Demaille <akim@epita.fr>
11134
11135 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11136 New.
11137 (readgram): Use them as replacement of inlined code, crule and
11138 crule1.
11139
f6d0f937
AD
111402002-06-11 Akim Demaille <akim@epita.fr>
11141
11142 * src/reader.c (grammar_end, grammar_symbol_append): New.
11143 (readgram): Use them.
11144 Make the use of `p' as local as possible.
11145
69078d4b
AD
111462002-06-10 Akim Demaille <akim@epita.fr>
11147
11148 GCJ's parser requires the tokens to be defined before the prologue.
11149
11150 * data/bison.simple: Output the token definition before the user's
11151 prologue.
11152 * tests/regression.at (Braces parsing, Duplicate string)
11153 (Mixing %token styles): Check the output from bison.
11154 (Early token definitions): New.
11155
5e424082
AD
111562002-06-10 Akim Demaille <akim@epita.fr>
11157
11158 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11159 assigning twice the same user number to a token, so that we can
11160 use it in...
11161 * src/lex.c (lex): here.
11162 Also use `symbol_class_set' instead of hand written code.
11163 * src/reader.c (parse_assoc_decl): Likewise.
11164
44536b35
AD
111652002-06-10 Akim Demaille <akim@epita.fr>
11166
11167 * src/symtab.c, src/symtab.c (symbol_class_set)
11168 (symbol_user_token_number_set): New.
11169 * src/reader.c (parse_token_decl): Use them.
11170 Use a switch instead of ifs.
11171 Use a single argument.
11172
8b9f2372
AD
111732002-06-10 Akim Demaille <akim@epita.fr>
11174
11175 Remove `%thong' support as it is undocumented, unused, duplicates
11176 `%token's job, and creates useless e-mail traffic with people who
11177 want to know what it is, why it is undocumented, unused, and
11178 duplicates `%token's job.
11179
11180 * src/reader.c (parse_thong_decl): Remove.
11181 * src/options.c (option_table): Remove "thong".
11182 * src/lex.h (tok_thong): Remove.
11183
3ae2b51f
AD
111842002-06-10 Akim Demaille <akim@epita.fr>
11185
11186 * src/symtab.c, src/symtab.c (symbol_type_set)
11187 (symbol_precedence_set): New.
11188 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11189 (value_components_used): Remove, unused.
11190
2f1afb73
AD
111912002-06-09 Akim Demaille <akim@epita.fr>
11192
11193 Move symbols handling code out of the reader.
11194
11195 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11196 (axiom): Move to...
11197 * src/symtab.h, src/symtab.c: here.
11198
11199 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11200 * src/reader.c (startval): Rename as...
11201 * src/symtab.h, src/symtab.c (startsymbol): this.
11202 * src/reader.c: Adjust.
11203
11204 * src/reader.c (symbol_check_defined, symbol_make_alias)
11205 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11206 (token_translations_init)
11207 Move to...
11208 * src/symtab.c: here.
11209 * src/reader.c (packsymbols): Move to...
11210 * src/symtab.h, src/symtab.c (symbols_pack): here.
11211 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11212 argument.
11213
e9bca3ad
AD
112142002-06-03 Akim Demaille <akim@epita.fr>
11215
11216 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11217 then statements.
11218
86eff183
AD
112192002-06-03 Akim Demaille <akim@epita.fr>
11220
11221 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11222 structs with non literals.
11223 * src/scan-skel.l: never-interactive.
11224 * src/conflicts.c (enum conflict_resolution_e): No trailing
11225 comma.
11226 * src/getargs.c (usage): Split long literal strings.
11227 Reported by Hans Aberg.
11228
717be197
AD
112292002-05-28 Akim Demaille <akim@epita.fr>
11230
11231 * data/bison.c++: Use C++ ostreams.
11232 (cdebug_): New member.
11233
670ddffd
AD
112342002-05-28 Akim Demaille <akim@epita.fr>
11235
11236 * src/output.c (output_skeleton): Be sure to allocate enough room
11237 for `/' _and_ for `\0' in full_skeleton.
11238
769b430f
AD
112392002-05-28 Akim Demaille <akim@epita.fr>
11240
11241 * data/bison.c++: Catch up with bison.simple:
11242 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11243 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11244 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11245 and popping traces.
11246
7067cb36
PH
112472002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11248
11249 * src/output.c (output_skeleton): Put an explicit path in front of
11250 the skeleton file name, rather than relying on the -I directory,
11251 to partially alleviate effects of having a skeleton file lying around
11252 in the current directory.
769b430f 11253
4a713ec2
PH
112542002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11255
769b430f 11256 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
11257 obstack_printf should be obstack_fgrow1.
11258
b408954b
AD
112592002-05-26 Akim Demaille <akim@epita.fr>
11260
11261 * src/state.h (state_t): `solved_conflicts' is a new member.
11262 * src/LR0.c (new_state): Set it to 0.
11263 * src/conflicts.h, src/conflicts.c (print_conflicts)
11264 (free_conflicts, solve_conflicts): Rename as...
11265 (conflicts_print, conflicts_free, conflicts_solve): these.
11266 Adjust callers.
11267 * src/conflicts.c (enum conflict_resolution_e)
11268 (solved_conflicts_obstack): New, used by...
11269 (log_resolution): this.
11270 Adjust to attach the conflict resolution to each state.
11271 Complete the description with the precedence/associativity
11272 information.
11273 (resolve_sr_conflict): Adjust.
11274 * src/print.c (print_state): Output its solved_conflicts.
11275 * tests/conflicts.at (Unresolved SR Conflicts)
11276 (Solved SR Conflicts): Exercise --report=all.
11277
a49aecd5
AD
112782002-05-26 Akim Demaille <akim@epita.fr>
11279
11280 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11281 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11282 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11283 (token_number_t, item_number_as_token_number)
11284 (token_number_as_item_number, muscle_insert_token_number_table):
11285 Rename as...
11286 (symbol_number_t, item_number_as_symbol_number)
11287 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11288 these, since it is more appropriate.
11289
5504898e
AD
112902002-05-26 Akim Demaille <akim@epita.fr>
11291
11292 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11293 `Error:' lines.
11294 * data/bison.simple (yystos) [YYDEBUG]: New.
11295 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11296 error recovery.
11297 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11298
ec3bc396
AD
112992002-05-25 Akim Demaille <akim@epita.fr>
11300
11301 * doc/bison.texinfo (Debugging): Split into...
11302 (Tracing): this new section, its former contents, and...
11303 (Understanding): this new section.
11304 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11305 by...
11306 (report_flag): this.
11307 Adjust all dependencies.
11308 (report_args, report_types, report_argmatch): New.
11309 (usage, getargs): Report/support -r, --report.
11310 * src/options.h
11311 (struct option_table_struct): Rename as..,
11312 (struct option_table_s): this.
11313 Rename the `set_flag' member to `flag' to match with getopt_long's
11314 struct.
11315 * src/options.c (option_table): Split verbose into an entry for
11316 %verbose, and another for --verbose.
11317 Support --report/-r, so remove -r from the obsolete --raw.
11318 * src/print.c: Attach full item sets and lookaheads reports to
11319 report_flag instead of trace_flag.
11320 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11321
78df8250
PE
113222002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11323 and Paul Eggert <eggert@twinsun.com>
769b430f 11324
78df8250
PE
11325 * data/bison.simple (yyparse): Correct error handling to conform to
11326 POSIX and yacc. Specifically, after syntax error is discovered,
11327 do not reduce further before shifting the error token.
11328 Clean up the code a bit by removing the labels yyerrdefault,
11329 yyerrhandle, yyerrpop.
11330 * NEWS: Document the above.
11331
c0c9ea05
PH
113322002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11333
11334 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11335 type; it isn't always big enough, since it doesn't necessarily
11336 include non-terminals.
769b430f 11337 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
11338 the latter can be removed.
11339 (yy_token_number_type): Remove, only one use.
11340 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11341 don't use TokenNumberType as element type.
769b430f 11342
c0c9ea05
PH
11343 * tests/regression.at: Modify expected output to agree with change
11344 to yyr1 and yytranslate.
769b430f 11345
6390a83f
FK
113462002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11347
11348 * src/reader.c (parse_action): Use copy_character instead of
11349 obstack_1grow.
11350
db7c8e9a
AD
113512002-05-13 Akim Demaille <akim@epita.fr>
11352
11353 * tests/regression.at (Token definitions): Prototype yylex and
11354 yyerror.
11355
fcc61800
PH
113562002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11357
158c687b 11358 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
11359 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11360 32-bit arithmetic.
11361 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11362
5683e9b2
AD
113632002-05-07 Akim Demaille <akim@epita.fr>
11364
11365 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11366 avoid GCC warnings.
11367
0c2d3f4c
AD
113682002-05-07 Akim Demaille <akim@epita.fr>
11369
11370 Kill GCC warnings.
11371
11372 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11373 over the RHS of each rule.
11374 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11375 * src/state.h (state_t): Member `nitems' is unsigned short.
11376 * src/LR0.c (get_state): Adjust.
11377 * src/reader.c (packgram): Likewise.
11378 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11379 `Type'.
11380 (muscle_insert_int_table): Remove, unused.
11381 (prepare_rules): Remove `max'.
11382
1565b720
AD
113832002-05-06 Akim Demaille <akim@epita.fr>
11384
11385 * src/closure.c (print_firsts): Display of the symbol tags.
11386 (bitmatrix_print): Move to...
11387 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11388 here.
11389 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11390
cfaee611
AD
113912002-05-06 Akim Demaille <akim@epita.fr>
11392
11393 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11394 hash_do_for_each.
11395
458be8e0
AD
113962002-05-06 Akim Demaille <akim@epita.fr>
11397
11398 * src/LR0.c (new_state, get_state): Instead of using the global
11399 `kernel_size' and `kernel_base', have two new arguments:
11400 `core_size' and `core'.
11401 Adjust callers.
11402
a900a624
AD
114032002-05-06 Akim Demaille <akim@epita.fr>
11404
11405 * src/reader.c (packgram): No longer end `ritem' with a 0
11406 sentinel: it is not used.
11407
d4e7d3a1
AD
114082002-05-05 Akim Demaille <akim@epita.fr>
11409
11410 New experimental feature: display the lookaheads in the report and
11411 graph.
11412
11413 * src/print (print_core): When --trace-flag, display the rules
11414 lookaheads.
11415 * src/print_graph.c (print_core): Likewise.
11416 Swap the arguments.
11417 Adjust caller.
11418
39ceb25b
AD
114192002-05-05 Akim Demaille <akim@epita.fr>
11420
11421 * tests/torture.at (Many lookaheads): New test.
11422
5372019f
AD
114232002-05-05 Akim Demaille <akim@epita.fr>
11424
11425 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11426 (GENERATE_MUSCLE_INSERT_TABLE): this.
11427 (output_int_table, output_unsigned_int_table, output_short_table)
11428 (output_token_number_table, output_item_number_table): Replace with...
11429 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11430 (muscle_insert_short_table, muscle_insert_token_number_table)
11431 (muscle_insert_item_number_table): these.
11432 Adjust all callers.
11433 (prepare_tokens): Don't free `translations', since...
11434 * src/reader.h, src/reader.c (grammar_free): do it.
11435 Move to...
11436 * src/gram.h, src/gram.c (grammar_free): here.
11437 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11438 b4_translate_max.
11439
5df5f6d5
AD
114402002-05-05 Akim Demaille <akim@epita.fr>
11441
11442 * src/output.c (output_unsigned_int_table): New.
11443 (prepare_rules): `i' is unsigned.
11444 `prhs', `rline', `r2' are unsigned int.
11445 Rename muscle `rhs_number_max' as `rhs_max'.
11446 Output muscles `prhs_max', `rline_max', and `r2_max'.
11447 Free rline and r1.
11448 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11449 to compute types instead of constant types.
11450 * tests/regression.at (Web2c Actions): Adjust.
11451
b87f8b21
AD
114522002-05-04 Akim Demaille <akim@epita.fr>
11453
11454 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11455 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11456 Adjust dependencies.
11457 * src/output.c (token_definitions_output): Be sure not to output a
11458 `#define 'a'' when fed with `%token 'a' "a"'.
11459 * tests/regression.at (Token definitions): New.
11460
8bb936e4
PE
114612002-05-03 Paul Eggert <eggert@twinsun.com>
11462
11463 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11464 for K&R C.
11465
114662002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11467
11468 * Makefile.am (SUBDIRS): Remove intl.
11469 (EXTRA_DIST): Add config/config.rpath.
11470
53c71a12
AD
114712002-05-03 Akim Demaille <akim@epita.fr>
11472
11473 * data/bison.simple (m4_if): Don't output empty enums.
11474 And actually, output valid enum definitions :(.
11475
289dd0cf
AD
114762002-05-03 Akim Demaille <akim@epita.fr>
11477
11478 * configure.bat: Remove, completely obsolete.
11479 * Makefile.am (EXTRA_DIST): Adjust.
11480 Don't distribute config.rpath...
11481 * config/Makefile.am (EXTRA_DIST): Do it.
11482
db85e524
AD
114832002-05-03 Akim Demaille <akim@epita.fr>
11484
11485 * configure.in (GETTEXT_VERSION): New.
11486 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11487
83ccf991
AD
114882002-05-03 Akim Demaille <akim@epita.fr>
11489
11490 * data/bison.simple (b4_token_enum): New.
11491 (b4_token_defines): Use it to output tokens both as #define and
11492 enums.
11493 Suggested by Paul Eggert.
11494 * src/output.c (token_definitions_output): Don't output spurious
11495 white spaces.
11496
1f418995
AD
114972002-05-03 Akim Demaille <akim@epita.fr>
11498
11499 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11500
45119f04
RA
115012002-05-02 Robert Anisko <robert@lrde.epita.fr>
11502
11503 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11504 Update the stack class, give a try to deque as the default container.
11505
b2d52318
AD
115062002-05-02 Akim Demaille <akim@epita.fr>
11507
11508 * data/bison.simple (yyparse): Do not implement @$ = @1.
11509 (YYLLOC_DEFAULT): Adjust to do it.
11510 * doc/bison.texinfo (Location Default Action): Fix.
11511
3a8b4109
AD
115122002-05-02 Akim Demaille <akim@epita.fr>
11513
11514 * src/reader.c (parse_braces): Merge into...
11515 (parse_action): this.
11516
84614e13
AD
115172002-05-02 Akim Demaille <akim@epita.fr>
11518
11519 * configure.in (ALL_LINGUAS): Remove.
11520 * po/LINGUAS, hr.po: New.
11521
fdbcd8e2
AD
115222002-05-02 Akim Demaille <akim@epita.fr>
11523
11524 Remove the so called hairy (semantic) parsers.
11525
11526 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11527 * src/gram.h, src/gram.c (semantic_parser): Remove.
11528 (rule_t): Remove the guard and guard_line members.
11529 * src/lex.h (token_t): remove tok_guard.
11530 * src/options.c (option_table): Remove %guard and %semantic_parser
11531 support.
11532 * src/output.c, src/output.h (guards_output): Remove.
11533 (prepare): Adjust.
11534 (token_definitions_output): Don't output the `T'
11535 tokens (???).
11536 (output_skeleton): Don't output the guards.
11537 * src/files.c, src/files.c (attrsfile): Remove.
11538 * src/reader.c (symbol_list): Remove the guard and guard_line
11539 members.
11540 Adjust dependencies.
11541 (parse_guard): Remove.
11542 * data/bison.hairy: Remove.
11543 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11544 BISON_HAIRY.
11545
82b6cb3f
AD
115462002-05-02 Akim Demaille <akim@epita.fr>
11547
11548 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11549 (parse_guard): Rename the formal argument `stack_offset' as
11550 `rule_length', which is more readable.
11551 Adjust callers.
11552 (copy_at, copy_dollar): Instead of outputting the hard coded
11553 values of $$, $n and so forth, output invocation to b4_lhs_value,
11554 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
11555 Note: this patch partially drops `semantic-parser' support: it
11556 always does `rule_length - n', where semantic parsers ought to
11557 always use `-n'.
82b6cb3f
AD
11558 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11559 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11560
6cbfbcc5
AD
115612002-05-02 Akim Demaille <akim@epita.fr>
11562
11563 * configure.in (AC_INIT): Bump to 1.49b.
11564 (AM_INIT_AUTOMAKE): Short invocation.
11565
b8548114
AD
115662002-05-02 Akim Demaille <akim@epita.fr>
11567
11568 Version 1.49a.
11569
c20cd1fa
AD
115702002-05-01 Akim Demaille <akim@epita.fr>
11571
11572 * src/skeleton.h: Remove.
11573
8a9566d4
AD
115742002-05-01 Akim Demaille <akim@epita.fr>
11575
11576 * src/skeleton.h: Fix the #endif.
11577 Reported by Magnus Fromreide.
11578
8c6d399a
PE
115792002-04-26 Paul Eggert <eggert@twinsun.com>
11580
11581 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11582 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 11583 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 11584
2b7ed18a
RA
115852002-04-25 Robert Anisko <robert@lrde.epita.fr>
11586
11587 * src/scan-skel.l: Postprocess quadrigraphs.
11588
11589 * src/reader.c (copy_character): New function, used to output
11590 single characters while replacing `[' and `]' with quadrigraphs, to
11591 avoid troubles with M4 quotes.
11592 (copy_comment): Output characters with copy_character.
11593 (read_additionnal_code): Likewise.
11594 (copy_string2): Likewise.
11595 (copy_definition): Likewise.
11596
11597 * tests/calc.at: Exercise M4 quoting.
11598
34a89c50
AD
115992002-04-25 Akim Demaille <akim@epita.fr>
11600
11601 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11602 between `!' and the command.
11603 Reported by Paul Eggert.
11604
0dd1580a
RA
116052002-04-24 Robert Anisko <robert@lrde.epita.fr>
11606
11607 * tests/calc.at: Exercise prologue splitting.
11608
11609 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11610 `b4_post_prologue' instead of `b4_prologue'.
11611
11612 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11613 muscles.
11614 (output): Free pre_prologue_obstack and post_prologue_obstack.
11615 * src/files.h, src/files.c (attrs_obstack): Remove.
11616 (pre_prologue_obstack, post_prologue_obstack): New.
11617 * src/reader.c (copy_definition): Add a parameter to specify the
11618 obstack to fill, instead of using attrs_obstack unconditionally.
11619 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11620 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11621
83c1796f
PE
116222002-04-23 Paul Eggert <eggert@twinsun.com>
11623
11624 * data/bison.simple: Remove unnecessary commentary and white
11625 space differences from 1_29-branch.
11626 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11627
11628 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11629 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11630 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11631 constructors or destructors.
11632
11633 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11634
1207eeac
AD
116352002-04-23 Akim Demaille <akim@epita.fr>
11636
11637 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11638 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11639 location with columns.
11640 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11641 All reported by Paul Eggert.
11642
78ab8f67
AD
116432002-04-22 Akim Demaille <akim@epita.fr>
11644
11645 * src/reduce.c (dump_grammar): Move to...
11646 * src/gram.h, src/gram.c (grammar_dump): here.
11647 Be sure to separate long item numbers.
11648 Don't read the members of a rule's prec if its nil.
11649
133c20e2
AD
116502002-04-22 Akim Demaille <akim@epita.fr>
11651
11652 * src/output.c (table_size, table_grow): New.
11653 (MAXTABLE): Remove, replace uses with table_size.
11654 (pack_vector): Instead of dying when the table is too big, grow it.
11655
9515e8a7
AD
116562002-04-22 Akim Demaille <akim@epita.fr>
11657
11658 * data/bison.simple (yyr1): Its type is that of a token number.
11659 * data/bison.c++ (r1_): Likewise.
11660 * tests/regression.at (Web2c Actions): Adjust.
11661
23c5a174
AD
116622002-04-22 Akim Demaille <akim@epita.fr>
11663
11664 * src/reader.c (token_translations_init): 256 is now the default
11665 value for the error token, i.e., it will be assigned another
11666 number if the user assigned 256 to one of her tokens.
11667 (reader): Don't force 256 to error.
11668 * doc/bison.texinfo (Symbols): Adjust.
11669 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11670 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11671 etc. instead of 10, 20, 30 (which was used to `jump' over error
11672 (256) and undefined (2)).
11673
5fbb0954
AD
116742002-04-22 Akim Demaille <akim@epita.fr>
11675
11676 Propagate more token_number_t.
11677
11678 * src/gram.h (token_number_as_item_number)
11679 (item_number_as_token_number): New.
11680 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11681 Use it to create output_item_number_table and
11682 output_token_number_table.
11683 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11684 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11685 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11686 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11687
4f940944
AD
116882002-04-22 Akim Demaille <akim@epita.fr>
11689
11690 * src/output.h, src/output.c (get_lines_number): Remove.
11691
3ded9a63
AD
116922002-04-19 Akim Demaille <akim@epita.fr>
11693
11694 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11695 as Lex/Flex'.
11696 (Debugging): More details about enabling the debugging features.
11697 (Table of Symbols): Describe $$, $n, @$, and @n.
11698 Suggested by Tim Josling.
11699
e0c471a9
AD
117002002-04-19 Akim Demaille <akim@epita.fr>
11701
11702 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11703
fecc10cd
AD
117042002-04-10 Akim Demaille <akim@epita.fr>
11705
11706 * src/system.h: Rely on HAVE_LIMITS_H.
11707 Suggested by Paul Eggert.
11708
51dec47b
AD
117092002-04-09 Akim Demaille <akim@epita.fr>
11710
11711 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11712 full stderr, and strip it according to the bison options, instead
11713 of composing the error message from different bits.
11714 This makes it easier to check for several error messages.
11715 Adjust all the invocations.
11716 Add an invocation exercising the error token.
11717 Add an invocation demonstrating a stupid error message.
11718 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11719 Adjust the tests.
11720 Error message are for stderr, not stdout.
11721
007a50a4
AD
117222002-04-09 Akim Demaille <akim@epita.fr>
11723
11724 * src/gram.h, src/gram.c (error_token_number): Remove, use
11725 errtoken->number.
11726 * src/reader.c (reader): Don't specify the user token number (2)
11727 for $undefined, as it uselessly prevents using it.
11728 * src/gram.h (token_number_t): Move to...
11729 * src/symtab.h: here.
11730 (state_t.number): Is a token_number_t.
11731 * src/print.c, src/reader.c: Use undeftoken->number instead of
11732 hard coded 2.
11733 (Even though this 2 is not the same as above: the number of the
11734 undeftoken remains being 2, it is its user token number which
11735 might not be 2).
11736 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11737 `user_token_number_max'.
11738 Output `undef_token_number'.
11739 * data/bison.simple, data/bison.c++: Use them.
11740 Be sure to map invalid yylex return values to
11741 `undef_token_number'. This saves us from gratuitous SEGV.
11742
11743 * tests/conflicts.at (Solved SR Conflicts)
11744 (Unresolved SR Conflicts): Adjust.
11745 * tests/regression.at (Web2c Actions): Adjust.
11746
06446ccf
AD
117472002-04-08 Akim Demaille <akim@epita.fr>
11748
11749 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11750 Adding #line.
11751 Remove the duplicate `typedefs'.
11752 (RhsNumberType): Fix the declaration and various other typos.
11753 Use __ofile__.
11754 * data/bison.simple: Use __ofile__.
11755 * src/scan-skel.l: Handle __ofile__.
11756
62a3e4f0
AD
117572002-04-08 Akim Demaille <akim@epita.fr>
11758
11759 * src/gram.h (item_number_t): New, the type of item numbers in
11760 RITEM. Note that it must be able to code symbol numbers as
11761 positive number, and the negation of rule numbers as negative
11762 numbers.
11763 Adjust all dependencies (pretty many).
11764 * src/reduce.c (rule): Remove this `short *' pointer: use
11765 item_number_t.
11766 * src/system.h (MINSHORT, MAXSHORT): Remove.
11767 Include `limits.h'.
11768 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11769 (shortcpy): Remove.
11770 (MAXTABLE): Move to...
11771 * src/output.c (MAXTABLE): here.
11772 (prepare_rules): Use output_int_table to output rhs.
11773 * data/bison.simple, data/bison.c++: Adjust.
11774 * tests/torture.at (Big triangle): Move the limit from 254 to
11775 500.
11776 * tests/regression.at (Web2c Actions): Ajust.
11777
11778 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11779 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11780 passes, but produces negative #line number, once fixed, GCC is
11781 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11782 C), it passes.
11783 * src/state.h (state_h): Code input lines on ints, not shorts.
11784
bb88b0fc
AD
117852002-04-08 Akim Demaille <akim@epita.fr>
11786
11787 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11788 and then the grammar.
11789
9a636f47
AD
117902002-04-08 Akim Demaille <akim@epita.fr>
11791
11792 * src/system.h: No longer using strndup.
11793
680e8701
AD
117942002-04-07 Akim Demaille <akim@epita.fr>
11795
11796 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11797 * src/output.c (output_table_data): Return the longest number.
11798 (prepare_tokens): Output `token_number_max').
11799 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11800 New.
11801 Use them to define yy_token_number_type/TokenNumberType.
11802 Use this type for yytranslate.
11803 * tests/torture.at (Big triangle): Push the limit from 124 to
11804 253.
11805 * tests/regression.at (Web2c Actions): Adjust.
11806
817e9f41
AD
118072002-04-07 Akim Demaille <akim@epita.fr>
11808
11809 * tests/torture.at (Big triangle): New.
11810 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11811 * tests/existing.at: here.
11812
5123689b
AD
118132002-04-07 Akim Demaille <akim@epita.fr>
11814
11815 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11816 nritems.
11817 Adjust dependencies.
11818
f3849179
AD
118192002-04-07 Akim Demaille <akim@epita.fr>
11820
11821 * src/reader.c: Normalize increments to prefix form.
11822
bd02036a
AD
118232002-04-07 Akim Demaille <akim@epita.fr>
11824
11825 * src/reader.c, symtab.c: Remove debugging code.
11826
db8837cb
AD
118272002-04-07 Akim Demaille <akim@epita.fr>
11828
11829 Rename all the `bucket's as `symbol_t'.
11830
11831 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11832 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11833 * src/symtab.c, src/symtab.h (bucket): Rename as...
11834 (symbol_t): this.
11835 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11836 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11837 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11838 (buckets_new, buckets_free, buckets_do): Rename as...
11839 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11840 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11841 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11842 (symbols_new, symbols_free, symbols_do): these.
11843
72a23c97
AD
118442002-04-07 Akim Demaille <akim@epita.fr>
11845
11846 Use lib/hash for the symbol table.
11847
11848 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11849 EOF.
11850 * src/lex.c (lex): Set the `number' member of new terminals.
11851 * src/reader.c (bucket_check_defined, bucket_make_alias)
11852 (bucket_check_alias_consistence, bucket_translation): New.
11853 (reader, grammar_free, readgram, token_translations_init)
11854 (packsymbols): Adjust.
11855 (reader): Number the predefined tokens.
11856 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11857 for predefined tokens.
11858 * src/symtab.h (bucket): Remove all the hash table related
11859 members.
11860 * src/symtab.c (symtab): Replace by...
11861 (bucket_table): this.
11862 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11863 (buckets_new, buckets_do): New.
11864
280a38c3
AD
118652002-04-07 Akim Demaille <akim@epita.fr>
11866
11867 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11868 (start_symbol, max_user_token_number, semantic_parser)
11869 (error_token_number): Initialize.
11870 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11871 Initialize.
11872 (reader): Don't.
11873 (errtoken, eoftoken, undeftoken, axiom): Extern.
11874
03b31c0c
AD
118752002-04-07 Akim Demaille <akim@epita.fr>
11876
11877 * src/gram.h (rule_s): prec and precsym are now pointers
11878 to the bucket giving the priority/associativity.
11879 Member `associativity' removed: useless.
11880 * src/reduce.c, src/conflicts.c: Adjust.
11881
8b3df748
AD
118822002-04-07 Akim Demaille <akim@epita.fr>
11883
11884 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11885 Properly escape the symbols' TAG when outputting them.
11886
e601aa1d
AD
118872002-04-07 Akim Demaille <akim@epita.fr>
11888
11889 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11890
b0299a2e
AD
118912002-04-07 Akim Demaille <akim@epita.fr>
11892
11893 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11894 (LArule): this, which is an array to rule_t*.
11895 * src/print.c, src/conflicts.c: Adjust.
11896
d7e1f00c
AD
118972002-04-07 Akim Demaille <akim@epita.fr>
11898
11899 * src/gram.h (rule_t): Rename `number' as `user_number'.
11900 `number' is a new member.
11901 Adjust dependencies.
11902 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11903
cc9305dd
AD
119042002-04-07 Akim Demaille <akim@epita.fr>
11905
11906 As a result of the previous patch, it is no longer needed
11907 to reorder ritem itself.
11908
11909 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11910
b0940840
AD
119112002-04-07 Akim Demaille <akim@epita.fr>
11912
11913 Be sure never to walk through RITEMS, but use only data related to
11914 the rules themselves. RITEMS should be banished.
11915
11916 * src/output.c (output_token_translations): Rename as...
11917 (prepare_tokens): this.
11918 In addition to `translate', prepare the muscles `tname' and
11919 `toknum', which were handled by...
11920 (output_rule_data): this.
11921 Remove, and move the remainder of its outputs into...
11922 (prepare_rules): this new routines, which also merges content from
11923 (output_gram): this.
11924 (prepare_rules): Be sure never to walk through RITEMS.
11925 (output_stos): Rename as...
11926 (prepare_stos): this.
11927 (output): Always invoke prepare_states, after all, just don't use it
11928 in the output if you don't need it.
11929
643a5994
AD
119302002-04-07 Akim Demaille <akim@epita.fr>
11931
11932 * src/LR0.c (new_state): Display `nstates' as the name of the
11933 newly created state.
11934 Adjust to initialize first_state and last_state if needed.
11935 Be sure to distinguish the initial from the final state.
11936 (new_states): Create the itemset of the initial state, and use
11937 new_state.
11938 * src/closure.c (closure): Now that the initial state has its
11939 items properly set, there is no need for a special case when
11940 creating `ruleset'.
11941
11942 As a result, now the rule 0, reducing to $axiom, is visible in the
11943 outputs. Adjust the test suite.
11944
11945 * tests/conflicts.at (Solved SR Conflicts)
11946 (Unresolved SR Conflicts): Adjust.
11947 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11948 * tests/conflicts.at (S/R in initial): New.
11949
b4c4ccc2
AD
119502002-04-07 Akim Demaille <akim@epita.fr>
11951
11952 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11953 the RHS of the rules.
11954 * src/output.c (output_gram): Likewise.
11955
bba97eb2
AD
119562002-04-07 Akim Demaille <akim@epita.fr>
11957
11958 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11959 bucket.
11960 Adjust all dependencies.
11961 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11962 `number' of the buckets too.
11963 * src/gram.h: Include `symtab.h'.
11964 (associativity): Move to...
11965 * src/symtab.h: here.
11966 No longer include `gram.h'.
11967
c3b407f4
AD
119682002-04-07 Akim Demaille <akim@epita.fr>
11969
11970 * src/gram.h, src/gram.c (rules_rhs_length): New.
11971 (ritem_longest_rhs): Use it.
11972 * src/gram.h (rule_t): `number' is a new member.
11973 * src/reader.c (packgram): Set it.
11974 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11975 the end of `rules', and count them out of `nrules'.
11976 (reduce_output, dump_grammar): Adjust.
11977 * src/print.c (print_grammar): It is no longer needed to check for
11978 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11979 * tests/reduce.at (Reduced Automaton): New test.
11980
11652ab3
AD
119812002-04-07 Akim Demaille <akim@epita.fr>
11982
11983 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11984 lacking `+ 1' to nrules, Bison reported as useless a token if it
11985 was used solely to set the precedence of the last rule...
11986
26b23c1a
AD
119872002-04-07 Akim Demaille <akim@epita.fr>
11988
11989 * data/bison.c++, data/bison.simple: Don't output the current file
11990 name in #line, to avoid useless diffs between two identical
11991 outputs under different names.
11992
18bcecb0
AD
119932002-04-07 Akim Demaille <akim@epita.fr>
11994
11995 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11996 Normalize loops to using `< nrules + 1', not `<= nrules'.
11997
fa770c86
AD
119982002-04-07 Akim Demaille <akim@epita.fr>
11999
12000 * TODO: Update.
12001
d9b739c3
AD
120022002-04-07 Akim Demaille <akim@epita.fr>
12003
12004 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
12005 bucket.value as bucket.number.
12006
99013900
AD
120072002-04-07 Akim Demaille <akim@epita.fr>
12008
12009 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
12010 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12011 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
12012 RHS, instead of being an index in RITEMS.
12013
e966383b
PE
120142002-04-04 Paul Eggert <eggert@twinsun.com>
12015
12016 * doc/bison.texinfo: Update copyright date.
12017 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
12018 (Symbols): Warn about running Bison in one character set,
12019 but compiling and/or running in an incompatible one.
12020 Warn about character code 256, too.
12021
120222002-04-03 Paul Eggert <eggert@twinsun.com>
12023
12024 * src/bison.data (YYSTACK_ALLOC): Depend on whether
12025 YYERROR_VERBOSE is nonzero, not whether it is defined.
12026
12027 Merge changes from bison-1_29-branch.
c307773e 12028
8d6c48b9
PE
120292002-03-20 Paul Eggert <eggert@twinsun.com>
12030
12031 Merge fixes from Debian bison_1.34-1.diff.
12032
12033 * configure.in (AC_PREREQ): 2.53.
12034
e53c6322
AD
120352002-03-20 Akim Demaille <akim@epita.fr>
12036
12037 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12038
9ffbeca7
PE
120392002-03-19 Paul Eggert <eggert@twinsun.com>
12040
21db0b2a
PE
12041 * src/bison.simple (YYCOPY): New macro.
12042 (YYSTACK_RELOCATE): Use it.
12043 Remove Type arg; no longer needed. All callers changed.
12044 (yymemcpy): Remove; no longer needed.
12045
9ffbeca7
PE
12046 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12047 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12048
642cb8f8
AD
120492002-03-19 Akim Demaille <akim@epita.fr>
12050
12051 Test and fix the #line outputs.
12052
12053 * tests/atlocal.at (GCC): New.
12054 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 12055 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
12056 (Action synch line, Epilogue synch line): New tests.
12057 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12058 * data/bison.simple, data/bison.c++: Use it.
12059
3c31a486
AD
120602002-03-19 Akim Demaille <akim@epita.fr>
12061
12062 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12063 (Solved SR Conflicts, %expect not enough, %expect right)
12064 (%expect too much): Move to...
12065 * tests/conflicts.at: this new file.
12066
0d8bed56
AD
120672002-03-19 Akim Demaille <akim@epita.fr>
12068
12069 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12070 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12071 that we can move to enums for instance.
12072 * src/output.c (token_definitions_output): Output a list of
12073 `token-name, token-number' instead of the #define.
12074 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12075
9208d17f
AD
120762002-03-14 Akim Demaille <akim@epita.fr>
12077
12078 Use Gettext 0.11.1.
12079
af27eacb
RA
120802002-03-09 Robert Anisko <robert@lrde.epita.fr>
12081
12082 * data/bison.c++: Make the user able to add members to the generated
12083 parser by subclassing.
12084
9101a310
RA
120852002-03-05 Robert Anisko <robert@lrde.epita.fr>
12086
12087 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12088 a character.
12089 Reported by Nicolas Tisserand and Nicolas Burrus.
12090
fff9bf0b
RA
120912002-03-04 Robert Anisko <robert@lrde.epita.fr>
12092
12093 * src/reader.c: Warn about lacking semi-colons, do not complain.
12094
64dba31e
RA
120952002-03-04 Robert Anisko <robert@lrde.epita.fr>
12096
12097 * data/bison.c++: Remove a debug line.
12098
374f5a14
RA
120992002-03-04 Robert Anisko <robert@lrde.epita.fr>
12100
12101 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12102 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12103 provide a default implementation.
12104
bfcf1f3a
AD
121052002-03-04 Akim Demaille <akim@epita.fr>
12106
12107 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12108 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12109 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12110 * tests/semantic.at (Parsing Guards): Similarly.
12111 * src/reader.at (readgram): Complain if the last rule is not ended
12112 with a semi-colon.
12113
65ccf9fc
AD
121142002-03-04 Akim Demaille <akim@epita.fr>
12115
12116 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12117 * src/closure.c: here.
12118 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12119 RTC.
12120 * src/warshall.h, src/warshall.c: Remove.
12121 * tests/sets.at (Broken Closure): Adjust.
12122
d0039cbc
AD
121232002-03-04 Akim Demaille <akim@epita.fr>
12124
12125 * src/output.c (output_skeleton): tempdir is const.
12126 bytes_read is unused.
12127
345cea78
AD
121282002-03-04 Akim Demaille <akim@epita.fr>
12129
12130 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12131 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12132 Update.
12133 From Michael Hayes.
12134
564801f7
AD
121352002-03-04 Akim Demaille <akim@epita.fr>
12136
12137 * src/closure.c (closure): `r' is unused.
12138
e5352bc7
AD
121392002-03-04 Akim Demaille <akim@epita.fr>
12140
12141 * tests/sets.at (Broken Closure): Add the ending `;'.
12142 * src/reader.at (readgram): Complain if a rule is not ended with a
12143 semi-colon.
12144
914feea9
AD
121452002-03-04 Akim Demaille <akim@epita.fr>
12146
12147 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12148 (count_sr_conflicts): Use bitset_count.
12149 * src/reduce.c (inaccessable_symbols): Ditto.
12150 (bits_size): Remove.
12151 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12152
f0250de6
AD
121532002-03-04 Akim Demaille <akim@epita.fr>
12154
12155 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12156 * src/reduce.c: Remove the `bitset_zero's following the
12157 `bitset_create's, as now it is performed by the latter.
12158
ef017502
AD
121592002-03-04 Akim Demaille <akim@epita.fr>
12160
12161 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12162 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12163 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12164 latest sources from Michael.
12165
76514394
AD
121662002-03-04 Akim Demaille <akim@epita.fr>
12167
12168 * src/output.c (output): Don't free the grammar.
12169 * src/reader.c (grammar_free): New.
12170 * src/main.c (main): Call it and don't free symtab here.
12171
55024580
AD
121722002-03-04 Akim Demaille <akim@epita.fr>
12173
12174 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12175 before returning.
12176 Reported by Benoit Perrot.
12177
f9abaa2c
AD
121782002-03-04 Akim Demaille <akim@epita.fr>
12179
12180 Use bitset operations when possible, not loops over bits.
12181
12182 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12183 bitset_or.
12184 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12185 * src/reduce.c (useless_nonterminals): Formatting changes.
12186 * src/warshall.c (TC): Use bitset_or.
12187
0e721e75
AD
121882002-03-04 Akim Demaille <akim@epita.fr>
12189
12190 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12191 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12192 Ditto.
12193
0fb1ffb1
AD
121942002-03-04 Akim Demaille <akim@epita.fr>
12195
12196 * src/lalr.c (F): Now a bitset*.
12197 Adjust all dependencies.
12198
b86796bf
AD
121992002-03-04 Akim Demaille <akim@epita.fr>
12200
12201 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12202 Adjust all dependencies.
12203
602bbf31
AD
122042002-03-04 Akim Demaille <akim@epita.fr>
12205
12206 * src/L0.c, src/LR0.h (nstates): Be size_t.
12207 Adjust comparisons (signed vs unsigned).
12208 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12209 bitset*.
12210 Adjust all dependencies.
12211
d8a0245c
AD
122122002-03-04 Akim Demaille <akim@epita.fr>
12213
12214 * src/closure.c (firsts): Now, also a bitset.
12215 Adjust all dependencies.
12216 (varsetsize): Remove, now unused.
12217 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12218
34ba9743
AD
122192002-03-04 Akim Demaille <akim@epita.fr>
12220
12221 * src/print.c: Convert to use bitset.h, not hand coded iterations
12222 over ints.
12223
ed86e78c
AD
122242002-03-04 Akim Demaille <akim@epita.fr>
12225
12226 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12227
dfdb1797
AD
122282002-03-04 Akim Demaille <akim@epita.fr>
12229
12230 * src/closure.c (ruleset): Be a bitset.
12231 (rulesetsize): Remove.
12232
7086e707
AD
122332002-03-04 Akim Demaille <akim@epita.fr>
12234
12235 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12236 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12237 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12238 * src/closure.c (fderives): Be an array of bitsets.
12239
98254360
RA
122402002-02-28 Robert Anisko <robert@lrde.epita.fr>
12241
12242 * data/bison.c++: Merge the two generated headers. Insert a copyright
12243 notice in each output file.
12244
a75c057f
AD
122452002-02-28 Akim Demaille <akim@epita.fr>
12246
12247 * data/bison.c++: Copy the prologue of bison.simple to fetch
12248 useful M4 definitions, such as b4_header_guard.
12249
06b00abc
AD
122502002-02-25 Akim Demaille <akim@epita.fr>
12251
12252 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
12253 translator friendly scheme for the bgr
12254 copyright notice.
06b00abc 12255
70e7d534
AD
122562002-02-25 Akim Demaille <akim@epita.fr>
12257
12258 * src/output.c (header_output): Remove, now handled completely via
12259 M4.
12260
abe017f6
AD
122612002-02-25 Akim Demaille <akim@epita.fr>
12262
12263 * m4/m4.m4: New, from CVS Autoconf.
12264 * configure.in: Invoke it.
12265 * src/output.c (output_skeleton): Use its result instead of the
12266 hard coded name.
12267
381fb12e
AD
122682002-02-25 Akim Demaille <akim@epita.fr>
12269
12270 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12271 Fileutils 4.1.5.
12272 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12273 * src/output.c (output_skeleton): Use mkstemp to create a real
12274 temporary file.
12275 Move the filling of `skeleton' and its muscle to...
12276 (prepare): here.
12277 (output): Move the definition of the prologue muscle to...
12278 (prepare): here.
12279 * src/system.h (DEFAULT_TMPDIR): New.
12280
6f38107f
PE
122812002-02-14 Paul Eggert <eggert@twinsun.com>
12282
12283 Remove the support for C++ namespace cleanliness; it was
12284 causing more problems than it was curing, since it didn't work
12285 properly on some nonstandard C++ compilers. This can wait
12286 for a proper C++ parser.
12287
12288 * NEWS: Document this.
12289 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12290 of C++, as it's treated like C now.
12291 * src/bison.simple (YYSTD): Remove.
12292 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12293 Treat C++ just like Standard C instead of trying to support
12294 namespace cleanliness.
12295
80cce3da
AD
122962002-02-14 Akim Demaille <akim@epita.fr>
12297
12298 * tests/regression.at (else): Adjust to Andreas' change.
12299
842e8679
AD
123002002-02-14 Akim Demaille <akim@epita.fr>
12301
12302 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12303
4bda3f10
AD
123042002-02-13 Andreas Schwab <schwab@suse.de>
12305
12306 * src/output.c (output_rule_data): Don't output NULL, it might
12307 not be defined yet.
12308
4162fa07 123092002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 12310
4162fa07
RA
12311 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12312 (Copyright notice): Update.
b418ecd8 12313
bd16a5dc
AD
123142002-02-11 Akim Demaille <akim@epita.fr>
12315
12316 * tests/regression.at (%nonassoc and eof): Don't include
12317 nonportable headers.
12318
8d69a1a3
RA
123192002-02-08 Robert Anisko <robert@lrde.epita.fr>
12320
12321 * data/bison.c++: Correct error recovery. Make the user able to
12322 initialize the starting location.
12323
9b2d0677
AD
123242002-02-07 Akim Demaille <akim@epita.fr>
12325
12326 * tests/input.at: New.
12327
69e2658b
RA
123282002-02-07 Robert Anisko <robert@lrde.epita.fr>
12329
12330 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 12331 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
12332 directives around tables only needed for debugging.
12333
4aacc3a7
RA
123342002-02-07 Robert Anisko <robert@lrde.epita.fr>
12335
12336 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12337 C++ parsers.
12338 (yy::b4_name::parse): Use print_.
12339
762a801e
RA
123402002-02-07 Robert Anisko <robert@lrde.epita.fr>
12341
12342 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12343
4bb2bc3f
RA
123442002-02-07 Robert Anisko <robert@lrde.epita.fr>
12345
12346 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12347 C++ parsers.
12348 (yy::b4_name::parse): Build verbose error messages, and use error_.
12349
6b45a3ca
RA
123502002-02-06 Robert Anisko <robert@lrde.epita.fr>
12351
12352 * data/bison.c++: Fix m4 quoting in comments.
12353
50997c6e
RA
123542002-02-06 Robert Anisko <robert@lrde.epita.fr>
12355
12356 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12357 not expanded by m4.
12358
3f3eed27
AD
123592002-02-05 Akim Demaille <akim@epita.fr>
12360
12361 * data/bison.c++: Adjust to the M4 back end.
12362 More is certainly needed.
12363
be2a1a68
AD
123642002-02-05 Akim Demaille <akim@epita.fr>
12365
12366 Give a try to M4 as a back end.
12367
12368 * lib/readpipe.c: New, from wdiff.
12369 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12370 BISON_HAIRY.
12371 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12372 specific values. Now it is m4 that performs the lookup.
12373 * src/parse-skel.y: Remove.
12374 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12375 * src/output.c (actions_output, guards_output)
12376 (token_definitions_output): No longer keeps track of the output
12377 line number, hence remove the second argument.
12378 (guards_output): Check against the guard member of a rule, not the
12379 action member.
12380 Adjust callers.
12381 (output_skeleton): Don't look for the skeleton location, let m4 do
12382 that.
12383 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12384 file will be used.
12385 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12386 (prepare): Given that for the time being changesyntax is not
12387 usable in M4, rename the muscles using `-' to `_'.
12388 Define `defines_flag', `output_parser_name' and `output_header_name'.
12389 * src/output.h (actions_output, guards_output)
12390 (token_definitions_output): Adjust prototypes.
12391 * src/scan-skel.l: Instead of scanning the skeletons, it now
12392 processes the output of m4: `__oline__' and `#output'.
12393 * data/bison.simple: Adjust to be used by M4(sugar).
12394 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12395 to date.
12396 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12397 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12398 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12399 shamelessly stolen from CVS Autoconf.
12400
beda758b
AD
124012002-02-05 Akim Demaille <akim@epita.fr>
12402
12403 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12404 * configure.in: Check for the declarations of free and malloc.
12405 * src/muscle_tab.c: Adjust.
12406
5ece6d43
AD
124072002-02-05 Akim Demaille <akim@epita.fr>
12408
12409 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12410 which have no values.
12411
5bb18f9a
AD
124122002-02-05 Akim Demaille <akim@epita.fr>
12413
12414 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12415 * data/: here.
12416
894dd62e
PE
124172002-01-29 Paul Eggert <eggert@twinsun.com>
12418
12419 * src/bison.simple (YYSIZE_T): Do not define merely because
12420 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12421 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12422
82841af7
AD
124232002-01-27 Akim Demaille <akim@epita.fr>
12424
12425 Fix `%nonassoc and eof'.
12426
12427 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12428 which were not properly copied! Replace
12429 memcpy (res->errs, src->errs, src->nerrs);
12430 with
12431 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12432 !!!
12433 * tests/regression.at (%nonassoc and eof): Adjust to newest
12434 Autotest: `.' is not in the PATH.
12435
318b76e9
AD
124362002-01-27 Akim Demaille <akim@epita.fr>
12437
12438 * tests/sets.at (AT_EXTRACT_SETS): New.
12439 (Nullable): Use it.
12440 (Firsts): New.
12441
30d2f3d5
AD
124422002-01-26 Akim Demaille <akim@epita.fr>
12443
12444 * tests/actions.at, tests/calc.at, tests/headers.at,
12445 * tests/torture.at: Adjust to the newest Autotest which no longer
12446 forces `.' in the PATH.
12447
30f8c395
AD
124482002-01-25 Akim Demaille <akim@epita.fr>
12449
12450 * tests/regression.at (%nonassoc and eof): New.
12451 Suggested by Robert Anisko.
12452
29ae55f1
AD
124532002-01-24 Akim Demaille <akim@epita.fr>
12454
12455 Bison dumps core when trying to complain about broken input files.
12456 Reported by Cris van Pelt.
12457
12458 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12459 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12460 into...
12461 (Invalid inputs): Strengthen: exercise parse_percent_token.
12462
2b548aa6
RA
124632002-01-24 Robert Anisko <robert.anisko@epita.fr>
12464
12465 * src/Makefile.am: Add bison.c++.
12466 * src/bison.c++: New skeleton.
12467
bb0146c2
AD
124682002-01-21 Paolo Bonzini <bonzini@gnu.org>
12469
12470 * po/it.po: New.
12471
bec30531
AD
124722002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12473
12474 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12475
fc6edc45
MA
124762002-01-20 Marc Autret <marc@gnu.org>
12477
12478 * src/files.c (compute_output_file_names): Fix
12479
5e5d5415
MA
124802002-01-20 Marc Autret <marc@gnu.org>
12481
12482 * tests/output.at: New test.
12483 * src/files.c (compute_base_names): Don't map extensions when
12484 the YACC flag is set, use defaults.
12485 Reported by Evgeny Stambulchik.
12486
44ea3fbd
MA
124872002-01-20 Marc Autret <marc@gnu.org>
12488
ba0fe3c7
PE
12489 * src/system.h: Need to define __attribute__ away for non-GCC
12490 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
12491 Suggested by Albert Chin-A-Young.
12492
338963d1
TVH
124932002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12494
12495 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12496 canonical definition.
12497 * src/system.h: Use the canonical definition for PARAMS (avoids
12498 a conflict with the macro from lib/hash.h).
12499
c57b2479
AD
125002002-01-11 Akim Demaille <akim@epita.fr>
12501
12502 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 12503 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 12504
b85810ae
AD
125052002-01-09 Akim Demaille <akim@epita.fr>
12506
12507 * src/files.c, src/files.h (output_infix): New.
12508 (tab_extension): Remove.
12509 (compute_base_names): Compute the former, drop the latter.
12510 * src/output.c (prepare): Insert the muscles `output-infix', and
12511 `output-suffix'.
12512 * src/parse-skel.y (string, string.1): New.
12513 (section.header): Use it.
12514 (section.yacc): Remove.
12515 (prefix): Remove too.
12516 * src/scan-skel.l: Adjust.
12517 * src/bison.simple, src/bison.hairy: Adjust.
12518
cae60122
AD
125192002-01-09 Akim Demaille <akim@epita.fr>
12520
12521 * configure.in (WERROR_CFLAGS): Compute it.
12522 * src/Makefile.am (CFLAGS): Pass it.
12523 * tests/atlocal.in (CFLAGS): Idem.
12524 * src/files.c: Fix a few warnings.
12525 (get_extension_index): Remove, unused.
12526
ae404801
AD
125272002-01-08 Akim Demaille <akim@epita.fr>
12528
12529 * src/getargs.c (AS_FILE_NAME): New.
12530 (getargs): Use it to convert DOSish file names.
12531 * src/files.c (base_name): Rename as full_base_name to avoid
12532 clashes with `base_name ()'.
12533 (filename_split): New.
12534 (compute_base_names): N-th rewrite, using filename_split.
12535
22312b71
AD
125362002-01-08 Akim Demaille <akim@epita.fr>
12537
12538 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12539 New, stolen from the Fileutils 4.1.
12540 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12541 * configure.in: Check for the presence of memrchr, and of its
12542 prototype.
12543
a67cef01
TVH
125442002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12545
12546 * lib/hash.h (__P): Added definition for this macro.
12547 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12548 BUILT_SOURCES, to ensure they are generated first.
12549 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12550 %error-verbose to allow bootstrapping with bison 1.30x.
12551
2b25d624
AD
125522002-01-06 Akim Demaille <akim@epita.fr>
12553
12554 * src/reader.c (parse_braces): Don't fetch the next char, the
12555 convention is to fetch on entry.
12556 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12557 'switch' without a following semicolon.
12558 * tests/regression.at (braces parsing): New.
12559
3460813b
AD
125602002-01-06 Akim Demaille <akim@epita.fr>
12561
12562 Bison is dead wrong in its RR conflict reports.
12563
12564 * tests/torture.at (GNU Cim Grammar): New.
12565 * src/conflicts.c (count_rr_conflicts): Fix.
12566
73784c64
AD
125672002-01-06 Akim Demaille <akim@epita.fr>
12568
12569 Creating package.m4 from configure.ac causes too many problems.
12570
12571 * tests/Makefile.am (package.m4): Create it by hand,
12572 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12573
25d81090
AD
125742002-01-06 Akim Demaille <akim@epita.fr>
12575
12576 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12577 skeleton.h.
12578
a9b8959e
PE
125792002-01-04 Paul Eggert <eggert@twinsun.com>
12580
12581 * doc/bison.texinfo (Debugging):
12582 Remove YYSTDERR; it's no longer defined or used.
12583 Also, s/cstdio.h/cstdio/.
12584
25d81090
AD
125852002-01-03 Akim Demaille <akim@epita.fr>
12586
12587 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12588
1109455c
AD
125892002-01-03 Akim Demaille <akim@epita.fr>
12590
12591 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12592 tracing code to --trace, wait for a better --trace option, with
12593 args.
12594
7ea5e977
AD
125952002-01-03 Akim Demaille <akim@epita.fr>
12596
12597 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12598 The ISO C++ standard is extremely clear about it: stderr is
12599 considered a macro, not a regular symbol (see table 94 `Header
12600 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12601 Therefore std:: does not apply to it. It still does with fprintf.
12602 Also, s/cstdio.h/cstdio/.
12603
fab5b110
AD
126042002-01-03 Akim Demaille <akim@epita.fr>
12605
12606 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12607 for non system headers.
12608
aed7fd9b
AD
126092002-01-02 Akim Demaille <akim@epita.fr>
12610
12611 Equip the skeleton chain with location tracking, runtime trace,
12612 pure parser and scanner.
12613
12614 * src/parse-skel.y: Request a pure parser, locations, and prefix
12615 renaming.
12616 (%union): Having several members with the same type does not help
12617 type mismatches, simplify.
12618 (YYPRINT, yyprint): New.
12619 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12620 (skel_error): this.
12621 Handle locations.
12622 * src/scan-skel.l: Adjust to these changes.
12623 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12624 (LOCATION_PRINT, skel_control_t): New.
12625
24fad99e
AD
126262001-12-30 Akim Demaille <akim@epita.fr>
12627
12628 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12629 replace `gb' with BLANKS.
12630 * src/scan-skel.l: Adjust.
12631
a4b36db4
AD
126322001-12-30 Akim Demaille <akim@epita.fr>
12633
12634 * src/system.h: We don't need nor want bcopy.
12635 Throw away MS-DOS crap: we don't need getpid.
12636 * configure.in: We don't need strndup. It was even causing
12637 problems: because Flex includes the headers *before* us,
12638 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12639 not visible.
12640 * lib/xstrndup.c: New.
12641 * src/scan-skel.l: Use it.
12642 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12643 * src/parse-skel.y: Use %directives instead of #defines.
12644
1239777d
AD
126452001-12-30 Akim Demaille <akim@epita.fr>
12646
12647 * src/skeleton.h: New.
12648 * src/output.c (output_parser, output_master_parser): Remove, dead
12649 code.
12650 * src/output.h (get_lines_number, actions_output, guards_output)
12651 (token_definitions_output): Prototype them.
12652 * src/parse-skel.y: Add the license notice.
12653 Include output.h and skeleton.h.
12654 (process_skeleton): Returns void, and takes a single parameter.
12655 * src/scan-skel.l: Add the license notice.
12656 Include skeleton.h.
12657 Don't use %option yylineno: it seems that then Flex imagines
12658 REJECT has been used, and therefore it won't reallocate its
12659 buffers (which makes no other sense to me than a bug). It results
12660 in warnings for `unused: yy_flex_realloc'.
12661
9b3add5b
RA
126622001-12-30 Robert Anisko <robert.anisko@epita.fr>
12663
12664 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12665 (MUSCLE_INSERT_PREFIX): ...to there.
12666 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12667 (MUSCLE_INSERT_PREFIX): Move from here...
12668
12669 * src/bison.hairy: Add a section directive. Put braces around muscle
12670 names. This parser skeleton is still broken, but Bison should not
12671 choke on a bad muscle 'syntax'.
12672 * src/bison.simple: Add a section directive. Put braces around muscle
12673 names.
12674
12675 * src/files.h (strsuffix, stringappend): Add declarations.
12676 (tab_extension): Add declaration.
12677 (short_base_name): Add declaration.
12678
12679 * src/files.c (strsuffix, stringappend): No longer static. These
12680 functions are used in the skeleton parser.
12681 (tab_extension): New.
12682 (compute_base_names): Use the computations done in this function
fab5b110 12683 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
12684 names.
12685 (short_base_name): No longer static.
12686
12687 * src/output.c (output_skeleton): New.
12688 (output): Disable call to output_master_parser, and give a try to
12689 a new skeleton handling system.
12690 (guards_output, actions_output): No longer static.
12691 (token_definitions_output, get_lines_number): No longer static.
12692
12693 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12694
fab5b110 12695 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
12696 parse-skel.y.
12697
12698 * src/parse-skel.y: New file.
12699 * src/scan-skel.l: New file.
12700
b5b61c61
AD
127012001-12-29 Akim Demaille <akim@epita.fr>
12702
12703 %name-prefix is broken.
12704
12705 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12706 Adjust all dependencies.
12707 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12708 %name-prefix.
12709
12710 Renaming yylval but not yylloc is not consistent. Now we do.
12711
12712 * src/bison.simple: Prefix yylloc if used.
12713 * doc/bison.texinfo (Decl Summary): Document that.
12714
8c9a50be
AD
127152001-12-29 Akim Demaille <akim@epita.fr>
12716
12717 * doc/bison.texinfo: Promote `%long-directive' over
12718 `%long_directive'.
12719 Remove all references to fixed-output-files, yacc is enough.
12720
d99361e6
AD
127212001-12-29 Akim Demaille <akim@epita.fr>
12722
12723 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12724 user prologue. These are defaults.
12725 * tests/actions.at (Mid-rule actions): Make sure the user can
12726 define YYDEBUG and YYERROR_VERBOSE.
12727
b9cecb91
AD
127282001-12-29 Akim Demaille <akim@epita.fr>
12729
12730 * src/output.c (header_output): Don't forget to export YYLTYPE and
12731 yylloc.
12732 * tests/headers.at (export YYLTYPE): New, make sure it does.
12733 * tests/regression.at (%union and --defines, Invalid CPP headers):
12734 Move to...
12735 * tests/headers.at: here.
12736
aea13e97
AD
127372001-12-29 Akim Demaille <akim@epita.fr>
12738
12739 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12740
931394cb
AD
127412001-12-29 Akim Demaille <akim@epita.fr>
12742
12743 * tests/actions.at (Mid-rule actions): Output on a single line
12744 instead of several.
12745
704a47c4
AD
127462001-12-29 Akim Demaille <akim@epita.fr>
12747
12748 * doc/bison.texinfo: Formatting changes.
12749
091e20bb
AD
127502001-12-29 Akim Demaille <akim@epita.fr>
12751
12752 Don't store the token defs in a muscle, just be ready to output it
12753 on command. Now possible via `symbols'. Fixes a memory leak.
12754
12755 * src/output.c (token_definitions_output): New.
12756 (output_parser, header_output): Use it.
12757 * src/reader.c (symbols_save): Remove.
12758
cce71710
AD
127592001-12-29 Akim Demaille <akim@epita.fr>
12760
12761 * src/bison.simple: Do not provide a default for YYSTYPE and
12762 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12763 default.
12764
82c035a8
AD
127652001-12-29 Akim Demaille <akim@epita.fr>
12766
12767 Mid-rule actions are simply... ignored!
12768
12769 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12770 the empty-rule associated to the dummy symbol, not to the host
12771 rule.
12772 * tests/actions.at (Mid-rule actions): New.
12773
8419d367
AD
127742001-12-29 Akim Demaille <akim@epita.fr>
12775
12776 Memory leak.
12777
12778 * src/reader.c (reader): Free grammar.
12779
375d5806
AD
127802001-12-29 Akim Demaille <akim@epita.fr>
12781
12782 Memory leak.
12783
12784 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12785 since it allocates it for each state, although only one is needed.
12786 (allocate_storage): Do it here.
12787
f51cb8ff
AD
127882001-12-29 Akim Demaille <akim@epita.fr>
12789
12790 * src/options.h, src/options.c (create_long_option_table): Rename
12791 as...
12792 (long_option_table_new): this, with a clearer prototype.
12793 (percent_table): Remove, unused,
12794 * src/getargs.c (getargs): Adjust.
12795
29e88316
AD
127962001-12-29 Akim Demaille <akim@epita.fr>
12797
12798 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12799 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12800 as states.
12801
b9f71f19
AD
128022001-12-29 Akim Demaille <akim@epita.fr>
12803
12804 * src/lalr.c (build_relations): Rename `states' as `states1'.
12805 Sorry, I don't understand exactly what it is, no better name...
12806
1a2b5d37
AD
128072001-12-29 Akim Demaille <akim@epita.fr>
12808
12809 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12810 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12811 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12812 as rules.
12813
1cca533e
AD
128142001-12-29 Akim Demaille <akim@epita.fr>
12815
12816 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12817 ago.
12818
c03ae966
AD
128192001-12-29 Akim Demaille <akim@epita.fr>
12820
12821 * src/reader.c, src/reader.h (user_toknums): Remove.
12822 Adjust all users to use symbols[i]->user_token_number.
12823
5a670b1e
AD
128242001-12-29 Akim Demaille <akim@epita.fr>
12825
12826 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12827 Adjust all users to use symbols[i]->prec or ->assoc.
12828
ad949da9
AD
128292001-12-29 Akim Demaille <akim@epita.fr>
12830
12831 * src/reader.c, src/reader.h (tags): Remove.
12832 Adjust all users to use symbols[i]->tag.
12833
0e78e603
AD
128342001-12-29 Akim Demaille <akim@epita.fr>
12835
12836 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12837 and rule_table.
12838 * src/reader.c (packsymbols): Fill this table.
12839 Drop sprec.
12840 * src/conflicts.c (resolve_sr_conflict): Adjust.
12841 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12842 single table.
12843 Use symbols[i]->tag instead of tags[i].
12844
213e640e
AD
128452001-12-29 Akim Demaille <akim@epita.fr>
12846
12847 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12848 In addition, put a comment in there, to replace...
12849 * tests/regression.at (%union and C comments): Remove.
12850
e7b8bef1
AD
128512001-12-29 Akim Demaille <akim@epita.fr>
12852
12853 * tests/regression.at (Web2c Actions): Blindly move the actual
12854 output as expected output. The contents *seem* right to me, but I
12855 can't pretend reading perfectly parser tables... Nonetheless, all
12856 the other tests pass correctly, the table look OK, even though the
12857 presence of `$axiom' is to be noted: AFAICS it is useless (but
12858 harmless).
12859
b68e7744
AD
128602001-12-29 Akim Demaille <akim@epita.fr>
12861
12862 * src/reader.c (readgram): Don't add the rule 0 if there were no
12863 rules read. In other words, add it _after_ having performed
12864 grammar sanity checks.
12865 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12866
78d5bae9
AD
128672001-12-29 Akim Demaille <akim@epita.fr>
12868
12869 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12870 visible, and some states have now a different number.
12871
ff442794
AD
128722001-12-29 Akim Demaille <akim@epita.fr>
12873
12874 * src/reader.c (readgram): Bind the initial rule's lineno to that
12875 of the first rule.
12876 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12877 (Solved SR Conflicts): Adjust rule 0's line number.
12878
610ab194
AD
128792001-12-29 Akim Demaille <akim@epita.fr>
12880
12881 Fix the `GAWK Grammar' failure.
12882
12883 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12884 the reductions of the first state which was mistakenly confused
12885 with the final state because precisely final_state was initialized
12886 to 0.
12887 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12888 now noticed by Bison.
12889 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12890 have a reduction on $default.
12891
29d29c8f
AD
128922001-12-29 Akim Demaille <akim@epita.fr>
12893
12894 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12895 rule line numbers.
12896 * src/closure.c (print_closure): Likewise.
12897 * src/derives.c (print_derives): Likewise.
12898 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12899 now.
12900
7c6b64d0
AD
129012001-12-29 Akim Demaille <akim@epita.fr>
12902
12903 * src/lalr.c (lookaheads_print): New.
12904 (lalr): Call it when --trace-flag.
12905 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12906 are dumped.
12907
3d4daee3
AD
129082001-12-29 Akim Demaille <akim@epita.fr>
12909
12910 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12911 when walking through ritem, even via rule->rhs.
12912 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12913 (useful_production, useless_nonterminals): Likewise.
12914 (reduce_grammar_tables): Likewise, plus update nritems.
12915 * src/nullable.c (set_nullable): Likewise.
12916 * src/lalr.c (build_relations): Likewise.
12917 * tests/sets.at (Nullable): Adjust.
12918 Fortunately, now, the $axiom is no longer nullable.
12919
9e7f6bbd
AD
129202001-12-29 Akim Demaille <akim@epita.fr>
12921
12922 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12923 the 0-sentinel.
12924 * src/gram.c (ritem_longest_rhs): Likewise.
12925 * src/reduce.c (nonterminals_reduce): Likewise.
12926 * src/print_graph.c (print_graph): Likewise.
12927 * src/output.c (output_rule_data): Likewise.
12928 * src/nullable.c (set_nullable): Likewise.
12929
255ef638
AD
129302001-12-29 Akim Demaille <akim@epita.fr>
12931
12932 * src/output.c: Comment changes.
12933
0d8a7363
AD
129342001-12-27 Paul Eggert <eggert@twinsun.com>
12935
12936 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12937 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12938 Sparc, as they were causing more porting problems than the
12939 (minor) performance improvement was worth.
12940
12941 Also, catch up with 1.31's YYSTD.
12942
3db472b9
AD
129432001-12-27 Akim Demaille <akim@epita.fr>
12944
12945 * src/output.c (output_gram): Rely on nritems, not the
12946 0-sentinel. See below.
12947 Use -1 as separator, not 0.
12948 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12949 Rely on -1 as separator in yyrhs, instead of 0.
12950 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12951 twice `Now at end of input', therefore there are two lines less to
12952 expect.
12953
b365aa05
AD
129542001-12-27 Akim Demaille <akim@epita.fr>
12955
12956 * tests/regression.at (Unresolved SR Conflicts):
12957 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12958 below.
12959
30171f79
AD
129602001-12-27 Akim Demaille <akim@epita.fr>
12961
12962 * src/LR0.c (new_state): Recognize the final state by the fact it
12963 is reached by eoftoken.
12964 (insert_start_shifting_state, insert_eof_shifting_state)
12965 (insert_accepting_state, augment_automaton): Remove, since now
12966 these states are automatically computed from the initial state.
12967 (generate_states): Adjust.
12968 * src/print.c: When reporting a rule number to the user, substract
12969 1, so that the axiom rule is rule 0, and the first user rule is 1.
12970 * src/reduce.c: Likewise.
12971 * src/print_graph.c (print_core): For the time being, just as for
12972 the report, depend upon --trace-flags to dump the full set of
12973 items.
12974 * src/reader.c (readgram): Once the grammar read, insert the rule
12975 0: `$axiom: START-SYMBOL $'.
12976 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12977 number of the states has changed (the final state is no longer
12978 necessarily the last), catch up.
12979
75142d45
AD
129802001-12-27 Akim Demaille <akim@epita.fr>
12981
12982 Try to make the use of the eoftoken valid. Given that its value
12983 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12984 is used instead of > 0 where appropriate, (ii), depend upon nritems
12985 instead of the 0-sentinel.
12986
12987 * src/gram.h, src/gram.c (nritems): New.
12988 Expected to be duplication of nitems, but for the time being...
12989 * src/reader.c (packgram): Assert nritems and nitems are equal.
12990 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12991 * src/closure.c (print_closure, print_fderives): Likewise.
12992 * src/gram.c (ritem_print): Likewise.
12993 * src/print.c (print_core, print_grammar): Likewise.
12994 * src/print_graph.c: Likewise.
12995
b7c49edf
AD
129962001-12-27 Akim Demaille <akim@epita.fr>
12997
12998 * src/main.c (main): If there are complains after grammar
12999 reductions, then output the report anyway if requested, then die.
13000 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
13001 * src/reader.c (eoftoken): New.
13002 (parse_token_decl): If the token being defined has value `0', it
13003 is the eoftoken.
13004 (packsymbols): No longer hack `tags' to insert `$' by hand.
13005 Be sure to preserve the value of the eoftoken.
13006 (reader): Make sure eoftoken is defined.
13007 Initialize nsyms to 0: now eoftoken is created just like the others.
13008 * src/print.c (print_grammar): Don't special case the eof token.
13009 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
13010 lie anyway, albeit pleasant.
13011 * tests/calc.at: Exercise error messages with eoftoken.
13012 Change the grammar so that empty input is invalid.
13013 Adjust expectations.
13014 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
13015
ec2da99f
AD
130162001-12-27 Akim Demaille <akim@epita.fr>
13017
13018 * configure.in: Check the protos of strchr ans strspn.
13019 Replace strchr if needed.
13020 * src/system.h: Provide the protos of strchr, strspn and memchr if
13021 missing.
13022 * lib/strchr.c: New.
13023 * src/reader.c (symbols_save): Use strchr.
13024
8adfa272
AD
130252001-12-27 Akim Demaille <akim@epita.fr>
13026
13027 * src/print.c, src/print_graph.c (escape): New.
13028 Use it to quote the TAGS outputs.
13029 * src/print_graph.c (print_state): Now errors are in red, and
13030 reductions in green.
13031 Prefer high to wide: output the state number on a line of its own.
13032
80dac38c
AD
130332001-12-27 Akim Demaille <akim@epita.fr>
13034
13035 * src/state.h, src/state.c (reductions_new): New.
13036 * src/LR0.c (set_state_table): Let all the states have a
13037 `reductions', even if reduced to 0.
13038 (save_reductions): Adjust.
13039 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13040 * src/print.c (print_reductions, print_actions): Adjust.
13041 * src/output.c (action_row): Adjust.
13042
2cec70b9
AD
130432001-12-27 Akim Demaille <akim@epita.fr>
13044
13045 * src/state.h, src/state.c (errs_new, errs_dup): New.
13046 * src/LR0.c (set_state_table): Let all the states have an errs,
13047 even if reduced to 0.
13048 * src/print.c (print_errs, print_reductions): Adjust.
13049 * src/output.c (output_actions, action_row): Adjust.
13050 * src/conflicts.c (resolve_sr_conflict): Adjust.
13051
13ca549a
AD
130522001-12-27 Akim Demaille <akim@epita.fr>
13053
13054 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13055
5092aba5
AD
130562001-12-27 Akim Demaille <akim@epita.fr>
13057
13058 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13059 * src/print.c: here.
13060 (lookaheadset, shiftset): New, used as additional storage by
13061 print_reductions.
13062 (print_results): Adjust.
13063 (print_shifts, print_gotos, print_errs): New, extracted from...
13064 (print_actions): here.
13065 * src/print_graph.c (print_actions): Remove dead code.
13066
11e2beca
AD
130672001-12-27 Akim Demaille <akim@epita.fr>
13068
13069 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13070 `$n' and `@n'.
13071
dac3c910
AD
130722001-12-27 Akim Demaille <akim@epita.fr>
13073
13074 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13075 (build_relations): Adjust.
13076
d0b0fefa
AD
130772001-12-27 Akim Demaille <akim@epita.fr>
13078
13079 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13080 duplication.
13081
adc8c848
AD
130822001-12-27 Akim Demaille <akim@epita.fr>
13083
13084 * src/reader.c (packgram): Catch nitems overflows.
13085
14d293ac
AD
130862001-12-27 Akim Demaille <akim@epita.fr>
13087
13088 * src/files.c, src/files.h (guard_obstack): Remove.
13089 * src/output.c (output): Adjust.
13090 * src/reader.c (parse_braces): New, factoring...
13091 (copy_action, copy_guard): these two which are renamed as...
13092 (parse_action, parse_guard): these.
13093 As a voluntary consequence, using braces around guards is now
13094 mandatory.
13095
f499b062
AD
130962001-12-27 Akim Demaille <akim@epita.fr>
13097
13098 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13099 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13100 members.
13101 (symbol_list_new): Adjust.
13102 (copy_action): action_line is the first line, not the last.
13103 (copy_guard): Just as for actions, store the `action' only, not
13104 the switch/case/break flesh.
13105 Don't parse the user action that might follow the guard, let...
13106 (readgram): do it, i.e., now, there can be an action after a
13107 guard.
13108 In other words the guard is just explicitly optional.
13109 (packgram): Adjust.
13110 * src/output.c (guards_output): New.
13111 (output_parser): Call it when needed.
13112 (output): Also free the guard and attrs obstacks.
13113 * src/files.c, src/files.h (obstack_save): Remove.
13114 (output_files): Remove.
13115 As a result, if one needs the former `.act' file, using an
13116 appropriate skeleton which requires actions and guards is now
13117 required.
13118 * src/main.c (main): Adjust.
13119 * tests/semantic.at: New.
13120 * tests/regression.at: Use `input.y' as input file name.
13121 Avoid 8+3 problems by requiring input.c when the test needs the
13122 parser.
13123
d945f5cd
AD
131242001-12-27 Akim Demaille <akim@epita.fr>
13125
13126 * src/reader.c (symbol_list_new): Be sure to initialize all the
13127 fields.
13128
d200e455
AD
131292001-12-27 Akim Demaille <akim@epita.fr>
13130
13131 All the hacks using a final pseudo state are now useless.
13132
13133 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13134 * src/lalr.c (nLA): New.
13135 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13136 instead of lookaheadsp from the pseudo state (nstate + 1).
13137
f9507c28
AD
131382001-12-27 Akim Demaille <akim@epita.fr>
13139
13140 * src/output.c (action_row, token_actions): Use a state_t instead
13141 of a integer, and nlookaheads instead of the following state's
13142 lookaheadsp.
13143
065fbd27
AD
131442001-12-27 Akim Demaille <akim@epita.fr>
13145
13146 * src/conflicts.c (log_resolution, flush_shift)
13147 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13148 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13149 (conflicts_print, print_reductions): Use a state_t instead of an
13150 integer when referring to a state.
13151 As much as possible, depend upon nlookaheads, instead of the
13152 `lookaheadsp' member of the following state (since lookaheads of
13153 successive states are successive, the difference between state n + 1
13154 and n served as the number of lookaheads for state n).
13155 * src/lalr.c (add_lookback_edge): Likewise.
13156 * src/print.c (print_core, print_actions, print_state)
13157 (print_results): Likewise.
13158 * src/print_graph.c (print_core, print_actions, print_state)
13159 (print_graph): Likewise.
13160 * src/conflicts.h: Adjust.
13161
1b177bd7
AD
131622001-12-27 Akim Demaille <akim@epita.fr>
13163
13164 * src/bison.hairy: Formatting/comment changes.
13165 ANSIfy.
13166 Remove `register' indications.
13167 Add plenty of `static'.
13168
7742ddeb
AD
131692001-12-27 Akim Demaille <akim@epita.fr>
13170
13171 * src/output.c (prepare): Drop the muscle `ntbase' which
13172 duplicates ntokens.
13173 * src/bison.simple: Formatting/comment changes.
13174 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13175 is an undocumented synonym.
13176
1fa14068
AD
131772001-12-22 Akim Demaille <akim@epita.fr>
13178
13179 * src/output.c (output_table_data): Change the prototype to use
13180 `int' for array ranges: some invocations do pass an int, not a
13181 short.
13182 Reported by Wayne Green.
13183
b9752825
AD
131842001-12-22 Akim Demaille <akim@epita.fr>
13185
13186 Some actions of web2c.y are improperly triggered.
13187 Reported by Mike Castle.
13188
13189 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13190 * tests/regression.at (Web2c): Rename as...
13191 (Web2c Report): this.
13192 (Web2c Actions): New.
13193
776209d6
AD
131942001-12-22 Akim Demaille <akim@epita.fr>
13195
13196 Reductions in web2c.y are improperly reported.
13197 Reported by Mike Castle.
13198
13199 * src/conflicts.c (print_reductions): Fix.
13200 * tests/regression.at (Web2c): New.
13201
275fc3ad
AD
132022001-12-18 Akim Demaille <akim@epita.fr>
13203
13204 Some host fail on `assert (!"foo")', which expands to
13205 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13206 Reported by Nelson Beebee.
13207
13208 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13209 `#define it_succeeded 0' and `assert (it_succeeded)'.
13210
897668ee
MA
132112001-12-17 Marc Autret <autret_m@epita.fr>
13212
13213 * src/bison.simple: Don't hard code the skeleton line and filename.
13214 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13215 New line counter 'skeleton_line' (skeleton-line muscle).
13216
ab3399e0
PE
132172001-12-17 Paul Eggert <eggert@twinsun.com>
13218
13219 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13220 YYDEBUG must be defined to a nonzero value.
13221
13222 * src/bison.simple (yytname): Do not assume that the user defines
13223 YYDEBUG to a properly parenthesized expression.
13224
3877f72b
AD
132252001-12-17 Akim Demaille <akim@epita.fr>
13226
13227 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13228 nlookaheads is a new member.
13229 Adjust all users.
13230 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13231 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13232 state.
776209d6 13233
331dbc1b
AD
132342001-12-17 Akim Demaille <akim@epita.fr>
13235
13236 * src/files.h, src/files.c (open_files, close_files): Remove.
13237 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13238 let...
13239 * src/reader.c (reader): Do it.
776209d6 13240
be750e4c
AD
132412001-12-17 Akim Demaille <akim@epita.fr>
13242
13243 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 13244
709ae8c6
AD
132452001-12-17 Akim Demaille <akim@epita.fr>
13246
13247 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13248 (flush_reduce): New.
13249 (resolve_sr_conflict): Adjust.
776209d6 13250
f87685c3
AD
132512001-12-17 Akim Demaille <akim@epita.fr>
13252
13253 * src/output.c (output_obstack): Be static and rename as...
13254 (format_obstack): this, to avoid any confusion with files.c's
13255 output_obstack.
13256 * src/reader.h (muscle_obstack): Move to...
13257 * src/output.h: here, since it's defined in output.c.
13258
837491d8
AD
132592001-12-17 Akim Demaille <akim@epita.fr>
13260
13261 * src/output.c (action_row, save_column, default_goto)
13262 (sort_actions, matching_state, pack_vector): Better variable
13263 locality.
13264
796d61fb
AD
132652001-12-17 Akim Demaille <akim@epita.fr>
13266
13267 * src/output.c: Various formatting changes.
776209d6 13268
64d15509
AD
132692001-12-17 Akim Demaille <akim@epita.fr>
13270
13271 * src/files.c (output_files): Free the output_obstack.
13272 * src/main.c (main): Call print and print_graph conditionally.
13273 * src/print.c (print): Work unconditionally.
13274 * src/print_graph.c (print_graph): Work unconditionally.
13275 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13276
fbc8ecb7
MA
132772001-12-16 Marc Autret <autret_m@epita.fr>
13278
13279 * src/output.c (actions_output): Fix. When we use %no-lines,
13280 there is one less line per action.
13281
f0440388
MA
132822001-12-16 Marc Autret <autret_m@epita.fr>
13283
13284 * src/bison.simple: Remove a useless #line directive.
13285 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13286 * src/output.c (get_lines_number): New.
776209d6 13287 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
13288 output muscles.
13289 Fix line numbering.
13290 (actions_output): Computes the number of lines taken by actions.
13291 (output_master_parser): Insert new skeleton which is the name of
13292 the output parser file name.
13293
a79986b8
MA
132942001-12-15 Marc Autret <autret_m@epita.fr>
13295
13296 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13297
4ec8e00f
MA
132982001-12-15 Marc Autret <autret_m@epita.fr>
13299
13300 * src/output.c (output_gram): Keep track of the hairy one.
13301
1a4648ff
AD
133022001-12-15 Akim Demaille <akim@epita.fr>
13303
13304 Make `make distcheck' work.
13305
13306 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13307 system.h which uses libgettext.h.
13308
9c2c67e6
AD
133092001-12-15 Akim Demaille <akim@epita.fr>
13310
13311 * src/nullable.c (set_nullable): Useless rules must be skipped,
13312 otherwise, since we range over their symbols, we might look at a
13313 nonterminal which no longer ``exists'', i.e., it is not counted in
13314 `nvars', hence we overflow our arrays.
13315
93ede233
AD
133162001-12-15 Akim Demaille <akim@epita.fr>
13317
13318 The header can also be produced directly, without any obstack!
13319 Yahoo!
13320
13321 * src/files.c, src/files.h (defines_obstack): Remove.
13322 (compute_header_macro): Global.
13323 (defines_obstack_save): Remove.
13324 * src/reader.c (parse_union_decl): No longer output to
13325 defines_obstack: its content can be found in the `stype' muscle
13326 anyway.
13327 (output_token_translations): Merge into...
13328 (symbols_output): this.
13329 Rename as...
13330 (symbols_save): this.
13331 (reader): Adjust.
13332 * src/output.c (header_output): New.
13333 (output): Call it.
13334
2666f928
AD
133352001-12-15 Akim Demaille <akim@epita.fr>
13336
13337 * src/reader.c (parse_union_decl): Instead of handling two obstack
13338 simultaneously, use one to define the `stype' muscle, and use the
13339 value of the latter to fill defines_obstack.
13340 (copy_comment): Remove.
13341 (copy_comment2): Work for a single obstack.
13342 Rename as...
13343 (copy_comment): this.
13344
428046f8
AD
133452001-12-15 Akim Demaille <akim@epita.fr>
13346
13347 * src/lex.c, src/lex.h (xgetc): No longer static.
13348 * src/reader.c (parse_union_decl): Revamp.
13349
ea52d706
AD
133502001-12-15 Akim Demaille <akim@epita.fr>
13351
13352 Still making progress in separating Bison into (i) input, (ii)
13353 process, (iii) output: now we can directly output the parser file
13354 without using table_obstack at all.
13355
13356 * src/files.c, src/files.h (table_obstack): Bye bye.
13357 (parser_file_name): New.
13358 * src/files.c (compute_output_file_names): Compute it.
13359 * src/output.c (actions_output, output_parser)
13360 (output_master_parser): To a file instead of an obstack.
13361
3f96f4dc
AD
133622001-12-15 Akim Demaille <akim@epita.fr>
13363
13364 Attach actions to rules, instead of pre-outputting them to
13365 actions_obstack.
13366
13367 * src/gram.h (rule_t): action and action_line are new members.
13368 * src/reader.c (symbol_list): Likewise.
13369 (copy_action): Save the actions within the rule.
13370 (packgram): Save them in rule_table.
13371 * src/output.c (actions_output): New.
13372 (output_parser): Use it on `%%actions'.
13373 (output_rule_data): Don't free rule_table.
13374 (output): Do it.
13375 (prepare): Don't save the `action' muscle.
13376 * src/bison.simple: s/%%action/%%actions/.
13377
51576fb3
AD
133782001-12-15 Akim Demaille <akim@epita.fr>
13379
13380 * src/reader.c (copy_action): When --yacc, don't append a `;'
13381 to the user action: let it fail if lacking.
dee049eb 13382 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 13383
2648a72d
AD
133842001-12-14 Akim Demaille <akim@epita.fr>
13385
13386 * src/lex.c (literalchar): Simply return the char you decoded, non
13387 longer mess around with obstacks and int pointers.
13388 Adjust all callers.
13389
92790e5b
AD
133902001-12-14 Akim Demaille <akim@epita.fr>
13391
13392 * src/lex.c (literalchar): Don't escape the special characters,
13393 just decode them, and keep them as char (before, eol was output as
13394 the 2 char string `\n' etc.).
13395 * src/output.c (output_rule_data): Use quotearg to output the
13396 token strings.
13397
927c1557
PE
133982001-12-13 Paul Eggert <eggert@twinsun.com>
13399
13400 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13401 Do not infringe on the global user namespace when using C++.
13402 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13403 All uses of `fprintf' and `stderr' changed.
13404
13405 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13406
ed8e1f68
AD
134072001-12-13 Akim Demaille <akim@epita.fr>
13408
13409 The computation of nullable is broken: it doesn't handle empty
13410 RHS's properly.
13411
13412 * tests/torture.at (GNU AWK Grammar): New.
13413 * tests/sets.at (Nullable): New.
13414 * src/nullable.c (set_nullable): Instead of blindly looping over
13415 `ritems', loop over the rules, and then over their rhs's.
13416
13417 Work around Autotest bugs.
13418
13419 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13420 frame, because Autotest understand lines starting with a `+' as
13421 traces from the shell. Then, they are not processed properly.
13422 Admittedly an Autotest bug, but we don't have time to wait for
13423 Autotest to catch up.
13424 * tests/regression.at (Broken Closure): Adjust to the new table
13425 frames.
13426 Move to...
13427 * tests/sets.at: here.
13428
cb581495
AD
134292001-12-13 Akim Demaille <akim@epita.fr>
13430
13431 * src/closure.c (closure): Use nrules instead of playing tricks
13432 with BITS_PER_WORD.
13433
2e729273
AD
134342001-12-13 Akim Demaille <akim@epita.fr>
13435
13436 * src/print.c (print_actions): Output the handling of `$' as the
13437 traces do: shifting the token EOF. Before EOF was treated as a
13438 nonterminal.
13439 * tests/regression.at: Adjust some tests.
13440 * src/print_graph.c (print_core): Complete the set of items via
13441 closure. The next-to-final and final states are still unsatisfying,
13442 but that's to be addressed elsewhere.
13443 No longer output the rule numbers, but do output the state number.
13444 A single loop for the shifts + gotos is enough, but picked a
13445 distinct color for each.
13446 (print_graph): Initialize and finalize closure.
13447
107f7dfb
AD
134482001-12-13 Akim Demaille <akim@epita.fr>
13449
13450 * src/reader.c (readgram): Remove dead code, an strip useless
13451 braces.
13452 (get_type): Remove, unused.
13453
9b53a24f
AD
134542001-12-12 Akim Demaille <akim@epita.fr>
13455
13456 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13457 on that of lib/error.c.
13458
dbfb6dcd
AD
134592001-12-12 Akim Demaille <akim@epita.fr>
13460
13461 Some hosts don't like `/' in includes.
13462
13463 * src/system.h: Include libgettext.h without qualifying the path.
13464 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13465 $(top_srcdir).
13466
c25fb648
MA
134672001-12-11 Marc Autret <autret_m@epita.fr>
13468
13469 * src/output.c (output_parser): Remove useless muscle.
13470
710ddc4f
MA
134712001-12-11 Marc Autret <autret_m@epita.fr>
13472
13473 * src/bison.simple: Remove #line just before %%epilogue. It
13474 is now handled in ...
13475 * src/reader.c (read_additionnal_code): Add the output of a
13476 #line for the epilogue.
13477
e83d80b8
MA
134782001-12-10 Marc Autret <autret_m@epita.fr>
13479
927c1557 13480 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
13481 replace precedent remove.
13482 * src/bison.simple: Remove #line before %%prologue because
13483 %%input-line is wrong at this time.
13484
971d5158
MA
134852001-12-10 Marc Autret <autret_m@epita.fr>
13486
13487 * src/reader.c (symbols_output): Clean up.
927c1557 13488 * src/output.c (output_gram, output): Clean up.
971d5158 13489
5edafffd
AD
134902001-12-10 Akim Demaille <akim@epita.fr>
13491
13492 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13493 * src/LR0.c (set_state_table): here.
13494 * src/lalr.c (lalr): Call it.
13495
0279f8e9
AD
134962001-12-10 Akim Demaille <akim@epita.fr>
13497
13498 * src/state.h (shifts): Remove the `number' member: shifts are
13499 attached to state, hence no longer need to be labelled with a
13500 state number.
13501
190c4f5f
AD
135022001-12-10 Akim Demaille <akim@epita.fr>
13503
13504 Now that states have a complete set of members, the linked list of
13505 shifts is useless: just fill directly the state's shifts member.
13506
13507 * src/state.h (shifts): Remove the `next' member.
13508 * src/LR0.c (first_state, last_state): Remove.
13509 Adjust the callers.
13510 (augment_automaton): Don't look for the shifts that must be added
13511 a shift on EOF: it is those of the state we looked for! But now,
13512 since shifts are attached, it is no longer needed to looking
13513 merely by its id: its number.
13514
2a73b93d
AD
135152001-12-10 Akim Demaille <akim@epita.fr>
13516
13517 * src/LR0.c (augment_automaton): Better variable locality.
13518 Remove an impossible branch: if there is a state corresponding to
13519 the start symbol being shifted, then there is shift for the start
13520 symbol from the initial state.
13521
74392f6a
AD
135222001-12-10 Akim Demaille <akim@epita.fr>
13523
13524 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13525 only when appropriate: when insert_start_shifting_state' is not
13526 invoked.
13527 * tests/regression.at (Rule Line Numbers): Adjust.
13528
37c82725
AD
135292001-12-10 Akim Demaille <akim@epita.fr>
13530
13531 * src/LR0.c (augment_automaton): Now that all states have shifts,
13532 merge the two cases addition shifts to the initial state.
13533
6a164e0c
AD
135342001-12-10 Akim Demaille <akim@epita.fr>
13535
13536 * src/lalr.c (set_state_table): Move to...
13537 * src/LR0.c: here.
13538 * src/lalr.c (lalr): Don't call it...
13539 * src/LR0.c (generate_states): do it.
13540 * src/LR0.h (first_state): Remove, only the table is used.
13541
7215de24
AD
135422001-12-10 Akim Demaille <akim@epita.fr>
13543
13544 * src/LR0.h (first_shift, first_reduction): Remove.
13545 * src/lalr.c: Don't use first_shift: find shifts through the
13546 states.
13547
80e25d4d
AD
135482001-12-10 Akim Demaille <akim@epita.fr>
13549
13550 * src/LR0.c: Attach shifts to states as soon as they are
13551 computed.
13552 * src/lalr.c (set_state_table): Instead of assigning shifts to
13553 state, just assert that the mapping was properly done.
13554
0ab3728b
AD
135552001-12-10 Akim Demaille <akim@epita.fr>
13556
13557 * src/LR0.c (insert_start_shift): Rename as...
13558 (insert_start_shifting_state): this.
13559 (insert_eof_shifting_state, insert_accepting_state): New.
13560 (augment_automaton): Adjust.
13561 Better locality of the variables.
13562 When looking if the start_symbol is shifted from the initial
13563 state, using `while (... symbol != start_symbol ...)' sounds
13564 better than `while (... symbol < start_symbol ...)': If fail
13565 to see how the order between symbols could be relevant!
13566
78af9bbc
AD
135672001-12-10 Akim Demaille <akim@epita.fr>
13568
13569 * src/getargs.h: Don't declare `spec_name_prefix' and
13570 `spec_file_prefix', declared by src/files.h.
13571 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13572 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13573 * src/output.c (prepare): Adjust.
13574 * src/reader.c (symbols_output): Likewise.
13575 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13576
bdef2a41
AD
135772001-12-10 Akim Demaille <akim@epita.fr>
13578
13579 * src/muscle_tab.c (muscle_init): NULL is a better default than
13580 `"0"'.
13581
3735969c
AD
135822001-12-10 Akim Demaille <akim@epita.fr>
13583
13584 * src/reader.c (reader): Calling symbols_output once is enough.
13585
49701457
AD
135862001-12-10 Akim Demaille <akim@epita.fr>
13587
13588 Now that states have a complete set of members, the linked list of
13589 reductions is useless: just fill directly the state's reductions
13590 member.
13591
13592 * src/state.h (struct reductions): Remove member `number' and
13593 `next'.
13594 * src/LR0.c (first_reduction, last_reduction): Remove.
13595 (save_reductions): Don't link the new reductions, store them in
13596 this_state.
13597 * src/lalr.c (set_state_table): No need to attach reductions to
13598 states, it's already done.
13599 * src/output.c (output_actions): No longer free the shifts, then
13600 the reductions, then the states: free all the states and their
13601 members.
13602
0edad749
AD
136032001-12-10 Akim Demaille <akim@epita.fr>
13604
13605 * src/options.c (OPTN, DRTV, BOTH): New.
13606 (option_table): Use them.
13607
0edad749
AD
13608 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13609 the job of system.h.
13610 * src/options.c: Don't include stdio.h and xalloc.h for the same
13611 reasons.
13612
5449dd0f
AD
136132001-12-10 Akim Demaille <akim@epita.fr>
13614
13615 * src/output.c (output, prepare): Make sure the values of the
13616 muscles `action' and `prologue' are 0-terminated.
13617
a870c567
AD
136182001-12-10 Akim Demaille <akim@epita.fr>
13619
13620 Clean up GCC warnings.
13621
13622 * src/reader.c (copy_action): `buf' is not used.
13623 (parse_skel_decl): Be static.
13624 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13625 * src/options.h (create_long_option_table): Have a real prototype.
13626 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13627 (hash_delete_at): Return const void *.
13628 Adjust casts to preserve the const.
13629
80df8768
AD
136302001-12-10 Akim Demaille <akim@epita.fr>
13631
13632 * configure.in: Require 2.52g.
13633 M4 is not needed, but AUTOM4TE is.
13634 * m4/m4.m4: Remove.
13635 * tests/Makefile.am: Adjust.
13636
f693ad14
AD
136372001-12-10 Akim Demaille <akim@epita.fr>
13638
13639 One structure for states is enough, even though theoretically
13640 there are LR(0) states and LALR(1) states.
13641
13642 * src/lalr.h (state_t): Remove.
13643 (state_table): Be state_t **, not state_t *.
13644 * src/state.h (core, CORE_ALLOC): Rename as...
13645 (state_t, STATE_ALLOC): this.
13646 Add the LALR(1) members: shifts, reductions, errs.
13647 * src/LR0.c (state_table): Rename as...
13648 (state_hash): this, to avoid name clashes with the global
13649 `state_table'.
13650 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13651 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13652
74ffbcb6
AD
136532001-12-10 Akim Demaille <akim@epita.fr>
13654
13655 Bison dumps core on bash.y.
13656 Reported by Pascal Bart.
13657
13658 * src/warshall.c (bitmatrix_print): New.
13659 (TC): Use it.
ba0fe3c7 13660 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
13661 j must be the outer loop.
13662 * tests/regression.at (Broken Closure): New.
13663
07708e19
AD
136642001-12-05 Akim Demaille <akim@epita.fr>
13665
13666 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13667 its argument.
ba1ecc07 13668 Reported by Peter Hamorsky.
07708e19 13669
92b16366
AD
136702001-12-05 Akim Demaille <akim@epita.fr>
13671
13672 * src/conflicts.c (err_table): Remove.
13673 (resolve_sr_conflict): Adjust.
13674 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13675 Rename as...
13676 (state_t.reductions, state_t.shifts): this.
13677
076ab033
AD
136782001-12-05 Akim Demaille <akim@epita.fr>
13679
13680 * src/reduce.c (reduce_grammar_tables): No longer disable the
13681 removal of useless rules via CPP but via `if (0)', so that the
13682 compiler still check the code is valid.
13683 For instance, it should have noticed `rline' no longer exists: use
13684 the `line' member of rule_t.
13685 * src/gram.c (dummy, rline): Remove, unused.
13686
3843c413
AD
136872001-12-05 Akim Demaille <akim@epita.fr>
13688
13689 * src/output.c (pack_vector): Use assert, not berror.
13690 * src/main.c (berror): Remove, unused.
13691
43168960
AD
136922001-12-05 Akim Demaille <akim@epita.fr>
13693
13694 New experimental feature: if --verbose --trace output all the
13695 items of a state, not only its kernel.
13696
13697 * src/print.c (print_core): If `trace_flag', then invoke closure
13698 before outputting the items of the state (print_core is no longer
13699 a correct name them).
13700 (print_results): Invoke new_closure/free_closure if needed.
13701
b2872512
AD
137022001-12-05 Akim Demaille <akim@epita.fr>
13703
13704 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13705 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13706 (nitemset): for consistency with the rest of the project.
13707
23cbcc6c
AD
137082001-12-05 Akim Demaille <akim@epita.fr>
13709
13710 * src/closure.c (print_closure): Improve.
13711 (closure): Use it for printing input and output.
13712
03ec521c
AD
137132001-12-05 Akim Demaille <akim@epita.fr>
13714
13715 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13716 indexed by nonterminals.
13717
3a7456dd
AD
137182001-12-05 Akim Demaille <akim@epita.fr>
13719
13720 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13721 what it was!).
13722 * src/warshall.h: Remove accidental duplication of the content.
13723
1cbcf2e7
AD
137242001-12-05 Akim Demaille <akim@epita.fr>
13725
13726 * src/closure.c (set_fderives): De-obfuscate.
13727
84182270
AD
137282001-12-05 Akim Demaille <akim@epita.fr>
13729
13730 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13731
3f6f053c
AD
137322001-12-05 Akim Demaille <akim@epita.fr>
13733
13734 * src/closure.c (set_firsts): De-obfuscate.
13735
7a5350ba
AD
137362001-12-05 Akim Demaille <akim@epita.fr>
13737
13738 * src/output.c (action_row): De-obfuscate
13739 using the good o' techniques: arrays not pointers, variable
13740 locality, BITISSET, RESETBIT etc.
13741
d954473d
AD
137422001-12-05 Akim Demaille <akim@epita.fr>
13743
13744 Pessimize the code to simplify it: from now on, all the states
13745 have a valid SHIFTS, which NSHIFTS is possibly 0.
13746
13747 * src/LR0.c (shifts_new): Be global and move to..
13748 * src/state.c, src/state.h: here.
13749 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13750 * src/print_graph: Adjust.
13751
9839bbe5
AD
137522001-12-05 Akim Demaille <akim@epita.fr>
13753
13754 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13755 * src/conflicts.c: Use it.
13756 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13757 incorrectly ``simplified''.
13758
9f136c07
AD
137592001-12-05 Akim Demaille <akim@epita.fr>
13760
13761 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13762 using the good o' techniques: arrays not pointers, variable
13763 locality, BITISSET, RESETBIT etc.
13764
b608206e
AD
137652001-12-05 Akim Demaille <akim@epita.fr>
13766
13767 * src/state.h (SHIFT_SYMBOL): New.
13768 * src/conflicts.c: Use it to deobfuscate.
13769
52afa962
AD
137702001-12-05 Akim Demaille <akim@epita.fr>
13771
13772 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13773 (print_reductions): De-obfuscate using the good o' techniques:
13774 arrays not pointers, variable locality, BITISSET.
13775
e74dc321
AD
137762001-12-05 Akim Demaille <akim@epita.fr>
13777
13778 * src/conflicts.c (print_reductions): Arrays, not pointers.
13779 Use BITISSET.
13780
768fca83
AD
137812001-12-05 Akim Demaille <akim@epita.fr>
13782
13783 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13784
a17e599f
AD
137852001-12-05 Akim Demaille <akim@epita.fr>
13786
13787 * src/conflicts.c (print_reductions): Improve variable locality.
13788
a04bc341
AD
137892001-12-05 Akim Demaille <akim@epita.fr>
13790
13791 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13792
c8ea038e
AD
137932001-12-05 Akim Demaille <akim@epita.fr>
13794
13795 * src/conflicts.c (print_reductions): Improve variable locality.
13796
aa2aab3c
AD
137972001-12-05 Akim Demaille <akim@epita.fr>
13798
13799 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13800 * src/lalr.c: Use them.
13801
b178c8cc
AD
138022001-12-05 Akim Demaille <akim@epita.fr>
13803
13804 * src/LR0.c (augment_automaton): Formatting changes.
13805 Better variable locality.
13806
f67d13aa
AD
138072001-12-05 Akim Demaille <akim@epita.fr>
13808
13809 * src/lalr.c (matrix_print): New.
13810 (transpose): Use it.
13811 Use arrays instead of pointers.
13812
c2713865
AD
138132001-12-05 Akim Demaille <akim@epita.fr>
13814
13815 * src/lalr.c (maxrhs): Move to...
13816 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13817 * src/lalr.c (build_relations): Adjust.
13818
9887c18a
AD
138192001-12-05 Akim Demaille <akim@epita.fr>
13820
13821 * src/lalr.c (transpose): Free the memory allocated to the
13822 argument, as it is replaced by the results by the unique caller.
13823 (build_relations): Merely invoke transpose: it handles the memory
13824 deallocation.
13825 Improve variable locality.
13826 Avoid variables used as mere abbreviations.
13827 (compute_lookaheads): Use arrays instead of pointers.
13828
4d4f699c
AD
138292001-12-05 Akim Demaille <akim@epita.fr>
13830
13831 * src/lalr.c (initialize_F): Improve variable locality.
13832 Avoid variables used as mere abbreviations.
13833
80a69750
AD
138342001-12-05 Akim Demaille <akim@epita.fr>
13835
13836 * src/derives.c (print_derives): Display the ruleno.
13837 * src/lalr.c (initialize_F, transpose): Better variable locality
13838 to improve readability.
13839 Avoid variables used as mere abbreviations.
13840
fe961097
AD
138412001-12-05 Akim Demaille <akim@epita.fr>
13842
13843 * src/lalr.c (traverse): Use arrays instead of pointers.
13844
e3e4e814
AD
138452001-12-05 Akim Demaille <akim@epita.fr>
13846
13847 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13848 the handling of squeue.
13849 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13850
630e182b
AD
138512001-12-05 Akim Demaille <akim@epita.fr>
13852
13853 Because useless nonterminals are now kept alive (instead of being
13854 `destroyed'), we now sometimes examine them, and store information
13855 related to them. Hence we need to know their number, and adjust
13856 memory allocations.
13857
13858 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13859 static.
13860 * src/LR0.c (allocate_itemsets): The memory allocated to
13861 `symbol_count' was used for two different purpose: once to count
13862 the number of occurrences of each symbol, and later reassigned to
13863 `shift_symbol', containing the symbol that can be shifted from a
13864 given state.
13865 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13866 only, and...
13867 (new_itemsets): Allocate `shift_symbol' here.
13868 (allocate_itemsets): symbol_count includes useless nonterminals.
13869 Make room for them.
13870 (free_storage): Use `free', not `XFREE', for pointers that cannot
13871 be null.
13872
81b51460
AD
138732001-12-05 Akim Demaille <akim@epita.fr>
13874
13875 * src/nullable.c (set_nullable): Deobfuscate the handling of
13876 ritem.
13877 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13878
3067fbef
AD
138792001-12-05 Akim Demaille <akim@epita.fr>
13880
13881 * src/gram.c, src/gram.h (ritem_print): New.
13882 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13883 (This useless function was defined only to work around VMS linkers
13884 that can't handle compilation units with variables only).
13885 * src/reduce.c (dump_grammar): Use it to trace the construction of
13886 ritem.
13887
c2bea5f9
PE
138882001-12-04 Paul Eggert <eggert@twinsun.com>
13889
7d27c823
PE
13890 * src/bison.simple (union yyalloc): Change member names
13891 to be the same as the stack names.
13892 (yyparse): yyptr is now union yyalloc *, not char *.
13893 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13894 and may generate better code on some machines.
c2bea5f9
PE
13895 (yystpcpy): Use prototype if __STDC__ is defined, not just
13896 if __cplusplus is defined.
35687a9d 13897
2c8a9dfa
AD
138982001-11-30 Akim Demaille <akim@epita.fr>
13899
13900 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13901 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13902 Gettext doesn't compile cleanly, and dies with -Werror.
13903 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13904 Include WARNING_CFLAGS here.
13905 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13906 before being defined.
13907
f4e421e6
AD
139082001-11-27 Paul Eggert <eggert@twinsun.com>
13909
13910 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13911 First arg is int, not unsigned.
13912 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13913 (SIZE_MAX, UINT_MAX): New macros.
13914 (quotearg_n_options): Abort if N is negative.
13915 Avoid overflow check on hosts where size_t is 64 bits and int
13916 is 32 bits, as overflow is impossible there.
13917 Fix off-by-one typo that caused unnecessary reallocation.
13918
7093d0f5
AD
139192001-11-29 Paul Eggert <eggert@twinsun.com>
13920
13921 Name space cleanup in generated parser.
13922
13923 * doc/bison.texinfo (Bison Parser): Discuss system headers
13924 and their effect on the user name space.
13925
13926 * src/bison.simple:
13927 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13928 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13929 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13930
13931 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13932 on user names when possible.
13933
13934 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13935 Simplify test for whather <alloca.h> exists.
13936
13937 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13938
13939 (<stdio.h>): Include if YYDEBUG.
13940
13941 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13942 ! defined (yyoverflow) && ! defined (yymemcpy).
13943
13944 (yymemcpy, yyparse): Rename local variables as needed so that
13945 they all begin with 'yy'.
13946
13947 (yystrlen, yystpcpy): New functions.
13948
13949 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13950 All uses changed.
13951
13952 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13953 instead of relying on string.h functions. Use YYSTACK_ALLOC
13954 and YYSTACK_FREE instead of malloc and free.
13955
fd51e5ff
AD
139562001-11-30 Akim Demaille <akim@epita.fr>
13957
13958 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13959 before their first uses.
13960 (YYBISON, YYPURE): Move to the top of the output.
13961
7d13ff5f
AD
139622001-11-30 Akim Demaille <akim@epita.fr>
13963
13964 * tests/reduce.at (Useless Nonterminals): Fix.
13965
892a3995
AD
139662001-11-30 Akim Demaille <akim@epita.fr>
13967
13968 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13969 if body instead of `;' to pacify GCC's warnings.
13970
68f1e3ed
AD
139712001-11-30 Akim Demaille <akim@epita.fr>
13972
13973 Instead of mapping the LHS of unused rules to -1, keep the LHS
13974 valid, but flag the rules as invalid.
13975
13976 * src/gram.h (rule_t): `useful' is a new member.
13977 * src/print.c (print_grammar): Adjust.
13978 * src/derives.c (set_derives): Likewise.
13979 * src/reader.c (packgram, reduce_output): Likewise.
13980 * src/reduce.c (reduce_grammar_tables): Likewise.
13981 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13982
d2d1b42b
AD
139832001-11-30 Akim Demaille <akim@epita.fr>
13984
13985 * src/reduce.c (reduce_output): Formatting changes.
13986 * src/print.c (print_results, print_grammar): Likewise.
13987 * tests/regression.at (Rule Line Numbers)
13988 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13989
760b53a8
AD
139902001-11-30 Akim Demaille <akim@epita.fr>
13991
13992 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13993 useless nonterminals, move them at the end of the symbol arrays.
13994 (reduce_output): Adjust.
13995 * tests/reduce.at (Useless Nonterminals): Adjust.
13996
00238958
AD
139972001-11-30 Akim Demaille <akim@epita.fr>
13998
13999 * src/reduce.c: Various comment/formatting changes.
14000 (nonterminals_reduce): New, extracted from...
14001 (reduce_grammar_tables): here.
14002 (reduce_grammar): Call nonterminals_reduce.
14003
396452de
PE
140042001-11-29 Paul Eggert <eggert@twinsun.com>
14005
14006 * src/bison.simple (YYSTACK_REALLOC): Remove.
14007 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
14008 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
14009 New macros.
14010 (union yyalloc): New type.
14011 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
14012 an arbitrary restriction on hosts where size_t is wider than int.
14013
14014 (yyparse): Don't dump core if alloca or malloc fails; instead, report
14015 a parser stack overflow. Allocate just one block of memory for all
14016 three stacks, instead of allocating three blocks; this typically is
14017 faster and reduces fragmentation.
14018
14019 Do not limit the number of items in the stack to a value that fits
14020 in 'int', as this is an arbitrary limit on hosts with 64-bit
14021 size_t and 32-bit int.
14022
147e184c
MA
140232001-11-29 Marc Autret <autret_m@epita.fr>
14024
14025 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
14026 of defining YYERROR_VERBOSE.
14027 [AT_DATA]: $4 is now out of C declarations in the prologue.
14028
426cf563
MA
140292001-11-28 Marc Autret <autret_m@epita.fr>
14030
14031 * src/reader.c (parse_dquoted_param): New.
14032 (parse_skel_decl): Use it.
14033 * src/lex.h: Add its prototype.
14034 * src/lex.c (literalchar): Become not static.
14035
c7925b99
MA
140362001-11-28 Marc Autret <autret_m@epita.fr>
14037
14038 * src/output.h: And put its extern declaration here.
14039 * src/output.c (error_verbose): Define here.
14040 (prepare): Echo name modification.
14041 * src/getargs.h: Clean its extern declaration.
14042 * src/getargs.c (error_verbose_flag): Remove.
14043 (getargs): Remove case 'e'.
14044 * src/options.c (option_table): 'error-verbose' is now seen as simple
14045 percent option.
14046 Include output.h.
14047
14048 * src/reader.c (read_declarations): Remove case tok_include.
14049 (parse_include_decl): Remove.
14050 * src/lex.h (token_t): Remove tok_include.
14051 * src/options.c (option_table): 'include' is now a simple command line
14052 option.
14053
5b5d1929
MA
140542001-11-28 Marc Autret <autret_m@epita.fr>
14055
14056 * src/bison.simple: Adjust muscle names.
14057 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14058 * src/output.c (prepare): s/_/-/ for the muscles names.
14059 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14060
8850be4b
MA
140612001-11-28 Marc Autret <autret_m@epita.fr>
14062
14063 * src/bison.simple: Fix debug.
14064 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14065
4a38e613
AD
140662001-11-28 Akim Demaille <akim@epita.fr>
14067
14068 * src/LR0.c (shifts_new): New.
14069 (save_shifts, insert_start_shift, augment_automaton): Use it.
14070
4b35e1c1
AD
140712001-11-28 Akim Demaille <akim@epita.fr>
14072
14073 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14074 keep ruleno only.
14075
d2b04478
AD
140762001-11-28 Akim Demaille <akim@epita.fr>
14077
14078 * src/closure.c (closure): Instead of looping over word in array
14079 then bits in words, loop over bits in array.
14080
2c4c30aa
AD
140812001-11-28 Akim Demaille <akim@epita.fr>
14082
14083 * src/closure.c (closure): No longer optimize the special case
14084 where all the bits of `ruleset[r]' are set to 0, to make the code
14085 clearer.
14086
576890b7
AD
140872001-11-28 Akim Demaille <akim@epita.fr>
14088
14089 * src/closure.c (closure): `r' and `c' are new variables, used to
14090 de-obfuscate accesses to RULESET and CORE.
14091
cb487d7d
AD
140922001-11-28 Akim Demaille <akim@epita.fr>
14093
14094 * src/reduce.c (reduce_print): Use ngettext.
14095 (dump_grammar): Improve the trace accuracy.
14096
6013d43f
AD
140972001-11-28 Akim Demaille <akim@epita.fr>
14098
14099 * src/reduce.c (dump_grammar): Don't translate trace messages.
14100
cb4956ee
AD
141012001-11-28 Akim Demaille <akim@epita.fr>
14102
14103 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14104 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14105 as all tags are free'ed afterwards.
14106 From Enrico Scholz.
14107
648185ab
PE
141082001-11-27 Paul Eggert <eggert@twinsun.com>
14109
14110 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14111 use alloca when we didn't want to, and vice versa.
14112
68254a03
MA
141132001-11-27 Marc Autret <autret_m@epita.fr>
14114
9113b58f
AD
14115 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14116 initialization.
68254a03
MA
14117 * src/output.c (prepare): Remove its update.
14118
04d843a2
MA
141192001-11-27 Marc Autret <autret_m@epita.fr>
14120
14121 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14122 Use %error-verbose.
14123
d2079671 141242001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
14125
14126 * src/bison.simple: Remove YYERROR_VERBOSE using.
14127 Use %%error_verbose.
14128 (yyparse): Likewise.
14129 * src/output.c (prepare): Give its final value.
14130 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14131 * src/getargs.h: Add its extern declaration.
14132 * src/getargs.c (error_verbose_flag): New int.
14133 (getargs): Update to catch new case.
14134 * src/options.c (option_table): 'error-verbose' is a new option.
14135 (shortopts): Update.
14136
e0327bc8
AD
141372001-11-27 Akim Demaille <akim@epita.fr>
14138
14139 * src/system.h: Use intl/libgettext.h.
14140 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14141
000f1a3c
AD
141422001-11-27 Akim Demaille <akim@epita.fr>
14143
14144 * tests/torture.at (Exploding the Stack Size with Malloc):
14145 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14146
26cfe0be
AD
141472001-11-27 Akim Demaille <akim@epita.fr>
14148
14149 * src/files.c: Include error.h.
14150 Reported by Hans Aberg.
14151
f6bd5427
MA
141522001-11-26 Marc Autret <autret_m@epita.fr>
14153
d2079671 14154 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
14155 (read_declarations): Add case tok_include.
14156 * src/getargs.h (include): Add its extern definition.
14157 * src/getargs.c (include): New const char *.
14158 (getargs): Add case '-I'.
14159 * src/options.c (option_table): Add include as command line and
14160 percent option.
14161 * src/lex.h (token_t): Add tok_include.
14162
2ca209c1
AD
141632001-11-26 Akim Demaille <akim@epita.fr>
14164
14165 * src/reader.c (readgram): Make sure rules for mid-rule actions
14166 have a lineno equal to that of their host rule.
14167 Reported by Hans Aberg.
14168 * tests/regression.at (Rule Line Numbers): New.
14169
0e41b407
AD
141702001-11-26 Akim Demaille <akim@epita.fr>
14171
14172 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14173 size_ts.
14174
141752001-11-26 Akim Demaille <akim@epita.fr>
14176
14177 * src/complain.c, src/complain.h (error): Remove, provided by
14178 lib/error.[ch].
14179
e0c40012
AD
141802001-11-26 Akim Demaille <akim@epita.fr>
14181
14182 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14183 issue an error message.
14184 * tests/regression.at (Invalid %directive): New.
14185 Reported by Hans Aberg.
14186
5e147124
AD
141872001-11-26 Akim Demaille <akim@epita.fr>
14188
14189 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14190 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14191
a034c8b8
AD
141922001-11-26 Akim Demaille <akim@epita.fr>
14193
14194 * src/conflicts.c (conflicts_print): Don't complain at all when
14195 there are no reduce/reduce conflicts, and as many shift/reduce
14196 conflicts as expected.
14197 * tests/regression.at (%expect right): Adjust.
14198
c64a20f3
AD
141992001-11-23 Akim Demaille <akim@epita.fr>
14200
14201 * lib/alloca.c: Update, from fileutils.
14202
5b0d29bb
AD
142032001-11-23 Akim Demaille <akim@epita.fr>
14204
14205 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14206
722c4bfe
AD
142072001-11-23 Akim Demaille <akim@epita.fr>
14208
14209 * src/system.h: Include alloca.h.
14210 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14211
6255b435
AD
142122001-11-23 Akim Demaille <akim@epita.fr>
14213
14214 * src/print_graph.c (print_actions): Remove `rule', unused.
14215 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14216 pacify GCC's signed < unsigned warnings.
14217 * src/closure.c (itemsetsize): Likewise.
14218 * src/reader.c (symbol_list_new): Static.
14219
b29b2ed5
AD
142202001-11-23 Akim Demaille <akim@epita.fr>
14221
14222 Attaching lineno to buckets is stupid, since only one copy of each
14223 symbol is kept, only the line of the first occurrence is kept too.
14224
14225 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14226 * src/reader.c (rline_allocated): Remove, unused.
14227 (symbol_list): Have a `line' member.
14228 (symbol_list_new): New.
14229 (readgram): Use it.
14230 * src/print.c (print_grammar): Output the rule line numbers.
14231 * tests/regression.at (Solved SR Conflicts)
14232 (Unresolved SR Conflicts): Adjust.
14233 Reported by Hans Aberg.
14234
a81b1d4a
MA
142352001-11-22 Marc Autret <autret_m@epita.fr>
14236
14237 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14238
c1ecb3c1
MA
142392001-11-22 Marc Autret <autret_m@epita.fr>
14240
14241 * src/muscle_tab.c (muscle_init): Remove initialization of
14242 skeleton muscle.
14243 * src/output.c (output_master_parser): Do it here.
14244
fbe01355
AD
142452001-11-20 Akim Demaille <akim@epita.fr>
14246
14247 * po/sv.po: New.
14248 * configure.in (ALL_LINGUAS): Adjust.
14249 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14250 longer contains strings to translate.
14251
81e895c0
AD
142522001-11-19 Akim Demaille <akim@epita.fr>
14253
14254 * src/conflicts.c (conflicts_print): Add a missing \n.
14255
6bb1878b
AD
142562001-11-19 Akim Demaille <akim@epita.fr>
14257
14258 * src/nullable.c (nullable_print): New.
14259 (set_nullable): Call it when tracing.
14260 Better locality of variables.
14261
d9ec2d07
AD
142622001-11-19 Akim Demaille <akim@epita.fr>
14263
14264 * src/print.c (print_actions): Better locality of variables.
14265
720e5c1b
AD
142662001-11-19 Akim Demaille <akim@epita.fr>
14267
14268 * src/derives.c (print_derives): Fix and enrich.
14269 * src/closure.c (print_fderives): Likewise.
14270
fb908786
AD
142712001-11-19 Akim Demaille <akim@epita.fr>
14272
14273 * src/closure.c (itemsetend): Remove, replaced with...
14274 (itemsetsize): new.
14275
125ecb56
AD
142762001-11-19 Akim Demaille <akim@epita.fr>
14277
14278 * src/LR0.c (kernel_end): Remove, replaced with...
14279 (kernel_size): new.
14280
d8cf039f
AD
142812001-11-19 Akim Demaille <akim@epita.fr>
14282
14283 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14284 to clarify.
14285
7bec0760
AD
142862001-11-19 Akim Demaille <akim@epita.fr>
14287
14288 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14289
c87d4863
AD
142902001-11-19 Akim Demaille <akim@epita.fr>
14291
14292 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14293 trace messages.
14294 * src/LR0.c: Likewise.
14295 (allocate_itemsets): Use arrays instead of pointers to clarify.
14296
9bfe901c
AD
142972001-11-19 Akim Demaille <akim@epita.fr>
14298
14299 * src/getargs.c (statistics_flag): Replace with...
14300 (trace_flag): New.
14301 (longopts): Accept --trace instead of --statistics.
14302 * src/getargs.h, src/options.c: Adjust.
14303 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14304 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14305
97db7bd4
AD
143062001-11-19 Akim Demaille <akim@epita.fr>
14307
cc72668c 14308 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
14309 pointers to clarify the code.
14310 (save_reductions, save_shifts): Factor common parts of alternatives.
14311
2c5f66ed
AD
143122001-11-19 Akim Demaille <akim@epita.fr>
14313
14314 * src/LR0.c (new_state, get_state): Complete TRACE code.
14315 * src/closure.c: Include `reader.h' to get `tags', needed by the
14316 trace code.
14317 Rename the conditional DEBUG as TRACE.
14318 Output consistently TRACEs to stderr, not stdout.
14319 * src/derives.c: Likewise.
14320 * src/reduce.c: (inaccessable_symbols): Using if is better style
14321 than goto.
14322 Use `#if TRACE' instead of `#if 0' for tracing code.
14323
300f275f
AD
143242001-11-19 Akim Demaille <akim@epita.fr>
14325
14326 * src/system.h (LIST_FREE, shortcpy): New.
14327 * src/LR0.c: Use them.
14328 * src/output.c (free_itemsets, free_reductions, free_shifts):
14329 Remove, replaced by LIST_FREE.
14330
f59c437a
AD
143312001-11-19 Akim Demaille <akim@epita.fr>
14332
14333 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14334 (REDUCTIONS_ALLOC): New.
14335 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14336 allocation.
14337
6986fd9e
AD
143382001-11-19 Akim Demaille <akim@epita.fr>
14339
14340 * src/LR0.c (new_state): Complete trace code.
14341 * src/nullable.c (set_nullable): Don't translate traces.
14342
4bc30f78
AD
143432001-11-19 Akim Demaille <akim@epita.fr>
14344
14345 * src/print_graph.c (print_core): Better locality of variables.
14346 * src/print.c (print_core): Likewise.
14347
08a946e0
AD
143482001-11-19 Akim Demaille <akim@epita.fr>
14349
14350 * src/vcg.c: You do the output, so you are responsible of the
14351 handling of VCG syntax, in particular: use quotearg.
14352 * src/print_graph.c: Don't.
14353 (print_actions): Don't output the actions as part of the nodes,
14354 since that's the job of the edges.
14355 (print_state): Don't output by hand: fill the node description,
9bfe901c 14356 and ask for its output.
08a946e0 14357
f0473484
AD
143582001-11-19 Akim Demaille <akim@epita.fr>
14359
cc72668c
AD
14360 * src/bison.simple (yyparse): When verbosely reporting an error,
14361 no longer put additional quotes around token names.
f0473484
AD
14362 * tests/calc.at: Adjust.
14363
e41dc700
AD
143642001-11-19 Akim Demaille <akim@epita.fr>
14365
14366 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14367 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14368 * src/output.c: Adjust.
14369
652a871c
AD
143702001-11-19 Akim Demaille <akim@epita.fr>
14371
14372 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14373 (rule_t): this.
14374 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14375
b2ed6e58
AD
143762001-11-19 Akim Demaille <akim@epita.fr>
14377
14378 * src/gram.h (rule_t): New.
14379 (rule_table): New.
14380 (rrhs, rlhs): Remove, part of state_t.
14381 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14382 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14383 * src/reader.c, src/reduce.c: Adjust.
14384
edad7067
AD
143852001-11-19 Akim Demaille <akim@epita.fr>
14386
14387 * src/reader.c (symbols_output): New, extracted from...
14388 (packsymbols): Here.
14389 (reader): Call it.
14390
3feec034
AD
143912001-11-19 Akim Demaille <akim@epita.fr>
14392
14393 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14394 (maxrhs): this new function.
14395
ddcd5fdf
AD
143962001-11-19 Akim Demaille <akim@epita.fr>
14397
cc72668c 14398 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
14399 Adjust.
14400
bb527fc2
AD
144012001-11-19 Akim Demaille <akim@epita.fr>
14402
cc72668c 14403 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
14404 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14405 * src/lalr.c: Adjust.
14406
a845a697
AD
144072001-11-19 Akim Demaille <akim@epita.fr>
14408
14409 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14410 (set_state_table): handle the `lookaheads' members.
14411
f004bf6a
AD
144122001-11-19 Akim Demaille <akim@epita.fr>
14413
cc72668c
AD
14414 * src/lalr.h (lookaheads): Removed array, whose contents is now
14415 a member of...
f004bf6a
AD
14416 (state_t): this structure.
14417 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14418 Adjust.
14419
de326cc0
AD
144202001-11-19 Akim Demaille <akim@epita.fr>
14421
cc72668c
AD
14422 * src/lalr.h (consistent): Removed array, whose contents is now
14423 a member of...
de326cc0
AD
14424 (state_t): this structure.
14425 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14426 Adjust.
14427
90b4416b
AD
144282001-11-19 Akim Demaille <akim@epita.fr>
14429
cc72668c
AD
14430 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14431 contents are now members of...
90b4416b
AD
14432 (state_t): this structure.
14433 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14434 Adjust.
14435
9703cc49
AD
144362001-11-19 Akim Demaille <akim@epita.fr>
14437
14438 * src/lalr.h (state_t): New.
14439 (state_table): Be a state_t * instead of a core **.
14440 (accessing_symbol): Remove, part of state_t.
14441 * src/lalr.c: Adjust.
14442 (set_accessing_symbol): Merge into...
14443 (set_state_table): this.
14444 * src/print_graph.c, src/conflicts.c: Adjust.
14445
d803322e
AD
144462001-11-14 Akim Demaille <akim@epita.fr>
14447
14448 * tests/calc.at, tests/output.at, tests/regression.at,
14449 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14450 now the tests are run in private dirs, therefore AC_CLEANUP and
14451 family can be simplified to 0-ary.
14452 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14453 use abs. path to find config.h.
14454 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14455 stderr, there can be way too much random noise.
14456 Instead pass -Werror to GCC and rely on the exit status.
14457 Reported by Wolfram Wagner.
14458
3d76b07d
AD
144592001-11-14 Akim Demaille <akim@epita.fr>
14460
14461 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14462 defined only if yyoverflow is defined, to avoid `warning: unused
14463 variable `yyvs1''.
14464 Reported by The Test Suite.
14465
09b503c8
AD
144662001-11-14 Akim Demaille <akim@epita.fr>
14467
14468 * src/print.c: Include reduce.h.
14469 Reported by Hans Aberg.
14470
144712001-11-14 Akim Demaille <akim@epita.fr>
14472
14473 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14474 Revert a previous patch: these are really const.
14475 * src/conflicts.c (conflict_report): Additional useless pair of
14476 braces to pacify GCC's warnings for `if () if () {} else {}'.
14477 * src/lex.c (parse_percent_token): Replace equal_offset with
14478 arg_offset.
14479 arg is const.
14480 Be sure to strdup `arg' when used, since there is no reason for
14481 token_buffer not to change.
14482
0f37a994
AD
144832001-11-14 Akim Demaille <akim@epita.fr>
14484
14485 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14486 definition.
14487 * src/main.c (main): Use them.
14488 Suggested by Hans Aberg.
14489
d39d93b8
AD
144902001-11-12 Akim Demaille <akim@epita.fr>
14491
14492 * src/system.h (ngettext): Now that we use ngettext, be sure to
14493 provide a default definition when NLS are not used.
14494
9edcd895
AD
144952001-11-12 Akim Demaille <akim@epita.fr>
14496
14497 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14498 Use @kbd to denote user input.
14499 (Language and Grammar): ANSIfy the example.
14500 Adjust its layout for info/notinfo.
14501 (Location Tracking Calc): Output error messages to stderr.
14502 Output locations in a more GNUtically correct way.
14503 Fix a couple of Englishos.
14504 Adjust @group/@end group pairs.
14505
7da99ede
AD
145062001-11-12 Akim Demaille <akim@epita.fr>
14507
e3aa65c5 14508 %expect was not functioning at all.
7da99ede
AD
14509
14510 * src/conflicts.c (expected_conflicts): Set to -1.
14511 (conflict_report): Use ngettext.
14512 (conflicts_print): Check %expect and make its violation an error.
14513 * doc/bison.texinfo (Expect Decl): Adjust.
14514 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14515 * tests/regression.at (%expect not enough, %expect right)
14516 (%expect too much): New.
14517
ba9dda1a
AD
145182001-11-12 Akim Demaille <akim@epita.fr>
14519
14520 * tests/regression.at (Conflicts): Rename as...
14521 (Unresolved SR Conflicts): this.
14522 (Solved SR Conflicts): New.
14523
337c5bd1
AD
145242001-11-12 Akim Demaille <akim@epita.fr>
14525
14526 * src/reduce.c (print_results): Rename as...
14527 (reduce_output): This.
14528 Output to OUT, passed as argument, instead of output_obstack.
14529 (dump_grammar): Likewise.
14530 (reduce_free): New.
14531 Also free V1.
14532 (reduce_grammar): No longer call reduce_output, since...
14533 * src/print.c (print_results): do it.
14534 * src/main.c (main): Call reduce_free;
14535
c73a41af
AD
145362001-11-12 Akim Demaille <akim@epita.fr>
14537
14538 * src/conflicts.c (print_reductions): Accept OUT as argument.
14539 Output to it, not to output_obstack.
14540 * src/print.c (print_actions): Adjust.
14541
0df87bb6
AD
145422001-11-12 Akim Demaille <akim@epita.fr>
14543
14544 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14545 the result instead of using...
14546 (src_total, rrc_total, src_count, rrc_count): Remove.
14547 (any_conflicts): Remove.
14548 (print_conflicts): Split into...
14549 (conflicts_print, conflicts_output): New.
14550 * src/conflicts.h: Adjust.
14551 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 14552 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
14553 * tests/regression.at (Conflicts): New.
14554 Reported by Tom Lane.
14555
e4d3d4de
AD
145562001-11-12 Akim Demaille <akim@epita.fr>
14557
14558 * tests/regression.at (Invalid input): Remove, duplicate with
14559 ``Invalid input: 1''.
14560
6d7d248e
AD
145612001-11-12 Akim Demaille <akim@epita.fr>
14562
14563 * tests/torture.at (AT_DATA_STACK_TORTURE)
14564 (Exploding the Stack Size with Alloca)
14565 (Exploding the Stack Size with Malloc): New.
14566
e9e4c321
AD
145672001-11-12 Akim Demaille <akim@epita.fr>
14568
14569 * src/bison.simple (YYSTACK_REALLOC): New.
14570 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 14571 Reported by Per Allansson.
e9e4c321 14572
5f7e0832
AD
145732001-11-12 Pascal Bart <pascal.bart@epita.fr>
14574
14575 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14576 define CPP macro, which substitute YYSTYPE by yystype.
14577 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14578 with yyltype/YYLTYPE. This allows inclusion of the generated
14579 header within the parser if the compiler, such as GGC, accepts
14580 multiple equivalent #defines.
14581 From Akim.
14582
e3f1699f
AD
145832001-11-05 Akim Demaille <akim@epita.fr>
14584
14585 * src/reader.c (symbols_output): New, extracted from...
14586 (packsymbols): here.
14587 (reader): Adjust.
14588
65be0866
AD
145892001-11-05 Akim Demaille <akim@epita.fr>
14590
14591 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14592
e4d910bf
AD
145932001-11-05 Akim Demaille <akim@epita.fr>
14594
14595 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14596 pattern.
14597
951366c1
AD
145982001-11-05 Akim Demaille <akim@epita.fr>
14599
14600 * src/options.h (struct option_table_struct): set_flags is void*.
14601 * src/options.c (longopts): Support `--output' and `%output'.
14602 (usage): Adjust.
14603 * src/lex.h (tok_setopt): Remove, replaced with...
14604 (tok_intopt, tok_stropt): these new guys.
14605 * src/lex.c (getopt.h): Not needed.
14606 (token_buffer, unlexed_token_buffer): Not const.
14607 (percent_table): Promote `-' over `_' in directive names.
14608 Active `%name-prefix', `file-prefix', and `output'.
14609 (parse_percent_token): Accept possible arguments to directives.
14610 Promote `-' over `_' in directive names.
14611
d8988b2f
AD
146122001-11-04 Akim Demaille <akim@epita.fr>
14613
14614 * doc/bison.texinfo (Decl Summary): Split the list into
14615 `directives for grammars' and `directives for bison'.
14616 Sort'em.
14617 Add description of `%name-prefix', `file-prefix', and `output'.
14618 Promote `-' over `_' in directive names.
14619 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14620 Simplify the description of `--name-prefix'.
14621 Promote `-' over `_' in directive names.
14622 Promote `--output' over `--output-file'.
14623 Fix the description of `--defines'.
14624 * tests/output.at: Exercise %file-prefix and %output.
14625
6468d18e
AD
146262001-11-02 Akim Demaille <akim@epita.fr>
14627
14628 * doc/refcard.tex: Update.
14629
6b7e85b9
AD
146302001-11-02 Akim Demaille <akim@epita.fr>
14631
14632 * src/symtab.h (SUNDEF): New.
14633 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14634 stand for `uninitialized', instead of 0.
14635 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14636 * src/lex.c (lex): Adjust.
14637
14638 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14639 Number it 0.
14640 Let yylex return it instead of a plain 0.
14641 Reported by Dick Streefland.
14642
cd5aafcf
AD
146432001-11-02 Akim Demaille <akim@epita.fr>
14644
14645 * tests/regression.at (Mixing %token styles): New test.
14646
037ca2f1
AD
146472001-11-02 Akim Demaille <akim@epita.fr>
14648
14649 * src/reader.c (parse_thong_decl): Formatting changes.
14650 (token_translations_init): New, extracted from...
14651 (packsymbols): Here.
14652 Adjust.
14653
270a173c
AD
146542001-11-01 Akim Demaille <akim@epita.fr>
14655
14656 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14657 Check that `9foo.y' produces correct cpp guards.
14658 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14659 guards.
14660 Reported by Wwp.
14661
561f9a30
AD
146622001-11-01 Akim Demaille <akim@epita.fr>
14663
14664 * tests/regression.at (Invalid input: 2): New.
14665 * src/lex.c (unlexed_token_buffer): New.
14666 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14667 too.
14668 Reported by Wwp.
14669
f987e9d2
AD
146702001-11-01 Akim Demaille <akim@epita.fr>
14671
14672 * tests/calc.at: Catch up with 1.30.
14673 * configure.in: Bump to 1.49a.
14674 Adjust to newer Autotest.
14675
0846f581
PB
146762001-10-19 Pascal Bart <pascal.bart@epita.fr>
14677
14678 * src/conflicts.c: Move global variables rrc_total and src_total ...
14679 (print_conflicts): here.
14680 * src/output.c (output): Free global variable user_toknums.
14681 * src/lex.c (token_obstack): Become static.
14682
3c1a79b3
AD
146832001-10-18 Akim Demaille <akim@epita.fr>
14684
14685 * tests/atlocal.in (GCC): Add.
14686 * tests/calc.at: s/m4_match/m4_bmatch/.
14687 s/m4_patsubst/m4_bpatsubst/.
14688 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14689 * configure.in: AC_SUBST(GCC).
14690
5d52e7d0
MA
146912001-10-14 Marc Autret <autret_m@epita.fr>
14692
14693 * src/options.c (create_long_option_table): Fix.
14694
631aa1d3
AD
146952001-10-10 Akim Demaille <akim@epita.fr>
14696
14697 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14698
f6ec6d13
AD
146992001-10-04 Akim Demaille <akim@epita.fr>
14700
14701 * src/reader.c (parse_union_decl): Push the caracters in
14702 union_obstack, not attrs_obstack.
14703
342b8b6e
AD
147042001-10-04 Akim Demaille <akim@epita.fr>
14705
14706 Merge in the branch 1.29.
14707
14708 * src/reader.c (packsymbols): Use a temporary obstack for
14709 `%%tokendef', since output_stack is already used elsewhere.
14710
14711 2001-10-02 Akim Demaille <akim@epita.fr>
14712
14713 Bump 1.29d.
14714
14715 2001-10-02 Akim Demaille <akim@epita.fr>
14716
14717 Version 1.29c.
14718
14719 2001-10-02 Akim Demaille <akim@epita.fr>
14720
14721 * tests/regression.at (Invalid CPP headers): New.
14722 From Alexander Belopolsky.
14723 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14724
14725 2001-10-02 Akim Demaille <akim@epita.fr>
14726
14727 * tests/regression.at (Invalid input): New.
14728 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14729 Reported by Shura.
14730
14731 2001-10-02 Akim Demaille <akim@epita.fr>
14732
14733 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14734
14735 2001-10-02 Akim Demaille <akim@epita.fr>
14736
14737 * src/output.c (output_parser): Assert `skeleton'.
14738 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14739 systems.
14740 From Shura.
14741
14742 2001-10-01 Marc Autret <autret_m@epita.fr>
14743
14744 * src/lex.h: Echo modifications.
14745 * src/lex.c (unlex): Parameter is now token_t.
14746 From Hans Aberg.
14747
14748 2001-10-01 Marc Autret <autret_m@epita.fr>
14749
14750 * src/main.c: Include lex.h.
14751 From Hans Aberg.
14752
14753 2001-09-29 Akim Demaille <akim@epita.fr>
14754
14755 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14756
14757 2001-09-28 Akim Demaille <akim@epita.fr>
14758
14759 * tests/testsuite.at: Update to newer Autotest.
14760 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14761
14762 2001-09-27 Akim Demaille <akim@epita.fr>
14763
14764 Position independent wrapper.
14765
14766 * tests/bison: Remove.
14767 * tests/bison.in: New.
14768 * configure.in: Adjust.
14769
14770 2001-09-27 Paul Eggert <eggert@twinsun.com>
14771
14772 Port quotearg fixes from tar 1.13.24.
14773
14774 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14775 tm to be declared.
14776 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14777 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14778
14779 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14780 * m4/mbrtowc.m4: New file.
14781 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14782 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14783
14784 2001-09-27 Akim Demaille <akim@epita.fr>
14785
14786 Bump to 1.29c.
14787
14788 2001-09-27 Akim Demaille <akim@epita.fr>
14789
14790 Version 1.29b.
14791
14792 2001-09-25 Akim Demaille <akim@epita.fr>
14793
14794 * src/system.h: Include `xalloc.h'.
14795 Remove it from the C files.
14796 * src/files.c (output_files): Free the obstacks.
14797 * src/lex.c (init_lex): Rename as...
14798 (lex_init): this.
14799 (lex_free): New.
14800 * src/main.c (main): Use it.
14801
14802 2001-09-24 Marc Autret <autret_m@epita.fr>
14803
14804 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14805 to output informations in fout (FILE*).
14806 (open_graph, close_graph): Likewise.
14807 (output_graph, output_edge, output_node): Likewise.
14808 * src/vcg.h: Update function prototypes.
14809 * src/print_graph.c (print_graph): Open output graph file.
14810 (print_actions): Adjust.
14811 * src/files.h: Remove extern declaration.
14812 * src/files.c: Remove graph_obstack declaration.
14813 (open_files): Remove graph_obstack initialization.
14814 (output_files): Remove graph_obstack saving.
14815
14816 2001-09-24 Marc Autret <autret_m@epita.fr>
14817
14818 * src/files.c (compute_output_file_names): Fix.
14819
14820 2001-09-24 Marc Autret <autret_m@epita.fr>,
14821 Akim Demaille <akim@epita.fr>
14822
14823 * src/reader.c (reader): Remove call to free_symtab ().
14824 * src/main.c (main): Call it here.
14825 Include symtab.h.
14826 * src/conflicts.c (initialize_conflicts): Rename as...
14827 (solve_conflicts): this.
14828 * src/print.c (print_core, print_actions, print_state)
14829 (print_grammar): Dump to a file instead a `output_obstack'.
14830 (print_results): Dump `output_obstack', and then proceed with the
14831 FILE *.
14832 * src/files.c (compute_output_file_names, close_files): New.
14833 (output_files): Adjust.
14834 * src/main.c (main): Adjust.
14835
14836 2001-09-23 Marc Autret <autret_m@epita.fr>
14837
14838 * src/files.c (compute_header_macro): Computes header macro name
14839 from spec_defines_file when given.
14840
14841 2001-09-23 Marc Autret <autret_m@epita.fr>
14842
14843 * src/files.c (output_files): Add default extensions.
14844
14845 2001-09-22 Akim Demaille <akim@epita.fr>
14846
14847 * src/conflicts.c (finalize_conflicts): Rename as...
14848 (free_conflicts): this.
14849
14850 2001-09-22 Akim Demaille <akim@epita.fr>
14851
14852 * src/gram.c (gram_free): Rename back as...
14853 (dummy): this.
14854 (output_token_translations): Free `token_translations'.
14855 * src/symtab.c (free_symtab): Free the tag field.
14856
14857 2001-09-22 Akim Demaille <akim@epita.fr>
14858
14859 Remove `translations' as it is always set to true.
14860
14861 * src/gram.h: Adjust.
14862 * src/reader.c (packsymbols, parse_token_decl): Adjust
14863 * src/print.c (print_grammar): Adjust.
14864 * src/output.c (output_token_translations): Adjust.
14865 * src/lex.c (lex): Adjust.
14866 * src/gram.c: Be sure the set pointers to NULL.
14867 (dummy): Rename as...
14868 (gram_free): this.
14869
14870 2001-09-22 Akim Demaille <akim@epita.fr>
14871
14872 * configure.in: Invoke AM_LIB_DMALLOC.
14873 * src/system.h: Use dmalloc.
14874 * src/LR0.c: Be sure to have pointers initialized to NULL.
14875 (allocate_itemsets): Allocate kernel_items only if needed.
14876
14877 2001-09-22 Akim Demaille <akim@epita.fr>
14878
14879 * configure.in: Bump to 1.29b.
14880 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14881 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14882 need xmalloc.c in calc.y.
14883 From Pascal Bart.
14884
14885 2001-09-21 Akim Demaille <akim@epita.fr>
14886
14887 Version 1.29a.
14888 * Makefile.maint, config/config.guess, config/config.sub,
14889 * config/missing: Update from masters.
14890 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14891 upon package.m4.
14892 * configure.in (ALL_LINGUAS): Add `tr'.
14893
14894 2001-09-21 Akim Demaille <akim@epita.fr>
14895
14896 * tests/Makefile.am (package.m4): Move to...
14897 ($(srcdir)/$(TESTSUITE)): here.
14898
14899 2001-09-20 Akim Demaille <akim@epita.fr>
14900
14901 * src/complain.c: No longer try to be standalone: use system.h.
14902 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14903 * src/complain.h: Likewise.
14904 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14905 Remove the unused variable `n'.
14906 From Albert Chin-A-Young.
14907
14908 2001-09-18 Marc Autret <autret_m@epita.fr>
14909
14910 * doc/bison.1: Update.
14911 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14912 descriptions.
14913 (Option Cross Key): Update.
14914 Add --graph.
14915
14916 2001-09-18 Marc Autret <autret_m@epita.fr>
14917
14918 * tests/regression.at: New test (comment in %union).
14919
14920 2001-09-18 Marc Autret <autret_m@epita.fr>
14921
14922 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14923 do that.
14924 Reported by Keith Browne.
14925
14926 2001-09-18 Marc Autret <autret_m@epita.fr>
14927
14928 * tests/output.at: Add tests for --defines and --graph.
14929
14930 2001-09-18 Marc Autret <autret_m@epita.fr>
14931
14932 * tests/output.at: Removes tests of %{header,src}_extension features.
14933
14934 2001-09-18 Akim Demaille <akim@epita.fr>
14935
14936 * tests/Makefile.am (package.m4): New.
14937 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14938 (_AT_CHECK_CALC_ERROR): Likewise.
14939 Factor the `, ' part of verbose error messages.
14940
14941 2001-09-18 Marc Autret <autret_m@epita.fr>
14942
14943 * src/getargs.c (longopts): Declare --defines and --graph as options
14944 with optional arguments.
14945 * src/files.h: Add extern declarations.
14946 * src/files.c (spec_graph_file, spec_defines_file): New.
14947 (output_files): Update.
14948 Remove CPP-outed code.
14949
14950 2001-09-18 Marc Autret <autret_m@epita.fr>
14951
14952 Turn off %{source,header}_extension feature.
14953
14954 * src/files.c (compute_exts_from_gf): Update.
14955 (compute_exts_from_src): Update.
14956 (output_files): CPP-out useless code.
14957 * src/files.h: Remove {header,source}_extension extern declarations.
14958 * src/reader.c (parse_dquoted_param): CPP-out.
14959 (parse_header_extension_decl): Remove.
14960 (parse_source_extension_decl): Remove.
14961 (read_declarations): Remove cases tok_{hdrext,srcext}.
14962 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14963 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14964
14965 2001-09-10 Akim Demaille <akim@epita.fr>
14966
14967 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14968 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14969 (AT_CHECK_OUTPUT): this.
14970 Merely check ls' exit status, its output is useless.
14971
14972 2001-09-10 Akim Demaille <akim@epita.fr>
14973
14974 * tests/calc.at: Use m4_match.
14975 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14976
14977 2001-09-10 Marc Autret <autret_m@epita.fr>,
14978 Akim Demaille <akim@epita.fr>
14979
14980 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14981 enum color_e.
14982 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14983 to `normal'.
14984 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14985 * src/lex.h: Adjust prototype.
14986 (token_t): Add `tok_undef'.
14987 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14988 (parse_percent_token): Now returns token_t.
14989 Add default statement in switch.
14990 (lex): Separate `c' as an input variable, from the token_t result
14991 part.
14992 (unlexed): Is a token_t.
14993
14994 2001-09-10 Akim Demaille <akim@epita.fr>
14995
14996 * configure.in: Bump to 1.29a.
14997
14998 2001-09-07 Akim Demaille <akim@epita.fr>
14999
15000 Version 1.29.
15001
15002 2001-08-30 Akim Demaille <akim@epita.fr>
15003
15004 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
15005 * m4/atconfig.m4: Remove.
15006 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
15007 * tests/bison: New.
15008 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
15009 m4_if, m4_patsubst, and m4_regexp.
15010 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
15011 `input' file instead of echo.
15012
15013 2001-08-29 Akim Demaille <akim@epita.fr>
15014
15015 Bump to 1.28e.
15016
15017 2001-08-29 Akim Demaille <akim@epita.fr>
15018
15019 Version 1.28d.
15020
15021 2001-08-29 Paul Eggert <eggert@twinsun.com>
15022
15023 * src/bison.simple (yyparse): Don't take the address of an
15024 item before the start of an array, as that doesn't conform to
15025 the C Standard.
15026
15027 2001-08-29 Robert Anisko <anisko_r@epita.fr>
15028
15029 * doc/bison.texinfo (Location Tracking Calc): New node.
15030
15031 2001-08-29 Paul Eggert <eggert@twinsun.com>
15032
15033 * src/output.c (output): Do not define const, as this now
15034 causes more problems than it cures.
15035
15036 2001-08-29 Akim Demaille <akim@epita.fr>
15037
15038 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15039 the nodes.
15040 Be sure to tag the `detailmenu'.
15041
15042 2001-08-29 Akim Demaille <akim@epita.fr>
15043
15044 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15045 download in a tmp dir.
15046
15047 2001-08-28 Marc Autret <autret_m@epita.fr>
15048
15049 * config/depcomp: New file.
15050
15051 2001-08-28 Marc Autret <autret_m@epita.fr>
15052
15053 * doc/bison.1 (mandoc): Adjust.
15054 From Juan Manuel Guerrero.
15055
15056 2001-08-28 Marc Autret <autret_m@epita.fr>
15057
15058 * src/print_graph.c (print_state): Fix.
15059
15060 2001-08-27 Marc Autret <autret_m@epita.fr>
15061
15062 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15063 char * members.
15064 Echo modifications to the functions prototypes.
15065 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15066
15067 2001-08-27 Marc Autret <autret_m@epita.fr>
15068
15069 * src/vcg.c: Include `xalloc.h'.
15070 (add_colorentry): New.
15071 (add_classname): New.
15072 (add_infoname): New.
15073 * src/vcg.h: Add new prototypes.
15074
15075 2001-08-27 Akim Demaille <akim@epita.fr>
15076
15077 * Makefile.maint: Sync. again with CVS Autoconf.
15078
15079 2001-08-27 Akim Demaille <akim@epita.fr>
15080
15081 * Makefile.maint: Formatting changes.
15082 (po-update, cvs-update, update): New targets.
15083 (AMTAR): Remove.
15084
15085 2001-08-27 Akim Demaille <akim@epita.fr>
15086
15087 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15088 * Makefile.maint: Sync. with CVS Autoconf.
15089
15090 2001-08-27 Marc Autret <autret_m@epita.fr>
15091
15092 * src/vcg.h (struct infoname_s): New.
15093 (struct colorentry_s): New.
15094 (graph_s): New fields {vertical,horizontal}_order in structure.
15095 Add `infoname' field.
15096 Add `colorentry' field;
15097 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15098 (G_HORIZONTAL_ORDER): New.
15099 (G_INFONAME): New.
15100 (G_COLORENTRY): New.
15101 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15102 Add output of `infoname'.
15103 Add output of `colorentry'.
15104
15105 2001-08-27 Marc Autret <autret_m@epita.fr>
15106
15107 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15108 This one shadowed a global parameter.
15109
15110 2001-08-24 Marc Autret <autret_m@epita.fr>
15111
15112 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15113 instead of `unsigned'.
15114 (print_state): Do not call obstack_object_size () in obstack_grow ()
15115 to avoid macro variables shadowing.
15116
15117 2001-08-23 Marc Autret <autret_m@epita.fr>
15118
15119 * src/lex.c (percent_table): Typo: s/naem/name/.
15120 Add graph option.
15121 Normalize new options declarations.
15122
15123 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15124
15125 * tests/suite.at: Exercise %header_extension and %source_extension.
15126
15127 2001-08-16 Marc Autret <autret_m@epita.fr>
15128
15129 * src/reader.c (parse_dquoted_param): New.
15130 (parse_header_extension_decl): Use it.
15131 (parse_source_extension_decl): Likewise.
15132
15133 2001-08-16 Marc Autret <autret_m@epita.fr>
15134
15135 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15136 (get_xxxx_str): Use assert () instead of complain ().
15137 Remove return invokations in default cases.
15138 (get_decision_str): Modify default behaviour. Remove second argument.
15139 Echo modifications on calls.
15140 (output_graph): Fix.
15141
15142 2001-08-16 Marc Autret <autret_m@epita.fr>
15143
15144 * src/getargs.c (usage): Update with ``-g, --graph''.
15145
15146 2001-08-16 Marc Autret <autret_m@epita.fr>
15147
15148 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15149 (Option Cross Key): Likewise.
15150 * doc/bison.1: Update.
15151
1c8c2190
PB
151522001-09-25 Pascal Bart <pascal.bart@epita.fr>
15153
15154 * src/output.c (output_master_parser): Don't finish action_obstack.
15155 (output_parser): Don't care about the muscle action, here.
15156 (prepare): Copy the action_obstack in the action muscle.
15157 (output): Free action_obstack.
15158
180d45ba
PB
151592001-09-23 Pascal Bart <pascal.bart@epita.fr>
15160
15161 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15162 will contain `%union' declaration.
15163 (parse_union_decl): Delete #line directive output.
15164 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15165 informations about %union.
15166 (parse_union_decl): Copy the union_obstack in the muscle stype.
15167 * src/bison.simple: Add new #line directive.
15168 Add typdef %%stype YYSTYPE.
15169
c51d1a19
PB
151702001-09-23 Pascal Bart <pascal.bart@epita.fr>
15171
15172 * src/bison.simple: Add new `#line' directive.
15173
6f9344da
PB
151742001-09-22 Pascal Bart <pascal.bart@epita.fr>
15175
15176 * src/bison.simple: New `#line' directive.
15177 * src/output.c (output_parser): Support new dynamic muscle input_line.
15178
652def80
MA
151792001-09-22 Marc Autret <autret_m@epita.fr>
15180
15181 * src/output.c (output_master_parser): New.
15182 (output_parser): Be more re-entrant.
15183
25b222fa
MA
151842001-09-21 Marc Autret <autret_m@epita.fr>
15185
15186 * src/reader.c (copy_definition, parse_union_decl): Update and use
15187 `linef' muscle.
15188 (copy_action): Likewise.
15189 Use obstack_1grow ().
15190 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15191
6bc35ae5
MA
151922001-09-21 Marc Autret <autret_m@epita.fr>
15193
15194 * src/options.c (option_table): Adjust.
15195 * src/lex.c (parse_percent_token): Fix.
15196
c0629aa1
PB
151972001-09-20 Pascal Bart <pascal.bart@epita.fr>
15198
15199 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 15200
82b6d266
PB
152012001-09-20 Pascal Bart <pascal.bart@epita.fr>
15202
15203 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15204 is now an option_table_struct*.
15205 (option_strcmp): New function option_strcmp.
15206 (parse_percent_token): Call option_strcmp.
15207 * src/getargs.c (xalloc.h, options.h): Include it.
15208 (getargs): Call create_long_option_table.
15209 (getargs): Free longopts at the end of the function.
15210 (shortopts): Move in options.c.
15211 * src/options.c (create_long_option_table): New function. Convert
15212 information from option_table to option structure.
15213 * src/reader.c (options.h): Include it.
15214
15215 * src/Makefile.am: Adjust.
15216 * src/options.c (option_table): Create from longopts and percent_table.
15217 * src/getargs.c (longopts): Delete.
15218 * src/lex.c (struct percent_table_struct): Delete.
15219 (percent_table): Delete.
15220 (options.h): Include it.
15221 * src/options.c: Create.
15222 * src/options.h: Create.
15223 Declare enum opt_access_e.
15224 Define struct option_table_struct.
15225
75f5aaea
MA
152262001-09-20 Marc Autret <autret_m@epita.fr>
15227
15228 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15229 sections of Bison.
15230
f508cb0a
PB
152312001-09-19 Pascal Bart <pascal.bart@epita.fr>
15232
15233 * src/bison.simple: s/%%filename/%%skeleton.
15234 * src/muscle_tab.c (getargs.h): Include it.
15235 (muscle_init): Insert new muscle skeleton.
15236
13105fc1
PB
152372001-09-18 Pascal Bart <pascal.bart@epita.fr>
15238
15239 * src/output.c (output_parser): Delete unused variable actions_dumped.
15240
b0c4483e
PB
152412001-09-07 Pascal Bart <pascal.bart@epita.fr>
15242
15243 * src/output.c (output): Delete call to reader_output_yylsp.
15244 * src/reader.c (reader): Likewise.
ba0fe3c7 15245 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 15246
11d82f03
MA
152472001-09-02 Marc Autret <autret_m@epita.fr>
15248
15249 * src/reader.c: Include muscle_tab.h.
15250 (parse_union_decl): Update.
15251 (parse_macro_decl): Rename parse_muscle_decl.
15252 Update to use renamed functions and variable.
15253 (read_declarations, copy_action, read_additionnal_code, : Updated
15254 with correct variables and functions names.
15255 (packsymbols, reader): Likewise.
342b8b6e 15256
11d82f03 15257 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 15258
11d82f03
MA
15259 * src/output.c: Include muscle_tab.h
15260 In all functions using macro_insert, change by using muscle_insert ().
15261 (macro_obstack): Rename muscle_obstack.
15262 Echo modifications in the whole file.
15263 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15264 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15265 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15266
15267 * src/muscle_tab.h: Update double inclusion macros.
15268 (macro_entry_s): Rename muscle_entry_s.
15269 Update prototypes.
342b8b6e 15270
11d82f03
MA
15271 * src/muscle_tab.c: Include muscle_tab.h.
15272 Rename macro_tabble to muscle_table.
15273 (mhash1, mhash2, mcmp): Use muscle_entry.
15274 (macro_init): Rename muscle_init. Update.
15275 (macro_insert): Rename muscle_insert. Update.
15276 (macro_find): Rename muscle_find. Update.
15277
15278 * src/main.c: Include muscle_tab.h.
15279 (main): Call muscle_init ().
15280 * src/Makefile.am (bison_SOURCES): Echo modifications.
15281
93a37297
MA
152822001-09-02 Marc Autret <autret_m@epita.fr>
15283
f753cd62 15284 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 15285
f753cd62
MA
15286 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15287
152882001-09-02 Marc Autret <autret_m@epita.fr>
15289
15290 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 15291
682d48cd
PB
152922001-09-01 Pascal Bart <pascal.bart@epita.fr>
15293
342b8b6e 15294 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
15295 filename.
15296
087c8fda
MA
152972001-09-01 Marc Autret <autret_m@epita.fr>
15298
15299 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15300 to an explicit value to activate the feature. We do it here.
15301
dda680cb
PB
153022001-08-31 Pascal Bart <pascal.bart@epita.fr>
15303
15304 * src/output.c (prepare): Delete the `filename' muscule insertion.
15305 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15306 (parse_union_decl): Likewise.
15307 * src/macrotab.c (macro_init): Initialize filename by infile.
15308
9e644e64
MA
153092001-08-31 Marc Autret <autret_m@epita.fr>
15310
15311 * src/bison.simple (YYLSP_NEEDED): New definition.
15312 * src/output.c (prepare): Add macro insertion of `locations_flag'
15313
17da6427
PB
153142001-08-31 Pascal Bart <pascal.bart@epita.fr>
15315
15316 * src/output.c (prepare): Delete insertion of previous muscles,
15317 and insert the `prefix' muscles.
15318 * src/macrotab.c (macro_init): Likewise.
15319 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 15320 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
15321 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15322 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 15323 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
15324 name_prefix.
15325
e8cb70b9
PB
153262001-08-31 Pascal Bart <pascal.bart@epita.fr>
15327
15328 * src/main.c (main): Standardize.
15329 * src/output.c (output_table_data, output_parser): Likewise.
15330 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15331
63c2d5de
MA
153322001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15333
342b8b6e 15334 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
15335 %%epilogue.
15336 * src/output.c (output): Rename %%declarations to %%prologue.
15337 * src/bison.simple: Echo modifications.
342b8b6e 15338
d8cb5183
MA
153392001-08-31 Marc Autret <autret_m@epita.fr>
15340
15341 * src/reader.c (readgram): CleanUp.
15342 (output_token_defines): Likewise.
15343 (packsymbols): Likewise.
15344 (reader): Likewise.
15345 * src/output.c (output): CPP-out useless code.
15346
6c686258
PB
153472001-08-31 Pascal Bart <pascal.bart@epita.fr>
15348
342b8b6e 15349 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
15350 output_trailers and output_headers.
15351 * src/output.h: Remove obsolete functions prototypes of output_headers
15352 and output_trailers.
15353
8f451ef7
PB
153542001-08-30 Pascal Bart <pascal.bart@epita.fr>
15355
15356 * src/main.c: Include macrotab.h.
342b8b6e 15357 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
15358 Adjust functions prototypes.
15359 * src/macrotab.c (macro_insert): Constify key and value.
15360 (macro_find): Constify key.
15361 (macro_insert): Include 'xalloc.h'
15362 (macro_insert): Use XMALLOC.
15363 (macro_find): Constify return value.
15364 * src/output.c (output_table_data): Rename table to table_data.
15365 (output_parser): Constify macro_key, macro_value.
15366
997b6fd0 153672001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
15368
15369 * src/reader.c (parse_skel_decl): New.
342b8b6e 15370 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
15371 * src/lex.h (token_t): New token `tok_skel'.
15372 * src/lex.c (percent_table): Add skeleton option entry.
15373 Standardize.
15374
ff48177d
MA
153752001-08-29 Marc Autret <autret_m@epita.fr>
15376
15377 * src/bison.simple: Add %%user_code directive at the end.
15378 * src/reader.c (read_additionnal_code): New.
15379 (reader): Use it.
15380 * src/output.c (output_program): Remove.
15381 (output): Update.
15382
b33160bf
MA
153832001-08-28 Marc Autret <autret_m@epita.fr>
15384
15385 * src/output.c (output_actions): Clean up.
4e5caae2 15386 (output_gram): CPP-out useless code.
b33160bf
MA
15387 * src/reader.c (reader): Clean up, CPP-out useless code.
15388
d1a2daf7
PB
153892001-08-28 Pascal Bart <pascal.bart@epita.fr>
15390
342b8b6e 15391 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 15392 directive.
d1a2daf7
PB
15393 * src/bison.simple: Add `%%definitions'.
15394
2b763dfe
MA
153952001-08-28 Marc Autret <autret_m@epita.fr>
15396
15397 * config/depcomp: New file.
15398
f1a87ef6
PE
153992001-08-27 Paul Eggert <eggert@twinsun.com>
15400
15401 * src/bison.simple (yyparse): Don't take the address of an
15402 item before the start of an array, as that doesn't conform to
15403 the C Standard.
15404
82e236e2
RA
154052001-08-27 Robert Anisko <robert.anisko@epita.fr>
15406
f1a87ef6 15407 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
15408 obstack. It was done too late here.
15409
15410 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15411 completely wrong.
15412 (reader): Initialize the macro obstack here, since we need it to grow
15413 '%define' directives.
15414
15415 * src/reader.h: Declare the macro obstack as extern.
15416
b0cfa28a
RA
154172001-08-27 Robert Anisko <robert.anisko@epita.fr>
15418
15419 * src/output.c (output_parser): Fix. Store single '%' characters in
15420 the output obstack instead of throwing them away.
15421
6fc74234
AD
154222001-08-27 Akim Demaille <akim@epita.fr>
15423
15424 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15425
9c76d118
RA
154262001-08-25 Robert Anisko <robert.anisko@epita.fr>
15427
15428 * lib/Makefile.am: Adjust.
15429
a8289c62
RA
154302001-08-25 Robert Anisko <robert.anisko@epita.fr>
15431
15432 * src/bison.simple: Update and add '%%' directives.
15433
b6610515
RA
154342001-08-25 Robert Anisko <robert.anisko@epita.fr>
15435
15436 * src/reader.c (reader): Remove calls to 'output_headers' and
15437 'output_trailers'. Remove some C output.
15438 (readgram): Disable a piece of code that was writing a default
15439 definition for 'YYSTYPE'.
15440 (reader_output_yylsp): Remove.
15441 (packsymbols): Output token defintions to a macro.
15442 (copy_definition): Disable C output.
6fc74234 15443
b6610515
RA
15444 * src/reader.c (parse_macro_decl): New function used to parse macro
15445 declarations.
15446 (copy_string2): Put the body of copy_string into this new function.
15447 Add a parameter to let the caller choose whether he wants to copy the
15448 string delimiters or not.
15449 (copy_string): Be a simple call to copy_string2 with the last argument
15450 bound to true.
15451 (read_declarations): Add case for macro definition.
15452 (copy_identifier): New.
6fc74234 15453 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
15454 rather than lex.
15455
26f609ff
RA
154562001-08-25 Robert Anisko <robert.anisko@epita.fr>
15457
15458 * src/output.c (prepare): Add prefixed names.
15459 (output_parser): Output semantic actions.
15460 (output_parser): Fix bug on '%%line' directives.
6fc74234 15461
26f609ff
RA
15462 * src/output.c (output_headers): Remove. The C code printed by this
15463 function should now be in the skeletons.
15464 (output_trailers): Remove.
15465 (output): Disable call to 'reader_output_yylsp'.
15466 (output_rule_data): Do not output tables to the table obstack.
15467
15468 * src/output.c: Remove some C dedicated output.
15469 Improve the use of macro and output obstacks.
15470 (output_defines): Remove.
6fc74234 15471
26f609ff
RA
15472 * src/output.c (output_token_translations): Associate 'translate'
15473 table with a macro. No output to the table obstack.
15474 (output_gram): Same for 'rhs' and 'prhs'.
15475 (output_stos): Same for 'stos'.
15476 (output_rule_data): Same for 'r1' and 'r2'.
15477 (token_actions): Same for 'defact'.
15478 (goto_actions): Same for 'defgoto'.
15479 (output_base): Same for 'pact' and 'pgoto'.
15480 (output_table): Same for 'table'.
15481 (output_check): Same for 'check'.
6fc74234 15482
26f609ff
RA
15483 * src/output.c (output_table_data): New function.
15484 (output_short_table): Remove.
15485 (output_short_or_char_table): Remove.
6fc74234 15486
26f609ff
RA
15487 * src/output.c (output_parser): Replace most of the skeleton copy code
15488 with something new. Skeletons are now processed character by character
15489 rather than line by line, and Bison looks for '%%' macros. This is the
15490 first step in making Bison's output process (a lot) more flexible.
15491 (output_parser): Use the macro table.
15492
6f43b113
RA
154932001-08-25 Robert Anisko <robert.anisko@epita.fr>
15494
15495 * src/main.c (main): Initialize the macro table.
15496
dd3127cf
RA
154972001-08-25 Robert Anisko <robert.anisko@epita.fr>
15498
15499 * src/lex.c (percent_table): Add tok_define.
15500 * src/lex.h: Add tok_define.
15501
aa321494
RA
155022001-08-25 Robert Anisko <robert.anisko@epita.fr>
15503
15504 * src/macrotab.c: New file.
15505 * src/macrotab.h: New file.
15506 * src/Makefile.am: Update.
15507
68bd3b6b
RA
155082001-08-25 Robert Anisko <robert.anisko@epita.fr>
15509
15510 * lib/hash.c: New file.
15511 * lib/hash.h: New file.
15512 * lib/Makefile.am: Update.
15513
45f8dd1e
AD
155142001-08-15 Akim Demaille <akim@epita.fr>
15515
15516 Version 1.28c.
15517
40a64a7a 155182001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
15519
15520 * src/reader.c (readgram): Indent output macro YYSTYPE.
15521 (packsymbols): Likewise.
15522 (output_token_defines): Likewise.
15523 * src/files.c: Standardize.
15524 (compute_header_macro): New.
15525 (defines_obstack_save): New. Use compute_header_macro.
15526 (output_files): Update. Use defines_obstack_save.
15527
f9a8293a
AD
155282001-08-15 Akim Demaille <akim@epita.fr>
15529
15530 * doc/bison.texinfo (Table of Symbols): Document
15531 YYSTACK_USE_ALLOCA.
15532
150ca7a7
AD
155332001-08-15 Akim Demaille <akim@epita.fr>
15534
15535 * missing: Update from CVS Automake.
15536 * config/config.guess, config/config.sub, config/texinfo.tex:
15537 Update from gnu.org.
15538
69b5cec4
AD
155392001-08-15 Akim Demaille <akim@epita.fr>
15540
15541 * Makefile.maint: Sync with CVS Autoconf.
15542
f2b5126e
PB
155432001-08-14 Pascal Bart <pascal.bart@epita.fr>
15544
69b5cec4 15545 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
15546 `fdl.texi'.
15547 * doc/fdl.texi: Add to package.
15548
4ecbf796
MA
155492001-08-14 Marc Autret <autret_m@epita.fr>
15550
15551 Turn on %{source,header}_extension features.
15552
69b5cec4 15553 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
15554 source_extension.
15555 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 15556 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
15557 between options.
15558
95fb5662
MA
155592001-08-14 Marc Autret <autret_m@epita.fr>
15560
15561 * src/files.c (compute_base_names): Add extensions computing when
15562 `--file-prefix' used.
15563 Standardize function calls.
15564
78d09da9
MA
155652001-08-13 Marc Autret <autret_m@epita.fr>
15566
69b5cec4 15567 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
15568 defining it (defined but null disables alloca).
15569
5a009f2c
MA
155702001-08-13 Marc Autret <autret_m@epita.fr>
15571
15572 * src/bison.simple (_yy_memcpy): CPP reformat.
15573
1e41465a
PB
155742001-08-13 Pascal Bart <pascal.bart@epita.fr>
15575
15576 * tests/atconfig.in (CPPFLAGS): Fix.
15577
c67a198d
PB
155782001-08-10 Pascal Bart <pascal.bart@epita.fr>
15579
79282c6c 15580 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
15581 `gpl.texi'.
15582 * doc/gpl.texi: Add to package.
15583
09a6de7e
MA
155842001-08-10 Marc Autret <autret_m@epita.fr>
15585
15586 * src/print_graph.h: Fix.
15587 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15588
b77b9ee0
AD
155892001-08-10 Akim Demaille <akim@epita.fr>
15590
15591 * src/system.h: Provide default declarations for stpcpy, strndup,
15592 and strnlen.
15593
3e259915
MA
155942001-08-10 Robert Anisko <anisko_r@epita.fr>
15595
15596 * doc/bison.texinfo (Locations): Update @$ stuff.
15597
ca96bc2d
MA
155982001-08-09 Robert Anisko <anisko_r@epita.fr>
15599
15600 * src/bison.simple (YYLLOC_DEFAULT): Update.
15601 (yyparse): Adjust.
15602
fdc6758b
MA
156032001-08-08 Marc Autret <autret_m@epita.fr>
15604
b77b9ee0 15605 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
15606 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15607 Reported by Fabrice Bauzac.
957d4dbf 15608
600cad3b
MA
156092001-08-08 Marc Autret <autret_m@epita.fr>
15610
15611 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15612 * src/vcg.c (output_node): Fix.
15613 * src/vcg.h: Cleanup.
15614 * src/print_graph.c: Add comments.
b77b9ee0 15615 (node_output_size): New global variable. Simplify the formatting of
600cad3b 15616 the VCG graph output.
b77b9ee0 15617 (print_actions): Unused code is now used. It notifies the final state
600cad3b 15618 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 15619 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
15620 blue.
15621 Get the current node name and node_obstack by argument.
15622 (node_obstack): New variable.
15623 (print_state): Manage node_obstack.
15624 (print_core): Use node_obstack given by argument.
15625 A node is not only computed here but in print_actions also.
15626 (print_graph): CPP out useless code instead of commenting it.
15627
976e528f
AD
156282001-08-07 Pascal Bart <pascal.bart@epita.fr>
15629
15630 * tests/atconfig.in (CPPFLAGS): Fix.
15631
20e8e5ca
AD
156322001-08-07 Akim Demaille <akim@epita.fr>
15633
15634 * src/print_graph.c (quote): New.
15635 (print_core): Use it.
15636
957d4dbf 156372001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 15638
3e3da797
AD
15639 * src/vcg.c (complain.h): Include it.
15640 Unepitaize `return' invocations.
c4b66126 15641 [NDEBUG] (main): Remove.
79282c6c 15642 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
15643 * src/files.c (open_files): Initialize graph_obstack.
15644 * src/print_graph.c (print_actions): CPP out useless code.
15645 (print_core): Don't output the last `\n' in labels.
15646 Use `quote'.
15647 * src/files.c (output_files): Output the VCG file.
15648 * src/main.c (main): Invoke print_graph ();
3e3da797 15649
957d4dbf 156502001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
15651
15652 Automaton VCG graph output.
15653 Using option ``-g'' or long option ``--graph'', you can generate
15654 a gram_filename.vcg file containing a VCG description of the LALR (1)
15655 automaton of your grammar.
15656
15657 * src/main.c: Call to print_graph() function.
15658 * src/getargs.h: Update.
15659 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15660 (graph_flag): New flag.
15661 (longopts): Update.
15662 (getargs): Add case `g'.
15663 * src/files.c (graph_obstack): New obstack struct.
15664 (open_files): Initialize new obstack.
15665 (output_files): Saves graph_obstack if required.
15666 * src/files.h (graph_obstack): New extern declaration.
15667 * src/Makefile.am: Add new source files.
15668
927c1557 156692001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
15670
15671 * src/print_graph.c, src/print_graph.h (graph): New.
15672 * src/vcg.h: New file.
15673 * src/vcg.c: New file, VCG graph handling.
15674
7333d403
AD
156752001-08-06 Marc Autret <autret_m@epita.fr>
15676
15677 Add of %source_extension and %header_extension which specify
15678 the source or/and the header output file extension.
15679
15680 * src/files.c (compute_base_names): Remove initialisation of
15681 src_extension and header_extension.
15682 (compute_exts_from_gf): Update.
15683 (compute_exts_from_src): Update.
15684 (output_files): Update.
15685 * src/reader.c (parse_header_extension_decl): New.
15686 (parse_source_extension_decl): New.
15687 (read_declarations): New case statements for the new tokens.
15688 * src/lex.c (percent_table): Add entries for %source_extension
15689 and %header_extension.
15690 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15691
84163231
AD
156922001-08-06 Marc Autret <autret_m@epita.fr>
15693
15694 * configure.in: Bump to 1.28c.
15695 * doc/bison.texinfo: Texinfo thingies.
15696
8303fc42
AD
156972001-08-04 Pascal Bart <pascal.bart@epita.fr>
15698
15699 * tests/atconfig.in (CPPFLAGS): Add.
15700 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15701
70a84437
AD
157022001-08-03 Akim Demaille <akim@epita.fr>
15703
15704 Version 1.28b.
15705
2ce10144
AD
157062001-08-03 Akim Demaille <akim@epita.fr>
15707
15708 * tests/Makefile.am (check-local): Ship testsuite.
15709 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15710 Include `string.h'.
15711
1e3e4bc1
AD
157122001-08-03 Akim Demaille <akim@epita.fr>
15713
15714 * configure.in: Try using -Wformat when compiling.
15715
42b45b7f
AD
157162001-08-03 Akim Demaille <akim@epita.fr>
15717
15718 * configure.in: Bump to 1.28b.
15719
8f13fe33
AD
157202001-08-03 Akim Demaille <akim@epita.fr>
15721
15722 * src/complain.c: Adjust strerror_r portability issues.
15723
b37ba92c
AD
157242001-08-03 Akim Demaille <akim@epita.fr>
15725
15726 Version 1.28a.
15727
b0ce6046
AD
157282001-08-03 Akim Demaille <akim@epita.fr>
15729
15730 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15731 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15732 * src/getargs.c: Include complain.h.
15733 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15734 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15735
d01c415b
AD
157362001-08-03 Akim Demaille <akim@epita.fr>
15737
15738 * src/reader.c (readgram): Display hidden chars in error messages.
15739
459dd1a6
AD
157402001-08-03 Akim Demaille <akim@epita.fr>
15741
15742 Update to gettext 0.10.39.
15743
53b74c0c
AD
157442001-08-03 Akim Demaille <akim@epita.fr>
15745
15746 * lib/strspn.c: New.
15747
234a3be3
AD
157482001-08-01 Marc Autret <autret_m@epita.fr>
15749
15750 * doc/bison.texinfo: Update.
15751 * doc/bison.1 (mandoc): Update.
15752 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15753 * src/files.c: Support output files extensions computing.
15754 (src_extension): New static variable.
15755 (header_extension): New static variable.
15756 (tr): New function.
15757 (get_extension_index): New function, gets the index of an extension
15758 filename in a string.
15759 (compute_exts_from_gf): New function, computes extensions from the
15760 grammar file extension.
15761 (compute_exts_from_src): New functions, computes extensions from the
15762 C source file extension, file given by ``-o'' option.
15763 (compute_base_names): Update.
15764 (output_files): Update.
15765
847bf1f5
AD
157662001-08-01 Robert Anisko <anisko_r@epita.fr>
15767
d995fee7 15768 * doc/bison.texi: Document @$.
847bf1f5
AD
15769 (Locations): New section.
15770
d074a105
AD
157712001-07-18 Akim Demaille <akim@epita.fr>
15772
15773 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15774 * config/prev-version.txt, config/move-if-change: New.
15775 * Makefile.am: Adjust.
15776
3419715d
AD
157772001-07-08 Pascal Bart <pascal.bart@epita.fr>
15778
15779 * src/bison.simple (yyparse): Suppress warning `comparaison
15780 between signed and unsigned'.
15781
62ab6972
AD
157822001-07-05 Pascal Bart <pascal.bart@epita.fr>
15783
15784 * src/getargs.h (raw_flag): Remove.
15785 * src/getargs.c: Die on `-r'/`--raw'.
15786 * src/lex.c (parse_percent_token): Die on `%raw'.
15787 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15788 * tests/calc.at: Suppress test with option `--raw'.
15789
1e24cc5b
AD
157902001-07-14 Akim Demaille <akim@epita.fr>
15791
15792 * config/: New.
15793 * configure.in: Require Autoconf 2.50.
15794 Update to gettext 0.10.38.
15795
32dfccf8
AD
157962001-03-16 Akim Demaille <akim@epita.fr>
15797
15798 * doc/bison.texinfo: ANSIfy the examples.
15799
cd5bd6ac
AD
158002001-03-16 Akim Demaille <akim@epita.fr>
15801
15802 * getargs.c (skeleton): New variable.
15803 (longopts): --skeleton is a new option.
15804 (shortopts, getargs): -S is a new option.
15805 * getargs.h: Declare skeleton.
15806 * output.c (output_parser): Use it.
15807
5141b016
AD
158082001-03-16 Akim Demaille <akim@epita.fr>
15809
15810 * m4/strerror_r.m4: New.
15811 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15812 * lib/error.h, lib/error.c: Update.
15813
447992b9
AD
158142001-03-16 Akim Demaille <akim@epita.fr>
15815
15816 * src/getargs.c (longopts): Clean up.
15817
274d42ce
AD
158182001-02-21 Akim Demaille <akim@epita.fr>
15819
15820 * src/reader.c (gensym): `gensym_count' is your own.
15821 Use a static buf to create the symbol name, as token_buffer is no
15822 longer a buffer.
15823
22c821f3
AD
158242001-02-08 Akim Demaille <akim@epita.fr>
15825
15826 * src/conflicts.c (conflict_report): Be sure not to append to res
15827 between two calls, which could happen if both first sprintf were
15828 skipped, but not the first cp += strlen.
15829
18569462
AD
158302001-02-08 Akim Demaille <akim@epita.fr>
15831
15832 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15833 New, from fileutils 4.0.37.
15834 * configure.in: Require Autoconf 2.49c. I took some time before
15835 making this decision. This is the only way out for portability
15836 issues in Bison, it would mean way too much duplicate effort to
15837 import in Bison features implemented in 2.49c since 2.13.
15838 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15839
0d8f3c8a
AD
158402001-02-02 Akim Demaille <akim@epita.fr>
15841
15842 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 15843 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 15844
f17bcd1f
AD
158452001-01-19 Akim Demaille <akim@epita.fr>
15846
15847 Get rid of the ad hoc handling of token_buffer in the scanner: use
15848 the obstacks.
15849
15850 * src/lex.c (token_obstack): New.
15851 (init_lex): Initialize it. No longer call...
15852 (grow_token_buffer): this. Remove it.
15853 Adjust all the places which used it to use the obstack.
15854
511e79b3
AD
158552001-01-19 Akim Demaille <akim@epita.fr>
15856
15857 * src/lex.h: Rename all the tokens:
15858 s/\bENDFILE\b/tok_eof/g;
15859 s/\bIDENTIFIER\b/tok_identifier/g;
15860 etc.
15861 Let them be enums, not #define, to ease debugging.
15862 Adjust all the code.
15863
0d6508ef
AD
158642001-01-18 Akim Demaille <akim@epita.fr>
15865
15866 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15867 * src/lex.c (maxtoken, grow_token_buffer): Static.
15868
6deb4447
AD
158692001-01-18 Akim Demaille <akim@epita.fr>
15870
15871 Since we now use obstacks, more % directives can be enabled.
15872
15873 * src/lex.c (percent_table): Also accept `%yacc',
15874 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15875 `%debug'.
15876 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15877 instead of returning a token.
15878 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15879 * src/reader.c (read_declarations): Adjust.
15880 * src/files.c (open_files): Don't call `compute_base_names', don't
15881 compute `attrsfile' since they depend upon data which might be
15882 *in* the input file now.
15883 (output_files): Do it here.
15884 * src/output.c (output_headers): Document the fact that this patch
15885 introduces a guaranteed SEGV for semantic parsers.
15886 * doc/bison.texinfo: Document them.
15887 * tests/suite.at: Exercise these %options.
15888
ff4423cc
AD
158892000-12-20 Akim Demaille <akim@epita.fr>
15890
15891 Also handle the output file (--verbose) with obstacks.
15892
15893 * files.c (foutput): Remove.
15894 (output_obstack): New.
15895 Adjust all dependencies.
15896 * src/conflicts.c: Return a string.
15897 * src/system.h (obstack_grow_string): Rename as...
15898 (obstack_sgrow): this. Be ready to work with non literals.
15899 (obstack_fgrow4): New.
15900
956dba3a
AD
159012000-12-20 Akim Demaille <akim@epita.fr>
15902
15903 * src/files.c (open_files): Fix the computation of short_base_name
15904 in the case of `-o foo.tab.c'.
15905
337bab46
AD
159062000-12-20 Akim Demaille <akim@epita.fr>
15907
15908 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15909 (copy_dollar): Now that everything uses obstacks, get rid of the
15910 FILE * parameters.
15911
5d3214b8
AD
159122000-12-20 Akim Demaille <akim@epita.fr>
15913
15914 * src/files.c (open_files): Actually the `.output' file is based
15915 on the short_base_name, not base_name.
15916 * tests/suite.at (Checking output file names): Adjust.
15917
29092a57
AD
159182000-12-20 Akim Demaille <akim@epita.fr>
15919
15920 * src/bison.s1: Remove, we now use directly...
15921 * src/bison.simple: this.
15922 * src/Makefile.am: Use pkgdata instead of data.
15923
ea5607fd
AD
159242000-12-20 Akim Demaille <akim@epita.fr>
15925
15926 * src/files.c (guard_obstack): New.
15927 (open_files): Initialize it.
15928 (output_files): Dump it...
15929 * src/files.h: Export it.
15930 * src/reader.c (copy_guard): Use it.
15931
27110317
AD
159322000-12-19 Akim Demaille <akim@epita.fr>
15933
15934 * src/files.c (outfile, defsfile, actfile): Removed as global
15935 vars.
15936 (open_files): Don't compute them.
15937 (output_files): Adjust.
15938 (base_name, short_base_name): Be global.
15939 Adjust dependencies.
15940
19c50364
AD
159412000-12-19 Akim Demaille <akim@epita.fr>
15942
15943 * src/files.c (strsuffix): New.
15944 (stringappend): Be just like strcat but allocate.
15945 (base_names): Eve out from open_files.
15946 Try to simplify the rather hairy computation of base_name and
15947 short_base_name.
15948 (open_files): Use it.
15949 * tests/suite.at (Checking output file names): New test.
15950
573c1d9f
AD
159512000-12-19 Akim Demaille <akim@epita.fr>
15952
15953 * src/system.h (obstack_grow_literal_string): Rename as...
15954 (obstack_grow_string): this.
15955 * src/output.c (output_parser): Recognize `%% actions' instead of
15956 `$'.
15957 * src/bison.s1: s/$/%% actions/.
15958 * src/bison.hairy: Likewise.
15959
ef7ddedd
AD
159602000-12-19 Akim Demaille <akim@epita.fr>
15961
15962 * src/output.c (output_parser): Compute the `#line' lines when
15963 there are.
15964 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15965 Suggested by Hans Aberg.
15966
ff61dabd
AD
159672000-12-19 Akim Demaille <akim@epita.fr>
15968
15969 Let the handling of the skeleton files be local to the procedures
15970 that use it.
15971
15972 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15973 longer static.
15974 (fparser, open_extra_files): Remove.
15975 (open_files, output_files): Don't take care of fparser.
15976 * src/files.h: Adjust.
15977 * src/output.c (output_parser): Open and close the file to the
15978 skeleton.
15979 * src/reader.c (read_declarations): When %semantic_parser, open
15980 fguard.
15981
55b96341
AD
159822000-12-19 Akim Demaille <akim@epita.fr>
15983
15984 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15985 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15986
358c15b7
AD
159872000-12-19 Akim Demaille <akim@epita.fr>
15988
15989 * src/files.c (open_files): Yipee! We no longer need all the code
15990 looking for `/tmp' since we have no tmp file.
15991
7de3329e
AD
159922000-12-19 Akim Demaille <akim@epita.fr>
15993
15994 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15995 New macros.
15996 * src/files.c (open_files): Less dependency on MSDOS etc.
15997
3abcd459
AD
159982000-12-14 Akim Demaille <akim@epita.fr>
15999
16000 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
16001 Provide a default definition.
16002 Use it when executing the default @ action.
16003 * src/reader.c (reader_output_yylsp): No longer include
16004 `timestamp' and `text' in the default YYLTYPE.
16005
2a91a95e
AD
160062000-12-12 Akim Demaille <akim@epita.fr>
16007
16008 * src/reader.c (copy_definition, parse_union_decl, copy_action)
16009 (copy_guard): Quote the file names.
16010 Reported by Laurent Mascherpa.
16011
14d3eb9b
AD
160122000-12-12 Akim Demaille <akim@epita.fr>
16013
16014 * src/output.c (output_headers, output_program, output): Be sure
16015 to escape special characters when outputting filenames.
16016 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
16017 (output_headers): Don't depend on them, Use ACTSTR.
16018
d7045ec6
AD
160192000-11-17 Akim Demaille <akim@epita.fr>
16020
16021 * lib/obstack.h: Formatting changes.
16022 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
16023 prevents type checking.
16024 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
16025 cast the value to (void *): assigning a `foo *' to a `void *'
16026 variable is valid.
16027 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
16028 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
16029 append characters.
16030
6fd54b73
AD
160312000-11-17 Akim Demaille <akim@epita.fr>
16032
16033 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
16034 as...
16035 (suite.m4, regression.m4, calc.m4): these.
16036 * tests/atgeneral.m4: Update from CVS Autoconf.
16037
4c50eae6
AD
160382000-11-17 Akim Demaille <akim@epita.fr>
16039
16040 * tests/regression.m4 (%union and --defines): New test,
16041 demonstrating a current bug in the obstack implementation.
16042
a35f64ea
AD
160432000-11-17 Akim Demaille <akim@epita.fr>
16044
16045 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16046 macros.
16047 Use them to declare the variables which are global or local to
16048 `yyparse'.
16049
7de23534
AD
160502000-11-17 Akim Demaille <akim@epita.fr>
16051
16052 * acconfig.h: Remove, no longer used.
16053
aa7815f5
AD
160542000-11-07 Akim Demaille <akim@epita.fr>
16055
16056 * src: s/Copyright (C)/Copyright/g.
16057
5af1f549
AD
160582000-11-07 Akim Demaille <akim@epita.fr>
16059
16060 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16061 defining.
16062 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16063
553e2b22
AD
160642000-11-07 Akim Demaille <akim@epita.fr>
16065
16066 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16067 Merge in a single CPP if/else.
16068
8a4f41d6
AD
160692000-11-07 Akim Demaille <akim@epita.fr>
16070
16071 * src/output.c (output): Remove useless variables.
16072 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16073 argument `data' for consistency with the prototypes.
16074 Qualify it `const'.
16075 (obstack_copy, obstack_copy0): Rename the second argument as
16076 `address' for consistency. Qualify it `const'.
16077 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16078 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16079 `const' their input argument (`data' or `address').
16080 Adjust the corresponding macros to include `const' in casts.
16081
095a3fb5
AD
160822000-11-03 Akim Demaille <akim@epita.fr>
16083
16084 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16085 s/PFILE1/BISON_HAIRY/.
16086 Adjust dependencies.
16087
d1cdce7c
AD
160882000-11-03 Akim Demaille <akim@epita.fr>
16089
090c5ebf 16090 For some reason, this was not applied.
d1cdce7c
AD
16091
16092 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16093 `unlink': it's no longer used.
16094
9311529b
AD
160952000-11-03 Akim Demaille <akim@epita.fr>
16096
16097 * src/files.c (skeleton_find): New function, eved out of...
16098 (open_files, open_extra_files): here.
16099
d8880f69
AD
161002000-11-03 Akim Demaille <akim@epita.fr>
16101
16102 Don't use `atexit'.
16103
16104 * src/files.c (obstack_save): New function.
16105 (done): Rename as...
16106 (output_files): this.
16107 Use `obstack_save'.
16108 * src/main.c (main): Don't use `atexit' to register `done', since
16109 it no longer has to remove tmp files, just call `output_files'
16110 when there are no errors.
16111
0dbb648e
AD
161122000-11-02 Akim Demaille <akim@epita.fr>
16113
16114 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16115 `unlink': it's no longer used.
16116 * src/files.h: Formatting changes.
16117
896fe5c1
AD
161182000-11-02 Akim Demaille <akim@epita.fr>
16119
16120 Remove the last uses of mktemp and unlink/delete.
16121
16122 * src/files.c (fdefines, ftable): Removed.
16123 (defines_ostack, table_obstack): New.
16124 Adjust dependencies of the former into uses of the latter.
16125 * src/output.c (output_short_or_char_table, output_short_table):
16126 Convert to using obstacks.
16127 * src/reader.c (copy_comment2): Accept one FILE * and two
16128 obstacks.
16129 (output_token_defines, reader_output_yylsp): Use obstacks.
16130 * src/system.h (obstack_fgrow3): New.
1f65350a 16131 * po/POTFILES.in: Adjust.
896fe5c1 16132
dd60faec
AD
161332000-11-01 Akim Demaille <akim@epita.fr>
16134
16135 Change each use of `fattrs' into a use of `attrs_obstack'.
16136
16137 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16138 * src/files.c (fattrs): Remove.
16139 (attrs_obstack): New.
16140 Adjust all dependencies.
16141 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16142
8c7ebe49
AD
161432000-11-01 Akim Demaille <akim@epita.fr>
16144
16145 Introduce obstacks.
16146 Change each use of `faction' into a use of `action_obstack'.
16147
16148 * lib/obstack.h, lib/obstack.c: New files.
16149 * src/files.c (faction): Remove.
16150 (action_obstack): New.
16151 Adjust all dependencies.
16152
77aee789
AD
161532000-10-20 Akim Demaille <akim@epita.fr>
16154
16155 * lib/quote.h (PARAMS): New macro. Use it.
16156
43591cec
AD
161572000-10-16 Akim Demaille <akim@epita.fr>
16158
16159 * src/output.c (output_short_or_char_table): New function.
16160 (output_short_table, output_token_translations): Use it.
16161 (goto_actions): Use output_short_table.
16162
1e9798d5
AD
161632000-10-16 Akim Demaille <akim@epita.fr>
16164
16165 * src/symtab.c (bucket_new): New function.
16166 (getsym): Use it.
16167
16168 * src/output.c (output_short_table): New argument to display the
16169 comment associated with the table.
16170 Adjust dependencies.
16171 (output_gram): Use it.
16172 (output_rule_data): Nicer output layout for YYTNAME.
16173
f282676b
AD
161742000-10-16 Akim Demaille <akim@epita.fr>
16175
16176 * src/lex.c (read_typename): New function.
16177 (lex): Use it.
16178 * src/reader.c (copy_dollar): Likewise.
16179
550a72a3
AD
161802000-10-16 Akim Demaille <akim@epita.fr>
16181
16182 * src/reader.c (copy_comment2): Expect the input stream to be on
16183 the `/' which is suspected to open a comment, instead of being
16184 called after `//' or `/*' was read.
16185 (copy_comment, copy_definition, parse_union_decl, copy_action)
16186 (copy_guard): Adjust.
16187
131e2fef
AD
161882000-10-16 Akim Demaille <akim@epita.fr>
16189
16190 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16191 `read_signed_integer'.
16192
79282c5a
AD
161932000-10-16 Akim Demaille <akim@epita.fr>
16194
16195 * src/reader.c (copy_dollar): New function.
16196 (copy_guard, copy_action): Use it.
16197
ff4a34be
AD
161982000-10-16 Akim Demaille <akim@epita.fr>
16199
16200 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16201 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16202 New files, from Fileutils 4.0.27.
16203 * src/main.c (printable_version): Remove.
16204 * src/lex.c, src/reader.c: Use `quote'.
16205
162062000-10-04 Akim Demaille <akim@epita.fr>
16207
16208 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16209
14ded682
AD
162102000-10-04 Akim Demaille <akim@epita.fr>
16211
16212 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16213
8e03724b
AD
162142000-10-04 Akim Demaille <akim@epita.fr>
16215
16216 When a literal string is used to define two different tokens,
16217 `bison -v' segfaults.
16218 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16219
16220 * tests/regression.m4: New file.
16221 Include the core of the sample provided by Piotr Gackiewicz.
16222 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16223 properly.
16224
a9e64249
AD
162252000-10-04 Akim Demaille <akim@epita.fr>
16226
16227 * src/reader.c (parse_expect_decl): Keep `count' within the size
16228 of `buffer'.
16229 From Neil Booth.
16230
da9abf43
AD
162312000-10-02 Paul Eggert <eggert@twinsun.com>
16232
16233 * bison.s1 (yyparse): Assign the default value
16234 unconditionally, to avoid a GCC warning and make the parser a
16235 tad smaller.
16236
c33638bb
AD
162372000-10-02 Akim Demaille <akim@epita.fr>
16238
16239 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16240 options.
16241
444c570a
AD
162422000-10-02 Akim Demaille <akim@epita.fr>
16243
16244 * src/derives.c, src/print.c, src/reduce.c: To ease the
16245 translation, move some `\n' out of the translated strings.
16246
89cab50d
AD
162472000-10-02 Akim Demaille <akim@epita.fr>
16248
16249 The location tracking mechanism is precious for parse error
16250 messages. Nevertheless, it is enabled only when `@n' is used in
16251 the grammar, which is a different issue (you can use it in error
16252 message, but not in the grammar per se). Therefore, there should
16253 be another means to enable it.
16254
16255 * src/getargs.c (getargs): Support `--locations'.
16256 (usage): Report it.
16257 * src/getargs.h (locationsflag): Export it.
16258 * src/lex.c (percent_table): Support `%locations'.
16259 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16260 with `locationsflag'.
16261 * doc/bison.texinfo: Document `--locations' and `%locations'.
16262 Sort the options.
16263 * tests/calc.m4: Test it.
16264
16265 For regularity of the names, replace each
16266 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16267 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16268 In addition replace each `flag' with `_flag'.
16269
d6c2cba0
AD
162702000-10-02 Akim Demaille <akim@epita.fr>
16271
16272 Also test parse error messages, including with YYERROR_VERBOSE.
16273
16274 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16275 associative).
16276 Use it to check the computations.
16277 Use it to check `nonassoc' is honored.
16278 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16279 `--yyerror-verbose'.
16280 (_AT_CHECK_CALC): Adjust to this option.
16281 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16282
5a35a6cb
AD
162832000-10-02 Akim Demaille <akim@epita.fr>
16284
16285 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16286 the latter demonstrates a flaw in the handling of non debugging
16287 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16288 was used in order to simplify:
16289
16290 #if YYDEBUG
16291 if (yydebug)
16292 {
16293 ...
16294 }
16295 #endif
16296
16297 into
16298
16299 if (yydebug)
16300 {
16301 ...
16302 }
16303
16304 unfortunately this leads to a CPP conflict when
16305 `--name-prefix=foo' is used since it produces `#define yydebug
16306 foodebug'.
16307
16308 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16309 (YYDPRINTF): New macro.
16310 Spread its use.
16311 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16312 the bison options.
16313 Also test `--verbose', `--defines' and `--name-prefix'.
16314
71da9eea
AD
163152000-10-02 Akim Demaille <akim@epita.fr>
16316
16317 Improve the readability of the produced parsers.
16318
16319 * src/bison.s1: Formatting changes.
16320 Improve the comment related to the `$' mark.
16321 (yydefault): Don't fall through to `yyresume': `goto' there.
16322 * src/output.c (output_parser): When the `$' is met, skip the end
16323 of its line.
16324 New variable, `number_of_dollar_signs', to check there's exactly
16325 one `$' in the parser skeleton.
16326
95e36146
AD
163272000-10-02 Akim Demaille <akim@epita.fr>
16328
16329 * lib/xstrdup.c: New file, from the fileutils.
16330 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16331 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16332 instead of strlen + xmalloc + strcpy.
16333 * src/symtab.c (copys): Remove, use xstrdup instead.
16334
d7020c20
AD
163352000-10-02 Akim Demaille <akim@epita.fr>
16336
16337 * src/gram.h (associativity): New enum type which replaces the
16338 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16339 `right_assoc', `left_assoc' and `non_assoc'.
16340 Adjust all dependencies.
16341 * src/reader.c: Formatting changes.
16342 (LTYPESTR): Don't define it, use it as a literal in
16343 `reader_output_yylsp'.
16344 * src/symtab.h (symbol_class): New enum type which replaces the
16345 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16346 `sunknown', `stoken and `snterm'.
16347
1916f98e
AD
163482000-10-02 Akim Demaille <akim@epita.fr>
16349
16350 * src/getargs.c (fixed_outfiles): Rename as...
16351 (yaccflag): for consistency and accuracy.
16352 Adjust dependencies.
16353
d7913476
AD
163542000-10-02 Akim Demaille <akim@epita.fr>
16355
16356 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16357 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16358 difficult and introduced a lot of core dump. It turns out that
16359 Bison used an implementation of `xmalloc' based on `calloc', and
16360 at various places it does depend upon the initialization to 0. I
16361 have not tried to isolate the pertinent places, and all the former
16362 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16363 someone should address this issue.
16364
16365 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16366 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16367 files.
16368 Adjust dependencies.
16369 * src/warshall.h: New file.
16370 Propagate.
16371
340ef489
AD
163722000-10-02 Akim Demaille <akim@epita.fr>
16373
16374 Various anti-`extern in *.c' changes.
16375
16376 * src/system.h: Include `assert.h'.
16377
b2ca4022
AD
163782000-10-02 Akim Demaille <akim@epita.fr>
16379
16380 * src/state.h (nstates, final_state, first_state, first_shift)
16381 (first_reduction): Move their exportation from here...
16382 * src/LR0.h: to here.
16383 Adjust dependencies.
16384 * src/getargs.c (statisticsflag): New variable.
16385 Add support for `--statistics'.
16386 Adjust dependencies.
16387
16388 Remove a lot of now useless `extern' statements in most files.
16389
403b315b
AD
163902000-10-02 Akim Demaille <akim@epita.fr>
16391
16392 * src/LR0.h: New file.
16393 Propagate its use.
16394
07a58c13
AD
163952000-10-02 Akim Demaille <akim@epita.fr>
16396
16397 * src/print.h: New file.
16398 Propagate its use.
16399 * src/print.c: Formatting and ordering changes.
16400 (verbose, terse): Replace with...
16401 (print_results): this new function.
16402 Adjust dependencies.
16403
0619caf0
AD
164042000-10-02 Akim Demaille <akim@epita.fr>
16405
16406 * src/conflicts.c (conflict_report): New function.
16407 (conflict_log, verbose_conflict_log): Replace with...
16408 (print_conflicts): this function.
16409 Adjust dependencies.
16410 * src/conflicts.h: New file.
16411 Propagate its inclusion.
16412
3519ec76
AD
164132000-10-02 Akim Demaille <akim@epita.fr>
16414
16415 * src/nullable.h: New file.
16416 Propagate its inclusion.
16417 * src/nullable.c: Formatting changes.
16418
015acc48
AD
164192000-10-02 Akim Demaille <akim@epita.fr>
16420
16421 * src/reduce.h: New file.
16422 Propagate its inclusion.
16423 * src/reduce.c: Topological sort and other formatting changes.
16424 (bool, TRUE, FALSE): Move their definition to...
16425 * src/system.h: here.
16426
8963a27b
AD
164272000-10-02 Akim Demaille <akim@epita.fr>
16428
16429 * src/files.c: Formatting changes.
16430 (tryopen, tryclose, openfiles): Rename as...
16431 (xfopen, xfclose, open_files): this.
16432 (stringappend): static.
16433 * src/files.h: Complete the list of exported symbols.
16434 Propagate its use.
16435
a70083a3
AD
164362000-10-02 Akim Demaille <akim@epita.fr>
16437
16438 * src/reader.h: New file.
16439 Propagate its use instead of tedious list of `extern' and
16440 prototypes.
16441 * src/reader.c: Formatting changes, topological sort,
16442 s/register//.
16443
abadc117
AD
164442000-10-02 Akim Demaille <akim@epita.fr>
16445
16446 * src/lex.h: Prototype `lex.c' exported functions.
16447 * src/reader.c: Adjust.
16448 * src/lex.c: Formatting changes.
16449 (safegetc): Rename as...
16450 (xgetc): this.
16451
720d742f
AD
164522000-10-02 Akim Demaille <akim@epita.fr>
16453
16454 * src/lalr.h: New file.
16455 Propagate its inclusion instead of prototypes and `extern'.
16456 * src/lalr.c: Formatting changes, topological sorting etc.
16457
f2acea59
AD
164582000-10-02 Akim Demaille <akim@epita.fr>
16459
16460 * src/output.c (token_actions): Introduce a temporary array,
16461 YYDEFACT, that makes it possible for this function to use
16462 output_short_table.
16463
d019d655
AD
164642000-10-02 Akim Demaille <akim@epita.fr>
16465
16466 `user_toknums' is output as a `short[]' in `output.c', while it is
16467 defined as a `int[]' in `reader.c'. For consistency with the
16468 other output tables, `user_toknums' is now defined as a table of
16469 shorts.
16470
16471 * src/reader.c (user_toknums): Be a short table instead of an int
16472 table.
16473 Adjust dependencies.
16474
16475 Factor the short table outputs.
16476
16477 * src/output.c (output_short_table): New function.
16478 * src/output.c (output_gram, output_stos, output_rule_data)
16479 (output_base, output_table, output_check): Use it.
16480
6c89f1c1
AD
164812000-10-02 Akim Demaille <akim@epita.fr>
16482
16483 * src/output.c (output): Topological sort of the functions, in
16484 order to get rid of the `static' prototypes.
16485 No longer use `register'.
16486 * src/output.h: New file.
16487 Propagate its inclusion in files explicitly prototyping functions
16488 from output.c.
16489
d9efd181
AD
164902000-09-21 Akim Demaille <akim@epita.fr>
16491
16492 * src/atgeneral.m4: Update from Autoconf.
16493
c29240e7 164942000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
16495
16496 * src/closure.h: New file.
16497 * src/closure.c: Formatting changes, topological sort over the
16498 functions, use of closure.h.
16499 (initialize_closure, finalize_closure): Rename as...
16500 (new_closure, free_closure): these. Adjust dependencies.
16501 * src/LR0.c: Formatting changes, topological sort, use of
16502 cloture.h.
16503 (initialize_states): Rename as...
16504 (new_states): this.
16505 * src/Makefile.am (noinst_HEADERS): Adjust.
16506
499daa50
AD
165072000-09-20 Akim Demaille <akim@epita.fr>
16508
16509 * src/acconfig.h: Don't protect config.h against multiple
16510 inclusion.
16511 Don't define PARAMS.
16512 * src/system.h: Define PARAMS.
16513 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16514 purpose of config.h. system.h must not try to fix wrong
16515 definitions in config.h.
16516
cc84fd5d
AD
165172000-09-20 Akim Demaille <akim@epita.fr>
16518
16519 * src/derives.h: New file.
16520 * src/main.c, src/derives.h: Use it.
16521 Formatting changes.
16522 * src/Makefile.am (noinst_HEADERS): Adjust.
16523
db5b3a89
AD
165242000-09-20 Akim Demaille <akim@epita.fr>
16525
16526 * tests/atgeneral.m4: Update from Autoconf.
16527 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16528 (AT_CHECK_CALC): New macros.
16529 Use these macros to test bison with options `', `--raw',
16530 `--debug', `--yacc', `--yacc --debug'.
16531
ceed8467
AD
165322000-09-19 Akim Demaille <akim@epita.fr>
16533
16534 * src/output.c: Formatting changes.
16535 * src/machine.h: Remove, leaving its contents in...
16536 * src/system.h: here.
16537 Include stdio.h.
16538 Adjust all dependencies on stdio.h and machine.h.
16539 * src/getargs.h: New file.
16540 Let all `extern' declarations about getargs.c be replaced with
16541 inclusion of `getargs.h'.
16542 * src/Makefile.am (noinst_HEADERS): Adjust.
16543
16544 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16545 scope.
16546 (yyerror): Returns void, not int.
16547 * doc/bison.texinfo: Formatting changes.
16548
05a1d24b
AD
165492000-09-19 Akim Demaille <akim@epita.fr>
16550
16551 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16552 portable.
16553
cbd25751
AD
165542000-09-18 Akim Demaille <akim@epita.fr>
16555
16556 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16557 * src/Makefile.am (INCLUDES): Don't.
16558 Be ready to fetch headers in lib/.
16559
13863333
AD
165602000-09-18 Akim Demaille <akim@epita.fr>
16561
16562 * doc/bison.texinfo: Update the copyright.
16563 ANSIfy and GNUify the examples.
16564 Remove the old menu.
16565
0d533154
AD
165662000-09-18 Akim Demaille <akim@epita.fr>
16567
16568 First set of tests: use the `calc' example from the documentation.
16569
16570 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16571 is defined only when YYDEBUG is.
16572 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16573 * src/files.c (tryopen, tryclose): Formatting changes.
16574 Move to the top and be static.
16575 * src/reader.c (read_signed_integer): Likewise.
16576 * tests/calc.m4: New file.
16577 * Makefile.am, suite.m4: Adjust.
16578 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16579
e79137ac
AD
165802000-09-18 Akim Demaille <akim@epita.fr>
16581
16582 Add support for an Autotest test suite for Bison.
16583
16584 * m4/m4.m4, m4/atconfig.m4: New files.
16585 * m4/Makefile.am (EXTRA_DIST): Adjust.
16586 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16587 files.
16588 * src/getargs.c: Display a more standard --version message.
16589 * src/reader.c (reader): Formatting changes.
16590 No longer depend upon VERSION_STRING.
16591 * configure.in: No longer use `dnl'.
16592 Set up the test suite and the new directory `tests/.
16593 (VERSION_STRING): Remove.
16594
27821bff
AD
165952000-04-14 Akim Demaille <akim@epita.fr>
16596
16597 * src/reader.c (copy_comment2): New function, same as former
16598 `copy_comment', but outputs into two FILE *.
16599 (copy_comment): Use it.
16600 (parse_union_decl): Use it.
16601 (get_type, parse_start_decl): Use the same `invalid' message.
16602 (parse_start_decl, parse_union_decl): Use the same `multiple'
16603 message.
16604 (parse_union_decl, copy_guard, copy_action): Use the same
16605 `unmatched' message.
16606 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16607
cfe5fbc0
AD
166082000-03-31 Akim Demaille <akim@epita.fr>
16609
16610 * src/files.c (tryopen, tryclose): Move to the top.
16611 Be static.
16612
cb7db13e
AD
166132000-03-31 Akim Demaille <akim@epita.fr>
16614
16615 * src/main.c (main): Don't call `done', exit does it.
16616
a0f6b076
AD
166172000-03-31 Akim Demaille <akim@epita.fr>
16618
36281465
AD
16619 * allocate.c: s/return (foo)/return foo/.
16620 * lalr.c: Likewise.
16621 * LR0.c: Likewise.
16622 * output.c: Likewise.
16623 * reader.c: Likewise.
16624 * symtab.c: Likewise.
16625 * vmsgetargs.c: Likewise.
16626
166272000-03-31 Akim Demaille <akim@epita.fr>
16628
16629 Clean up the error reporting functions.
a0f6b076
AD
16630
16631 * src/report.c: New file.
16632 * src/report.h: Likewise.
16633 * src/Makefile.am: Adjust.
16634 * m4/error.m4: New file.
16635 * m4/Makefile.am: Adjust.
16636 * configure.in (jm_PREREQ_ERROR): Call it.
16637 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16638 Remove.
16639 (fatal, fatals): Remove. All callers use complain.c::fatal.
16640 (warn, warni, warns, warnss, warnss): Remove. All callers use
16641 complain.c::complain.
16642 (toomany): Remove, use fatal instead.
16643 * src/files.c (done): No argument, use complain_message_count.
16644 * src/main.c (main): Register `done' to `atexit'.
16645
16646 * src/getargs.c (usage): More `fputs', less `fprintf'.
16647
18539825
AD
166482000-03-28 Akim Demaille <akim@epita.fr>
16649
16650 * lib/: New directory.
16651 * Makefile.am (SUBDIRS): Adjust.
16652 * configure.in: Adjust.
16653 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16654 useless.
16655 * src/alloca.c: Moved to lib/.
16656 * src/getopt.c: Likewise.
16657 * src/getopt1.c: Likewise.
16658 * src/getopt.h: Likewise.
16659 * src/ansi2knr.c: Likewise.
16660 * src/ansi2knr.1: Likewise.
16661 * src/Makefile.am: Adjust.
16662 * lib/Makefile.am: New file.
16663
9f306f2a
AD
166642000-03-28 Akim Demaille <akim@epita.fr>
16665
16666 * src/getargs.c (usage): Refresh the help message.
16667
0ba347b6
AD
166682000-03-17 Akim Demaille <akim@epita.fr>
16669
16670 * src/getopt1.c: Updated from textutils 2.0e
16671 * src/getopt.c: Likewise.
16672 * src/getopt.h: Likewise.
16673
dbe7f271
AD
166742000-03-17 Akim Demaille <akim@epita.fr>
16675
16676 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16677 the file name, not the whole `#line LINE FILE'.
16678
75bbe78d
AD
166792000-03-17 Akim Demaille <akim@epita.fr>
16680
16681 On syntax errors, report the token on which we choked.
16682
aa5fd0ee
AD
16683 * src/bison.s1 (yyparse): In the label yyerrlab, when
16684 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 16685
7b306f52
AD
166862000-03-17 Akim Demaille <akim@epita.fr>
16687
aa5fd0ee 16688 * src/reader.c (copy_at): New function.
7b306f52
AD
16689 (copy_guard): Use it.
16690 (copy_action): Use it.
16691
e87b5700
AD
166922000-03-17 Akim Demaille <akim@epita.fr>
16693
16694 Be kind to translators, save some useless translations.
16695
aa5fd0ee 16696 * src/main.c (banner): New function.
e87b5700
AD
16697 (fatal_banner): Use it.
16698 (warn_banner): Use it.
16699
ae3c3164
AD
167002000-03-17 Akim Demaille <akim@epita.fr>
16701
aa5fd0ee
AD
16702 * src/reader.c (copy_definition): Use copy_string and
16703 copy_comment. Removed now unused `match', `ended',
16704 `cplus_comment'.
ae3c3164
AD
16705 (copy_comment, copy_string): Moved, to be visible from
16706 copy_definition.
16707
4dc58e7c
AD
167082000-03-17 Akim Demaille <akim@epita.fr>
16709
aa5fd0ee
AD
16710 * src/reader.c (copy_string): Declare `static inline'. No
16711 problems with inline, since it is checked by configure.
4dc58e7c
AD
16712 (copy_comment): Likewise.
16713
0a6384c4
AD
167142000-03-17 Akim Demaille <akim@epita.fr>
16715
aa5fd0ee 16716 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 16717
3cef001a
AD
167182000-03-17 Akim Demaille <akim@epita.fr>
16719
aa5fd0ee 16720 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
16721 (copy_action): Use it. Removed now unused `match', `ended',
16722 `cplus_comment'.
16723 (copy_guard): Likewise.
16724
ca36d2ef
AD
167252000-03-17 Akim Demaille <akim@epita.fr>
16726
aa5fd0ee 16727 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
16728 (copy_action): Use it.
16729 (copy_guard): Likewise.
16730
6666f98f
AD
167312000-03-17 Akim Demaille <akim@epita.fr>
16732
16733 Change the handling of @s so that they behave exactly like $s.
16734 There is now a pseudo variable @$ (readble and writable), location
16735 of the lhs of the rule (by default ranging from the location of
16736 the first symbol of the rhs, to the location of the last symbol,
16737 or, if the rhs is empty, YYLLOC).
16738
16739 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16740 yyval.
16741 (yyparse): When providing a default semantic action, provide a
16742 default location action.
16743 (after the $): No longer change `*YYLSP', just stack YYLOC the
16744 same way you stack YYVAL.
16745 * src/reader.c (read_declarations): Use warns.
16746 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16747 (copy_action, case '@'): Likewise.
16748 Use a standard error message, to save useless work from
16749 translators.
16750
41aca2e0
AD
167512000-03-17 Akim Demaille <akim@epita.fr>
16752
aa5fd0ee
AD
16753 * src/bison.s1: Formatting and cosmetics changes.
16754 * src/reader.c: Likewise.
41aca2e0
AD
16755 Update the Copyright notice.
16756
dc08c1d5
AD
167572000-03-17 Akim Demaille <akim@epita.fr>
16758
aa5fd0ee
AD
16759 * src/bison.s1 (#line): All set to `#line' only, since the
16760 Makefile now handles them.
dc08c1d5 16761
9ee3c97b
AD
167622000-03-16 Akim Demaille <akim@epita.fr>
16763
16764 * src/output.c (output_rule_data): Output the documentation of
16765 some of the tables.
16766 (Copyright notice): Update.
16767 Formatting changes.
16768
0de741ca
AD
167692000-03-16 Akim Demaille <akim@epita.fr>
16770
16771 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16772 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16773 One `#if YYDEBUG' remains, since it uses variables which are
16774 defined only if `YYDEBUG != 0'.
16775
bb10be54
AD
167762000-03-16 Akim Demaille <akim@epita.fr>
16777
16778 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16779 and related variables so that the similarities are highlighted.
16780
b07b484a
AD
167812000-03-16 Akim Demaille <akim@epita.fr>
16782
16783 * src/bison.s1: Properly indent CPP directives.
16784
361f60b3
AD
167852000-03-16 Akim Demaille <akim@epita.fr>
16786
16787 * src/bison.s1: Properly indent the `alloca' CPP section.
16788
8c44d3ec
AD
167892000-03-16 Akim Demaille <akim@epita.fr>
16790
16791 Do not hard code values of directories in `configure.in'.
16792 Update the `configure' tool chain.
16793
16794 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16795 src/makefile.am.
16796 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16797 (AC_OUTPUT): Add m4/Makefile.
16798 Bump to bison 1.28a, 1.29 has never been released.
16799 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16800 handled via src/Makefile.am.
16801 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16802 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16803 autoheader.
16804 * Makefile.am (SUBDIRS): Add m4.
16805 (ACLOCAL_AM_FLAGS): New variable.
16806 (AUTOMAKE_OPTIONS): Add check-news.
16807 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16808 the proper line number and file name.
16809 (DEFS): Propagate the location of bison library files and of the
16810 locale files.
16811 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16812 builddir.
16813 * acinclude.m4: Remove, replaced by the directory m4.
16814 * m4/Makefile.am (EXTRA_DIST): New variable.
16815 * m4/gettext.m4: New file, from the fileutils.
16816 * m4/lcmessage.m4: Likewise
16817 * m4/progtest.m4: Likewise.
16818 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16819
f95997e7
AD
168202000-03-10 Akim Demaille <akim@epita.fr>
16821
16822 * src/closure.c:
16823 Formatting changes of various comments.
16824 Respect the GNU coding standards at various places.
16825 Don't use `_()' when no translation is needed.
16826
168271999-12-13 Jesse Thilo <jthilo@gnu.org>
16828
16829 * src/files.c:
16830 OS/2 honors TMPDIR environment variable.
16831
168321999-12-13 Jesse Thilo <jthilo@gnu.org>
16833
16834 * doc/bison.texinfo: Tweaked spelling and grammar.
16835 Updated ISBN.
16836 Removed reference to price of printed copy.
16837 Mention BISON_SIMPLE and BISON_HAIRY.
16838
168391999-12-13 Jesse Thilo <jthilo@gnu.org>
16840
16841 * configure.in, NEWS:
16842 Bison 1.29 released.
16843
168441999-10-27 Jesse Thilo <jthilo@gnu.org>
16845
16846 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16847 Added reference card.
16848
168491999-07-26 Jesse Thilo <jthilo@gnu.org>
16850
16851 * po/ru.po: Added Russian translation.
16852
168531999-07-26 Jesse Thilo <jthilo@gnu.org>
16854
16855 * configure.in: Added Russian translation.
16856
168571999-07-06 Jesse Thilo <jthilo@gnu.org>
16858
16859 * configure.in, NEWS, README:
16860 Released version 1.28.
16861
168621999-06-14 Jesse Thilo <jthilo@gnu.org>
16863
16864 * src/system.h:
16865 Squashed redefinition warning on some systems.
16866
16867 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16868 Have configure build version string instead of relying on ANSI string
16869 concatentation.
16870
168711999-06-14 Jesse Thilo <jthilo@gnu.org>
16872
16873 * po/POTFILES.in: Got rid of version.c.
16874
168751999-06-14 Jesse Thilo <jthilo@gnu.org>
16876
16877 * acconfig.h, configure.in:
16878 Have configure build version string instead of relying on ANSI string
16879 concatentation.
16880
168811999-06-08 Jesse Thilo <jthilo@gnu.org>
16882
16883 * doc/bison.1:
16884 Dropped mention of `+' for long-named options.
16885
168861999-05-30 Jesse Thilo <jthilo@gnu.org>
16887
16888 * src/files.c: Added <unistd.h> for unlink().
16889
16890 * src/Makefile.am, src/system.h:
16891 I18n fixes.
16892
168931999-05-30 Jesse Thilo <jthilo@gnu.org>
16894
16895 * README: Added a FAQ list.
16896
16897 * configure.in, acconfig.h:
16898 I18n fixes.
16899
169001999-05-30 Jesse Thilo <jthilo@gnu.org>
16901
16902 * doc/FAQ, doc/Makefile.am:
16903 Added a FAQ list.
16904
169051999-05-19 Jesse Thilo <jthilo@gnu.org>
16906
16907 * src/alloc.h, src/symtab.h, src/version.c:
16908 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16909
169101999-04-18 Jesse Thilo <jthilo@gnu.org>
16911
16912 * src/.cvsignore, src/Makefile.am:
16913 Reorganized: sources in `src', documentation in `doc'.
16914
16915 * src/lex.c (literalchar):
16916 fixed the code for escaping double quotes (thanks
16917 Jonathan Czisny.)
16918
169191999-04-18 Jesse Thilo <jthilo@gnu.org>
16920
16921 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16922 Adjusted paths to reflect directory reorganization.
16923
169241999-04-18 Jesse Thilo <jthilo@gnu.org>
16925
16926 * doc/.cvsignore, doc/Makefile.am:
16927 Reorganized: sources in `src', documentation in `doc'.
16928
169291999-04-18 Jesse Thilo <jthilo@gnu.org>
16930
16931 * configure.in:
16932 Updated AC_INIT file to reflect directory reorganization.
16933
16934 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16935 Reorganized: sources in `src', documentation in `doc'.
16936
169371999-04-13 Jesse Thilo <jthilo@gnu.org>
16938
16939 * src/allocate.c:
16940 Don't declare calloc() and realloc() if not necessary.
16941
169421999-04-13 Jesse Thilo <jthilo@gnu.org>
16943
16944 * configure.in, acconfig.h, acinclude.m4:
16945 Don't declare calloc() and realloc() if not necessary.
16946
169471999-03-23 Jesse Thilo <jthilo@gnu.org>
16948
16949 * po/.cvsignore: Added i18n support.
16950
169511999-03-23 Jesse Thilo <jthilo@gnu.org>
16952
16953 * acconfig.h, configure.in, Makefile.am:
16954 Added i18n support.
16955
169561999-03-22 Jesse Thilo <jthilo@gnu.org>
16957
16958 * src/bison.s1: Fixed #line numbers.
16959
169601999-03-15 Jesse Thilo <jthilo@gnu.org>
16961
16962 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16963 Added PO files from Translation Project.
16964
169651999-03-03 Jesse Thilo <jthilo@gnu.org>
16966
16967 * Makefile.am:
16968 Added support for non-ANSI compilers (ansi2knr).
16969
169701999-02-16 Jesse Thilo <jthilo@gnu.org>
16971
16972 * configure.in: Bumped version number to 1.27.
16973
16974 * Makefile.am:
16975 Added `bison.simple' to list of files removed by `make distclean'.
16976
169771999-02-12 Jesse Thilo <jthilo@gnu.org>
16978
16979 * src/files.c, src/files.h:
16980 Defined locations of parser files in config.h instead of Makefile.
16981
169821999-02-12 Jesse Thilo <jthilo@gnu.org>
16983
16984 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16985 Defined locations of parser files in config.h instead of Makefile.
16986
169871999-02-09 Jesse Thilo <jthilo@gnu.org>
16988
16989 * Makefile.am:
16990 Removed inappropriate use of $< macro.
16991
169921999-02-05 Jesse Thilo <jthilo@gnu.org>
16993
16994 * po/Makefile.in.in, po/POTFILES.in:
16995 Add `po' directory skeleton.
16996
169971999-01-27 Jesse Thilo <jthilo@gnu.org>
16998
16999 * README: Document help-bison list.
17000
17001 * configure.in: Add check for mkstemp().
17002
170031999-01-20 Jesse Thilo <jthilo@gnu.org>
17004
17005 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
17006 Hush a few compiler warnings.
17007
17008 * src/files.c:
17009 Add tryclose(), which verifies that fclose was successful.
17010 Hush a couple of compiler warnings.
17011
170121999-01-20 Jesse Thilo <jthilo@gnu.org>
17013
17014 * Makefile.am, OChangeLog:
17015 ChangeLog is now automatically generated. Include the old version as
17016 OChangeLog.
17017
170181999-01-14 Jesse Thilo <jthilo@gnu.org>
17019
17020 * 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:
17021 Update FSF address.
17022
170231999-01-14 Jesse Thilo <jthilo@gnu.org>
17024
17025 * doc/bison.texinfo: Fix formatting glitch.
17026
17027 * doc/bison.texinfo: Update FSF address.
17028
170291999-01-14 Jesse Thilo <jthilo@gnu.org>
17030
17031 * acconfig.h: Update FSF address.
17032
170331999-01-08 Jesse Thilo <jthilo@gnu.org>
17034
17035 * src/system.h:
17036 Don't define PACKAGE here, since config.h defines it.
17037
170381998-12-30 Jesse Thilo <jthilo@gnu.org>
17039
17040 * src/reader.c: Update copyright date.
17041
17042 * src/main.c:
17043 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17044 favor of output directly to stderr (avoids buffer overruns).
17045
17046 * src/reader.c: Some checks for premature EOF.
17047
17048 * 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:
17049 Use prototypes if the compiler understands them.
17050
17051 * src/files.c: Honor TMPDIR on Unix hosts.
17052 Use prototypes if the compiler understands them.
17053
17054 * src/reader.c:
17055 Fix a couple of buffer overrun bugs.
17056 Use prototypes if the compiler understands them.
17057
17058 * src/system.h: Include unistd.h and ctype.h.
17059 Use #ifdef instead of #if for NLS symbols.
17060
170611998-12-30 Jesse Thilo <jthilo@gnu.org>
17062
17063 * doc/bison.texinfo:
17064 Delete comment "consider using @set for edition number, etc..." since
17065 we now are doing so.
17066
170671998-12-30 Jesse Thilo <jthilo@gnu.org>
17068
17069 * configure.in:
17070 Use prototypes if the compiler understands them.
17071
17072 * NEWS: Document 1.26 highlights.
17073
17074 * Makefile.am: Require Automake 1.3 or later.
17075
17076 * acconfig.h:
17077 Use prototypes if the compiler understands them.
17078
170791998-12-29 Jesse Thilo <jthilo@gnu.org>
17080
17081 * src/version.c:
17082 Use VERSION symbol from automake for version number.
17083
170841998-12-29 Jesse Thilo <jthilo@gnu.org>
17085
17086 * acconfig.h, configure.in, version.cin:
17087 Use VERSION symbol from automake for version number.
17088
170891998-11-28 Jesse Thilo <jthilo@gnu.org>
17090
17091 * Makefile.am:
17092 Distribute original version of simple parser (bison.s1), not built
17093 version (bison.simple).
17094
170951998-11-28 Jesse Thilo <jthilo@gnu.org>
17096
17097 * doc/bison.texinfo: Add info dir entry.
17098
17099 * doc/bison.texinfo:
17100 Let automake put version number into documentation.
17101
171021998-11-26 Jesse Thilo <jthilo@gnu.org>
17103
17104 * src/bison.cld, src/build.com, src/vmshlp.mar:
17105 Add non-RCS files from /gd/gnu/bison.
17106
171071998-11-26 Jesse Thilo <jthilo@gnu.org>
17108
17109 * doc/bison.1:
17110 Document the BISON_HAIRY and BISON_SIMPLE variables.
17111
171121998-11-25 Jesse Thilo <jthilo@gnu.org>
17113
17114 * src/version.c: Build version.c automatically.
17115
17116 * src/reader.c:
17117 Fix token numbering (used to start at 258, not 257).
17118
17119 * src/system.h: Include config.h.
17120
17121 * src/getargs.c: Update bug report address.
17122
17123 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17124 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17125
171261998-11-25 Jesse Thilo <jthilo@gnu.org>
17127
17128 * Makefile.am:
17129 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17130
17131 * configure.in, version.cin:
17132 Build version.c automatically.
17133
17134 * AUTHORS: Add AUTHORS file.
17135
17136 * README: Update bug report address.
17137
17138 * bison.simple:
17139 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17140
17141 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17142 Add automake stuff.
17143
171441998-11-25 Jesse Thilo <jthilo@gnu.org>
17145
17146 * doc/bison.texinfo: Clean up some formatting.
17147
171481998-05-05 Richard Stallman <rms@gnu.org>
17149
17150 * doc/bison.texinfo:
17151 Explain better why to make a pure parser.
17152
171531998-01-05 Richard Stallman <rms@gnu.org>
17154
17155 * src/files.c (openfiles):
17156 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17157 find a temporary directory, if possible. Do not unlink files while
17158 they are open.
17159
171601997-08-25 Richard Stallman <rms@gnu.org>
17161
17162 * src/reader.c (stack_offset;):
17163 Change some warni to warns.
17164
17165 * src/lex.c (literalchar): Use warns, not warni.
17166
171671997-06-28 Richard Stallman <rms@gnu.org>
17168
17169 * src/bison.s1: Add a Bison version comment.
17170
17171 * src/main.c (fatal, warn, berror):
17172 Use program_name.
17173
171741997-06-28 Richard Stallman <rms@gnu.org>
17175
17176 * Makefile.in (bison_version): New variable.
17177 (dist): Use that variable.
17178 (bison.s1): Substitute the Bison version into bison.simple.
17179
17180 * bison.simple: Add a Bison version comment.
17181
171821997-06-18 Richard Stallman <rms@gnu.org>
17183
17184 * src/main.c (fatal, warn, berror):
17185 Make error messages standard.
17186 (toomany): Improve error message text.
17187
17188 * 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:
17189 new.h renamed to alloc.h.
17190
171911997-06-18 Richard Stallman <rms@gnu.org>
17192
17193 * Makefile.in: new.h renamed to alloc.h.
17194
171951997-05-24 Richard Stallman <rms@gnu.org>
17196
17197 * src/lex.c (literalchar):
17198 Fix the code for escaping \, " and '.
17199
17200 (lex): Avoid trouble when there are many chars
17201 to discard in a char literal with just several chars in it.
17202
172031997-05-17 Richard Stallman <rms@gnu.org>
17204
17205 * src/bison.s1:
17206 Use malloc, if using alloca is troublesome.
17207 (YYSTACK_USE_ALLOCA): New flag macro.
17208 Define it for some systems and compilers.
17209 (YYSTACK_ALLOC): New macro.
17210 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17211 If it was malloc'd, free it.
17212
172131997-05-17 Richard Stallman <rms@gnu.org>
17214
17215 * bison.simple:
17216 Use malloc, if using alloca is troublesome.
17217 (YYSTACK_USE_ALLOCA): New flag macro.
17218 Define it for some systems and compilers.
17219 (YYSTACK_ALLOC): New macro.
17220 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17221 If it was malloc'd, free it.
17222
172231997-04-23 Richard Stallman <rms@gnu.org>
17224
17225 * src/bison.s1:
17226 (alloca) [__hpux]: Always define as __builtin_alloca.
17227
172281997-04-23 Richard Stallman <rms@gnu.org>
17229
17230 * bison.simple:
17231 (alloca) [__hpux]: Always define as __builtin_alloca.
17232
172331997-04-22 Richard Stallman <rms@gnu.org>
17234
17235 * src/bison.s1:
17236 [__hpux]: Include alloca.h (right for HPUX 10)
17237 instead of declaring alloca (right for HPUX 9).
17238
17239 * src/bison.s1 (__yy_memcpy):
17240 Declare arg `count' as unsigned int.
17241 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17242
172431997-04-22 Richard Stallman <rms@gnu.org>
17244
17245 * bison.simple:
17246 [__hpux]: Include alloca.h (right for HPUX 10)
17247 instead of declaring alloca (right for HPUX 9).
17248
17249 * bison.simple (__yy_memcpy):
17250 Declare arg `count' as unsigned int.
17251 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17252
172531997-01-03 Richard Stallman <rms@gnu.org>
17254
17255 * src/allocate.c: [__STDC__ or _MSC_VER]:
17256 Declare calloc and realloc to return void *.
17257
172581997-01-02 Richard Stallman <rms@gnu.org>
17259
17260 * src/system.h:
17261 [_MSC_VER]: Include stdlib.h and process.h.
17262 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17263
17264 * src/main.c (main): Return FAILURE as a value.
17265 (printable_version): Declare arg as int, not char.
17266
172671997-01-02 Richard Stallman <rms@gnu.org>
17268
17269 * Makefile.in (dist):
17270 Explicitly check for symlinks, and copy them.
17271
172721996-12-19 Richard Stallman <rms@gnu.org>
17273
17274 * src/files.c:
17275 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17276
172771996-12-18 Paul Eggert <eggert@gnu.org>
17278
17279 * src/bison.s1 (yyparse):
17280 If __GNUC__ and YYPARSE_PARAM are both defined,
17281 declare yyparse to have a void * argument.
17282
172831996-12-18 Paul Eggert <eggert@gnu.org>
17284
17285 * bison.simple (yyparse):
17286 If __GNUC__ and YYPARSE_PARAM are both defined,
17287 declare yyparse to have a void * argument.
17288
172891996-12-17 Richard Stallman <rms@gnu.org>
17290
17291 * src/reduce.c (nbits): Add some casts.
17292
172931996-08-12 Richard Stallman <rms@gnu.org>
17294
17295 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17296
172971996-08-12 Richard Stallman <rms@gnu.org>
17298
17299 * bison.simple: Test _MSDOS as well as _MSDOS_.
17300
173011996-07-31 Richard Stallman <rms@gnu.org>
17302
17303 * src/bison.s1:
17304 [__sun && __i386]: Include alloca.h.
17305
173061996-07-31 Richard Stallman <rms@gnu.org>
17307
17308 * bison.simple:
17309 [__sun && __i386]: Include alloca.h.
17310
173111996-07-30 Richard Stallman <rms@gnu.org>
17312
17313 * src/bison.s1: Comment change.
17314
17315 * src/bison.s1: Test _MSDOS_, not MSDOS.
17316
173171996-07-30 Richard Stallman <rms@gnu.org>
17318
17319 * bison.simple: Comment change.
17320
17321 * bison.simple: Test _MSDOS_, not MSDOS.
17322
173231996-06-01 Richard Stallman <rms@gnu.org>
17324
17325 * 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:
17326 Insert `_' macro around many string constants.
17327
17328 * src/main.c:
17329 Insert `_' macro around many string constants.
17330
17331 (main): Call setlocale, bindtextdomain and textdomain.
17332
17333 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17334 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17335 [ENABLE_NLS]: Include libintl.h.
17336 [ENABLE_NLS] (gettext): Define.
17337 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17338 (N_, PACKAGE, LOCALEDIR): New macros.
17339
173401996-06-01 Richard Stallman <rms@gnu.org>
17341
17342 * POTFILES.in: New file.
17343
17344 * Makefile.in (allocate.o):
17345 Define target explicitly.
17346
17347 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17348 (LDFLAGS): Set to @LDFLAGS@.
17349 (configure): Run autoconf only if preceding `cd' succeeds.
17350 (bison.s1): Redirect output to temporary file then move the
17351 temporary to the target, rather than redirecting directly to bison.s1.
17352 (clean): Remove config.status and config.log.
17353 (distclean): Don't remove config.status here.
17354
173551996-05-12 Richard Stallman <rms@gnu.org>
17356
17357 * src/bison.s1:
17358 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17359
173601996-05-12 Richard Stallman <rms@gnu.org>
17361
17362 * bison.simple:
17363 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17364
173651996-05-11 Richard Stallman <rms@gnu.org>
17366
17367 * src/bison.s1 (__yy_memcpy):
17368 Really reorder the args, as was supposedly done on Feb 14 1995.
17369 (yyparse): Calls changed accordingly.
17370
173711996-05-11 Richard Stallman <rms@gnu.org>
17372
17373 * Makefile.in (dist): Don't use $(srcdir).
17374
17375 * bison.simple (__yy_memcpy):
17376 Really reorder the args, as was supposedly done on Feb 14 1995.
17377 (yyparse): Calls changed accordingly.
17378
173791996-01-27 Richard Stallman <rms@gnu.org>
17380
17381 * src/output.c (output_rule_data):
17382 Test YYERROR_VERBOSE in the conditional
17383 around the definition of ttyname.
17384
173851995-12-29 Richard Stallman <rms@gnu.org>
17386
17387 * src/bison.s1:
17388 Fix line numbers in #line commands.
17389
173901995-12-29 Richard Stallman <rms@gnu.org>
17391
17392 * bison.simple:
17393 Fix line numbers in #line commands.
17394
173951995-12-27 Richard Stallman <rms@gnu.org>
17396
17397 * src/bison.s1 (YYPARSE_PARAM_DECL):
17398 In C++, make it always null.
17399 (YYPARSE_PARAM_ARG): New macro.
17400 (yyparse): Use YYPARSE_PARAM_ARG.
17401
174021995-12-27 Richard Stallman <rms@gnu.org>
17403
17404 * bison.simple (YYPARSE_PARAM_DECL):
17405 In C++, make it always null.
17406 (YYPARSE_PARAM_ARG): New macro.
17407 (yyparse): Use YYPARSE_PARAM_ARG.
17408
174091995-11-29 Richard Stallman <rms@gnu.org>
17410
17411 * doc/bison.texinfo:
17412 Describe literal string tokens, %raw, %no_lines, %token_table.
17413
174141995-11-29 Daniel Hagerty <hag@gnu.org>
17415
17416 * doc/bison.texinfo: Fixed update date
17417
174181995-10-16 Richard Stallman <rms@gnu.org>
17419
17420 * src/version.c: Version 1.25.
17421
174221995-10-16 Richard Stallman <rms@gnu.org>
17423
17424 * NEWS: *** empty log message ***
17425
174261995-10-16 Richard Stallman <rms@gnu.org>
17427
17428 * doc/bison.1, doc/bison.rnh:
17429 Add new options.
17430
174311995-10-15 Richard Stallman <rms@gnu.org>
17432
17433 * src/vmsgetargs.c, src/getargs.c:
17434 Added -n, -k, and -raw switches.
17435 (noparserflag, toknumflag, rawtoknumflag): New variables.
17436
17437 * src/symtab.h (SALIAS):
17438 New #define for adding aliases to %token.
17439 (struct bucket): Added `alias' field.
17440
17441 * src/reduce.c (reduce_grammar):
17442 Revise error message.
17443 (print_notices): Remove final `.' from error message.
17444
17445 * src/reader.c (reader_output_yylsp):
17446 New function.
17447 (readgram): Use `#if 0' around code that accepted %command
17448 inside grammar rules: The documentation doesn't allow it,
17449 and it will fail since the %command processors scan for the next %.
17450 (parse_token_decl): Extended the %token
17451 declaration to allow a multi-character symbol as an alias.
17452 (parse_thong_decl): New function.
17453 (read_declarations): Added %thong declarations.
17454 (read_declarations): Handle NOOP to deal with allowing
17455 % declarations as another means to specify the flags.
17456 (readgram): Allow %prec prior to semantics embedded in a rule.
17457 (skip_to_char, read_declarations, copy_definition)
17458 (parse_token_decl, parse_start_decl, parse_type_decl)
17459 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17460 (get_type_name, copy_guard, copy_action, readgram)
17461 (get_type, packsymbols): Revised most error messages.
17462 Changed `fatal' to `warnxxx' to avoid aborting for error.
17463 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17464 (read_declarations): Improve the error message for
17465 an invalid character. Do not abort.
17466 (read_declarations, copy_guard, copy_action): Use
17467 printable_version to avoid unprintable characters in printed output.
17468 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17469 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17470 Allow the type of a non-terminal can be given
17471 more than once, as long as all specifications give the same type.
17472
17473 * src/output.c:
17474 (output_headers, output_trailers, output, output_gram)
17475 (output_rule_data): Implement noparserflag variable.
17476 Implement toknumflag variable.
17477 (output): Call reader_output_yylsp to output LTYPESTR.
17478
17479 * src/main.c (main):
17480 If reader sees an error, don't process the grammar.
17481 (fatals): Updated to not use VARARGS1.
17482 (printable_version, int_to_string, warn, warni, warns, warnss)
17483 (warnsss): New error reporting functions. Avoid abort for error.
17484
17485 * src/lex.h:
17486 Added THONG and NOOP for alias processing.
17487 Added SETOPT for the new code that allows setting options with %flags.
17488
17489 * src/lex.c:
17490 Include getopt.h. Add some extern decls.
17491 (safegetc): New function to deal with EOF gracefully.
17492 (literalchar); new function to deal with reading \ escapes.
17493 (lex): Use literalchar.
17494 (lex): Implemented "..." tokens.
17495 (literalchar, lex, parse_percent_token): Made tokenbuffer
17496 always contain the token. This includes growing the token
17497 buffer while reading an integer.
17498 (parse_percent_token): Replaced if-else statement with percent_table.
17499 (parse_percent_token): Added % declarations as another
17500 way to specify the flags -n, -l, and -r. Also added hooks for
17501 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17502 major changes to files.c.
17503 (lex) Retain in the incoming stream a character following
17504 an incorrect '/'.
17505 (skip_white_space, lex): Revised most error messages
17506 and changed fatal to warn to avoid aborting.
17507 (percent_table): Added %thong declarations.
17508
17509 * src/gram.h: Comment changes.
17510
17511 * src/files.c (openfiles, open_extra_files, done):
17512 Add faction flag
17513 and actfile file. Handle noparserflag. Both for -n switch.
17514
17515 * src/conflicts.c (resolve_sr_conflict):
17516 Remove use of alloca.
17517
175181995-06-01 Jim Meyering <meyering@gnu.org>
17519
17520 * doc/bison.texinfo: *** empty log message ***
17521
175221995-05-06 Richard Stallman <rms@gnu.org>
17523
17524 * src/bison.s1: Comment change.
17525
175261995-05-06 Richard Stallman <rms@gnu.org>
17527
17528 * bison.simple: Comment change.
17529
175301995-05-03 Richard Stallman <rms@gnu.org>
17531
17532 * src/version.c: Version now 1.24.
17533
17534 * src/bison.s1: Change distribution terms.
17535
17536 * src/version.c: Version now 1.23.
17537
175381995-05-03 Richard Stallman <rms@gnu.org>
17539
17540 * doc/bison.texinfo:
17541 Rewrite "Conditions for Using Bison".
17542 Update version to 1.24.
17543
175441995-05-03 Richard Stallman <rms@gnu.org>
17545
17546 * bison.simple: Change distribution terms.
17547
175481995-02-23 Richard Stallman <rms@gnu.org>
17549
17550 * src/files.c: Test __VMS_POSIX as well as VMS.
17551
175521995-02-14 Jim Meyering <meyering@gnu.org>
17553
17554 * src/bison.s1 (__yy_memcpy):
17555 Renamed from __yy_bcopy to avoid
17556 confusion. Reverse FROM and TO arguments to be consistent with
17557 those of memcpy.
17558
175591995-02-14 Jim Meyering <meyering@gnu.org>
17560
17561 * bison.simple (__yy_memcpy):
17562 Renamed from __yy_bcopy to avoid
17563 confusion. Reverse FROM and TO arguments to be consistent with
17564 those of memcpy.
17565
175661994-11-10 David J. MacKenzie <djm@gnu.org>
17567
17568 * NEWS: reformat
17569
17570 * NEWS: New file.
17571
17572 * Makefile.in (DISTFILES): Include NEWS.
17573
17574 * Makefile.in (DISTFILES):
17575 Include install-sh, not install.sh.
17576
17577 * configure.in: Update to Autoconf v2 macro names.
17578
175791994-10-05 David J. MacKenzie <djm@gnu.org>
17580
17581 * Makefile.in: fix typo
17582
17583 * Makefile.in (prefix, exec_prefix):
17584 Let configure set them.
17585
175861994-09-28 David J. MacKenzie <djm@gnu.org>
17587
17588 * Makefile.in: Set datadir to $(prefix)/share.
17589
175901994-09-15 Richard Stallman <rms@gnu.org>
17591
17592 * src/bison.s1:
17593 Update copyright notice and GPL version.
17594
175951994-09-15 Richard Stallman <rms@gnu.org>
17596
17597 * bison.simple:
17598 Update copyright notice and GPL version.
17599
176001994-07-12 Richard Stallman <rms@gnu.org>
17601
17602 * src/reduce.c, src/reader.c:
17603 entered into RCS
17604
176051994-05-05 David J. MacKenzie <djm@gnu.org>
17606
17607 * Makefile.in: entered into RCS
17608
176091994-03-26 Richard Stallman <rms@gnu.org>
17610
17611 * src/bison.s1: entered into RCS
17612
176131994-03-26 Richard Stallman <rms@gnu.org>
17614
17615 * bison.simple: entered into RCS
17616
176171994-03-25 Richard Stallman <rms@gnu.org>
17618
17619 * src/main.c: entered into RCS
17620
176211994-03-24 Richard Stallman <rms@gnu.org>
17622
17623 * src/conflicts.c: entered into RCS
17624
176251994-01-02 Richard Stallman <rms@gnu.org>
17626
17627 * Makefile.in: *** empty log message ***
17628
176291993-11-21 Richard Stallman <rms@gnu.org>
17630
17631 * src/bison.s1: *** empty log message ***
17632
176331993-11-21 Richard Stallman <rms@gnu.org>
17634
17635 * doc/bison.texinfo: entered into RCS
17636
17637 * doc/bison.texinfo: *** empty log message ***
17638
176391993-11-21 Richard Stallman <rms@gnu.org>
17640
17641 * bison.simple: *** empty log message ***
17642
176431993-10-25 David J. MacKenzie <djm@gnu.org>
17644
17645 * doc/bison.texinfo: *** empty log message ***
17646
176471993-10-19 Richard Stallman <rms@gnu.org>
17648
17649 * src/bison.s1: *** empty log message ***
17650
176511993-10-19 Richard Stallman <rms@gnu.org>
17652
17653 * bison.simple: *** empty log message ***
17654
176551993-10-14 Richard Stallman <rms@gnu.org>
17656
17657 * src/bison.s1: *** empty log message ***
17658
176591993-10-14 Richard Stallman <rms@gnu.org>
17660
17661 * bison.simple: *** empty log message ***
17662
176631993-09-14 David J. MacKenzie <djm@gnu.org>
17664
17665 * doc/bison.texinfo: *** empty log message ***
17666
176671993-09-13 Noah Friedman <friedman@gnu.org>
17668
17669 * Makefile.in: *** empty log message ***
17670
176711993-09-10 Richard Stallman <rms@gnu.org>
17672
17673 * src/conflicts.c: *** empty log message ***
17674
17675 * src/system.h: entered into RCS
17676
176771993-09-10 Richard Stallman <rms@gnu.org>
17678
17679 * doc/bison.1: entered into RCS
17680
176811993-09-06 Noah Friedman <friedman@gnu.org>
17682
17683 * src/version.c: entered into RCS
17684
176851993-09-06 Noah Friedman <friedman@gnu.org>
17686
17687 * Makefile.in: *** empty log message ***
17688
176891993-07-30 David J. MacKenzie <djm@gnu.org>
17690
17691 * Makefile.in: *** empty log message ***
17692
176931993-07-24 Richard Stallman <rms@gnu.org>
17694
17695 * src/bison.s1: *** empty log message ***
17696
176971993-07-24 Richard Stallman <rms@gnu.org>
17698
17699 * bison.simple: *** empty log message ***
17700
177011993-07-08 David J. MacKenzie <djm@gnu.org>
17702
17703 * Makefile.in: *** empty log message ***
17704
177051993-07-04 Richard Stallman <rms@gnu.org>
17706
17707 * src/bison.s1: *** empty log message ***
17708
177091993-07-04 Richard Stallman <rms@gnu.org>
17710
17711 * bison.simple: *** empty log message ***
17712
177131993-06-26 David J. MacKenzie <djm@gnu.org>
17714
17715 * src/getargs.c: entered into RCS
17716
177171993-06-26 David J. MacKenzie <djm@gnu.org>
17718
17719 * doc/bison.texinfo: *** empty log message ***
17720
17721 * doc/bison.1: New file.
17722
177231993-06-25 Richard Stallman <rms@gnu.org>
17724
17725 * src/getargs.c: New file.
17726
177271993-06-16 Richard Stallman <rms@gnu.org>
17728
17729 * src/bison.s1: *** empty log message ***
17730
177311993-06-16 Richard Stallman <rms@gnu.org>
17732
17733 * bison.simple: *** empty log message ***
17734
177351993-06-03 Richard Stallman <rms@gnu.org>
17736
17737 * src/bison.s1: New file.
17738
177391993-06-03 Richard Stallman <rms@gnu.org>
17740
17741 * doc/bison.texinfo: *** empty log message ***
17742
177431993-06-03 Richard Stallman <rms@gnu.org>
17744
17745 * bison.simple: New file.
17746
177471993-05-19 Richard Stallman <rms@gnu.org>
17748
17749 * doc/bison.texinfo: New file.
17750
177511993-05-07 Noah Friedman <friedman@gnu.org>
17752
17753 * Makefile.in: *** empty log message ***
17754
177551993-04-28 Noah Friedman <friedman@gnu.org>
17756
17757 * src/reader.c: *** empty log message ***
17758
177591993-04-23 Noah Friedman <friedman@gnu.org>
17760
17761 * src/alloc.h: entered into RCS
17762
177631993-04-20 David J. MacKenzie <djm@gnu.org>
17764
17765 * src/version.c: *** empty log message ***
17766
17767 * src/files.c, src/allocate.c:
17768 entered into RCS
17769
17770 * src/reader.c: *** empty log message ***
17771
17772 * src/lex.c: entered into RCS
17773
17774 * src/conflicts.c: New file.
17775
17776 * src/symtab.c: entered into RCS
17777
17778 * src/alloc.h: New file.
17779
17780 * src/LR0.c: entered into RCS
17781
177821993-04-18 Noah Friedman <friedman@gnu.org>
17783
17784 * src/reader.c: New file.
17785
17786 * src/version.c: *** empty log message ***
17787
177881993-04-18 Noah Friedman <friedman@gnu.org>
17789
17790 * Makefile.in: *** empty log message ***
17791
177921993-04-17 Noah Friedman <friedman@gnu.org>
17793
17794 * Makefile.in: *** empty log message ***
17795
177961993-04-15 Richard Stallman <rms@gnu.org>
17797
17798 * src/main.c, src/files.c:
17799 New file.
17800
178011993-04-15 Noah Friedman <friedman@gnu.org>
17802
17803 * configure.in: entered into RCS
17804
17805 * configure.in: *** empty log message ***
17806
17807 * configure.in: New file.
17808
178091993-04-14 Richard Stallman <rms@gnu.org>
17810
17811 * Makefile.in: New file.
17812
178131993-04-13 Richard Stallman <rms@gnu.org>
17814
17815 * src/version.c: New file.
17816
178171993-03-25 Richard Stallman <rms@gnu.org>
17818
17819 * src/output.c: entered into RCS
17820
178211992-09-25 Richard Stallman <rms@gnu.org>
17822
17823 * configure.bat: entered into RCS
17824
178251992-06-22 Richard Stallman <rms@gnu.org>
17826
17827 * src/vmsgetargs.c: entered into RCS
17828
178291992-06-22 Richard Stallman <rms@gnu.org>
17830
17831 * doc/bison.rnh: entered into RCS
17832
178331992-04-20 David J. MacKenzie <djm@gnu.org>
17834
17835 * README: entered into RCS
17836
178371992-01-22 Richard Stallman <rms@gnu.org>
17838
17839 * src/machine.h: entered into RCS
17840
178411991-12-21 Richard Stallman <rms@gnu.org>
17842
17843 * src/lalr.c, src/closure.c:
17844 entered into RCS
17845
178461991-12-20 Richard Stallman <rms@gnu.org>
17847
17848 * src/state.h: entered into RCS
17849
178501991-12-18 Richard Stallman <rms@gnu.org>
17851
17852 * src/print.c, src/nullable.c, src/derives.c:
17853 entered into RCS
17854
178551991-11-03 David J. MacKenzie <djm@gnu.org>
17856
17857 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17858 entered into RCS
17859
178601988-09-09 Richard Stallman <rms@gnu.org>
17861
17862 * src/bison.hairy: entered into RCS
17863
178641987-12-16 Richard Stallman <rms@gnu.org>
17865
17866 * REFERENCES: entered into RCS
dc546b0f 17867
f294a2c2 17868
04098407 17869 -----
f294a2c2 17870
04098407 17871 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
17872 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17873 Software Foundation, Inc.
f294a2c2 17874
04098407
PE
17875 Copying and distribution of this file, with or without
17876 modification, are permitted provided the copyright notice and this
17877 notice are preserved.
e9071366
AD
17878
17879$Id$