]> git.saurik.com Git - bison.git/blob - ChangeLog
Document last checkin a bit better.
[bison.git] / ChangeLog
1 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * NEWS: Reword the %language news a bit, and put it earlier.
4
5 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6 Rewrite to simplify the logic.
7 (language_argmatch): Likewise.
8 (program_name): We now own this var.
9 * src/getargs.h (struct bison_language): Use char[] rather than
10 const char *.
11
12 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
13 Java is supported.
14 * src/complain.c (program_name): Remove decl; no longer needed.
15 * src/main.c (program_name): Remove; now belongs to getargs.
16
17 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
18
19 * NEWS: Document %language.
20
21 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
22
23 * data/c-skel.m4, data/c++-skel.m4: New files.
24 * data/glr.c: Complain on push parsers.
25
26 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
27 over %skeleton.
28 (Directives): Document %language and %skeleton.
29 (Command line): Document -L.
30
31 * examples/extexi: Rewrite %require directive.
32 * examples/calc++/Makefile.am: Pass VERSION to extexi.
33
34 * src/files.c (compute_exts_from_gc): Look in language structure
35 for .y extension.
36 (compute_file_name_parts): Check whether .tab should be added.
37 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
38 (language, skeleton_arg, language_argmatch): New.
39 (long_options): Add --language.
40 (getargs): Use skeleton_arg, add -L/--language.
41 * src/getargs.h: Include location.h.
42 (struct bison_language, language, skeleton_arg, language_argmatch): New.
43 * src/output.c (prepare): Pick default skeleton from struct language.
44 Don't dispatch C skeletons here.
45 * src/parse-gram.y (PERCENT_LANGUAGE): New.
46 (prologue_declaration): Add "%language" rule, use skeleton_arg.
47 * src/scan-gram.l ("%language"): New rule.
48
49 * tests/calc.at: Test %skeleton and %language.
50 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
51 (AT_GLR_IF): Look for %skeleton "glr.cc".
52 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
53 (AT_YACC_IF): Reject %language.
54
55 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
56
57 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
58 since it wasn't used; only the typedef name 'semantic_type' is needed.
59 Also, omit trailing white space.
60
61 * bootstrap: Sync from coreutils.
62 (gnulib_extra_files): Add build-aux/announce.gen.
63 (slurp): Adjust .gitignore files like .cvsignore files.
64 * build-aux/announce-gen: Remove from CVS, since bootstrap
65 now creates this.
66
67 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
68
69 Make %push-parser imply %pure-parser. This fixes several bugs; see
70 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
71 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
72 pure_parser = true.
73 * data/push.c: Don't bother testing b4_push_if when deciding whether
74 to expand b4_declare_parser_variables globally.
75 (yypush_parse): Likewise in here.
76
77 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
78 (yy_reduce_print): Reformat M4 for readability.
79
80 2006-12-15 Bob Rossi <bob@brasko.net>
81 and Joel Denny <jdenny@ces.clemson.edu>
82
83 * data/push.c (yypstate): Add typedef, and update all uses of
84 struct yypstate to just yypstate.
85 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
86
87 2006-12-14 Bob Rossi <bob@brasko.net>
88
89 * data/push.c (yypush_parse): Declare prototype regardless of
90 %locations option.
91
92 2006-12-14 Bob Rossi <bob@brasko.net>
93
94 * data/push.c (yyparse): Remove the prototype and the #define when in
95 push-parser mode.
96
97 2006-12-13 Bob Rossi <bob@brasko.net>
98
99 * data/push.c (yypstate_init): Rename to...
100 (yypstate_new): ... this and use b4_c_function_def.
101 (yypstate_delete): New.
102 (yypush_parse): Change parameters yynval and yynlloc to be const.
103 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
104 yypstate_delete functions.
105
106 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
107
108 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
109 strange test case titles. Reported by Bob Rossi.
110
111 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
112
113 * TODO: Add pointer to Sylvain Schmitz's work on static detection
114 of potential ambiguities in GLR grammers.
115
116 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
117
118 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
119 `bison ', use m4_index instead of m4_substr since chopping up a string
120 containing M4-special characters causes problems here.
121
122 Fix a couple of bugs related to special characters in user-specified
123 file names, and make it easier for skeletons to compute output file
124 names with the same file name prefix as Bison-computed output file
125 names.
126 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
127 b4_parser_file_name and b4_spec_defines_file instead of
128 @output_parser_name@ and @output_header_name@, which are now redundant.
129 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
130 b4_parser_file_name, b4_spec_defines_file, and the new
131 @basename(FILENAME@) instead of @output_parser_name@ and
132 @output_header_name@, which inappropriately escaped the file names as
133 C string literals.
134 * src/files.c (all_but_ext): Remove static qualifier.
135 (compute_output_file_names): Move `free (all_but_ext)' to...
136 (output_file_names_free): ... here since all_but_ext is needed later.
137 * src/files.h (all_but_ext): Extern.
138 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
139 exactly what MUSCLE_INSERT_STRING used to do.
140 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
141 characters are escaped properly.
142 * src/output.c (prepare): Define muscle file_name_all_but_ext as
143 all_but_ext.
144 For pkgdatadir muscle, maintain previous functionality by using
145 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
146 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
147 digraphs would never be expanded. Hopefully no one has M4-special
148 characters in his Bison installation path.
149 * src/scan-skel.l: Don't parse @output_header_name@ and
150 @output_parser_name@ anymore since they're now redundant.
151 In @output, use decode_at_digraphs.
152 Parse a new @basename command that invokes last_component.
153 (decode_at_digraphs): New.
154 (BASE_QPUTS): Remove unused.
155 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
156 (Output file name): New tests.
157
158 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
159
160 Warn about output files that are generated by the skeletons and that
161 conflict with other output files.
162 * data/glr.c: Don't generate the header file here when glr.cc does.
163 * src/files.c (file_names, file_names_count): New static globals.
164 (compute_output_file_names): Invoke output_file_name_check for files
165 not generated by the skeletons and remove existing checks.
166 (output_file_name_check): New function that warns about conflicting
167 output file names.
168 (output_file_names_free): Free file_names.
169 * src/files.h (output_file_name_check): Declare.
170 * src/scan-skel.l: Invoke output_file_name_check for files generated by
171 the skeletons.
172 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
173 (Conflicting output files): New tests.
174
175 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
176
177 * doc/bison.texinfo: Fix a couple of typos.
178
179 2006-12-08 Bob Rossi <bob@brasko.net>
180
181 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
182 Rename to...
183 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
184 update all uses.
185 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
186 (yypush_parse): Rename yypvars argument to yyps and remove redundant
187 local pv.
188 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
189 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
190
191 2006-12-07 Bob Rossi <bob@brasko.net>
192 and Joel Denny <jdenny@ces.clemson.edu>
193
194 * data/push.c (yypvarsinit): Change return type from void* to struct
195 yypvars*. No longer cast to void* on return.
196 (struct yypvars): Remove yylen since it need not be remembered between
197 yypushparse invocations.
198 (yypushparse): Don't copy between yylen and pv->yylen.
199
200 2006-12-05 Bob Rossi <bob@brasko.net>
201
202 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
203 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
204 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
205 (struct yypvars): Remove b4_declare_parser_variables.
206 (yypvarsinit): Remove init code for removed variables.
207 (global scope): Do not declare b4_declare_parser_variables if
208 push or pure mode.
209 (yypushparse): Add b4_declare_parser_variables.
210 Init new local variables, and remove init code for removed
211 yypvars variables.
212 (yyparse): Delete.
213 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
214 and yyparse for other modes.
215 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
216 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
217 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
218 (AT_PURE_LEX_IF): True if pure or push parser.
219
220 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
221
222 Document Yacc prologue alternatives and default %destructor's and
223 %printer's as experimental. Don't mention Java yet. Discussed at
224 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
225 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
226 (2.3a): Annotate this entry to say the old forms of these features were
227 also experimental.
228 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
229 Bison Symbols): Say they're experimental. Comment out any mention
230 of Java (we'll want this back eventually).
231
232 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
233
234 Support a file name argument to %defines. Deprecate `=' in
235 %file-prefix, %name-prefix, and %output. Discussed at
236 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
237 * NEWS (2.3a+): Mention.
238 * doc/bison.texinfo (Decl Summary, Bison Symbols): Add entry for new
239 form of %defines, and remove `=' from entries for %file-prefix,
240 %name-prefix, and %output.
241 * src/parse-gram.y (prologue_declaration): Implement.
242 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
243 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
244 all but one occurrence of %name-prefix.
245 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
246 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
247 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
248 occurrence of each of %file-prefix and %output. Add check for %defines
249 with argument.
250 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
251 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
252 Remove the `=' from %output.
253
254 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
255
256 Don't escape $ in test case titles since Autoconf 2.61 now does that
257 correctly.
258 * tests/actions.at (Default %printer and %destructor are not for error
259 or $undefined): Here.
260 (Default %printer and %destructor are not for $accept): Here.
261 * tests/input.at (Invalid $n and @n): Here.
262
263 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
264
265 Rename <!> to <>. Discussed starting at
266 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
267 * NEWS (2.3a+): Update.
268 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
269 Update.
270 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
271 * src/scan-gram.l (INITIAL): Implement.
272 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
273 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
274 comment.
275 * tests/actions.at (Default tagless %printer and %destructor,
276 Default tagged and per-type %printer and %destructor,
277 Default %printer and %destructor are not for error or $undefined,
278 Default %printer and %destructor are not for $accept,
279 Default %printer and %destructor for mid-rule values): Update.
280 * tests/input.at (Default %printer and %destructor redeclared,
281 Unused values with default %destructor): Update.
282
283 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
284
285 Don't let %prec take a nonterminal.
286 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
287 token.
288 * tests/input.at (%prec takes a token): New test checking that %prec
289 won't take a nonterminal.
290
291 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
292
293 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
294 it was double-quoted.
295 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
296 grammar is maintained with Bison's highest standards.
297 * src/getargs.c: Fix some typos in Doxygen comments.
298
299 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
300
301 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
302 later. Reported by Paul Eggert in
303 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
304 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
305 * src/scan-code.l (translate_action): Don't bother invoking
306 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
307 (code_scanner_free): Instead of invoking
308 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
309 which frees more.
310 * src/scan-gram.l (gram_scanner_free): Likewise.
311 * src/scan-skel.l (scan_skel): Likewise.
312
313 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
314
315 * src/files.c (tr): Change return type to void.
316 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
317 has been called previously for the same key.
318 (muscle_find): Return storage instead of value so that
319 --enable-gcc-warnings doesn't produce warnings that the return discards
320 const. aver that the value and storage are the same since storage
321 could potentially be NULL when value is not.
322 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
323 same as 0.
324
325 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
326
327 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
328 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
329 us a slightly cleaner distribution, and also works.
330 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
331 gnulib changes.
332
333 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
334 and Paul Eggert <eggert@cs.ucla.edu>
335
336 Don't let Bison leak memory except when it complains.
337 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
338 (spec_defines_file, dir_prefix): Now char *, not const char *,
339 since they are freed.
340 * src/files.c: Likewise.
341 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
342 Likewise.
343 (tr): Now operates in-place. All uses changed.
344 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
345 values.
346 (compute_file_name_parts, compute_output_file_names): Don't store
347 read-only data in variables that will be freed.
348 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
349 src_extension, and header_extension.
350 (output_file_names_free): New public function to free
351 spec_verbose_file, spec_graph_file, spec_defines_file,
352 parser_file_name, and dir_prefix.
353 * src/getargs.c (getargs): Don't store read-only data in variables that
354 will be freed.
355 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
356 (which previously existed but was unused), and quotearg_free.
357 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
358 * src/muscle_tab.c: Likewise.
359 (muscle_entry): Make the value char const *,
360 and add a new storage member that is char * and can be freed.
361 (muscle_entry_free): New private function.
362 (muscle_init): Use it instead of free.
363 (muscle_insert, muscle_grow): Update and use new storage member.
364 (muscle_code_grow): Free the string passed to muscle_grow
365 since it's not needed anymore.
366 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
367 add a new `char *code' member.
368 ("{...}"): Declare semantic type as code.
369 * src/scan-code.h (translate_rule_action):
370 (translate_symbol_action, translate_code, translate_action): Return
371 `char const *' rather than `char *' since external code should not free
372 these strings.
373 * src/scan-code.l: Likewise.
374 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
375 which is "{...}" in the parser.
376 * tests/Makefile.am (maintainer-check-valgrind): Set
377 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
378 Valgrind.
379 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
380 complain.
381 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
382 expecting a non-zero exit status sets --leak-check=summary and
383 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
384 this case, and we don't want to hear about it.
385
386 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
387
388 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
389 instead of from the template, to simplify configuration a bit.
390 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
391 and m4/wint_t.m4, as they are needed with the latest gnulib.
392
393 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
394
395 Disable unset/unused mid-rule value warnings by default, and recognize
396 --warnings=midrule-values to enable them. Discussed starting at
397 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
398 * NEWS (2.3a+): Mention.
399 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
400 warnings): Add entry for midrule-values subargument.
401 * src/reader.c (symbol_should_be_used): Don't return true just because
402 the value is a set/used mid-rule value unless
403 --warnings=midrule-values was specified.
404 * tests/input.at (Unused values, Unused values before symbol
405 declarations): Run tests with and without --warnings=midrule-values.
406
407 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
408 than LIST_FREE directly.
409
410 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Finish implementing --warnings=error, which should not be implied by
413 --warnings=all (or by its synonyms -W and --warnings without
414 subarguments).
415 * src/complain.c (set_warning_issued): New function to report that
416 warnings are being treated as errors and to record an error if so.
417 Invoke...
418 (warn_at, warn): ... here.
419 * src/getargs.c (warnings_args, warnings_types): Reorder so that
420 "error - warnings are errors" does not appear above "all - all of the
421 above".
422 (getargs): For -W and --warnings without subarguments, don't let
423 FLAGS_ARGMATCH set warnings_error in warnings_flag.
424 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
425
426 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
427
428 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
429 empty subargument list. For example: `bison --warnings= parser.y'.
430
431 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
432
433 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
434 the parser header file so that gcc doesn't warn.
435
436 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
437
438 Split the default %destructor/%printer into two kinds: <*> and <!>.
439 Discussed starting at
440 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
441 * NEWS (2.3a+): Mention.
442 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
443 previous change today related to mid-rules.
444 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
445 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
446 (TYPE_TAG_ANY): Add as <*>.
447 (TYPE_TAG_NONE): Add as <!>.
448 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
449 for <*> and <!>.
450 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
451 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
452 * src/symlist.c (symbol_list_default_new): Split into tagged and
453 tagless versions.
454 (symbol_list_destructor_set, symbol_list_printer_set): Split
455 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
456 SYMLIST_DEFAULT_TAGLESS.
457 * src/symlist.h: Update symbol_list_default*_new prototypes.
458 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
459 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
460 * src/symtab.c (default_destructor, default_destructor_location,
461 default_printer, default_printer_location): Split each into tagged and
462 tagless versions.
463 (symbol_destructor_get, symbol_destructor_location_get,
464 symbol_printer_get, symbol_printer_location_get): Implement tagged
465 default and tagless default cases.
466 (default_destructor_set, default_printer_set): Split each into tagged
467 and tagless versions.
468 * src/symtab.h: Update prototypes.
469 * tests/actions.at (Default %printer and %destructor): Rename to...
470 (Default tagless %printer and %destructor): ... this, and extend.
471 (Per-type %printer and %destructor): Rename to...
472 (Default tagged and per-type %printer and %destructor): ... this, and
473 extend.
474 (Default %printer and %destructor for user-defined end token): Extend.
475 (Default %printer and %destructor are not for error or $undefined):
476 Update.
477 (Default %printer and %destructor are not for $accept): Update.
478 (Default %printer and %destructor for mid-rule values): Extend.
479 * tests/input.at (Default %printer and %destructor redeclared): Extend.
480 (Unused values with default %destructor): Extend.
481
482 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
483
484 Don't apply the default %destructor/%printer to an unreferenced midrule
485 value. Mentioned at
486 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
487 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
488 like $@n instead of just @n so that the default %destructor/%printer
489 logic doesn't see them as user-defined symbols.
490 (symbol_is_dummy): Check for both forms of the name.
491 * src/reader.c (packgram): Remove the `$' from each midrule symbol
492 name for which the midrule value is referenced in any action.
493 * tests/actions.at (Default %printer and %destructor for mid-rule
494 values): New test.
495 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
496 for change to dummy symbol names.
497
498 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
499
500 Warn about unset midrule $$ if the corresponding $n is used.
501 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
502 $n usage.
503 (packgram): Before invoking grammar_rule_check on any rule, make sure
504 all actions have already been scanned in order to set `used' flags.
505 Otherwise, checking that a midrule's $$ is set will not always work
506 properly because the midrule check must forward-reference the midrule's
507 parent rule.
508 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
509 warning.
510
511 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
512
513 More improvements to the documentation of the prologue alternatives:
514 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
515 Bison manual.
516 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
517 some text to clarify the relative importance of the new directives and
518 to show how these directives may be viewed as code labels.
519
520 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
521
522 Similar to the recently removed %before-header, add %code-top as the
523 alternative to the pre-prologue. Mentioned at
524 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
525 Also, let the prologue alternatives appear in the grammar section.
526 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
527 (prologue_declaration): Move the existing prologue alternatives to...
528 (grammar_declaration): ... here and add %code-top.
529 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
530
531 Clean up and extend documentation for the prologue alternatives.
532 * NEWS (2.3a+): Describe prologue alternatives.
533 * doc/bison.texinfo (Prologue): Move discussion of prologue
534 alternatives to...
535 (Prologue Alternatives): ... this new section, and extend it to discuss
536 all 4 directives in detail.
537 (Bison Symbols): Clean up discussion of prologue alternatives and add
538 %code-top.
539
540 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
541
542 DJGPP specific issues.
543
544 * djgpp/config.bat: config.hin has been moved to lib. Adjust
545 config.bat accordingly.
546 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
547 * djgpp/config.site: Likewise.
548
549 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
550
551 Replace %*-header with %provides, %requires, %code. See discussion at
552 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
553
554 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
555 (b4_user_start_header): Remove.
556 * data/glr.c: Use new macros instead of b4_*start_header
557 and b4_*end_header.
558 * data/glr.cc: Likewise.
559 * data/lalr1.cc: Likewise.
560 * data/push.c: Likewise.
561 * data/yacc.c: Likewise.
562
563 * doc/bison.texinfo: Remove %before-header, rename
564 %{start,end,after}-header to %requires, %provides, %code.
565
566 * src/parse-gram.y: Likewise (also rename token names accordingly).
567 * src/scan-gram.l: Likewise.
568 * tests/actions.at: Likewise.
569
570 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
571
572 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
573 Problem reported by Joel E. Denny.
574
575 2006-10-14 Jim Meyering <jim@meyering.net>
576
577 (Sync from coreutils.)
578 Work also when the working directory (with e.g. coreutils sources)
579 is version controlled with git, rather than CVS.
580 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
581 rather than CVS.
582 In messages and comments, say e.g., "checked-out sources",
583 rather than "CVS sources".
584 (version_controlled_file): New function. Work for git as well as
585 for CVS. Don't use grep's -q option.
586 (slurp): Call it here, in place of CVS-specific code.
587
588 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 Fix testsuite for ./configure --enable-gcc-warnings:
591 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
592 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
593 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
594 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
595 * test/regression.at (Diagnostic that expects two alternatives):
596 Likewise.
597
598 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
599
600 * bootstrap.conf (gnulib_modules): Add config-h.
601 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
602 worry about HAVE_CONFIG_H.
603 * lib/abitset.c: Likewise.
604 * lib/bitset.c: Likewise.
605 * lib/bitset_stats.c: Likewise.
606 * lib/bitsetv-print.c: Likewise.
607 * lib/bitsetv.c: Likewise.
608 * lib/ebitset.c: Likewise.
609 * lib/get-errno.c: Likewise.
610 * lib/lbitset.c: Likewise.
611 * lib/subpipe.c: Likewise.
612 * lib/timevar.c: Likewise.
613 * lib/vbitset.c: Likewise.
614 * lib/bitset.c: Include "bitset.h" first, to test interface.
615 * lib/bitset_stats.c: Include "bitset_stats.h" first.
616 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
617 * lib/bitsetv.c: Include "bitsetv.h" first.
618 * lib/get-errno.c: Include "get-errno.h" first.
619 * m4/.cvsignore: Add config-h.m4.
620 * tests/actions.at (Default %printer and %destructor for ...):
621 Adjust expected line numbers in output to reflect removal of #if
622 HAVE_CONFIG_H lines.
623 * tests/glr-regression.at (Missed %merge type warnings when ...):
624 Likewise.
625 * tests/regression.at (Braced code in declaration in rules section):
626 Likewise.
627 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
628 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
629 Include <config.h> unconditionally.
630
631 * bootstrap: Sync from coreutils, as follows:
632
633 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
634
635 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
636 variable was sometimes used without being initialized. This
637 messed up the installation of the INSTALL file in some cases.
638
639 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
640
641 * bootstrap (usage, main program, symlink_to_gnulib): Add option
642 --copy. Inspired by a suggestion from Bruno Haible.
643
644 2006-10-03 Jim Meyering <jim@meyering.net>
645
646 * bootstrap: Undo last change to this file, since now gnulib-tool
647 sticks with the automake default in generating dependencies.
648
649 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
650
651 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
652 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
653
654 * doc/bison.1: Add copyright notice.
655
656 * data/glr.c: Don't include <stdarg.h>; not used.
657
658 * NEWS: The -g and --graph options now output graphs in Graphviz
659 DOT format, not VCG format.
660 * doc/bison.1: Likewise.
661 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
662 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
663 of this change in
664 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
665 * TODO: Remove Graphviz entry.
666 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
667 remove vcg.c, vcg.h, vcg_defaults.h.
668 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
669 * src/graphviz.c, src/graphviz.h: New files.
670 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
671 * src/files.h: Make comment more generic.
672 * src/main.c (main): Likewise.
673 * src/print_graph.h: Likewise.
674 * src/getargs.c (usage): Make usage description more generic.
675 * src/print_graph.c: Include graphviz.h rather than vcg.h.
676 (static_graph, fgraph): Remove. All uses changed to pass
677 arguments instead of sharing a static var.
678 (print_core, print_actions, print_state, print_graph):
679 Output graphviz format rather than VCG format.
680 * tests/.cvsignore: Remove *.vcg; add *.dot.
681 * tests/output.at: Expect *.dot files, not *.vcg files.
682
683 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
684 accommodates the 2006-10-08 change.
685
686 2006-10-11 Bob Rossi <bob@brasko.net>
687
688 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
689 (b4_yyssa, b4_yyerror_range): New macros.
690 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
691 (yypvarsinit): Remove init of removed fields.
692 (yypushparse): Remove use of removed fields; use new macros instead.
693
694 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
695
696 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
697 in a push parser. Reindent slightly to match yacc.c better.
698
699 2006-10-11 Bob Rossi <bob@brasko.net>
700
701 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
702 yymsg_alloc fields.
703 (yypvarsinit, yypushparse): Remove init of removed fields.
704 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
705
706 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
707
708 * THANKS: Add Paolo Bonzini and Bob Rossi.
709
710 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
711
712 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
713 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
714 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
715 b4_define_user_cde and uses): Remove.
716 (b4_comment, b4_prefix, b4_sync_start): New.
717 * data/bison.m4: New file, with most of the content removed from c.m4.
718 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
719 * src/output.c (output_skeleton): Pass bison.m4.
720 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
721 only if specified.
722
723 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
724
725 Fix test failure reported by Tom Lane in
726 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
727 and try to make such failures easier to catch in the future.
728 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
729 that's now the caller's responsibility.
730 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
731 Set yychar = YYEOF if it's negative.
732 * tests/actions.at (yylex): Abort if asked to read past EOF.
733 * tests/conflicts.at (yylex): Likewise.
734 * tests/cxx-type.at (yylex): Likewise.
735 * tests/glr-regression.at (yylex): Likewise.
736 * tests/input.at (yylex): Likewise.
737 * tests/regression.at (yylex): Likewise.
738 * tests/torture.at (yylex): Likewise.
739
740 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
741
742 Fix problems with translating English-language diagnostics.
743 * bootstrap: Fix bug introduced in recent bootstrap changes, with
744 respect to bison-runtime pot generation. The YY_ stuff
745 wasn't being captured.
746 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
747 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
748 * runtime-po/POTFILES.in: Add data/push.c.
749
750 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
751
752 Merge bootstrap changes from coreutils.
753
754 2006-09-28 Jim Meyering <jim@meyering.net>
755
756 Automatically generated dependencies are important even
757 when all of the sources in a directory come from gnulib.
758 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
759 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
760
761 2006-09-23 Jim Meyering <jim@meyering.net>
762
763 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
764
765 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
766
767 * bootstrap: Add support for --force.
768 (usage): New function. Describe usage less tersely.
769 (CVS_only_file): New var.
770
771 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
772
773 * data/push.c (YYPUSH_MORE): Make it an enum instead.
774 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
775 Adjust white space and comments to match GNU style better.
776
777 2006-09-20 Bob Rossi <bob@brasko.net>
778
779 * data/push.c (yyresult_get): Remove function.
780 (YYPUSH_MORE): Add #define.
781 (yypushparse): Modify return value.
782
783 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
784
785 * stamp-h.in: Remove; no longer needed.
786 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
787 Remove config.h, config.hin, intl (no longer created).
788 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
789 stamp-h1.
790
791 Sync bootstrap from coreutils, as follows:
792
793 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
794
795 * bootstrap (symlink_to_gnulib): New function.
796 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
797 to copies-of-gnulib.
798 (cp_mark_as_generated, slurp, gnulib_files):
799 Avoid making a copy if it's the same as the old version.
800 (gnulib_files): Add support for this variable (used by Bison).
801
802 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
803
804 * src/getargs.c (usage): Rework to use conventions similar to
805 coreutils, to make translation a bit easier and the code a bit
806 smaller. Problem reported by Tim Van Holder.
807
808 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
809
810 Use some of gnulib's new modules, taken from coreutils.
811
812 * bootstrap: Sync from coreutils, except add support for gnulib_files.
813 * bootstrap.conf: New file.
814 (gnulib_modules): Add configmake, inttypes, unistd.
815 (XGETTEXT_OPTIONS): Add complain, complain_at,
816 fatal, fatal_at, warn, warn_at, unexpected_end.
817 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
818 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
819 (gl_EARLY): Add.
820 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
821 (gl_INIT): Add
822 (GNULIB_AUTOCONF_SNIPPET): Remove.
823 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
824 the pickiest.
825 * lib/.cvsignore: Add inttypes_.h.
826 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
827 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
828 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
829 no-longer-necessary initializations.
830 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
831 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
832 use the unistd module.
833 * src/system.h: Likewise.
834 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
835 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
836 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
837 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
838 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
839 * src/system.h: Include inttypes.h unconditionally, now that we
840 use the inttypes module. Don't bother to include stdint.h, since
841 inttypes.h now does that for us.
842 (LOCALEDIR): Remove, now that we use the configmake module.
843 * src/getargs.c: Include configmake.h.
844 * src/main.c: Likewise.
845 * src/output.c: Likewise.
846 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
847 not from $abs_top_builddir, since config.h moved.
848
849
850 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
851 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
852
853 * src/parse-gram.y (symbol_declaration): Don't put statements
854 before declarations; it's not portable to C89.
855 * src/scan-code.l (handle_action_at): Likewise.
856
857 * src/scan-code.l: Always initialize braces_level; the old code
858 left it uninitialized and therefore had undefined behavior.
859
860 Don't attempt to redefine 'assert', since it runs afoul of
861 systems where standard headers (mistakenly) include <assert.h>.
862 Instead, define and use our own alternative, called 'aver'.
863 * src/reader.c: Don't include assert.h, since we no longer
864 use assert.
865 * src/scan-code.l: Likewise.
866 * src/system.h (assert): Remove, replacing with....
867 (aver): New function, taking a bool arg. All uses changed.
868 * src/tables.c (pack_vector): Ensure that aver arg is bool,
869 not merely an integer.
870
871 2006-09-15 Bob Rossi <bob@brasko.net>
872
873 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
874 * data/c.m4 (YYPUSH): New.
875 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
876 * src/getargs.c (push_parser): New var.
877 * src/getargs.h (push_parser): New declaration.
878 * src/output.c (prepare): Add macro insertion of `push_flag'.
879 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
880 (prologue_declaration): Parse %push-parser.
881 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
882 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
883 list of removed lines from the traces observed.
884 (AT_CHECK_CALC_LALR): Added push parser tests.
885
886 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
887
888 * NEWS: Version 2.3a.
889 * configure.ac (AC_INIT): Likewise.
890
891 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
892 "#define YYSTYPE int" that caused "make maintainer-check" to fail
893 due to header ordering dependencies. I don't know why the #define
894 was there.
895
896 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
897 runtime cost when YYDEBUG is not defined, and so that some tests
898 that used to fail now work. Problem and initial suggestion by
899 Paolo Bonzini.
900 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
901 * data/glr.cc (b4_parser_class_name):
902 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
903 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
904 (yydebug_) [YYDEBUG]: New member.
905 (yycdebug_): Now defined only if YYDEBUG.
906 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
907 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
908 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
909 if YYYDEBUG.
910 (debug_stream, set_debug_stream, debug_level, set_debug_level):
911 Define only if YYDEBUG.
912 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
913 set_debug_level.
914 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
915 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
916 AT_CHECK_CALC_GLR_CC that are working now.
917
918 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
919
920 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
921 We don't need them in glr.cc, and glr.c defines them.
922 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
923 assumes that defining it to anything is the same as defining
924 it to 1. Problem reported by Paolo Bonzini.
925
926 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
927
928 * data/c.m4 (b4_null, b4_case): Define.
929 * src/output.c (prepare_symbols): Use b4_null.
930 (user_actions_output): Use b4_case.
931
932 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
933
934 * data/glr.c (b4_shared_declarations): Put start-header first,
935 before any #includes that we generate, so that feature-test
936 macros work. Problem reported by Michael Deutschmann in
937 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
938 * data/lalr1.cc: Likewise.
939 * doc/bison.texinfo (Prologue): Document that feature-test macros
940 should be defined before any Bison declarations.
941 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
942 that depend on location.hh after, not before, Bison decls, since
943 we now include location.hh after the first user prologue.
944
945 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
946 Sander Brandenburg in
947 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
948 Also, fix minor white space and comment issues.
949 (Prologue): Mention that it's better to define feature-test macros
950 before Bison declarations. Problem reported by Michael Deutschmann.
951
952 * README-cvs: Fix typo: "&" should be "&&". Problem reported
953 by Jim Meyering.
954 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
955 This adjusts to recent gnulib changes.
956
957 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
958
959 Finish implementation of per-type %destructor/%printer. Discussed
960 starting at
961 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
962 and
963 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
964 * NEWS (2.3+): Add a description of this feature to the default
965 %destructor/%printer description.
966 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
967 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
968 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
969 list node contains a semantic type.
970 * src/symtab.c, src/symtab.h: Extend with a table that associates
971 semantic types with their %destructor's and %printer's.
972 (semantic_type_from_uniqstr, semantic_type_get,
973 semantic_type_destructor_set, semantic_type_printer_set): New functions
974 composing the public interface of that table.
975 (symbol_destructor_get, symbol_destructor_location_get,
976 symbol_printer_get, symbol_printer_location_get): If there's no
977 per-symbol %destructor/%printer, look up the per-type before trying
978 the default.
979 * tests/actions.at (Per-type %printer and %destructor): New test case.
980 * tests/input.at (Default %printer and %destructor redeclared):
981 Extend to check that multiple occurrences of %symbol-default in a
982 single %destructor/%printer declaration is an error.
983 (Per-type %printer and %destructor redeclared, Unused values with
984 per-type %destructor): New test cases.
985
986 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
987
988 Require default %destructor/%printer to be declared using
989 %symbol-default instead of an empty symbol list, and start working on
990 new per-type %destructor/%printer. Discussed at
991 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
992 * NEWS (2.3+): Add %symbol-default to example.
993 * bison.texinfo (Freeing Discarded Symbols): Likewise.
994 (Bison Symbols): Add entry for %symbol-default.
995 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
996 (generic_symlist, generic_symlist_item): New nonterminals for creating
997 a list in which each item is a symbol, semantic type, or
998 %symbol-default.
999 (grammar_declaration): Use generic_symlist in %destructor and %printer
1000 declarations instead of symbols.1 or an empty list.
1001 (symbol_declaration, precedence_declaration, symbols.1): Update actions
1002 for changes to symbol_list.
1003 * src/reader.c: Update for changes to symbol_list.
1004 * src/scan-code.l: Likewise.
1005 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
1006 * src/symlist.c, src/symlist.h: Extend such that a list node may
1007 represent a semantic type or a %symbol-default in addition to just an
1008 ordinary symbol. Add switched functions for setting %destructor's and
1009 %printer's.
1010 * tests/actions.at, tests/input.at: Add %symbol-default to all default
1011 %destructor/%printer declarations.
1012
1013 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
1014
1015 Whether the default %destructor/%printer applies to a particular symbol
1016 isn't a question of whether the user *declares* that symbol (in %token,
1017 for example). It's a question of whether the user by any means
1018 *defines* the symbol at all (by simply using a char token, for
1019 example). $end is defined by Bison whereas any other token with token
1020 number 0 is defined by the user. The error token is always defined by
1021 Bison regardless of whether the user declares it with %token, but we
1022 may one day let the user define error as a nonterminal instead.
1023 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
1024 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
1025 the meaning of "user-defined".
1026 * tests/actions.at (Default %printer and %destructor for user-declared
1027 end token): Rename to...
1028 (Default %printer and %destructor for user-defined end token): ...
1029 this.
1030
1031 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
1032 computation of whether to apply the default, don't maintain a list of
1033 every Bison-defined symbol. Instead, just check for a first character
1034 of '$', which a user symbol cannot have, and check for the error token.
1035
1036 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
1037
1038 Don't apply the default %destructor or %printer to the error token,
1039 $undefined, or $accept. This change fits the general rule that the
1040 default %destructor and %printer are only for user-declared symbols,
1041 and it solves several difficulties that are described in the new test
1042 cases listed below.
1043 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
1044 * tests/actions.at (Default %printer and %destructor are not for error
1045 or $undefined, Default %printer and %destructor are not for $accept):
1046 New test cases.
1047
1048 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
1049
1050 Allow %start after the first rule.
1051 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
1052 when parsing the first rule.
1053 (check_and_convert_grammar): Search for it here after all grammar
1054 declarations have been parsed. Skip midrules, which have dummy LHS
1055 nonterminals.
1056 * src/symtab.c (symbol_is_dummy): New function.
1057 * src/symtab.h (symbol_is_dummy): Declare it.
1058 * tests/input.at (%start after first rule): New test.
1059
1060 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 Redo some of the previous commit: add back the ability to use
1063 non-aliased/undeclared string literals since it might be useful to
1064 those declaring %token-table.
1065 * src/reader.c (check_and_convert_grammar): Undo changes in previous
1066 commit: don't worry about complaints from symbols_pack.
1067 * src/symtab.c (symbol_new, symbol_class_set,
1068 symbol_check_alias_consistency): Undo changes in previous commit: count
1069 each string literal as a new symbol and token, assign it a symbol
1070 number, and don't complain about non-aliased string literals.
1071 (symbols_pack): Since symbol_make_alias still does not decrement symbol
1072 and token counts but does still set aliased tokens to the same number,
1073 symbol_pack_processor now leaves empty slots in the symbols array.
1074 Remove those slots.
1075 * tests/regression.at (Undeclared string literal): Remove test case
1076 added in previous commit since non-aliased string literals are allowed
1077 again.
1078 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
1079 remove unnecessary string literal declarations.
1080 * tests/sets.at (Firsts): Likewise.
1081
1082 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1083
1084 Don't allow an undeclared string literal, but allow a string literal to
1085 be used before its declaration.
1086 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
1087 symbols_pack complained.
1088 * src/symtab.c (symbol_new): Don't count a string literal as a new
1089 symbol.
1090 (symbol_class_set): Don't count a string literal as a new token, and
1091 don't assign it a symbol number since symbol_make_alias does that.
1092 (symbol_make_alias): It's not necessary to decrement the symbol and
1093 token counts anymore. Don't assume that an alias declaration occurs
1094 before any uses of the identifier or string, and thus don't assert that
1095 one of them has the highest symbol number so far.
1096 (symbol_check_alias_consistency): Complain if there's a string literal
1097 that wasn't declared as an alias.
1098 (symbols_pack): Bail if symbol_check_alias_consistency failed since
1099 symbol_pack asserts that every token has been assigned a symbol number
1100 although undeclared string literals have not.
1101 * tests/regression.at (String alias declared after use, Undeclared
1102 string literal): New test cases.
1103 (Characters Escapes, Web2c Actions): Declare string literals as
1104 aliases.
1105 * tests/sets.at (Firsts): Likewise.
1106
1107 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
1108
1109 In the grammar scanner, STRING_FINISH unclosed constructs and return
1110 them to the parser in order to improve error messages.
1111 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
1112 SC_BRACED_CODE, SC_PROLOGUE): Implement.
1113 * tests/input.at (Unclosed constructs): New test case.
1114 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
1115 seen.
1116
1117 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
1118 unused global.
1119
1120 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
1121
1122 Handle string aliases for character tokens correctly.
1123 * src/symtab.c (symbol_user_token_number_set): If the token has an
1124 alias, check and set its alias's user token number instead of its own,
1125 which is set to indicate the alias. Previously, every occurrence of
1126 the character token in the grammar overwrote that alias indicator with
1127 the character code.
1128 * tests/input.at (String aliases for character tokens): New test.
1129
1130 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
1131
1132 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
1133
1134 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
1137 to prevent failures when building on older platforms.
1138 Check for autopoint failure.
1139 Set XGETTEXT_OPTIONS to values that check for C format strings,
1140 so that translators are warned about them (this also helps
1141 prevent core dumps).
1142
1143 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
1144 function, since it simplifies our code a bit.
1145
1146 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
1147 rather than -W, so we don't get bogus warnings about sign comparisons.
1148 Add -Wpointer-arith, since that warning is useful (it reports code
1149 that does not conform to C89 and that some compilers reject).
1150 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
1151 since it's no longer needed.
1152
1153 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
1154
1155 Clean up scanners a bit.
1156 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
1157 definitions so gcc won't warn when obstack_for_string is unused.
1158 * src/scan-code.l: config.h and system.h are already #include'd by
1159 scan-code-c.c, so get rid of them here.
1160 * src/scan-gram.l: Likewise.
1161 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
1162 definitions rather than duplicating the rest of it.
1163 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
1164
1165 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
1166
1167 Suppress signed/unsigned comparison warnings for yycheck.
1168 * data/c.m4 (b4_safest_int_type): New macro.
1169 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
1170 a signed int type, cast it to b4_safest_int_type first.
1171 * data/yacc.c: Likewise.
1172 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
1173 also overwritten.
1174
1175 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
1176
1177 * doc/bison.texinfo: Fix some typos.
1178
1179 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
1180
1181 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
1182 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
1183
1184 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
1185 the latest gnulib does this a different way.
1186 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
1187 translation was patched, so stop omitting it.
1188
1189 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1190
1191 Enable declaration of default %printer/%destructor. Make the parser
1192 use these for all user-declared grammar symbols for which the user does
1193 not declare a specific %printer/%destructor. Thus, the parser uses it
1194 for token 0 if the user declares it but not if Bison generates it as
1195 $end. Discussed starting at
1196 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
1197 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
1198 and
1199 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
1200 * NEWS (2.3+): Mention.
1201 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
1202 declare a %destructor for a mid-rule's semantic value. It's just
1203 impossible to declare one specific to it.
1204 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
1205 code. Describe default %destructor form.
1206 * src/parse-gram.y (grammar_declaration): Parse default
1207 %printer/%destructor declarations.
1208 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
1209 and symbol_destructor_location_get rather than accessing the destructor
1210 and destructor_location members of struct symbol.
1211 (symbol_printers_output): Likewise but for %printer's.
1212 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
1213 again.
1214 * src/symtab.c (default_destructor, default_destructor_location,
1215 default_printer, default_printer_location): New static global
1216 variables to record the default %destructor and %printer.
1217 (symbol_destructor_get, symbol_destructor_location_get,
1218 symbol_printer_get, symbol_printer_location_get): New functions to
1219 compute the appropriate %destructor and %printer for a symbol.
1220 (default_destructor_set, default_printer_set): New functions to set the
1221 default %destructor and %printer.
1222 * src/symtab.h: Prototype all those new functions.
1223 * tests/actions.at (Default %printer and %destructor): New test to
1224 check that the right %printer and %destructor are called, that they're
1225 not called for $end, and that $$ and @$ work correctly.
1226 (Default %printer and %destructor for user-declared end token): New
1227 test to check that the default %printer and %destructor are called for
1228 a user-declared end token.
1229 * tests/input.at (Default %printer and %destructor redeclared, Unused
1230 values with default %destructor): New tests to check related grammar
1231 warnings and errors.
1232
1233 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1234
1235 Clean up handling of %destructor for the end token (token 0).
1236 Discussed starting at
1237 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1238 and
1239 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1240
1241 Make the skeletons consistent in how they pop the end token and invoke
1242 its %destructor.
1243 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1244 state, which has token number 0, since this would invoke the
1245 %destructor for the end token.
1246 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1247 until after shifting the end token, or else it won't be popped.
1248 * data/yacc.c (yyparse): Likewise.
1249
1250 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1251 it's the end token. Upon termination, destroy an unshifted lookahead
1252 even when it's the end token.
1253 * data/lalr1.cc (yy::parser::parse): Likewise.
1254 * data/yacc.c (yyparse): Likewise.
1255
1256 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1257 value warnings for the end token when the user gives the end token a
1258 %destructor.
1259
1260 * tests/actions.at (Printers and Destructors): Test all the above.
1261
1262 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1263
1264 Update to latest gnulib and gettext versions.
1265 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1266 Add fopen-safer.
1267 (gnulib_files): Add m4/warning.m4. Don't worry about files
1268 overwritten by autopoint.
1269 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1270 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1271 rejects them.
1272 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1273 so that we can remove the intl files at a better time.
1274 (intl_files_to_remove): Remove aclocal.m4, since it gets
1275 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1276 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1277 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1278 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1279 Remove datarootdir hack; no longer needed.
1280 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1281 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1282 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1283 strdup.h.
1284 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1285 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1286
1287 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1288
1289 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1290 it with --assume-autoconf='latest-stable'.
1291
1292 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1293
1294 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1295 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1296 YYSTYPE' and `{'.
1297 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1298 those from muscle_tab.c since the old ones are misleading.
1299
1300 2006-07-13 Akim Demaille <akim@epita.fr>
1301
1302 Support %define "KEY" {VALUE}.
1303 * src/scan-code.h, src/scan-code.l (translate_action)
1304 (translate_rule_action, translate_symbol_action, translate_code):
1305 Return char *, not const char *.
1306 * src/parse-gram.y (declaration): Rename as...
1307 (prologue_declaration): this.
1308 (string_content): Remove this nonterminal, use STRING.
1309 (braceless, content, content.opt): New nonterminal.
1310 Use them.
1311 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1312 as value.
1313 * src/scan-gram.l (getargs.h): Don't include it.
1314
1315 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1316
1317 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1318 rather than a for-loop that declares a local bool variable. This
1319 should work around a compatibility problem with a Cray x1e C++
1320 compiler reported by Hung Nguyen in
1321 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1322 The for-loop was introduced in the 2004-11-17 change but I don't
1323 know why it was needed.
1324
1325 2006-07-12 Akim Demaille <akim@epita.fr>
1326
1327 * data/c.m4: Comment changes.
1328
1329 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
1330
1331 * src/complain.c (error_message, ERROR_MESSAGE): New.
1332 To factor...
1333 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1334 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1335
1336 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1337
1338 * NEWS: Instead of %union, you can define and use your own union type
1339 YYSTYPE if your grammar contains at least one <type> tag.
1340 Your YYSTYPE need not be a macro; it can be a typedef.
1341 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1342 (Union Decl, Decl Summary): Document this.
1343 * data/glr.c (YYSTYPE): Implement this.
1344 * data/glr.cc (YYSTYPE): Likewise.
1345 * data/lalr1.cc (YYSTYPE): Likewise.
1346 * data/yacc.c (YYSTYPE): Likewise.
1347 * src/output.c (prepare): Output tag_seen_flag.
1348 * src/parse-gram.y (declaration, grammar_declaration):
1349 Use 'union_seen' rather than 'typed' to determine whether
1350 %union has been seen, since grammars can now be typed without
1351 %union.
1352 (symbol_declaration, type.opt, symbol_def):
1353 Keep track of whether a tag has been seen.
1354 * src/reader.c (union_seen, tag_seen): New vars.
1355 (typed): remove.
1356 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1357 * src/scan-code.l (untyped_var_seen): New variable.
1358 (handle_action_dollar): Adjust to above changes.
1359 (handle_action_dollar, handle_action_at):
1360 Improve overflow checking for outlandish numbers.
1361 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1362 avoid new diagnostics generated by above changes.
1363 * tests/regression.at (YYSTYPE typedef): Add test to check
1364 for type tags without %union.
1365
1366 * src/symlist.c (symbol_list_length): Return int, not unsigned
1367 int, since callers expect int. This may need to get revisited
1368 once we have proper integer overflow checking.
1369
1370 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1371 object is now static.
1372
1373 * src/getargs.c (flags_argmatch): Return void, not int,
1374 to pacify ./configure --enable-gcc-warnings.
1375
1376 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1377 since last_string is already defined to FLEX_PREFIX (last_string).
1378
1379 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1380
1381 Implement --warnings/-W.
1382 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1383 replaced by...
1384 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1385 Adjust callers.
1386 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1387 (warnings_args, warnings_types): New.
1388 (getargs, short_options, long_options): Accept -W/--warnings.
1389 Sort the options by alphabetical order, upper case letter right
1390 before its lower case.
1391
1392 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1393
1394 Change %merge result type clash warnings to errors. Discussed at
1395 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1396 * src/reader.c (record_merge_function_type): Use complain_at.
1397 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1398 declared later): Update test case results.
1399
1400 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
1401
1402 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1403 to be in alphabetical order.
1404 (trace_args): Spelling fixes.
1405
1406 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1407
1408 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1409 so they don't collide with user-defined macros.
1410 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1411 this was never guaranteed, and now that we're using gnulib stdint,
1412 which defines int_fast16_t to long int, the problem is exposed.
1413
1414 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1415
1416 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1417 need the full POSIX semantics (and weren't implementing them
1418 anyway).
1419
1420 Adjust to Autoconf 2.60 and today's gnulib.
1421 * bootstrap (gnulib_modules): Add stdint.
1422 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1423 no longer copies it.
1424 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1425 since stdint needs the former and wcwidth (which is now required
1426 by mbswidth) needs the latter.
1427 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1428 work around a compatibility glitch between gettext 0.14.6 and
1429 Autoconf 2.60.
1430 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1431 Do not check for uintptr_t, since new stdint module does the right
1432 thing.
1433 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1434 Add stdint.h, stdint_.h, wcwidth.h.
1435 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1436 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1437 stdint.m4, wchar_t.m4, wcwidth.m4.
1438 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1439 usual order for ../lib/*.h files.
1440 (file_name_split): Use last_component, not base_name, to adjust
1441 to gnulib changes.
1442 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1443 for ../lib/*.h files.
1444 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1445 Define unconditionally, since we now assume the stdint module.
1446 * src/scan-skel.l: Include <dirname.h>.
1447 (BASE_QPUTS): Use last_component, not base_name.
1448 * src/system.h: Include <unlocked-io.h> in the usual order
1449 for ../lib/*.h files. Include <stdint.h> unconditionally,
1450 since we now use the stdint module.
1451 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1452 HAVE_UINTPTR_T, since we now use the stdint module.
1453 (base_name): Remove decl, since files now include <dirname.h>
1454 to get the decl.
1455
1456 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1457
1458 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1459 New, default to 1.
1460 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1461 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1462 default.
1463 * tests/calc.at: Adjust.
1464
1465 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1466
1467 * data/c.m4 (b4_basename): New.
1468 (b4_syncline): Also output the location of its invocation (from
1469 the skeleton).
1470 (b4_user_action, b4_define_user_action, b4_user_actions)
1471 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1472 (b4_user_stype): New.
1473 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1474
1475 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1476
1477 In the grammar file, the first column is 1 not 0 on the first line as
1478 on every other line.
1479 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1480 * tests/input.at (Torturing the Scanner): Update output.
1481
1482 * src/scan-gram.l (scanner_cursor): Declare it static.
1483
1484 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1485
1486 In warnings, say "previous declaration" rather than "first
1487 declaration".
1488 * src/symtab.c (redeclaration): Do that here.
1489 * src/reader.c (record_merge_function_type): In the case of a result
1490 type clash, report the previous declaration rather than the very first
1491 one in the grammar file.
1492 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1493 declared later): Add a third declaration to check this behavior.
1494 * tests/input.at (Incompatible Aliases): Update output.
1495
1496 2006-06-27 Akim Demaille <akim@epita.fr>
1497
1498 * doc/Doxyfile.in: New.
1499 * doc/Makefile.am: Use it.
1500 * src/lalr.h, src/symtab.h: Initial doxygenation.
1501
1502 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1503
1504 Don't miss %merge result type warnings just because the LHS types are
1505 declared after the %merge. This continues the effort of the previous
1506 patch.
1507 * src/reader.c (get_merge_function): Don't set the merger type yet.
1508 (record_merge_function_type): New function for setting the merger type
1509 and checking for clashes.
1510 (grammar_current_rule_merge_set): Set the location of the %merge for
1511 the current rule.
1512 (packgram): Invoke record_merge_function_type for each rule now that
1513 all symbol type declarations have been parsed.
1514 * src/reader.h (merger_list.type_declaration_location): New member
1515 storing the location of the first %merge from which the type for this
1516 merging function was derived.
1517 * src/symlist.h (symbol_list.merger_declaration_location): New member
1518 storing the location of a rule's %merge, if any.
1519 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1520 declared later): New test to catch the error fixed by the above patch.
1521
1522 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1523
1524 Get action warnings (grammar_rule_check) right even when symbol
1525 declarations appear after the rules. Discussed at
1526 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1527 and
1528 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1529 Don't mistake the type of $$ in a midrule to be that of its parent
1530 rule's $$.
1531 * src/reader.c (grammar_current_rule_end): Don't invoke
1532 grammar_rule_check yet since not all symbol declarations may have been
1533 parsed yet.
1534 (grammar_midrule_action): Likewise.
1535 Don't record whether the midrule's $$ has been used yet since actions
1536 haven't been translated yet.
1537 Record the midrule's parent rule and its RHS index within the parent
1538 rule.
1539 (grammar_current_rule_action_append): Don't translate the action yet
1540 since not all symbol declarations may have been parsed yet and, thus,
1541 warnings about types for $$, $n, @$, and @n can't be reported yet.
1542 (packgram): Translate the action and invoke grammar_rule_check now that
1543 all symbol declarations have been parsed.
1544 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1545 after parsing the entire grammar file, the symbol list here in the case
1546 of a midrule is actually the midrule's empty RHS, so reference its
1547 parent rule's RHS where necessary.
1548 On the other hand, now that you can already know it's a midrule, you
1549 aren't forced to think $$ has the same type as its parent rule's $$.
1550 (handle_action_at): In the case of a midrule, reference the parent rule
1551 where necessary.
1552 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1553 members.
1554 (symbol_list_length): Now that this is invoked after all rules have
1555 been parsed, a NULL symbol (rather than a NULL symbol list node)
1556 terminates a rule. symbol_list_print already does this correctly.
1557 * src/symlist.h (symbol_list.midrule_parent_rule,
1558 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1559 remember their relationships with their parents.
1560 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1561 fixed by the above patch.
1562 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1563 implementing...
1564 (Unused values): ... this old test case and...
1565 (Unused values before symbol declarations): ... this new test case.
1566 This one is the same as `Unused values' except that all symbol
1567 declarations appear after the rules in order to catch the rest of the
1568 errors fixed by the above patch.
1569
1570 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1571
1572 More cleanup.
1573 * src/reader.c (current_rule): Declare it static since it's no longer
1574 used outside this file.
1575 (grammar_current_rule_action_append): Remove redundant arguments from
1576 translate_rule_action invocation.
1577 * src/reader.h (current_rule): Remove this unused extern.
1578 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1579 * src/scan-code.l (translate_rule_action): Likewise.
1580
1581 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1582
1583 Clean up yesterday's patch.
1584 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1585 to...
1586 * src/reader.c (grammar_current_rule_action_append): ... here for
1587 consistency with grammar_current_rule_symbol_append.
1588 * tests/regression.at (Braced code in declaration in rules section):
1589 Make yyerror and yylex static as usual.
1590
1591 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1592
1593 Fix bug that mistakes braced code in a declaration in the rules section
1594 to be a rule action. Mentioned at
1595 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1596 * src/scan-gram.l: Move midrule action detection from the start of the
1597 scanning of any braced code to...
1598 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1599 action. For readability, use $2 and @2 rather than the equivalent
1600 global variables.
1601 * tests/regression.at (Braced code in declaration in rules section):
1602 New test to catch the error fixed by the above patch.
1603
1604 Work on code readability some.
1605 * src/scan-code.l (current_rule): Get rid of this misleading and
1606 redundant declaration: it's actually extern'ed in reader.h.
1607 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1608 translate_action): Add a rule argument and use it instead of the global
1609 current_rule.
1610 (translate_rule_action): This already receives current_rule through an
1611 argument, so pass it on to translate_action instead of assigning
1612 current_rule to current_rule.
1613 (translate_symbol_action, translate_code): Pass rule = NULL to
1614 translate_action.
1615
1616 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1617
1618 Rename %before-definitions to %start-header and %after-definitions to
1619 %end-header. Don't use these declarations to separate pre-prologue
1620 blocks from post-prologue blocks. Add new order-independent
1621 declarations %before-header and %after-header as alternatives to the
1622 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1623 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1624 * NEWS (2.3+): Update for these changes.
1625 * data/glr.c (b4_before_definitions): Update to...
1626 (b4_start_header): ... this.
1627 (b4_after_definitions): Update to...
1628 (b4_end_header): ... this.
1629 * data/glr.cc: Likewise.
1630 * data/lalr1.cc: Likewise.
1631 * data/yacc.c: Likewise.
1632 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1633 prologue blocks with %*-header declarations.
1634 (Calc++ Parser): Likewise.
1635 (Bison Declaration Summary): Update names.
1636 (Bison Symbols): Update description.
1637 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1638 (PERCENT_END_HEADER): ... this.
1639 (PERCENT_BEFORE_DEFINITIONS): Update to...
1640 (PERCENT_START_HEADER): ... this.
1641 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1642 (declaration): Update token names and m4 macro names.
1643 When parsing %end-header and %start-header, invoke translate_code
1644 before muscle_code_grow, and no longer set global booleans to remember
1645 whether these declarations have been seen.
1646 Parse new %after-header and %before-header.
1647 * src/reader.c (before_definitions, after_definitions): Remove.
1648 (prologue_augment): Accept a new bool argument to specify whether to
1649 augment the pre-prologue or post-prologue.
1650 * src/reader.h (before_definitions, after_definitions): Remove these
1651 extern's.
1652 (prologue_augment): Add new bool argument.
1653 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1654 (PERCENT_END_HEADER): ... this.
1655 (PERCENT_BEFORE_DEFINITIONS): Update to...
1656 (PERCENT_START_HEADER): ... this.
1657 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1658 * tests/actions.at (Printers and Destructors): Update names.
1659
1660 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1661
1662 Add comparison operators for C++ location classes. Discussed at
1663 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1664 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1665 declaration indicating whether filename_type has an operator==. If
1666 filename_type is `std::string', it defaults to `1', `0' otherwise.
1667 * data/location.cc: Iff b4_define_location_comparison is `1', add
1668 operator== and operator!= for class position and for class location.
1669
1670 Some minor fixes.
1671 * src/scan-action.l: Remove unused file.
1672 * src/symtab.c (symbol_printer_set): Use printer_location not
1673 destructor_location.
1674 * src/symtab.h (struct symbol): Replace incorrect source comment for
1675 printer members.
1676 * tests/input.at (Incompatible Aliases): Update output with correct
1677 printer location.
1678
1679 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1680
1681 Don't put the pre-prologue in the header file. For the yacc.c code
1682 file and the glr.c header and code files, move the pre-prologue before
1683 the token definitions. Add new %before-definitions and
1684 %after-definitions to declare code that will go in both the header file
1685 and code file. Discussed at
1686 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1687 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1688 and
1689 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1690 * NEWS (2.3+): Describe these changes.
1691 * data/glr.c (b4_pre_prologue): Move from within to before...
1692 (b4_shared_declarations): ... this.
1693 Add new b4_before_definitions before b4_token_enums.
1694 Add new b4_after_definitions at the end.
1695 * data/glr.cc (b4_pre_prologue): Replace with...
1696 (b4_before_definitions): ... this in the header file.
1697 (b4_after_definitions): New near the end of the header file.
1698 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1699 code file right before including the header file.
1700 (b4_before_definitions): New in the previous position of
1701 b4_pre_prologue in the header file.
1702 (b4_after_definitions): New near the end of the header file.
1703 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1704 (b4_token_enums_defines): In the code file, move to right before
1705 YYSTYPE for consistency with the header file.
1706 (b4_before_definitions): New right before b4_token_enums_defines in
1707 both the header and code file.
1708 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1709 header and code file.
1710 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1711 of prologues for %union dependencies.
1712 (Bison Declaration Summary): In %defines description, mention the
1713 effect of %before-definitions and %after-definitions on the header
1714 file.
1715 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1716 than in the pre-prologue so that make check succeeds.
1717 (Bison Symbols): Add entries for %before-definitions and
1718 %after-definitions.
1719 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1720 %before-definitions.
1721 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1722 (declaration): Parse those declarations and append to
1723 b4_before_definitions and b4_after_definitions, respectively.
1724 * src/reader.c (before_definitions, after_definitions): New bools to
1725 track whether those declarations have been seen.
1726 (prologue_augment): Add to the post-prologue if %union,
1727 %before-definitions, or %after-definitions has been seen.
1728 * src/reader.h (before_definitions, after_definitions): New extern's.
1729 * src/scan-gram.l: Scan the new declarations.
1730 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1731 prologue block in a %before-definitions or a %after-definitions based
1732 on whether the %union is declared.
1733 * tests/regression.at (Early token definitions with --yacc, Early token
1734 definitions without --yacc): Move tests for token definitions into the
1735 post-prologue since token names are no longer defined in the
1736 pre-prologue.
1737
1738 2006-06-20 Akim Demaille <akim@epita.fr>
1739
1740 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1741 (symbol_get): Use it.
1742 * src/parse-gram.y: Use it.
1743
1744 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1745
1746 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1747 build succeeds when configured with --enable-gcc-warnings.
1748
1749 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1750
1751 * src/parse-gram.y (char_name): New function.
1752 (CHAR, STRING, string_content): For %printer, properly escape.
1753 (ID): Prefer fputs to fprintf.
1754 (id): Reindent to be consistent with other rules.
1755 Properly quote char.
1756
1757 The Translation Project changed its way of publishing translations
1758 to maintainers. I haven't received any responses to my request
1759 for supporting the old way, or for documenting the new way. I
1760 have modified 'bootstrap' to use screen scraping
1761 (in this case, HTML scraping). This is unreliable and inelegant,
1762 but I don't see any better way. Yuck.
1763 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1764 (get_translations): New function, which uses HTML scraping to
1765 deduce locations of latest translations.
1766 Use this function to grab both bison and bison-runtime .po files.
1767 Don't bother priming the pump for the runtime-po domain any more,
1768 as it's now translated better than bison is.
1769
1770 2006-06-19 Akim Demaille <akim@epita.fr>
1771
1772 * src/scan-gram.l: No longer "parse" things after `%union' until
1773 `{'. Rather, return a single "%union" token.
1774 No longer make symbols: return strings, and leave the conversion
1775 to symbols to the parser.
1776 (SC_PRE_CODE, token_type): Remove.
1777 * src/parse-gram.y (%union): New field `character'.
1778 Sort tokens.
1779 (CHAR): New token.
1780 (ID, ID_COLON): Now that the scanner no longer makes them
1781 identifiers, adjust all uses to invoke symbol_get.
1782 (id_colon): New, wraps the conversion from string to symbol.
1783 (%union): Accept a possible union_name.
1784 (symbol): Now can be a char.
1785 * data/c.m4 (b4_union_name): Leave a default value.
1786 * data/glr.c, data/yacc.c: Use it.
1787
1788 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1789
1790 For associating token numbers with token names for "yacc.c", don't use
1791 #define statements unless `--yacc' is specified; always use enum
1792 yytokentype. Most important discussions start at:
1793 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1794 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1795 and
1796 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1797 * NEWS (2.3+): Mention.
1798 * data/c.m4 (b4_yacc_if): New.
1799 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1800 token #define's.
1801 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1802 on token name definitions.
1803 * src/getargs.c (usage): Capitalize `Yacc' in English.
1804 * src/output.c (prepare): Define b4_yacc_flag.
1805 * tests/regression.at (Early token definitions): Test that tokens names
1806 are defined before the pre-prologue not just before the post-prologue.
1807 Remove this test case and copy to...
1808 (Early token definitions with --yacc): ... this to test #define's.
1809 (Early token definitions without --yacc): ... and this to test enums.
1810
1811 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1812
1813 * NEWS: Reword the post-2.3 change to not be so optimistic about
1814 removing the old "look-ahead" spelling.
1815 Update previous look-ahead/lookahead change reports.
1816 * REFERENCES: look-ahead -> lookahead (since that's
1817 what he actually wrote).
1818 * doc/refcard.tex: look ahead -> lookahead,
1819 look-ahead -> lookahead
1820
1821 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1822
1823 For consistency, use `lookahead' instead of `look-ahead' or
1824 `look_ahead'. Discussed starting at
1825 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1826 and then at
1827 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1828 * NEWS: For the next release, note the change to `--report'.
1829 * TODO, doc/bison.1: Update English.
1830 * doc/bison.texinfo: Update English.
1831 (Understanding Your Parser, Bison Options): Document as
1832 `--report=lookahead' rather than `--report=look-ahead'.
1833 * src/conflicts.c: Update English in comments.
1834 (lookahead_set): Rename from look_ahead_set.
1835 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1836 (resolve_sr_conflict): Rename local look_ahead_tokens to
1837 lookahead_tokens, and update other uses.
1838 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1839 count_rr_conflicts, conflicts_free): Update uses.
1840 * src/getargs.c (report_args): Move "lookahead" before alternate
1841 spellings.
1842 (report_types): Update uses.
1843 (usage): For `--report' usage description, state `lookahead' spelling
1844 rather than `look-ahead'.
1845 * src/getargs.h (report.report_lookahead_tokens): Rename from
1846 report_look_ahead_tokens.
1847 * src/lalr.c: Update English in comments.
1848 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1849 (state_lookahead_tokens_count): Rename from
1850 state_look_ahead_tokens_count.
1851 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1852 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1853 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1854 Update other uses.
1855 Update English in output.
1856 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1857 * src/print.c: Update English in comments.
1858 (lookahead_set): Rename from look_ahead_set.
1859 (print_reduction): Rename argument lookahead_token from
1860 look_ahead_token.
1861 (print_core, state_default_rule, print_reductions, print_results):
1862 Update uses.
1863 * src/print_graph.c: Update English in comments.
1864 (print_core): Update uses.
1865 * src/state.c: Update English in comments.
1866 (reductions_new): Update uses.
1867 (state_rule_lookahead_tokens_print): Rename from
1868 state_rule_look_ahead_tokens_print, and update other uses.
1869 * src/state.h: Update English in comments.
1870 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1871 (state_rule_lookahead_tokens_print): Rename from
1872 state_rule_look_ahead_tokens_print.
1873 * src/tables.c: Update English in comments.
1874 (conflict_row, action_row): Update uses.
1875 * tests/glr-regression.at
1876 (Incorrect lookahead during deterministic GLR,
1877 Incorrect lookahead during nondeterministic GLR): Rename
1878 print_look_ahead to print_lookahead.
1879 * tests/torture.at: Update English in comments.
1880 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1881 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1882 (Many lookahead tokens): Update uses.
1883 * data/glr.c: Update English in comments.
1884 * lalr1.cc: Likewise.
1885 * yacc.c: Likewise.
1886 * src/conflicts.h: Likewise.
1887 * src/lalr.h: Likewise.
1888 * src/main.c: Likewise.
1889 * src/output.c: Likewise.
1890 * src/parse-gram.c: Likewise.
1891 * src/tables.h: Likewise.
1892 * tests/calc.at: Likewise.
1893
1894 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1895
1896 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1897
1898 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1899
1900 * TODO: Add request from Nelson H. F. Beebe to be able to install
1901 Bison without installing the yacc script.
1902
1903 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1904
1905 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1906 and yytext if they're already #define'd.
1907 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1908 * src/scan-code-c.c: ... here.
1909 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1910 <config.h>.
1911
1912 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1913
1914 Get Bison to build again when configured with --enable-gcc-warnings.
1915 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1916 missing #include's.
1917 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1918 loc argument as it shadows a global.
1919 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1920 invocation.
1921
1922 * src/.cvsignore: Add scan-code.c.
1923
1924 2006-06-07 Akim Demaille <akim@epita.fr>
1925
1926 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1927 to...
1928 * src/scan-code.l: here.
1929 * tests/input.at (Torturing the Scanner): Fix another location
1930 error.
1931
1932 2006-06-07 Akim Demaille <akim@epita.fr>
1933
1934 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1935
1936 2006-06-06 Akim Demaille <akim@epita.fr>
1937
1938 Extract the parsing of user actions from the grammar scanner.
1939 As a consequence, the relation between the grammar scanner and
1940 parser is much simpler. We can also split "composite tokens" back
1941 into simple tokens.
1942 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1943 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1944 rename as...
1945 * src/location.h, src/location.c (add_column_width)
1946 (location_compute): these.
1947 Fix the column count: the initial column is 0.
1948 (location_print): Be robust to ending column being 0.
1949 * src/location.h (boundary_set): New.
1950 * src/main.c: Adjust to scanner_free being renamed as
1951 gram_scanner_free.
1952 * src/output.c: Include scan-code.h.
1953 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1954 Use boundary_set.
1955 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1956 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1957 which is now, again, a separate token.
1958 Adjust all dependencies.
1959 Whereever actions with $ and @ are used, use translate_code.
1960 (action): Remove this nonterminal which is now useless.
1961 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1962 (grammar_current_rule_action_append): Use translate_code.
1963 (packgram): Bound check ruleno, itemno, and rule_length.
1964 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1965 (last_string, last_braced_code_loc, max_left_semantic_context)
1966 (scanner_initialize, scanner_free, scanner_last_string_free)
1967 (gram_out, gram_lineno, YY_DECL_): Move to...
1968 * src/scan-gram.h: this new file.
1969 (YY_DECL): Rename as...
1970 (GRAM_DECL): this.
1971 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1972 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1973 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1974 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1975 Move these declarations, and...
1976 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1977 these to...
1978 * src/flex-scanner.h: this new file.
1979 * src/scan-gram.l (rule_length, rule_length_overflow)
1980 (increment_rule_length): Remove.
1981 (last_braced_code_loc): Rename as...
1982 (gram_last_braced_code_loc): this.
1983 Adjust to the changes of the parser.
1984 Move all the handling of $ and @ into...
1985 * src/scan-code.l: here.
1986 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1987 (handle_action_dollar, handle_action_at): Move to...
1988 * src/scan-code.l: here.
1989 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1990 scan-code.h, scan-code-c.c, scan-gram.h.
1991 (EXTRA_bison_SOURCES): Add scan-code.l.
1992 (BUILT_SOURCES): Add scan-code.c.
1993 (yacc): Be robust to white spaces.
1994
1995 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1996 * tests/regression.at: Adjust the column numbers.
1997 * tests/regression.at: Adjust the error message.
1998
1999 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2000
2001 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2002 Use Akim's wording from
2003 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
2004
2005 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2006
2007 Between Bison releases, manually append `+' to the previous Bison
2008 release number, and use that as a signal to automatically print the
2009 ChangeLog's CVS Id keyword from --version. Discussed starting at
2010 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
2011 * ChangeLog: Add Id header.
2012 * configure.ac (AC_INIT): Append `+' to `2.3'.
2013 * src/.cvsignore: Add revision.c.
2014 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
2015 (BUILT_SOURCES): Add revision.c.
2016 (revision.c): New target rule. This file defines a new global variable
2017 named revision. It initializes it with either the Id from ChangeLog
2018 or, if VERSION doesn't contain `+', with the empty string.
2019 * src/getargs.c (version): Print the value of revision.
2020 * src/revision.h: Extern revision.
2021
2022 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2023
2024 * NEWS: Version 2.3.
2025 * configure.ac (AC_INIT): Likewise.
2026
2027 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
2028
2029 * data/glr.c (YYRECOVERING): Define to be a function-like macro
2030 with no arguments, not as an object-like macro. This is for
2031 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
2032 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
2033 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
2034 Document this.
2035
2036 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
2037
2038 * src/getargs.c (usage): Back out yesterday's modification of the
2039 --help output so that we don't have to wait for translation before
2040 releasing 2.3.
2041
2042 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
2043
2044 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
2045 Problem reported by Akim Demaille.
2046
2047 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2048
2049 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2050
2051 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
2052
2053 * data/yacc.c (yy_reduce_print): Omit trailing white space in
2054 generated source code. Problem reported by Frans Englich in
2055 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
2056
2057 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
2058
2059 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
2060 shell, not within 'make', so that 'make' by an ordinary builder
2061 (using GNU make) does not worry about configuring gzip. This also
2062 works around a bug reported independently by Keith Thompson and by
2063 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
2064 stderr rather than stdout, messing up the build logs.
2065
2066 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2067
2068 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
2069 to make sure that YYID will never be unused. This fixes a 'make
2070 maintainer-check' failure caused by the recent changes to the 'Trivial
2071 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
2072 not used.
2073 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
2074
2075 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2076
2077 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
2078 state before an empty RHS is always resolved here. Only the location
2079 of that state is guaranteed to be resolved, and that's enough. This
2080 fixes the remaining bug reported by Derek M. Jones in
2081 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2082 * tests/glr-regression.at (Uninitialized location when reporting
2083 ambiguity): Test the above case.
2084 Also, the embedded comments in this test case claim it checks the case
2085 of an empty RHS that has inherited the initial location. However, the
2086 corresponding LHS was already resolved, so yyresolveLocations didn't
2087 actually have reason to modify it. Fix this by forcing
2088 nondeterministic operation at the beginning of the parse.
2089
2090 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
2091
2092 * data/c.m4 (b4_yy_symbol_print_generate):
2093 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
2094 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
2095 of the bugs reported today by Derek M Jones in
2096 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2097 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
2098 defined to be a type name without parens or brackets.
2099 (Location Type): Similarly for YYLTYPE.
2100 * tests/regression.at (Trivial grammars): Put in a test for this
2101 bug that will be caught by 'make maintainer-check' (though not,
2102 alas, by 'make check' unless your compiler is picky).
2103
2104 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
2105
2106 * NEWS: Version 2.2.
2107 * configure.ac (AC_INIT): Likewise.
2108
2109 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
2110
2111 * data/glr.c (yyreportTree): Make room in yystates for the state
2112 preceding the RHS. This fixes the segmentation fault reported by Derek
2113 M. Jones in
2114 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
2115 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
2116 to the user. Reported for yyreportTree by Derek M. Jones later in the
2117 same thread.
2118 * THANKS: Add Derek M. Jones.
2119 Update my email address.
2120 Fix typo in Steve Murphy's name.
2121
2122 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
2123
2124 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
2125 checking against YYLAST that caused the parser to miss a potential
2126 alternative in its diagnostic.
2127 Problem reported by Maria Jose Moron Fernandez in
2128 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
2129 * data/lalr1.cc (yysyntax_error_): Likewise.
2130 * data/yacc.c (yysyntax_error): Likewise.
2131 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
2132 tokens, in case we run into an older C compiler.
2133 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
2134 Use them to check for the off-by-one error fixed above.
2135
2136 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
2137 YYSIZE_T, not size_t.
2138 * tests/regression.at (Trivial grammars): New test, to catch
2139 the error fixed by the above patch.
2140
2141 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2142
2143 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
2144 scheme.
2145 Reported by Steve Murphy.
2146
2147 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2148
2149 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
2150 * data/glr.cc: b4_location_flag is now b4_locations_flag.
2151
2152 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2153
2154 Implement --trace=m4.
2155 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
2156 * src/output.c (output_skeleton): When set, pass -dV to m4.
2157
2158 Factor the handling of flags in m4.
2159 * src/output.c (prepare): Rename the muscle names debug, defines,
2160 error_verbose to debug_flag, defines_flag, error_verbose_flag.
2161 * data/c.m4: Adjust.
2162 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
2163 Use b4_define_flag_if to define other b4_FLAG_if macros.
2164 (b4_location_if): As a consequence, rename as...
2165 (b4_locations_if): this, for consistency.
2166 Adjust all the skeletons.
2167
2168 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2169
2170 * etc/bench.pm: Shorten bench names.
2171
2172 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
2173
2174 * src/output.h, src/output.c (error_verbose): Move to...
2175 * src/getargs.h, src/getargs.c: here.
2176 Sort the flags.
2177 Adjust dependencies.
2178
2179 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
2180
2181 * data/c.m4 (b4_copyright): Put the special exception for Bison
2182 skeletons here, so we don't have to put it in each skeleton. All
2183 uses changed. Suggested by Akim Demaille. Also, wrap the
2184 copyright notice, in case it is longer than 80 columns. Replace
2185 comma by newline after title.
2186
2187 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
2188
2189 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
2190 incompatibility, not a bug. Mention that it wasn't fixed as of
2191 flex 2.5.33.
2192
2193 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
2194
2195 * examples/extexi: Enforce the precedence of concatenation over
2196 >>.
2197 Reported by Tommy Nordgren.
2198
2199 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
2200
2201 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
2202 with the member "token".
2203 Reported by Martin Nylin.
2204
2205 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
2206
2207 * data/glr.c: Switch to Bison 2.2 special-exception language in
2208 the copyright notice. Use more-regular format for titles and
2209 copyright notices.
2210 * data/glr.cc: Likewise.
2211 * data/location.cc: Likewise.
2212 * data/yacc.cc: Likewise.
2213 * doc/bison.texinfo (Conditions): Document this.
2214 * NEWS: likewise. Upgrade version to 2.2.
2215
2216 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
2217
2218 * data/glr.cc: Remove dead code.
2219
2220 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2221
2222 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2223 that variable and the line breaks the bootstrap. Problem reported
2224 by Juan M. Guerrero.
2225
2226 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
2227
2228 * doc/bison.texinfo (Multiple start-symbols): New.
2229
2230 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
2231
2232 * etc/README, etc/bench.pl: New.
2233
2234 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
2235
2236 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2237 rule.
2238 Reported by Mickael Labau.
2239 * tests/input.at (Torturing the Scanner): Test it.
2240
2241 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2242
2243 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2244 Problem reported by Bob Rossi.
2245
2246 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2247
2248 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2249 and didn't really work.
2250 For the index, use @ifnotinfo, not @iftex.
2251 Minor cleanups of spacing and terminology.
2252
2253 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2254
2255 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2256 of AT_NAME_PREFIX when %name-prefix is not used.
2257
2258 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
2259
2260 Apply --prefix to C++ skeletons too: they change the namespace.
2261 The test suite already exercize these cases.
2262 * data/c++.m4 (b4_namespace): New.
2263 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2264 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2265 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2266 * doc/bison.texinfo: Document it.
2267 (Option Cross Key): Use @multitable in all formats. It looks
2268 nicer, even in TeX outputs.
2269 (Rules): Use the same code whatever the output type is.
2270 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2271 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2272 * tests/calc.at: Use it, instead of hard coding `yy'.
2273
2274 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2275
2276 * TODO: Remove dead items.
2277
2278 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2279
2280 * doc/FAQ: Remove, merged into...
2281 * doc/bison.texinfo (FAQ): this.
2282 * doc/Makefile.am (EXTRA_DIST): Adjust.
2283
2284 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
2285
2286 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2287 even if empty.
2288 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2289 * doc/bison.texinfo (Calc++ Scanner): Use it.
2290
2291 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2292
2293 Fix two nits reported by twlevo, plus one more that I discovered.
2294
2295 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2296 this is the usual Bison style.
2297 * src/location.h (location_print): Likewise.
2298
2299 * src/reader.h (token_name): Likewise.
2300
2301 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2302
2303 Fix some nits reported by twlevo.
2304 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2305 and "POSIX". Use more-modern syntax for URLs. Mention C++
2306 and ask for Java. Don't hardwire OS version numbers. Add
2307 copyright notice.
2308 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2309 * src/conflicts.c (solved_conflicts_obstack): Now static.
2310
2311 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2314 page. Say "you can use it" not "you may use it" as on the web page;
2315 we're describing capabilities not granting permission.
2316
2317 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2318
2319 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2320 shadowing warnings. Use usual patter for iterating through RHS.
2321 * tests/glr-regression.at
2322 (Uninitialized location when reporting ambiguity):
2323 Modify yylex so that it uses its argument, rather than trying
2324 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2325 const char -> char const.
2326
2327 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2328 Don't use tabs inside commands; it messes up 'ps'.
2329 Problem reported by twlevo.
2330
2331 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2332
2333 * tests/glr-regression.at (Uninitialized location when reporting
2334 ambiguity): New test case.
2335 * data/glr.c (yyresolveLocations): New function, which uses
2336 YYLLOC_DEFAULT.
2337 (yyresolveValue): Invoke yyresolveLocations before reporting an
2338 ambiguity.
2339 * doc/bison.texinfo (Default Action for Locations): Note
2340 YYLLOC_DEFAULT's usage for ambiguity locations.
2341 (GLR Semantic Actions): Cross-reference those notes.
2342
2343 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2344
2345 * tests/glr-regression.at (Leaked semantic values when reporting
2346 ambiguity): Remove unnecessary union and type declarations.
2347 (Leaked lookahead after nondeterministic parse syntax error): New test
2348 case.
2349 * data/glr.c (yyparse): Check for zero stacks remaining before
2350 attempting to shift the lookahead so that you don't lose it.
2351
2352 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2353
2354 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2355 * tests/glr-regression.at (Leaked semantic values when reporting
2356 ambiguity): New test case.
2357 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2358 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2359 now unnecessary yystackp parameter.
2360 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2361 destructors can be called.
2362
2363 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2364 in existing testcases.
2365
2366 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2367
2368 Don't leak semantic values for parent RHS when a user action cuts the
2369 parser, and clean up related code a bit.
2370 * tests/glr-regression.at (Leaked merged semantic value if user action
2371 cuts parse): Rename to...
2372 (Leaked semantic values if user action cuts parse): ... this. Add check
2373 for leaked parent RHS values.
2374 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2375 between an unresolved state (non-empty chain of semantic options) and
2376 an incomplete one (signaled by an empty chain).
2377 (yyresolveStates): Document the interface. Move all manipulation of a
2378 successfully or unsuccessfully resolved yyGLRState to...
2379 (yyresolveValue): ... here so that yyresolveValue always leaves a
2380 yyGLRState with consistent data and thus is easier to understand.
2381 Remove the yyvalp and yylocp parameters since they are always just
2382 taken from the yys parameter. When reporting a discarded merged value
2383 in debugging output, note that it is incompletely merged. Document the
2384 interface.
2385 (yyresolveAction): If resolving any of the RHS states fails, destroy
2386 them all rather than leaking them. Thus, as long as user actions are
2387 written to clean up the RHS correctly, yyresolveAction always cleans up
2388 the RHS of a semantic option. Document the interface.
2389
2390 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2391
2392 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2393 led to a segmentation fault in GNU Pascal. Problem reported
2394 by Waldek Hebisch.
2395
2396 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2397
2398 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2399 mid-rule action inside a nonterminal symbol in order to declare a
2400 destructor for its semantic value.
2401
2402 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2403
2404 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2405 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2406 __cplusplus && ! defined _STDLIB_H && !
2407 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2408 defined free))]: Include <stdlib.h> rather than rolling our own
2409 declarations of malloc and free, to avoid problems with
2410 incompatible declarations (using 'throw') C++'s stdlib.h. This
2411 should fix Debian bug 340012
2412 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2413 reported by Guillaume Melquiond.
2414
2415 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2416
2417 * NEWS: Clarify symbols versus types in unused-value warnings.
2418
2419 * configure.ac (AC_INIT): Bump version number.
2420
2421 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2422
2423 * NEWS: Version 2.1a.
2424 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2425 since C99 requires this.
2426
2427 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2428
2429 * m4/c-working.m4: New file.
2430 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2431
2432 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 * Makefile.maint: Merge from coreutils.
2435
2436 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2437
2438 More portability fixes for problems summarized by Nelson H. F. Beebe.
2439
2440 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2441 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2442 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2443 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2444 messes up because C++ code is compiled in 32-bit mode but linked
2445 in 64-bit mode.
2446
2447 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2448
2449 More portability fixes for problems summarized by Nelson H. F. Beebe.
2450
2451 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2452 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2453
2454 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2455 nodist_PROGRAMS, since we don't need to actually compile the
2456 example if we're just doing a plain 'make'. This avoids bothering
2457 the installer unnecessarily about problems due to weird C++
2458 compilers.
2459
2460 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2461
2462 More portability fixes for problems summarized by Nelson H. F. Beebe.
2463
2464 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2465 than #include "...", and compile with -I'.'. The old method was
2466 not portable, according to Posix and the C standard, and it does
2467 not work with Sun C 5.7, where previous #line directives affect
2468 the working directory used in later #include "..." directives.
2469
2470 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2471
2472 Various DJGGP specific issues in /djgpp
2473
2474 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2475
2476 More portability fixes for problems summarized by Nelson H. F. Beebe.
2477
2478 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2479 '#include <map>' works and that you can apply ++ to iterators.
2480
2481 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2482
2483 Work around portability problems summarized by Nelson H. F. Beebe in
2484 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2485
2486 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2487 that '#include <string>' works.
2488
2489 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2490 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2491 "warning: sorry: semantics of inline function static data `const
2492 unsigned char translate_table[262]' are wrong (you'll wind up with
2493 multiple copies)".
2494
2495 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2496 or, xor to not_, and_, or_, and xor_, respectively. This works
2497 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2498 random system header somewhere that includes the equivalent of
2499 <iso646.h>.
2500
2501 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2502 -E" works; it apparently doesn't work with PathScale EKO Compiler
2503 Suite Version 2.0.
2504
2505 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2506
2507 During deterministic GLR operation, user actions should be able to
2508 influence the parse by changing yychar. To make this easier to fix and
2509 to make glr.c easier to evolve in general, don't maintain yytoken in
2510 parallel with yychar; just compute yytoken when needed.
2511 * tests/glr-regression.at (Incorrect lookahead during deterministic
2512 GLR): Check that setting yychar in a user action has the intended
2513 effect.
2514 * data/glr.c (yyGLRStack): Remove yytokenp member.
2515 (yyclearin): Don't set *yytokenp.
2516 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2517 yychar rather than *yytokenp to determine the current lookahead.
2518 Compute yytoken locally when needed.
2519 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2520 point to.
2521
2522 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2523 after `--report' documentation.
2524
2525 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2526
2527 * src/parse-gram.y (grammar_declaration): Location of printer
2528 symbol is @1, not list->location. Bug reported by twlevo.
2529 * tests/input.at (Incompatible Aliases): Adjust to above change.
2530
2531 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2532
2533 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2534 all the test at once. This makes the output easier to read in the
2535 normal case.
2536
2537 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2538 got from <http://bro-ids.org/download.html>. The bug is that
2539 when two actions appeared in succession, the second one was
2540 scanned before the first one was added to the grammar rule
2541 as a midrule action. Bison then output the incorrect warning
2542 "parse.y:905.17-906.36: warning: unused value: $3".
2543 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2544 associated with a value.
2545 (rhs): Don't invoke grammar_current_rule_action_append.
2546 (action): Invoke it here instead.
2547 * src/reader.c (grammar_midrule_action): Now extern.
2548 (grammar_current_rule_action_append): Don't invoke
2549 grammar_midrule_action; that is now the scanner's job.
2550 * src/reader.h (last_string, last_braced_code_loc):
2551 (grammar_midrule_action): New decls.
2552 * src/scan-gram.l (last_string): Now extern, sigh.
2553 (last_braced_code_loc): New extern variable.
2554 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2555 rule already has an action.
2556 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2557 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2558 Add some tests to check that the above changes fixed the bug.
2559
2560 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2561
2562 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2563 All used changed. Check whether the symbol has a destructor,
2564 not whether it is typed.
2565 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2566 that the values are still reported as unused. All line numbers
2567 adjusted.
2568
2569 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2570
2571 Work around a bug in bro 0.8, which underparenthesizes its
2572 definition of YYLLOC_DEFAULT.
2573 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2574 their arguments.
2575 * data/lalr1.cc: Likewise.
2576 * data/yacc.cc: Likewise.
2577
2578 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2579
2580 Work around a bug in Pike 7.0, and give the Pike folks a
2581 better way to override the usual int widths.
2582 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2583 user can override the types.
2584 (short): #undef, to work around a bug in Pike 7.0.
2585 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2586 (union yyalloc.yyss): Use yytype_int16 rather than short.
2587 All uses changed.
2588 (yysigned_char): Remove.
2589 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2590 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2591 * tests/regression.at (Web2c Actions): Adjust to above changes.
2592
2593 * src/reader.c (check_and_convert_grammar): New function.
2594 (reader): Close the input file even if something went wrong during
2595 parsing. Minor file descriptor leak reported by twlevo.
2596
2597 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2598 to pacify gcc -Wswitch-default.
2599 * src/scan-gram.l (adjust_location): Use a default: break; case
2600 to pacify gcc -Wswitch-default.
2601 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2602 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2603 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2604 Move these decls to scan-skel.l, since they don't need to be
2605 visible elsewhere.
2606 * src/scan-skel.l: Accept the above decls.
2607 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2608 is used.
2609
2610 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2611
2612 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2613 since we don't want to insist on a version number at the start
2614 of the changelog every time.
2615 * Makefile.maint: Sync from coreutils a bit better.
2616 (sc_trailing_blank): Renamed from sc_trailing_space.
2617 All uses changed.
2618 (sc_no_if_have_config_h, sc_require_config_h):
2619 (sc_prohibit_assert_without_use): New rules.
2620 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2621 (sc_dd_max_sym_length): Fix leading spaces in rule.
2622 (sc_system_h_headers): Prefix with @.
2623 (sc_useless_cpp_parens, m4-check): Output line numbers.
2624 (changelog-check): Allow version only in head.
2625 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2626 satisfy new Makefile.maint rule.
2627 * data/glr.c: Likewise.
2628 * data/glr.cc: Likewise.
2629 * data/lalr1.cc: Likewise.
2630 * data/yacc.c: Likewise.
2631 * lib/ebitsetv.c: Likewise.
2632 * lib/lbitset.c: Likewise.
2633 * lib/subpipe.c: Likewise.
2634 * lib/timevar.c: Likewise.
2635 * src/system.h: Likewise.
2636 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2637 * djgpp/Makefile.maint: Add copyright notice.
2638 * djgpp/README.in: Likewise.
2639 * djgpp/config.bat: Likewise.
2640 * djgpp/config.site: Likewise.
2641 * djgpp/config_h.sed: Likewise.
2642 * djgpp/djunpack.bat: Likewise.
2643 * djgpp/config.sed: Fix copyright notice to match standard format.
2644 * djgpp/subpipe.h: Likewise.
2645 * lib/bitsetv-print.c: Likewise.
2646 * lib/bitsetv.c: Likewise.
2647 * lib/subpipe.h: Likewise.
2648 * lib/timevar.c: Likewise.
2649 * lib/timevar.h: Likewise.
2650 * djgpp/subpipe.c: Use standard recipe for config.h.
2651 * lib/abitset.c: Likewise.
2652 * lib/bitset.c: Likewise.
2653 * lib/bitset_stats.c: Likewise.
2654 * lib/bitsetv-print.c: Likewise.
2655 * lib/bitsetv.c: Likewise.
2656 * lib/ebitsetv.c: Likewise.
2657 * lib/get-errno.c: Likewise.
2658 * lib/lbitset.c: Likewise.
2659 * lib/subpipe.c: Likewise.
2660 * lib/timevar.c: Likewise.
2661 * lib/vbitset.c: Likewise.
2662 * tests/local.at: Likewise.
2663 * src/scan-gram.l: Don't include verify.h, since system.h does
2664 that for us.
2665 * .x-sc_require_config_h: New file.
2666 * .x-sc_unmarked_diagnostics: New file.
2667
2668 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2669
2670 Be a bit more systematic about using 'abort'.
2671 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2672 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2673 Put 'default: abort ();' before some other case, to satisfy older
2674 pedantic compilers.
2675 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2676 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2677 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2678 * src/conflicts.c (resolve_sr_conflict): Likewise.
2679 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2680 (get_decision_str, get_orientation_str, get_node_alignment_str):
2681 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2682 (get_linestyle_str, get_arrowstyle_str): Likewise.
2683 * src/conflicts.c (resolve_sr_conflict):
2684 Use a default case rather than one for the one remaining enum
2685 value, to catch invalid enum values as well.
2686 * src/lalr.c (set_goto_map, map_goto):
2687 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2688 * src/nullable.c (nullable_compute, token_definitions_output):
2689 Likewise.
2690 * src/reader.c (packgram, reader): Likewise.
2691 * src/state.c (transitions_to, state_new, state_reduction_find):
2692 Likewise.
2693 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2694 (symbol_pack): Likewise.
2695 * src/tables.c (conflict_row, pack_vector): Likewise.
2696 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2697 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2698 * src/system.h: Don't include <assert.h>.
2699 (assert): New macro.
2700
2701 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2702 (Destructor Decl, Parser Function, Pure Calling):
2703 Describe rules for braces inside C code more carefully.
2704
2705 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2706
2707 Fix some porting glitches found by Nelson H. F. Beebe.
2708 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2709 compilers that don't understand that abort () does not return.
2710 * src/state.c (transitions_to): Likewise.
2711 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2712 that '#include <cstdlib>' works.
2713 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2714 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2715 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2716 for the benefit of some pre-C99 compilers.
2717
2718 * bootstrap: Undo changes to gnulib files that autoreconf made.
2719
2720 Minor fixups to get 'make maintainer-check' to work.
2721 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2722 with the new verify.h implementation.
2723 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2724 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2725 * data/yacc.c (YYUSE): Likewise.
2726 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2727 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2728 * src/parse-gram.y (declaration): Don't pass a string constant
2729 to a function that expects char *, since GCC might complain
2730 about the constant value.
2731 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2732 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2733 before #defining them.
2734 * tests/glr-regression.at
2735 (Incorrectly initialized location for empty right-hand side in GLR):
2736 In yyerror, use the msg arg.
2737 (Corrupted semantic options if user action cuts parse):
2738 (Incorrect lookahead during deterministic GLR):
2739 (Incorrect lookahead during nondeterministic GLR):
2740 Don't name a local var 'index'; it shadows string.h's 'index'.
2741
2742 2006-01-19 Akim Demaille <akim@epita.fr>
2743
2744 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2745 location, not just parts of it.
2746
2747 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2748
2749 * NEWS: Document the fact that multiple %unions are now allowed.
2750 * doc/bison.texinfo (Union Decl): Likewise.
2751 * TODO: This feature is now implemented, so remove it from
2752 the wishlist.
2753
2754 * Makefile.maint: Merge with coreutils Makefile.maint.
2755 (CVS_LIST): Use build-aux version if available.
2756 (VERSION_REGEXP): New macro.
2757 (syntax-check-rules): Add sc_no_if_have_config_h,
2758 sc_prohibit_assert_without_use, sc_require_config_h,
2759 sc_useless_cpp_parens.
2760 (sc_obsolete_symbols): Check for O_NDELAY.
2761 (sc_dd_max_sym_length): Track coreutils.
2762 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2763 (sc_useless_cpp_parens): New rule.
2764 (news-date-check): Look for version or today's date.
2765 (changelog-check): Don't require version number near head.
2766 (copyright-check): Use current year instead of hardwiring 2005.
2767 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2768 (announcement): Add --gpg-key-ID.
2769
2770 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2771 with "file system".
2772
2773 Avoid undefined behavior that addressed just before the start of an
2774 array. Problem reported by twlevo.
2775 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2776 * src/lalr.c (build_relations): Rely on new sentinel.
2777 * src/gram.c (gram_free): Adjust to new sentinel.
2778
2779 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2780
2781 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2782 yylookaheadNeeds. All uses updated.
2783 (yysplitStack): Rename local yynewLookaheadStatuses to
2784 yynewLookaheadNeeds.
2785 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2786 GLR): In comments, change `lookahead status' to `lookahead need'.
2787
2788 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2789
2790 * data/glr.c (yysplitStack): A little stylistic rewrite.
2791
2792 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2793
2794 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2795
2796 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2797
2798 * doc/bison.texinfo: Fix some typos.
2799 (GLR Semantic Actions): New subsection discussing special
2800 considerations because GLR semantic actions might be deferred.
2801 (Actions): Mention look-ahead usage of yylval.
2802 (Actions and Locations): Mention look-ahead usage of yylloc.
2803 (Special Features for Use in Actions): Add YYEOF entry and mention it
2804 in the yychar entry.
2805 In the yychar entry, remove mention of the local yychar case (pure
2806 parser) since this is irrelevant information when writing semantic
2807 actions and since it's already discussed in `Bison Symbols' where
2808 yychar is otherwise described as an external variable.
2809 In the yychar entry, don't call it the `current' look-ahead since it
2810 isn't when semantic actions are deferred.
2811 In the yychar and yyclearin entries, add note about deferred semantic
2812 actions.
2813 Add yylloc and yylval entries discussing look-ahead usage.
2814 (Look-Ahead Tokens): When discussing yychar, don't call it the
2815 `current' look-ahead, and do mention yylval and yylloc.
2816 (Error Recovery): Cross-reference `Action Features' when mentioning
2817 yyclearin.
2818 (Bison Symbols): In the yychar entry, don't call it the `current'
2819 look-ahead.
2820 In the yylloc and yylval entries, mention look-ahead usage.
2821
2822 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 * tests/glr-regression.at: Update copyright year to 2006.
2825
2826 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2827
2828 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2829 use during nondeterministic operation to track which stacks have
2830 actually needed the current lookahead.
2831 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2832 Allocate, deallocate, resize, and otherwise shuffle space for
2833 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2834 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2835 appropriately during nondeterministic operation.
2836 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2837 members to store the current lookahead to be used by the deferred
2838 user action.
2839 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2840 from which the RHS is taken. Set the lookahead members of the new
2841 yySemanticOption according to the lookahead status for stack yyk.
2842 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2843 yyaddDeferredAction.
2844 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2845 members of yySemanticOption before invoking yyuserAction, and then set
2846 them back to their current values afterward.
2847 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2848 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2849 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2850 titles for consistency.
2851 (Leaked merged semantic value if user action cuts parse): In order to
2852 suppress lint warnings, use arguments in merge function, and assign
2853 char value < 128 in main.
2854 (Incorrect lookahead during deterministic GLR): New test case.
2855 (Incorrect lookahead during nondeterministic GLR): New test case.
2856
2857 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2858
2859 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2860 !yyvaluep as signal that no semantic value is available to print.
2861 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2862 to print a semantic value.
2863
2864 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2865
2866 * tests/glr-regression.at: For consistency with my newer test cases,
2867 don't thank myself.
2868
2869 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2870
2871 * data/glr.c (yyresolveValue): When merging semantic options, if at
2872 least one user action succeeds but a later one cuts the parse, then
2873 destroy the semantic value before returning rather than leaking it.
2874 (yyresolveStates): If a user action cuts the parse and thus
2875 yyresolveValue fails, ignore the (unset) semantic value rather than
2876 corrupting the yyGLRState, and empty the semantic options list since
2877 the user actions should have called all necessary destructors.
2878 Simplify code with YYCHK.
2879 * tests/glr-regression.at (Corrupted semantic options if user action
2880 cuts parse): New test case.
2881 (Undesirable destructors if user action cuts parse): New test case.
2882 Before applying any of this patch, this test case never actually failed
2883 for me... but only because the corrupted semantic options usually
2884 masked this bug.
2885 (Leaked merged semantic value if user action cuts parse): New test
2886 case.
2887
2888 2006-01-05 Akim Demaille <akim@epita.fr>
2889
2890 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2891
2892 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2893
2894 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2895 _MSC_VER. Problem reported by Cenzato Marco.
2896 (b4_c_function_def): Use it.
2897 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2898 b4_c_modern.
2899 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2900 than rolling our own.
2901
2902 2006-01-04 Akim Demaille <akim@epita.fr>
2903
2904 Also warn about non-used mid-rule values.
2905 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2906 member.
2907 (symbol_list_new): Adjust.
2908 * src/reader.c (symbol_typed_p): New.
2909 (grammar_rule_check): Use it.
2910 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2911 Check its rule.
2912 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2913 Use it.
2914 * tests/actions.at (Exotic Dollars): Adjust.
2915
2916 2006-01-04 Akim Demaille <akim@epita.fr>
2917
2918 * src/reader.c (grammar_midrule_action): If $$ is set in a
2919 mid-rule, move the `used' bit to its lhs.
2920 * tests/input.at (Unused values): New.
2921 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2922
2923 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2924
2925 * doc/bison.texinfo (Bison Options): Say more accurately what
2926 --yacc does.
2927 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2928 about declarations in the grammar when in Yacc mode, as POSIX does
2929 not require a diagnostic when the grammar uses extensions.
2930
2931 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2932
2933 Warn about dubious constructions like "%token T T".
2934 Reported by twlevo.
2935 * src/symtab.h (struct symbol.declared): New member.
2936 * src/symtab.c (symbol_new): Initialize it to false.
2937 (symbol_class_set): New arg DECLARING, specifying whether
2938 this is a declaration that we want to warn about, if there
2939 is more than one of them. All uses changed.
2940
2941 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2942 Allow multiple %union directives, whose contents concatenate.
2943 * src/parse-gram.y (grammar_declaration): Likewise.
2944 Use muscle_code_grow, so that we don't need stype_line any more.
2945 All uses changed.
2946
2947 * src/muscle_tab.c (muscle_grow): Fix comment.
2948
2949 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2950 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2951 Update copyright year to 2006.
2952
2953 2006-01-03 Akim Demaille <akim@epita.fr>
2954
2955 Have glr.cc pass (some of) the calc.at tests.
2956 * data/glr.cc (b4_parse_param_orig): New.
2957 (b4_parse_param): Improve its definition, and bound it more
2958 clearly in the skeleton.
2959 (b4_epilogue): Append, instead of prepending, in order to keep
2960 #line consistency.
2961 Simplify the generation of auxiliary functions: locations and
2962 purity are mandated.
2963 (b4_global_tokens_and_yystype): Honor it.
2964 * data/location.cc (c++.m4): Don't include it.
2965 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2966 and AT_SKEL_CC_IF.
2967 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2968 AT_LALR1_CC_IF.
2969 Be sure to initialize the first position's filename.
2970 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2971 mandated anyway.
2972 (AT_CHECK_CALC_GLR_CC): New.
2973 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2974
2975 2006-01-02 Akim Demaille <akim@epita.fr>
2976
2977 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2978 c.m4.
2979 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2980 * data/glr.cc: Do not include stack.hh.
2981
2982 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2983
2984 * data/glr.c: Reformat whitespace with tabs.
2985 (b4_lpure_formals): Remove this unused m4 macro.
2986 * tests/cxx-type.at: Reformat whitespace with tabs.
2987 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2988 since it's a member. Rename type to isNterm for clarity.
2989
2990 2005-12-29 Akim <akim@sulaco.local>
2991
2992 Let glr.cc catch up with symbol_value_print.
2993 * data/glr.cc (b4_yysymprint_generate): Replace by...
2994 (b4_yy_symbol_print_generate): this.
2995 (yy_symbol_print, yy_symbol_value_print): Declare them.
2996
2997 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2998
2999 * src/location.h (boundary): Note that a line or column equal
3000 to INT_MAX indicates an overflow.
3001 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
3002 (rule_length_overflow, increment_rule_length, add_column_width):
3003 New functions.
3004 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
3005 (<SC_BRACED_CODE>"}"):
3006 Use increment_rule_length rather than incrementing it by hand.
3007 (adjust_location, handle_syncline): Diagnose overflow.
3008 (handle_action_dollar, handle_action_at):
3009 Fix bug with monstrosities like $-2147483648.
3010 Remove now-unnecessary checks.
3011 (scan_integer): Verify assumptions and remove now-unnecessary checks.
3012 (convert_ucn_to_byte): Verify assumptions.
3013 (handle_syncline): New arg LOC. All callers changed.
3014 Don't store through a value derived from char const * pointer.
3015
3016 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
3017 GCC warnings.
3018
3019 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
3020
3021 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
3022 Remove unnecessary forward static decls.
3023
3024 2005-12-27 Akim Demaille <akim@epita.fr>
3025
3026 * src/reader.c (grammar_current_rule_check): Also check that $$
3027 is used.
3028 Take the rule to check as argument, hence rename as...
3029 (grammar_rule_check): this.
3030 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
3031 Rename as...
3032 (grammar_rule_begin, grammar_rule_end): these, for consistency.
3033 (grammar_midrule_action, grammar_symbol_append): Now static.
3034 * tests/torture.at (input): Don't rely on the default action
3035 being always performed.
3036 * tests/calc.at: "Set" $$ even when the action is "cut" with
3037 YYERROR or other.
3038 * tests/actions.at (Exotic Dollars): Instead of using unused
3039 values, check that the warning is issued.
3040
3041 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
3042
3043 * NEWS: Improve wording for unused-value warnings.
3044
3045 2005-12-22 Akim Demaille <akim@epita.fr>
3046
3047 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
3048 (b4_yysymprint_generate): Rename as...
3049 (b4_yy_symbol_print_generate): this.
3050 Generate yy_symbol_print instead of yysymprint.
3051 Generate also yy_symbol_value_print, and use it.
3052
3053 2005-12-22 Akim Demaille <akim@epita.fr>
3054
3055 * NEWS: Warn about unused values.
3056 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
3057 a `used' member.
3058 (symbol_list_n_get, symbol_list_n_used_set): New.
3059 (symbol_list_n_type_name_get): Use symbol_list_n_get.
3060 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
3061 * src/reader.c (grammar_current_rule_check): Check that values are
3062 used.
3063 * src/symtab.c (symbol_print): Accept 0.
3064 * tests/existing.at: Remove the type information.
3065 Empty the actions.
3066 Remove useless actions (beware of mid-rule actions: perl -000
3067 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
3068 * tests/actions.at (Exotic Dollars): Use unused values.
3069 * tests/calc.at: Likewise.
3070 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3071 Likewise.
3072
3073 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
3074 rule_useful_p.
3075
3076 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
3077
3078 Undo 2005-12-01 tentative license wording change. The wording is
3079 still being reviewed by the lawyers, and we don't want to wait for
3080 them before publishing a test release. For now, revert to the
3081 previous wording.
3082 * NEWS: Undo 2005-12-01 change.
3083 * data/glr.c: Revert to previous license wording.
3084 * data/glr.cc: Likewise.
3085 * data/lalr1.cc: Likewise.
3086 * data/location.cc: Likewise.
3087 * data/yacc.c: Likewise.
3088
3089 * NEWS: Reword %destructor vs YYABORT etc.
3090 * data/glr.c: Use American spacing, for consistency.
3091 * data/glr.cc: Likewise.
3092 * data/lalr1.cc: Likewise.
3093 * data/yacc.c: Likewise.
3094 * data/yacc.c: Reformat comments slightly.
3095 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
3096 for consistency. Fix some spelling errors and reword recently-included
3097 text slightly.
3098 * tests/cxx-type.at: Cast results of malloc, for C++.
3099
3100 2005-12-21 Joel E. Denny <address@hidden>
3101
3102 * tests/cxx-type.at: Construct a tree, count the parents of shared
3103 nodes, and free each node once and only once. Previously, the memory
3104 for semantic values was leaked instead.
3105
3106 2005-12-21 Joel E. Denny <address@hidden>
3107
3108 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
3109 (yylval, yylloc): If pure, #define to yystackp->yyval and
3110 yystackp->yyloc similar to yychar and yynerrs.
3111 (yyparse): If pure, remove local yylval and yylloc. Add local
3112 yystackp to accommodate pure definitions of yylval and yylloc.
3113 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
3114 yylvalp and yyllocp to &yylval and &yylloc.
3115 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
3116 namespace. Previously, nerrs and char were missing, but lval and lloc
3117 weren't necessary.
3118 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
3119 yylvalp and yyllocp parameters since, if pure, these are now always
3120 accessible through yystackp. If not pure, they are still accessible
3121 globally.
3122 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
3123 `if (YYID (N))' to pacify lint.
3124
3125 2005-12-21 Akim Demaille <akim@epita.fr>
3126
3127 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
3128 destroy the RHS symbols of a rule.
3129 * data/yacc.c (yylen): Initialize to 0.
3130 Keep its value to the number of items to possibly shift.
3131 In particular, a regular successful parse that ends on YYFINAL by
3132 a (internal) YYACCEPT must not have yylen != 0.
3133 (yyerrorlab, yyreturn): Pop the RHS.
3134 Reorder a bit to emphasize the `shifting' bits of code.
3135 (YYPOPSTACK): Now accept a number of items to pop.
3136 * data/lalr1.cc: Likewise.
3137 * data/glr.c: Formatting changes.
3138 Use goto instead of fall through.
3139 * doc/bison.texinfo (Destructor Decl): Complete.
3140
3141 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3142
3143 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3144 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
3145 * djgpp/config.bat: Replace every occurence of the file name
3146 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3147 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3148 * djgpp/config.sed: Replace every occurence of the file name
3149 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3150 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3151 * djgpp/djunpack.bat: DJGPP specific file.
3152 * djgpp/fnchange.lst: DJGPP specific file.
3153 * djgpp/README.in: Add new information about how to unpack the bison
3154 source on MSDOS and other systems which have 8.3 file name restrictions
3155 using djunpack.bat and fnchange.lst.
3156
3157 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3158
3159 * bootstrap (build_cvs_prefix): Remove; unused.
3160 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
3161 when getting gnulib.
3162
3163 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
3164
3165 * data/glr.c: Reorder typedef declarations for structs to match order
3166 of struct declarations.
3167 Rename yystack everywhere to yystackp except in yyparse where it's not
3168 a pointer.
3169 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
3170 consistency.
3171 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
3172 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
3173 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
3174 lint.
3175
3176 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3177
3178 * tests/sets.at (Accept): Fix typos in regular expression used to
3179 sed out the final state number.
3180
3181 Work around portability problem on Solaris 10: flex-generated
3182 files include <stdio.h> before <config.h>, which messes up
3183 because the latter defines __EXTENSIONS__. Address the problem
3184 by creating two new little files that include <config.h> first,
3185 then include the flex-generated files. Rewrite everyone else
3186 to include <config.h> first, as well.
3187 * lib/timevar.c: Always include "config.h".
3188 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
3189 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
3190 (EXTRA_bison_SOURCES): New macro.
3191 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
3192 * src/system.h: Don't include config.h.
3193 * src/LR0.c: Include <config.h> first.
3194 * src/assoc.c: Likewise.
3195 * src/closure.c: Likewise.
3196 * src/complain.c: Likewise.
3197 * src/conflicts.c: Likewise.
3198 * src/derives.c: Likewise.
3199 * src/files.c: Likewise.
3200 * src/getargs.c: Likewise.
3201 * src/gram.c: Likewise.
3202 * src/lalr.c: Likewise.
3203 * src/location.c: Likewise.
3204 * src/main.c: Likewise.
3205 * src/muscle_tab.c: Likewise.
3206 * src/nullable.c: Likewise.
3207 * src/output.c: Likewise.
3208 * src/parse-gram.y: Likewise.
3209 * src/print.c: Likewise.
3210 * src/print_graph.c: Likewise.
3211 * src/reader.c: Likewise.
3212 * src/reduce.c: Likewise.
3213 * src/relation.c: Likewise.
3214 * src/state.c: Likewise.
3215 * src/symlist.c: Likewise.
3216 * src/symtab.c: Likewise.
3217 * src/tables.c: Likewise.
3218 * src/uniqstr.c: Likewise.
3219 * src/vcg.c: Likewise.
3220
3221 * src/parse-gram.y: Fix minor problems uncovered by lint.
3222 (current_lhs, current_lhs_location): Now static.
3223 (current_assoc): Remove unused variable.
3224
3225 Cleanups so that Bison-generated parsers have less lint.
3226 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3227 Prepend /*ARGSUSED*/, for lint's sake.
3228 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3229 definition if 'lint' is defined.
3230 (YYID): New macro (or function, if lint).
3231 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3232 * data/yacc.c: Likewise.
3233 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3234 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3235 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3236 is C++ only.
3237 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3238 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3239 Use YYID(0) rather than 0, for lint.
3240 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3241 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3242
3243 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3244
3245 * tests/glr-regression.at
3246 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3247 Close memory leak reported by twlevo.
3248
3249 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3250
3251 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3252 all stacks.
3253 (yyparse): Iterate another stack in order to call user destructors.
3254 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3255 New test case.
3256 (Duplicated user destructor for lookahead): This test now is expected
3257 to succeed.
3258
3259 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3260
3261 * NEWS: Document the following change.
3262 * data/yacc.c: Say "parser skeleton" rather than "file", since
3263 it's no longer just a file.
3264 * data/glr.c: Grant a special exception for C GLR parsers, that
3265 reads like the already-existing exception for C LALR(1) parsers.
3266 * data/glr.cc: Likewise.
3267 * data/lalr1.cc: Likewise.
3268 * data/location.cc: Likewise.
3269 * data/yacc.c: Reword the "written by" statement to clarify that
3270 it was the parser skeleton, not the entire output file.
3271 * data/glr.c: Written by Paul Hilfinger.
3272 * data/glr.cc: Written by Akim Demaille.
3273 * data/lalr1.cc: Likewise.
3274
3275 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3276
3277 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3278 Fix typos in previous change that broke 'make check'.
3279 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3280 supported in C.
3281 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3282 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3283 We can revert this once things settle down.
3284
3285 * src/conflicts.c (conflicts_print): Don't print file name twice
3286 when %expect fails because there were no conflicts.
3287 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3288 change.
3289 * tests/conflicts.at (%expect not enough, %expect too much):
3290 (%expect with reduce conflicts): Adjust to new behavior.
3291
3292 2005-11-18 Akim Demaille <akim@epita.fr>
3293
3294 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3295 errors.
3296 * NEWS: Document this.
3297 * doc/bison.texinfo (Expect Decl): Likewise.
3298
3299 2005-11-16 Akim Demaille <akim@epita.fr>
3300
3301 Generalize the display of semantic values and locations in traces.
3302 * data/glr.c (yy_reduce_print): Fix indices (again).
3303 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3304 literal integers.
3305 * data/lalr1.cc (yyreduce_print): Rename as...
3306 (yy_reduce_print): this.
3307 Display values and locations.
3308 * data/yacc.c (yy_reduce_print): Likewise.
3309 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3310 (yysymprint): Move higher to be visible from yy_reduce_print).
3311 (yyparse): Adjust.
3312 * tests/calc.at: Adjust the expected length of the traces.
3313
3314 2005-11-14 Akim Demaille <akim@epita.fr>
3315
3316 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3317 from 1 to N, while values and location start at 0.
3318 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3319
3320 2005-11-14 Akim Demaille <akim@epita.fr>
3321
3322 * data/glr.c (yy_reduce_print): Fix the $ number.
3323
3324 2005-11-14 Akim Demaille <akim@epita.fr>
3325
3326 "Use" parse parameters.
3327 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3328 * data/glr.c, data/glr.cc: Use them.
3329 * data/glr.c (YYUSE): Have a C++ definition that supports
3330 non-pointer types.
3331
3332 2005-11-14 Akim Demaille <akim@epita.fr>
3333
3334 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3335
3336 2005-11-14 Akim Demaille <akim@epita.fr>
3337
3338 * data/glr.cc: New.
3339 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
3340
3341 2005-11-12 Akim Demaille <akim@epita.fr>
3342
3343 Let position and location be PODs.
3344 * data/location.cc (position::initialize, location::initialize): New.
3345 (position::position, location::location): Define only if
3346 b4_location_constructors is defined.
3347 * data/lalr1.cc (b4_location_constructors): Define it for backward
3348 compatibility.
3349 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3350
3351 2005-11-12 Akim Demaille <akim@epita.fr>
3352
3353 * data/lalr1.cc: Move the body of the ctor and dtor into the
3354 parser file (instead of the header).
3355 Wrap the implementations in a "namespace yy".
3356
3357 2005-11-12 Akim Demaille <akim@epita.fr>
3358
3359 Have glr.c include its header file when created.
3360 * data/glr.c (b4_shared_declarations): New.
3361 Output them verbatim in the parser if !%defines, otherwise
3362 output then in the header file, and include it instead.
3363
3364 2005-11-11 Akim Demaille <akim@epita.fr>
3365
3366 * data/glr.c: Comment changes.
3367
3368 2005-11-11 Akim Demaille <akim@epita.fr>
3369
3370 When yydebug, report semantic and location values for reductions.
3371 * data/glr.c (yy_reduce_print): Report the semantic values and the
3372 locations.
3373 (YY_REDUCE_PRINT): Adjust.
3374 (yyglrReduce): Use them.
3375 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3376 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3377 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3378 traces.
3379
3380 2005-11-10 Akim Demaille <akim@epita.fr>
3381
3382 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3383 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3384 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3385
3386 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3387
3388 * m4/cxx.m4, examples/Makefile.am: Don't build
3389 examples/calc++ if no C++ compiler is available. (trivial change)
3390
3391 2005-11-09 Akim Demaille <akim@epita.fr>
3392
3393 * src/scan-skel.l: Use a couple of asserts.
3394
3395 2005-11-03 Akim Demaille <akim@epita.fr>
3396
3397 In some (weird) cases, the final state number is incorrect.
3398 Reported by Alexandre Duret-Lutz.
3399 * src/LR0.c (state_list_append): Remove the computation of
3400 final_state.
3401 (save_reductions): Do it here.
3402 (get_state): Alpha conversion.
3403 (generate_states): Use a for loop.
3404 * src/gram.h (item_number_is_rule_number)
3405 (item_number_is_symbol_number): New.
3406 * src/state.c: Use assert.
3407 * src/system.h: Include assert.h.
3408 * tests/sets.at (Accept): New.
3409
3410 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3411
3412 * data/glr.c (yyfill): Adjust comment.
3413 (yyresolveAction): Initialize default location properly
3414 for empty right-hand sides.
3415 (yydoAction): Ditto.
3416 Add comment explaining apparently dead code.
3417 * tests/glr-regression.at
3418 (Incorrectly initialized location for empty right-hand side in GLR):
3419 New test.
3420
3421 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3422
3423 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3424 gnulib when interrupted. This fixes some race conditions and
3425 works around some portability problems (one noted by Paul
3426 Hilfinger).
3427
3428 2005-10-22 Akim <akim@epita.fr>
3429
3430 * Makefile.cfg: Adjust to config -> build-aux.
3431 Reported by twledo.
3432
3433 2005-10-21 Akim Demaille <akim@epita.fr>
3434
3435 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3436 the %parse-params.
3437 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3438 * data/yacc.c (b4_Pure_if): Rename as...
3439 (b4_yacc_pure_if): this.
3440 (YY_SYMBOL_PRINT, yyparse): Adjust.
3441 * doc/bison.texinfo: Formatting changes.
3442
3443 2005-10-21 Akim Demaille <akim@epita.fr>
3444
3445 Finish the transition config -> build-aux.
3446 * configure.ac, Makefile.am: Use build-aux.
3447 * config/prev-version, config/announce-gen, config/Makefile.am:
3448 Move to...
3449 * build-aux/prev-version, build-aux/announce-gen,
3450 * build-aux/Makefile.am: here.
3451
3452 2005-10-14 Akim Demaille <akim@epita.fr>
3453
3454 * examples/calc++/test: Use set -x only when VERBOSE.
3455
3456 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3457
3458 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3459 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3460
3461 2005-10-13 Akim Demaille <akim@epita.fr>
3462
3463 * src/scan-skel.l: Output the base name parts of the parser and
3464 header file names.
3465 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3466 additional checks.
3467 Use this to exercise C++ outputs in subdirs.
3468 Reported by Oleg Smolsky.
3469
3470 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3471
3472 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3473 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3474 Problem reported by John P. Hartmann.
3475 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3476 already defined it.
3477
3478 2005-10-12 Akim Demaille <akim@epita.fr>
3479
3480 * src/parse-gram.y (version_check): Exit 63 to please missing
3481 (stands for "version mismatch).
3482 * tests/input.at, doc/bison.texinfo: Adjust.
3483
3484 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3485
3486 Work around portability problems with Visual Age C compiler
3487 (xlc and xlC_r) reported by John P. Hartmann.
3488 * data/location.cc (initial_column, initial_line): Remove.
3489 All uses replaced by 0 and 1.
3490 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3491 that xlc complains about.
3492 * src/scan-skel.l (skel_wrap): Likewise.
3493 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3494 as __STDC__.
3495 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3496 __STDC_VERSION__. Use it everywhere instead of looking at
3497 __STDC__ and __cplusplus.
3498
3499 2005-10-10 Akim Demaille <akim@epita.fr>
3500
3501 * examples/calc++/test: Be quiet unless VERBOSE.
3502
3503 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3504
3505 * data/c.m4 (yydestruct, yysymprint):
3506 Use YYUSE instead of casting to void.
3507 * data/glr.c (YYUSE): New macro.
3508 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3509 Use it instead of rolling our own.
3510 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3511 (YYCHK1):
3512 Use /*CONSTCOND*/ to suppress lint warnings.
3513 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3514 (YY_STACK_PRINT): Use 'false' not '0'.
3515 (YYUSE): New macro.
3516 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3517 * data/yacc.c (YYUSE): New macro.
3518 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3519 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3520 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3521
3522
3523 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3524 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3525
3526 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3527
3528 Undo the parts of the unlocked-I/O change that substituted
3529 putc or puts for printf. This might hurt performance a bit,
3530 but some people prefer the printf style.
3531 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3532 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3533 All uses replaced by YYFPRINTF and YYDPRINTF.
3534 * data/yacc.c: Likewise.
3535 * lib/bitset.c (bitset_print): Likewise.
3536 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3537 putc and puts.
3538 * lib/lbitset.c (debug_lbitset): Likewise.
3539 * src/closure.c (print_firsts, print_fderives): Likewise.
3540 * src/gram.c (grammar_dump): Likewise.
3541 * src/lalr.c (look_ahead_tokens_print): Likewise.
3542 * src/output.c (escaped_output): Likewise.
3543 (user_actions_output): Break apart two printfs.
3544 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3545 * src/reduce.c (reduce_print): Likewise.
3546 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3547 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3548
3549 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3550 Use assignments rather than casts-to-void to suppress
3551 unused-variable warnings. This pacifies 'lint'.
3552 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3553 unused-variable warnings.
3554
3555 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3556
3557 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3558
3559 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3560
3561 Use unlocked I/O for a minor performance improvement on hosts like
3562 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3563 is to use the gnlib unlocked-io module, and to prefer putc and
3564 puts to printf when either will work (since the latter doesn't
3565 come in an unlocked flavor).
3566 * bootstrap (gnulib_modules): Add unlocked-io.
3567 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3568 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3569 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3570 and similarly for puts and putc and printf.
3571 * data/yacc.c: Likewise.
3572 * lib/bitset.c (bitset_print): Likewise.
3573 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3574 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3575 to printf.
3576 * lib/lbitset.c (debug_lbitset): Likewise.
3577 * src/closure.c (print_firsts, print_fderives): Likewise.
3578 * src/gram.c (grammar_dump): Likewise.
3579 * src/lalr.c (look_ahead_tokens_print): Likewise.
3580 * src/output.c (escaped_output): Likewise.
3581 (user_actions_output): Coalesce two printfs.
3582 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3583 * src/reduce.c (reduce_print): Likewise.
3584 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3585 * src/system.h: Include unlocked-io.h rather than stdio.h.
3586
3587 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3588 this confuses xgettext.
3589
3590 2005-10-02 Akim Demaille <akim@epita.fr>
3591
3592 * bootstrap (gnulib_modules): Add strverscmp.
3593 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3594 * m4/.cvsignore: Add strverscmp.m4.
3595 * src/parse-gram.y (%require): New token, new rule.
3596 (version_check): New.
3597 * src/scan-gram.l (%require): Adjust.
3598 * tests/input.at (AT_REQUIRE): New.
3599 Use it.
3600 * doc/bison.texinfo (Require Decl): New.
3601 (Calc++ Parser): Use %require.
3602
3603 2005-10-02 Akim Demaille <akim@epita.fr>
3604
3605 * data/location.cc: New.
3606
3607 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3608 Akim Demaille <akim@epita.fr>
3609
3610 Make sure -odir/foo.cc creates dir/location.hh etc.
3611 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3612 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3613 (spec_defines_file): Now const.
3614 (dir_prefix): New.
3615 (short_base_name): Remove.
3616 * src/files.c: Adjust.
3617 (dirname.h): Include.
3618 (base_name): Don't prototype it.
3619 (finput): Remove, duplicates gram_in.
3620 (full_base_name, short_base_name): Replace by...
3621 (all_but_ext, all_but_tab_ext): these.
3622 (compute_base_names): Rename as...
3623 (compute_file_name_parts): this.
3624 Update to compute the new variables, including dir_prefix.
3625 Adjust dependencies.
3626 * src/output.c (prepare): Output them.
3627 * src/reader.c: Adjust to use gram_in, not finput.
3628 * src/scan-skel.l (@dir_prefix@): New.
3629
3630 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3631
3632 * lib/subpipe.c: New function end_of_output_subpipe() added
3633 to allow support for non-posix systems. This is a no-op function
3634 for posix systems.
3635
3636 * lib/subpipe.h: New function end_of_output_subpipe() added
3637 to allow support for non-posix systems. This is a no-op function
3638 for posix systems.
3639
3640 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3641 handle the lack of pipe/fork functionality on non-posix systems.
3642
3643 * djgpp/Makefile.maint: DJGPP specific file.
3644
3645 * djgpp/README.in: DJGPP specific file.
3646
3647 * djgpp/config.bat: DJGPP specific configuration file.
3648
3649 * djgpp/config.sed: DJGPP specific configuration file.
3650
3651 * djgpp/config.site: DJGPP specific configuration file.
3652
3653 * djgpp/config_h.sed: DJGPP specific configuration file.
3654
3655 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3656
3657 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3658
3659 2005-10-02 Akim Demaille <akim@epita.fr>
3660
3661 * data/location.cc: New, extract from...
3662 * data/lalr1.cc: here.
3663 (location.hh): Include it after the user prologue, in case the
3664 filename type is defined by the user.
3665 Forward declation location and position before the pre-prologue.
3666 (yyresult_): Rename as...
3667 (yyresult): this, it's a local variable, not an attribute.
3668 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3669
3670 2005-10-01 Akim Demaille <akim@epita.fr>
3671
3672 * examples/extexi: Restore the #line generation.
3673
3674 2005-09-30 Akim Demaille <akim@epita.fr>,
3675 Alexandre Duret-Lutz <adl@gnu.org>
3676
3677 Move the token type and YYSTYPE in the parser class.
3678 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3679 (parser::token): New, from the moved free definition of tokens.
3680 (parser::semantic_value): Now a full definition instead of an
3681 indirection to YYSTYPE.
3682 (b4_post_prologue): No longer included in the header file, but
3683 in the implementation file.
3684 * doc/bison.texi (C+ Language Interface): Update.
3685 * src/parse-gram.y: Support unary %define.
3686 * tests/actions.at: Define global_tokens_and_yystype for backward
3687 compatibility until we update the tests.
3688 * tests/calc.at: Idem.
3689 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3690 to simplify the code.
3691
3692 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3693
3694 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3695 Ah, the good old days! Problem reported by Peter Klein.
3696 * bootstrap (gnulib_modules): Add strerror, strtoul.
3697 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3698 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3699
3700 2005-09-29 Akim Demaille <akim@epita.fr>
3701
3702 * data/c.m4 (b4_error_verbose_if): New.
3703 * data/lalr1.cc: Use it.
3704 (YYERROR_VERBOSE_IF): Remove.
3705 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3706 parser members, replaced by...
3707 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3708 local variables.
3709 (yysyntax_error_): Takes the state number as argument.
3710 (yyreduce_print_): Use the argument yyrule, not the former
3711 attribute yyn_.
3712
3713 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3714
3715 * bootstrap (gnulib_modules): Add verify.
3716 * lib/.cvsignore: Add verify.h.
3717 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3718 * src/system.h (verify): Remove.
3719 Include verify.h instead.
3720 * src/tables.c (tables_generate): Use new API for 'verify'.
3721
3722 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3723
3724 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3725 local variables whose names begin with 'yy'.
3726 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3727 Trivial changes from Joel E. Denny.
3728
3729 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3730 it itself.
3731 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3732 don't use alloca any more.
3733
3734 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3735 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3736 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3737 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3738 to match yacc.c, to test more hosts.
3739
3740 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3741
3742 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3743 doesn't affect behavior.
3744 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3745 Solaris, AIX, MSC.
3746 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3747 This works a bit better with glibc, if user code has already included
3748 stdlib.h.
3749 * doc/bison.texinfo (Bison Parser): Document that users can't
3750 arbitrarily use malloc and free for other purposes. Document
3751 that <alloca.h> and <malloc.h> might be included.
3752 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3753 user must declare alloca.
3754
3755 * HACKING (release): Forwarn the Translation Project about
3756 stable releses.
3757
3758 2005-09-20 Akim Demaille <akim@epita.fr>
3759
3760 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3761
3762 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3763
3764 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3765 (YYSTACK_ALLOC_MAXIMUM): Use it.
3766 (yysyntax_error): New function.
3767 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3768 multiple syntax errors are reported, and alloca is being used.
3769 Instead, reallocate buffers twice as big each time, so that
3770 we waste at most half the allocated memory. Start with a small
3771 (128-byte) buffer that will suffice in most cases anyway.
3772 Use yysyntax_error to do most of the work.
3773
3774 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3775 yynerrs is the number of errors reported, not the number of
3776 errors encountered.
3777
3778 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3779 Mark it as expected to fail.
3780 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3781 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3782 Don't start user-code symbols with "yy", to avoid name space problems.
3783
3784 2005-09-19 Akim Demaille <akim@epita.fr>
3785
3786 Remove the traits, failed experiment.
3787 It never proved useful, and anyway because of the current
3788 definition, it was not possible to have several specialization of
3789 this traits, making it useless.
3790 * data/lalr1.cc (yy:traits): Remove.
3791 Inline its definitions in the parser class.
3792
3793 2005-09-19 Akim Demaille <akim@epita.fr>
3794
3795 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3796 least Mac OSX with a /usr/local install of gettext.
3797
3798 2005-09-19 Akim Demaille <akim@epita.fr>
3799
3800 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3801 and yytoken for similarity with the other skeletons.
3802
3803 2005-09-19 Akim Demaille <akim@epita.fr>
3804
3805 * NEWS, configure.ac: update version number to 2.1a.
3806
3807 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3808
3809 * NEWS: Version 2.1.
3810
3811 * NEWS: Remove notice of yytname change, since it was never in an
3812 official release.
3813 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3814 diagnostic.
3815 * src/output.c (prepare): Likewise.
3816 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3817 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3818 is not defined. This is an awful hack, but it's enough for now.
3819 All callers changed.
3820 * tests/glr-regression-at (make_value): Args are const pointers now,
3821 to avoid GCC warning.
3822 (Duplicated user destructor for lookahead): New test. Currently
3823 skipped. It fails on my host but I'm not sure it'll always fail.
3824
3825 2005-09-16 Akim Demaille <akim@epita.fr>
3826
3827 * src/symtab.h (struct symbol): Declare the printer and destructor
3828 as const, to avoid accidental calls to free.
3829 (symbol_destructor_set, symbol_printer_set): Adjust.
3830 * src/symtab.c: Adjust.
3831
3832 2005-09-16 Akim Demaille <akim@epita.fr>
3833
3834 * data/c.m4 (b4_token_enums): New.
3835 (b4_token_defines): Rename as...
3836 (b4_token_enums_defines): this.
3837 (b4_token_defines): New, output only the #defines.
3838 * data/yacc.c, data/glr.c: Adjust.
3839 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3840 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3841 as default values.
3842
3843 2005-09-16 Akim Demaille <akim@epita.fr>
3844
3845 * data/lalr1.cc (yylex_): Remove, inline its code.
3846 (yyreport_syntax_error_): Remove, replaced by...
3847 (yysyntax_error_): this which returns a string and leaves to the
3848 caller the call to the users' error function.
3849 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3850 Move from members of the parser object...
3851 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3852 to local variables of the parse function.
3853
3854 2005-09-16 Akim Demaille <akim@epita.fr>
3855
3856 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3857 since it's in Bison's name space.
3858
3859 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3860
3861 * data/glr.c (yyresolveValue): Add default case to pacify
3862 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3863
3864 * NEWS: Document when yyparse started to return 2.
3865 * doc/bison.texinfo (Parser Function): Document when yyparse
3866 returns 2.
3867
3868 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3869 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3870 changed.
3871 (class position): file_name -> filename (reverting). All uses changed.
3872
3873 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3874
3875 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3876 do anything if $@ exists. This reverts part of the 2005-07-07
3877 patch.
3878
3879 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3880
3881 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3882 contains obsolete information and isn't worth distributing as a
3883 separate file anyway.
3884 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3885 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3886 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3887 (yyparse): Abort if user code uses longjmp to throw an unexpected
3888 value.
3889
3890 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3891
3892 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3893 Suggested by twlevo@xs4all.nl.
3894
3895 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3896 This avoids a diagnostic from gcc -Wswitch-enum.
3897 Problem reported by twlevo@xs4all.nl.
3898
3899 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3900 standards. Use "file name" or "file" or "name", depending on
3901 the context.
3902 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3903 not to hack/foo.tab.c.
3904 (Calc++ Top Level): 2nd arg of main is not const.
3905 * data/glr.c: b4_filename -> b4_file_name.
3906 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3907 All uses changed.
3908 (class position): filename -> file_name. All uses changed.
3909 * data/yacc.c: b4_filename -> b4_file_name.
3910 * lib/bitset.h: filename -> file_name in local vars.
3911 * lib/bitset_stats.c: Likewise.
3912 * src/files.c: Likewise.
3913 * src/scan-skel.l ("@output ".*\n): Likewise.
3914 * src/files.c (file_name_split): Renamed from filename_split.
3915 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3916
3917 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3918
3919 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3920 to accommodate latest gnulib.
3921
3922 * tests/glr-regression.at (Duplicate representation of merged trees):
3923 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3924
3925 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3926 needed.
3927
3928 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3929
3930 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3931 All uses changed. Invoke user destructor after an error during a
3932 split parse (trivial change from Joel E. Denny).
3933
3934 * tests/glr-regression.at
3935 (User destructor after an error during a split parse): New test case.
3936 Problem reported by Joel E. Denny in:
3937 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3938
3939 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3940
3941 * README-cvs: Give URLs for recommended tools.
3942 Mention Gzip version problem, and bootstrapping issues.
3943 Remove troubleshooting section, as it's somewhat obsolete.
3944
3945 * bootstrap (no_cache): New var, to accommodate different wget
3946 variants. Use it instead of '-C off'. Problem reported by
3947 twlevo@xs4all.nl.
3948
3949 * data/glr.c (yydestroyStackItem): New function.
3950 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3951 debugging information. Problem reported by Joel E. Denny.
3952
3953 2005-08-25 Akim Demaille <akim@epita.fr>
3954
3955 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3956
3957 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3958
3959 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3960 Don't invoke destructor on unresolved entries.
3961 * tests/glr-regression.at
3962 (User destructor for unresolved GLR semantic value): New test case.
3963 Problem reported by Joel E. Denny in:
3964 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3965
3966 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3967
3968 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3969 Add strnlen.c.
3970 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3971 lib-prefix.m4, po.m4.
3972
3973 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3974 in yydestruct diagnostic, since it might not be an error.
3975 Problem reported by Joel Denny near end of
3976 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3977 * data/lalr1.cc (yyerturn): Likewise.
3978 * data/yacc.c (yyreturn): Likewise.
3979 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3980
3981 * src/files.c: Remove obsolete FIXME comment.
3982
3983 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3984 with the other templates, and to fix bogus run-on messages such
3985 as the one reported at the end of
3986 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3987 All callers changed to avoid the newline.
3988 (yyprocessOneStack): Output two lines rather than one, to accommodate
3989 the above change. This changes the debug output format slightly.
3990
3991 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3992 reported by Joel E. Denny in
3993 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3994 (trivial change).
3995 * tests/glr-regression.at (Duplicate representation of merged trees):
3996 New test, from Joel E. Denny in:
3997 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3998 * THANKS: Add Joel E. Denny.
3999
4000 * configure.ac (AC_INIT): Bump to 2.0c.
4001
4002 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
4003
4004 * NEWS: Version 2.0b.
4005
4006 * Makefile.am (SUBDIRS): Put examples before tests, so that
4007 "make check" doesn't finish with "All 1 tests passed".
4008
4009 * tests/regression.at (Token definitions): Don't rely on
4010 AT_PARSER_CHECK for data that contains backslashes. It currently
4011 uses 'echo', and 'echo' isn't portable if its argument contains
4012 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
4013 that the byte '\0xff' is not printable in the C locale; it is,
4014 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
4015 not printable, so use '\0x81' to test.
4016
4017 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
4018 version of GCC, since the macro is used with non-GCC compilers.
4019
4020 Fix core dump reported by Pablo De Napoli in
4021 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
4022 * tests/regression.at (Invalid inputs with {}): New test.
4023 * src/parse-gram.y (token_name): Translate type before using
4024 it as an index.
4025
4026 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
4027 the user's name space. All uses changed to __attribute__
4028 ((__unused__)).
4029 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
4030 Add __attribute__ ((__noreturn__)).
4031
4032 * etc/clcommit: Remove. We weren't using it, and it failed
4033 "make maintainer-distcheck".
4034 * Makefile.maint: Merge from coreutils.
4035 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
4036 (syntax-check-rules): Change list of rules as described below.
4037 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
4038 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
4039 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
4040 (sc_trailing_space): New rules.
4041 (sc_xalloc_h_in_src): Remove.
4042 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4043 (sc_space_tab, sc_error_exit_success, sc_changelog):
4044 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
4045 (makefile-check, po-check, author_mark_check):
4046 (makefile_path_separator_check, copyright-check):
4047 Use grep -n, to make it easier to find violations.
4048 Use CVS_LIST and CVS_LIST_EXCEPT.
4049 (header_regexp, h_re): Remove.
4050 (dd_c): New macro.
4051 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
4052 (my-distcheck): Use more-modern GCC flags.
4053 (signatures, %.asc): Remove.
4054 (rel-files, announcement): Remove signatures.
4055 Restore old updating code, even though we don't use it, so
4056 that we're the same as coreutils.
4057 (alpha, beta, major): Depend on news-date-check.
4058 Make the upload commands.
4059
4060 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
4061 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
4062 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
4063 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
4064 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
4065 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
4066 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
4067 * tests/sets.at: Likewise.
4068
4069 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
4070 we comment out the Autoconf version number.
4071 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
4072 it's error-prone and "make maintainer-distcheck" rejects it.
4073
4074 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
4075 Indent calls to "error" to pacify "make maintainer-distcheck",
4076 when the calls are not intended to be translated.
4077 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
4078
4079 * src/Makefile.am (DEFS): Use +=, to pacify
4080 "make maintainer-distcheck".
4081 (bison_SOURCES): Add scan-skel.h.
4082 (sc_tight_scope): New rule, from coreutils.
4083
4084 * src/files.c (src_extension, header_extension):
4085 Now static, not extern.
4086 * src/getargs.c (short_options): Likewise.
4087 * src/muscle_tab.c (muscle_table): Likewise.
4088 * src/parse-gram.y (current_class, current_type, current_prec):
4089 Likewise.
4090 * src/reader.c (grammar_end, previous_rule_end): Likewise.
4091 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
4092 * src/main.c (main): Cast bindtextdomain and textdomain calls to
4093 void, to avoid warning when NLS is disabled.
4094 * src/output.c: Include scan-skel.h.
4095 (scan_skel): Remove decl, since scan-skel.h does this.
4096 (output_skeleton):
4097 Indent calls to "error" to pacify "make maintainer-distcheck".
4098 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
4099 * src/reader.h (gram_end, gram_lineno): New decls to pacify
4100 "make maintainer-distcheck".
4101 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
4102 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
4103 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
4104 (skel_lex_destroy, scan_skel): Move these decls to...
4105 * src/scan-skel.h: New file.
4106 * src/uniqstr.c (uniqstr_assert):
4107 Indent calls to "error" to pacify "make maintainer-distcheck".
4108
4109 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
4110 not @VAR@.
4111
4112 * tests/torture.at: Revamp to avoid misuse of atoi that
4113 "make maintainer-distcheck" complained about.
4114
4115 * examples/extexi (message): Don't print a message more than once,
4116 and omit line-number decoration that makes Emacs compile think
4117 that informative messages are worth worrying about.
4118
4119 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
4120
4121 * configure.ac: Update version number.
4122
4123 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
4124 accidentally.
4125 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
4126 autogenerated by the maintainer.
4127 * examples/calc++/.cvsignore: Add *.yy.
4128
4129 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
4130 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4131 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4132
4133 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
4134
4135 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
4136 from maintainer-distcheck about casting the argument of 'free'.
4137
4138 * NEWS: Mention recent yytname changes.
4139 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
4140
4141 * bootstrap: For translations that have not yet been upgraded to
4142 the new runtime-po domain, prime the pump by extracting the
4143 relevant strings from the obsolete translations. This code can be
4144 removed once the bison-runtime domain has been translated by each
4145 team.
4146
4147 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
4148 now that token names are already quoted.
4149
4150 Fix problem reported by Anthony Heading.
4151 * data/glr.c (YYTOKEN_TABLE): New macro.
4152 (yytname): Define if YYTOKEN_TABLE.
4153 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
4154 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
4155 (YYERROR_VERBOSE): Define the same way the other skeletons do.
4156 * src/output.c (prepare_symbols): Output token_table_flag.
4157
4158 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
4159
4160 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
4161 again if the first call fails.
4162
4163 * data/glr.c (yytnamerr): New function.
4164 (yyreportSyntaxError): Use it to dequote most string literals.
4165 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
4166 with other skeletons. All uses changed.
4167 (yytnameerr_): New function.
4168 (yyreport_syntax_error): Use it to dequote most string literals.
4169 * data/yacc.c (yytnamerr): New function.
4170 (yyerrlab): Use it to decode most string literals.
4171 * doc/bison.texinfo (Decl Summary, Calling Convention):
4172 Clarify quoting convention of yytname.
4173 * src/output.c (prepare_symbols): Quote all names. This undoes
4174 the 2005-04-17 change, which is now accomplished (mostly) via
4175 changes in the parsers as described above.
4176 * tests/regression.at (Token definitions, Web2c Actions):
4177 Undo most 2005-04-17 change here, too.
4178
4179 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
4180
4181 Fix more problems reported by twlevo@xs4all.nl.
4182 * tests/cxx-type.at: Don't pipe output of ./types through sed to
4183 remove trailing spaces. This loses the exit status of ./types,
4184 and isn't needed since ./types shouldn't be emitting trailing
4185 spaces.
4186 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
4187 as the stack isn't valid in that case.
4188
4189 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4190 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4191 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4192 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
4193 is used.
4194 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
4195 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4196 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4197 Likewise.
4198
4199 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
4200 overly-picky compilers that reject 'char *foo = "bar";'.
4201
4202 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
4203 to FILE * parameter, not to stderr. This fixes a typo introduced
4204 in the 2005-07-12 change.
4205
4206 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
4207 warnings from GCC 4.
4208
4209 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
4210 (yyglrShiftDefer, yysplitStack):
4211 Remove unused parameters b4_pure_formals. All uses changed.
4212 (yyglrShift): Remove unused parameters b4_user_formals.
4213 All uses changed.
4214 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4215
4216 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4217
4218 Destructor cleanups and regularization among the three skeletons.
4219 * NEWS: Document the behavior changes.
4220 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4221 stack before failing, as the cleanup code will do it for us now.
4222 * data/lalr1.cc (yyerrlab): Likewise.
4223 * data/glr.c (yyparse): Pop everything off the stack before
4224 freeing it, so that destructors get called properly.
4225 * data/lalr1.cc (yyreturn): Likewise.
4226 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4227 This is more consistent.
4228 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4229 why destructors might be called. 1.875 -> 2.1.
4230 (Destructor Decl, Decl Summary, Table of Symbols):
4231 Some English-language cleanups for %destructor.
4232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4233 Add output line for destructor of start symbol.
4234 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4235 because of that same extra output line.
4236
4237 * NEWS: Document minor wording changes in diagnostics of
4238 Bison-generated parsers.
4239 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4240 Remove unused formals. All uses changed.
4241 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4242 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4243 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4244 Rename yyoverflowab to yyexhaustedlab.
4245 When memory exhaustion occurs during syntax-error reporting,
4246 report it separately rather than in a single diagnostic; this
4247 eases translation.
4248 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4249 (Memory Exhausted): Renamed from Parser Stack Overflow.
4250 Revamp wording slightly to prefer "memory exhaustion".
4251 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4252
4253 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4254
4255 Add i18n support to the GLR skeleton. Partially fix the C++
4256 skeleton; a C++ expert needs to finish this. Remove debugging
4257 msgids; there's little point to having them translated, since they
4258 can be understood only by someone who can read the
4259 (English-language) source code.
4260
4261 Generate runtime-po/bison-runtime.pot automatically, so that we
4262 don't have to worry about garbage getting in that file. We'll
4263 make sure after the next official release that old msgids don't
4264 get lost. See
4265 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4266
4267 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4268 Now auto-generated.
4269 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4270 Fix typos in explanations of the runtime file.
4271 * bootstrap: Change gettext keyword from YYI18N to YY_.
4272 Use standard Makefile.in.in in runtime-po, since we'll arrange
4273 for backward-compatible bison-runtime.po files in a different way.
4274 * data/glr.c (YY_): New macro, from yacc.c.
4275 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4276 Translate messages intended for users.
4277 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4278 the wording in the other skeletons. We don't know that the memory
4279 is virtual.
4280 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4281 Use same method that yacc.c uses.
4282 Don't translate debugging messages.
4283 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4284 it doesn't work (yet), and requires C++ expertise to fix.
4285 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4286 Move defn to a more logical place, to be consistent with other
4287 skeletons.
4288 Don't translate debugging messages.
4289 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4290 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4291 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4292 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4293
4294 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4295 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4296 void, not int.
4297 * tests/glr-regression.at (Badly Collapsed GLR States):
4298 Likewise.
4299 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4300 yylex should return 0 at EOF rather than aborting.
4301
4302 Improve tests for stack overflow in GLR parser.
4303 Problem reported by twlevo@xs4all.nl.
4304 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4305 All uses removed.
4306 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4307 can handle the problem.
4308 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4309 (yyparse): New local variable yyresult to record the result.
4310 Use result of setjmp to set it, rather than storing itinto
4311 struct.
4312 (yyDone): Remove label.
4313 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4314 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4315 if YYABORT is used).
4316 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4317 yyparse status; put status > 1 into diagnostic.
4318 Check that status==2 works.
4319 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4320 Use exit status 3 for failure to open (which shouldn't happen).
4321
4322 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4323
4324 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4325 1 on syntax error; just let yyparse do its thing.
4326 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4327 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4328 (Exploding the Stack Size with Alloca):
4329 (Exploding the Stack Size with Malloc):
4330 Expect exit status 2, not 1, since the parser is supposed to blow
4331 its stack. Problem reported by twlevo@xs4all.nl.
4332
4333 * data/glr.c (yyparse): Don't assume that the initial calls
4334 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4335 Print a stack-overflow message and fail instead.
4336 Initialize the line-number information before creating the stack,
4337 so that the stack-overflow message can report line zero safely.
4338
4339 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4340
4341 Fix problems reported by twlevo@xs4all.nl.
4342 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4343 (yyuserMerge): Provide a default case if b4_mergers is empty.
4344 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4345 * tests/glr-regression.at
4346 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4347 Add casts to pacify C++ compilers.
4348 * tests/glr-regression.at (Improper merging of GLR delayed action
4349 sets): Declare yylex before using it.
4350 * tests/Makefile.am (maintainer-check-g++): Fix a stray
4351 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4352 test for valgrind; valgrind is independent of g++.
4353 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4354 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4355 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4356 Use a destructor, so that we can expand the stack. Change
4357 YYSTYPE to char * so that we can free it. Cast result of malloc.
4358
4359 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4360
4361 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4362 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4363
4364 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4365
4366 * PACKAGING: New file, suggested by Bruno Haible and taken from
4367 similar wording in gettext's PACKAGING file.
4368 * NEWS: Mention PACKAGING.
4369 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4370
4371 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4372
4373 * NEWS: Document recent i18n improvements.
4374 * bootstrap: Get runtime translations into runtime-po.
4375 Create runtime-po files automatically, if possible.
4376 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4377 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4378 does not infringe on the user's name space.
4379 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4380 * doc/bison.texinfo (Internationalization): Revamp the English
4381 and Texinfo syntax a bit, to try to make it clearer.
4382 (Bison Options, Option Cross Key): Mention --print-localedir.
4383 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4384 YYENABLE_NLS. Quote a bit more.
4385 * runtime-po/.cvsignore: New file.
4386 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4387 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4388 * runtime-po/quot.sed: Likewise.
4389 * runtime-po/boldquot.sed: Likewise.
4390 * runtime-po/en@quot.header: Likewise.
4391 * runtime-po/en@boldquot.header: Likewise.
4392 * runtime-po/insert-header.sin: Likewise.
4393 * runtime-po/remove-potcdate.sin: Likewise.
4394 * runtime-po/Makevars: Likewise.
4395 * runtime-po/LINGUAS: Likewise.
4396 * runtime-po/de.po: Likewise; we will rely on the translation project
4397 to maintain this, so "bootstrap" should get it.
4398 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
4399 its value.
4400 * src/main.c (main): Bind the bison-runtime domain, too.
4401
4402 2005-07-12 Bruno Haible <bruno@clisp.org>
4403
4404 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4405 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4406 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4407 * runtime-po: New directory.
4408 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4409 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4410 * runtime-po/Rules-quot: New file, copied from po/.
4411 * runtime-po/quot.sed: Likewise.
4412 * runtime-po/boldquot.sed: Likewise.
4413 * runtime-po/en@quot.header: Likewise.
4414 * runtime-po/en@boldquot.header: Likewise.
4415 * runtime-po/insert-header.sin: Likewise.
4416 * runtime-po/remove-potcdate.sin: Likewise.
4417 * runtime-po/Makevars: New file.
4418 * runtime-po/POTFILES.in: New file.
4419 * runtime-po/LINGUAS: New file.
4420 * runtime-po/bison-runtime.pot: New file.
4421 * runtime-po/de.po: New file.
4422 * m4/bison.m4: New file.
4423 * Makefile.am (SUBDIRS): Add runtime-po.
4424 (aclocaldir, aclocal_DATA): New variables.
4425 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4426 Define aclocaldir.
4427 * src/getargs.c (usage): Document --print-localedir option.
4428 (PRINT_LOCALEDIR_OPTION): New enum item.
4429 (long_options): Add --print-localedir option.
4430 (getargs): Handle --print-localedir option.
4431 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4432 (Internationalization): New section.
4433
4434 2005-07-12 Akim Demaille <akim@epita.fr>
4435
4436 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4437 for consistency with the rest of the code.
4438 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4439 Add separators.
4440
4441 2005-07-12 Akim Demaille <akim@epita.fr>
4442
4443 * src/parse-gram.y: Use %printer instead of YYPRINT.
4444
4445 2005-07-12 Akim Demaille <akim@epita.fr>
4446
4447 * src/symtab.h, src/symtab.c (symbol_print): New.
4448 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4449 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4450
4451 2005-07-12 Akim Demaille <akim@epita.fr>
4452
4453 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4454 b4_at_dollar and b4_dollar_dollar.
4455
4456 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4457
4458 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4459 and Pennello's paper.
4460
4461 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4462
4463 * data/yacc.c (yyparse): Undo previous patch. Instead,
4464 set yylsp[0] and yyvsp[0] only if the initial action
4465 sets yylloc and yylval, respectively.
4466
4467 * data/yacc.c (yyparse): In the initial action, set
4468 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4469 This avoids the use of undefined variables if the initial
4470 action does not set yylloc and/or yylval.
4471
4472 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4473
4474 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4475 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4476 Remove from CVS. These files are automatically generated.
4477 * examples/extexi: Clarify that this file is now part of Bison,
4478 not GNU M4, and that it works with any POSIX-compatible Awk.
4479 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4480 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4481 so that we also get calc++-parser.yy. Geneate it.
4482 Use $(AWK), not gawk, since any conforming Awk will do.
4483 Put comment before action, since older 'make' can't handle comment
4484 in action.
4485 $(BUILT_SOURCES): List all built sources, not just some of them.
4486 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4487 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4488 $($(calc_sources_generated)): Remove unnecessary test for existence
4489 of target. (This had a shell syntax error anyway; a stray "x".)
4490 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4491 calc++-parser.yy.
4492 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4493
4494 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4495 implied by the other modules.
4496
4497 2005-07-06 Akim Demaille <akim@epita.fr>
4498
4499 Bind examples/calc++ to the package.
4500 * examples/calc++/Makefile: Remove, replaced by...
4501 * examples/calc++/Makefile.am: ... this new file.
4502 * examples/calc++/test: Remove input.
4503 * examples/calc++/compile: Remove.
4504 * examples/Makefile.am: New.
4505 * configure.ac, Makefile.am: Adjust.
4506 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4507
4508 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4509
4510 * data/glr.c (yyFail): Drastically simplify; since the format argument
4511 never had any % directives, we can simply pass it to yyerror.
4512 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4513 be modified later, as that is the usual style in glr.c.
4514 Problems reported by Paul Hilfinger.
4515
4516 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4517 and size overflow errors.
4518 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4519 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4520 (YYSIZEMAX): New macro.
4521 (yystpcpy): New function, taken from yacc.c.
4522 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4523 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4524 so that we don't have to maintain their signatures.
4525 (yyFail): Check for buffer overflow, by using vsnprintf rather
4526 than vsprintf. Allocate a bigger buffer if possible.
4527 Report an error if buffer allocation fails.
4528 (yyStackOverflow): New function.
4529 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4530 the initialization was successful. It might fail if storage was
4531 exhausted.
4532 (yyexpandGLRStack): Add more checks for storage allocation failure.
4533 Use yyStackOverflow to report failures.
4534 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4535 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4536 Don't assume stack number fits in int.
4537 (yysplitStack): Check for storage allocation failure.
4538 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4539 can print diagnostics on storage allocation failure. All callers
4540 changed.
4541 (yyresolveValue): Use yybool for boolean.
4542 (yyreportSyntaxError): Check for size-calculation overflow.
4543 This code is taken from yacc.c.
4544 (yyparse): Check for storage allocation errors when allocating
4545 the initial stack.
4546
4547 2005-07-05 Akim Demaille <akim@epita.fr>
4548
4549 Extract calc++ from the documentation.
4550 * doc/bison.texinfo (Calc++): Add the extraction marks.
4551 * examples/extexi: New, from the aborted GNU Programming 2E.
4552 Separate the different paragraph of a file with empty lines.
4553 * examples/Makefile: Use it to extract the whole calc++ example.
4554
4555 2005-06-24 Akim Demaille <akim@epita.fr>
4556
4557 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4558 class typedefs.
4559
4560 2005-06-22 Akim Demaille <akim@epita.fr>
4561
4562 * doc/bison.texinfo (C++ Language Interface): First stab.
4563 (C++ Parsers): Remove.
4564
4565 2005-06-22 Akim Demaille <akim@epita.fr>
4566
4567 * data/lalr1.cc (yylex_): Honor %lex-param.
4568
4569 2005-06-22 Akim Demaille <akim@epita.fr>
4570
4571 Start a set of simple examples.
4572 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4573 * examples/calc++/calc++-driver.hh,
4574 * examples/calc++/calc++-parser.yy,
4575 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4576 * examples/calc++/compile, examples/calc++/test: New.
4577
4578 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4579
4580 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4581 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4582 which stems from the 2005-05-27 patch.
4583
4584 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4585
4586 * data/glr.c: Modify treatment of unused parameters to permit use
4587 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4588
4589 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4590
4591 Fix infringement on user name space reported by Janos Zoltan Szabo.
4592 * data/yacc.c (yyparse): strlen -> yystrlen.
4593
4594 2005-05-30 Akim Demaille <akim@epita.fr>
4595
4596 * data/lalr1.cc (_): New.
4597 Translate the various messages.
4598
4599 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4600
4601 Fix infringement on user name space reported by Bruno Haible.
4602 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4603 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4604 the user's name space.
4605 (alloca): Include <stdlib.h> to get it, if it's not built in.
4606 (YYMALLOC, YYFREE): Define only if needed.
4607 (malloc, free): Declare, but only if needed, as this infringes on
4608 the user name space.
4609
4610 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4611
4612 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4613 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4614 with %d format.
4615 * lib/ebitset.c (min, max): Undef before defining.
4616 * lib/vbitset.c (min, max): Likewise.
4617 * lib/subpipe.c (create_subpipe): Save local variables in case
4618 vfork clobbers them.
4619
4620 2005-05-24 Bruno Haible <bruno@clisp.org>
4621
4622 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4623 error message syntax used by gcc-4.0.
4624
4625 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4626
4627 * README: Mention m4 1.4.3. Remove obsolete advice about
4628 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4629
4630 * bootstrap: Remove workaround for problem I encountered with
4631 gettext 0.14.1; it seems to be fixed now.
4632
4633 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4634
4635 * NEWS: Version 2.0a.
4636
4637 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4638 the previous change.
4639
4640 Various maintainer cleanups.
4641 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4642 conftest*, for benefit of CVS commands run at the same time as
4643 "configure". Add build-aux, since "bootstrap" now creates it and
4644 its subfiles.
4645 * Makefile.cfg (move_if_change): Remove.
4646 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4647 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4648 (po_repo, do-po-update, po-update, wget_files, get-targets):
4649 (config.guess-url_prefix, config.sub-url_prefix):
4650 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4651 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4652 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4653 Remove.
4654 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4655 this is now the recommended name.
4656 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4657 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4658 ylwrap. These files now go into build-aux.
4659 * config/move-if-change: Remove.
4660 * config/prev-version.txt: Bump from 1.75 to 2.0.
4661
4662 * bootstrap: Add stdio-safer, unistd-safer modules.
4663 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4664 we don't need it).
4665 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4666 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4667 * lib/subpipe.c: Include "unistd-safer.h".
4668 (create_subpipe): Make sure all the newly-created
4669 file descriptors are > 2, so that diagnostics don't
4670 get sent down them (which might cause Bison to hang, in theory).
4671 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4672 * src/files.c (xfopen): Use fopen_safer, not fopen.
4673
4674 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4675 yesterday's yacc.c fix.
4676
4677 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4678
4679 * data/glr.c, data/lalr1.cc: Update copyright date.
4680
4681 Fix a destructor bug reported by Wolfgang Spraul in
4682 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4683 * data/yacc.c (yyabortlab): Don't call destructor, and
4684 don't set yychar to EMPTY.
4685 (yyoverflowlab): Don't call destructor.
4686 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4687 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4688 since we no longer output the message "discarding lookahead token
4689 end of input ()".
4690
4691 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4692
4693 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4694 fix a small glitch in debugging output.
4695 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4696 after YY_SYMBOL_PRINT where needed.
4697
4698 (struct yyGLRState): Add some comments.
4699 (struct yySemanticOption): Add some comments.
4700 (union yyGLRStackItem): Add comment.
4701
4702 (yymergeOptionSets): Correct this to properly perform the union,
4703 avoiding infinite reported by Michael Rosien.
4704 Update comment.
4705
4706 * tests/glr-regression.at: Add test for GLR merging error reported
4707 by M. Rosien.
4708
4709 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4710
4711 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4712 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4713 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4714 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4715 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4716 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4717 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4718 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4719 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4720 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4721 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4722 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4723 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4724 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4725 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4726 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4727 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4728 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4729 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4730 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4731 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4732 src/output.h, src/parse-gram.c, src/parse-gram.h,
4733 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4734 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4735 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4736 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4737 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4738 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4739 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4740 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4741 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4742 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4743 tests/reduce.at, tests/regression.at, tests/sets.at,
4744 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4745 Update FSF postal mail address.
4746
4747 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4748
4749 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4750 Problem reported by Ralf Menzel.
4751
4752 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4753
4754 * tests/actions.at: Test that stack overflow invokes destructors.
4755 From Marcus Holland-Moritz.
4756 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4757 from here....
4758 (yyreturn): to here. That way, destructors are called properly
4759 even if the stack overflows, or the user calls YYACCEPT or
4760 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4761 (yyoverflowlab): Destroy the lookahead.
4762
4763 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4764
4765 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4766
4767 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4768
4769 * NEWS: Bison-generated C parsers no longer quote literal strings
4770 associated with tokens.
4771 * src/output.c (prepare_symbols): Don't escape strings,
4772 since users don't want to see C escapes.
4773 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4774 in diagnostics.
4775 * tests/input.at (Torturing the Scanner): Likewise.
4776 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4777
4778 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4779
4780 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4781 the data size is known to be too small and we can't increase it.
4782 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4783
4784 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4785
4786 * src/parse-gram.y: Include quotearg.h.
4787 (string_as_id): Quote $1 before using it as a key, since the
4788 lexer no longer quotes it for us.
4789 (string_content): Don't strip quotes, since lexer no longer
4790 quotes it for us.
4791 * src/scan-gram.l: Include quotearg.h.
4792 ("\""): Omit quote.
4793 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4794 a key, since the rest of the lexer doesn't quote it.
4795 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4796 * tests/regression.at (Token definitions): Check for backslashes
4797 in token strings.
4798
4799 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4800 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4801 (yyparse): Revamp code to generate long syntax error message, to
4802 make it easier to translate, and to avoid problems with arithmetic
4803 overflow. Change "virtual memory" to "memory" in diagnostic, since
4804 we don't know whether the memory is virtual.
4805
4806 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4807
4808 * NEWS: Bison-generated C parsers now use the _ macro to
4809 translate strings.
4810 * data/yacc.c (_) [!defined _]: New macro.
4811 All English strings wrapped inside this macro.
4812 * doc/bison.texinfo (Bison Parser): Document _.
4813 * po/POTFILES.in: Include src/parse-gram.c, since it now
4814 includes translateable strings that parse-gram.y doesn't.
4815
4816 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4817
4818 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4819 reverting the 2004-10-11 change to this function.
4820 (symbol_check_alias_consistency): Don't call symbol_type_set
4821 if the type name is already correct.
4822 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4823
4824 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4825
4826 * tests/regression.at (Token definitions): Don't use a token named
4827 c, as that generates a "#define c ..." that runs afoul of buggy
4828 stdlib.h that uses the identifier c as a member of struct
4829 drand48_data. Problem reported by Horst Wente.
4830
4831 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4832
4833 * bootstrap: Change translation URL from
4834 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4835 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4836 redirection glitches. Problem reported by twlevo@xs4all.nl.
4837
4838 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4839
4840 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4841 after operands; POSIX says this isn't portable for the c99 command.
4842
4843 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4844
4845 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4846 immediately if a data overrun has occurred; this may help us track
4847 down what may be a spurious failure on MacOS.
4848
4849 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4850
4851 Respond to problems reported by twlevo@xs4all.nl.
4852
4853 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4854
4855 * src/vcg.h: Comment fix.
4856 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4857 (G_CMAX): Change to -1 instead of INT_MAX.
4858
4859 * data/yacc.c (yyparse): Omit spaces before #line.
4860
4861 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4862
4863 * src/tables.c (state_number_to_vector_number): Put it inside an
4864 "#if 0", since it's not currently used. Problem reported by
4865 Roland McGrath.
4866
4867 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4868
4869 * src/output.c (escaped_output): Renamed from
4870 escaped_file_name_output, since we now use it for symbol tags as
4871 well. All uses changed.
4872 (symbol_destructors_output, symbol_printers_output):
4873 Escape symbol tags too.
4874 Problem reported by Matyas Forstner in
4875 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4876
4877 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4878 not needed.
4879 * src/output.c (user_actions_output, token_definitions_output,
4880 symbol_destructors_output, symbol_printers_output): Likewise.
4881 * src/reader.c (prologue_augment): Likewise.
4882 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4883
4884 * src/vcg.c (output_edge): Don't quote linestyle arg.
4885 Problem reported by twlevo@xs4all.nl.
4886
4887 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4888
4889 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4890 example, reported by Derek M Jones. Also, make the example even
4891 more outrageous, to better illustrate how bad the problem is.
4892
4893 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4894
4895 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4896 putsym. Typo reported by Sebastian Piping.
4897
4898 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4899
4900 * doc/bison.texinfo (Language and Grammar): some -> same
4901 (Epilogue): int he -> in the
4902 Typos reported by Sebastian Piping via Justin Pence.
4903
4904 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4905
4906 * tests/glr-regression.at (Improper handling of embedded actions
4907 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4908 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4909 with dollar signs in test names.
4910 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4911 for a similar reason.
4912
4913 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4914
4915 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4916 wants to redefine G_VIEW.
4917
4918 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4919
4920 * src/vcg.c (get_view_str): Remove case for normal_view.
4921 Problem reported by twlevo@xs4all.nl.
4922
4923 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4924
4925 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4926 Problem reported by twlevo@xs4all.nl.
4927
4928 * doc/bison.texinfo: Change @dircategory from "GNU programming
4929 tools" to "Software development". Requested by Richard Stallman
4930 via Karl Berry.
4931
4932 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4933
4934 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4935 Problem reported by twlevo@xs4all.nl.
4936
4937 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4938
4939 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4940 keyword; it's not needed with modern compilers, and it doesn't
4941 affect correctness with older compilers. Suggested by
4942 twlevo@xs4all.nl.
4943
4944 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4945
4946 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4947 gcc -Wswitch-default.
4948 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4949 * data/yacc.c (yyparse): Likewise.
4950
4951 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4952
4953 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4954 already. Let config.h define any nonstandard values.
4955
4956 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4957
4958 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4959 for the benefit of slower hosts. Problem reported by
4960 Nelson H. F. Beebe.
4961
4962 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4963
4964 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4965 being defined and not used.
4966 * data/lalr1.cc (yyparse): Likewise.
4967 Use "if (false)" rather than "if (0)".
4968
4969 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4970
4971 * TODO: Mention that we should allow NUL bytes in tokens.
4972
4973 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4974
4975 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4976 Problem reported by Hans Aberg.
4977
4978 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4979
4980 * src/getargs.c (version): Happy new year; update overall
4981 program copyright date from 2004 to 2005.
4982
4983 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4984 Problem reported by Hans Aberg.
4985 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4986 (Output file names.): Add a test for the case when standard output
4987 is closed.
4988
4989 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4990
4991 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4992 to fix an oversight in the Bison 2.0 manual.
4993
4994 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4995
4996 * NEWS: Version 2.0. Reformat the existing news items since
4997 1.875, so that related items are grouped together.
4998 * configure.ac (AC_INIT): Bump version to 2.0.
4999 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
5000
5001 * tests/torture.at (Exploding the Stack Size with Alloca): Set
5002 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
5003 otherwise, we're not testing alloca. Unfortunately there's no
5004 simple way to consult HAVE_ALLOCA here.
5005
5006 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
5007 for yymsg, too.
5008
5009 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
5010 hand. This avoids a warning about comparing int to size_t when
5011 GCC warnings are enabled.
5012
5013 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
5014
5015 * NEWS: Bison-generated parsers no longer default to using the
5016 alloca function (when available) to extend the parser stack, due
5017 to widespread problems in unchecked stack-overflow detection.
5018 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
5019 responsibility to set it to a positive value. This lets the user
5020 specify a value that is not a preprocessor constant.
5021 * data/yacc.c (YYMAXDEPTH): Likewise.
5022 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
5023 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
5024 to be a compile-time constant. However, explain the constraints on it.
5025 Also, explain the constraints on YYINITDEPTH.
5026 (Table of Symbols): Explain that alloca is no longer the default.
5027 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
5028 to 1.
5029
5030 * doc/bison.texinfo (Location Default Action): Mention that n must
5031 be zero when k is zero. Suggested by Frank Heckenbach.
5032
5033 2004-12-22 Akim Demaille <akim@epita.fr>
5034
5035 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
5036 (parser::state_type, parser::semantic_type, parser::location_type):
5037 Private, not public.
5038 (parser::parse): Return ints, not bool.
5039 Returning a bool introduces a problem: 0 corresponds to false, and
5040 it seems weird to return false on success. Returning true changes
5041 the conventions for yyparse.
5042 Alternatively we could return void and send an exception.
5043 There is no clear consensus (yet?).
5044 (state_stack, semantic_stack, location_stack): Rename as...
5045 (state_stack_type, semantic_stack_type, location_stack_type): these.
5046 Private, not public.
5047 * tests/c++.at: New.
5048 * tests/testsuite.at, tests/Makefile.am: Adjust.
5049
5050 2004-12-21 Akim Demaille <akim@epita.fr>
5051
5052 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
5053
5054 2004-12-21 Akim Demaille <akim@epita.fr>
5055
5056 Don't impose std::string for filenames.
5057
5058 * data/lalr1.cc (b4_filename_type): New.
5059 (position::filename): Use it.
5060 (parser.hh): Move the inclusion of stack.hh and location.hh below
5061 the user code, so that needed headers for the filename type can be
5062 included first.
5063 Forward declare them before the user code.
5064 * tests/Makefile.am (check-local, installcheck-local): Pass
5065 TESTSUITEFLAGS to the TESTSUITE.
5066
5067 2004-12-20 Akim Demaille <akim@epita.fr>
5068
5069 Use more STL like names: my_class instead of MyClass.
5070
5071 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
5072 (SemanticStack, SemanticType, StateStack, StateType)
5073 (TokenNumberType, Stack, Slice, Traits, Parser::location)
5074 (Parser::value): Rename as...
5075 (location_stack, location_type, rhs_number_type, semantic_stack)
5076 (semantic_type, state_stack, state_type, token_number_type, stack)
5077 (slice, traits, parser::yylloc, parser::yylval): these.
5078
5079 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
5080
5081 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
5082
5083 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
5084 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5085
5086 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
5087
5088 Remove uses of 'short int' and 'unsigned short int'. This raises
5089 some arbitrary limits. It uses more memory but nowadays that's
5090 not much of an issue.
5091
5092 This change does not affect the generated parsers; that's a different
5093 task, as some users will want to conserve memory there.
5094
5095 Ideally we should use size_t to represent all object counts, and
5096 something like ptrdiff_t to represent signed differences of object
5097 counts; but that will require more code-cleanup than I have the
5098 time to do right now.
5099
5100 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
5101 Use size_t, not int or short int, to count objects.
5102 * src/closure.c (nritemset, closure): Likewise.
5103 * src/closure.h (nritemset, closure): Likewise.
5104 * src/nullable.c (nullable_compute): Likewise.
5105 * src/print.c (print_core): Likewise.
5106 * src/print_graph.c (print_core): Likewise.
5107 * src/state.c (state_compare, state_hash): Likewise.
5108 * src/state.h (struct state): Likewise.
5109 * src/tables.c (default_goto, goto_actions): Likewise.
5110
5111 * src/gram.h (rule_number, rule): Use int, not short int.
5112 * src/output.c (prepare_rules): Likewise.
5113 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
5114 errs, reductions): Likewise.
5115 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
5116 Likewise.
5117 * src/tables.c (vector_number, tally, action_number,
5118 ACTION_NUMBER_MINIMUM): Likewise.
5119 * src/output.c (muscle_insert_short_int_table): Remove.
5120
5121 2004-12-17 Akim Demaille <akim@epita.fr>
5122
5123 * data/lalr1.cc: Extensive Doxygenation.
5124 (error_): Rename as...
5125 (error): this, since it is visible to the user.
5126 Adjust callers.
5127 (Parser::message): Now an automatic variable from...
5128 (Parser::yyreport_syntax_error_): here.
5129 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
5130 Parser::error.
5131 * tests/input.at: Escape $.
5132
5133 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
5134
5135 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
5136 Parenthesize rhs to avoid obscure problems with mistakes like
5137 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
5138 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5139 b4_rhs_location): Likewise.
5140 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5141 b4_rhs_location): Likewise.
5142
5143 2004-12-16 Akim Demaille <akim@epita.fr>
5144
5145 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
5146 yacc.c: be sure to stay within yycheck_.
5147 * tests/actions.at: Re-enable C++ tests.
5148
5149 2004-12-16 Akim Demaille <akim@epita.fr>
5150
5151 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
5152 real.
5153
5154 2004-12-16 Akim Demaille <akim@epita.fr>
5155
5156 Use #define to handle the %name-prefix.
5157
5158 * data/glr.c, data/yacc.c: Comment changes.
5159 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
5160 so that one can refer to yylex in the parser file, and have it
5161 renamed, as is the case with other skeletons.
5162
5163 2004-12-16 Akim Demaille <akim@epita.fr>
5164
5165 Move lalr1.cc internals into yy*.
5166
5167 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
5168 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
5169 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
5170 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
5171 (empty_, final_, terror_, errcode_, ntokens_)
5172 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
5173 (looka_, ilooka_, error_range_, nerrs_):
5174 Rename as...
5175 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
5176 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
5177 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
5178 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
5179 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
5180 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
5181 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
5182 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
5183 these.
5184
5185 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
5186
5187 Fix some problems reported by twlevo at xs4all.
5188 * src/symtab.c (symbol_new): Report an error if the input grammar
5189 contains too many symbols. This is better than calling abort() later.
5190 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
5191 (struct node, struct graph):
5192 Rename member expand to stretch. All uses changed.
5193 (struct graph): Remove member layoutalgorithm. All uses removed.
5194 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
5195 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
5196 All uses changed.
5197 (N_STRETCH): Rename from N_EXPAND. All uses changed.
5198
5199 2004-12-15 Akim Demaille <akim@epita.fr>
5200
5201 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
5202 Add more Doxygen comments.
5203 (symprint_, stack_print_, reduce_print_, destruct_, pop)
5204 (report_syntax_error_, translate_): Rename as...
5205 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
5206 (yypop_, yyreport_syntax_error_, yytranslate_): this.
5207
5208 2004-12-15 Akim Demaille <akim@epita.fr>
5209
5210 * data/lalr1.cc (lex_): Rename as...
5211 (yylex_): this.
5212 Move the trace here.
5213 Take the %name-prefix into account.
5214 Reported by Alexandre Duret-Lutz.
5215
5216 2004-12-15 Akim Demaille <akim@epita.fr>
5217
5218 Simplify the C++ parser constructor.
5219
5220 * data/lalr1.cc (debug_): Rename as...
5221 (yydebug_): so that the parser's internals are always in the yy*
5222 pseudo namespace.
5223 Adjust uses.
5224 (b4_parse_param_decl): Remove the leading comma as it is now only
5225 called as unique argument list.
5226 (Parser::Parser): Remove the constructor accepting a location and
5227 an initial debugging level.
5228 Remove from the other ctor the argument for the debugging level.
5229 (debug_level_type, debug_level, set_debug_level): New.
5230
5231 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5232 constructor calls.
5233
5234 2004-12-15 Akim Demaille <akim@epita.fr>
5235
5236 Remove b4_root related material: failure experiment
5237 (which goal was to allow to derive from a class).
5238
5239 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5240 definitions and uses.
5241
5242 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5243
5244 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5245 not 2, since it's not portable to subtract 1 from the start of an
5246 array. The new item 0 is never set or used. All uses changed.
5247
5248 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5249 the default definition of YYLLOC_DEFAULT. Problem reported
5250 by Frank Heckenbach.
5251
5252 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5253
5254 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5255 the normal case and one for the error case. Just use the
5256 first one uniformly. Problem reported by Frank Heckenbach.
5257 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5258 use exactly the same macro in both places.
5259 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5260 so that the normal-case YYRHSLOC works for the error case too.
5261 All uses changed.
5262 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5263 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5264 * doc/bison.texinfo (Location Default Action): Don't claim that
5265 we have an array of locations. Use the same macro for both glr
5266 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5267 the index is 0.
5268
5269 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5270
5271 * HACKING: Update email addresses to send announcements to.
5272
5273 * configure.ac (AC_INIT): Bump version to 1.875f.
5274
5275 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5276
5277 * NEWS: Version 1.875e.
5278 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5279
5280 * src/scan-skel.l: Include "complain.h", for "fatal".
5281
5282 * src/relation.h (relation_print, relation_digraph):
5283 Relation sizes are of type relation_node, not size_t (this is
5284 merely a doc fix, since the two types are equivalent).
5285 (relation_transpose): Relation sizes are of type relation_node,
5286 not int.
5287 * src/relation.c: Likewise.
5288 (top, infinity): Now of type relation_node, not int.
5289 (traverse, relation_transpose): Use relation_node, not int.
5290
5291 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5292 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5293 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5294
5295 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
5296 specifying whether the test should be skipped. Use it tp
5297 specify that the [%defines %skeleton "lalr1.cc"] tests currently
5298 fail on some hosts, and should be skipped.
5299
5300 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5301
5302 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5303 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5304 unless otherwise specified below.
5305
5306 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5307 to allocate kernel_base, kernel_items, kernel_size, since
5308 they needn't be initialized to 0.
5309 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5310 * src/closure.c (new_closure): Likewise, for itemset.
5311 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5312 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5313 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5314 (build_relations): Likewise for edge, states1, includes.
5315 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5316 * src/reader.c (packgram): Likewise, for ritem, rules.
5317 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5318 * src/relation.c (relation_digraph): Likewise for VERTICES.
5319 (relation_transpose): Likewise for new_R, end_R.
5320 * src/symtab.c (symbols_token_translations_init): Likewise for
5321 token_translations.
5322 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5323 (token_actions): Likewise for yydefact, actrow, conflrow,
5324 conflict_list.
5325 (save_column): Likewise for froms[symno], tos[symno].
5326 (goto_actions): Likewise for state_count.
5327 (pack_table): Likewise for base, pos, check.
5328 (tables_generate): Likewise for width.
5329
5330 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5331 for initial core. Just have a separate core, so we needn't worry
5332 about whether kernel_size and kernel_base are initialized.
5333
5334 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5335 kernel_size, kernel_items): Remove unnecessary initialization.
5336 * src/conflicts.c (conflicts): Likewise.
5337 * src/derives.c (derives): Likewise.
5338 * src/muscle_tablc (muscle_insert): Likewise.
5339 * src/relation.c (relation_digraph): Likewise.
5340 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5341 conflrow, conflict_table, conflict_list, table, check):
5342 Likewise.
5343
5344 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5345 This is because all callers pass unsigned int.
5346 * src/closure.h (new_closure): Likewise.
5347
5348 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5349 (build_relations): Initialize includes[i] in all cases.
5350 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5351 and rules[ruleno].precsym. Initialize members in order.
5352 * src/relation.c (relation_transpose): Always initialize new_R[i]
5353 and end_R[i].
5354 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5355
5356 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5357 conflict_list[0] was always 0, but now it isn't initialized.
5358
5359 * src/table.c (table_grow): When conflict_table grew, the grown
5360 area wasn't cleared. Fix this.
5361
5362 * lib/.cvsignore: Add strdup.c, strdup.h.
5363 * m4/.cvsignore: Add strdup.m4.
5364
5365 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5366
5367 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5368 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5369 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5370 ngotos + 1 without checking for overflow.
5371 (build_relations): Use END_NODE, not -1, to denote end of edges.
5372 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5373 build_relations): Use goto_number, not int, for goto numbers.
5374 * src/tables.c (save_column, default_goto): Likewise.
5375
5376 2004-11-23 Akim Demaille <akim@epita.fr>
5377
5378 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5379 of #defining from yystype.
5380 Don't typedef yystype, C++ does not need it.
5381 This lets it possible to forward declare it as union.
5382
5383 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5384
5385 * bootstrap (gnulib_modules): Add extensions.
5386 Problem reported by Jim Meyering.
5387
5388 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5389
5390 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5391 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5392 src/system.h, src/tables.c: XFREE -> free, to accommodate
5393 recent change to gnulib xalloc.h.
5394 Problem reported by Jim Meyering.
5395
5396 2004-11-17 Akim Demaille <akim@epita.fr>
5397
5398 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5399
5400 2004-11-17 Akim Demaille <akim@epita.fr>,
5401 Alexandre Duret-Lutz <adl@gnu.org>
5402
5403 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5404 changes.
5405 (YYCDEBUG): Adjust.
5406 Use it instead of cdebug_.
5407 (Parser::debug_stream, Parser::set_debug_stream): New.
5408 (Parser::symprint_): Define cdebug_ for temporary backward
5409 compatibility.
5410 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5411 debug_stream ().
5412
5413 2004-11-17 Akim Demaille <akim@epita.fr>
5414
5415 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5416 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5417 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5418 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5419
5420 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5421
5422 * data/glr.c (yyloc_default): Remove; not used.
5423 Problem reported by Frank Heckenbach.
5424
5425 2004-10-25 Akim Demaille <akim@epita.fr>
5426
5427 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5428 Introduce another definition to address simple location arrays.
5429 (yyGLRStack): New member: yyerror_range.
5430 (yyrecoverSyntaxError, yyparse): Update it.
5431 (yyrecoverSyntaxError): Use it when shifting the error token to
5432 have an accurate range, equivalent to the one computed by both
5433 yacc.c and lalr1.cc.
5434 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5435 that column numbers start at column 0, as per GNU Coding
5436 Standards, the others tests, and the doc.
5437 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5438 Adjust to the above change (first column is 0).
5439 And adjust the location of the "<error>", now covering the whole
5440 line.
5441
5442 2004-10-22 Akim Demaille <akim@epita.fr>
5443 and Paul Eggert <eggert@cs.ucla.edu>
5444
5445 Remove some arbitrary limits on goto numbers and relations.
5446 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5447 initial values, since they're never used.
5448 (set_goto_map): ngotos is now unsigned, so test for overflow
5449 by seeing whether it wraps around to zero.
5450 * src/lalr.h (goto_number): Now size_t, not short int.
5451 (GOTO_NUMBER_MAXIMUM): Remove.
5452 * src/relation.c (relation_print, traverse, relation_transpose):
5453 Check for END_NODE rather than looking at sign.
5454 * src/relation.h (END_NODE): New macro.
5455 (relation_node): Now size_t, not short int.
5456
5457 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5458
5459 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5460 keyword, not an identifier. Problem reported by Baron Schwartz in
5461 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5462
5463 2004-10-11 Akim Demaille <akim@epita.fr>
5464
5465 * src/symtab.c (symbol_check_alias_consistency): Also check
5466 type names, destructors, and printers.
5467 Reported by Alexandre Duret-Lutz.
5468 Recode the handling of associativity and precedence in terms
5469 of symbol_precedence_set.
5470 Accept no redeclaration at all, not even equal to the previous
5471 value.
5472 (redeclaration): New.
5473 Use it to factor redeclaration complaints.
5474 (symbol_make_alias): Don't set the type of the alias, let
5475 symbol_check_alias_consistency do it as for other features.
5476 * src/symtab.h (symbol): Add new member prec_location, and
5477 type_location.
5478 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5479 * tests/input.at (Incompatible Aliases): New.
5480
5481 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5482
5483 .cvsignore fixes to accommodate gnulib changes,
5484 and the practice of naming build directories "_build".
5485 * .cvsignore: Add "_*". Sort.
5486 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5487 * m4/.cvsignore: Add "*_gl.m4".
5488
5489 2004-10-06 Akim Demaille <akim@epita.fr>
5490
5491 * src/parse-gram.y (add_param): Fix the truncation of trailing
5492 spaces.
5493
5494 2004-10-05 Akim Demaille <akim@epita.fr>
5495
5496 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5497 whether the reducion was empty or not. This leaves room to
5498 improve the use of YYLLOC_DEFAULT in such a case.
5499 lalr1.cc is still experimental, so changing this is acceptable.
5500 And finally, there are probably not many users who changed the
5501 handling of locations in GLR, so changing is admissible too.
5502
5503 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5504 empty reduction, set @$ to an empty location ending the previously
5505 stacked symbol.
5506 Adjust uses to make sure the code is triggered on empty
5507 reductions.
5508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5509 expected output: empty reductions have empty locations.
5510
5511 2004-09-29 Akim Demaille <akim@epita.fr>
5512
5513 * data/lalr1.cc: Move towards a more standard C++ coding style
5514 for templates: Class < T > -> Class<T>.
5515
5516 2004-09-29 Akim Demaille <akim@epita.fr>
5517
5518 * data/lalr1.cc: Reinstall the former ctor, for sake of
5519 compatibility, but warn it will be removed.
5520 Move towards a more standard C++ coding style (i.e., type *var ->
5521 type* var).
5522
5523 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5524
5525 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5526 since it's less likely to work if NULs are involved in the future.
5527
5528 2004-09-27 Akim Demaille <akim@epita.fr>
5529
5530 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5531
5532 2004-09-27 Akim Demaille <akim@epita.fr>
5533
5534 * data/lalr1.cc (b4_parse_param_decl_1): New.
5535 (b4_parse_param_decl): Use it to have different names between attribute
5536 and argument names.
5537 (b4_cc_constructor_call): Likewise.
5538
5539 2004-09-24 Akim Demaille <akim@epita.fr>
5540
5541 * src/parse-gram.y (add_param): Strip the leading and trailing
5542 blanks from a formal argument declaration.
5543 (YY_LOCATION_PRINT): New.
5544
5545 2004-09-24 Akim Demaille <akim@epita.fr>
5546
5547 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5548 after the location.
5549
5550 2004-09-24 Akim Demaille <akim@epita.fr>
5551
5552 * doc/bison.texinfo (Table of Symbols): Sort.
5553
5554 2004-09-21 Akim Demaille <akim@epita.fr>
5555
5556 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5557 the useless parentheses.
5558 Suggested by Paul Eggert.
5559
5560 2004-09-20 Akim Demaille <akim@epita.fr>
5561
5562 Let the initial-action act on the look-ahead, and use it for the
5563 "initial push" (corresponding to an hypothetical beginning-of-file).
5564 And let lalr1.cc honor %initial-action.
5565
5566 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5567 example.
5568 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5569 (Parser::Parser): Remove the ctor that used to initialize it.
5570 (Parser::parse): Like in the other skeletons, issue the "starting
5571 parse" message before any action.
5572 Honor %initial-action.
5573 Initialize the stacks with the lookahead.
5574 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5575 look-ahead.
5576 Push them in the stacks.
5577 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5578
5579 2004-09-20 Akim Demaille <akim@epita.fr>
5580
5581 * doc/bison.texinfo (Initial Action Decl): New.
5582
5583 2004-09-20 Akim Demaille <akim@epita.fr>
5584
5585 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5586 clearer criterion to define it.
5587 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5588 When reducing on an empty RHS, use the latest stacked location as
5589 location.
5590 yylloc is not always available.
5591 * data/glr.c: Likewise.
5592 Also, honor initial-actions.
5593
5594 2004-09-20 Akim Demaille <akim@epita.fr>
5595
5596 * data/yacc.c (YY_LOCATION_PRINT): New.
5597 Define when we know YYLTYPE's structure, i.e., when the default
5598 YYLLOC_DEFAULT is used.
5599 * data/c.m4 (b4_yysymprint_generate): Use it.
5600 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5601 value of the result.
5602 (error_start_): Replace with...
5603 (error_range_): this location array.
5604 This allows to replace code relying on the implementation of
5605 locations by portable code.
5606 * data/yacc.c (yylerrsp): Replace with...
5607 (yyerror_range): this.
5608 Every time a token is popped, update yyerror_range[0], to have an
5609 accurate location for the error token.
5610 * data/glr.c (YY_LOCATION_PRINT): New.
5611 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5612 deference a pointer.
5613 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5614 report the location in %printers.
5615
5616 * src/scan-skel.l: Instead of abort, report error messages to ease
5617 understanding skeleton scanning failures.
5618
5619 2004-09-16 Akim Demaille <akim@epita.fr>
5620
5621 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5622 (iterator, const_iterator): these, to be more in the C++ spirit.
5623 Also, return reverse iterators so that when displaying the stack
5624 we display its bottom first.
5625 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5626 from yacc.c.
5627 We should probably use vector here though.
5628
5629 2004-09-16 Akim Demaille <akim@epita.fr>
5630
5631 Have more complete shift traces.
5632
5633 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5634 to report Shifts instead of ad hoc YYDPRINTF invocations,
5635 including for the error token.
5636 * data/lalr1.cc (symprint_): Output the location.
5637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5638 output the location within the %printer.
5639 Activate GLR tests, at least to make sure they compile properly.
5640 They still don't pass though.
5641 * tests/calc.at: Adjust expect verbose output, since now "Entering
5642 state..." is on a different line than the "Shifting" message.
5643
5644 2004-09-08 Akim Demaille <akim@epita.fr>
5645
5646 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5647 Bison directive from the Bison file to the invocation of this
5648 macro, so that these directives are passed to
5649 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5650 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5651 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5652 the extra Bison directives instead of the whole series.
5653 Change the grammar so that there are recoverable errors, and
5654 unrecoverable errors. Now we can have the parser give up before
5655 consuming the whole input. As a result we now can observe that
5656 the lookahead is freed when needed.
5657 Change the parser source to parse argv[1] instead of a hard coded
5658 string.
5659 Simplify yylex, and give a value and location to EOF.
5660 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5661 passed directives already coded in the file.
5662 Add some tests to check the location of "error".
5663 For some tests, the C++ parser is correct, and not yacc.c.
5664 For other tests, they provide different, but unsatisfying, values,
5665 so keep the C++ value so that at least one parser is "correct"
5666 according to the test suite.
5667 (Actions after errors): Remove, this is subsumed by the
5668 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5669
5670 2004-09-06 Akim Demaille <akim@epita.fr>
5671
5672 * data/lalr1.cc: Adjust the indentation of the labels.
5673 (Parser::pop): New.
5674 Use it.
5675
5676 2004-09-06 Akim Demaille <akim@epita.fr>
5677
5678 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5679 argument, an informative message.
5680 Call YY_SYMBOL_PRINT.
5681 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5682 * data/lalr1.cc (destruct_): Likewise.
5683 In addition, no longer depend on b4_yysymprint_generate and
5684 b4_yydestruct_generate to generate these functions, do it "by
5685 hand".
5686
5687 2004-09-03 Akim Demaille <akim@epita.fr>
5688
5689 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5690 invoked, yydestruct the lookahead.
5691 * tests/calc.at (Calculator $1): Update the expected lengths of
5692 traces: there is an added line for the discarded lookahead.
5693 * doc/bison.texinfo (Destructor Decl): Some rewording.
5694 Define "discarded" symbols.
5695
5696 2004-09-02 Akim Demaille <akim@epita.fr>
5697
5698 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5699
5700 2004-09-02 Akim Demaille <akim@epita.fr>
5701
5702 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5703 (YYDSYMPRINTF): Rename as...
5704 (YY_SYMBOL_PRINT): this.
5705 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5706 two.
5707 Use it instead of direct symprint_ calls.
5708 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5709 one.
5710
5711 2004-09-02 Akim Demaille <akim@epita.fr>
5712
5713 * data/lalr1.cc (b4_yysymprint_generate): New.
5714 (symprint_): New member function, defined when YYDEBUG.
5715 Use it consistently instead of token/nterm debugging output by
5716 hand.
5717 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5718 %printer calls to use cdebug_ when using lalr1.cc.
5719
5720 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5721
5722 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5723 with #ifdef YYDEBUG.
5724
5725 2004-08-26 Akim Demaille <akim@epita.fr>
5726
5727 * doc/bison.texinfo (Implementing Loops): Rename as...
5728 (Implementing Gotos/Loops): this.
5729
5730 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5731
5732 Adjust to latest gnulib.
5733 * bootstrap (gnulib_modules): Add xalloc-die.
5734 Set LC_ALL=C so that file names sort consistently.
5735 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5736 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5737 uintmax_t.m4, ulonglong.m4.
5738 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5739 po.m4 since we are now using _gl.m4 instead.
5740
5741 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5742
5743 * src/scan-action.l: Remove. Scanning of semantic actions is
5744 handled in scan-gram.l.
5745
5746 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5747
5748 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5749
5750 * src/location.h (struct): The file member is a uniqstr.
5751 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5752
5753 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5754
5755 Fix bug with non-%union parsers that have printers or destructors,
5756 which led to a Bison core dump. Reported by Peter Fales in
5757 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5758
5759 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5760 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5761 not to our own type.
5762 * src/output.c (symbol_destructors_output, symbol_printers_output):
5763 Don't assume %union.
5764 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5765 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5766 UNION-FLAG. All callers changed.
5767 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5768 Use type char, not unsigned int, when declaring an array of char;
5769 this lets us remove a cast.
5770 (Printers and Destructors): Add non-%union test cases.
5771
5772 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5773
5774 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5775 GLR writeups. E.g., avoid frenchspacing and the future tense,
5776 change "lookahead" to "look-ahead", and change "wrt" to "with
5777 respect to".
5778
5779 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5780
5781 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5782 New sections, split off from the GLR Parsers section. Put the new
5783 Simple GLR Parser near the start of the GLR section, for clarity.
5784 Rewrite connective text.
5785
5786 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5787
5788 * doc/bison.texinfo (Simple GLR Parsers): New section.
5789
5790 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5791
5792 * NEWS, TODO, doc/bison.texinfo:
5793 Use "look-ahead" instead of "lookahead", to be consistent.
5794 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5795 while we're fixing "look-ahead".
5796 * src/conflicts.c (shift_set): Renamed from shiftset.
5797 (look_ahead_set): Renamed from lookaheadset.
5798 * src/print.c: Likewise.
5799 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5800 name for "lookahead".
5801 (report_types, usage): Likewise.
5802 * src/getargs.h (report_look_ahead_tokens): Renamed from
5803 report_lookaheads.
5804 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5805 compute_lookaheads.
5806 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5807 (look_ahead_tokens_print): Renamed from lookaheads_print.
5808 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5809 state_rule_lookaheads_print.
5810 * src/state.h: Likewise.
5811 (reductions.look_ahead_tokens): Renamed from lookaheads.
5812 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5813 AT_DATA_LOOKAHEADS_GRAMMAR.
5814
5815 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5816
5817 * README: Update location of patched M4 distribution.
5818
5819 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5820
5821 Don't assume the C++ compiler takes the same arguments as the C compiler
5822 (trivial change).
5823 * configure.ac (O0CXXFLAGS): New var.
5824 * tests/atlocal.in (CXXFLAGS): Use it.
5825
5826 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5827
5828 Fix some "make check" problems with C++ reported by
5829 Albert Chin-A-Young for Tru64 C++ in this thread:
5830 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5831
5832 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5833 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5834 Output to a .cc file for C++, not to a .c file.
5835 * tests/calc.at (AT_CHECK_CALC): Likewise.
5836 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5837 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5838
5839 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5840
5841 * tests/calc.at, tests/actions.at: Workaround for SGI
5842 C++ compiler. (trivial change)
5843
5844 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5845
5846 Spent a few hours checking out which prerequisite versions the
5847 current sources actually require. I went all the way back to
5848 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5849 a seemingly endless set of combinations of versions more recent
5850 than that. The bottom line is that the current sources require
5851 fairly recent versions of the build tools, and it'll be some work
5852 to change this.
5853 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5854 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5855 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5856 Add comments explaining why those particular versions are
5857 currently needed.
5858
5859 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5860 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5861 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5862
5863 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5864 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5865
5866 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5867
5868 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5869 0.11.5. Suggested by Bruno Haible.
5870 * bootstrap: Remove gettext version checking.
5871
5872 * doc/bison.texinfo (Decl Summary): Also mention that %union
5873 can depend on prerequisite types. Problem reported by Tim
5874 Van Holder.
5875
5876 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5877
5878 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5879 * README-alpha: Don't tell people not to package this.
5880
5881 * bootstrap: Don't assume $(...) works; use `...` instead.
5882 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5883 gettext better.
5884
5885 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5886 put into the -d output file, and mention what to do if YYSTYPE is
5887 defined as a macro.
5888
5889 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5890
5891 Undo change made earlier today: it caused autopoint to not bring
5892 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5893 autopoint's.
5894
5895 * bootstrap: Check that gettext version matches what's in
5896 configure.ac. Warn users to ignore robots.txt ERROR 404.
5897 * bootstrap: Undo today's earlier change (logged below).
5898 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5899
5900 The gettext version checking is causing more trouble than it's
5901 curing; remove it. Problem reported by Paul Hilfinger.
5902
5903 * bootstrap: Issue a warning that one can expect a message
5904 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5905 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5906
5907 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5908
5909 Ensure that the C++ compiler used for testing actually works on a
5910 simple test program; if not, skip the C++-related tests. Problem
5911 reported by Vin Shelton in:
5912 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5913
5914 * m4/cxx.m4: New file.
5915 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5916 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5917 * tests/local.at (AT_COMPILE_CXX): Use it.
5918
5919 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * data/glr.c (yylloc): Output this macro even if locations are not
5922 being generated, as the GLR parser needs it even in that case.
5923 Problem reported by Troy A. Johnson
5924 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5925
5926 * configure.ac (AC_INIT): Update to 1.875e.
5927
5928 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5929
5930 * NEWS: Version 1.875d.
5931 * configure.ac (AC_INIT): Likewise.
5932 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5933
5934 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5935 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5936 lalr1.cc runs afoul of the first, and the last two are no longer
5937 supported by GCC 3.4.0.
5938 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5939 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5940
5941 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5942
5943 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5944 unsigned int, for compatibility with latest gnulib hash module.
5945 * src/state.c (state_hash, state_hasher): Likewise.
5946 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5947 * src/uniqstr.c (hash_uniqstr): Likewise.
5948
5949 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5950
5951 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5952
5953 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5954 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5955 character and string literals.
5956 (unexpected_end): New function.
5957 (unexpected_eof): Use it.
5958 (unexpected_newline): New function.
5959 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5960 actions.
5961
5962 * NEWS: Document %expect-rr.
5963
5964 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5965 Fix typo by replacing $1 with $option.
5966 Remove more 'intl'-related files.
5967 Don't DEFUN AM_INTL_SUBDIR twice.
5968
5969 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5970 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5971 strtoul.c.
5972 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5973 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5974 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5975 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5976 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5977 * src/.cvsignore: Add *.output.
5978
5979 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5980 gets copied to the output file.
5981
5982 2004-04-28 Paul Eggert <eggert@twinsun.com>
5983
5984 Get files from the gnulib and po repositories, instead of relying
5985 on them being in our CVS. Upgrade to latest versions of gnulib
5986 and Automake.
5987
5988 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5989 * bootstrap: Bootstrap from gnulib and po repositories.
5990 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5991 * README-cvs: Document these changes. Remove version numbers from
5992 mentions of build tools, since they change so often. Mention Flex.
5993
5994 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5995 (gl_USE_SYSTEM_EXTENSIONS): Add.
5996 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5997 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5998 does this for us.
5999 (AC_ISC_POSIX): Remove; we no longer support this
6000 ancient OS, as it gets in the way of latest Autoconf & gnulib.
6001 (AC_HEADER_STDC): Remove: we now assume C89 or better.
6002 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
6003 Do not check for C89 headers, except for locale.h which is used
6004 by the Yacc library and must port to K&R hosts.
6005 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
6006 Do not check for C89 functions, except for setlocale which is
6007 used by the Yacc library.
6008 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
6009 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
6010 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
6011 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
6012 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
6013 AM_GNU_GETTEXT): Remove; now done by:
6014 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
6015 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
6016 for us.
6017
6018 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
6019 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
6020 Define to empty, as gnulib.mk will do the rest for us.
6021 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
6022 for us.
6023 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
6024 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
6025
6026 * src/files.c: Include gnulib's xstrndup.h.
6027
6028 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
6029 (REALLOC): Use xnrealloc, for likewise.
6030 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
6031 (strnlen, memrchr): Remove decls; functions no longer used.
6032 Include <stpcpy.h>.
6033
6034 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
6035 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6036 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
6037 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
6038 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
6039 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
6040 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
6041 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
6042 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
6043 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
6044 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
6045 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6046 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
6047 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
6048 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
6049 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
6050 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
6051 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
6052 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
6053 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
6054 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
6055 Remove, as these files are now generated automatically
6056 by bootstrap or automake.
6057
6058 * po/ChangeLog: Remove: all but one entry was a duplicate
6059 of this file, and I moved that 2000-11-02 entry here.
6060
6061 * config/.cvsignore: Add Makefile, depcomp, install-sh.
6062 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
6063 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
6064 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
6065 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
6066 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
6067 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
6068 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
6069 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
6070 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
6071 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
6072 xstrndup.h.
6073 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
6074 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
6075 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
6076 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
6077 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
6078 * src/.cvsignore: Remove *_.c.
6079
6080
6081 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
6082 support it. (The latest stable gzip doesn't.)
6083
6084 2004-04-27 Paul Eggert <eggert@twinsun.com>
6085
6086 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
6087 case, as stos_ is now used by destructors due to the 2004-02-09
6088 change.
6089
6090 Remove more K&R C support.
6091 * lib/libiberty.y (PARAMS): Remove. All uses removed.
6092 * lib/subpipe.c (errno): Remove decl.
6093 Include <stdlib.h> unconditionally.
6094 (EXIT_FAILURE): Remove macro.
6095 * src/complain.c (vfprintf, strerror): Remove.
6096 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
6097 unconditionally.
6098 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
6099 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
6100 (strchr, strspn, memchr): Remove decls.
6101 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
6102 unconditionally. Do not declare perror.
6103 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
6104 unconditionally.
6105
6106 * src/complain.c (_): Remove useless defn, as system.h defines this.
6107
6108 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
6109 with latest obstack.h.
6110 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
6111 to procedure types, as obstack.h now does that for us.
6112 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
6113
6114 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
6115 so that this include file can stand alone.
6116 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
6117 does this now. Include subpipe.h first after config.h, to
6118 test whether it can stand alone.
6119
6120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
6121 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
6122 unused declaration.
6123
6124 * tests/synclines.at (%union synch line): Put a dummy member in
6125 the union, because empty unions aren't allowed in C. Caught
6126 by GCC 3.4.0.
6127
6128 2004-04-13 Jim Meyering <jim@meyering.net>
6129
6130 * src/conflicts.c (conflicts_print): Correct format string typo:
6131 use `%%' to produce literal `%'. (trivial change)
6132
6133 2004-03-30 Paul Eggert <eggert@twinsun.com>
6134
6135 * src/getargs.c (version): Update copyright year to 2004.
6136
6137 * data/c.m4 (b4_int_type): Use 'short int' rather than
6138 'short', and similarly for 'long', 'unsigned', etc.
6139 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
6140 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
6141 yy_yypstack, yydumpstack): Likewise.
6142 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
6143 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
6144 Likewise.
6145 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
6146 yy_stack_print, yyparse): Likewise.
6147 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
6148 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
6149 * lib/bitset.c (bitset_print): Likewise.
6150 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
6151 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6152 * lib/bitsetv.c (bitsetv_dump): Likewise.
6153 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
6154 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
6155 Likewise.
6156 * src/LR0.c (allocate_itemsets): Likewise.
6157 * src/gram.h (rule_number, rule): Likewise.
6158 * src/lalr.h (goto_number): Likewise.
6159 * src/nullable.c (nullable_compute): Likewise.
6160 * src/output.c (prepare_rules): Likewise.
6161 * src/relation.c (relation_print, relation_digraph): Likewise.
6162 * src/relation.h (relation_node): Likewise.
6163 * src/state.h (state_number, transitions, errs, reductions,
6164 struct state): Likewise.
6165 * src/symtab.h (symbol_number, struct symbol): Likewise.
6166 * src/tables.c (vector_number, tally, action_number,
6167 default_goto, goto_actions): Likewise.
6168 * tests/existing.at (GNU Cim Grammar): Likewise.
6169 * tests/regression.at (Web2c Actions): Likewise.
6170
6171 * src/output.c (muscle_insert_short_int_table): Renamed from
6172 muscle_insert_short_table. All uses changed.
6173
6174 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6175
6176 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
6177 (declaration): Replace expected_conflicts with expected_sr_conflicts.
6178 Add %expect-rr rule.
6179
6180 * src/scan-gram.l: Recognize %expect-rr.
6181
6182 * src/conflicts.h (expected_sr_conflicts): Rename from
6183 expected_conflicts.
6184 (expected_rr_conflicts): Declare.
6185
6186 * src/conflicts.c (expected_sr_conflicts): Rename from
6187 expected_conflicts.
6188 (expected_rr_conflicts): Define.
6189 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
6190 for GLR parsers.
6191 Use expected_sr_conflicts in place of expected_conflicts.
6192 Warn if expected_rr_conflicts used in non-GLR parser.
6193
6194 * doc/bison.texinfo: Add documentation for %expect-rr.
6195
6196 2004-03-08 Paul Eggert <eggert@gnu.org>
6197
6198 Add support for hex token numbers. Suggested by Odd Arild Olsen in
6199 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
6200
6201 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
6202 in lalr1.cc.
6203 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
6204 * src/scan-gram.l (scan_integer): New function.
6205 ({int}): Use it.
6206 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
6207 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
6208 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
6209 Say "long int", not "long", for uniformity with GNU style.
6210
6211 2004-02-25 Paul Eggert <eggert@twinsun.com>
6212
6213 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6214 compilers. This fixes a problem with Intel's C++ compiler being
6215 chatty, reported by Guido Trentalancia in
6216 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
6217
6218 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6219
6220 Support %destructor and merge error locations in lalr1.cc.
6221
6222 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6223 (Parser::stos_): Define unconditionally.
6224 (Parser::destruct_): New method. Generate its body with
6225 b4_yydestruct_generate.
6226 (Parser::error_start_): New attribute.
6227 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6228 token which are discarded.
6229 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6230 error_start_ when erroneous token are discarded.
6231 (Parser::parse) <yyerrlab1>: Compute the location of the error
6232 token so that it covers all the discarded tokens.
6233 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6234 it can be called with `%skeleton "lalr1.cc"', and do that.
6235
6236 2004-02-02 Paul Eggert <eggert@twinsun.com>
6237
6238 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6239 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6240 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6241 There's no need to mention top_builddir since Automake does that
6242 for us.
6243 (INCLUDES): Remove, as Automake says it's obsolescent.
6244 Contents migrated into AM_CPPFLAGS as described above.
6245 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6246
6247 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6248
6249 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6250 (yyreportSyntaxError): Handle case where lookahead token is
6251 YYEMPTY.
6252
6253 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6254
6255 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6256 resulting parsers are compilable with C++.
6257
6258 2003-12-23 Paul Eggert <eggert@twinsun.com>
6259
6260 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6261 * src/output.c (output_skeleton): Rename local var.
6262 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6263 Bison tokens, as this runs afoul of the 2003-10-07 change that
6264 disallowed NUL bytes in character constants or string literals.
6265
6266 * tests/local.at: Require Autoconf 2.59's Autotest.
6267 * tests/testsuite.at: Don't include local.at, since we now assume
6268 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6269 including it.
6270 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6271 multiple inclusion warnings.
6272
6273 2003-12-02 Akim Demaille <akim@epita.fr>
6274
6275 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6276 conditions.
6277 From Bruno Haible.
6278
6279 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6280
6281 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6282
6283 2003-10-07 Paul Eggert <eggert@twinsun.com>
6284
6285 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6286 if testsuite doesn't exist.
6287
6288 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6289 literals, unfortunately.
6290 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6291 Complain about NUL bytes in character constants or string literals.
6292
6293 2003-10-05 Paul Eggert <eggert@twinsun.com>
6294
6295 * NEWS: Don't document %no-default-prec, as it's still
6296 too experimental.
6297 * doc/bison.texinfo: Document %no-default-prec only if
6298 the defaultprec flag is set. Normally it's not.
6299
6300 2003-10-04 Paul Eggert <eggert@twinsun.com>
6301
6302 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6303 non-modifiable lvalue, instead of a modifiable one.
6304 * doc/bison.texinfo (Actions): Document that $$ can
6305 be assigned to. Do not claim that $$ and $N are
6306 array element references: user code should not rely on this.
6307
6308 2003-10-01 Paul Eggert <eggert@twinsun.com>
6309
6310 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6311 (grammar_declaration): Use it.
6312 * src/scan-gram.l: New token %no-default-prec.
6313 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6314 * NEWS, doc/bison.texinfo: Document the above.
6315
6316 2003-10-01 Akim Demaille <akim@epita.fr>
6317
6318 VCG no longer supports long_straight_phase.
6319
6320 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6321 * src/print_graph.c (print_graph): Adjust.
6322
6323 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
6324 and Paul Eggert <eggert@twinsun.com>
6325
6326 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6327 Table of Symbols): Document %default-prec.
6328 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6329 (grammar_declaration): Set default_prec on %default-prec.
6330 * src/scan-gram.l (%default-prec): New token.
6331 * src/reader.h (default_prec): New flag.
6332 * src/reader.c: Likewise.
6333 (packgram): Handle it.
6334 * tests/conflicts.at (%default-prec without %prec,
6335 %default-prec with %prec, %default-prec 1): New tests.
6336
6337 2003-09-30 Paul Eggert <eggert@twinsun.com>
6338
6339 * tests/testsuite.at: Include local.at, not input.at, fixing
6340 a typo in the 2003-08-25 patch.
6341
6342 2003-08-27 Akim Demaille <akim@epita.fr>
6343
6344 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6345 GCC warnings.
6346
6347 2003-08-26 Akim Demaille <akim@epita.fr>
6348
6349 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6350 "<\#" to avoid magic from Gnus when posting parts of this script.
6351
6352 2003-08-26 Akim Demaille <akim@epita.fr>
6353
6354 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6355 (Parser::parse): here.
6356 Adjust: nerrs and errstatus is now replaced by...
6357 (Parser::nerrs_, Parser::errstatus_): New.
6358
6359 2003-08-25 Akim Demaille <akim@epita.fr>
6360
6361 * config/announce-gen, Makefile.cfg: New.
6362 * Makefile.am: Adjust.
6363 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6364 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6365
6366 2003-08-25 Akim Demaille <akim@epita.fr>
6367
6368 When reducing initial empty rules, Bison parser read an initial
6369 location that is not defined. This results in garbage, and that
6370 affects Bison's own parser. Therefore we need (i) to extend Bison
6371 to support a means to initialize this location, and (ii) to use
6372 this CVS Bison to fix CVS Bison's parser.
6373
6374 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6375 with...
6376 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6377 * src/parse-gram.y: Adjust.
6378 (%initial-action): New.
6379 (%error-verbose): Since we require CVS Bison, there is no reason
6380 not to use it.
6381 * src/scan-gram.l: Adjust.
6382 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6383 * data/yacc.c (yyparse): Use b4_initial_action.
6384
6385 2003-08-25 Akim Demaille <akim@epita.fr>
6386
6387 * doc/bison.texinfo: Don't promote stdout for error messages.
6388
6389 2003-08-25 Akim Demaille <akim@epita.fr>
6390
6391 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6392 From Alexandre Duret-Lutz.
6393
6394 2003-08-25 Akim Demaille <akim@epita.fr>
6395
6396 Version 1.875c.
6397
6398 2003-08-25 Akim Demaille <akim@epita.fr>
6399
6400 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6401 Use them.
6402
6403 2003-08-25 Akim Demaille <akim@epita.fr>
6404
6405 * data/lalr1.cc (Parser::reduce_print_): New.
6406 Use it.
6407
6408 2003-08-25 Akim Demaille <akim@epita.fr>
6409
6410 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6411 error recovery loops. This patch is based on
6412 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
6413 Also, augment the similarity between lalr1.cc and yacc.c.
6414 Note: the locations of error recovery rules are not correct yet.
6415
6416 * data/lalr1.cc: Comment changes to augment the similarity between
6417 lalr1.cc and yacc.c.
6418 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6419 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6420 yyerrlab), when hitting EOF, pop the whole stack here instead of
6421 merely falling thru the default error handling mechanism.
6422 (yyerrorlab): New label, with the old contents of YYERROR,
6423 plus the following change: pop the stack of rhs corresponding
6424 to the production that invoked YYERROR. That is how Yacc
6425 behaves (required by POSIX).
6426 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6427 fail.
6428
6429 2003-08-25 Akim Demaille <akim@epita.fr>
6430
6431 Tune local.at so that people can "autom4te -l autotest calc.at -o
6432 calc" for instance, to extract a sub test suite.
6433
6434 * tests/testsuite.at: Move the initialization, Autotest version
6435 requirement, and AT_TESTED invocation into...
6436 * tests/local.at: here.
6437 * tests/testsuite.at: Include it for compatibility with Autoconf
6438 2.57.
6439 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6440 be ignore.
6441
6442 2003-08-04 Paul Eggert <eggert@twinsun.com>
6443
6444 Rework code slightly to avoid gcc -Wtraditional warnings.
6445 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6446 The returned value is now stored in *YY0. All callers changed.
6447 * src/output.c (merge_output): Adjust to the above change.
6448
6449 2003-07-26 Paul Eggert <eggert@twinsun.com>
6450
6451 * data/glr.c (YYASSERT): New macro.
6452 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6453 yyresolveStates, yyprocessOneStack):
6454 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6455 Derived from a suggestion by Frank Heckenbach.
6456
6457 2003-07-25 Paul Eggert <eggert@twinsun.com>
6458
6459 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6460 for portability to K&R C (after ansi2knr, presumably). See
6461 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6462 by Frank Heckenbach, though I have omitted the structure-initialization
6463 part of his glr-knr.diff patch since I recall that the Portable
6464 C Compiler didn't require that change.
6465
6466 Let the user specify how to allocate and free memory.
6467 Derived from a suggestion by Frank Heckenbach in
6468 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6469 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6470 All uses of free, malloc, realloc changed to use these macros,
6471 and unnecessary casts removed.
6472 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6473
6474 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6475
6476 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6477 use s.empty() rather than s == "" to test for empty string; see
6478 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6479 (trivial change)
6480
6481 2003-06-25 Akim Demaille <akim@epita.fr>
6482
6483 * config/depcomp, config/install-sh: Update from masters.
6484
6485 2003-06-20 Paul Eggert <eggert@twinsun.com>
6486
6487 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6488 and return properly parenthesized result.
6489 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6490 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6491 Remove unnecessary parentheses from uses.
6492 * doc/bison.texinfo (Location Default Action): Describe the
6493 conventions for parentheses.
6494
6495 2003-06-19 Paul Eggert <eggert@twinsun.com>
6496
6497 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6498 yyreportTree): Do not assume that size_t is the same width as int,
6499 when printing sizes. Print sizes using an unsigned format.
6500 Problem reported by Frank Heckenbach in
6501 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6502
6503 Port to Forte Developer 7 C compiler.
6504 * data/glr.c (struct YYLTYPE): If locations are not being used,
6505 declare a single dummy member, as empty structs do not conform
6506 to the C standard.
6507 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6508 the Forte Developer 7 C compiler complains that end-of-loop
6509 code is not reached.
6510
6511 2003-06-17 Paul Eggert <eggert@twinsun.com>
6512
6513 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6514 avoid warnings from picky compilers about redefinition of PARAMS.
6515
6516 2003-06-17 Paul Eggert <eggert@twinsun.com>
6517
6518 Version 1.875b.
6519
6520 * NEWS: Document 1.875b.
6521
6522 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6523 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6524 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6525 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6526 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6527 per recent gettext manual's suggestion.
6528 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6529 Use prototypes, not old-style definitions.
6530 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6531 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6532 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6533 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6534 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6535 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6536 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6537 vbitset_or_and_cmp, vbitset_copy): Likewise.
6538
6539 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6540 Do not include <stdlib.h>.
6541 (PARAMS): Define unconditionally for C89.
6542 (ATTRIBUTE_NORETURN): Remove.
6543 (ATTRIBUTE_UNUSED): Define unconditionally.
6544
6545 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6546 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6547 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6548 * lib/vbitset.c, lib/vbitset.h: New files.
6549 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6550 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6551 from libbitset.
6552
6553 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6554 `How Can I Reset @code{yyparse}', since texinfo does not allow
6555 arbitrary @ in node names.
6556
6557 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6558 shouldn't be needed according to the gettext 0.12.1 documentation
6559 but which seem to be needed anyway: codeset.m4 glibc21.m4
6560 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6561 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6562 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6563
6564 * lib/.cvsignore: Add stdbool.h.
6565 * m4/.cvsignore: Add nls.m4, po.m4.
6566
6567 Upgrade to CVS gnulib.
6568 * stdbool_.h: File renamed from stdbool.h.in.
6569 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6570 AC_HEADER_STDBOOL.
6571 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6572 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6573 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6574 (MOSTLYCLEANFILES): New var.
6575 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6576 (stdbool.h): New rule.
6577 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6578 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6579 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6580 m4/quote.m4: Upgrade to today's gnulib.
6581
6582 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6583 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6584 the tests right now.
6585 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6586 yyerror are declared before use; C99 requires this.
6587
6588 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6589
6590 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6591 first.
6592 (yyrecoverSyntaxError): Correct the logic for setting and testing
6593 yyerrState.
6594 Correct comment on handling EOF.
6595 Allow states with only a default reduction, rather than failing
6596 (I can't quite reconstruct why these were not allowed before).
6597
6598 Fixes to avoid problem that $-N rules in GLR parsers can cause
6599 buffer overruns, corrupting state.
6600
6601 * src/output.c (prepare_rules): Output max_left_semantic_context
6602 definition.
6603 * src/reader.h (max_left_semantic_context): New variable declaration.
6604 * src/scan-gram.l (max_left_semantic_context): Define.
6605 (handle_action_dollar): Update max_left_semantic_context.
6606 * data/glr.c (YYMAXLEFT): New definition.
6607 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6608 (yyresolveAction): Ditto.
6609
6610 Fixes to problems with location handling in GLR parsers reported by
6611 Frank Heckenbach (2003/06/05).
6612
6613 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6614 (YYRHSLOC): Add parentheses, and define only if locations used.
6615 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6616 locations not used.
6617 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6618 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6619
6620 * tests/cxx-type.at: Exercise location information; update tests
6621 to differentiate output with and without locations.
6622 Remove forward declarations of yylex and yyerror---caused errors
6623 because default YYLTYPE not yet defined.
6624 Change semantic actions to compute strings, rather than printing
6625 them directly (to test proper passing of semantics values). Change
6626 output to prefix notation and update test data and expected results.
6627 (yylex): Track locations.
6628 (stmtMerge): Return value rather than printing, and include arguments
6629 in value.
6630
6631 2003-06-03 Paul Eggert <eggert@twinsun.com>
6632
6633 Avoid warnings generated by GCC 2.95.4 when Bison is
6634 configured with --enable-gcc-warnings.
6635 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6636 yy::]b4_parser_class_name[::translate_,
6637 yy::Stack::operator[] (unsigned),
6638 yy::Stack::operator[] (unsigned) const,
6639 yy::Slice::operator[] (unsigned),
6640 yy::Slice::operator[] (unsigned) const):
6641 Rename local vars to avoid warnings.
6642 * tests/glr-regression.at (Improper handling of embedded actions
6643 and $-N in GLR parsers): Remove unused local variable from yylex.
6644 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6645 (void) as arg when not pure, since we now assume C89 when building
6646 Bison. Pacify GCC by using parameter.
6647
6648 2003-06-02 Paul Eggert <eggert@twinsun.com>
6649
6650 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6651 yy::Location::lines, yy::Location::columns): Rename arguments
6652 to avoid shadowing; this removes a warning generated by GCC 3.3.
6653
6654 2003-06-01 Paul Eggert <eggert@twinsun.com>
6655
6656 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6657 to g++, as GCC 3.3 complains if you do it.
6658 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6659 everything that WARNING_CFLAGS has, except omit warnings
6660 not suitable for C++.
6661 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6662 * tests/atlocal.in (CXXFLAGS): New var.
6663 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6664
6665 Fix a GLR parser bug I reported in February; see
6666 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6667 The problem was that GLR parsers did not conform to the C standard,
6668 because actions like { $1 = $2 + $3; } expanded to expressions
6669 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6670 to a local variable. The C standard says that expressions
6671 like (var = f ()) + (var = f ()) have undefined behavior.
6672 Another problem was that GCC sometimes issues warnings that
6673 yyfill and its parameters are unused.
6674
6675 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6676 as possibly unused.
6677 (yyfill): New function.
6678 (YYFILL): Use it.
6679 (yyuserAction): Change type of yynormal to bool, so that it matches
6680 the new yyfill signature. Mark it as possibly unused.
6681
6682
6683 Follow up on a bug I reported in February, where a Bison-generated
6684 parser can loop. Provide a test case and a fix for yacc.c. I
6685 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6686 The original bug report is in:
6687 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6688
6689 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6690 macro's size was becoming unwieldy.
6691 (yyerrlab): Do not discard an empty lookahead symbol, as this
6692 might destroy garbage.
6693 (yyerrorlab): New label, with the old contents of YYERROR,
6694 plus the following change: pop the stack of rhs corresponding
6695 to the production that invoked YYERROR. That is how Yacc
6696 behaves, and POSIX requires this behavior.
6697 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6698 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6699 Define 'alarm' to do nothing if unistd.h is not available.
6700 Add a new rule "exp: '-' error;" to test the above change to
6701 data/yacc.c. Use 'alarm' to abort any test taking longer than
6702 10 seconds, as it's probably looping.
6703 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6704 Also, the new yacc.c generates two fewer diagnostics for an
6705 existing test.
6706
6707 2003-05-24 Paul Eggert <eggert@twinsun.com>
6708
6709 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6710 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6711 This fixes a problem reported by John Bowman when the Compaq/HP
6712 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6713 -ansi -Wall -gall).
6714 * data/yacc.c (union yyalloc): Likewise.
6715 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6716
6717 Switch from 'int' to 'bool' where that makes sense.
6718
6719 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6720 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6721 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6722 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6723 Return or accept bool, not int. All callers changed.
6724 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6725 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6726 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6727 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6728 bitset_or_and_cmp_): Likewise.
6729 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6730 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6731 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6732 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6733 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6734 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6735 bitset_stats_or_and_cmp): Likewise.
6736 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6737 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6738 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6739 ebitset_xor_cmp): Likewise.
6740 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6741 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6742 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6743 lbitset_xor_cmp): Likewise.
6744 * lib/bbitset.h: Include <stdbool.h>.
6745 (struct bitset_vtable): The following members now return bool, not
6746 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6747 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6748 or_and_cmp).
6749 * src/conflicts.c (count_rr_conflicts): Likewise.
6750 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6751 All uses changed.
6752 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6753 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6754 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6755 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6756 graph_flag): Likewise.
6757 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6758 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6759 graph_flag): Likewise.
6760 * src/output.c (error_verbose): Likewise.
6761 * src/output.h (error_verbose): Likewise.
6762 * src/reader.c (start_flag, typed): Likewise.
6763 * src/reader.h (typed): Likewise.
6764 * src/getargs.c (LOCATIONS_OPTION): New constant.
6765 (long_options, getargs): Use it.
6766 * src/lalr.c (build_relations): Use bool, not int.
6767 * src/nullable.c (nullable_compute): Likewise.
6768 * src/print.c (print_reductions): Likewise.
6769 * src/tables.c (action_row, pack_vector): Likewise.
6770 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6771 * src/output.c (prepare): Use it.
6772 * src/output.c (token_definitions_output,
6773 symbol_destructors_output, symbol_destructors_output): Use string,
6774 not boolean integer, to keep track of whether to output separator.
6775 * src/print_graph.c (print_core): Likewise.
6776 * src/state.c (state_rule_lookaheads_print): Likewise.
6777
6778 * config/install-sh: Sync from automake 1.7.5.
6779
6780 2003-05-14 Paul Eggert <eggert@twinsun.com>
6781
6782 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6783 semicolon after a grammar declaration, in the interest of possible
6784 future changes to the Bison input language.
6785 Do not allow a stray semicolon at the start of the grammar.
6786 (rhses.1): Allow one or more semicolons after any rule, including
6787 just before "|" as required by POSIX.
6788 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6789 grammar.
6790
6791 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6792
6793 %parse-param support for lalr1.cc.
6794
6795 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6796 b4_cc_constructor_calls, b4_cc_constructor_call,
6797 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6798 definitions.
6799 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6800 parse-param arguments.
6801 (yy::b4_parser_class_name): Declare instance variables to
6802 hold parse-param arguments.
6803 * tests/calc.at: s/value/semantic_value/ because value clashes
6804 with a member of yy::b4_parser_class_name. Adjust C++ code
6805 to handle %parse-param. Enable %parse-param test in C++.
6806
6807 2003-05-12 Paul Eggert <eggert@twinsun.com>
6808
6809 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6810 English a bit. Fix fclose typo. Change "const char" to "char
6811 const", and use ANSI C rather than K&R for "main". Suggest
6812 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6813 and suggest yy_switch_to_buffer.
6814
6815 2003-05-05 Paul Eggert <eggert@twinsun.com>
6816
6817 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6818 C89. This avoids a diagnostic on compilers that define __STDC__
6819 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6820 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6821
6822 2003-05-03 Paul Eggert <eggert@twinsun.com>
6823
6824 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6825 Do not overrun array bounds.
6826 This should fix a bug reported today by Olatunji Oluwabukunmi in
6827 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6828
6829 2003-04-29 Akim Demaille <akim@epita.fr>
6830
6831 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6832 * src/getargs.c, src/getargs.h: here, as bool, not int.
6833 (nondeterministic_parser): New.
6834 * src/parse-gram.y, src/scan-gram.l: Support
6835 %nondeterministic-parser.
6836 * src/output.c (prepare): Use nondeterministic_parser instead
6837 of glr_parser where appropriate.
6838 * src/tables.c (conflict_row, action_row, save_row)
6839 (token_actions, token_actions, pack_vector): Ditto.
6840
6841 2003-04-29 Akim Demaille <akim@epita.fr>
6842
6843 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6844
6845 2003-04-29 Akim Demaille <akim@epita.fr>
6846
6847 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6848 with %pure-parser and %locations to exercise the patch from Yakov
6849 Markovitch below.
6850
6851 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6852
6853 * data/yacc.c: (b4_lex_param): Corrected for the case where
6854 %lex-param is provided and %pure-parser isn't.
6855
6856 2003-04-27 Paul Eggert <eggert@twinsun.com>
6857
6858 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6859 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6860 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6861 if it is not defined.
6862 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6863
6864 2003-04-26 Paul Eggert <eggert@twinsun.com>
6865
6866 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6867 Declare to be of type suitable for the ninf value itself, not of
6868 type suitable for the corresponding table, since the latter might
6869 be unsigned but the ninf value might be negative. This fixes a
6870 bug reported by Alexandre Duret-Lutz in
6871 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6872
6873 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6874 invokes it. We shouldn't invoke it twice because it will attempt
6875 to put error.o in the archive twice. This fixes a glitch reported
6876 by Martin Mokrejs in
6877 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6878
6879 2003-04-21 Paul Eggert <eggert@twinsun.com>
6880
6881 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6882 to gnulib.
6883
6884 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6885
6886 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6887 Fix obvious typo that results in uncompilable GLR parsers
6888 when both %pure-parser and %locations are used. (trivial change)
6889
6890 2003-04-17 Paul Eggert <eggert@twinsun.com>
6891
6892 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6893 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6894 Do not insert the expected token via unput, as this runs afoul
6895 of a POSIX-compatibility bug in flex 2.5.31.
6896 All uses changed to BEGIN the parent state,
6897 since we no longer insert the expected token via unput.
6898 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6899 that is no longer emitted after the above change.
6900
6901 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6902 the first one. This change is from Paul Hilfinger, and it fixes
6903 regression reported by Werner Lemberg in
6904 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6905
6906 (resolve_sr_conflict): Don't invoke state_errs_set
6907 unless one or more tokens have been explicitly made errors.
6908 Otherwise, the above change causes Bison to abort.
6909
6910 * tests/existing.at (GNU pic Grammar): New test case, taken from
6911 Lemberg's email.
6912
6913 2003-03-31 Akim Demaille <akim@epita.fr>
6914
6915 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6916
6917 2003-03-31 Akim Demaille <akim@epita.fr>
6918
6919 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6920 output.
6921
6922 2003-03-31 Akim Demaille <akim@epita.fr>
6923
6924 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6925 From Paul Hilfinger.
6926
6927 2003-03-29 Akim Demaille <akim@epita.fr>
6928
6929 * m4/error.m4: Do not put under dynamic conditions some code which
6930 expansion is under static control.
6931
6932 2003-03-29 Akim Demaille <akim@epita.fr>
6933
6934 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6935
6936 2003-03-29 Akim Demaille <akim@epita.fr>
6937
6938 * doc/bison.texinfo (Strings are Destroyed): New.
6939
6940 2003-03-13 Paul Eggert <eggert@twinsun.com>
6941
6942 * .cvsignore: Add configure.lineno.
6943 * src/.cvsignore: Add yacc.
6944 * tests/.cvsignore: Add testsuite.log.
6945 * doc/fdl.texi: Sync with latest FSF version.
6946
6947 2003-03-12 Paul Eggert <eggert@twinsun.com>
6948
6949 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6950 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6951 cursor, instead of leaving it undefined. This fixes a bug
6952 reported by Tim Van Holder in
6953 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6954 * tests/input.at (Torturing the Scanner): Test the scanner on
6955 an empty input file, which was Tim Van Holder's test case.
6956
6957 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6958 <sys/resource.h> can be included, include sys/time.h and
6959 sys/times.h first, if available. This works around the SunOS
6960 4.1.4 porting bug reported by Bruce Becker in
6961 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6962
6963 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6964 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6965 AC_HEADER_SYS_WAIT.
6966
6967 Merge changes from gnulib. This was prompted because the CVS
6968 snapshot didn't build on Solaris 7 due to strnlen problems.
6969
6970 These changes need to be merged back into gnulib:
6971 * lib/hash.c: Include <stdbool.h> unconditionally.
6972 * m4/onceonly.m4 (m4_quote): New macro.
6973 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6974 Quote AC_FOREACH variable-expansions properly.
6975 The 2003-01-03 obstack.h change also needs merging.
6976 {end of changes requiring merging}
6977
6978 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6979 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6980 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6981 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6982 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6983 New files, imported from gnulib.
6984 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6985 above.
6986
6987 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6988 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6989 gnulib sources.
6990
6991 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6992 Add.
6993 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6994 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6995 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6996 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6997 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6998 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6999 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
7000 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
7001 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
7002 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
7003 (jm_PREREQ_ARGMATCH): Remove.
7004 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
7005 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
7006
7007 * src/system.h: Include <stdbool.h> unconditionally.
7008
7009 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
7010 assuming at least C89 in the bitset code for some time now.
7011
7012 2003-03-03 Akim Demaille <akim@epita.fr>
7013
7014 * ro.po: New.
7015
7016 2003-03-02 Akim Demaille <akim@epita.fr>
7017
7018 * doc/bison.texinfo (Table of Symbols): Reactivate the
7019 documentation for %lex-param, and %parse-param.
7020
7021 2003-03-02 Akim Demaille <akim@epita.fr>
7022
7023 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
7024 generate verbose error messages.
7025 Use the number of tokens as an upper bound in yytname, as it
7026 cannot be a non terminal.
7027
7028 2003-03-02 Akim Demaille <akim@epita.fr>
7029
7030 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
7031 message.
7032
7033 2003-03-02 Akim Demaille <akim@epita.fr>
7034
7035 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
7036 Use them to exercise yycheck overrun.
7037 Based on Andrew Suffield's grammar.
7038
7039 2003-03-02 Akim Demaille <akim@epita.fr>
7040
7041 Create tests/local.at for Bison generic testing macros.
7042
7043 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
7044 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
7045 This new file.
7046 * tests/calc.at (AT_CHECK_CALC): Adjust.
7047 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
7048 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
7049 * tests/local.at: here.
7050 (AT_COMPILE_CXX): Tags the tests using it as c++.
7051 Ignore the test if CXX is not functional.
7052
7053 2003-03-01 Paul Eggert <eggert@twinsun.com>
7054
7055 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
7056 not loc->end, since loc->end might contain garbage and this leads
7057 to undefined behavior on some platforms.
7058 (id_loc, token_start): Use (IF_LINTed) initial values that do not
7059 depend on *loc, so that the reader doesn't give the the false
7060 impression that *loc is initialized.
7061 (<INITIAL>"%%"): Do not bother setting code_start, since its value
7062 does not survive the return.
7063
7064 2003-03-01 Akim Demaille <akim@epita.fr>
7065
7066 * src/scan-gram.l (code_start): Always initialize it when entering
7067 into yylex, as SC_EPILOGUE is activated *before* the corresponding
7068 yylex invocation. An alternative would be making it static, but
7069 then it starts with the second %%'s beginning, instead of its end.
7070
7071 2003-02-28 Paul Eggert <eggert@twinsun.com>
7072
7073 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
7074 around a UnixWare 7.1.1 porting bug reported by John Hughes in
7075 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
7076
7077 2003-02-26 Paul Eggert <eggert@twinsun.com>
7078
7079 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
7080 Remove Sequent/Pyramid discussion (nobody uses them any more).
7081 Merge VMS and MS-DOS discussion; these ports may well be dead
7082 but let's keep mentioning them for now. Put <> around email
7083 addresses. Add copyright notice.
7084
7085 2003-02-24 Paul Eggert <eggert@twinsun.com>
7086
7087 * data/glr.c (yy_reduce_print): yylineno -> yylno,
7088 to avoid collision with flex use of yylineno.
7089 Problem reported by Bruce Lilly in
7090 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
7091 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7092 * data/yacc.c (yy_reduce_print): Likewise.
7093
7094 * config/depcomp: Sync with Automake 1.7.3.
7095
7096 2003-02-21 Akim Demaille <akim@epita.fr>
7097
7098 * data/lalr1.cc: Use temporary variables instead of casts to
7099 change integer types.
7100 Suggested by Paul Eggert.
7101
7102 2003-02-21 Akim Demaille <akim@epita.fr>
7103
7104 * doc/bison.texinfo: Use "location" consistently to refer to @n,
7105 to avoid confusions with lalr1.cc's notion of Position.
7106 Suggested by Paul Eggert.
7107
7108 2003-02-20 Akim Demaille <akim@epita.fr>
7109
7110 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
7111 before initial_columns.
7112 (location.hh): Use consistent variable names when defining the
7113 operator<<.
7114 Use "last" so that we subtract from Positions, not from unsigned.
7115
7116 2003-02-20 Akim Demaille <akim@epita.fr>
7117
7118 * data/lalr1.cc (position.hh): New subfile, including the extended
7119 and Doxygen'ed documentation of class Position.
7120 (location.hh): Use it.
7121 Document a` la Doxygen.
7122 With the help of Benoit Perrot.
7123
7124 2003-02-20 Akim Demaille <akim@epita.fr>
7125
7126 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
7127 AT_YACC_IF.
7128 Redefine AT_YYERROR_SEES_LOC_IF using it.
7129 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
7130 not defined.
7131 Don't use the location in yy::Parser::error_ and
7132 yy::Parser::print_ when not %locations.
7133 Activate more lalr1.cc tests.
7134
7135 2003-02-19 Akim Demaille <akim@epita.fr>
7136
7137 * data/lalr1.cc: When displaying a line number, be sure to make it
7138 an int.
7139
7140 2003-02-19 Akim Demaille <akim@epita.fr>
7141
7142 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
7143 Remove, useless.
7144 (YYABORT, YYACCEPT, YYERROR): New.
7145 * tests/calc.at: Renable the lalr1.cc test.
7146
7147 2003-02-19 Akim Demaille <akim@epita.fr>
7148
7149 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
7150 error recovery, mixing with/without pops and discarding of the
7151 lookahead.
7152 Exercise YYERROR.
7153 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
7154
7155 2003-02-17 Paul Eggert <eggert@twinsun.com>
7156
7157 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
7158 * tests/testsuite.at (AT_COMPILE): Use them.
7159 This fixes the testsuite problem reported by Robert Lentz in
7160 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
7161
7162 2003-02-12 Paul Eggert <eggert@twinsun.com>
7163
7164 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
7165 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
7166 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
7167 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
7168 Check for malloc failure, for consistency with yacc.c.
7169 (yytname_size): Remove, for consistency with yacc.c.
7170
7171 The bug still remains in data/lalr1.cc, as I didn't have time
7172 to fix it there.
7173
7174 2003-02-06 Akim Demaille <akim@epita.fr>
7175
7176 * configure.ac (GXX): Rename as...
7177 (CXX): this, to keep the original Autoconf semantics.
7178 Require 2.57.
7179 * data/lalr1.cc: Fix b4_copyright invocations.
7180 If YYDEBUG is not defined, don't depend upon name_ being defined.
7181 (location.hh): Include string and iostream.
7182 (Position::filename): New member.
7183 (Position::Position ()): New.
7184 (operator<< (Position)): New.
7185 (operator- (Position, int)): New.
7186 (Location::first, Location::last): Rename as...
7187 (Location::begin, Location::end): these, to mock the conventional
7188 iterator names.
7189 (operator<< (Location)): New.
7190 * tests/atlocal.in (CXX): New.
7191 * tests/testsuite.at (AT_COMPILE_CXX): New.
7192 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
7193 locations in a more synthetic way.
7194 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
7195 lalr1.cc is used.
7196 Adjust the C locations to match those from Emacs: first column is
7197 column 0.
7198 Change all the expected results.
7199 Conform to the GCS: simplify the locations when applicable.
7200 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
7201 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
7202 these CPP macros with the m4 macros new defined by...
7203 (AT_CHECK_PUSHDEFS): this, i.e.:
7204 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
7205 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7206 New macros.
7207 (AT_CHECK_POPDEFS): Undefine them.
7208 (AT_CHECK_CALC_LALR1_CC): New.
7209 Use it for the first lalr1.cc test.
7210
7211 2003-02-04 Akim Demaille <akim@epita.fr>
7212
7213 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7214 Location as is defined.
7215
7216 2003-02-04 Akim Demaille <akim@epita.fr>
7217
7218 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7219 name_ being defined.
7220
7221 2003-02-03 Paul Eggert <eggert@twinsun.com>
7222
7223 * src/gram.h (start_symbol): Remove unused decl.
7224
7225 Use more-consistent naming conventions for local vars.
7226
7227 * src/derives.c (derives_compute): Change type of local var from
7228 int to rule_number.
7229 * src/gram.c (grammar_rules_partial_print): Likewise.
7230 * src/print.c (print_core): Likewise.
7231 * src/reduce.c (reduce_grammar_tables): Likewise.
7232
7233 * src/gram.c (grammar_dump): Change name of item_number *
7234 local var from r to rp.
7235 * src/nullable.c (nullable_compute): Likewise.
7236
7237 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7238
7239 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7240 for symbol or symbol_number var.
7241 * src/reader.c (grammar_start_symbol_set): Likewise.
7242 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7243 Likewise.
7244 * src/state.c (transitions_to): Likewise.
7245 * src/state.h: Likewise.
7246 * src/tables.c (symbol_number_to_vector_number): Likewise.
7247
7248 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7249 char * var.
7250
7251 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7252 var.
7253
7254 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7255 var.
7256
7257 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7258 Use str, not s, for char * var. Use ch, not c, for character var.
7259 Use size for size var.
7260
7261 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7262 char * var.
7263 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7264 uniqstr var.
7265 * src/uniqstr.h: Likewise.
7266
7267 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7268 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7269 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7270 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7271 param to have same name as that of enum, so that we don't use
7272 "s" to stand for a non-state.
7273
7274 2003-02-02 Akim Demaille <akim@epita.fr>
7275
7276 * src/scan-skel.l: Scan more than one inert character per yylex
7277 invocation.
7278
7279 2003-02-01 Paul Eggert <eggert@twinsun.com>
7280
7281 Version 1.875a.
7282
7283 * po/LINGUAS: Add ms.
7284
7285 2003-01-30 Akim Demaille <akim@epita.fr>
7286
7287 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7288
7289 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7290
7291 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7292 of $1.
7293
7294 Changes in response to error report by S. Eken: GLR mode does not
7295 handle negative $ indices or $ indices in embedded rules correctly.
7296 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
7297
7298 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7299 (b4_rhs_location): Ditto.
7300 (yyfill): New function to copy from stack tree into array
7301 incrementally.
7302 (yyuserAction): Modify to allow incremental move of semantic values
7303 to rhs array when in GLR mode.
7304 Define YYFILL to use in user-defined actions to fill semantic array
7305 as needed.
7306 Remove dummy use of yystack, as there is now a guaranteed use.
7307 (yydoAction): Modify to allow incremental move of semantic values
7308 to rhs array when in GLR mode.
7309 (yyresolveAction): Ditto.
7310 (yyglrShiftDefer): Update comment.
7311 (yyresolveStates): Use X == NULL for pointers, not !X.
7312 (yyglrReduce): Ditto.
7313 (yydoAction): Ditto
7314
7315 * tests/glr-regr1.at: Rename to ...
7316 * tests/glr-regression.at: Add new regression test for the problems
7317 described above (adapted from S. Eken).
7318 Update copyright notice.
7319 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7320 * tests/Makefile.am: Ditto.
7321
7322 2003-01-28 Paul Eggert <eggert@twinsun.com>
7323
7324 * data/lalr1.cc: Do not use @output_header_name@ unless
7325 b4_defines_flag is set. This fixes two bugs reported by
7326 Tim Van Holder in
7327 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7328 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
7329
7330 2003-01-21 Paul Eggert <eggert@twinsun.com>
7331
7332 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7333 we don't need to worry about yyerrlab1 being reported as an
7334 "unused label" by non-GCC C compilers. The downside is that if
7335 locations are used then a couple of statements are duplicated each
7336 time YYERROR is invoked, but the upside is that the warnings
7337 should vanish.
7338 (yyerrlab1): Move code to YERROR.
7339 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7340 This reverts some of the 2002-12-27 change.
7341
7342 2003-01-17 Paul Eggert <eggert@twinsun.com>
7343
7344 * src/output.c (symbol_printers_output): Fix typo that led
7345 to core dump. Problem reported by Antonio Rus in
7346 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
7347
7348 2003-01-13 Akim Demaille <akim@epita.fr>,
7349 Quoc Peyrot <chojin@lrde.epita.fr>,
7350 Robert Anisko <anisko_r@lrde.epita.fr>
7351
7352 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7353 when the stacks contain one element, as the loop would otherwise
7354 free the last state, and then use the top state (the one we just
7355 popped). This means that the initial elements will not be freed
7356 explicitly, as is the case in yacc.c; it is not a problem, as
7357 these elements have fake values.
7358
7359 2003-01-11 Paul Eggert <eggert@twinsun.com>
7360
7361 * NEWS: %expect-violations are now just warnings, reverting
7362 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7363 bootstrapping problem reported by Matthias Klose; see
7364 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
7365 * src/conflicts.c (conflicts_print): Likewise.
7366 * tests/conflicts.at (%expect not enough, %expect too much,
7367 %expect with reduce conflicts): Likewise.
7368 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7369 that the warning is enabled if the number of conflicts changes
7370 (not necessarily increases).
7371
7372 * src/getargs.c (version): Update copyright year.
7373
7374 2003-01-09 Akim Demaille <akim@epita.fr>
7375
7376 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7377
7378 2003-01-08 Paul Eggert <eggert@twinsun.com>
7379
7380 * Makefile.maint (WGETFLAGS):
7381 New macro, containing "-C off" to disable proxy caches.
7382 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7383 (rel-check): Use $(WGET) instead of wget.
7384
7385 2003-01-06 Paul Eggert <eggert@twinsun.com>
7386
7387 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7388 the GLR paper of Scott, Johnstone and Hussain.
7389
7390 2003-01-04 Paul Eggert <eggert@twinsun.com>
7391
7392 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7393 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7394 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7395 (EXTRA_LIBRARIES): New var, for liby.a.
7396 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7397 (EXTRA_SCRIPTS): New var, for yacc.
7398
7399 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7400 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7401 Problem reported by Nelson H. F. Beebe.
7402
7403 2003-01-03 Paul Eggert <eggert@twinsun.com>
7404
7405 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7406 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7407 when compiling Bison 1.875's `bitset bset = obstack_alloc
7408 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7409
7410 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7411 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7412 grow to a huge size with typical invocation.
7413
7414 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7415 Use the pattern recommended by Autoconf 2.57, except also protect
7416 against double-definition.
7417 * src/system.h: Likewise.
7418 Portability issues reported by Nelson H. F. Beebe.
7419
7420 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7421 All uses changed. Provide a definition in both C and C++.
7422 (yytrue, yyfalse): Define even if defined (__cplusplus).
7423
7424 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7425 Reported by Nelson H. F. Beebe.
7426
7427 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7428
7429 2003-01-02 Paul Eggert <eggert@twinsun.com>
7430
7431 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7432 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7433 Bug reported by Nelson H. F. Beebe.
7434
7435 2003-01-01 Paul Eggert <eggert@twinsun.com>
7436
7437 * Version 1.875.
7438
7439 2002-12-30 Paul Eggert <eggert@twinsun.com>
7440
7441 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7442 Moved here from...
7443 (<INITIAL>","): Here. This causes stray "," to be treated
7444 more uniformly.
7445
7446 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7447 last brace in braced code when not in Yacc mode, for compatibility
7448 with Bison 1.35. This resurrects the 2001-12-15 patch to
7449 src/reader.c.
7450
7451 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7452 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7453
7454 2002-12-28 Paul Eggert <eggert@twinsun.com>
7455
7456 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7457 that of SYM's type. This fixes Debian bug 168069, reported by
7458 Thomas Olsson.
7459
7460 2002-12-28 Paul Eggert <eggert@twinsun.com>
7461
7462 Version 1.75f.
7463
7464 Switch back to the Yacc style of conflict reports, undoing some
7465 of the 2002-07-30 change.
7466 * doc/bison.texinfo (Understanding): Use Yacc style for
7467 conflict reports. Also, use new way of locating rules.
7468 * src/conflicts.c (conflict_report):
7469 Renamed from conflict_report_yacc, removing the old
7470 'conflict_report'. Translate the entire conflict report at once,
7471 so that we don't assume that "," has the same interpretation in
7472 all languages.
7473 (conflicts_output): Use Yacc-style conflict report for each state,
7474 instead of our more-complicated style.
7475 (conflicts_print): Use Yacc-style conflict report, except print
7476 the input file name when not emulating Yacc.
7477 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7478 Conflicted Reduction, %expect not enough, %expect too much,
7479 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7480 * tests/existing.at (GNU Cim Grammar): Likewise.
7481 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7482
7483 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7484 fatal): Don't invoke fflush; it's not needed and it might even be
7485 harmful for stdout, as stdout might not be open.
7486 * src/reduce.c (reduce_print): Likewise.
7487
7488 2002-12-27 Paul Eggert <eggert@twinsun.com>
7489
7490 Fix a bug where error locations were not being recorded correctly.
7491 This problem was originally reported by Paul Hilfinger in
7492 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7493
7494 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7495 top of the location stack's error locations.
7496 (yyerrlab): Set it. When discarding a token, push its location
7497 onto yylerrsp so that we don't lose track of the error's end.
7498 (yyerrlab1): Now is only the target of YYERROR, so that we can
7499 properly record the location of the action that failed. For GCC
7500 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7501 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7502 (yyerrlab2): New label, which yyerrlab now falls through to.
7503 Compute the error's location by applying YYLLOC_DEFAULT to
7504 the locations of all the symbols that went into the error.
7505 * doc/bison.texinfo (Location Default Action): Mention that
7506 YYLLOC_DEFAULT is also invoked for syntax errors.
7507 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7508 Error locations include the locations of all the tokens that were
7509 discarded, not just the last token.
7510
7511 2002-12-26 Paul Eggert <eggert@twinsun.com>
7512
7513 * src/files.c: Include quote.h.
7514 (compute_output_file_names): Warn if we detect conflicting
7515 outputs to the same file. This should catch the misunderstanding
7516 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7517
7518 * src/conflicts.c (conflicts_print): If the user specifies
7519 "%expect N", report an error if there are any reduce/reduce
7520 conflicts. This is what the manual says should happen.
7521 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7522 * tests/conflicts.at (%expect with reduce conflicts): New test.
7523
7524 Don't use m4_include on relative file names, as it doesn't work as
7525 desired if there happens to be a file with that name under ".".
7526
7527 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7528 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7529 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7530 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7531 * src/output.c (output_skeleton): Use full path names when
7532 specifying a file to include; don't rely on include path, as
7533 it's unreliable when the working file contains a file with
7534 that name.
7535
7536 2002-12-25 Paul Eggert <eggert@twinsun.com>
7537
7538 Remove obsolete references to bison.simple and bison.hairy.
7539 Problem mentioned by Aubin Mahe in
7540 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7541 * data/glr.c: Comment fix.
7542 * doc/bison.1: Remove references. Also, mention "yacc".
7543
7544 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7545 with -g option.
7546
7547 * src/parse-gram.y (declaration): Use enum "report_states" rather
7548 than its numeric value 1.
7549
7550 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7551 opening a new one. This fixes Debian bug 165349, reported by
7552 Bruce Stephens.
7553
7554 2002-12-24 Paul Eggert <eggert@twinsun.com>
7555
7556 Version 1.75e.
7557
7558 * Makefile.maint (cvs-update): Don't assume that the shell
7559 supports $(...), as Solaris sh doesn't.
7560
7561 * src/parse-gram.y (lloc_default): Remove test for empty
7562 nonterminals at the end, since it didn't change the result.
7563
7564 2002-12-24 Paul Eggert <eggert@twinsun.com>
7565
7566 If the user does not define YYSTYPE as a macro, Bison now declares it
7567 using typedef instead of defining it as a macro. POSIX requires this.
7568 For consistency, YYLTYPE is also declared instead of defined.
7569
7570 %union directives can now have a tag before the `{', e.g., the
7571 directive `%union foo {...}' now generates the C code
7572 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7573 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7574 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7575 instead of `yyltype'.
7576
7577 `yystype' and `yyltype' are now obsolescent macros instead of being
7578 typedefs or tags; they are no longer documented and will be
7579 withdrawn in a future release.
7580
7581 * data/glr.c (b4_location_type): Remove.
7582 (YYSTYPE): Renamed from yystype.
7583 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7584 (struct YYLTYPE): Renamed from struct yyltype.
7585 (YYLTYPE): Renamed from yyltype.
7586 (yyltype, yystype): New (and obsolescent) macros,
7587 for backward compatibility.
7588 * data/yacc.c: Likewise.
7589
7590 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7591 does not specify a union tag. This is for compatibility with
7592 Solaris 9 yacc.
7593
7594 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7595 const *, since it is now modified by stripping surrounding { }.
7596 (current_braced_code): Remove.
7597 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7598 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7599 trailing " {...}". Now of type <chars>.
7600 (grammar_declaration): Adjust to bundled tokens.
7601 (code_content): Remove; stripping is now done by add_param.
7602 (print_token_value): Print contents of bundled tokens.
7603 (token_name): New function.
7604
7605 * src/reader.h (braced_code, current_braced_code): Remove.
7606 (token_name): New decl.
7607
7608 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7609 token_type, not braced_code code_kind. All uses changed.
7610 (SC_PRE_CODE): New state, for scanning after a keyword that
7611 has (or usually has) an immediately-following braced code.
7612 (token_type): New local var, to keep track of which token type
7613 to return when scanning braced code.
7614 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7615 <INITIAL>"%parse-param", <INITIAL>"%printer",
7616 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7617 instead of returning a token type immediately.
7618 (<INITIAL>"{"): Set token type.
7619 (<SC_BRACED_CODE>"}"): Use it.
7620 (handle_action_dollar, handle_action_at): Now returns bool
7621 indicating success. Fail if ! current_rule; this prevents a core dump.
7622 (handle_symbol_code_dollar, handle_symbol_code_at):
7623 Remove; merge body into caller.
7624 (handle_dollar, handle_at): Complain in invalid contexts.
7625
7626 * NEWS, doc/bison.texinfo: Document the above.
7627 * NEWS: Fix years and program names in copyright notice.
7628
7629 2002-12-17 Paul Eggert <eggert@twinsun.com>
7630
7631 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7632 Reporting, Table of Symbols): Omit mentions of %lex-param and
7633 %parse-param from the documentation for now.
7634
7635 2002-12-15 Paul Eggert <eggert@twinsun.com>
7636
7637 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7638 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7639 lookahead symbol, and which sets yychar in parser actions) and it
7640 disagreed with the Bison documentation. Bug
7641 reported by Andrew Walrond.
7642
7643 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7644 as the caller now does that.
7645 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7646 (YYEMPTY): Parenthesize right hand side, since others use it.
7647 (yyparse): Don't assume that our generated code is the only code
7648 that sets yychar.
7649
7650 2002-12-13 Paul Eggert <eggert@twinsun.com>
7651
7652 Version 1.75d.
7653
7654 POSIX requires a "yacc" command.
7655 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7656 (MOSTLYCLEANFILES): Add yacc.
7657 (yacc): New rule.
7658 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7659 as an alias for bison y.
7660
7661 * po/LINGUAS: Add da.
7662
7663 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7664 problem with latest <getopt.h>.
7665 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7666
7667 * doc/fdl.texi: Upgrade to 1.2.
7668 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7669 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7670 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7671 gnulib.
7672 * config/install-sh: Sync with autotools.
7673
7674 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7675 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7676 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7677 locations are requested.
7678 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7679 locations are requested.
7680
7681 2002-12-12 Paul Eggert <eggert@twinsun.com>
7682
7683 Remove unportable casts and storage allocation tricks.
7684 While we're at it, remove almost all casts, since they
7685 usually aren't needed and are a sign of trouble.
7686
7687 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7688
7689 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7690 the pointer DSET returned by malloc; this isn't portable.
7691 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7692 Similarly for DERIVES.
7693 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7694 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7695 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7696
7697 * src/derives.c (derives_compute): Do not bother invoking
7698 int_of_rule_number, since rule numbers are integers.
7699
7700 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7701 rather than XMALLOC (char, N).
7702
7703 * src/files.c (filename_split): Rewrite to avoid cast.
7704
7705 * src/gram.h (symbol_number_as_item_number,
7706 item_number_as_symbol_number, rule_number_as_item_number,
7707 item_number_as_rule_number):
7708 Now inline functions rather than macros, to avoid casts.
7709 * src/state.h (state_number_as_int): Likewise.
7710 * src/tables.c (state_number_to_vector_number,
7711 symbol_number_to_vector_number): Likewise.
7712
7713 * src/gram.h (int_of_rule_number): Remove; no longer used.
7714
7715 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7716 since the resulting storage is always stored into.
7717
7718 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7719 where it's needed.
7720
7721 * src/muscle_tab.c (muscle_m4_output):
7722 Now inline. Return bool, not int.
7723 * src/state.c (state_compare): Likewise.
7724 * src/symtab.c (symbol_check_defined,
7725 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7726 hash_compare_symbol, hash_symbol):
7727 Likewise.
7728 * src/uniqstr.c (uniqstr_print): Likewise.
7729 * src/muscle_tab.c (muscle_m4_output_processor):
7730 New function, to avoid casts.
7731 * src/state.c (state_comparator, stage_hasher): Likewise.
7732 * src/symtab.c (symbol_check_defined_processor,
7733 symbol_check_alias_consistency_processor, symbol_pack_processor,
7734 symbol_translation_processor, hash_symbol_comparator,
7735 hash_symbol_hasher): Likewise.
7736 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7737 * src/muscle_tab.c (muscles_m4_output):
7738 Use new functions instead of casting old functions unportably.
7739 * src/state.c (state_hash_new): Likewise.
7740 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7741 symbols_token_translations_init):
7742 Likewise.
7743 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7744
7745 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7746 var instead of casting to long, to avoid casts.
7747 (prepare_states): Use MALLOC rather than alloca, so that we don't
7748 have to worry about alloca.
7749 * src/state.c (state_hash_lookup): Likewise.
7750
7751 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7752 local var instead of casting to unsigned char, to avoid casts.
7753
7754 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7755 STATE_ALLOC): Remove.
7756 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7757 rather than calloc, and use offsetof to avoid allocating slightly
7758 too much storage.
7759 (state_new): Initialize all members.
7760
7761 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7762
7763 * src/symtab.c (symbol_free): Remove; unused.
7764 (symbol_get): Remove cast in lhs of assignment.
7765 (symbols_do): Now static. Accept generic arguments, not
7766 hashing-related ones.
7767
7768 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7769 (symbol_processor): Remove.
7770 (symbols_do): Remove decl; now static.
7771
7772 * src/system.h (alloca): Remove; decl no longer needed.
7773 (<stddef.h>): Include, for offsetof.
7774 (<inttypes.>, <stdint.h>): Include if available.
7775 (uintptr_t): New type, if system lacks it.
7776 (CALLOC, MALLOC, REALLOC): New macros.
7777 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7778 new macros.
7779
7780 * src/tables.c (table_size): Now int, to pacify GCC.
7781 (table_grow, table_ninf_remap): Use signed table size.
7782 (save_row): Don't bother initializing locals when not needed.
7783 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7784 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7785
7786 * src/vcg.h: Correct misspellings.
7787
7788 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7789
7790
7791 * src/getargs.c (getargs): Don't assume EOF == -1.
7792
7793 2002-12-09 Paul Eggert <eggert@twinsun.com>
7794
7795 Change identifier spellings to avoid collisions with names
7796 that are reserved by POSIX.
7797
7798 Don't use names ending in _t, since POSIX reserves them.
7799 For consistency, remove _e and _s endings -- they're weren't
7800 needed to remove ambiguity. All uses changed.
7801 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7802 turn was just renamed from struniq_t.
7803 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7804 which in turn was just renamed from struniq_processor_t.
7805 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7806 in turn was renamed from hash_compare_struniq_t.
7807 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7808 (state_list): Renamed from state_list_t.
7809 * src/assoc.h (assoc): Renamed from assoc_t.
7810 * src/conflicts.c (enum conflict_resolution): Renamed from
7811 enum conflict_resolution_e.
7812 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7813 (rule_list): Renamed from rule_list_t.
7814 * src/getargs.h (enum trace): Renamed from enum trace_e.
7815 (enum report): Renamed from enum report_e.
7816 * src/gram.h (item_number): Renamed from item_number_t.
7817 (rule_number): Renamed from rule_number_t.
7818 (struct rule_s): Remove the "rule_s" part; not used.
7819 (rule): Renamed from rule_t.
7820 (rule_filter): Renamed from rule_filter_t.
7821 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7822 (goto_list): Renamed from goto_list_t.
7823 * src/lalr.h (goto_number): Renamed from goto_number_t.
7824 * src/location.h (location): Renamed from location_t.
7825 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7826 and moved here from:
7827 * src/muscle_tab.h (muscle_entry_t): here.
7828 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7829 (rule_list): Renamed from rule_list_t.
7830 * src/print_graph.c (static_graph): Renamed from graph.
7831 * src/reader.h (braced_code): Renamed from braced_code_t.
7832 Remove brace_code_e tag.
7833 * src/relation.h (relation_node): Renamed from relation_node_t.
7834 (relation_nodes): Renamed from relation_nodes_t.
7835 (relation): Renamed from relation_t.
7836 * src/state.h (state_number): Renamed from state_number_t.
7837 (struct state): Renamed from struct state_s.
7838 (state): Renamed from state_t.
7839 (transitions): Renamed from transitions_t. Unused (and
7840 misspelled) transtion_s tag removed.
7841 (errs): Renamed from errs_t. Unused errs_s tag removed.
7842 (reductions): Renamed from reductions_t. Unused tag
7843 reductions_s removed.
7844 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7845 (struct symbol_list): Renamed from struct symbol_list_s.
7846 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7847 (struct symbol): Renamed from struct symbol_s.
7848 (symbol): Renamed from symbol_t.
7849 * src/tables.c (vector_number): Renamed from vector_number_t.
7850 (action_number): Renamed from action_t.
7851 * src/tables.h (base_number): Renamed from base_t.
7852 * src/vcg.h (enum color): Renamed from enum color_e.
7853 (enum textmode): Renamed from enum textmode_e.
7854 (enum shape): Renamed from enum shape_e.
7855 (struct colorentry): Renamed from struct colorentry_s.
7856 (struct classname): Renamed from struct classname_s.
7857 (struct infoname): Renamed from struct infoname_s.
7858 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7859 (enum decision): Renamed from enum decision_e.
7860 (enum orientation): Renamed from enum orientation_e.
7861 (enum alignment): Renamed from enum alignment_e.
7862 (enum arrow_mode): Renamed from enum arrow_mode_e.
7863 (enum crossing_type): Renamed from enum crossing_type_e.
7864 (enum view): Renamed from enum view_e.
7865 (struct node): Renamed from struct node_s.
7866 (node): Renamed from node_t.
7867 (enum linestyle): Renamed from enum linestyle_e.
7868 (enum arrowstyle): Renamed from enum arrowstyle_e.
7869 (struct edge): Renamed from struct edge.
7870 (edge): Renamed from edge_t.
7871 (struct graph): Renamed from struct graph_s.
7872 (graph): Renamed from graph_t.
7873 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7874 Rename value_t -> value.
7875 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7876 value_t_as_yystype -> value_as_yystype.
7877
7878 Don't include <errno.h> in the mainstream code, since it
7879 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7880 * lib/get-errno.c, lib/get-errno.h: New files.
7881 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7882 get-errno.c.
7883 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7884 * src/output.c (output_skeleton): Likewise.
7885 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7886 instead of errno.
7887 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7888 Likewise.
7889 (handle_action_dollar, handle_action_at): Likewise.
7890 * src/system.h: Do not include <errno.h>.
7891 (TAB_EXT): Renamed from EXT_TAB.
7892 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7893
7894 Avoid str[a-z]*, since <string.h> reserves that name space.
7895 Change all instances of "struniq" in names to "uniqstr", and
7896 likewise for "STRUNIQ" and "UNIQSTR".
7897 * src/uniqstr.c: Renamed from src/struniq.c.
7898 * src/uniqstr.h: Renamed from src/struniq.h.
7899 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7900 * src/files.c (strsuffix): Remove; unused.
7901 (concat2): Renamed from stringappend. Now static.
7902 * src/files.h (strsuffix, stringappend): Remove; unused.
7903 * src/parse-gram.y (<chars>): Renamed from <string>.
7904 (<uniqstr>): Renamed from <struniq>.
7905 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7906 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7907 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7908 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7909 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7910 (N_EXPAND): Renamed from N_STRETCH.
7911
7912 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7913 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7914 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7915 Remove; unused.
7916 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7917 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7918 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7919 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7920 (BASE_MAXIMUM): Renamed from BASE_MAX.
7921 (BASE_MINIMUM): Renamed from BASE_MIN.
7922 (ACTION_MAX): Remove; unused.
7923 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7924 Unnecessary casts removed from above defines.
7925
7926
7927 Fix misspelling in names.
7928 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7929 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7930 G_NODE_ALIGNEMENT.
7931
7932
7933 * lib/timevar.c (timevar_report): Renamed from time_report,
7934 for consistency with other names.
7935 * lib/timevar.h (timevar_report): New decl.
7936 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7937
7938
7939 Sort include-file uses.
7940
7941 Reorder all include files under src to be in the order "system.h".
7942 then the ../lib include files in angle brackets (alphabetized),
7943 then the . include files in double-quotes (alphabetized). Fix
7944 dependency breakages encountered in this process, as follows:
7945 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7946 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7947 * src/state.h: Include "symtab.h".
7948
7949 2002-12-08 Paul Eggert <eggert@twinsun.com>
7950
7951 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7952 since this causes problems when __file__ contains character
7953 sequences like "@" that are treated specially by src/scan-skel.l.
7954 Instead, just use the file's basename. This fixes the bug
7955 reported by Martin Mokrejs in
7956 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7957
7958 2002-12-06 Paul Eggert <eggert@twinsun.com>
7959
7960 Add support for rules that do not have trailing semicolons, as
7961 POSIX requires. Improve the quality of locations in Bison
7962 diagnostics.
7963
7964 * src/location.c: Include <quotearg.h>.
7965 (empty_location): Now const.
7966 (location_print): New function. Follow the recommendation of the
7967 GNU Coding Standards for locations that span file boundaries.
7968 * src/location.h: Do not include <quotearg.h>; no longer needed.
7969 (boundary): New type.
7970 (location_t): Use it. This allows locations to span file boundaries.
7971 All member uses changed: file -> start.file or end.file (as needed),
7972 first_line -> start.line, first_column -> start.column,
7973 last_line -> end.line, last_column -> end.column.
7974 (equal_boundaries): New function.
7975 (LOCATION_RESET, LOCATION_STEP): Remove.
7976 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7977 (empty_location): Now const.
7978 (location_print): New decl.
7979 * src/parse-gram.y (lloc_default): New function, which handles
7980 empty locations more accurately.
7981 (YYLLOC_DEFAULT): Use it.
7982 (%token COLON): Remove.
7983 (%token ID_COLON): New token.
7984 (rules): Use it.
7985 (declarations, rules): Remove trailing semicolon.
7986 (declaration, rules_or_grammar_declaration):
7987 Allow empty (";") declaration.
7988 (symbol_def): Remove empty actions; no longer needed.
7989 (rules_or_grammar_declaration): Remove trailing semicolon.
7990 (semi_colon.opt): Remove.
7991 * src/reader.h: Include location.h.
7992 (scanner_cursor): New decl.
7993 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7994 rolling our own.
7995 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7996 of *loc.
7997 (STEP): Remove. No longer needed, now that adjust_location does
7998 the work. All uses removed.
7999 (scanner_cursor): New var.
8000 (adjust_location): Renamed from extend_location. It now sets
8001 *loc and adjusts the scanner cursor. All uses changed.
8002 Don't bother testing for CR.
8003 (handle_syncline): Remove location arg; now updates scanner cursor.
8004 All callers changed.
8005 (unexpected_end_of_file): Now accepts start boundary of token or
8006 comment, not location. All callers changed. Update scanner cursor,
8007 not the location.
8008 (SC_AFTER_IDENTIFIER): New state.
8009 (context_state): Renamed from c_context. All uses changed.
8010 (id_loc, code_start, token_start): New local vars.
8011 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
8012 processing of Yacc white space and equivalents here.
8013 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
8014 instead of returning ID immediately, since we need to search for
8015 a subsequent colon.
8016 (<INITIAL>"'", "\""): Save token_start.
8017 (<INITIAL>"%{", "{", "%%"): Save code_start.
8018 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
8019 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
8020 BEGIN context_state at end, not INITIAL.
8021 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
8022 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
8023 Return correct token start.
8024 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
8025 the start of a character, string or multiline comment is found.
8026 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
8027 Reduction): Adjust reported locations to match the more-precise
8028 results now expected.
8029 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
8030 * tests/reduce.at (Useless Rules, Reduced Automaton,
8031 Underivable Rules): Likewise.
8032 * tests/regression.at (Invalid inputs): No longer `expecting ";"
8033 or "|"' now that so many other tokens are allowed by the new grammar.
8034
8035 * src/complain.h (current_file): Remove duplicate decl;
8036 current_file is now owned by files.h.
8037 * src/complain.c, src/scan-gram.l: Include files.h.
8038
8039 2002-12-06 Paul Eggert <eggert@twinsun.com>
8040
8041 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
8042 promotes to int; it might be unsigned int.
8043 * data/yacc.c (yy_reduce_print): Likewise.
8044
8045 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
8046 be #defined in the prologue, not in the Bison declarations.
8047 This fixes Debian Bug 102878, reported by Shaul Karl.
8048
8049 2002-12-02 Paul Eggert <eggert@twinsun.com>
8050
8051 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
8052 * lib/strtoul.c: New file, from gnulib.
8053 This fixes a porting bug reported by Peter Klein in
8054 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
8055
8056 2002-11-30 Paul Eggert <eggert@twinsun.com>
8057
8058 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
8059 and put only a forward declaration in the prologue. This is for
8060 consistency with the other scanner helper functions.
8061
8062 Type clashes now generate warnings, not errors, since it
8063 appears that POSIX may allow some grammars with type clashes.
8064 * src/reader.c (grammar_current_rule_check): Warn about
8065 type clashes instead of complaining.
8066 * tests/input.at (Type Clashes): Expect warnings, not complaints.
8067
8068 Add Yacc library, since POSIX requires it.
8069 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
8070 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
8071 * lib/main.c, lib/yyerror.c: New files.
8072
8073 gram_error can be static; it need not be extern.
8074 * src/reader.h (gram_error): Remove decl.
8075 * src/parse-gram.y (gram_error): Now static. Add static decl.
8076 (print_token_value): Omit parameter names from forward decl,
8077 for consistency.
8078
8079 2002-11-29 Paul Eggert <eggert@twinsun.com>
8080
8081 * doc/bison.texinfo: Emphasize that yylex and yyerror must
8082 be declared before being used. E.g., one should typically
8083 declare them in the prologue. Use GNU coding style in examples.
8084 Put "const" consistently after the type it modifies. Mention
8085 that C99 supports "inline". Mention that yyerror traditionally
8086 returns "int".
8087
8088 %parse-param and %lex-param now take just one argument, the
8089 declaration; the argument name is deduced from the declaration.
8090
8091 * doc/bison.texinfo (Parser Function, Pure Calling, Error
8092 Reporting, Table of Symbols): Document this.
8093 * src/parse-gram.y (add_param): New function.
8094 (COMMA): Remove.
8095 (declaration): Implement new rule for %parse-param and %lex-param.
8096 * src/scan-gram.l: "," now elicits a warning, rather than being
8097 a token; this is more compatible with byacc.
8098 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
8099
8100 2002-11-27 Paul Eggert <eggert@twinsun.com>
8101
8102 Rename identifiers to avoid real and potential collisions.
8103
8104 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
8105 to avoid collision with lex macro described by Bruce Lilly in
8106 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
8107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8108 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
8109 * src/parse-gram.y (print_token_value): Renamed from yyprint.
8110 All uses changed.
8111 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
8112 The name "yycontrol" violates the name space rules, and this stuff
8113 wasn't being used anyway.
8114 (input): Remove action; this stuff wasn't being used.
8115 (gram_error): Rename local variable yylloc -> loc.
8116 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
8117 (YY_DECL): Don't use "yy" at start of local variables.
8118 All uses changed, e.g., yylloc -> loc.
8119 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
8120 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
8121 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
8122 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
8123
8124 * src/parse-gram.y (gram_error): loc is now const *.
8125 * src/reader.h (gram_error): Likewise.
8126
8127 2002-11-24 Paul Eggert <eggert@twinsun.com>
8128
8129 Version 1.75c.
8130
8131 * tests/actions.at (Actions after errors): Use an output format
8132 more similar to that of the Printers and Destructors test.
8133 Test the position of the ';' token too.
8134 (Printers and Destructors): Likewise.
8135 (Printers and Destructors: %glr-parser): Remove for now, to avoid
8136 unnecessarily alarming people when the test fails.
8137
8138 * data/yacc.c (yyerrlab1): Move this label down, so that the
8139 parser does not discard the lookahead token if the user code
8140 invokes YYERROR. This change is required for POSIX conformance.
8141
8142 * lib/error.c: Sync with gnulib.
8143
8144 2002-11-22 Paul Eggert <eggert@twinsun.com>
8145
8146 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
8147 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
8148 * lib/xmalloc.c: Likewise.
8149
8150 2002-11-20 Paul Eggert <eggert@twinsun.com>
8151
8152 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
8153
8154 2002-11-20 Paul Eggert <eggert@twinsun.com>
8155
8156 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
8157 should use `if (! x) abort ();' rather than `assert (x);', and
8158 anyway it's one less thing to worry about configuring.
8159
8160 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
8161 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
8162 and replace all instances of assert with abort.
8163 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8164 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
8165
8166 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
8167 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
8168 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
8169 hash_find_entry, hash_rehash, hash_insert): Likewise.
8170 * src/conflicts.c (resolve_sr_conflict): Likewise.
8171 * src/lalr.c (set_goto_map, map_goto): Likewise.
8172 * src/nullable.c (nullable_compute): Likewise.
8173 * src/output.c (prepare_rules, token_definitions_output): Likewise.
8174 * src/reader.c (packgram, reader): Likewise.
8175 * src/state.c (state_new, state_free, state_transitions_set,
8176 state_reduction_find): Likewise.
8177 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
8178 symbol_pack): Likewise.
8179 * src/tables.c (conflict_row, pack_vector): Likewise.
8180 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8181 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8182 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
8183 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
8184
8185 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
8186 (ARGMATCH_CONSTRAINT): New macro.
8187 (ARGMATCH_ASSERT): Use it.
8188
8189 * src/system.h (verify): New macro.
8190 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
8191 rather than assert.
8192 * src/tables.c (tables_generate): Likewise.
8193
8194 * src/struniq.c (struniq_assert): Now returns void, and aborts
8195 if the assertion is false.
8196 (struniq_assert_p): Remove.
8197 * src/struniq.h: Likewise.
8198
8199 2002-11-18 Paul Eggert <eggert@twinsun.com>
8200
8201 * data/glr.c (yygetLRActions): Replace `yyindex' with
8202 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
8203 This fixes the regression with Sun ONE Studio 7 cc that I reported in
8204 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
8205
8206 2002-11-18 Akim Demaille <akim@epita.fr>
8207
8208 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
8209 space.
8210 From Tim Van Holder.
8211
8212 2002-11-17 Paul Eggert <eggert@twinsun.com>
8213
8214 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8215 to "SyntaxError" for consistency with my 2002-11-15 change.
8216
8217 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8218 not define to {}, since this breaks the common use of `YYDPRINTF
8219 ((...));' if a single statement is desired (e.g. before `else').
8220 Work around GCC warnings by surrounding corresponding calls with
8221 {} if needed.
8222 (yyhasResolvedValue): Remove unused function.
8223 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8224 loop body.
8225 (yyreportSyntaxError): Renamed from yyreportParseError.
8226 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8227 All uses changed.
8228 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8229 extern when possible. Remove unused initializations.
8230
8231 2002-11-16 Akim Demaille <akim@epita.fr>
8232
8233 Augment the similarity between GLR and LALR traces.
8234
8235 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8236 (YY_REDUCE_PRINT): New.
8237 (yyparse): Use them.
8238 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8239 YYDPRINT here.
8240 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8241 state reached after the reduction/recovery, since...
8242 (yyparse, yyprocessOneStack): Report the state we are entering in.
8243
8244 2002-11-16 Akim Demaille <akim@epita.fr>
8245
8246 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8247 Add support for --trace=skeleton.
8248 * src/scan-skel.l: %option debug.
8249 Scan strings of non-@ or \n instead of character by character.
8250 (scan_skel): Handle trace_skeleton.
8251 (QPUTS): New.
8252 (@output_parser_name@, @output_header_name@): ``Restore'' their
8253 support (used to be M4 macros).
8254 * data/yacc.c: Quote larger chunks, a la glr.c.
8255 * data/lalr1.cc: Likewise.
8256 The header guards are no longer available, so use some other
8257 string than `YYLSP_NEEDED'.
8258
8259 2002-11-16 Akim Demaille <akim@epita.fr>
8260
8261 Make the ``Printers and Destructors'' test more verbose, taking
8262 `yacc.c''s behavior as (possibly wrong) reference.
8263
8264 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8265 instead of fprint on stdout.
8266 Set and report the last_line of the symbols.
8267 Consistently display values and locations.
8268
8269 2002-11-16 Paul Eggert <eggert@twinsun.com>
8270
8271 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8272
8273 2002-11-15 Paul Eggert <eggert@twinsun.com>
8274
8275 * tests/actions.at (Actions after errors): New test case.
8276
8277 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8278 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8279 tests/action.at, tests/calc.at, tests/conflicts.at,
8280 tests/cxx-type.at, tests/regression.at:
8281 "parse error" -> "syntax error" for POSIX compatibility.
8282 "parsing stack overflow..." -> "parser stack overflow" so
8283 that code matches Bison documentation.
8284
8285 2002-11-15 Akim Demaille <akim@epita.fr>
8286
8287 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8288 take two BRACED_CODE, not two string_content.
8289 Free the scanner's obstack when we are done.
8290 (code_content): New.
8291 * tests/calc.at: Adjust.
8292 * doc/bison.texinfo: Adjust.
8293 Also, make sure to include the `,' for these declarations.
8294
8295 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8296
8297 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8298 definition; avoids potential autoreconf problems.
8299
8300 2002-11-15 Akim Demaille <akim@epita.fr>
8301
8302 Always check the value returned by yyparse.
8303
8304 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8305 returned by yyparse.
8306 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8307 Adjust calls.
8308 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8309 returned by yyparse.
8310
8311 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8312
8313 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8314 on input.at test.
8315
8316 2002-11-14 Paul Eggert <eggert@twinsun.com>
8317
8318 * src/output.c (output_skeleton): Call xfopen instead of
8319 duplicating xfopen's body.
8320
8321 Fix bugs reported by Nelson H. F. Beebe in
8322 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
8323
8324 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8325 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8326 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8327 file twice in the grammar, as an extra check.
8328
8329 * tests/input.at (Torturing the Scanner): Surround the
8330 backslash-newline tests with "#if 0", to make it less likely that
8331 we'll run into compiler bugs. Bring back solitary \ inside
8332 comment, but add a closing comment to work around HP C bug. Don't
8333 test backslash-newline in C character constant.
8334
8335 2002-11-14 Akim Demaille <akim@epita.fr>
8336
8337 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8338 status of the compiler.
8339 Calling `exit 1' is no longer needed.
8340 Reported by Nelson H. F. Beebe.
8341
8342 2002-11-14 Akim Demaille <akim@epita.fr>
8343
8344 * tests/atlocal.in (CPPFLAGS): We have config.h.
8345 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8346 New.
8347 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8348 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8349 * tests/regression.at, tests/torture.at: Use them for all the
8350 grammars that are to be compiled.
8351 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8352 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8353 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8354
8355 2002-11-14 Akim Demaille <akim@epita.fr>
8356
8357 * doc/bison.texinfo: Various formatting changes (alignments in
8358 samples, additional @group/@end group, GCS in samples.
8359 Use @deffn instead of simple @table to define the directives,
8360 macros, variables etc.
8361
8362 2002-11-13 Paul Eggert <eggert@twinsun.com>
8363
8364 Fix some bugs reported by Albert Chin-A-Young in
8365 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
8366
8367 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8368 -o c"; the HP C compiler chatters during compilation.
8369 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8370 * tests/headers.at (export YYLTYPE): Likewise.
8371
8372 * tests/input.at (Torturing the Scanner): Remove lines containing
8373 solitary backslashes, as they tickle a bug in the HP C compiler.
8374
8375 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8376 comments, since they're not portable. Use GNU coding style.
8377
8378 2002-11-13 Akim Demaille <akim@epita.fr>
8379
8380 * data/yacc.c: Leave bigger chunks of quoted text.
8381 (YYDSYMPRINTF): New.
8382 Use it to report symbol activities.
8383 * data/glr.c (YYDSYMPRINTF): New.
8384 Use it.
8385
8386 2002-11-12 Paul Eggert <eggert@twinsun.com>
8387
8388 Version 1.75b.
8389
8390 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8391 (yyglrReduce): Return yyok, not 0.
8392 This should avoid the enumerated-type warnings reported
8393 by Nelson H. F. Beebe in
8394 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
8395
8396 * lib/bbitset.h (BITSET_INLINE): Remove.
8397 * lib/bitset.h [! BITSET_INLINE]: Remove.
8398 (bitset_set, bitset_reset, bitset_test): Rename local vars
8399 to avoid shadowing warnings by GCC.
8400
8401 * data/glr.c (inline): Remove #define. It's the user's
8402 responsibility to #define it away, just like 'const'.
8403 This fixes one of the bugs reported by Nelson H. F. Beebe in
8404 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
8405
8406 * Makefile.maint (po-check): Scan .l and .y files instead of the
8407 .c and the .h files that they generate. This fixes the bug
8408 reported by Tim Van Holder in:
8409 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
8410 Look for N_ as well as for _. Try to avoid matching #define for
8411 N_ and _.
8412 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8413 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8414 * src/scan-gram.l: Revamp regular expressions so that " and '
8415 do not confuse xgettext.
8416
8417 * src/struniq.h (struniq_new): Do not declare the return type
8418 to be 'const'; this violates the C standard.
8419 * src/struniq.c (struniq_new): Likewise.
8420
8421 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8422
8423 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8424 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8425 linker.
8426
8427 2002-11-12 Akim Demaille <akim@epita.fr>
8428
8429 * Makefile.maint: Sync with Autoconf:
8430 (local_updates): New.
8431
8432 2002-11-12 Akim Demaille <akim@epita.fr>
8433
8434 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8435
8436 2002-11-12 Akim Demaille <akim@epita.fr>
8437
8438 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8439 locations.
8440
8441 2002-11-12 Akim Demaille <akim@epita.fr>
8442
8443 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8444 not yyvalue.
8445
8446 2002-11-12 Akim Demaille <akim@epita.fr>
8447
8448 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8449 Use it to test the GLR parser.
8450
8451 2002-11-12 Akim Demaille <akim@epita.fr>
8452
8453 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8454 defines it.
8455 * data/glr.c (yystos): New.
8456 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8457 (YYDSYMPRINT): New.
8458 (yyval): Don't define it, it is handled via M4.
8459 (yyrecoverParseError): Free verbosely the discarded symbols.
8460 * data/yacc.c (yysymprint): Remove, rather...
8461 (b4_yysymprint_generate): invoke.
8462 * data/c.m4 (b4_yysymprint_generate): New.
8463 Accept pointers as arguments, as opposed to the version from
8464 yacc.c.
8465 (b4_yydestruct_generate): Likewise.
8466 * tests/cations.at (Printers and Destructors): Use Bison directives
8467 instead of CPP macros.
8468 Don't rely on internal details.
8469
8470 2002-11-12 Akim Demaille <akim@epita.fr>
8471
8472 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8473 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8474 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8475 it against YYEMPTY and so forth), work on yytoken (i.e., set
8476 it to YYEMPTY etc.).
8477 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8478 (b4_symbol_actions): Remove.
8479 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8480 for 0, end-of-input.
8481
8482 2002-11-12 Akim Demaille <akim@epita.fr>
8483
8484 * doc/bison.texinfo (Destructor Decl): New.
8485
8486 2002-11-12 Akim Demaille <akim@epita.fr>
8487
8488 * src/tables.c (tables_generate): Use free for pointers that
8489 cannot be NULL, not XFREE.
8490 (pack_vector): Use assert, not fatal, for bound violations.
8491 * src/state.c (state_new): Likewise.
8492 * src/reader.c (reader): Likewise.
8493 * src/lalr.c (set_goto_map): Likewise.
8494 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8495 the file name.
8496
8497 2002-11-12 Akim Demaille <akim@epita.fr>
8498
8499 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8500 Restore.
8501 * src/scan-gram.l (last_string): Is global to the file, not to
8502 yylex.
8503 * src/parse-gram.y (input): Don't append the epilogue here,
8504 (epilogue.opt): do it here, and free the scanner's obstack.
8505 * src/reader.c (epilogue_set): Rename as...
8506 (epilogue_augment): this.
8507 * data/c.m4 (b4_epilogue): Defaults to empty.
8508
8509 2002-11-12 Akim Demaille <akim@epita.fr>
8510
8511 * src/getargs.c (long_options): Remove duplicates.
8512 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8513 Remove.
8514 * doc/bison.rnh: Remove.
8515 * doc/bison.texinfo (VMS Invocation): Remove.
8516
8517 2002-11-12 Akim Demaille <akim@epita.fr>
8518
8519 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8520 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8521
8522 Use struniq for symbols.
8523
8524 * src/symtab.h (symbol_t): The tag member is a struniq.
8525 (symbol_type_set): Adjust.
8526 * src/symtab.c (symbol_new): Takes a struniq.
8527 (symbol_free): Don't free the tag member.
8528 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8529 (hash_compare_symbol, hash_symbol): these.
8530 Use the fact that tags as struniqs.
8531 (symbol_get): Use struniq_new.
8532 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8533 Returns a strniq.
8534 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8535 and type members are struniqs.
8536 * src/reader.c (get_merge_function)
8537 (grammar_current_rule_merge_set): Adjust.
8538 (TYPE, current_type): Are struniq.
8539
8540 Use struniq for file names.
8541
8542 * src/files.h, src/files.c (infile): Split into...
8543 (grammar_file, current_file): these.
8544 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8545 * src/reduce.c (reduce_print): Likewise.
8546 * src/getargs.c (getargs): Likewise.
8547 * src/complain.h, src/complain.c: Likewise.
8548 * src/main.c (main): Call struniqs_new early enough to use it for
8549 file names.
8550 Don't free the input file name.
8551
8552 2002-11-12 Akim Demaille <akim@epita.fr>
8553
8554 * src/symtab.c (symbol_free): Remove dead deactivated code:
8555 type_name are properly removed.
8556 Don't use XFREE to free items that cannot be NULL.
8557 * src/struniq.h, src/struniq.c: New.
8558 * src/main.c (main): Initialize/free struniqs.
8559 * src/parse-gram.y (%union): Add astruniq member.
8560 (yyprint): Adjust.
8561 * src/scan-gram.l (<{tag}>): Return a struniq.
8562 Free the obstack bit that used to store it.
8563 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8564
8565 2002-11-11 Paul Eggert <eggert@twinsun.com>
8566
8567 Revamp to fix many (but not all) of the C- and M4-related quoting
8568 problems. Among other things, this fixes the Bison bug reported
8569 by Jan Hubicka when processing the Bash grammar; see:
8570 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8571
8572 Use new @ escapes consistently. Represent brackets with @{ and @}
8573 rather than @<:@ and @:>@, since this works a bit better with dumb
8574 editors like vi. Represent @ with @@, since @ is now consistently
8575 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8576 __ofile__, to avoid unexpected expansions. Similarly, use @output
8577 rather than #output.
8578
8579 * data/c.m4 (b4_copyright): Omit file name from comment, since
8580 the file name could contain "*/".
8581 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8582 be quoted. All uses changed.
8583
8584 * data/glr.c: Use new @ escapes consistently.
8585 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8586 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8587 Remove, since they couldn't handle arbitrary characters in file
8588 names.
8589 * data/lalr1.cc: Likewise.
8590 * data/yacc.c: Likewise.
8591
8592 * src/files.c (output_infix): Remove; all uses removed.
8593 * src/files.h: Likewise.
8594
8595 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8596 mishandled funny characters in file names, and anyway it isn't
8597 needed any more.
8598 * data/yacc.c: Likewise.
8599 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8600
8601 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8602 * data/yacc.c: Likewise.
8603
8604 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8605 strings now.
8606 (muscle_init): Quote filename as a C string.
8607 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8608 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8609 * src/output.c (escaped_file_name_output): New function.
8610 (prepare_symbols): Quote tokens for M4.
8611 (prepare): Don't insert output_infix, output_prefix,
8612 output_parser_name, output_header_name; this is now down by scan-skel.
8613 Insert skeleton as a C string.
8614
8615 * src/output.c (user_actions_output, symbol_destructors_output,
8616 symbol_printers_output): Quote filenames for C and M4.
8617 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8618
8619 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8620 escapes other than \\ and \'; this simplifies the code.
8621 (<SC_STRING>): Likewise, for \\ and \".
8622 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8623 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8624 Use new escapes @{ and @} for [ and ].
8625
8626 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8627 them with auto vars.
8628 Switch to new escape scheme, where @ is the escape character uniformly.
8629 Abort if a stray escape character is found. Avoid unbounded input
8630 buffer when parsing non-escaped text.
8631
8632 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8633 __oline__, #output, $@, and @{ do not have unintended meanings.
8634
8635 2002-11-09 Paul Eggert <eggert@twinsun.com>
8636
8637 Fix the test failure due to GCC warnings described in
8638 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8639 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8640 evaluate to 0 if it's impossible for NINF to be in the respective
8641 table.
8642 (yygetLRActions, yyrecoverParseError): Use them.
8643
8644 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8645 counted in the token inserted at end of file. Now takes
8646 location_t *, not location_t, so that the location can be
8647 adjusted. All uses changed.
8648
8649 * tests/regression.at (Invalid inputs): Adjust wording in
8650 diagnostic to match the new behavior.
8651
8652 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8653 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8654 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8655 abort ();'. This reduces the runtime of the "Many lookaheads"
8656 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8657 GCC 3.2.
8658
8659 2002-11-07 Paul Eggert <eggert@twinsun.com>
8660
8661 * src/parse-gram.y (CHARACTER): Remove unused token.
8662 All uses removed.
8663
8664 * src/scan-gram.l: Remove stack option. We no longer use the
8665 stack, since the stack was never deeper than 1; instead, use the
8666 new auto var c_context to record the stacked value.
8667
8668 Remove nounput option. At an unexpected end of file, we now unput
8669 the minimal input necessary to end cleanly; this simplifies the
8670 code.
8671
8672 Avoid unbounded token sizes where this is easy.
8673
8674 (unexpected_end_of_file): New function.
8675 Use it to systematize the error message on unexpected EOF.
8676 (last-string): Now auto, not static.
8677 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8678 (scanner_last_string_free): Remove; not used.
8679 (percent_percent_count): Move decl to just before use.
8680 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8681 not the (never otherwised-used) CHARACTER.
8682
8683 2002-11-07 Akim Demaille <akim@epita.fr>
8684
8685 Let yyerror always receive the msg as last argument, so that
8686 yyerror can be variadic.
8687
8688 * data/yacc.c (b4_yyerror_args): New.
8689 Use it when calling yyerror.
8690 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8691 Use it when calling yyerror.
8692 * doc/bison.texinfo (Error Reporting): Adjust.
8693 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8694 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8695
8696 2002-11-06 Akim Demaille <akim@epita.fr>
8697
8698 #line should have quoted strings.
8699 Ideally, this should be done by m4_quotearg.
8700
8701 * src/scan-skel.l: Include quotearg.h.
8702 Quote __ofile__.
8703 * src/output.c (symbol_printers_output)
8704 (symbol_destructors_output): Quote the file name.
8705
8706 2002-11-06 Akim Demaille <akim@epita.fr>
8707
8708 * tests/regression.at (Invalid inputs): Adjust to the recent
8709 messages.
8710
8711 2002-11-06 Akim Demaille <akim@epita.fr>
8712
8713 Restore --no-lines.
8714 Reported by Jim Kent.
8715
8716 * data/c.m4 (b4_syncline): New.
8717 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8718 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8719 * src/output.c (user_actions_output): Likewise.
8720 (prepare): Define 'b4_synclines_flag'.
8721 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8722
8723 2002-11-06 Akim Demaille <akim@epita.fr>
8724
8725 * src/main.c (main): Free `infile'.
8726 * src/scan-gram.l (handle_syncline): New.
8727 Recognize `#line'.
8728 * src/output.c (user_actions_output, symbol_destructors_output)
8729 (symbol_printers_output): Use the location's file name, not
8730 infile.
8731 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8732
8733 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8734
8735 * src/tables.c (matching_state): Don't allow states to match if
8736 either has GLR conflict entries.
8737
8738 2002-11-05 Paul Eggert <eggert@twinsun.com>
8739
8740 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8741 "integer out of range" rather than "invalid value".
8742 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8743 accordingly.
8744
8745 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8746 Also, remove one static variable in the scanner.
8747
8748 * src/scan-gram.l (braces_level): Now auto, not static.
8749 Initialize to zero if the compiler is being picky.
8750 (INITIAL): Clear braces_level instead of incrementing it.
8751 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8752 as POSIX 1003.1-2001 requires.
8753 * src/system.h (IF_LINT): New macro, taken from coreutils.
8754 * configure.ac: Define "lint" if --enable-gcc-warnings.
8755
8756 2002-11-05 Akim Demaille <akim@epita.fr>
8757
8758 * src/scan-gram.l: When it starts with `%', complain about the
8759 whole directive, not just that `invalid character: %'.
8760
8761 2002-11-04 Akim Demaille <akim@epita.fr>
8762
8763 * Makefile.maint: Update from Autoconf.
8764 (update, cvs-update, po-update, do-po-update): New.
8765
8766 2002-11-04 Akim Demaille <akim@epita.fr>
8767
8768 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8769 and yyerror.
8770 Have yyerror `use' its arguments.
8771 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8772 returns true when location & yacc & pure & parse-param.
8773 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8774
8775 2002-11-04 Akim Demaille <akim@epita.fr>
8776
8777 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8778 clashes.
8779 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8780 font-lock-mode.
8781 Use complain_at.
8782 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8783 slot 0.
8784
8785 2002-11-03 Paul Eggert <eggert@twinsun.com>
8786
8787 * src/reader.c (get_merge_function, grammar_current_rule_check):
8788 Use consistent diagnostics for reporting type name clashes.
8789 Quote the types with <>, for consistency with Yacc.
8790 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8791
8792 2002-11-03 Akim Demaille <akim@epita.fr>
8793
8794 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8795 New.
8796 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8797 (b4_parse_param): Remove.
8798 Use b4_identification.
8799 Propagate b4_pure_args where needed to pass them to yyerror.
8800 * data/glr.m4 (b4_parse_param): Remove.
8801 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8802 (b4_lpure_formals): New.
8803 Use b4_identification.
8804 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8805 b4_user_formals and b4_user_args.
8806 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8807 (yyreportAmbiguity): When using a pure parser, also need
8808 the location, and the parse-params.
8809 Adjust callers.
8810 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8811 When using a pure parser, also need the parse-params.
8812 Adjust callers.
8813 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8814 (%pure-parser + %parse-param) LALR and GLR parsers.
8815 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8816 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8817 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8818 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8819 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8820 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8821 * doc/bison.texinfo: Untabify the whole file.
8822 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8823 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8824 (Error Reporting): Adjust to these new directives.
8825 Document %error-verbose, deprecate YYERROR_VERBOSE.
8826
8827 2002-11-03 Akim Demaille <akim@epita.fr>
8828
8829 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8830 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8831 command line options.
8832 * tests/cxx-type.at: Formatting changes.
8833
8834 2002-11-03 Paul Eggert <eggert@twinsun.com>
8835
8836 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8837 to count columns correctly, and to check for invalid inputs.
8838
8839 Use mbsnwidth to count columns correctly. Account for tabs, too.
8840 Include mbswidth.h.
8841 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8842 (extend_location): New function.
8843 (YY_LINES): Remove.
8844
8845 Handle CRLF in C code rather than in Lex code.
8846 (YY_INPUT): New macro.
8847 (no_cr_read): New function.
8848
8849 Scan UCNs, even though we don't fully handle them yet.
8850 (convert_ucn_to_byte): New function.
8851
8852 Handle backslash-newline correctly in C code.
8853 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8854 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8855 all uses changed.
8856 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8857 Use {splice} wherever C allows backslash-newline.
8858 YY_STEP after space, newline, vertical-tab.
8859 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8860
8861 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8862
8863 ({int}, handle_action_dollar, handle_action_at): Check for integer
8864 overflow.
8865
8866 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8867
8868 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8869 as well as \000. Check for UCHAR_MAX, not 255.
8870 Allow \x with an arbitrary positive number of digits, as in C.
8871 Check for overflow here.
8872 Allow \? and UCNs, for compatibility with C.
8873
8874 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8875 with quote slot used by complain_at.
8876
8877 * tests/input.at: Add tests for backslash-newline, m4 quotes
8878 in symbols, long literals, and funny escapes in strings.
8879
8880 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8881 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8882 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8883 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8884 * m4/mbswidth.m4: New file, from GNU coreutils.
8885
8886 * doc/bison.texinfo (Grammar Outline): Document // comments.
8887 (Symbols): Document that trigraphs have no special meaning in Bison,
8888 nor is backslash-newline allowed.
8889 (Actions): Document that trigraphs have no special meaning.
8890
8891 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8892 no longer used.
8893
8894 2002-11-02 Paul Eggert <eggert@twinsun.com>
8895
8896 * src/reader.c: Don't include quote.h; not needed.
8897 (get_merge_function): Reword warning to be consistent with
8898 type clash diagnostic in grammar_current_rule_check.
8899
8900 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8901 bug in trigraph handling.
8902
8903 * src/output.c (prepare_symbols): When printing token names,
8904 escape "[" as "@<:@" and likewise for "]".
8905
8906 * src/system.h (errno): Remove declaration, as we are now
8907 assuming C89 or better, and C89 guarantees errno.
8908
8909 2002-10-30 Paul Eggert <eggert@twinsun.com>
8910
8911 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8912 Check for close failures.
8913 * src/files.h (xfclose): Return void, not int, since it always
8914 returned zero.
8915 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8916 indicates one.
8917 * src/output.c (output_skeleton): Use xfclose rather than fclose
8918 and ferror. xfclose now checks ferror.
8919
8920 * data/glr.c (YYLEFTMOST_STATE): Remove.
8921 (yyreportTree): Use a stack-based leftmost state. This avoids
8922 our continuing battles with bogus warnings about initializers.
8923
8924 2002-10-30 Akim Demaille <akim@epita.fr>
8925
8926 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8927 #if.
8928
8929 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8930
8931 * tests/glr-regr1.at: New test for reported regressions.
8932 * tests/testsuite.at: Add glr-regr1.at test.
8933 * tests/Makefile.am: Add glr-regr1.at test.
8934
8935 2002-10-24 Paul Eggert <eggert@twinsun.com>
8936
8937 Version 1.75a.
8938
8939 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8940 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8941 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8942 Don't assume strdup exists; POSIX says its an XSI extension.
8943 Check for buffer overflow on input.
8944
8945 2002-10-24 Akim Demaille <akim@epita.fr>
8946
8947 * src/output.c (output_skeleton): Don't disable M4sugar comments
8948 too soon: it results in comments being expanded.
8949 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8950 first output.
8951
8952 2002-10-24 Akim Demaille <akim@epita.fr>
8953
8954 * data/yacc.c (m4_int_type): New.
8955 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8956 char' as only yacc.c wants K&R portability.
8957 * data/glr.c (yysigned_char): Remove.
8958 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8959 Reported by Quoc Peyrot.
8960
8961 2002-10-23 Paul Eggert <eggert@twinsun.com>
8962
8963 * src/main.c (main): With --trace=time, report times even if a
8964 non-fatal error occurs. Formerly, the times were reported in some
8965 such cases but not in others.
8966 * src/reader.c (reader): Just return if a complaint has been issued,
8967 instead of exiting, so that 'main' can report times.
8968
8969 2002-10-22 Akim Demaille <akim@epita.fr>
8970
8971 * src/system.h: Include sys/types.
8972 Reported by Bert Deknuydt.
8973
8974 2002-10-23 Paul Eggert <eggert@twinsun.com>
8975
8976 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8977 Suggested by Art Haas.
8978
8979 2002-10-22 Paul Eggert <eggert@twinsun.com>
8980
8981 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8982 decl; not needed any more.
8983 * src/main.c (main): Use return to exit, undoing yesterday's change.
8984 The last OS that we could find where this wouldn't work is
8985 SunOS 3.5, and that's too old to worry about now.
8986
8987 * data/glr.c (struct yyltype): Define members even when not
8988 doing locations. This is more consistent with yacc.c, and it
8989 works around the following bug reports:
8990 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8991 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8992
8993 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8994 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8995 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8996
8997 2002-10-22 Akim Demaille <akim@epita.fr>
8998
8999 * data/README: New.
9000
9001 2002-10-21 Paul Eggert <eggert@twinsun.com>
9002
9003 Be consistent about 'bool'; the old code used an enum in one
9004 module and an int in another, and this violates the C standard.
9005 * m4/stdbool.m4: New file, from coreutils 4.5.3.
9006 * configure.ac (AC_HEADER_STDBOOL): Add.
9007 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
9008 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
9009 * src/symtab.c (hash_compare_symbol_t): Likewise.
9010 * src/system.h (bool, false, true): Use a definition consistent
9011 with ../lib/hash.c. All uses changed.
9012
9013 * src/complain.c (warning_issued): Renamed from warn_message_count,
9014 so that we needn't worry about integer overflow (!).
9015 Now of type bool. All uses changed.
9016 (complaint_issued): Renamed from complain_message_count; likewise.
9017
9018 * src/main.c (main): Use exit to exit with failure.
9019
9020 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
9021 rather than 1 and 0.
9022 * src/main.c (main): Likewise.
9023 * src/getargs.c (getargs): Likewise.
9024 * src/reader.c (reader): Likewise.
9025
9026 * src/getarg.c (getargs): Remove duplicate code for
9027 "Try `bison --help'".
9028
9029 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
9030 What was that "2" for?
9031
9032 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
9033 * src/getargs.c (usage): Likewise.
9034
9035 * src/getargs.c (getargs): When there are too few operands, report
9036 the last one. When there are too many, report the first extra
9037 one. This is how diffutils does it.
9038
9039 2002-10-20 Paul Eggert <eggert@twinsun.com>
9040
9041 Remove K&R vestiges.
9042 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
9043 * src/complain.c (VA_START): Remove. Assume prototypes.
9044 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
9045 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
9046 fatal): Assume prototypes.
9047 * src/complain.h: Assume prototypes.
9048 * src/system.h (PARAMS): Remove.
9049 Include <limits.h> unconditionally, since it's guaranteeed even
9050 for a freestanding C89 compiler.
9051 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
9052 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
9053
9054 2002-10-20 Akim Demaille <akim@epita.fr>
9055
9056 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
9057 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
9058 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
9059 (yyresolveStates, yyresolveAction, yyresolveStack)
9060 (yyprocessOneStack): Use them.
9061 (yy_reduce_print): New.
9062 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
9063
9064 2002-10-20 Akim Demaille <akim@epita.fr>
9065
9066 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
9067 arguments and output `void'.
9068 (b4_c_function): Rename as...
9069 (b4_c_function_def): this.
9070 (b4_c_function_decl, b4_c_ansi_function_def)
9071 (b4_c_ansi_function_decl): New.
9072 Change the interpretation of the arguments: before `int, foo', now
9073 `int foo, foo'.
9074 * data/yacc.c (yyparse): Prototype and define thanks to these.
9075 Adjust b4_c_function_def uses.
9076 * data/glr.c (yyparse): Likewise, but ANSI only.
9077
9078 2002-10-20 Akim Demaille <akim@epita.fr>
9079
9080 * src/output.c (prepare): Move the definition of `tokens_number',
9081 `nterms_number', `undef_token_number', `user_token_number_max'
9082 to...
9083 (prepare_tokens): Here.
9084 (prepare_tokens): Rename as...
9085 (prepare_symbols): this.
9086 (prepare): Move the definition of `rules_number' to...
9087 (prepare_rules): here.
9088 (prepare): Move the definition of `last', `final_state_number',
9089 `states_number' to...
9090 (prepare_states): here.
9091 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
9092
9093 2002-10-20 Akim Demaille <akim@epita.fr>
9094
9095 * src/tables.h, src/tables.c, src/output.c: Comment changes.
9096
9097 2002-10-20 Akim Demaille <akim@epita.fr>
9098
9099 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
9100 * data/c.m4: here.
9101
9102 2002-10-20 Akim Demaille <akim@epita.fr>
9103
9104 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
9105 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
9106 `pair'.
9107 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
9108 `name' to...
9109 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
9110 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
9111 These.
9112
9113 2002-10-19 Paul Eggert <eggert@twinsun.com>
9114
9115 Do not create a temporary file, as that involves security and
9116 cleanup headaches. Instead, use a pair of pipes.
9117 Derived from a suggestion by Florian Krohm.
9118 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
9119 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
9120 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
9121 (BISON_PREREQ_SUBPIPE): Add.
9122 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
9123 Add subpipe.h, subpipe.c.
9124 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
9125 * po/POTFILES.in: Add lib/subpipe.c.
9126 * src/output.c: Include "subpipe.h".
9127 (m4_invoke): Remove decl.
9128 (scan_skel): New decl.
9129 (output_skeleton): Use pipe rather than temporary file for m4 input.
9130 Check that m4sugar.m4 is readable, to avoid deadlock.
9131 Check for pipe I/O error.
9132 * src/scan-skel.l (readpipe): Remove decl.
9133 (scan_skel): New function, to be used in place of m4_invoke.
9134 Read from stream rather than file.
9135
9136 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
9137 float, as this generates a warning on Solaris 8 + GCC 3.2 with
9138 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
9139 this generates a more-accurate value anyway.
9140
9141 * lib/timevar.c (timervar_accumulate): Rename locals to
9142 avoid confusion with similarly-named more-global.
9143 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
9144
9145 * src/output.c (prepare): Use xstrdup to convert char const *
9146 to char *, to avoid GCC warning.
9147
9148 2002-10-19 Akim Demaille <akim@epita.fr>
9149
9150 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
9151 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
9152 Use them to have `calc.y' ready for %pure-parser.
9153 * data/yacc.c (YYLEX): Pass a yylex return type to
9154 b4_c_function_call.
9155
9156 2002-10-19 Akim Demaille <akim@epita.fr>
9157
9158 Prototype support of %lex-param and %parse-param.
9159
9160 * src/parse-gram.y: Add the definition of the %lex-param and
9161 %parse-param tokens, plus their rules.
9162 Drop the `_' version of %glr-parser.
9163 Add the "," token.
9164 * src/scan-gram.l (INITIAL): Scan them.
9165 * src/muscle_tab.c: Comment changes.
9166 (muscle_insert, muscle_find): Rename `pair' as `probe'.
9167 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
9168 (muscle_entry_s): The `value' member is no longer const.
9169 Adjust all dependencies.
9170 * src/muscle_tab.c (muscle_init): Adjust: use
9171 MUSCLE_INSERT_STRING.
9172 Initialize the obstack earlier.
9173 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
9174 (muscle_pair_list_grow): New.
9175 * data/c.m4 (b4_c_function_call, b4_c_args): New.
9176 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
9177 * tests/calc.at: Use %locations, not --locations.
9178 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
9179
9180 2002-10-19 Akim Demaille <akim@epita.fr>
9181
9182 * src/getargs.c (usage): Take status as argument and exit
9183 accordingly.
9184 Report the traditional `Try ... --help' message when status != 0.
9185 (usage, version): Don't take a FILE * as arg, it is pointless.
9186 (getargs): When there is an incorrect number of arguments, make it
9187 an error, and report it GNUlically thanks to `usage ()'.
9188
9189 2002-10-18 Paul Eggert <eggert@twinsun.com>
9190
9191 * data/glr.c (yyreportParseError): Don't assume that sprintf
9192 yields the length of the printed string, as this is not true
9193 on SunOS 4.1.4. Reported by Peter Klein.
9194
9195 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
9196 * tests/conflicts.at (%nonassoc and eof): Likewise.
9197 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
9198
9199 2002-10-17 Akim Demaille <akim@epita.fr>
9200
9201 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
9202 * src/getargs.c (trace_types, trace_args): Adjust.
9203 * src/reader.c (grammar_current_rule_prec_set)
9204 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
9205 Standardize error messages.
9206 And s/@prec/%prec/!
9207 (reader): Use trace_flag to enable scanner/parser debugging,
9208 instead of an adhoc scheme.
9209 * src/scan-gram.l: Remove trailing debugging code.
9210
9211 2002-10-16 Paul Eggert <eggert@twinsun.com>
9212
9213 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9214 MUSCLE_TAB_H.
9215
9216 * NEWS: Officially drop support for building Bison with K&R C,
9217 since it didn't work anyway and it's not worth worrying about.
9218 * Makefile.maint (wget_files): Remove ansi2knr.c.
9219 (ansi2knr.c-url_prefix): Remove.
9220 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9221 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9222 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9223
9224 2002-10-15 Paul Eggert <eggert@twinsun.com>
9225
9226 Stop using the "enum_" trick for K&R-style function definitions;
9227 it confused me, and I was the author! Instead, assume that people
9228 who want to use K&R C compilers (when using these modules in GCC,
9229 perhaps?) will run ansi2knr.
9230
9231 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9232 All uses of "enum_" changed to "enum ".
9233 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9234 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9235
9236 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9237 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9238 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9239 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9240 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9241 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9242 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9243 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9244 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9245 Use function prototypes; this removes the need for declaring
9246 static functions simply to provide their prototypes.
9247 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9248 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9249 bitset_count_, bitset_create, bitset_dump, bitset_first,
9250 bitset_free, bitset_init, bitset_last, bitset_next,
9251 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9252 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9253 bitset_print, bitset_release_memory, bitset_toggle_,
9254 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9255 debug_bitset): Likewise.
9256 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9257 * lib/bitset_stats.c (bitset_log_histogram_print,
9258 bitset_percent_histogram_print, bitset_stats_and,
9259 bitset_stats_and_cmp, bitset_stats_and_or,
9260 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9261 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9262 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9263 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9264 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9265 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9266 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9267 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9268 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9269 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9270 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9271 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9272 bitset_stats_zero): Likewise.
9273 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9274 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9275 bitsetv_dump, debug_bitsetv): Likewise.
9276 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9277 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9278 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9279 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9280 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9281 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9282 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9283 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9284 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9285 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9286 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9287 Likewise.
9288 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9289 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9290 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9291 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9292 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9293 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9294 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9295 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9296 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9297 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9298 lbitset_xor_cmp, lbitset_zero): Likewise.
9299
9300 2002-10-14 Akim Demaille <akim@epita.fr>
9301
9302 Version 1.75.
9303
9304 2002-10-14 Akim Demaille <akim@epita.fr>
9305
9306 * tests/Makefile.am (maintainer-check-posix): New.
9307
9308 2002-10-14 Akim Demaille <akim@epita.fr>
9309
9310 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9311 member.
9312
9313 2002-10-14 Akim Demaille <akim@epita.fr>
9314
9315 * src/tables.c (table_ninf_remap): base -> tab.
9316 Reported by Matt Rosing.
9317
9318 2002-10-14 Paul Eggert <eggert@twinsun.com>
9319
9320 * tests/action.at, tests/calc.at, tests/conflicts.at,
9321 tests/cxx-type.at, tests/headers.at, tests/input.at,
9322 tests/regression.at, tests/synclines.at, tests/torture.at:
9323 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9324 so that the tests still work even if POSIXLY_CORRECT is set.
9325 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
9326
9327 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9328 for portability to K&R hosts. Fix typo: signed char is guaranteed
9329 only to 127, not to 128.
9330 * data/glr.c (yysigned_char): New type.
9331 * data/yacc.c (yysigned_char): Likewise.
9332 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9333
9334 2002-10-13 Paul Eggert <eggert@twinsun.com>
9335
9336 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9337 true due to limited range of data type" warning from GCC.
9338
9339 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9340 by wrapping enum yytokentype's definition inside #ifndef
9341 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9342
9343 2002-10-13 Akim Demaille <akim@epita.fr>
9344
9345 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9346 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9347
9348 2002-10-13 Akim Demaille <akim@epita.fr>
9349
9350 * Makefile.maint: Update from Autoconf 2.54.
9351 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9352
9353 2002-10-13 Akim Demaille <akim@epita.fr>
9354
9355 * src/print.c (print_state): Separate the list of solved conflicts
9356 from the other items.
9357 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9358
9359 2002-10-13 Akim Demaille <akim@epita.fr>
9360
9361 Let nondeterministic skeletons be usable with deterministic
9362 tables.
9363
9364 With the patch, GAWK compiled by GCC without -O2 passes its test
9365 suite using a GLR parser driven by LALR tables. It fails with -O2
9366 because `struct stat' gives two different answers on my machine:
9367 88 (definition of an auto var) and later 96 (memset on this var).
9368 Hence the stack is badly corrumpted. The headers inclusion is to
9369 blame: if I move the awk.h inclusion before GLR's system header
9370 inclusion, the two struct stat have the same size.
9371
9372 * src/tables.c (pack_table): Always create conflict_table.
9373 (token_actions): Always create conflict_list.
9374 * data/glr.c (YYFLAG): Remove, unused.
9375
9376 2002-10-13 Akim Demaille <akim@epita.fr>
9377
9378 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9379 (O0FLAGS): New.
9380 (VALGRIND, GXX): New.
9381 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9382 * tests/bison.in: Run $PREBISON a pre-command.
9383 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9384 (maintainer-check-g++): New.
9385 * Makefile.am (maintainer-check): New.
9386
9387 2002-10-13 Akim Demaille <akim@epita.fr>
9388
9389 * data/glr.c: Formatting changes.
9390 Tweak some trace messages to match yacc.c's.
9391
9392 2002-10-13 Akim Demaille <akim@epita.fr>
9393
9394 GLR parsers sometimes raise parse errors instead of performing the
9395 default reduction.
9396 Reported by Charles-Henry de Boysson.
9397
9398 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
9399 check the length of the traces when %glr.
9400 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9401 GLR's traces.
9402 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9403 Test GLR parsers.
9404 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9405 (yyltype): Remove the yy prefix from the member names.
9406 (yytable): Complete its comment.
9407 (yygetLRActions): Map error action number from YYTABLE from
9408 YYTABLE_NINF to 0.
9409 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9410 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9411 not satisfying as we could compare an YYACTION computed from
9412 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9413 only value for error actions.
9414 (yyreportParseError): In verbose parse error messages, don't issue
9415 `error' in the list of expected tokens.
9416 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9417 next action to perform to match glr.c's decoding.
9418 (yytable): Complete its comment.
9419
9420 2002-10-13 Paul Eggert <eggert@twinsun.com>
9421
9422 Fix problem reported by Henrik Grubbstroem in
9423 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
9424 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9425 because the Bison parser reads the second action before reducing
9426 the first one.
9427 * src/scan-gram.l (rule_length): New static var.
9428 Use it to keep track of the rule length in the scanner, since
9429 we can't expect the parser to be in lock-step sync with the scanner.
9430 (handle_action_dollar, handle_action_at): Use this var.
9431 * tests/actions.at (Exotic Dollars): Test for the problem.
9432
9433 2002-10-12 Paul Eggert <eggert@twinsun.com>
9434
9435 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9436 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9437 Include <sys/time.h> when checking for clock_t and struct tms.
9438 Use same include order as source.
9439 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9440 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9441
9442 * lib/timevar.c: Update copyright date and clarify comments.
9443 (get_time) [IN_GCC]: Keep the GCC version for reference.
9444
9445 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9446 GCC version as of today, then merge Bison's changes.
9447 Change "GCC" to "Bison" in copyright notice. timevar.def's
9448 author is Akim, so change that too.
9449
9450 * src/reader.c (grammar_current_rule_check):
9451 Don't worry about the default action if $$ is untyped.
9452 Prevents bogus warnings reported by Jim Gifford in
9453 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9454
9455 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9456 * data/glr.c, data/lalr1.cc, data/yacc.c:
9457 Output token definitions before the first part of user declarations.
9458 Fixes compatibility problem reported by Jim Gifford for kbd in
9459 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9460
9461 2002-10-11 Paul Eggert <eggert@twinsun.com>
9462
9463 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9464 (yyparse): here. This undoes some of the 2002-07-25 change.
9465 Compatibility problem reported by Ralf S. Engelschall with
9466 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9467
9468 2002-10-11 Akim Demaille <akim@epita.fr>
9469
9470 * tests/regression.at Characters Escapes): New.
9471 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9472 characters.
9473 Reported by Jan Nieuwenhuizen.
9474
9475 2002-10-11 Akim Demaille <akim@epita.fr>
9476
9477 * po/id.po: New.
9478
9479 2002-10-10 Paul Eggert <eggert@twinsun.com>
9480
9481 Portability fixes for bitsets; this also avoids several GCC
9482 warnings.
9483
9484 * lib/abitset.c: Include <stddef.h>, for offsetof.
9485 * lib/lbitset.c: Likewise.
9486
9487 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9488 properly for vectors of objects. Do not assume that adding a
9489 header size to a multiple of a word size yields a value that is
9490 properly aligned for the whole union.
9491 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9492
9493 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9494 unique names for structures.
9495 * lib/ebitset.c (ebitset_bytes): Likewise.
9496 * lib/lbitset.c (lbitset_bytes): Likewise.
9497
9498 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9499 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9500 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9501 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9502 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9503 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9504 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9505 to improve the type-checking that GCC can do.
9506 * lib/bitset.c (bitset_op4_cmp): Likewise.
9507 * lib/bitset_stats.c (bitset_stats_count,
9508 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9509 bitset_stats_copy, bitset_stats_disjoint_p,
9510 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9511 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9512 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9513 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9514 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9515 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9516 bitset_stats_or_and_cmp): Likewise.
9517 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9518 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9519 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9520 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9521
9522 * lib/abitset.h: Include bitset.h, not bbitset.h.
9523 * lib/ebitset.h: Likewise.
9524 * lib/lbitset.h: Likewise.
9525
9526 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9527 All instances of parameters of type enum bitset_opts are now of
9528 type enum_bitset_opts, to conform to the C Standard, and similarly
9529 for enum_bitset_type.
9530 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9531 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9532
9533 Do not use "struct bitset_struct" to mean different things in
9534 different modules. Not only is this confusing, it violates
9535 the C Standard, which requires that structure types in different
9536 modules must be compatible if one is to be passed to the other.
9537 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9538 All instances of "struct bitset_struct *" replaced with "bitset".
9539 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9540 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9541 struct lbitset_struct, struct bitset_stats_struct): New types.
9542 All uses of struct bitset_struct changed to union bitset_union,
9543 etc.
9544 * lib/abitset.c (struct abitset_struct, abitset,
9545 struct bitset_struct): Remove.
9546 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9547 struct bitset_struct): Remove.
9548 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9549 bitset_struct): Remove.
9550 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9551 Likewise.
9552
9553 Do not call a function of type T using a call that assumes the
9554 function is of a different type U. Standard C requires that a
9555 function must be called with a type that is compatible with its
9556 definition.
9557 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9558 New decls.
9559 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9560 New functions.
9561 * lib/ebitset.c (PFV): Remove.
9562 * lib/lbitset.c (PFV): Likewise.
9563 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9564 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9565 decls.
9566 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9567 (ebitset_vtable): Use them.
9568 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9569 lbitset_xor): New functions.
9570 (lbitset_vtable): Use them.
9571
9572 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9573 Declare.
9574
9575 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9576 GCC warning.
9577 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9578 Use offsetof, for simplicity.
9579
9580 2002-10-06 Paul Eggert <eggert@twinsun.com>
9581
9582 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9583 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9584 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9585 which was inadvertently undone by the 2002-09-30 patch.
9586 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9587 the same width as int.
9588
9589 2002-10-04 Paul Eggert <eggert@twinsun.com>
9590
9591 Version 1.50.
9592
9593 * configure.ac (AC_INIT), NEWS: Increment version number.
9594
9595 * doc/bison.texinfo: Minor spelling, grammar, and white space
9596 fixes.
9597 (Symbols): Mention that any negative value returned from yylex
9598 signifies end-of-input. Warn about negative chars. Mention
9599 the portable Standard C character set.
9600
9601 The GNU coding standard says CFLAGS and YFLAGS are reserved
9602 for the installer to set.
9603 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9604 * src/Makefile.am (AM_CFLAGS): Likewise.
9605 (AM_YFLAGS): Renamed from YFLAGS.
9606
9607 Fix some MAX and MIN problems.
9608 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9609 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9610 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9611 * src/reader.c (reader): Use it.
9612
9613 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9614 POSIX 1003.1-2001 has removed fgrep.
9615
9616 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9617
9618 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9619 interpreted as signed.
9620 * lib/ebitset.c (ebitset_list): Fix bug.
9621
9622 2002-10-01 Paul Eggert <eggert@twinsun.com>
9623
9624 More fixes for 64-bit hosts and large bitsets.
9625
9626 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9627 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9628 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9629 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9630 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9631 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9632 bitset_count_): Likewise.
9633 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9634 bitset_first, bitset_last): Likewise.
9635 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9636 bitset_stats_list_reverse, bitset_stats_size,
9637 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9638 Likewise.
9639 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9640 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9641 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9642 bitsetv_reflexive_transitive_closure): Likewise.
9643 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9644 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9645 Likewise.
9646 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9647 Likewise.
9648
9649 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9650 Use size_t, not unsigned int, to count bytes.
9651 * lib/abitset.h (abitset_bytes): Likewise.
9652 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9653 Likewise.
9654 * lib/bitset.h (bitset_bytes): Likewise.
9655 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9656 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9657 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9658 * lib/ebitset.c (ebitset_bytes): Likewise.
9659 * lib/ebitset.h (ebitset_bytes): Likewise.
9660 * lib/lbitset.c (lbitset_bytes): Likewise.
9661 * lib/lbitset.h (lbitset_bytes): Likewise.
9662
9663 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9664 abitset_subset_p, abitset_disjoint_p, abitset_and,
9665 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9666 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9667 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9668 abitset_or_and, abitset_or_and_cmp):
9669 Use bitset_windex instead of unsigned int.
9670 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9671 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9672 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9673 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9674 Likewise.
9675 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9676
9677 * lib/bitset.c (bitset_print):
9678 Use proper printf formats for widths of integer types.
9679 * lib/bitset_stats.c (bitset_percent_histogram_print,
9680 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9681 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9682 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9683 * lib/lbitset.c (lbitset_bytes): Likewise.
9684
9685 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9686 BITSET_SIZE_MAX): New macros.
9687 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9688 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9689 to BITSET_WINDEX_MAX.
9690
9691 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9692 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9693 since we now return the bitset_bindex type (not int).
9694
9695 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9696 when computing sizes.
9697 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9698
9699 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9700 and avoid cast to unsigned.
9701
9702 2002-09-30 Akim Demaille <akim@epita.fr>
9703
9704 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9705 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9706 Updates from Michael Hayes.
9707
9708 2002-09-30 Art Haas <ahaas@neosoft.com>
9709
9710 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9711 invocations.
9712 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9713 defined.
9714
9715 2002-09-27 Akim Demaille <akim@epita.fr>
9716
9717 Version 1.49c.
9718
9719 2002-09-27 Akim Demaille <akim@epita.fr>
9720
9721 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9722 (Because of AC_LIBSOURCE).
9723
9724 2002-09-27 Akim Demaille <akim@epita.fr>
9725
9726 Playing with Autoscan.
9727
9728 * configure.ac: Remove the old LIBOBJ tweaks.
9729 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9730 * lib/strrchr.c: New.
9731 * lib/strtol.c: New, from the Coreutils 4.5.1.
9732
9733 2002-09-27 Akim Demaille <akim@epita.fr>
9734
9735 Playing with Autoscan.
9736
9737 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9738 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9739 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9740 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9741 Coreutils 4.5.1.
9742
9743 2002-09-24 Akim Demaille <akim@epita.fr>
9744
9745 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9746 (Frequently Asked Questions, Parser Stack Overflow): New.
9747
9748 2002-09-13 Akim Demaille <akim@epita.fr>
9749
9750 Playing with autoscan.
9751
9752 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9753 * src/files.c (skeleton_find): Remove, unused.
9754 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9755 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9756
9757 2002-09-13 Akim Demaille <akim@epita.fr>
9758
9759 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9760 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9761
9762 2002-09-13 Akim Demaille <akim@epita.fr>
9763
9764 * configure.ac: Require 2.54.
9765 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9766 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9767 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9768 Remove, provided by Autoconf macros.
9769
9770 2002-09-12 Akim Demaille <akim@epita.fr>
9771
9772 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9773
9774 2002-09-12 Akim Demaille <akim@epita.fr>
9775
9776 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9777 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9778 Reported by Martin Mokrejs.
9779
9780 2002-09-10 Akim Demaille <akim@epita.fr>
9781
9782 * src/parse-gram.y: Associate a human readable string to each
9783 token type.
9784 * tests/regression.at (Invalid inputs): Adjust.
9785
9786 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9787
9788 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9789 with an Autoconf-2.5x style configure.ac.
9790
9791 2002-09-06 Paul Eggert <eggert@twinsun.com>
9792
9793 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9794 exception applies only to yacc.c. This is a modification of a
9795 patch originally suggested by Akim Demaille.
9796
9797 2002-09-06 Akim Demaille <akim@epita.fr>
9798
9799 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9800 here to...
9801 * data/yacc.c: here.
9802
9803 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9804 LocationType.
9805 (b4_ltype): Default to yy::Location from location.hh.
9806
9807 2002-09-04 Jim Meyering <jim@meyering.net>
9808
9809 * data/yacc.c: Guard the declaration of yytoknum also with
9810 `#ifdef YYPRINT', so it is declared only when used.
9811
9812 2002-09-04 Akim Demaille <akim@epita.fr>
9813
9814 * configure.in: Rename as...
9815 * configure.ac: this.
9816 Bump to 1.49c.
9817
9818 2002-09-04 Akim Demaille <akim@epita.fr>
9819
9820 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9821 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9822 translate maintainer only messages.
9823
9824 2002-08-12 Paul Eggert <eggert@twinsun.com>
9825
9826 Version 1.49b.
9827
9828 * Makefile.am (SUBDIRS): Remove intl.
9829 (DISTCLEANFILES): Remove.
9830 * NEWS: Mention that GNU M4 is now required. Clarify what is
9831 meant by "larger grammars". Mention the pt_BR translation.
9832 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9833 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9834 Bump version from 0.11.2 to 0.11.5.
9835 (BISON_PREREQ_STAGE): Remove.
9836 (AM_GNU_GETTEXT): Use external gettext.
9837 (AC_OUTPUT): Remove intl/Makefile.
9838
9839 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9840
9841 * data/glr.c: Include string.h, for strlen.
9842 (yyreportParseError): Use size_t for yysize.
9843 (yy_yypstack): No longer nested inside yypstates, as nested
9844 functions are not portable. Do not assume size_t is the
9845 same width as int.
9846 (yypstates): Do not assume that ptrdiff_t is the same width
9847 as int, and similarly for yyposn and YYINDEX.
9848
9849 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9850
9851 * lib/Makefile.am (INCLUDES): Do not include from the intl
9852 directory, which has been removed.
9853 * src/Makefile.am (INCLUDES): Likewise.
9854
9855 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9856 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9857 New vars.
9858
9859 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9860 * tests/Makefile.am (EXTRA_DIST): Likewise.
9861
9862 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9863 Do not assume that bitset_windex is the same width as unsigned.
9864
9865 * lib/abitset.c (abitset_unused_clear): Do not assume that
9866 bitset_word is the same width as int.
9867 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9868 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9869 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9870 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9871 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9872
9873 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9874 portability to one's complement hosts!).
9875 * lib/ebitset.c (ebitset_op1): Likewise.
9876 * lib/lbitset.c (lbitset_op1): Likewise.
9877
9878 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9879 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9880 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9881 Sync with fileutils.
9882 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9883 lib/gettext.h: Sync with diffutils.
9884
9885 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9886 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9887
9888 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9889 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9890 check for void *.
9891
9892 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9893 size_t; the old version tried to do this but casted improperly.
9894 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9895 (bitset_test): Now returns int, not unsigned long.
9896
9897 * lib/bitset_stats.c: Include "gettext.h".
9898 (_): New macro.
9899 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9900 name locals "index", as it generates unnecessary warnings on some
9901 hosts that have an "index" function.
9902
9903 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9904 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9905 they need translation.
9906 * src/LR0.c (state_list_append, new_itemsets, get_state,
9907 append_states, generate_states): Likewise.
9908 * src/assoc.c (assoc_to_string): Likewise.
9909 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9910 * src/gram.c (grammar_dump): Likewise.
9911 * src/injections.c (injections_compute): Likewise.
9912 * src/lalr.c (lookaheads_print): Likewise.
9913 * src/relation.c (relation_transpose): Likewise.
9914 * src/scan-gram.l: Likewise.
9915 * src/tables.c (table_grow, pack_vector): Likewise.
9916
9917 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9918 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9919 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9920 * m4/mbstate_t.m4: Sync with fileutils.
9921 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9922
9923 * po/LINGUAS: Add pt_BR.
9924 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9925 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9926 lib/timevar.c.
9927 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9928 manual recommends.
9929 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9930
9931 * src/complain.c (strerror_r): Remove decl; not needed.
9932 (strerror): Use same pattern as ../lib/error.c.
9933
9934 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9935
9936 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9937
9938 * src/main.c (main): Cast result of bindtextdomain and textdomain
9939 to void, to avoid a GCC warning when --disable-nls is in effect.
9940
9941 * src/scan-gram.l: Use strings rather than escapes when possible,
9942 to minimize the number of warnings from xgettext.
9943 (handle_action_dollar, handle_action_at): Don't use isdigit,
9944 as it mishandles negative chars and it may not work as expected
9945 outside the C locale.
9946
9947 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9948 this is a GCC extension and is not portable to other compilers.
9949
9950 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9951 Do not include <ctype.h>; no longer needed.
9952 Do not include <malloc.h>; no longer needed (and generates
9953 warnings on OpenBSD 3.0).
9954
9955 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9956 it's not portable.
9957
9958 * tests/regression.at: Do not use 'cc -c input.c -o input';
9959 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9960
9961 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9962 exit status as failure, not just exit status 1. Sun C exits
9963 with status 2 sometimes.
9964
9965 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9966 Use it for the two large tests.
9967
9968 2002-08-02 Akim Demaille <akim@epita.fr>
9969
9970 * src/conflicts.c (conflicts_output): Don't output rules never
9971 reduced here, since anyway that computation doesn't work.
9972 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9973 (rule_useless_p, rule_never_reduced_p): New.
9974 (grammar_rules_partial_print): Use a filter instead of a range.
9975 Display the title only if needed.
9976 (grammar_rules_print): Adjust.
9977 (grammar_rules_never_reduced_report): New.
9978 * src/tables.c (action_row): Move the computation of rules never
9979 reduced to...
9980 (token_actions): here.
9981 * src/main.c (main): Make the parser before making the report, so
9982 that rules never reduced are computed.
9983 Call grammar_rules_never_reduced_report.
9984 * src/print.c (print_results): Report rules never reduced.
9985 * tests/conflicts.at, tests/reduce.at: Adjust.
9986
9987 2002-08-01 Akim Demaille <akim@epita.fr>
9988
9989 Instead of attaching lookaheads and duplicating the rules being
9990 reduced by a state, attach the lookaheads to the reductions.
9991
9992 * src/state.h (state_t): Remove the `lookaheads',
9993 `lookaheads_rule' member.
9994 (reductions_t): Add a `lookaheads' member.
9995 Use a regular array for the `rules'.
9996 * src/state.c (reductions_new): Initialize the lookaheads member
9997 to 0.
9998 (state_rule_lookaheads_print): Adjust.
9999 * src/state.h, src/state.c (state_reductions_find): New.
10000 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
10001 (count_rr_conflicts): Adjust.
10002 * src/lalr.c (LArule): Remove.
10003 (add_lookback_edge): Adjust.
10004 (state_lookaheads_count): New.
10005 (states_lookaheads_initialize): Merge into...
10006 (initialize_LA): this.
10007 (lalr_free): Adjust.
10008 * src/main.c (main): Don't free nullable and derives too early: it
10009 is used by --verbose.
10010 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
10011
10012 2002-08-01 Akim Demaille <akim@epita.fr>
10013
10014 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
10015 `rule_number_t**'.
10016 (set_derives, free_derives): Rename as...
10017 (derives_compute, derives_free): this.
10018 Adjust all dependencies.
10019 * src/nullable.c (set_nullable, free_nullable): Rename as...
10020 (nullable_compute, nullable_free): these.
10021 (rule_list_t): Store rule_t *, not rule_number_t.
10022 * src/state.c (state_rule_lookaheads_print): Directly compare rule
10023 pointers, instead of their numbers.
10024 * src/main.c (main): Call nullable_free, and derives_free earlier,
10025 as they were lo longer used.
10026
10027 2002-08-01 Akim Demaille <akim@epita.fr>
10028
10029 * lib/timevar.c (get_time): Include children time.
10030 * src/lalr.h (LA, LArule): Don't export them: used with the
10031 state_t.
10032 * src/lalr.c (LA, LArule): Static.
10033 * src/lalr.h, src/lalr.c (lalr_free): New.
10034 * src/main.c (main): Call it.
10035 * src/tables.c (pack_vector): Check whether loc is >= to the
10036 table_size, not >.
10037 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
10038 (tables_generate): do it, since that's also it which allocates
10039 them.
10040 Don't free LA and LArule, main does.
10041
10042 2002-07-31 Akim Demaille <akim@epita.fr>
10043
10044 Separate parser tables computation and output.
10045
10046 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
10047 (conflict_list, conflict_list_cnt, table, check, table_ninf)
10048 (yydefgoto, yydefact, high): Move to...
10049 * src/tables.h, src/tables.c: here.
10050 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10051 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10052 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
10053 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
10054 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
10055 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
10056 (action_row, save_row, token_actions, save_column, default_goto)
10057 (goto_actions, sort_actions, matching_state, pack_vector)
10058 (table_ninf_remap, pack_table, prepare_actions): Move to...
10059 * src/tables.c: here.
10060 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
10061 * src/output.c (token_actions, output_base, output_conflicts)
10062 (output_check): Merge into...
10063 (prepare_actions): this.
10064 (actions_output): Rename as...
10065 (user_actions_output): this.
10066 * src/main.c (main): Call tables_generate and tables_free.
10067
10068 2002-07-31 Akim Demaille <akim@epita.fr>
10069
10070 Steal GCC's --time-report support.
10071
10072 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
10073 stolen/adjusted from GCC.
10074 * m4/stage.m4: Remove time related checks.
10075 * m4/timevar.m4: New.
10076 * configure.in: Adjust.
10077 * src/system.h: Adjust to using timevar.h.
10078 * src/getargs.h, src/getargs.c: Support trace_time for
10079 --trace=time.
10080 * src/main.c (stage): Remove.
10081 (main): Replace `stage' invocations with timevar calls.
10082 * src/output.c: Insert pertinent timevar calls.
10083
10084 2002-07-31 Akim Demaille <akim@epita.fr>
10085
10086 Let --trace have arguments.
10087
10088 * src/getargs.h (enum trace_e): New.
10089 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
10090 (long_options, short_options): --trace/-T takes an optional
10091 argument.
10092 Change all the uses of trace_flag to reflect the new flags.
10093 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
10094
10095 Strengthen `stage' portability.
10096
10097 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
10098 * configure.in: Use it.
10099 Don't check for malloc.h and sys/times.h.
10100 * src/system.h: Include them when appropriate.
10101 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
10102 times and struct tms are available.
10103
10104 2002-07-30 Akim Demaille <akim@epita.fr>
10105
10106 In verbose parse error message, don't report `error' as an
10107 expected token.
10108 * tests/actions.at (Printers and Destructors): Adjust.
10109 * tests/calc.at (Calculator $1): Adjust.
10110 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
10111 error message, do not report the parser accepts the error token in
10112 that state.
10113
10114 2002-07-30 Akim Demaille <akim@epita.fr>
10115
10116 Normalize conflict related messages.
10117
10118 * src/complain.h, src/complain.c (warn, complain): New.
10119 * src/conflicts.c (conflicts_print): Use them.
10120 (conflict_report_yacc): New, extracted from...
10121 (conflicts_print): here.
10122 * tests/conflicts.at, tests/existing.at: Adjust.
10123
10124 2002-07-30 Akim Demaille <akim@epita.fr>
10125
10126 Report rules which are never reduced by the parser: those hidden
10127 by conflicts.
10128
10129 * src/LR0.c (save_reductions): Don't make the final state too
10130 different: save its reduction (accept) instead of having a state
10131 without any action (no shift or goto, no reduce).
10132 Note: the final state is now a ``regular'' state, i.e., the
10133 parsers now contain `reduce 0' as default reduction.
10134 Nevertheless, since they decide to `accept' when yystate =
10135 final_state, they still will not reduce rule 0.
10136 * src/print.c (print_actions, print_reduction): Adjust.
10137 * src/output.c (action_row): Track reduced rules.
10138 (token_actions): Report rules never reduced.
10139 * tests/conflicts.at, tests/regression.at: Adjust.
10140
10141 2002-07-30 Akim Demaille <akim@epita.fr>
10142
10143 `stage' was accidently included in a previous patch.
10144 Initiate its autoconfiscation.
10145
10146 * configure.in: Look for malloc.h and sys/times.h.
10147 * src/main.c (stage): Adjust.
10148 Report only when trace_flag.
10149
10150 2002-07-29 Akim Demaille <akim@epita.fr>
10151
10152 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
10153 state_number_t.
10154 (errs_t): symbol_t*, not symbol_number_t.
10155 (reductions_t): rule_t*, not rule_number_t.
10156 (FOR_EACH_SHIFT): New.
10157 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
10158 * src/print.c, src/print_graph.c: Adjust.
10159
10160 2002-07-29 Akim Demaille <akim@epita.fr>
10161
10162 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
10163
10164 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
10165 (endtoken, accept): these.
10166 * src/reader.c (reader): Set endtoken's default tag to "$end".
10167 Set undeftoken's tag to "$undefined" instead of "$undefined.".
10168 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
10169 Adjust.
10170
10171 2002-07-29 Akim Demaille <akim@epita.fr>
10172
10173 * src/reduce.c (reduce_grammar): When the language is empty,
10174 complain about the start symbol, not the axiom.
10175 Use its location.
10176 * tests/reduce.at (Empty Language): New.
10177
10178 2002-07-26 Akim Demaille <akim@epita.fr>
10179
10180 * src/reader.h, src/reader.c (gram_error): ... can't get
10181 yycontrol without making too strong assumptions on the parser
10182 itself.
10183 * src/output.c (prepare_tokens): Use the real 0th value of
10184 token_translations instead of `0'.
10185 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
10186 visible here.
10187 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
10188 for the time being: %locations ought to provide it to yyerror.
10189
10190 2002-07-25 Akim Demaille <akim@epita.fr>
10191
10192 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
10193 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
10194 * tests/regression.at (Web2c Actions): Adjust.
10195
10196 2002-07-25 Akim Demaille <akim@epita.fr>
10197
10198 Stop storing rules from 1 to nrules + 1.
10199
10200 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
10201 * src/nullable.c, src/output.c, src/print.c, src/reader.c
10202 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
10203 Iterate from 0 to nrules.
10204 Use rule_number_as_item_number and item_number_as_rule_number.
10205 Adjust to `derive' now containing possibly 0.
10206 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
10207 Handle the `- 1' part in rule numbers from/to item numbers.
10208 * src/conflicts.c (log_resolution): Fix the message which reversed
10209 shift and reduce.
10210 * src/output.c (action_row): Initialize default_rule to -1.
10211 (token_actions): Adjust.
10212 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
10213 expected output.
10214 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10215
10216 2002-07-25 Akim Demaille <akim@epita.fr>
10217
10218 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10219 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10220 (b4_c_knr_arg_decl): New.
10221 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10222 yyreport_parse_error.
10223
10224 2002-07-25 Akim Demaille <akim@epita.fr>
10225
10226 * data/yacc.c (yyreport_parse_error): New, extracted from...
10227 (yyparse): here.
10228 (yydestruct, yysymprint): Move above yyparse.
10229 Be K&R compliant.
10230
10231 2002-07-25 Akim Demaille <akim@epita.fr>
10232
10233 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10234 replace...
10235 (b4_sint_type, b4_uint_type): these.
10236 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10237 * tests/regression.at (Web2c Actions): Adjust.
10238
10239 2002-07-25 Akim Demaille <akim@epita.fr>
10240
10241 * src/gram.h (TIEM_NUMBER_MAX): New.
10242 (item_number_of_rule_number, rule_number_of_item_number): Rename
10243 as...
10244 (rule_number_as_item_number, item_number_as_rule_number): these.
10245 Adjust dependencies.
10246 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10247 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10248 (symbol_number_to_vector_number): New.
10249 (order): Of vector_number_t* type.
10250 (base_t, BASE_MAX, BASE_MIN): New.
10251 (froms, tos, width, pos, check): Of base_t type.
10252 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10253 (actrow): Of action_number_t type.
10254 (conflrow): Of unsigned int type.
10255 (table_ninf, base_ninf): New.
10256 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10257 (muscle_insert_int_table, muscle_insert_base_table)
10258 (muscle_insert_rule_number_table): New.
10259 (prepare_tokens): Output `toknum' as int_table.
10260 (action_row): Returns a rule_number_t.
10261 Use ACTION_MIN, not SHRT_MIN.
10262 (token_actions): yydefact is rule_number_t*.
10263 (table_ninf_remap): New.
10264 (pack_table): Use it for `base' and `table'.
10265 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10266 replaced with...
10267 (YYPACT_NINF, YYTABLE_NINF): these.
10268 (yypact, yytable): Compute their types instead of hard-coded
10269 `short'.
10270 * tests/regression.at (Web2c Actions): Adjust.
10271
10272 2002-07-19 Akim Demaille <akim@epita.fr>
10273
10274 * src/scan-gram.l (id): Can start with an underscore.
10275
10276 2002-07-16 Akim Demaille <akim@epita.fr>
10277
10278 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10279 Adjust all former `associativity' dependencies.
10280 * src/symtab.c (symbol_new): Default associativity is `undef', not
10281 `right'.
10282 (symbol_check_alias_consistence): Adjust.
10283
10284 2002-07-09 Akim Demaille <akim@epita.fr>
10285
10286 * doc/bison.texinfo: Properly set the ``header'' part.
10287 Use @dircategory ``GNU programming tools'' as per Texinfo's
10288 documentation.
10289 Use @copying.
10290
10291 2002-07-09 Akim Demaille <akim@epita.fr>
10292
10293 * lib/quotearg.h: Protect against multiple inclusions.
10294 * src/location.h (location_t): Add a `file' member.
10295 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10296 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10297 `error_one_per_line' support.
10298
10299 2002-07-09 Akim Demaille <akim@epita.fr>
10300
10301 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10302 * src/reader.c (lineno): Remove.
10303 Adjust all dependencies.
10304 (get_merge_function): Take a location and use complain_at.
10305 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10306 * tests/regression.at (Invalid inputs, Mixing %token styles):
10307 Adjust.
10308
10309 2002-07-09 Akim Demaille <akim@epita.fr>
10310
10311 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10312 recovery rule, and forbid extensions when --yacc.
10313 (gram_error): Use complain_at.
10314 * src/reader.c (reader): Exit if there were parse errors.
10315
10316 2002-07-09 Akim Demaille <akim@epita.fr>
10317
10318 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10319 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10320 Reported by R Blake <blakers@mac.com>.
10321
10322 2002-07-09 Akim Demaille <akim@epita.fr>
10323
10324 * data/yacc.c: Output the copyright notive in the header.
10325
10326 2002-07-03 Akim Demaille <akim@epita.fr>
10327
10328 * src/output.c (froms, tos): Are state_number_t.
10329 (save_column): sp, sp1, and sp2 are state_number_t.
10330 (prepare): Rename `final' as `final_state_number', `nnts' as
10331 `nterms_number', `nrules' as `rules_number', `nstates' as
10332 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10333 unused.
10334 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10335 * data/lalr1.cc (nsym_): Remove, unused.
10336
10337 2002-07-03 Akim Demaille <akim@epita.fr>
10338
10339 * src/lalr.h, src/lalr.c (goto_number_t): New.
10340 * src/lalr.c (goto_list_t): New.
10341 Propagate them.
10342 * src/nullable.c (rule_list_t): New.
10343 Propagate.
10344 * src/types.h: Remove.
10345
10346 2002-07-03 Akim Demaille <akim@epita.fr>
10347
10348 * src/closure.c (print_fderives): Use rule_rhs_print.
10349 * src/derives.c (print_derives): Use rule_rhs_print.
10350 (rule_list_t): New, replaces `shorts'.
10351 (set_derives): Add comments.
10352 * tests/sets.at (Nullable, Firsts): Adjust.
10353
10354 2002-07-03 Akim Demaille <akim@epita.fr>
10355
10356 * src/output.c (prepare_actions): Free `tally' and `width'.
10357 (prepare_actions): Allocate and free `order'.
10358 * src/symtab.c (symbols_free): Free `symbols'.
10359 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10360 * src/output.c (m4_invoke): Move to...
10361 * src/scan-skel.l: here.
10362 (<<EOF>>): Close yyout, and free its name.
10363
10364 2002-07-03 Akim Demaille <akim@epita.fr>
10365
10366 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10367
10368 * src/LR0.c (new_state): Merge into...
10369 (state_list_append): this.
10370 (new_states): Merge into...
10371 (generate_states): here.
10372 (set_states): Don't ensure a proper `errs' state member here, do it...
10373 * src/conflicts.c (conflicts_solve): here.
10374 * src/state.h, src/state.c: Comment changes.
10375 (state_t): Rename member `shifts' as `transitions'.
10376 Adjust all dependencies.
10377 (errs_new): For consistency, also take the values as argument.
10378 (errs_dup): Remove.
10379 (state_errs_set): New.
10380 (state_reductions_set, state_transitions_set): Assert that no
10381 previous value was assigned.
10382 (state_free): New.
10383 (states_free): Use it.
10384 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10385 temporary storage: use `errs' and `nerrs' as elsewhere.
10386 (set_conflicts): Allocate and free this `errs'.
10387
10388 2002-07-02 Akim Demaille <akim@epita.fr>
10389
10390 * lib/libiberty.h: New.
10391 * lib: Update the bitset implementation from upstream.
10392 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10393 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10394 * src/main.c: Adjust bitset stats calls.
10395
10396 2002-07-01 Paul Eggert <eggert@twinsun.com>
10397
10398 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10399 char, so that negative chars don't collide with $.
10400
10401 2002-06-30 Akim Demaille <akim@epita.fr>
10402
10403 Have the GLR tests be `warning' checked, and fix the warnings.
10404
10405 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10406 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10407 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10408 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10409 (yyaddDeferredAction): static.
10410 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10411 (yyreportParseError): yyprefix is const.
10412 yytokenp is used only when verbose.
10413 (yy__GNUC__): Replace with __GNUC__.
10414 (yypdumpstack): yyi is size_t.
10415 (yypreference): Un-yy local variables and arguments, to avoid
10416 clashes with `yyr1'. Anyway, we are not in the user name space.
10417 (yytname_size): be an int, as is compared with ints.
10418 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10419 Use them.
10420 * tests/cxx-gram.at: Use quotation to protect $1.
10421 Use AT_COMPILE to enable warnings hunts.
10422 Prototype yylex and yyerror.
10423 `Use' argc.
10424 Include `string.h', not `strings.h'.
10425 Produce and prototype stmtMerge only when used.
10426 yylex takes a location.
10427
10428 2002-06-30 Akim Demaille <akim@epita.fr>
10429
10430 We spend a lot of time in quotearg, in particular when --verbose.
10431
10432 * src/symtab.c (symbol_get): Store a quoted version of the key.
10433 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10434 Adjust all callers.
10435
10436 2002-06-30 Akim Demaille <akim@epita.fr>
10437
10438 * src/state.h (reductions_t): Rename member `nreds' as num.
10439 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10440 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10441
10442 2002-06-30 Akim Demaille <akim@epita.fr>
10443
10444 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10445 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10446 (shifts_to): Rename as...
10447 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10448 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10449 (TRANSITION_IS_DISABLED, transitions_to): these.
10450
10451 2002-06-30 Akim Demaille <akim@epita.fr>
10452
10453 * src/print.c (print_shifts, print_gotos): Merge into...
10454 (print_transitions): this.
10455 (print_transitions, print_errs, print_reductions): Align the
10456 lookaheads columns.
10457 (print_core, print_transitions, print_errs, print_state,
10458 print_grammar): Output empty lines separator before, not after.
10459 (state_default_rule_compute): Rename as...
10460 (state_default_rule): this.
10461 * tests/conflicts.at (Defaulted Conflicted Reduction),
10462 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10463 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10464
10465 2002-06-30 Akim Demaille <akim@epita.fr>
10466
10467 Display items as we display rules.
10468
10469 * src/gram.h, src/gram.c (rule_lhs_print): New.
10470 * src/gram.c (grammar_rules_partial_print): Use it.
10471 * src/print.c (print_core): Likewise.
10472 * tests/conflicts.at (Defaulted Conflicted Reduction),
10473 (Unresolved SR Conflicts): Adjust.
10474 (Unresolved SR Conflicts): Adjust and rename as...
10475 (Resolved SR Conflicts): this, as was meant.
10476 * tests/regression.at (Web2c Report): Adjust.
10477
10478 2002-06-30 Akim Demaille <akim@epita.fr>
10479
10480 * src/print.c (state_default_rule_compute): New, extracted from...
10481 (print_reductions): here.
10482 Pessimize, but clarify the code.
10483 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10484
10485 2002-06-30 Akim Demaille <akim@epita.fr>
10486
10487 * src/output.c (action_row): Let default_rule be always a rule
10488 number.
10489
10490 2002-06-30 Akim Demaille <akim@epita.fr>
10491
10492 * src/closure.c (print_firsts, print_fderives, closure):
10493 Use BITSET_EXECUTE.
10494 * src/lalr.c (lookaheads_print): Likewise.
10495 * src/state.c (state_rule_lookaheads_print): Likewise.
10496 * src/print_graph.c (print_core): Likewise.
10497 * src/print.c (print_reductions): Likewise.
10498 * src/output.c (action_row): Likewise.
10499 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10500
10501 2002-06-30 Akim Demaille <akim@epita.fr>
10502
10503 * src/print_graph.c: Use report_flag.
10504
10505 2002-06-30 Akim Demaille <akim@epita.fr>
10506
10507 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10508 to...
10509 * src/relation.h, src/relation.c (traverse, relation_digraph)
10510 (relation_print, relation_transpose): New.
10511
10512 2002-06-30 Akim Demaille <akim@epita.fr>
10513
10514 * src/state.h, src/state.c (shifts_to): New.
10515 * src/lalr.c (build_relations): Use it.
10516
10517 2002-06-30 Akim Demaille <akim@epita.fr>
10518
10519 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10520 (item_number_of_rule_number, rule_number_of_item_number): New.
10521 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10522 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10523 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10524 Propagate their use.
10525 Much remains to be done, in particular wrt `shorts' from types.h.
10526
10527 2002-06-30 Akim Demaille <akim@epita.fr>
10528
10529 * src/symtab.c (symbol_new): Initialize the `printer' member.
10530
10531 2002-06-30 Akim Demaille <akim@epita.fr>
10532
10533 * src/LR0.c (save_reductions): Remove, replaced by...
10534 * src/state.h, src/state.c (state_reductions_set): New.
10535 (reductions, errs): Rename as...
10536 (reductions_t, errs_t): these.
10537 Adjust all dependencies.
10538
10539 2002-06-30 Akim Demaille <akim@epita.fr>
10540
10541 * src/LR0.c (state_list_t, state_list_append): New.
10542 (first_state, last_state): Now symbol_list_t.
10543 (this_state): Remove.
10544 (new_itemsets, append_states, save_reductions): Take a state_t as
10545 argument.
10546 (set_states, generate_states): Adjust.
10547 (save_shifts): Remove, replaced by...
10548 * src/state.h, src/state.c (state_shifts_set): New.
10549 (shifts): Rename as...
10550 (shifts_t): this.
10551 Adjust all dependencies.
10552 * src/state.h (state_t): Remove the `next' member.
10553
10554 2002-06-30 Akim Demaille <akim@epita.fr>
10555
10556 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10557 escaped in slot 0.
10558
10559 2002-06-30 Akim Demaille <akim@epita.fr>
10560
10561 Use hash.h for the state hash table.
10562
10563 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10564 (allocate_storage): Use state_hash_new.
10565 (free_storage): Use state_hash_free.
10566 (new_state, get_state): Adjust.
10567 * src/lalr.h, src/lalr.c (states): Move to...
10568 * src/states.h (state_t): Remove the `link' member, no longer
10569 used.
10570 * src/states.h, src/states.c: here.
10571 (state_hash_new, state_hash_free, state_hash_lookup)
10572 (state_hash_insert, states_free): New.
10573 * src/states.c (state_table, state_compare, state_hash): New.
10574 * src/output.c (output_actions): Do not free states now, since we
10575 still need to know the final_state number in `prepare', called
10576 afterwards. Do it...
10577 * src/main.c (main): here: call states_free after `output'.
10578
10579 2002-06-30 Akim Demaille <akim@epita.fr>
10580
10581 * src/state.h, src/state.c (state_new): New, extracted from...
10582 * src/LR0.c (new_state): here.
10583 * src/state.h (STATE_ALLOC): Move to...
10584 * src/state.c: here.
10585 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10586 * src/state.h, src/state.c: here.
10587
10588 2002-06-30 Akim Demaille <akim@epita.fr>
10589
10590 * src/reader.c (gensym): Rename as...
10591 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10592 (getsym): Rename as...
10593 (symbol_get): this.
10594
10595 2002-06-30 Akim Demaille <akim@epita.fr>
10596
10597 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10598 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10599 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10600 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10601
10602 2002-06-30 Akim Demaille <akim@epita.fr>
10603
10604 Make the test suite pass with warnings checked.
10605
10606 * tests/actions.at (Printers and Destructors): Improve.
10607 Avoid unsigned vs. signed issues.
10608 * tests/calc.at: Don't exercise the scanner here, do it...
10609 * tests/input.at (Torturing the Scanner): here.
10610
10611 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10612
10613 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10614 reorganize first lines parallel to yacc.c.
10615
10616 2002-06-28 Akim Demaille <akim@epita.fr>
10617
10618 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10619 (b4_token_enum, b4_token_defines): New, factored from...
10620 * data/lalr1.cc, data/yacc.c, glr.c: here.
10621
10622 2002-06-28 Akim Demaille <akim@epita.fr>
10623
10624 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10625 unused variables.
10626 * src/output.c (merger_output): static.
10627
10628 2002-06-28 Akim Demaille <akim@epita.fr>
10629
10630 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10631 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10632 pacify GCC.
10633 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10634
10635 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10636
10637 Accumulated changelog for new GLR parsing features.
10638
10639 * src/conflicts.c (count_total_conflicts): Change name to
10640 conflicts_total_count.
10641 * src/conflicts.h: Ditto.
10642 * src/output.c (token_actions): Use the new name.
10643 (output_conflicts): Change conflp => conflict_list_heads, and
10644 confl => conflict_list for better readability.
10645 * data/glr.c: Use the new names.
10646 * NEWS: Add self to GLR announcement.
10647
10648 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10649
10650 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10651 Akim Demaille.
10652
10653 * data/bison.glr: Change name to glr.c
10654 * data/glr.c: Renamed from bison.glr.
10655 * data/Makefile.am: Add glr.c
10656
10657 * src/getargs.c:
10658
10659 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10660 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10661
10662 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10663
10664 * data/bison.glr: Be sure to restore the
10665 current #line when returning to the skeleton contents after having
10666 exposed the input file's #line.
10667
10668 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10669
10670 * data/bison.glr: Bring up to date with changes to bison.simple.
10671
10672 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10673
10674 * data/bison.glr: Correct definitions that use b4_prefix.
10675 Various reformatting.
10676 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10677 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10678 yytokenp argument; now part of stack.
10679 (yychar): Define to behave as documented.
10680 (yyclearin): Ditto.
10681
10682 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10683
10684 * src/reader.h: Add declaration for free_merger_functions.
10685
10686 * src/reader.c (merge_functions): New variable.
10687 (get_merge_function): New function.
10688 (free_merger_functions): New function.
10689 (readgram): Check for %prec that is not followed by a symbol.
10690 Handle %dprec and %merge declarations.
10691 (packgram): Initialize dprec and merger fields in rules array.
10692
10693 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10694 conflict_list_cnt, conflict_list_free): New variables.
10695 (table_grow): Also grow conflict_table.
10696 (prepare_rules): Output dprec and merger tables.
10697 (conflict_row): New function.
10698 (action_row): Output conflict lists for GLR parser. Don't use
10699 default reduction in conflicted states for GLR parser so that there
10700 are spaces for the conflict lists.
10701 (save_row): Also save conflict information.
10702 (token_actions): Allocate conflict list.
10703 (merger_output): New function.
10704 (pack_vector): Pack conflict table, too.
10705 (output_conflicts): New function to output yyconflp and yyconfl.
10706 (output_check): Allocate conflict_tos.
10707 (output_actions): Output conflict tables, also.
10708 (output_skeleton): Output b4_mergers definition.
10709 (prepare): Output b4_max_rhs_length definition.
10710 Use 'bison.glr' as default skeleton for GLR parsers.
10711
10712 * src/gram.c (glr_parser): New flag.
10713 (grammar_free): Call free_merger_functions.
10714
10715 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10716 all pairs of conflicting reductions, rather than just all tokens
10717 causing conflicts. Needed to size conflict tables.
10718 (conflicts_output): Modify call to count_rr_conflicts for new
10719 interface.
10720 (conflicts_print): Ditto.
10721 (count_total_conflicts): New function.
10722
10723 * src/reader.h (merger_list): New type.
10724 (merge_functions): New variable.
10725
10726 * src/lex.h (tok_dprec, tok_merge): New token types.
10727
10728 * src/gram.h (rule_s): Add dprec and merger fields.
10729 (glr_parser): New flag.
10730
10731 * src/conflicts.h (count_total_conflicts): New function.
10732
10733 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10734
10735 * doc/bison.texinfo (Generalized LR Parsing): New section.
10736 (GLR Parsers): New section.
10737 (Language and Grammar): Mention GLR parsing.
10738 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10739 Correct typo ("tge" -> "the").
10740
10741 * data/bison.glr: New skeleton for GLR parsing.
10742
10743 * tests/cxx-gram.at: New tests for GLR parsing.
10744
10745 * tests/testsuite.at: Include cxx-gram.at.
10746
10747 * tests/Makefile.am: Add cxx-gram.at.
10748
10749 * src/parse-gram.y:
10750
10751 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10752
10753 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10754
10755 2002-06-27 Akim Demaille <akim@epita.fr>
10756
10757 * src/options.h, src/options.c: Remove.
10758 * src/getargs.c (short_options, long_options): New.
10759
10760 2002-06-27 Akim Demaille <akim@epita.fr>
10761
10762 * data/bison.simple, data/bison.c++: Rename as...
10763 * data/yacc.c, data/lalr1.cc: these.
10764 * doc/bison.texinfo (Environment Variables): Remove.
10765
10766 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10767
10768 * src/getargs.c (report_argmatch): Initialize strtok().
10769
10770 2002-06-20 Akim Demaille <akim@epita.fr>
10771
10772 * data/bison.simple (b4_symbol_actions): New, replaces...
10773 (b4_symbol_destructor, b4_symbol_printer): these.
10774 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10775 user token numbers.
10776
10777 2002-06-20 Akim Demaille <akim@epita.fr>
10778
10779 * data/bison.simple (yydestructor): Rename as...
10780 (yydestruct): this.
10781
10782 2002-06-20 Akim Demaille <akim@epita.fr>
10783
10784 * src/symtab.h, src/symtab.c (symbol_type_set)
10785 (symbol_destructor_set, symbol_precedence_set): The location is
10786 the last argument.
10787 Adjust all callers.
10788
10789 2002-06-20 Akim Demaille <akim@epita.fr>
10790
10791 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10792 internals.
10793 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10794 Takes a location.
10795 * src/symtab.h, src/symtab.c (symbol_class_set)
10796 (symbol_user_token_number_set): Likewise.
10797 Adjust all callers.
10798 Promote complain_at.
10799 * tests/input.at (Type Clashes): Adjust.
10800
10801 2002-06-20 Akim Demaille <akim@epita.fr>
10802
10803 * data/bison.simple (YYLEX): Fix the declaration when
10804 %pure-parser.
10805
10806 2002-06-20 Akim Demaille <akim@epita.fr>
10807
10808 * data/bison.simple (yysymprint): Don't print the token number,
10809 just its name.
10810 * tests/actions.at (Destructors): Rename as...
10811 (Printers and Destructors): this.
10812 Also exercise %printer.
10813
10814 2002-06-20 Akim Demaille <akim@epita.fr>
10815
10816 * data/bison.simple (YYDSYMPRINT): New.
10817 Use it to remove many of the #if YYDEBUG/if (yydebug).
10818
10819 2002-06-20 Akim Demaille <akim@epita.fr>
10820
10821 * src/symtab.h, src/symtab.c (symbol_t): printer and
10822 printer_location are new members.
10823 (symbol_printer_set): New.
10824 * src/parse-gram.y (PERCENT_PRINTER): New token.
10825 Handle its associated rule.
10826 * src/scan-gram.l: Adjust.
10827 (handle_destructor_at, handle_destructor_dollar): Rename as...
10828 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10829 * src/output.c (symbol_printers_output): New.
10830 (output_skeleton): Call it.
10831 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10832 since there are already many grammar files with a user `yyprint'.
10833 Replace the calls to YYPRINT to calls to yysymprint.
10834 * tests/calc.at: Adjust.
10835 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10836 taking advantage of parser very internal details (stack size!).
10837
10838 2002-06-20 Akim Demaille <akim@epita.fr>
10839
10840 * src/scan-gram.l: Complete the scanner with the missing patterns
10841 to pacify Flex.
10842 Use `quote' and `symbol_tag_get' where appropriate.
10843
10844 2002-06-19 Akim Demaille <akim@epita.fr>
10845
10846 * tests/actions.at (Destructors): Augment to test locations.
10847 * data/bison.simple (yydestructor): Pass it the current location
10848 if locations are enabled.
10849 Prototype only when __STDC__ or C++.
10850 Change the argument names to move into the yy name space: there is
10851 user code here.
10852
10853 2002-06-19 Akim Demaille <akim@epita.fr>
10854
10855 * data/bison.simple (b4_pure_if): New.
10856 Use it instead of #ifdef YYPURE.
10857
10858 2002-06-19 Akim Demaille <akim@epita.fr>
10859
10860 * data/bison.simple (b4_location_if): New.
10861 Use it instead of #ifdef YYLSP_NEEDED.
10862
10863 2002-06-19 Akim Demaille <akim@epita.fr>
10864
10865 Prepare @$ in %destructor, but currently don't bind it in the
10866 skeleton, as %location use is not cleaned up yet.
10867
10868 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10869 (handle_action_at): New.
10870 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10871 a braced_code_t and a location as additional arguments.
10872 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10873 unquote one when outputting `b4_dollar_dollar'.
10874 Adjust callers.
10875 * data/bison.simple (b4_eval): Remove.
10876 (b4_symbol_destructor): Adjust.
10877 * tests/input.at (Invalid @n): Adjust.
10878
10879 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10880
10881 * doc/bison.texinfo: Document ability to have multiple
10882 prologue sections.
10883
10884 2002-06-18 Akim Demaille <akim@epita.fr>
10885
10886 * src/files.c (compute_base_names): When computing the output file
10887 names from the input file name, strip the directory part.
10888
10889 2002-06-18 Akim Demaille <akim@epita.fr>
10890
10891 * data/bison.simple.new: Comment changes.
10892 Reported by Andreas Schwab.
10893
10894 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10895
10896 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10897 there are no `label `yyoverflowlab' defined but not used' warnings
10898 when yyoverflow is defined.
10899
10900 2002-06-18 Akim Demaille <akim@epita.fr>
10901
10902 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10903 new member.
10904 (symbol_destructor_set): Adjust.
10905 * src/output.c (symbol_destructors_output): Output the destructor
10906 locations.
10907 Output the symbol name.
10908 * data/bison.simple (b4_symbol_destructor): Adjust.
10909
10910 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10911 and Akim Demaille <akim@epita.fr>
10912
10913 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10914 what's left on the stack when the error recovery hits EOF.
10915 * tests/actions.at (Destructors): Complete to exercise this case.
10916
10917 2002-06-17 Akim Demaille <akim@epita.fr>
10918
10919 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10920 arguments is really empty, not only equal to `[]'.
10921 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10922 member.
10923 (symbol_destructor_set): New.
10924 * src/output.c (symbol_destructors_output): New.
10925 * src/reader.h (brace_code_t, current_braced_code): New.
10926 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10927 (handle_dollar): Rename as...
10928 (handle_action_dollar): this.
10929 (handle_destructor_dollar): New.
10930 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10931 (grammar_declaration): Use it.
10932 * data/bison.simple (yystos): Is always defined.
10933 (yydestructor): New.
10934 * tests/actions.at (Destructors): New.
10935 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10936
10937 2002-06-17 Akim Demaille <akim@epita.fr>
10938
10939 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10940 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10941 rule_length only when needed.
10942 * src/output.c (actions_output, token_definitions_output): Output
10943 the full M4 block.
10944 * src/symtab.c: Don't access directly to the symbol tag, use
10945 symbol_tag_get.
10946 * src/parse-gram.y: Use symbol_list_free.
10947
10948 2002-06-17 Akim Demaille <akim@epita.fr>
10949
10950 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10951 (symbol_list_prepend, get_type_name): Move to...
10952 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10953 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10954 Adjust all callers.
10955 (symbol_list_free): New.
10956 * src/scan-gram.l (handle_dollar): Takes a location.
10957 * tests/input.at (Invalid $n): Adjust.
10958
10959 2002-06-17 Akim Demaille <akim@epita.fr>
10960
10961 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10962 (symbol_list_prepend): New.
10963 * src/parse-gram.y (%union): `list' is a new member.
10964 (symbols.1): New, replaces...
10965 (terms_to_prec.1, nterms_to_type.1): these.
10966 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10967 Take a location as additional argument.
10968 Adjust all callers.
10969
10970 2002-06-15 Akim Demaille <akim@epita.fr>
10971
10972 * src/parse-gram.y: Move %token in the declaration section so that
10973 we don't depend upon CVS Bison.
10974
10975 2002-06-15 Akim Demaille <akim@epita.fr>
10976
10977 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10978 * src/print.c (print_core): Use it.
10979
10980 2002-06-15 Akim Demaille <akim@epita.fr>
10981
10982 * src/conflicts.c (log_resolution): Accept the rule involved in
10983 the sr conflicts instead of the lookahead number that points to
10984 that rule.
10985 (flush_reduce): Accept the current lookahead vector as argument,
10986 instead of the index in LA.
10987 (resolve_sr_conflict): Accept the current number of lookahead
10988 bitset to consider for the STATE, instead of the index in LA.
10989 (set_conflicts): Adjust.
10990 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10991
10992 2002-06-15 Akim Demaille <akim@epita.fr>
10993
10994 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10995 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10996 Adjust all dependencies.
10997 * src/lalr.c (initialize_lookaheads): Split into...
10998 (states_lookaheads_count, states_lookaheads_initialize): these.
10999 (lalr): Adjust.
11000
11001 2002-06-15 Akim Demaille <akim@epita.fr>
11002
11003 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
11004 out of...
11005 (grammar_rules_print): here.
11006 * src/reduce.c (reduce_output): Use it.
11007 * tests/reduce.at (Useless Rules, Reduced Automaton)
11008 (Underivable Rules): Adjust.
11009
11010 2002-06-15 Akim Demaille <akim@epita.fr>
11011
11012 Copy BYacc's nice way to report the grammar.
11013
11014 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
11015 New.
11016 Don't print the rules' location, it is confusing and useless.
11017 (rule_print): Use grammar_rhs_print.
11018 * src/print.c (print_grammar): Use grammar_rules_print.
11019
11020 2002-06-15 Akim Demaille <akim@epita.fr>
11021
11022 Complete and rationalize `useless thing' warnings.
11023
11024 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
11025 (symbol_tag_print): New.
11026 Use them everywhere in place of accessing directly the tag member.
11027 * src/gram.h, src/gram.c (rule_print): New.
11028 Use it where a rule used to be printed `by hand'.
11029 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
11030 (reduce_grammar_tables): Report the useless rules.
11031 (reduce_print): Useless things are a warning, not an error.
11032 Report it as such.
11033 * tests/reduce.at (Useless Nonterminals, Useless Rules):
11034 (Reduced Automaton, Underivable Rules): Adjust.
11035 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
11036 * tests/conflicts.at (Unresolved SR Conflicts)
11037 (Solved SR Conflicts): Adjust.
11038
11039 2002-06-15 Akim Demaille <akim@epita.fr>
11040
11041 Let symbols have a location.
11042
11043 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
11044 (getsym): Adjust.
11045 Adjust all callers.
11046 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
11047 Use location_t, not int.
11048 * src/symtab.c (symbol_check_defined): Take advantage of the
11049 location.
11050 * tests/regression.at (Invalid inputs): Adjust.
11051
11052 2002-06-15 Akim Demaille <akim@epita.fr>
11053
11054 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
11055 (input): Don't try to initialize yylloc here, do it in the
11056 scanner.
11057 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
11058 * src/gram.h (rule_t): Change line and action_line into location
11059 and action_location, of location_t type.
11060 Adjust all dependencies.
11061 * src/location.h, src/location.c (empty_location): New.
11062 * src/reader.h, src/reader.c (grammar_start_symbol_set)
11063 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
11064 (grammar_current_rule_symbol_append)
11065 (grammar_current_rule_action_append): Expect a location as argument.
11066 * src/reader.c (grammar_midrule_action): Adjust to attach an
11067 action's location as dummy symbol location.
11068 * src/symtab.h, src/symtab.c (startsymbol_location): New.
11069 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
11070 the line numbers.
11071
11072 2002-06-14 Akim Demaille <akim@epita.fr>
11073
11074 Grammar declarations may be found in the grammar section.
11075
11076 * src/parse-gram.y (rules_or_grammar_declaration): New.
11077 (declarations): Each declaration may end with a semicolon, not
11078 just...
11079 (grammar_declaration): `"%union"'.
11080 (grammar): Branch to rules_or_grammar_declaration.
11081
11082 2002-06-14 Akim Demaille <akim@epita.fr>
11083
11084 * src/main.c (main): Invoke scanner_free.
11085
11086 2002-06-14 Akim Demaille <akim@epita.fr>
11087
11088 * src/output.c (m4_invoke): Extracted from...
11089 (output_skeleton): here.
11090 Free tempfile.
11091
11092 2002-06-14 Akim Demaille <akim@epita.fr>
11093
11094 * src/parse-gram.y (directives, directive, gram)
11095 (grammar_directives, precedence_directives, precedence_directive):
11096 Rename as...
11097 (declarations, declaration, grammar, grammar_declaration)
11098 (precedence_declaration, precedence_declarator): these.
11099 (symbol_declaration): New.
11100
11101 2002-06-14 Akim Demaille <akim@epita.fr>
11102
11103 * src/files.c (action_obstack): Remove, unused.
11104 (output_obstack): Remove it, and all its dependencies, as it is no
11105 longer needed.
11106 * src/reader.c (epilogue_set): Build the epilogue in the
11107 muscle_obstack.
11108 * src/output.h, src/output.c (muscle_obstack): Move to...
11109 * src/muscle_tab.h, src/muscle_tab.h: here.
11110 (muscle_init): Initialize muscle_obstack.
11111 (muscle_free): New.
11112 * src/main.c (main): Call it.
11113
11114 2002-06-14 Akim Demaille <akim@epita.fr>
11115
11116 * src/location.h: New, extracted from...
11117 * src/reader.h: here.
11118 * src/Makefile.am (noinst_HEADERS): Merge into
11119 (bison_SOURCES): this.
11120 Add location.h.
11121 * src/parse-gram.y: Use location_t instead of Bison's.
11122 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
11123 Use location_t instead of ints.
11124
11125 2002-06-14 Akim Demaille <akim@epita.fr>
11126
11127 * data/bison.simple, data/bison.c++: Be sure to restore the
11128 current #line when returning to the skeleton contents after having
11129 exposed the input file's #line.
11130
11131 2002-06-12 Akim Demaille <akim@epita.fr>
11132
11133 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
11134 eager.
11135 * tests/actions.at (Exotic Dollars): New.
11136
11137 2002-06-12 Akim Demaille <akim@epita.fr>
11138
11139 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
11140 ['"/] too eagerly.
11141 * tests/input.at (Torturing the Scanner): New.
11142
11143 2002-06-11 Akim Demaille <akim@epita.fr>
11144
11145 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
11146 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
11147 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
11148 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
11149 * src/reader.c (reader): Use it.
11150
11151 2002-06-11 Akim Demaille <akim@epita.fr>
11152
11153 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
11154 Adjust all callers.
11155 (scanner_last_string_free): New.
11156
11157 2002-06-11 Akim Demaille <akim@epita.fr>
11158
11159 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
11160 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
11161 (last_string, YY_OBS_FREE): New.
11162 Use them when returning an ID.
11163
11164 2002-06-11 Akim Demaille <akim@epita.fr>
11165
11166 Have Bison grammars parsed by a Bison grammar.
11167
11168 * src/reader.c, src/reader.h (prologue_augment): New.
11169 * src/reader.c (copy_definition): Remove.
11170
11171 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
11172 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
11173 (grammar_current_rule_prec_set, grammar_current_rule_check)
11174 (grammar_current_rule_symbol_append)
11175 (grammar_current_rule_action_append): Export.
11176 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
11177 (symbol_list_action_append): Remove.
11178 Hook the routines from reader.
11179 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
11180 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
11181
11182 * src/reader.c (read_declarations): Remove, unused.
11183
11184 * src/parse-gram.y: Handle the epilogue.
11185 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
11186 (grammar_start_symbol_set): this.
11187 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
11188 * src/reader.c (readgram): Remove, unused.
11189 (reader): Adjust to insert eoftoken and axiom where appropriate.
11190
11191 * src/reader.c (copy_dollar): Replace with...
11192 * src/scan-gram.h (handle_dollar): this.
11193 * src/parse-gram.y: Remove `%thong'.
11194
11195 * src/reader.c (copy_at): Replace with...
11196 * src/scan-gram.h (handle_at): this.
11197
11198 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
11199 New.
11200
11201 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
11202 time being.
11203
11204 * src/reader.h, src/reader.c (grammar_rule_end): New.
11205
11206 * src/parse.y (current_type, current_class): New.
11207 Implement `%nterm', `%token' support.
11208 Merge `%term' into `%token'.
11209 (string_as_id): New.
11210 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
11211 type name.
11212
11213 * src/parse-gram.y: Be sure to handle properly the beginning of
11214 rules.
11215
11216 * src/parse-gram.y: Handle %type.
11217 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11218
11219 * src/parse-gram.y: More directives support.
11220 * src/options.c: No longer handle source directives.
11221
11222 * src/parse-gram.y: Fix %output.
11223
11224 * src/parse-gram.y: Handle %union.
11225 Use the prologue locations.
11226 * src/reader.c (parse_union_decl): Remove.
11227
11228 * src/reader.h, src/reader.c (epilogue_set): New.
11229 * src/parse-gram.y: Use it.
11230
11231 * data/bison.simple, data/bison.c++: b4_stype is now either not
11232 defined, then default to int, or to the contents of %union,
11233 without `union' itself.
11234 Adjust.
11235 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11236
11237 * src/output.c (actions_output): Don't output braces, as they are
11238 already handled by the scanner.
11239
11240 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11241 characters to themselves.
11242
11243 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11244 that the epilogue has a proper #line.
11245
11246 * src/parse-gram.y: Handle precedence/associativity.
11247
11248 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11249 a terminal.
11250 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11251 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11252 at all to define terminals that cannot be emitted.
11253
11254 * src/scan-gram.l: Escape M4 characters.
11255
11256 * src/scan-gram.l: Working properly with escapes in user
11257 strings/characters.
11258
11259 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11260 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11261 grammar.
11262 Use more modest sizes, as for the time being the parser does not
11263 release memory, and therefore the process swallows a huge amount
11264 of memory.
11265
11266 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11267 stricter %token grammar.
11268
11269 * src/symtab.h (associativity): Add `undef_assoc'.
11270 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11271 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11272
11273 * tests/regression.at (Invalid %directive): Remove, as it is now
11274 meaningless.
11275 (Invalid inputs): Adjust to the new error messages.
11276 (Token definitions): The new grammar doesn't allow too many
11277 eccentricities.
11278
11279 * src/lex.h, src/lex.c: Remove.
11280 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11281 (copy_character, copy_string2, copy_string, copy_identifier)
11282 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11283 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11284 (parse_action): Remove.
11285 * po/POTFILES.in: Adjust.
11286
11287 2002-06-11 Akim Demaille <akim@epita.fr>
11288
11289 * src/reader.c (parse_action): Don't store directly into the
11290 rule's action member: return the action as a string.
11291 Don't require `rule_length' as an argument: compute it.
11292 (grammar_current_rule_symbol_append)
11293 (grammar_current_rule_action_append): New, eved out from
11294 (readgram): here.
11295 Remove `action_flag', `rulelength', unused now.
11296
11297 2002-06-11 Akim Demaille <akim@epita.fr>
11298
11299 * src/reader.c (grammar_current_rule_prec_set).
11300 (grammar_current_rule_check): New, eved out from...
11301 (readgram): here.
11302 Remove `xaction', `first_rhs': useless.
11303 * tests/input.at (Type clashes): New.
11304 * tests/existing.at (GNU Cim Grammar): Adjust.
11305
11306 2002-06-11 Akim Demaille <akim@epita.fr>
11307
11308 * src/reader.c (grammar_midrule_action): New, Eved out from
11309 (readgram): here.
11310
11311 2002-06-11 Akim Demaille <akim@epita.fr>
11312
11313 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11314 New.
11315 (readgram): Use them as replacement of inlined code, crule and
11316 crule1.
11317
11318 2002-06-11 Akim Demaille <akim@epita.fr>
11319
11320 * src/reader.c (grammar_end, grammar_symbol_append): New.
11321 (readgram): Use them.
11322 Make the use of `p' as local as possible.
11323
11324 2002-06-10 Akim Demaille <akim@epita.fr>
11325
11326 GCJ's parser requires the tokens to be defined before the prologue.
11327
11328 * data/bison.simple: Output the token definition before the user's
11329 prologue.
11330 * tests/regression.at (Braces parsing, Duplicate string)
11331 (Mixing %token styles): Check the output from bison.
11332 (Early token definitions): New.
11333
11334 2002-06-10 Akim Demaille <akim@epita.fr>
11335
11336 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11337 assigning twice the same user number to a token, so that we can
11338 use it in...
11339 * src/lex.c (lex): here.
11340 Also use `symbol_class_set' instead of hand written code.
11341 * src/reader.c (parse_assoc_decl): Likewise.
11342
11343 2002-06-10 Akim Demaille <akim@epita.fr>
11344
11345 * src/symtab.c, src/symtab.c (symbol_class_set)
11346 (symbol_user_token_number_set): New.
11347 * src/reader.c (parse_token_decl): Use them.
11348 Use a switch instead of ifs.
11349 Use a single argument.
11350
11351 2002-06-10 Akim Demaille <akim@epita.fr>
11352
11353 Remove `%thong' support as it is undocumented, unused, duplicates
11354 `%token's job, and creates useless e-mail traffic with people who
11355 want to know what it is, why it is undocumented, unused, and
11356 duplicates `%token's job.
11357
11358 * src/reader.c (parse_thong_decl): Remove.
11359 * src/options.c (option_table): Remove "thong".
11360 * src/lex.h (tok_thong): Remove.
11361
11362 2002-06-10 Akim Demaille <akim@epita.fr>
11363
11364 * src/symtab.c, src/symtab.c (symbol_type_set)
11365 (symbol_precedence_set): New.
11366 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11367 (value_components_used): Remove, unused.
11368
11369 2002-06-09 Akim Demaille <akim@epita.fr>
11370
11371 Move symbols handling code out of the reader.
11372
11373 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11374 (axiom): Move to...
11375 * src/symtab.h, src/symtab.c: here.
11376
11377 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11378 * src/reader.c (startval): Rename as...
11379 * src/symtab.h, src/symtab.c (startsymbol): this.
11380 * src/reader.c: Adjust.
11381
11382 * src/reader.c (symbol_check_defined, symbol_make_alias)
11383 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11384 (token_translations_init)
11385 Move to...
11386 * src/symtab.c: here.
11387 * src/reader.c (packsymbols): Move to...
11388 * src/symtab.h, src/symtab.c (symbols_pack): here.
11389 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11390 argument.
11391
11392 2002-06-03 Akim Demaille <akim@epita.fr>
11393
11394 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11395 then statements.
11396
11397 2002-06-03 Akim Demaille <akim@epita.fr>
11398
11399 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11400 structs with non literals.
11401 * src/scan-skel.l: never-interactive.
11402 * src/conflicts.c (enum conflict_resolution_e): No trailing
11403 comma.
11404 * src/getargs.c (usage): Split long literal strings.
11405 Reported by Hans Aberg.
11406
11407 2002-05-28 Akim Demaille <akim@epita.fr>
11408
11409 * data/bison.c++: Use C++ ostreams.
11410 (cdebug_): New member.
11411
11412 2002-05-28 Akim Demaille <akim@epita.fr>
11413
11414 * src/output.c (output_skeleton): Be sure to allocate enough room
11415 for `/' _and_ for `\0' in full_skeleton.
11416
11417 2002-05-28 Akim Demaille <akim@epita.fr>
11418
11419 * data/bison.c++: Catch up with bison.simple:
11420 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11421 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11422 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11423 and popping traces.
11424
11425 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11426
11427 * src/output.c (output_skeleton): Put an explicit path in front of
11428 the skeleton file name, rather than relying on the -I directory,
11429 to partially alleviate effects of having a skeleton file lying around
11430 in the current directory.
11431
11432 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11433
11434 * src/conflicts.c (log_resolution): Correct typo:
11435 obstack_printf should be obstack_fgrow1.
11436
11437 2002-05-26 Akim Demaille <akim@epita.fr>
11438
11439 * src/state.h (state_t): `solved_conflicts' is a new member.
11440 * src/LR0.c (new_state): Set it to 0.
11441 * src/conflicts.h, src/conflicts.c (print_conflicts)
11442 (free_conflicts, solve_conflicts): Rename as...
11443 (conflicts_print, conflicts_free, conflicts_solve): these.
11444 Adjust callers.
11445 * src/conflicts.c (enum conflict_resolution_e)
11446 (solved_conflicts_obstack): New, used by...
11447 (log_resolution): this.
11448 Adjust to attach the conflict resolution to each state.
11449 Complete the description with the precedence/associativity
11450 information.
11451 (resolve_sr_conflict): Adjust.
11452 * src/print.c (print_state): Output its solved_conflicts.
11453 * tests/conflicts.at (Unresolved SR Conflicts)
11454 (Solved SR Conflicts): Exercise --report=all.
11455
11456 2002-05-26 Akim Demaille <akim@epita.fr>
11457
11458 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11459 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11460 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11461 (token_number_t, item_number_as_token_number)
11462 (token_number_as_item_number, muscle_insert_token_number_table):
11463 Rename as...
11464 (symbol_number_t, item_number_as_symbol_number)
11465 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11466 these, since it is more appropriate.
11467
11468 2002-05-26 Akim Demaille <akim@epita.fr>
11469
11470 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11471 `Error:' lines.
11472 * data/bison.simple (yystos) [YYDEBUG]: New.
11473 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11474 error recovery.
11475 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11476
11477 2002-05-25 Akim Demaille <akim@epita.fr>
11478
11479 * doc/bison.texinfo (Debugging): Split into...
11480 (Tracing): this new section, its former contents, and...
11481 (Understanding): this new section.
11482 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11483 by...
11484 (report_flag): this.
11485 Adjust all dependencies.
11486 (report_args, report_types, report_argmatch): New.
11487 (usage, getargs): Report/support -r, --report.
11488 * src/options.h
11489 (struct option_table_struct): Rename as..,
11490 (struct option_table_s): this.
11491 Rename the `set_flag' member to `flag' to match with getopt_long's
11492 struct.
11493 * src/options.c (option_table): Split verbose into an entry for
11494 %verbose, and another for --verbose.
11495 Support --report/-r, so remove -r from the obsolete --raw.
11496 * src/print.c: Attach full item sets and lookaheads reports to
11497 report_flag instead of trace_flag.
11498 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11499
11500 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11501 and Paul Eggert <eggert@twinsun.com>
11502
11503 * data/bison.simple (yyparse): Correct error handling to conform to
11504 POSIX and yacc. Specifically, after syntax error is discovered,
11505 do not reduce further before shifting the error token.
11506 Clean up the code a bit by removing the labels yyerrdefault,
11507 yyerrhandle, yyerrpop.
11508 * NEWS: Document the above.
11509
11510 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11511
11512 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11513 type; it isn't always big enough, since it doesn't necessarily
11514 include non-terminals.
11515 (yytranslate): Expand definition of yy_token_number_type, so that
11516 the latter can be removed.
11517 (yy_token_number_type): Remove, only one use.
11518 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11519 don't use TokenNumberType as element type.
11520
11521 * tests/regression.at: Modify expected output to agree with change
11522 to yyr1 and yytranslate.
11523
11524 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11525
11526 * src/reader.c (parse_action): Use copy_character instead of
11527 obstack_1grow.
11528
11529 2002-05-13 Akim Demaille <akim@epita.fr>
11530
11531 * tests/regression.at (Token definitions): Prototype yylex and
11532 yyerror.
11533
11534 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11535
11536 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11537 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11538 32-bit arithmetic.
11539 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11540
11541 2002-05-07 Akim Demaille <akim@epita.fr>
11542
11543 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11544 avoid GCC warnings.
11545
11546 2002-05-07 Akim Demaille <akim@epita.fr>
11547
11548 Kill GCC warnings.
11549
11550 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11551 over the RHS of each rule.
11552 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11553 * src/state.h (state_t): Member `nitems' is unsigned short.
11554 * src/LR0.c (get_state): Adjust.
11555 * src/reader.c (packgram): Likewise.
11556 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11557 `Type'.
11558 (muscle_insert_int_table): Remove, unused.
11559 (prepare_rules): Remove `max'.
11560
11561 2002-05-06 Akim Demaille <akim@epita.fr>
11562
11563 * src/closure.c (print_firsts): Display of the symbol tags.
11564 (bitmatrix_print): Move to...
11565 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11566 here.
11567 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11568
11569 2002-05-06 Akim Demaille <akim@epita.fr>
11570
11571 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11572 hash_do_for_each.
11573
11574 2002-05-06 Akim Demaille <akim@epita.fr>
11575
11576 * src/LR0.c (new_state, get_state): Instead of using the global
11577 `kernel_size' and `kernel_base', have two new arguments:
11578 `core_size' and `core'.
11579 Adjust callers.
11580
11581 2002-05-06 Akim Demaille <akim@epita.fr>
11582
11583 * src/reader.c (packgram): No longer end `ritem' with a 0
11584 sentinel: it is not used.
11585
11586 2002-05-05 Akim Demaille <akim@epita.fr>
11587
11588 New experimental feature: display the lookaheads in the report and
11589 graph.
11590
11591 * src/print (print_core): When --trace-flag, display the rules
11592 lookaheads.
11593 * src/print_graph.c (print_core): Likewise.
11594 Swap the arguments.
11595 Adjust caller.
11596
11597 2002-05-05 Akim Demaille <akim@epita.fr>
11598
11599 * tests/torture.at (Many lookaheads): New test.
11600
11601 2002-05-05 Akim Demaille <akim@epita.fr>
11602
11603 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11604 (GENERATE_MUSCLE_INSERT_TABLE): this.
11605 (output_int_table, output_unsigned_int_table, output_short_table)
11606 (output_token_number_table, output_item_number_table): Replace with...
11607 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11608 (muscle_insert_short_table, muscle_insert_token_number_table)
11609 (muscle_insert_item_number_table): these.
11610 Adjust all callers.
11611 (prepare_tokens): Don't free `translations', since...
11612 * src/reader.h, src/reader.c (grammar_free): do it.
11613 Move to...
11614 * src/gram.h, src/gram.c (grammar_free): here.
11615 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11616 b4_translate_max.
11617
11618 2002-05-05 Akim Demaille <akim@epita.fr>
11619
11620 * src/output.c (output_unsigned_int_table): New.
11621 (prepare_rules): `i' is unsigned.
11622 `prhs', `rline', `r2' are unsigned int.
11623 Rename muscle `rhs_number_max' as `rhs_max'.
11624 Output muscles `prhs_max', `rline_max', and `r2_max'.
11625 Free rline and r1.
11626 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11627 to compute types instead of constant types.
11628 * tests/regression.at (Web2c Actions): Adjust.
11629
11630 2002-05-04 Akim Demaille <akim@epita.fr>
11631
11632 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11633 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11634 Adjust dependencies.
11635 * src/output.c (token_definitions_output): Be sure not to output a
11636 `#define 'a'' when fed with `%token 'a' "a"'.
11637 * tests/regression.at (Token definitions): New.
11638
11639 2002-05-03 Paul Eggert <eggert@twinsun.com>
11640
11641 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11642 for K&R C.
11643
11644 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11645
11646 * Makefile.am (SUBDIRS): Remove intl.
11647 (EXTRA_DIST): Add config/config.rpath.
11648
11649 2002-05-03 Akim Demaille <akim@epita.fr>
11650
11651 * data/bison.simple (m4_if): Don't output empty enums.
11652 And actually, output valid enum definitions :(.
11653
11654 2002-05-03 Akim Demaille <akim@epita.fr>
11655
11656 * configure.bat: Remove, completely obsolete.
11657 * Makefile.am (EXTRA_DIST): Adjust.
11658 Don't distribute config.rpath...
11659 * config/Makefile.am (EXTRA_DIST): Do it.
11660
11661 2002-05-03 Akim Demaille <akim@epita.fr>
11662
11663 * configure.in (GETTEXT_VERSION): New.
11664 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11665
11666 2002-05-03 Akim Demaille <akim@epita.fr>
11667
11668 * data/bison.simple (b4_token_enum): New.
11669 (b4_token_defines): Use it to output tokens both as #define and
11670 enums.
11671 Suggested by Paul Eggert.
11672 * src/output.c (token_definitions_output): Don't output spurious
11673 white spaces.
11674
11675 2002-05-03 Akim Demaille <akim@epita.fr>
11676
11677 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11678
11679 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11680
11681 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11682 Update the stack class, give a try to deque as the default container.
11683
11684 2002-05-02 Akim Demaille <akim@epita.fr>
11685
11686 * data/bison.simple (yyparse): Do not implement @$ = @1.
11687 (YYLLOC_DEFAULT): Adjust to do it.
11688 * doc/bison.texinfo (Location Default Action): Fix.
11689
11690 2002-05-02 Akim Demaille <akim@epita.fr>
11691
11692 * src/reader.c (parse_braces): Merge into...
11693 (parse_action): this.
11694
11695 2002-05-02 Akim Demaille <akim@epita.fr>
11696
11697 * configure.in (ALL_LINGUAS): Remove.
11698 * po/LINGUAS, hr.po: New.
11699
11700 2002-05-02 Akim Demaille <akim@epita.fr>
11701
11702 Remove the so called hairy (semantic) parsers.
11703
11704 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11705 * src/gram.h, src/gram.c (semantic_parser): Remove.
11706 (rule_t): Remove the guard and guard_line members.
11707 * src/lex.h (token_t): remove tok_guard.
11708 * src/options.c (option_table): Remove %guard and %semantic_parser
11709 support.
11710 * src/output.c, src/output.h (guards_output): Remove.
11711 (prepare): Adjust.
11712 (token_definitions_output): Don't output the `T'
11713 tokens (???).
11714 (output_skeleton): Don't output the guards.
11715 * src/files.c, src/files.c (attrsfile): Remove.
11716 * src/reader.c (symbol_list): Remove the guard and guard_line
11717 members.
11718 Adjust dependencies.
11719 (parse_guard): Remove.
11720 * data/bison.hairy: Remove.
11721 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11722 BISON_HAIRY.
11723
11724 2002-05-02 Akim Demaille <akim@epita.fr>
11725
11726 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11727 (parse_guard): Rename the formal argument `stack_offset' as
11728 `rule_length', which is more readable.
11729 Adjust callers.
11730 (copy_at, copy_dollar): Instead of outputting the hard coded
11731 values of $$, $n and so forth, output invocation to b4_lhs_value,
11732 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11733 Note: this patch partially drops `semantic-parser' support: it
11734 always does `rule_length - n', where semantic parsers ought to
11735 always use `-n'.
11736 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11737 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11738
11739 2002-05-02 Akim Demaille <akim@epita.fr>
11740
11741 * configure.in (AC_INIT): Bump to 1.49b.
11742 (AM_INIT_AUTOMAKE): Short invocation.
11743
11744 2002-05-02 Akim Demaille <akim@epita.fr>
11745
11746 Version 1.49a.
11747
11748 2002-05-01 Akim Demaille <akim@epita.fr>
11749
11750 * src/skeleton.h: Remove.
11751
11752 2002-05-01 Akim Demaille <akim@epita.fr>
11753
11754 * src/skeleton.h: Fix the #endif.
11755 Reported by Magnus Fromreide.
11756
11757 2002-04-26 Paul Eggert <eggert@twinsun.com>
11758
11759 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11760 Define if we define YYSTYPE and YYLTYPE, respectively.
11761 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11762
11763 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11764
11765 * src/scan-skel.l: Postprocess quadrigraphs.
11766
11767 * src/reader.c (copy_character): New function, used to output
11768 single characters while replacing `[' and `]' with quadrigraphs, to
11769 avoid troubles with M4 quotes.
11770 (copy_comment): Output characters with copy_character.
11771 (read_additionnal_code): Likewise.
11772 (copy_string2): Likewise.
11773 (copy_definition): Likewise.
11774
11775 * tests/calc.at: Exercise M4 quoting.
11776
11777 2002-04-25 Akim Demaille <akim@epita.fr>
11778
11779 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11780 between `!' and the command.
11781 Reported by Paul Eggert.
11782
11783 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11784
11785 * tests/calc.at: Exercise prologue splitting.
11786
11787 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11788 `b4_post_prologue' instead of `b4_prologue'.
11789
11790 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11791 muscles.
11792 (output): Free pre_prologue_obstack and post_prologue_obstack.
11793 * src/files.h, src/files.c (attrs_obstack): Remove.
11794 (pre_prologue_obstack, post_prologue_obstack): New.
11795 * src/reader.c (copy_definition): Add a parameter to specify the
11796 obstack to fill, instead of using attrs_obstack unconditionally.
11797 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11798 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11799
11800 2002-04-23 Paul Eggert <eggert@twinsun.com>
11801
11802 * data/bison.simple: Remove unnecessary commentary and white
11803 space differences from 1_29-branch.
11804 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11805
11806 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11807 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11808 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11809 constructors or destructors.
11810
11811 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11812
11813 2002-04-23 Akim Demaille <akim@epita.fr>
11814
11815 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11816 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11817 location with columns.
11818 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11819 All reported by Paul Eggert.
11820
11821 2002-04-22 Akim Demaille <akim@epita.fr>
11822
11823 * src/reduce.c (dump_grammar): Move to...
11824 * src/gram.h, src/gram.c (grammar_dump): here.
11825 Be sure to separate long item numbers.
11826 Don't read the members of a rule's prec if its nil.
11827
11828 2002-04-22 Akim Demaille <akim@epita.fr>
11829
11830 * src/output.c (table_size, table_grow): New.
11831 (MAXTABLE): Remove, replace uses with table_size.
11832 (pack_vector): Instead of dying when the table is too big, grow it.
11833
11834 2002-04-22 Akim Demaille <akim@epita.fr>
11835
11836 * data/bison.simple (yyr1): Its type is that of a token number.
11837 * data/bison.c++ (r1_): Likewise.
11838 * tests/regression.at (Web2c Actions): Adjust.
11839
11840 2002-04-22 Akim Demaille <akim@epita.fr>
11841
11842 * src/reader.c (token_translations_init): 256 is now the default
11843 value for the error token, i.e., it will be assigned another
11844 number if the user assigned 256 to one of her tokens.
11845 (reader): Don't force 256 to error.
11846 * doc/bison.texinfo (Symbols): Adjust.
11847 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11848 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11849 etc. instead of 10, 20, 30 (which was used to `jump' over error
11850 (256) and undefined (2)).
11851
11852 2002-04-22 Akim Demaille <akim@epita.fr>
11853
11854 Propagate more token_number_t.
11855
11856 * src/gram.h (token_number_as_item_number)
11857 (item_number_as_token_number): New.
11858 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11859 Use it to create output_item_number_table and
11860 output_token_number_table.
11861 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11862 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11863 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11864 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11865
11866 2002-04-22 Akim Demaille <akim@epita.fr>
11867
11868 * src/output.h, src/output.c (get_lines_number): Remove.
11869
11870 2002-04-19 Akim Demaille <akim@epita.fr>
11871
11872 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11873 as Lex/Flex'.
11874 (Debugging): More details about enabling the debugging features.
11875 (Table of Symbols): Describe $$, $n, @$, and @n.
11876 Suggested by Tim Josling.
11877
11878 2002-04-19 Akim Demaille <akim@epita.fr>
11879
11880 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11881
11882 2002-04-10 Akim Demaille <akim@epita.fr>
11883
11884 * src/system.h: Rely on HAVE_LIMITS_H.
11885 Suggested by Paul Eggert.
11886
11887 2002-04-09 Akim Demaille <akim@epita.fr>
11888
11889 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11890 full stderr, and strip it according to the bison options, instead
11891 of composing the error message from different bits.
11892 This makes it easier to check for several error messages.
11893 Adjust all the invocations.
11894 Add an invocation exercising the error token.
11895 Add an invocation demonstrating a stupid error message.
11896 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11897 Adjust the tests.
11898 Error message are for stderr, not stdout.
11899
11900 2002-04-09 Akim Demaille <akim@epita.fr>
11901
11902 * src/gram.h, src/gram.c (error_token_number): Remove, use
11903 errtoken->number.
11904 * src/reader.c (reader): Don't specify the user token number (2)
11905 for $undefined, as it uselessly prevents using it.
11906 * src/gram.h (token_number_t): Move to...
11907 * src/symtab.h: here.
11908 (state_t.number): Is a token_number_t.
11909 * src/print.c, src/reader.c: Use undeftoken->number instead of
11910 hard coded 2.
11911 (Even though this 2 is not the same as above: the number of the
11912 undeftoken remains being 2, it is its user token number which
11913 might not be 2).
11914 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11915 `user_token_number_max'.
11916 Output `undef_token_number'.
11917 * data/bison.simple, data/bison.c++: Use them.
11918 Be sure to map invalid yylex return values to
11919 `undef_token_number'. This saves us from gratuitous SEGV.
11920
11921 * tests/conflicts.at (Solved SR Conflicts)
11922 (Unresolved SR Conflicts): Adjust.
11923 * tests/regression.at (Web2c Actions): Adjust.
11924
11925 2002-04-08 Akim Demaille <akim@epita.fr>
11926
11927 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11928 Adding #line.
11929 Remove the duplicate `typedefs'.
11930 (RhsNumberType): Fix the declaration and various other typos.
11931 Use __ofile__.
11932 * data/bison.simple: Use __ofile__.
11933 * src/scan-skel.l: Handle __ofile__.
11934
11935 2002-04-08 Akim Demaille <akim@epita.fr>
11936
11937 * src/gram.h (item_number_t): New, the type of item numbers in
11938 RITEM. Note that it must be able to code symbol numbers as
11939 positive number, and the negation of rule numbers as negative
11940 numbers.
11941 Adjust all dependencies (pretty many).
11942 * src/reduce.c (rule): Remove this `short *' pointer: use
11943 item_number_t.
11944 * src/system.h (MINSHORT, MAXSHORT): Remove.
11945 Include `limits.h'.
11946 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11947 (shortcpy): Remove.
11948 (MAXTABLE): Move to...
11949 * src/output.c (MAXTABLE): here.
11950 (prepare_rules): Use output_int_table to output rhs.
11951 * data/bison.simple, data/bison.c++: Adjust.
11952 * tests/torture.at (Big triangle): Move the limit from 254 to
11953 500.
11954 * tests/regression.at (Web2c Actions): Ajust.
11955
11956 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11957 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11958 passes, but produces negative #line number, once fixed, GCC is
11959 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11960 C), it passes.
11961 * src/state.h (state_h): Code input lines on ints, not shorts.
11962
11963 2002-04-08 Akim Demaille <akim@epita.fr>
11964
11965 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11966 and then the grammar.
11967
11968 2002-04-08 Akim Demaille <akim@epita.fr>
11969
11970 * src/system.h: No longer using strndup.
11971
11972 2002-04-07 Akim Demaille <akim@epita.fr>
11973
11974 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11975 * src/output.c (output_table_data): Return the longest number.
11976 (prepare_tokens): Output `token_number_max').
11977 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11978 New.
11979 Use them to define yy_token_number_type/TokenNumberType.
11980 Use this type for yytranslate.
11981 * tests/torture.at (Big triangle): Push the limit from 124 to
11982 253.
11983 * tests/regression.at (Web2c Actions): Adjust.
11984
11985 2002-04-07 Akim Demaille <akim@epita.fr>
11986
11987 * tests/torture.at (Big triangle): New.
11988 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11989 * tests/existing.at: here.
11990
11991 2002-04-07 Akim Demaille <akim@epita.fr>
11992
11993 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11994 nritems.
11995 Adjust dependencies.
11996
11997 2002-04-07 Akim Demaille <akim@epita.fr>
11998
11999 * src/reader.c: Normalize increments to prefix form.
12000
12001 2002-04-07 Akim Demaille <akim@epita.fr>
12002
12003 * src/reader.c, symtab.c: Remove debugging code.
12004
12005 2002-04-07 Akim Demaille <akim@epita.fr>
12006
12007 Rename all the `bucket's as `symbol_t'.
12008
12009 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
12010 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
12011 * src/symtab.c, src/symtab.h (bucket): Rename as...
12012 (symbol_t): this.
12013 (symbol_list_new, bucket_check_defined, bucket_make_alias)
12014 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
12015 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12016 (buckets_new, buckets_free, buckets_do): Rename as...
12017 (symbol_list_new, symbol_check_defined, symbol_make_alias)
12018 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12019 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
12020 (symbols_new, symbols_free, symbols_do): these.
12021
12022 2002-04-07 Akim Demaille <akim@epita.fr>
12023
12024 Use lib/hash for the symbol table.
12025
12026 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
12027 EOF.
12028 * src/lex.c (lex): Set the `number' member of new terminals.
12029 * src/reader.c (bucket_check_defined, bucket_make_alias)
12030 (bucket_check_alias_consistence, bucket_translation): New.
12031 (reader, grammar_free, readgram, token_translations_init)
12032 (packsymbols): Adjust.
12033 (reader): Number the predefined tokens.
12034 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
12035 for predefined tokens.
12036 * src/symtab.h (bucket): Remove all the hash table related
12037 members.
12038 * src/symtab.c (symtab): Replace by...
12039 (bucket_table): this.
12040 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12041 (buckets_new, buckets_do): New.
12042
12043 2002-04-07 Akim Demaille <akim@epita.fr>
12044
12045 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
12046 (start_symbol, max_user_token_number, semantic_parser)
12047 (error_token_number): Initialize.
12048 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
12049 Initialize.
12050 (reader): Don't.
12051 (errtoken, eoftoken, undeftoken, axiom): Extern.
12052
12053 2002-04-07 Akim Demaille <akim@epita.fr>
12054
12055 * src/gram.h (rule_s): prec and precsym are now pointers
12056 to the bucket giving the priority/associativity.
12057 Member `associativity' removed: useless.
12058 * src/reduce.c, src/conflicts.c: Adjust.
12059
12060 2002-04-07 Akim Demaille <akim@epita.fr>
12061
12062 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
12063 Properly escape the symbols' TAG when outputting them.
12064
12065 2002-04-07 Akim Demaille <akim@epita.fr>
12066
12067 * src/lalr.h (LA): Is a bitsetv, not bitset*.
12068
12069 2002-04-07 Akim Demaille <akim@epita.fr>
12070
12071 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
12072 (LArule): this, which is an array to rule_t*.
12073 * src/print.c, src/conflicts.c: Adjust.
12074
12075 2002-04-07 Akim Demaille <akim@epita.fr>
12076
12077 * src/gram.h (rule_t): Rename `number' as `user_number'.
12078 `number' is a new member.
12079 Adjust dependencies.
12080 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
12081
12082 2002-04-07 Akim Demaille <akim@epita.fr>
12083
12084 As a result of the previous patch, it is no longer needed
12085 to reorder ritem itself.
12086
12087 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
12088
12089 2002-04-07 Akim Demaille <akim@epita.fr>
12090
12091 Be sure never to walk through RITEMS, but use only data related to
12092 the rules themselves. RITEMS should be banished.
12093
12094 * src/output.c (output_token_translations): Rename as...
12095 (prepare_tokens): this.
12096 In addition to `translate', prepare the muscles `tname' and
12097 `toknum', which were handled by...
12098 (output_rule_data): this.
12099 Remove, and move the remainder of its outputs into...
12100 (prepare_rules): this new routines, which also merges content from
12101 (output_gram): this.
12102 (prepare_rules): Be sure never to walk through RITEMS.
12103 (output_stos): Rename as...
12104 (prepare_stos): this.
12105 (output): Always invoke prepare_states, after all, just don't use it
12106 in the output if you don't need it.
12107
12108 2002-04-07 Akim Demaille <akim@epita.fr>
12109
12110 * src/LR0.c (new_state): Display `nstates' as the name of the
12111 newly created state.
12112 Adjust to initialize first_state and last_state if needed.
12113 Be sure to distinguish the initial from the final state.
12114 (new_states): Create the itemset of the initial state, and use
12115 new_state.
12116 * src/closure.c (closure): Now that the initial state has its
12117 items properly set, there is no need for a special case when
12118 creating `ruleset'.
12119
12120 As a result, now the rule 0, reducing to $axiom, is visible in the
12121 outputs. Adjust the test suite.
12122
12123 * tests/conflicts.at (Solved SR Conflicts)
12124 (Unresolved SR Conflicts): Adjust.
12125 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
12126 * tests/conflicts.at (S/R in initial): New.
12127
12128 2002-04-07 Akim Demaille <akim@epita.fr>
12129
12130 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
12131 the RHS of the rules.
12132 * src/output.c (output_gram): Likewise.
12133
12134 2002-04-07 Akim Demaille <akim@epita.fr>
12135
12136 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
12137 bucket.
12138 Adjust all dependencies.
12139 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
12140 `number' of the buckets too.
12141 * src/gram.h: Include `symtab.h'.
12142 (associativity): Move to...
12143 * src/symtab.h: here.
12144 No longer include `gram.h'.
12145
12146 2002-04-07 Akim Demaille <akim@epita.fr>
12147
12148 * src/gram.h, src/gram.c (rules_rhs_length): New.
12149 (ritem_longest_rhs): Use it.
12150 * src/gram.h (rule_t): `number' is a new member.
12151 * src/reader.c (packgram): Set it.
12152 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
12153 the end of `rules', and count them out of `nrules'.
12154 (reduce_output, dump_grammar): Adjust.
12155 * src/print.c (print_grammar): It is no longer needed to check for
12156 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
12157 * tests/reduce.at (Reduced Automaton): New test.
12158
12159 2002-04-07 Akim Demaille <akim@epita.fr>
12160
12161 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
12162 lacking `+ 1' to nrules, Bison reported as useless a token if it
12163 was used solely to set the precedence of the last rule...
12164
12165 2002-04-07 Akim Demaille <akim@epita.fr>
12166
12167 * data/bison.c++, data/bison.simple: Don't output the current file
12168 name in #line, to avoid useless diffs between two identical
12169 outputs under different names.
12170
12171 2002-04-07 Akim Demaille <akim@epita.fr>
12172
12173 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
12174 Normalize loops to using `< nrules + 1', not `<= nrules'.
12175
12176 2002-04-07 Akim Demaille <akim@epita.fr>
12177
12178 * TODO: Update.
12179
12180 2002-04-07 Akim Demaille <akim@epita.fr>
12181
12182 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
12183 bucket.value as bucket.number.
12184
12185 2002-04-07 Akim Demaille <akim@epita.fr>
12186
12187 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
12188 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12189 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
12190 RHS, instead of being an index in RITEMS.
12191
12192 2002-04-04 Paul Eggert <eggert@twinsun.com>
12193
12194 * doc/bison.texinfo: Update copyright date.
12195 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
12196 (Symbols): Warn about running Bison in one character set,
12197 but compiling and/or running in an incompatible one.
12198 Warn about character code 256, too.
12199
12200 2002-04-03 Paul Eggert <eggert@twinsun.com>
12201
12202 * src/bison.data (YYSTACK_ALLOC): Depend on whether
12203 YYERROR_VERBOSE is nonzero, not whether it is defined.
12204
12205 Merge changes from bison-1_29-branch.
12206
12207 2002-03-20 Paul Eggert <eggert@twinsun.com>
12208
12209 Merge fixes from Debian bison_1.34-1.diff.
12210
12211 * configure.in (AC_PREREQ): 2.53.
12212
12213 2002-03-20 Akim Demaille <akim@epita.fr>
12214
12215 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12216
12217 2002-03-19 Paul Eggert <eggert@twinsun.com>
12218
12219 * src/bison.simple (YYCOPY): New macro.
12220 (YYSTACK_RELOCATE): Use it.
12221 Remove Type arg; no longer needed. All callers changed.
12222 (yymemcpy): Remove; no longer needed.
12223
12224 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12225 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12226
12227 2002-03-19 Akim Demaille <akim@epita.fr>
12228
12229 Test and fix the #line outputs.
12230
12231 * tests/atlocal.at (GCC): New.
12232 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
12233 (Prologue synch line, %union synch line, Postprologue synch line)
12234 (Action synch line, Epilogue synch line): New tests.
12235 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12236 * data/bison.simple, data/bison.c++: Use it.
12237
12238 2002-03-19 Akim Demaille <akim@epita.fr>
12239
12240 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12241 (Solved SR Conflicts, %expect not enough, %expect right)
12242 (%expect too much): Move to...
12243 * tests/conflicts.at: this new file.
12244
12245 2002-03-19 Akim Demaille <akim@epita.fr>
12246
12247 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12248 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12249 that we can move to enums for instance.
12250 * src/output.c (token_definitions_output): Output a list of
12251 `token-name, token-number' instead of the #define.
12252 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12253
12254 2002-03-14 Akim Demaille <akim@epita.fr>
12255
12256 Use Gettext 0.11.1.
12257
12258 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
12259
12260 * data/bison.c++: Make the user able to add members to the generated
12261 parser by subclassing.
12262
12263 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
12264
12265 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12266 a character.
12267 Reported by Nicolas Tisserand and Nicolas Burrus.
12268
12269 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12270
12271 * src/reader.c: Warn about lacking semi-colons, do not complain.
12272
12273 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12274
12275 * data/bison.c++: Remove a debug line.
12276
12277 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
12278
12279 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12280 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12281 provide a default implementation.
12282
12283 2002-03-04 Akim Demaille <akim@epita.fr>
12284
12285 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12286 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12287 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12288 * tests/semantic.at (Parsing Guards): Similarly.
12289 * src/reader.at (readgram): Complain if the last rule is not ended
12290 with a semi-colon.
12291
12292 2002-03-04 Akim Demaille <akim@epita.fr>
12293
12294 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12295 * src/closure.c: here.
12296 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12297 RTC.
12298 * src/warshall.h, src/warshall.c: Remove.
12299 * tests/sets.at (Broken Closure): Adjust.
12300
12301 2002-03-04 Akim Demaille <akim@epita.fr>
12302
12303 * src/output.c (output_skeleton): tempdir is const.
12304 bytes_read is unused.
12305
12306 2002-03-04 Akim Demaille <akim@epita.fr>
12307
12308 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12309 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12310 Update.
12311 From Michael Hayes.
12312
12313 2002-03-04 Akim Demaille <akim@epita.fr>
12314
12315 * src/closure.c (closure): `r' is unused.
12316
12317 2002-03-04 Akim Demaille <akim@epita.fr>
12318
12319 * tests/sets.at (Broken Closure): Add the ending `;'.
12320 * src/reader.at (readgram): Complain if a rule is not ended with a
12321 semi-colon.
12322
12323 2002-03-04 Akim Demaille <akim@epita.fr>
12324
12325 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12326 (count_sr_conflicts): Use bitset_count.
12327 * src/reduce.c (inaccessable_symbols): Ditto.
12328 (bits_size): Remove.
12329 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12330
12331 2002-03-04 Akim Demaille <akim@epita.fr>
12332
12333 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12334 * src/reduce.c: Remove the `bitset_zero's following the
12335 `bitset_create's, as now it is performed by the latter.
12336
12337 2002-03-04 Akim Demaille <akim@epita.fr>
12338
12339 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12340 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12341 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12342 latest sources from Michael.
12343
12344 2002-03-04 Akim Demaille <akim@epita.fr>
12345
12346 * src/output.c (output): Don't free the grammar.
12347 * src/reader.c (grammar_free): New.
12348 * src/main.c (main): Call it and don't free symtab here.
12349
12350 2002-03-04 Akim Demaille <akim@epita.fr>
12351
12352 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12353 before returning.
12354 Reported by Benoit Perrot.
12355
12356 2002-03-04 Akim Demaille <akim@epita.fr>
12357
12358 Use bitset operations when possible, not loops over bits.
12359
12360 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12361 bitset_or.
12362 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12363 * src/reduce.c (useless_nonterminals): Formatting changes.
12364 * src/warshall.c (TC): Use bitset_or.
12365
12366 2002-03-04 Akim Demaille <akim@epita.fr>
12367
12368 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12369 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12370 Ditto.
12371
12372 2002-03-04 Akim Demaille <akim@epita.fr>
12373
12374 * src/lalr.c (F): Now a bitset*.
12375 Adjust all dependencies.
12376
12377 2002-03-04 Akim Demaille <akim@epita.fr>
12378
12379 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12380 Adjust all dependencies.
12381
12382 2002-03-04 Akim Demaille <akim@epita.fr>
12383
12384 * src/L0.c, src/LR0.h (nstates): Be size_t.
12385 Adjust comparisons (signed vs unsigned).
12386 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12387 bitset*.
12388 Adjust all dependencies.
12389
12390 2002-03-04 Akim Demaille <akim@epita.fr>
12391
12392 * src/closure.c (firsts): Now, also a bitset.
12393 Adjust all dependencies.
12394 (varsetsize): Remove, now unused.
12395 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12396
12397 2002-03-04 Akim Demaille <akim@epita.fr>
12398
12399 * src/print.c: Convert to use bitset.h, not hand coded iterations
12400 over ints.
12401
12402 2002-03-04 Akim Demaille <akim@epita.fr>
12403
12404 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12405
12406 2002-03-04 Akim Demaille <akim@epita.fr>
12407
12408 * src/closure.c (ruleset): Be a bitset.
12409 (rulesetsize): Remove.
12410
12411 2002-03-04 Akim Demaille <akim@epita.fr>
12412
12413 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12414 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12415 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12416 * src/closure.c (fderives): Be an array of bitsets.
12417
12418 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
12419
12420 * data/bison.c++: Merge the two generated headers. Insert a copyright
12421 notice in each output file.
12422
12423 2002-02-28 Akim Demaille <akim@epita.fr>
12424
12425 * data/bison.c++: Copy the prologue of bison.simple to fetch
12426 useful M4 definitions, such as b4_header_guard.
12427
12428 2002-02-25 Akim Demaille <akim@epita.fr>
12429
12430 * src/getargs.c (version): Give the name of the authors, and use a
12431 translator friendly scheme for the bgr
12432 copyright notice.
12433
12434 2002-02-25 Akim Demaille <akim@epita.fr>
12435
12436 * src/output.c (header_output): Remove, now handled completely via
12437 M4.
12438
12439 2002-02-25 Akim Demaille <akim@epita.fr>
12440
12441 * m4/m4.m4: New, from CVS Autoconf.
12442 * configure.in: Invoke it.
12443 * src/output.c (output_skeleton): Use its result instead of the
12444 hard coded name.
12445
12446 2002-02-25 Akim Demaille <akim@epita.fr>
12447
12448 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12449 Fileutils 4.1.5.
12450 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12451 * src/output.c (output_skeleton): Use mkstemp to create a real
12452 temporary file.
12453 Move the filling of `skeleton' and its muscle to...
12454 (prepare): here.
12455 (output): Move the definition of the prologue muscle to...
12456 (prepare): here.
12457 * src/system.h (DEFAULT_TMPDIR): New.
12458
12459 2002-02-14 Paul Eggert <eggert@twinsun.com>
12460
12461 Remove the support for C++ namespace cleanliness; it was
12462 causing more problems than it was curing, since it didn't work
12463 properly on some nonstandard C++ compilers. This can wait
12464 for a proper C++ parser.
12465
12466 * NEWS: Document this.
12467 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12468 of C++, as it's treated like C now.
12469 * src/bison.simple (YYSTD): Remove.
12470 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12471 Treat C++ just like Standard C instead of trying to support
12472 namespace cleanliness.
12473
12474 2002-02-14 Akim Demaille <akim@epita.fr>
12475
12476 * tests/regression.at (else): Adjust to Andreas' change.
12477
12478 2002-02-14 Akim Demaille <akim@epita.fr>
12479
12480 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12481
12482 2002-02-13 Andreas Schwab <schwab@suse.de>
12483
12484 * src/output.c (output_rule_data): Don't output NULL, it might
12485 not be defined yet.
12486
12487 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12488
12489 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12490 (Copyright notice): Update.
12491
12492 2002-02-11 Akim Demaille <akim@epita.fr>
12493
12494 * tests/regression.at (%nonassoc and eof): Don't include
12495 nonportable headers.
12496
12497 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12498
12499 * data/bison.c++: Correct error recovery. Make the user able to
12500 initialize the starting location.
12501
12502 2002-02-07 Akim Demaille <akim@epita.fr>
12503
12504 * tests/input.at: New.
12505
12506 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12507
12508 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12509 more consistent when naming methods and variables. Put preprocessor
12510 directives around tables only needed for debugging.
12511
12512 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12513
12514 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12515 C++ parsers.
12516 (yy::b4_name::parse): Use print_.
12517
12518 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12519
12520 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12521
12522 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12523
12524 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12525 C++ parsers.
12526 (yy::b4_name::parse): Build verbose error messages, and use error_.
12527
12528 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12529
12530 * data/bison.c++: Fix m4 quoting in comments.
12531
12532 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12533
12534 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12535 not expanded by m4.
12536
12537 2002-02-05 Akim Demaille <akim@epita.fr>
12538
12539 * data/bison.c++: Adjust to the M4 back end.
12540 More is certainly needed.
12541
12542 2002-02-05 Akim Demaille <akim@epita.fr>
12543
12544 Give a try to M4 as a back end.
12545
12546 * lib/readpipe.c: New, from wdiff.
12547 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12548 BISON_HAIRY.
12549 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12550 specific values. Now it is m4 that performs the lookup.
12551 * src/parse-skel.y: Remove.
12552 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12553 * src/output.c (actions_output, guards_output)
12554 (token_definitions_output): No longer keeps track of the output
12555 line number, hence remove the second argument.
12556 (guards_output): Check against the guard member of a rule, not the
12557 action member.
12558 Adjust callers.
12559 (output_skeleton): Don't look for the skeleton location, let m4 do
12560 that.
12561 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12562 file will be used.
12563 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12564 (prepare): Given that for the time being changesyntax is not
12565 usable in M4, rename the muscles using `-' to `_'.
12566 Define `defines_flag', `output_parser_name' and `output_header_name'.
12567 * src/output.h (actions_output, guards_output)
12568 (token_definitions_output): Adjust prototypes.
12569 * src/scan-skel.l: Instead of scanning the skeletons, it now
12570 processes the output of m4: `__oline__' and `#output'.
12571 * data/bison.simple: Adjust to be used by M4(sugar).
12572 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12573 to date.
12574 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12575 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12576 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12577 shamelessly stolen from CVS Autoconf.
12578
12579 2002-02-05 Akim Demaille <akim@epita.fr>
12580
12581 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12582 * configure.in: Check for the declarations of free and malloc.
12583 * src/muscle_tab.c: Adjust.
12584
12585 2002-02-05 Akim Demaille <akim@epita.fr>
12586
12587 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12588 which have no values.
12589
12590 2002-02-05 Akim Demaille <akim@epita.fr>
12591
12592 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12593 * data/: here.
12594
12595 2002-01-29 Paul Eggert <eggert@twinsun.com>
12596
12597 * src/bison.simple (YYSIZE_T): Do not define merely because
12598 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12599 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12600
12601 2002-01-27 Akim Demaille <akim@epita.fr>
12602
12603 Fix `%nonassoc and eof'.
12604
12605 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12606 which were not properly copied! Replace
12607 memcpy (res->errs, src->errs, src->nerrs);
12608 with
12609 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12610 !!!
12611 * tests/regression.at (%nonassoc and eof): Adjust to newest
12612 Autotest: `.' is not in the PATH.
12613
12614 2002-01-27 Akim Demaille <akim@epita.fr>
12615
12616 * tests/sets.at (AT_EXTRACT_SETS): New.
12617 (Nullable): Use it.
12618 (Firsts): New.
12619
12620 2002-01-26 Akim Demaille <akim@epita.fr>
12621
12622 * tests/actions.at, tests/calc.at, tests/headers.at,
12623 * tests/torture.at: Adjust to the newest Autotest which no longer
12624 forces `.' in the PATH.
12625
12626 2002-01-25 Akim Demaille <akim@epita.fr>
12627
12628 * tests/regression.at (%nonassoc and eof): New.
12629 Suggested by Robert Anisko.
12630
12631 2002-01-24 Akim Demaille <akim@epita.fr>
12632
12633 Bison dumps core when trying to complain about broken input files.
12634 Reported by Cris van Pelt.
12635
12636 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12637 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12638 into...
12639 (Invalid inputs): Strengthen: exercise parse_percent_token.
12640
12641 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12642
12643 * src/Makefile.am: Add bison.c++.
12644 * src/bison.c++: New skeleton.
12645
12646 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12647
12648 * po/it.po: New.
12649
12650 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12651
12652 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12653
12654 2002-01-20 Marc Autret <marc@gnu.org>
12655
12656 * src/files.c (compute_output_file_names): Fix
12657
12658 2002-01-20 Marc Autret <marc@gnu.org>
12659
12660 * tests/output.at: New test.
12661 * src/files.c (compute_base_names): Don't map extensions when
12662 the YACC flag is set, use defaults.
12663 Reported by Evgeny Stambulchik.
12664
12665 2002-01-20 Marc Autret <marc@gnu.org>
12666
12667 * src/system.h: Need to define __attribute__ away for non-GCC
12668 compilers as well (i.e., the vendor C compiler).
12669 Suggested by Albert Chin-A-Young.
12670
12671 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12672
12673 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12674 canonical definition.
12675 * src/system.h: Use the canonical definition for PARAMS (avoids
12676 a conflict with the macro from lib/hash.h).
12677
12678 2002-01-11 Akim Demaille <akim@epita.fr>
12679
12680 * configure.in: Use AC_FUNC_STRNLEN.
12681 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12682
12683 2002-01-09 Akim Demaille <akim@epita.fr>
12684
12685 * src/files.c, src/files.h (output_infix): New.
12686 (tab_extension): Remove.
12687 (compute_base_names): Compute the former, drop the latter.
12688 * src/output.c (prepare): Insert the muscles `output-infix', and
12689 `output-suffix'.
12690 * src/parse-skel.y (string, string.1): New.
12691 (section.header): Use it.
12692 (section.yacc): Remove.
12693 (prefix): Remove too.
12694 * src/scan-skel.l: Adjust.
12695 * src/bison.simple, src/bison.hairy: Adjust.
12696
12697 2002-01-09 Akim Demaille <akim@epita.fr>
12698
12699 * configure.in (WERROR_CFLAGS): Compute it.
12700 * src/Makefile.am (CFLAGS): Pass it.
12701 * tests/atlocal.in (CFLAGS): Idem.
12702 * src/files.c: Fix a few warnings.
12703 (get_extension_index): Remove, unused.
12704
12705 2002-01-08 Akim Demaille <akim@epita.fr>
12706
12707 * src/getargs.c (AS_FILE_NAME): New.
12708 (getargs): Use it to convert DOSish file names.
12709 * src/files.c (base_name): Rename as full_base_name to avoid
12710 clashes with `base_name ()'.
12711 (filename_split): New.
12712 (compute_base_names): N-th rewrite, using filename_split.
12713
12714 2002-01-08 Akim Demaille <akim@epita.fr>
12715
12716 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12717 New, stolen from the Fileutils 4.1.
12718 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12719 * configure.in: Check for the presence of memrchr, and of its
12720 prototype.
12721
12722 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12723
12724 * lib/hash.h (__P): Added definition for this macro.
12725 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12726 BUILT_SOURCES, to ensure they are generated first.
12727 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12728 %error-verbose to allow bootstrapping with bison 1.30x.
12729
12730 2002-01-06 Akim Demaille <akim@epita.fr>
12731
12732 * src/reader.c (parse_braces): Don't fetch the next char, the
12733 convention is to fetch on entry.
12734 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12735 'switch' without a following semicolon.
12736 * tests/regression.at (braces parsing): New.
12737
12738 2002-01-06 Akim Demaille <akim@epita.fr>
12739
12740 Bison is dead wrong in its RR conflict reports.
12741
12742 * tests/torture.at (GNU Cim Grammar): New.
12743 * src/conflicts.c (count_rr_conflicts): Fix.
12744
12745 2002-01-06 Akim Demaille <akim@epita.fr>
12746
12747 Creating package.m4 from configure.ac causes too many problems.
12748
12749 * tests/Makefile.am (package.m4): Create it by hand,
12750 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12751
12752 2002-01-06 Akim Demaille <akim@epita.fr>
12753
12754 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12755 skeleton.h.
12756
12757 2002-01-04 Paul Eggert <eggert@twinsun.com>
12758
12759 * doc/bison.texinfo (Debugging):
12760 Remove YYSTDERR; it's no longer defined or used.
12761 Also, s/cstdio.h/cstdio/.
12762
12763 2002-01-03 Akim Demaille <akim@epita.fr>
12764
12765 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12766
12767 2002-01-03 Akim Demaille <akim@epita.fr>
12768
12769 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12770 tracing code to --trace, wait for a better --trace option, with
12771 args.
12772
12773 2002-01-03 Akim Demaille <akim@epita.fr>
12774
12775 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12776 The ISO C++ standard is extremely clear about it: stderr is
12777 considered a macro, not a regular symbol (see table 94 `Header
12778 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12779 Therefore std:: does not apply to it. It still does with fprintf.
12780 Also, s/cstdio.h/cstdio/.
12781
12782 2002-01-03 Akim Demaille <akim@epita.fr>
12783
12784 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12785 for non system headers.
12786
12787 2002-01-02 Akim Demaille <akim@epita.fr>
12788
12789 Equip the skeleton chain with location tracking, runtime trace,
12790 pure parser and scanner.
12791
12792 * src/parse-skel.y: Request a pure parser, locations, and prefix
12793 renaming.
12794 (%union): Having several members with the same type does not help
12795 type mismatches, simplify.
12796 (YYPRINT, yyprint): New.
12797 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12798 (skel_error): this.
12799 Handle locations.
12800 * src/scan-skel.l: Adjust to these changes.
12801 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12802 (LOCATION_PRINT, skel_control_t): New.
12803
12804 2001-12-30 Akim Demaille <akim@epita.fr>
12805
12806 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12807 replace `gb' with BLANKS.
12808 * src/scan-skel.l: Adjust.
12809
12810 2001-12-30 Akim Demaille <akim@epita.fr>
12811
12812 * src/system.h: We don't need nor want bcopy.
12813 Throw away MS-DOS crap: we don't need getpid.
12814 * configure.in: We don't need strndup. It was even causing
12815 problems: because Flex includes the headers *before* us,
12816 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12817 not visible.
12818 * lib/xstrndup.c: New.
12819 * src/scan-skel.l: Use it.
12820 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12821 * src/parse-skel.y: Use %directives instead of #defines.
12822
12823 2001-12-30 Akim Demaille <akim@epita.fr>
12824
12825 * src/skeleton.h: New.
12826 * src/output.c (output_parser, output_master_parser): Remove, dead
12827 code.
12828 * src/output.h (get_lines_number, actions_output, guards_output)
12829 (token_definitions_output): Prototype them.
12830 * src/parse-skel.y: Add the license notice.
12831 Include output.h and skeleton.h.
12832 (process_skeleton): Returns void, and takes a single parameter.
12833 * src/scan-skel.l: Add the license notice.
12834 Include skeleton.h.
12835 Don't use %option yylineno: it seems that then Flex imagines
12836 REJECT has been used, and therefore it won't reallocate its
12837 buffers (which makes no other sense to me than a bug). It results
12838 in warnings for `unused: yy_flex_realloc'.
12839
12840 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12841
12842 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12843 (MUSCLE_INSERT_PREFIX): ...to there.
12844 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12845 (MUSCLE_INSERT_PREFIX): Move from here...
12846
12847 * src/bison.hairy: Add a section directive. Put braces around muscle
12848 names. This parser skeleton is still broken, but Bison should not
12849 choke on a bad muscle 'syntax'.
12850 * src/bison.simple: Add a section directive. Put braces around muscle
12851 names.
12852
12853 * src/files.h (strsuffix, stringappend): Add declarations.
12854 (tab_extension): Add declaration.
12855 (short_base_name): Add declaration.
12856
12857 * src/files.c (strsuffix, stringappend): No longer static. These
12858 functions are used in the skeleton parser.
12859 (tab_extension): New.
12860 (compute_base_names): Use the computations done in this function
12861 to guess if the generated parsers should have '.tab' in their
12862 names.
12863 (short_base_name): No longer static.
12864
12865 * src/output.c (output_skeleton): New.
12866 (output): Disable call to output_master_parser, and give a try to
12867 a new skeleton handling system.
12868 (guards_output, actions_output): No longer static.
12869 (token_definitions_output, get_lines_number): No longer static.
12870
12871 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12872
12873 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12874 parse-skel.y.
12875
12876 * src/parse-skel.y: New file.
12877 * src/scan-skel.l: New file.
12878
12879 2001-12-29 Akim Demaille <akim@epita.fr>
12880
12881 %name-prefix is broken.
12882
12883 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12884 Adjust all dependencies.
12885 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12886 %name-prefix.
12887
12888 Renaming yylval but not yylloc is not consistent. Now we do.
12889
12890 * src/bison.simple: Prefix yylloc if used.
12891 * doc/bison.texinfo (Decl Summary): Document that.
12892
12893 2001-12-29 Akim Demaille <akim@epita.fr>
12894
12895 * doc/bison.texinfo: Promote `%long-directive' over
12896 `%long_directive'.
12897 Remove all references to fixed-output-files, yacc is enough.
12898
12899 2001-12-29 Akim Demaille <akim@epita.fr>
12900
12901 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12902 user prologue. These are defaults.
12903 * tests/actions.at (Mid-rule actions): Make sure the user can
12904 define YYDEBUG and YYERROR_VERBOSE.
12905
12906 2001-12-29 Akim Demaille <akim@epita.fr>
12907
12908 * src/output.c (header_output): Don't forget to export YYLTYPE and
12909 yylloc.
12910 * tests/headers.at (export YYLTYPE): New, make sure it does.
12911 * tests/regression.at (%union and --defines, Invalid CPP headers):
12912 Move to...
12913 * tests/headers.at: here.
12914
12915 2001-12-29 Akim Demaille <akim@epita.fr>
12916
12917 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12918
12919 2001-12-29 Akim Demaille <akim@epita.fr>
12920
12921 * tests/actions.at (Mid-rule actions): Output on a single line
12922 instead of several.
12923
12924 2001-12-29 Akim Demaille <akim@epita.fr>
12925
12926 * doc/bison.texinfo: Formatting changes.
12927
12928 2001-12-29 Akim Demaille <akim@epita.fr>
12929
12930 Don't store the token defs in a muscle, just be ready to output it
12931 on command. Now possible via `symbols'. Fixes a memory leak.
12932
12933 * src/output.c (token_definitions_output): New.
12934 (output_parser, header_output): Use it.
12935 * src/reader.c (symbols_save): Remove.
12936
12937 2001-12-29 Akim Demaille <akim@epita.fr>
12938
12939 * src/bison.simple: Do not provide a default for YYSTYPE and
12940 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12941 default.
12942
12943 2001-12-29 Akim Demaille <akim@epita.fr>
12944
12945 Mid-rule actions are simply... ignored!
12946
12947 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12948 the empty-rule associated to the dummy symbol, not to the host
12949 rule.
12950 * tests/actions.at (Mid-rule actions): New.
12951
12952 2001-12-29 Akim Demaille <akim@epita.fr>
12953
12954 Memory leak.
12955
12956 * src/reader.c (reader): Free grammar.
12957
12958 2001-12-29 Akim Demaille <akim@epita.fr>
12959
12960 Memory leak.
12961
12962 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12963 since it allocates it for each state, although only one is needed.
12964 (allocate_storage): Do it here.
12965
12966 2001-12-29 Akim Demaille <akim@epita.fr>
12967
12968 * src/options.h, src/options.c (create_long_option_table): Rename
12969 as...
12970 (long_option_table_new): this, with a clearer prototype.
12971 (percent_table): Remove, unused,
12972 * src/getargs.c (getargs): Adjust.
12973
12974 2001-12-29 Akim Demaille <akim@epita.fr>
12975
12976 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12977 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12978 as states.
12979
12980 2001-12-29 Akim Demaille <akim@epita.fr>
12981
12982 * src/lalr.c (build_relations): Rename `states' as `states1'.
12983 Sorry, I don't understand exactly what it is, no better name...
12984
12985 2001-12-29 Akim Demaille <akim@epita.fr>
12986
12987 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12988 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12989 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12990 as rules.
12991
12992 2001-12-29 Akim Demaille <akim@epita.fr>
12993
12994 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12995 ago.
12996
12997 2001-12-29 Akim Demaille <akim@epita.fr>
12998
12999 * src/reader.c, src/reader.h (user_toknums): Remove.
13000 Adjust all users to use symbols[i]->user_token_number.
13001
13002 2001-12-29 Akim Demaille <akim@epita.fr>
13003
13004 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
13005 Adjust all users to use symbols[i]->prec or ->assoc.
13006
13007 2001-12-29 Akim Demaille <akim@epita.fr>
13008
13009 * src/reader.c, src/reader.h (tags): Remove.
13010 Adjust all users to use symbols[i]->tag.
13011
13012 2001-12-29 Akim Demaille <akim@epita.fr>
13013
13014 * src/gram.h, src/gram.c (symbols): New, similar to state_table
13015 and rule_table.
13016 * src/reader.c (packsymbols): Fill this table.
13017 Drop sprec.
13018 * src/conflicts.c (resolve_sr_conflict): Adjust.
13019 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
13020 single table.
13021 Use symbols[i]->tag instead of tags[i].
13022
13023 2001-12-29 Akim Demaille <akim@epita.fr>
13024
13025 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
13026 In addition, put a comment in there, to replace...
13027 * tests/regression.at (%union and C comments): Remove.
13028
13029 2001-12-29 Akim Demaille <akim@epita.fr>
13030
13031 * tests/regression.at (Web2c Actions): Blindly move the actual
13032 output as expected output. The contents *seem* right to me, but I
13033 can't pretend reading perfectly parser tables... Nonetheless, all
13034 the other tests pass correctly, the table look OK, even though the
13035 presence of `$axiom' is to be noted: AFAICS it is useless (but
13036 harmless).
13037
13038 2001-12-29 Akim Demaille <akim@epita.fr>
13039
13040 * src/reader.c (readgram): Don't add the rule 0 if there were no
13041 rules read. In other words, add it _after_ having performed
13042 grammar sanity checks.
13043 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
13044
13045 2001-12-29 Akim Demaille <akim@epita.fr>
13046
13047 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
13048 visible, and some states have now a different number.
13049
13050 2001-12-29 Akim Demaille <akim@epita.fr>
13051
13052 * src/reader.c (readgram): Bind the initial rule's lineno to that
13053 of the first rule.
13054 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
13055 (Solved SR Conflicts): Adjust rule 0's line number.
13056
13057 2001-12-29 Akim Demaille <akim@epita.fr>
13058
13059 Fix the `GAWK Grammar' failure.
13060
13061 * src/LR0.c (final_state): Initialize to -1 so that we do compute
13062 the reductions of the first state which was mistakenly confused
13063 with the final state because precisely final_state was initialized
13064 to 0.
13065 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
13066 now noticed by Bison.
13067 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
13068 have a reduction on $default.
13069
13070 2001-12-29 Akim Demaille <akim@epita.fr>
13071
13072 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
13073 rule line numbers.
13074 * src/closure.c (print_closure): Likewise.
13075 * src/derives.c (print_derives): Likewise.
13076 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
13077 now.
13078
13079 2001-12-29 Akim Demaille <akim@epita.fr>
13080
13081 * src/lalr.c (lookaheads_print): New.
13082 (lalr): Call it when --trace-flag.
13083 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
13084 are dumped.
13085
13086 2001-12-29 Akim Demaille <akim@epita.fr>
13087
13088 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
13089 when walking through ritem, even via rule->rhs.
13090 * src/reduce.c (dump_grammar, useful_production, reduce_output)
13091 (useful_production, useless_nonterminals): Likewise.
13092 (reduce_grammar_tables): Likewise, plus update nritems.
13093 * src/nullable.c (set_nullable): Likewise.
13094 * src/lalr.c (build_relations): Likewise.
13095 * tests/sets.at (Nullable): Adjust.
13096 Fortunately, now, the $axiom is no longer nullable.
13097
13098 2001-12-29 Akim Demaille <akim@epita.fr>
13099
13100 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
13101 the 0-sentinel.
13102 * src/gram.c (ritem_longest_rhs): Likewise.
13103 * src/reduce.c (nonterminals_reduce): Likewise.
13104 * src/print_graph.c (print_graph): Likewise.
13105 * src/output.c (output_rule_data): Likewise.
13106 * src/nullable.c (set_nullable): Likewise.
13107
13108 2001-12-29 Akim Demaille <akim@epita.fr>
13109
13110 * src/output.c: Comment changes.
13111
13112 2001-12-27 Paul Eggert <eggert@twinsun.com>
13113
13114 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
13115 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
13116 Sparc, as they were causing more porting problems than the
13117 (minor) performance improvement was worth.
13118
13119 Also, catch up with 1.31's YYSTD.
13120
13121 2001-12-27 Akim Demaille <akim@epita.fr>
13122
13123 * src/output.c (output_gram): Rely on nritems, not the
13124 0-sentinel. See below.
13125 Use -1 as separator, not 0.
13126 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
13127 Rely on -1 as separator in yyrhs, instead of 0.
13128 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
13129 twice `Now at end of input', therefore there are two lines less to
13130 expect.
13131
13132 2001-12-27 Akim Demaille <akim@epita.fr>
13133
13134 * tests/regression.at (Unresolved SR Conflicts):
13135 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
13136 below.
13137
13138 2001-12-27 Akim Demaille <akim@epita.fr>
13139
13140 * src/LR0.c (new_state): Recognize the final state by the fact it
13141 is reached by eoftoken.
13142 (insert_start_shifting_state, insert_eof_shifting_state)
13143 (insert_accepting_state, augment_automaton): Remove, since now
13144 these states are automatically computed from the initial state.
13145 (generate_states): Adjust.
13146 * src/print.c: When reporting a rule number to the user, substract
13147 1, so that the axiom rule is rule 0, and the first user rule is 1.
13148 * src/reduce.c: Likewise.
13149 * src/print_graph.c (print_core): For the time being, just as for
13150 the report, depend upon --trace-flags to dump the full set of
13151 items.
13152 * src/reader.c (readgram): Once the grammar read, insert the rule
13153 0: `$axiom: START-SYMBOL $'.
13154 * tests/set.at: Adjust: rule 0 is now displayed, and since the
13155 number of the states has changed (the final state is no longer
13156 necessarily the last), catch up.
13157
13158 2001-12-27 Akim Demaille <akim@epita.fr>
13159
13160 Try to make the use of the eoftoken valid. Given that its value
13161 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
13162 is used instead of > 0 where appropriate, (ii), depend upon nritems
13163 instead of the 0-sentinel.
13164
13165 * src/gram.h, src/gram.c (nritems): New.
13166 Expected to be duplication of nitems, but for the time being...
13167 * src/reader.c (packgram): Assert nritems and nitems are equal.
13168 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
13169 * src/closure.c (print_closure, print_fderives): Likewise.
13170 * src/gram.c (ritem_print): Likewise.
13171 * src/print.c (print_core, print_grammar): Likewise.
13172 * src/print_graph.c: Likewise.
13173
13174 2001-12-27 Akim Demaille <akim@epita.fr>
13175
13176 * src/main.c (main): If there are complains after grammar
13177 reductions, then output the report anyway if requested, then die.
13178 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
13179 * src/reader.c (eoftoken): New.
13180 (parse_token_decl): If the token being defined has value `0', it
13181 is the eoftoken.
13182 (packsymbols): No longer hack `tags' to insert `$' by hand.
13183 Be sure to preserve the value of the eoftoken.
13184 (reader): Make sure eoftoken is defined.
13185 Initialize nsyms to 0: now eoftoken is created just like the others.
13186 * src/print.c (print_grammar): Don't special case the eof token.
13187 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
13188 lie anyway, albeit pleasant.
13189 * tests/calc.at: Exercise error messages with eoftoken.
13190 Change the grammar so that empty input is invalid.
13191 Adjust expectations.
13192 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
13193
13194 2001-12-27 Akim Demaille <akim@epita.fr>
13195
13196 * configure.in: Check the protos of strchr ans strspn.
13197 Replace strchr if needed.
13198 * src/system.h: Provide the protos of strchr, strspn and memchr if
13199 missing.
13200 * lib/strchr.c: New.
13201 * src/reader.c (symbols_save): Use strchr.
13202
13203 2001-12-27 Akim Demaille <akim@epita.fr>
13204
13205 * src/print.c, src/print_graph.c (escape): New.
13206 Use it to quote the TAGS outputs.
13207 * src/print_graph.c (print_state): Now errors are in red, and
13208 reductions in green.
13209 Prefer high to wide: output the state number on a line of its own.
13210
13211 2001-12-27 Akim Demaille <akim@epita.fr>
13212
13213 * src/state.h, src/state.c (reductions_new): New.
13214 * src/LR0.c (set_state_table): Let all the states have a
13215 `reductions', even if reduced to 0.
13216 (save_reductions): Adjust.
13217 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13218 * src/print.c (print_reductions, print_actions): Adjust.
13219 * src/output.c (action_row): Adjust.
13220
13221 2001-12-27 Akim Demaille <akim@epita.fr>
13222
13223 * src/state.h, src/state.c (errs_new, errs_dup): New.
13224 * src/LR0.c (set_state_table): Let all the states have an errs,
13225 even if reduced to 0.
13226 * src/print.c (print_errs, print_reductions): Adjust.
13227 * src/output.c (output_actions, action_row): Adjust.
13228 * src/conflicts.c (resolve_sr_conflict): Adjust.
13229
13230 2001-12-27 Akim Demaille <akim@epita.fr>
13231
13232 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13233
13234 2001-12-27 Akim Demaille <akim@epita.fr>
13235
13236 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13237 * src/print.c: here.
13238 (lookaheadset, shiftset): New, used as additional storage by
13239 print_reductions.
13240 (print_results): Adjust.
13241 (print_shifts, print_gotos, print_errs): New, extracted from...
13242 (print_actions): here.
13243 * src/print_graph.c (print_actions): Remove dead code.
13244
13245 2001-12-27 Akim Demaille <akim@epita.fr>
13246
13247 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13248 `$n' and `@n'.
13249
13250 2001-12-27 Akim Demaille <akim@epita.fr>
13251
13252 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13253 (build_relations): Adjust.
13254
13255 2001-12-27 Akim Demaille <akim@epita.fr>
13256
13257 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13258 duplication.
13259
13260 2001-12-27 Akim Demaille <akim@epita.fr>
13261
13262 * src/reader.c (packgram): Catch nitems overflows.
13263
13264 2001-12-27 Akim Demaille <akim@epita.fr>
13265
13266 * src/files.c, src/files.h (guard_obstack): Remove.
13267 * src/output.c (output): Adjust.
13268 * src/reader.c (parse_braces): New, factoring...
13269 (copy_action, copy_guard): these two which are renamed as...
13270 (parse_action, parse_guard): these.
13271 As a voluntary consequence, using braces around guards is now
13272 mandatory.
13273
13274 2001-12-27 Akim Demaille <akim@epita.fr>
13275
13276 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13277 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13278 members.
13279 (symbol_list_new): Adjust.
13280 (copy_action): action_line is the first line, not the last.
13281 (copy_guard): Just as for actions, store the `action' only, not
13282 the switch/case/break flesh.
13283 Don't parse the user action that might follow the guard, let...
13284 (readgram): do it, i.e., now, there can be an action after a
13285 guard.
13286 In other words the guard is just explicitly optional.
13287 (packgram): Adjust.
13288 * src/output.c (guards_output): New.
13289 (output_parser): Call it when needed.
13290 (output): Also free the guard and attrs obstacks.
13291 * src/files.c, src/files.h (obstack_save): Remove.
13292 (output_files): Remove.
13293 As a result, if one needs the former `.act' file, using an
13294 appropriate skeleton which requires actions and guards is now
13295 required.
13296 * src/main.c (main): Adjust.
13297 * tests/semantic.at: New.
13298 * tests/regression.at: Use `input.y' as input file name.
13299 Avoid 8+3 problems by requiring input.c when the test needs the
13300 parser.
13301
13302 2001-12-27 Akim Demaille <akim@epita.fr>
13303
13304 * src/reader.c (symbol_list_new): Be sure to initialize all the
13305 fields.
13306
13307 2001-12-27 Akim Demaille <akim@epita.fr>
13308
13309 All the hacks using a final pseudo state are now useless.
13310
13311 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13312 * src/lalr.c (nLA): New.
13313 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13314 instead of lookaheadsp from the pseudo state (nstate + 1).
13315
13316 2001-12-27 Akim Demaille <akim@epita.fr>
13317
13318 * src/output.c (action_row, token_actions): Use a state_t instead
13319 of a integer, and nlookaheads instead of the following state's
13320 lookaheadsp.
13321
13322 2001-12-27 Akim Demaille <akim@epita.fr>
13323
13324 * src/conflicts.c (log_resolution, flush_shift)
13325 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13326 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13327 (conflicts_print, print_reductions): Use a state_t instead of an
13328 integer when referring to a state.
13329 As much as possible, depend upon nlookaheads, instead of the
13330 `lookaheadsp' member of the following state (since lookaheads of
13331 successive states are successive, the difference between state n + 1
13332 and n served as the number of lookaheads for state n).
13333 * src/lalr.c (add_lookback_edge): Likewise.
13334 * src/print.c (print_core, print_actions, print_state)
13335 (print_results): Likewise.
13336 * src/print_graph.c (print_core, print_actions, print_state)
13337 (print_graph): Likewise.
13338 * src/conflicts.h: Adjust.
13339
13340 2001-12-27 Akim Demaille <akim@epita.fr>
13341
13342 * src/bison.hairy: Formatting/comment changes.
13343 ANSIfy.
13344 Remove `register' indications.
13345 Add plenty of `static'.
13346
13347 2001-12-27 Akim Demaille <akim@epita.fr>
13348
13349 * src/output.c (prepare): Drop the muscle `ntbase' which
13350 duplicates ntokens.
13351 * src/bison.simple: Formatting/comment changes.
13352 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13353 is an undocumented synonym.
13354
13355 2001-12-22 Akim Demaille <akim@epita.fr>
13356
13357 * src/output.c (output_table_data): Change the prototype to use
13358 `int' for array ranges: some invocations do pass an int, not a
13359 short.
13360 Reported by Wayne Green.
13361
13362 2001-12-22 Akim Demaille <akim@epita.fr>
13363
13364 Some actions of web2c.y are improperly triggered.
13365 Reported by Mike Castle.
13366
13367 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13368 * tests/regression.at (Web2c): Rename as...
13369 (Web2c Report): this.
13370 (Web2c Actions): New.
13371
13372 2001-12-22 Akim Demaille <akim@epita.fr>
13373
13374 Reductions in web2c.y are improperly reported.
13375 Reported by Mike Castle.
13376
13377 * src/conflicts.c (print_reductions): Fix.
13378 * tests/regression.at (Web2c): New.
13379
13380 2001-12-18 Akim Demaille <akim@epita.fr>
13381
13382 Some host fail on `assert (!"foo")', which expands to
13383 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13384 Reported by Nelson Beebee.
13385
13386 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13387 `#define it_succeeded 0' and `assert (it_succeeded)'.
13388
13389 2001-12-17 Marc Autret <autret_m@epita.fr>
13390
13391 * src/bison.simple: Don't hard code the skeleton line and filename.
13392 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13393 New line counter 'skeleton_line' (skeleton-line muscle).
13394
13395 2001-12-17 Paul Eggert <eggert@twinsun.com>
13396
13397 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13398 YYDEBUG must be defined to a nonzero value.
13399
13400 * src/bison.simple (yytname): Do not assume that the user defines
13401 YYDEBUG to a properly parenthesized expression.
13402
13403 2001-12-17 Akim Demaille <akim@epita.fr>
13404
13405 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13406 nlookaheads is a new member.
13407 Adjust all users.
13408 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13409 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13410 state.
13411
13412 2001-12-17 Akim Demaille <akim@epita.fr>
13413
13414 * src/files.h, src/files.c (open_files, close_files): Remove.
13415 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13416 let...
13417 * src/reader.c (reader): Do it.
13418
13419 2001-12-17 Akim Demaille <akim@epita.fr>
13420
13421 * src/conflicts.c (print_reductions): Formatting changes.
13422
13423 2001-12-17 Akim Demaille <akim@epita.fr>
13424
13425 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13426 (flush_reduce): New.
13427 (resolve_sr_conflict): Adjust.
13428
13429 2001-12-17 Akim Demaille <akim@epita.fr>
13430
13431 * src/output.c (output_obstack): Be static and rename as...
13432 (format_obstack): this, to avoid any confusion with files.c's
13433 output_obstack.
13434 * src/reader.h (muscle_obstack): Move to...
13435 * src/output.h: here, since it's defined in output.c.
13436
13437 2001-12-17 Akim Demaille <akim@epita.fr>
13438
13439 * src/output.c (action_row, save_column, default_goto)
13440 (sort_actions, matching_state, pack_vector): Better variable
13441 locality.
13442
13443 2001-12-17 Akim Demaille <akim@epita.fr>
13444
13445 * src/output.c: Various formatting changes.
13446
13447 2001-12-17 Akim Demaille <akim@epita.fr>
13448
13449 * src/files.c (output_files): Free the output_obstack.
13450 * src/main.c (main): Call print and print_graph conditionally.
13451 * src/print.c (print): Work unconditionally.
13452 * src/print_graph.c (print_graph): Work unconditionally.
13453 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13454
13455 2001-12-16 Marc Autret <autret_m@epita.fr>
13456
13457 * src/output.c (actions_output): Fix. When we use %no-lines,
13458 there is one less line per action.
13459
13460 2001-12-16 Marc Autret <autret_m@epita.fr>
13461
13462 * src/bison.simple: Remove a useless #line directive.
13463 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13464 * src/output.c (get_lines_number): New.
13465 (output_parser): Adjust, now takes care about the lines of a
13466 output muscles.
13467 Fix line numbering.
13468 (actions_output): Computes the number of lines taken by actions.
13469 (output_master_parser): Insert new skeleton which is the name of
13470 the output parser file name.
13471
13472 2001-12-15 Marc Autret <autret_m@epita.fr>
13473
13474 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13475
13476 2001-12-15 Marc Autret <autret_m@epita.fr>
13477
13478 * src/output.c (output_gram): Keep track of the hairy one.
13479
13480 2001-12-15 Akim Demaille <akim@epita.fr>
13481
13482 Make `make distcheck' work.
13483
13484 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13485 system.h which uses libgettext.h.
13486
13487 2001-12-15 Akim Demaille <akim@epita.fr>
13488
13489 * src/nullable.c (set_nullable): Useless rules must be skipped,
13490 otherwise, since we range over their symbols, we might look at a
13491 nonterminal which no longer ``exists'', i.e., it is not counted in
13492 `nvars', hence we overflow our arrays.
13493
13494 2001-12-15 Akim Demaille <akim@epita.fr>
13495
13496 The header can also be produced directly, without any obstack!
13497 Yahoo!
13498
13499 * src/files.c, src/files.h (defines_obstack): Remove.
13500 (compute_header_macro): Global.
13501 (defines_obstack_save): Remove.
13502 * src/reader.c (parse_union_decl): No longer output to
13503 defines_obstack: its content can be found in the `stype' muscle
13504 anyway.
13505 (output_token_translations): Merge into...
13506 (symbols_output): this.
13507 Rename as...
13508 (symbols_save): this.
13509 (reader): Adjust.
13510 * src/output.c (header_output): New.
13511 (output): Call it.
13512
13513 2001-12-15 Akim Demaille <akim@epita.fr>
13514
13515 * src/reader.c (parse_union_decl): Instead of handling two obstack
13516 simultaneously, use one to define the `stype' muscle, and use the
13517 value of the latter to fill defines_obstack.
13518 (copy_comment): Remove.
13519 (copy_comment2): Work for a single obstack.
13520 Rename as...
13521 (copy_comment): this.
13522
13523 2001-12-15 Akim Demaille <akim@epita.fr>
13524
13525 * src/lex.c, src/lex.h (xgetc): No longer static.
13526 * src/reader.c (parse_union_decl): Revamp.
13527
13528 2001-12-15 Akim Demaille <akim@epita.fr>
13529
13530 Still making progress in separating Bison into (i) input, (ii)
13531 process, (iii) output: now we can directly output the parser file
13532 without using table_obstack at all.
13533
13534 * src/files.c, src/files.h (table_obstack): Bye bye.
13535 (parser_file_name): New.
13536 * src/files.c (compute_output_file_names): Compute it.
13537 * src/output.c (actions_output, output_parser)
13538 (output_master_parser): To a file instead of an obstack.
13539
13540 2001-12-15 Akim Demaille <akim@epita.fr>
13541
13542 Attach actions to rules, instead of pre-outputting them to
13543 actions_obstack.
13544
13545 * src/gram.h (rule_t): action and action_line are new members.
13546 * src/reader.c (symbol_list): Likewise.
13547 (copy_action): Save the actions within the rule.
13548 (packgram): Save them in rule_table.
13549 * src/output.c (actions_output): New.
13550 (output_parser): Use it on `%%actions'.
13551 (output_rule_data): Don't free rule_table.
13552 (output): Do it.
13553 (prepare): Don't save the `action' muscle.
13554 * src/bison.simple: s/%%action/%%actions/.
13555
13556 2001-12-15 Akim Demaille <akim@epita.fr>
13557
13558 * src/reader.c (copy_action): When --yacc, don't append a `;'
13559 to the user action: let it fail if lacking.
13560 Suggested by Arnold Robbins and Tom Tromey.
13561
13562 2001-12-14 Akim Demaille <akim@epita.fr>
13563
13564 * src/lex.c (literalchar): Simply return the char you decoded, non
13565 longer mess around with obstacks and int pointers.
13566 Adjust all callers.
13567
13568 2001-12-14 Akim Demaille <akim@epita.fr>
13569
13570 * src/lex.c (literalchar): Don't escape the special characters,
13571 just decode them, and keep them as char (before, eol was output as
13572 the 2 char string `\n' etc.).
13573 * src/output.c (output_rule_data): Use quotearg to output the
13574 token strings.
13575
13576 2001-12-13 Paul Eggert <eggert@twinsun.com>
13577
13578 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13579 Do not infringe on the global user namespace when using C++.
13580 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13581 All uses of `fprintf' and `stderr' changed.
13582
13583 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13584
13585 2001-12-13 Akim Demaille <akim@epita.fr>
13586
13587 The computation of nullable is broken: it doesn't handle empty
13588 RHS's properly.
13589
13590 * tests/torture.at (GNU AWK Grammar): New.
13591 * tests/sets.at (Nullable): New.
13592 * src/nullable.c (set_nullable): Instead of blindly looping over
13593 `ritems', loop over the rules, and then over their rhs's.
13594
13595 Work around Autotest bugs.
13596
13597 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13598 frame, because Autotest understand lines starting with a `+' as
13599 traces from the shell. Then, they are not processed properly.
13600 Admittedly an Autotest bug, but we don't have time to wait for
13601 Autotest to catch up.
13602 * tests/regression.at (Broken Closure): Adjust to the new table
13603 frames.
13604 Move to...
13605 * tests/sets.at: here.
13606
13607 2001-12-13 Akim Demaille <akim@epita.fr>
13608
13609 * src/closure.c (closure): Use nrules instead of playing tricks
13610 with BITS_PER_WORD.
13611
13612 2001-12-13 Akim Demaille <akim@epita.fr>
13613
13614 * src/print.c (print_actions): Output the handling of `$' as the
13615 traces do: shifting the token EOF. Before EOF was treated as a
13616 nonterminal.
13617 * tests/regression.at: Adjust some tests.
13618 * src/print_graph.c (print_core): Complete the set of items via
13619 closure. The next-to-final and final states are still unsatisfying,
13620 but that's to be addressed elsewhere.
13621 No longer output the rule numbers, but do output the state number.
13622 A single loop for the shifts + gotos is enough, but picked a
13623 distinct color for each.
13624 (print_graph): Initialize and finalize closure.
13625
13626 2001-12-13 Akim Demaille <akim@epita.fr>
13627
13628 * src/reader.c (readgram): Remove dead code, an strip useless
13629 braces.
13630 (get_type): Remove, unused.
13631
13632 2001-12-12 Akim Demaille <akim@epita.fr>
13633
13634 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13635 on that of lib/error.c.
13636
13637 2001-12-12 Akim Demaille <akim@epita.fr>
13638
13639 Some hosts don't like `/' in includes.
13640
13641 * src/system.h: Include libgettext.h without qualifying the path.
13642 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13643 $(top_srcdir).
13644
13645 2001-12-11 Marc Autret <autret_m@epita.fr>
13646
13647 * src/output.c (output_parser): Remove useless muscle.
13648
13649 2001-12-11 Marc Autret <autret_m@epita.fr>
13650
13651 * src/bison.simple: Remove #line just before %%epilogue. It
13652 is now handled in ...
13653 * src/reader.c (read_additionnal_code): Add the output of a
13654 #line for the epilogue.
13655
13656 2001-12-10 Marc Autret <autret_m@epita.fr>
13657
13658 * src/reader.c (copy_definition): Re-use CPP-outed code which
13659 replace precedent remove.
13660 * src/bison.simple: Remove #line before %%prologue because
13661 %%input-line is wrong at this time.
13662
13663 2001-12-10 Marc Autret <autret_m@epita.fr>
13664
13665 * src/reader.c (symbols_output): Clean up.
13666 * src/output.c (output_gram, output): Clean up.
13667
13668 2001-12-10 Akim Demaille <akim@epita.fr>
13669
13670 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13671 * src/LR0.c (set_state_table): here.
13672 * src/lalr.c (lalr): Call it.
13673
13674 2001-12-10 Akim Demaille <akim@epita.fr>
13675
13676 * src/state.h (shifts): Remove the `number' member: shifts are
13677 attached to state, hence no longer need to be labelled with a
13678 state number.
13679
13680 2001-12-10 Akim Demaille <akim@epita.fr>
13681
13682 Now that states have a complete set of members, the linked list of
13683 shifts is useless: just fill directly the state's shifts member.
13684
13685 * src/state.h (shifts): Remove the `next' member.
13686 * src/LR0.c (first_state, last_state): Remove.
13687 Adjust the callers.
13688 (augment_automaton): Don't look for the shifts that must be added
13689 a shift on EOF: it is those of the state we looked for! But now,
13690 since shifts are attached, it is no longer needed to looking
13691 merely by its id: its number.
13692
13693 2001-12-10 Akim Demaille <akim@epita.fr>
13694
13695 * src/LR0.c (augment_automaton): Better variable locality.
13696 Remove an impossible branch: if there is a state corresponding to
13697 the start symbol being shifted, then there is shift for the start
13698 symbol from the initial state.
13699
13700 2001-12-10 Akim Demaille <akim@epita.fr>
13701
13702 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13703 only when appropriate: when insert_start_shifting_state' is not
13704 invoked.
13705 * tests/regression.at (Rule Line Numbers): Adjust.
13706
13707 2001-12-10 Akim Demaille <akim@epita.fr>
13708
13709 * src/LR0.c (augment_automaton): Now that all states have shifts,
13710 merge the two cases addition shifts to the initial state.
13711
13712 2001-12-10 Akim Demaille <akim@epita.fr>
13713
13714 * src/lalr.c (set_state_table): Move to...
13715 * src/LR0.c: here.
13716 * src/lalr.c (lalr): Don't call it...
13717 * src/LR0.c (generate_states): do it.
13718 * src/LR0.h (first_state): Remove, only the table is used.
13719
13720 2001-12-10 Akim Demaille <akim@epita.fr>
13721
13722 * src/LR0.h (first_shift, first_reduction): Remove.
13723 * src/lalr.c: Don't use first_shift: find shifts through the
13724 states.
13725
13726 2001-12-10 Akim Demaille <akim@epita.fr>
13727
13728 * src/LR0.c: Attach shifts to states as soon as they are
13729 computed.
13730 * src/lalr.c (set_state_table): Instead of assigning shifts to
13731 state, just assert that the mapping was properly done.
13732
13733 2001-12-10 Akim Demaille <akim@epita.fr>
13734
13735 * src/LR0.c (insert_start_shift): Rename as...
13736 (insert_start_shifting_state): this.
13737 (insert_eof_shifting_state, insert_accepting_state): New.
13738 (augment_automaton): Adjust.
13739 Better locality of the variables.
13740 When looking if the start_symbol is shifted from the initial
13741 state, using `while (... symbol != start_symbol ...)' sounds
13742 better than `while (... symbol < start_symbol ...)': If fail
13743 to see how the order between symbols could be relevant!
13744
13745 2001-12-10 Akim Demaille <akim@epita.fr>
13746
13747 * src/getargs.h: Don't declare `spec_name_prefix' and
13748 `spec_file_prefix', declared by src/files.h.
13749 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13750 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13751 * src/output.c (prepare): Adjust.
13752 * src/reader.c (symbols_output): Likewise.
13753 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13754
13755 2001-12-10 Akim Demaille <akim@epita.fr>
13756
13757 * src/muscle_tab.c (muscle_init): NULL is a better default than
13758 `"0"'.
13759
13760 2001-12-10 Akim Demaille <akim@epita.fr>
13761
13762 * src/reader.c (reader): Calling symbols_output once is enough.
13763
13764 2001-12-10 Akim Demaille <akim@epita.fr>
13765
13766 Now that states have a complete set of members, the linked list of
13767 reductions is useless: just fill directly the state's reductions
13768 member.
13769
13770 * src/state.h (struct reductions): Remove member `number' and
13771 `next'.
13772 * src/LR0.c (first_reduction, last_reduction): Remove.
13773 (save_reductions): Don't link the new reductions, store them in
13774 this_state.
13775 * src/lalr.c (set_state_table): No need to attach reductions to
13776 states, it's already done.
13777 * src/output.c (output_actions): No longer free the shifts, then
13778 the reductions, then the states: free all the states and their
13779 members.
13780
13781 2001-12-10 Akim Demaille <akim@epita.fr>
13782
13783 * src/options.c (OPTN, DRTV, BOTH): New.
13784 (option_table): Use them.
13785
13786 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13787 the job of system.h.
13788 * src/options.c: Don't include stdio.h and xalloc.h for the same
13789 reasons.
13790
13791 2001-12-10 Akim Demaille <akim@epita.fr>
13792
13793 * src/output.c (output, prepare): Make sure the values of the
13794 muscles `action' and `prologue' are 0-terminated.
13795
13796 2001-12-10 Akim Demaille <akim@epita.fr>
13797
13798 Clean up GCC warnings.
13799
13800 * src/reader.c (copy_action): `buf' is not used.
13801 (parse_skel_decl): Be static.
13802 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13803 * src/options.h (create_long_option_table): Have a real prototype.
13804 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13805 (hash_delete_at): Return const void *.
13806 Adjust casts to preserve the const.
13807
13808 2001-12-10 Akim Demaille <akim@epita.fr>
13809
13810 * configure.in: Require 2.52g.
13811 M4 is not needed, but AUTOM4TE is.
13812 * m4/m4.m4: Remove.
13813 * tests/Makefile.am: Adjust.
13814
13815 2001-12-10 Akim Demaille <akim@epita.fr>
13816
13817 One structure for states is enough, even though theoretically
13818 there are LR(0) states and LALR(1) states.
13819
13820 * src/lalr.h (state_t): Remove.
13821 (state_table): Be state_t **, not state_t *.
13822 * src/state.h (core, CORE_ALLOC): Rename as...
13823 (state_t, STATE_ALLOC): this.
13824 Add the LALR(1) members: shifts, reductions, errs.
13825 * src/LR0.c (state_table): Rename as...
13826 (state_hash): this, to avoid name clashes with the global
13827 `state_table'.
13828 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13829 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13830
13831 2001-12-10 Akim Demaille <akim@epita.fr>
13832
13833 Bison dumps core on bash.y.
13834 Reported by Pascal Bart.
13835
13836 * src/warshall.c (bitmatrix_print): New.
13837 (TC): Use it.
13838 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13839 j must be the outer loop.
13840 * tests/regression.at (Broken Closure): New.
13841
13842 2001-12-05 Akim Demaille <akim@epita.fr>
13843
13844 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13845 its argument.
13846 Reported by Peter Hamorsky.
13847
13848 2001-12-05 Akim Demaille <akim@epita.fr>
13849
13850 * src/conflicts.c (err_table): Remove.
13851 (resolve_sr_conflict): Adjust.
13852 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13853 Rename as...
13854 (state_t.reductions, state_t.shifts): this.
13855
13856 2001-12-05 Akim Demaille <akim@epita.fr>
13857
13858 * src/reduce.c (reduce_grammar_tables): No longer disable the
13859 removal of useless rules via CPP but via `if (0)', so that the
13860 compiler still check the code is valid.
13861 For instance, it should have noticed `rline' no longer exists: use
13862 the `line' member of rule_t.
13863 * src/gram.c (dummy, rline): Remove, unused.
13864
13865 2001-12-05 Akim Demaille <akim@epita.fr>
13866
13867 * src/output.c (pack_vector): Use assert, not berror.
13868 * src/main.c (berror): Remove, unused.
13869
13870 2001-12-05 Akim Demaille <akim@epita.fr>
13871
13872 New experimental feature: if --verbose --trace output all the
13873 items of a state, not only its kernel.
13874
13875 * src/print.c (print_core): If `trace_flag', then invoke closure
13876 before outputting the items of the state (print_core is no longer
13877 a correct name them).
13878 (print_results): Invoke new_closure/free_closure if needed.
13879
13880 2001-12-05 Akim Demaille <akim@epita.fr>
13881
13882 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13883 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13884 (nitemset): for consistency with the rest of the project.
13885
13886 2001-12-05 Akim Demaille <akim@epita.fr>
13887
13888 * src/closure.c (print_closure): Improve.
13889 (closure): Use it for printing input and output.
13890
13891 2001-12-05 Akim Demaille <akim@epita.fr>
13892
13893 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13894 indexed by nonterminals.
13895
13896 2001-12-05 Akim Demaille <akim@epita.fr>
13897
13898 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13899 what it was!).
13900 * src/warshall.h: Remove accidental duplication of the content.
13901
13902 2001-12-05 Akim Demaille <akim@epita.fr>
13903
13904 * src/closure.c (set_fderives): De-obfuscate.
13905
13906 2001-12-05 Akim Demaille <akim@epita.fr>
13907
13908 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13909
13910 2001-12-05 Akim Demaille <akim@epita.fr>
13911
13912 * src/closure.c (set_firsts): De-obfuscate.
13913
13914 2001-12-05 Akim Demaille <akim@epita.fr>
13915
13916 * src/output.c (action_row): De-obfuscate
13917 using the good o' techniques: arrays not pointers, variable
13918 locality, BITISSET, RESETBIT etc.
13919
13920 2001-12-05 Akim Demaille <akim@epita.fr>
13921
13922 Pessimize the code to simplify it: from now on, all the states
13923 have a valid SHIFTS, which NSHIFTS is possibly 0.
13924
13925 * src/LR0.c (shifts_new): Be global and move to..
13926 * src/state.c, src/state.h: here.
13927 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13928 * src/print_graph: Adjust.
13929
13930 2001-12-05 Akim Demaille <akim@epita.fr>
13931
13932 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13933 * src/conflicts.c: Use it.
13934 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13935 incorrectly ``simplified''.
13936
13937 2001-12-05 Akim Demaille <akim@epita.fr>
13938
13939 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13940 using the good o' techniques: arrays not pointers, variable
13941 locality, BITISSET, RESETBIT etc.
13942
13943 2001-12-05 Akim Demaille <akim@epita.fr>
13944
13945 * src/state.h (SHIFT_SYMBOL): New.
13946 * src/conflicts.c: Use it to deobfuscate.
13947
13948 2001-12-05 Akim Demaille <akim@epita.fr>
13949
13950 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13951 (print_reductions): De-obfuscate using the good o' techniques:
13952 arrays not pointers, variable locality, BITISSET.
13953
13954 2001-12-05 Akim Demaille <akim@epita.fr>
13955
13956 * src/conflicts.c (print_reductions): Arrays, not pointers.
13957 Use BITISSET.
13958
13959 2001-12-05 Akim Demaille <akim@epita.fr>
13960
13961 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13962
13963 2001-12-05 Akim Demaille <akim@epita.fr>
13964
13965 * src/conflicts.c (print_reductions): Improve variable locality.
13966
13967 2001-12-05 Akim Demaille <akim@epita.fr>
13968
13969 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13970
13971 2001-12-05 Akim Demaille <akim@epita.fr>
13972
13973 * src/conflicts.c (print_reductions): Improve variable locality.
13974
13975 2001-12-05 Akim Demaille <akim@epita.fr>
13976
13977 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13978 * src/lalr.c: Use them.
13979
13980 2001-12-05 Akim Demaille <akim@epita.fr>
13981
13982 * src/LR0.c (augment_automaton): Formatting changes.
13983 Better variable locality.
13984
13985 2001-12-05 Akim Demaille <akim@epita.fr>
13986
13987 * src/lalr.c (matrix_print): New.
13988 (transpose): Use it.
13989 Use arrays instead of pointers.
13990
13991 2001-12-05 Akim Demaille <akim@epita.fr>
13992
13993 * src/lalr.c (maxrhs): Move to...
13994 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13995 * src/lalr.c (build_relations): Adjust.
13996
13997 2001-12-05 Akim Demaille <akim@epita.fr>
13998
13999 * src/lalr.c (transpose): Free the memory allocated to the
14000 argument, as it is replaced by the results by the unique caller.
14001 (build_relations): Merely invoke transpose: it handles the memory
14002 deallocation.
14003 Improve variable locality.
14004 Avoid variables used as mere abbreviations.
14005 (compute_lookaheads): Use arrays instead of pointers.
14006
14007 2001-12-05 Akim Demaille <akim@epita.fr>
14008
14009 * src/lalr.c (initialize_F): Improve variable locality.
14010 Avoid variables used as mere abbreviations.
14011
14012 2001-12-05 Akim Demaille <akim@epita.fr>
14013
14014 * src/derives.c (print_derives): Display the ruleno.
14015 * src/lalr.c (initialize_F, transpose): Better variable locality
14016 to improve readability.
14017 Avoid variables used as mere abbreviations.
14018
14019 2001-12-05 Akim Demaille <akim@epita.fr>
14020
14021 * src/lalr.c (traverse): Use arrays instead of pointers.
14022
14023 2001-12-05 Akim Demaille <akim@epita.fr>
14024
14025 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
14026 the handling of squeue.
14027 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14028
14029 2001-12-05 Akim Demaille <akim@epita.fr>
14030
14031 Because useless nonterminals are now kept alive (instead of being
14032 `destroyed'), we now sometimes examine them, and store information
14033 related to them. Hence we need to know their number, and adjust
14034 memory allocations.
14035
14036 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
14037 static.
14038 * src/LR0.c (allocate_itemsets): The memory allocated to
14039 `symbol_count' was used for two different purpose: once to count
14040 the number of occurrences of each symbol, and later reassigned to
14041 `shift_symbol', containing the symbol that can be shifted from a
14042 given state.
14043 Deobfuscate, i.e., allocate, use and free `symbol_count' here
14044 only, and...
14045 (new_itemsets): Allocate `shift_symbol' here.
14046 (allocate_itemsets): symbol_count includes useless nonterminals.
14047 Make room for them.
14048 (free_storage): Use `free', not `XFREE', for pointers that cannot
14049 be null.
14050
14051 2001-12-05 Akim Demaille <akim@epita.fr>
14052
14053 * src/nullable.c (set_nullable): Deobfuscate the handling of
14054 ritem.
14055 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14056
14057 2001-12-05 Akim Demaille <akim@epita.fr>
14058
14059 * src/gram.c, src/gram.h (ritem_print): New.
14060 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
14061 (This useless function was defined only to work around VMS linkers
14062 that can't handle compilation units with variables only).
14063 * src/reduce.c (dump_grammar): Use it to trace the construction of
14064 ritem.
14065
14066 2001-12-04 Paul Eggert <eggert@twinsun.com>
14067
14068 * src/bison.simple (union yyalloc): Change member names
14069 to be the same as the stack names.
14070 (yyparse): yyptr is now union yyalloc *, not char *.
14071 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
14072 and may generate better code on some machines.
14073 (yystpcpy): Use prototype if __STDC__ is defined, not just
14074 if __cplusplus is defined.
14075
14076 2001-11-30 Akim Demaille <akim@epita.fr>
14077
14078 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
14079 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
14080 Gettext doesn't compile cleanly, and dies with -Werror.
14081 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
14082 Include WARNING_CFLAGS here.
14083 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
14084 before being defined.
14085
14086 2001-11-27 Paul Eggert <eggert@twinsun.com>
14087
14088 * lib/quotearg.h (quotearg_n, quotearg_n_style):
14089 First arg is int, not unsigned.
14090 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
14091 (SIZE_MAX, UINT_MAX): New macros.
14092 (quotearg_n_options): Abort if N is negative.
14093 Avoid overflow check on hosts where size_t is 64 bits and int
14094 is 32 bits, as overflow is impossible there.
14095 Fix off-by-one typo that caused unnecessary reallocation.
14096
14097 2001-11-29 Paul Eggert <eggert@twinsun.com>
14098
14099 Name space cleanup in generated parser.
14100
14101 * doc/bison.texinfo (Bison Parser): Discuss system headers
14102 and their effect on the user name space.
14103
14104 * src/bison.simple:
14105 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
14106 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
14107 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
14108
14109 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
14110 on user names when possible.
14111
14112 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
14113 Simplify test for whather <alloca.h> exists.
14114
14115 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
14116
14117 (<stdio.h>): Include if YYDEBUG.
14118
14119 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
14120 ! defined (yyoverflow) && ! defined (yymemcpy).
14121
14122 (yymemcpy, yyparse): Rename local variables as needed so that
14123 they all begin with 'yy'.
14124
14125 (yystrlen, yystpcpy): New functions.
14126
14127 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
14128 All uses changed.
14129
14130 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
14131 instead of relying on string.h functions. Use YYSTACK_ALLOC
14132 and YYSTACK_FREE instead of malloc and free.
14133
14134 2001-11-30 Akim Demaille <akim@epita.fr>
14135
14136 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
14137 before their first uses.
14138 (YYBISON, YYPURE): Move to the top of the output.
14139
14140 2001-11-30 Akim Demaille <akim@epita.fr>
14141
14142 * tests/reduce.at (Useless Nonterminals): Fix.
14143
14144 2001-11-30 Akim Demaille <akim@epita.fr>
14145
14146 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
14147 if body instead of `;' to pacify GCC's warnings.
14148
14149 2001-11-30 Akim Demaille <akim@epita.fr>
14150
14151 Instead of mapping the LHS of unused rules to -1, keep the LHS
14152 valid, but flag the rules as invalid.
14153
14154 * src/gram.h (rule_t): `useful' is a new member.
14155 * src/print.c (print_grammar): Adjust.
14156 * src/derives.c (set_derives): Likewise.
14157 * src/reader.c (packgram, reduce_output): Likewise.
14158 * src/reduce.c (reduce_grammar_tables): Likewise.
14159 * tests/reduce.at (Underivable Rules, Useless Rules): New.
14160
14161 2001-11-30 Akim Demaille <akim@epita.fr>
14162
14163 * src/reduce.c (reduce_output): Formatting changes.
14164 * src/print.c (print_results, print_grammar): Likewise.
14165 * tests/regression.at (Rule Line Numbers)
14166 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
14167
14168 2001-11-30 Akim Demaille <akim@epita.fr>
14169
14170 * src/reduce.c (nonterminals_reduce): Instead of throwing away
14171 useless nonterminals, move them at the end of the symbol arrays.
14172 (reduce_output): Adjust.
14173 * tests/reduce.at (Useless Nonterminals): Adjust.
14174
14175 2001-11-30 Akim Demaille <akim@epita.fr>
14176
14177 * src/reduce.c: Various comment/formatting changes.
14178 (nonterminals_reduce): New, extracted from...
14179 (reduce_grammar_tables): here.
14180 (reduce_grammar): Call nonterminals_reduce.
14181
14182 2001-11-29 Paul Eggert <eggert@twinsun.com>
14183
14184 * src/bison.simple (YYSTACK_REALLOC): Remove.
14185 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
14186 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
14187 New macros.
14188 (union yyalloc): New type.
14189 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
14190 an arbitrary restriction on hosts where size_t is wider than int.
14191
14192 (yyparse): Don't dump core if alloca or malloc fails; instead, report
14193 a parser stack overflow. Allocate just one block of memory for all
14194 three stacks, instead of allocating three blocks; this typically is
14195 faster and reduces fragmentation.
14196
14197 Do not limit the number of items in the stack to a value that fits
14198 in 'int', as this is an arbitrary limit on hosts with 64-bit
14199 size_t and 32-bit int.
14200
14201 2001-11-29 Marc Autret <autret_m@epita.fr>
14202
14203 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
14204 of defining YYERROR_VERBOSE.
14205 [AT_DATA]: $4 is now out of C declarations in the prologue.
14206
14207 2001-11-28 Marc Autret <autret_m@epita.fr>
14208
14209 * src/reader.c (parse_dquoted_param): New.
14210 (parse_skel_decl): Use it.
14211 * src/lex.h: Add its prototype.
14212 * src/lex.c (literalchar): Become not static.
14213
14214 2001-11-28 Marc Autret <autret_m@epita.fr>
14215
14216 * src/output.h: And put its extern declaration here.
14217 * src/output.c (error_verbose): Define here.
14218 (prepare): Echo name modification.
14219 * src/getargs.h: Clean its extern declaration.
14220 * src/getargs.c (error_verbose_flag): Remove.
14221 (getargs): Remove case 'e'.
14222 * src/options.c (option_table): 'error-verbose' is now seen as simple
14223 percent option.
14224 Include output.h.
14225
14226 * src/reader.c (read_declarations): Remove case tok_include.
14227 (parse_include_decl): Remove.
14228 * src/lex.h (token_t): Remove tok_include.
14229 * src/options.c (option_table): 'include' is now a simple command line
14230 option.
14231
14232 2001-11-28 Marc Autret <autret_m@epita.fr>
14233
14234 * src/bison.simple: Adjust muscle names.
14235 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14236 * src/output.c (prepare): s/_/-/ for the muscles names.
14237 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14238
14239 2001-11-28 Marc Autret <autret_m@epita.fr>
14240
14241 * src/bison.simple: Fix debug.
14242 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14243
14244 2001-11-28 Akim Demaille <akim@epita.fr>
14245
14246 * src/LR0.c (shifts_new): New.
14247 (save_shifts, insert_start_shift, augment_automaton): Use it.
14248
14249 2001-11-28 Akim Demaille <akim@epita.fr>
14250
14251 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14252 keep ruleno only.
14253
14254 2001-11-28 Akim Demaille <akim@epita.fr>
14255
14256 * src/closure.c (closure): Instead of looping over word in array
14257 then bits in words, loop over bits in array.
14258
14259 2001-11-28 Akim Demaille <akim@epita.fr>
14260
14261 * src/closure.c (closure): No longer optimize the special case
14262 where all the bits of `ruleset[r]' are set to 0, to make the code
14263 clearer.
14264
14265 2001-11-28 Akim Demaille <akim@epita.fr>
14266
14267 * src/closure.c (closure): `r' and `c' are new variables, used to
14268 de-obfuscate accesses to RULESET and CORE.
14269
14270 2001-11-28 Akim Demaille <akim@epita.fr>
14271
14272 * src/reduce.c (reduce_print): Use ngettext.
14273 (dump_grammar): Improve the trace accuracy.
14274
14275 2001-11-28 Akim Demaille <akim@epita.fr>
14276
14277 * src/reduce.c (dump_grammar): Don't translate trace messages.
14278
14279 2001-11-28 Akim Demaille <akim@epita.fr>
14280
14281 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14282 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14283 as all tags are free'ed afterwards.
14284 From Enrico Scholz.
14285
14286 2001-11-27 Paul Eggert <eggert@twinsun.com>
14287
14288 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14289 use alloca when we didn't want to, and vice versa.
14290
14291 2001-11-27 Marc Autret <autret_m@epita.fr>
14292
14293 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14294 initialization.
14295 * src/output.c (prepare): Remove its update.
14296
14297 2001-11-27 Marc Autret <autret_m@epita.fr>
14298
14299 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14300 Use %error-verbose.
14301
14302 2001-11-27 Marc Autret <autret_m@epita.fr>
14303
14304 * src/bison.simple: Remove YYERROR_VERBOSE using.
14305 Use %%error_verbose.
14306 (yyparse): Likewise.
14307 * src/output.c (prepare): Give its final value.
14308 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14309 * src/getargs.h: Add its extern declaration.
14310 * src/getargs.c (error_verbose_flag): New int.
14311 (getargs): Update to catch new case.
14312 * src/options.c (option_table): 'error-verbose' is a new option.
14313 (shortopts): Update.
14314
14315 2001-11-27 Akim Demaille <akim@epita.fr>
14316
14317 * src/system.h: Use intl/libgettext.h.
14318 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14319
14320 2001-11-27 Akim Demaille <akim@epita.fr>
14321
14322 * tests/torture.at (Exploding the Stack Size with Malloc):
14323 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14324
14325 2001-11-27 Akim Demaille <akim@epita.fr>
14326
14327 * src/files.c: Include error.h.
14328 Reported by Hans Aberg.
14329
14330 2001-11-26 Marc Autret <autret_m@epita.fr>
14331
14332 * src/reader.c (parse_include_decl): New, not yet implemented.
14333 (read_declarations): Add case tok_include.
14334 * src/getargs.h (include): Add its extern definition.
14335 * src/getargs.c (include): New const char *.
14336 (getargs): Add case '-I'.
14337 * src/options.c (option_table): Add include as command line and
14338 percent option.
14339 * src/lex.h (token_t): Add tok_include.
14340
14341 2001-11-26 Akim Demaille <akim@epita.fr>
14342
14343 * src/reader.c (readgram): Make sure rules for mid-rule actions
14344 have a lineno equal to that of their host rule.
14345 Reported by Hans Aberg.
14346 * tests/regression.at (Rule Line Numbers): New.
14347
14348 2001-11-26 Akim Demaille <akim@epita.fr>
14349
14350 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14351 size_ts.
14352
14353 2001-11-26 Akim Demaille <akim@epita.fr>
14354
14355 * src/complain.c, src/complain.h (error): Remove, provided by
14356 lib/error.[ch].
14357
14358 2001-11-26 Akim Demaille <akim@epita.fr>
14359
14360 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14361 issue an error message.
14362 * tests/regression.at (Invalid %directive): New.
14363 Reported by Hans Aberg.
14364
14365 2001-11-26 Akim Demaille <akim@epita.fr>
14366
14367 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14368 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14369
14370 2001-11-26 Akim Demaille <akim@epita.fr>
14371
14372 * src/conflicts.c (conflicts_print): Don't complain at all when
14373 there are no reduce/reduce conflicts, and as many shift/reduce
14374 conflicts as expected.
14375 * tests/regression.at (%expect right): Adjust.
14376
14377 2001-11-23 Akim Demaille <akim@epita.fr>
14378
14379 * lib/alloca.c: Update, from fileutils.
14380
14381 2001-11-23 Akim Demaille <akim@epita.fr>
14382
14383 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14384
14385 2001-11-23 Akim Demaille <akim@epita.fr>
14386
14387 * src/system.h: Include alloca.h.
14388 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14389
14390 2001-11-23 Akim Demaille <akim@epita.fr>
14391
14392 * src/print_graph.c (print_actions): Remove `rule', unused.
14393 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14394 pacify GCC's signed < unsigned warnings.
14395 * src/closure.c (itemsetsize): Likewise.
14396 * src/reader.c (symbol_list_new): Static.
14397
14398 2001-11-23 Akim Demaille <akim@epita.fr>
14399
14400 Attaching lineno to buckets is stupid, since only one copy of each
14401 symbol is kept, only the line of the first occurrence is kept too.
14402
14403 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14404 * src/reader.c (rline_allocated): Remove, unused.
14405 (symbol_list): Have a `line' member.
14406 (symbol_list_new): New.
14407 (readgram): Use it.
14408 * src/print.c (print_grammar): Output the rule line numbers.
14409 * tests/regression.at (Solved SR Conflicts)
14410 (Unresolved SR Conflicts): Adjust.
14411 Reported by Hans Aberg.
14412
14413 2001-11-22 Marc Autret <autret_m@epita.fr>
14414
14415 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14416
14417 2001-11-22 Marc Autret <autret_m@epita.fr>
14418
14419 * src/muscle_tab.c (muscle_init): Remove initialization of
14420 skeleton muscle.
14421 * src/output.c (output_master_parser): Do it here.
14422
14423 2001-11-20 Akim Demaille <akim@epita.fr>
14424
14425 * po/sv.po: New.
14426 * configure.in (ALL_LINGUAS): Adjust.
14427 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14428 longer contains strings to translate.
14429
14430 2001-11-19 Akim Demaille <akim@epita.fr>
14431
14432 * src/conflicts.c (conflicts_print): Add a missing \n.
14433
14434 2001-11-19 Akim Demaille <akim@epita.fr>
14435
14436 * src/nullable.c (nullable_print): New.
14437 (set_nullable): Call it when tracing.
14438 Better locality of variables.
14439
14440 2001-11-19 Akim Demaille <akim@epita.fr>
14441
14442 * src/print.c (print_actions): Better locality of variables.
14443
14444 2001-11-19 Akim Demaille <akim@epita.fr>
14445
14446 * src/derives.c (print_derives): Fix and enrich.
14447 * src/closure.c (print_fderives): Likewise.
14448
14449 2001-11-19 Akim Demaille <akim@epita.fr>
14450
14451 * src/closure.c (itemsetend): Remove, replaced with...
14452 (itemsetsize): new.
14453
14454 2001-11-19 Akim Demaille <akim@epita.fr>
14455
14456 * src/LR0.c (kernel_end): Remove, replaced with...
14457 (kernel_size): new.
14458
14459 2001-11-19 Akim Demaille <akim@epita.fr>
14460
14461 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14462 to clarify.
14463
14464 2001-11-19 Akim Demaille <akim@epita.fr>
14465
14466 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14467
14468 2001-11-19 Akim Demaille <akim@epita.fr>
14469
14470 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14471 trace messages.
14472 * src/LR0.c: Likewise.
14473 (allocate_itemsets): Use arrays instead of pointers to clarify.
14474
14475 2001-11-19 Akim Demaille <akim@epita.fr>
14476
14477 * src/getargs.c (statistics_flag): Replace with...
14478 (trace_flag): New.
14479 (longopts): Accept --trace instead of --statistics.
14480 * src/getargs.h, src/options.c: Adjust.
14481 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14482 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14483
14484 2001-11-19 Akim Demaille <akim@epita.fr>
14485
14486 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14487 pointers to clarify the code.
14488 (save_reductions, save_shifts): Factor common parts of alternatives.
14489
14490 2001-11-19 Akim Demaille <akim@epita.fr>
14491
14492 * src/LR0.c (new_state, get_state): Complete TRACE code.
14493 * src/closure.c: Include `reader.h' to get `tags', needed by the
14494 trace code.
14495 Rename the conditional DEBUG as TRACE.
14496 Output consistently TRACEs to stderr, not stdout.
14497 * src/derives.c: Likewise.
14498 * src/reduce.c: (inaccessable_symbols): Using if is better style
14499 than goto.
14500 Use `#if TRACE' instead of `#if 0' for tracing code.
14501
14502 2001-11-19 Akim Demaille <akim@epita.fr>
14503
14504 * src/system.h (LIST_FREE, shortcpy): New.
14505 * src/LR0.c: Use them.
14506 * src/output.c (free_itemsets, free_reductions, free_shifts):
14507 Remove, replaced by LIST_FREE.
14508
14509 2001-11-19 Akim Demaille <akim@epita.fr>
14510
14511 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14512 (REDUCTIONS_ALLOC): New.
14513 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14514 allocation.
14515
14516 2001-11-19 Akim Demaille <akim@epita.fr>
14517
14518 * src/LR0.c (new_state): Complete trace code.
14519 * src/nullable.c (set_nullable): Don't translate traces.
14520
14521 2001-11-19 Akim Demaille <akim@epita.fr>
14522
14523 * src/print_graph.c (print_core): Better locality of variables.
14524 * src/print.c (print_core): Likewise.
14525
14526 2001-11-19 Akim Demaille <akim@epita.fr>
14527
14528 * src/vcg.c: You do the output, so you are responsible of the
14529 handling of VCG syntax, in particular: use quotearg.
14530 * src/print_graph.c: Don't.
14531 (print_actions): Don't output the actions as part of the nodes,
14532 since that's the job of the edges.
14533 (print_state): Don't output by hand: fill the node description,
14534 and ask for its output.
14535
14536 2001-11-19 Akim Demaille <akim@epita.fr>
14537
14538 * src/bison.simple (yyparse): When verbosely reporting an error,
14539 no longer put additional quotes around token names.
14540 * tests/calc.at: Adjust.
14541
14542 2001-11-19 Akim Demaille <akim@epita.fr>
14543
14544 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14545 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14546 * src/output.c: Adjust.
14547
14548 2001-11-19 Akim Demaille <akim@epita.fr>
14549
14550 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14551 (rule_t): this.
14552 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14553
14554 2001-11-19 Akim Demaille <akim@epita.fr>
14555
14556 * src/gram.h (rule_t): New.
14557 (rule_table): New.
14558 (rrhs, rlhs): Remove, part of state_t.
14559 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14560 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14561 * src/reader.c, src/reduce.c: Adjust.
14562
14563 2001-11-19 Akim Demaille <akim@epita.fr>
14564
14565 * src/reader.c (symbols_output): New, extracted from...
14566 (packsymbols): Here.
14567 (reader): Call it.
14568
14569 2001-11-19 Akim Demaille <akim@epita.fr>
14570
14571 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14572 (maxrhs): this new function.
14573
14574 2001-11-19 Akim Demaille <akim@epita.fr>
14575
14576 * src/lalr.c (F): New macro to access the variable F.
14577 Adjust.
14578
14579 2001-11-19 Akim Demaille <akim@epita.fr>
14580
14581 * src/lalr.h (LA): New macro to access the variable LA.
14582 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14583 * src/lalr.c: Adjust.
14584
14585 2001-11-19 Akim Demaille <akim@epita.fr>
14586
14587 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14588 (set_state_table): handle the `lookaheads' members.
14589
14590 2001-11-19 Akim Demaille <akim@epita.fr>
14591
14592 * src/lalr.h (lookaheads): Removed array, whose contents is now
14593 a member of...
14594 (state_t): this structure.
14595 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14596 Adjust.
14597
14598 2001-11-19 Akim Demaille <akim@epita.fr>
14599
14600 * src/lalr.h (consistent): Removed array, whose contents is now
14601 a member of...
14602 (state_t): this structure.
14603 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14604 Adjust.
14605
14606 2001-11-19 Akim Demaille <akim@epita.fr>
14607
14608 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14609 contents are now members of...
14610 (state_t): this structure.
14611 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14612 Adjust.
14613
14614 2001-11-19 Akim Demaille <akim@epita.fr>
14615
14616 * src/lalr.h (state_t): New.
14617 (state_table): Be a state_t * instead of a core **.
14618 (accessing_symbol): Remove, part of state_t.
14619 * src/lalr.c: Adjust.
14620 (set_accessing_symbol): Merge into...
14621 (set_state_table): this.
14622 * src/print_graph.c, src/conflicts.c: Adjust.
14623
14624 2001-11-14 Akim Demaille <akim@epita.fr>
14625
14626 * tests/calc.at, tests/output.at, tests/regression.at,
14627 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14628 now the tests are run in private dirs, therefore AC_CLEANUP and
14629 family can be simplified to 0-ary.
14630 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14631 use abs. path to find config.h.
14632 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14633 stderr, there can be way too much random noise.
14634 Instead pass -Werror to GCC and rely on the exit status.
14635 Reported by Wolfram Wagner.
14636
14637 2001-11-14 Akim Demaille <akim@epita.fr>
14638
14639 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14640 defined only if yyoverflow is defined, to avoid `warning: unused
14641 variable `yyvs1''.
14642 Reported by The Test Suite.
14643
14644 2001-11-14 Akim Demaille <akim@epita.fr>
14645
14646 * src/print.c: Include reduce.h.
14647 Reported by Hans Aberg.
14648
14649 2001-11-14 Akim Demaille <akim@epita.fr>
14650
14651 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14652 Revert a previous patch: these are really const.
14653 * src/conflicts.c (conflict_report): Additional useless pair of
14654 braces to pacify GCC's warnings for `if () if () {} else {}'.
14655 * src/lex.c (parse_percent_token): Replace equal_offset with
14656 arg_offset.
14657 arg is const.
14658 Be sure to strdup `arg' when used, since there is no reason for
14659 token_buffer not to change.
14660
14661 2001-11-14 Akim Demaille <akim@epita.fr>
14662
14663 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14664 definition.
14665 * src/main.c (main): Use them.
14666 Suggested by Hans Aberg.
14667
14668 2001-11-12 Akim Demaille <akim@epita.fr>
14669
14670 * src/system.h (ngettext): Now that we use ngettext, be sure to
14671 provide a default definition when NLS are not used.
14672
14673 2001-11-12 Akim Demaille <akim@epita.fr>
14674
14675 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14676 Use @kbd to denote user input.
14677 (Language and Grammar): ANSIfy the example.
14678 Adjust its layout for info/notinfo.
14679 (Location Tracking Calc): Output error messages to stderr.
14680 Output locations in a more GNUtically correct way.
14681 Fix a couple of Englishos.
14682 Adjust @group/@end group pairs.
14683
14684 2001-11-12 Akim Demaille <akim@epita.fr>
14685
14686 %expect was not functioning at all.
14687
14688 * src/conflicts.c (expected_conflicts): Set to -1.
14689 (conflict_report): Use ngettext.
14690 (conflicts_print): Check %expect and make its violation an error.
14691 * doc/bison.texinfo (Expect Decl): Adjust.
14692 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14693 * tests/regression.at (%expect not enough, %expect right)
14694 (%expect too much): New.
14695
14696 2001-11-12 Akim Demaille <akim@epita.fr>
14697
14698 * tests/regression.at (Conflicts): Rename as...
14699 (Unresolved SR Conflicts): this.
14700 (Solved SR Conflicts): New.
14701
14702 2001-11-12 Akim Demaille <akim@epita.fr>
14703
14704 * src/reduce.c (print_results): Rename as...
14705 (reduce_output): This.
14706 Output to OUT, passed as argument, instead of output_obstack.
14707 (dump_grammar): Likewise.
14708 (reduce_free): New.
14709 Also free V1.
14710 (reduce_grammar): No longer call reduce_output, since...
14711 * src/print.c (print_results): do it.
14712 * src/main.c (main): Call reduce_free;
14713
14714 2001-11-12 Akim Demaille <akim@epita.fr>
14715
14716 * src/conflicts.c (print_reductions): Accept OUT as argument.
14717 Output to it, not to output_obstack.
14718 * src/print.c (print_actions): Adjust.
14719
14720 2001-11-12 Akim Demaille <akim@epita.fr>
14721
14722 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14723 the result instead of using...
14724 (src_total, rrc_total, src_count, rrc_count): Remove.
14725 (any_conflicts): Remove.
14726 (print_conflicts): Split into...
14727 (conflicts_print, conflicts_output): New.
14728 * src/conflicts.h: Adjust.
14729 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14730 * src/print.c (print_grammar): Issue `\n' between two rules.
14731 * tests/regression.at (Conflicts): New.
14732 Reported by Tom Lane.
14733
14734 2001-11-12 Akim Demaille <akim@epita.fr>
14735
14736 * tests/regression.at (Invalid input): Remove, duplicate with
14737 ``Invalid input: 1''.
14738
14739 2001-11-12 Akim Demaille <akim@epita.fr>
14740
14741 * tests/torture.at (AT_DATA_STACK_TORTURE)
14742 (Exploding the Stack Size with Alloca)
14743 (Exploding the Stack Size with Malloc): New.
14744
14745 2001-11-12 Akim Demaille <akim@epita.fr>
14746
14747 * src/bison.simple (YYSTACK_REALLOC): New.
14748 (yyparse) [!yyoverflow]: Use it and free the old stack.
14749 Reported by Per Allansson.
14750
14751 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14752
14753 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14754 define CPP macro, which substitute YYSTYPE by yystype.
14755 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14756 with yyltype/YYLTYPE. This allows inclusion of the generated
14757 header within the parser if the compiler, such as GGC, accepts
14758 multiple equivalent #defines.
14759 From Akim.
14760
14761 2001-11-05 Akim Demaille <akim@epita.fr>
14762
14763 * src/reader.c (symbols_output): New, extracted from...
14764 (packsymbols): here.
14765 (reader): Adjust.
14766
14767 2001-11-05 Akim Demaille <akim@epita.fr>
14768
14769 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14770
14771 2001-11-05 Akim Demaille <akim@epita.fr>
14772
14773 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14774 pattern.
14775
14776 2001-11-05 Akim Demaille <akim@epita.fr>
14777
14778 * src/options.h (struct option_table_struct): set_flags is void*.
14779 * src/options.c (longopts): Support `--output' and `%output'.
14780 (usage): Adjust.
14781 * src/lex.h (tok_setopt): Remove, replaced with...
14782 (tok_intopt, tok_stropt): these new guys.
14783 * src/lex.c (getopt.h): Not needed.
14784 (token_buffer, unlexed_token_buffer): Not const.
14785 (percent_table): Promote `-' over `_' in directive names.
14786 Active `%name-prefix', `file-prefix', and `output'.
14787 (parse_percent_token): Accept possible arguments to directives.
14788 Promote `-' over `_' in directive names.
14789
14790 2001-11-04 Akim Demaille <akim@epita.fr>
14791
14792 * doc/bison.texinfo (Decl Summary): Split the list into
14793 `directives for grammars' and `directives for bison'.
14794 Sort'em.
14795 Add description of `%name-prefix', `file-prefix', and `output'.
14796 Promote `-' over `_' in directive names.
14797 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14798 Simplify the description of `--name-prefix'.
14799 Promote `-' over `_' in directive names.
14800 Promote `--output' over `--output-file'.
14801 Fix the description of `--defines'.
14802 * tests/output.at: Exercise %file-prefix and %output.
14803
14804 2001-11-02 Akim Demaille <akim@epita.fr>
14805
14806 * doc/refcard.tex: Update.
14807
14808 2001-11-02 Akim Demaille <akim@epita.fr>
14809
14810 * src/symtab.h (SUNDEF): New.
14811 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14812 stand for `uninitialized', instead of 0.
14813 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14814 * src/lex.c (lex): Adjust.
14815
14816 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14817 Number it 0.
14818 Let yylex return it instead of a plain 0.
14819 Reported by Dick Streefland.
14820
14821 2001-11-02 Akim Demaille <akim@epita.fr>
14822
14823 * tests/regression.at (Mixing %token styles): New test.
14824
14825 2001-11-02 Akim Demaille <akim@epita.fr>
14826
14827 * src/reader.c (parse_thong_decl): Formatting changes.
14828 (token_translations_init): New, extracted from...
14829 (packsymbols): Here.
14830 Adjust.
14831
14832 2001-11-01 Akim Demaille <akim@epita.fr>
14833
14834 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14835 Check that `9foo.y' produces correct cpp guards.
14836 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14837 guards.
14838 Reported by Wwp.
14839
14840 2001-11-01 Akim Demaille <akim@epita.fr>
14841
14842 * tests/regression.at (Invalid input: 2): New.
14843 * src/lex.c (unlexed_token_buffer): New.
14844 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14845 too.
14846 Reported by Wwp.
14847
14848 2001-11-01 Akim Demaille <akim@epita.fr>
14849
14850 * tests/calc.at: Catch up with 1.30.
14851 * configure.in: Bump to 1.49a.
14852 Adjust to newer Autotest.
14853
14854 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14855
14856 * src/conflicts.c: Move global variables rrc_total and src_total ...
14857 (print_conflicts): here.
14858 * src/output.c (output): Free global variable user_toknums.
14859 * src/lex.c (token_obstack): Become static.
14860
14861 2001-10-18 Akim Demaille <akim@epita.fr>
14862
14863 * tests/atlocal.in (GCC): Add.
14864 * tests/calc.at: s/m4_match/m4_bmatch/.
14865 s/m4_patsubst/m4_bpatsubst/.
14866 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14867 * configure.in: AC_SUBST(GCC).
14868
14869 2001-10-14 Marc Autret <autret_m@epita.fr>
14870
14871 * src/options.c (create_long_option_table): Fix.
14872
14873 2001-10-10 Akim Demaille <akim@epita.fr>
14874
14875 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14876
14877 2001-10-04 Akim Demaille <akim@epita.fr>
14878
14879 * src/reader.c (parse_union_decl): Push the caracters in
14880 union_obstack, not attrs_obstack.
14881
14882 2001-10-04 Akim Demaille <akim@epita.fr>
14883
14884 Merge in the branch 1.29.
14885
14886 * src/reader.c (packsymbols): Use a temporary obstack for
14887 `%%tokendef', since output_stack is already used elsewhere.
14888
14889 2001-10-02 Akim Demaille <akim@epita.fr>
14890
14891 Bump 1.29d.
14892
14893 2001-10-02 Akim Demaille <akim@epita.fr>
14894
14895 Version 1.29c.
14896
14897 2001-10-02 Akim Demaille <akim@epita.fr>
14898
14899 * tests/regression.at (Invalid CPP headers): New.
14900 From Alexander Belopolsky.
14901 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14902
14903 2001-10-02 Akim Demaille <akim@epita.fr>
14904
14905 * tests/regression.at (Invalid input): New.
14906 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14907 Reported by Shura.
14908
14909 2001-10-02 Akim Demaille <akim@epita.fr>
14910
14911 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14912
14913 2001-10-02 Akim Demaille <akim@epita.fr>
14914
14915 * src/output.c (output_parser): Assert `skeleton'.
14916 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14917 systems.
14918 From Shura.
14919
14920 2001-10-01 Marc Autret <autret_m@epita.fr>
14921
14922 * src/lex.h: Echo modifications.
14923 * src/lex.c (unlex): Parameter is now token_t.
14924 From Hans Aberg.
14925
14926 2001-10-01 Marc Autret <autret_m@epita.fr>
14927
14928 * src/main.c: Include lex.h.
14929 From Hans Aberg.
14930
14931 2001-09-29 Akim Demaille <akim@epita.fr>
14932
14933 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14934
14935 2001-09-28 Akim Demaille <akim@epita.fr>
14936
14937 * tests/testsuite.at: Update to newer Autotest.
14938 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14939
14940 2001-09-27 Akim Demaille <akim@epita.fr>
14941
14942 Position independent wrapper.
14943
14944 * tests/bison: Remove.
14945 * tests/bison.in: New.
14946 * configure.in: Adjust.
14947
14948 2001-09-27 Paul Eggert <eggert@twinsun.com>
14949
14950 Port quotearg fixes from tar 1.13.24.
14951
14952 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14953 tm to be declared.
14954 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14955 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14956
14957 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14958 * m4/mbrtowc.m4: New file.
14959 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14960 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14961
14962 2001-09-27 Akim Demaille <akim@epita.fr>
14963
14964 Bump to 1.29c.
14965
14966 2001-09-27 Akim Demaille <akim@epita.fr>
14967
14968 Version 1.29b.
14969
14970 2001-09-25 Akim Demaille <akim@epita.fr>
14971
14972 * src/system.h: Include `xalloc.h'.
14973 Remove it from the C files.
14974 * src/files.c (output_files): Free the obstacks.
14975 * src/lex.c (init_lex): Rename as...
14976 (lex_init): this.
14977 (lex_free): New.
14978 * src/main.c (main): Use it.
14979
14980 2001-09-24 Marc Autret <autret_m@epita.fr>
14981
14982 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14983 to output informations in fout (FILE*).
14984 (open_graph, close_graph): Likewise.
14985 (output_graph, output_edge, output_node): Likewise.
14986 * src/vcg.h: Update function prototypes.
14987 * src/print_graph.c (print_graph): Open output graph file.
14988 (print_actions): Adjust.
14989 * src/files.h: Remove extern declaration.
14990 * src/files.c: Remove graph_obstack declaration.
14991 (open_files): Remove graph_obstack initialization.
14992 (output_files): Remove graph_obstack saving.
14993
14994 2001-09-24 Marc Autret <autret_m@epita.fr>
14995
14996 * src/files.c (compute_output_file_names): Fix.
14997
14998 2001-09-24 Marc Autret <autret_m@epita.fr>,
14999 Akim Demaille <akim@epita.fr>
15000
15001 * src/reader.c (reader): Remove call to free_symtab ().
15002 * src/main.c (main): Call it here.
15003 Include symtab.h.
15004 * src/conflicts.c (initialize_conflicts): Rename as...
15005 (solve_conflicts): this.
15006 * src/print.c (print_core, print_actions, print_state)
15007 (print_grammar): Dump to a file instead a `output_obstack'.
15008 (print_results): Dump `output_obstack', and then proceed with the
15009 FILE *.
15010 * src/files.c (compute_output_file_names, close_files): New.
15011 (output_files): Adjust.
15012 * src/main.c (main): Adjust.
15013
15014 2001-09-23 Marc Autret <autret_m@epita.fr>
15015
15016 * src/files.c (compute_header_macro): Computes header macro name
15017 from spec_defines_file when given.
15018
15019 2001-09-23 Marc Autret <autret_m@epita.fr>
15020
15021 * src/files.c (output_files): Add default extensions.
15022
15023 2001-09-22 Akim Demaille <akim@epita.fr>
15024
15025 * src/conflicts.c (finalize_conflicts): Rename as...
15026 (free_conflicts): this.
15027
15028 2001-09-22 Akim Demaille <akim@epita.fr>
15029
15030 * src/gram.c (gram_free): Rename back as...
15031 (dummy): this.
15032 (output_token_translations): Free `token_translations'.
15033 * src/symtab.c (free_symtab): Free the tag field.
15034
15035 2001-09-22 Akim Demaille <akim@epita.fr>
15036
15037 Remove `translations' as it is always set to true.
15038
15039 * src/gram.h: Adjust.
15040 * src/reader.c (packsymbols, parse_token_decl): Adjust
15041 * src/print.c (print_grammar): Adjust.
15042 * src/output.c (output_token_translations): Adjust.
15043 * src/lex.c (lex): Adjust.
15044 * src/gram.c: Be sure the set pointers to NULL.
15045 (dummy): Rename as...
15046 (gram_free): this.
15047
15048 2001-09-22 Akim Demaille <akim@epita.fr>
15049
15050 * configure.in: Invoke AM_LIB_DMALLOC.
15051 * src/system.h: Use dmalloc.
15052 * src/LR0.c: Be sure to have pointers initialized to NULL.
15053 (allocate_itemsets): Allocate kernel_items only if needed.
15054
15055 2001-09-22 Akim Demaille <akim@epita.fr>
15056
15057 * configure.in: Bump to 1.29b.
15058 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
15059 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
15060 need xmalloc.c in calc.y.
15061 From Pascal Bart.
15062
15063 2001-09-21 Akim Demaille <akim@epita.fr>
15064
15065 Version 1.29a.
15066 * Makefile.maint, config/config.guess, config/config.sub,
15067 * config/missing: Update from masters.
15068 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
15069 upon package.m4.
15070 * configure.in (ALL_LINGUAS): Add `tr'.
15071
15072 2001-09-21 Akim Demaille <akim@epita.fr>
15073
15074 * tests/Makefile.am (package.m4): Move to...
15075 ($(srcdir)/$(TESTSUITE)): here.
15076
15077 2001-09-20 Akim Demaille <akim@epita.fr>
15078
15079 * src/complain.c: No longer try to be standalone: use system.h.
15080 Don't assume __STDC__ is defined to 1. Just test if it is defined.
15081 * src/complain.h: Likewise.
15082 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
15083 Remove the unused variable `n'.
15084 From Albert Chin-A-Young.
15085
15086 2001-09-18 Marc Autret <autret_m@epita.fr>
15087
15088 * doc/bison.1: Update.
15089 * doc/bison.texinfo (Bison Options): Update --defines and --graph
15090 descriptions.
15091 (Option Cross Key): Update.
15092 Add --graph.
15093
15094 2001-09-18 Marc Autret <autret_m@epita.fr>
15095
15096 * tests/regression.at: New test (comment in %union).
15097
15098 2001-09-18 Marc Autret <autret_m@epita.fr>
15099
15100 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
15101 do that.
15102 Reported by Keith Browne.
15103
15104 2001-09-18 Marc Autret <autret_m@epita.fr>
15105
15106 * tests/output.at: Add tests for --defines and --graph.
15107
15108 2001-09-18 Marc Autret <autret_m@epita.fr>
15109
15110 * tests/output.at: Removes tests of %{header,src}_extension features.
15111
15112 2001-09-18 Akim Demaille <akim@epita.fr>
15113
15114 * tests/Makefile.am (package.m4): New.
15115 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
15116 (_AT_CHECK_CALC_ERROR): Likewise.
15117 Factor the `, ' part of verbose error messages.
15118
15119 2001-09-18 Marc Autret <autret_m@epita.fr>
15120
15121 * src/getargs.c (longopts): Declare --defines and --graph as options
15122 with optional arguments.
15123 * src/files.h: Add extern declarations.
15124 * src/files.c (spec_graph_file, spec_defines_file): New.
15125 (output_files): Update.
15126 Remove CPP-outed code.
15127
15128 2001-09-18 Marc Autret <autret_m@epita.fr>
15129
15130 Turn off %{source,header}_extension feature.
15131
15132 * src/files.c (compute_exts_from_gf): Update.
15133 (compute_exts_from_src): Update.
15134 (output_files): CPP-out useless code.
15135 * src/files.h: Remove {header,source}_extension extern declarations.
15136 * src/reader.c (parse_dquoted_param): CPP-out.
15137 (parse_header_extension_decl): Remove.
15138 (parse_source_extension_decl): Remove.
15139 (read_declarations): Remove cases tok_{hdrext,srcext}.
15140 * src/lex.c (percent_table): Remove {header,source}_extension entries.
15141 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
15142
15143 2001-09-10 Akim Demaille <akim@epita.fr>
15144
15145 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
15146 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
15147 (AT_CHECK_OUTPUT): this.
15148 Merely check ls' exit status, its output is useless.
15149
15150 2001-09-10 Akim Demaille <akim@epita.fr>
15151
15152 * tests/calc.at: Use m4_match.
15153 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
15154
15155 2001-09-10 Marc Autret <autret_m@epita.fr>,
15156 Akim Demaille <akim@epita.fr>
15157
15158 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
15159 enum color_e.
15160 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
15161 to `normal'.
15162 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
15163 * src/lex.h: Adjust prototype.
15164 (token_t): Add `tok_undef'.
15165 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
15166 (parse_percent_token): Now returns token_t.
15167 Add default statement in switch.
15168 (lex): Separate `c' as an input variable, from the token_t result
15169 part.
15170 (unlexed): Is a token_t.
15171
15172 2001-09-10 Akim Demaille <akim@epita.fr>
15173
15174 * configure.in: Bump to 1.29a.
15175
15176 2001-09-07 Akim Demaille <akim@epita.fr>
15177
15178 Version 1.29.
15179
15180 2001-08-30 Akim Demaille <akim@epita.fr>
15181
15182 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
15183 * m4/atconfig.m4: Remove.
15184 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
15185 * tests/bison: New.
15186 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
15187 m4_if, m4_patsubst, and m4_regexp.
15188 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
15189 `input' file instead of echo.
15190
15191 2001-08-29 Akim Demaille <akim@epita.fr>
15192
15193 Bump to 1.28e.
15194
15195 2001-08-29 Akim Demaille <akim@epita.fr>
15196
15197 Version 1.28d.
15198
15199 2001-08-29 Paul Eggert <eggert@twinsun.com>
15200
15201 * src/bison.simple (yyparse): Don't take the address of an
15202 item before the start of an array, as that doesn't conform to
15203 the C Standard.
15204
15205 2001-08-29 Robert Anisko <anisko_r@epita.fr>
15206
15207 * doc/bison.texinfo (Location Tracking Calc): New node.
15208
15209 2001-08-29 Paul Eggert <eggert@twinsun.com>
15210
15211 * src/output.c (output): Do not define const, as this now
15212 causes more problems than it cures.
15213
15214 2001-08-29 Akim Demaille <akim@epita.fr>
15215
15216 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15217 the nodes.
15218 Be sure to tag the `detailmenu'.
15219
15220 2001-08-29 Akim Demaille <akim@epita.fr>
15221
15222 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15223 download in a tmp dir.
15224
15225 2001-08-28 Marc Autret <autret_m@epita.fr>
15226
15227 * config/depcomp: New file.
15228
15229 2001-08-28 Marc Autret <autret_m@epita.fr>
15230
15231 * doc/bison.1 (mandoc): Adjust.
15232 From Juan Manuel Guerrero.
15233
15234 2001-08-28 Marc Autret <autret_m@epita.fr>
15235
15236 * src/print_graph.c (print_state): Fix.
15237
15238 2001-08-27 Marc Autret <autret_m@epita.fr>
15239
15240 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15241 char * members.
15242 Echo modifications to the functions prototypes.
15243 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15244
15245 2001-08-27 Marc Autret <autret_m@epita.fr>
15246
15247 * src/vcg.c: Include `xalloc.h'.
15248 (add_colorentry): New.
15249 (add_classname): New.
15250 (add_infoname): New.
15251 * src/vcg.h: Add new prototypes.
15252
15253 2001-08-27 Akim Demaille <akim@epita.fr>
15254
15255 * Makefile.maint: Sync. again with CVS Autoconf.
15256
15257 2001-08-27 Akim Demaille <akim@epita.fr>
15258
15259 * Makefile.maint: Formatting changes.
15260 (po-update, cvs-update, update): New targets.
15261 (AMTAR): Remove.
15262
15263 2001-08-27 Akim Demaille <akim@epita.fr>
15264
15265 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15266 * Makefile.maint: Sync. with CVS Autoconf.
15267
15268 2001-08-27 Marc Autret <autret_m@epita.fr>
15269
15270 * src/vcg.h (struct infoname_s): New.
15271 (struct colorentry_s): New.
15272 (graph_s): New fields {vertical,horizontal}_order in structure.
15273 Add `infoname' field.
15274 Add `colorentry' field;
15275 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15276 (G_HORIZONTAL_ORDER): New.
15277 (G_INFONAME): New.
15278 (G_COLORENTRY): New.
15279 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15280 Add output of `infoname'.
15281 Add output of `colorentry'.
15282
15283 2001-08-27 Marc Autret <autret_m@epita.fr>
15284
15285 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15286 This one shadowed a global parameter.
15287
15288 2001-08-24 Marc Autret <autret_m@epita.fr>
15289
15290 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15291 instead of `unsigned'.
15292 (print_state): Do not call obstack_object_size () in obstack_grow ()
15293 to avoid macro variables shadowing.
15294
15295 2001-08-23 Marc Autret <autret_m@epita.fr>
15296
15297 * src/lex.c (percent_table): Typo: s/naem/name/.
15298 Add graph option.
15299 Normalize new options declarations.
15300
15301 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15302
15303 * tests/suite.at: Exercise %header_extension and %source_extension.
15304
15305 2001-08-16 Marc Autret <autret_m@epita.fr>
15306
15307 * src/reader.c (parse_dquoted_param): New.
15308 (parse_header_extension_decl): Use it.
15309 (parse_source_extension_decl): Likewise.
15310
15311 2001-08-16 Marc Autret <autret_m@epita.fr>
15312
15313 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15314 (get_xxxx_str): Use assert () instead of complain ().
15315 Remove return invokations in default cases.
15316 (get_decision_str): Modify default behaviour. Remove second argument.
15317 Echo modifications on calls.
15318 (output_graph): Fix.
15319
15320 2001-08-16 Marc Autret <autret_m@epita.fr>
15321
15322 * src/getargs.c (usage): Update with ``-g, --graph''.
15323
15324 2001-08-16 Marc Autret <autret_m@epita.fr>
15325
15326 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15327 (Option Cross Key): Likewise.
15328 * doc/bison.1: Update.
15329
15330 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
15331
15332 * src/output.c (output_master_parser): Don't finish action_obstack.
15333 (output_parser): Don't care about the muscle action, here.
15334 (prepare): Copy the action_obstack in the action muscle.
15335 (output): Free action_obstack.
15336
15337 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15338
15339 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15340 will contain `%union' declaration.
15341 (parse_union_decl): Delete #line directive output.
15342 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15343 informations about %union.
15344 (parse_union_decl): Copy the union_obstack in the muscle stype.
15345 * src/bison.simple: Add new #line directive.
15346 Add typdef %%stype YYSTYPE.
15347
15348 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
15349
15350 * src/bison.simple: Add new `#line' directive.
15351
15352 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
15353
15354 * src/bison.simple: New `#line' directive.
15355 * src/output.c (output_parser): Support new dynamic muscle input_line.
15356
15357 2001-09-22 Marc Autret <autret_m@epita.fr>
15358
15359 * src/output.c (output_master_parser): New.
15360 (output_parser): Be more re-entrant.
15361
15362 2001-09-21 Marc Autret <autret_m@epita.fr>
15363
15364 * src/reader.c (copy_definition, parse_union_decl): Update and use
15365 `linef' muscle.
15366 (copy_action): Likewise.
15367 Use obstack_1grow ().
15368 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15369
15370 2001-09-21 Marc Autret <autret_m@epita.fr>
15371
15372 * src/options.c (option_table): Adjust.
15373 * src/lex.c (parse_percent_token): Fix.
15374
15375 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15376
15377 * src/options.c (symtab.h): Include it, need by lex.h.
15378
15379 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
15380
15381 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15382 is now an option_table_struct*.
15383 (option_strcmp): New function option_strcmp.
15384 (parse_percent_token): Call option_strcmp.
15385 * src/getargs.c (xalloc.h, options.h): Include it.
15386 (getargs): Call create_long_option_table.
15387 (getargs): Free longopts at the end of the function.
15388 (shortopts): Move in options.c.
15389 * src/options.c (create_long_option_table): New function. Convert
15390 information from option_table to option structure.
15391 * src/reader.c (options.h): Include it.
15392
15393 * src/Makefile.am: Adjust.
15394 * src/options.c (option_table): Create from longopts and percent_table.
15395 * src/getargs.c (longopts): Delete.
15396 * src/lex.c (struct percent_table_struct): Delete.
15397 (percent_table): Delete.
15398 (options.h): Include it.
15399 * src/options.c: Create.
15400 * src/options.h: Create.
15401 Declare enum opt_access_e.
15402 Define struct option_table_struct.
15403
15404 2001-09-20 Marc Autret <autret_m@epita.fr>
15405
15406 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15407 sections of Bison.
15408
15409 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
15410
15411 * src/bison.simple: s/%%filename/%%skeleton.
15412 * src/muscle_tab.c (getargs.h): Include it.
15413 (muscle_init): Insert new muscle skeleton.
15414
15415 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
15416
15417 * src/output.c (output_parser): Delete unused variable actions_dumped.
15418
15419 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
15420
15421 * src/output.c (output): Delete call to reader_output_yylsp.
15422 * src/reader.c (reader): Likewise.
15423 * src/reader.h: Delete declaration of reader_output_yylsp.
15424
15425 2001-09-02 Marc Autret <autret_m@epita.fr>
15426
15427 * src/reader.c: Include muscle_tab.h.
15428 (parse_union_decl): Update.
15429 (parse_macro_decl): Rename parse_muscle_decl.
15430 Update to use renamed functions and variable.
15431 (read_declarations, copy_action, read_additionnal_code, : Updated
15432 with correct variables and functions names.
15433 (packsymbols, reader): Likewise.
15434
15435 * src/reader.h (muscle_obstack): Extern declaration update.
15436
15437 * src/output.c: Include muscle_tab.h
15438 In all functions using macro_insert, change by using muscle_insert ().
15439 (macro_obstack): Rename muscle_obstack.
15440 Echo modifications in the whole file.
15441 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15442 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15443 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15444
15445 * src/muscle_tab.h: Update double inclusion macros.
15446 (macro_entry_s): Rename muscle_entry_s.
15447 Update prototypes.
15448
15449 * src/muscle_tab.c: Include muscle_tab.h.
15450 Rename macro_tabble to muscle_table.
15451 (mhash1, mhash2, mcmp): Use muscle_entry.
15452 (macro_init): Rename muscle_init. Update.
15453 (macro_insert): Rename muscle_insert. Update.
15454 (macro_find): Rename muscle_find. Update.
15455
15456 * src/main.c: Include muscle_tab.h.
15457 (main): Call muscle_init ().
15458 * src/Makefile.am (bison_SOURCES): Echo modifications.
15459
15460 2001-09-02 Marc Autret <autret_m@epita.fr>
15461
15462 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15463
15464 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15465
15466 2001-09-02 Marc Autret <autret_m@epita.fr>
15467
15468 * src/macrotab.c, src/macrotab.h: Remove.
15469
15470 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15471
15472 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15473 filename.
15474
15475 2001-09-01 Marc Autret <autret_m@epita.fr>
15476
15477 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15478 to an explicit value to activate the feature. We do it here.
15479
15480 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15481
15482 * src/output.c (prepare): Delete the `filename' muscule insertion.
15483 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15484 (parse_union_decl): Likewise.
15485 * src/macrotab.c (macro_init): Initialize filename by infile.
15486
15487 2001-08-31 Marc Autret <autret_m@epita.fr>
15488
15489 * src/bison.simple (YYLSP_NEEDED): New definition.
15490 * src/output.c (prepare): Add macro insertion of `locations_flag'
15491
15492 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15493
15494 * src/output.c (prepare): Delete insertion of previous muscles,
15495 and insert the `prefix' muscles.
15496 * src/macrotab.c (macro_init): Likewise.
15497 (macro_init): Initialization prefix directive by `yy'.
15498 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15499 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15500 yylval, yydebug, yyerror, yynerrs and yyparse.
15501 New directive `#define' to substitute yydebug, ... with option
15502 name_prefix.
15503
15504 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15505
15506 * src/main.c (main): Standardize.
15507 * src/output.c (output_table_data, output_parser): Likewise.
15508 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15509
15510 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15511
15512 * src/reader.c (read_additionnal_code): Rename %%user_code to
15513 %%epilogue.
15514 * src/output.c (output): Rename %%declarations to %%prologue.
15515 * src/bison.simple: Echo modifications.
15516
15517 2001-08-31 Marc Autret <autret_m@epita.fr>
15518
15519 * src/reader.c (readgram): CleanUp.
15520 (output_token_defines): Likewise.
15521 (packsymbols): Likewise.
15522 (reader): Likewise.
15523 * src/output.c (output): CPP-out useless code.
15524
15525 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15526
15527 * src/reader.c (reader): Delete obsolete call to function
15528 output_trailers and output_headers.
15529 * src/output.h: Remove obsolete functions prototypes of output_headers
15530 and output_trailers.
15531
15532 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15533
15534 * src/main.c: Include macrotab.h.
15535 * src/macrotab.h (macro_entry_s): Constify fields.
15536 Adjust functions prototypes.
15537 * src/macrotab.c (macro_insert): Constify key and value.
15538 (macro_find): Constify key.
15539 (macro_insert): Include 'xalloc.h'
15540 (macro_insert): Use XMALLOC.
15541 (macro_find): Constify return value.
15542 * src/output.c (output_table_data): Rename table to table_data.
15543 (output_parser): Constify macro_key, macro_value.
15544
15545 2001-08-30 Marc Autret <autret_m@epita.fr>
15546
15547 * src/reader.c (parse_skel_decl): New.
15548 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15549 * src/lex.h (token_t): New token `tok_skel'.
15550 * src/lex.c (percent_table): Add skeleton option entry.
15551 Standardize.
15552
15553 2001-08-29 Marc Autret <autret_m@epita.fr>
15554
15555 * src/bison.simple: Add %%user_code directive at the end.
15556 * src/reader.c (read_additionnal_code): New.
15557 (reader): Use it.
15558 * src/output.c (output_program): Remove.
15559 (output): Update.
15560
15561 2001-08-28 Marc Autret <autret_m@epita.fr>
15562
15563 * src/output.c (output_actions): Clean up.
15564 (output_gram): CPP-out useless code.
15565 * src/reader.c (reader): Clean up, CPP-out useless code.
15566
15567 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15568
15569 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15570 directive.
15571 * src/bison.simple: Add `%%definitions'.
15572
15573 2001-08-28 Marc Autret <autret_m@epita.fr>
15574
15575 * config/depcomp: New file.
15576
15577 2001-08-27 Paul Eggert <eggert@twinsun.com>
15578
15579 * src/bison.simple (yyparse): Don't take the address of an
15580 item before the start of an array, as that doesn't conform to
15581 the C Standard.
15582
15583 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15584
15585 * src/output.c (output): Remove the initialization of the macro
15586 obstack. It was done too late here.
15587
15588 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15589 completely wrong.
15590 (reader): Initialize the macro obstack here, since we need it to grow
15591 '%define' directives.
15592
15593 * src/reader.h: Declare the macro obstack as extern.
15594
15595 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15596
15597 * src/output.c (output_parser): Fix. Store single '%' characters in
15598 the output obstack instead of throwing them away.
15599
15600 2001-08-27 Akim Demaille <akim@epita.fr>
15601
15602 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15603
15604 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15605
15606 * lib/Makefile.am: Adjust.
15607
15608 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15609
15610 * src/bison.simple: Update and add '%%' directives.
15611
15612 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15613
15614 * src/reader.c (reader): Remove calls to 'output_headers' and
15615 'output_trailers'. Remove some C output.
15616 (readgram): Disable a piece of code that was writing a default
15617 definition for 'YYSTYPE'.
15618 (reader_output_yylsp): Remove.
15619 (packsymbols): Output token defintions to a macro.
15620 (copy_definition): Disable C output.
15621
15622 * src/reader.c (parse_macro_decl): New function used to parse macro
15623 declarations.
15624 (copy_string2): Put the body of copy_string into this new function.
15625 Add a parameter to let the caller choose whether he wants to copy the
15626 string delimiters or not.
15627 (copy_string): Be a simple call to copy_string2 with the last argument
15628 bound to true.
15629 (read_declarations): Add case for macro definition.
15630 (copy_identifier): New.
15631 (parse_macro_decl): Read macro identifiers using copy_identifier
15632 rather than lex.
15633
15634 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15635
15636 * src/output.c (prepare): Add prefixed names.
15637 (output_parser): Output semantic actions.
15638 (output_parser): Fix bug on '%%line' directives.
15639
15640 * src/output.c (output_headers): Remove. The C code printed by this
15641 function should now be in the skeletons.
15642 (output_trailers): Remove.
15643 (output): Disable call to 'reader_output_yylsp'.
15644 (output_rule_data): Do not output tables to the table obstack.
15645
15646 * src/output.c: Remove some C dedicated output.
15647 Improve the use of macro and output obstacks.
15648 (output_defines): Remove.
15649
15650 * src/output.c (output_token_translations): Associate 'translate'
15651 table with a macro. No output to the table obstack.
15652 (output_gram): Same for 'rhs' and 'prhs'.
15653 (output_stos): Same for 'stos'.
15654 (output_rule_data): Same for 'r1' and 'r2'.
15655 (token_actions): Same for 'defact'.
15656 (goto_actions): Same for 'defgoto'.
15657 (output_base): Same for 'pact' and 'pgoto'.
15658 (output_table): Same for 'table'.
15659 (output_check): Same for 'check'.
15660
15661 * src/output.c (output_table_data): New function.
15662 (output_short_table): Remove.
15663 (output_short_or_char_table): Remove.
15664
15665 * src/output.c (output_parser): Replace most of the skeleton copy code
15666 with something new. Skeletons are now processed character by character
15667 rather than line by line, and Bison looks for '%%' macros. This is the
15668 first step in making Bison's output process (a lot) more flexible.
15669 (output_parser): Use the macro table.
15670
15671 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15672
15673 * src/main.c (main): Initialize the macro table.
15674
15675 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15676
15677 * src/lex.c (percent_table): Add tok_define.
15678 * src/lex.h: Add tok_define.
15679
15680 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15681
15682 * src/macrotab.c: New file.
15683 * src/macrotab.h: New file.
15684 * src/Makefile.am: Update.
15685
15686 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15687
15688 * lib/hash.c: New file.
15689 * lib/hash.h: New file.
15690 * lib/Makefile.am: Update.
15691
15692 2001-08-15 Akim Demaille <akim@epita.fr>
15693
15694 Version 1.28c.
15695
15696 2001-08-15 Marc Autret <autret_m@epita.fr>
15697
15698 * src/reader.c (readgram): Indent output macro YYSTYPE.
15699 (packsymbols): Likewise.
15700 (output_token_defines): Likewise.
15701 * src/files.c: Standardize.
15702 (compute_header_macro): New.
15703 (defines_obstack_save): New. Use compute_header_macro.
15704 (output_files): Update. Use defines_obstack_save.
15705
15706 2001-08-15 Akim Demaille <akim@epita.fr>
15707
15708 * doc/bison.texinfo (Table of Symbols): Document
15709 YYSTACK_USE_ALLOCA.
15710
15711 2001-08-15 Akim Demaille <akim@epita.fr>
15712
15713 * missing: Update from CVS Automake.
15714 * config/config.guess, config/config.sub, config/texinfo.tex:
15715 Update from gnu.org.
15716
15717 2001-08-15 Akim Demaille <akim@epita.fr>
15718
15719 * Makefile.maint: Sync with CVS Autoconf.
15720
15721 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15722
15723 * doc/bison.texinfo: Include GNU Free Documentation License from
15724 `fdl.texi'.
15725 * doc/fdl.texi: Add to package.
15726
15727 2001-08-14 Marc Autret <autret_m@epita.fr>
15728
15729 Turn on %{source,header}_extension features.
15730
15731 * src/lex.c (percent_table): Un-CPP out header_extension and
15732 source_extension.
15733 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15734 (compute_exts_from_src): Remove conditions. It restores priorities
15735 between options.
15736
15737 2001-08-14 Marc Autret <autret_m@epita.fr>
15738
15739 * src/files.c (compute_base_names): Add extensions computing when
15740 `--file-prefix' used.
15741 Standardize function calls.
15742
15743 2001-08-13 Marc Autret <autret_m@epita.fr>
15744
15745 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15746 defining it (defined but null disables alloca).
15747
15748 2001-08-13 Marc Autret <autret_m@epita.fr>
15749
15750 * src/bison.simple (_yy_memcpy): CPP reformat.
15751
15752 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15753
15754 * tests/atconfig.in (CPPFLAGS): Fix.
15755
15756 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15757
15758 * doc/bison.texinfo: Include GNU General Public License from
15759 `gpl.texi'.
15760 * doc/gpl.texi: Add to package.
15761
15762 2001-08-10 Marc Autret <autret_m@epita.fr>
15763
15764 * src/print_graph.h: Fix.
15765 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15766
15767 2001-08-10 Akim Demaille <akim@epita.fr>
15768
15769 * src/system.h: Provide default declarations for stpcpy, strndup,
15770 and strnlen.
15771
15772 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15773
15774 * doc/bison.texinfo (Locations): Update @$ stuff.
15775
15776 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15777
15778 * src/bison.simple (YYLLOC_DEFAULT): Update.
15779 (yyparse): Adjust.
15780
15781 2001-08-08 Marc Autret <autret_m@epita.fr>
15782
15783 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15784 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15785 Reported by Fabrice Bauzac.
15786
15787 2001-08-08 Marc Autret <autret_m@epita.fr>
15788
15789 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15790 * src/vcg.c (output_node): Fix.
15791 * src/vcg.h: Cleanup.
15792 * src/print_graph.c: Add comments.
15793 (node_output_size): New global variable. Simplify the formatting of
15794 the VCG graph output.
15795 (print_actions): Unused code is now used. It notifies the final state
15796 and no action states in the VCG graph. It also give the reduce actions.
15797 The `shift and goto' edges are red and the `go to state' edges are
15798 blue.
15799 Get the current node name and node_obstack by argument.
15800 (node_obstack): New variable.
15801 (print_state): Manage node_obstack.
15802 (print_core): Use node_obstack given by argument.
15803 A node is not only computed here but in print_actions also.
15804 (print_graph): CPP out useless code instead of commenting it.
15805
15806 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15807
15808 * tests/atconfig.in (CPPFLAGS): Fix.
15809
15810 2001-08-07 Akim Demaille <akim@epita.fr>
15811
15812 * src/print_graph.c (quote): New.
15813 (print_core): Use it.
15814
15815 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15816
15817 * src/vcg.c (complain.h): Include it.
15818 Unepitaize `return' invocations.
15819 [NDEBUG] (main): Remove.
15820 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15821 * src/files.c (open_files): Initialize graph_obstack.
15822 * src/print_graph.c (print_actions): CPP out useless code.
15823 (print_core): Don't output the last `\n' in labels.
15824 Use `quote'.
15825 * src/files.c (output_files): Output the VCG file.
15826 * src/main.c (main): Invoke print_graph ();
15827
15828 2001-08-06 Marc Autret <autret_m@epita.fr>
15829
15830 Automaton VCG graph output.
15831 Using option ``-g'' or long option ``--graph'', you can generate
15832 a gram_filename.vcg file containing a VCG description of the LALR (1)
15833 automaton of your grammar.
15834
15835 * src/main.c: Call to print_graph() function.
15836 * src/getargs.h: Update.
15837 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15838 (graph_flag): New flag.
15839 (longopts): Update.
15840 (getargs): Add case `g'.
15841 * src/files.c (graph_obstack): New obstack struct.
15842 (open_files): Initialize new obstack.
15843 (output_files): Saves graph_obstack if required.
15844 * src/files.h (graph_obstack): New extern declaration.
15845 * src/Makefile.am: Add new source files.
15846
15847 2001-08-06 Marc Autret <autret_m@epita.fr>
15848
15849 * src/print_graph.c, src/print_graph.h (graph): New.
15850 * src/vcg.h: New file.
15851 * src/vcg.c: New file, VCG graph handling.
15852
15853 2001-08-06 Marc Autret <autret_m@epita.fr>
15854
15855 Add of %source_extension and %header_extension which specify
15856 the source or/and the header output file extension.
15857
15858 * src/files.c (compute_base_names): Remove initialisation of
15859 src_extension and header_extension.
15860 (compute_exts_from_gf): Update.
15861 (compute_exts_from_src): Update.
15862 (output_files): Update.
15863 * src/reader.c (parse_header_extension_decl): New.
15864 (parse_source_extension_decl): New.
15865 (read_declarations): New case statements for the new tokens.
15866 * src/lex.c (percent_table): Add entries for %source_extension
15867 and %header_extension.
15868 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15869
15870 2001-08-06 Marc Autret <autret_m@epita.fr>
15871
15872 * configure.in: Bump to 1.28c.
15873 * doc/bison.texinfo: Texinfo thingies.
15874
15875 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15876
15877 * tests/atconfig.in (CPPFLAGS): Add.
15878 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15879
15880 2001-08-03 Akim Demaille <akim@epita.fr>
15881
15882 Version 1.28b.
15883
15884 2001-08-03 Akim Demaille <akim@epita.fr>
15885
15886 * tests/Makefile.am (check-local): Ship testsuite.
15887 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15888 Include `string.h'.
15889
15890 2001-08-03 Akim Demaille <akim@epita.fr>
15891
15892 * configure.in: Try using -Wformat when compiling.
15893
15894 2001-08-03 Akim Demaille <akim@epita.fr>
15895
15896 * configure.in: Bump to 1.28b.
15897
15898 2001-08-03 Akim Demaille <akim@epita.fr>
15899
15900 * src/complain.c: Adjust strerror_r portability issues.
15901
15902 2001-08-03 Akim Demaille <akim@epita.fr>
15903
15904 Version 1.28a.
15905
15906 2001-08-03 Akim Demaille <akim@epita.fr>
15907
15908 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15909 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15910 * src/getargs.c: Include complain.h.
15911 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15912 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15913
15914 2001-08-03 Akim Demaille <akim@epita.fr>
15915
15916 * src/reader.c (readgram): Display hidden chars in error messages.
15917
15918 2001-08-03 Akim Demaille <akim@epita.fr>
15919
15920 Update to gettext 0.10.39.
15921
15922 2001-08-03 Akim Demaille <akim@epita.fr>
15923
15924 * lib/strspn.c: New.
15925
15926 2001-08-01 Marc Autret <autret_m@epita.fr>
15927
15928 * doc/bison.texinfo: Update.
15929 * doc/bison.1 (mandoc): Update.
15930 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15931 * src/files.c: Support output files extensions computing.
15932 (src_extension): New static variable.
15933 (header_extension): New static variable.
15934 (tr): New function.
15935 (get_extension_index): New function, gets the index of an extension
15936 filename in a string.
15937 (compute_exts_from_gf): New function, computes extensions from the
15938 grammar file extension.
15939 (compute_exts_from_src): New functions, computes extensions from the
15940 C source file extension, file given by ``-o'' option.
15941 (compute_base_names): Update.
15942 (output_files): Update.
15943
15944 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15945
15946 * doc/bison.texi: Document @$.
15947 (Locations): New section.
15948
15949 2001-07-18 Akim Demaille <akim@epita.fr>
15950
15951 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15952 * config/prev-version.txt, config/move-if-change: New.
15953 * Makefile.am: Adjust.
15954
15955 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15956
15957 * src/bison.simple (yyparse): Suppress warning `comparaison
15958 between signed and unsigned'.
15959
15960 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15961
15962 * src/getargs.h (raw_flag): Remove.
15963 * src/getargs.c: Die on `-r'/`--raw'.
15964 * src/lex.c (parse_percent_token): Die on `%raw'.
15965 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15966 * tests/calc.at: Suppress test with option `--raw'.
15967
15968 2001-07-14 Akim Demaille <akim@epita.fr>
15969
15970 * config/: New.
15971 * configure.in: Require Autoconf 2.50.
15972 Update to gettext 0.10.38.
15973
15974 2001-03-16 Akim Demaille <akim@epita.fr>
15975
15976 * doc/bison.texinfo: ANSIfy the examples.
15977
15978 2001-03-16 Akim Demaille <akim@epita.fr>
15979
15980 * getargs.c (skeleton): New variable.
15981 (longopts): --skeleton is a new option.
15982 (shortopts, getargs): -S is a new option.
15983 * getargs.h: Declare skeleton.
15984 * output.c (output_parser): Use it.
15985
15986 2001-03-16 Akim Demaille <akim@epita.fr>
15987
15988 * m4/strerror_r.m4: New.
15989 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15990 * lib/error.h, lib/error.c: Update.
15991
15992 2001-03-16 Akim Demaille <akim@epita.fr>
15993
15994 * src/getargs.c (longopts): Clean up.
15995
15996 2001-02-21 Akim Demaille <akim@epita.fr>
15997
15998 * src/reader.c (gensym): `gensym_count' is your own.
15999 Use a static buf to create the symbol name, as token_buffer is no
16000 longer a buffer.
16001
16002 2001-02-08 Akim Demaille <akim@epita.fr>
16003
16004 * src/conflicts.c (conflict_report): Be sure not to append to res
16005 between two calls, which could happen if both first sprintf were
16006 skipped, but not the first cp += strlen.
16007
16008 2001-02-08 Akim Demaille <akim@epita.fr>
16009
16010 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
16011 New, from fileutils 4.0.37.
16012 * configure.in: Require Autoconf 2.49c. I took some time before
16013 making this decision. This is the only way out for portability
16014 issues in Bison, it would mean way too much duplicate effort to
16015 import in Bison features implemented in 2.49c since 2.13.
16016 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
16017
16018 2001-02-02 Akim Demaille <akim@epita.fr>
16019
16020 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
16021 * lib/xalloc.h, lib/xmalloc.c: Update.
16022
16023 2001-01-19 Akim Demaille <akim@epita.fr>
16024
16025 Get rid of the ad hoc handling of token_buffer in the scanner: use
16026 the obstacks.
16027
16028 * src/lex.c (token_obstack): New.
16029 (init_lex): Initialize it. No longer call...
16030 (grow_token_buffer): this. Remove it.
16031 Adjust all the places which used it to use the obstack.
16032
16033 2001-01-19 Akim Demaille <akim@epita.fr>
16034
16035 * src/lex.h: Rename all the tokens:
16036 s/\bENDFILE\b/tok_eof/g;
16037 s/\bIDENTIFIER\b/tok_identifier/g;
16038 etc.
16039 Let them be enums, not #define, to ease debugging.
16040 Adjust all the code.
16041
16042 2001-01-18 Akim Demaille <akim@epita.fr>
16043
16044 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
16045 * src/lex.c (maxtoken, grow_token_buffer): Static.
16046
16047 2001-01-18 Akim Demaille <akim@epita.fr>
16048
16049 Since we now use obstacks, more % directives can be enabled.
16050
16051 * src/lex.c (percent_table): Also accept `%yacc',
16052 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
16053 `%debug'.
16054 Handle the actions for `%semantic_parser' and `%pure_parser' here,
16055 instead of returning a token.
16056 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
16057 * src/reader.c (read_declarations): Adjust.
16058 * src/files.c (open_files): Don't call `compute_base_names', don't
16059 compute `attrsfile' since they depend upon data which might be
16060 *in* the input file now.
16061 (output_files): Do it here.
16062 * src/output.c (output_headers): Document the fact that this patch
16063 introduces a guaranteed SEGV for semantic parsers.
16064 * doc/bison.texinfo: Document them.
16065 * tests/suite.at: Exercise these %options.
16066
16067 2000-12-20 Akim Demaille <akim@epita.fr>
16068
16069 Also handle the output file (--verbose) with obstacks.
16070
16071 * files.c (foutput): Remove.
16072 (output_obstack): New.
16073 Adjust all dependencies.
16074 * src/conflicts.c: Return a string.
16075 * src/system.h (obstack_grow_string): Rename as...
16076 (obstack_sgrow): this. Be ready to work with non literals.
16077 (obstack_fgrow4): New.
16078
16079 2000-12-20 Akim Demaille <akim@epita.fr>
16080
16081 * src/files.c (open_files): Fix the computation of short_base_name
16082 in the case of `-o foo.tab.c'.
16083
16084 2000-12-20 Akim Demaille <akim@epita.fr>
16085
16086 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
16087 (copy_dollar): Now that everything uses obstacks, get rid of the
16088 FILE * parameters.
16089
16090 2000-12-20 Akim Demaille <akim@epita.fr>
16091
16092 * src/files.c (open_files): Actually the `.output' file is based
16093 on the short_base_name, not base_name.
16094 * tests/suite.at (Checking output file names): Adjust.
16095
16096 2000-12-20 Akim Demaille <akim@epita.fr>
16097
16098 * src/bison.s1: Remove, we now use directly...
16099 * src/bison.simple: this.
16100 * src/Makefile.am: Use pkgdata instead of data.
16101
16102 2000-12-20 Akim Demaille <akim@epita.fr>
16103
16104 * src/files.c (guard_obstack): New.
16105 (open_files): Initialize it.
16106 (output_files): Dump it...
16107 * src/files.h: Export it.
16108 * src/reader.c (copy_guard): Use it.
16109
16110 2000-12-19 Akim Demaille <akim@epita.fr>
16111
16112 * src/files.c (outfile, defsfile, actfile): Removed as global
16113 vars.
16114 (open_files): Don't compute them.
16115 (output_files): Adjust.
16116 (base_name, short_base_name): Be global.
16117 Adjust dependencies.
16118
16119 2000-12-19 Akim Demaille <akim@epita.fr>
16120
16121 * src/files.c (strsuffix): New.
16122 (stringappend): Be just like strcat but allocate.
16123 (base_names): Eve out from open_files.
16124 Try to simplify the rather hairy computation of base_name and
16125 short_base_name.
16126 (open_files): Use it.
16127 * tests/suite.at (Checking output file names): New test.
16128
16129 2000-12-19 Akim Demaille <akim@epita.fr>
16130
16131 * src/system.h (obstack_grow_literal_string): Rename as...
16132 (obstack_grow_string): this.
16133 * src/output.c (output_parser): Recognize `%% actions' instead of
16134 `$'.
16135 * src/bison.s1: s/$/%% actions/.
16136 * src/bison.hairy: Likewise.
16137
16138 2000-12-19 Akim Demaille <akim@epita.fr>
16139
16140 * src/output.c (output_parser): Compute the `#line' lines when
16141 there are.
16142 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
16143 Suggested by Hans Aberg.
16144
16145 2000-12-19 Akim Demaille <akim@epita.fr>
16146
16147 Let the handling of the skeleton files be local to the procedures
16148 that use it.
16149
16150 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
16151 longer static.
16152 (fparser, open_extra_files): Remove.
16153 (open_files, output_files): Don't take care of fparser.
16154 * src/files.h: Adjust.
16155 * src/output.c (output_parser): Open and close the file to the
16156 skeleton.
16157 * src/reader.c (read_declarations): When %semantic_parser, open
16158 fguard.
16159
16160 2000-12-19 Akim Demaille <akim@epita.fr>
16161
16162 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
16163 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
16164
16165 2000-12-19 Akim Demaille <akim@epita.fr>
16166
16167 * src/files.c (open_files): Yipee! We no longer need all the code
16168 looking for `/tmp' since we have no tmp file.
16169
16170 2000-12-19 Akim Demaille <akim@epita.fr>
16171
16172 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
16173 New macros.
16174 * src/files.c (open_files): Less dependency on MSDOS etc.
16175
16176 2000-12-14 Akim Demaille <akim@epita.fr>
16177
16178 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
16179 Provide a default definition.
16180 Use it when executing the default @ action.
16181 * src/reader.c (reader_output_yylsp): No longer include
16182 `timestamp' and `text' in the default YYLTYPE.
16183
16184 2000-12-12 Akim Demaille <akim@epita.fr>
16185
16186 * src/reader.c (copy_definition, parse_union_decl, copy_action)
16187 (copy_guard): Quote the file names.
16188 Reported by Laurent Mascherpa.
16189
16190 2000-12-12 Akim Demaille <akim@epita.fr>
16191
16192 * src/output.c (output_headers, output_program, output): Be sure
16193 to escape special characters when outputting filenames.
16194 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
16195 (output_headers): Don't depend on them, Use ACTSTR.
16196
16197 2000-11-17 Akim Demaille <akim@epita.fr>
16198
16199 * lib/obstack.h: Formatting changes.
16200 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
16201 prevents type checking.
16202 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
16203 cast the value to (void *): assigning a `foo *' to a `void *'
16204 variable is valid.
16205 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
16206 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
16207 append characters.
16208
16209 2000-11-17 Akim Demaille <akim@epita.fr>
16210
16211 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
16212 as...
16213 (suite.m4, regression.m4, calc.m4): these.
16214 * tests/atgeneral.m4: Update from CVS Autoconf.
16215
16216 2000-11-17 Akim Demaille <akim@epita.fr>
16217
16218 * tests/regression.m4 (%union and --defines): New test,
16219 demonstrating a current bug in the obstack implementation.
16220
16221 2000-11-17 Akim Demaille <akim@epita.fr>
16222
16223 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16224 macros.
16225 Use them to declare the variables which are global or local to
16226 `yyparse'.
16227
16228 2000-11-17 Akim Demaille <akim@epita.fr>
16229
16230 * acconfig.h: Remove, no longer used.
16231
16232 2000-11-07 Akim Demaille <akim@epita.fr>
16233
16234 * src: s/Copyright (C)/Copyright/g.
16235
16236 2000-11-07 Akim Demaille <akim@epita.fr>
16237
16238 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16239 defining.
16240 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16241
16242 2000-11-07 Akim Demaille <akim@epita.fr>
16243
16244 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16245 Merge in a single CPP if/else.
16246
16247 2000-11-07 Akim Demaille <akim@epita.fr>
16248
16249 * src/output.c (output): Remove useless variables.
16250 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16251 argument `data' for consistency with the prototypes.
16252 Qualify it `const'.
16253 (obstack_copy, obstack_copy0): Rename the second argument as
16254 `address' for consistency. Qualify it `const'.
16255 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16256 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16257 `const' their input argument (`data' or `address').
16258 Adjust the corresponding macros to include `const' in casts.
16259
16260 2000-11-03 Akim Demaille <akim@epita.fr>
16261
16262 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16263 s/PFILE1/BISON_HAIRY/.
16264 Adjust dependencies.
16265
16266 2000-11-03 Akim Demaille <akim@epita.fr>
16267
16268 For some reason, this was not applied.
16269
16270 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16271 `unlink': it's no longer used.
16272
16273 2000-11-03 Akim Demaille <akim@epita.fr>
16274
16275 * src/files.c (skeleton_find): New function, eved out of...
16276 (open_files, open_extra_files): here.
16277
16278 2000-11-03 Akim Demaille <akim@epita.fr>
16279
16280 Don't use `atexit'.
16281
16282 * src/files.c (obstack_save): New function.
16283 (done): Rename as...
16284 (output_files): this.
16285 Use `obstack_save'.
16286 * src/main.c (main): Don't use `atexit' to register `done', since
16287 it no longer has to remove tmp files, just call `output_files'
16288 when there are no errors.
16289
16290 2000-11-02 Akim Demaille <akim@epita.fr>
16291
16292 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16293 `unlink': it's no longer used.
16294 * src/files.h: Formatting changes.
16295
16296 2000-11-02 Akim Demaille <akim@epita.fr>
16297
16298 Remove the last uses of mktemp and unlink/delete.
16299
16300 * src/files.c (fdefines, ftable): Removed.
16301 (defines_ostack, table_obstack): New.
16302 Adjust dependencies of the former into uses of the latter.
16303 * src/output.c (output_short_or_char_table, output_short_table):
16304 Convert to using obstacks.
16305 * src/reader.c (copy_comment2): Accept one FILE * and two
16306 obstacks.
16307 (output_token_defines, reader_output_yylsp): Use obstacks.
16308 * src/system.h (obstack_fgrow3): New.
16309 * po/POTFILES.in: Adjust.
16310
16311 2000-11-01 Akim Demaille <akim@epita.fr>
16312
16313 Change each use of `fattrs' into a use of `attrs_obstack'.
16314
16315 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16316 * src/files.c (fattrs): Remove.
16317 (attrs_obstack): New.
16318 Adjust all dependencies.
16319 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16320
16321 2000-11-01 Akim Demaille <akim@epita.fr>
16322
16323 Introduce obstacks.
16324 Change each use of `faction' into a use of `action_obstack'.
16325
16326 * lib/obstack.h, lib/obstack.c: New files.
16327 * src/files.c (faction): Remove.
16328 (action_obstack): New.
16329 Adjust all dependencies.
16330
16331 2000-10-20 Akim Demaille <akim@epita.fr>
16332
16333 * lib/quote.h (PARAMS): New macro. Use it.
16334
16335 2000-10-16 Akim Demaille <akim@epita.fr>
16336
16337 * src/output.c (output_short_or_char_table): New function.
16338 (output_short_table, output_token_translations): Use it.
16339 (goto_actions): Use output_short_table.
16340
16341 2000-10-16 Akim Demaille <akim@epita.fr>
16342
16343 * src/symtab.c (bucket_new): New function.
16344 (getsym): Use it.
16345
16346 * src/output.c (output_short_table): New argument to display the
16347 comment associated with the table.
16348 Adjust dependencies.
16349 (output_gram): Use it.
16350 (output_rule_data): Nicer output layout for YYTNAME.
16351
16352 2000-10-16 Akim Demaille <akim@epita.fr>
16353
16354 * src/lex.c (read_typename): New function.
16355 (lex): Use it.
16356 * src/reader.c (copy_dollar): Likewise.
16357
16358 2000-10-16 Akim Demaille <akim@epita.fr>
16359
16360 * src/reader.c (copy_comment2): Expect the input stream to be on
16361 the `/' which is suspected to open a comment, instead of being
16362 called after `//' or `/*' was read.
16363 (copy_comment, copy_definition, parse_union_decl, copy_action)
16364 (copy_guard): Adjust.
16365
16366 2000-10-16 Akim Demaille <akim@epita.fr>
16367
16368 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16369 `read_signed_integer'.
16370
16371 2000-10-16 Akim Demaille <akim@epita.fr>
16372
16373 * src/reader.c (copy_dollar): New function.
16374 (copy_guard, copy_action): Use it.
16375
16376 2000-10-16 Akim Demaille <akim@epita.fr>
16377
16378 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16379 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16380 New files, from Fileutils 4.0.27.
16381 * src/main.c (printable_version): Remove.
16382 * src/lex.c, src/reader.c: Use `quote'.
16383
16384 2000-10-04 Akim Demaille <akim@epita.fr>
16385
16386 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16387
16388 2000-10-04 Akim Demaille <akim@epita.fr>
16389
16390 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16391
16392 2000-10-04 Akim Demaille <akim@epita.fr>
16393
16394 When a literal string is used to define two different tokens,
16395 `bison -v' segfaults.
16396 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16397
16398 * tests/regression.m4: New file.
16399 Include the core of the sample provided by Piotr Gackiewicz.
16400 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16401 properly.
16402
16403 2000-10-04 Akim Demaille <akim@epita.fr>
16404
16405 * src/reader.c (parse_expect_decl): Keep `count' within the size
16406 of `buffer'.
16407 From Neil Booth.
16408
16409 2000-10-02 Paul Eggert <eggert@twinsun.com>
16410
16411 * bison.s1 (yyparse): Assign the default value
16412 unconditionally, to avoid a GCC warning and make the parser a
16413 tad smaller.
16414
16415 2000-10-02 Akim Demaille <akim@epita.fr>
16416
16417 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16418 options.
16419
16420 2000-10-02 Akim Demaille <akim@epita.fr>
16421
16422 * src/derives.c, src/print.c, src/reduce.c: To ease the
16423 translation, move some `\n' out of the translated strings.
16424
16425 2000-10-02 Akim Demaille <akim@epita.fr>
16426
16427 The location tracking mechanism is precious for parse error
16428 messages. Nevertheless, it is enabled only when `@n' is used in
16429 the grammar, which is a different issue (you can use it in error
16430 message, but not in the grammar per se). Therefore, there should
16431 be another means to enable it.
16432
16433 * src/getargs.c (getargs): Support `--locations'.
16434 (usage): Report it.
16435 * src/getargs.h (locationsflag): Export it.
16436 * src/lex.c (percent_table): Support `%locations'.
16437 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16438 with `locationsflag'.
16439 * doc/bison.texinfo: Document `--locations' and `%locations'.
16440 Sort the options.
16441 * tests/calc.m4: Test it.
16442
16443 For regularity of the names, replace each
16444 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16445 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16446 In addition replace each `flag' with `_flag'.
16447
16448 2000-10-02 Akim Demaille <akim@epita.fr>
16449
16450 Also test parse error messages, including with YYERROR_VERBOSE.
16451
16452 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16453 associative).
16454 Use it to check the computations.
16455 Use it to check `nonassoc' is honored.
16456 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16457 `--yyerror-verbose'.
16458 (_AT_CHECK_CALC): Adjust to this option.
16459 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16460
16461 2000-10-02 Akim Demaille <akim@epita.fr>
16462
16463 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16464 the latter demonstrates a flaw in the handling of non debugging
16465 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16466 was used in order to simplify:
16467
16468 #if YYDEBUG
16469 if (yydebug)
16470 {
16471 ...
16472 }
16473 #endif
16474
16475 into
16476
16477 if (yydebug)
16478 {
16479 ...
16480 }
16481
16482 unfortunately this leads to a CPP conflict when
16483 `--name-prefix=foo' is used since it produces `#define yydebug
16484 foodebug'.
16485
16486 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16487 (YYDPRINTF): New macro.
16488 Spread its use.
16489 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16490 the bison options.
16491 Also test `--verbose', `--defines' and `--name-prefix'.
16492
16493 2000-10-02 Akim Demaille <akim@epita.fr>
16494
16495 Improve the readability of the produced parsers.
16496
16497 * src/bison.s1: Formatting changes.
16498 Improve the comment related to the `$' mark.
16499 (yydefault): Don't fall through to `yyresume': `goto' there.
16500 * src/output.c (output_parser): When the `$' is met, skip the end
16501 of its line.
16502 New variable, `number_of_dollar_signs', to check there's exactly
16503 one `$' in the parser skeleton.
16504
16505 2000-10-02 Akim Demaille <akim@epita.fr>
16506
16507 * lib/xstrdup.c: New file, from the fileutils.
16508 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16509 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16510 instead of strlen + xmalloc + strcpy.
16511 * src/symtab.c (copys): Remove, use xstrdup instead.
16512
16513 2000-10-02 Akim Demaille <akim@epita.fr>
16514
16515 * src/gram.h (associativity): New enum type which replaces the
16516 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16517 `right_assoc', `left_assoc' and `non_assoc'.
16518 Adjust all dependencies.
16519 * src/reader.c: Formatting changes.
16520 (LTYPESTR): Don't define it, use it as a literal in
16521 `reader_output_yylsp'.
16522 * src/symtab.h (symbol_class): New enum type which replaces the
16523 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16524 `sunknown', `stoken and `snterm'.
16525
16526 2000-10-02 Akim Demaille <akim@epita.fr>
16527
16528 * src/getargs.c (fixed_outfiles): Rename as...
16529 (yaccflag): for consistency and accuracy.
16530 Adjust dependencies.
16531
16532 2000-10-02 Akim Demaille <akim@epita.fr>
16533
16534 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16535 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16536 difficult and introduced a lot of core dump. It turns out that
16537 Bison used an implementation of `xmalloc' based on `calloc', and
16538 at various places it does depend upon the initialization to 0. I
16539 have not tried to isolate the pertinent places, and all the former
16540 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16541 someone should address this issue.
16542
16543 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16544 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16545 files.
16546 Adjust dependencies.
16547 * src/warshall.h: New file.
16548 Propagate.
16549
16550 2000-10-02 Akim Demaille <akim@epita.fr>
16551
16552 Various anti-`extern in *.c' changes.
16553
16554 * src/system.h: Include `assert.h'.
16555
16556 2000-10-02 Akim Demaille <akim@epita.fr>
16557
16558 * src/state.h (nstates, final_state, first_state, first_shift)
16559 (first_reduction): Move their exportation from here...
16560 * src/LR0.h: to here.
16561 Adjust dependencies.
16562 * src/getargs.c (statisticsflag): New variable.
16563 Add support for `--statistics'.
16564 Adjust dependencies.
16565
16566 Remove a lot of now useless `extern' statements in most files.
16567
16568 2000-10-02 Akim Demaille <akim@epita.fr>
16569
16570 * src/LR0.h: New file.
16571 Propagate its use.
16572
16573 2000-10-02 Akim Demaille <akim@epita.fr>
16574
16575 * src/print.h: New file.
16576 Propagate its use.
16577 * src/print.c: Formatting and ordering changes.
16578 (verbose, terse): Replace with...
16579 (print_results): this new function.
16580 Adjust dependencies.
16581
16582 2000-10-02 Akim Demaille <akim@epita.fr>
16583
16584 * src/conflicts.c (conflict_report): New function.
16585 (conflict_log, verbose_conflict_log): Replace with...
16586 (print_conflicts): this function.
16587 Adjust dependencies.
16588 * src/conflicts.h: New file.
16589 Propagate its inclusion.
16590
16591 2000-10-02 Akim Demaille <akim@epita.fr>
16592
16593 * src/nullable.h: New file.
16594 Propagate its inclusion.
16595 * src/nullable.c: Formatting changes.
16596
16597 2000-10-02 Akim Demaille <akim@epita.fr>
16598
16599 * src/reduce.h: New file.
16600 Propagate its inclusion.
16601 * src/reduce.c: Topological sort and other formatting changes.
16602 (bool, TRUE, FALSE): Move their definition to...
16603 * src/system.h: here.
16604
16605 2000-10-02 Akim Demaille <akim@epita.fr>
16606
16607 * src/files.c: Formatting changes.
16608 (tryopen, tryclose, openfiles): Rename as...
16609 (xfopen, xfclose, open_files): this.
16610 (stringappend): static.
16611 * src/files.h: Complete the list of exported symbols.
16612 Propagate its use.
16613
16614 2000-10-02 Akim Demaille <akim@epita.fr>
16615
16616 * src/reader.h: New file.
16617 Propagate its use instead of tedious list of `extern' and
16618 prototypes.
16619 * src/reader.c: Formatting changes, topological sort,
16620 s/register//.
16621
16622 2000-10-02 Akim Demaille <akim@epita.fr>
16623
16624 * src/lex.h: Prototype `lex.c' exported functions.
16625 * src/reader.c: Adjust.
16626 * src/lex.c: Formatting changes.
16627 (safegetc): Rename as...
16628 (xgetc): this.
16629
16630 2000-10-02 Akim Demaille <akim@epita.fr>
16631
16632 * src/lalr.h: New file.
16633 Propagate its inclusion instead of prototypes and `extern'.
16634 * src/lalr.c: Formatting changes, topological sorting etc.
16635
16636 2000-10-02 Akim Demaille <akim@epita.fr>
16637
16638 * src/output.c (token_actions): Introduce a temporary array,
16639 YYDEFACT, that makes it possible for this function to use
16640 output_short_table.
16641
16642 2000-10-02 Akim Demaille <akim@epita.fr>
16643
16644 `user_toknums' is output as a `short[]' in `output.c', while it is
16645 defined as a `int[]' in `reader.c'. For consistency with the
16646 other output tables, `user_toknums' is now defined as a table of
16647 shorts.
16648
16649 * src/reader.c (user_toknums): Be a short table instead of an int
16650 table.
16651 Adjust dependencies.
16652
16653 Factor the short table outputs.
16654
16655 * src/output.c (output_short_table): New function.
16656 * src/output.c (output_gram, output_stos, output_rule_data)
16657 (output_base, output_table, output_check): Use it.
16658
16659 2000-10-02 Akim Demaille <akim@epita.fr>
16660
16661 * src/output.c (output): Topological sort of the functions, in
16662 order to get rid of the `static' prototypes.
16663 No longer use `register'.
16664 * src/output.h: New file.
16665 Propagate its inclusion in files explicitly prototyping functions
16666 from output.c.
16667
16668 2000-09-21 Akim Demaille <akim@epita.fr>
16669
16670 * src/atgeneral.m4: Update from Autoconf.
16671
16672 2000-09-21 Akim Demaille <akim@epita.fr>
16673
16674 * src/closure.h: New file.
16675 * src/closure.c: Formatting changes, topological sort over the
16676 functions, use of closure.h.
16677 (initialize_closure, finalize_closure): Rename as...
16678 (new_closure, free_closure): these. Adjust dependencies.
16679 * src/LR0.c: Formatting changes, topological sort, use of
16680 cloture.h.
16681 (initialize_states): Rename as...
16682 (new_states): this.
16683 * src/Makefile.am (noinst_HEADERS): Adjust.
16684
16685 2000-09-20 Akim Demaille <akim@epita.fr>
16686
16687 * src/acconfig.h: Don't protect config.h against multiple
16688 inclusion.
16689 Don't define PARAMS.
16690 * src/system.h: Define PARAMS.
16691 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16692 purpose of config.h. system.h must not try to fix wrong
16693 definitions in config.h.
16694
16695 2000-09-20 Akim Demaille <akim@epita.fr>
16696
16697 * src/derives.h: New file.
16698 * src/main.c, src/derives.h: Use it.
16699 Formatting changes.
16700 * src/Makefile.am (noinst_HEADERS): Adjust.
16701
16702 2000-09-20 Akim Demaille <akim@epita.fr>
16703
16704 * tests/atgeneral.m4: Update from Autoconf.
16705 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16706 (AT_CHECK_CALC): New macros.
16707 Use these macros to test bison with options `', `--raw',
16708 `--debug', `--yacc', `--yacc --debug'.
16709
16710 2000-09-19 Akim Demaille <akim@epita.fr>
16711
16712 * src/output.c: Formatting changes.
16713 * src/machine.h: Remove, leaving its contents in...
16714 * src/system.h: here.
16715 Include stdio.h.
16716 Adjust all dependencies on stdio.h and machine.h.
16717 * src/getargs.h: New file.
16718 Let all `extern' declarations about getargs.c be replaced with
16719 inclusion of `getargs.h'.
16720 * src/Makefile.am (noinst_HEADERS): Adjust.
16721
16722 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16723 scope.
16724 (yyerror): Returns void, not int.
16725 * doc/bison.texinfo: Formatting changes.
16726
16727 2000-09-19 Akim Demaille <akim@epita.fr>
16728
16729 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16730 portable.
16731
16732 2000-09-18 Akim Demaille <akim@epita.fr>
16733
16734 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16735 * src/Makefile.am (INCLUDES): Don't.
16736 Be ready to fetch headers in lib/.
16737
16738 2000-09-18 Akim Demaille <akim@epita.fr>
16739
16740 * doc/bison.texinfo: Update the copyright.
16741 ANSIfy and GNUify the examples.
16742 Remove the old menu.
16743
16744 2000-09-18 Akim Demaille <akim@epita.fr>
16745
16746 First set of tests: use the `calc' example from the documentation.
16747
16748 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16749 is defined only when YYDEBUG is.
16750 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16751 * src/files.c (tryopen, tryclose): Formatting changes.
16752 Move to the top and be static.
16753 * src/reader.c (read_signed_integer): Likewise.
16754 * tests/calc.m4: New file.
16755 * Makefile.am, suite.m4: Adjust.
16756 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16757
16758 2000-09-18 Akim Demaille <akim@epita.fr>
16759
16760 Add support for an Autotest test suite for Bison.
16761
16762 * m4/m4.m4, m4/atconfig.m4: New files.
16763 * m4/Makefile.am (EXTRA_DIST): Adjust.
16764 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16765 files.
16766 * src/getargs.c: Display a more standard --version message.
16767 * src/reader.c (reader): Formatting changes.
16768 No longer depend upon VERSION_STRING.
16769 * configure.in: No longer use `dnl'.
16770 Set up the test suite and the new directory `tests/.
16771 (VERSION_STRING): Remove.
16772
16773 2000-04-14 Akim Demaille <akim@epita.fr>
16774
16775 * src/reader.c (copy_comment2): New function, same as former
16776 `copy_comment', but outputs into two FILE *.
16777 (copy_comment): Use it.
16778 (parse_union_decl): Use it.
16779 (get_type, parse_start_decl): Use the same `invalid' message.
16780 (parse_start_decl, parse_union_decl): Use the same `multiple'
16781 message.
16782 (parse_union_decl, copy_guard, copy_action): Use the same
16783 `unmatched' message.
16784 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16785
16786 2000-03-31 Akim Demaille <akim@epita.fr>
16787
16788 * src/files.c (tryopen, tryclose): Move to the top.
16789 Be static.
16790
16791 2000-03-31 Akim Demaille <akim@epita.fr>
16792
16793 * src/main.c (main): Don't call `done', exit does it.
16794
16795 2000-03-31 Akim Demaille <akim@epita.fr>
16796
16797 * allocate.c: s/return (foo)/return foo/.
16798 * lalr.c: Likewise.
16799 * LR0.c: Likewise.
16800 * output.c: Likewise.
16801 * reader.c: Likewise.
16802 * symtab.c: Likewise.
16803 * vmsgetargs.c: Likewise.
16804
16805 2000-03-31 Akim Demaille <akim@epita.fr>
16806
16807 Clean up the error reporting functions.
16808
16809 * src/report.c: New file.
16810 * src/report.h: Likewise.
16811 * src/Makefile.am: Adjust.
16812 * m4/error.m4: New file.
16813 * m4/Makefile.am: Adjust.
16814 * configure.in (jm_PREREQ_ERROR): Call it.
16815 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16816 Remove.
16817 (fatal, fatals): Remove. All callers use complain.c::fatal.
16818 (warn, warni, warns, warnss, warnss): Remove. All callers use
16819 complain.c::complain.
16820 (toomany): Remove, use fatal instead.
16821 * src/files.c (done): No argument, use complain_message_count.
16822 * src/main.c (main): Register `done' to `atexit'.
16823
16824 * src/getargs.c (usage): More `fputs', less `fprintf'.
16825
16826 2000-03-28 Akim Demaille <akim@epita.fr>
16827
16828 * lib/: New directory.
16829 * Makefile.am (SUBDIRS): Adjust.
16830 * configure.in: Adjust.
16831 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16832 useless.
16833 * src/alloca.c: Moved to lib/.
16834 * src/getopt.c: Likewise.
16835 * src/getopt1.c: Likewise.
16836 * src/getopt.h: Likewise.
16837 * src/ansi2knr.c: Likewise.
16838 * src/ansi2knr.1: Likewise.
16839 * src/Makefile.am: Adjust.
16840 * lib/Makefile.am: New file.
16841
16842 2000-03-28 Akim Demaille <akim@epita.fr>
16843
16844 * src/getargs.c (usage): Refresh the help message.
16845
16846 2000-03-17 Akim Demaille <akim@epita.fr>
16847
16848 * src/getopt1.c: Updated from textutils 2.0e
16849 * src/getopt.c: Likewise.
16850 * src/getopt.h: Likewise.
16851
16852 2000-03-17 Akim Demaille <akim@epita.fr>
16853
16854 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16855 the file name, not the whole `#line LINE FILE'.
16856
16857 2000-03-17 Akim Demaille <akim@epita.fr>
16858
16859 On syntax errors, report the token on which we choked.
16860
16861 * src/bison.s1 (yyparse): In the label yyerrlab, when
16862 YYERROR_VERBOSE, add yychar in msg.
16863
16864 2000-03-17 Akim Demaille <akim@epita.fr>
16865
16866 * src/reader.c (copy_at): New function.
16867 (copy_guard): Use it.
16868 (copy_action): Use it.
16869
16870 2000-03-17 Akim Demaille <akim@epita.fr>
16871
16872 Be kind to translators, save some useless translations.
16873
16874 * src/main.c (banner): New function.
16875 (fatal_banner): Use it.
16876 (warn_banner): Use it.
16877
16878 2000-03-17 Akim Demaille <akim@epita.fr>
16879
16880 * src/reader.c (copy_definition): Use copy_string and
16881 copy_comment. Removed now unused `match', `ended',
16882 `cplus_comment'.
16883 (copy_comment, copy_string): Moved, to be visible from
16884 copy_definition.
16885
16886 2000-03-17 Akim Demaille <akim@epita.fr>
16887
16888 * src/reader.c (copy_string): Declare `static inline'. No
16889 problems with inline, since it is checked by configure.
16890 (copy_comment): Likewise.
16891
16892 2000-03-17 Akim Demaille <akim@epita.fr>
16893
16894 * src/reader.c (packsymbols): Formatting changes.
16895
16896 2000-03-17 Akim Demaille <akim@epita.fr>
16897
16898 * src/reader.c (copy_comment): New function, factored out from:
16899 (copy_action): Use it. Removed now unused `match', `ended',
16900 `cplus_comment'.
16901 (copy_guard): Likewise.
16902
16903 2000-03-17 Akim Demaille <akim@epita.fr>
16904
16905 * src/reader.c (copy_string): New function, factored out from:
16906 (copy_action): Use it.
16907 (copy_guard): Likewise.
16908
16909 2000-03-17 Akim Demaille <akim@epita.fr>
16910
16911 Change the handling of @s so that they behave exactly like $s.
16912 There is now a pseudo variable @$ (readble and writable), location
16913 of the lhs of the rule (by default ranging from the location of
16914 the first symbol of the rhs, to the location of the last symbol,
16915 or, if the rhs is empty, YYLLOC).
16916
16917 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16918 yyval.
16919 (yyparse): When providing a default semantic action, provide a
16920 default location action.
16921 (after the $): No longer change `*YYLSP', just stack YYLOC the
16922 same way you stack YYVAL.
16923 * src/reader.c (read_declarations): Use warns.
16924 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16925 (copy_action, case '@'): Likewise.
16926 Use a standard error message, to save useless work from
16927 translators.
16928
16929 2000-03-17 Akim Demaille <akim@epita.fr>
16930
16931 * src/bison.s1: Formatting and cosmetics changes.
16932 * src/reader.c: Likewise.
16933 Update the Copyright notice.
16934
16935 2000-03-17 Akim Demaille <akim@epita.fr>
16936
16937 * src/bison.s1 (#line): All set to `#line' only, since the
16938 Makefile now handles them.
16939
16940 2000-03-16 Akim Demaille <akim@epita.fr>
16941
16942 * src/output.c (output_rule_data): Output the documentation of
16943 some of the tables.
16944 (Copyright notice): Update.
16945 Formatting changes.
16946
16947 2000-03-16 Akim Demaille <akim@epita.fr>
16948
16949 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16950 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16951 One `#if YYDEBUG' remains, since it uses variables which are
16952 defined only if `YYDEBUG != 0'.
16953
16954 2000-03-16 Akim Demaille <akim@epita.fr>
16955
16956 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16957 and related variables so that the similarities are highlighted.
16958
16959 2000-03-16 Akim Demaille <akim@epita.fr>
16960
16961 * src/bison.s1: Properly indent CPP directives.
16962
16963 2000-03-16 Akim Demaille <akim@epita.fr>
16964
16965 * src/bison.s1: Properly indent the `alloca' CPP section.
16966
16967 2000-03-16 Akim Demaille <akim@epita.fr>
16968
16969 Do not hard code values of directories in `configure.in'.
16970 Update the `configure' tool chain.
16971
16972 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16973 src/makefile.am.
16974 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16975 (AC_OUTPUT): Add m4/Makefile.
16976 Bump to bison 1.28a, 1.29 has never been released.
16977 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16978 handled via src/Makefile.am.
16979 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16980 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16981 autoheader.
16982 * Makefile.am (SUBDIRS): Add m4.
16983 (ACLOCAL_AM_FLAGS): New variable.
16984 (AUTOMAKE_OPTIONS): Add check-news.
16985 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16986 the proper line number and file name.
16987 (DEFS): Propagate the location of bison library files and of the
16988 locale files.
16989 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16990 builddir.
16991 * acinclude.m4: Remove, replaced by the directory m4.
16992 * m4/Makefile.am (EXTRA_DIST): New variable.
16993 * m4/gettext.m4: New file, from the fileutils.
16994 * m4/lcmessage.m4: Likewise
16995 * m4/progtest.m4: Likewise.
16996 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16997
16998 2000-03-10 Akim Demaille <akim@epita.fr>
16999
17000 * src/closure.c:
17001 Formatting changes of various comments.
17002 Respect the GNU coding standards at various places.
17003 Don't use `_()' when no translation is needed.
17004
17005 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17006
17007 * src/files.c:
17008 OS/2 honors TMPDIR environment variable.
17009
17010 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17011
17012 * doc/bison.texinfo: Tweaked spelling and grammar.
17013 Updated ISBN.
17014 Removed reference to price of printed copy.
17015 Mention BISON_SIMPLE and BISON_HAIRY.
17016
17017 1999-12-13 Jesse Thilo <jthilo@gnu.org>
17018
17019 * configure.in, NEWS:
17020 Bison 1.29 released.
17021
17022 1999-10-27 Jesse Thilo <jthilo@gnu.org>
17023
17024 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
17025 Added reference card.
17026
17027 1999-07-26 Jesse Thilo <jthilo@gnu.org>
17028
17029 * po/ru.po: Added Russian translation.
17030
17031 1999-07-26 Jesse Thilo <jthilo@gnu.org>
17032
17033 * configure.in: Added Russian translation.
17034
17035 1999-07-06 Jesse Thilo <jthilo@gnu.org>
17036
17037 * configure.in, NEWS, README:
17038 Released version 1.28.
17039
17040 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17041
17042 * src/system.h:
17043 Squashed redefinition warning on some systems.
17044
17045 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
17046 Have configure build version string instead of relying on ANSI string
17047 concatentation.
17048
17049 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17050
17051 * po/POTFILES.in: Got rid of version.c.
17052
17053 1999-06-14 Jesse Thilo <jthilo@gnu.org>
17054
17055 * acconfig.h, configure.in:
17056 Have configure build version string instead of relying on ANSI string
17057 concatentation.
17058
17059 1999-06-08 Jesse Thilo <jthilo@gnu.org>
17060
17061 * doc/bison.1:
17062 Dropped mention of `+' for long-named options.
17063
17064 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17065
17066 * src/files.c: Added <unistd.h> for unlink().
17067
17068 * src/Makefile.am, src/system.h:
17069 I18n fixes.
17070
17071 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17072
17073 * README: Added a FAQ list.
17074
17075 * configure.in, acconfig.h:
17076 I18n fixes.
17077
17078 1999-05-30 Jesse Thilo <jthilo@gnu.org>
17079
17080 * doc/FAQ, doc/Makefile.am:
17081 Added a FAQ list.
17082
17083 1999-05-19 Jesse Thilo <jthilo@gnu.org>
17084
17085 * src/alloc.h, src/symtab.h, src/version.c:
17086 Protected inclusion of "config.h" with HAVE_CONFIG_H.
17087
17088 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17089
17090 * src/.cvsignore, src/Makefile.am:
17091 Reorganized: sources in `src', documentation in `doc'.
17092
17093 * src/lex.c (literalchar):
17094 fixed the code for escaping double quotes (thanks
17095 Jonathan Czisny.)
17096
17097 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17098
17099 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
17100 Adjusted paths to reflect directory reorganization.
17101
17102 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17103
17104 * doc/.cvsignore, doc/Makefile.am:
17105 Reorganized: sources in `src', documentation in `doc'.
17106
17107 1999-04-18 Jesse Thilo <jthilo@gnu.org>
17108
17109 * configure.in:
17110 Updated AC_INIT file to reflect directory reorganization.
17111
17112 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
17113 Reorganized: sources in `src', documentation in `doc'.
17114
17115 1999-04-13 Jesse Thilo <jthilo@gnu.org>
17116
17117 * src/allocate.c:
17118 Don't declare calloc() and realloc() if not necessary.
17119
17120 1999-04-13 Jesse Thilo <jthilo@gnu.org>
17121
17122 * configure.in, acconfig.h, acinclude.m4:
17123 Don't declare calloc() and realloc() if not necessary.
17124
17125 1999-03-23 Jesse Thilo <jthilo@gnu.org>
17126
17127 * po/.cvsignore: Added i18n support.
17128
17129 1999-03-23 Jesse Thilo <jthilo@gnu.org>
17130
17131 * acconfig.h, configure.in, Makefile.am:
17132 Added i18n support.
17133
17134 1999-03-22 Jesse Thilo <jthilo@gnu.org>
17135
17136 * src/bison.s1: Fixed #line numbers.
17137
17138 1999-03-15 Jesse Thilo <jthilo@gnu.org>
17139
17140 * po/es.po, po/fr.po, po/nl.po, po/de.po:
17141 Added PO files from Translation Project.
17142
17143 1999-03-03 Jesse Thilo <jthilo@gnu.org>
17144
17145 * Makefile.am:
17146 Added support for non-ANSI compilers (ansi2knr).
17147
17148 1999-02-16 Jesse Thilo <jthilo@gnu.org>
17149
17150 * configure.in: Bumped version number to 1.27.
17151
17152 * Makefile.am:
17153 Added `bison.simple' to list of files removed by `make distclean'.
17154
17155 1999-02-12 Jesse Thilo <jthilo@gnu.org>
17156
17157 * src/files.c, src/files.h:
17158 Defined locations of parser files in config.h instead of Makefile.
17159
17160 1999-02-12 Jesse Thilo <jthilo@gnu.org>
17161
17162 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
17163 Defined locations of parser files in config.h instead of Makefile.
17164
17165 1999-02-09 Jesse Thilo <jthilo@gnu.org>
17166
17167 * Makefile.am:
17168 Removed inappropriate use of $< macro.
17169
17170 1999-02-05 Jesse Thilo <jthilo@gnu.org>
17171
17172 * po/Makefile.in.in, po/POTFILES.in:
17173 Add `po' directory skeleton.
17174
17175 1999-01-27 Jesse Thilo <jthilo@gnu.org>
17176
17177 * README: Document help-bison list.
17178
17179 * configure.in: Add check for mkstemp().
17180
17181 1999-01-20 Jesse Thilo <jthilo@gnu.org>
17182
17183 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
17184 Hush a few compiler warnings.
17185
17186 * src/files.c:
17187 Add tryclose(), which verifies that fclose was successful.
17188 Hush a couple of compiler warnings.
17189
17190 1999-01-20 Jesse Thilo <jthilo@gnu.org>
17191
17192 * Makefile.am, OChangeLog:
17193 ChangeLog is now automatically generated. Include the old version as
17194 OChangeLog.
17195
17196 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17197
17198 * 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:
17199 Update FSF address.
17200
17201 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17202
17203 * doc/bison.texinfo: Fix formatting glitch.
17204
17205 * doc/bison.texinfo: Update FSF address.
17206
17207 1999-01-14 Jesse Thilo <jthilo@gnu.org>
17208
17209 * acconfig.h: Update FSF address.
17210
17211 1999-01-08 Jesse Thilo <jthilo@gnu.org>
17212
17213 * src/system.h:
17214 Don't define PACKAGE here, since config.h defines it.
17215
17216 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17217
17218 * src/reader.c: Update copyright date.
17219
17220 * src/main.c:
17221 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17222 favor of output directly to stderr (avoids buffer overruns).
17223
17224 * src/reader.c: Some checks for premature EOF.
17225
17226 * 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:
17227 Use prototypes if the compiler understands them.
17228
17229 * src/files.c: Honor TMPDIR on Unix hosts.
17230 Use prototypes if the compiler understands them.
17231
17232 * src/reader.c:
17233 Fix a couple of buffer overrun bugs.
17234 Use prototypes if the compiler understands them.
17235
17236 * src/system.h: Include unistd.h and ctype.h.
17237 Use #ifdef instead of #if for NLS symbols.
17238
17239 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17240
17241 * doc/bison.texinfo:
17242 Delete comment "consider using @set for edition number, etc..." since
17243 we now are doing so.
17244
17245 1998-12-30 Jesse Thilo <jthilo@gnu.org>
17246
17247 * configure.in:
17248 Use prototypes if the compiler understands them.
17249
17250 * NEWS: Document 1.26 highlights.
17251
17252 * Makefile.am: Require Automake 1.3 or later.
17253
17254 * acconfig.h:
17255 Use prototypes if the compiler understands them.
17256
17257 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17258
17259 * src/version.c:
17260 Use VERSION symbol from automake for version number.
17261
17262 1998-12-29 Jesse Thilo <jthilo@gnu.org>
17263
17264 * acconfig.h, configure.in, version.cin:
17265 Use VERSION symbol from automake for version number.
17266
17267 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17268
17269 * Makefile.am:
17270 Distribute original version of simple parser (bison.s1), not built
17271 version (bison.simple).
17272
17273 1998-11-28 Jesse Thilo <jthilo@gnu.org>
17274
17275 * doc/bison.texinfo: Add info dir entry.
17276
17277 * doc/bison.texinfo:
17278 Let automake put version number into documentation.
17279
17280 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17281
17282 * src/bison.cld, src/build.com, src/vmshlp.mar:
17283 Add non-RCS files from /gd/gnu/bison.
17284
17285 1998-11-26 Jesse Thilo <jthilo@gnu.org>
17286
17287 * doc/bison.1:
17288 Document the BISON_HAIRY and BISON_SIMPLE variables.
17289
17290 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17291
17292 * src/version.c: Build version.c automatically.
17293
17294 * src/reader.c:
17295 Fix token numbering (used to start at 258, not 257).
17296
17297 * src/system.h: Include config.h.
17298
17299 * src/getargs.c: Update bug report address.
17300
17301 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17302 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17303
17304 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17305
17306 * Makefile.am:
17307 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17308
17309 * configure.in, version.cin:
17310 Build version.c automatically.
17311
17312 * AUTHORS: Add AUTHORS file.
17313
17314 * README: Update bug report address.
17315
17316 * bison.simple:
17317 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17318
17319 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17320 Add automake stuff.
17321
17322 1998-11-25 Jesse Thilo <jthilo@gnu.org>
17323
17324 * doc/bison.texinfo: Clean up some formatting.
17325
17326 1998-05-05 Richard Stallman <rms@gnu.org>
17327
17328 * doc/bison.texinfo:
17329 Explain better why to make a pure parser.
17330
17331 1998-01-05 Richard Stallman <rms@gnu.org>
17332
17333 * src/files.c (openfiles):
17334 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17335 find a temporary directory, if possible. Do not unlink files while
17336 they are open.
17337
17338 1997-08-25 Richard Stallman <rms@gnu.org>
17339
17340 * src/reader.c (stack_offset;):
17341 Change some warni to warns.
17342
17343 * src/lex.c (literalchar): Use warns, not warni.
17344
17345 1997-06-28 Richard Stallman <rms@gnu.org>
17346
17347 * src/bison.s1: Add a Bison version comment.
17348
17349 * src/main.c (fatal, warn, berror):
17350 Use program_name.
17351
17352 1997-06-28 Richard Stallman <rms@gnu.org>
17353
17354 * Makefile.in (bison_version): New variable.
17355 (dist): Use that variable.
17356 (bison.s1): Substitute the Bison version into bison.simple.
17357
17358 * bison.simple: Add a Bison version comment.
17359
17360 1997-06-18 Richard Stallman <rms@gnu.org>
17361
17362 * src/main.c (fatal, warn, berror):
17363 Make error messages standard.
17364 (toomany): Improve error message text.
17365
17366 * 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:
17367 new.h renamed to alloc.h.
17368
17369 1997-06-18 Richard Stallman <rms@gnu.org>
17370
17371 * Makefile.in: new.h renamed to alloc.h.
17372
17373 1997-05-24 Richard Stallman <rms@gnu.org>
17374
17375 * src/lex.c (literalchar):
17376 Fix the code for escaping \, " and '.
17377
17378 (lex): Avoid trouble when there are many chars
17379 to discard in a char literal with just several chars in it.
17380
17381 1997-05-17 Richard Stallman <rms@gnu.org>
17382
17383 * src/bison.s1:
17384 Use malloc, if using alloca is troublesome.
17385 (YYSTACK_USE_ALLOCA): New flag macro.
17386 Define it for some systems and compilers.
17387 (YYSTACK_ALLOC): New macro.
17388 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17389 If it was malloc'd, free it.
17390
17391 1997-05-17 Richard Stallman <rms@gnu.org>
17392
17393 * bison.simple:
17394 Use malloc, if using alloca is troublesome.
17395 (YYSTACK_USE_ALLOCA): New flag macro.
17396 Define it for some systems and compilers.
17397 (YYSTACK_ALLOC): New macro.
17398 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17399 If it was malloc'd, free it.
17400
17401 1997-04-23 Richard Stallman <rms@gnu.org>
17402
17403 * src/bison.s1:
17404 (alloca) [__hpux]: Always define as __builtin_alloca.
17405
17406 1997-04-23 Richard Stallman <rms@gnu.org>
17407
17408 * bison.simple:
17409 (alloca) [__hpux]: Always define as __builtin_alloca.
17410
17411 1997-04-22 Richard Stallman <rms@gnu.org>
17412
17413 * src/bison.s1:
17414 [__hpux]: Include alloca.h (right for HPUX 10)
17415 instead of declaring alloca (right for HPUX 9).
17416
17417 * src/bison.s1 (__yy_memcpy):
17418 Declare arg `count' as unsigned int.
17419 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17420
17421 1997-04-22 Richard Stallman <rms@gnu.org>
17422
17423 * bison.simple:
17424 [__hpux]: Include alloca.h (right for HPUX 10)
17425 instead of declaring alloca (right for HPUX 9).
17426
17427 * bison.simple (__yy_memcpy):
17428 Declare arg `count' as unsigned int.
17429 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17430
17431 1997-01-03 Richard Stallman <rms@gnu.org>
17432
17433 * src/allocate.c: [__STDC__ or _MSC_VER]:
17434 Declare calloc and realloc to return void *.
17435
17436 1997-01-02 Richard Stallman <rms@gnu.org>
17437
17438 * src/system.h:
17439 [_MSC_VER]: Include stdlib.h and process.h.
17440 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17441
17442 * src/main.c (main): Return FAILURE as a value.
17443 (printable_version): Declare arg as int, not char.
17444
17445 1997-01-02 Richard Stallman <rms@gnu.org>
17446
17447 * Makefile.in (dist):
17448 Explicitly check for symlinks, and copy them.
17449
17450 1996-12-19 Richard Stallman <rms@gnu.org>
17451
17452 * src/files.c:
17453 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17454
17455 1996-12-18 Paul Eggert <eggert@gnu.org>
17456
17457 * src/bison.s1 (yyparse):
17458 If __GNUC__ and YYPARSE_PARAM are both defined,
17459 declare yyparse to have a void * argument.
17460
17461 1996-12-18 Paul Eggert <eggert@gnu.org>
17462
17463 * bison.simple (yyparse):
17464 If __GNUC__ and YYPARSE_PARAM are both defined,
17465 declare yyparse to have a void * argument.
17466
17467 1996-12-17 Richard Stallman <rms@gnu.org>
17468
17469 * src/reduce.c (nbits): Add some casts.
17470
17471 1996-08-12 Richard Stallman <rms@gnu.org>
17472
17473 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17474
17475 1996-08-12 Richard Stallman <rms@gnu.org>
17476
17477 * bison.simple: Test _MSDOS as well as _MSDOS_.
17478
17479 1996-07-31 Richard Stallman <rms@gnu.org>
17480
17481 * src/bison.s1:
17482 [__sun && __i386]: Include alloca.h.
17483
17484 1996-07-31 Richard Stallman <rms@gnu.org>
17485
17486 * bison.simple:
17487 [__sun && __i386]: Include alloca.h.
17488
17489 1996-07-30 Richard Stallman <rms@gnu.org>
17490
17491 * src/bison.s1: Comment change.
17492
17493 * src/bison.s1: Test _MSDOS_, not MSDOS.
17494
17495 1996-07-30 Richard Stallman <rms@gnu.org>
17496
17497 * bison.simple: Comment change.
17498
17499 * bison.simple: Test _MSDOS_, not MSDOS.
17500
17501 1996-06-01 Richard Stallman <rms@gnu.org>
17502
17503 * 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:
17504 Insert `_' macro around many string constants.
17505
17506 * src/main.c:
17507 Insert `_' macro around many string constants.
17508
17509 (main): Call setlocale, bindtextdomain and textdomain.
17510
17511 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17512 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17513 [ENABLE_NLS]: Include libintl.h.
17514 [ENABLE_NLS] (gettext): Define.
17515 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17516 (N_, PACKAGE, LOCALEDIR): New macros.
17517
17518 1996-06-01 Richard Stallman <rms@gnu.org>
17519
17520 * POTFILES.in: New file.
17521
17522 * Makefile.in (allocate.o):
17523 Define target explicitly.
17524
17525 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17526 (LDFLAGS): Set to @LDFLAGS@.
17527 (configure): Run autoconf only if preceding `cd' succeeds.
17528 (bison.s1): Redirect output to temporary file then move the
17529 temporary to the target, rather than redirecting directly to bison.s1.
17530 (clean): Remove config.status and config.log.
17531 (distclean): Don't remove config.status here.
17532
17533 1996-05-12 Richard Stallman <rms@gnu.org>
17534
17535 * src/bison.s1:
17536 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17537
17538 1996-05-12 Richard Stallman <rms@gnu.org>
17539
17540 * bison.simple:
17541 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17542
17543 1996-05-11 Richard Stallman <rms@gnu.org>
17544
17545 * src/bison.s1 (__yy_memcpy):
17546 Really reorder the args, as was supposedly done on Feb 14 1995.
17547 (yyparse): Calls changed accordingly.
17548
17549 1996-05-11 Richard Stallman <rms@gnu.org>
17550
17551 * Makefile.in (dist): Don't use $(srcdir).
17552
17553 * bison.simple (__yy_memcpy):
17554 Really reorder the args, as was supposedly done on Feb 14 1995.
17555 (yyparse): Calls changed accordingly.
17556
17557 1996-01-27 Richard Stallman <rms@gnu.org>
17558
17559 * src/output.c (output_rule_data):
17560 Test YYERROR_VERBOSE in the conditional
17561 around the definition of ttyname.
17562
17563 1995-12-29 Richard Stallman <rms@gnu.org>
17564
17565 * src/bison.s1:
17566 Fix line numbers in #line commands.
17567
17568 1995-12-29 Richard Stallman <rms@gnu.org>
17569
17570 * bison.simple:
17571 Fix line numbers in #line commands.
17572
17573 1995-12-27 Richard Stallman <rms@gnu.org>
17574
17575 * src/bison.s1 (YYPARSE_PARAM_DECL):
17576 In C++, make it always null.
17577 (YYPARSE_PARAM_ARG): New macro.
17578 (yyparse): Use YYPARSE_PARAM_ARG.
17579
17580 1995-12-27 Richard Stallman <rms@gnu.org>
17581
17582 * bison.simple (YYPARSE_PARAM_DECL):
17583 In C++, make it always null.
17584 (YYPARSE_PARAM_ARG): New macro.
17585 (yyparse): Use YYPARSE_PARAM_ARG.
17586
17587 1995-11-29 Richard Stallman <rms@gnu.org>
17588
17589 * doc/bison.texinfo:
17590 Describe literal string tokens, %raw, %no_lines, %token_table.
17591
17592 1995-11-29 Daniel Hagerty <hag@gnu.org>
17593
17594 * doc/bison.texinfo: Fixed update date
17595
17596 1995-10-16 Richard Stallman <rms@gnu.org>
17597
17598 * src/version.c: Version 1.25.
17599
17600 1995-10-16 Richard Stallman <rms@gnu.org>
17601
17602 * NEWS: *** empty log message ***
17603
17604 1995-10-16 Richard Stallman <rms@gnu.org>
17605
17606 * doc/bison.1, doc/bison.rnh:
17607 Add new options.
17608
17609 1995-10-15 Richard Stallman <rms@gnu.org>
17610
17611 * src/vmsgetargs.c, src/getargs.c:
17612 Added -n, -k, and -raw switches.
17613 (noparserflag, toknumflag, rawtoknumflag): New variables.
17614
17615 * src/symtab.h (SALIAS):
17616 New #define for adding aliases to %token.
17617 (struct bucket): Added `alias' field.
17618
17619 * src/reduce.c (reduce_grammar):
17620 Revise error message.
17621 (print_notices): Remove final `.' from error message.
17622
17623 * src/reader.c (reader_output_yylsp):
17624 New function.
17625 (readgram): Use `#if 0' around code that accepted %command
17626 inside grammar rules: The documentation doesn't allow it,
17627 and it will fail since the %command processors scan for the next %.
17628 (parse_token_decl): Extended the %token
17629 declaration to allow a multi-character symbol as an alias.
17630 (parse_thong_decl): New function.
17631 (read_declarations): Added %thong declarations.
17632 (read_declarations): Handle NOOP to deal with allowing
17633 % declarations as another means to specify the flags.
17634 (readgram): Allow %prec prior to semantics embedded in a rule.
17635 (skip_to_char, read_declarations, copy_definition)
17636 (parse_token_decl, parse_start_decl, parse_type_decl)
17637 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17638 (get_type_name, copy_guard, copy_action, readgram)
17639 (get_type, packsymbols): Revised most error messages.
17640 Changed `fatal' to `warnxxx' to avoid aborting for error.
17641 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17642 (read_declarations): Improve the error message for
17643 an invalid character. Do not abort.
17644 (read_declarations, copy_guard, copy_action): Use
17645 printable_version to avoid unprintable characters in printed output.
17646 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17647 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17648 Allow the type of a non-terminal can be given
17649 more than once, as long as all specifications give the same type.
17650
17651 * src/output.c:
17652 (output_headers, output_trailers, output, output_gram)
17653 (output_rule_data): Implement noparserflag variable.
17654 Implement toknumflag variable.
17655 (output): Call reader_output_yylsp to output LTYPESTR.
17656
17657 * src/main.c (main):
17658 If reader sees an error, don't process the grammar.
17659 (fatals): Updated to not use VARARGS1.
17660 (printable_version, int_to_string, warn, warni, warns, warnss)
17661 (warnsss): New error reporting functions. Avoid abort for error.
17662
17663 * src/lex.h:
17664 Added THONG and NOOP for alias processing.
17665 Added SETOPT for the new code that allows setting options with %flags.
17666
17667 * src/lex.c:
17668 Include getopt.h. Add some extern decls.
17669 (safegetc): New function to deal with EOF gracefully.
17670 (literalchar); new function to deal with reading \ escapes.
17671 (lex): Use literalchar.
17672 (lex): Implemented "..." tokens.
17673 (literalchar, lex, parse_percent_token): Made tokenbuffer
17674 always contain the token. This includes growing the token
17675 buffer while reading an integer.
17676 (parse_percent_token): Replaced if-else statement with percent_table.
17677 (parse_percent_token): Added % declarations as another
17678 way to specify the flags -n, -l, and -r. Also added hooks for
17679 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17680 major changes to files.c.
17681 (lex) Retain in the incoming stream a character following
17682 an incorrect '/'.
17683 (skip_white_space, lex): Revised most error messages
17684 and changed fatal to warn to avoid aborting.
17685 (percent_table): Added %thong declarations.
17686
17687 * src/gram.h: Comment changes.
17688
17689 * src/files.c (openfiles, open_extra_files, done):
17690 Add faction flag
17691 and actfile file. Handle noparserflag. Both for -n switch.
17692
17693 * src/conflicts.c (resolve_sr_conflict):
17694 Remove use of alloca.
17695
17696 1995-06-01 Jim Meyering <meyering@gnu.org>
17697
17698 * doc/bison.texinfo: *** empty log message ***
17699
17700 1995-05-06 Richard Stallman <rms@gnu.org>
17701
17702 * src/bison.s1: Comment change.
17703
17704 1995-05-06 Richard Stallman <rms@gnu.org>
17705
17706 * bison.simple: Comment change.
17707
17708 1995-05-03 Richard Stallman <rms@gnu.org>
17709
17710 * src/version.c: Version now 1.24.
17711
17712 * src/bison.s1: Change distribution terms.
17713
17714 * src/version.c: Version now 1.23.
17715
17716 1995-05-03 Richard Stallman <rms@gnu.org>
17717
17718 * doc/bison.texinfo:
17719 Rewrite "Conditions for Using Bison".
17720 Update version to 1.24.
17721
17722 1995-05-03 Richard Stallman <rms@gnu.org>
17723
17724 * bison.simple: Change distribution terms.
17725
17726 1995-02-23 Richard Stallman <rms@gnu.org>
17727
17728 * src/files.c: Test __VMS_POSIX as well as VMS.
17729
17730 1995-02-14 Jim Meyering <meyering@gnu.org>
17731
17732 * src/bison.s1 (__yy_memcpy):
17733 Renamed from __yy_bcopy to avoid
17734 confusion. Reverse FROM and TO arguments to be consistent with
17735 those of memcpy.
17736
17737 1995-02-14 Jim Meyering <meyering@gnu.org>
17738
17739 * bison.simple (__yy_memcpy):
17740 Renamed from __yy_bcopy to avoid
17741 confusion. Reverse FROM and TO arguments to be consistent with
17742 those of memcpy.
17743
17744 1994-11-10 David J. MacKenzie <djm@gnu.org>
17745
17746 * NEWS: reformat
17747
17748 * NEWS: New file.
17749
17750 * Makefile.in (DISTFILES): Include NEWS.
17751
17752 * Makefile.in (DISTFILES):
17753 Include install-sh, not install.sh.
17754
17755 * configure.in: Update to Autoconf v2 macro names.
17756
17757 1994-10-05 David J. MacKenzie <djm@gnu.org>
17758
17759 * Makefile.in: fix typo
17760
17761 * Makefile.in (prefix, exec_prefix):
17762 Let configure set them.
17763
17764 1994-09-28 David J. MacKenzie <djm@gnu.org>
17765
17766 * Makefile.in: Set datadir to $(prefix)/share.
17767
17768 1994-09-15 Richard Stallman <rms@gnu.org>
17769
17770 * src/bison.s1:
17771 Update copyright notice and GPL version.
17772
17773 1994-09-15 Richard Stallman <rms@gnu.org>
17774
17775 * bison.simple:
17776 Update copyright notice and GPL version.
17777
17778 1994-07-12 Richard Stallman <rms@gnu.org>
17779
17780 * src/reduce.c, src/reader.c:
17781 entered into RCS
17782
17783 1994-05-05 David J. MacKenzie <djm@gnu.org>
17784
17785 * Makefile.in: entered into RCS
17786
17787 1994-03-26 Richard Stallman <rms@gnu.org>
17788
17789 * src/bison.s1: entered into RCS
17790
17791 1994-03-26 Richard Stallman <rms@gnu.org>
17792
17793 * bison.simple: entered into RCS
17794
17795 1994-03-25 Richard Stallman <rms@gnu.org>
17796
17797 * src/main.c: entered into RCS
17798
17799 1994-03-24 Richard Stallman <rms@gnu.org>
17800
17801 * src/conflicts.c: entered into RCS
17802
17803 1994-01-02 Richard Stallman <rms@gnu.org>
17804
17805 * Makefile.in: *** empty log message ***
17806
17807 1993-11-21 Richard Stallman <rms@gnu.org>
17808
17809 * src/bison.s1: *** empty log message ***
17810
17811 1993-11-21 Richard Stallman <rms@gnu.org>
17812
17813 * doc/bison.texinfo: entered into RCS
17814
17815 * doc/bison.texinfo: *** empty log message ***
17816
17817 1993-11-21 Richard Stallman <rms@gnu.org>
17818
17819 * bison.simple: *** empty log message ***
17820
17821 1993-10-25 David J. MacKenzie <djm@gnu.org>
17822
17823 * doc/bison.texinfo: *** empty log message ***
17824
17825 1993-10-19 Richard Stallman <rms@gnu.org>
17826
17827 * src/bison.s1: *** empty log message ***
17828
17829 1993-10-19 Richard Stallman <rms@gnu.org>
17830
17831 * bison.simple: *** empty log message ***
17832
17833 1993-10-14 Richard Stallman <rms@gnu.org>
17834
17835 * src/bison.s1: *** empty log message ***
17836
17837 1993-10-14 Richard Stallman <rms@gnu.org>
17838
17839 * bison.simple: *** empty log message ***
17840
17841 1993-09-14 David J. MacKenzie <djm@gnu.org>
17842
17843 * doc/bison.texinfo: *** empty log message ***
17844
17845 1993-09-13 Noah Friedman <friedman@gnu.org>
17846
17847 * Makefile.in: *** empty log message ***
17848
17849 1993-09-10 Richard Stallman <rms@gnu.org>
17850
17851 * src/conflicts.c: *** empty log message ***
17852
17853 * src/system.h: entered into RCS
17854
17855 1993-09-10 Richard Stallman <rms@gnu.org>
17856
17857 * doc/bison.1: entered into RCS
17858
17859 1993-09-06 Noah Friedman <friedman@gnu.org>
17860
17861 * src/version.c: entered into RCS
17862
17863 1993-09-06 Noah Friedman <friedman@gnu.org>
17864
17865 * Makefile.in: *** empty log message ***
17866
17867 1993-07-30 David J. MacKenzie <djm@gnu.org>
17868
17869 * Makefile.in: *** empty log message ***
17870
17871 1993-07-24 Richard Stallman <rms@gnu.org>
17872
17873 * src/bison.s1: *** empty log message ***
17874
17875 1993-07-24 Richard Stallman <rms@gnu.org>
17876
17877 * bison.simple: *** empty log message ***
17878
17879 1993-07-08 David J. MacKenzie <djm@gnu.org>
17880
17881 * Makefile.in: *** empty log message ***
17882
17883 1993-07-04 Richard Stallman <rms@gnu.org>
17884
17885 * src/bison.s1: *** empty log message ***
17886
17887 1993-07-04 Richard Stallman <rms@gnu.org>
17888
17889 * bison.simple: *** empty log message ***
17890
17891 1993-06-26 David J. MacKenzie <djm@gnu.org>
17892
17893 * src/getargs.c: entered into RCS
17894
17895 1993-06-26 David J. MacKenzie <djm@gnu.org>
17896
17897 * doc/bison.texinfo: *** empty log message ***
17898
17899 * doc/bison.1: New file.
17900
17901 1993-06-25 Richard Stallman <rms@gnu.org>
17902
17903 * src/getargs.c: New file.
17904
17905 1993-06-16 Richard Stallman <rms@gnu.org>
17906
17907 * src/bison.s1: *** empty log message ***
17908
17909 1993-06-16 Richard Stallman <rms@gnu.org>
17910
17911 * bison.simple: *** empty log message ***
17912
17913 1993-06-03 Richard Stallman <rms@gnu.org>
17914
17915 * src/bison.s1: New file.
17916
17917 1993-06-03 Richard Stallman <rms@gnu.org>
17918
17919 * doc/bison.texinfo: *** empty log message ***
17920
17921 1993-06-03 Richard Stallman <rms@gnu.org>
17922
17923 * bison.simple: New file.
17924
17925 1993-05-19 Richard Stallman <rms@gnu.org>
17926
17927 * doc/bison.texinfo: New file.
17928
17929 1993-05-07 Noah Friedman <friedman@gnu.org>
17930
17931 * Makefile.in: *** empty log message ***
17932
17933 1993-04-28 Noah Friedman <friedman@gnu.org>
17934
17935 * src/reader.c: *** empty log message ***
17936
17937 1993-04-23 Noah Friedman <friedman@gnu.org>
17938
17939 * src/alloc.h: entered into RCS
17940
17941 1993-04-20 David J. MacKenzie <djm@gnu.org>
17942
17943 * src/version.c: *** empty log message ***
17944
17945 * src/files.c, src/allocate.c:
17946 entered into RCS
17947
17948 * src/reader.c: *** empty log message ***
17949
17950 * src/lex.c: entered into RCS
17951
17952 * src/conflicts.c: New file.
17953
17954 * src/symtab.c: entered into RCS
17955
17956 * src/alloc.h: New file.
17957
17958 * src/LR0.c: entered into RCS
17959
17960 1993-04-18 Noah Friedman <friedman@gnu.org>
17961
17962 * src/reader.c: New file.
17963
17964 * src/version.c: *** empty log message ***
17965
17966 1993-04-18 Noah Friedman <friedman@gnu.org>
17967
17968 * Makefile.in: *** empty log message ***
17969
17970 1993-04-17 Noah Friedman <friedman@gnu.org>
17971
17972 * Makefile.in: *** empty log message ***
17973
17974 1993-04-15 Richard Stallman <rms@gnu.org>
17975
17976 * src/main.c, src/files.c:
17977 New file.
17978
17979 1993-04-15 Noah Friedman <friedman@gnu.org>
17980
17981 * configure.in: entered into RCS
17982
17983 * configure.in: *** empty log message ***
17984
17985 * configure.in: New file.
17986
17987 1993-04-14 Richard Stallman <rms@gnu.org>
17988
17989 * Makefile.in: New file.
17990
17991 1993-04-13 Richard Stallman <rms@gnu.org>
17992
17993 * src/version.c: New file.
17994
17995 1993-03-25 Richard Stallman <rms@gnu.org>
17996
17997 * src/output.c: entered into RCS
17998
17999 1992-09-25 Richard Stallman <rms@gnu.org>
18000
18001 * configure.bat: entered into RCS
18002
18003 1992-06-22 Richard Stallman <rms@gnu.org>
18004
18005 * src/vmsgetargs.c: entered into RCS
18006
18007 1992-06-22 Richard Stallman <rms@gnu.org>
18008
18009 * doc/bison.rnh: entered into RCS
18010
18011 1992-04-20 David J. MacKenzie <djm@gnu.org>
18012
18013 * README: entered into RCS
18014
18015 1992-01-22 Richard Stallman <rms@gnu.org>
18016
18017 * src/machine.h: entered into RCS
18018
18019 1991-12-21 Richard Stallman <rms@gnu.org>
18020
18021 * src/lalr.c, src/closure.c:
18022 entered into RCS
18023
18024 1991-12-20 Richard Stallman <rms@gnu.org>
18025
18026 * src/state.h: entered into RCS
18027
18028 1991-12-18 Richard Stallman <rms@gnu.org>
18029
18030 * src/print.c, src/nullable.c, src/derives.c:
18031 entered into RCS
18032
18033 1991-11-03 David J. MacKenzie <djm@gnu.org>
18034
18035 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
18036 entered into RCS
18037
18038 1988-09-09 Richard Stallman <rms@gnu.org>
18039
18040 * src/bison.hairy: entered into RCS
18041
18042 1987-12-16 Richard Stallman <rms@gnu.org>
18043
18044 * REFERENCES: entered into RCS
18045
18046
18047 -----
18048
18049 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
18050 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
18051 Software Foundation, Inc.
18052
18053 Copying and distribution of this file, with or without
18054 modification, are permitted provided the copyright notice and this
18055 notice are preserved.
18056
18057 $Id$