]> git.saurik.com Git - bison.git/blame - ChangeLog
Encapsulate code properties and related functionality for the various
[bison.git] / ChangeLog
CommitLineData
76290368
JD
12006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Encapsulate code properties and related functionality for the various
4 destructors, printers, and actions into a code_props structure and
5 interface.
6 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
7 consistently initialize const structs that have an empty location field.
8 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
9 to ensure consistency.
10 * src/output.c (symbol_destructors_output, symbol_printers_output):
11 Replace with...
12 (symbol_code_props_output): ... this to eliminate duplicate code.
13 (output_skeleton): Update to use symbol_code_props_output.
14 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
15 Update all uses of translate_* functions to use the new code_props
16 interface and to use gram_scanner_last_string_free and
17 code_scanner_last_string_free where possible.
18 (grammar_declaration): symbol_list_destructor_set and
19 symbol_list_printer_set now perform the translation, so don't do it
20 here. Use gram_scanner_last_string_free where possible.
21 * src/reader.c: Update to use code_props interface for destructors and
22 rule actions.
23 * src/scan-code.h (code_props): New structure.
24 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
25 function, macro, and const global variable for initializing a
26 code_props with no code.
27 (code_props_plain_init, code_props_symbol_action_init,
28 code_props_rule_action_init, code_props_translate_code,
29 code_props_code_get, code_props_location_get,
30 code_props_is_value_used): The rest of the new code_props interface.
31 (translate_rule_action, translate_symbol_action, translate_code):
32 Remove as these are now just special cases within
33 code_props_translate_code, which is switched on the code_props kind.
34 (code_scanner_last_string_free): New function similar to
35 gram_scanner_last_string_free.
36 * src/scan-code.l: Implement the new interface.
37 (last_string): New static global similar to the one in scan-gram.l.
38 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
39 code_props since Bison will one day use this information for
40 destructors and printers.
41 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
42 (handle_action_dollar): Update to use the code_props interface of rule
43 actions. Use symbol_list_n_get and set is_value_used directly since
44 symbol_list_n_used_set is removed.
45 * src/symlist.h, src/symlist.c (symbol_list): Replace action,
46 action_location, and used members with a code_props member, and update
47 all uses.
48 (symbol_list_n_used_set): Remove since it would need to break the
49 encapsulation of code_props.
50 (symbol_list_destructor_set, symbol_list_printer_set): Perform code
51 translation here rather than depending on the caller to do so.
52 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
53 printer_location members and change the type of the destructor and
54 printer members to code_props.
55 (symbol_destructor_location_get, symbol_printer_location_get): Remove
56 unneeded.
57 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
58 symbol_printer_get, semantic_type_destructor_set,
59 semantic_type_printer_set, default_tagged_destructor_set,
60 default_tagless_destructor_set, default_tagged_printer_set,
61 default_tagless_printer_set): Use code_props in arguments and return
62 types in place of const char * and location.
63 * src/symtab.c: Update implementation for interface and struct changes.
64 (default_tagged_destructor_location,
65 default_tagless_destructor_location, default_tagged_printer_location,
66 default_tagless_printer_location): Remove since we...
67 (default_tagged_destructor, default_tagless_destructor,
68 default_tagged_printer, default_tagless_printer): ... change the type
69 of these to code_props.
70 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
71 code_props members.
72 (symbol_print): Use SYMBOL_CODE_PRINT.
73
74 * src/scan-gram.h (gram_last_string): Remove declaration.
75 * src/scan-gram.l (last_string): Declare it static.
76
07c39ae9
JD
772006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
78
405d53b7
JD
79 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
80 it was double-quoted.
07c39ae9
JD
81 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
82 grammar is maintained with Bison's highest standards.
83 * src/getargs.c: Fix some typos in Doxygen comments.
84
580b8926
JD
852006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
86
87 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
88 later. Reported by Paul Eggert in
89 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
90 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
91 * src/scan-code.l (translate_action): Don't bother invoking
92 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
93 (code_scanner_free): Instead of invoking
94 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
95 which frees more.
96 * src/scan-gram.l (gram_scanner_free): Likewise.
97 * src/scan-skel.l (scan_skel): Likewise.
98
4502eadc
JD
992006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
100
101 * src/files.c (tr): Change return type to void.
102 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
103 has been called previously for the same key.
104 (muscle_find): Return storage instead of value so that
105 --enable-gcc-warnings doesn't produce warnings that the return discards
106 const. aver that the value and storage are the same since storage
107 could potentially be NULL when value is not.
108 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
109 same as 0.
110
7746c8f6
PE
1112006-11-08 Paul Eggert <eggert@cs.ucla.edu>
112
113 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
114 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
115 us a slightly cleaner distribution, and also works.
116 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
117 gnulib changes.
118
eb095650
PE
1192006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
120 and Paul Eggert <eggert@cs.ucla.edu>
121
122 Don't let Bison leak memory except when it complains.
123 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
124 (spec_defines_file, dir_prefix): Now char *, not const char *,
125 since they are freed.
126 * src/files.c: Likewise.
127 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
128 Likewise.
129 (tr): Now operates in-place. All uses changed.
130 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
131 values.
132 (compute_file_name_parts, compute_output_file_names): Don't store
133 read-only data in variables that will be freed.
134 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
135 src_extension, and header_extension.
136 (output_file_names_free): New public function to free
137 spec_verbose_file, spec_graph_file, spec_defines_file,
138 parser_file_name, and dir_prefix.
139 * src/getargs.c (getargs): Don't store read-only data in variables that
140 will be freed.
141 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
142 (which previously existed but was unused), and quotearg_free.
143 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
144 * src/muscle_tab.c: Likewise.
145 (muscle_entry): Make the value char const *,
146 and add a new storage member that is char * and can be freed.
147 (muscle_entry_free): New private function.
148 (muscle_init): Use it instead of free.
149 (muscle_insert, muscle_grow): Update and use new storage member.
150 (muscle_code_grow): Free the string passed to muscle_grow
151 since it's not needed anymore.
152 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
153 add a new `char *code' member.
154 ("{...}"): Declare semantic type as code.
155 * src/scan-code.h (translate_rule_action):
156 (translate_symbol_action, translate_code, translate_action): Return
157 `char const *' rather than `char *' since external code should not free
158 these strings.
159 * src/scan-code.l: Likewise.
160 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
161 which is "{...}" in the parser.
162 * tests/Makefile.am (maintainer-check-valgrind): Set
163 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
164 Valgrind.
165 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
166 complain.
167 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
168 expecting a non-zero exit status sets --leak-check=summary and
169 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
170 this case, and we don't want to hear about it.
171
ac564be4
PE
1722006-11-08 Paul Eggert <eggert@cs.ucla.edu>
173
174 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
175 instead of from the template, to simplify configuration a bit.
176 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
177 and m4/wint_t.m4, as they are needed with the latest gnulib.
178
17bd8a73
JD
1792006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
180
181 Disable unset/unused mid-rule value warnings by default, and recognize
182 --warnings=midrule-values to enable them. Discussed starting at
183 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
184 * NEWS (2.3a+): Mention.
185 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
186 warnings): Add entry for midrule-values subargument.
187 * src/reader.c (symbol_should_be_used): Don't return true just because
188 the value is a set/used mid-rule value unless
189 --warnings=midrule-values was specified.
190 * tests/input.at (Unused values, Unused values before symbol
191 declarations): Run tests with and without --warnings=midrule-values.
192
193 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
194 than LIST_FREE directly.
195
89eb3c76
JD
1962006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
197
198 Finish implementing --warnings=error, which should not be implied by
199 --warnings=all (or by its synonyms -W and --warnings without
200 subarguments).
201 * src/complain.c (set_warning_issued): New function to report that
202 warnings are being treated as errors and to record an error if so.
203 Invoke...
204 (warn_at, warn): ... here.
205 * src/getargs.c (warnings_args, warnings_types): Reorder so that
206 "error - warnings are errors" does not appear above "all - all of the
207 above".
208 (getargs): For -W and --warnings without subarguments, don't let
209 FLAGS_ARGMATCH set warnings_error in warnings_flag.
210 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
211
ba7560e2
JD
2122006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
213
214 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
215 empty subargument list. For example: `bison --warnings= parser.y'.
216
31283fc3
JD
2172006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
218
219 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
220 the parser header file so that gcc doesn't warn.
221
12e35840
JD
2222006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
223
224 Split the default %destructor/%printer into two kinds: <*> and <!>.
225 Discussed starting at
226 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
227 * NEWS (2.3a+): Mention.
228 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
229 previous change today related to mid-rules.
230 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
231 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
232 (TYPE_TAG_ANY): Add as <*>.
233 (TYPE_TAG_NONE): Add as <!>.
234 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
235 for <*> and <!>.
236 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
237 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
238 * src/symlist.c (symbol_list_default_new): Split into tagged and
239 tagless versions.
240 (symbol_list_destructor_set, symbol_list_printer_set): Split
241 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
242 SYMLIST_DEFAULT_TAGLESS.
243 * src/symlist.h: Update symbol_list_default*_new prototypes.
244 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
245 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
246 * src/symtab.c (default_destructor, default_destructor_location,
247 default_printer, default_printer_location): Split each into tagged and
248 tagless versions.
249 (symbol_destructor_get, symbol_destructor_location_get,
250 symbol_printer_get, symbol_printer_location_get): Implement tagged
251 default and tagless default cases.
252 (default_destructor_set, default_printer_set): Split each into tagged
253 and tagless versions.
254 * src/symtab.h: Update prototypes.
255 * tests/actions.at (Default %printer and %destructor): Rename to...
256 (Default tagless %printer and %destructor): ... this, and extend.
257 (Per-type %printer and %destructor): Rename to...
258 (Default tagged and per-type %printer and %destructor): ... this, and
259 extend.
260 (Default %printer and %destructor for user-defined end token): Extend.
261 (Default %printer and %destructor are not for error or $undefined):
262 Update.
263 (Default %printer and %destructor are not for $accept): Update.
264 (Default %printer and %destructor for mid-rule values): Extend.
265 * tests/input.at (Default %printer and %destructor redeclared): Extend.
266 (Unused values with default %destructor): Extend.
267
f91b1629
JD
2682006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
269
270 Don't apply the default %destructor/%printer to an unreferenced midrule
271 value. Mentioned at
272 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
273 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
274 like $@n instead of just @n so that the default %destructor/%printer
275 logic doesn't see them as user-defined symbols.
276 (symbol_is_dummy): Check for both forms of the name.
277 * src/reader.c (packgram): Remove the `$' from each midrule symbol
278 name for which the midrule value is referenced in any action.
279 * tests/actions.at (Default %printer and %destructor for mid-rule
280 values): New test.
281 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
282 for change to dummy symbol names.
283
519d0004
JD
2842006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
285
286 Warn about unset midrule $$ if the corresponding $n is used.
287 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
288 $n usage.
289 (packgram): Before invoking grammar_rule_check on any rule, make sure
290 all actions have already been scanned in order to set `used' flags.
291 Otherwise, checking that a midrule's $$ is set will not always work
292 properly because the midrule check must forward-reference the midrule's
293 parent rule.
294 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
295 warning.
296
a501eca9
JD
2972006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
298
299 More improvements to the documentation of the prologue alternatives:
300 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
301 Bison manual.
302 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
303 some text to clarify the relative importance of the new directives and
304 to show how these directives may be viewed as code labels.
305
2cbe6b7f
JD
3062006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
307
308 Similar to the recently removed %before-header, add %code-top as the
309 alternative to the pre-prologue. Mentioned at
310 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
311 Also, let the prologue alternatives appear in the grammar section.
312 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
313 (prologue_declaration): Move the existing prologue alternatives to...
314 (grammar_declaration): ... here and add %code-top.
315 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
316
317 Clean up and extend documentation for the prologue alternatives.
318 * NEWS (2.3a+): Describe prologue alternatives.
319 * doc/bison.texinfo (Prologue): Move discussion of prologue
320 alternatives to...
321 (Prologue Alternatives): ... this new section, and extend it to discuss
322 all 4 directives in detail.
323 (Bison Symbols): Clean up discussion of prologue alternatives and add
324 %code-top.
325
e557d3ea
JMG
3262006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
327
328 DJGPP specific issues.
329
330 * djgpp/config.bat: config.hin has been moved to lib. Adjust
331 config.bat accordingly.
332 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
333 * djgpp/config.site: Likewise.
334
136a0f76
PB
3352006-10-16 Paolo Bonzini <bonzini@gnu.org>
336
27bd5d67
PB
337 Replace %*-header with %provides, %requires, %code. See discussion at
338 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
339
136a0f76
PB
340 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
341 (b4_user_start_header): Remove.
342 * data/glr.c: Use new macros instead of b4_*start_header
343 and b4_*end_header.
344 * data/glr.cc: Likewise.
345 * data/lalr1.cc: Likewise.
346 * data/push.c: Likewise.
347 * data/yacc.c: Likewise.
348
349 * doc/bison.texinfo: Remove %before-header, rename
350 %{start,end,after}-header to %requires, %provides, %code.
351
352 * src/parse-gram.y: Likewise (also rename token names accordingly).
353 * src/scan-gram.l: Likewise.
354 * tests/actions.at: Likewise.
355
10f429ef
PE
3562006-10-14 Paul Eggert <eggert@cs.ucla.edu>
357
358 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
359 Problem reported by Joel E. Denny.
360
3612006-10-14 Jim Meyering <jim@meyering.net>
362
363 (Sync from coreutils.)
364 Work also when the working directory (with e.g. coreutils sources)
365 is version controlled with git, rather than CVS.
366 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
367 rather than CVS.
368 In messages and comments, say e.g., "checked-out sources",
369 rather than "CVS sources".
370 (version_controlled_file): New function. Work for git as well as
371 for CVS. Don't use grep's -q option.
372 (slurp): Call it here, in place of CVS-specific code.
373
c4bd5bf7
JD
3742006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
375
376 Fix testsuite for ./configure --enable-gcc-warnings:
377 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
378 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
379 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
380 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
381 * test/regression.at (Diagnostic that expects two alternatives):
382 Likewise.
383
46356ea4
PE
3842006-10-12 Paul Eggert <eggert@cs.ucla.edu>
385
231ed89a
PE
386 * bootstrap.conf (gnulib_modules): Add config-h.
387 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
388 worry about HAVE_CONFIG_H.
389 * lib/abitset.c: Likewise.
390 * lib/bitset.c: Likewise.
391 * lib/bitset_stats.c: Likewise.
392 * lib/bitsetv-print.c: Likewise.
393 * lib/bitsetv.c: Likewise.
394 * lib/ebitset.c: Likewise.
395 * lib/get-errno.c: Likewise.
396 * lib/lbitset.c: Likewise.
397 * lib/subpipe.c: Likewise.
398 * lib/timevar.c: Likewise.
399 * lib/vbitset.c: Likewise.
400 * lib/bitset.c: Include "bitset.h" first, to test interface.
401 * lib/bitset_stats.c: Include "bitset_stats.h" first.
402 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
403 * lib/bitsetv.c: Include "bitsetv.h" first.
404 * lib/get-errno.c: Include "get-errno.h" first.
405 * m4/.cvsignore: Add config-h.m4.
406 * tests/actions.at (Default %printer and %destructor for ...):
407 Adjust expected line numbers in output to reflect removal of #if
408 HAVE_CONFIG_H lines.
409 * tests/glr-regression.at (Missed %merge type warnings when ...):
410 Likewise.
411 * tests/regression.at (Braced code in declaration in rules section):
412 Likewise.
413 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
414 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
415 Include <config.h> unconditionally.
416
46356ea4
PE
417 * bootstrap: Sync from coreutils, as follows:
418
419 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
420
421 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
422 variable was sometimes used without being initialized. This
423 messed up the installation of the INSTALL file in some cases.
424
425 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
426
427 * bootstrap (usage, main program, symlink_to_gnulib): Add option
428 --copy. Inspired by a suggestion from Bruno Haible.
429
430 2006-10-03 Jim Meyering <jim@meyering.net>
431
432 * bootstrap: Undo last change to this file, since now gnulib-tool
433 sticks with the automake default in generating dependencies.
434
dd4bf078
PE
4352006-10-12 Paul Eggert <eggert@cs.ucla.edu>
436
cf2a5f7c
PE
437 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
438 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
439
440 * doc/bison.1: Add copyright notice.
441
442 * data/glr.c: Don't include <stdarg.h>; not used.
443
35fe0834
PE
444 * NEWS: The -g and --graph options now output graphs in Graphviz
445 DOT format, not VCG format.
446 * doc/bison.1: Likewise.
447 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
448 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
449 of this change in
450 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
451 * TODO: Remove Graphviz entry.
452 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
453 remove vcg.c, vcg.h, vcg_defaults.h.
454 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
455 * src/graphviz.c, src/graphviz.h: New files.
456 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
457 * src/files.h: Make comment more generic.
458 * src/main.c (main): Likewise.
459 * src/print_graph.h: Likewise.
460 * src/getargs.c (usage): Make usage description more generic.
461 * src/print_graph.c: Include graphviz.h rather than vcg.h.
462 (static_graph, fgraph): Remove. All uses changed to pass
463 arguments instead of sharing a static var.
464 (print_core, print_actions, print_state, print_graph):
465 Output graphviz format rather than VCG format.
466 * tests/.cvsignore: Remove *.vcg; add *.dot.
467 * tests/output.at: Expect *.dot files, not *.vcg files.
468
dd4bf078
PE
469 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
470 accommodates the 2006-10-08 change.
471
efdd7421
PE
4722006-10-11 Bob Rossi <bob@brasko.net>
473
474 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
475 (b4_yyssa, b4_yyerror_range): New macros.
476 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
477 (yypvarsinit): Remove init of removed fields.
478 (yypushparse): Remove use of removed fields; use new macros instead.
479
96a1981a
PE
4802006-10-11 Paul Eggert <eggert@cs.ucla.edu>
481
482 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
483 in a push parser. Reindent slightly to match yacc.c better.
484
4852006-10-11 Bob Rossi <bob@brasko.net>
486
46356ea4
PE
487 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
488 yymsg_alloc fields.
489 (yypvarsinit, yypushparse): Remove init of removed fields.
490 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 491
c1630a8b
PE
4922006-10-09 Paul Eggert <eggert@cs.ucla.edu>
493
494 * THANKS: Add Paolo Bonzini and Bob Rossi.
495
90b9908d
PB
4962006-10-08 Paolo Bonzini <bonzini@gnu.org>
497
498 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
499 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
500 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
501 b4_define_user_cde and uses): Remove.
502 (b4_comment, b4_prefix, b4_sync_start): New.
503 * data/bison.m4: New file, with most of the content removed from c.m4.
504 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
505 * src/output.c (output_skeleton): Pass bison.m4.
506 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
507 only if specified.
508
cf806753
PE
5092006-10-05 Paul Eggert <eggert@cs.ucla.edu>
510
511 Fix test failure reported by Tom Lane in
512 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
513 and try to make such failures easier to catch in the future.
514 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
515 that's now the caller's responsibility.
516 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
517 Set yychar = YYEOF if it's negative.
518 * tests/actions.at (yylex): Abort if asked to read past EOF.
519 * tests/conflicts.at (yylex): Likewise.
520 * tests/cxx-type.at (yylex): Likewise.
521 * tests/glr-regression.at (yylex): Likewise.
522 * tests/input.at (yylex): Likewise.
523 * tests/regression.at (yylex): Likewise.
524 * tests/torture.at (yylex): Likewise.
525
0e2f006a
PE
5262006-10-01 Paul Eggert <eggert@cs.ucla.edu>
527
528 Fix problems with translating English-language diagnostics.
529 * bootstrap: Fix bug introduced in recent bootstrap changes, with
530 respect to bison-runtime pot generation. The YY_ stuff
531 wasn't being captured.
532 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
533 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
534 * runtime-po/POTFILES.in: Add data/push.c.
535
e3ddc1e3
PE
5362006-09-29 Paul Eggert <eggert@cs.ucla.edu>
537
538 Merge bootstrap changes from coreutils.
539
540 2006-09-28 Jim Meyering <jim@meyering.net>
541
542 Automatically generated dependencies are important even
543 when all of the sources in a directory come from gnulib.
544 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
545 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
546
547 2006-09-23 Jim Meyering <jim@meyering.net>
548
549 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
550
551 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
552
553 * bootstrap: Add support for --force.
554 (usage): New function. Describe usage less tersely.
555 (CVS_only_file): New var.
556
01e972b3
PE
5572006-09-21 Paul Eggert <eggert@cs.ucla.edu>
558
559 * data/push.c (YYPUSH_MORE): Make it an enum instead.
560 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
561 Adjust white space and comments to match GNU style better.
562
c63d3e90
PE
5632006-09-20 Bob Rossi <bob@brasko.net>
564
565 * data/push.c (yyresult_get): Remove function.
566 (YYPUSH_MORE): Add #define.
567 (yypushparse): Modify return value.
568
e70f46d1
PE
5692006-09-20 Paul Eggert <eggert@cs.ucla.edu>
570
571 * stamp-h.in: Remove; no longer needed.
572 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
573 Remove config.h, config.hin, intl (no longer created).
574 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
575 stamp-h1.
576
577 Sync bootstrap from coreutils, as follows:
578
579 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
580
581 * bootstrap (symlink_to_gnulib): New function.
582 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
583 to copies-of-gnulib.
584 (cp_mark_as_generated, slurp, gnulib_files):
585 Avoid making a copy if it's the same as the old version.
586 (gnulib_files): Add support for this variable (used by Bison).
587
a92be413
PE
5882006-09-20 Paul Eggert <eggert@cs.ucla.edu>
589
590 * src/getargs.c (usage): Rework to use conventions similar to
591 coreutils, to make translation a bit easier and the code a bit
592 smaller. Problem reported by Tim Van Holder.
593
4f82b42a
PE
5942006-09-15 Paul Eggert <eggert@cs.ucla.edu>
595
3b2942e6
PE
596 Use some of gnulib's new modules, taken from coreutils.
597
598 * bootstrap: Sync from coreutils, except add support for gnulib_files.
599 * bootstrap.conf: New file.
600 (gnulib_modules): Add configmake, inttypes, unistd.
601 (XGETTEXT_OPTIONS): Add complain, complain_at,
602 fatal, fatal_at, warn, warn_at, unexpected_end.
603 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
604 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
605 (gl_EARLY): Add.
606 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
607 (gl_INIT): Add
608 (GNULIB_AUTOCONF_SNIPPET): Remove.
609 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
610 the pickiest.
611 * lib/.cvsignore: Add inttypes_.h.
612 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
613 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
614 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
615 no-longer-necessary initializations.
616 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
617 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
618 use the unistd module.
619 * src/system.h: Likewise.
620 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
621 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
622 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
623 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
624 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
625 * src/system.h: Include inttypes.h unconditionally, now that we
626 use the inttypes module. Don't bother to include stdint.h, since
627 inttypes.h now does that for us.
628 (LOCALEDIR): Remove, now that we use the configmake module.
629 * src/getargs.c: Include configmake.h.
630 * src/main.c: Likewise.
631 * src/output.c: Likewise.
632 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
633 not from $abs_top_builddir, since config.h moved.
634
635
4f82b42a
PE
636 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
637 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
638
639 * src/parse-gram.y (symbol_declaration): Don't put statements
640 before declarations; it's not portable to C89.
641 * src/scan-code.l (handle_action_at): Likewise.
642
643 * src/scan-code.l: Always initialize braces_level; the old code
644 left it uninitialized and therefore had undefined behavior.
645
646 Don't attempt to redefine 'assert', since it runs afoul of
647 systems where standard headers (mistakenly) include <assert.h>.
648 Instead, define and use our own alternative, called 'aver'.
649 * src/reader.c: Don't include assert.h, since we no longer
650 use assert.
651 * src/scan-code.l: Likewise.
652 * src/system.h (assert): Remove, replacing with....
653 (aver): New function, taking a bool arg. All uses changed.
654 * src/tables.c (pack_vector): Ensure that aver arg is bool,
655 not merely an integer.
656
31c10e38
PE
6572006-09-15 Bob Rossi <bob@brasko.net>
658
659 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
660 * data/c.m4 (YYPUSH): New.
661 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
662 * src/getargs.c (push_parser): New var.
663 * src/getargs.h (push_parser): New declaration.
664 * src/output.c (prepare): Add macro insertion of `push_flag'.
665 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
666 (prologue_declaration): Parse %push-parser.
667 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
668 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
669 list of removed lines from the traces observed.
670 (AT_CHECK_CALC_LALR): Added push parser tests.
671
fa7b79c0
PE
6722006-09-13 Paul Eggert <eggert@cs.ucla.edu>
673
21fe08ca
PE
674 * NEWS: Version 2.3a.
675 * configure.ac (AC_INIT): Likewise.
676
e8ec4d9b
PE
677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
678 "#define YYSTYPE int" that caused "make maintainer-check" to fail
679 due to header ordering dependencies. I don't know why the #define
680 was there.
681
fa7b79c0
PE
682 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
683 runtime cost when YYDEBUG is not defined, and so that some tests
684 that used to fail now work. Problem and initial suggestion by
685 Paolo Bonzini.
686 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
687 * data/glr.cc (b4_parser_class_name):
688 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
689 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
690 (yydebug_) [YYDEBUG]: New member.
691 (yycdebug_): Now defined only if YYDEBUG.
692 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
693 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
694 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
695 if YYYDEBUG.
696 (debug_stream, set_debug_stream, debug_level, set_debug_level):
697 Define only if YYDEBUG.
698 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
699 set_debug_level.
700 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
701 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
702 AT_CHECK_CALC_GLR_CC that are working now.
703
4ec13d60
PE
7042006-09-12 Paul Eggert <eggert@cs.ucla.edu>
705
706 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
707 We don't need them in glr.cc, and glr.c defines them.
708 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
709 assumes that defining it to anything is the same as defining
710 it to 1. Problem reported by Paolo Bonzini.
711
8e1687ae
PE
7122006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
713
714 * data/c.m4 (b4_null, b4_case): Define.
715 * src/output.c (prepare_symbols): Use b4_null.
716 (user_actions_output): Use b4_case.
717
3dc5e96b
PE
7182006-09-11 Paul Eggert <eggert@cs.ucla.edu>
719
aef3da86
PE
720 * data/glr.c (b4_shared_declarations): Put start-header first,
721 before any #includes that we generate, so that feature-test
722 macros work. Problem reported by Michael Deutschmann in
723 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
724 * data/lalr1.cc: Likewise.
725 * doc/bison.texinfo (Prologue): Document that feature-test macros
726 should be defined before any Bison declarations.
727 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
728 that depend on location.hh after, not before, Bison decls, since
729 we now include location.hh after the first user prologue.
730
3dc5e96b
PE
731 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
732 Sander Brandenburg in
733 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
734 Also, fix minor white space and comment issues.
aef3da86
PE
735 (Prologue): Mention that it's better to define feature-test macros
736 before Bison declarations. Problem reported by Michael Deutschmann.
737
738 * README-cvs: Fix typo: "&" should be "&&". Problem reported
739 by Jim Meyering.
740 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
741 This adjusts to recent gnulib changes.
3dc5e96b 742
b2a0b7ca
JD
7432006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
744
745 Finish implementation of per-type %destructor/%printer. Discussed
746 starting at
747 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
748 and
749 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
750 * NEWS (2.3+): Add a description of this feature to the default
751 %destructor/%printer description.
752 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
753 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
754 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
755 list node contains a semantic type.
756 * src/symtab.c, src/symtab.h: Extend with a table that associates
757 semantic types with their %destructor's and %printer's.
758 (semantic_type_from_uniqstr, semantic_type_get,
759 semantic_type_destructor_set, semantic_type_printer_set): New functions
760 composing the public interface of that table.
761 (symbol_destructor_get, symbol_destructor_location_get,
762 symbol_printer_get, symbol_printer_location_get): If there's no
763 per-symbol %destructor/%printer, look up the per-type before trying
764 the default.
765 * tests/actions.at (Per-type %printer and %destructor): New test case.
766 * tests/input.at (Default %printer and %destructor redeclared):
767 Extend to check that multiple occurrences of %symbol-default in a
768 single %destructor/%printer declaration is an error.
769 (Per-type %printer and %destructor redeclared, Unused values with
770 per-type %destructor): New test cases.
771
3be03b13
JD
7722006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
773
774 Require default %destructor/%printer to be declared using
775 %symbol-default instead of an empty symbol list, and start working on
776 new per-type %destructor/%printer. Discussed at
777 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
778 * NEWS (2.3+): Add %symbol-default to example.
779 * bison.texinfo (Freeing Discarded Symbols): Likewise.
780 (Bison Symbols): Add entry for %symbol-default.
781 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
782 (generic_symlist, generic_symlist_item): New nonterminals for creating
783 a list in which each item is a symbol, semantic type, or
784 %symbol-default.
785 (grammar_declaration): Use generic_symlist in %destructor and %printer
786 declarations instead of symbols.1 or an empty list.
787 (symbol_declaration, precedence_declaration, symbols.1): Update actions
788 for changes to symbol_list.
789 * src/reader.c: Update for changes to symbol_list.
790 * src/scan-code.l: Likewise.
791 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
792 * src/symlist.c, src/symlist.h: Extend such that a list node may
793 represent a semantic type or a %symbol-default in addition to just an
794 ordinary symbol. Add switched functions for setting %destructor's and
795 %printer's.
796 * tests/actions.at, tests/input.at: Add %symbol-default to all default
797 %destructor/%printer declarations.
798
3508ce36
JD
7992006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
800
801 Whether the default %destructor/%printer applies to a particular symbol
802 isn't a question of whether the user *declares* that symbol (in %token,
803 for example). It's a question of whether the user by any means
804 *defines* the symbol at all (by simply using a char token, for
805 example). $end is defined by Bison whereas any other token with token
806 number 0 is defined by the user. The error token is always defined by
807 Bison regardless of whether the user declares it with %token, but we
808 may one day let the user define error as a nonterminal instead.
809 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
810 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
811 the meaning of "user-defined".
812 * tests/actions.at (Default %printer and %destructor for user-declared
813 end token): Rename to...
814 (Default %printer and %destructor for user-defined end token): ...
815 this.
816
817 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
818 computation of whether to apply the default, don't maintain a list of
819 every Bison-defined symbol. Instead, just check for a first character
820 of '$', which a user symbol cannot have, and check for the error token.
821
9350499c
JD
8222006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
823
824 Don't apply the default %destructor or %printer to the error token,
825 $undefined, or $accept. This change fits the general rule that the
826 default %destructor and %printer are only for user-declared symbols,
827 and it solves several difficulties that are described in the new test
828 cases listed below.
829 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
830 * tests/actions.at (Default %printer and %destructor are not for error
831 or $undefined, Default %printer and %destructor are not for $accept):
832 New test cases.
833
4d7370cb
JD
8342006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
835
836 Allow %start after the first rule.
837 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
838 when parsing the first rule.
839 (check_and_convert_grammar): Search for it here after all grammar
840 declarations have been parsed. Skip midrules, which have dummy LHS
841 nonterminals.
842 * src/symtab.c (symbol_is_dummy): New function.
843 * src/symtab.h (symbol_is_dummy): Declare it.
844 * tests/input.at (%start after first rule): New test.
845
6d0ef4ec
JD
8462006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
847
848 Redo some of the previous commit: add back the ability to use
849 non-aliased/undeclared string literals since it might be useful to
850 those declaring %token-table.
851 * src/reader.c (check_and_convert_grammar): Undo changes in previous
852 commit: don't worry about complaints from symbols_pack.
853 * src/symtab.c (symbol_new, symbol_class_set,
854 symbol_check_alias_consistency): Undo changes in previous commit: count
855 each string literal as a new symbol and token, assign it a symbol
856 number, and don't complain about non-aliased string literals.
857 (symbols_pack): Since symbol_make_alias still does not decrement symbol
858 and token counts but does still set aliased tokens to the same number,
859 symbol_pack_processor now leaves empty slots in the symbols array.
860 Remove those slots.
861 * tests/regression.at (Undeclared string literal): Remove test case
862 added in previous commit since non-aliased string literals are allowed
863 again.
864 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
865 remove unnecessary string literal declarations.
866 * tests/sets.at (Firsts): Likewise.
867
965537bc
JD
8682006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
869
870 Don't allow an undeclared string literal, but allow a string literal to
871 be used before its declaration.
872 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
873 symbols_pack complained.
874 * src/symtab.c (symbol_new): Don't count a string literal as a new
875 symbol.
876 (symbol_class_set): Don't count a string literal as a new token, and
877 don't assign it a symbol number since symbol_make_alias does that.
878 (symbol_make_alias): It's not necessary to decrement the symbol and
879 token counts anymore. Don't assume that an alias declaration occurs
880 before any uses of the identifier or string, and thus don't assert that
881 one of them has the highest symbol number so far.
882 (symbol_check_alias_consistency): Complain if there's a string literal
883 that wasn't declared as an alias.
884 (symbols_pack): Bail if symbol_check_alias_consistency failed since
885 symbol_pack asserts that every token has been assigned a symbol number
886 although undeclared string literals have not.
887 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 888 string literal): New test cases.
965537bc
JD
889 (Characters Escapes, Web2c Actions): Declare string literals as
890 aliases.
891 * tests/sets.at (Firsts): Likewise.
892
47aee066
JD
8932006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
894
895 In the grammar scanner, STRING_FINISH unclosed constructs and return
896 them to the parser in order to improve error messages.
897 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
898 SC_BRACED_CODE, SC_PROLOGUE): Implement.
899 * tests/input.at (Unclosed constructs): New test case.
900 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
901 seen.
902
903 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
904 unused global.
905
1f6b3679
JD
9062006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
907
908 Handle string aliases for character tokens correctly.
909 * src/symtab.c (symbol_user_token_number_set): If the token has an
910 alias, check and set its alias's user token number instead of its own,
911 which is set to indicate the alias. Previously, every occurrence of
912 the character token in the grammar overwrote that alias indicator with
913 the character code.
914 * tests/input.at (String aliases for character tokens): New test.
915
219741d8
JD
9162006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
917
918 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
919
11daa4e7
PE
9202006-08-11 Paul Eggert <eggert@cs.ucla.edu>
921
922 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
923 to prevent failures when building on older platforms.
924 Check for autopoint failure.
925 Set XGETTEXT_OPTIONS to values that check for C format strings,
926 so that translators are warned about them (this also helps
927 prevent core dumps).
928
929 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
930 function, since it simplifies our code a bit.
931
932 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
933 rather than -W, so we don't get bogus warnings about sign comparisons.
934 Add -Wpointer-arith, since that warning is useful (it reports code
935 that does not conform to C89 and that some compilers reject).
936 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
937 since it's no longer needed.
938
f9bfc42a
JD
9392006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
940
941 Clean up scanners a bit.
942 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
943 definitions so gcc won't warn when obstack_for_string is unused.
944 * src/scan-code.l: config.h and system.h are already #include'd by
945 scan-code-c.c, so get rid of them here.
946 * src/scan-gram.l: Likewise.
947 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
948 definitions rather than duplicating the rest of it.
949 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
950
06e8700a
JD
9512006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
952
953 Suppress signed/unsigned comparison warnings for yycheck.
954 * data/c.m4 (b4_safest_int_type): New macro.
955 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
956 a signed int type, cast it to b4_safest_int_type first.
957 * data/yacc.c: Likewise.
958 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
959 also overwritten.
960
9c437126
PE
9612006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
962
963 * doc/bison.texinfo: Fix some typos.
964
284d8a13
PE
9652006-08-02 Paul Eggert <eggert@cs.ucla.edu>
966
967 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
968 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
969
970 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
971 the latest gnulib does this a different way.
972 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
973 translation was patched, so stop omitting it.
974
ec5479ce
JD
9752006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
976
977 Enable declaration of default %printer/%destructor. Make the parser
978 use these for all user-declared grammar symbols for which the user does
979 not declare a specific %printer/%destructor. Thus, the parser uses it
980 for token 0 if the user declares it but not if Bison generates it as
981 $end. Discussed starting at
982 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
983 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
984 and
985 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
986 * NEWS (2.3+): Mention.
987 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
988 declare a %destructor for a mid-rule's semantic value. It's just
989 impossible to declare one specific to it.
990 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
991 code. Describe default %destructor form.
992 * src/parse-gram.y (grammar_declaration): Parse default
993 %printer/%destructor declarations.
994 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
995 and symbol_destructor_location_get rather than accessing the destructor
996 and destructor_location members of struct symbol.
997 (symbol_printers_output): Likewise but for %printer's.
998 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
999 again.
1000 * src/symtab.c (default_destructor, default_destructor_location,
1001 default_printer, default_printer_location): New static global
1002 variables to record the default %destructor and %printer.
1003 (symbol_destructor_get, symbol_destructor_location_get,
1004 symbol_printer_get, symbol_printer_location_get): New functions to
1005 compute the appropriate %destructor and %printer for a symbol.
1006 (default_destructor_set, default_printer_set): New functions to set the
1007 default %destructor and %printer.
1008 * src/symtab.h: Prototype all those new functions.
1009 * tests/actions.at (Default %printer and %destructor): New test to
1010 check that the right %printer and %destructor are called, that they're
1011 not called for $end, and that $$ and @$ work correctly.
1012 (Default %printer and %destructor for user-declared end token): New
1013 test to check that the default %printer and %destructor are called for
1014 a user-declared end token.
1015 * tests/input.at (Default %printer and %destructor redeclared, Unused
1016 values with default %destructor): New tests to check related grammar
1017 warnings and errors.
1018
868d2d96
JD
10192006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1020
1021 Clean up handling of %destructor for the end token (token 0).
1022 Discussed starting at
1023 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1024 and
1025 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1026
1027 Make the skeletons consistent in how they pop the end token and invoke
1028 its %destructor.
1029 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1030 state, which has token number 0, since this would invoke the
1031 %destructor for the end token.
1032 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1033 until after shifting the end token, or else it won't be popped.
1034 * data/yacc.c (yyparse): Likewise.
1035
1036 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1037 it's the end token. Upon termination, destroy an unshifted lookahead
1038 even when it's the end token.
1039 * data/lalr1.cc (yy::parser::parse): Likewise.
1040 * data/yacc.c (yyparse): Likewise.
1041
1042 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1043 value warnings for the end token when the user gives the end token a
1044 %destructor.
1045
1046 * tests/actions.at (Printers and Destructors): Test all the above.
1047
62a9592d
PE
10482006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1049
1050 Update to latest gnulib and gettext versions.
1051 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1052 Add fopen-safer.
1053 (gnulib_files): Add m4/warning.m4. Don't worry about files
1054 overwritten by autopoint.
1055 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1056 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1057 rejects them.
1058 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1059 so that we can remove the intl files at a better time.
1060 (intl_files_to_remove): Remove aclocal.m4, since it gets
1061 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
1062 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
1063 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
1064 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
1065 Remove datarootdir hack; no longer needed.
1066 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
1067 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
1068 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
1069 strdup.h.
1070 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
1071 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
1072
10d6970f
PE
10732006-07-20 Paul Eggert <eggert@cs.ucla.edu>
1074
1075 * bootstrap: Adjust to today's change to gnulib-tool by invoking
1076 it with --assume-autoconf='latest-stable'.
1077
50a33993
JD
10782006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
1079
1080 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
1081 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
1082 YYSTYPE' and `{'.
1083 * src/muscle_tab.h (muscle_grow): Replace the header comments with
1084 those from muscle_tab.c since the old ones are misleading.
1085
2ce4ed68
AD
10862006-07-13 Akim Demaille <akim@epita.fr>
1087
1088 Support %define "KEY" {VALUE}.
1089 * src/scan-code.h, src/scan-code.l (translate_action)
1090 (translate_rule_action, translate_symbol_action, translate_code):
1091 Return char *, not const char *.
1092 * src/parse-gram.y (declaration): Rename as...
1093 (prologue_declaration): this.
1094 (string_content): Remove this nonterminal, use STRING.
1095 (braceless, content, content.opt): New nonterminal.
1096 Use them.
1097 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
1098 as value.
1099 * src/scan-gram.l (getargs.h): Don't include it.
1100
db7e5eb5
PE
11012006-07-12 Paul Eggert <eggert@cs.ucla.edu>
1102
1103 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
1104 rather than a for-loop that declares a local bool variable. This
1105 should work around a compatibility problem with a Cray x1e C++
1106 compiler reported by Hung Nguyen in
1107 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
1108 The for-loop was introduced in the 2004-11-17 change but I don't
1109 know why it was needed.
1110
a5d80ba5
AD
11112006-07-12 Akim Demaille <akim@epita.fr>
1112
1113 * data/c.m4: Comment changes.
1114
23eb2a69
AD
11152006-07-10 Akim Demaille <akim@lrde.epita.fr>
1116
1117 * src/complain.c (error_message, ERROR_MESSAGE): New.
1118 To factor...
1119 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
1120 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
1121
ddc8ede1
PE
11222006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1123
1124 * NEWS: Instead of %union, you can define and use your own union type
1125 YYSTYPE if your grammar contains at least one <type> tag.
1126 Your YYSTYPE need not be a macro; it can be a typedef.
1127 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
1128 (Union Decl, Decl Summary): Document this.
1129 * data/glr.c (YYSTYPE): Implement this.
1130 * data/glr.cc (YYSTYPE): Likewise.
1131 * data/lalr1.cc (YYSTYPE): Likewise.
1132 * data/yacc.c (YYSTYPE): Likewise.
1133 * src/output.c (prepare): Output tag_seen_flag.
1134 * src/parse-gram.y (declaration, grammar_declaration):
1135 Use 'union_seen' rather than 'typed' to determine whether
1136 %union has been seen, since grammars can now be typed without
1137 %union.
1138 (symbol_declaration, type.opt, symbol_def):
1139 Keep track of whether a tag has been seen.
1140 * src/reader.c (union_seen, tag_seen): New vars.
1141 (typed): remove.
1142 * src/reader.h (union_seen, tag_seen, typed): Likewise.
1143 * src/scan-code.l (untyped_var_seen): New variable.
1144 (handle_action_dollar): Adjust to above changes.
1145 (handle_action_dollar, handle_action_at):
1146 Improve overflow checking for outlandish numbers.
1147 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
1148 avoid new diagnostics generated by above changes.
1149 * tests/regression.at (YYSTYPE typedef): Add test to check
1150 for type tags without %union.
1151
1152 * src/symlist.c (symbol_list_length): Return int, not unsigned
1153 int, since callers expect int. This may need to get revisited
1154 once we have proper integer overflow checking.
1155
1156 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
1157 object is now static.
1158
1159 * src/getargs.c (flags_argmatch): Return void, not int,
1160 to pacify ./configure --enable-gcc-warnings.
1161
1162 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
1163 since last_string is already defined to FLEX_PREFIX (last_string).
1164
7b42569e
AD
11652006-07-09 Akim Demaille <akim@lrde.epita.fr>
1166
1167 Implement --warnings/-W.
1168 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
1169 replaced by...
1170 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
1171 Adjust callers.
1172 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
1173 (warnings_args, warnings_types): New.
1174 (getargs, short_options, long_options): Accept -W/--warnings.
1175 Sort the options by alphabetical order, upper case letter right
1176 before its lower case.
1177
3b452f4e
JD
11782006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1179
1180 Change %merge result type clash warnings to errors. Discussed at
1181 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
1182 * src/reader.c (record_merge_function_type): Use complain_at.
1183 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1184 declared later): Update test case results.
1185
b8a41559
AD
11862006-07-09 Akim Demaille <akim@lrde.epita.fr>
1187
1188 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
1189 to be in alphabetical order.
1190 (trace_args): Spelling fixes.
1191
cd9e1ba2
PE
11922006-07-09 Paul Eggert <eggert@cs.ucla.edu>
1193
1194 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
1195 so they don't collide with user-defined macros.
1196 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
1197 this was never guaranteed, and now that we're using gnulib stdint,
1198 which defines int_fast16_t to long int, the problem is exposed.
1199
cb48f191
PE
12002006-07-08 Paul Eggert <eggert@cs.ucla.edu>
1201
b8445a15
PE
1202 * data/c.m4 (b4_basename): Simplify a bit, since we don't
1203 need the full POSIX semantics (and weren't implementing them
1204 anyway).
1205
cb48f191
PE
1206 Adjust to Autoconf 2.60 and today's gnulib.
1207 * bootstrap (gnulib_modules): Add stdint.
1208 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
1209 no longer copies it.
1210 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
1211 since stdint needs the former and wcwidth (which is now required
1212 by mbswidth) needs the latter.
1213 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
1214 work around a compatibility glitch between gettext 0.14.6 and
1215 Autoconf 2.60.
1216 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
1217 Do not check for uintptr_t, since new stdint module does the right
1218 thing.
1219 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
1220 Add stdint.h, stdint_.h, wcwidth.h.
1221 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1222 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1223 stdint.m4, wchar_t.m4, wcwidth.m4.
1224 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1225 usual order for ../lib/*.h files.
1226 (file_name_split): Use last_component, not base_name, to adjust
1227 to gnulib changes.
1228 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1229 for ../lib/*.h files.
1230 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1231 Define unconditionally, since we now assume the stdint module.
1232 * src/scan-skel.l: Include <dirname.h>.
1233 (BASE_QPUTS): Use last_component, not base_name.
1234 * src/system.h: Include <unlocked-io.h> in the usual order
1235 for ../lib/*.h files. Include <stdint.h> unconditionally,
1236 since we now use the stdint module.
1237 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1238 HAVE_UINTPTR_T, since we now use the stdint module.
1239 (base_name): Remove decl, since files now include <dirname.h>
1240 to get the decl.
1241
cd48d21d
AD
12422006-07-08 Akim Demaille <akim@lrde.epita.fr>
1243
1244 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1245 New, default to 1.
1246 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1247 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1248 default.
1249 * tests/calc.at: Adjust.
1250
8ec0a172
AD
12512006-07-08 Akim Demaille <akim@lrde.epita.fr>
1252
b8445a15 1253 * data/c.m4 (b4_basename): New.
8ec0a172
AD
1254 (b4_syncline): Also output the location of its invocation (from
1255 the skeleton).
1256 (b4_user_action, b4_define_user_action, b4_user_actions)
1257 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1258 (b4_user_stype): New.
1259 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1260
4a678af8
JD
12612006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1262
1263 In the grammar file, the first column is 1 not 0 on the first line as
1264 on every other line.
1265 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1266 * tests/input.at (Torturing the Scanner): Update output.
1267
1268 * src/scan-gram.l (scanner_cursor): Declare it static.
1269
dd60572a
JD
12702006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1271
1272 In warnings, say "previous declaration" rather than "first
1273 declaration".
1274 * src/symtab.c (redeclaration): Do that here.
1275 * src/reader.c (record_merge_function_type): In the case of a result
1276 type clash, report the previous declaration rather than the very first
1277 one in the grammar file.
1278 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1279 declared later): Add a third declaration to check this behavior.
1280 * tests/input.at (Incompatible Aliases): Update output.
1281
2073e1b6
AD
12822006-06-27 Akim Demaille <akim@epita.fr>
1283
1284 * doc/Doxyfile.in: New.
1285 * doc/Makefile.am: Use it.
1286 * src/lalr.h, src/symtab.h: Initial doxygenation.
1287
8ee5b538
JD
12882006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1289
1290 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
1291 declared after the %merge. This continues the effort of the previous
1292 patch.
8ee5b538
JD
1293 * src/reader.c (get_merge_function): Don't set the merger type yet.
1294 (record_merge_function_type): New function for setting the merger type
1295 and checking for clashes.
1296 (grammar_current_rule_merge_set): Set the location of the %merge for
1297 the current rule.
1298 (packgram): Invoke record_merge_function_type for each rule now that
1299 all symbol type declarations have been parsed.
1300 * src/reader.h (merger_list.type_declaration_location): New member
1301 storing the location of the first %merge from which the type for this
1302 merging function was derived.
1303 * src/symlist.h (symbol_list.merger_declaration_location): New member
1304 storing the location of a rule's %merge, if any.
1305 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1306 declared later): New test to catch the error fixed by the above patch.
1307
ffa4ba3a
JD
13082006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1309
1310 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
1311 declarations appear after the rules. Discussed at
1312 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1313 and
1314 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1315 Don't mistake the type of $$ in a midrule to be that of its parent
1316 rule's $$.
ffa4ba3a
JD
1317 * src/reader.c (grammar_current_rule_end): Don't invoke
1318 grammar_rule_check yet since not all symbol declarations may have been
1319 parsed yet.
1320 (grammar_midrule_action): Likewise.
1321 Don't record whether the midrule's $$ has been used yet since actions
1322 haven't been translated yet.
1323 Record the midrule's parent rule and its RHS index within the parent
1324 rule.
1325 (grammar_current_rule_action_append): Don't translate the action yet
1326 since not all symbol declarations may have been parsed yet and, thus,
1327 warnings about types for $$, $n, @$, and @n can't be reported yet.
1328 (packgram): Translate the action and invoke grammar_rule_check now that
1329 all symbol declarations have been parsed.
1330 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1331 after parsing the entire grammar file, the symbol list here in the case
1332 of a midrule is actually the midrule's empty RHS, so reference its
1333 parent rule's RHS where necessary.
1334 On the other hand, now that you can already know it's a midrule, you
1335 aren't forced to think $$ has the same type as its parent rule's $$.
1336 (handle_action_at): In the case of a midrule, reference the parent rule
1337 where necessary.
1338 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1339 members.
1340 (symbol_list_length): Now that this is invoked after all rules have
1341 been parsed, a NULL symbol (rather than a NULL symbol list node)
1342 terminates a rule. symbol_list_print already does this correctly.
1343 * src/symlist.h (symbol_list.midrule_parent_rule,
1344 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1345 remember their relationships with their parents.
1346 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1347 fixed by the above patch.
1348 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1349 implementing...
1350 (Unused values): ... this old test case and...
1351 (Unused values before symbol declarations): ... this new test case.
1352 This one is the same as `Unused values' except that all symbol
1353 declarations appear after the rules in order to catch the rest of the
1354 errors fixed by the above patch.
1355
e256e17f
JD
13562006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1357
300a1930
JD
1358 More cleanup.
1359 * src/reader.c (current_rule): Declare it static since it's no longer
1360 used outside this file.
1361 (grammar_current_rule_action_append): Remove redundant arguments from
1362 translate_rule_action invocation.
1363 * src/reader.h (current_rule): Remove this unused extern.
1364 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1365 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 1366
381ecb06
JD
13672006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1368
1369 Clean up yesterday's patch.
1370 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1371 to...
1372 * src/reader.c (grammar_current_rule_action_append): ... here for
1373 consistency with grammar_current_rule_symbol_append.
1374 * tests/regression.at (Braced code in declaration in rules section):
1375 Make yyerror and yylex static as usual.
1376
4210cd0b
JD
13772006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1378
1379 Fix bug that mistakes braced code in a declaration in the rules section
1380 to be a rule action. Mentioned at
1381 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1382 * src/scan-gram.l: Move midrule action detection from the start of the
1383 scanning of any braced code to...
1384 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1385 action. For readability, use $2 and @2 rather than the equivalent
1386 global variables.
1387 * tests/regression.at (Braced code in declaration in rules section):
1388 New test to catch the error fixed by the above patch.
1389
1390 Work on code readability some.
1391 * src/scan-code.l (current_rule): Get rid of this misleading and
1392 redundant declaration: it's actually extern'ed in reader.h.
1393 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1394 translate_action): Add a rule argument and use it instead of the global
1395 current_rule.
1396 (translate_rule_action): This already receives current_rule through an
1397 argument, so pass it on to translate_action instead of assigning
1398 current_rule to current_rule.
1399 (translate_symbol_action, translate_code): Pass rule = NULL to
1400 translate_action.
1401
34f98f46
JD
14022006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1403
1404 Rename %before-definitions to %start-header and %after-definitions to
1405 %end-header. Don't use these declarations to separate pre-prologue
1406 blocks from post-prologue blocks. Add new order-independent
1407 declarations %before-header and %after-header as alternatives to the
1408 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1409 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1410 * NEWS (2.3+): Update for these changes.
1411 * data/glr.c (b4_before_definitions): Update to...
1412 (b4_start_header): ... this.
1413 (b4_after_definitions): Update to...
1414 (b4_end_header): ... this.
1415 * data/glr.cc: Likewise.
1416 * data/lalr1.cc: Likewise.
1417 * data/yacc.c: Likewise.
1418 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1419 prologue blocks with %*-header declarations.
1420 (Calc++ Parser): Likewise.
1421 (Bison Declaration Summary): Update names.
1422 (Bison Symbols): Update description.
1423 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1424 (PERCENT_END_HEADER): ... this.
1425 (PERCENT_BEFORE_DEFINITIONS): Update to...
1426 (PERCENT_START_HEADER): ... this.
1427 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1428 (declaration): Update token names and m4 macro names.
1429 When parsing %end-header and %start-header, invoke translate_code
1430 before muscle_code_grow, and no longer set global booleans to remember
1431 whether these declarations have been seen.
1432 Parse new %after-header and %before-header.
1433 * src/reader.c (before_definitions, after_definitions): Remove.
1434 (prologue_augment): Accept a new bool argument to specify whether to
1435 augment the pre-prologue or post-prologue.
1436 * src/reader.h (before_definitions, after_definitions): Remove these
1437 extern's.
1438 (prologue_augment): Add new bool argument.
1439 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1440 (PERCENT_END_HEADER): ... this.
1441 (PERCENT_BEFORE_DEFINITIONS): Update to...
1442 (PERCENT_START_HEADER): ... this.
1443 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1444 * tests/actions.at (Printers and Destructors): Update names.
1445
31b2b07e
JD
14462006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1447
1448 Add comparison operators for C++ location classes. Discussed at
1449 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1450 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1451 declaration indicating whether filename_type has an operator==. If
1452 filename_type is `std::string', it defaults to `1', `0' otherwise.
1453 * data/location.cc: Iff b4_define_location_comparison is `1', add
1454 operator== and operator!= for class position and for class location.
1455
1456 Some minor fixes.
1457 * src/scan-action.l: Remove unused file.
1458 * src/symtab.c (symbol_printer_set): Use printer_location not
1459 destructor_location.
1460 * src/symtab.h (struct symbol): Replace incorrect source comment for
1461 printer members.
1462 * tests/input.at (Incompatible Aliases): Update output with correct
1463 printer location.
1464
9bc0dd67
JD
14652006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1466
1467 Don't put the pre-prologue in the header file. For the yacc.c code
1468 file and the glr.c header and code files, move the pre-prologue before
1469 the token definitions. Add new %before-definitions and
1470 %after-definitions to declare code that will go in both the header file
1471 and code file. Discussed at
1472 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1473 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1474 and
1475 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1476 * NEWS (2.3+): Describe these changes.
1477 * data/glr.c (b4_pre_prologue): Move from within to before...
1478 (b4_shared_declarations): ... this.
1479 Add new b4_before_definitions before b4_token_enums.
1480 Add new b4_after_definitions at the end.
1481 * data/glr.cc (b4_pre_prologue): Replace with...
1482 (b4_before_definitions): ... this in the header file.
1483 (b4_after_definitions): New near the end of the header file.
1484 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1485 code file right before including the header file.
1486 (b4_before_definitions): New in the previous position of
1487 b4_pre_prologue in the header file.
1488 (b4_after_definitions): New near the end of the header file.
1489 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1490 (b4_token_enums_defines): In the code file, move to right before
1491 YYSTYPE for consistency with the header file.
1492 (b4_before_definitions): New right before b4_token_enums_defines in
1493 both the header and code file.
1494 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1495 header and code file.
1496 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1497 of prologues for %union dependencies.
1498 (Bison Declaration Summary): In %defines description, mention the
1499 effect of %before-definitions and %after-definitions on the header
1500 file.
1501 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1502 than in the pre-prologue so that make check succeeds.
1503 (Bison Symbols): Add entries for %before-definitions and
1504 %after-definitions.
1505 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1506 %before-definitions.
1507 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1508 (declaration): Parse those declarations and append to
1509 b4_before_definitions and b4_after_definitions, respectively.
1510 * src/reader.c (before_definitions, after_definitions): New bools to
1511 track whether those declarations have been seen.
1512 (prologue_augment): Add to the post-prologue if %union,
1513 %before-definitions, or %after-definitions has been seen.
1514 * src/reader.h (before_definitions, after_definitions): New extern's.
1515 * src/scan-gram.l: Scan the new declarations.
1516 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1517 prologue block in a %before-definitions or a %after-definitions based
1518 on whether the %union is declared.
1519 * tests/regression.at (Early token definitions with --yacc, Early token
1520 definitions without --yacc): Move tests for token definitions into the
1521 post-prologue since token names are no longer defined in the
1522 pre-prologue.
1523
203b9274
AD
15242006-06-20 Akim Demaille <akim@epita.fr>
1525
1526 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1527 (symbol_get): Use it.
1528 * src/parse-gram.y: Use it.
1529
a7ee59cf
JD
15302006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1531
1532 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1533 build succeeds when configured with --enable-gcc-warnings.
1534
5a2baae7
PE
15352006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1536
33ad1a9c
PE
1537 * src/parse-gram.y (char_name): New function.
1538 (CHAR, STRING, string_content): For %printer, properly escape.
1539 (ID): Prefer fputs to fprintf.
1540 (id): Reindent to be consistent with other rules.
1541 Properly quote char.
1542
5a2baae7
PE
1543 The Translation Project changed its way of publishing translations
1544 to maintainers. I haven't received any responses to my request
1545 for supporting the old way, or for documenting the new way. I
1546 have modified 'bootstrap' to use screen scraping
1547 (in this case, HTML scraping). This is unreliable and inelegant,
1548 but I don't see any better way. Yuck.
1549 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1550 (get_translations): New function, which uses HTML scraping to
1551 deduce locations of latest translations.
1552 Use this function to grab both bison and bison-runtime .po files.
1553 Don't bother priming the pump for the runtime-po domain any more,
1554 as it's now translated better than bison is.
1555
58d7a1a1
AD
15562006-06-19 Akim Demaille <akim@epita.fr>
1557
1558 * src/scan-gram.l: No longer "parse" things after `%union' until
1559 `{'. Rather, return a single "%union" token.
1560 No longer make symbols: return strings, and leave the conversion
1561 to symbols to the parser.
1562 (SC_PRE_CODE, token_type): Remove.
1563 * src/parse-gram.y (%union): New field `character'.
1564 Sort tokens.
1565 (CHAR): New token.
1566 (ID, ID_COLON): Now that the scanner no longer makes them
1567 identifiers, adjust all uses to invoke symbol_get.
1568 (id_colon): New, wraps the conversion from string to symbol.
1569 (%union): Accept a possible union_name.
1570 (symbol): Now can be a char.
1571 * data/c.m4 (b4_union_name): Leave a default value.
1572 * data/glr.c, data/yacc.c: Use it.
1573
b931235e
JD
15742006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1575
1576 For associating token numbers with token names for "yacc.c", don't use
1577 #define statements unless `--yacc' is specified; always use enum
1578 yytokentype. Most important discussions start at:
1579 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1580 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1581 and
1582 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1583 * NEWS (2.3+): Mention.
1584 * data/c.m4 (b4_yacc_if): New.
1585 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1586 token #define's.
1587 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1588 on token name definitions.
1589 * src/getargs.c (usage): Capitalize `Yacc' in English.
1590 * src/output.c (prepare): Define b4_yacc_flag.
1591 * tests/regression.at (Early token definitions): Test that tokens names
1592 are defined before the pre-prologue not just before the post-prologue.
1593 Remove this test case and copy to...
1594 (Early token definitions with --yacc): ... this to test #define's.
1595 (Early token definitions without --yacc): ... and this to test enums.
1596
9e6e7ed2
PE
15972006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1598
1599 * NEWS: Reword the post-2.3 change to not be so optimistic about
1600 removing the old "look-ahead" spelling.
1601 Update previous look-ahead/lookahead change reports.
1602 * REFERENCES: look-ahead -> lookahead (since that's
1603 what he actually wrote).
1604 * doc/refcard.tex: look ahead -> lookahead,
1605 look-ahead -> lookahead
1606
742e4900
JD
16072006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1608
1609 For consistency, use `lookahead' instead of `look-ahead' or
1610 `look_ahead'. Discussed starting at
1611 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1612 and then at
1613 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1614 * NEWS: For the next release, note the change to `--report'.
1615 * TODO, doc/bison.1: Update English.
1616 * doc/bison.texinfo: Update English.
1617 (Understanding Your Parser, Bison Options): Document as
1618 `--report=lookahead' rather than `--report=look-ahead'.
1619 * src/conflicts.c: Update English in comments.
1620 (lookahead_set): Rename from look_ahead_set.
1621 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1622 (resolve_sr_conflict): Rename local look_ahead_tokens to
1623 lookahead_tokens, and update other uses.
1624 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1625 count_rr_conflicts, conflicts_free): Update uses.
1626 * src/getargs.c (report_args): Move "lookahead" before alternate
1627 spellings.
1628 (report_types): Update uses.
1629 (usage): For `--report' usage description, state `lookahead' spelling
1630 rather than `look-ahead'.
1631 * src/getargs.h (report.report_lookahead_tokens): Rename from
1632 report_look_ahead_tokens.
1633 * src/lalr.c: Update English in comments.
1634 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1635 (state_lookahead_tokens_count): Rename from
1636 state_look_ahead_tokens_count.
1637 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1638 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1639 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1640 Update other uses.
1641 Update English in output.
1642 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1643 * src/print.c: Update English in comments.
1644 (lookahead_set): Rename from look_ahead_set.
1645 (print_reduction): Rename argument lookahead_token from
1646 look_ahead_token.
1647 (print_core, state_default_rule, print_reductions, print_results):
1648 Update uses.
1649 * src/print_graph.c: Update English in comments.
1650 (print_core): Update uses.
1651 * src/state.c: Update English in comments.
1652 (reductions_new): Update uses.
1653 (state_rule_lookahead_tokens_print): Rename from
1654 state_rule_look_ahead_tokens_print, and update other uses.
1655 * src/state.h: Update English in comments.
1656 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1657 (state_rule_lookahead_tokens_print): Rename from
1658 state_rule_look_ahead_tokens_print.
1659 * src/tables.c: Update English in comments.
1660 (conflict_row, action_row): Update uses.
1661 * tests/glr-regression.at
1662 (Incorrect lookahead during deterministic GLR,
1663 Incorrect lookahead during nondeterministic GLR): Rename
1664 print_look_ahead to print_lookahead.
1665 * tests/torture.at: Update English in comments.
1666 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1667 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1668 (Many lookahead tokens): Update uses.
1669 * data/glr.c: Update English in comments.
1670 * lalr1.cc: Likewise.
1671 * yacc.c: Likewise.
1672 * src/conflicts.h: Likewise.
1673 * src/lalr.h: Likewise.
1674 * src/main.c: Likewise.
1675 * src/output.c: Likewise.
1676 * src/parse-gram.c: Likewise.
1677 * src/tables.h: Likewise.
1678 * tests/calc.at: Likewise.
1679
3c40d0b5
JD
16802006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1681
1682 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1683
5d278082
PE
16842006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1685
1686 * TODO: Add request from Nelson H. F. Beebe to be able to install
1687 Bison without installing the yacc script.
1688
9e668899
JD
16892006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1690
1691 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1692 and yytext if they're already #define'd.
1693 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1694 * src/scan-code-c.c: ... here.
1695 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1696 <config.h>.
1697
0c8e079f
JD
16982006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1699
1700 Get Bison to build again when configured with --enable-gcc-warnings.
1701 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1702 missing #include's.
1703 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1704 loc argument as it shadows a global.
1705 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1706 invocation.
1707
1708 * src/.cvsignore: Add scan-code.c.
1709
2346344a
AD
17102006-06-07 Akim Demaille <akim@epita.fr>
1711
1712 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1713 to...
1714 * src/scan-code.l: here.
1715 * tests/input.at (Torturing the Scanner): Fix another location
1716 error.
1717
4862bdfd
AD
17182006-06-07 Akim Demaille <akim@epita.fr>
1719
1720 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1721
e9071366
AD
17222006-06-06 Akim Demaille <akim@epita.fr>
1723
1724 Extract the parsing of user actions from the grammar scanner.
1725 As a consequence, the relation between the grammar scanner and
1726 parser is much simpler. We can also split "composite tokens" back
1727 into simple tokens.
1728 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1729 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1730 rename as...
1731 * src/location.h, src/location.c (add_column_width)
1732 (location_compute): these.
1733 Fix the column count: the initial column is 0.
1734 (location_print): Be robust to ending column being 0.
1735 * src/location.h (boundary_set): New.
1736 * src/main.c: Adjust to scanner_free being renamed as
1737 gram_scanner_free.
1738 * src/output.c: Include scan-code.h.
1739 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1740 Use boundary_set.
1741 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1742 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1743 which is now, again, a separate token.
1744 Adjust all dependencies.
1745 Whereever actions with $ and @ are used, use translate_code.
1746 (action): Remove this nonterminal which is now useless.
1747 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1748 (grammar_current_rule_action_append): Use translate_code.
1749 (packgram): Bound check ruleno, itemno, and rule_length.
1750 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1751 (last_string, last_braced_code_loc, max_left_semantic_context)
1752 (scanner_initialize, scanner_free, scanner_last_string_free)
1753 (gram_out, gram_lineno, YY_DECL_): Move to...
1754 * src/scan-gram.h: this new file.
1755 (YY_DECL): Rename as...
1756 (GRAM_DECL): this.
1757 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1758 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1759 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1760 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1761 Move these declarations, and...
1762 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1763 these to...
1764 * src/flex-scanner.h: this new file.
1765 * src/scan-gram.l (rule_length, rule_length_overflow)
1766 (increment_rule_length): Remove.
1767 (last_braced_code_loc): Rename as...
1768 (gram_last_braced_code_loc): this.
1769 Adjust to the changes of the parser.
1770 Move all the handling of $ and @ into...
1771 * src/scan-code.l: here.
1772 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1773 (handle_action_dollar, handle_action_at): Move to...
1774 * src/scan-code.l: here.
1775 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1776 scan-code.h, scan-code-c.c, scan-gram.h.
1777 (EXTRA_bison_SOURCES): Add scan-code.l.
1778 (BUILT_SOURCES): Add scan-code.c.
1779 (yacc): Be robust to white spaces.
1780
1781 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1782 * tests/regression.at: Adjust the column numbers.
1783 * tests/regression.at: Adjust the error message.
7891a7c4 1784
184e42f0
JD
17852006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1786
1787 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1788 Use Akim's wording from
1789 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1790
7891a7c4
JD
17912006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1792
1793 Between Bison releases, manually append `+' to the previous Bison
1794 release number, and use that as a signal to automatically print the
1795 ChangeLog's CVS Id keyword from --version. Discussed starting at
1796 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1797 * ChangeLog: Add Id header.
1798 * configure.ac (AC_INIT): Append `+' to `2.3'.
1799 * src/.cvsignore: Add revision.c.
1800 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1801 (BUILT_SOURCES): Add revision.c.
1802 (revision.c): New target rule. This file defines a new global variable
1803 named revision. It initializes it with either the Id from ChangeLog
1804 or, if VERSION doesn't contain `+', with the empty string.
1805 * src/getargs.c (version): Print the value of revision.
1806 * src/revision.h: Extern revision.
1807
4ad3ed84
PE
18082006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1809
1810 * NEWS: Version 2.3.
1811 * configure.ac (AC_INIT): Likewise.
1812
02103984
PE
18132006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1814
1815 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1816 with no arguments, not as an object-like macro. This is for
1817 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1818 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1819 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1820 Document this.
1821
2c08afa5
JD
18222006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1823
1824 * src/getargs.c (usage): Back out yesterday's modification of the
1825 --help output so that we don't have to wait for translation before
1826 releasing 2.3.
1827
6077da58
PE
18282006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1829
1830 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1831 Problem reported by Akim Demaille.
1832
2a26b6c2
JD
18332006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1834
1835 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1836
aefef0d6
PE
18372006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1838
1839 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1840 generated source code. Problem reported by Frans Englich in
1841 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1842
fcd8e201
PE
18432006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1844
1845 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1846 shell, not within 'make', so that 'make' by an ordinary builder
1847 (using GNU make) does not worry about configuring gzip. This also
1848 works around a bug reported independently by Keith Thompson and by
1849 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1850 stderr rather than stdout, messing up the build logs.
1851
7b5cdcbd
JD
18522006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1853
1854 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1855 to make sure that YYID will never be unused. This fixes a 'make
1856 maintainer-check' failure caused by the recent changes to the 'Trivial
1857 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1858 not used.
1859 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1860
5ad0a449
JD
18612006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1862
1863 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1864 state before an empty RHS is always resolved here. Only the location
1865 of that state is guaranteed to be resolved, and that's enough. This
1866 fixes the remaining bug reported by Derek M. Jones in
1867 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1868 * tests/glr-regression.at (Uninitialized location when reporting
1869 ambiguity): Test the above case.
1870 Also, the embedded comments in this test case claim it checks the case
1871 of an empty RHS that has inherited the initial location. However, the
1872 corresponding LHS was already resolved, so yyresolveLocations didn't
1873 actually have reason to modify it. Fix this by forcing
1874 nondeterministic operation at the beginning of the parse.
1875
50cce58e
PE
18762006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1877
1878 * data/c.m4 (b4_yy_symbol_print_generate):
1879 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1880 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1881 of the bugs reported today by Derek M Jones in
1882 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1883 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1884 defined to be a type name without parens or brackets.
1885 (Location Type): Similarly for YYLTYPE.
1886 * tests/regression.at (Trivial grammars): Put in a test for this
1887 bug that will be caught by 'make maintainer-check' (though not,
1888 alas, by 'make check' unless your compiler is picky).
1889
ab8d9dc5
PE
18902006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1891
0d2c8934 1892 * NEWS: Version 2.2.
ab8d9dc5
PE
1893 * configure.ac (AC_INIT): Likewise.
1894
9138c575
JD
18952006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1896
1897 * data/glr.c (yyreportTree): Make room in yystates for the state
1898 preceding the RHS. This fixes the segmentation fault reported by Derek
1899 M. Jones in
1900 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1901 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1902 to the user. Reported for yyreportTree by Derek M. Jones later in the
1903 same thread.
1904 * THANKS: Add Derek M. Jones.
1905 Update my email address.
1906 Fix typo in Steve Murphy's name.
1907
276f48df
PE
19082006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1909
d6645148
PE
1910 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1911 checking against YYLAST that caused the parser to miss a potential
1912 alternative in its diagnostic.
1913 Problem reported by Maria Jose Moron Fernandez in
1914 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1915 * data/lalr1.cc (yysyntax_error_): Likewise.
1916 * data/yacc.c (yysyntax_error): Likewise.
1917 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1918 tokens, in case we run into an older C compiler.
1919 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1920 Use them to check for the off-by-one error fixed above.
1921
276f48df
PE
1922 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1923 YYSIZE_T, not size_t.
1924 * tests/regression.at (Trivial grammars): New test, to catch
1925 the error fixed by the above patch.
1926
cd8b5791
AD
19272006-05-14 Akim Demaille <akim@lrde.epita.fr>
1928
1929 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1930 scheme.
1931 Reported by Steve Murphy.
1932
34376418
AD
19332006-05-14 Akim Demaille <akim@lrde.epita.fr>
1934
1935 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1936 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1937
327afc7c
AD
19382006-05-14 Akim Demaille <akim@lrde.epita.fr>
1939
1940 Implement --trace=m4.
1941 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1942 * src/output.c (output_skeleton): When set, pass -dV to m4.
1943
1944 Factor the handling of flags in m4.
1945 * src/output.c (prepare): Rename the muscle names debug, defines,
1946 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1947 * data/c.m4: Adjust.
1948 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1949 Use b4_define_flag_if to define other b4_FLAG_if macros.
1950 (b4_location_if): As a consequence, rename as...
1951 (b4_locations_if): this, for consistency.
1952 Adjust all the skeletons.
1953
ba9ecd19
AD
19542006-05-14 Akim Demaille <akim@lrde.epita.fr>
1955
1956 * etc/bench.pm: Shorten bench names.
1957
4e83ea15
AD
19582006-05-14 Akim Demaille <akim@lrde.epita.fr>
1959
1960 * src/output.h, src/output.c (error_verbose): Move to...
1961 * src/getargs.h, src/getargs.c: here.
1962 Sort the flags.
1963 Adjust dependencies.
1964
6e93d810
PE
19652006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1966
1967 * data/c.m4 (b4_copyright): Put the special exception for Bison
1968 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
1969 uses changed. Suggested by Akim Demaille. Also, wrap the
1970 copyright notice, in case it is longer than 80 columns. Replace
1971 comma by newline after title.
6e93d810 1972
eaea13f5
PE
19732006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1974
1975 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1976 incompatibility, not a bug. Mention that it wasn't fixed as of
1977 flex 2.5.33.
1978
3cf084ec
AD
19792006-05-11 Akim Demaille <akim@lrde.epita.fr>
1980
1981 * examples/extexi: Enforce the precedence of concatenation over
1982 >>.
0a9f1c7d 1983 Reported by Tommy Nordgren.
3cf084ec 1984
32c96bd7
AD
19852006-05-11 Akim Demaille <akim@lrde.epita.fr>
1986
1987 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1988 with the member "token".
f94705b2 1989 Reported by Martin Nylin.
32c96bd7 1990
eaea13f5
PE
19912006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1992
1993 * data/glr.c: Switch to Bison 2.2 special-exception language in
1994 the copyright notice. Use more-regular format for titles and
1995 copyright notices.
1996 * data/glr.cc: Likewise.
1997 * data/location.cc: Likewise.
1998 * data/yacc.cc: Likewise.
1999 * doc/bison.texinfo (Conditions): Document this.
2000 * NEWS: likewise. Upgrade version to 2.2.
2001
6e2d1146
AD
20022006-04-27 Akim Demaille <akim@lrde.epita.fr>
2003
2004 * data/glr.cc: Remove dead code.
2005
47671055
PE
20062006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2007
2008 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2009 that variable and the line breaks the bootstrap. Problem reported
2010 by Juan M. Guerrero.
2011
ed2e6384
AD
20122006-04-24 Akim Demaille <akim@lrde.epita.fr>
2013
2014 * doc/bison.texinfo (Multiple start-symbols): New.
2015
3cedc2dc
AD
20162006-04-24 Akim Demaille <akim@lrde.epita.fr>
2017
2018 * etc/README, etc/bench.pl: New.
2019
b2ddc3f3
AD
20202006-04-03 Akim Demaille <akim@lrde.epita.fr>
2021
2022 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2023 rule.
2024 Reported by Mickael Labau.
2025 * tests/input.at (Torturing the Scanner): Test it.
2026
91e3ac9a
PE
20272006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2028
2029 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2030 Problem reported by Bob Rossi.
2031
20322006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2033
2034 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2035 and didn't really work.
2036 For the index, use @ifnotinfo, not @iftex.
2037 Minor cleanups of spacing and terminology.
2038
5cf61e93
AD
20392006-03-12 Akim Demaille <akim@lrde.epita.fr>
2040
2041 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2042 of AT_NAME_PREFIX when %name-prefix is not used.
2043
aa08666d
AD
20442006-03-12 Akim Demaille <akim@lrde.epita.fr>
2045
2046 Apply --prefix to C++ skeletons too: they change the namespace.
2047 The test suite already exercize these cases.
2048 * data/c++.m4 (b4_namespace): New.
2049 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2050 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2051 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2052 * doc/bison.texinfo: Document it.
2053 (Option Cross Key): Use @multitable in all formats. It looks
2054 nicer, even in TeX outputs.
2055 (Rules): Use the same code whatever the output type is.
2056 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2057 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2058 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 2059
45567173
AD
20602006-03-10 Akim Demaille <akim@lrde.epita.fr>
2061
2062 * TODO: Remove dead items.
2063
e9d8f881 20642006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
2065
2066 * doc/FAQ: Remove, merged into...
2067 * doc/bison.texinfo (FAQ): this.
2068 * doc/Makefile.am (EXTRA_DIST): Adjust.
2069
c095d689
AD
20702006-03-10 Akim Demaille <akim@lrde.epita.fr>
2071
2072 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
2073 even if empty.
2074 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
2075 * doc/bison.texinfo (Calc++ Scanner): Use it.
2076
6e0f8287
PE
20772006-03-09 Paul Eggert <eggert@cs.ucla.edu>
2078
2079 Fix two nits reported by twlevo, plus one more that I discovered.
2080
2081 * src/assoc.h (assoc_to_string): Give a name to the arg, as
2082 this is the usual Bison style.
2083 * src/location.h (location_print): Likewise.
2084
2085 * src/reader.h (token_name): Likewise.
2086
d6b771c3
PE
20872006-03-08 Paul Eggert <eggert@cs.ucla.edu>
2088
2089 Fix some nits reported by twlevo.
2090 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
2091 and "POSIX". Use more-modern syntax for URLs. Mention C++
2092 and ask for Java. Don't hardwire OS version numbers. Add
2093 copyright notice.
2094 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
2095 * src/conflicts.c (solved_conflicts_obstack): Now static.
2096
1e137b71
JD
20972006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2098
2099 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
2100 page. Say "you can use it" not "you may use it" as on the web page;
2101 we're describing capabilities not granting permission.
2102
73f2e47e
PE
21032006-03-06 Paul Eggert <eggert@cs.ucla.edu>
2104
6d05403d
PE
2105 * data/glr.c (yyresolveLocations): Rename local variables to avoid
2106 shadowing warnings. Use usual patter for iterating through RHS.
2107 * tests/glr-regression.at
2108 (Uninitialized location when reporting ambiguity):
2109 Modify yylex so that it uses its argument, rather than trying
2110 to rely on ARGSUSED (which doesn't work for gcc with warnings).
2111 const char -> char const.
2112
73f2e47e
PE
2113 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
2114 Don't use tabs inside commands; it messes up 'ps'.
2115 Problem reported by twlevo.
2116
8710fc41
JD
21172006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
2118
2119 * tests/glr-regression.at (Uninitialized location when reporting
2120 ambiguity): New test case.
2121 * data/glr.c (yyresolveLocations): New function, which uses
2122 YYLLOC_DEFAULT.
2123 (yyresolveValue): Invoke yyresolveLocations before reporting an
2124 ambiguity.
2125 * doc/bison.texinfo (Default Action for Locations): Note
2126 YYLLOC_DEFAULT's usage for ambiguity locations.
2127 (GLR Semantic Actions): Cross-reference those notes.
2128
ae952af2
JD
21292006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
2130
2131 * tests/glr-regression.at (Leaked semantic values when reporting
2132 ambiguity): Remove unnecessary union and type declarations.
2133 (Leaked lookahead after nondeterministic parse syntax error): New test
2134 case.
2135 * data/glr.c (yyparse): Check for zero stacks remaining before
2136 attempting to shift the lookahead so that you don't lose it.
2137
35ee866a
JD
21382006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2139
2140 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
2141 * tests/glr-regression.at (Leaked semantic values when reporting
2142 ambiguity): New test case.
2143 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
2144 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
2145 now unnecessary yystackp parameter.
2146 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
2147 destructors can be called.
2148
2149 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
2150 in existing testcases.
2151
520181ab
JD
21522006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Don't leak semantic values for parent RHS when a user action cuts the
2155 parser, and clean up related code a bit.
2156 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
2157 cuts parse): Rename to...
2158 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
2159 for leaked parent RHS values.
2160 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
2161 between an unresolved state (non-empty chain of semantic options) and
2162 an incomplete one (signaled by an empty chain).
ae952af2 2163 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
2164 successfully or unsuccessfully resolved yyGLRState to...
2165 (yyresolveValue): ... here so that yyresolveValue always leaves a
2166 yyGLRState with consistent data and thus is easier to understand.
2167 Remove the yyvalp and yylocp parameters since they are always just
2168 taken from the yys parameter. When reporting a discarded merged value
2169 in debugging output, note that it is incompletely merged. Document the
2170 interface.
2171 (yyresolveAction): If resolving any of the RHS states fails, destroy
2172 them all rather than leaking them. Thus, as long as user actions are
2173 written to clean up the RHS correctly, yyresolveAction always cleans up
2174 the RHS of a semantic option. Document the interface.
2175
18d9185c
PE
21762006-02-27 Paul Eggert <eggert@cs.ucla.edu>
2177
2178 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
2179 led to a segmentation fault in GNU Pascal. Problem reported
2180 by Waldek Hebisch.
2181
841a7737
JD
21822006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
2183
2184 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
2185 mid-rule action inside a nonterminal symbol in order to declare a
2186 destructor for its semantic value.
2187
fc3f467f
PE
21882006-02-16 Paul Eggert <eggert@cs.ucla.edu>
2189
2190 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
2191 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
2192 __cplusplus && ! defined _STDLIB_H && !
2193 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
2194 defined free))]: Include <stdlib.h> rather than rolling our own
2195 declarations of malloc and free, to avoid problems with
2196 incompatible declarations (using 'throw') C++'s stdlib.h. This
2197 should fix Debian bug 340012
2198 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
2199 reported by Guillaume Melquiond.
2200
a3af26dd
PE
22012006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2202
4d7bc38c
PE
2203 * NEWS: Clarify symbols versus types in unused-value warnings.
2204
a3af26dd
PE
2205 * configure.ac (AC_INIT): Bump version number.
2206
4e26c69e
PE
22072006-02-13 Paul Eggert <eggert@cs.ucla.edu>
2208
2209 * NEWS: Version 2.1a.
2210 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
2211 since C99 requires this.
2212
498e897c
PE
22132006-02-11 Paul Eggert <eggert@cs.ucla.edu>
2214
2215 * m4/c-working.m4: New file.
2216 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
2217
57bb17ca
PE
22182006-02-10 Paul Eggert <eggert@cs.ucla.edu>
2219
2220 * Makefile.maint: Merge from coreutils.
2221
0be105dc
PE
22222006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2223
2224 More portability fixes for problems summarized by Nelson H. F. Beebe.
2225
2226 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2227 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2228 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2229 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2230 messes up because C++ code is compiled in 32-bit mode but linked
2231 in 64-bit mode.
2232
6fc0c024
PE
22332006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2234
2235 More portability fixes for problems summarized by Nelson H. F. Beebe.
2236
7870f699
PE
2237 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2238 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2239
6fc0c024
PE
2240 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2241 nodist_PROGRAMS, since we don't need to actually compile the
2242 example if we're just doing a plain 'make'. This avoids bothering
2243 the installer unnecessarily about problems due to weird C++
2244 compilers.
2245
fe6c2fde
PE
22462006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2247
2248 More portability fixes for problems summarized by Nelson H. F. Beebe.
2249
2250 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2251 than #include "...", and compile with -I'.'. The old method was
2252 not portable, according to Posix and the C standard, and it does
2253 not work with Sun C 5.7, where previous #line directives affect
2254 the working directory used in later #include "..." directives.
2255
927b425b
JMG
22562006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2257
2258 Various DJGGP specific issues in /djgpp
2259
d9735e9e
PE
22602006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2261
2262 More portability fixes for problems summarized by Nelson H. F. Beebe.
2263
2264 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2265 '#include <map>' works and that you can apply ++ to iterators.
2266
5a6755af
PE
22672006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2268
67a0dc4f
PE
2269 Work around portability problems summarized by Nelson H. F. Beebe in
2270 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2271
8c86f0ef
PE
2272 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2273 that '#include <string>' works.
2274
de35dd59
PE
2275 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2276 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2277 "warning: sorry: semantics of inline function static data `const
2278 unsigned char translate_table[262]' are wrong (you'll wind up with
2279 multiple copies)".
2280
67a0dc4f
PE
2281 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2282 or, xor to not_, and_, or_, and xor_, respectively. This works
2283 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2284 random system header somewhere that includes the equivalent of
2285 <iso646.h>.
2286
5a6755af
PE
2287 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2288 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 2289 Suite Version 2.0.
5a6755af 2290
3f001415
JD
22912006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2292
2293 During deterministic GLR operation, user actions should be able to
2294 influence the parse by changing yychar. To make this easier to fix and
2295 to make glr.c easier to evolve in general, don't maintain yytoken in
2296 parallel with yychar; just compute yytoken when needed.
2297 * tests/glr-regression.at (Incorrect lookahead during deterministic
2298 GLR): Check that setting yychar in a user action has the intended
2299 effect.
2300 * data/glr.c (yyGLRStack): Remove yytokenp member.
2301 (yyclearin): Don't set *yytokenp.
2302 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2303 yychar rather than *yytokenp to determine the current lookahead.
2304 Compute yytoken locally when needed.
2305 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2306 point to.
2307
2308 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2309 after `--report' documentation.
2310
e2a8c0f5
PE
23112006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2312
2313 * src/parse-gram.y (grammar_declaration): Location of printer
2314 symbol is @1, not list->location. Bug reported by twlevo.
2315 * tests/input.at (Incompatible Aliases): Adjust to above change.
2316
6b702268
PE
23172006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2318
27622431
PE
2319 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2320 all the test at once. This makes the output easier to read in the
2321 normal case.
2322
6b702268
PE
2323 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2324 got from <http://bro-ids.org/download.html>. The bug is that
2325 when two actions appeared in succession, the second one was
2326 scanned before the first one was added to the grammar rule
2327 as a midrule action. Bison then output the incorrect warning
2328 "parse.y:905.17-906.36: warning: unused value: $3".
2329 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2330 associated with a value.
2331 (rhs): Don't invoke grammar_current_rule_action_append.
2332 (action): Invoke it here instead.
2333 * src/reader.c (grammar_midrule_action): Now extern.
2334 (grammar_current_rule_action_append): Don't invoke
2335 grammar_midrule_action; that is now the scanner's job.
2336 * src/reader.h (last_string, last_braced_code_loc):
2337 (grammar_midrule_action): New decls.
2338 * src/scan-gram.l (last_string): Now extern, sigh.
2339 (last_braced_code_loc): New extern variable.
2340 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2341 rule already has an action.
2342 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2343 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2344 Add some tests to check that the above changes fixed the bug.
2345
d40ba6c2
PE
23462006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2347
2348 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2349 All used changed. Check whether the symbol has a destructor,
2350 not whether it is typed.
2351 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2352 that the values are still reported as unused. All line numbers
2353 adjusted.
2354
401aace6
PE
23552006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2356
2357 Work around a bug in bro 0.8, which underparenthesizes its
2358 definition of YYLLOC_DEFAULT.
2359 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2360 their arguments.
2361 * data/lalr1.cc: Likewise.
2362 * data/yacc.cc: Likewise.
2363
06f01bc4
PE
23642006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2365
401aace6
PE
2366 Work around a bug in Pike 7.0, and give the Pike folks a
2367 better way to override the usual int widths.
2368 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2369 user can override the types.
2370 (short): #undef, to work around a bug in Pike 7.0.
2371 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2372 (union yyalloc.yyss): Use yytype_int16 rather than short.
2373 All uses changed.
2374 (yysigned_char): Remove.
2375 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2376 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2377 * tests/regression.at (Web2c Actions): Adjust to above changes.
2378
2379 * src/reader.c (check_and_convert_grammar): New function.
2380 (reader): Close the input file even if something went wrong during
2381 parsing. Minor file descriptor leak reported by twlevo.
2382
06f01bc4
PE
2383 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2384 to pacify gcc -Wswitch-default.
2385 * src/scan-gram.l (adjust_location): Use a default: break; case
2386 to pacify gcc -Wswitch-default.
2387 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2388 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2389 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2390 Move these decls to scan-skel.l, since they don't need to be
2391 visible elsewhere.
2392 * src/scan-skel.l: Accept the above decls.
2393 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2394 is used.
2395
02650b7f
PE
23962006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2397
2398 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2399 since we don't want to insist on a version number at the start
2400 of the changelog every time.
2401 * Makefile.maint: Sync from coreutils a bit better.
2402 (sc_trailing_blank): Renamed from sc_trailing_space.
2403 All uses changed.
2404 (sc_no_if_have_config_h, sc_require_config_h):
2405 (sc_prohibit_assert_without_use): New rules.
2406 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2407 (sc_dd_max_sym_length): Fix leading spaces in rule.
2408 (sc_system_h_headers): Prefix with @.
2409 (sc_useless_cpp_parens, m4-check): Output line numbers.
2410 (changelog-check): Allow version only in head.
2411 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2412 satisfy new Makefile.maint rule.
2413 * data/glr.c: Likewise.
2414 * data/glr.cc: Likewise.
2415 * data/lalr1.cc: Likewise.
2416 * data/yacc.c: Likewise.
2417 * lib/ebitsetv.c: Likewise.
2418 * lib/lbitset.c: Likewise.
2419 * lib/subpipe.c: Likewise.
2420 * lib/timevar.c: Likewise.
2421 * src/system.h: Likewise.
2422 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2423 * djgpp/Makefile.maint: Add copyright notice.
2424 * djgpp/README.in: Likewise.
2425 * djgpp/config.bat: Likewise.
2426 * djgpp/config.site: Likewise.
2427 * djgpp/config_h.sed: Likewise.
2428 * djgpp/djunpack.bat: Likewise.
2429 * djgpp/config.sed: Fix copyright notice to match standard format.
2430 * djgpp/subpipe.h: Likewise.
2431 * lib/bitsetv-print.c: Likewise.
2432 * lib/bitsetv.c: Likewise.
2433 * lib/subpipe.h: Likewise.
2434 * lib/timevar.c: Likewise.
2435 * lib/timevar.h: Likewise.
2436 * djgpp/subpipe.c: Use standard recipe for config.h.
2437 * lib/abitset.c: Likewise.
2438 * lib/bitset.c: Likewise.
2439 * lib/bitset_stats.c: Likewise.
2440 * lib/bitsetv-print.c: Likewise.
2441 * lib/bitsetv.c: Likewise.
2442 * lib/ebitsetv.c: Likewise.
2443 * lib/get-errno.c: Likewise.
2444 * lib/lbitset.c: Likewise.
2445 * lib/subpipe.c: Likewise.
2446 * lib/timevar.c: Likewise.
2447 * lib/vbitset.c: Likewise.
2448 * tests/local.at: Likewise.
2449 * src/scan-gram.l: Don't include verify.h, since system.h does
2450 that for us.
2451 * .x-sc_require_config_h: New file.
2452 * .x-sc_unmarked_diagnostics: New file.
2453
287c78f6
PE
24542006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2455
287c78f6
PE
2456 Be a bit more systematic about using 'abort'.
2457 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2458 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2459 Put 'default: abort ();' before some other case, to satisfy older
2460 pedantic compilers.
2461 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2462 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2463 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2464 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
2465 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2466 (get_decision_str, get_orientation_str, get_node_alignment_str):
2467 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2468 (get_linestyle_str, get_arrowstyle_str): Likewise.
2469 * src/conflicts.c (resolve_sr_conflict):
2470 Use a default case rather than one for the one remaining enum
2471 value, to catch invalid enum values as well.
2472 * src/lalr.c (set_goto_map, map_goto):
2473 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2474 * src/nullable.c (nullable_compute, token_definitions_output):
2475 Likewise.
2476 * src/reader.c (packgram, reader): Likewise.
2477 * src/state.c (transitions_to, state_new, state_reduction_find):
2478 Likewise.
2479 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2480 (symbol_pack): Likewise.
2481 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
2482 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2483 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
2484 * src/system.h: Don't include <assert.h>.
2485 (assert): New macro.
2486
2487 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2488 (Destructor Decl, Parser Function, Pure Calling):
2489 Describe rules for braces inside C code more carefully.
287c78f6 2490
c66dfadd
PE
24912006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2492
c21493b8
PE
2493 Fix some porting glitches found by Nelson H. F. Beebe.
2494 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2495 compilers that don't understand that abort () does not return.
2496 * src/state.c (transitions_to): Likewise.
2497 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2498 that '#include <cstdlib>' works.
2499 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2500 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2501 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2502 for the benefit of some pre-C99 compilers.
2503
b6e3facf
PE
2504 * bootstrap: Undo changes to gnulib files that autoreconf made.
2505
c66dfadd
PE
2506 Minor fixups to get 'make maintainer-check' to work.
2507 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2508 with the new verify.h implementation.
2509 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2510 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2511 * data/yacc.c (YYUSE): Likewise.
2512 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2513 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2514 * src/parse-gram.y (declaration): Don't pass a string constant
2515 to a function that expects char *, since GCC might complain
2516 about the constant value.
2517 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2518 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2519 before #defining them.
2520 * tests/glr-regression.at
2521 (Incorrectly initialized location for empty right-hand side in GLR):
2522 In yyerror, use the msg arg.
2523 (Corrupted semantic options if user action cuts parse):
2524 (Incorrect lookahead during deterministic GLR):
2525 (Incorrect lookahead during nondeterministic GLR):
2526 Don't name a local var 'index'; it shadows string.h's 'index'.
2527
ed94ef2a
AD
25282006-01-19 Akim Demaille <akim@epita.fr>
2529
2530 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2531 location, not just parts of it.
2532
e9ad4aec
PE
25332006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2534
d6ca7905
PE
2535 * NEWS: Document the fact that multiple %unions are now allowed.
2536 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
2537 * TODO: This feature is now implemented, so remove it from
2538 the wishlist.
d6ca7905 2539
ef1b70e0
PE
2540 * Makefile.maint: Merge with coreutils Makefile.maint.
2541 (CVS_LIST): Use build-aux version if available.
2542 (VERSION_REGEXP): New macro.
2543 (syntax-check-rules): Add sc_no_if_have_config_h,
2544 sc_prohibit_assert_without_use, sc_require_config_h,
2545 sc_useless_cpp_parens.
2546 (sc_obsolete_symbols): Check for O_NDELAY.
2547 (sc_dd_max_sym_length): Track coreutils.
2548 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2549 (sc_useless_cpp_parens): New rule.
2550 (news-date-check): Look for version or today's date.
2551 (changelog-check): Don't require version number near head.
2552 (copyright-check): Use current year instead of hardwiring 2005.
2553 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2554 (announcement): Add --gpg-key-ID.
2555
2556 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2557 with "file system".
2558
2073ce56 2559 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
2560 array. Problem reported by twlevo.
2561 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2562 * src/lalr.c (build_relations): Rely on new sentinel.
2563 * src/gram.c (gram_free): Adjust to new sentinel.
2564
b7691f15
JD
25652006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2566
2567 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2568 yylookaheadNeeds. All uses updated.
2569 (yysplitStack): Rename local yynewLookaheadStatuses to
2570 yynewLookaheadNeeds.
2571 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2572 GLR): In comments, change `lookahead status' to `lookahead need'.
2573
ddee1b06
PH
25742006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2575
2576 * data/glr.c (yysplitStack): A little stylistic rewrite.
2577
12f4614d
PH
25782006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2579
2580 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2581
32c29292
JD
25822006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2583
2584 * doc/bison.texinfo: Fix some typos.
2585 (GLR Semantic Actions): New subsection discussing special
2586 considerations because GLR semantic actions might be deferred.
2587 (Actions): Mention look-ahead usage of yylval.
2588 (Actions and Locations): Mention look-ahead usage of yylloc.
2589 (Special Features for Use in Actions): Add YYEOF entry and mention it
2590 in the yychar entry.
2591 In the yychar entry, remove mention of the local yychar case (pure
2592 parser) since this is irrelevant information when writing semantic
2593 actions and since it's already discussed in `Bison Symbols' where
2594 yychar is otherwise described as an external variable.
2595 In the yychar entry, don't call it the `current' look-ahead since it
2596 isn't when semantic actions are deferred.
2597 In the yychar and yyclearin entries, add note about deferred semantic
2598 actions.
2599 Add yylloc and yylval entries discussing look-ahead usage.
2600 (Look-Ahead Tokens): When discussing yychar, don't call it the
2601 `current' look-ahead, and do mention yylval and yylloc.
2602 (Error Recovery): Cross-reference `Action Features' when mentioning
2603 yyclearin.
2604 (Bison Symbols): In the yychar entry, don't call it the `current'
2605 look-ahead.
2606 In the yylloc and yylval entries, mention look-ahead usage.
2607
de366a2f 26082006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
2609
2610 * tests/glr-regression.at: Update copyright year to 2006.
2611
bf70fa87
JD
26122006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2613
2614 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2615 use during nondeterministic operation to track which stacks have
2616 actually needed the current lookahead.
2617 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2618 Allocate, deallocate, resize, and otherwise shuffle space for
2619 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2620 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2621 appropriately during nondeterministic operation.
2622 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2623 members to store the current lookahead to be used by the deferred
2624 user action.
2625 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2626 from which the RHS is taken. Set the lookahead members of the new
2627 yySemanticOption according to the lookahead status for stack yyk.
2628 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2629 yyaddDeferredAction.
2630 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2631 members of yySemanticOption before invoking yyuserAction, and then set
2632 them back to their current values afterward.
2633 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2634 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2635 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2636 titles for consistency.
2637 (Leaked merged semantic value if user action cuts parse): In order to
2638 suppress lint warnings, use arguments in merge function, and assign
2639 char value < 128 in main.
2640 (Incorrect lookahead during deterministic GLR): New test case.
2641 (Incorrect lookahead during nondeterministic GLR): New test case.
2642
05449a2c
JD
26432006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2644
de366a2f 2645 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
2646 !yyvaluep as signal that no semantic value is available to print.
2647 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2648 to print a semantic value.
2649
4158e0a1 26502006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 2651
4158e0a1
JD
2652 * tests/glr-regression.at: For consistency with my newer test cases,
2653 don't thank myself.
2654
d659304d
JD
26552006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2656
2657 * data/glr.c (yyresolveValue): When merging semantic options, if at
2658 least one user action succeeds but a later one cuts the parse, then
2659 destroy the semantic value before returning rather than leaking it.
2660 (yyresolveStates): If a user action cuts the parse and thus
2661 yyresolveValue fails, ignore the (unset) semantic value rather than
2662 corrupting the yyGLRState, and empty the semantic options list since
2663 the user actions should have called all necessary destructors.
2664 Simplify code with YYCHK.
2665 * tests/glr-regression.at (Corrupted semantic options if user action
2666 cuts parse): New test case.
2667 (Undesirable destructors if user action cuts parse): New test case.
2668 Before applying any of this patch, this test case never actually failed
2669 for me... but only because the corrupted semantic options usually
2670 masked this bug.
2671 (Leaked merged semantic value if user action cuts parse): New test
2672 case.
2673
6ec2c0f2
AD
26742006-01-05 Akim Demaille <akim@epita.fr>
2675
2676 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2677
1b9c21fb
PE
26782006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2679
2680 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2681 _MSC_VER. Problem reported by Cenzato Marco.
2682 (b4_c_function_def): Use it.
2683 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2684 b4_c_modern.
2685 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2686 than rolling our own.
2687
84866159
AD
26882006-01-04 Akim Demaille <akim@epita.fr>
2689
2690 Also warn about non-used mid-rule values.
2691 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2692 member.
2693 (symbol_list_new): Adjust.
2694 * src/reader.c (symbol_typed_p): New.
2695 (grammar_rule_check): Use it.
2696 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2697 Check its rule.
2698 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2699 Use it.
2700 * tests/actions.at (Exotic Dollars): Adjust.
2701
378f4bd8
AD
27022006-01-04 Akim Demaille <akim@epita.fr>
2703
2704 * src/reader.c (grammar_midrule_action): If $$ is set in a
2705 mid-rule, move the `used' bit to its lhs.
2706 * tests/input.at (Unused values): New.
2707 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2708
e2a21b6f
PE
27092006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2710
54662697
PE
2711 * doc/bison.texinfo (Bison Options): Say more accurately what
2712 --yacc does.
2713 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2714 about declarations in the grammar when in Yacc mode, as POSIX does
2715 not require a diagnostic when the grammar uses extensions.
2716
2717 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2718
073f9288
PE
2719 Warn about dubious constructions like "%token T T".
2720 Reported by twlevo.
2721 * src/symtab.h (struct symbol.declared): New member.
2722 * src/symtab.c (symbol_new): Initialize it to false.
2723 (symbol_class_set): New arg DECLARING, specifying whether
2724 this is a declaration that we want to warn about, if there
2725 is more than one of them. All uses changed.
2726
1221b78a
PE
2727 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2728 Allow multiple %union directives, whose contents concatenate.
2729 * src/parse-gram.y (grammar_declaration): Likewise.
2730 Use muscle_code_grow, so that we don't need stype_line any more.
2731 All uses changed.
2732
2733 * src/muscle_tab.c (muscle_grow): Fix comment.
2734
e2a21b6f
PE
2735 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2736 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2737 Update copyright year to 2006.
2738
8f7e3cf9
AD
27392006-01-03 Akim Demaille <akim@epita.fr>
2740
2741 Have glr.cc pass (some of) the calc.at tests.
2742 * data/glr.cc (b4_parse_param_orig): New.
2743 (b4_parse_param): Improve its definition, and bound it more
2744 clearly in the skeleton.
2745 (b4_epilogue): Append, instead of prepending, in order to keep
2746 #line consistency.
2747 Simplify the generation of auxiliary functions: locations and
2748 purity are mandated.
2749 (b4_global_tokens_and_yystype): Honor it.
2750 * data/location.cc (c++.m4): Don't include it.
2751 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2752 and AT_SKEL_CC_IF.
2753 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2754 AT_LALR1_CC_IF.
2755 Be sure to initialize the first position's filename.
2756 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2757 mandated anyway.
2758 (AT_CHECK_CALC_GLR_CC): New.
2759 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2760
3953ed88
AD
27612006-01-02 Akim Demaille <akim@epita.fr>
2762
2763 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2764 c.m4.
0a96ba81 2765 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
2766 * data/glr.cc: Do not include stack.hh.
2767
9ecafbbf
AD
27682006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 * data/glr.c: Reformat whitespace with tabs.
2771 (b4_lpure_formals): Remove this unused m4 macro.
2772 * tests/cxx-type.at: Reformat whitespace with tabs.
2773 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2774 since it's a member. Rename type to isNterm for clarity.
2775
c4d497a0
AD
27762005-12-29 Akim <akim@sulaco.local>
2777
2778 Let glr.cc catch up with symbol_value_print.
2779 * data/glr.cc (b4_yysymprint_generate): Replace by...
2780 (b4_yy_symbol_print_generate): this.
2781 (yy_symbol_print, yy_symbol_value_print): Declare them.
2782
4517da37
PE
27832005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2784
2785 * src/location.h (boundary): Note that a line or column equal
2786 to INT_MAX indicates an overflow.
2787 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2788 (rule_length_overflow, increment_rule_length, add_column_width):
2789 New functions.
2790 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2791 (<SC_BRACED_CODE>"}"):
2792 Use increment_rule_length rather than incrementing it by hand.
2793 (adjust_location, handle_syncline): Diagnose overflow.
2794 (handle_action_dollar, handle_action_at):
2795 Fix bug with monstrosities like $-2147483648.
2796 Remove now-unnecessary checks.
2797 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2798 (convert_ucn_to_byte): Verify assumptions.
2799 (handle_syncline): New arg LOC. All callers changed.
2800 Don't store through a value derived from char const * pointer.
2801
2802 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2803 GCC warnings.
2804
e3233bf6
PE
28052005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2808 Remove unnecessary forward static decls.
2809
8f3596a6
AD
28102005-12-27 Akim Demaille <akim@epita.fr>
2811
2812 * src/reader.c (grammar_current_rule_check): Also check that $$
2813 is used.
2814 Take the rule to check as argument, hence rename as...
2815 (grammar_rule_check): this.
2816 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2817 Rename as...
2818 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2819 (grammar_midrule_action, grammar_symbol_append): Now static.
2820 * tests/torture.at (input): Don't rely on the default action
2821 being always performed.
2822 * tests/calc.at: "Set" $$ even when the action is "cut" with
2823 YYERROR or other.
2824 * tests/actions.at (Exotic Dollars): Instead of using unused
2825 values, check that the warning is issued.
2826
721be13c
PE
28272005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2828
2829 * NEWS: Improve wording for unused-value warnings.
2830
a0af42fc
AD
28312005-12-22 Akim Demaille <akim@epita.fr>
2832
2833 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2834 (b4_yysymprint_generate): Rename as...
2835 (b4_yy_symbol_print_generate): this.
2836 Generate yy_symbol_print instead of yysymprint.
2837 Generate also yy_symbol_value_print, and use it.
2838
affac613
AD
28392005-12-22 Akim Demaille <akim@epita.fr>
2840
721be13c 2841 * NEWS: Warn about unused values.
affac613
AD
2842 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2843 a `used' member.
2844 (symbol_list_n_get, symbol_list_n_used_set): New.
2845 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2846 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2847 * src/reader.c (grammar_current_rule_check): Check that values are
2848 used.
2849 * src/symtab.c (symbol_print): Accept 0.
2850 * tests/existing.at: Remove the type information.
2851 Empty the actions.
2852 Remove useless actions (beware of mid-rule actions: perl -000
2853 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2854 * tests/actions.at (Exotic Dollars): Use unused values.
2855 * tests/calc.at: Likewise.
2856 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2857 Likewise.
2858
2859 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2860 rule_useful_p.
2861
9d9b8b70
PE
28622005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2863
8bb4c753
PE
2864 Undo 2005-12-01 tentative license wording change. The wording is
2865 still being reviewed by the lawyers, and we don't want to wait for
2866 them before publishing a test release. For now, revert to the
2867 previous wording.
2868 * NEWS: Undo 2005-12-01 change.
2869 * data/glr.c: Revert to previous license wording.
2870 * data/glr.cc: Likewise.
2871 * data/lalr1.cc: Likewise.
2872 * data/location.cc: Likewise.
2873 * data/yacc.c: Likewise.
2874
9d9b8b70
PE
2875 * NEWS: Reword %destructor vs YYABORT etc.
2876 * data/glr.c: Use American spacing, for consistency.
2877 * data/glr.cc: Likewise.
2878 * data/lalr1.cc: Likewise.
2879 * data/yacc.c: Likewise.
2880 * data/yacc.c: Reformat comments slightly.
2881 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2882 for consistency. Fix some spelling errors and reword recently-included
2883 text slightly.
2884 * tests/cxx-type.at: Cast results of malloc, for C++.
2885
2c3b392a
AD
28862005-12-21 Joel E. Denny <address@hidden>
2887
2888 * tests/cxx-type.at: Construct a tree, count the parents of shared
2889 nodes, and free each node once and only once. Previously, the memory
2890 for semantic values was leaked instead.
2891
d6cff4dc
AD
28922005-12-21 Joel E. Denny <address@hidden>
2893
2894 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2895 (yylval, yylloc): If pure, #define to yystackp->yyval and
2896 yystackp->yyloc similar to yychar and yynerrs.
2897 (yyparse): If pure, remove local yylval and yylloc. Add local
2898 yystackp to accommodate pure definitions of yylval and yylloc.
2899 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2900 yylvalp and yyllocp to &yylval and &yylloc.
2901 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2902 namespace. Previously, nerrs and char were missing, but lval and lloc
2903 weren't necessary.
2904 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2905 yylvalp and yyllocp parameters since, if pure, these are now always
2906 accessible through yystackp. If not pure, they are still accessible
2907 globally.
2908 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2909 `if (YYID (N))' to pacify lint.
2910
a85284cf
AD
29112005-12-21 Akim Demaille <akim@epita.fr>
2912
2913 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2914 destroy the RHS symbols of a rule.
2915 * data/yacc.c (yylen): Initialize to 0.
2916 Keep its value to the number of items to possibly shift.
2917 In particular, a regular successful parse that ends on YYFINAL by
2918 a (internal) YYACCEPT must not have yylen != 0.
2919 (yyerrorlab, yyreturn): Pop the RHS.
2920 Reorder a bit to emphasize the `shifting' bits of code.
2921 (YYPOPSTACK): Now accept a number of items to pop.
2922 * data/lalr1.cc: Likewise.
2923 * data/glr.c: Formatting changes.
2924 Use goto instead of fall through.
2925 * doc/bison.texinfo (Destructor Decl): Complete.
2926
d508c281
JMG
29272005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2928
2929 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2930 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2931 * djgpp/config.bat: Replace every occurence of the file name
2932 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2933 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2934 * djgpp/config.sed: Replace every occurence of the file name
2935 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2936 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2937 * djgpp/djunpack.bat: DJGPP specific file.
2938 * djgpp/fnchange.lst: DJGPP specific file.
2939 * djgpp/README.in: Add new information about how to unpack the bison
2940 source on MSDOS and other systems which have 8.3 file name restrictions
2941 using djunpack.bat and fnchange.lst.
2942
3e7a2cd9
PE
29432005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 * bootstrap (build_cvs_prefix): Remove; unused.
2946 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2947 when getting gnulib.
2948
29492005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2950
2951 * data/glr.c: Reorder typedef declarations for structs to match order
2952 of struct declarations.
2953 Rename yystack everywhere to yystackp except in yyparse where it's not
2954 a pointer.
2955 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2956 consistency.
2957 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2958 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2959 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2960 lint.
2961
877519f8
PE
29622005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2963
0eca5a39
PE
2964 * tests/sets.at (Accept): Fix typos in regular expression used to
2965 sed out the final state number.
2966
2cec9080
PE
2967 Work around portability problem on Solaris 10: flex-generated
2968 files include <stdio.h> before <config.h>, which messes up
2969 because the latter defines __EXTENSIONS__. Address the problem
2970 by creating two new little files that include <config.h> first,
2971 then include the flex-generated files. Rewrite everyone else
2972 to include <config.h> first, as well.
2973 * lib/timevar.c: Always include "config.h".
2974 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2975 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2976 (EXTRA_bison_SOURCES): New macro.
2977 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2978 * src/system.h: Don't include config.h.
2979 * src/LR0.c: Include <config.h> first.
2980 * src/assoc.c: Likewise.
2981 * src/closure.c: Likewise.
2982 * src/complain.c: Likewise.
2983 * src/conflicts.c: Likewise.
2984 * src/derives.c: Likewise.
2985 * src/files.c: Likewise.
2986 * src/getargs.c: Likewise.
2987 * src/gram.c: Likewise.
2988 * src/lalr.c: Likewise.
2989 * src/location.c: Likewise.
2990 * src/main.c: Likewise.
2991 * src/muscle_tab.c: Likewise.
2992 * src/nullable.c: Likewise.
2993 * src/output.c: Likewise.
2994 * src/parse-gram.y: Likewise.
2995 * src/print.c: Likewise.
2996 * src/print_graph.c: Likewise.
2997 * src/reader.c: Likewise.
2998 * src/reduce.c: Likewise.
2999 * src/relation.c: Likewise.
3000 * src/state.c: Likewise.
3001 * src/symlist.c: Likewise.
3002 * src/symtab.c: Likewise.
3003 * src/tables.c: Likewise.
3004 * src/uniqstr.c: Likewise.
3005 * src/vcg.c: Likewise.
3006
877519f8
PE
3007 * src/parse-gram.y: Fix minor problems uncovered by lint.
3008 (current_lhs, current_lhs_location): Now static.
3009 (current_assoc): Remove unused variable.
3010
3011 Cleanups so that Bison-generated parsers have less lint.
3012 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3013 Prepend /*ARGSUSED*/, for lint's sake.
3014 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3015 definition if 'lint' is defined.
3016 (YYID): New macro (or function, if lint).
3017 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3018 * data/yacc.c: Likewise.
3019 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3020 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3021 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3022 is C++ only.
3023 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3024 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3025 Use YYID(0) rather than 0, for lint.
3026 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3027 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3028
f5228370
PE
30292005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3030
3031 * tests/glr-regression.at
3032 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3033 Close memory leak reported by twlevo.
3034
69ce078b
PE
30352005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3036
6ff99711
PE
3037 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3038 all stacks.
3039 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
3040 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3041 New test case.
3042 (Duplicated user destructor for lookahead): This test now is expected
3043 to succeed.
3044
af3412cd
PE
30452005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3046
32b5b719 3047 * NEWS: Document the following change.
af3412cd
PE
3048 * data/yacc.c: Say "parser skeleton" rather than "file", since
3049 it's no longer just a file.
3050 * data/glr.c: Grant a special exception for C GLR parsers, that
3051 reads like the already-existing exception for C LALR(1) parsers.
3052 * data/glr.cc: Likewise.
3053 * data/lalr1.cc: Likewise.
3054 * data/location.cc: Likewise.
3055 * data/yacc.c: Reword the "written by" statement to clarify that
3056 it was the parser skeleton, not the entire output file.
3057 * data/glr.c: Written by Paul Hilfinger.
3058 * data/glr.cc: Written by Akim Demaille.
3059 * data/lalr1.cc: Likewise.
3060
035aa4a0
PE
30612005-11-18 Paul Eggert <eggert@cs.ucla.edu>
3062
d9963c85
PE
3063 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
3064 Fix typos in previous change that broke 'make check'.
3065 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
3066 supported in C.
3067 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
3068 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
3069 We can revert this once things settle down.
3070
035aa4a0
PE
3071 * src/conflicts.c (conflicts_print): Don't print file name twice
3072 when %expect fails because there were no conflicts.
3073 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
3074 change.
3075 * tests/conflicts.at (%expect not enough, %expect too much):
3076 (%expect with reduce conflicts): Adjust to new behavior.
3077
30782005-11-18 Akim Demaille <akim@epita.fr>
3079
3080 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
3081 errors.
3082 * NEWS: Document this.
3083 * doc/bison.texinfo (Expect Decl): Likewise.
3084
d1ff7a7c
AD
30852005-11-16 Akim Demaille <akim@epita.fr>
3086
3087 Generalize the display of semantic values and locations in traces.
3088 * data/glr.c (yy_reduce_print): Fix indices (again).
3089 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
3090 literal integers.
3091 * data/lalr1.cc (yyreduce_print): Rename as...
3092 (yy_reduce_print): this.
3093 Display values and locations.
3094 * data/yacc.c (yy_reduce_print): Likewise.
3095 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
3096 (yysymprint): Move higher to be visible from yy_reduce_print).
3097 (yyparse): Adjust.
3098 * tests/calc.at: Adjust the expected length of the traces.
3099
6de5398d
AD
31002005-11-14 Akim Demaille <akim@epita.fr>
3101
3102 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
3103 from 1 to N, while values and location start at 0.
3104 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
3105
a1373f55
AD
31062005-11-14 Akim Demaille <akim@epita.fr>
3107
3108 * data/glr.c (yy_reduce_print): Fix the $ number.
3109
613d8952
AD
31102005-11-14 Akim Demaille <akim@epita.fr>
3111
3112 "Use" parse parameters.
3113 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
3114 * data/glr.c, data/glr.cc: Use them.
3115 * data/glr.c (YYUSE): Have a C++ definition that supports
3116 non-pointer types.
3117
b2741627
AD
31182005-11-14 Akim Demaille <akim@epita.fr>
3119
3120 * data/glr.c (yyexpandGLRStack): Declare only if defined.
3121
5059b5c8
AD
31222005-11-14 Akim Demaille <akim@epita.fr>
3123
42249483
AD
3124 * data/glr.cc: New.
3125 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 3126
4626a15d
AD
31272005-11-12 Akim Demaille <akim@epita.fr>
3128
3129 Let position and location be PODs.
3130 * data/location.cc (position::initialize, location::initialize): New.
3131 (position::position, location::location): Define only if
3132 b4_location_constructors is defined.
3133 * data/lalr1.cc (b4_location_constructors): Define it for backward
3134 compatibility.
3135 * doc/bison.texinfo (Initial Action Decl): Use initialize.
3136
31372005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
3138
3139 * data/lalr1.cc: Move the body of the ctor and dtor into the
3140 parser file (instead of the header).
3141 Wrap the implementations in a "namespace yy".
3142
31432005-11-12 Akim Demaille <akim@epita.fr>
3144
3145 Have glr.c include its header file when created.
3146 * data/glr.c (b4_shared_declarations): New.
3147 Output them verbatim in the parser if !%defines, otherwise
3148 output then in the header file, and include it instead.
3149
1989d947
AD
31502005-11-11 Akim Demaille <akim@epita.fr>
3151
3152 * data/glr.c: Comment changes.
3153
31542005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
3155
3156 When yydebug, report semantic and location values for reductions.
3157 * data/glr.c (yy_reduce_print): Report the semantic values and the
3158 locations.
3159 (YY_REDUCE_PRINT): Adjust.
3160 (yyglrReduce): Use them.
3161 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
3162 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
3163 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
3164 traces.
3165
02998094
AD
31662005-11-10 Akim Demaille <akim@epita.fr>
3167
3168 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
3169 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
3170 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
3171
5210672f
PE
31722005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
3173
3174 * m4/cxx.m4, examples/Makefile.am: Don't build
3175 examples/calc++ if no C++ compiler is available. (trivial change)
3176
a8991a1d
AD
31772005-11-09 Akim Demaille <akim@epita.fr>
3178
3179 * src/scan-skel.l: Use a couple of asserts.
3180
36b5e963
AD
31812005-11-03 Akim Demaille <akim@epita.fr>
3182
3183 In some (weird) cases, the final state number is incorrect.
3184 Reported by Alexandre Duret-Lutz.
3185 * src/LR0.c (state_list_append): Remove the computation of
3186 final_state.
3187 (save_reductions): Do it here.
3188 (get_state): Alpha conversion.
3189 (generate_states): Use a for loop.
3190 * src/gram.h (item_number_is_rule_number)
3191 (item_number_is_symbol_number): New.
3192 * src/state.c: Use assert.
3193 * src/system.h: Include assert.h.
3194 * tests/sets.at (Accept): New.
3195
44e7ead1
PH
31962005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3197
3198 * data/glr.c (yyfill): Adjust comment.
36b5e963 3199 (yyresolveAction): Initialize default location properly
44e7ead1
PH
3200 for empty right-hand sides.
3201 (yydoAction): Ditto.
3202 Add comment explaining apparently dead code.
36b5e963
AD
3203 * tests/glr-regression.at
3204 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 3205 New test.
36b5e963 3206
e10a80ee
PE
32072005-10-30 Paul Eggert <eggert@cs.ucla.edu>
3208
3209 * bootstrap (cleanup_gnulib): New function. Use it to clean up
3210 gnulib when interrupted. This fixes some race conditions and
3211 works around some portability problems (one noted by Paul
3212 Hilfinger).
3213
067b32ee
AD
32142005-10-22 Akim <akim@epita.fr>
3215
3216 * Makefile.cfg: Adjust to config -> build-aux.
3217 Reported by twledo.
3218
4b367315
AD
32192005-10-21 Akim Demaille <akim@epita.fr>
3220
3221 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3222 the %parse-params.
3223 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3224 * data/yacc.c (b4_Pure_if): Rename as...
3225 (b4_yacc_pure_if): this.
3226 (YY_SYMBOL_PRINT, yyparse): Adjust.
3227 * doc/bison.texinfo: Formatting changes.
3228
24cc23d9
AD
32292005-10-21 Akim Demaille <akim@epita.fr>
3230
3231 Finish the transition config -> build-aux.
3232 * configure.ac, Makefile.am: Use build-aux.
3233 * config/prev-version, config/announce-gen, config/Makefile.am:
3234 Move to...
3235 * build-aux/prev-version, build-aux/announce-gen,
3236 * build-aux/Makefile.am: here.
3237
d4476375
AD
32382005-10-14 Akim Demaille <akim@epita.fr>
3239
3240 * examples/calc++/test: Use set -x only when VERBOSE.
3241
302c0aee
PE
32422005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3243
3244 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3245 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3246
7625ec2c
AD
32472005-10-13 Akim Demaille <akim@epita.fr>
3248
3249 * src/scan-skel.l: Output the base name parts of the parser and
3250 header file names.
302c0aee 3251 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
3252 additional checks.
3253 Use this to exercise C++ outputs in subdirs.
3254 Reported by Oleg Smolsky.
3255
ba0fe3c7
PE
32562005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3257
3258 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3259 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3260 Problem reported by John P. Hartmann.
3261 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3262 already defined it.
3263
9b8a5ce0
AD
32642005-10-12 Akim Demaille <akim@epita.fr>
3265
3266 * src/parse-gram.y (version_check): Exit 63 to please missing
3267 (stands for "version mismatch).
3268 * tests/input.at, doc/bison.texinfo: Adjust.
3269
4f6e011e
PE
32702005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3271
3272 Work around portability problems with Visual Age C compiler
3273 (xlc and xlC_r) reported by John P. Hartmann.
3274 * data/location.cc (initial_column, initial_line): Remove.
3275 All uses replaced by 0 and 1.
3276 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3277 that xlc complains about.
3278 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 3279 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 3280 as __STDC__.
4d7aa45e
PE
3281 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3282 __STDC_VERSION__. Use it everywhere instead of looking at
3283 __STDC__ and __cplusplus.
4f6e011e 3284
a1b3bf8c
AD
32852005-10-10 Akim Demaille <akim@epita.fr>
3286
3287 * examples/calc++/test: Be quiet unless VERBOSE.
3288
412e44aa
PE
32892005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3290
2a4647a3
PE
3291 * data/c.m4 (yydestruct, yysymprint):
3292 Use YYUSE instead of casting to void.
3293 * data/glr.c (YYUSE): New macro.
3294 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3295 Use it instead of rolling our own.
3296 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3297 (YYCHK1):
3298 Use /*CONSTCOND*/ to suppress lint warnings.
3299 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3300 (YY_STACK_PRINT): Use 'false' not '0'.
3301 (YYUSE): New macro.
3302 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3303 * data/yacc.c (YYUSE): New macro.
3304 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3305 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3306 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3307
3308
412e44aa
PE
3309 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3310 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3311
88c6637f
PE
33122005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3313
2f4f028d
PE
3314 Undo the parts of the unlocked-I/O change that substituted
3315 putc or puts for printf. This might hurt performance a bit,
3316 but some people prefer the printf style.
3317 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3318 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3319 All uses replaced by YYFPRINTF and YYDPRINTF.
3320 * data/yacc.c: Likewise.
3321 * lib/bitset.c (bitset_print): Likewise.
3322 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3323 putc and puts.
3324 * lib/lbitset.c (debug_lbitset): Likewise.
3325 * src/closure.c (print_firsts, print_fderives): Likewise.
3326 * src/gram.c (grammar_dump): Likewise.
3327 * src/lalr.c (look_ahead_tokens_print): Likewise.
3328 * src/output.c (escaped_output): Likewise.
3329 (user_actions_output): Break apart two printfs.
3330 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3331 * src/reduce.c (reduce_print): Likewise.
3332 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3333 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3334
88c6637f
PE
3335 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3336 Use assignments rather than casts-to-void to suppress
3337 unused-variable warnings. This pacifies 'lint'.
3338 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3339 unused-variable warnings.
3340
fb32e373
JMG
33412005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3342
3343 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3344
edb8f44f
PE
33452005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3346
fb9c0b33
PE
3347 Use unlocked I/O for a minor performance improvement on hosts like
3348 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3349 is to use the gnlib unlocked-io module, and to prefer putc and
3350 puts to printf when either will work (since the latter doesn't
3351 come in an unlocked flavor).
3352 * bootstrap (gnulib_modules): Add unlocked-io.
3353 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3354 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3355 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3356 and similarly for puts and putc and printf.
3357 * data/yacc.c: Likewise.
3358 * lib/bitset.c (bitset_print): Likewise.
3359 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3360 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3361 to printf.
3362 * lib/lbitset.c (debug_lbitset): Likewise.
3363 * src/closure.c (print_firsts, print_fderives): Likewise.
3364 * src/gram.c (grammar_dump): Likewise.
3365 * src/lalr.c (look_ahead_tokens_print): Likewise.
3366 * src/output.c (escaped_output): Likewise.
3367 (user_actions_output): Coalesce two printfs.
2f4f028d 3368 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
3369 * src/reduce.c (reduce_print): Likewise.
3370 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 3371 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 3372
edb8f44f
PE
3373 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3374 this confuses xgettext.
3375
b50d2359
AD
33762005-10-02 Akim Demaille <akim@epita.fr>
3377
3378 * bootstrap (gnulib_modules): Add strverscmp.
3379 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3380 * m4/.cvsignore: Add strverscmp.m4.
3381 * src/parse-gram.y (%require): New token, new rule.
3382 (version_check): New.
3383 * src/scan-gram.l (%require): Adjust.
3384 * tests/input.at (AT_REQUIRE): New.
3385 Use it.
3386 * doc/bison.texinfo (Require Decl): New.
3387 (Calc++ Parser): Use %require.
3388
21667f64
AD
33892005-10-02 Akim Demaille <akim@epita.fr>
3390
3391 * data/location.cc: New.
3392
2b81e969
AD
33932005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3394 Akim Demaille <akim@epita.fr>
3395
3396 Make sure -odir/foo.cc creates dir/location.hh etc.
3397 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3398 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3399 (spec_defines_file): Now const.
3400 (dir_prefix): New.
3401 (short_base_name): Remove.
3402 * src/files.c: Adjust.
3403 (dirname.h): Include.
3404 (base_name): Don't prototype it.
3405 (finput): Remove, duplicates gram_in.
3406 (full_base_name, short_base_name): Replace by...
3407 (all_but_ext, all_but_tab_ext): these.
3408 (compute_base_names): Rename as...
3409 (compute_file_name_parts): this.
3410 Update to compute the new variables, including dir_prefix.
3411 Adjust dependencies.
3412 * src/output.c (prepare): Output them.
3413 * src/reader.c: Adjust to use gram_in, not finput.
3414 * src/scan-skel.l (@dir_prefix@): New.
3415
ad6a9b97
JMG
34162005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3417
3418 * lib/subpipe.c: New function end_of_output_subpipe() added
3419 to allow support for non-posix systems. This is a no-op function
3420 for posix systems.
3421
3422 * lib/subpipe.h: New function end_of_output_subpipe() added
3423 to allow support for non-posix systems. This is a no-op function
3424 for posix systems.
3425
3426 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3427 handle the lack of pipe/fork functionality on non-posix systems.
3428
3429 * djgpp/Makefile.maint: DJGPP specific file.
3430
3431 * djgpp/README.in: DJGPP specific file.
3432
3433 * djgpp/config.bat: DJGPP specific configuration file.
3434
3435 * djgpp/config.sed: DJGPP specific configuration file.
3436
3437 * djgpp/config.site: DJGPP specific configuration file.
3438
3439 * djgpp/config_h.sed: DJGPP specific configuration file.
3440
3441 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3442
3443 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3444
fc695704
AD
34452005-10-02 Akim Demaille <akim@epita.fr>
3446
3447 * data/location.cc: New, extract from...
3448 * data/lalr1.cc: here.
3449 (location.hh): Include it after the user prologue, in case the
3450 filename type is defined by the user.
3451 Forward declation location and position before the pre-prologue.
3452 (yyresult_): Rename as...
3453 (yyresult): this, it's a local variable, not an attribute.
3454 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3455
34562005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
3457
3458 * examples/extexi: Restore the #line generation.
3459
fb9712a9
AD
34602005-09-30 Akim Demaille <akim@epita.fr>,
3461 Alexandre Duret-Lutz <adl@gnu.org>
3462
3463 Move the token type and YYSTYPE in the parser class.
3464 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3465 (parser::token): New, from the moved free definition of tokens.
3466 (parser::semantic_value): Now a full definition instead of an
3467 indirection to YYSTYPE.
3468 (b4_post_prologue): No longer included in the header file, but
3469 in the implementation file.
3470 * doc/bison.texi (C+ Language Interface): Update.
3471 * src/parse-gram.y: Support unary %define.
3472 * tests/actions.at: Define global_tokens_and_yystype for backward
3473 compatibility until we update the tests.
3474 * tests/calc.at: Idem.
3475 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3476 to simplify the code.
3477
55f0c7b1
PE
34782005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3479
3480 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3481 Ah, the good old days! Problem reported by Peter Klein.
3482 * bootstrap (gnulib_modules): Add strerror, strtoul.
3483 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3484 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3485
fb9712a9 34862005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
3487
3488 * data/c.m4 (b4_error_verbose_if): New.
3489 * data/lalr1.cc: Use it.
3490 (YYERROR_VERBOSE_IF): Remove.
3491 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3492 parser members, replaced by...
3493 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3494 local variables.
3495 (yysyntax_error_): Takes the state number as argument.
3496 (yyreduce_print_): Use the argument yyrule, not the former
3497 attribute yyn_.
3498
8a6f72f3
PE
34992005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3500
3501 * bootstrap (gnulib_modules): Add verify.
3502 * lib/.cvsignore: Add verify.h.
3503 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3504 * src/system.h (verify): Remove.
3505 Include verify.h instead.
3506 * src/tables.c (tables_generate): Use new API for 'verify'.
3507
0d50976f
PE
35082005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3509
ebc3737e
PE
3510 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3511 local variables whose names begin with 'yy'.
3512 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3513 Trivial changes from Joel E. Denny.
3514
0d50976f
PE
3515 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3516 it itself.
3517 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3518 don't use alloca any more.
3519
3520 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3521 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 3522 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
3523 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3524 to match yacc.c, to test more hosts.
3525
a05b79df
PE
35262005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3527
55289366
PE
3528 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3529 doesn't affect behavior.
3530 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3531 Solaris, AIX, MSC.
3532 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3533 This works a bit better with glibc, if user code has already included
3534 stdlib.h.
3535 * doc/bison.texinfo (Bison Parser): Document that users can't
3536 arbitrarily use malloc and free for other purposes. Document
3537 that <alloca.h> and <malloc.h> might be included.
3538 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3539 user must declare alloca.
3540
a05b79df
PE
3541 * HACKING (release): Forwarn the Translation Project about
3542 stable releses.
3543
3ab2ca22
AD
35442005-09-20 Akim Demaille <akim@epita.fr>
3545
3546 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3547
a9739e7c
PE
35482005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3549
a702593e
PE
3550 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3551 (YYSTACK_ALLOC_MAXIMUM): Use it.
3552 (yysyntax_error): New function.
3553 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3554 multiple syntax errors are reported, and alloca is being used.
3555 Instead, reallocate buffers twice as big each time, so that
3556 we waste at most half the allocated memory. Start with a small
3557 (128-byte) buffer that will suffice in most cases anyway.
3558 Use yysyntax_error to do most of the work.
3559
3560 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3561 yynerrs is the number of errors reported, not the number of
3562 errors encountered.
3563
a9739e7c
PE
3564 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3565 Mark it as expected to fail.
3566 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3567 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3568 Don't start user-code symbols with "yy", to avoid name space problems.
3569
f479c6c6
AD
35702005-09-19 Akim Demaille <akim@epita.fr>
3571
3572 Remove the traits, failed experiment.
3573 It never proved useful, and anyway because of the current
3574 definition, it was not possible to have several specialization of
3575 this traits, making it useless.
3576 * data/lalr1.cc (yy:traits): Remove.
3577 Inline its definitions in the parser class.
3578
e2586f82
AD
35792005-09-19 Akim Demaille <akim@epita.fr>
3580
3581 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3582 least Mac OSX with a /usr/local install of gettext.
3583
2e8cf949
AD
35842005-09-19 Akim Demaille <akim@epita.fr>
3585
3586 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3587 and yytoken for similarity with the other skeletons.
3588
c7fb0b90
AD
35892005-09-19 Akim Demaille <akim@epita.fr>
3590
4e26c69e 3591 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 3592
1bd0deda
PE
35932005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3594
3595 * NEWS: Version 2.1.
3596
3597 * NEWS: Remove notice of yytname change, since it was never in an
3598 official release.
3599 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3600 diagnostic.
3601 * src/output.c (prepare): Likewise.
3602 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3603 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3604 is not defined. This is an awful hack, but it's enough for now.
3605 All callers changed.
3606 * tests/glr-regression-at (make_value): Args are const pointers now,
3607 to avoid GCC warning.
3608 (Duplicated user destructor for lookahead): New test. Currently
3609 skipped. It fails on my host but I'm not sure it'll always fail.
3610
36112005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
3612
3613 * src/symtab.h (struct symbol): Declare the printer and destructor
3614 as const, to avoid accidental calls to free.
3615 (symbol_destructor_set, symbol_printer_set): Adjust.
3616 * src/symtab.c: Adjust.
3617
1bd0deda 36182005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
3619
3620 * data/c.m4 (b4_token_enums): New.
3621 (b4_token_defines): Rename as...
3622 (b4_token_enums_defines): this.
3623 (b4_token_defines): New, output only the #defines.
3624 * data/yacc.c, data/glr.c: Adjust.
3625 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3626 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3627 as default values.
3628
dbcdae2d
AD
36292005-09-16 Akim Demaille <akim@epita.fr>
3630
3631 * data/lalr1.cc (yylex_): Remove, inline its code.
3632 (yyreport_syntax_error_): Remove, replaced by...
3633 (yysyntax_error_): this which returns a string and leaves to the
3634 caller the call to the users' error function.
3635 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3636 Move from members of the parser object...
3637 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3638 to local variables of the parse function.
3639
70d8f291
AD
36402005-09-16 Akim Demaille <akim@epita.fr>
3641
3642 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3643 since it's in Bison's name space.
3644
b47dbebe
PE
36452005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3646
ae199bf1
PE
3647 * data/glr.c (yyresolveValue): Add default case to pacify
3648 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3649
b47dbebe
PE
3650 * NEWS: Document when yyparse started to return 2.
3651 * doc/bison.texinfo (Parser Function): Document when yyparse
3652 returns 2.
3653
3654 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3655 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3656 changed.
3657 (class position): file_name -> filename (reverting). All uses changed.
3658
36592005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3660
3661 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3662 do anything if $@ exists. This reverts part of the 2005-07-07
3663 patch.
3664
00292f66
PE
36652005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3666
3667 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3668 contains obsolete information and isn't worth distributing as a
3669 separate file anyway.
3670 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3671 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3672 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3673 (yyparse): Abort if user code uses longjmp to throw an unexpected
3674 value.
3675
a420f962
PE
36762005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3677
00292f66
PE
3678 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3679 Suggested by twlevo@xs4all.nl.
3680
127287e9
PE
3681 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3682 This avoids a diagnostic from gcc -Wswitch-enum.
3683 Problem reported by twlevo@xs4all.nl.
3684
a420f962
PE
3685 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3686 standards. Use "file name" or "file" or "name", depending on
3687 the context.
3688 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3689 not to hack/foo.tab.c.
3690 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
3691 * data/glr.c: b4_filename -> b4_file_name.
3692 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3693 All uses changed.
3694 (class position): filename -> file_name. All uses changed.
3695 * data/yacc.c: b4_filename -> b4_file_name.
3696 * lib/bitset.h: filename -> file_name in local vars.
3697 * lib/bitset_stats.c: Likewise.
3698 * src/files.c: Likewise.
3699 * src/scan-skel.l ("@output ".*\n): Likewise.
3700 * src/files.c (file_name_split): Renamed from filename_split.
3701 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
3702
37032005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3704
3705 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3706 to accommodate latest gnulib.
3707
3708 * tests/glr-regression.at (Duplicate representation of merged trees):
3709 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3710
3711 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3712 needed.
3713
42a6501d
PE
37142005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3715
3716 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3717 All uses changed. Invoke user destructor after an error during a
3718 split parse (trivial change from Joel E. Denny).
3719
3720 * tests/glr-regression.at
3721 (User destructor after an error during a split parse): New test case.
3722 Problem reported by Joel E. Denny in:
3723 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3724
ef9a1faf
PE
37252005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3726
5b4aaf78
PE
3727 * README-cvs: Give URLs for recommended tools.
3728 Mention Gzip version problem, and bootstrapping issues.
3729 Remove troubleshooting section, as it's somewhat obsolete.
3730
b5240ba5
PE
3731 * bootstrap (no_cache): New var, to accommodate different wget
3732 variants. Use it instead of '-C off'. Problem reported by
3733 twlevo@xs4all.nl.
3734
ef9a1faf
PE
3735 * data/glr.c (yydestroyStackItem): New function.
3736 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3737 debugging information. Problem reported by Joel E. Denny.
3738
e6efa9da
AD
37392005-08-25 Akim Demaille <akim@epita.fr>
3740
3741 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3742
adc90f13
PE
37432005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3744
3745 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3746 Don't invoke destructor on unresolved entries.
3747 * tests/glr-regression.at
3748 (User destructor for unresolved GLR semantic value): New test case.
3749 Problem reported by Joel E. Denny in:
3750 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3751
f9315de5
PE
37522005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3753
15d29c1f
PE
3754 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3755 Add strnlen.c.
3756 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3757 lib-prefix.m4, po.m4.
3758
dd5f2af2
PE
3759 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3760 in yydestruct diagnostic, since it might not be an error.
3761 Problem reported by Joel Denny near end of
3762 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 3763 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
3764 * data/yacc.c (yyreturn): Likewise.
3765 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3766
3767 * src/files.c: Remove obsolete FIXME comment.
3768
3769 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3770 with the other templates, and to fix bogus run-on messages such
3771 as the one reported at the end of
3772 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3773 All callers changed to avoid the newline.
3774 (yyprocessOneStack): Output two lines rather than one, to accommodate
3775 the above change. This changes the debug output format slightly.
3776
f9315de5
PE
3777 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3778 reported by Joel E. Denny in
3779 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3780 (trivial change).
3781 * tests/glr-regression.at (Duplicate representation of merged trees):
3782 New test, from Joel E. Denny in:
3783 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3784 * THANKS: Add Joel E. Denny.
3785
3786 * configure.ac (AC_INIT): Bump to 2.0c.
3787
04098407
PE
37882005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3789
3790 * NEWS: Version 2.0b.
3791
ca5d2013
PE
3792 * Makefile.am (SUBDIRS): Put examples before tests, so that
3793 "make check" doesn't finish with "All 1 tests passed".
3794
3d54b576
PE
3795 * tests/regression.at (Token definitions): Don't rely on
3796 AT_PARSER_CHECK for data that contains backslashes. It currently
3797 uses 'echo', and 'echo' isn't portable if its argument contains
3798 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3799 that the byte '\0xff' is not printable in the C locale; it is,
3800 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3801 not printable, so use '\0x81' to test.
3802
d53ae497
PE
3803 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3804 version of GCC, since the macro is used with non-GCC compilers.
3805
fc01665e
PE
3806 Fix core dump reported by Pablo De Napoli in
3807 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3808 * tests/regression.at (Invalid inputs with {}): New test.
3809 * src/parse-gram.y (token_name): Translate type before using
3810 it as an index.
3811
04098407
PE
3812 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3813 the user's name space. All uses changed to __attribute__
3814 ((__unused__)).
3815 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3816 Add __attribute__ ((__noreturn__)).
3817
3818 * etc/clcommit: Remove. We weren't using it, and it failed
3819 "make maintainer-distcheck".
3820 * Makefile.maint: Merge from coreutils.
3821 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3822 (syntax-check-rules): Change list of rules as described below.
3823 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3824 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3825 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3826 (sc_trailing_space): New rules.
3827 (sc_xalloc_h_in_src): Remove.
3828 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3829 (sc_space_tab, sc_error_exit_success, sc_changelog):
3830 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3831 (makefile-check, po-check, author_mark_check):
3832 (makefile_path_separator_check, copyright-check):
3833 Use grep -n, to make it easier to find violations.
3834 Use CVS_LIST and CVS_LIST_EXCEPT.
3835 (header_regexp, h_re): Remove.
3836 (dd_c): New macro.
3837 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3838 (my-distcheck): Use more-modern GCC flags.
3839 (signatures, %.asc): Remove.
3840 (rel-files, announcement): Remove signatures.
3841 Restore old updating code, even though we don't use it, so
3842 that we're the same as coreutils.
3843 (alpha, beta, major): Depend on news-date-check.
3844 Make the upload commands.
3845
3846 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3847 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3848 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3849 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3850 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3851 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3852 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3853 * tests/sets.at: Likewise.
3854
3855 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3856 we comment out the Autoconf version number.
3857 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3858 it's error-prone and "make maintainer-distcheck" rejects it.
3859
3860 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3861 Indent calls to "error" to pacify "make maintainer-distcheck",
3862 when the calls are not intended to be translated.
3863 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3864
3865 * src/Makefile.am (DEFS): Use +=, to pacify
3866 "make maintainer-distcheck".
3867 (bison_SOURCES): Add scan-skel.h.
3868 (sc_tight_scope): New rule, from coreutils.
3869
3870 * src/files.c (src_extension, header_extension):
3871 Now static, not extern.
3872 * src/getargs.c (short_options): Likewise.
3873 * src/muscle_tab.c (muscle_table): Likewise.
3874 * src/parse-gram.y (current_class, current_type, current_prec):
3875 Likewise.
3876 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3877 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3878 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3879 void, to avoid warning when NLS is disabled.
3880 * src/output.c: Include scan-skel.h.
3881 (scan_skel): Remove decl, since scan-skel.h does this.
3882 (output_skeleton):
3883 Indent calls to "error" to pacify "make maintainer-distcheck".
3884 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3885 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3886 "make maintainer-distcheck".
3887 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3888 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3889 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3890 (skel_lex_destroy, scan_skel): Move these decls to...
3891 * src/scan-skel.h: New file.
3892 * src/uniqstr.c (uniqstr_assert):
3893 Indent calls to "error" to pacify "make maintainer-distcheck".
3894
3895 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3896 not @VAR@.
3897
3898 * tests/torture.at: Revamp to avoid misuse of atoi that
3899 "make maintainer-distcheck" complained about.
3900
3901 * examples/extexi (message): Don't print a message more than once,
3902 and omit line-number decoration that makes Emacs compile think
3903 that informative messages are worth worrying about.
3904
39052005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3906
3907 * configure.ac: Update version number.
3908
3909 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3910 accidentally.
3911 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3912 autogenerated by the maintainer.
3913 * examples/calc++/.cvsignore: Add *.yy.
3914
3915 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3916 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3917 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3918
3919 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3920
3921 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3922 from maintainer-distcheck about casting the argument of 'free'.
3923
3924 * NEWS: Mention recent yytname changes.
3925 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3926
3927 * bootstrap: For translations that have not yet been upgraded to
3928 the new runtime-po domain, prime the pump by extracting the
3929 relevant strings from the obsolete translations. This code can be
3930 removed once the bison-runtime domain has been translated by each
3931 team.
3932
3933 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3934 now that token names are already quoted.
3935
3936 Fix problem reported by Anthony Heading.
3937 * data/glr.c (YYTOKEN_TABLE): New macro.
3938 (yytname): Define if YYTOKEN_TABLE.
3939 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3940 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3941 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3942 * src/output.c (prepare_symbols): Output token_table_flag.
3943
0ffda363
PE
39442005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3945
3946 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3947 again if the first call fails.
3948
3949 * data/glr.c (yytnamerr): New function.
3950 (yyreportSyntaxError): Use it to dequote most string literals.
3951 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3952 with other skeletons. All uses changed.
3953 (yytnameerr_): New function.
3954 (yyreport_syntax_error): Use it to dequote most string literals.
3955 * data/yacc.c (yytnamerr): New function.
3956 (yyerrlab): Use it to decode most string literals.
3957 * doc/bison.texinfo (Decl Summary, Calling Convention):
3958 Clarify quoting convention of yytname.
3959 * src/output.c (prepare_symbols): Quote all names. This undoes
3960 the 2005-04-17 change, which is now accomplished (mostly) via
3961 changes in the parsers as described above.
3962 * tests/regression.at (Token definitions, Web2c Actions):
3963 Undo most 2005-04-17 change here, too.
3964
39652005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3966
3967 Fix more problems reported by twlevo@xs4all.nl.
3968 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3969 remove trailing spaces. This loses the exit status of ./types,
3970 and isn't needed since ./types shouldn't be emitting trailing
3971 spaces.
3972 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3973 as the stack isn't valid in that case.
3974
3975 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3976 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3977 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3978 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3979 is used.
3980 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3981 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3982 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3983 Likewise.
3984
3985 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3986 overly-picky compilers that reject 'char *foo = "bar";'.
3987
3988 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3989 to FILE * parameter, not to stderr. This fixes a typo introduced
3990 in the 2005-07-12 change.
3991
3992 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3993 warnings from GCC 4.
3994
3995 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3996 (yyglrShiftDefer, yysplitStack):
3997 Remove unused parameters b4_pure_formals. All uses changed.
3998 (yyglrShift): Remove unused parameters b4_user_formals.
3999 All uses changed.
4000 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4001
6100a9aa
PE
40022005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4003
258b75ca
PE
4004 Destructor cleanups and regularization among the three skeletons.
4005 * NEWS: Document the behavior changes.
4006 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4007 stack before failing, as the cleanup code will do it for us now.
4008 * data/lalr1.cc (yyerrlab): Likewise.
4009 * data/glr.c (yyparse): Pop everything off the stack before
4010 freeing it, so that destructors get called properly.
4011 * data/lalr1.cc (yyreturn): Likewise.
4012 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4013 This is more consistent.
4014 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4015 why destructors might be called. 1.875 -> 2.1.
4016 (Destructor Decl, Decl Summary, Table of Symbols):
4017 Some English-language cleanups for %destructor.
4018 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4019 Add output line for destructor of start symbol.
4020 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4021 because of that same extra output line.
4022
1a059451
PE
4023 * NEWS: Document minor wording changes in diagnostics of
4024 Bison-generated parsers.
4025 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4026 Remove unused formals. All uses changed.
4027 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4028 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4029 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4030 Rename yyoverflowab to yyexhaustedlab.
4031 When memory exhaustion occurs during syntax-error reporting,
4032 report it separately rather than in a single diagnostic; this
4033 eases translation.
4034 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4035 (Memory Exhausted): Renamed from Parser Stack Overflow.
4036 Revamp wording slightly to prefer "memory exhaustion".
4037 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4038
97460c78
PE
4039 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4040
30757c8c
PE
4041 Add i18n support to the GLR skeleton. Partially fix the C++
4042 skeleton; a C++ expert needs to finish this. Remove debugging
4043 msgids; there's little point to having them translated, since they
4044 can be understood only by someone who can read the
4045 (English-language) source code.
4046
4047 Generate runtime-po/bison-runtime.pot automatically, so that we
4048 don't have to worry about garbage getting in that file. We'll
4049 make sure after the next official release that old msgids don't
4050 get lost. See
4051 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4052
4053 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4054 Now auto-generated.
4055 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4056 Fix typos in explanations of the runtime file.
4057 * bootstrap: Change gettext keyword from YYI18N to YY_.
4058 Use standard Makefile.in.in in runtime-po, since we'll arrange
4059 for backward-compatible bison-runtime.po files in a different way.
4060 * data/glr.c (YY_): New macro, from yacc.c.
4061 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
4062 Translate messages intended for users.
4063 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
4064 the wording in the other skeletons. We don't know that the memory
4065 is virtual.
4066 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
4067 Use same method that yacc.c uses.
4068 Don't translate debugging messages.
4069 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
4070 it doesn't work (yet), and requires C++ expertise to fix.
4071 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
4072 Move defn to a more logical place, to be consistent with other
4073 skeletons.
4074 Don't translate debugging messages.
4075 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
4076 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
4077 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
4078 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
4079
ac8c5689
PE
4080 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
4081 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
4082 void, not int.
4083 * tests/glr-regression.at (Badly Collapsed GLR States):
4084 Likewise.
4085 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4086 yylex should return 0 at EOF rather than aborting.
4087
6100a9aa
PE
4088 Improve tests for stack overflow in GLR parser.
4089 Problem reported by twlevo@xs4all.nl.
4090 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
4091 All uses removed.
4092 (yyStackOverflow): Just longjmp, but with value 2 so that caller
4093 can handle the problem.
4094 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
4095 (yyparse): New local variable yyresult to record the result.
4096 Use result of setjmp to set it, rather than storing itinto
4097 struct.
4098 (yyDone): Remove label.
4099 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
4100 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
4101 if YYABORT is used).
4102 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
4103 yyparse status; put status > 1 into diagnostic.
4104 Check that status==2 works.
4105 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
4106 Use exit status 3 for failure to open (which shouldn't happen).
4107
15f40952
PE
41082005-07-17 Paul Eggert <eggert@cs.ucla.edu>
4109
67fd79c4
PE
4110 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
4111 1 on syntax error; just let yyparse do its thing.
4112 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
4113 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
4114 (Exploding the Stack Size with Alloca):
4115 (Exploding the Stack Size with Malloc):
4116 Expect exit status 2, not 1, since the parser is supposed to blow
4117 its stack. Problem reported by twlevo@xs4all.nl.
4118
15f40952
PE
4119 * data/glr.c (yyparse): Don't assume that the initial calls
4120 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
4121 Print a stack-overflow message and fail instead.
4122 Initialize the line-number information before creating the stack,
4123 so that the stack-overflow message can report line zero safely.
4124
f32c66b5
PE
41252005-07-14 Paul Eggert <eggert@cs.ucla.edu>
4126
a22ff96f 4127 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
4128 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
4129 (yyuserMerge): Provide a default case if b4_mergers is empty.
4130 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
4131 * tests/glr-regression.at
4132 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 4133 Add casts to pacify C++ compilers.
1beb0b24
PE
4134 * tests/glr-regression.at (Improper merging of GLR delayed action
4135 sets): Declare yylex before using it.
f32c66b5 4136 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
4137 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
4138 test for valgrind; valgrind is independent of g++.
4139 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
4140 for compatibility with POSIX 1003.1-2001 (if running coreutils).
4141 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
4142 Use a destructor, so that we can expand the stack. Change
4143 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 4144
d741bd1b
PE
41452005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4146
4147 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
4148 a valgrind failure. Problem reported by twlevo@xs4all.nl.
4149
0410a6e0
PE
41502005-07-13 Paul Eggert <eggert@cs.ucla.edu>
4151
4152 * PACKAGING: New file, suggested by Bruno Haible and taken from
4153 similar wording in gettext's PACKAGING file.
4154 * NEWS: Mention PACKAGING.
4155 * Makefile.am (EXTRA_DIST): Add PACKAGING.
4156
f7ab6a50
PE
41572005-07-12 Paul Eggert <eggert@cs.ucla.edu>
4158
baf785db 4159 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
4160 * bootstrap: Get runtime translations into runtime-po.
4161 Create runtime-po files automatically, if possible.
4162 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
4163 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
4164 does not infringe on the user's name space.
4165 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
4166 * doc/bison.texinfo (Internationalization): Revamp the English
4167 and Texinfo syntax a bit, to try to make it clearer.
4168 (Bison Options, Option Cross Key): Mention --print-localedir.
4169 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
4170 YYENABLE_NLS. Quote a bit more.
4171 * runtime-po/.cvsignore: New file.
4172 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
4173 * runtime-po/Rules-quot: Remove; now created by bootstrap.
4174 * runtime-po/quot.sed: Likewise.
4175 * runtime-po/boldquot.sed: Likewise.
4176 * runtime-po/en@quot.header: Likewise.
4177 * runtime-po/en@boldquot.header: Likewise.
4178 * runtime-po/insert-header.sin: Likewise.
4179 * runtime-po/remove-potcdate.sin: Likewise.
4180 * runtime-po/Makevars: Likewise.
4181 * runtime-po/LINGUAS: Likewise.
4182 * runtime-po/de.po: Likewise; we will rely on the translation project
4183 to maintain this, so "bootstrap" should get it.
0410a6e0 4184 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
4185 its value.
4186 * src/main.c (main): Bind the bison-runtime domain, too.
4187
41882005-07-12 Bruno Haible <bruno@clisp.org>
4189
4190 * data/yacc.c: Include <libintl.h> when NLS is enabled.
4191 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
4192 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
4193 * runtime-po: New directory.
4194 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
4195 $(DOMAIN).pot-update rule, so that old messages are never dropped.
4196 * runtime-po/Rules-quot: New file, copied from po/.
4197 * runtime-po/quot.sed: Likewise.
4198 * runtime-po/boldquot.sed: Likewise.
4199 * runtime-po/en@quot.header: Likewise.
4200 * runtime-po/en@boldquot.header: Likewise.
4201 * runtime-po/insert-header.sin: Likewise.
4202 * runtime-po/remove-potcdate.sin: Likewise.
4203 * runtime-po/Makevars: New file.
4204 * runtime-po/POTFILES.in: New file.
4205 * runtime-po/LINGUAS: New file.
4206 * runtime-po/bison-runtime.pot: New file.
4207 * runtime-po/de.po: New file.
4208 * m4/bison.m4: New file.
4209 * Makefile.am (SUBDIRS): Add runtime-po.
4210 (aclocaldir, aclocal_DATA): New variables.
4211 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
4212 Define aclocaldir.
4213 * src/getargs.c (usage): Document --print-localedir option.
4214 (PRINT_LOCALEDIR_OPTION): New enum item.
4215 (long_options): Add --print-localedir option.
4216 (getargs): Handle --print-localedir option.
4217 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
4218 (Internationalization): New section.
4219
22dda0f0
AD
42202005-07-12 Akim Demaille <akim@epita.fr>
4221
4222 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4223 for consistency with the rest of the code.
4224 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4225 Add separators.
4226
82b248ad
AD
42272005-07-12 Akim Demaille <akim@epita.fr>
4228
4229 * src/parse-gram.y: Use %printer instead of YYPRINT.
4230
fa0e9314
AD
42312005-07-12 Akim Demaille <akim@epita.fr>
4232
867a3e00
AD
4233 * src/symtab.h, src/symtab.c (symbol_print): New.
4234 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4235 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4236
42372005-07-12 Akim Demaille <akim@epita.fr>
4238
4239 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
4240 b4_at_dollar and b4_dollar_dollar.
4241
e054b190
PE
42422005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4243
4244 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4245 and Pennello's paper.
4246
34160ec4
PE
42472005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4248
407d4a75
PE
4249 * data/yacc.c (yyparse): Undo previous patch. Instead,
4250 set yylsp[0] and yyvsp[0] only if the initial action
4251 sets yylloc and yylval, respectively.
4252
34160ec4
PE
4253 * data/yacc.c (yyparse): In the initial action, set
4254 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4255 This avoids the use of undefined variables if the initial
4256 action does not set yylloc and/or yylval.
4257
c3d5a4a7
PE
42582005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4259
b34d96c1
PE
4260 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4261 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4262 Remove from CVS. These files are automatically generated.
4263 * examples/extexi: Clarify that this file is now part of Bison,
4264 not GNU M4, and that it works with any POSIX-compatible Awk.
4265 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4266 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4267 so that we also get calc++-parser.yy. Geneate it.
4268 Use $(AWK), not gawk, since any conforming Awk will do.
4269 Put comment before action, since older 'make' can't handle comment
4270 in action.
4271 $(BUILT_SOURCES): List all built sources, not just some of them.
4272 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4273 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4274 $($(calc_sources_generated)): Remove unnecessary test for existence
4275 of target. (This had a shell syntax error anyway; a stray "x".)
4276 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4277 calc++-parser.yy.
4278 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4279
c3d5a4a7
PE
4280 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4281 implied by the other modules.
4282
828c373b
AD
42832005-07-06 Akim Demaille <akim@epita.fr>
4284
4285 Bind examples/calc++ to the package.
4286 * examples/calc++/Makefile: Remove, replaced by...
4287 * examples/calc++/Makefile.am: ... this new file.
4288 * examples/calc++/test: Remove input.
4289 * examples/calc++/compile: Remove.
4290 * examples/Makefile.am: New.
4291 * configure.ac, Makefile.am: Adjust.
4292 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4293
63cb01d6
PE
42942005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4295
fd2df2ed
PE
4296 * data/glr.c (yyFail): Drastically simplify; since the format argument
4297 never had any % directives, we can simply pass it to yyerror.
4298 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4299 be modified later, as that is the usual style in glr.c.
4300 Problems reported by Paul Hilfinger.
4301
63cb01d6
PE
4302 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4303 and size overflow errors.
4304 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4305 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4306 (YYSIZEMAX): New macro.
4307 (yystpcpy): New function, taken from yacc.c.
4308 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4309 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4310 so that we don't have to maintain their signatures.
4311 (yyFail): Check for buffer overflow, by using vsnprintf rather
4312 than vsprintf. Allocate a bigger buffer if possible.
4313 Report an error if buffer allocation fails.
4314 (yyStackOverflow): New function.
4315 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4316 the initialization was successful. It might fail if storage was
4317 exhausted.
4318 (yyexpandGLRStack): Add more checks for storage allocation failure.
4319 Use yyStackOverflow to report failures.
4320 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4321 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4322 Don't assume stack number fits in int.
4323 (yysplitStack): Check for storage allocation failure.
4324 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4325 can print diagnostics on storage allocation failure. All callers
4326 changed.
4327 (yyresolveValue): Use yybool for boolean.
4328 (yyreportSyntaxError): Check for size-calculation overflow.
4329 This code is taken from yacc.c.
4330 (yyparse): Check for storage allocation errors when allocating
4331 the initial stack.
4332
1c59e0a1
AD
43332005-07-05 Akim Demaille <akim@epita.fr>
4334
4335 Extract calc++ from the documentation.
4336 * doc/bison.texinfo (Calc++): Add the extraction marks.
4337 * examples/extexi: New, from the aborted GNU Programming 2E.
4338 Separate the different paragraph of a file with empty lines.
4339 * examples/Makefile: Use it to extract the whole calc++ example.
4340
8a0adb01
AD
43412005-06-24 Akim Demaille <akim@epita.fr>
4342
4343 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4344 class typedefs.
4345
12545799
AD
43462005-06-22 Akim Demaille <akim@epita.fr>
4347
4348 * doc/bison.texinfo (C++ Language Interface): First stab.
4349 (C++ Parsers): Remove.
4350
99be0235
AD
43512005-06-22 Akim Demaille <akim@epita.fr>
4352
4353 * data/lalr1.cc (yylex_): Honor %lex-param.
4354
0ffd4fd1
AD
43552005-06-22 Akim Demaille <akim@epita.fr>
4356
4357 Start a set of simple examples.
4358 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4359 * examples/calc++/calc++-driver.hh,
4360 * examples/calc++/calc++-parser.yy,
4361 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4362 * examples/calc++/compile, examples/calc++/test: New.
4363
0925ebb4
PE
43642005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4365
4366 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4367 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4368 which stems from the 2005-05-27 patch.
4369
43d3b664
PH
43702005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4371
4372 * data/glr.c: Modify treatment of unused parameters to permit use
4373 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4374
3062864d
PE
43752005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4376
4377 Fix infringement on user name space reported by Janos Zoltan Szabo.
4378 * data/yacc.c (yyparse): strlen -> yystrlen.
4379
989b5b8e
AD
43802005-05-30 Akim Demaille <akim@epita.fr>
4381
4382 * data/lalr1.cc (_): New.
4383 Translate the various messages.
4384
bedf57f5
PE
43852005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4386
4387 Fix infringement on user name space reported by Bruno Haible.
4388 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4389 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4390 the user's name space.
4391 (alloca): Include <stdlib.h> to get it, if it's not built in.
4392 (YYMALLOC, YYFREE): Define only if needed.
4393 (malloc, free): Declare, but only if needed, as this infringes on
4394 the user name space.
4395
4d1801f1
PE
43962005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4397
4398 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4399 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4400 with %d format.
4401 * lib/ebitset.c (min, max): Undef before defining.
4402 * lib/vbitset.c (min, max): Likewise.
4403 * lib/subpipe.c (create_subpipe): Save local variables in case
4404 vfork clobbers them.
4405
44062005-05-24 Bruno Haible <bruno@clisp.org>
4407
4408 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4409 error message syntax used by gcc-4.0.
4410
b94a9e1e
PE
44112005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4412
85ac3861
PE
4413 * README: Mention m4 1.4.3. Remove obsolete advice about
4414 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4415
b94a9e1e
PE
4416 * bootstrap: Remove workaround for problem I encountered with
4417 gettext 0.14.1; it seems to be fixed now.
4418
51c30d21
PE
44192005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4420
009ce67d
PE
4421 * NEWS: Version 2.0a.
4422
f2a97c62
PE
4423 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4424 the previous change.
4425
c8775f93
PE
4426 Various maintainer cleanups.
4427 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4428 conftest*, for benefit of CVS commands run at the same time as
4429 "configure". Add build-aux, since "bootstrap" now creates it and
4430 its subfiles.
4431 * Makefile.cfg (move_if_change): Remove.
4432 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4433 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4434 (po_repo, do-po-update, po-update, wget_files, get-targets):
4435 (config.guess-url_prefix, config.sub-url_prefix):
4436 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4437 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4438 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4439 Remove.
4440 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4441 this is now the recommended name.
4442 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4443 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4444 ylwrap. These files now go into build-aux.
4445 * config/move-if-change: Remove.
4446 * config/prev-version.txt: Bump from 1.75 to 2.0.
4447
3ea5f0ec
PE
4448 * bootstrap: Add stdio-safer, unistd-safer modules.
4449 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4450 we don't need it).
4451 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4452 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4453 * lib/subpipe.c: Include "unistd-safer.h".
4454 (create_subpipe): Make sure all the newly-created
4455 file descriptors are > 2, so that diagnostics don't
4456 get sent down them (which might cause Bison to hang, in theory).
4457 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4458 * src/files.c (xfopen): Use fopen_safer, not fopen.
4459
51c30d21
PE
4460 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4461 yesterday's yacc.c fix.
4462
cea1469d
PE
44632005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4464
3ea5f0ec
PE
4465 * data/glr.c, data/lalr1.cc: Update copyright date.
4466
cea1469d
PE
4467 Fix a destructor bug reported by Wolfgang Spraul in
4468 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4469 * data/yacc.c (yyabortlab): Don't call destructor, and
4470 don't set yychar to EMPTY.
4471 (yyoverflowlab): Don't call destructor.
4472 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4473 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4474 since we no longer output the message "discarding lookahead token
4475 end of input ()".
4476
5e6f62f2
PH
44772005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4478
4479 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4480 fix a small glitch in debugging output.
4481 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4482 after YY_SYMBOL_PRINT where needed.
4483
4484 (struct yyGLRState): Add some comments.
4485 (struct yySemanticOption): Add some comments.
4486 (union yyGLRStackItem): Add comment.
4487
4488 (yymergeOptionSets): Correct this to properly perform the union,
4489 avoiding infinite reported by Michael Rosien.
4490 Update comment.
4491
4492 * tests/glr-regression.at: Add test for GLR merging error reported
4493 by M. Rosien.
cea1469d 4494
0fb669f9
PE
44952005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4496
4497 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4498 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4499 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4500 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4501 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4502 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4503 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4504 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4505 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4506 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4507 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4508 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4509 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4510 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4511 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4512 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4513 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4514 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4515 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4516 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4517 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4518 src/output.h, src/parse-gram.c, src/parse-gram.h,
4519 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4520 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4521 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4522 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4523 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4524 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4525 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4526 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4527 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4528 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4529 tests/reduce.at, tests/regression.at, tests/sets.at,
4530 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4531 Update FSF postal mail address.
4532
51f4735e
PE
45332005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4534
4535 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4536 Problem reported by Ralf Menzel.
4537
80ce3401
PE
45382005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4539
4540 * tests/actions.at: Test that stack overflow invokes destructors.
4541 From Marcus Holland-Moritz.
4542 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4543 from here....
4544 (yyreturn): to here. That way, destructors are called properly
4545 even if the stack overflows, or the user calls YYACCEPT or
4546 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4547 (yyoverflowlab): Destroy the lookahead.
4548
45492005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4550
4551 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4552
72f000b0
PE
45532005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4554
4555 * NEWS: Bison-generated C parsers no longer quote literal strings
4556 associated with tokens.
4557 * src/output.c (prepare_symbols): Don't escape strings,
4558 since users don't want to see C escapes.
4559 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4560 in diagnostics.
c19683bb 4561 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
4562 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4563
1094323f
PE
45642005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4565
4566 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4567 the data size is known to be too small and we can't increase it.
4568 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4569
ca407bdf
PE
45702005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4571
4572 * src/parse-gram.y: Include quotearg.h.
4573 (string_as_id): Quote $1 before using it as a key, since the
4574 lexer no longer quotes it for us.
4575 (string_content): Don't strip quotes, since lexer no longer
4576 quotes it for us.
4577 * src/scan-gram.l: Include quotearg.h.
4578 ("\""): Omit quote.
4579 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4580 a key, since the rest of the lexer doesn't quote it.
4581 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4582 * tests/regression.at (Token definitions): Check for backslashes
4583 in token strings.
4584
4585 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4586 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4587 (yyparse): Revamp code to generate long syntax error message, to
4588 make it easier to translate, and to avoid problems with arithmetic
4589 overflow. Change "virtual memory" to "memory" in diagnostic, since
4590 we don't know whether the memory is virtual.
4591
1ce59070
PE
45922005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4593
4594 * NEWS: Bison-generated C parsers now use the _ macro to
4595 translate strings.
4596 * data/yacc.c (_) [!defined _]: New macro.
4597 All English strings wrapped inside this macro.
4598 * doc/bison.texinfo (Bison Parser): Document _.
4599 * po/POTFILES.in: Include src/parse-gram.c, since it now
4600 includes translateable strings that parse-gram.y doesn't.
4601
a749a695
PE
46022005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4603
4604 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4605 reverting the 2004-10-11 change to this function.
4606 (symbol_check_alias_consistency): Don't call symbol_type_set
4607 if the type name is already correct.
4608 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4609
8fb1053b
PE
46102005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4611
4612 * tests/regression.at (Token definitions): Don't use a token named
4613 c, as that generates a "#define c ..." that runs afoul of buggy
4614 stdlib.h that uses the identifier c as a member of struct
4615 drand48_data. Problem reported by Horst Wente.
4616
ff498c4a
PE
46172005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4618
4619 * bootstrap: Change translation URL from
4620 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4621 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4622 redirection glitches. Problem reported by twlevo@xs4all.nl.
4623
65211d70
PE
46242005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4625
4626 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4627 after operands; POSIX says this isn't portable for the c99 command.
4628
9577fb1f
PE
46292005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4630
4631 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4632 immediately if a data overrun has occurred; this may help us track
4633 down what may be a spurious failure on MacOS.
4634
78b178f7
PE
46352005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4636
a2599d0f
PE
4637 Respond to problems reported by twlevo@xs4all.nl.
4638
4639 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4640
78b178f7
PE
4641 * src/vcg.h: Comment fix.
4642 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4643 (G_CMAX): Change to -1 instead of INT_MAX.
4644
4645 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 4646
7296e729
PE
46472005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4648
4649 * src/tables.c (state_number_to_vector_number): Put it inside an
4650 "#if 0", since it's not currently used. Problem reported by
4651 Roland McGrath.
4652
05ac60f3
PE
46532005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4654
4655 * src/output.c (escaped_output): Renamed from
4656 escaped_file_name_output, since we now use it for symbol tags as
4657 well. All uses changed.
4658 (symbol_destructors_output, symbol_printers_output):
4659 Escape symbol tags too.
4660 Problem reported by Matyas Forstner in
4661 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4662
4663 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4664 not needed.
4665 * src/output.c (user_actions_output, token_definitions_output,
4666 symbol_destructors_output, symbol_printers_output): Likewise.
4667 * src/reader.c (prologue_augment): Likewise.
4668 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4669
4670 * src/vcg.c (output_edge): Don't quote linestyle arg.
4671 Problem reported by twlevo@xs4all.nl.
4672
7eb453ac
PE
46732005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4674
4675 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4676 example, reported by Derek M Jones. Also, make the example even
4677 more outrageous, to better illustrate how bad the problem is.
4678
4c04c52a
PE
46792005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4680
4681 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4682 putsym. Typo reported by Sebastian Piping.
4683
a61e1620
PE
46842005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4685
4686 * doc/bison.texinfo (Language and Grammar): some -> same
4687 (Epilogue): int he -> in the
4688 Typos reported by Sebastian Piping via Justin Pence.
4689
9ec93868
PE
46902005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4691
4692 * tests/glr-regression.at (Improper handling of embedded actions
4693 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4694 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4695 with dollar signs in test names.
4696 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4697 for a similar reason.
4698
73ce7e7e
PE
46992005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4700
4701 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4702 wants to redefine G_VIEW.
4703
2e72b98e
PE
47042005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4705
4706 * src/vcg.c (get_view_str): Remove case for normal_view.
4707 Problem reported by twlevo@xs4all.nl.
4708
e0d634e5
PE
47092005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4710
ccf830a4
PE
4711 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4712 Problem reported by twlevo@xs4all.nl.
4713
e0d634e5
PE
4714 * doc/bison.texinfo: Change @dircategory from "GNU programming
4715 tools" to "Software development". Requested by Richard Stallman
4716 via Karl Berry.
4717
7bbc8cb0
PE
47182005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4719
4720 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4721 Problem reported by twlevo@xs4all.nl.
4722
08b770bc
PE
47232005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4724
4725 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4726 keyword; it's not needed with modern compilers, and it doesn't
4727 affect correctness with older compilers. Suggested by
4728 twlevo@xs4all.nl.
4729
95f22ad2
PE
47302005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4731
4732 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4733 gcc -Wswitch-default.
4734 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4735 * data/yacc.c (yyparse): Likewise.
4736
d229d15c
PE
47372005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4738
4739 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4740 already. Let config.h define any nonstandard values.
4741
ecadd90f
PE
47422005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4745 for the benefit of slower hosts. Problem reported by
4746 Nelson H. F. Beebe.
4747
213744b5
PE
47482005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4749
4750 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4751 being defined and not used.
4752 * data/lalr1.cc (yyparse): Likewise.
4753 Use "if (false)" rather than "if (0)".
4754
249d3236
PE
47552005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 * TODO: Mention that we should allow NUL bytes in tokens.
4758
987cc1fb
PE
47592005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4760
4761 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4762 Problem reported by Hans Aberg.
4763
08fe02d9
PE
47642005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4765
4766 * src/getargs.c (version): Happy new year; update overall
4767 program copyright date from 2004 to 2005.
4768
4769 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4770 Problem reported by Hans Aberg.
4771 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4772 (Output file names.): Add a test for the case when standard output
4773 is closed.
4774
010c0266
PE
47752004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4776
4777 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4778 to fix an oversight in the Bison 2.0 manual.
4779
da12206a
PE
47802004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4781
4782 * NEWS: Version 2.0. Reformat the existing news items since
4783 1.875, so that related items are grouped together.
3a4734aa 4784 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
4785 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4786
c935d934
PE
4787 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4788 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4789 otherwise, we're not testing alloca. Unfortunately there's no
4790 simple way to consult HAVE_ALLOCA here.
4791
da12206a
PE
4792 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4793 for yymsg, too.
4794
4795 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4796 hand. This avoids a warning about comparing int to size_t when
4797 GCC warnings are enabled.
4798
0a2c5137
PE
47992004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4800
d7e14fc0
PE
4801 * NEWS: Bison-generated parsers no longer default to using the
4802 alloca function (when available) to extend the parser stack, due
4803 to widespread problems in unchecked stack-overflow detection.
4804 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4805 responsibility to set it to a positive value. This lets the user
4806 specify a value that is not a preprocessor constant.
4807 * data/yacc.c (YYMAXDEPTH): Likewise.
4808 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4809 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4810 to be a compile-time constant. However, explain the constraints on it.
4811 Also, explain the constraints on YYINITDEPTH.
4812 (Table of Symbols): Explain that alloca is no longer the default.
4813 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4814 to 1.
4815
0a2c5137
PE
4816 * doc/bison.texinfo (Location Default Action): Mention that n must
4817 be zero when k is zero. Suggested by Frank Heckenbach.
4818
e019c247
AD
48192004-12-22 Akim Demaille <akim@epita.fr>
4820
4821 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4822 (parser::state_type, parser::semantic_type, parser::location_type):
4823 Private, not public.
4824 (parser::parse): Return ints, not bool.
4825 Returning a bool introduces a problem: 0 corresponds to false, and
4826 it seems weird to return false on success. Returning true changes
4827 the conventions for yyparse.
4828 Alternatively we could return void and send an exception.
4829 There is no clear consensus (yet?).
4830 (state_stack, semantic_stack, location_stack): Rename as...
4831 (state_stack_type, semantic_stack_type, location_stack_type): these.
4832 Private, not public.
4833 * tests/c++.at: New.
4834 * tests/testsuite.at, tests/Makefile.am: Adjust.
4835
72731bb7
AD
48362004-12-21 Akim Demaille <akim@epita.fr>
4837
4838 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4839
9a0d8bec
AD
48402004-12-21 Akim Demaille <akim@epita.fr>
4841
4842 Don't impose std::string for filenames.
4843
4844 * data/lalr1.cc (b4_filename_type): New.
4845 (position::filename): Use it.
4846 (parser.hh): Move the inclusion of stack.hh and location.hh below
4847 the user code, so that needed headers for the filename type can be
4848 included first.
72731bb7
AD
4849 Forward declare them before the user code.
4850 * tests/Makefile.am (check-local, installcheck-local): Pass
4851 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 4852
99880de5
AD
48532004-12-20 Akim Demaille <akim@epita.fr>
4854
4855 Use more STL like names: my_class instead of MyClass.
4856
4857 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4858 (SemanticStack, SemanticType, StateStack, StateType)
4859 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4860 (Parser::value): Rename as...
4861 (location_stack, location_type, rhs_number_type, semantic_stack)
4862 (semantic_type, state_stack, state_type, token_number_type, stack)
4863 (slice, traits, parser::yylloc, parser::yylval): these.
4864
4865 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4866
9bec482e
PE
48672004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4868
4869 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4870 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4871
f6fbd3da
PE
48722004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4873
4874 Remove uses of 'short int' and 'unsigned short int'. This raises
4875 some arbitrary limits. It uses more memory but nowadays that's
4876 not much of an issue.
4877
4878 This change does not affect the generated parsers; that's a different
4879 task, as some users will want to conserve memory there.
4880
4881 Ideally we should use size_t to represent all object counts, and
4882 something like ptrdiff_t to represent signed differences of object
4883 counts; but that will require more code-cleanup than I have the
4884 time to do right now.
4885
4886 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4887 Use size_t, not int or short int, to count objects.
4888 * src/closure.c (nritemset, closure): Likewise.
4889 * src/closure.h (nritemset, closure): Likewise.
4890 * src/nullable.c (nullable_compute): Likewise.
4891 * src/print.c (print_core): Likewise.
4892 * src/print_graph.c (print_core): Likewise.
4893 * src/state.c (state_compare, state_hash): Likewise.
4894 * src/state.h (struct state): Likewise.
4895 * src/tables.c (default_goto, goto_actions): Likewise.
4896
4897 * src/gram.h (rule_number, rule): Use int, not short int.
4898 * src/output.c (prepare_rules): Likewise.
4899 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4900 errs, reductions): Likewise.
4901 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4902 Likewise.
4903 * src/tables.c (vector_number, tally, action_number,
4904 ACTION_NUMBER_MINIMUM): Likewise.
4905 * src/output.c (muscle_insert_short_int_table): Remove.
4906
efeed023
AD
49072004-12-17 Akim Demaille <akim@epita.fr>
4908
4909 * data/lalr1.cc: Extensive Doxygenation.
4910 (error_): Rename as...
4911 (error): this, since it is visible to the user.
4912 Adjust callers.
4913 (Parser::message): Now an automatic variable from...
4914 (Parser::yyreport_syntax_error_): here.
4915 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4916 Parser::error.
4917 * tests/input.at: Escape $.
4918
bc82c5a5
PE
49192004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4920
4921 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4922 Parenthesize rhs to avoid obscure problems with mistakes like
4923 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4924 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4925 b4_rhs_location): Likewise.
4926 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4927 b4_rhs_location): Likewise.
4928
fd19f271
AD
49292004-12-16 Akim Demaille <akim@epita.fr>
4930
4931 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4932 yacc.c: be sure to stay within yycheck_.
4933 * tests/actions.at: Re-enable C++ tests.
4934
10454ea4
AD
49352004-12-16 Akim Demaille <akim@epita.fr>
4936
4937 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4938 real.
4939
c5b95ccf
AD
49402004-12-16 Akim Demaille <akim@epita.fr>
4941
4942 Use #define to handle the %name-prefix.
4943
4944 * data/glr.c, data/yacc.c: Comment changes.
4945 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4946 so that one can refer to yylex in the parser file, and have it
4947 renamed, as is the case with other skeletons.
4948
617a8f12
AD
49492004-12-16 Akim Demaille <akim@epita.fr>
4950
4951 Move lalr1.cc internals into yy*.
4952
4953 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4954 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4955 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4956 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4957 (empty_, final_, terror_, errcode_, ntokens_)
4958 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4959 (looka_, ilooka_, error_range_, nerrs_):
4960 Rename as...
4961 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4962 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4963 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4964 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4965 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4966 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4967 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4968 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4969 these.
4970
1e547e6e
PE
49712004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4972
4973 Fix some problems reported by twlevo at xs4all.
4974 * src/symtab.c (symbol_new): Report an error if the input grammar
4975 contains too many symbols. This is better than calling abort() later.
4976 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4977 (struct node, struct graph):
4978 Rename member expand to stretch. All uses changed.
4979 (struct graph): Remove member layoutalgorithm. All uses removed.
4980 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4981 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4982 All uses changed.
4983 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4984
735d6bd4
AD
49852004-12-15 Akim Demaille <akim@epita.fr>
4986
4987 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4988 Add more Doxygen comments.
4989 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4990 (report_syntax_error_, translate_): Rename as...
4991 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4992 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4993
2e1f5829
AD
49942004-12-15 Akim Demaille <akim@epita.fr>
4995
4996 * data/lalr1.cc (lex_): Rename as...
4997 (yylex_): this.
4998 Move the trace here.
4999 Take the %name-prefix into account.
5000 Reported by Alexandre Duret-Lutz.
5001
a3cb6248
AD
50022004-12-15 Akim Demaille <akim@epita.fr>
5003
5004 Simplify the C++ parser constructor.
5005
5006 * data/lalr1.cc (debug_): Rename as...
5007 (yydebug_): so that the parser's internals are always in the yy*
5008 pseudo namespace.
5009 Adjust uses.
5010 (b4_parse_param_decl): Remove the leading comma as it is now only
5011 called as unique argument list.
5012 (Parser::Parser): Remove the constructor accepting a location and
5013 an initial debugging level.
5014 Remove from the other ctor the argument for the debugging level.
5015 (debug_level_type, debug_level, set_debug_level): New.
5016
5017 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5018 constructor calls.
5019
07fed891
AD
50202004-12-15 Akim Demaille <akim@epita.fr>
5021
5022 Remove b4_root related material: failure experiment
a3cb6248 5023 (which goal was to allow to derive from a class).
07fed891
AD
5024
5025 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5026 definitions and uses.
5027
e603eaa5
PE
50282004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5029
5030 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5031 not 2, since it's not portable to subtract 1 from the start of an
5032 array. The new item 0 is never set or used. All uses changed.
5033
5034 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5035 the default definition of YYLLOC_DEFAULT. Problem reported
5036 by Frank Heckenbach.
5037
fafb007d
PE
50382004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5039
5040 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5041 the normal case and one for the error case. Just use the
5042 first one uniformly. Problem reported by Frank Heckenbach.
5043 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5044 use exactly the same macro in both places.
5045 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5046 so that the normal-case YYRHSLOC works for the error case too.
5047 All uses changed.
5048 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5049 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5050 * doc/bison.texinfo (Location Default Action): Don't claim that
5051 we have an array of locations. Use the same macro for both glr
5052 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5053 the index is 0.
5054
48814dcd
PE
50552004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5056
a4e1a53b
PE
5057 * HACKING: Update email addresses to send announcements to.
5058
48814dcd
PE
5059 * configure.ac (AC_INIT): Bump version to 1.875f.
5060
337116ba
PE
50612004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5062
5063 * NEWS: Version 1.875e.
5064 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
5065
5066 * src/scan-skel.l: Include "complain.h", for "fatal".
5067
5068 * src/relation.h (relation_print, relation_digraph):
5069 Relation sizes are of type relation_node, not size_t (this is
5070 merely a doc fix, since the two types are equivalent).
5071 (relation_transpose): Relation sizes are of type relation_node,
5072 not int.
5073 * src/relation.c: Likewise.
5074 (top, infinity): Now of type relation_node, not int.
5075 (traverse, relation_transpose): Use relation_node, not int.
5076
5077 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
5078 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
5079 (yyparse): Remove unused local introduced in 2004-10-25 patch.
5080
5081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 5082 specifying whether the test should be skipped. Use it tp
337116ba 5083 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 5084 fail on some hosts, and should be skipped.
337116ba 5085
da2a7671
PE
50862004-12-08 Paul Eggert <eggert@cs.ucla.edu>
5087
5088 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
5089 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
5090 unless otherwise specified below.
5091
5092 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
5093 to allocate kernel_base, kernel_items, kernel_size, since
5094 they needn't be initialized to 0.
5095 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
5096 * src/closure.c (new_closure): Likewise, for itemset.
5097 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
5098 * src/lalr.c (set_goto_map): Likewise, for temp_map.
5099 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
5100 (build_relations): Likewise for edge, states1, includes.
5101 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
5102 * src/reader.c (packgram): Likewise, for ritem, rules.
5103 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
5104 * src/relation.c (relation_digraph): Likewise for VERTICES.
5105 (relation_transpose): Likewise for new_R, end_R.
5106 * src/symtab.c (symbols_token_translations_init): Likewise for
5107 token_translations.
5108 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
5109 (token_actions): Likewise for yydefact, actrow, conflrow,
5110 conflict_list.
5111 (save_column): Likewise for froms[symno], tos[symno].
5112 (goto_actions): Likewise for state_count.
5113 (pack_table): Likewise for base, pos, check.
5114 (tables_generate): Likewise for width.
5115
5116 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
5117 for initial core. Just have a separate core, so we needn't worry
5118 about whether kernel_size and kernel_base are initialized.
5119
5120 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
5121 kernel_size, kernel_items): Remove unnecessary initialization.
5122 * src/conflicts.c (conflicts): Likewise.
5123 * src/derives.c (derives): Likewise.
5124 * src/muscle_tablc (muscle_insert): Likewise.
5125 * src/relation.c (relation_digraph): Likewise.
5126 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
5127 conflrow, conflict_table, conflict_list, table, check):
5128 Likewise.
5129
5130 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
5131 This is because all callers pass unsigned int.
5132 * src/closure.h (new_closure): Likewise.
5133
5134 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
5135 (build_relations): Initialize includes[i] in all cases.
5136 * src/reader.c (packgram): Always initialize rules[ruleno].prec
5137 and rules[ruleno].precsym. Initialize members in order.
5138 * src/relation.c (relation_transpose): Always initialize new_R[i]
5139 and end_R[i].
5140 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
5141
5142 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
5143 conflict_list[0] was always 0, but now it isn't initialized.
5144
5145 * src/table.c (table_grow): When conflict_table grew, the grown
5146 area wasn't cleared. Fix this.
5147
5148 * lib/.cvsignore: Add strdup.c, strdup.h.
5149 * m4/.cvsignore: Add strdup.m4.
5150
00baeeac
PE
51512004-12-07 Paul Eggert <eggert@cs.ucla.edu>
5152
5153 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
5154 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
5155 GOTO_NUMBER_MAXIMUM, since we occasionally compute
5156 ngotos + 1 without checking for overflow.
5157 (build_relations): Use END_NODE, not -1, to denote end of edges.
5158 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
5159 build_relations): Use goto_number, not int, for goto numbers.
5160 * src/tables.c (save_column, default_goto): Likewise.
5161
be3d9d42
AD
51622004-11-23 Akim Demaille <akim@epita.fr>
5163
5164 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
5165 of #defining from yystype.
5166 Don't typedef yystype, C++ does not need it.
5167 This lets it possible to forward declare it as union.
5168
78e526d5
PE
51692004-11-23 Paul Eggert <eggert@cs.ucla.edu>
5170
5171 * bootstrap (gnulib_modules): Add extensions.
5172 Problem reported by Jim Meyering.
5173
afbb696d
PE
51742004-11-22 Paul Eggert <eggert@cs.ucla.edu>
5175
5176 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
5177 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
5178 src/system.h, src/tables.c: XFREE -> free, to accommodate
5179 recent change to gnulib xalloc.h.
78e526d5 5180 Problem reported by Jim Meyering.
afbb696d 5181
c1f8f16a
AD
51822004-11-17 Akim Demaille <akim@epita.fr>
5183
5184 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
5185
db7e5eb5 51862004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
5187 Alexandre Duret-Lutz <adl@gnu.org>
5188
5189 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
5190 changes.
5191 (YYCDEBUG): Adjust.
5192 Use it instead of cdebug_.
5193 (Parser::debug_stream, Parser::set_debug_stream): New.
5194 (Parser::symprint_): Define cdebug_ for temporary backward
5195 compatibility.
5196 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
5197 debug_stream ().
5198
68e11668
AD
51992004-11-17 Akim Demaille <akim@epita.fr>
5200
5201 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
5202 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
5203 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
5204 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5205
97cbc73e
PE
52062004-10-27 Paul Eggert <eggert@cs.ucla.edu>
5207
5208 * data/glr.c (yyloc_default): Remove; not used.
5209 Problem reported by Frank Heckenbach.
5210
e342c3be
AD
52112004-10-25 Akim Demaille <akim@epita.fr>
5212
5213 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
5214 Introduce another definition to address simple location arrays.
5215 (yyGLRStack): New member: yyerror_range.
5216 (yyrecoverSyntaxError, yyparse): Update it.
5217 (yyrecoverSyntaxError): Use it when shifting the error token to
5218 have an accurate range, equivalent to the one computed by both
5219 yacc.c and lalr1.cc.
5220 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5221 that column numbers start at column 0, as per GNU Coding
5222 Standards, the others tests, and the doc.
5223 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5224 Adjust to the above change (first column is 0).
5225 And adjust the location of the "<error>", now covering the whole
5226 line.
5227
93602feb 52282004-10-22 Akim Demaille <akim@epita.fr>
04098407 5229 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
5230
5231 Remove some arbitrary limits on goto numbers and relations.
5232 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5233 initial values, since they're never used.
5234 (set_goto_map): ngotos is now unsigned, so test for overflow
5235 by seeing whether it wraps around to zero.
5236 * src/lalr.h (goto_number): Now size_t, not short int.
5237 (GOTO_NUMBER_MAXIMUM): Remove.
5238 * src/relation.c (relation_print, traverse, relation_transpose):
5239 Check for END_NODE rather than looking at sign.
5240 * src/relation.h (END_NODE): New macro.
5241 (relation_node): Now size_t, not short int.
5242
dba08b04
PE
52432004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5244
5245 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5246 keyword, not an identifier. Problem reported by Baron Schwartz in
5247 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5248
df09ef2e
AD
52492004-10-11 Akim Demaille <akim@epita.fr>
5250
5251 * src/symtab.c (symbol_check_alias_consistency): Also check
5252 type names, destructors, and printers.
5253 Reported by Alexandre Duret-Lutz.
5254 Recode the handling of associativity and precedence in terms
5255 of symbol_precedence_set.
5256 Accept no redeclaration at all, not even equal to the previous
5257 value.
5258 (redeclaration): New.
5259 Use it to factor redeclaration complaints.
5260 (symbol_make_alias): Don't set the type of the alias, let
5261 symbol_check_alias_consistency do it as for other features.
5262 * src/symtab.h (symbol): Add new member prec_location, and
5263 type_location.
5264 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5265 * tests/input.at (Incompatible Aliases): New.
5266
146bc99d
PE
52672004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5268
5269 .cvsignore fixes to accommodate gnulib changes,
5270 and the practice of naming build directories "_build".
5271 * .cvsignore: Add "_*". Sort.
5272 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5273 * m4/.cvsignore: Add "*_gl.m4".
5274
e503aa60
AD
52752004-10-06 Akim Demaille <akim@epita.fr>
5276
5277 * src/parse-gram.y (add_param): Fix the truncation of trailing
5278 spaces.
5279
b4a20338
AD
52802004-10-05 Akim Demaille <akim@epita.fr>
5281
5282 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5283 whether the reducion was empty or not. This leaves room to
5284 improve the use of YYLLOC_DEFAULT in such a case.
5285 lalr1.cc is still experimental, so changing this is acceptable.
5286 And finally, there are probably not many users who changed the
5287 handling of locations in GLR, so changing is admissible too.
5288
5289 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5290 empty reduction, set @$ to an empty location ending the previously
5291 stacked symbol.
5292 Adjust uses to make sure the code is triggered on empty
5293 reductions.
5294 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5295 expected output: empty reductions have empty locations.
5296
f85a5e6f
AD
52972004-09-29 Akim Demaille <akim@epita.fr>
5298
5299 * data/lalr1.cc: Move towards a more standard C++ coding style
5300 for templates: Class < T > -> Class<T>.
5301
b203fc2c
AD
53022004-09-29 Akim Demaille <akim@epita.fr>
5303
5304 * data/lalr1.cc: Reinstall the former ctor, for sake of
5305 compatibility, but warn it will be removed.
5306 Move towards a more standard C++ coding style (i.e., type *var ->
5307 type* var).
5308
5b7e1e73
PE
53092004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5310
3fee967f
PE
5311 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5312 since it's less likely to work if NULs are involved in the future.
5b7e1e73 5313
0dcca5c2
AD
53142004-09-27 Akim Demaille <akim@epita.fr>
5315
5316 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5317
6dde1c82
AD
53182004-09-27 Akim Demaille <akim@epita.fr>
5319
5320 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 5321 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
5322 and argument names.
5323 (b4_cc_constructor_call): Likewise.
5324
b233d555
AD
53252004-09-24 Akim Demaille <akim@epita.fr>
5326
5327 * src/parse-gram.y (add_param): Strip the leading and trailing
5328 blanks from a formal argument declaration.
5329 (YY_LOCATION_PRINT): New.
5330
619404e3
AD
53312004-09-24 Akim Demaille <akim@epita.fr>
5332
5333 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5334 after the location.
5335
dd8d9022
AD
53362004-09-24 Akim Demaille <akim@epita.fr>
5337
5338 * doc/bison.texinfo (Table of Symbols): Sort.
5339
0092f063
AD
53402004-09-21 Akim Demaille <akim@epita.fr>
5341
5342 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5343 the useless parentheses.
5344 Suggested by Paul Eggert.
5345
451364ed
AD
53462004-09-20 Akim Demaille <akim@epita.fr>
5347
5348 Let the initial-action act on the look-ahead, and use it for the
5349 "initial push" (corresponding to an hypothetical beginning-of-file).
5350 And let lalr1.cc honor %initial-action.
5351
5352 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5353 example.
5354 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5355 (Parser::Parser): Remove the ctor that used to initialize it.
5356 (Parser::parse): Like in the other skeletons, issue the "starting
5357 parse" message before any action.
5358 Honor %initial-action.
5359 Initialize the stacks with the lookahead.
5360 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5361 look-ahead.
5362 Push them in the stacks.
5363 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5364
18d192f0
AD
53652004-09-20 Akim Demaille <akim@epita.fr>
5366
5367 * doc/bison.texinfo (Initial Action Decl): New.
5368
b8458aa5
AD
53692004-09-20 Akim Demaille <akim@epita.fr>
5370
5371 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5372 clearer criterion to define it.
5373 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5374 When reducing on an empty RHS, use the latest stacked location as
5375 location.
5376 yylloc is not always available.
5377 * data/glr.c: Likewise.
5378 Also, honor initial-actions.
5379
3fc16193
AD
53802004-09-20 Akim Demaille <akim@epita.fr>
5381
5382 * data/yacc.c (YY_LOCATION_PRINT): New.
5383 Define when we know YYLTYPE's structure, i.e., when the default
5384 YYLLOC_DEFAULT is used.
5385 * data/c.m4 (b4_yysymprint_generate): Use it.
5386 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5387 value of the result.
5388 (error_start_): Replace with...
5389 (error_range_): this location array.
5390 This allows to replace code relying on the implementation of
5391 locations by portable code.
5392 * data/yacc.c (yylerrsp): Replace with...
5393 (yyerror_range): this.
5394 Every time a token is popped, update yyerror_range[0], to have an
5395 accurate location for the error token.
5396 * data/glr.c (YY_LOCATION_PRINT): New.
5397 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5398 deference a pointer.
5399 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5400 report the location in %printers.
5401
5402 * src/scan-skel.l: Instead of abort, report error messages to ease
5403 understanding skeleton scanning failures.
5404
ecfe33e7
AD
54052004-09-16 Akim Demaille <akim@epita.fr>
5406
5407 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5408 (iterator, const_iterator): these, to be more in the C++ spirit.
5409 Also, return reverse iterators so that when displaying the stack
5410 we display its bottom first.
5411 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5412 from yacc.c.
5413 We should probably use vector here though.
5414
1576d44d
AD
54152004-09-16 Akim Demaille <akim@epita.fr>
5416
5417 Have more complete shift traces.
5418
5419 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5420 to report Shifts instead of ad hoc YYDPRINTF invocations,
5421 including for the error token.
5422 * data/lalr1.cc (symprint_): Output the location.
5423 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5424 output the location within the %printer.
5425 Activate GLR tests, at least to make sure they compile properly.
5426 They still don't pass though.
5427 * tests/calc.at: Adjust expect verbose output, since now "Entering
5428 state..." is on a different line than the "Shifting" message.
5429
9c66f418
AD
54302004-09-08 Akim Demaille <akim@epita.fr>
5431
5432 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5433 Bison directive from the Bison file to the invocation of this
5434 macro, so that these directives are passed to
5435 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5436 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5437 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5438 the extra Bison directives instead of the whole series.
5439 Change the grammar so that there are recoverable errors, and
5440 unrecoverable errors. Now we can have the parser give up before
5441 consuming the whole input. As a result we now can observe that
5442 the lookahead is freed when needed.
5443 Change the parser source to parse argv[1] instead of a hard coded
5444 string.
5445 Simplify yylex, and give a value and location to EOF.
5446 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5447 passed directives already coded in the file.
5448 Add some tests to check the location of "error".
5449 For some tests, the C++ parser is correct, and not yacc.c.
5450 For other tests, they provide different, but unsatisfying, values,
5451 so keep the C++ value so that at least one parser is "correct"
5452 according to the test suite.
5453 (Actions after errors): Remove, this is subsumed by the
5454 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5455
52d5733f
AD
54562004-09-06 Akim Demaille <akim@epita.fr>
5457
5458 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 5459 (Parser::pop): New.
52d5733f
AD
5460 Use it.
5461
a0e68930
AD
54622004-09-06 Akim Demaille <akim@epita.fr>
5463
5464 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5465 argument, an informative message.
5466 Call YY_SYMBOL_PRINT.
5467 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5468 * data/lalr1.cc (destruct_): Likewise.
5469 In addition, no longer depend on b4_yysymprint_generate and
5470 b4_yydestruct_generate to generate these functions, do it "by
5471 hand".
5472
e757bb10
AD
54732004-09-03 Akim Demaille <akim@epita.fr>
5474
5475 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5476 invoked, yydestruct the lookahead.
5477 * tests/calc.at (Calculator $1): Update the expected lengths of
5478 traces: there is an added line for the discarded lookahead.
5479 * doc/bison.texinfo (Destructor Decl): Some rewording.
5480 Define "discarded" symbols.
5481
0fe1f06d
AD
54822004-09-02 Akim Demaille <akim@epita.fr>
5483
5484 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5485
284acc8b
AD
54862004-09-02 Akim Demaille <akim@epita.fr>
5487
5488 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5489 (YYDSYMPRINTF): Rename as...
5490 (YY_SYMBOL_PRINT): this.
5491 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5492 two.
5493 Use it instead of direct symprint_ calls.
5494 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5495 one.
5496
a5eb1ed2
AD
54972004-09-02 Akim Demaille <akim@epita.fr>
5498
b7c72fe1
AD
5499 * data/lalr1.cc (b4_yysymprint_generate): New.
5500 (symprint_): New member function, defined when YYDEBUG.
5501 Use it consistently instead of token/nterm debugging output by
5502 hand.
a5eb1ed2
AD
5503 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5504 %printer calls to use cdebug_ when using lalr1.cc.
5505
417141dd
AD
55062004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5507
5508 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5509 with #ifdef YYDEBUG.
5510
2fa09258
AD
55112004-08-26 Akim Demaille <akim@epita.fr>
5512
5513 * doc/bison.texinfo (Implementing Loops): Rename as...
5514 (Implementing Gotos/Loops): this.
5515
9378b508
PE
55162004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5517
5518 Adjust to latest gnulib.
5519 * bootstrap (gnulib_modules): Add xalloc-die.
5520 Set LC_ALL=C so that file names sort consistently.
5521 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5522 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5523 uintmax_t.m4, ulonglong.m4.
5524 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5525 po.m4 since we are now using _gl.m4 instead.
5526
87a8ad5c
PE
55272004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5528
5529 * src/scan-action.l: Remove. Scanning of semantic actions is
5530 handled in scan-gram.l.
5531
dca81a78
PE
55322004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5533
5534 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5535
5536 * src/location.h (struct): The file member is a uniqstr.
5537 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5538
c9cbf7c5
PE
55392004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5540
5541 Fix bug with non-%union parsers that have printers or destructors,
5542 which led to a Bison core dump. Reported by Peter Fales in
5543 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 5544
c9cbf7c5
PE
5545 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5546 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5547 not to our own type.
5548 * src/output.c (symbol_destructors_output, symbol_printers_output):
5549 Don't assume %union.
5550 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5551 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5552 UNION-FLAG. All callers changed.
5553 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5554 Use type char, not unsigned int, when declaring an array of char;
5555 this lets us remove a cast.
5556 (Printers and Destructors): Add non-%union test cases.
5557
fa7e68c3
PE
55582004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5559
5560 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5561 GLR writeups. E.g., avoid frenchspacing and the future tense,
5562 change "lookahead" to "look-ahead", and change "wrt" to "with
5563 respect to".
2fa09258 5564
fa7e68c3
PE
55652004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5566
5567 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5568 New sections, split off from the GLR Parsers section. Put the new
5569 Simple GLR Parser near the start of the GLR section, for clarity.
5570 Rewrite connective text.
5571
99a9344e
PE
55722004-06-21 Frank Heckenbach <frank@g-n-u.de>
5573
5574 * doc/bison.texinfo (Simple GLR Parsers): New section.
5575
8dd162d3
PE
55762004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5577
5578 * NEWS, TODO, doc/bison.texinfo:
5579 Use "look-ahead" instead of "lookahead", to be consistent.
5580 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5581 while we're fixing "look-ahead".
5582 * src/conflicts.c (shift_set): Renamed from shiftset.
5583 (look_ahead_set): Renamed from lookaheadset.
5584 * src/print.c: Likewise.
5585 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5586 name for "lookahead".
5587 (report_types, usage): Likewise.
5588 * src/getargs.h (report_look_ahead_tokens): Renamed from
5589 report_lookaheads.
5590 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5591 compute_lookaheads.
5592 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5593 (look_ahead_tokens_print): Renamed from lookaheads_print.
5594 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5595 state_rule_lookaheads_print.
5596 * src/state.h: Likewise.
5597 (reductions.look_ahead_tokens): Renamed from lookaheads.
5598 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5599 AT_DATA_LOOKAHEADS_GRAMMAR.
5600
57a90331
PE
56012004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5602
5603 * README: Update location of patched M4 distribution.
5604
8ed3234a
PE
56052004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5606
5607 Don't assume the C++ compiler takes the same arguments as the C compiler
5608 (trivial change).
5609 * configure.ac (O0CXXFLAGS): New var.
5610 * tests/atlocal.in (CXXFLAGS): Use it.
5611
07971983
PE
56122004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 Fix some "make check" problems with C++ reported by
5615 Albert Chin-A-Young for Tru64 C++ in this thread:
5616 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5617
5618 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5619 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5620 Output to a .cc file for C++, not to a .c file.
5621 * tests/calc.at (AT_CHECK_CALC): Likewise.
5622 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5623 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5624
29058652
PE
56252004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5626
5627 * tests/calc.at, tests/actions.at: Workaround for SGI
5628 C++ compiler. (trivial change)
5629
62cb8a99
PE
56302004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5631
fd418816
PE
5632 Spent a few hours checking out which prerequisite versions the
5633 current sources actually require. I went all the way back to
5634 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5635 a seemingly endless set of combinations of versions more recent
5636 than that. The bottom line is that the current sources require
5637 fairly recent versions of the build tools, and it'll be some work
5638 to change this.
5639 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5640 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5641 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5642 Add comments explaining why those particular versions are
5643 currently needed.
2fa09258 5644
62cb8a99
PE
5645 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5646 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 5647 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
5648
5649 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5650 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5651
caa52c10
PE
56522004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5653
5654 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5655 0.11.5. Suggested by Bruno Haible.
5656 * bootstrap: Remove gettext version checking.
5657
5658 * doc/bison.texinfo (Decl Summary): Also mention that %union
5659 can depend on prerequisite types. Problem reported by Tim
5660 Van Holder.
5661
4bfd5e4e
PE
56622004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5663
2cef3017
PE
5664 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5665 * README-alpha: Don't tell people not to package this.
5666
b9c85d5c
PE
5667 * bootstrap: Don't assume $(...) works; use `...` instead.
5668 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5669 gettext better.
5670
4bfd5e4e
PE
5671 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5672 put into the -d output file, and mention what to do if YYSTYPE is
5673 defined as a macro.
5674
6a36ff94
PE
56752004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5676
6712933e
PE
5677 Undo change made earlier today: it caused autopoint to not bring
5678 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5679 autopoint's.
5680
5681 * bootstrap: Check that gettext version matches what's in
5682 configure.ac. Warn users to ignore robots.txt ERROR 404.
5683 * bootstrap: Undo today's earlier change (logged below).
5684 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 5685
6a36ff94
PE
5686 The gettext version checking is causing more trouble than it's
5687 curing; remove it. Problem reported by Paul Hilfinger.
5688
5689 * bootstrap: Issue a warning that one can expect a message
5690 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5691 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5692
209ea708
PE
56932004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5694
5695 Ensure that the C++ compiler used for testing actually works on a
5696 simple test program; if not, skip the C++-related tests. Problem
5697 reported by Vin Shelton in:
161a71f3 5698 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
5699
5700 * m4/cxx.m4: New file.
5701 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5702 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5703 * tests/local.at (AT_COMPILE_CXX): Use it.
5704
41ca2549
PE
57052004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5706
383e69dc
PE
5707 * data/glr.c (yylloc): Output this macro even if locations are not
5708 being generated, as the GLR parser needs it even in that case.
5709 Problem reported by Troy A. Johnson
5710 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5711
41ca2549
PE
5712 * configure.ac (AC_INIT): Update to 1.875e.
5713
e476c87d
PE
57142004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5715
5716 * NEWS: Version 1.875d.
5717 * configure.ac (AC_INIT): Likewise.
5718 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5719
5720 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5721 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5722 lalr1.cc runs afoul of the first, and the last two are no longer
5723 supported by GCC 3.4.0.
5724 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5725 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5726
233a88ad
PE
57272004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5728
5729 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5730 unsigned int, for compatibility with latest gnulib hash module.
5731 * src/state.c (state_hash, state_hasher): Likewise.
5732 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5733 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 5734
12ffdd28
PE
57352004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5736
5737 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5738
5739 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5740 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5741 character and string literals.
5742 (unexpected_end): New function.
5743 (unexpected_eof): Use it.
5744 (unexpected_newline): New function.
5745 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5746 actions.
e476c87d 5747
12ffdd28
PE
5748 * NEWS: Document %expect-rr.
5749
5750 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5751 Fix typo by replacing $1 with $option.
5752 Remove more 'intl'-related files.
9668e2be 5753 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
5754
5755 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5756 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5757 strtoul.c.
5758 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5759 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5760 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5761 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5762 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5763 * src/.cvsignore: Add *.output.
5764
5765 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5766 gets copied to the output file.
e476c87d 5767
1f65350a
PE
57682004-04-28 Paul Eggert <eggert@twinsun.com>
5769
5770 Get files from the gnulib and po repositories, instead of relying
5771 on them being in our CVS. Upgrade to latest versions of gnulib
5772 and Automake.
5773
5774 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5775 * bootstrap: Bootstrap from gnulib and po repositories.
5776 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5777 * README-cvs: Document these changes. Remove version numbers from
5778 mentions of build tools, since they change so often. Mention Flex.
5779
5780 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5781 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
5782 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5783 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 5784 does this for us.
12ffdd28
PE
5785 (AC_ISC_POSIX): Remove; we no longer support this
5786 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
5787 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5788 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5789 Do not check for C89 headers, except for locale.h which is used
5790 by the Yacc library and must port to K&R hosts.
5791 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5792 Do not check for C89 functions, except for setlocale which is
5793 used by the Yacc library.
5794 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5795 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5796 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5797 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5798 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5799 AM_GNU_GETTEXT): Remove; now done by:
5800 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5801 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5802 for us.
5803
5804 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5805 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5806 Define to empty, as gnulib.mk will do the rest for us.
5807 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5808 for us.
5809 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5810 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5811
5812 * src/files.c: Include gnulib's xstrndup.h.
5813
5814 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5815 (REALLOC): Use xnrealloc, for likewise.
5816 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5817 (strnlen, memrchr): Remove decls; functions no longer used.
5818 Include <stpcpy.h>.
5819
5820 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5821 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5822 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5823 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5824 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5825 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5826 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5827 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5828 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5829 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5830 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5831 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5832 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5833 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5834 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5835 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5836 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5837 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5838 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5839 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5840 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5841 Remove, as these files are now generated automatically
5842 by bootstrap or automake.
5843
5844 * po/ChangeLog: Remove: all but one entry was a duplicate
5845 of this file, and I moved that 2000-11-02 entry here.
5846
5847 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5848 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5849 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5850 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5851 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5852 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5853 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5854 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5855 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5856 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5857 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5858 xstrndup.h.
5859 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5860 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5861 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5862 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5863 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5864 * src/.cvsignore: Remove *_.c.
5865
5866
5867 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5868 support it. (The latest stable gzip doesn't.)
5869
58702004-04-27 Paul Eggert <eggert@twinsun.com>
5871
5872 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5873 case, as stos_ is now used by destructors due to the 2004-02-09
5874 change.
5875
5876 Remove more K&R C support.
5877 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5878 * lib/subpipe.c (errno): Remove decl.
5879 Include <stdlib.h> unconditionally.
5880 (EXIT_FAILURE): Remove macro.
5881 * src/complain.c (vfprintf, strerror): Remove.
5882 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5883 unconditionally.
5884 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5885 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5886 (strchr, strspn, memchr): Remove decls.
5887 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5888 unconditionally. Do not declare perror.
5889 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5890 unconditionally.
5891
5892 * src/complain.c (_): Remove useless defn, as system.h defines this.
5893
5894 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5895 with latest obstack.h.
5896 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5897 to procedure types, as obstack.h now does that for us.
5898 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5899
5900 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5901 so that this include file can stand alone.
5902 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5903 does this now. Include subpipe.h first after config.h, to
5904 test whether it can stand alone.
5905
5906 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5907 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5908 unused declaration.
5909
5910 * tests/synclines.at (%union synch line): Put a dummy member in
5911 the union, because empty unions aren't allowed in C. Caught
5912 by GCC 3.4.0.
5913
4f16766c
PE
59142004-04-13 Jim Meyering <jim@meyering.net>
5915
5916 * src/conflicts.c (conflicts_print): Correct format string typo:
5917 use `%%' to produce literal `%'. (trivial change)
5918
779e7ceb
PE
59192004-03-30 Paul Eggert <eggert@twinsun.com>
5920
5921 * src/getargs.c (version): Update copyright year to 2004.
5922
5923 * data/c.m4 (b4_int_type): Use 'short int' rather than
5924 'short', and similarly for 'long', 'unsigned', etc.
5925 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5926 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5927 yy_yypstack, yydumpstack): Likewise.
5928 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5929 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5930 Likewise.
5931 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5932 yy_stack_print, yyparse): Likewise.
5933 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5934 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5935 * lib/bitset.c (bitset_print): Likewise.
5936 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5937 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5938 * lib/bitsetv.c (bitsetv_dump): Likewise.
5939 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5940 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5941 Likewise.
5942 * src/LR0.c (allocate_itemsets): Likewise.
5943 * src/gram.h (rule_number, rule): Likewise.
5944 * src/lalr.h (goto_number): Likewise.
5945 * src/nullable.c (nullable_compute): Likewise.
5946 * src/output.c (prepare_rules): Likewise.
5947 * src/relation.c (relation_print, relation_digraph): Likewise.
5948 * src/relation.h (relation_node): Likewise.
5949 * src/state.h (state_number, transitions, errs, reductions,
5950 struct state): Likewise.
5951 * src/symtab.h (symbol_number, struct symbol): Likewise.
5952 * src/tables.c (vector_number, tally, action_number,
5953 default_goto, goto_actions): Likewise.
5954 * tests/existing.at (GNU Cim Grammar): Likewise.
5955 * tests/regression.at (Web2c Actions): Likewise.
5956
5957 * src/output.c (muscle_insert_short_int_table): Renamed from
5958 muscle_insert_short_table. All uses changed.
5959
d6328241
PH
59602004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5961
5962 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5963 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5964 Add %expect-rr rule.
4f16766c 5965
d6328241
PH
5966 * src/scan-gram.l: Recognize %expect-rr.
5967
4f16766c 5968 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 5969 expected_conflicts.
4f16766c 5970 (expected_rr_conflicts): Declare.
d6328241
PH
5971
5972 * src/conflicts.c (expected_sr_conflicts): Rename from
5973 expected_conflicts.
5974 (expected_rr_conflicts): Define.
5975 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5976 for GLR parsers.
5977 Use expected_sr_conflicts in place of expected_conflicts.
5978 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 5979
d6328241 5980 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 5981
1452af69
PE
59822004-03-08 Paul Eggert <eggert@gnu.org>
5983
5984 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 5985 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
5986
5987 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5988 in lalr1.cc.
5989 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5990 * src/scan-gram.l (scan_integer): New function.
5991 ({int}): Use it.
5992 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5993 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5994 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5995 Say "long int", not "long", for uniformity with GNU style.
5996
006d217d
PE
59972004-02-25 Paul Eggert <eggert@twinsun.com>
5998
5999 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6000 compilers. This fixes a problem with Intel's C++ compiler being
6001 chatty, reported by Guido Trentalancia in
161a71f3 6002 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 6003
c2729758
ADL
60042004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6005
6006 Support %destructor and merge error locations in lalr1.cc.
6007
6008 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6009 (Parser::stos_): Define unconditionally.
6010 (Parser::destruct_): New method. Generate its body with
6011 b4_yydestruct_generate.
6012 (Parser::error_start_): New attribute.
6013 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6014 token which are discarded.
6015 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6016 error_start_ when erroneous token are discarded.
6017 (Parser::parse) <yyerrlab1>: Compute the location of the error
6018 token so that it covers all the discarded tokens.
6019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6020 it can be called with `%skeleton "lalr1.cc"', and do that.
6021
dd0e0635
PE
60222004-02-02 Paul Eggert <eggert@twinsun.com>
6023
6024 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6025 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6026 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6027 There's no need to mention top_builddir since Automake does that
6028 for us.
6029 (INCLUDES): Remove, as Automake says it's obsolescent.
6030 Contents migrated into AM_CPPFLAGS as described above.
6031 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6032
60332004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6034
6035 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6036 (yyreportSyntaxError): Handle case where lookahead token is
6037 YYEMPTY.
6038
be16239b
PH
60392004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6040
6041 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6042 resulting parsers are compilable with C++.
6043
5fa90832
PE
60442003-12-23 Paul Eggert <eggert@twinsun.com>
6045
6046 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6047 * src/output.c (output_skeleton): Rename local var.
6048 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6049 Bison tokens, as this runs afoul of the 2003-10-07 change that
6050 disallowed NUL bytes in character constants or string literals.
6051
6052 * tests/local.at: Require Autoconf 2.59's Autotest.
6053 * tests/testsuite.at: Don't include local.at, since we now assume
6054 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6055 including it.
6056 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6057 multiple inclusion warnings.
dd0e0635 6058
b165c324
AD
60592003-12-02 Akim Demaille <akim@epita.fr>
6060
6061 * doc/bison.texinfo (How Can I Reset the Parser): More about start
6062 conditions.
6063 From Bruno Haible.
6064
26e06a21
ADL
60652003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
6066
6067 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
6068
92ac3705
PE
60692003-10-07 Paul Eggert <eggert@twinsun.com>
6070
6a5ecb38
PE
6071 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
6072 if testsuite doesn't exist.
6073
92ac3705
PE
6074 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
6075 literals, unfortunately.
6076 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
6077 Complain about NUL bytes in character constants or string literals.
6078
91d2c560
PE
60792003-10-05 Paul Eggert <eggert@twinsun.com>
6080
6081 * NEWS: Don't document %no-default-prec, as it's still
6082 too experimental.
6083 * doc/bison.texinfo: Document %no-default-prec only if
6084 the defaultprec flag is set. Normally it's not.
6085
0cc3da3a
PE
60862003-10-04 Paul Eggert <eggert@twinsun.com>
6087
6088 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
6089 non-modifiable lvalue, instead of a modifiable one.
6090 * doc/bison.texinfo (Actions): Document that $$ can
6091 be assigned to. Do not claim that $$ and $N are
6092 array element references: user code should not rely on this.
6093
22fccf95
PE
60942003-10-01 Paul Eggert <eggert@twinsun.com>
6095
6096 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
6097 (grammar_declaration): Use it.
6098 * src/scan-gram.l: New token %no-default-prec.
6099 * tests/conflicts.at: Revamp tests to use %no-default-prec.
6100 * NEWS, doc/bison.texinfo: Document the above.
6101
fc8f2965
AD
61022003-10-01 Akim Demaille <akim@epita.fr>
6103
6104 VCG no longer supports long_straight_phase.
6105
6106 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
6107 * src/print_graph.c (print_graph): Adjust.
6108
39a06c25
PE
61092003-09-30 Frank Heckenbach <frank@g-n-u.de>
6110 and Paul Eggert <eggert@twinsun.com>
6111
6112 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
6113 Table of Symbols): Document %default-prec.
6114 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
6115 (grammar_declaration): Set default_prec on %default-prec.
6116 * src/scan-gram.l (%default-prec): New token.
6117 * src/reader.h (default_prec): New flag.
6118 * src/reader.c: Likewise.
6119 (packgram): Handle it.
6120 * tests/conflicts.at (%default-prec without %prec,
6121 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 6122
39a06c25
PE
61232003-09-30 Paul Eggert <eggert@twinsun.com>
6124
6125 * tests/testsuite.at: Include local.at, not input.at, fixing
6126 a typo in the 2003-08-25 patch.
6127
62b6aef9
AD
61282003-08-27 Akim Demaille <akim@epita.fr>
6129
6130 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
6131 GCC warnings.
6132
89e1cc61
AD
61332003-08-26 Akim Demaille <akim@epita.fr>
6134
6135 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
6136 "<\#" to avoid magic from Gnus when posting parts of this script.
6137
a08460b0
AD
61382003-08-26 Akim Demaille <akim@epita.fr>
6139
6140 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
6141 (Parser::parse): here.
6142 Adjust: nerrs and errstatus is now replaced by...
6143 (Parser::nerrs_, Parser::errstatus_): New.
6144
603f1cfd
AD
61452003-08-25 Akim Demaille <akim@epita.fr>
6146
6147 * config/announce-gen, Makefile.cfg: New.
6148 * Makefile.am: Adjust.
6149 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
6150 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
6151
cd3684cf
AD
61522003-08-25 Akim Demaille <akim@epita.fr>
6153
6154 When reducing initial empty rules, Bison parser read an initial
6155 location that is not defined. This results in garbage, and that
6156 affects Bison's own parser. Therefore we need (i) to extend Bison
6157 to support a means to initialize this location, and (ii) to use
6158 this CVS Bison to fix CVS Bison's parser.
6159
6160 * src/reader.h, reader.c (epilogue_augment): Remove, replace
6161 with...
6162 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
6163 * src/parse-gram.y: Adjust.
6164 (%initial-action): New.
6165 (%error-verbose): Since we require CVS Bison, there is no reason
6166 not to use it.
6167 * src/scan-gram.l: Adjust.
6168 * src/Makefile.am (YACC): New, to make sure we use our own parser.
6169 * data/yacc.c (yyparse): Use b4_initial_action.
6170
4e03e201
AD
61712003-08-25 Akim Demaille <akim@epita.fr>
6172
6173 * doc/bison.texinfo: Don't promote stdout for error messages.
6174
8c182d05
AD
61752003-08-25 Akim Demaille <akim@epita.fr>
6176
6177 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
6178 From Alexandre Duret-Lutz.
6179
6a60c4cf
PE
61802003-08-25 Akim Demaille <akim@epita.fr>
6181
6182 Version 1.875c.
6183
25f66e1a
AD
61842003-08-25 Akim Demaille <akim@epita.fr>
6185
6186 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
6187 Use them.
6188
5348bfbe
AD
61892003-08-25 Akim Demaille <akim@epita.fr>
6190
6191 * data/lalr1.cc (Parser::reduce_print_): New.
6192 Use it.
6193
47301314
AD
61942003-08-25 Akim Demaille <akim@epita.fr>
6195
6196 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
6197 error recovery loops. This patch is based on
161a71f3 6198 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
6199 Also, augment the similarity between lalr1.cc and yacc.c.
6200 Note: the locations of error recovery rules are not correct yet.
6201
6202 * data/lalr1.cc: Comment changes to augment the similarity between
6203 lalr1.cc and yacc.c.
6204 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
6205 (yyerrlab1): Remove, but where it used to be (now the bottom part of
6206 yyerrlab), when hitting EOF, pop the whole stack here instead of
6207 merely falling thru the default error handling mechanism.
6208 (yyerrorlab): New label, with the old contents of YYERROR,
6209 plus the following change: pop the stack of rhs corresponding
6210 to the production that invoked YYERROR. That is how Yacc
6211 behaves (required by POSIX).
6212 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
6213 fail.
6214
1f7a61ff
AD
62152003-08-25 Akim Demaille <akim@epita.fr>
6216
6217 Tune local.at so that people can "autom4te -l autotest calc.at -o
6218 calc" for instance, to extract a sub test suite.
6219
6220 * tests/testsuite.at: Move the initialization, Autotest version
6221 requirement, and AT_TESTED invocation into...
6222 * tests/local.at: here.
6223 * tests/testsuite.at: Include it for compatibility with Autoconf
6224 2.57.
6225 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6226 be ignore.
6227
327b5b56
PE
62282003-08-04 Paul Eggert <eggert@twinsun.com>
6229
6230 Rework code slightly to avoid gcc -Wtraditional warnings.
6231 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6232 The returned value is now stored in *YY0. All callers changed.
6233 * src/output.c (merge_output): Adjust to the above change.
6234
0051e3ed
PE
62352003-07-26 Paul Eggert <eggert@twinsun.com>
6236
6237 * data/glr.c (YYASSERT): New macro.
6238 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6239 yyresolveStates, yyprocessOneStack):
6240 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6241 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 6242
137437c6
PE
62432003-07-25 Paul Eggert <eggert@twinsun.com>
6244
5b620e06
PE
6245 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6246 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 6247 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
6248 by Frank Heckenbach, though I have omitted the structure-initialization
6249 part of his glr-knr.diff patch since I recall that the Portable
6250 C Compiler didn't require that change.
6251
137437c6
PE
6252 Let the user specify how to allocate and free memory.
6253 Derived from a suggestion by Frank Heckenbach in
161a71f3 6254 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
6255 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6256 All uses of free, malloc, realloc changed to use these macros,
6257 and unnecessary casts removed.
6258 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6259
ddb85ca5
PE
62602003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6261
6262 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6263 use s.empty() rather than s == "" to test for empty string; see
161a71f3 6264 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
6265 (trivial change)
6266
39910e09
AD
62672003-06-25 Akim Demaille <akim@epita.fr>
6268
6269 * config/depcomp, config/install-sh: Update from masters.
6270
0ae99356
PE
62712003-06-20 Paul Eggert <eggert@twinsun.com>
6272
6273 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6274 and return properly parenthesized result.
6275 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6276 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6277 Remove unnecessary parentheses from uses.
6278 * doc/bison.texinfo (Location Default Action): Describe the
6279 conventions for parentheses.
6280
cd05d13c
PE
62812003-06-19 Paul Eggert <eggert@twinsun.com>
6282
81fd08ca
PE
6283 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6284 yyreportTree): Do not assume that size_t is the same width as int,
6285 when printing sizes. Print sizes using an unsigned format.
6286 Problem reported by Frank Heckenbach in
161a71f3 6287 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 6288
cd05d13c
PE
6289 Port to Forte Developer 7 C compiler.
6290 * data/glr.c (struct YYLTYPE): If locations are not being used,
6291 declare a single dummy member, as empty structs do not conform
6292 to the C standard.
6293 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6294 the Forte Developer 7 C compiler complains that end-of-loop
6295 code is not reached.
6296
4dcf140b
PE
62972003-06-17 Paul Eggert <eggert@twinsun.com>
6298
6299 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6300 avoid warnings from picky compilers about redefinition of PARAMS.
6301
8dd76bee
PE
63022003-06-17 Paul Eggert <eggert@twinsun.com>
6303
6304 Version 1.875b.
6305
6306 * NEWS: Document 1.875b.
6307
6308 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6309 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6310 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6311 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6312 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6313 per recent gettext manual's suggestion.
6314 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6315 Use prototypes, not old-style definitions.
6316 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6317 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6318 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6319 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6320 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6321 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6322 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6323 vbitset_or_and_cmp, vbitset_copy): Likewise.
6324
6325 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6326 Do not include <stdlib.h>.
6327 (PARAMS): Define unconditionally for C89.
6328 (ATTRIBUTE_NORETURN): Remove.
6329 (ATTRIBUTE_UNUSED): Define unconditionally.
6330
6331 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 6332 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
6333 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6334 * lib/vbitset.c, lib/vbitset.h: New files.
6335 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6336 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6337 from libbitset.
6338
6339 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6340 `How Can I Reset @code{yyparse}', since texinfo does not allow
6341 arbitrary @ in node names.
6342
6343 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6344 shouldn't be needed according to the gettext 0.12.1 documentation
6345 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 6346 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 6347 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 6348 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 6349
8dd76bee
PE
6350 * lib/.cvsignore: Add stdbool.h.
6351 * m4/.cvsignore: Add nls.m4, po.m4.
6352
6353 Upgrade to CVS gnulib.
6354 * stdbool_.h: File renamed from stdbool.h.in.
6355 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6356 AC_HEADER_STDBOOL.
6357 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6358 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6359 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6360 (MOSTLYCLEANFILES): New var.
6361 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6362 (stdbool.h): New rule.
6363 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6364 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6365 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6366 m4/quote.m4: Upgrade to today's gnulib.
6367
6368 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6369 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6370 the tests right now.
6371 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6372 yyerror are declared before use; C99 requires this.
6373
25005f6a
PH
63742003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6375
6376 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6377 first.
6378 (yyrecoverSyntaxError): Correct the logic for setting and testing
6379 yyerrState.
6380 Correct comment on handling EOF.
6381 Allow states with only a default reduction, rather than failing
8dd76bee 6382 (I can't quite reconstruct why these were not allowed before).
25005f6a 6383
137437c6 6384 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 6385 buffer overruns, corrupting state.
8dd76bee
PE
6386
6387 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
6388 definition.
6389 * src/reader.h (max_left_semantic_context): New variable declaration.
6390 * src/scan-gram.l (max_left_semantic_context): Define.
6391 (handle_action_dollar): Update max_left_semantic_context.
6392 * data/glr.c (YYMAXLEFT): New definition.
6393 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6394 (yyresolveAction): Ditto.
6395
6396 Fixes to problems with location handling in GLR parsers reported by
6397 Frank Heckenbach (2003/06/05).
6398
6399 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6400 (YYRHSLOC): Add parentheses, and define only if locations used.
6401 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6402 locations not used.
6403 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6404 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 6405
25005f6a
PH
6406 * tests/cxx-type.at: Exercise location information; update tests
6407 to differentiate output with and without locations.
8dd76bee 6408 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
6409 because default YYLTYPE not yet defined.
6410 Change semantic actions to compute strings, rather than printing
6411 them directly (to test proper passing of semantics values). Change
6412 output to prefix notation and update test data and expected results.
6413 (yylex): Track locations.
6414 (stmtMerge): Return value rather than printing, and include arguments
6415 in value.
8dd76bee 6416
711f40b7
PE
64172003-06-03 Paul Eggert <eggert@twinsun.com>
6418
6419 Avoid warnings generated by GCC 2.95.4 when Bison is
6420 configured with --enable-gcc-warnings.
6421 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6422 yy::]b4_parser_class_name[::translate_,
6423 yy::Stack::operator[] (unsigned),
6424 yy::Stack::operator[] (unsigned) const,
6425 yy::Slice::operator[] (unsigned),
6426 yy::Slice::operator[] (unsigned) const):
6427 Rename local vars to avoid warnings.
6428 * tests/glr-regression.at (Improper handling of embedded actions
6429 and $-N in GLR parsers): Remove unused local variable from yylex.
6430 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6431 (void) as arg when not pure, since we now assume C89 when building
6432 Bison. Pacify GCC by using parameter.
6433
ac695f7d
PE
64342003-06-02 Paul Eggert <eggert@twinsun.com>
6435
6436 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6437 yy::Location::lines, yy::Location::columns): Rename arguments
6438 to avoid shadowing; this removes a warning generated by GCC 3.3.
6439
26ec81e0
PE
64402003-06-01 Paul Eggert <eggert@twinsun.com>
6441
6442 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6443 to g++, as GCC 3.3 complains if you do it.
6444 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6445 everything that WARNING_CFLAGS has, except omit warnings
6446 not suitable for C++.
6447 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6448 * tests/atlocal.in (CXXFLAGS): New var.
6449 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6450
6451 Fix a GLR parser bug I reported in February; see
161a71f3 6452 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
6453 The problem was that GLR parsers did not conform to the C standard,
6454 because actions like { $1 = $2 + $3; } expanded to expressions
6455 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6456 to a local variable. The C standard says that expressions
6457 like (var = f ()) + (var = f ()) have undefined behavior.
6458 Another problem was that GCC sometimes issues warnings that
6459 yyfill and its parameters are unused.
6460
6461 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6462 as possibly unused.
6463 (yyfill): New function.
6464 (YYFILL): Use it.
6465 (yyuserAction): Change type of yynormal to bool, so that it matches
6466 the new yyfill signature. Mark it as possibly unused.
6467
6468
6469 Follow up on a bug I reported in February, where a Bison-generated
6470 parser can loop. Provide a test case and a fix for yacc.c. I
6471 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6472 The original bug report is in:
161a71f3 6473 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
6474
6475 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6476 macro's size was becoming unwieldy.
6477 (yyerrlab): Do not discard an empty lookahead symbol, as this
6478 might destroy garbage.
6479 (yyerrorlab): New label, with the old contents of YYERROR,
6480 plus the following change: pop the stack of rhs corresponding
6481 to the production that invoked YYERROR. That is how Yacc
6482 behaves, and POSIX requires this behavior.
6483 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6484 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6485 Define 'alarm' to do nothing if unistd.h is not available.
6486 Add a new rule "exp: '-' error;" to test the above change to
6487 data/yacc.c. Use 'alarm' to abort any test taking longer than
6488 10 seconds, as it's probably looping.
6489 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6490 Also, the new yacc.c generates two fewer diagnostics for an
6491 existing test.
6492
d0829076
PE
64932003-05-24 Paul Eggert <eggert@twinsun.com>
6494
c6ae27df
PE
6495 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6496 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6497 This fixes a problem reported by John Bowman when the Compaq/HP
6498 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6499 -ansi -Wall -gall).
6500 * data/yacc.c (union yyalloc): Likewise.
6501 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 6502
d0829076
PE
6503 Switch from 'int' to 'bool' where that makes sense.
6504
6505 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6506 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6507 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6508 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6509 Return or accept bool, not int. All callers changed.
6510 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6511 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6512 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6513 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6514 bitset_or_and_cmp_): Likewise.
6515 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6516 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6517 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6518 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6519 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6520 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6521 bitset_stats_or_and_cmp): Likewise.
6522 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6523 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6524 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6525 ebitset_xor_cmp): Likewise.
6526 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6527 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6528 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6529 lbitset_xor_cmp): Likewise.
6530 * lib/bbitset.h: Include <stdbool.h>.
6531 (struct bitset_vtable): The following members now return bool, not
6532 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6533 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6534 or_and_cmp).
6535 * src/conflicts.c (count_rr_conflicts): Likewise.
6536 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6537 All uses changed.
6538 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6539 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6540 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6541 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6542 graph_flag): Likewise.
6543 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6544 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6545 graph_flag): Likewise.
6546 * src/output.c (error_verbose): Likewise.
6547 * src/output.h (error_verbose): Likewise.
6548 * src/reader.c (start_flag, typed): Likewise.
6549 * src/reader.h (typed): Likewise.
6550 * src/getargs.c (LOCATIONS_OPTION): New constant.
6551 (long_options, getargs): Use it.
6552 * src/lalr.c (build_relations): Use bool, not int.
6553 * src/nullable.c (nullable_compute): Likewise.
6554 * src/print.c (print_reductions): Likewise.
6555 * src/tables.c (action_row, pack_vector): Likewise.
6556 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6557 * src/output.c (prepare): Use it.
6558 * src/output.c (token_definitions_output,
6559 symbol_destructors_output, symbol_destructors_output): Use string,
6560 not boolean integer, to keep track of whether to output separator.
6561 * src/print_graph.c (print_core): Likewise.
6562 * src/state.c (state_rule_lookaheads_print): Likewise.
6563
6564 * config/install-sh: Sync from automake 1.7.5.
6565
6b2584b7
PE
65662003-05-14 Paul Eggert <eggert@twinsun.com>
6567
6568 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6569 semicolon after a grammar declaration, in the interest of possible
6570 future changes to the Bison input language.
6571 Do not allow a stray semicolon at the start of the grammar.
6572 (rhses.1): Allow one or more semicolons after any rule, including
6573 just before "|" as required by POSIX.
6574 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6575 grammar.
6576
caf37a36
ADL
65772003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6578
6579 %parse-param support for lalr1.cc.
6580
6581 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6582 b4_cc_constructor_calls, b4_cc_constructor_call,
6583 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6584 definitions.
6585 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6586 parse-param arguments.
6587 (yy::b4_parser_class_name): Declare instance variables to
6588 hold parse-param arguments.
6589 * tests/calc.at: s/value/semantic_value/ because value clashes
6590 with a member of yy::b4_parser_class_name. Adjust C++ code
6591 to handle %parse-param. Enable %parse-param test in C++.
6592
3ab37077
PE
65932003-05-12 Paul Eggert <eggert@twinsun.com>
6594
6595 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6596 English a bit. Fix fclose typo. Change "const char" to "char
6597 const", and use ANSI C rather than K&R for "main". Suggest
6598 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6599 and suggest yy_switch_to_buffer.
6600
66012003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
6602
6603 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6604 C89. This avoids a diagnostic on compilers that define __STDC__
6605 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 6606 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 6607
e743727f
PE
66082003-05-03 Paul Eggert <eggert@twinsun.com>
6609
6610 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6611 Do not overrun array bounds.
6612 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 6613 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 6614
916708d5
AD
66152003-04-29 Akim Demaille <akim@epita.fr>
6616
6617 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6618 * src/getargs.c, src/getargs.h: here, as bool, not int.
6619 (nondeterministic_parser): New.
6620 * src/parse-gram.y, src/scan-gram.l: Support
6621 %nondeterministic-parser.
6622 * src/output.c (prepare): Use nondeterministic_parser instead
6623 of glr_parser where appropriate.
6624 * src/tables.c (conflict_row, action_row, save_row)
6625 (token_actions, token_actions, pack_vector): Ditto.
6626
a06ea4aa
AD
66272003-04-29 Akim Demaille <akim@epita.fr>
6628
6629 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6630
211074ca
AD
66312003-04-29 Akim Demaille <akim@epita.fr>
6632
6633 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6634 with %pure-parser and %locations to exercise the patch from Yakov
6635 Markovitch below.
6636
6175ffe3
PE
66372003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6638
6639 * data/yacc.c: (b4_lex_param): Corrected for the case where
6640 %lex-param is provided and %pure-parser isn't.
6641
b1e95857
PE
66422003-04-27 Paul Eggert <eggert@twinsun.com>
6643
6644 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 6645 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
6646 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6647 if it is not defined.
6648 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6649
acda9df6
PE
66502003-04-26 Paul Eggert <eggert@twinsun.com>
6651
3470c57b
PE
6652 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6653 Declare to be of type suitable for the ninf value itself, not of
6654 type suitable for the corresponding table, since the latter might
6655 be unsigned but the ninf value might be negative. This fixes a
6656 bug reported by Alexandre Duret-Lutz in
161a71f3 6657 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 6658
acda9df6
PE
6659 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6660 invokes it. We shouldn't invoke it twice because it will attempt
6661 to put error.o in the archive twice. This fixes a glitch reported
6662 by Martin Mokrejs in
161a71f3 6663 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 6664
b5250f26
PE
66652003-04-21 Paul Eggert <eggert@twinsun.com>
6666
6667 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6668 to gnulib.
6669
089ac0f1
PE
66702003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6671
6672 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6673 Fix obvious typo that results in uncompilable GLR parsers
6674 when both %pure-parser and %locations are used. (trivial change)
6675
5ededac6
PE
66762003-04-17 Paul Eggert <eggert@twinsun.com>
6677
1b8f2fff
PE
6678 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6679 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6680 Do not insert the expected token via unput, as this runs afoul
6681 of a POSIX-compatibility bug in flex 2.5.31.
6682 All uses changed to BEGIN the parent state,
6683 since we no longer insert the expected token via unput.
6684 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6685 that is no longer emitted after the above change.
6686
5ededac6
PE
6687 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6688 the first one. This change is from Paul Hilfinger, and it fixes
6689 regression reported by Werner Lemberg in
161a71f3 6690 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
6691
6692 (resolve_sr_conflict): Don't invoke state_errs_set
6693 unless one or more tokens have been explicitly made errors.
6694 Otherwise, the above change causes Bison to abort.
6695
6696 * tests/existing.at (GNU pic Grammar): New test case, taken from
6697 Lemberg's email.
6698
b8be9132
AD
66992003-03-31 Akim Demaille <akim@epita.fr>
6700
6701 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6702
d423d460
AD
67032003-03-31 Akim Demaille <akim@epita.fr>
6704
6705 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6706 output.
6707
c7e441b4
AD
67082003-03-31 Akim Demaille <akim@epita.fr>
6709
6710 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6711 From Paul Hilfinger.
6712
231897ad
AD
67132003-03-29 Akim Demaille <akim@epita.fr>
6714
6715 * m4/error.m4: Do not put under dynamic conditions some code which
6716 expansion is under static control.
6717
5b066063
AD
67182003-03-29 Akim Demaille <akim@epita.fr>
6719
6720 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6721
22a74fec
AD
67222003-03-29 Akim Demaille <akim@epita.fr>
6723
6724 * doc/bison.texinfo (Strings are Destroyed): New.
6725
0eee27e7
PE
67262003-03-13 Paul Eggert <eggert@twinsun.com>
6727
6728 * .cvsignore: Add configure.lineno.
6729 * src/.cvsignore: Add yacc.
6730 * tests/.cvsignore: Add testsuite.log.
6731 * doc/fdl.texi: Sync with latest FSF version.
6732
f61aad93
PE
67332003-03-12 Paul Eggert <eggert@twinsun.com>
6734
537636c7
PE
6735 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6736 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6737 cursor, instead of leaving it undefined. This fixes a bug
6738 reported by Tim Van Holder in
161a71f3 6739 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
6740 * tests/input.at (Torturing the Scanner): Test the scanner on
6741 an empty input file, which was Tim Van Holder's test case.
6742
6743 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6744 <sys/resource.h> can be included, include sys/time.h and
6745 sys/times.h first, if available. This works around the SunOS
6746 4.1.4 porting bug reported by Bruce Becker in
161a71f3 6747 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
6748
6749 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6750 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6751 AC_HEADER_SYS_WAIT.
6752
f61aad93
PE
6753 Merge changes from gnulib. This was prompted because the CVS
6754 snapshot didn't build on Solaris 7 due to strnlen problems.
6755
6756 These changes need to be merged back into gnulib:
6757 * lib/hash.c: Include <stdbool.h> unconditionally.
6758 * m4/onceonly.m4 (m4_quote): New macro.
6759 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6760 Quote AC_FOREACH variable-expansions properly.
6761 The 2003-01-03 obstack.h change also needs merging.
6762 {end of changes requiring merging}
5b066063 6763
f61aad93
PE
6764 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6765 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6766 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6767 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6768 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6769 New files, imported from gnulib.
6770 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6771 above.
6772
6773 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6774 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6775 gnulib sources.
6776
6777 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6778 Add.
6779 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6780 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6781 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6782 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6783 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6784 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6785 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6786 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6787 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6788 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6789 (jm_PREREQ_ARGMATCH): Remove.
6790 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6791 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6792
6793 * src/system.h: Include <stdbool.h> unconditionally.
6794
6795 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6796 assuming at least C89 in the bitset code for some time now.
6797
d2ffe116
AD
67982003-03-03 Akim Demaille <akim@epita.fr>
6799
6800 * ro.po: New.
6801
052826fd
AD
68022003-03-02 Akim Demaille <akim@epita.fr>
6803
6804 * doc/bison.texinfo (Table of Symbols): Reactivate the
6805 documentation for %lex-param, and %parse-param.
6806
c4749565
AD
68072003-03-02 Akim Demaille <akim@epita.fr>
6808
6809 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6810 generate verbose error messages.
6811 Use the number of tokens as an upper bound in yytname, as it
6812 cannot be a non terminal.
6813
d5286af1
AD
68142003-03-02 Akim Demaille <akim@epita.fr>
6815
6816 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6817 message.
6818
22e304a6
AD
68192003-03-02 Akim Demaille <akim@epita.fr>
6820
22e304a6
AD
6821 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6822 Use them to exercise yycheck overrun.
6823 Based on Andrew Suffield's grammar.
6824
67a25fed
AD
68252003-03-02 Akim Demaille <akim@epita.fr>
6826
6827 Create tests/local.at for Bison generic testing macros.
6828
6829 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6830 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6831 This new file.
6832 * tests/calc.at (AT_CHECK_CALC): Adjust.
6833 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6834 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6835 * tests/local.at: here.
6836 (AT_COMPILE_CXX): Tags the tests using it as c++.
6837 Ignore the test if CXX is not functional.
6838
9c2b381f
PE
68392003-03-01 Paul Eggert <eggert@twinsun.com>
6840
6841 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6842 not loc->end, since loc->end might contain garbage and this leads
6843 to undefined behavior on some platforms.
6844 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6845 depend on *loc, so that the reader doesn't give the the false
6846 impression that *loc is initialized.
6847 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6848 does not survive the return.
6849
0433ba88
AD
68502003-03-01 Akim Demaille <akim@epita.fr>
6851
6852 * src/scan-gram.l (code_start): Always initialize it when entering
6853 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6854 yylex invocation. An alternative would be making it static, but
6855 then it starts with the second %%'s beginning, instead of its end.
6856
b305ea69
PE
68572003-02-28 Paul Eggert <eggert@twinsun.com>
6858
6859 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6860 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 6861 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 6862
c3d25e01
PE
68632003-02-26 Paul Eggert <eggert@twinsun.com>
6864
6865 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6866 Remove Sequent/Pyramid discussion (nobody uses them any more).
6867 Merge VMS and MS-DOS discussion; these ports may well be dead
6868 but let's keep mentioning them for now. Put <> around email
6869 addresses. Add copyright notice.
6870
c267ffbc
PE
68712003-02-24 Paul Eggert <eggert@twinsun.com>
6872
6873 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6874 to avoid collision with flex use of yylineno.
6875 Problem reported by Bruce Lilly in
161a71f3 6876 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
6877 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6878 * data/yacc.c (yy_reduce_print): Likewise.
6879
6880 * config/depcomp: Sync with Automake 1.7.3.
6881
f939fc12
AD
68822003-02-21 Akim Demaille <akim@epita.fr>
6883
6884 * data/lalr1.cc: Use temporary variables instead of casts to
6885 change integer types.
6886 Suggested by Paul Eggert.
6887
95923bd6
AD
68882003-02-21 Akim Demaille <akim@epita.fr>
6889
6890 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6891 to avoid confusions with lalr1.cc's notion of Position.
6892 Suggested by Paul Eggert.
6893
2cdc240e
AD
68942003-02-20 Akim Demaille <akim@epita.fr>
6895
6896 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6897 before initial_columns.
6898 (location.hh): Use consistent variable names when defining the
6899 operator<<.
6900 Use "last" so that we subtract from Positions, not from unsigned.
6901
5d003116
AD
69022003-02-20 Akim Demaille <akim@epita.fr>
6903
6904 * data/lalr1.cc (position.hh): New subfile, including the extended
6905 and Doxygen'ed documentation of class Position.
6906 (location.hh): Use it.
6907 Document a` la Doxygen.
ba1ecc07 6908 With the help of Benoit Perrot.
5d003116 6909
d02b25f9
AD
69102003-02-20 Akim Demaille <akim@epita.fr>
6911
6912 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6913 AT_YACC_IF.
6914 Redefine AT_YYERROR_SEES_LOC_IF using it.
6915 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6916 not defined.
6917 Don't use the location in yy::Parser::error_ and
6918 yy::Parser::print_ when not %locations.
6919 Activate more lalr1.cc tests.
6920
0d1c3a04
AD
69212003-02-19 Akim Demaille <akim@epita.fr>
6922
6923 * data/lalr1.cc: When displaying a line number, be sure to make it
6924 an int.
6925
60a777aa
AD
69262003-02-19 Akim Demaille <akim@epita.fr>
6927
6928 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6929 Remove, useless.
6930 (YYABORT, YYACCEPT, YYERROR): New.
6931 * tests/calc.at: Renable the lalr1.cc test.
6932
0b86fc41
AD
69332003-02-19 Akim Demaille <akim@epita.fr>
6934
6935 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6936 error recovery, mixing with/without pops and discarding of the
6937 lookahead.
6938 Exercise YYERROR.
6939 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6940
da99a5dc
PE
69412003-02-17 Paul Eggert <eggert@twinsun.com>
6942
6943 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6944 * tests/testsuite.at (AT_COMPILE): Use them.
6945 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 6946 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 6947
93b8c255
PE
69482003-02-12 Paul Eggert <eggert@twinsun.com>
6949
6950 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6951 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6952 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6953 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6954 Check for malloc failure, for consistency with yacc.c.
6955 (yytname_size): Remove, for consistency with yacc.c.
6956
6957 The bug still remains in data/lalr1.cc, as I didn't have time
6958 to fix it there.
6959
7548fed2
AD
69602003-02-06 Akim Demaille <akim@epita.fr>
6961
6962 * configure.ac (GXX): Rename as...
6963 (CXX): this, to keep the original Autoconf semantics.
6964 Require 2.57.
6965 * data/lalr1.cc: Fix b4_copyright invocations.
6966 If YYDEBUG is not defined, don't depend upon name_ being defined.
6967 (location.hh): Include string and iostream.
6968 (Position::filename): New member.
6969 (Position::Position ()): New.
6970 (operator<< (Position)): New.
6971 (operator- (Position, int)): New.
6972 (Location::first, Location::last): Rename as...
6973 (Location::begin, Location::end): these, to mock the conventional
6974 iterator names.
6975 (operator<< (Location)): New.
6976 * tests/atlocal.in (CXX): New.
6977 * tests/testsuite.at (AT_COMPILE_CXX): New.
6978 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6979 locations in a more synthetic way.
6980 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6981 lalr1.cc is used.
6982 Adjust the C locations to match those from Emacs: first column is
6983 column 0.
6984 Change all the expected results.
6985 Conform to the GCS: simplify the locations when applicable.
6986 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6987 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6988 these CPP macros with the m4 macros new defined by...
6989 (AT_CHECK_PUSHDEFS): this, i.e.:
6990 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 6991 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
6992 New macros.
6993 (AT_CHECK_POPDEFS): Undefine them.
6994 (AT_CHECK_CALC_LALR1_CC): New.
6995 Use it for the first lalr1.cc test.
6996
43a176ef
AD
69972003-02-04 Akim Demaille <akim@epita.fr>
6998
6999 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7000 Location as is defined.
7001
fc049e9c
AD
70022003-02-04 Akim Demaille <akim@epita.fr>
7003
7004 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7005 name_ being defined.
7006
a737b216
PE
70072003-02-03 Paul Eggert <eggert@twinsun.com>
7008
7009 * src/gram.h (start_symbol): Remove unused decl.
7010
7011 Use more-consistent naming conventions for local vars.
7012
7013 * src/derives.c (derives_compute): Change type of local var from
7014 int to rule_number.
7015 * src/gram.c (grammar_rules_partial_print): Likewise.
7016 * src/print.c (print_core): Likewise.
7017 * src/reduce.c (reduce_grammar_tables): Likewise.
7018
7019 * src/gram.c (grammar_dump): Change name of item_number *
7020 local var from r to rp.
7021 * src/nullable.c (nullable_compute): Likewise.
7022
7023 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7024
7025 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7026 for symbol or symbol_number var.
7027 * src/reader.c (grammar_start_symbol_set): Likewise.
7028 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7029 Likewise.
7030 * src/state.c (transitions_to): Likewise.
7031 * src/state.h: Likewise.
7032 * src/tables.c (symbol_number_to_vector_number): Likewise.
7033
7034 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7035 char * var.
7036
7037 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7038 var.
7039
7040 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7041 var.
7042
7043 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7044 Use str, not s, for char * var. Use ch, not c, for character var.
7045 Use size for size var.
7046
7047 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7048 char * var.
7049 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7050 uniqstr var.
7051 * src/uniqstr.h: Likewise.
7052
7053 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7054 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7055 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7056 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7057 param to have same name as that of enum, so that we don't use
7058 "s" to stand for a non-state.
7059
68e93ad5
AD
70602003-02-02 Akim Demaille <akim@epita.fr>
7061
7062 * src/scan-skel.l: Scan more than one inert character per yylex
7063 invocation.
7064
92898986
PE
70652003-02-01 Paul Eggert <eggert@twinsun.com>
7066
7067 Version 1.875a.
7068
1d9d5d71
PE
7069 * po/LINGUAS: Add ms.
7070
0435d061
AD
70712003-01-30 Akim Demaille <akim@epita.fr>
7072
7073 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
7074
6029a57f
PH
70752003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7076
7077 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
7078 of $1.
0435d061
AD
7079
7080 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 7081 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 7082 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 7083
6029a57f
PH
7084 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
7085 (b4_rhs_location): Ditto.
0435d061 7086 (yyfill): New function to copy from stack tree into array
6029a57f 7087 incrementally.
0435d061
AD
7088 (yyuserAction): Modify to allow incremental move of semantic values
7089 to rhs array when in GLR mode.
7090 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
7091 as needed.
7092 Remove dummy use of yystack, as there is now a guaranteed use.
7093 (yydoAction): Modify to allow incremental move of semantic values
7094 to rhs array when in GLR mode.
7095 (yyresolveAction): Ditto.
7096 (yyglrShiftDefer): Update comment.
0435d061 7097 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
7098 (yyglrReduce): Ditto.
7099 (yydoAction): Ditto
0435d061 7100
6029a57f
PH
7101 * tests/glr-regr1.at: Rename to ...
7102 * tests/glr-regression.at: Add new regression test for the problems
7103 described above (adapted from S. Eken).
7104 Update copyright notice.
7105 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
7106 * tests/Makefile.am: Ditto.
7107
6cee6297
PE
71082003-01-28 Paul Eggert <eggert@twinsun.com>
7109
7110 * data/lalr1.cc: Do not use @output_header_name@ unless
7111 b4_defines_flag is set. This fixes two bugs reported by
7112 Tim Van Holder in
161a71f3
PE
7113 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
7114 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 7115
b2a836b5
PE
71162003-01-21 Paul Eggert <eggert@twinsun.com>
7117
7118 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
7119 we don't need to worry about yyerrlab1 being reported as an
7120 "unused label" by non-GCC C compilers. The downside is that if
7121 locations are used then a couple of statements are duplicated each
7122 time YYERROR is invoked, but the upside is that the warnings
7123 should vanish.
7124 (yyerrlab1): Move code to YERROR.
7125 (yyerrlab2): Remove. Change uses back to yyerrlab1.
7126 This reverts some of the 2002-12-27 change.
7127
4196b931
PE
71282003-01-17 Paul Eggert <eggert@twinsun.com>
7129
7130 * src/output.c (symbol_printers_output): Fix typo that led
7131 to core dump. Problem reported by Antonio Rus in
161a71f3 7132 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 7133
3ae831b4
AD
71342003-01-13 Akim Demaille <akim@epita.fr>,
7135 Quoc Peyrot <chojin@lrde.epita.fr>,
7136 Robert Anisko <anisko_r@lrde.epita.fr>
7137
7138 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
7139 when the stacks contain one element, as the loop would otherwise
7140 free the last state, and then use the top state (the one we just
7141 popped). This means that the initial elements will not be freed
7142 explicitly, as is the case in yacc.c; it is not a problem, as
7143 these elements have fake values.
7144
e3aa65c5
PE
71452003-01-11 Paul Eggert <eggert@twinsun.com>
7146
7147 * NEWS: %expect-violations are now just warnings, reverting
7148 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
7149 bootstrapping problem reported by Matthias Klose; see
161a71f3 7150 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
7151 * src/conflicts.c (conflicts_print): Likewise.
7152 * tests/conflicts.at (%expect not enough, %expect too much,
7153 %expect with reduce conflicts): Likewise.
7154 * doc/bison.texinfo (Expect Decl): Document this. Also mention
7155 that the warning is enabled if the number of conflicts changes
7156 (not necessarily increases).
7157
7158 * src/getargs.c (version): Update copyright year.
7159
f0057011
AD
71602003-01-09 Akim Demaille <akim@epita.fr>
7161
7162 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
7163
1ee6d2a0
PE
71642003-01-08 Paul Eggert <eggert@twinsun.com>
7165
7166 * Makefile.maint (WGETFLAGS):
7167 New macro, containing "-C off" to disable proxy caches.
7168 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
7169 (rel-check): Use $(WGET) instead of wget.
7170
d4fd77c4
PE
71712003-01-06 Paul Eggert <eggert@twinsun.com>
7172
7173 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
7174 the GLR paper of Scott, Johnstone and Hussain.
7175
464c6927
PE
71762003-01-04 Paul Eggert <eggert@twinsun.com>
7177
d600ee67
PE
7178 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
7179 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
7180 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
7181 (EXTRA_LIBRARIES): New var, for liby.a.
7182 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
7183 (EXTRA_SCRIPTS): New var, for yacc.
7184
464c6927
PE
7185 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
7186 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
7187 Problem reported by Nelson H. F. Beebe.
7188
71892003-01-03 Paul Eggert <eggert@twinsun.com>
7190
7191 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
7192 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7193 when compiling Bison 1.875's `bitset bset = obstack_alloc
7194 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7195
7196 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
7197 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
7198 grow to a huge size with typical invocation.
d600ee67 7199
464c6927
PE
7200 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
7201 Use the pattern recommended by Autoconf 2.57, except also protect
7202 against double-definition.
7203 * src/system.h: Likewise.
7204 Portability issues reported by Nelson H. F. Beebe.
d600ee67 7205
464c6927
PE
7206 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
7207 All uses changed. Provide a definition in both C and C++.
7208 (yytrue, yyfalse): Define even if defined (__cplusplus).
7209
7210 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
7211 Reported by Nelson H. F. Beebe.
d600ee67 7212
464c6927
PE
7213 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
7214
0f42c7d5
PE
72152003-01-02 Paul Eggert <eggert@twinsun.com>
7216
7217 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
7218 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
7219 Bug reported by Nelson H. F. Beebe.
7220
dc546b0f
PE
72212003-01-01 Paul Eggert <eggert@twinsun.com>
7222
7223 * Version 1.875.
7224
2c09b6a7
PE
72252002-12-30 Paul Eggert <eggert@twinsun.com>
7226
7227 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7228 Moved here from...
7229 (<INITIAL>","): Here. This causes stray "," to be treated
7230 more uniformly.
7231
dc546b0f 7232 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
7233 last brace in braced code when not in Yacc mode, for compatibility
7234 with Bison 1.35. This resurrects the 2001-12-15 patch to
7235 src/reader.c.
7236
7237 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7238 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7239
535c0f63
PE
72402002-12-28 Paul Eggert <eggert@twinsun.com>
7241
7242 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7243 that of SYM's type. This fixes Debian bug 168069, reported by
7244 Thomas Olsson.
d600ee67 7245
963fcc17
PE
72462002-12-28 Paul Eggert <eggert@twinsun.com>
7247
7248 Version 1.75f.
7249
7250 Switch back to the Yacc style of conflict reports, undoing some
7251 of the 2002-07-30 change.
7252 * doc/bison.texinfo (Understanding): Use Yacc style for
7253 conflict reports. Also, use new way of locating rules.
7254 * src/conflicts.c (conflict_report):
7255 Renamed from conflict_report_yacc, removing the old
7256 'conflict_report'. Translate the entire conflict report at once,
7257 so that we don't assume that "," has the same interpretation in
7258 all languages.
7259 (conflicts_output): Use Yacc-style conflict report for each state,
7260 instead of our more-complicated style.
7261 (conflicts_print): Use Yacc-style conflict report, except print
7262 the input file name when not emulating Yacc.
7263 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7264 Conflicted Reduction, %expect not enough, %expect too much,
7265 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7266 * tests/existing.at (GNU Cim Grammar): Likewise.
7267 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7268
7269 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7270 fatal): Don't invoke fflush; it's not needed and it might even be
7271 harmful for stdout, as stdout might not be open.
7272 * src/reduce.c (reduce_print): Likewise.
7273
b1efe548
PE
72742002-12-27 Paul Eggert <eggert@twinsun.com>
7275
7276 Fix a bug where error locations were not being recorded correctly.
7277 This problem was originally reported by Paul Hilfinger in
161a71f3 7278 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
7279
7280 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7281 top of the location stack's error locations.
7282 (yyerrlab): Set it. When discarding a token, push its location
7283 onto yylerrsp so that we don't lose track of the error's end.
7284 (yyerrlab1): Now is only the target of YYERROR, so that we can
7285 properly record the location of the action that failed. For GCC
7286 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7287 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7288 (yyerrlab2): New label, which yyerrlab now falls through to.
7289 Compute the error's location by applying YYLLOC_DEFAULT to
7290 the locations of all the symbols that went into the error.
7291 * doc/bison.texinfo (Location Default Action): Mention that
7292 YYLLOC_DEFAULT is also invoked for syntax errors.
7293 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7294 Error locations include the locations of all the tokens that were
7295 discarded, not just the last token.
d600ee67 7296
983c5c2c
PE
72972002-12-26 Paul Eggert <eggert@twinsun.com>
7298
b1efe548
PE
7299 * src/files.c: Include quote.h.
7300 (compute_output_file_names): Warn if we detect conflicting
7301 outputs to the same file. This should catch the misunderstanding
7302 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7303
7304 * src/conflicts.c (conflicts_print): If the user specifies
7305 "%expect N", report an error if there are any reduce/reduce
7306 conflicts. This is what the manual says should happen.
7307 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7308 * tests/conflicts.at (%expect with reduce conflicts): New test.
7309
983c5c2c
PE
7310 Don't use m4_include on relative file names, as it doesn't work as
7311 desired if there happens to be a file with that name under ".".
d600ee67 7312
983c5c2c
PE
7313 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7314 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7315 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7316 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7317 * src/output.c (output_skeleton): Use full path names when
7318 specifying a file to include; don't rely on include path, as
7319 it's unreliable when the working file contains a file with
7320 that name.
d600ee67 7321
983c5c2c
PE
73222002-12-25 Paul Eggert <eggert@twinsun.com>
7323
7324 Remove obsolete references to bison.simple and bison.hairy.
7325 Problem mentioned by Aubin Mahe in
161a71f3 7326 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
7327 * data/glr.c: Comment fix.
7328 * doc/bison.1: Remove references. Also, mention "yacc".
7329
7330 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7331 with -g option.
7332
7333 * src/parse-gram.y (declaration): Use enum "report_states" rather
7334 than its numeric value 1.
7335
7336 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7337 opening a new one. This fixes Debian bug 165349, reported by
7338 Bruce Stephens.
7339
23f2d9dc
PE
73402002-12-24 Paul Eggert <eggert@twinsun.com>
7341
7342 Version 1.75e.
7343
7344 * Makefile.maint (cvs-update): Don't assume that the shell
7345 supports $(...), as Solaris sh doesn't.
7346
7347 * src/parse-gram.y (lloc_default): Remove test for empty
7348 nonterminals at the end, since it didn't change the result.
7349
73502002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
7351
7352 If the user does not define YYSTYPE as a macro, Bison now declares it
7353 using typedef instead of defining it as a macro. POSIX requires this.
7354 For consistency, YYLTYPE is also declared instead of defined.
7355
7356 %union directives can now have a tag before the `{', e.g., the
7357 directive `%union foo {...}' now generates the C code
7358 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7359 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7360 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7361 instead of `yyltype'.
7362
7363 `yystype' and `yyltype' are now obsolescent macros instead of being
7364 typedefs or tags; they are no longer documented and will be
7365 withdrawn in a future release.
7366
7367 * data/glr.c (b4_location_type): Remove.
7368 (YYSTYPE): Renamed from yystype.
7369 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7370 (struct YYLTYPE): Renamed from struct yyltype.
7371 (YYLTYPE): Renamed from yyltype.
7372 (yyltype, yystype): New (and obsolescent) macros,
7373 for backward compatibility.
7374 * data/yacc.c: Likewise.
7375
7376 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7377 does not specify a union tag. This is for compatibility with
7378 Solaris 9 yacc.
7379
7380 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7381 const *, since it is now modified by stripping surrounding { }.
7382 (current_braced_code): Remove.
7383 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7384 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7385 trailing " {...}". Now of type <chars>.
7386 (grammar_declaration): Adjust to bundled tokens.
7387 (code_content): Remove; stripping is now done by add_param.
7388 (print_token_value): Print contents of bundled tokens.
7389 (token_name): New function.
7390
7391 * src/reader.h (braced_code, current_braced_code): Remove.
7392 (token_name): New decl.
7393
7394 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7395 token_type, not braced_code code_kind. All uses changed.
7396 (SC_PRE_CODE): New state, for scanning after a keyword that
7397 has (or usually has) an immediately-following braced code.
7398 (token_type): New local var, to keep track of which token type
7399 to return when scanning braced code.
7400 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 7401 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
7402 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7403 instead of returning a token type immediately.
7404 (<INITIAL>"{"): Set token type.
7405 (<SC_BRACED_CODE>"}"): Use it.
7406 (handle_action_dollar, handle_action_at): Now returns bool
7407 indicating success. Fail if ! current_rule; this prevents a core dump.
7408 (handle_symbol_code_dollar, handle_symbol_code_at):
7409 Remove; merge body into caller.
7410 (handle_dollar, handle_at): Complain in invalid contexts.
7411
7412 * NEWS, doc/bison.texinfo: Document the above.
7413 * NEWS: Fix years and program names in copyright notice.
7414
879ca4f8
PE
74152002-12-17 Paul Eggert <eggert@twinsun.com>
7416
7417 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7418 Reporting, Table of Symbols): Omit mentions of %lex-param and
7419 %parse-param from the documentation for now.
7420
1c5fe69d
PE
74212002-12-15 Paul Eggert <eggert@twinsun.com>
7422
7423 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7424 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7425 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
7426 disagreed with the Bison documentation. Bug
7427 reported by Andrew Walrond.
d600ee67 7428
1c5fe69d
PE
7429 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7430 as the caller now does that.
7431 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7432 (YYEMPTY): Parenthesize right hand side, since others use it.
7433 (yyparse): Don't assume that our generated code is the only code
7434 that sets yychar.
7435
d1de5372
PE
74362002-12-13 Paul Eggert <eggert@twinsun.com>
7437
7438 Version 1.75d.
7439
7440 POSIX requires a "yacc" command.
7441 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7442 (MOSTLYCLEANFILES): Add yacc.
7443 (yacc): New rule.
1c5fe69d 7444 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
7445 as an alias for bison y.
7446
7447 * po/LINGUAS: Add da.
d600ee67 7448
d1de5372
PE
7449 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7450 problem with latest <getopt.h>.
7451 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7452
7453 * doc/fdl.texi: Upgrade to 1.2.
7454 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7455 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7456 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7457 gnulib.
7458 * config/install-sh: Sync with autotools.
7459
7460 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 7461 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
7462 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7463 locations are requested.
7464 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7465 locations are requested.
7466
d0f3fe23
PE
74672002-12-12 Paul Eggert <eggert@twinsun.com>
7468
7469 Remove unportable casts and storage allocation tricks.
7470 While we're at it, remove almost all casts, since they
7471 usually aren't needed and are a sign of trouble.
7472
7473 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7474
7475 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7476 the pointer DSET returned by malloc; this isn't portable.
7477 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7478 Similarly for DERIVES.
7479 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7480 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7481 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7482
7483 * src/derives.c (derives_compute): Do not bother invoking
7484 int_of_rule_number, since rule numbers are integers.
7485
7486 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7487 rather than XMALLOC (char, N).
7488
7489 * src/files.c (filename_split): Rewrite to avoid cast.
7490
7491 * src/gram.h (symbol_number_as_item_number,
7492 item_number_as_symbol_number, rule_number_as_item_number,
7493 item_number_as_rule_number):
7494 Now inline functions rather than macros, to avoid casts.
7495 * src/state.h (state_number_as_int): Likewise.
7496 * src/tables.c (state_number_to_vector_number,
7497 symbol_number_to_vector_number): Likewise.
7498
7499 * src/gram.h (int_of_rule_number): Remove; no longer used.
7500
7501 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7502 since the resulting storage is always stored into.
7503
7504 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7505 where it's needed.
7506
7507 * src/muscle_tab.c (muscle_m4_output):
7508 Now inline. Return bool, not int.
7509 * src/state.c (state_compare): Likewise.
7510 * src/symtab.c (symbol_check_defined,
7511 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7512 hash_compare_symbol, hash_symbol):
7513 Likewise.
7514 * src/uniqstr.c (uniqstr_print): Likewise.
7515 * src/muscle_tab.c (muscle_m4_output_processor):
7516 New function, to avoid casts.
7517 * src/state.c (state_comparator, stage_hasher): Likewise.
7518 * src/symtab.c (symbol_check_defined_processor,
7519 symbol_check_alias_consistency_processor, symbol_pack_processor,
7520 symbol_translation_processor, hash_symbol_comparator,
7521 hash_symbol_hasher): Likewise.
7522 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7523 * src/muscle_tab.c (muscles_m4_output):
7524 Use new functions instead of casting old functions unportably.
7525 * src/state.c (state_hash_new): Likewise.
7526 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7527 symbols_token_translations_init):
7528 Likewise.
7529 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7530
7531 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7532 var instead of casting to long, to avoid casts.
7533 (prepare_states): Use MALLOC rather than alloca, so that we don't
7534 have to worry about alloca.
7535 * src/state.c (state_hash_lookup): Likewise.
7536
7537 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7538 local var instead of casting to unsigned char, to avoid casts.
7539
7540 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7541 STATE_ALLOC): Remove.
7542 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7543 rather than calloc, and use offsetof to avoid allocating slightly
7544 too much storage.
7545 (state_new): Initialize all members.
7546
7547 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7548
7549 * src/symtab.c (symbol_free): Remove; unused.
7550 (symbol_get): Remove cast in lhs of assignment.
7551 (symbols_do): Now static. Accept generic arguments, not
7552 hashing-related ones.
7553
7554 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7555 (symbol_processor): Remove.
7556 (symbols_do): Remove decl; now static.
7557
7558 * src/system.h (alloca): Remove; decl no longer needed.
7559 (<stddef.h>): Include, for offsetof.
7560 (<inttypes.>, <stdint.h>): Include if available.
7561 (uintptr_t): New type, if system lacks it.
7562 (CALLOC, MALLOC, REALLOC): New macros.
7563 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7564 new macros.
7565
7566 * src/tables.c (table_size): Now int, to pacify GCC.
7567 (table_grow, table_ninf_remap): Use signed table size.
7568 (save_row): Don't bother initializing locals when not needed.
7569 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7570 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7571
7572 * src/vcg.h: Correct misspellings.
7573
7574 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7575
7576
7577 * src/getargs.c (getargs): Don't assume EOF == -1.
7578
26b4a969
PE
75792002-12-09 Paul Eggert <eggert@twinsun.com>
7580
7581 Change identifier spellings to avoid collisions with names
7582 that are reserved by POSIX.
7583
7584 Don't use names ending in _t, since POSIX reserves them.
7585 For consistency, remove _e and _s endings -- they're weren't
7586 needed to remove ambiguity. All uses changed.
7587 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7588 turn was just renamed from struniq_t.
7589 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7590 which in turn was just renamed from struniq_processor_t.
7591 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7592 in turn was renamed from hash_compare_struniq_t.
7593 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7594 (state_list): Renamed from state_list_t.
7595 * src/assoc.h (assoc): Renamed from assoc_t.
7596 * src/conflicts.c (enum conflict_resolution): Renamed from
7597 enum conflict_resolution_e.
7598 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7599 (rule_list): Renamed from rule_list_t.
7600 * src/getargs.h (enum trace): Renamed from enum trace_e.
7601 (enum report): Renamed from enum report_e.
7602 * src/gram.h (item_number): Renamed from item_number_t.
7603 (rule_number): Renamed from rule_number_t.
7604 (struct rule_s): Remove the "rule_s" part; not used.
7605 (rule): Renamed from rule_t.
7606 (rule_filter): Renamed from rule_filter_t.
7607 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7608 (goto_list): Renamed from goto_list_t.
7609 * src/lalr.h (goto_number): Renamed from goto_number_t.
7610 * src/location.h (location): Renamed from location_t.
7611 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7612 and moved here from:
7613 * src/muscle_tab.h (muscle_entry_t): here.
7614 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7615 (rule_list): Renamed from rule_list_t.
7616 * src/print_graph.c (static_graph): Renamed from graph.
7617 * src/reader.h (braced_code): Renamed from braced_code_t.
7618 Remove brace_code_e tag.
7619 * src/relation.h (relation_node): Renamed from relation_node_t.
7620 (relation_nodes): Renamed from relation_nodes_t.
7621 (relation): Renamed from relation_t.
7622 * src/state.h (state_number): Renamed from state_number_t.
7623 (struct state): Renamed from struct state_s.
7624 (state): Renamed from state_t.
7625 (transitions): Renamed from transitions_t. Unused (and
7626 misspelled) transtion_s tag removed.
7627 (errs): Renamed from errs_t. Unused errs_s tag removed.
7628 (reductions): Renamed from reductions_t. Unused tag
7629 reductions_s removed.
7630 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7631 (struct symbol_list): Renamed from struct symbol_list_s.
7632 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7633 (struct symbol): Renamed from struct symbol_s.
7634 (symbol): Renamed from symbol_t.
7635 * src/tables.c (vector_number): Renamed from vector_number_t.
7636 (action_number): Renamed from action_t.
7637 * src/tables.h (base_number): Renamed from base_t.
7638 * src/vcg.h (enum color): Renamed from enum color_e.
7639 (enum textmode): Renamed from enum textmode_e.
7640 (enum shape): Renamed from enum shape_e.
7641 (struct colorentry): Renamed from struct colorentry_s.
7642 (struct classname): Renamed from struct classname_s.
7643 (struct infoname): Renamed from struct infoname_s.
7644 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7645 (enum decision): Renamed from enum decision_e.
7646 (enum orientation): Renamed from enum orientation_e.
7647 (enum alignment): Renamed from enum alignment_e.
7648 (enum arrow_mode): Renamed from enum arrow_mode_e.
7649 (enum crossing_type): Renamed from enum crossing_type_e.
7650 (enum view): Renamed from enum view_e.
7651 (struct node): Renamed from struct node_s.
7652 (node): Renamed from node_t.
7653 (enum linestyle): Renamed from enum linestyle_e.
7654 (enum arrowstyle): Renamed from enum arrowstyle_e.
7655 (struct edge): Renamed from struct edge.
7656 (edge): Renamed from edge_t.
7657 (struct graph): Renamed from struct graph_s.
7658 (graph): Renamed from graph_t.
7659 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7660 Rename value_t -> value.
7661 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7662 value_t_as_yystype -> value_as_yystype.
7663
7664 Don't include <errno.h> in the mainstream code, since it
7665 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7666 * lib/get-errno.c, lib/get-errno.h: New files.
7667 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7668 get-errno.c.
7669 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7670 * src/output.c (output_skeleton): Likewise.
7671 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7672 instead of errno.
7673 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7674 Likewise.
7675 (handle_action_dollar, handle_action_at): Likewise.
7676 * src/system.h: Do not include <errno.h>.
7677 (TAB_EXT): Renamed from EXT_TAB.
7678 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7679
7680 Avoid str[a-z]*, since <string.h> reserves that name space.
7681 Change all instances of "struniq" in names to "uniqstr", and
7682 likewise for "STRUNIQ" and "UNIQSTR".
7683 * src/uniqstr.c: Renamed from src/struniq.c.
7684 * src/uniqstr.h: Renamed from src/struniq.h.
7685 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7686 * src/files.c (strsuffix): Remove; unused.
7687 (concat2): Renamed from stringappend. Now static.
7688 * src/files.h (strsuffix, stringappend): Remove; unused.
7689 * src/parse-gram.y (<chars>): Renamed from <string>.
7690 (<uniqstr>): Renamed from <struniq>.
7691 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7692 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7693 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7694 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7695 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7696 (N_EXPAND): Renamed from N_STRETCH.
7697
7698 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7699 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7700 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7701 Remove; unused.
7702 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7703 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7704 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7705 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7706 (BASE_MAXIMUM): Renamed from BASE_MAX.
7707 (BASE_MINIMUM): Renamed from BASE_MIN.
7708 (ACTION_MAX): Remove; unused.
7709 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7710 Unnecessary casts removed from above defines.
7711
7712
7713 Fix misspelling in names.
7714 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7715 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7716 G_NODE_ALIGNEMENT.
7717
7718
7719 * lib/timevar.c (timevar_report): Renamed from time_report,
7720 for consistency with other names.
7721 * lib/timevar.h (timevar_report): New decl.
7722 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7723
7724
7725 Sort include-file uses.
7726
7727 Reorder all include files under src to be in the order "system.h".
7728 then the ../lib include files in angle brackets (alphabetized),
7729 then the . include files in double-quotes (alphabetized). Fix
7730 dependency breakages encountered in this process, as follows:
7731 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7732 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7733 * src/state.h: Include "symtab.h".
7734
996b1c7e
PE
77352002-12-08 Paul Eggert <eggert@twinsun.com>
7736
7737 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7738 since this causes problems when __file__ contains character
7739 sequences like "@" that are treated specially by src/scan-skel.l.
7740 Instead, just use the file's basename. This fixes the bug
7741 reported by Martin Mokrejs in
161a71f3 7742 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 7743
e19c4e5d
PE
77442002-12-06 Paul Eggert <eggert@twinsun.com>
7745
7746 Add support for rules that do not have trailing semicolons, as
7747 POSIX requires. Improve the quality of locations in Bison
7748 diagnostics.
26b4a969 7749
e19c4e5d
PE
7750 * src/location.c: Include <quotearg.h>.
7751 (empty_location): Now const.
7752 (location_print): New function. Follow the recommendation of the
7753 GNU Coding Standards for locations that span file boundaries.
7754 * src/location.h: Do not include <quotearg.h>; no longer needed.
7755 (boundary): New type.
7756 (location_t): Use it. This allows locations to span file boundaries.
7757 All member uses changed: file -> start.file or end.file (as needed),
7758 first_line -> start.line, first_column -> start.column,
7759 last_line -> end.line, last_column -> end.column.
7760 (equal_boundaries): New function.
7761 (LOCATION_RESET, LOCATION_STEP): Remove.
7762 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7763 (empty_location): Now const.
7764 (location_print): New decl.
7765 * src/parse-gram.y (lloc_default): New function, which handles
7766 empty locations more accurately.
7767 (YYLLOC_DEFAULT): Use it.
7768 (%token COLON): Remove.
7769 (%token ID_COLON): New token.
26b4a969 7770 (rules): Use it.
e19c4e5d
PE
7771 (declarations, rules): Remove trailing semicolon.
7772 (declaration, rules_or_grammar_declaration):
7773 Allow empty (";") declaration.
7774 (symbol_def): Remove empty actions; no longer needed.
7775 (rules_or_grammar_declaration): Remove trailing semicolon.
7776 (semi_colon.opt): Remove.
7777 * src/reader.h: Include location.h.
7778 (scanner_cursor): New decl.
7779 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7780 rolling our own.
7781 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7782 of *loc.
7783 (STEP): Remove. No longer needed, now that adjust_location does
7784 the work. All uses removed.
7785 (scanner_cursor): New var.
7786 (adjust_location): Renamed from extend_location. It now sets
7787 *loc and adjusts the scanner cursor. All uses changed.
7788 Don't bother testing for CR.
7789 (handle_syncline): Remove location arg; now updates scanner cursor.
7790 All callers changed.
7791 (unexpected_end_of_file): Now accepts start boundary of token or
7792 comment, not location. All callers changed. Update scanner cursor,
7793 not the location.
7794 (SC_AFTER_IDENTIFIER): New state.
7795 (context_state): Renamed from c_context. All uses changed.
7796 (id_loc, code_start, token_start): New local vars.
7797 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7798 processing of Yacc white space and equivalents here.
7799 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7800 instead of returning ID immediately, since we need to search for
7801 a subsequent colon.
7802 (<INITIAL>"'", "\""): Save token_start.
7803 (<INITIAL>"%{", "{", "%%"): Save code_start.
7804 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7805 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7806 BEGIN context_state at end, not INITIAL.
7807 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7808 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7809 Return correct token start.
7810 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7811 the start of a character, string or multiline comment is found.
7812 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7813 Reduction): Adjust reported locations to match the more-precise
7814 results now expected.
7815 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7816 * tests/reduce.at (Useless Rules, Reduced Automaton,
7817 Underivable Rules): Likewise.
7818 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7819 or "|"' now that so many other tokens are allowed by the new grammar.
7820
7821 * src/complain.h (current_file): Remove duplicate decl;
7822 current_file is now owned by files.h.
7823 * src/complain.c, src/scan-gram.l: Include files.h.
7824
78252002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 7826
e19c4e5d
PE
7827 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7828 promotes to int; it might be unsigned int.
7829 * data/yacc.c (yy_reduce_print): Likewise.
7830
7831 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7832 be #defined in the prologue, not in the Bison declarations.
7833 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 7834
b64755e3
PE
78352002-12-02 Paul Eggert <eggert@twinsun.com>
7836
7837 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7838 * lib/strtoul.c: New file, from gnulib.
7839 This fixes a porting bug reported by Peter Klein in
161a71f3 7840 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 7841
6e746484
PE
78422002-11-30 Paul Eggert <eggert@twinsun.com>
7843
b64755e3
PE
7844 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7845 and put only a forward declaration in the prologue. This is for
7846 consistency with the other scanner helper functions.
7847
6ba55592
PE
7848 Type clashes now generate warnings, not errors, since it
7849 appears that POSIX may allow some grammars with type clashes.
7850 * src/reader.c (grammar_current_rule_check): Warn about
7851 type clashes instead of complaining.
7852 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7853
6e746484
PE
7854 Add Yacc library, since POSIX requires it.
7855 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7856 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7857 * lib/main.c, lib/yyerror.c: New files.
7858
7859 gram_error can be static; it need not be extern.
7860 * src/reader.h (gram_error): Remove decl.
7861 * src/parse-gram.y (gram_error): Now static. Add static decl.
7862 (print_token_value): Omit parameter names from forward decl,
7863 for consistency.
7864
88510f9c
PE
78652002-11-29 Paul Eggert <eggert@twinsun.com>
7866
6e746484
PE
7867 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7868 be declared before being used. E.g., one should typically
7869 declare them in the prologue. Use GNU coding style in examples.
7870 Put "const" consistently after the type it modifies. Mention
7871 that C99 supports "inline". Mention that yyerror traditionally
7872 returns "int".
7873
88510f9c
PE
7874 %parse-param and %lex-param now take just one argument, the
7875 declaration; the argument name is deduced from the declaration.
7876
7877 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7878 Reporting, Table of Symbols): Document this.
7879 * src/parse-gram.y (add_param): New function.
7880 (COMMA): Remove.
7881 (declaration): Implement new rule for %parse-param and %lex-param.
7882 * src/scan-gram.l: "," now elicits a warning, rather than being
7883 a token; this is more compatible with byacc.
7884 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7885
bb92250c
PE
78862002-11-27 Paul Eggert <eggert@twinsun.com>
7887
7888 Rename identifiers to avoid real and potential collisions.
7889
7890 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7891 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 7892 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
7893 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7894 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7895 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7896 All uses changed.
7897 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7898 The name "yycontrol" violates the name space rules, and this stuff
7899 wasn't being used anyway.
7900 (input): Remove action; this stuff wasn't being used.
7901 (gram_error): Rename local variable yylloc -> loc.
7902 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7903 (YY_DECL): Don't use "yy" at start of local variables.
7904 All uses changed, e.g., yylloc -> loc.
7905 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7906 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7907 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7908 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7909
7910 * src/parse-gram.y (gram_error): loc is now const *.
7911 * src/reader.h (gram_error): Likewise.
7912
3af4feb2
PE
79132002-11-24 Paul Eggert <eggert@twinsun.com>
7914
7915 Version 1.75c.
7916
7917 * tests/actions.at (Actions after errors): Use an output format
7918 more similar to that of the Printers and Destructors test.
7919 Test the position of the ';' token too.
7920 (Printers and Destructors): Likewise.
7921 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7922 unnecessarily alarming people when the test fails.
7923
7924 * data/yacc.c (yyerrlab1): Move this label down, so that the
7925 parser does not discard the lookahead token if the user code
7926 invokes YYERROR. This change is required for POSIX conformance.
7927
7928 * lib/error.c: Sync with gnulib.
7929
79302002-11-22 Paul Eggert <eggert@twinsun.com>
7931
7932 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7933 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7934 * lib/xmalloc.c: Likewise.
26b4a969 7935
58004308
PE
79362002-11-20 Paul Eggert <eggert@twinsun.com>
7937
7938 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7939
79402002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 7941
58004308
PE
7942 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7943 should use `if (! x) abort ();' rather than `assert (x);', and
7944 anyway it's one less thing to worry about configuring.
7945
7946 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7947 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7948 and replace all instances of assert with abort.
7949 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7950 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7951
7952 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7953 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7954 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7955 hash_find_entry, hash_rehash, hash_insert): Likewise.
7956 * src/conflicts.c (resolve_sr_conflict): Likewise.
7957 * src/lalr.c (set_goto_map, map_goto): Likewise.
7958 * src/nullable.c (nullable_compute): Likewise.
7959 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7960 * src/reader.c (packgram, reader): Likewise.
7961 * src/state.c (state_new, state_free, state_transitions_set,
7962 state_reduction_find): Likewise.
7963 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7964 symbol_pack): Likewise.
7965 * src/tables.c (conflict_row, pack_vector): Likewise.
7966 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7967 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7968 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7969 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7970
7971 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7972 (ARGMATCH_CONSTRAINT): New macro.
7973 (ARGMATCH_ASSERT): Use it.
7974
7975 * src/system.h (verify): New macro.
7976 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7977 rather than assert.
7978 * src/tables.c (tables_generate): Likewise.
7979
7980 * src/struniq.c (struniq_assert): Now returns void, and aborts
7981 if the assertion is false.
7982 (struniq_assert_p): Remove.
7983 * src/struniq.h: Likewise.
7984
76ae8198
PE
79852002-11-18 Paul Eggert <eggert@twinsun.com>
7986
7987 * data/glr.c (yygetLRActions): Replace `yyindex' with
7988 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7989 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 7990 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 7991
d3c4e709
AD
79922002-11-18 Akim Demaille <akim@epita.fr>
7993
7994 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7995 space.
7996 From Tim Van Holder.
7997
8d8a7238
PE
79982002-11-17 Paul Eggert <eggert@twinsun.com>
7999
8000 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8001 to "SyntaxError" for consistency with my 2002-11-15 change.
8002
8003 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8004 not define to {}, since this breaks the common use of `YYDPRINTF
8005 ((...));' if a single statement is desired (e.g. before `else').
8006 Work around GCC warnings by surrounding corresponding calls with
8007 {} if needed.
8008 (yyhasResolvedValue): Remove unused function.
8009 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8010 loop body.
8011 (yyreportSyntaxError): Renamed from yyreportParseError.
8012 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8013 All uses changed.
8014 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8015 extern when possible. Remove unused initializations.
8016
b0937b22
AD
80172002-11-16 Akim Demaille <akim@epita.fr>
8018
8019 Augment the similarity between GLR and LALR traces.
8020
8021 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8022 (YY_REDUCE_PRINT): New.
8023 (yyparse): Use them.
8024 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8025 YYDPRINT here.
8026 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8027 state reached after the reduction/recovery, since...
8028 (yyparse, yyprocessOneStack): Report the state we are entering in.
8029
c5e3e510
AD
80302002-11-16 Akim Demaille <akim@epita.fr>
8031
8032 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8033 Add support for --trace=skeleton.
8034 * src/scan-skel.l: %option debug.
8035 Scan strings of non-@ or \n instead of character by character.
8036 (scan_skel): Handle trace_skeleton.
8037 (QPUTS): New.
8038 (@output_parser_name@, @output_header_name@): ``Restore'' their
8039 support (used to be M4 macros).
8040 * data/yacc.c: Quote larger chunks, a la glr.c.
8041 * data/lalr1.cc: Likewise.
8042 The header guards are no longer available, so use some other
8043 string than `YYLSP_NEEDED'.
8044
4c6cc1db
AD
80452002-11-16 Akim Demaille <akim@epita.fr>
8046
8047 Make the ``Printers and Destructors'' test more verbose, taking
8048 `yacc.c''s behavior as (possibly wrong) reference.
8049
8050 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8051 instead of fprint on stdout.
8052 Set and report the last_line of the symbols.
8053 Consistently display values and locations.
8054
6d9e8019
PE
80552002-11-16 Paul Eggert <eggert@twinsun.com>
8056
8057 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8058
6e649e65
PE
80592002-11-15 Paul Eggert <eggert@twinsun.com>
8060
b25d88f6
PE
8061 * tests/actions.at (Actions after errors): New test case.
8062
6e649e65
PE
8063 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
8064 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
8065 tests/action.at, tests/calc.at, tests/conflicts.at,
8066 tests/cxx-type.at, tests/regression.at:
8067 "parse error" -> "syntax error" for POSIX compatibility.
8068 "parsing stack overflow..." -> "parser stack overflow" so
8069 that code matches Bison documentation.
8070
0f39aab9
AD
80712002-11-15 Akim Demaille <akim@epita.fr>
8072
8073 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
8074 take two BRACED_CODE, not two string_content.
8075 Free the scanner's obstack when we are done.
8076 (code_content): New.
8077 * tests/calc.at: Adjust.
8078 * doc/bison.texinfo: Adjust.
8079 Also, make sure to include the `,' for these declarations.
8080
761c1926
AD
80812002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
8082
8083 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
8084 definition; avoids potential autoreconf problems.
8085
b0f98b10
AD
80862002-11-15 Akim Demaille <akim@epita.fr>
8087
8088 Always check the value returned by yyparse.
8089
8090 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
8091 returned by yyparse.
8092 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
8093 Adjust calls.
8094 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
8095 returned by yyparse.
8096
970785f1
PH
80972002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8098
8099 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
8100 on input.at test.
8101
8fcc7db1
PE
81022002-11-14 Paul Eggert <eggert@twinsun.com>
8103
7ec1b48e
PE
8104 * src/output.c (output_skeleton): Call xfopen instead of
8105 duplicating xfopen's body.
8106
cfff7583 8107 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 8108 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 8109
8fcc7db1
PE
8110 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
8111 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
8112 Group compiler. Instead, use "$CC -E bar.c". Include the .h
8113 file twice in the grammar, as an extra check.
8114
8115 * tests/input.at (Torturing the Scanner): Surround the
8116 backslash-newline tests with "#if 0", to make it less likely that
8117 we'll run into compiler bugs. Bring back solitary \ inside
8118 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 8119 test backslash-newline in C character constant.
8fcc7db1 8120
4e8d992c
AD
81212002-11-14 Akim Demaille <akim@epita.fr>
8122
8123 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
8124 status of the compiler.
f32b346d 8125 Calling `exit 1' is no longer needed.
4e8d992c
AD
8126 Reported by Nelson H. F. Beebe.
8127
9501dc6e
AD
81282002-11-14 Akim Demaille <akim@epita.fr>
8129
8130 * tests/atlocal.in (CPPFLAGS): We have config.h.
8131 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
8132 New.
8133 * tests/actions.at, tests/calc.at, tests/conflicts.at,
8134 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
8135 * tests/regression.at, tests/torture.at: Use them for all the
8136 grammars that are to be compiled.
8137 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
8138 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
8139 * doc/bison.texinfo (GLR Parsers): Document `inline'.
8140
18b519c0
AD
81412002-11-14 Akim Demaille <akim@epita.fr>
8142
8143 * doc/bison.texinfo: Various formatting changes (alignments in
8144 samples, additional @group/@end group, GCS in samples.
8145 Use @deffn instead of simple @table to define the directives,
8146 macros, variables etc.
8147
9a86cdb9
PE
81482002-11-13 Paul Eggert <eggert@twinsun.com>
8149
daa33def 8150 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 8151 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 8152
daa33def 8153 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 8154 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
8155 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
8156 * tests/headers.at (export YYLTYPE): Likewise.
8157
8158 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 8159 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 8160
9a86cdb9
PE
8161 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
8162 comments, since they're not portable. Use GNU coding style.
8163
9c1e26bd
AD
81642002-11-13 Akim Demaille <akim@epita.fr>
8165
8166 * data/yacc.c: Leave bigger chunks of quoted text.
8167 (YYDSYMPRINTF): New.
8168 Use it to report symbol activities.
8169 * data/glr.c (YYDSYMPRINTF): New.
8170 Use it.
8171
87f721cc
PE
81722002-11-12 Paul Eggert <eggert@twinsun.com>
8173
8174 Version 1.75b.
8175
8176 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
8177 (yyglrReduce): Return yyok, not 0.
8178 This should avoid the enumerated-type warnings reported
464c6927 8179 by Nelson H. F. Beebe in
161a71f3 8180 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
8181
8182 * lib/bbitset.h (BITSET_INLINE): Remove.
8183 * lib/bitset.h [! BITSET_INLINE]: Remove.
8184 (bitset_set, bitset_reset, bitset_test): Rename local vars
8185 to avoid shadowing warnings by GCC.
8186
8187 * data/glr.c (inline): Remove #define. It's the user's
8188 responsibility to #define it away, just like 'const'.
464c6927 8189 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 8190 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 8191
87f721cc
PE
8192 * Makefile.maint (po-check): Scan .l and .y files instead of the
8193 .c and the .h files that they generate. This fixes the bug
8194 reported by Tim Van Holder in:
161a71f3 8195 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
8196 Look for N_ as well as for _. Try to avoid matching #define for
8197 N_ and _.
8198 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
8199 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
8200 * src/scan-gram.l: Revamp regular expressions so that " and '
8201 do not confuse xgettext.
8202
8203 * src/struniq.h (struniq_new): Do not declare the return type
8204 to be 'const'; this violates the C standard.
8205 * src/struniq.c (struniq_new): Likewise.
8206
be14ade5
AD
82072002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
8208
8209 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
8210 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
8211 linker.
8212
05291fbc
AD
82132002-11-12 Akim Demaille <akim@epita.fr>
8214
8215 * Makefile.maint: Sync with Autoconf:
8216 (local_updates): New.
8217
1f5fd52e
AD
82182002-11-12 Akim Demaille <akim@epita.fr>
8219
8220 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8221
283f1e64
AD
82222002-11-12 Akim Demaille <akim@epita.fr>
8223
8224 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8225 locations.
8226
886b69d1
AD
82272002-11-12 Akim Demaille <akim@epita.fr>
8228
8229 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8230 not yyvalue.
8231
3df37415
AD
82322002-11-12 Akim Demaille <akim@epita.fr>
8233
8234 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8235 Use it to test the GLR parser.
8236
7bd6c77e
AD
82372002-11-12 Akim Demaille <akim@epita.fr>
8238
8239 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8240 defines it.
8241 * data/glr.c (yystos): New.
8242 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8243 (YYDSYMPRINT): New.
8244 (yyval): Don't define it, it is handled via M4.
8245 (yyrecoverParseError): Free verbosely the discarded symbols.
8246 * data/yacc.c (yysymprint): Remove, rather...
8247 (b4_yysymprint_generate): invoke.
8248 * data/c.m4 (b4_yysymprint_generate): New.
8249 Accept pointers as arguments, as opposed to the version from
8250 yacc.c.
8251 (b4_yydestruct_generate): Likewise.
8252 * tests/cations.at (Printers and Destructors): Use Bison directives
8253 instead of CPP macros.
8254 Don't rely on internal details.
8255
b0400cc6
AD
82562002-11-12 Akim Demaille <akim@epita.fr>
8257
8258 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8259 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8260 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8261 it against YYEMPTY and so forth), work on yytoken (i.e., set
8262 it to YYEMPTY etc.).
8263 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8264 (b4_symbol_actions): Remove.
8265 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8266 for 0, end-of-input.
8267
72f889cc
AD
82682002-11-12 Akim Demaille <akim@epita.fr>
8269
8270 * doc/bison.texinfo (Destructor Decl): New.
8271
b1ae9233
AD
82722002-11-12 Akim Demaille <akim@epita.fr>
8273
8274 * src/tables.c (tables_generate): Use free for pointers that
8275 cannot be NULL, not XFREE.
8276 (pack_vector): Use assert, not fatal, for bound violations.
8277 * src/state.c (state_new): Likewise.
8278 * src/reader.c (reader): Likewise.
8279 * src/lalr.c (set_goto_map): Likewise.
72f889cc 8280 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
8281 the file name.
8282
7ec2d4cd
AD
82832002-11-12 Akim Demaille <akim@epita.fr>
8284
8285 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8286 Restore.
8287 * src/scan-gram.l (last_string): Is global to the file, not to
8288 yylex.
8289 * src/parse-gram.y (input): Don't append the epilogue here,
8290 (epilogue.opt): do it here, and free the scanner's obstack.
8291 * src/reader.c (epilogue_set): Rename as...
8292 (epilogue_augment): this.
8293 * data/c.m4 (b4_epilogue): Defaults to empty.
8294
573a6cd3
AD
82952002-11-12 Akim Demaille <akim@epita.fr>
8296
8297 * src/getargs.c (long_options): Remove duplicates.
8298 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8299 Remove.
8300 * doc/bison.rnh: Remove.
8301 * doc/bison.texinfo (VMS Invocation): Remove.
8302
95612cfa
AD
83032002-11-12 Akim Demaille <akim@epita.fr>
8304
8305 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8306 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8307
8308 Use struniq for symbols.
8309
8310 * src/symtab.h (symbol_t): The tag member is a struniq.
8311 (symbol_type_set): Adjust.
8312 * src/symtab.c (symbol_new): Takes a struniq.
8313 (symbol_free): Don't free the tag member.
8314 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8315 (hash_compare_symbol, hash_symbol): these.
8316 Use the fact that tags as struniqs.
8317 (symbol_get): Use struniq_new.
8318 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8319 Returns a strniq.
8320 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8321 and type members are struniqs.
8322 * src/reader.c (get_merge_function)
8323 (grammar_current_rule_merge_set): Adjust.
8324 (TYPE, current_type): Are struniq.
8325
8326 Use struniq for file names.
8327
8328 * src/files.h, src/files.c (infile): Split into...
8329 (grammar_file, current_file): these.
8330 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8331 * src/reduce.c (reduce_print): Likewise.
8332 * src/getargs.c (getargs): Likewise.
8333 * src/complain.h, src/complain.c: Likewise.
8334 * src/main.c (main): Call struniqs_new early enough to use it for
8335 file names.
8336 Don't free the input file name.
8337
3e6656f9
AD
83382002-11-12 Akim Demaille <akim@epita.fr>
8339
8340 * src/symtab.c (symbol_free): Remove dead deactivated code:
8341 type_name are properly removed.
8342 Don't use XFREE to free items that cannot be NULL.
8343 * src/struniq.h, src/struniq.c: New.
8344 * src/main.c (main): Initialize/free struniqs.
8345 * src/parse-gram.y (%union): Add astruniq member.
8346 (yyprint): Adjust.
8347 * src/scan-gram.l (<{tag}>): Return a struniq.
8348 Free the obstack bit that used to store it.
8349 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8350
7672019c
PE
83512002-11-11 Paul Eggert <eggert@twinsun.com>
8352
8353 Revamp to fix many (but not all) of the C- and M4-related quoting
8354 problems. Among other things, this fixes the Bison bug reported
8355 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 8356 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
8357
8358 Use new @ escapes consistently. Represent brackets with @{ and @}
8359 rather than @<:@ and @:>@, since this works a bit better with dumb
8360 editors like vi. Represent @ with @@, since @ is now consistently
8361 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8362 __ofile__, to avoid unexpected expansions. Similarly, use @output
8363 rather than #output.
8364
8365 * data/c.m4 (b4_copyright): Omit file name from comment, since
8366 the file name could contain "*/".
8367 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8368 be quoted. All uses changed.
8369
8370 * data/glr.c: Use new @ escapes consistently.
8371 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8372 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8373 Remove, since they couldn't handle arbitrary characters in file
8374 names.
8375 * data/lalr1.cc: Likewise.
8376 * data/yacc.c: Likewise.
8377
8378 * src/files.c (output_infix): Remove; all uses removed.
8379 * src/files.h: Likewise.
8380
8381 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8382 mishandled funny characters in file names, and anyway it isn't
8383 needed any more.
8384 * data/yacc.c: Likewise.
8385 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8386
8387 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8388 * data/yacc.c: Likewise.
8389
8390 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8391 strings now.
8392 (muscle_init): Quote filename as a C string.
8393 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8394 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8395 * src/output.c (escaped_file_name_output): New function.
8396 (prepare_symbols): Quote tokens for M4.
8397 (prepare): Don't insert output_infix, output_prefix,
8398 output_parser_name, output_header_name; this is now down by scan-skel.
8399 Insert skeleton as a C string.
8400
8401 * src/output.c (user_actions_output, symbol_destructors_output,
8402 symbol_printers_output): Quote filenames for C and M4.
8403 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8404
8405 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8406 escapes other than \\ and \'; this simplifies the code.
8407 (<SC_STRING>): Likewise, for \\ and \".
8408 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8409 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8410 Use new escapes @{ and @} for [ and ].
8411
8412 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8413 them with auto vars.
8414 Switch to new escape scheme, where @ is the escape character uniformly.
8415 Abort if a stray escape character is found. Avoid unbounded input
8416 buffer when parsing non-escaped text.
8417
8418 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8419 __oline__, #output, $@, and @{ do not have unintended meanings.
8420
acea4f3b
PE
84212002-11-09 Paul Eggert <eggert@twinsun.com>
8422
8423 Fix the test failure due to GCC warnings described in
161a71f3 8424 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
8425 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8426 evaluate to 0 if it's impossible for NINF to be in the respective
8427 table.
8428 (yygetLRActions, yyrecoverParseError): Use them.
8429
8430 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8431 counted in the token inserted at end of file. Now takes
8432 location_t *, not location_t, so that the location can be
8433 adjusted. All uses changed.
8434
8435 * tests/regression.at (Invalid inputs): Adjust wording in
8436 diagnostic to match the new behavior.
8437
8438 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8439 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8440 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8441 abort ();'. This reduces the runtime of the "Many lookaheads"
8442 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8443 GCC 3.2.
8444
20ef1ad5
PE
84452002-11-07 Paul Eggert <eggert@twinsun.com>
8446
8447 * src/parse-gram.y (CHARACTER): Remove unused token.
8448 All uses removed.
8449
8450 * src/scan-gram.l: Remove stack option. We no longer use the
8451 stack, since the stack was never deeper than 1; instead, use the
8452 new auto var c_context to record the stacked value.
8453
8454 Remove nounput option. At an unexpected end of file, we now unput
8455 the minimal input necessary to end cleanly; this simplifies the
8456 code.
8457
8458 Avoid unbounded token sizes where this is easy.
8459
8460 (unexpected_end_of_file): New function.
8461 Use it to systematize the error message on unexpected EOF.
8462 (last-string): Now auto, not static.
8463 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8464 (scanner_last_string_free): Remove; not used.
8465 (percent_percent_count): Move decl to just before use.
8466 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8467 not the (never otherwised-used) CHARACTER.
8468
93724f13
AD
84692002-11-07 Akim Demaille <akim@epita.fr>
8470
8471 Let yyerror always receive the msg as last argument, so that
8472 yyerror can be variadic.
8473
8474 * data/yacc.c (b4_yyerror_args): New.
8475 Use it when calling yyerror.
8476 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8477 Use it when calling yyerror.
8478 * doc/bison.texinfo (Error Reporting): Adjust.
8479 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8480 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8481
6e40b4eb
AD
84822002-11-06 Akim Demaille <akim@epita.fr>
8483
8484 #line should have quoted strings.
8485 Ideally, this should be done by m4_quotearg.
8486
8487 * src/scan-skel.l: Include quotearg.h.
8488 Quote __ofile__.
8489 * src/output.c (symbol_printers_output)
8490 (symbol_destructors_output): Quote the file name.
8491
2dfbfc12
AD
84922002-11-06 Akim Demaille <akim@epita.fr>
8493
8494 * tests/regression.at (Invalid inputs): Adjust to the recent
8495 messages.
8496
437c2d80
AD
84972002-11-06 Akim Demaille <akim@epita.fr>
8498
8499 Restore --no-lines.
8500 Reported by Jim Kent.
8501
8502 * data/c.m4 (b4_syncline): New.
8503 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8504 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8505 * src/output.c (user_actions_output): Likewise.
8506 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 8507 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 8508
900c5db5
AD
85092002-11-06 Akim Demaille <akim@epita.fr>
8510
8511 * src/main.c (main): Free `infile'.
8512 * src/scan-gram.l (handle_syncline): New.
8513 Recognize `#line'.
8514 * src/output.c (user_actions_output, symbol_destructors_output)
8515 (symbol_printers_output): Use the location's file name, not
8516 infile.
8517 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8518
e183b123 85192002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 8520
e183b123 8521 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 8522 either has GLR conflict entries.
e183b123 8523
193eb6b7
PE
85242002-11-05 Paul Eggert <eggert@twinsun.com>
8525
e183b123
PE
8526 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8527 "integer out of range" rather than "invalid value".
8528 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8529 accordingly.
8530
193eb6b7
PE
8531 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8532 Also, remove one static variable in the scanner.
8533
8534 * src/scan-gram.l (braces_level): Now auto, not static.
8535 Initialize to zero if the compiler is being picky.
8536 (INITIAL): Clear braces_level instead of incrementing it.
8537 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8538 as POSIX 1003.1-2001 requires.
8539 * src/system.h (IF_LINT): New macro, taken from coreutils.
8540 * configure.ac: Define "lint" if --enable-gcc-warnings.
8541
29c01725
AD
85422002-11-05 Akim Demaille <akim@epita.fr>
8543
8544 * src/scan-gram.l: When it starts with `%', complain about the
8545 whole directive, not just that `invalid character: %'.
8546
8aeac3ca
AD
85472002-11-04 Akim Demaille <akim@epita.fr>
8548
8549 * Makefile.maint: Update from Autoconf.
8550 (update, cvs-update, po-update, do-po-update): New.
8551
793a58bb
AD
85522002-11-04 Akim Demaille <akim@epita.fr>
8553
8554 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8555 and yyerror.
8556 Have yyerror `use' its arguments.
8557 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8558 returns true when location & yacc & pure & parse-param.
8559 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8560
c4d720cd
AD
85612002-11-04 Akim Demaille <akim@epita.fr>
8562
8563 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8564 clashes.
8565 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8566 font-lock-mode.
8567 Use complain_at.
8568 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8569 slot 0.
8570
613a0dc5
PE
85712002-11-03 Paul Eggert <eggert@twinsun.com>
8572
8573 * src/reader.c (get_merge_function, grammar_current_rule_check):
8574 Use consistent diagnostics for reporting type name clashes.
8575 Quote the types with <>, for consistency with Yacc.
8576 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8577
2a8d363a
AD
85782002-11-03 Akim Demaille <akim@epita.fr>
8579
8580 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8581 New.
8582 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8583 (b4_parse_param): Remove.
8584 Use b4_identification.
8585 Propagate b4_pure_args where needed to pass them to yyerror.
8586 * data/glr.m4 (b4_parse_param): Remove.
8587 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8588 (b4_lpure_formals): New.
8589 Use b4_identification.
8590 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8591 b4_user_formals and b4_user_args.
8592 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8593 (yyreportAmbiguity): When using a pure parser, also need
8594 the location, and the parse-params.
8595 Adjust callers.
8596 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8597 When using a pure parser, also need the parse-params.
8598 Adjust callers.
8599 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8600 (%pure-parser + %parse-param) LALR and GLR parsers.
8601 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8602 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8603 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8604 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8605 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8606 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8607 * doc/bison.texinfo: Untabify the whole file.
8608 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8609 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8610 (Error Reporting): Adjust to these new directives.
8611 Document %error-verbose, deprecate YYERROR_VERBOSE.
8612
9e32add8
AD
86132002-11-03 Akim Demaille <akim@epita.fr>
8614
8615 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8616 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8617 command line options.
8618 * tests/cxx-type.at: Formatting changes.
8619
b02d90a5
PE
86202002-11-03 Paul Eggert <eggert@twinsun.com>
8621
8622 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8623 to count columns correctly, and to check for invalid inputs.
9e32add8 8624
b02d90a5
PE
8625 Use mbsnwidth to count columns correctly. Account for tabs, too.
8626 Include mbswidth.h.
8627 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8628 (extend_location): New function.
8629 (YY_LINES): Remove.
8630
8631 Handle CRLF in C code rather than in Lex code.
8632 (YY_INPUT): New macro.
8633 (no_cr_read): New function.
8634
8635 Scan UCNs, even though we don't fully handle them yet.
8636 (convert_ucn_to_byte): New function.
8637
8638 Handle backslash-newline correctly in C code.
8639 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8640 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8641 all uses changed.
8642 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8643 Use {splice} wherever C allows backslash-newline.
8644 YY_STEP after space, newline, vertical-tab.
8645 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 8646
b02d90a5
PE
8647 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8648
8649 ({int}, handle_action_dollar, handle_action_at): Check for integer
8650 overflow.
9e32add8 8651
b02d90a5
PE
8652 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8653
8654 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8655 as well as \000. Check for UCHAR_MAX, not 255.
8656 Allow \x with an arbitrary positive number of digits, as in C.
8657 Check for overflow here.
8658 Allow \? and UCNs, for compatibility with C.
8659
8660 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8661 with quote slot used by complain_at.
8662
8663 * tests/input.at: Add tests for backslash-newline, m4 quotes
8664 in symbols, long literals, and funny escapes in strings.
8665
8666 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8667 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8668 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8669 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8670 * m4/mbswidth.m4: New file, from GNU coreutils.
8671
8672 * doc/bison.texinfo (Grammar Outline): Document // comments.
8673 (Symbols): Document that trigraphs have no special meaning in Bison,
8674 nor is backslash-newline allowed.
8675 (Actions): Document that trigraphs have no special meaning.
8676
8677 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8678 no longer used.
8679
86802002-11-02 Paul Eggert <eggert@twinsun.com>
8681
8682 * src/reader.c: Don't include quote.h; not needed.
8683 (get_merge_function): Reword warning to be consistent with
8684 type clash diagnostic in grammar_current_rule_check.
8685
8686 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8687 bug in trigraph handling.
8688
8689 * src/output.c (prepare_symbols): When printing token names,
8690 escape "[" as "@<:@" and likewise for "]".
8691
8692 * src/system.h (errno): Remove declaration, as we are now
8693 assuming C89 or better, and C89 guarantees errno.
8694
762b212b
PE
86952002-10-30 Paul Eggert <eggert@twinsun.com>
8696
8697 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8698 Check for close failures.
8699 * src/files.h (xfclose): Return void, not int, since it always
8700 returned zero.
8701 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8702 indicates one.
8703 * src/output.c (output_skeleton): Use xfclose rather than fclose
8704 and ferror. xfclose now checks ferror.
8705
8706 * data/glr.c (YYLEFTMOST_STATE): Remove.
8707 (yyreportTree): Use a stack-based leftmost state. This avoids
8708 our continuing battles with bogus warnings about initializers.
8709
56100c60
AD
87102002-10-30 Akim Demaille <akim@epita.fr>
8711
8712 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8713 #if.
8714
51b4a04c
PH
87152002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8716
8717 * tests/glr-regr1.at: New test for reported regressions.
8718 * tests/testsuite.at: Add glr-regr1.at test.
8719 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 8720
bf1ebda2
PE
87212002-10-24 Paul Eggert <eggert@twinsun.com>
8722
5c16c6b1
PE
8723 Version 1.75a.
8724
bf1ebda2
PE
8725 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8726 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8727 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8728 Don't assume strdup exists; POSIX says its an XSI extension.
8729 Check for buffer overflow on input.
8730
b526ee61
AD
87312002-10-24 Akim Demaille <akim@epita.fr>
8732
8733 * src/output.c (output_skeleton): Don't disable M4sugar comments
8734 too soon: it results in comments being expanded.
8735 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8736 first output.
8737
f1886bb2
AD
87382002-10-24 Akim Demaille <akim@epita.fr>
8739
8740 * data/yacc.c (m4_int_type): New.
8741 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8742 char' as only yacc.c wants K&R portability.
8743 * data/glr.c (yysigned_char): Remove.
8744 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8745 Reported by Quoc Peyrot.
8746
c5576256
PE
87472002-10-23 Paul Eggert <eggert@twinsun.com>
8748
8749 * src/main.c (main): With --trace=time, report times even if a
8750 non-fatal error occurs. Formerly, the times were reported in some
8751 such cases but not in others.
8752 * src/reader.c (reader): Just return if a complaint has been issued,
8753 instead of exiting, so that 'main' can report times.
8754
27b0ffea
AD
87552002-10-22 Akim Demaille <akim@epita.fr>
8756
8757 * src/system.h: Include sys/types.
8758 Reported by Bert Deknuydt.
8759
223a7883
PE
87602002-10-23 Paul Eggert <eggert@twinsun.com>
8761
8762 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8763 Suggested by Art Haas.
8764
87652002-10-22 Paul Eggert <eggert@twinsun.com>
8766
8767 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8768 decl; not needed any more.
8769 * src/main.c (main): Use return to exit, undoing yesterday's change.
8770 The last OS that we could find where this wouldn't work is
8771 SunOS 3.5, and that's too old to worry about now.
8772
8773 * data/glr.c (struct yyltype): Define members even when not
8774 doing locations. This is more consistent with yacc.c, and it
8775 works around the following bug reports:
161a71f3
PE
8776 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8777 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 8778
223a7883
PE
8779 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8780 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8781 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8782
8b76775a
AD
87832002-10-22 Akim Demaille <akim@epita.fr>
8784
8785 * data/README: New.
8786
6db10d14
PE
87872002-10-21 Paul Eggert <eggert@twinsun.com>
8788
8789 Be consistent about 'bool'; the old code used an enum in one
8790 module and an int in another, and this violates the C standard.
8791 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8792 * configure.ac (AC_HEADER_STDBOOL): Add.
8793 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8794 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8795 * src/symtab.c (hash_compare_symbol_t): Likewise.
8796 * src/system.h (bool, false, true): Use a definition consistent
8797 with ../lib/hash.c. All uses changed.
8798
8799 * src/complain.c (warning_issued): Renamed from warn_message_count,
8800 so that we needn't worry about integer overflow (!).
8801 Now of type bool. All uses changed.
8802 (complaint_issued): Renamed from complain_message_count; likewise.
8803
8804 * src/main.c (main): Use exit to exit with failure.
27b0ffea 8805
6db10d14
PE
8806 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8807 rather than 1 and 0.
8808 * src/main.c (main): Likewise.
8809 * src/getargs.c (getargs): Likewise.
8810 * src/reader.c (reader): Likewise.
8811
8812 * src/getarg.c (getargs): Remove duplicate code for
8813 "Try `bison --help'".
8814
8815 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8816 What was that "2" for?
8817
8818 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8819 * src/getargs.c (usage): Likewise.
8820
8821 * src/getargs.c (getargs): When there are too few operands, report
8822 the last one. When there are too many, report the first extra
8823 one. This is how diffutils does it.
8824
92a060fd
PE
88252002-10-20 Paul Eggert <eggert@twinsun.com>
8826
8827 Remove K&R vestiges.
8828 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8829 * src/complain.c (VA_START): Remove. Assume prototypes.
8830 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8831 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8832 fatal): Assume prototypes.
8833 * src/complain.h: Assume prototypes.
8834 * src/system.h (PARAMS): Remove.
8835 Include <limits.h> unconditionally, since it's guaranteeed even
8836 for a freestanding C89 compiler.
8837 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8838 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 8839
e7cb57c0
AD
88402002-10-20 Akim Demaille <akim@epita.fr>
8841
8842 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8843 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8844 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8845 (yyresolveStates, yyresolveAction, yyresolveStack)
8846 (yyprocessOneStack): Use them.
8847 (yy_reduce_print): New.
8848 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8849
0245f82d
AD
88502002-10-20 Akim Demaille <akim@epita.fr>
8851
8852 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8853 arguments and output `void'.
8854 (b4_c_function): Rename as...
8855 (b4_c_function_def): this.
8856 (b4_c_function_decl, b4_c_ansi_function_def)
8857 (b4_c_ansi_function_decl): New.
8858 Change the interpretation of the arguments: before `int, foo', now
8859 `int foo, foo'.
8860 * data/yacc.c (yyparse): Prototype and define thanks to these.
8861 Adjust b4_c_function_def uses.
8862 * data/glr.c (yyparse): Likewise, but ANSI only.
8863
39912f52
AD
88642002-10-20 Akim Demaille <akim@epita.fr>
8865
8866 * src/output.c (prepare): Move the definition of `tokens_number',
8867 `nterms_number', `undef_token_number', `user_token_number_max'
8868 to...
8869 (prepare_tokens): Here.
8870 (prepare_tokens): Rename as...
8871 (prepare_symbols): this.
8872 (prepare): Move the definition of `rules_number' to...
8873 (prepare_rules): here.
8874 (prepare): Move the definition of `last', `final_state_number',
8875 `states_number' to...
8876 (prepare_states): here.
8877 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8878
20c1e2ad
AD
88792002-10-20 Akim Demaille <akim@epita.fr>
8880
8881 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8882
21964f43
AD
88832002-10-20 Akim Demaille <akim@epita.fr>
8884
8885 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8886 * data/c.m4: here.
8887
66d30cd4
AD
88882002-10-20 Akim Demaille <akim@epita.fr>
8889
8890 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8891 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8892 `pair'.
8893 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8894 `name' to...
8895 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8896 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8897 These.
8898
95f2c9fe
PE
88992002-10-19 Paul Eggert <eggert@twinsun.com>
8900
8901 Do not create a temporary file, as that involves security and
8902 cleanup headaches. Instead, use a pair of pipes.
8903 Derived from a suggestion by Florian Krohm.
8904 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8905 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8906 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8907 (BISON_PREREQ_SUBPIPE): Add.
8908 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8909 Add subpipe.h, subpipe.c.
8910 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8911 * po/POTFILES.in: Add lib/subpipe.c.
8912 * src/output.c: Include "subpipe.h".
8913 (m4_invoke): Remove decl.
8914 (scan_skel): New decl.
8915 (output_skeleton): Use pipe rather than temporary file for m4 input.
8916 Check that m4sugar.m4 is readable, to avoid deadlock.
8917 Check for pipe I/O error.
8918 * src/scan-skel.l (readpipe): Remove decl.
8919 (scan_skel): New function, to be used in place of m4_invoke.
8920 Read from stream rather than file.
66d30cd4 8921
95f2c9fe
PE
8922 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8923 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8924 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8925 this generates a more-accurate value anyway.
8926
8927 * lib/timevar.c (timervar_accumulate): Rename locals to
8928 avoid confusion with similarly-named more-global.
8929 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8930
8931 * src/output.c (prepare): Use xstrdup to convert char const *
8932 to char *, to avoid GCC warning.
8933
c19988b7
AD
89342002-10-19 Akim Demaille <akim@epita.fr>
8935
8936 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8937 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8938 Use them to have `calc.y' ready for %pure-parser.
8939 * data/yacc.c (YYLEX): Pass a yylex return type to
8940 b4_c_function_call.
8941
ae7453f2
AD
89422002-10-19 Akim Demaille <akim@epita.fr>
8943
8944 Prototype support of %lex-param and %parse-param.
8945
8946 * src/parse-gram.y: Add the definition of the %lex-param and
8947 %parse-param tokens, plus their rules.
8948 Drop the `_' version of %glr-parser.
8949 Add the "," token.
8950 * src/scan-gram.l (INITIAL): Scan them.
8951 * src/muscle_tab.c: Comment changes.
8952 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8953 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8954 (muscle_entry_s): The `value' member is no longer const.
8955 Adjust all dependencies.
8956 * src/muscle_tab.c (muscle_init): Adjust: use
8957 MUSCLE_INSERT_STRING.
8958 Initialize the obstack earlier.
8959 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8960 (muscle_pair_list_grow): New.
8961 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8962 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8963 * tests/calc.at: Use %locations, not --locations.
8964 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8965
0e575721
AD
89662002-10-19 Akim Demaille <akim@epita.fr>
8967
8968 * src/getargs.c (usage): Take status as argument and exit
8969 accordingly.
8970 Report the traditional `Try ... --help' message when status != 0.
8971 (usage, version): Don't take a FILE * as arg, it is pointless.
8972 (getargs): When there is an incorrect number of arguments, make it
8973 an error, and report it GNUlically thanks to `usage ()'.
8974
724ce7f5
PE
89752002-10-18 Paul Eggert <eggert@twinsun.com>
8976
3a781eb2
PE
8977 * data/glr.c (yyreportParseError): Don't assume that sprintf
8978 yields the length of the printed string, as this is not true
8979 on SunOS 4.1.4. Reported by Peter Klein.
8980
724ce7f5
PE
8981 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8982 * tests/conflicts.at (%nonassoc and eof): Likewise.
8983 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8984
473d0a75
AD
89852002-10-17 Akim Demaille <akim@epita.fr>
8986
8987 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8988 * src/getargs.c (trace_types, trace_args): Adjust.
8989 * src/reader.c (grammar_current_rule_prec_set)
8990 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8991 Standardize error messages.
8992 And s/@prec/%prec/!
8993 (reader): Use trace_flag to enable scanner/parser debugging,
8994 instead of an adhoc scheme.
8995 * src/scan-gram.l: Remove trailing debugging code.
8996
e76d2469
PE
89972002-10-16 Paul Eggert <eggert@twinsun.com>
8998
93e2236a
PE
8999 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9000 MUSCLE_TAB_H.
9001
e76d2469
PE
9002 * NEWS: Officially drop support for building Bison with K&R C,
9003 since it didn't work anyway and it's not worth worrying about.
9004 * Makefile.maint (wget_files): Remove ansi2knr.c.
9005 (ansi2knr.c-url_prefix): Remove.
9006 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9007 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9008 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9009
5bd1c419
PE
90102002-10-15 Paul Eggert <eggert@twinsun.com>
9011
9012 Stop using the "enum_" trick for K&R-style function definitions;
9013 it confused me, and I was the author! Instead, assume that people
9014 who want to use K&R C compilers (when using these modules in GCC,
9015 perhaps?) will run ansi2knr.
9016
9017 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9018 All uses of "enum_" changed to "enum ".
9019 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9020 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 9021
5bd1c419
PE
9022 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9023 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9024 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9025 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9026 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9027 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9028 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9029 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9030 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9031 Use function prototypes; this removes the need for declaring
9032 static functions simply to provide their prototypes.
9033 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9034 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9035 bitset_count_, bitset_create, bitset_dump, bitset_first,
9036 bitset_free, bitset_init, bitset_last, bitset_next,
9037 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9038 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9039 bitset_print, bitset_release_memory, bitset_toggle_,
9040 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9041 debug_bitset): Likewise.
9042 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9043 * lib/bitset_stats.c (bitset_log_histogram_print,
9044 bitset_percent_histogram_print, bitset_stats_and,
9045 bitset_stats_and_cmp, bitset_stats_and_or,
9046 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9047 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9048 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9049 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9050 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9051 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9052 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9053 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9054 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9055 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9056 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9057 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9058 bitset_stats_zero): Likewise.
9059 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9060 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9061 bitsetv_dump, debug_bitsetv): Likewise.
9062 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
9063 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
9064 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
9065 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
9066 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
9067 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
9068 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
9069 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
9070 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
9071 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
9072 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
9073 Likewise.
9074 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
9075 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
9076 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
9077 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
9078 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
9079 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
9080 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
9081 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
9082 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
9083 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
9084 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 9085
ae26e1f0
AD
90862002-10-14 Akim Demaille <akim@epita.fr>
9087
9088 Version 1.75.
9089
d43baf71
AD
90902002-10-14 Akim Demaille <akim@epita.fr>
9091
9092 * tests/Makefile.am (maintainer-check-posix): New.
9093
7ebc83e3
AD
90942002-10-14 Akim Demaille <akim@epita.fr>
9095
9096 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
9097 member.
9098
05846dae
AD
90992002-10-14 Akim Demaille <akim@epita.fr>
9100
9101 * src/tables.c (table_ninf_remap): base -> tab.
9102 Reported by Matt Rosing.
9103
1318e37d
PE
91042002-10-14 Paul Eggert <eggert@twinsun.com>
9105
447fbb17
PE
9106 * tests/action.at, tests/calc.at, tests/conflicts.at,
9107 tests/cxx-type.at, tests/headers.at, tests/input.at,
9108 tests/regression.at, tests/synclines.at, tests/torture.at:
9109 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
9110 so that the tests still work even if POSIXLY_CORRECT is set.
9111 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 9112
1318e37d
PE
9113 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
9114 for portability to K&R hosts. Fix typo: signed char is guaranteed
9115 only to 127, not to 128.
9116 * data/glr.c (yysigned_char): New type.
9117 * data/yacc.c (yysigned_char): Likewise.
9118 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
9119
cc0f0794
PE
91202002-10-13 Paul Eggert <eggert@twinsun.com>
9121
5038f418
PE
9122 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
9123 true due to limited range of data type" warning from GCC.
9124
cc0f0794
PE
9125 * data/c.m4 (b4_token_defines): Protect against double-inclusion
9126 by wrapping enum yytokentype's definition inside #ifndef
9127 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
9128
6fed0802
AD
91292002-10-13 Akim Demaille <akim@epita.fr>
9130
9131 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
9132 Un yy- yyrhs to avoid the name clash with the global YYRHS.
9133
32f0598d
AD
91342002-10-13 Akim Demaille <akim@epita.fr>
9135
9136 * Makefile.maint: Update from Autoconf 2.54.
9137 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
9138
7ea9a33f
AD
91392002-10-13 Akim Demaille <akim@epita.fr>
9140
9141 * src/print.c (print_state): Separate the list of solved conflicts
9142 from the other items.
9143 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
9144
ea99527d
AD
91452002-10-13 Akim Demaille <akim@epita.fr>
9146
9147 Let nondeterministic skeletons be usable with deterministic
9148 tables.
9149
9150 With the patch, GAWK compiled by GCC without -O2 passes its test
9151 suite using a GLR parser driven by LALR tables. It fails with -O2
9152 because `struct stat' gives two different answers on my machine:
9153 88 (definition of an auto var) and later 96 (memset on this var).
9154 Hence the stack is badly corrumpted. The headers inclusion is to
9155 blame: if I move the awk.h inclusion before GLR's system header
9156 inclusion, the two struct stat have the same size.
9157
9158 * src/tables.c (pack_table): Always create conflict_table.
9159 (token_actions): Always create conflict_list.
9160 * data/glr.c (YYFLAG): Remove, unused.
9161
f377f69f
AD
91622002-10-13 Akim Demaille <akim@epita.fr>
9163
9164 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
9165 (O0FLAGS): New.
9166 (VALGRIND, GXX): New.
9167 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
9168 * tests/bison.in: Run $PREBISON a pre-command.
9169 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9170 (maintainer-check-g++): New.
9171 * Makefile.am (maintainer-check): New.
9172
2a1fe6ed
AD
91732002-10-13 Akim Demaille <akim@epita.fr>
9174
9175 * data/glr.c: Formatting changes.
9176 Tweak some trace messages to match yacc.c's.
9177
f50adbbd
AD
91782002-10-13 Akim Demaille <akim@epita.fr>
9179
9180 GLR parsers sometimes raise parse errors instead of performing the
9181 default reduction.
9182 Reported by Charles-Henry de Boysson.
9183
9184 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 9185 check the length of the traces when %glr.
f50adbbd
AD
9186 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
9187 GLR's traces.
9188 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
9189 Test GLR parsers.
9190 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
9191 (yyltype): Remove the yy prefix from the member names.
9192 (yytable): Complete its comment.
9193 (yygetLRActions): Map error action number from YYTABLE from
9194 YYTABLE_NINF to 0.
9195 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
9196 (which was a bug: it should have been YYTABEL_NINF, and yet it was
9197 not satisfying as we could compare an YYACTION computed from
9198 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
9199 only value for error actions.
9200 (yyreportParseError): In verbose parse error messages, don't issue
9201 `error' in the list of expected tokens.
9202 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
9203 next action to perform to match glr.c's decoding.
9204 (yytable): Complete its comment.
9205
bcbad5b9
PE
92062002-10-13 Paul Eggert <eggert@twinsun.com>
9207
9208 Fix problem reported by Henrik Grubbstroem in
161a71f3 9209 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
9210 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
9211 because the Bison parser reads the second action before reducing
9212 the first one.
9213 * src/scan-gram.l (rule_length): New static var.
9214 Use it to keep track of the rule length in the scanner, since
9215 we can't expect the parser to be in lock-step sync with the scanner.
9216 (handle_action_dollar, handle_action_at): Use this var.
9217 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 9218
14904b89
PE
92192002-10-12 Paul Eggert <eggert@twinsun.com>
9220
1fe611e5
PE
9221 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9222 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9223 Include <sys/time.h> when checking for clock_t and struct tms.
9224 Use same include order as source.
9225 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 9226 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 9227
1fe611e5
PE
9228 * lib/timevar.c: Update copyright date and clarify comments.
9229 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 9230
1fe611e5
PE
9231 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9232 GCC version as of today, then merge Bison's changes.
9233 Change "GCC" to "Bison" in copyright notice. timevar.def's
9234 author is Akim, so change that too.
9235
98194095
PE
9236 * src/reader.c (grammar_current_rule_check):
9237 Don't worry about the default action if $$ is untyped.
9238 Prevents bogus warnings reported by Jim Gifford in
161a71f3 9239 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 9240
14904b89
PE
9241 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9242 * data/glr.c, data/lalr1.cc, data/yacc.c:
9243 Output token definitions before the first part of user declarations.
9244 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 9245 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 9246
ff6dca18
PE
92472002-10-11 Paul Eggert <eggert@twinsun.com>
9248
9249 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9250 (yyparse): here. This undoes some of the 2002-07-25 change.
9251 Compatibility problem reported by Ralf S. Engelschall with
9252 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9253
eb714592
AD
92542002-10-11 Akim Demaille <akim@epita.fr>
9255
9256 * tests/regression.at Characters Escapes): New.
9257 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9258 characters.
9259 Reported by Jan Nieuwenhuizen.
9260
b7195100
AD
92612002-10-11 Akim Demaille <akim@epita.fr>
9262
9263 * po/id.po: New.
9264
f28a0f2d
PE
92652002-10-10 Paul Eggert <eggert@twinsun.com>
9266
9267 Portability fixes for bitsets; this also avoids several GCC
9268 warnings.
9269
9270 * lib/abitset.c: Include <stddef.h>, for offsetof.
9271 * lib/lbitset.c: Likewise.
9272
9273 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9274 properly for vectors of objects. Do not assume that adding a
9275 header size to a multiple of a word size yields a value that is
9276 properly aligned for the whole union.
9277 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9278
9279 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9280 unique names for structures.
9281 * lib/ebitset.c (ebitset_bytes): Likewise.
9282 * lib/lbitset.c (lbitset_bytes): Likewise.
9283
9284 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9285 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9286 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9287 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9288 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9289 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9290 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9291 to improve the type-checking that GCC can do.
9292 * lib/bitset.c (bitset_op4_cmp): Likewise.
9293 * lib/bitset_stats.c (bitset_stats_count,
9294 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9295 bitset_stats_copy, bitset_stats_disjoint_p,
9296 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9297 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9298 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9299 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9300 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9301 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9302 bitset_stats_or_and_cmp): Likewise.
9303 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9304 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9305 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9306 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9307
9308 * lib/abitset.h: Include bitset.h, not bbitset.h.
9309 * lib/ebitset.h: Likewise.
9310 * lib/lbitset.h: Likewise.
9311
9312 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9313 All instances of parameters of type enum bitset_opts are now of
9314 type enum_bitset_opts, to conform to the C Standard, and similarly
9315 for enum_bitset_type.
9316 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9317 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9318
9319 Do not use "struct bitset_struct" to mean different things in
9320 different modules. Not only is this confusing, it violates
9321 the C Standard, which requires that structure types in different
9322 modules must be compatible if one is to be passed to the other.
9323 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9324 All instances of "struct bitset_struct *" replaced with "bitset".
9325 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9326 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9327 struct lbitset_struct, struct bitset_stats_struct): New types.
9328 All uses of struct bitset_struct changed to union bitset_union,
9329 etc.
ba0fe3c7 9330 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
9331 struct bitset_struct): Remove.
9332 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9333 struct bitset_struct): Remove.
9334 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9335 bitset_struct): Remove.
9336 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9337 Likewise.
9338
9339 Do not call a function of type T using a call that assumes the
9340 function is of a different type U. Standard C requires that a
9341 function must be called with a type that is compatible with its
9342 definition.
9343 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9344 New decls.
9345 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9346 New functions.
9347 * lib/ebitset.c (PFV): Remove.
9348 * lib/lbitset.c (PFV): Likewise.
9349 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9350 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9351 decls.
9352 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9353 (ebitset_vtable): Use them.
9354 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9355 lbitset_xor): New functions.
9356 (lbitset_vtable): Use them.
9357
9358 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9359 Declare.
9360
9361 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9362 GCC warning.
9363 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9364 Use offsetof, for simplicity.
9365
6fbe4984
PE
93662002-10-06 Paul Eggert <eggert@twinsun.com>
9367
9368 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9369 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 9370 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
9371 which was inadvertently undone by the 2002-09-30 patch.
9372 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9373 the same width as int.
9374
420f93c8
PE
93752002-10-04 Paul Eggert <eggert@twinsun.com>
9376
9377 Version 1.50.
9378
9379 * configure.ac (AC_INIT), NEWS: Increment version number.
9380
9381 * doc/bison.texinfo: Minor spelling, grammar, and white space
9382 fixes.
9383 (Symbols): Mention that any negative value returned from yylex
9384 signifies end-of-input. Warn about negative chars. Mention
9385 the portable Standard C character set.
9386
9387 The GNU coding standard says CFLAGS and YFLAGS are reserved
9388 for the installer to set.
9389 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9390 * src/Makefile.am (AM_CFLAGS): Likewise.
9391 (AM_YFLAGS): Renamed from YFLAGS.
9392
9393 Fix some MAX and MIN problems.
9394 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9395 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9396 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9397 * src/reader.c (reader): Use it.
9398
9399 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9400 POSIX 1003.1-2001 has removed fgrep.
9401
94022002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9403
9404 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9405 interpreted as signed.
9406 * lib/ebitset.c (ebitset_list): Fix bug.
9407
ff68026d
PE
94082002-10-01 Paul Eggert <eggert@twinsun.com>
9409
9410 More fixes for 64-bit hosts and large bitsets.
9411
9412 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9413 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9414 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9415 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9416 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9417 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9418 bitset_count_): Likewise.
9419 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9420 bitset_first, bitset_last): Likewise.
9421 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9422 bitset_stats_list_reverse, bitset_stats_size,
9423 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9424 Likewise.
9425 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9426 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9427 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9428 bitsetv_reflexive_transitive_closure): Likewise.
9429 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9430 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9431 Likewise.
9432 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9433 Likewise.
420f93c8 9434
ff68026d
PE
9435 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9436 Use size_t, not unsigned int, to count bytes.
9437 * lib/abitset.h (abitset_bytes): Likewise.
9438 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9439 Likewise.
9440 * lib/bitset.h (bitset_bytes): Likewise.
9441 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9442 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9443 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9444 * lib/ebitset.c (ebitset_bytes): Likewise.
9445 * lib/ebitset.h (ebitset_bytes): Likewise.
9446 * lib/lbitset.c (lbitset_bytes): Likewise.
9447 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 9448
ff68026d
PE
9449 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9450 abitset_subset_p, abitset_disjoint_p, abitset_and,
9451 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9452 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9453 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9454 abitset_or_and, abitset_or_and_cmp):
9455 Use bitset_windex instead of unsigned int.
9456 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9457 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9458 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9459 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9460 Likewise.
9461 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 9462
ff68026d
PE
9463 * lib/bitset.c (bitset_print):
9464 Use proper printf formats for widths of integer types.
9465 * lib/bitset_stats.c (bitset_percent_histogram_print,
9466 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9467 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9468 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9469 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 9470
ff68026d
PE
9471 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9472 BITSET_SIZE_MAX): New macros.
9473 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9474 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9475 to BITSET_WINDEX_MAX.
9476
9477 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9478 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9479 since we now return the bitset_bindex type (not int).
9480
9481 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9482 when computing sizes.
9483 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9484
9485 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9486 and avoid cast to unsigned.
9487
6aa452a6
AD
94882002-09-30 Akim Demaille <akim@epita.fr>
9489
9490 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9491 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9492 Updates from Michael Hayes.
9493
927f7817
AD
94942002-09-30 Art Haas <ahaas@neosoft.com>
9495
9496 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9497 invocations.
9498 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9499 defined.
9500
9738f41e
AD
95012002-09-27 Akim Demaille <akim@epita.fr>
9502
9503 Version 1.49c.
9504
a5c75d7f
AD
95052002-09-27 Akim Demaille <akim@epita.fr>
9506
9507 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9508 (Because of AC_LIBSOURCE).
9509
8280e179
AD
95102002-09-27 Akim Demaille <akim@epita.fr>
9511
9512 Playing with Autoscan.
9513
9514 * configure.ac: Remove the old LIBOBJ tweaks.
9515 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9516 * lib/strrchr.c: New.
9517 * lib/strtol.c: New, from the Coreutils 4.5.1.
9518
ae64af35
AD
95192002-09-27 Akim Demaille <akim@epita.fr>
9520
9521 Playing with Autoscan.
9522
9523 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9524 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9525 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9526 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9527 Coreutils 4.5.1.
9528
d1a1114f
AD
95292002-09-24 Akim Demaille <akim@epita.fr>
9530
9531 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9532 (Frequently Asked Questions, Parser Stack Overflow): New.
9533
b906441c
AD
95342002-09-13 Akim Demaille <akim@epita.fr>
9535
9536 Playing with autoscan.
9537
9538 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9539 * src/files.c (skeleton_find): Remove, unused.
9540 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9541 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9542
bd701811
AD
95432002-09-13 Akim Demaille <akim@epita.fr>
9544
9545 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9546 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9547
e0a13e7b
AD
95482002-09-13 Akim Demaille <akim@epita.fr>
9549
9550 * configure.ac: Require 2.54.
9551 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9552 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9553 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9554 Remove, provided by Autoconf macros.
9555
c97011bf
AD
95562002-09-12 Akim Demaille <akim@epita.fr>
9557
9558 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9559
d862b1be
AD
95602002-09-12 Akim Demaille <akim@epita.fr>
9561
9562 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9563 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9564 Reported by Martin Mokrejs.
9565
3d38c03a
AD
95662002-09-10 Akim Demaille <akim@epita.fr>
9567
9568 * src/parse-gram.y: Associate a human readable string to each
9569 token type.
9570 * tests/regression.at (Invalid inputs): Adjust.
9571
b6347355
AD
95722002-09-10 Gary V. Vaughan <gary@gnu.org>
9573
9574 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9575 with an Autoconf-2.5x style configure.ac.
9576
09ba4ab2
PE
95772002-09-06 Paul Eggert <eggert@twinsun.com>
9578
9579 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9580 exception applies only to yacc.c. This is a modification of a
9581 patch originally suggested by Akim Demaille.
9582
21846f69
AD
95832002-09-06 Akim Demaille <akim@epita.fr>
9584
09ba4ab2
PE
9585 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9586 here to...
9587 * data/yacc.c: here.
9588
21846f69
AD
9589 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9590 LocationType.
9591 (b4_ltype): Default to yy::Location from location.hh.
9592
c0ad8bf3
AD
95932002-09-04 Jim Meyering <jim@meyering.net>
9594
9595 * data/yacc.c: Guard the declaration of yytoknum also with
9596 `#ifdef YYPRINT', so it is declared only when used.
9597
3a93251e
AD
95982002-09-04 Akim Demaille <akim@epita.fr>
9599
9600 * configure.in: Rename as...
9601 * configure.ac: this.
9602 Bump to 1.49c.
9603
427c0dda
AD
96042002-09-04 Akim Demaille <akim@epita.fr>
9605
9606 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9607 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9608 translate maintainer only messages.
9609
6a254321
PE
96102002-08-12 Paul Eggert <eggert@twinsun.com>
9611
645e30d1
PE
9612 Version 1.49b.
9613
6a254321
PE
9614 * Makefile.am (SUBDIRS): Remove intl.
9615 (DISTCLEANFILES): Remove.
9616 * NEWS: Mention that GNU M4 is now required. Clarify what is
9617 meant by "larger grammars". Mention the pt_BR translation.
9618 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9619 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9620 Bump version from 0.11.2 to 0.11.5.
9621 (BISON_PREREQ_STAGE): Remove.
9622 (AM_GNU_GETTEXT): Use external gettext.
9623 (AC_OUTPUT): Remove intl/Makefile.
9624
9625 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9626
9627 * data/glr.c: Include string.h, for strlen.
9628 (yyreportParseError): Use size_t for yysize.
9629 (yy_yypstack): No longer nested inside yypstates, as nested
9630 functions are not portable. Do not assume size_t is the
9631 same width as int.
9632 (yypstates): Do not assume that ptrdiff_t is the same width
9633 as int, and similarly for yyposn and YYINDEX.
9634
9635 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9636
9637 * lib/Makefile.am (INCLUDES): Do not include from the intl
9638 directory, which has been removed.
9639 * src/Makefile.am (INCLUDES): Likewise.
9640
9641 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9642 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9643 New vars.
9644
9645 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9646 * tests/Makefile.am (EXTRA_DIST): Likewise.
9647
9648 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9649 Do not assume that bitset_windex is the same width as unsigned.
9650
9651 * lib/abitset.c (abitset_unused_clear): Do not assume that
9652 bitset_word is the same width as int.
9653 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9654 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9655 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9656 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9657 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9658
9659 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9660 portability to one's complement hosts!).
9661 * lib/ebitset.c (ebitset_op1): Likewise.
9662 * lib/lbitset.c (lbitset_op1): Likewise.
9663
9664 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9665 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9666 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9667 Sync with fileutils.
9668 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9669 lib/gettext.h: Sync with diffutils.
9670
9671 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9672 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9673
9674 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9675 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9676 check for void *.
9677
9678 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9679 size_t; the old version tried to do this but casted improperly.
9680 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9681 (bitset_test): Now returns int, not unsigned long.
9682
9683 * lib/bitset_stats.c: Include "gettext.h".
9684 (_): New macro.
9685 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9686 name locals "index", as it generates unnecessary warnings on some
9687 hosts that have an "index" function.
9688
9689 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9690 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9691 they need translation.
9692 * src/LR0.c (state_list_append, new_itemsets, get_state,
9693 append_states, generate_states): Likewise.
9694 * src/assoc.c (assoc_to_string): Likewise.
9695 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9696 * src/gram.c (grammar_dump): Likewise.
9697 * src/injections.c (injections_compute): Likewise.
9698 * src/lalr.c (lookaheads_print): Likewise.
9699 * src/relation.c (relation_transpose): Likewise.
9700 * src/scan-gram.l: Likewise.
9701 * src/tables.c (table_grow, pack_vector): Likewise.
9702
9703 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9704 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9705 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9706 * m4/mbstate_t.m4: Sync with fileutils.
9707 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9708
9709 * po/LINGUAS: Add pt_BR.
9710 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9711 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9712 lib/timevar.c.
9713 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9714 manual recommends.
9715 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9716
9717 * src/complain.c (strerror_r): Remove decl; not needed.
9718 (strerror): Use same pattern as ../lib/error.c.
9719
9720 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9721
9722 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9723
9724 * src/main.c (main): Cast result of bindtextdomain and textdomain
9725 to void, to avoid a GCC warning when --disable-nls is in effect.
9726
9727 * src/scan-gram.l: Use strings rather than escapes when possible,
9728 to minimize the number of warnings from xgettext.
9729 (handle_action_dollar, handle_action_at): Don't use isdigit,
9730 as it mishandles negative chars and it may not work as expected
9731 outside the C locale.
9732
9733 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9734 this is a GCC extension and is not portable to other compilers.
9735
9736 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9737 Do not include <ctype.h>; no longer needed.
9738 Do not include <malloc.h>; no longer needed (and generates
9739 warnings on OpenBSD 3.0).
9740
9741 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9742 it's not portable.
9743
9744 * tests/regression.at: Do not use 'cc -c input.c -o input';
9745 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9746
9747 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9748 exit status as failure, not just exit status 1. Sun C exits
9749 with status 2 sometimes.
9750
9751 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9752 Use it for the two large tests.
9753
c8f002c7
AD
97542002-08-02 Akim Demaille <akim@epita.fr>
9755
9756 * src/conflicts.c (conflicts_output): Don't output rules never
9757 reduced here, since anyway that computation doesn't work.
9758 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9759 (rule_useless_p, rule_never_reduced_p): New.
9760 (grammar_rules_partial_print): Use a filter instead of a range.
9761 Display the title only if needed.
9762 (grammar_rules_print): Adjust.
9763 (grammar_rules_never_reduced_report): New.
9764 * src/tables.c (action_row): Move the computation of rules never
9765 reduced to...
9766 (token_actions): here.
9767 * src/main.c (main): Make the parser before making the report, so
9768 that rules never reduced are computed.
9769 Call grammar_rules_never_reduced_report.
9770 * src/print.c (print_results): Report rules never reduced.
9771 * tests/conflicts.at, tests/reduce.at: Adjust.
9772
cd08e51e
AD
97732002-08-01 Akim Demaille <akim@epita.fr>
9774
9775 Instead of attaching lookaheads and duplicating the rules being
9776 reduced by a state, attach the lookaheads to the reductions.
9777
9778 * src/state.h (state_t): Remove the `lookaheads',
9779 `lookaheads_rule' member.
9780 (reductions_t): Add a `lookaheads' member.
9781 Use a regular array for the `rules'.
9782 * src/state.c (reductions_new): Initialize the lookaheads member
9783 to 0.
9784 (state_rule_lookaheads_print): Adjust.
9785 * src/state.h, src/state.c (state_reductions_find): New.
9786 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9787 (count_rr_conflicts): Adjust.
9788 * src/lalr.c (LArule): Remove.
9789 (add_lookback_edge): Adjust.
9790 (state_lookaheads_count): New.
9791 (states_lookaheads_initialize): Merge into...
9792 (initialize_LA): this.
9793 (lalr_free): Adjust.
9794 * src/main.c (main): Don't free nullable and derives too early: it
9795 is used by --verbose.
9796 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9797
bb0027a9
AD
97982002-08-01 Akim Demaille <akim@epita.fr>
9799
9800 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9801 `rule_number_t**'.
9802 (set_derives, free_derives): Rename as...
9803 (derives_compute, derives_free): this.
9804 Adjust all dependencies.
9805 * src/nullable.c (set_nullable, free_nullable): Rename as...
9806 (nullable_compute, nullable_free): these.
9807 (rule_list_t): Store rule_t *, not rule_number_t.
9808 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9809 pointers, instead of their numbers.
9810 * src/main.c (main): Call nullable_free, and derives_free earlier,
9811 as they were lo longer used.
9812
3325ddc4
AD
98132002-08-01 Akim Demaille <akim@epita.fr>
9814
9815 * lib/timevar.c (get_time): Include children time.
9816 * src/lalr.h (LA, LArule): Don't export them: used with the
9817 state_t.
9818 * src/lalr.c (LA, LArule): Static.
9819 * src/lalr.h, src/lalr.c (lalr_free): New.
9820 * src/main.c (main): Call it.
9821 * src/tables.c (pack_vector): Check whether loc is >= to the
9822 table_size, not >.
9823 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9824 (tables_generate): do it, since that's also it which allocates
9825 them.
9826 Don't free LA and LArule, main does.
9827
c6f1a33c
AD
98282002-07-31 Akim Demaille <akim@epita.fr>
9829
9830 Separate parser tables computation and output.
9831
9832 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9833 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9834 (yydefgoto, yydefact, high): Move to...
9835 * src/tables.h, src/tables.c: here.
9836 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9837 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9838 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9839 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9840 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9841 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9842 (action_row, save_row, token_actions, save_column, default_goto)
9843 (goto_actions, sort_actions, matching_state, pack_vector)
9844 (table_ninf_remap, pack_table, prepare_actions): Move to...
9845 * src/tables.c: here.
9846 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9847 * src/output.c (token_actions, output_base, output_conflicts)
9848 (output_check): Merge into...
9849 (prepare_actions): this.
9850 (actions_output): Rename as...
9851 (user_actions_output): this.
9852 * src/main.c (main): Call tables_generate and tables_free.
9853
1509d42f
AD
98542002-07-31 Akim Demaille <akim@epita.fr>
9855
9856 Steal GCC's --time-report support.
9857
9858 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9859 stolen/adjusted from GCC.
9860 * m4/stage.m4: Remove time related checks.
9861 * m4/timevar.m4: New.
9862 * configure.in: Adjust.
9863 * src/system.h: Adjust to using timevar.h.
9864 * src/getargs.h, src/getargs.c: Support trace_time for
9865 --trace=time.
9866 * src/main.c (stage): Remove.
9867 (main): Replace `stage' invocations with timevar calls.
9868 * src/output.c: Insert pertinent timevar calls.
9869
273a74fa
AD
98702002-07-31 Akim Demaille <akim@epita.fr>
9871
9872 Let --trace have arguments.
9873
9874 * src/getargs.h (enum trace_e): New.
9875 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9876 (long_options, short_options): --trace/-T takes an optional
9877 argument.
9878 Change all the uses of trace_flag to reflect the new flags.
9879 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9880
9881 Strengthen `stage' portability.
9882
9883 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9884 * configure.in: Use it.
9885 Don't check for malloc.h and sys/times.h.
9886 * src/system.h: Include them when appropriate.
9887 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9888 times and struct tms are available.
9889
217598da
AD
98902002-07-30 Akim Demaille <akim@epita.fr>
9891
9892 In verbose parse error message, don't report `error' as an
9893 expected token.
9894 * tests/actions.at (Printers and Destructors): Adjust.
9895 * tests/calc.at (Calculator $1): Adjust.
9896 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9897 error message, do not report the parser accepts the error token in
9898 that state.
9899
52489d44
AD
99002002-07-30 Akim Demaille <akim@epita.fr>
9901
9902 Normalize conflict related messages.
9903
9904 * src/complain.h, src/complain.c (warn, complain): New.
9905 * src/conflicts.c (conflicts_print): Use them.
9906 (conflict_report_yacc): New, extracted from...
9907 (conflicts_print): here.
9908 * tests/conflicts.at, tests/existing.at: Adjust.
9909
e8832397
AD
99102002-07-30 Akim Demaille <akim@epita.fr>
9911
9912 Report rules which are never reduced by the parser: those hidden
9913 by conflicts.
9914
9915 * src/LR0.c (save_reductions): Don't make the final state too
9916 different: save its reduction (accept) instead of having a state
9917 without any action (no shift or goto, no reduce).
9918 Note: the final state is now a ``regular'' state, i.e., the
9919 parsers now contain `reduce 0' as default reduction.
9920 Nevertheless, since they decide to `accept' when yystate =
9921 final_state, they still will not reduce rule 0.
9922 * src/print.c (print_actions, print_reduction): Adjust.
9923 * src/output.c (action_row): Track reduced rules.
9924 (token_actions): Report rules never reduced.
9925 * tests/conflicts.at, tests/regression.at: Adjust.
9926
caf23d24
AD
99272002-07-30 Akim Demaille <akim@epita.fr>
9928
9929 `stage' was accidently included in a previous patch.
9930 Initiate its autoconfiscation.
9931
9932 * configure.in: Look for malloc.h and sys/times.h.
9933 * src/main.c (stage): Adjust.
9934 Report only when trace_flag.
9935
640748ee
AD
99362002-07-29 Akim Demaille <akim@epita.fr>
9937
9938 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9939 state_number_t.
9940 (errs_t): symbol_t*, not symbol_number_t.
9941 (reductions_t): rule_t*, not rule_number_t.
9942 (FOR_EACH_SHIFT): New.
9943 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9944 * src/print.c, src/print_graph.c: Adjust.
9945
88bce5a2
AD
99462002-07-29 Akim Demaille <akim@epita.fr>
9947
9948 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9949
9950 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9951 (endtoken, accept): these.
9952 * src/reader.c (reader): Set endtoken's default tag to "$end".
9953 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9954 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9955 Adjust.
9956
1bfb97db
AD
99572002-07-29 Akim Demaille <akim@epita.fr>
9958
9959 * src/reduce.c (reduce_grammar): When the language is empty,
9960 complain about the start symbol, not the axiom.
9961 Use its location.
9962 * tests/reduce.at (Empty Language): New.
9963
fc5734fe
AD
99642002-07-26 Akim Demaille <akim@epita.fr>
9965
9966 * src/reader.h, src/reader.c (gram_error): ... can't get
9967 yycontrol without making too strong assumptions on the parser
9968 itself.
9969 * src/output.c (prepare_tokens): Use the real 0th value of
9970 token_translations instead of `0'.
9971 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9972 visible here.
9973 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9974 for the time being: %locations ought to provide it to yyerror.
9975
3650b4b8
AD
99762002-07-25 Akim Demaille <akim@epita.fr>
9977
9978 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9979 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9980 * tests/regression.at (Web2c Actions): Adjust.
9981
4b3d3a8e
AD
99822002-07-25 Akim Demaille <akim@epita.fr>
9983
9984 Stop storing rules from 1 to nrules + 1.
9985
9986 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9987 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9988 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9989 Iterate from 0 to nrules.
9990 Use rule_number_as_item_number and item_number_as_rule_number.
9991 Adjust to `derive' now containing possibly 0.
9992 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9993 Handle the `- 1' part in rule numbers from/to item numbers.
9994 * src/conflicts.c (log_resolution): Fix the message which reversed
9995 shift and reduce.
9996 * src/output.c (action_row): Initialize default_rule to -1.
9997 (token_actions): Adjust.
9998 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9999 expected output.
10000 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10001
4a2a22f4
AD
100022002-07-25 Akim Demaille <akim@epita.fr>
10003
10004 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10005 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10006 (b4_c_knr_arg_decl): New.
10007 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10008 yyreport_parse_error.
10009
b8df3223
AD
100102002-07-25 Akim Demaille <akim@epita.fr>
10011
10012 * data/yacc.c (yyreport_parse_error): New, extracted from...
10013 (yyparse): here.
10014 (yydestruct, yysymprint): Move above yyparse.
10015 Be K&R compliant.
10016
a762e609
AD
100172002-07-25 Akim Demaille <akim@epita.fr>
10018
10019 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10020 replace...
10021 (b4_sint_type, b4_uint_type): these.
10022 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10023 * tests/regression.at (Web2c Actions): Adjust.
10024
12b0043a
AD
100252002-07-25 Akim Demaille <akim@epita.fr>
10026
10027 * src/gram.h (TIEM_NUMBER_MAX): New.
10028 (item_number_of_rule_number, rule_number_of_item_number): Rename
10029 as...
10030 (rule_number_as_item_number, item_number_as_rule_number): these.
10031 Adjust dependencies.
10032 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10033 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10034 (symbol_number_to_vector_number): New.
10035 (order): Of vector_number_t* type.
10036 (base_t, BASE_MAX, BASE_MIN): New.
10037 (froms, tos, width, pos, check): Of base_t type.
10038 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10039 (actrow): Of action_number_t type.
10040 (conflrow): Of unsigned int type.
10041 (table_ninf, base_ninf): New.
10042 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10043 (muscle_insert_int_table, muscle_insert_base_table)
10044 (muscle_insert_rule_number_table): New.
10045 (prepare_tokens): Output `toknum' as int_table.
10046 (action_row): Returns a rule_number_t.
10047 Use ACTION_MIN, not SHRT_MIN.
10048 (token_actions): yydefact is rule_number_t*.
10049 (table_ninf_remap): New.
10050 (pack_table): Use it for `base' and `table'.
10051 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10052 replaced with...
10053 (YYPACT_NINF, YYTABLE_NINF): these.
10054 (yypact, yytable): Compute their types instead of hard-coded
10055 `short'.
10056 * tests/regression.at (Web2c Actions): Adjust.
10057
5dde258a
AD
100582002-07-19 Akim Demaille <akim@epita.fr>
10059
10060 * src/scan-gram.l (id): Can start with an underscore.
10061
a945ec39
AD
100622002-07-16 Akim Demaille <akim@epita.fr>
10063
10064 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
10065 Adjust all former `associativity' dependencies.
10066 * src/symtab.c (symbol_new): Default associativity is `undef', not
10067 `right'.
10068 (symbol_check_alias_consistence): Adjust.
10069
fae437e8
AD
100702002-07-09 Akim Demaille <akim@epita.fr>
10071
10072 * doc/bison.texinfo: Properly set the ``header'' part.
10073 Use @dircategory ``GNU programming tools'' as per Texinfo's
10074 documentation.
10075 Use @copying.
10076
1a715ef2
AD
100772002-07-09 Akim Demaille <akim@epita.fr>
10078
10079 * lib/quotearg.h: Protect against multiple inclusions.
10080 * src/location.h (location_t): Add a `file' member.
10081 (LOCATION_RESET, LOCATION_PRINT): Adjust.
10082 * src/complain.c (warn_at, complain_at, fatal_at): Drop
10083 `error_one_per_line' support.
10084
a5d50994
AD
100852002-07-09 Akim Demaille <akim@epita.fr>
10086
10087 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
10088 * src/reader.c (lineno): Remove.
10089 Adjust all dependencies.
10090 (get_merge_function): Take a location and use complain_at.
10091 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
10092 * tests/regression.at (Invalid inputs, Mixing %token styles):
10093 Adjust.
10094
b275314e
AD
100952002-07-09 Akim Demaille <akim@epita.fr>
10096
10097 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
10098 recovery rule, and forbid extensions when --yacc.
10099 (gram_error): Use complain_at.
10100 * src/reader.c (reader): Exit if there were parse errors.
10101
865b9df1
AD
101022002-07-09 Akim Demaille <akim@epita.fr>
10103
10104 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
10105 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
10106 Reported by R Blake <blakers@mac.com>.
10107
c76e14da
AD
101082002-07-09 Akim Demaille <akim@epita.fr>
10109
10110 * data/yacc.c: Output the copyright notive in the header.
10111
7db2ed2d
AD
101122002-07-03 Akim Demaille <akim@epita.fr>
10113
10114 * src/output.c (froms, tos): Are state_number_t.
10115 (save_column): sp, sp1, and sp2 are state_number_t.
10116 (prepare): Rename `final' as `final_state_number', `nnts' as
10117 `nterms_number', `nrules' as `rules_number', `nstates' as
10118 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
10119 unused.
10120 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
10121 * data/lalr1.cc (nsym_): Remove, unused.
10122
e68e0410
AD
101232002-07-03 Akim Demaille <akim@epita.fr>
10124
10125 * src/lalr.h, src/lalr.c (goto_number_t): New.
10126 * src/lalr.c (goto_list_t): New.
10127 Propagate them.
10128 * src/nullable.c (rule_list_t): New.
10129 Propagate.
10130 * src/types.h: Remove.
10131
e1a4f3a4
AD
101322002-07-03 Akim Demaille <akim@epita.fr>
10133
10134 * src/closure.c (print_fderives): Use rule_rhs_print.
10135 * src/derives.c (print_derives): Use rule_rhs_print.
10136 (rule_list_t): New, replaces `shorts'.
10137 (set_derives): Add comments.
10138 * tests/sets.at (Nullable, Firsts): Adjust.
10139
536545f3
AD
101402002-07-03 Akim Demaille <akim@epita.fr>
10141
10142 * src/output.c (prepare_actions): Free `tally' and `width'.
10143 (prepare_actions): Allocate and free `order'.
10144 * src/symtab.c (symbols_free): Free `symbols'.
10145 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
10146 * src/output.c (m4_invoke): Move to...
10147 * src/scan-skel.l: here.
10148 (<<EOF>>): Close yyout, and free its name.
10149
8b752b00
AD
101502002-07-03 Akim Demaille <akim@epita.fr>
10151
10152 Fix some memory leaks, and fix a bug: state 0 was examined twice.
10153
10154 * src/LR0.c (new_state): Merge into...
10155 (state_list_append): this.
10156 (new_states): Merge into...
10157 (generate_states): here.
10158 (set_states): Don't ensure a proper `errs' state member here, do it...
10159 * src/conflicts.c (conflicts_solve): here.
10160 * src/state.h, src/state.c: Comment changes.
10161 (state_t): Rename member `shifts' as `transitions'.
10162 Adjust all dependencies.
10163 (errs_new): For consistency, also take the values as argument.
10164 (errs_dup): Remove.
10165 (state_errs_set): New.
10166 (state_reductions_set, state_transitions_set): Assert that no
10167 previous value was assigned.
10168 (state_free): New.
10169 (states_free): Use it.
10170 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
10171 temporary storage: use `errs' and `nerrs' as elsewhere.
10172 (set_conflicts): Allocate and free this `errs'.
10173
613f5e1a
AD
101742002-07-02 Akim Demaille <akim@epita.fr>
10175
10176 * lib/libiberty.h: New.
10177 * lib: Update the bitset implementation from upstream.
10178 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
10179 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
10180 * src/main.c: Adjust bitset stats calls.
10181
26e0cadc
PE
101822002-07-01 Paul Eggert <eggert@twinsun.com>
10183
10184 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
10185 char, so that negative chars don't collide with $.
10186
1154cced
AD
101872002-06-30 Akim Demaille <akim@epita.fr>
10188
10189 Have the GLR tests be `warning' checked, and fix the warnings.
10190
10191 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
10192 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
10193 (yyremoveDeletes): `yyi' and `yyj' are size_t.
10194 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
10195 (yyaddDeferredAction): static.
10196 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
10197 (yyreportParseError): yyprefix is const.
10198 yytokenp is used only when verbose.
10199 (yy__GNUC__): Replace with __GNUC__.
10200 (yypdumpstack): yyi is size_t.
10201 (yypreference): Un-yy local variables and arguments, to avoid
10202 clashes with `yyr1'. Anyway, we are not in the user name space.
10203 (yytname_size): be an int, as is compared with ints.
10204 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
10205 Use them.
10206 * tests/cxx-gram.at: Use quotation to protect $1.
10207 Use AT_COMPILE to enable warnings hunts.
10208 Prototype yylex and yyerror.
10209 `Use' argc.
10210 Include `string.h', not `strings.h'.
10211 Produce and prototype stmtMerge only when used.
10212 yylex takes a location.
10213
97650f4e
AD
102142002-06-30 Akim Demaille <akim@epita.fr>
10215
10216 We spend a lot of time in quotearg, in particular when --verbose.
10217
10218 * src/symtab.c (symbol_get): Store a quoted version of the key.
10219 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
10220 Adjust all callers.
10221
d2576365
AD
102222002-06-30 Akim Demaille <akim@epita.fr>
10223
10224 * src/state.h (reductions_t): Rename member `nreds' as num.
10225 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10226 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10227
ccaf65bc
AD
102282002-06-30 Akim Demaille <akim@epita.fr>
10229
10230 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10231 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10232 (shifts_to): Rename as...
10233 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10234 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10235 (TRANSITION_IS_DISABLED, transitions_to): these.
10236
87675353
AD
102372002-06-30 Akim Demaille <akim@epita.fr>
10238
10239 * src/print.c (print_shifts, print_gotos): Merge into...
10240 (print_transitions): this.
10241 (print_transitions, print_errs, print_reductions): Align the
10242 lookaheads columns.
10243 (print_core, print_transitions, print_errs, print_state,
10244 print_grammar): Output empty lines separator before, not after.
10245 (state_default_rule_compute): Rename as...
10246 (state_default_rule): this.
10247 * tests/conflicts.at (Defaulted Conflicted Reduction),
10248 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10249 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10250
ce4ccb4b
AD
102512002-06-30 Akim Demaille <akim@epita.fr>
10252
10253 Display items as we display rules.
10254
10255 * src/gram.h, src/gram.c (rule_lhs_print): New.
10256 * src/gram.c (grammar_rules_partial_print): Use it.
10257 * src/print.c (print_core): Likewise.
10258 * tests/conflicts.at (Defaulted Conflicted Reduction),
10259 (Unresolved SR Conflicts): Adjust.
10260 (Unresolved SR Conflicts): Adjust and rename as...
10261 (Resolved SR Conflicts): this, as was meant.
10262 * tests/regression.at (Web2c Report): Adjust.
10263
bc933ef1
AD
102642002-06-30 Akim Demaille <akim@epita.fr>
10265
10266 * src/print.c (state_default_rule_compute): New, extracted from...
10267 (print_reductions): here.
10268 Pessimize, but clarify the code.
10269 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10270
53d4308d
AD
102712002-06-30 Akim Demaille <akim@epita.fr>
10272
10273 * src/output.c (action_row): Let default_rule be always a rule
10274 number.
10275
574fb2d5
AD
102762002-06-30 Akim Demaille <akim@epita.fr>
10277
10278 * src/closure.c (print_firsts, print_fderives, closure):
10279 Use BITSET_EXECUTE.
10280 * src/lalr.c (lookaheads_print): Likewise.
10281 * src/state.c (state_rule_lookaheads_print): Likewise.
10282 * src/print_graph.c (print_core): Likewise.
10283 * src/print.c (print_reductions): Likewise.
10284 * src/output.c (action_row): Likewise.
10285 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10286
05811fd7
AD
102872002-06-30 Akim Demaille <akim@epita.fr>
10288
10289 * src/print_graph.c: Use report_flag.
10290
0e4d5753
AD
102912002-06-30 Akim Demaille <akim@epita.fr>
10292
10293 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10294 to...
10295 * src/relation.h, src/relation.c (traverse, relation_digraph)
10296 (relation_print, relation_transpose): New.
10297
24c7d800
AD
102982002-06-30 Akim Demaille <akim@epita.fr>
10299
10300 * src/state.h, src/state.c (shifts_to): New.
10301 * src/lalr.c (build_relations): Use it.
10302
9222837b
AD
103032002-06-30 Akim Demaille <akim@epita.fr>
10304
10305 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10306 (item_number_of_rule_number, rule_number_of_item_number): New.
10307 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10308 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10309 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10310 Propagate their use.
10311 Much remains to be done, in particular wrt `shorts' from types.h.
10312
260008e5
AD
103132002-06-30 Akim Demaille <akim@epita.fr>
10314
10315 * src/symtab.c (symbol_new): Initialize the `printer' member.
10316
8a731ca8
AD
103172002-06-30 Akim Demaille <akim@epita.fr>
10318
10319 * src/LR0.c (save_reductions): Remove, replaced by...
10320 * src/state.h, src/state.c (state_reductions_set): New.
10321 (reductions, errs): Rename as...
10322 (reductions_t, errs_t): these.
10323 Adjust all dependencies.
10324
32e1e0a4
AD
103252002-06-30 Akim Demaille <akim@epita.fr>
10326
10327 * src/LR0.c (state_list_t, state_list_append): New.
10328 (first_state, last_state): Now symbol_list_t.
10329 (this_state): Remove.
10330 (new_itemsets, append_states, save_reductions): Take a state_t as
10331 argument.
10332 (set_states, generate_states): Adjust.
10333 (save_shifts): Remove, replaced by...
10334 * src/state.h, src/state.c (state_shifts_set): New.
10335 (shifts): Rename as...
10336 (shifts_t): this.
10337 Adjust all dependencies.
10338 * src/state.h (state_t): Remove the `next' member.
10339
e5fb6710
AD
103402002-06-30 Akim Demaille <akim@epita.fr>
10341
10342 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10343 escaped in slot 0.
10344
c7ca99d4
AD
103452002-06-30 Akim Demaille <akim@epita.fr>
10346
10347 Use hash.h for the state hash table.
10348
10349 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10350 (allocate_storage): Use state_hash_new.
10351 (free_storage): Use state_hash_free.
10352 (new_state, get_state): Adjust.
10353 * src/lalr.h, src/lalr.c (states): Move to...
10354 * src/states.h (state_t): Remove the `link' member, no longer
10355 used.
10356 * src/states.h, src/states.c: here.
10357 (state_hash_new, state_hash_free, state_hash_lookup)
10358 (state_hash_insert, states_free): New.
10359 * src/states.c (state_table, state_compare, state_hash): New.
10360 * src/output.c (output_actions): Do not free states now, since we
10361 still need to know the final_state number in `prepare', called
10362 afterwards. Do it...
10363 * src/main.c (main): here: call states_free after `output'.
10364
df0e7316
AD
103652002-06-30 Akim Demaille <akim@epita.fr>
10366
10367 * src/state.h, src/state.c (state_new): New, extracted from...
10368 * src/LR0.c (new_state): here.
10369 * src/state.h (STATE_ALLOC): Move to...
10370 * src/state.c: here.
10371 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10372 * src/state.h, src/state.c: here.
10373
39f41916
AD
103742002-06-30 Akim Demaille <akim@epita.fr>
10375
10376 * src/reader.c (gensym): Rename as...
10377 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10378 (getsym): Rename as...
10379 (symbol_get): this.
10380
d57650a5
AD
103812002-06-30 Akim Demaille <akim@epita.fr>
10382
10383 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10384 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10385 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10386 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10387
5a08f1ce
AD
103882002-06-30 Akim Demaille <akim@epita.fr>
10389
10390 Make the test suite pass with warnings checked.
10391
10392 * tests/actions.at (Printers and Destructors): Improve.
10393 Avoid unsigned vs. signed issues.
10394 * tests/calc.at: Don't exercise the scanner here, do it...
10395 * tests/input.at (Torturing the Scanner): here.
10396
720623af
PH
103972002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10398
88e7e941 10399 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
10400 reorganize first lines parallel to yacc.c.
10401
fb8135fa
AD
104022002-06-28 Akim Demaille <akim@epita.fr>
10403
10404 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10405 (b4_token_enum, b4_token_defines): New, factored from...
10406 * data/lalr1.cc, data/yacc.c, glr.c: here.
10407
41442480
AD
104082002-06-28 Akim Demaille <akim@epita.fr>
10409
10410 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10411 unused variables.
10412 * src/output.c (merger_output): static.
10413
e0e5bf84
AD
104142002-06-28 Akim Demaille <akim@epita.fr>
10415
ba0fe3c7 10416 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
10417 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10418 pacify GCC.
10419 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 10420
676385e2
PH
104212002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10422
10423 Accumulated changelog for new GLR parsing features.
10424
6a254321 10425 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
10426 conflicts_total_count.
10427 * src/conflicts.h: Ditto.
10428 * src/output.c (token_actions): Use the new name.
10429 (output_conflicts): Change conflp => conflict_list_heads, and
10430 confl => conflict_list for better readability.
10431 * data/glr.c: Use the new names.
10432 * NEWS: Add self to GLR announcement.
e0e5bf84 10433
676385e2
PH
10434 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10435
10436 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10437 Akim Demaille.
10438
10439 * data/bison.glr: Change name to glr.c
10440 * data/glr.c: Renamed from bison.glr.
10441 * data/Makefile.am: Add glr.c
e0e5bf84
AD
10442
10443 * src/getargs.c:
10444
676385e2 10445 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 10446 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 10447
676385e2
PH
10448 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10449
10450 * data/bison.glr: Be sure to restore the
10451 current #line when returning to the skeleton contents after having
10452 exposed the input file's #line.
10453
10454 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10455
10456 * data/bison.glr: Bring up to date with changes to bison.simple.
10457
10458 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10459
10460 * data/bison.glr: Correct definitions that use b4_prefix.
10461 Various reformatting.
10462 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10463 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10464 yytokenp argument; now part of stack.
10465 (yychar): Define to behave as documented.
10466 (yyclearin): Ditto.
e0e5bf84 10467
676385e2
PH
10468 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10469
10470 * src/reader.h: Add declaration for free_merger_functions.
10471
10472 * src/reader.c (merge_functions): New variable.
10473 (get_merge_function): New function.
10474 (free_merger_functions): New function.
10475 (readgram): Check for %prec that is not followed by a symbol.
10476 Handle %dprec and %merge declarations.
10477 (packgram): Initialize dprec and merger fields in rules array.
10478
10479 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10480 conflict_list_cnt, conflict_list_free): New variables.
10481 (table_grow): Also grow conflict_table.
e0e5bf84 10482 (prepare_rules): Output dprec and merger tables.
676385e2 10483 (conflict_row): New function.
e0e5bf84 10484 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
10485 default reduction in conflicted states for GLR parser so that there
10486 are spaces for the conflict lists.
10487 (save_row): Also save conflict information.
10488 (token_actions): Allocate conflict list.
10489 (merger_output): New function.
10490 (pack_vector): Pack conflict table, too.
10491 (output_conflicts): New function to output yyconflp and yyconfl.
10492 (output_check): Allocate conflict_tos.
10493 (output_actions): Output conflict tables, also.
10494 (output_skeleton): Output b4_mergers definition.
10495 (prepare): Output b4_max_rhs_length definition.
10496 Use 'bison.glr' as default skeleton for GLR parsers.
10497
10498 * src/gram.c (glr_parser): New flag.
10499 (grammar_free): Call free_merger_functions.
10500
10501 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10502 all pairs of conflicting reductions, rather than just all tokens
10503 causing conflicts. Needed to size conflict tables.
e0e5bf84 10504 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
10505 interface.
10506 (conflicts_print): Ditto.
10507 (count_total_conflicts): New function.
10508
10509 * src/reader.h (merger_list): New type.
10510 (merge_functions): New variable.
10511
10512 * src/lex.h (tok_dprec, tok_merge): New token types.
10513
10514 * src/gram.h (rule_s): Add dprec and merger fields.
10515 (glr_parser): New flag.
10516
10517 * src/conflicts.h (count_total_conflicts): New function.
10518
10519 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10520
10521 * doc/bison.texinfo (Generalized LR Parsing): New section.
10522 (GLR Parsers): New section.
10523 (Language and Grammar): Mention GLR parsing.
10524 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10525 Correct typo ("tge" -> "the").
10526
10527 * data/bison.glr: New skeleton for GLR parsing.
10528
10529 * tests/cxx-gram.at: New tests for GLR parsing.
10530
10531 * tests/testsuite.at: Include cxx-gram.at.
10532
10533 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 10534
676385e2
PH
10535 * src/parse-gram.y:
10536
10537 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10538
10539 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 10540
b5480d74 105412002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
10542
10543 * src/options.h, src/options.c: Remove.
10544 * src/getargs.c (short_options, long_options): New.
10545
60491a94
AD
105462002-06-27 Akim Demaille <akim@epita.fr>
10547
10548 * data/bison.simple, data/bison.c++: Rename as...
10549 * data/yacc.c, data/lalr1.cc: these.
10550 * doc/bison.texinfo (Environment Variables): Remove.
10551
9be0c25b
AD
105522002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10553
10554 * src/getargs.c (report_argmatch): Initialize strtok().
10555
1ae72863
AD
105562002-06-20 Akim Demaille <akim@epita.fr>
10557
10558 * data/bison.simple (b4_symbol_actions): New, replaces...
10559 (b4_symbol_destructor, b4_symbol_printer): these.
10560 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10561 user token numbers.
10562
87542d29
AD
105632002-06-20 Akim Demaille <akim@epita.fr>
10564
10565 * data/bison.simple (yydestructor): Rename as...
10566 (yydestruct): this.
10567
1a31ed21
AD
105682002-06-20 Akim Demaille <akim@epita.fr>
10569
10570 * src/symtab.h, src/symtab.c (symbol_type_set)
10571 (symbol_destructor_set, symbol_precedence_set): The location is
10572 the last argument.
10573 Adjust all callers.
10574
e776192e
AD
105752002-06-20 Akim Demaille <akim@epita.fr>
10576
10577 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10578 internals.
10579 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10580 Takes a location.
10581 * src/symtab.h, src/symtab.c (symbol_class_set)
10582 (symbol_user_token_number_set): Likewise.
10583 Adjust all callers.
10584 Promote complain_at.
10585 * tests/input.at (Type Clashes): Adjust.
10586
5c1180b3
AD
105872002-06-20 Akim Demaille <akim@epita.fr>
10588
10589 * data/bison.simple (YYLEX): Fix the declaration when
10590 %pure-parser.
10591
e3170060
AD
105922002-06-20 Akim Demaille <akim@epita.fr>
10593
10594 * data/bison.simple (yysymprint): Don't print the token number,
10595 just its name.
10596 * tests/actions.at (Destructors): Rename as...
10597 (Printers and Destructors): this.
10598 Also exercise %printer.
10599
253862fd
AD
106002002-06-20 Akim Demaille <akim@epita.fr>
10601
10602 * data/bison.simple (YYDSYMPRINT): New.
10603 Use it to remove many of the #if YYDEBUG/if (yydebug).
10604
366eea36
AD
106052002-06-20 Akim Demaille <akim@epita.fr>
10606
10607 * src/symtab.h, src/symtab.c (symbol_t): printer and
10608 printer_location are new members.
10609 (symbol_printer_set): New.
10610 * src/parse-gram.y (PERCENT_PRINTER): New token.
10611 Handle its associated rule.
10612 * src/scan-gram.l: Adjust.
10613 (handle_destructor_at, handle_destructor_dollar): Rename as...
10614 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10615 * src/output.c (symbol_printers_output): New.
10616 (output_skeleton): Call it.
10617 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10618 since there are already many grammar files with a user `yyprint'.
10619 Replace the calls to YYPRINT to calls to yysymprint.
10620 * tests/calc.at: Adjust.
10621 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10622 taking advantage of parser very internal details (stack size!).
10623
4f25ebb0
AD
106242002-06-20 Akim Demaille <akim@epita.fr>
10625
10626 * src/scan-gram.l: Complete the scanner with the missing patterns
10627 to pacify Flex.
10628 Use `quote' and `symbol_tag_get' where appropriate.
10629
93b68a0e
AD
106302002-06-19 Akim Demaille <akim@epita.fr>
10631
10632 * tests/actions.at (Destructors): Augment to test locations.
10633 * data/bison.simple (yydestructor): Pass it the current location
10634 if locations are enabled.
10635 Prototype only when __STDC__ or C++.
10636 Change the argument names to move into the yy name space: there is
10637 user code here.
10638
58612f1d
AD
106392002-06-19 Akim Demaille <akim@epita.fr>
10640
74310291
AD
10641 * data/bison.simple (b4_pure_if): New.
10642 Use it instead of #ifdef YYPURE.
10643
106442002-06-19 Akim Demaille <akim@epita.fr>
10645
10646 * data/bison.simple (b4_location_if): New.
58612f1d
AD
10647 Use it instead of #ifdef YYLSP_NEEDED.
10648
f25bfb75
AD
106492002-06-19 Akim Demaille <akim@epita.fr>
10650
10651 Prepare @$ in %destructor, but currently don't bind it in the
10652 skeleton, as %location use is not cleaned up yet.
10653
10654 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10655 (handle_action_at): New.
10656 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10657 a braced_code_t and a location as additional arguments.
10658 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10659 unquote one when outputting `b4_dollar_dollar'.
10660 Adjust callers.
10661 * data/bison.simple (b4_eval): Remove.
10662 (b4_symbol_destructor): Adjust.
10663 * tests/input.at (Invalid @n): Adjust.
10664
c732d2c6
AD
106652002-06-19 Zack Weinberg <zack@codesourcery.com>
10666
10667 * doc/bison.texinfo: Document ability to have multiple
10668 prologue sections.
10669
8c165d89
AD
106702002-06-18 Akim Demaille <akim@epita.fr>
10671
10672 * src/files.c (compute_base_names): When computing the output file
10673 names from the input file name, strip the directory part.
10674
ca98bf57
AD
106752002-06-18 Akim Demaille <akim@epita.fr>
10676
10677 * data/bison.simple.new: Comment changes.
10678 Reported by Andreas Schwab.
10679
0bfb02ff
AD
106802002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10681
10682 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10683 there are no `label `yyoverflowlab' defined but not used' warnings
10684 when yyoverflow is defined.
10685
24c0aad7
AD
106862002-06-18 Akim Demaille <akim@epita.fr>
10687
10688 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10689 new member.
10690 (symbol_destructor_set): Adjust.
10691 * src/output.c (symbol_destructors_output): Output the destructor
10692 locations.
10693 Output the symbol name.
10694 * data/bison.simple (b4_symbol_destructor): Adjust.
10695
5719c109
AD
106962002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10697 and Akim Demaille <akim@epita.fr>
10698
10699 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10700 what's left on the stack when the error recovery hits EOF.
10701 * tests/actions.at (Destructors): Complete to exercise this case.
10702
9280d3ef
AD
107032002-06-17 Akim Demaille <akim@epita.fr>
10704
10705 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10706 arguments is really empty, not only equal to `[]'.
10707 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10708 member.
10709 (symbol_destructor_set): New.
10710 * src/output.c (symbol_destructors_output): New.
10711 * src/reader.h (brace_code_t, current_braced_code): New.
10712 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10713 (handle_dollar): Rename as...
10714 (handle_action_dollar): this.
10715 (handle_destructor_dollar): New.
10716 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10717 (grammar_declaration): Use it.
10718 * data/bison.simple (yystos): Is always defined.
10719 (yydestructor): New.
10720 * tests/actions.at (Destructors): New.
10721 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10722
dafdc66f
AD
107232002-06-17 Akim Demaille <akim@epita.fr>
10724
10725 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10726 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10727 rule_length only when needed.
10728 * src/output.c (actions_output, token_definitions_output): Output
10729 the full M4 block.
10730 * src/symtab.c: Don't access directly to the symbol tag, use
10731 symbol_tag_get.
10732 * src/parse-gram.y: Use symbol_list_free.
10733
56c47203
AD
107342002-06-17 Akim Demaille <akim@epita.fr>
10735
10736 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10737 (symbol_list_prepend, get_type_name): Move to...
10738 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10739 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10740 Adjust all callers.
10741 (symbol_list_free): New.
10742 * src/scan-gram.l (handle_dollar): Takes a location.
10743 * tests/input.at (Invalid $n): Adjust.
10744
1e0bab92
AD
107452002-06-17 Akim Demaille <akim@epita.fr>
10746
10747 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10748 (symbol_list_prepend): New.
10749 * src/parse-gram.y (%union): `list' is a new member.
10750 (symbols.1): New, replaces...
10751 (terms_to_prec.1, nterms_to_type.1): these.
10752 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10753 Take a location as additional argument.
10754 Adjust all callers.
10755
04e60654
AD
107562002-06-15 Akim Demaille <akim@epita.fr>
10757
10758 * src/parse-gram.y: Move %token in the declaration section so that
10759 we don't depend upon CVS Bison.
10760
10e5b8bd
AD
107612002-06-15 Akim Demaille <akim@epita.fr>
10762
10763 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10764 * src/print.c (print_core): Use it.
10765
9801d40c
AD
107662002-06-15 Akim Demaille <akim@epita.fr>
10767
10768 * src/conflicts.c (log_resolution): Accept the rule involved in
10769 the sr conflicts instead of the lookahead number that points to
10770 that rule.
10771 (flush_reduce): Accept the current lookahead vector as argument,
10772 instead of the index in LA.
10773 (resolve_sr_conflict): Accept the current number of lookahead
10774 bitset to consider for the STATE, instead of the index in LA.
10775 (set_conflicts): Adjust.
10776 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10777
c0263492
AD
107782002-06-15 Akim Demaille <akim@epita.fr>
10779
10780 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10781 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10782 Adjust all dependencies.
10783 * src/lalr.c (initialize_lookaheads): Split into...
10784 (states_lookaheads_count, states_lookaheads_initialize): these.
10785 (lalr): Adjust.
10786
9757c359
AD
107872002-06-15 Akim Demaille <akim@epita.fr>
10788
10789 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10790 out of...
10791 (grammar_rules_print): here.
10792 * src/reduce.c (reduce_output): Use it.
10793 * tests/reduce.at (Useless Rules, Reduced Automaton)
10794 (Underivable Rules): Adjust.
10795
6b98e4b5
AD
107962002-06-15 Akim Demaille <akim@epita.fr>
10797
10798 Copy BYacc's nice way to report the grammar.
10799
10800 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10801 New.
10802 Don't print the rules' location, it is confusing and useless.
10803 (rule_print): Use grammar_rhs_print.
10804 * src/print.c (print_grammar): Use grammar_rules_print.
10805
6b98e4b5
AD
108062002-06-15 Akim Demaille <akim@epita.fr>
10807
10808 Complete and rationalize `useless thing' warnings.
10809
10810 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10811 (symbol_tag_print): New.
10812 Use them everywhere in place of accessing directly the tag member.
10813 * src/gram.h, src/gram.c (rule_print): New.
10814 Use it where a rule used to be printed `by hand'.
10815 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10816 (reduce_grammar_tables): Report the useless rules.
10817 (reduce_print): Useless things are a warning, not an error.
10818 Report it as such.
10819 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10820 (Reduced Automaton, Underivable Rules): Adjust.
10821 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10822 * tests/conflicts.at (Unresolved SR Conflicts)
10823 (Solved SR Conflicts): Adjust.
10824
ee000ba4
AD
108252002-06-15 Akim Demaille <akim@epita.fr>
10826
10827 Let symbols have a location.
10828
10829 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10830 (getsym): Adjust.
10831 Adjust all callers.
10832 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10833 Use location_t, not int.
10834 * src/symtab.c (symbol_check_defined): Take advantage of the
10835 location.
10836 * tests/regression.at (Invalid inputs): Adjust.
10837
8efe435c
AD
108382002-06-15 Akim Demaille <akim@epita.fr>
10839
10840 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10841 (input): Don't try to initialize yylloc here, do it in the
10842 scanner.
10843 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10844 * src/gram.h (rule_t): Change line and action_line into location
10845 and action_location, of location_t type.
10846 Adjust all dependencies.
10847 * src/location.h, src/location.c (empty_location): New.
10848 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10849 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10850 (grammar_current_rule_symbol_append)
10851 (grammar_current_rule_action_append): Expect a location as argument.
10852 * src/reader.c (grammar_midrule_action): Adjust to attach an
10853 action's location as dummy symbol location.
10854 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10855 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10856 the line numbers.
10857
1921f1d7
AD
108582002-06-14 Akim Demaille <akim@epita.fr>
10859
10860 Grammar declarations may be found in the grammar section.
10861
10862 * src/parse-gram.y (rules_or_grammar_declaration): New.
10863 (declarations): Each declaration may end with a semicolon, not
10864 just...
10865 (grammar_declaration): `"%union"'.
10866 (grammar): Branch to rules_or_grammar_declaration.
10867
4515534c
AD
108682002-06-14 Akim Demaille <akim@epita.fr>
10869
10870 * src/main.c (main): Invoke scanner_free.
10871
f958596b
AD
108722002-06-14 Akim Demaille <akim@epita.fr>
10873
10874 * src/output.c (m4_invoke): Extracted from...
10875 (output_skeleton): here.
10876 Free tempfile.
10877
2c569025
AD
108782002-06-14 Akim Demaille <akim@epita.fr>
10879
10880 * src/parse-gram.y (directives, directive, gram)
10881 (grammar_directives, precedence_directives, precedence_directive):
10882 Rename as...
10883 (declarations, declaration, grammar, grammar_declaration)
10884 (precedence_declaration, precedence_declarator): these.
10885 (symbol_declaration): New.
10886
592e8d4d
AD
108872002-06-14 Akim Demaille <akim@epita.fr>
10888
10889 * src/files.c (action_obstack): Remove, unused.
10890 (output_obstack): Remove it, and all its dependencies, as it is no
10891 longer needed.
10892 * src/reader.c (epilogue_set): Build the epilogue in the
10893 muscle_obstack.
10894 * src/output.h, src/output.c (muscle_obstack): Move to...
10895 * src/muscle_tab.h, src/muscle_tab.h: here.
10896 (muscle_init): Initialize muscle_obstack.
10897 (muscle_free): New.
10898 * src/main.c (main): Call it.
10899
0c15323d
AD
109002002-06-14 Akim Demaille <akim@epita.fr>
10901
10902 * src/location.h: New, extracted from...
10903 * src/reader.h: here.
10904 * src/Makefile.am (noinst_HEADERS): Merge into
10905 (bison_SOURCES): this.
10906 Add location.h.
10907 * src/parse-gram.y: Use location_t instead of Bison's.
10908 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10909 Use location_t instead of ints.
10910
e96c9728
AD
109112002-06-14 Akim Demaille <akim@epita.fr>
10912
10913 * data/bison.simple, data/bison.c++: Be sure to restore the
10914 current #line when returning to the skeleton contents after having
10915 exposed the input file's #line.
10916
75d1fe16
AD
109172002-06-12 Akim Demaille <akim@epita.fr>
10918
10919 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10920 eager.
10921 * tests/actions.at (Exotic Dollars): New.
10922
6c35d22c
AD
109232002-06-12 Akim Demaille <akim@epita.fr>
10924
10925 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10926 ['"/] too eagerly.
10927 * tests/input.at (Torturing the Scanner): New.
10928
1d6412ad
AD
109292002-06-11 Akim Demaille <akim@epita.fr>
10930
10931 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10932 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10933 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10934 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10935 * src/reader.c (reader): Use it.
10936
4cdb01db
AD
109372002-06-11 Akim Demaille <akim@epita.fr>
10938
10939 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10940 Adjust all callers.
10941 (scanner_last_string_free): New.
10942
44995b2e
AD
109432002-06-11 Akim Demaille <akim@epita.fr>
10944
10945 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10946 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10947 (last_string, YY_OBS_FREE): New.
10948 Use them when returning an ID.
10949
e9955c83
AD
109502002-06-11 Akim Demaille <akim@epita.fr>
10951
10952 Have Bison grammars parsed by a Bison grammar.
10953
10954 * src/reader.c, src/reader.h (prologue_augment): New.
10955 * src/reader.c (copy_definition): Remove.
10956
10957 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10958 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10959 (grammar_current_rule_prec_set, grammar_current_rule_check)
10960 (grammar_current_rule_symbol_append)
10961 (grammar_current_rule_action_append): Export.
10962 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10963 (symbol_list_action_append): Remove.
10964 Hook the routines from reader.
10965 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10966 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10967
10968 * src/reader.c (read_declarations): Remove, unused.
10969
10970 * src/parse-gram.y: Handle the epilogue.
10971 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10972 (grammar_start_symbol_set): this.
10973 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10974 * src/reader.c (readgram): Remove, unused.
10975 (reader): Adjust to insert eoftoken and axiom where appropriate.
10976
10977 * src/reader.c (copy_dollar): Replace with...
10978 * src/scan-gram.h (handle_dollar): this.
10979 * src/parse-gram.y: Remove `%thong'.
10980
10981 * src/reader.c (copy_at): Replace with...
10982 * src/scan-gram.h (handle_at): this.
10983
10984 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10985 New.
10986
10987 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10988 time being.
10989
10990 * src/reader.h, src/reader.c (grammar_rule_end): New.
10991
10992 * src/parse.y (current_type, current_class): New.
10993 Implement `%nterm', `%token' support.
10994 Merge `%term' into `%token'.
10995 (string_as_id): New.
10996 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10997 type name.
10998
10999 * src/parse-gram.y: Be sure to handle properly the beginning of
11000 rules.
11001
11002 * src/parse-gram.y: Handle %type.
11003 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11004
11005 * src/parse-gram.y: More directives support.
11006 * src/options.c: No longer handle source directives.
11007
11008 * src/parse-gram.y: Fix %output.
11009
11010 * src/parse-gram.y: Handle %union.
11011 Use the prologue locations.
11012 * src/reader.c (parse_union_decl): Remove.
11013
11014 * src/reader.h, src/reader.c (epilogue_set): New.
11015 * src/parse-gram.y: Use it.
11016
11017 * data/bison.simple, data/bison.c++: b4_stype is now either not
11018 defined, then default to int, or to the contents of %union,
11019 without `union' itself.
11020 Adjust.
11021 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11022
11023 * src/output.c (actions_output): Don't output braces, as they are
11024 already handled by the scanner.
11025
11026 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11027 characters to themselves.
11028
11029 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11030 that the epilogue has a proper #line.
11031
11032 * src/parse-gram.y: Handle precedence/associativity.
11033
11034 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11035 a terminal.
11036 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11037 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11038 at all to define terminals that cannot be emitted.
11039
11040 * src/scan-gram.l: Escape M4 characters.
11041
11042 * src/scan-gram.l: Working properly with escapes in user
11043 strings/characters.
11044
11045 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11046 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11047 grammar.
11048 Use more modest sizes, as for the time being the parser does not
11049 release memory, and therefore the process swallows a huge amount
11050 of memory.
11051
11052 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11053 stricter %token grammar.
11054
11055 * src/symtab.h (associativity): Add `undef_assoc'.
11056 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11057 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11058
11059 * tests/regression.at (Invalid %directive): Remove, as it is now
11060 meaningless.
11061 (Invalid inputs): Adjust to the new error messages.
11062 (Token definitions): The new grammar doesn't allow too many
11063 eccentricities.
11064
11065 * src/lex.h, src/lex.c: Remove.
11066 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
11067 (copy_character, copy_string2, copy_string, copy_identifier)
11068 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
11069 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
11070 (parse_action): Remove.
11071 * po/POTFILES.in: Adjust.
11072
2e047461
AD
110732002-06-11 Akim Demaille <akim@epita.fr>
11074
cd05d13c 11075 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
11076 rule's action member: return the action as a string.
11077 Don't require `rule_length' as an argument: compute it.
11078 (grammar_current_rule_symbol_append)
11079 (grammar_current_rule_action_append): New, eved out from
11080 (readgram): here.
11081 Remove `action_flag', `rulelength', unused now.
11082
9af3fbce
AD
110832002-06-11 Akim Demaille <akim@epita.fr>
11084
11085 * src/reader.c (grammar_current_rule_prec_set).
11086 (grammar_current_rule_check): New, eved out from...
11087 (readgram): here.
11088 Remove `xaction', `first_rhs': useless.
11089 * tests/input.at (Type clashes): New.
11090 * tests/existing.at (GNU Cim Grammar): Adjust.
11091
1485e106
AD
110922002-06-11 Akim Demaille <akim@epita.fr>
11093
11094 * src/reader.c (grammar_midrule_action): New, Eved out from
11095 (readgram): here.
11096
da4160c3
AD
110972002-06-11 Akim Demaille <akim@epita.fr>
11098
11099 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
11100 New.
11101 (readgram): Use them as replacement of inlined code, crule and
11102 crule1.
11103
f6d0f937
AD
111042002-06-11 Akim Demaille <akim@epita.fr>
11105
11106 * src/reader.c (grammar_end, grammar_symbol_append): New.
11107 (readgram): Use them.
11108 Make the use of `p' as local as possible.
11109
69078d4b
AD
111102002-06-10 Akim Demaille <akim@epita.fr>
11111
11112 GCJ's parser requires the tokens to be defined before the prologue.
11113
11114 * data/bison.simple: Output the token definition before the user's
11115 prologue.
11116 * tests/regression.at (Braces parsing, Duplicate string)
11117 (Mixing %token styles): Check the output from bison.
11118 (Early token definitions): New.
11119
5e424082
AD
111202002-06-10 Akim Demaille <akim@epita.fr>
11121
11122 * src/symtab.c (symbol_user_token_number_set): Don't complain when
11123 assigning twice the same user number to a token, so that we can
11124 use it in...
11125 * src/lex.c (lex): here.
11126 Also use `symbol_class_set' instead of hand written code.
11127 * src/reader.c (parse_assoc_decl): Likewise.
11128
44536b35
AD
111292002-06-10 Akim Demaille <akim@epita.fr>
11130
11131 * src/symtab.c, src/symtab.c (symbol_class_set)
11132 (symbol_user_token_number_set): New.
11133 * src/reader.c (parse_token_decl): Use them.
11134 Use a switch instead of ifs.
11135 Use a single argument.
11136
8b9f2372
AD
111372002-06-10 Akim Demaille <akim@epita.fr>
11138
11139 Remove `%thong' support as it is undocumented, unused, duplicates
11140 `%token's job, and creates useless e-mail traffic with people who
11141 want to know what it is, why it is undocumented, unused, and
11142 duplicates `%token's job.
11143
11144 * src/reader.c (parse_thong_decl): Remove.
11145 * src/options.c (option_table): Remove "thong".
11146 * src/lex.h (tok_thong): Remove.
11147
3ae2b51f
AD
111482002-06-10 Akim Demaille <akim@epita.fr>
11149
11150 * src/symtab.c, src/symtab.c (symbol_type_set)
11151 (symbol_precedence_set): New.
11152 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
11153 (value_components_used): Remove, unused.
11154
2f1afb73
AD
111552002-06-09 Akim Demaille <akim@epita.fr>
11156
11157 Move symbols handling code out of the reader.
11158
11159 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
11160 (axiom): Move to...
11161 * src/symtab.h, src/symtab.c: here.
11162
11163 * src/gram.c (start_symbol): Remove: use startsymbol->number.
11164 * src/reader.c (startval): Rename as...
11165 * src/symtab.h, src/symtab.c (startsymbol): this.
11166 * src/reader.c: Adjust.
11167
11168 * src/reader.c (symbol_check_defined, symbol_make_alias)
11169 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11170 (token_translations_init)
11171 Move to...
11172 * src/symtab.c: here.
11173 * src/reader.c (packsymbols): Move to...
11174 * src/symtab.h, src/symtab.c (symbols_pack): here.
11175 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
11176 argument.
11177
e9bca3ad
AD
111782002-06-03 Akim Demaille <akim@epita.fr>
11179
11180 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
11181 then statements.
11182
86eff183
AD
111832002-06-03 Akim Demaille <akim@epita.fr>
11184
11185 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
11186 structs with non literals.
11187 * src/scan-skel.l: never-interactive.
11188 * src/conflicts.c (enum conflict_resolution_e): No trailing
11189 comma.
11190 * src/getargs.c (usage): Split long literal strings.
11191 Reported by Hans Aberg.
11192
717be197
AD
111932002-05-28 Akim Demaille <akim@epita.fr>
11194
11195 * data/bison.c++: Use C++ ostreams.
11196 (cdebug_): New member.
11197
670ddffd
AD
111982002-05-28 Akim Demaille <akim@epita.fr>
11199
11200 * src/output.c (output_skeleton): Be sure to allocate enough room
11201 for `/' _and_ for `\0' in full_skeleton.
11202
769b430f
AD
112032002-05-28 Akim Demaille <akim@epita.fr>
11204
11205 * data/bison.c++: Catch up with bison.simple:
11206 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11207 and Paul Eggert <eggert@twinsun.com>: `error' handing.
11208 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
11209 and popping traces.
11210
7067cb36
PH
112112002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11212
11213 * src/output.c (output_skeleton): Put an explicit path in front of
11214 the skeleton file name, rather than relying on the -I directory,
11215 to partially alleviate effects of having a skeleton file lying around
11216 in the current directory.
769b430f 11217
4a713ec2
PH
112182002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11219
769b430f 11220 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
11221 obstack_printf should be obstack_fgrow1.
11222
b408954b
AD
112232002-05-26 Akim Demaille <akim@epita.fr>
11224
11225 * src/state.h (state_t): `solved_conflicts' is a new member.
11226 * src/LR0.c (new_state): Set it to 0.
11227 * src/conflicts.h, src/conflicts.c (print_conflicts)
11228 (free_conflicts, solve_conflicts): Rename as...
11229 (conflicts_print, conflicts_free, conflicts_solve): these.
11230 Adjust callers.
11231 * src/conflicts.c (enum conflict_resolution_e)
11232 (solved_conflicts_obstack): New, used by...
11233 (log_resolution): this.
11234 Adjust to attach the conflict resolution to each state.
11235 Complete the description with the precedence/associativity
11236 information.
11237 (resolve_sr_conflict): Adjust.
11238 * src/print.c (print_state): Output its solved_conflicts.
11239 * tests/conflicts.at (Unresolved SR Conflicts)
11240 (Solved SR Conflicts): Exercise --report=all.
11241
a49aecd5
AD
112422002-05-26 Akim Demaille <akim@epita.fr>
11243
11244 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11245 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11246 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11247 (token_number_t, item_number_as_token_number)
11248 (token_number_as_item_number, muscle_insert_token_number_table):
11249 Rename as...
11250 (symbol_number_t, item_number_as_symbol_number)
11251 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11252 these, since it is more appropriate.
11253
5504898e
AD
112542002-05-26 Akim Demaille <akim@epita.fr>
11255
11256 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11257 `Error:' lines.
11258 * data/bison.simple (yystos) [YYDEBUG]: New.
11259 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11260 error recovery.
11261 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11262
ec3bc396
AD
112632002-05-25 Akim Demaille <akim@epita.fr>
11264
11265 * doc/bison.texinfo (Debugging): Split into...
11266 (Tracing): this new section, its former contents, and...
11267 (Understanding): this new section.
11268 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11269 by...
11270 (report_flag): this.
11271 Adjust all dependencies.
11272 (report_args, report_types, report_argmatch): New.
11273 (usage, getargs): Report/support -r, --report.
11274 * src/options.h
11275 (struct option_table_struct): Rename as..,
11276 (struct option_table_s): this.
11277 Rename the `set_flag' member to `flag' to match with getopt_long's
11278 struct.
11279 * src/options.c (option_table): Split verbose into an entry for
11280 %verbose, and another for --verbose.
11281 Support --report/-r, so remove -r from the obsolete --raw.
11282 * src/print.c: Attach full item sets and lookaheads reports to
11283 report_flag instead of trace_flag.
11284 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11285
78df8250
PE
112862002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11287 and Paul Eggert <eggert@twinsun.com>
769b430f 11288
78df8250
PE
11289 * data/bison.simple (yyparse): Correct error handling to conform to
11290 POSIX and yacc. Specifically, after syntax error is discovered,
11291 do not reduce further before shifting the error token.
11292 Clean up the code a bit by removing the labels yyerrdefault,
11293 yyerrhandle, yyerrpop.
11294 * NEWS: Document the above.
11295
c0c9ea05
PH
112962002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11297
11298 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11299 type; it isn't always big enough, since it doesn't necessarily
11300 include non-terminals.
769b430f 11301 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
11302 the latter can be removed.
11303 (yy_token_number_type): Remove, only one use.
11304 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11305 don't use TokenNumberType as element type.
769b430f 11306
c0c9ea05
PH
11307 * tests/regression.at: Modify expected output to agree with change
11308 to yyr1 and yytranslate.
769b430f 11309
6390a83f
FK
113102002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11311
11312 * src/reader.c (parse_action): Use copy_character instead of
11313 obstack_1grow.
11314
db7c8e9a
AD
113152002-05-13 Akim Demaille <akim@epita.fr>
11316
11317 * tests/regression.at (Token definitions): Prototype yylex and
11318 yyerror.
11319
fcc61800
PH
113202002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11321
158c687b 11322 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
11323 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11324 32-bit arithmetic.
11325 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11326
5683e9b2
AD
113272002-05-07 Akim Demaille <akim@epita.fr>
11328
11329 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11330 avoid GCC warnings.
11331
0c2d3f4c
AD
113322002-05-07 Akim Demaille <akim@epita.fr>
11333
11334 Kill GCC warnings.
11335
11336 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11337 over the RHS of each rule.
11338 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11339 * src/state.h (state_t): Member `nitems' is unsigned short.
11340 * src/LR0.c (get_state): Adjust.
11341 * src/reader.c (packgram): Likewise.
11342 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11343 `Type'.
11344 (muscle_insert_int_table): Remove, unused.
11345 (prepare_rules): Remove `max'.
11346
1565b720
AD
113472002-05-06 Akim Demaille <akim@epita.fr>
11348
11349 * src/closure.c (print_firsts): Display of the symbol tags.
11350 (bitmatrix_print): Move to...
11351 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11352 here.
11353 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11354
cfaee611
AD
113552002-05-06 Akim Demaille <akim@epita.fr>
11356
11357 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11358 hash_do_for_each.
11359
458be8e0
AD
113602002-05-06 Akim Demaille <akim@epita.fr>
11361
11362 * src/LR0.c (new_state, get_state): Instead of using the global
11363 `kernel_size' and `kernel_base', have two new arguments:
11364 `core_size' and `core'.
11365 Adjust callers.
11366
a900a624
AD
113672002-05-06 Akim Demaille <akim@epita.fr>
11368
11369 * src/reader.c (packgram): No longer end `ritem' with a 0
11370 sentinel: it is not used.
11371
d4e7d3a1
AD
113722002-05-05 Akim Demaille <akim@epita.fr>
11373
11374 New experimental feature: display the lookaheads in the report and
11375 graph.
11376
11377 * src/print (print_core): When --trace-flag, display the rules
11378 lookaheads.
11379 * src/print_graph.c (print_core): Likewise.
11380 Swap the arguments.
11381 Adjust caller.
11382
39ceb25b
AD
113832002-05-05 Akim Demaille <akim@epita.fr>
11384
11385 * tests/torture.at (Many lookaheads): New test.
11386
5372019f
AD
113872002-05-05 Akim Demaille <akim@epita.fr>
11388
11389 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11390 (GENERATE_MUSCLE_INSERT_TABLE): this.
11391 (output_int_table, output_unsigned_int_table, output_short_table)
11392 (output_token_number_table, output_item_number_table): Replace with...
11393 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11394 (muscle_insert_short_table, muscle_insert_token_number_table)
11395 (muscle_insert_item_number_table): these.
11396 Adjust all callers.
11397 (prepare_tokens): Don't free `translations', since...
11398 * src/reader.h, src/reader.c (grammar_free): do it.
11399 Move to...
11400 * src/gram.h, src/gram.c (grammar_free): here.
11401 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11402 b4_translate_max.
11403
5df5f6d5
AD
114042002-05-05 Akim Demaille <akim@epita.fr>
11405
11406 * src/output.c (output_unsigned_int_table): New.
11407 (prepare_rules): `i' is unsigned.
11408 `prhs', `rline', `r2' are unsigned int.
11409 Rename muscle `rhs_number_max' as `rhs_max'.
11410 Output muscles `prhs_max', `rline_max', and `r2_max'.
11411 Free rline and r1.
11412 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11413 to compute types instead of constant types.
11414 * tests/regression.at (Web2c Actions): Adjust.
11415
b87f8b21
AD
114162002-05-04 Akim Demaille <akim@epita.fr>
11417
11418 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11419 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11420 Adjust dependencies.
11421 * src/output.c (token_definitions_output): Be sure not to output a
11422 `#define 'a'' when fed with `%token 'a' "a"'.
11423 * tests/regression.at (Token definitions): New.
11424
8bb936e4
PE
114252002-05-03 Paul Eggert <eggert@twinsun.com>
11426
11427 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11428 for K&R C.
11429
114302002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11431
11432 * Makefile.am (SUBDIRS): Remove intl.
11433 (EXTRA_DIST): Add config/config.rpath.
11434
53c71a12
AD
114352002-05-03 Akim Demaille <akim@epita.fr>
11436
11437 * data/bison.simple (m4_if): Don't output empty enums.
11438 And actually, output valid enum definitions :(.
11439
289dd0cf
AD
114402002-05-03 Akim Demaille <akim@epita.fr>
11441
11442 * configure.bat: Remove, completely obsolete.
11443 * Makefile.am (EXTRA_DIST): Adjust.
11444 Don't distribute config.rpath...
11445 * config/Makefile.am (EXTRA_DIST): Do it.
11446
db85e524
AD
114472002-05-03 Akim Demaille <akim@epita.fr>
11448
11449 * configure.in (GETTEXT_VERSION): New.
11450 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11451
83ccf991
AD
114522002-05-03 Akim Demaille <akim@epita.fr>
11453
11454 * data/bison.simple (b4_token_enum): New.
11455 (b4_token_defines): Use it to output tokens both as #define and
11456 enums.
11457 Suggested by Paul Eggert.
11458 * src/output.c (token_definitions_output): Don't output spurious
11459 white spaces.
11460
1f418995
AD
114612002-05-03 Akim Demaille <akim@epita.fr>
11462
11463 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11464
45119f04
RA
114652002-05-02 Robert Anisko <robert@lrde.epita.fr>
11466
11467 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11468 Update the stack class, give a try to deque as the default container.
11469
b2d52318
AD
114702002-05-02 Akim Demaille <akim@epita.fr>
11471
11472 * data/bison.simple (yyparse): Do not implement @$ = @1.
11473 (YYLLOC_DEFAULT): Adjust to do it.
11474 * doc/bison.texinfo (Location Default Action): Fix.
11475
3a8b4109
AD
114762002-05-02 Akim Demaille <akim@epita.fr>
11477
11478 * src/reader.c (parse_braces): Merge into...
11479 (parse_action): this.
11480
84614e13
AD
114812002-05-02 Akim Demaille <akim@epita.fr>
11482
11483 * configure.in (ALL_LINGUAS): Remove.
11484 * po/LINGUAS, hr.po: New.
11485
fdbcd8e2
AD
114862002-05-02 Akim Demaille <akim@epita.fr>
11487
11488 Remove the so called hairy (semantic) parsers.
11489
11490 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11491 * src/gram.h, src/gram.c (semantic_parser): Remove.
11492 (rule_t): Remove the guard and guard_line members.
11493 * src/lex.h (token_t): remove tok_guard.
11494 * src/options.c (option_table): Remove %guard and %semantic_parser
11495 support.
11496 * src/output.c, src/output.h (guards_output): Remove.
11497 (prepare): Adjust.
11498 (token_definitions_output): Don't output the `T'
11499 tokens (???).
11500 (output_skeleton): Don't output the guards.
11501 * src/files.c, src/files.c (attrsfile): Remove.
11502 * src/reader.c (symbol_list): Remove the guard and guard_line
11503 members.
11504 Adjust dependencies.
11505 (parse_guard): Remove.
11506 * data/bison.hairy: Remove.
11507 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11508 BISON_HAIRY.
11509
82b6cb3f
AD
115102002-05-02 Akim Demaille <akim@epita.fr>
11511
11512 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11513 (parse_guard): Rename the formal argument `stack_offset' as
11514 `rule_length', which is more readable.
11515 Adjust callers.
11516 (copy_at, copy_dollar): Instead of outputting the hard coded
11517 values of $$, $n and so forth, output invocation to b4_lhs_value,
11518 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
11519 Note: this patch partially drops `semantic-parser' support: it
11520 always does `rule_length - n', where semantic parsers ought to
11521 always use `-n'.
82b6cb3f
AD
11522 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11523 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11524
6cbfbcc5
AD
115252002-05-02 Akim Demaille <akim@epita.fr>
11526
11527 * configure.in (AC_INIT): Bump to 1.49b.
11528 (AM_INIT_AUTOMAKE): Short invocation.
11529
b8548114
AD
115302002-05-02 Akim Demaille <akim@epita.fr>
11531
11532 Version 1.49a.
11533
c20cd1fa
AD
115342002-05-01 Akim Demaille <akim@epita.fr>
11535
11536 * src/skeleton.h: Remove.
11537
8a9566d4
AD
115382002-05-01 Akim Demaille <akim@epita.fr>
11539
11540 * src/skeleton.h: Fix the #endif.
11541 Reported by Magnus Fromreide.
11542
8c6d399a
PE
115432002-04-26 Paul Eggert <eggert@twinsun.com>
11544
11545 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11546 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 11547 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 11548
2b7ed18a
RA
115492002-04-25 Robert Anisko <robert@lrde.epita.fr>
11550
11551 * src/scan-skel.l: Postprocess quadrigraphs.
11552
11553 * src/reader.c (copy_character): New function, used to output
11554 single characters while replacing `[' and `]' with quadrigraphs, to
11555 avoid troubles with M4 quotes.
11556 (copy_comment): Output characters with copy_character.
11557 (read_additionnal_code): Likewise.
11558 (copy_string2): Likewise.
11559 (copy_definition): Likewise.
11560
11561 * tests/calc.at: Exercise M4 quoting.
11562
34a89c50
AD
115632002-04-25 Akim Demaille <akim@epita.fr>
11564
11565 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11566 between `!' and the command.
11567 Reported by Paul Eggert.
11568
0dd1580a
RA
115692002-04-24 Robert Anisko <robert@lrde.epita.fr>
11570
11571 * tests/calc.at: Exercise prologue splitting.
11572
11573 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11574 `b4_post_prologue' instead of `b4_prologue'.
11575
11576 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11577 muscles.
11578 (output): Free pre_prologue_obstack and post_prologue_obstack.
11579 * src/files.h, src/files.c (attrs_obstack): Remove.
11580 (pre_prologue_obstack, post_prologue_obstack): New.
11581 * src/reader.c (copy_definition): Add a parameter to specify the
11582 obstack to fill, instead of using attrs_obstack unconditionally.
11583 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11584 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11585
83c1796f
PE
115862002-04-23 Paul Eggert <eggert@twinsun.com>
11587
11588 * data/bison.simple: Remove unnecessary commentary and white
11589 space differences from 1_29-branch.
11590 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11591
11592 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11593 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11594 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11595 constructors or destructors.
11596
11597 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11598
1207eeac
AD
115992002-04-23 Akim Demaille <akim@epita.fr>
11600
11601 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11602 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11603 location with columns.
11604 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11605 All reported by Paul Eggert.
11606
78ab8f67
AD
116072002-04-22 Akim Demaille <akim@epita.fr>
11608
11609 * src/reduce.c (dump_grammar): Move to...
11610 * src/gram.h, src/gram.c (grammar_dump): here.
11611 Be sure to separate long item numbers.
11612 Don't read the members of a rule's prec if its nil.
11613
133c20e2
AD
116142002-04-22 Akim Demaille <akim@epita.fr>
11615
11616 * src/output.c (table_size, table_grow): New.
11617 (MAXTABLE): Remove, replace uses with table_size.
11618 (pack_vector): Instead of dying when the table is too big, grow it.
11619
9515e8a7
AD
116202002-04-22 Akim Demaille <akim@epita.fr>
11621
11622 * data/bison.simple (yyr1): Its type is that of a token number.
11623 * data/bison.c++ (r1_): Likewise.
11624 * tests/regression.at (Web2c Actions): Adjust.
11625
23c5a174
AD
116262002-04-22 Akim Demaille <akim@epita.fr>
11627
11628 * src/reader.c (token_translations_init): 256 is now the default
11629 value for the error token, i.e., it will be assigned another
11630 number if the user assigned 256 to one of her tokens.
11631 (reader): Don't force 256 to error.
11632 * doc/bison.texinfo (Symbols): Adjust.
11633 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11634 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11635 etc. instead of 10, 20, 30 (which was used to `jump' over error
11636 (256) and undefined (2)).
11637
5fbb0954
AD
116382002-04-22 Akim Demaille <akim@epita.fr>
11639
11640 Propagate more token_number_t.
11641
11642 * src/gram.h (token_number_as_item_number)
11643 (item_number_as_token_number): New.
11644 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11645 Use it to create output_item_number_table and
11646 output_token_number_table.
11647 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11648 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11649 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11650 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11651
4f940944
AD
116522002-04-22 Akim Demaille <akim@epita.fr>
11653
11654 * src/output.h, src/output.c (get_lines_number): Remove.
11655
3ded9a63
AD
116562002-04-19 Akim Demaille <akim@epita.fr>
11657
11658 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11659 as Lex/Flex'.
11660 (Debugging): More details about enabling the debugging features.
11661 (Table of Symbols): Describe $$, $n, @$, and @n.
11662 Suggested by Tim Josling.
11663
e0c471a9
AD
116642002-04-19 Akim Demaille <akim@epita.fr>
11665
11666 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11667
fecc10cd
AD
116682002-04-10 Akim Demaille <akim@epita.fr>
11669
11670 * src/system.h: Rely on HAVE_LIMITS_H.
11671 Suggested by Paul Eggert.
11672
51dec47b
AD
116732002-04-09 Akim Demaille <akim@epita.fr>
11674
11675 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11676 full stderr, and strip it according to the bison options, instead
11677 of composing the error message from different bits.
11678 This makes it easier to check for several error messages.
11679 Adjust all the invocations.
11680 Add an invocation exercising the error token.
11681 Add an invocation demonstrating a stupid error message.
11682 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11683 Adjust the tests.
11684 Error message are for stderr, not stdout.
11685
007a50a4
AD
116862002-04-09 Akim Demaille <akim@epita.fr>
11687
11688 * src/gram.h, src/gram.c (error_token_number): Remove, use
11689 errtoken->number.
11690 * src/reader.c (reader): Don't specify the user token number (2)
11691 for $undefined, as it uselessly prevents using it.
11692 * src/gram.h (token_number_t): Move to...
11693 * src/symtab.h: here.
11694 (state_t.number): Is a token_number_t.
11695 * src/print.c, src/reader.c: Use undeftoken->number instead of
11696 hard coded 2.
11697 (Even though this 2 is not the same as above: the number of the
11698 undeftoken remains being 2, it is its user token number which
11699 might not be 2).
11700 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11701 `user_token_number_max'.
11702 Output `undef_token_number'.
11703 * data/bison.simple, data/bison.c++: Use them.
11704 Be sure to map invalid yylex return values to
11705 `undef_token_number'. This saves us from gratuitous SEGV.
11706
11707 * tests/conflicts.at (Solved SR Conflicts)
11708 (Unresolved SR Conflicts): Adjust.
11709 * tests/regression.at (Web2c Actions): Adjust.
11710
06446ccf
AD
117112002-04-08 Akim Demaille <akim@epita.fr>
11712
11713 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11714 Adding #line.
11715 Remove the duplicate `typedefs'.
11716 (RhsNumberType): Fix the declaration and various other typos.
11717 Use __ofile__.
11718 * data/bison.simple: Use __ofile__.
11719 * src/scan-skel.l: Handle __ofile__.
11720
62a3e4f0
AD
117212002-04-08 Akim Demaille <akim@epita.fr>
11722
11723 * src/gram.h (item_number_t): New, the type of item numbers in
11724 RITEM. Note that it must be able to code symbol numbers as
11725 positive number, and the negation of rule numbers as negative
11726 numbers.
11727 Adjust all dependencies (pretty many).
11728 * src/reduce.c (rule): Remove this `short *' pointer: use
11729 item_number_t.
11730 * src/system.h (MINSHORT, MAXSHORT): Remove.
11731 Include `limits.h'.
11732 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11733 (shortcpy): Remove.
11734 (MAXTABLE): Move to...
11735 * src/output.c (MAXTABLE): here.
11736 (prepare_rules): Use output_int_table to output rhs.
11737 * data/bison.simple, data/bison.c++: Adjust.
11738 * tests/torture.at (Big triangle): Move the limit from 254 to
11739 500.
11740 * tests/regression.at (Web2c Actions): Ajust.
11741
11742 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11743 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11744 passes, but produces negative #line number, once fixed, GCC is
11745 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11746 C), it passes.
11747 * src/state.h (state_h): Code input lines on ints, not shorts.
11748
bb88b0fc
AD
117492002-04-08 Akim Demaille <akim@epita.fr>
11750
11751 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11752 and then the grammar.
11753
9a636f47
AD
117542002-04-08 Akim Demaille <akim@epita.fr>
11755
11756 * src/system.h: No longer using strndup.
11757
680e8701
AD
117582002-04-07 Akim Demaille <akim@epita.fr>
11759
11760 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11761 * src/output.c (output_table_data): Return the longest number.
11762 (prepare_tokens): Output `token_number_max').
11763 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11764 New.
11765 Use them to define yy_token_number_type/TokenNumberType.
11766 Use this type for yytranslate.
11767 * tests/torture.at (Big triangle): Push the limit from 124 to
11768 253.
11769 * tests/regression.at (Web2c Actions): Adjust.
11770
817e9f41
AD
117712002-04-07 Akim Demaille <akim@epita.fr>
11772
11773 * tests/torture.at (Big triangle): New.
11774 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11775 * tests/existing.at: here.
11776
5123689b
AD
117772002-04-07 Akim Demaille <akim@epita.fr>
11778
11779 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11780 nritems.
11781 Adjust dependencies.
11782
f3849179
AD
117832002-04-07 Akim Demaille <akim@epita.fr>
11784
11785 * src/reader.c: Normalize increments to prefix form.
11786
bd02036a
AD
117872002-04-07 Akim Demaille <akim@epita.fr>
11788
11789 * src/reader.c, symtab.c: Remove debugging code.
11790
db8837cb
AD
117912002-04-07 Akim Demaille <akim@epita.fr>
11792
11793 Rename all the `bucket's as `symbol_t'.
11794
11795 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11796 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11797 * src/symtab.c, src/symtab.h (bucket): Rename as...
11798 (symbol_t): this.
11799 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11800 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11801 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11802 (buckets_new, buckets_free, buckets_do): Rename as...
11803 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11804 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11805 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11806 (symbols_new, symbols_free, symbols_do): these.
11807
72a23c97
AD
118082002-04-07 Akim Demaille <akim@epita.fr>
11809
11810 Use lib/hash for the symbol table.
11811
11812 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11813 EOF.
11814 * src/lex.c (lex): Set the `number' member of new terminals.
11815 * src/reader.c (bucket_check_defined, bucket_make_alias)
11816 (bucket_check_alias_consistence, bucket_translation): New.
11817 (reader, grammar_free, readgram, token_translations_init)
11818 (packsymbols): Adjust.
11819 (reader): Number the predefined tokens.
11820 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11821 for predefined tokens.
11822 * src/symtab.h (bucket): Remove all the hash table related
11823 members.
11824 * src/symtab.c (symtab): Replace by...
11825 (bucket_table): this.
11826 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11827 (buckets_new, buckets_do): New.
11828
280a38c3
AD
118292002-04-07 Akim Demaille <akim@epita.fr>
11830
11831 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11832 (start_symbol, max_user_token_number, semantic_parser)
11833 (error_token_number): Initialize.
11834 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11835 Initialize.
11836 (reader): Don't.
11837 (errtoken, eoftoken, undeftoken, axiom): Extern.
11838
03b31c0c
AD
118392002-04-07 Akim Demaille <akim@epita.fr>
11840
11841 * src/gram.h (rule_s): prec and precsym are now pointers
11842 to the bucket giving the priority/associativity.
11843 Member `associativity' removed: useless.
11844 * src/reduce.c, src/conflicts.c: Adjust.
11845
8b3df748
AD
118462002-04-07 Akim Demaille <akim@epita.fr>
11847
11848 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11849 Properly escape the symbols' TAG when outputting them.
11850
e601aa1d
AD
118512002-04-07 Akim Demaille <akim@epita.fr>
11852
11853 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11854
b0299a2e
AD
118552002-04-07 Akim Demaille <akim@epita.fr>
11856
11857 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11858 (LArule): this, which is an array to rule_t*.
11859 * src/print.c, src/conflicts.c: Adjust.
11860
d7e1f00c
AD
118612002-04-07 Akim Demaille <akim@epita.fr>
11862
11863 * src/gram.h (rule_t): Rename `number' as `user_number'.
11864 `number' is a new member.
11865 Adjust dependencies.
11866 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11867
cc9305dd
AD
118682002-04-07 Akim Demaille <akim@epita.fr>
11869
11870 As a result of the previous patch, it is no longer needed
11871 to reorder ritem itself.
11872
11873 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11874
b0940840
AD
118752002-04-07 Akim Demaille <akim@epita.fr>
11876
11877 Be sure never to walk through RITEMS, but use only data related to
11878 the rules themselves. RITEMS should be banished.
11879
11880 * src/output.c (output_token_translations): Rename as...
11881 (prepare_tokens): this.
11882 In addition to `translate', prepare the muscles `tname' and
11883 `toknum', which were handled by...
11884 (output_rule_data): this.
11885 Remove, and move the remainder of its outputs into...
11886 (prepare_rules): this new routines, which also merges content from
11887 (output_gram): this.
11888 (prepare_rules): Be sure never to walk through RITEMS.
11889 (output_stos): Rename as...
11890 (prepare_stos): this.
11891 (output): Always invoke prepare_states, after all, just don't use it
11892 in the output if you don't need it.
11893
643a5994
AD
118942002-04-07 Akim Demaille <akim@epita.fr>
11895
11896 * src/LR0.c (new_state): Display `nstates' as the name of the
11897 newly created state.
11898 Adjust to initialize first_state and last_state if needed.
11899 Be sure to distinguish the initial from the final state.
11900 (new_states): Create the itemset of the initial state, and use
11901 new_state.
11902 * src/closure.c (closure): Now that the initial state has its
11903 items properly set, there is no need for a special case when
11904 creating `ruleset'.
11905
11906 As a result, now the rule 0, reducing to $axiom, is visible in the
11907 outputs. Adjust the test suite.
11908
11909 * tests/conflicts.at (Solved SR Conflicts)
11910 (Unresolved SR Conflicts): Adjust.
11911 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11912 * tests/conflicts.at (S/R in initial): New.
11913
b4c4ccc2
AD
119142002-04-07 Akim Demaille <akim@epita.fr>
11915
11916 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11917 the RHS of the rules.
11918 * src/output.c (output_gram): Likewise.
11919
bba97eb2
AD
119202002-04-07 Akim Demaille <akim@epita.fr>
11921
11922 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11923 bucket.
11924 Adjust all dependencies.
11925 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11926 `number' of the buckets too.
11927 * src/gram.h: Include `symtab.h'.
11928 (associativity): Move to...
11929 * src/symtab.h: here.
11930 No longer include `gram.h'.
11931
c3b407f4
AD
119322002-04-07 Akim Demaille <akim@epita.fr>
11933
11934 * src/gram.h, src/gram.c (rules_rhs_length): New.
11935 (ritem_longest_rhs): Use it.
11936 * src/gram.h (rule_t): `number' is a new member.
11937 * src/reader.c (packgram): Set it.
11938 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11939 the end of `rules', and count them out of `nrules'.
11940 (reduce_output, dump_grammar): Adjust.
11941 * src/print.c (print_grammar): It is no longer needed to check for
11942 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11943 * tests/reduce.at (Reduced Automaton): New test.
11944
11652ab3
AD
119452002-04-07 Akim Demaille <akim@epita.fr>
11946
11947 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11948 lacking `+ 1' to nrules, Bison reported as useless a token if it
11949 was used solely to set the precedence of the last rule...
11950
26b23c1a
AD
119512002-04-07 Akim Demaille <akim@epita.fr>
11952
11953 * data/bison.c++, data/bison.simple: Don't output the current file
11954 name in #line, to avoid useless diffs between two identical
11955 outputs under different names.
11956
18bcecb0
AD
119572002-04-07 Akim Demaille <akim@epita.fr>
11958
11959 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11960 Normalize loops to using `< nrules + 1', not `<= nrules'.
11961
fa770c86
AD
119622002-04-07 Akim Demaille <akim@epita.fr>
11963
11964 * TODO: Update.
11965
d9b739c3
AD
119662002-04-07 Akim Demaille <akim@epita.fr>
11967
11968 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11969 bucket.value as bucket.number.
11970
99013900
AD
119712002-04-07 Akim Demaille <akim@epita.fr>
11972
11973 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11974 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11975 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11976 RHS, instead of being an index in RITEMS.
11977
e966383b
PE
119782002-04-04 Paul Eggert <eggert@twinsun.com>
11979
11980 * doc/bison.texinfo: Update copyright date.
11981 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11982 (Symbols): Warn about running Bison in one character set,
11983 but compiling and/or running in an incompatible one.
11984 Warn about character code 256, too.
11985
119862002-04-03 Paul Eggert <eggert@twinsun.com>
11987
11988 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11989 YYERROR_VERBOSE is nonzero, not whether it is defined.
11990
11991 Merge changes from bison-1_29-branch.
c307773e 11992
8d6c48b9
PE
119932002-03-20 Paul Eggert <eggert@twinsun.com>
11994
11995 Merge fixes from Debian bison_1.34-1.diff.
11996
11997 * configure.in (AC_PREREQ): 2.53.
11998
e53c6322
AD
119992002-03-20 Akim Demaille <akim@epita.fr>
12000
12001 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12002
9ffbeca7
PE
120032002-03-19 Paul Eggert <eggert@twinsun.com>
12004
21db0b2a
PE
12005 * src/bison.simple (YYCOPY): New macro.
12006 (YYSTACK_RELOCATE): Use it.
12007 Remove Type arg; no longer needed. All callers changed.
12008 (yymemcpy): Remove; no longer needed.
12009
9ffbeca7
PE
12010 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12011 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12012
642cb8f8
AD
120132002-03-19 Akim Demaille <akim@epita.fr>
12014
12015 Test and fix the #line outputs.
12016
12017 * tests/atlocal.at (GCC): New.
12018 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 12019 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
12020 (Action synch line, Epilogue synch line): New tests.
12021 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12022 * data/bison.simple, data/bison.c++: Use it.
12023
3c31a486
AD
120242002-03-19 Akim Demaille <akim@epita.fr>
12025
12026 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12027 (Solved SR Conflicts, %expect not enough, %expect right)
12028 (%expect too much): Move to...
12029 * tests/conflicts.at: this new file.
12030
0d8bed56
AD
120312002-03-19 Akim Demaille <akim@epita.fr>
12032
12033 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12034 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12035 that we can move to enums for instance.
12036 * src/output.c (token_definitions_output): Output a list of
12037 `token-name, token-number' instead of the #define.
12038 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12039
9208d17f
AD
120402002-03-14 Akim Demaille <akim@epita.fr>
12041
12042 Use Gettext 0.11.1.
12043
af27eacb
RA
120442002-03-09 Robert Anisko <robert@lrde.epita.fr>
12045
12046 * data/bison.c++: Make the user able to add members to the generated
12047 parser by subclassing.
12048
9101a310
RA
120492002-03-05 Robert Anisko <robert@lrde.epita.fr>
12050
12051 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12052 a character.
12053 Reported by Nicolas Tisserand and Nicolas Burrus.
12054
fff9bf0b
RA
120552002-03-04 Robert Anisko <robert@lrde.epita.fr>
12056
12057 * src/reader.c: Warn about lacking semi-colons, do not complain.
12058
64dba31e
RA
120592002-03-04 Robert Anisko <robert@lrde.epita.fr>
12060
12061 * data/bison.c++: Remove a debug line.
12062
374f5a14
RA
120632002-03-04 Robert Anisko <robert@lrde.epita.fr>
12064
12065 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
12066 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
12067 provide a default implementation.
12068
bfcf1f3a
AD
120692002-03-04 Akim Demaille <akim@epita.fr>
12070
12071 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
12072 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
12073 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12074 * tests/semantic.at (Parsing Guards): Similarly.
12075 * src/reader.at (readgram): Complain if the last rule is not ended
12076 with a semi-colon.
12077
65ccf9fc
AD
120782002-03-04 Akim Demaille <akim@epita.fr>
12079
12080 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
12081 * src/closure.c: here.
12082 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
12083 RTC.
12084 * src/warshall.h, src/warshall.c: Remove.
12085 * tests/sets.at (Broken Closure): Adjust.
12086
d0039cbc
AD
120872002-03-04 Akim Demaille <akim@epita.fr>
12088
12089 * src/output.c (output_skeleton): tempdir is const.
12090 bytes_read is unused.
12091
345cea78
AD
120922002-03-04 Akim Demaille <akim@epita.fr>
12093
12094 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12095 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
12096 Update.
12097 From Michael Hayes.
12098
564801f7
AD
120992002-03-04 Akim Demaille <akim@epita.fr>
12100
12101 * src/closure.c (closure): `r' is unused.
12102
e5352bc7
AD
121032002-03-04 Akim Demaille <akim@epita.fr>
12104
12105 * tests/sets.at (Broken Closure): Add the ending `;'.
12106 * src/reader.at (readgram): Complain if a rule is not ended with a
12107 semi-colon.
12108
914feea9
AD
121092002-03-04 Akim Demaille <akim@epita.fr>
12110
12111 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
12112 (count_sr_conflicts): Use bitset_count.
12113 * src/reduce.c (inaccessable_symbols): Ditto.
12114 (bits_size): Remove.
12115 * src/warshall.h, src/warshall.c: Convert to bitsetv.
12116
f0250de6
AD
121172002-03-04 Akim Demaille <akim@epita.fr>
12118
12119 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
12120 * src/reduce.c: Remove the `bitset_zero's following the
12121 `bitset_create's, as now it is performed by the latter.
12122
ef017502
AD
121232002-03-04 Akim Demaille <akim@epita.fr>
12124
12125 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
12126 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
12127 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
12128 latest sources from Michael.
12129
76514394
AD
121302002-03-04 Akim Demaille <akim@epita.fr>
12131
12132 * src/output.c (output): Don't free the grammar.
12133 * src/reader.c (grammar_free): New.
12134 * src/main.c (main): Call it and don't free symtab here.
12135
55024580
AD
121362002-03-04 Akim Demaille <akim@epita.fr>
12137
12138 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
12139 before returning.
12140 Reported by Benoit Perrot.
12141
f9abaa2c
AD
121422002-03-04 Akim Demaille <akim@epita.fr>
12143
12144 Use bitset operations when possible, not loops over bits.
12145
12146 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
12147 bitset_or.
12148 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
12149 * src/reduce.c (useless_nonterminals): Formatting changes.
12150 * src/warshall.c (TC): Use bitset_or.
12151
0e721e75
AD
121522002-03-04 Akim Demaille <akim@epita.fr>
12153
12154 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
12155 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
12156 Ditto.
12157
0fb1ffb1
AD
121582002-03-04 Akim Demaille <akim@epita.fr>
12159
12160 * src/lalr.c (F): Now a bitset*.
12161 Adjust all dependencies.
12162
b86796bf
AD
121632002-03-04 Akim Demaille <akim@epita.fr>
12164
12165 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
12166 Adjust all dependencies.
12167
602bbf31
AD
121682002-03-04 Akim Demaille <akim@epita.fr>
12169
12170 * src/L0.c, src/LR0.h (nstates): Be size_t.
12171 Adjust comparisons (signed vs unsigned).
12172 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
12173 bitset*.
12174 Adjust all dependencies.
12175
d8a0245c
AD
121762002-03-04 Akim Demaille <akim@epita.fr>
12177
12178 * src/closure.c (firsts): Now, also a bitset.
12179 Adjust all dependencies.
12180 (varsetsize): Remove, now unused.
12181 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
12182
34ba9743
AD
121832002-03-04 Akim Demaille <akim@epita.fr>
12184
12185 * src/print.c: Convert to use bitset.h, not hand coded iterations
12186 over ints.
12187
ed86e78c
AD
121882002-03-04 Akim Demaille <akim@epita.fr>
12189
12190 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
12191
dfdb1797
AD
121922002-03-04 Akim Demaille <akim@epita.fr>
12193
12194 * src/closure.c (ruleset): Be a bitset.
12195 (rulesetsize): Remove.
12196
7086e707
AD
121972002-03-04 Akim Demaille <akim@epita.fr>
12198
12199 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
12200 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
12201 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12202 * src/closure.c (fderives): Be an array of bitsets.
12203
98254360
RA
122042002-02-28 Robert Anisko <robert@lrde.epita.fr>
12205
12206 * data/bison.c++: Merge the two generated headers. Insert a copyright
12207 notice in each output file.
12208
a75c057f
AD
122092002-02-28 Akim Demaille <akim@epita.fr>
12210
12211 * data/bison.c++: Copy the prologue of bison.simple to fetch
12212 useful M4 definitions, such as b4_header_guard.
12213
06b00abc
AD
122142002-02-25 Akim Demaille <akim@epita.fr>
12215
12216 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
12217 translator friendly scheme for the bgr
12218 copyright notice.
06b00abc 12219
70e7d534
AD
122202002-02-25 Akim Demaille <akim@epita.fr>
12221
12222 * src/output.c (header_output): Remove, now handled completely via
12223 M4.
12224
abe017f6
AD
122252002-02-25 Akim Demaille <akim@epita.fr>
12226
12227 * m4/m4.m4: New, from CVS Autoconf.
12228 * configure.in: Invoke it.
12229 * src/output.c (output_skeleton): Use its result instead of the
12230 hard coded name.
12231
381fb12e
AD
122322002-02-25 Akim Demaille <akim@epita.fr>
12233
12234 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12235 Fileutils 4.1.5.
12236 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12237 * src/output.c (output_skeleton): Use mkstemp to create a real
12238 temporary file.
12239 Move the filling of `skeleton' and its muscle to...
12240 (prepare): here.
12241 (output): Move the definition of the prologue muscle to...
12242 (prepare): here.
12243 * src/system.h (DEFAULT_TMPDIR): New.
12244
6f38107f
PE
122452002-02-14 Paul Eggert <eggert@twinsun.com>
12246
12247 Remove the support for C++ namespace cleanliness; it was
12248 causing more problems than it was curing, since it didn't work
12249 properly on some nonstandard C++ compilers. This can wait
12250 for a proper C++ parser.
12251
12252 * NEWS: Document this.
12253 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12254 of C++, as it's treated like C now.
12255 * src/bison.simple (YYSTD): Remove.
12256 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12257 Treat C++ just like Standard C instead of trying to support
12258 namespace cleanliness.
12259
80cce3da
AD
122602002-02-14 Akim Demaille <akim@epita.fr>
12261
12262 * tests/regression.at (else): Adjust to Andreas' change.
12263
842e8679
AD
122642002-02-14 Akim Demaille <akim@epita.fr>
12265
12266 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12267
4bda3f10
AD
122682002-02-13 Andreas Schwab <schwab@suse.de>
12269
12270 * src/output.c (output_rule_data): Don't output NULL, it might
12271 not be defined yet.
12272
4162fa07 122732002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 12274
4162fa07
RA
12275 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12276 (Copyright notice): Update.
b418ecd8 12277
bd16a5dc
AD
122782002-02-11 Akim Demaille <akim@epita.fr>
12279
12280 * tests/regression.at (%nonassoc and eof): Don't include
12281 nonportable headers.
12282
8d69a1a3
RA
122832002-02-08 Robert Anisko <robert@lrde.epita.fr>
12284
12285 * data/bison.c++: Correct error recovery. Make the user able to
12286 initialize the starting location.
12287
9b2d0677
AD
122882002-02-07 Akim Demaille <akim@epita.fr>
12289
12290 * tests/input.at: New.
12291
69e2658b
RA
122922002-02-07 Robert Anisko <robert@lrde.epita.fr>
12293
12294 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 12295 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
12296 directives around tables only needed for debugging.
12297
4aacc3a7
RA
122982002-02-07 Robert Anisko <robert@lrde.epita.fr>
12299
12300 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12301 C++ parsers.
12302 (yy::b4_name::parse): Use print_.
12303
762a801e
RA
123042002-02-07 Robert Anisko <robert@lrde.epita.fr>
12305
12306 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12307
4bb2bc3f
RA
123082002-02-07 Robert Anisko <robert@lrde.epita.fr>
12309
12310 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12311 C++ parsers.
12312 (yy::b4_name::parse): Build verbose error messages, and use error_.
12313
6b45a3ca
RA
123142002-02-06 Robert Anisko <robert@lrde.epita.fr>
12315
12316 * data/bison.c++: Fix m4 quoting in comments.
12317
50997c6e
RA
123182002-02-06 Robert Anisko <robert@lrde.epita.fr>
12319
12320 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12321 not expanded by m4.
12322
3f3eed27
AD
123232002-02-05 Akim Demaille <akim@epita.fr>
12324
12325 * data/bison.c++: Adjust to the M4 back end.
12326 More is certainly needed.
12327
be2a1a68
AD
123282002-02-05 Akim Demaille <akim@epita.fr>
12329
12330 Give a try to M4 as a back end.
12331
12332 * lib/readpipe.c: New, from wdiff.
12333 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12334 BISON_HAIRY.
12335 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12336 specific values. Now it is m4 that performs the lookup.
12337 * src/parse-skel.y: Remove.
12338 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12339 * src/output.c (actions_output, guards_output)
12340 (token_definitions_output): No longer keeps track of the output
12341 line number, hence remove the second argument.
12342 (guards_output): Check against the guard member of a rule, not the
12343 action member.
12344 Adjust callers.
12345 (output_skeleton): Don't look for the skeleton location, let m4 do
12346 that.
12347 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12348 file will be used.
12349 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12350 (prepare): Given that for the time being changesyntax is not
12351 usable in M4, rename the muscles using `-' to `_'.
12352 Define `defines_flag', `output_parser_name' and `output_header_name'.
12353 * src/output.h (actions_output, guards_output)
12354 (token_definitions_output): Adjust prototypes.
12355 * src/scan-skel.l: Instead of scanning the skeletons, it now
12356 processes the output of m4: `__oline__' and `#output'.
12357 * data/bison.simple: Adjust to be used by M4(sugar).
12358 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12359 to date.
12360 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12361 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12362 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12363 shamelessly stolen from CVS Autoconf.
12364
beda758b
AD
123652002-02-05 Akim Demaille <akim@epita.fr>
12366
12367 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12368 * configure.in: Check for the declarations of free and malloc.
12369 * src/muscle_tab.c: Adjust.
12370
5ece6d43
AD
123712002-02-05 Akim Demaille <akim@epita.fr>
12372
12373 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12374 which have no values.
12375
5bb18f9a
AD
123762002-02-05 Akim Demaille <akim@epita.fr>
12377
12378 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12379 * data/: here.
12380
894dd62e
PE
123812002-01-29 Paul Eggert <eggert@twinsun.com>
12382
12383 * src/bison.simple (YYSIZE_T): Do not define merely because
12384 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12385 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12386
82841af7
AD
123872002-01-27 Akim Demaille <akim@epita.fr>
12388
12389 Fix `%nonassoc and eof'.
12390
12391 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12392 which were not properly copied! Replace
12393 memcpy (res->errs, src->errs, src->nerrs);
12394 with
12395 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12396 !!!
12397 * tests/regression.at (%nonassoc and eof): Adjust to newest
12398 Autotest: `.' is not in the PATH.
12399
318b76e9
AD
124002002-01-27 Akim Demaille <akim@epita.fr>
12401
12402 * tests/sets.at (AT_EXTRACT_SETS): New.
12403 (Nullable): Use it.
12404 (Firsts): New.
12405
30d2f3d5
AD
124062002-01-26 Akim Demaille <akim@epita.fr>
12407
12408 * tests/actions.at, tests/calc.at, tests/headers.at,
12409 * tests/torture.at: Adjust to the newest Autotest which no longer
12410 forces `.' in the PATH.
12411
30f8c395
AD
124122002-01-25 Akim Demaille <akim@epita.fr>
12413
12414 * tests/regression.at (%nonassoc and eof): New.
12415 Suggested by Robert Anisko.
12416
29ae55f1
AD
124172002-01-24 Akim Demaille <akim@epita.fr>
12418
12419 Bison dumps core when trying to complain about broken input files.
12420 Reported by Cris van Pelt.
12421
12422 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12423 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12424 into...
12425 (Invalid inputs): Strengthen: exercise parse_percent_token.
12426
2b548aa6
RA
124272002-01-24 Robert Anisko <robert.anisko@epita.fr>
12428
12429 * src/Makefile.am: Add bison.c++.
12430 * src/bison.c++: New skeleton.
12431
bb0146c2
AD
124322002-01-21 Paolo Bonzini <bonzini@gnu.org>
12433
12434 * po/it.po: New.
12435
bec30531
AD
124362002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12437
12438 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12439
fc6edc45
MA
124402002-01-20 Marc Autret <marc@gnu.org>
12441
12442 * src/files.c (compute_output_file_names): Fix
12443
5e5d5415
MA
124442002-01-20 Marc Autret <marc@gnu.org>
12445
12446 * tests/output.at: New test.
12447 * src/files.c (compute_base_names): Don't map extensions when
12448 the YACC flag is set, use defaults.
12449 Reported by Evgeny Stambulchik.
12450
44ea3fbd
MA
124512002-01-20 Marc Autret <marc@gnu.org>
12452
ba0fe3c7
PE
12453 * src/system.h: Need to define __attribute__ away for non-GCC
12454 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
12455 Suggested by Albert Chin-A-Young.
12456
338963d1
TVH
124572002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12458
12459 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12460 canonical definition.
12461 * src/system.h: Use the canonical definition for PARAMS (avoids
12462 a conflict with the macro from lib/hash.h).
12463
c57b2479
AD
124642002-01-11 Akim Demaille <akim@epita.fr>
12465
12466 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 12467 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 12468
b85810ae
AD
124692002-01-09 Akim Demaille <akim@epita.fr>
12470
12471 * src/files.c, src/files.h (output_infix): New.
12472 (tab_extension): Remove.
12473 (compute_base_names): Compute the former, drop the latter.
12474 * src/output.c (prepare): Insert the muscles `output-infix', and
12475 `output-suffix'.
12476 * src/parse-skel.y (string, string.1): New.
12477 (section.header): Use it.
12478 (section.yacc): Remove.
12479 (prefix): Remove too.
12480 * src/scan-skel.l: Adjust.
12481 * src/bison.simple, src/bison.hairy: Adjust.
12482
cae60122
AD
124832002-01-09 Akim Demaille <akim@epita.fr>
12484
12485 * configure.in (WERROR_CFLAGS): Compute it.
12486 * src/Makefile.am (CFLAGS): Pass it.
12487 * tests/atlocal.in (CFLAGS): Idem.
12488 * src/files.c: Fix a few warnings.
12489 (get_extension_index): Remove, unused.
12490
ae404801
AD
124912002-01-08 Akim Demaille <akim@epita.fr>
12492
12493 * src/getargs.c (AS_FILE_NAME): New.
12494 (getargs): Use it to convert DOSish file names.
12495 * src/files.c (base_name): Rename as full_base_name to avoid
12496 clashes with `base_name ()'.
12497 (filename_split): New.
12498 (compute_base_names): N-th rewrite, using filename_split.
12499
22312b71
AD
125002002-01-08 Akim Demaille <akim@epita.fr>
12501
12502 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12503 New, stolen from the Fileutils 4.1.
12504 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12505 * configure.in: Check for the presence of memrchr, and of its
12506 prototype.
12507
a67cef01
TVH
125082002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12509
12510 * lib/hash.h (__P): Added definition for this macro.
12511 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12512 BUILT_SOURCES, to ensure they are generated first.
12513 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12514 %error-verbose to allow bootstrapping with bison 1.30x.
12515
2b25d624
AD
125162002-01-06 Akim Demaille <akim@epita.fr>
12517
12518 * src/reader.c (parse_braces): Don't fetch the next char, the
12519 convention is to fetch on entry.
12520 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12521 'switch' without a following semicolon.
12522 * tests/regression.at (braces parsing): New.
12523
3460813b
AD
125242002-01-06 Akim Demaille <akim@epita.fr>
12525
12526 Bison is dead wrong in its RR conflict reports.
12527
12528 * tests/torture.at (GNU Cim Grammar): New.
12529 * src/conflicts.c (count_rr_conflicts): Fix.
12530
73784c64
AD
125312002-01-06 Akim Demaille <akim@epita.fr>
12532
12533 Creating package.m4 from configure.ac causes too many problems.
12534
12535 * tests/Makefile.am (package.m4): Create it by hand,
12536 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12537
25d81090
AD
125382002-01-06 Akim Demaille <akim@epita.fr>
12539
12540 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12541 skeleton.h.
12542
a9b8959e
PE
125432002-01-04 Paul Eggert <eggert@twinsun.com>
12544
12545 * doc/bison.texinfo (Debugging):
12546 Remove YYSTDERR; it's no longer defined or used.
12547 Also, s/cstdio.h/cstdio/.
12548
25d81090
AD
125492002-01-03 Akim Demaille <akim@epita.fr>
12550
12551 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12552
1109455c
AD
125532002-01-03 Akim Demaille <akim@epita.fr>
12554
12555 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12556 tracing code to --trace, wait for a better --trace option, with
12557 args.
12558
7ea5e977
AD
125592002-01-03 Akim Demaille <akim@epita.fr>
12560
12561 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12562 The ISO C++ standard is extremely clear about it: stderr is
12563 considered a macro, not a regular symbol (see table 94 `Header
12564 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12565 Therefore std:: does not apply to it. It still does with fprintf.
12566 Also, s/cstdio.h/cstdio/.
12567
fab5b110
AD
125682002-01-03 Akim Demaille <akim@epita.fr>
12569
12570 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12571 for non system headers.
12572
aed7fd9b
AD
125732002-01-02 Akim Demaille <akim@epita.fr>
12574
12575 Equip the skeleton chain with location tracking, runtime trace,
12576 pure parser and scanner.
12577
12578 * src/parse-skel.y: Request a pure parser, locations, and prefix
12579 renaming.
12580 (%union): Having several members with the same type does not help
12581 type mismatches, simplify.
12582 (YYPRINT, yyprint): New.
12583 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12584 (skel_error): this.
12585 Handle locations.
12586 * src/scan-skel.l: Adjust to these changes.
12587 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12588 (LOCATION_PRINT, skel_control_t): New.
12589
24fad99e
AD
125902001-12-30 Akim Demaille <akim@epita.fr>
12591
12592 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12593 replace `gb' with BLANKS.
12594 * src/scan-skel.l: Adjust.
12595
a4b36db4
AD
125962001-12-30 Akim Demaille <akim@epita.fr>
12597
12598 * src/system.h: We don't need nor want bcopy.
12599 Throw away MS-DOS crap: we don't need getpid.
12600 * configure.in: We don't need strndup. It was even causing
12601 problems: because Flex includes the headers *before* us,
12602 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12603 not visible.
12604 * lib/xstrndup.c: New.
12605 * src/scan-skel.l: Use it.
12606 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12607 * src/parse-skel.y: Use %directives instead of #defines.
12608
1239777d
AD
126092001-12-30 Akim Demaille <akim@epita.fr>
12610
12611 * src/skeleton.h: New.
12612 * src/output.c (output_parser, output_master_parser): Remove, dead
12613 code.
12614 * src/output.h (get_lines_number, actions_output, guards_output)
12615 (token_definitions_output): Prototype them.
12616 * src/parse-skel.y: Add the license notice.
12617 Include output.h and skeleton.h.
12618 (process_skeleton): Returns void, and takes a single parameter.
12619 * src/scan-skel.l: Add the license notice.
12620 Include skeleton.h.
12621 Don't use %option yylineno: it seems that then Flex imagines
12622 REJECT has been used, and therefore it won't reallocate its
12623 buffers (which makes no other sense to me than a bug). It results
12624 in warnings for `unused: yy_flex_realloc'.
12625
9b3add5b
RA
126262001-12-30 Robert Anisko <robert.anisko@epita.fr>
12627
12628 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12629 (MUSCLE_INSERT_PREFIX): ...to there.
12630 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12631 (MUSCLE_INSERT_PREFIX): Move from here...
12632
12633 * src/bison.hairy: Add a section directive. Put braces around muscle
12634 names. This parser skeleton is still broken, but Bison should not
12635 choke on a bad muscle 'syntax'.
12636 * src/bison.simple: Add a section directive. Put braces around muscle
12637 names.
12638
12639 * src/files.h (strsuffix, stringappend): Add declarations.
12640 (tab_extension): Add declaration.
12641 (short_base_name): Add declaration.
12642
12643 * src/files.c (strsuffix, stringappend): No longer static. These
12644 functions are used in the skeleton parser.
12645 (tab_extension): New.
12646 (compute_base_names): Use the computations done in this function
fab5b110 12647 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
12648 names.
12649 (short_base_name): No longer static.
12650
12651 * src/output.c (output_skeleton): New.
12652 (output): Disable call to output_master_parser, and give a try to
12653 a new skeleton handling system.
12654 (guards_output, actions_output): No longer static.
12655 (token_definitions_output, get_lines_number): No longer static.
12656
12657 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12658
fab5b110 12659 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
12660 parse-skel.y.
12661
12662 * src/parse-skel.y: New file.
12663 * src/scan-skel.l: New file.
12664
b5b61c61
AD
126652001-12-29 Akim Demaille <akim@epita.fr>
12666
12667 %name-prefix is broken.
12668
12669 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12670 Adjust all dependencies.
12671 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12672 %name-prefix.
12673
12674 Renaming yylval but not yylloc is not consistent. Now we do.
12675
12676 * src/bison.simple: Prefix yylloc if used.
12677 * doc/bison.texinfo (Decl Summary): Document that.
12678
8c9a50be
AD
126792001-12-29 Akim Demaille <akim@epita.fr>
12680
12681 * doc/bison.texinfo: Promote `%long-directive' over
12682 `%long_directive'.
12683 Remove all references to fixed-output-files, yacc is enough.
12684
d99361e6
AD
126852001-12-29 Akim Demaille <akim@epita.fr>
12686
12687 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12688 user prologue. These are defaults.
12689 * tests/actions.at (Mid-rule actions): Make sure the user can
12690 define YYDEBUG and YYERROR_VERBOSE.
12691
b9cecb91
AD
126922001-12-29 Akim Demaille <akim@epita.fr>
12693
12694 * src/output.c (header_output): Don't forget to export YYLTYPE and
12695 yylloc.
12696 * tests/headers.at (export YYLTYPE): New, make sure it does.
12697 * tests/regression.at (%union and --defines, Invalid CPP headers):
12698 Move to...
12699 * tests/headers.at: here.
12700
aea13e97
AD
127012001-12-29 Akim Demaille <akim@epita.fr>
12702
12703 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12704
931394cb
AD
127052001-12-29 Akim Demaille <akim@epita.fr>
12706
12707 * tests/actions.at (Mid-rule actions): Output on a single line
12708 instead of several.
12709
704a47c4
AD
127102001-12-29 Akim Demaille <akim@epita.fr>
12711
12712 * doc/bison.texinfo: Formatting changes.
12713
091e20bb
AD
127142001-12-29 Akim Demaille <akim@epita.fr>
12715
12716 Don't store the token defs in a muscle, just be ready to output it
12717 on command. Now possible via `symbols'. Fixes a memory leak.
12718
12719 * src/output.c (token_definitions_output): New.
12720 (output_parser, header_output): Use it.
12721 * src/reader.c (symbols_save): Remove.
12722
cce71710
AD
127232001-12-29 Akim Demaille <akim@epita.fr>
12724
12725 * src/bison.simple: Do not provide a default for YYSTYPE and
12726 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12727 default.
12728
82c035a8
AD
127292001-12-29 Akim Demaille <akim@epita.fr>
12730
12731 Mid-rule actions are simply... ignored!
12732
12733 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12734 the empty-rule associated to the dummy symbol, not to the host
12735 rule.
12736 * tests/actions.at (Mid-rule actions): New.
12737
8419d367
AD
127382001-12-29 Akim Demaille <akim@epita.fr>
12739
12740 Memory leak.
12741
12742 * src/reader.c (reader): Free grammar.
12743
375d5806
AD
127442001-12-29 Akim Demaille <akim@epita.fr>
12745
12746 Memory leak.
12747
12748 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12749 since it allocates it for each state, although only one is needed.
12750 (allocate_storage): Do it here.
12751
f51cb8ff
AD
127522001-12-29 Akim Demaille <akim@epita.fr>
12753
12754 * src/options.h, src/options.c (create_long_option_table): Rename
12755 as...
12756 (long_option_table_new): this, with a clearer prototype.
12757 (percent_table): Remove, unused,
12758 * src/getargs.c (getargs): Adjust.
12759
29e88316
AD
127602001-12-29 Akim Demaille <akim@epita.fr>
12761
12762 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12763 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12764 as states.
12765
b9f71f19
AD
127662001-12-29 Akim Demaille <akim@epita.fr>
12767
12768 * src/lalr.c (build_relations): Rename `states' as `states1'.
12769 Sorry, I don't understand exactly what it is, no better name...
12770
1a2b5d37
AD
127712001-12-29 Akim Demaille <akim@epita.fr>
12772
12773 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12774 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12775 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12776 as rules.
12777
1cca533e
AD
127782001-12-29 Akim Demaille <akim@epita.fr>
12779
12780 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12781 ago.
12782
c03ae966
AD
127832001-12-29 Akim Demaille <akim@epita.fr>
12784
12785 * src/reader.c, src/reader.h (user_toknums): Remove.
12786 Adjust all users to use symbols[i]->user_token_number.
12787
5a670b1e
AD
127882001-12-29 Akim Demaille <akim@epita.fr>
12789
12790 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12791 Adjust all users to use symbols[i]->prec or ->assoc.
12792
ad949da9
AD
127932001-12-29 Akim Demaille <akim@epita.fr>
12794
12795 * src/reader.c, src/reader.h (tags): Remove.
12796 Adjust all users to use symbols[i]->tag.
12797
0e78e603
AD
127982001-12-29 Akim Demaille <akim@epita.fr>
12799
12800 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12801 and rule_table.
12802 * src/reader.c (packsymbols): Fill this table.
12803 Drop sprec.
12804 * src/conflicts.c (resolve_sr_conflict): Adjust.
12805 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12806 single table.
12807 Use symbols[i]->tag instead of tags[i].
12808
213e640e
AD
128092001-12-29 Akim Demaille <akim@epita.fr>
12810
12811 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12812 In addition, put a comment in there, to replace...
12813 * tests/regression.at (%union and C comments): Remove.
12814
e7b8bef1
AD
128152001-12-29 Akim Demaille <akim@epita.fr>
12816
12817 * tests/regression.at (Web2c Actions): Blindly move the actual
12818 output as expected output. The contents *seem* right to me, but I
12819 can't pretend reading perfectly parser tables... Nonetheless, all
12820 the other tests pass correctly, the table look OK, even though the
12821 presence of `$axiom' is to be noted: AFAICS it is useless (but
12822 harmless).
12823
b68e7744
AD
128242001-12-29 Akim Demaille <akim@epita.fr>
12825
12826 * src/reader.c (readgram): Don't add the rule 0 if there were no
12827 rules read. In other words, add it _after_ having performed
12828 grammar sanity checks.
12829 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12830
78d5bae9
AD
128312001-12-29 Akim Demaille <akim@epita.fr>
12832
12833 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12834 visible, and some states have now a different number.
12835
ff442794
AD
128362001-12-29 Akim Demaille <akim@epita.fr>
12837
12838 * src/reader.c (readgram): Bind the initial rule's lineno to that
12839 of the first rule.
12840 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12841 (Solved SR Conflicts): Adjust rule 0's line number.
12842
610ab194
AD
128432001-12-29 Akim Demaille <akim@epita.fr>
12844
12845 Fix the `GAWK Grammar' failure.
12846
12847 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12848 the reductions of the first state which was mistakenly confused
12849 with the final state because precisely final_state was initialized
12850 to 0.
12851 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12852 now noticed by Bison.
12853 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12854 have a reduction on $default.
12855
29d29c8f
AD
128562001-12-29 Akim Demaille <akim@epita.fr>
12857
12858 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12859 rule line numbers.
12860 * src/closure.c (print_closure): Likewise.
12861 * src/derives.c (print_derives): Likewise.
12862 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12863 now.
12864
7c6b64d0
AD
128652001-12-29 Akim Demaille <akim@epita.fr>
12866
12867 * src/lalr.c (lookaheads_print): New.
12868 (lalr): Call it when --trace-flag.
12869 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12870 are dumped.
12871
3d4daee3
AD
128722001-12-29 Akim Demaille <akim@epita.fr>
12873
12874 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12875 when walking through ritem, even via rule->rhs.
12876 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12877 (useful_production, useless_nonterminals): Likewise.
12878 (reduce_grammar_tables): Likewise, plus update nritems.
12879 * src/nullable.c (set_nullable): Likewise.
12880 * src/lalr.c (build_relations): Likewise.
12881 * tests/sets.at (Nullable): Adjust.
12882 Fortunately, now, the $axiom is no longer nullable.
12883
9e7f6bbd
AD
128842001-12-29 Akim Demaille <akim@epita.fr>
12885
12886 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12887 the 0-sentinel.
12888 * src/gram.c (ritem_longest_rhs): Likewise.
12889 * src/reduce.c (nonterminals_reduce): Likewise.
12890 * src/print_graph.c (print_graph): Likewise.
12891 * src/output.c (output_rule_data): Likewise.
12892 * src/nullable.c (set_nullable): Likewise.
12893
255ef638
AD
128942001-12-29 Akim Demaille <akim@epita.fr>
12895
12896 * src/output.c: Comment changes.
12897
0d8a7363
AD
128982001-12-27 Paul Eggert <eggert@twinsun.com>
12899
12900 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12901 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12902 Sparc, as they were causing more porting problems than the
12903 (minor) performance improvement was worth.
12904
12905 Also, catch up with 1.31's YYSTD.
12906
3db472b9
AD
129072001-12-27 Akim Demaille <akim@epita.fr>
12908
12909 * src/output.c (output_gram): Rely on nritems, not the
12910 0-sentinel. See below.
12911 Use -1 as separator, not 0.
12912 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12913 Rely on -1 as separator in yyrhs, instead of 0.
12914 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12915 twice `Now at end of input', therefore there are two lines less to
12916 expect.
12917
b365aa05
AD
129182001-12-27 Akim Demaille <akim@epita.fr>
12919
12920 * tests/regression.at (Unresolved SR Conflicts):
12921 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12922 below.
12923
30171f79
AD
129242001-12-27 Akim Demaille <akim@epita.fr>
12925
12926 * src/LR0.c (new_state): Recognize the final state by the fact it
12927 is reached by eoftoken.
12928 (insert_start_shifting_state, insert_eof_shifting_state)
12929 (insert_accepting_state, augment_automaton): Remove, since now
12930 these states are automatically computed from the initial state.
12931 (generate_states): Adjust.
12932 * src/print.c: When reporting a rule number to the user, substract
12933 1, so that the axiom rule is rule 0, and the first user rule is 1.
12934 * src/reduce.c: Likewise.
12935 * src/print_graph.c (print_core): For the time being, just as for
12936 the report, depend upon --trace-flags to dump the full set of
12937 items.
12938 * src/reader.c (readgram): Once the grammar read, insert the rule
12939 0: `$axiom: START-SYMBOL $'.
12940 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12941 number of the states has changed (the final state is no longer
12942 necessarily the last), catch up.
12943
75142d45
AD
129442001-12-27 Akim Demaille <akim@epita.fr>
12945
12946 Try to make the use of the eoftoken valid. Given that its value
12947 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12948 is used instead of > 0 where appropriate, (ii), depend upon nritems
12949 instead of the 0-sentinel.
12950
12951 * src/gram.h, src/gram.c (nritems): New.
12952 Expected to be duplication of nitems, but for the time being...
12953 * src/reader.c (packgram): Assert nritems and nitems are equal.
12954 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12955 * src/closure.c (print_closure, print_fderives): Likewise.
12956 * src/gram.c (ritem_print): Likewise.
12957 * src/print.c (print_core, print_grammar): Likewise.
12958 * src/print_graph.c: Likewise.
12959
b7c49edf
AD
129602001-12-27 Akim Demaille <akim@epita.fr>
12961
12962 * src/main.c (main): If there are complains after grammar
12963 reductions, then output the report anyway if requested, then die.
12964 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12965 * src/reader.c (eoftoken): New.
12966 (parse_token_decl): If the token being defined has value `0', it
12967 is the eoftoken.
12968 (packsymbols): No longer hack `tags' to insert `$' by hand.
12969 Be sure to preserve the value of the eoftoken.
12970 (reader): Make sure eoftoken is defined.
12971 Initialize nsyms to 0: now eoftoken is created just like the others.
12972 * src/print.c (print_grammar): Don't special case the eof token.
12973 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12974 lie anyway, albeit pleasant.
12975 * tests/calc.at: Exercise error messages with eoftoken.
12976 Change the grammar so that empty input is invalid.
12977 Adjust expectations.
12978 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12979
ec2da99f
AD
129802001-12-27 Akim Demaille <akim@epita.fr>
12981
12982 * configure.in: Check the protos of strchr ans strspn.
12983 Replace strchr if needed.
12984 * src/system.h: Provide the protos of strchr, strspn and memchr if
12985 missing.
12986 * lib/strchr.c: New.
12987 * src/reader.c (symbols_save): Use strchr.
12988
8adfa272
AD
129892001-12-27 Akim Demaille <akim@epita.fr>
12990
12991 * src/print.c, src/print_graph.c (escape): New.
12992 Use it to quote the TAGS outputs.
12993 * src/print_graph.c (print_state): Now errors are in red, and
12994 reductions in green.
12995 Prefer high to wide: output the state number on a line of its own.
12996
80dac38c
AD
129972001-12-27 Akim Demaille <akim@epita.fr>
12998
12999 * src/state.h, src/state.c (reductions_new): New.
13000 * src/LR0.c (set_state_table): Let all the states have a
13001 `reductions', even if reduced to 0.
13002 (save_reductions): Adjust.
13003 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13004 * src/print.c (print_reductions, print_actions): Adjust.
13005 * src/output.c (action_row): Adjust.
13006
2cec70b9
AD
130072001-12-27 Akim Demaille <akim@epita.fr>
13008
13009 * src/state.h, src/state.c (errs_new, errs_dup): New.
13010 * src/LR0.c (set_state_table): Let all the states have an errs,
13011 even if reduced to 0.
13012 * src/print.c (print_errs, print_reductions): Adjust.
13013 * src/output.c (output_actions, action_row): Adjust.
13014 * src/conflicts.c (resolve_sr_conflict): Adjust.
13015
13ca549a
AD
130162001-12-27 Akim Demaille <akim@epita.fr>
13017
13018 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13019
5092aba5
AD
130202001-12-27 Akim Demaille <akim@epita.fr>
13021
13022 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13023 * src/print.c: here.
13024 (lookaheadset, shiftset): New, used as additional storage by
13025 print_reductions.
13026 (print_results): Adjust.
13027 (print_shifts, print_gotos, print_errs): New, extracted from...
13028 (print_actions): here.
13029 * src/print_graph.c (print_actions): Remove dead code.
13030
11e2beca
AD
130312001-12-27 Akim Demaille <akim@epita.fr>
13032
13033 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13034 `$n' and `@n'.
13035
dac3c910
AD
130362001-12-27 Akim Demaille <akim@epita.fr>
13037
13038 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13039 (build_relations): Adjust.
13040
d0b0fefa
AD
130412001-12-27 Akim Demaille <akim@epita.fr>
13042
13043 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13044 duplication.
13045
adc8c848
AD
130462001-12-27 Akim Demaille <akim@epita.fr>
13047
13048 * src/reader.c (packgram): Catch nitems overflows.
13049
14d293ac
AD
130502001-12-27 Akim Demaille <akim@epita.fr>
13051
13052 * src/files.c, src/files.h (guard_obstack): Remove.
13053 * src/output.c (output): Adjust.
13054 * src/reader.c (parse_braces): New, factoring...
13055 (copy_action, copy_guard): these two which are renamed as...
13056 (parse_action, parse_guard): these.
13057 As a voluntary consequence, using braces around guards is now
13058 mandatory.
13059
f499b062
AD
130602001-12-27 Akim Demaille <akim@epita.fr>
13061
13062 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
13063 * src/reader.c (symbol_list): `guard' and `guard_line' are new
13064 members.
13065 (symbol_list_new): Adjust.
13066 (copy_action): action_line is the first line, not the last.
13067 (copy_guard): Just as for actions, store the `action' only, not
13068 the switch/case/break flesh.
13069 Don't parse the user action that might follow the guard, let...
13070 (readgram): do it, i.e., now, there can be an action after a
13071 guard.
13072 In other words the guard is just explicitly optional.
13073 (packgram): Adjust.
13074 * src/output.c (guards_output): New.
13075 (output_parser): Call it when needed.
13076 (output): Also free the guard and attrs obstacks.
13077 * src/files.c, src/files.h (obstack_save): Remove.
13078 (output_files): Remove.
13079 As a result, if one needs the former `.act' file, using an
13080 appropriate skeleton which requires actions and guards is now
13081 required.
13082 * src/main.c (main): Adjust.
13083 * tests/semantic.at: New.
13084 * tests/regression.at: Use `input.y' as input file name.
13085 Avoid 8+3 problems by requiring input.c when the test needs the
13086 parser.
13087
d945f5cd
AD
130882001-12-27 Akim Demaille <akim@epita.fr>
13089
13090 * src/reader.c (symbol_list_new): Be sure to initialize all the
13091 fields.
13092
d200e455
AD
130932001-12-27 Akim Demaille <akim@epita.fr>
13094
13095 All the hacks using a final pseudo state are now useless.
13096
13097 * src/LR0.c (set_state_table): state_table holds exactly nstates.
13098 * src/lalr.c (nLA): New.
13099 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
13100 instead of lookaheadsp from the pseudo state (nstate + 1).
13101
f9507c28
AD
131022001-12-27 Akim Demaille <akim@epita.fr>
13103
13104 * src/output.c (action_row, token_actions): Use a state_t instead
13105 of a integer, and nlookaheads instead of the following state's
13106 lookaheadsp.
13107
065fbd27
AD
131082001-12-27 Akim Demaille <akim@epita.fr>
13109
13110 * src/conflicts.c (log_resolution, flush_shift)
13111 (resolve_sr_conflict, set_conflicts, solve_conflicts)
13112 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
13113 (conflicts_print, print_reductions): Use a state_t instead of an
13114 integer when referring to a state.
13115 As much as possible, depend upon nlookaheads, instead of the
13116 `lookaheadsp' member of the following state (since lookaheads of
13117 successive states are successive, the difference between state n + 1
13118 and n served as the number of lookaheads for state n).
13119 * src/lalr.c (add_lookback_edge): Likewise.
13120 * src/print.c (print_core, print_actions, print_state)
13121 (print_results): Likewise.
13122 * src/print_graph.c (print_core, print_actions, print_state)
13123 (print_graph): Likewise.
13124 * src/conflicts.h: Adjust.
13125
1b177bd7
AD
131262001-12-27 Akim Demaille <akim@epita.fr>
13127
13128 * src/bison.hairy: Formatting/comment changes.
13129 ANSIfy.
13130 Remove `register' indications.
13131 Add plenty of `static'.
13132
7742ddeb
AD
131332001-12-27 Akim Demaille <akim@epita.fr>
13134
13135 * src/output.c (prepare): Drop the muscle `ntbase' which
13136 duplicates ntokens.
13137 * src/bison.simple: Formatting/comment changes.
13138 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
13139 is an undocumented synonym.
13140
1fa14068
AD
131412001-12-22 Akim Demaille <akim@epita.fr>
13142
13143 * src/output.c (output_table_data): Change the prototype to use
13144 `int' for array ranges: some invocations do pass an int, not a
13145 short.
13146 Reported by Wayne Green.
13147
b9752825
AD
131482001-12-22 Akim Demaille <akim@epita.fr>
13149
13150 Some actions of web2c.y are improperly triggered.
13151 Reported by Mike Castle.
13152
13153 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
13154 * tests/regression.at (Web2c): Rename as...
13155 (Web2c Report): this.
13156 (Web2c Actions): New.
13157
776209d6
AD
131582001-12-22 Akim Demaille <akim@epita.fr>
13159
13160 Reductions in web2c.y are improperly reported.
13161 Reported by Mike Castle.
13162
13163 * src/conflicts.c (print_reductions): Fix.
13164 * tests/regression.at (Web2c): New.
13165
275fc3ad
AD
131662001-12-18 Akim Demaille <akim@epita.fr>
13167
13168 Some host fail on `assert (!"foo")', which expands to
13169 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
13170 Reported by Nelson Beebee.
13171
13172 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
13173 `#define it_succeeded 0' and `assert (it_succeeded)'.
13174
897668ee
MA
131752001-12-17 Marc Autret <autret_m@epita.fr>
13176
13177 * src/bison.simple: Don't hard code the skeleton line and filename.
13178 * src/output.c (output_parser): Rename 'line' as 'output_line'.
13179 New line counter 'skeleton_line' (skeleton-line muscle).
13180
ab3399e0
PE
131812001-12-17 Paul Eggert <eggert@twinsun.com>
13182
13183 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
13184 YYDEBUG must be defined to a nonzero value.
13185
13186 * src/bison.simple (yytname): Do not assume that the user defines
13187 YYDEBUG to a properly parenthesized expression.
13188
3877f72b
AD
131892001-12-17 Akim Demaille <akim@epita.fr>
13190
13191 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
13192 nlookaheads is a new member.
13193 Adjust all users.
13194 * src/lalr.h (nlookaheads): Remove this orphan declaration.
13195 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
13196 state.
776209d6 13197
331dbc1b
AD
131982001-12-17 Akim Demaille <akim@epita.fr>
13199
13200 * src/files.h, src/files.c (open_files, close_files): Remove.
13201 * src/main.c (main): Don't open/close files, nor invoke lex_free,
13202 let...
13203 * src/reader.c (reader): Do it.
776209d6 13204
be750e4c
AD
132052001-12-17 Akim Demaille <akim@epita.fr>
13206
13207 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 13208
709ae8c6
AD
132092001-12-17 Akim Demaille <akim@epita.fr>
13210
13211 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
13212 (flush_reduce): New.
13213 (resolve_sr_conflict): Adjust.
776209d6 13214
f87685c3
AD
132152001-12-17 Akim Demaille <akim@epita.fr>
13216
13217 * src/output.c (output_obstack): Be static and rename as...
13218 (format_obstack): this, to avoid any confusion with files.c's
13219 output_obstack.
13220 * src/reader.h (muscle_obstack): Move to...
13221 * src/output.h: here, since it's defined in output.c.
13222
837491d8
AD
132232001-12-17 Akim Demaille <akim@epita.fr>
13224
13225 * src/output.c (action_row, save_column, default_goto)
13226 (sort_actions, matching_state, pack_vector): Better variable
13227 locality.
13228
796d61fb
AD
132292001-12-17 Akim Demaille <akim@epita.fr>
13230
13231 * src/output.c: Various formatting changes.
776209d6 13232
64d15509
AD
132332001-12-17 Akim Demaille <akim@epita.fr>
13234
13235 * src/files.c (output_files): Free the output_obstack.
13236 * src/main.c (main): Call print and print_graph conditionally.
13237 * src/print.c (print): Work unconditionally.
13238 * src/print_graph.c (print_graph): Work unconditionally.
13239 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13240
fbc8ecb7
MA
132412001-12-16 Marc Autret <autret_m@epita.fr>
13242
13243 * src/output.c (actions_output): Fix. When we use %no-lines,
13244 there is one less line per action.
13245
f0440388
MA
132462001-12-16 Marc Autret <autret_m@epita.fr>
13247
13248 * src/bison.simple: Remove a useless #line directive.
13249 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13250 * src/output.c (get_lines_number): New.
776209d6 13251 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
13252 output muscles.
13253 Fix line numbering.
13254 (actions_output): Computes the number of lines taken by actions.
13255 (output_master_parser): Insert new skeleton which is the name of
13256 the output parser file name.
13257
a79986b8
MA
132582001-12-15 Marc Autret <autret_m@epita.fr>
13259
13260 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13261
4ec8e00f
MA
132622001-12-15 Marc Autret <autret_m@epita.fr>
13263
13264 * src/output.c (output_gram): Keep track of the hairy one.
13265
1a4648ff
AD
132662001-12-15 Akim Demaille <akim@epita.fr>
13267
13268 Make `make distcheck' work.
13269
13270 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13271 system.h which uses libgettext.h.
13272
9c2c67e6
AD
132732001-12-15 Akim Demaille <akim@epita.fr>
13274
13275 * src/nullable.c (set_nullable): Useless rules must be skipped,
13276 otherwise, since we range over their symbols, we might look at a
13277 nonterminal which no longer ``exists'', i.e., it is not counted in
13278 `nvars', hence we overflow our arrays.
13279
93ede233
AD
132802001-12-15 Akim Demaille <akim@epita.fr>
13281
13282 The header can also be produced directly, without any obstack!
13283 Yahoo!
13284
13285 * src/files.c, src/files.h (defines_obstack): Remove.
13286 (compute_header_macro): Global.
13287 (defines_obstack_save): Remove.
13288 * src/reader.c (parse_union_decl): No longer output to
13289 defines_obstack: its content can be found in the `stype' muscle
13290 anyway.
13291 (output_token_translations): Merge into...
13292 (symbols_output): this.
13293 Rename as...
13294 (symbols_save): this.
13295 (reader): Adjust.
13296 * src/output.c (header_output): New.
13297 (output): Call it.
13298
2666f928
AD
132992001-12-15 Akim Demaille <akim@epita.fr>
13300
13301 * src/reader.c (parse_union_decl): Instead of handling two obstack
13302 simultaneously, use one to define the `stype' muscle, and use the
13303 value of the latter to fill defines_obstack.
13304 (copy_comment): Remove.
13305 (copy_comment2): Work for a single obstack.
13306 Rename as...
13307 (copy_comment): this.
13308
428046f8
AD
133092001-12-15 Akim Demaille <akim@epita.fr>
13310
13311 * src/lex.c, src/lex.h (xgetc): No longer static.
13312 * src/reader.c (parse_union_decl): Revamp.
13313
ea52d706
AD
133142001-12-15 Akim Demaille <akim@epita.fr>
13315
13316 Still making progress in separating Bison into (i) input, (ii)
13317 process, (iii) output: now we can directly output the parser file
13318 without using table_obstack at all.
13319
13320 * src/files.c, src/files.h (table_obstack): Bye bye.
13321 (parser_file_name): New.
13322 * src/files.c (compute_output_file_names): Compute it.
13323 * src/output.c (actions_output, output_parser)
13324 (output_master_parser): To a file instead of an obstack.
13325
3f96f4dc
AD
133262001-12-15 Akim Demaille <akim@epita.fr>
13327
13328 Attach actions to rules, instead of pre-outputting them to
13329 actions_obstack.
13330
13331 * src/gram.h (rule_t): action and action_line are new members.
13332 * src/reader.c (symbol_list): Likewise.
13333 (copy_action): Save the actions within the rule.
13334 (packgram): Save them in rule_table.
13335 * src/output.c (actions_output): New.
13336 (output_parser): Use it on `%%actions'.
13337 (output_rule_data): Don't free rule_table.
13338 (output): Do it.
13339 (prepare): Don't save the `action' muscle.
13340 * src/bison.simple: s/%%action/%%actions/.
13341
51576fb3
AD
133422001-12-15 Akim Demaille <akim@epita.fr>
13343
13344 * src/reader.c (copy_action): When --yacc, don't append a `;'
13345 to the user action: let it fail if lacking.
dee049eb 13346 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 13347
2648a72d
AD
133482001-12-14 Akim Demaille <akim@epita.fr>
13349
13350 * src/lex.c (literalchar): Simply return the char you decoded, non
13351 longer mess around with obstacks and int pointers.
13352 Adjust all callers.
13353
92790e5b
AD
133542001-12-14 Akim Demaille <akim@epita.fr>
13355
13356 * src/lex.c (literalchar): Don't escape the special characters,
13357 just decode them, and keep them as char (before, eol was output as
13358 the 2 char string `\n' etc.).
13359 * src/output.c (output_rule_data): Use quotearg to output the
13360 token strings.
13361
927c1557
PE
133622001-12-13 Paul Eggert <eggert@twinsun.com>
13363
13364 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13365 Do not infringe on the global user namespace when using C++.
13366 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13367 All uses of `fprintf' and `stderr' changed.
13368
13369 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13370
ed8e1f68
AD
133712001-12-13 Akim Demaille <akim@epita.fr>
13372
13373 The computation of nullable is broken: it doesn't handle empty
13374 RHS's properly.
13375
13376 * tests/torture.at (GNU AWK Grammar): New.
13377 * tests/sets.at (Nullable): New.
13378 * src/nullable.c (set_nullable): Instead of blindly looping over
13379 `ritems', loop over the rules, and then over their rhs's.
13380
13381 Work around Autotest bugs.
13382
13383 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13384 frame, because Autotest understand lines starting with a `+' as
13385 traces from the shell. Then, they are not processed properly.
13386 Admittedly an Autotest bug, but we don't have time to wait for
13387 Autotest to catch up.
13388 * tests/regression.at (Broken Closure): Adjust to the new table
13389 frames.
13390 Move to...
13391 * tests/sets.at: here.
13392
cb581495
AD
133932001-12-13 Akim Demaille <akim@epita.fr>
13394
13395 * src/closure.c (closure): Use nrules instead of playing tricks
13396 with BITS_PER_WORD.
13397
2e729273
AD
133982001-12-13 Akim Demaille <akim@epita.fr>
13399
13400 * src/print.c (print_actions): Output the handling of `$' as the
13401 traces do: shifting the token EOF. Before EOF was treated as a
13402 nonterminal.
13403 * tests/regression.at: Adjust some tests.
13404 * src/print_graph.c (print_core): Complete the set of items via
13405 closure. The next-to-final and final states are still unsatisfying,
13406 but that's to be addressed elsewhere.
13407 No longer output the rule numbers, but do output the state number.
13408 A single loop for the shifts + gotos is enough, but picked a
13409 distinct color for each.
13410 (print_graph): Initialize and finalize closure.
13411
107f7dfb
AD
134122001-12-13 Akim Demaille <akim@epita.fr>
13413
13414 * src/reader.c (readgram): Remove dead code, an strip useless
13415 braces.
13416 (get_type): Remove, unused.
13417
9b53a24f
AD
134182001-12-12 Akim Demaille <akim@epita.fr>
13419
13420 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13421 on that of lib/error.c.
13422
dbfb6dcd
AD
134232001-12-12 Akim Demaille <akim@epita.fr>
13424
13425 Some hosts don't like `/' in includes.
13426
13427 * src/system.h: Include libgettext.h without qualifying the path.
13428 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13429 $(top_srcdir).
13430
c25fb648
MA
134312001-12-11 Marc Autret <autret_m@epita.fr>
13432
13433 * src/output.c (output_parser): Remove useless muscle.
13434
710ddc4f
MA
134352001-12-11 Marc Autret <autret_m@epita.fr>
13436
13437 * src/bison.simple: Remove #line just before %%epilogue. It
13438 is now handled in ...
13439 * src/reader.c (read_additionnal_code): Add the output of a
13440 #line for the epilogue.
13441
e83d80b8
MA
134422001-12-10 Marc Autret <autret_m@epita.fr>
13443
927c1557 13444 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
13445 replace precedent remove.
13446 * src/bison.simple: Remove #line before %%prologue because
13447 %%input-line is wrong at this time.
13448
971d5158
MA
134492001-12-10 Marc Autret <autret_m@epita.fr>
13450
13451 * src/reader.c (symbols_output): Clean up.
927c1557 13452 * src/output.c (output_gram, output): Clean up.
971d5158 13453
5edafffd
AD
134542001-12-10 Akim Demaille <akim@epita.fr>
13455
13456 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13457 * src/LR0.c (set_state_table): here.
13458 * src/lalr.c (lalr): Call it.
13459
0279f8e9
AD
134602001-12-10 Akim Demaille <akim@epita.fr>
13461
13462 * src/state.h (shifts): Remove the `number' member: shifts are
13463 attached to state, hence no longer need to be labelled with a
13464 state number.
13465
190c4f5f
AD
134662001-12-10 Akim Demaille <akim@epita.fr>
13467
13468 Now that states have a complete set of members, the linked list of
13469 shifts is useless: just fill directly the state's shifts member.
13470
13471 * src/state.h (shifts): Remove the `next' member.
13472 * src/LR0.c (first_state, last_state): Remove.
13473 Adjust the callers.
13474 (augment_automaton): Don't look for the shifts that must be added
13475 a shift on EOF: it is those of the state we looked for! But now,
13476 since shifts are attached, it is no longer needed to looking
13477 merely by its id: its number.
13478
2a73b93d
AD
134792001-12-10 Akim Demaille <akim@epita.fr>
13480
13481 * src/LR0.c (augment_automaton): Better variable locality.
13482 Remove an impossible branch: if there is a state corresponding to
13483 the start symbol being shifted, then there is shift for the start
13484 symbol from the initial state.
13485
74392f6a
AD
134862001-12-10 Akim Demaille <akim@epita.fr>
13487
13488 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13489 only when appropriate: when insert_start_shifting_state' is not
13490 invoked.
13491 * tests/regression.at (Rule Line Numbers): Adjust.
13492
37c82725
AD
134932001-12-10 Akim Demaille <akim@epita.fr>
13494
13495 * src/LR0.c (augment_automaton): Now that all states have shifts,
13496 merge the two cases addition shifts to the initial state.
13497
6a164e0c
AD
134982001-12-10 Akim Demaille <akim@epita.fr>
13499
13500 * src/lalr.c (set_state_table): Move to...
13501 * src/LR0.c: here.
13502 * src/lalr.c (lalr): Don't call it...
13503 * src/LR0.c (generate_states): do it.
13504 * src/LR0.h (first_state): Remove, only the table is used.
13505
7215de24
AD
135062001-12-10 Akim Demaille <akim@epita.fr>
13507
13508 * src/LR0.h (first_shift, first_reduction): Remove.
13509 * src/lalr.c: Don't use first_shift: find shifts through the
13510 states.
13511
80e25d4d
AD
135122001-12-10 Akim Demaille <akim@epita.fr>
13513
13514 * src/LR0.c: Attach shifts to states as soon as they are
13515 computed.
13516 * src/lalr.c (set_state_table): Instead of assigning shifts to
13517 state, just assert that the mapping was properly done.
13518
0ab3728b
AD
135192001-12-10 Akim Demaille <akim@epita.fr>
13520
13521 * src/LR0.c (insert_start_shift): Rename as...
13522 (insert_start_shifting_state): this.
13523 (insert_eof_shifting_state, insert_accepting_state): New.
13524 (augment_automaton): Adjust.
13525 Better locality of the variables.
13526 When looking if the start_symbol is shifted from the initial
13527 state, using `while (... symbol != start_symbol ...)' sounds
13528 better than `while (... symbol < start_symbol ...)': If fail
13529 to see how the order between symbols could be relevant!
13530
78af9bbc
AD
135312001-12-10 Akim Demaille <akim@epita.fr>
13532
13533 * src/getargs.h: Don't declare `spec_name_prefix' and
13534 `spec_file_prefix', declared by src/files.h.
13535 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13536 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13537 * src/output.c (prepare): Adjust.
13538 * src/reader.c (symbols_output): Likewise.
13539 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13540
bdef2a41
AD
135412001-12-10 Akim Demaille <akim@epita.fr>
13542
13543 * src/muscle_tab.c (muscle_init): NULL is a better default than
13544 `"0"'.
13545
3735969c
AD
135462001-12-10 Akim Demaille <akim@epita.fr>
13547
13548 * src/reader.c (reader): Calling symbols_output once is enough.
13549
49701457
AD
135502001-12-10 Akim Demaille <akim@epita.fr>
13551
13552 Now that states have a complete set of members, the linked list of
13553 reductions is useless: just fill directly the state's reductions
13554 member.
13555
13556 * src/state.h (struct reductions): Remove member `number' and
13557 `next'.
13558 * src/LR0.c (first_reduction, last_reduction): Remove.
13559 (save_reductions): Don't link the new reductions, store them in
13560 this_state.
13561 * src/lalr.c (set_state_table): No need to attach reductions to
13562 states, it's already done.
13563 * src/output.c (output_actions): No longer free the shifts, then
13564 the reductions, then the states: free all the states and their
13565 members.
13566
0edad749
AD
135672001-12-10 Akim Demaille <akim@epita.fr>
13568
13569 * src/options.c (OPTN, DRTV, BOTH): New.
13570 (option_table): Use them.
13571
0edad749
AD
13572 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13573 the job of system.h.
13574 * src/options.c: Don't include stdio.h and xalloc.h for the same
13575 reasons.
13576
5449dd0f
AD
135772001-12-10 Akim Demaille <akim@epita.fr>
13578
13579 * src/output.c (output, prepare): Make sure the values of the
13580 muscles `action' and `prologue' are 0-terminated.
13581
a870c567
AD
135822001-12-10 Akim Demaille <akim@epita.fr>
13583
13584 Clean up GCC warnings.
13585
13586 * src/reader.c (copy_action): `buf' is not used.
13587 (parse_skel_decl): Be static.
13588 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13589 * src/options.h (create_long_option_table): Have a real prototype.
13590 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13591 (hash_delete_at): Return const void *.
13592 Adjust casts to preserve the const.
13593
80df8768
AD
135942001-12-10 Akim Demaille <akim@epita.fr>
13595
13596 * configure.in: Require 2.52g.
13597 M4 is not needed, but AUTOM4TE is.
13598 * m4/m4.m4: Remove.
13599 * tests/Makefile.am: Adjust.
13600
f693ad14
AD
136012001-12-10 Akim Demaille <akim@epita.fr>
13602
13603 One structure for states is enough, even though theoretically
13604 there are LR(0) states and LALR(1) states.
13605
13606 * src/lalr.h (state_t): Remove.
13607 (state_table): Be state_t **, not state_t *.
13608 * src/state.h (core, CORE_ALLOC): Rename as...
13609 (state_t, STATE_ALLOC): this.
13610 Add the LALR(1) members: shifts, reductions, errs.
13611 * src/LR0.c (state_table): Rename as...
13612 (state_hash): this, to avoid name clashes with the global
13613 `state_table'.
13614 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13615 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13616
74ffbcb6
AD
136172001-12-10 Akim Demaille <akim@epita.fr>
13618
13619 Bison dumps core on bash.y.
13620 Reported by Pascal Bart.
13621
13622 * src/warshall.c (bitmatrix_print): New.
13623 (TC): Use it.
ba0fe3c7 13624 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
13625 j must be the outer loop.
13626 * tests/regression.at (Broken Closure): New.
13627
07708e19
AD
136282001-12-05 Akim Demaille <akim@epita.fr>
13629
13630 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13631 its argument.
ba1ecc07 13632 Reported by Peter Hamorsky.
07708e19 13633
92b16366
AD
136342001-12-05 Akim Demaille <akim@epita.fr>
13635
13636 * src/conflicts.c (err_table): Remove.
13637 (resolve_sr_conflict): Adjust.
13638 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13639 Rename as...
13640 (state_t.reductions, state_t.shifts): this.
13641
076ab033
AD
136422001-12-05 Akim Demaille <akim@epita.fr>
13643
13644 * src/reduce.c (reduce_grammar_tables): No longer disable the
13645 removal of useless rules via CPP but via `if (0)', so that the
13646 compiler still check the code is valid.
13647 For instance, it should have noticed `rline' no longer exists: use
13648 the `line' member of rule_t.
13649 * src/gram.c (dummy, rline): Remove, unused.
13650
3843c413
AD
136512001-12-05 Akim Demaille <akim@epita.fr>
13652
13653 * src/output.c (pack_vector): Use assert, not berror.
13654 * src/main.c (berror): Remove, unused.
13655
43168960
AD
136562001-12-05 Akim Demaille <akim@epita.fr>
13657
13658 New experimental feature: if --verbose --trace output all the
13659 items of a state, not only its kernel.
13660
13661 * src/print.c (print_core): If `trace_flag', then invoke closure
13662 before outputting the items of the state (print_core is no longer
13663 a correct name them).
13664 (print_results): Invoke new_closure/free_closure if needed.
13665
b2872512
AD
136662001-12-05 Akim Demaille <akim@epita.fr>
13667
13668 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13669 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13670 (nitemset): for consistency with the rest of the project.
13671
23cbcc6c
AD
136722001-12-05 Akim Demaille <akim@epita.fr>
13673
13674 * src/closure.c (print_closure): Improve.
13675 (closure): Use it for printing input and output.
13676
03ec521c
AD
136772001-12-05 Akim Demaille <akim@epita.fr>
13678
13679 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13680 indexed by nonterminals.
13681
3a7456dd
AD
136822001-12-05 Akim Demaille <akim@epita.fr>
13683
13684 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13685 what it was!).
13686 * src/warshall.h: Remove accidental duplication of the content.
13687
1cbcf2e7
AD
136882001-12-05 Akim Demaille <akim@epita.fr>
13689
13690 * src/closure.c (set_fderives): De-obfuscate.
13691
84182270
AD
136922001-12-05 Akim Demaille <akim@epita.fr>
13693
13694 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13695
3f6f053c
AD
136962001-12-05 Akim Demaille <akim@epita.fr>
13697
13698 * src/closure.c (set_firsts): De-obfuscate.
13699
7a5350ba
AD
137002001-12-05 Akim Demaille <akim@epita.fr>
13701
13702 * src/output.c (action_row): De-obfuscate
13703 using the good o' techniques: arrays not pointers, variable
13704 locality, BITISSET, RESETBIT etc.
13705
d954473d
AD
137062001-12-05 Akim Demaille <akim@epita.fr>
13707
13708 Pessimize the code to simplify it: from now on, all the states
13709 have a valid SHIFTS, which NSHIFTS is possibly 0.
13710
13711 * src/LR0.c (shifts_new): Be global and move to..
13712 * src/state.c, src/state.h: here.
13713 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13714 * src/print_graph: Adjust.
13715
9839bbe5
AD
137162001-12-05 Akim Demaille <akim@epita.fr>
13717
13718 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13719 * src/conflicts.c: Use it.
13720 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13721 incorrectly ``simplified''.
13722
9f136c07
AD
137232001-12-05 Akim Demaille <akim@epita.fr>
13724
13725 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13726 using the good o' techniques: arrays not pointers, variable
13727 locality, BITISSET, RESETBIT etc.
13728
b608206e
AD
137292001-12-05 Akim Demaille <akim@epita.fr>
13730
13731 * src/state.h (SHIFT_SYMBOL): New.
13732 * src/conflicts.c: Use it to deobfuscate.
13733
52afa962
AD
137342001-12-05 Akim Demaille <akim@epita.fr>
13735
13736 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13737 (print_reductions): De-obfuscate using the good o' techniques:
13738 arrays not pointers, variable locality, BITISSET.
13739
e74dc321
AD
137402001-12-05 Akim Demaille <akim@epita.fr>
13741
13742 * src/conflicts.c (print_reductions): Arrays, not pointers.
13743 Use BITISSET.
13744
768fca83
AD
137452001-12-05 Akim Demaille <akim@epita.fr>
13746
13747 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13748
a17e599f
AD
137492001-12-05 Akim Demaille <akim@epita.fr>
13750
13751 * src/conflicts.c (print_reductions): Improve variable locality.
13752
a04bc341
AD
137532001-12-05 Akim Demaille <akim@epita.fr>
13754
13755 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13756
c8ea038e
AD
137572001-12-05 Akim Demaille <akim@epita.fr>
13758
13759 * src/conflicts.c (print_reductions): Improve variable locality.
13760
aa2aab3c
AD
137612001-12-05 Akim Demaille <akim@epita.fr>
13762
13763 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13764 * src/lalr.c: Use them.
13765
b178c8cc
AD
137662001-12-05 Akim Demaille <akim@epita.fr>
13767
13768 * src/LR0.c (augment_automaton): Formatting changes.
13769 Better variable locality.
13770
f67d13aa
AD
137712001-12-05 Akim Demaille <akim@epita.fr>
13772
13773 * src/lalr.c (matrix_print): New.
13774 (transpose): Use it.
13775 Use arrays instead of pointers.
13776
c2713865
AD
137772001-12-05 Akim Demaille <akim@epita.fr>
13778
13779 * src/lalr.c (maxrhs): Move to...
13780 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13781 * src/lalr.c (build_relations): Adjust.
13782
9887c18a
AD
137832001-12-05 Akim Demaille <akim@epita.fr>
13784
13785 * src/lalr.c (transpose): Free the memory allocated to the
13786 argument, as it is replaced by the results by the unique caller.
13787 (build_relations): Merely invoke transpose: it handles the memory
13788 deallocation.
13789 Improve variable locality.
13790 Avoid variables used as mere abbreviations.
13791 (compute_lookaheads): Use arrays instead of pointers.
13792
4d4f699c
AD
137932001-12-05 Akim Demaille <akim@epita.fr>
13794
13795 * src/lalr.c (initialize_F): Improve variable locality.
13796 Avoid variables used as mere abbreviations.
13797
80a69750
AD
137982001-12-05 Akim Demaille <akim@epita.fr>
13799
13800 * src/derives.c (print_derives): Display the ruleno.
13801 * src/lalr.c (initialize_F, transpose): Better variable locality
13802 to improve readability.
13803 Avoid variables used as mere abbreviations.
13804
fe961097
AD
138052001-12-05 Akim Demaille <akim@epita.fr>
13806
13807 * src/lalr.c (traverse): Use arrays instead of pointers.
13808
e3e4e814
AD
138092001-12-05 Akim Demaille <akim@epita.fr>
13810
13811 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13812 the handling of squeue.
13813 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13814
630e182b
AD
138152001-12-05 Akim Demaille <akim@epita.fr>
13816
13817 Because useless nonterminals are now kept alive (instead of being
13818 `destroyed'), we now sometimes examine them, and store information
13819 related to them. Hence we need to know their number, and adjust
13820 memory allocations.
13821
13822 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13823 static.
13824 * src/LR0.c (allocate_itemsets): The memory allocated to
13825 `symbol_count' was used for two different purpose: once to count
13826 the number of occurrences of each symbol, and later reassigned to
13827 `shift_symbol', containing the symbol that can be shifted from a
13828 given state.
13829 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13830 only, and...
13831 (new_itemsets): Allocate `shift_symbol' here.
13832 (allocate_itemsets): symbol_count includes useless nonterminals.
13833 Make room for them.
13834 (free_storage): Use `free', not `XFREE', for pointers that cannot
13835 be null.
13836
81b51460
AD
138372001-12-05 Akim Demaille <akim@epita.fr>
13838
13839 * src/nullable.c (set_nullable): Deobfuscate the handling of
13840 ritem.
13841 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13842
3067fbef
AD
138432001-12-05 Akim Demaille <akim@epita.fr>
13844
13845 * src/gram.c, src/gram.h (ritem_print): New.
13846 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13847 (This useless function was defined only to work around VMS linkers
13848 that can't handle compilation units with variables only).
13849 * src/reduce.c (dump_grammar): Use it to trace the construction of
13850 ritem.
13851
c2bea5f9
PE
138522001-12-04 Paul Eggert <eggert@twinsun.com>
13853
7d27c823
PE
13854 * src/bison.simple (union yyalloc): Change member names
13855 to be the same as the stack names.
13856 (yyparse): yyptr is now union yyalloc *, not char *.
13857 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13858 and may generate better code on some machines.
c2bea5f9
PE
13859 (yystpcpy): Use prototype if __STDC__ is defined, not just
13860 if __cplusplus is defined.
35687a9d 13861
2c8a9dfa
AD
138622001-11-30 Akim Demaille <akim@epita.fr>
13863
13864 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13865 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13866 Gettext doesn't compile cleanly, and dies with -Werror.
13867 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13868 Include WARNING_CFLAGS here.
13869 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13870 before being defined.
13871
f4e421e6
AD
138722001-11-27 Paul Eggert <eggert@twinsun.com>
13873
13874 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13875 First arg is int, not unsigned.
13876 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13877 (SIZE_MAX, UINT_MAX): New macros.
13878 (quotearg_n_options): Abort if N is negative.
13879 Avoid overflow check on hosts where size_t is 64 bits and int
13880 is 32 bits, as overflow is impossible there.
13881 Fix off-by-one typo that caused unnecessary reallocation.
13882
7093d0f5
AD
138832001-11-29 Paul Eggert <eggert@twinsun.com>
13884
13885 Name space cleanup in generated parser.
13886
13887 * doc/bison.texinfo (Bison Parser): Discuss system headers
13888 and their effect on the user name space.
13889
13890 * src/bison.simple:
13891 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13892 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13893 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13894
13895 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13896 on user names when possible.
13897
13898 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13899 Simplify test for whather <alloca.h> exists.
13900
13901 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13902
13903 (<stdio.h>): Include if YYDEBUG.
13904
13905 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13906 ! defined (yyoverflow) && ! defined (yymemcpy).
13907
13908 (yymemcpy, yyparse): Rename local variables as needed so that
13909 they all begin with 'yy'.
13910
13911 (yystrlen, yystpcpy): New functions.
13912
13913 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13914 All uses changed.
13915
13916 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13917 instead of relying on string.h functions. Use YYSTACK_ALLOC
13918 and YYSTACK_FREE instead of malloc and free.
13919
fd51e5ff
AD
139202001-11-30 Akim Demaille <akim@epita.fr>
13921
13922 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13923 before their first uses.
13924 (YYBISON, YYPURE): Move to the top of the output.
13925
7d13ff5f
AD
139262001-11-30 Akim Demaille <akim@epita.fr>
13927
13928 * tests/reduce.at (Useless Nonterminals): Fix.
13929
892a3995
AD
139302001-11-30 Akim Demaille <akim@epita.fr>
13931
13932 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13933 if body instead of `;' to pacify GCC's warnings.
13934
68f1e3ed
AD
139352001-11-30 Akim Demaille <akim@epita.fr>
13936
13937 Instead of mapping the LHS of unused rules to -1, keep the LHS
13938 valid, but flag the rules as invalid.
13939
13940 * src/gram.h (rule_t): `useful' is a new member.
13941 * src/print.c (print_grammar): Adjust.
13942 * src/derives.c (set_derives): Likewise.
13943 * src/reader.c (packgram, reduce_output): Likewise.
13944 * src/reduce.c (reduce_grammar_tables): Likewise.
13945 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13946
d2d1b42b
AD
139472001-11-30 Akim Demaille <akim@epita.fr>
13948
13949 * src/reduce.c (reduce_output): Formatting changes.
13950 * src/print.c (print_results, print_grammar): Likewise.
13951 * tests/regression.at (Rule Line Numbers)
13952 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13953
760b53a8
AD
139542001-11-30 Akim Demaille <akim@epita.fr>
13955
13956 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13957 useless nonterminals, move them at the end of the symbol arrays.
13958 (reduce_output): Adjust.
13959 * tests/reduce.at (Useless Nonterminals): Adjust.
13960
00238958
AD
139612001-11-30 Akim Demaille <akim@epita.fr>
13962
13963 * src/reduce.c: Various comment/formatting changes.
13964 (nonterminals_reduce): New, extracted from...
13965 (reduce_grammar_tables): here.
13966 (reduce_grammar): Call nonterminals_reduce.
13967
396452de
PE
139682001-11-29 Paul Eggert <eggert@twinsun.com>
13969
13970 * src/bison.simple (YYSTACK_REALLOC): Remove.
13971 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13972 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13973 New macros.
13974 (union yyalloc): New type.
13975 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13976 an arbitrary restriction on hosts where size_t is wider than int.
13977
13978 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13979 a parser stack overflow. Allocate just one block of memory for all
13980 three stacks, instead of allocating three blocks; this typically is
13981 faster and reduces fragmentation.
13982
13983 Do not limit the number of items in the stack to a value that fits
13984 in 'int', as this is an arbitrary limit on hosts with 64-bit
13985 size_t and 32-bit int.
13986
147e184c
MA
139872001-11-29 Marc Autret <autret_m@epita.fr>
13988
13989 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13990 of defining YYERROR_VERBOSE.
13991 [AT_DATA]: $4 is now out of C declarations in the prologue.
13992
426cf563
MA
139932001-11-28 Marc Autret <autret_m@epita.fr>
13994
13995 * src/reader.c (parse_dquoted_param): New.
13996 (parse_skel_decl): Use it.
13997 * src/lex.h: Add its prototype.
13998 * src/lex.c (literalchar): Become not static.
13999
c7925b99
MA
140002001-11-28 Marc Autret <autret_m@epita.fr>
14001
14002 * src/output.h: And put its extern declaration here.
14003 * src/output.c (error_verbose): Define here.
14004 (prepare): Echo name modification.
14005 * src/getargs.h: Clean its extern declaration.
14006 * src/getargs.c (error_verbose_flag): Remove.
14007 (getargs): Remove case 'e'.
14008 * src/options.c (option_table): 'error-verbose' is now seen as simple
14009 percent option.
14010 Include output.h.
14011
14012 * src/reader.c (read_declarations): Remove case tok_include.
14013 (parse_include_decl): Remove.
14014 * src/lex.h (token_t): Remove tok_include.
14015 * src/options.c (option_table): 'include' is now a simple command line
14016 option.
14017
5b5d1929
MA
140182001-11-28 Marc Autret <autret_m@epita.fr>
14019
14020 * src/bison.simple: Adjust muscle names.
14021 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14022 * src/output.c (prepare): s/_/-/ for the muscles names.
14023 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14024
8850be4b
MA
140252001-11-28 Marc Autret <autret_m@epita.fr>
14026
14027 * src/bison.simple: Fix debug.
14028 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14029
4a38e613
AD
140302001-11-28 Akim Demaille <akim@epita.fr>
14031
14032 * src/LR0.c (shifts_new): New.
14033 (save_shifts, insert_start_shift, augment_automaton): Use it.
14034
4b35e1c1
AD
140352001-11-28 Akim Demaille <akim@epita.fr>
14036
14037 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14038 keep ruleno only.
14039
d2b04478
AD
140402001-11-28 Akim Demaille <akim@epita.fr>
14041
14042 * src/closure.c (closure): Instead of looping over word in array
14043 then bits in words, loop over bits in array.
14044
2c4c30aa
AD
140452001-11-28 Akim Demaille <akim@epita.fr>
14046
14047 * src/closure.c (closure): No longer optimize the special case
14048 where all the bits of `ruleset[r]' are set to 0, to make the code
14049 clearer.
14050
576890b7
AD
140512001-11-28 Akim Demaille <akim@epita.fr>
14052
14053 * src/closure.c (closure): `r' and `c' are new variables, used to
14054 de-obfuscate accesses to RULESET and CORE.
14055
cb487d7d
AD
140562001-11-28 Akim Demaille <akim@epita.fr>
14057
14058 * src/reduce.c (reduce_print): Use ngettext.
14059 (dump_grammar): Improve the trace accuracy.
14060
6013d43f
AD
140612001-11-28 Akim Demaille <akim@epita.fr>
14062
14063 * src/reduce.c (dump_grammar): Don't translate trace messages.
14064
cb4956ee
AD
140652001-11-28 Akim Demaille <akim@epita.fr>
14066
14067 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
14068 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
14069 as all tags are free'ed afterwards.
14070 From Enrico Scholz.
14071
648185ab
PE
140722001-11-27 Paul Eggert <eggert@twinsun.com>
14073
14074 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
14075 use alloca when we didn't want to, and vice versa.
14076
68254a03
MA
140772001-11-27 Marc Autret <autret_m@epita.fr>
14078
9113b58f
AD
14079 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
14080 initialization.
68254a03
MA
14081 * src/output.c (prepare): Remove its update.
14082
04d843a2
MA
140832001-11-27 Marc Autret <autret_m@epita.fr>
14084
14085 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
14086 Use %error-verbose.
14087
d2079671 140882001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
14089
14090 * src/bison.simple: Remove YYERROR_VERBOSE using.
14091 Use %%error_verbose.
14092 (yyparse): Likewise.
14093 * src/output.c (prepare): Give its final value.
14094 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
14095 * src/getargs.h: Add its extern declaration.
14096 * src/getargs.c (error_verbose_flag): New int.
14097 (getargs): Update to catch new case.
14098 * src/options.c (option_table): 'error-verbose' is a new option.
14099 (shortopts): Update.
14100
e0327bc8
AD
141012001-11-27 Akim Demaille <akim@epita.fr>
14102
14103 * src/system.h: Use intl/libgettext.h.
14104 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
14105
000f1a3c
AD
141062001-11-27 Akim Demaille <akim@epita.fr>
14107
14108 * tests/torture.at (Exploding the Stack Size with Malloc):
14109 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
14110
26cfe0be
AD
141112001-11-27 Akim Demaille <akim@epita.fr>
14112
14113 * src/files.c: Include error.h.
14114 Reported by Hans Aberg.
14115
f6bd5427
MA
141162001-11-26 Marc Autret <autret_m@epita.fr>
14117
d2079671 14118 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
14119 (read_declarations): Add case tok_include.
14120 * src/getargs.h (include): Add its extern definition.
14121 * src/getargs.c (include): New const char *.
14122 (getargs): Add case '-I'.
14123 * src/options.c (option_table): Add include as command line and
14124 percent option.
14125 * src/lex.h (token_t): Add tok_include.
14126
2ca209c1
AD
141272001-11-26 Akim Demaille <akim@epita.fr>
14128
14129 * src/reader.c (readgram): Make sure rules for mid-rule actions
14130 have a lineno equal to that of their host rule.
14131 Reported by Hans Aberg.
14132 * tests/regression.at (Rule Line Numbers): New.
14133
0e41b407
AD
141342001-11-26 Akim Demaille <akim@epita.fr>
14135
14136 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
14137 size_ts.
14138
141392001-11-26 Akim Demaille <akim@epita.fr>
14140
14141 * src/complain.c, src/complain.h (error): Remove, provided by
14142 lib/error.[ch].
14143
e0c40012
AD
141442001-11-26 Akim Demaille <akim@epita.fr>
14145
14146 * src/reader.c (read_declarations): Don't abort on tok_illegal,
14147 issue an error message.
14148 * tests/regression.at (Invalid %directive): New.
14149 Reported by Hans Aberg.
14150
5e147124
AD
141512001-11-26 Akim Demaille <akim@epita.fr>
14152
14153 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
14154 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14155
a034c8b8
AD
141562001-11-26 Akim Demaille <akim@epita.fr>
14157
14158 * src/conflicts.c (conflicts_print): Don't complain at all when
14159 there are no reduce/reduce conflicts, and as many shift/reduce
14160 conflicts as expected.
14161 * tests/regression.at (%expect right): Adjust.
14162
c64a20f3
AD
141632001-11-23 Akim Demaille <akim@epita.fr>
14164
14165 * lib/alloca.c: Update, from fileutils.
14166
5b0d29bb
AD
141672001-11-23 Akim Demaille <akim@epita.fr>
14168
14169 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
14170
722c4bfe
AD
141712001-11-23 Akim Demaille <akim@epita.fr>
14172
14173 * src/system.h: Include alloca.h.
14174 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
14175
6255b435
AD
141762001-11-23 Akim Demaille <akim@epita.fr>
14177
14178 * src/print_graph.c (print_actions): Remove `rule', unused.
14179 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
14180 pacify GCC's signed < unsigned warnings.
14181 * src/closure.c (itemsetsize): Likewise.
14182 * src/reader.c (symbol_list_new): Static.
14183
b29b2ed5
AD
141842001-11-23 Akim Demaille <akim@epita.fr>
14185
14186 Attaching lineno to buckets is stupid, since only one copy of each
14187 symbol is kept, only the line of the first occurrence is kept too.
14188
14189 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
14190 * src/reader.c (rline_allocated): Remove, unused.
14191 (symbol_list): Have a `line' member.
14192 (symbol_list_new): New.
14193 (readgram): Use it.
14194 * src/print.c (print_grammar): Output the rule line numbers.
14195 * tests/regression.at (Solved SR Conflicts)
14196 (Unresolved SR Conflicts): Adjust.
14197 Reported by Hans Aberg.
14198
a81b1d4a
MA
141992001-11-22 Marc Autret <autret_m@epita.fr>
14200
14201 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
14202
c1ecb3c1
MA
142032001-11-22 Marc Autret <autret_m@epita.fr>
14204
14205 * src/muscle_tab.c (muscle_init): Remove initialization of
14206 skeleton muscle.
14207 * src/output.c (output_master_parser): Do it here.
14208
fbe01355
AD
142092001-11-20 Akim Demaille <akim@epita.fr>
14210
14211 * po/sv.po: New.
14212 * configure.in (ALL_LINGUAS): Adjust.
14213 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
14214 longer contains strings to translate.
14215
81e895c0
AD
142162001-11-19 Akim Demaille <akim@epita.fr>
14217
14218 * src/conflicts.c (conflicts_print): Add a missing \n.
14219
6bb1878b
AD
142202001-11-19 Akim Demaille <akim@epita.fr>
14221
14222 * src/nullable.c (nullable_print): New.
14223 (set_nullable): Call it when tracing.
14224 Better locality of variables.
14225
d9ec2d07
AD
142262001-11-19 Akim Demaille <akim@epita.fr>
14227
14228 * src/print.c (print_actions): Better locality of variables.
14229
720e5c1b
AD
142302001-11-19 Akim Demaille <akim@epita.fr>
14231
14232 * src/derives.c (print_derives): Fix and enrich.
14233 * src/closure.c (print_fderives): Likewise.
14234
fb908786
AD
142352001-11-19 Akim Demaille <akim@epita.fr>
14236
14237 * src/closure.c (itemsetend): Remove, replaced with...
14238 (itemsetsize): new.
14239
125ecb56
AD
142402001-11-19 Akim Demaille <akim@epita.fr>
14241
14242 * src/LR0.c (kernel_end): Remove, replaced with...
14243 (kernel_size): new.
14244
d8cf039f
AD
142452001-11-19 Akim Demaille <akim@epita.fr>
14246
14247 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14248 to clarify.
14249
7bec0760
AD
142502001-11-19 Akim Demaille <akim@epita.fr>
14251
14252 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14253
c87d4863
AD
142542001-11-19 Akim Demaille <akim@epita.fr>
14255
14256 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14257 trace messages.
14258 * src/LR0.c: Likewise.
14259 (allocate_itemsets): Use arrays instead of pointers to clarify.
14260
9bfe901c
AD
142612001-11-19 Akim Demaille <akim@epita.fr>
14262
14263 * src/getargs.c (statistics_flag): Replace with...
14264 (trace_flag): New.
14265 (longopts): Accept --trace instead of --statistics.
14266 * src/getargs.h, src/options.c: Adjust.
14267 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14268 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14269
97db7bd4
AD
142702001-11-19 Akim Demaille <akim@epita.fr>
14271
cc72668c 14272 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
14273 pointers to clarify the code.
14274 (save_reductions, save_shifts): Factor common parts of alternatives.
14275
2c5f66ed
AD
142762001-11-19 Akim Demaille <akim@epita.fr>
14277
14278 * src/LR0.c (new_state, get_state): Complete TRACE code.
14279 * src/closure.c: Include `reader.h' to get `tags', needed by the
14280 trace code.
14281 Rename the conditional DEBUG as TRACE.
14282 Output consistently TRACEs to stderr, not stdout.
14283 * src/derives.c: Likewise.
14284 * src/reduce.c: (inaccessable_symbols): Using if is better style
14285 than goto.
14286 Use `#if TRACE' instead of `#if 0' for tracing code.
14287
300f275f
AD
142882001-11-19 Akim Demaille <akim@epita.fr>
14289
14290 * src/system.h (LIST_FREE, shortcpy): New.
14291 * src/LR0.c: Use them.
14292 * src/output.c (free_itemsets, free_reductions, free_shifts):
14293 Remove, replaced by LIST_FREE.
14294
f59c437a
AD
142952001-11-19 Akim Demaille <akim@epita.fr>
14296
14297 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14298 (REDUCTIONS_ALLOC): New.
14299 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14300 allocation.
14301
6986fd9e
AD
143022001-11-19 Akim Demaille <akim@epita.fr>
14303
14304 * src/LR0.c (new_state): Complete trace code.
14305 * src/nullable.c (set_nullable): Don't translate traces.
14306
4bc30f78
AD
143072001-11-19 Akim Demaille <akim@epita.fr>
14308
14309 * src/print_graph.c (print_core): Better locality of variables.
14310 * src/print.c (print_core): Likewise.
14311
08a946e0
AD
143122001-11-19 Akim Demaille <akim@epita.fr>
14313
14314 * src/vcg.c: You do the output, so you are responsible of the
14315 handling of VCG syntax, in particular: use quotearg.
14316 * src/print_graph.c: Don't.
14317 (print_actions): Don't output the actions as part of the nodes,
14318 since that's the job of the edges.
14319 (print_state): Don't output by hand: fill the node description,
9bfe901c 14320 and ask for its output.
08a946e0 14321
f0473484
AD
143222001-11-19 Akim Demaille <akim@epita.fr>
14323
cc72668c
AD
14324 * src/bison.simple (yyparse): When verbosely reporting an error,
14325 no longer put additional quotes around token names.
f0473484
AD
14326 * tests/calc.at: Adjust.
14327
e41dc700
AD
143282001-11-19 Akim Demaille <akim@epita.fr>
14329
14330 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14331 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14332 * src/output.c: Adjust.
14333
652a871c
AD
143342001-11-19 Akim Demaille <akim@epita.fr>
14335
14336 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14337 (rule_t): this.
14338 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14339
b2ed6e58
AD
143402001-11-19 Akim Demaille <akim@epita.fr>
14341
14342 * src/gram.h (rule_t): New.
14343 (rule_table): New.
14344 (rrhs, rlhs): Remove, part of state_t.
14345 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14346 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14347 * src/reader.c, src/reduce.c: Adjust.
14348
edad7067
AD
143492001-11-19 Akim Demaille <akim@epita.fr>
14350
14351 * src/reader.c (symbols_output): New, extracted from...
14352 (packsymbols): Here.
14353 (reader): Call it.
14354
3feec034
AD
143552001-11-19 Akim Demaille <akim@epita.fr>
14356
14357 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14358 (maxrhs): this new function.
14359
ddcd5fdf
AD
143602001-11-19 Akim Demaille <akim@epita.fr>
14361
cc72668c 14362 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
14363 Adjust.
14364
bb527fc2
AD
143652001-11-19 Akim Demaille <akim@epita.fr>
14366
cc72668c 14367 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
14368 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14369 * src/lalr.c: Adjust.
14370
a845a697
AD
143712001-11-19 Akim Demaille <akim@epita.fr>
14372
14373 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14374 (set_state_table): handle the `lookaheads' members.
14375
f004bf6a
AD
143762001-11-19 Akim Demaille <akim@epita.fr>
14377
cc72668c
AD
14378 * src/lalr.h (lookaheads): Removed array, whose contents is now
14379 a member of...
f004bf6a
AD
14380 (state_t): this structure.
14381 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14382 Adjust.
14383
de326cc0
AD
143842001-11-19 Akim Demaille <akim@epita.fr>
14385
cc72668c
AD
14386 * src/lalr.h (consistent): Removed array, whose contents is now
14387 a member of...
de326cc0
AD
14388 (state_t): this structure.
14389 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14390 Adjust.
14391
90b4416b
AD
143922001-11-19 Akim Demaille <akim@epita.fr>
14393
cc72668c
AD
14394 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14395 contents are now members of...
90b4416b
AD
14396 (state_t): this structure.
14397 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14398 Adjust.
14399
9703cc49
AD
144002001-11-19 Akim Demaille <akim@epita.fr>
14401
14402 * src/lalr.h (state_t): New.
14403 (state_table): Be a state_t * instead of a core **.
14404 (accessing_symbol): Remove, part of state_t.
14405 * src/lalr.c: Adjust.
14406 (set_accessing_symbol): Merge into...
14407 (set_state_table): this.
14408 * src/print_graph.c, src/conflicts.c: Adjust.
14409
d803322e
AD
144102001-11-14 Akim Demaille <akim@epita.fr>
14411
14412 * tests/calc.at, tests/output.at, tests/regression.at,
14413 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14414 now the tests are run in private dirs, therefore AC_CLEANUP and
14415 family can be simplified to 0-ary.
14416 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14417 use abs. path to find config.h.
14418 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14419 stderr, there can be way too much random noise.
14420 Instead pass -Werror to GCC and rely on the exit status.
14421 Reported by Wolfram Wagner.
14422
3d76b07d
AD
144232001-11-14 Akim Demaille <akim@epita.fr>
14424
14425 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14426 defined only if yyoverflow is defined, to avoid `warning: unused
14427 variable `yyvs1''.
14428 Reported by The Test Suite.
14429
09b503c8
AD
144302001-11-14 Akim Demaille <akim@epita.fr>
14431
14432 * src/print.c: Include reduce.h.
14433 Reported by Hans Aberg.
14434
144352001-11-14 Akim Demaille <akim@epita.fr>
14436
14437 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14438 Revert a previous patch: these are really const.
14439 * src/conflicts.c (conflict_report): Additional useless pair of
14440 braces to pacify GCC's warnings for `if () if () {} else {}'.
14441 * src/lex.c (parse_percent_token): Replace equal_offset with
14442 arg_offset.
14443 arg is const.
14444 Be sure to strdup `arg' when used, since there is no reason for
14445 token_buffer not to change.
14446
0f37a994
AD
144472001-11-14 Akim Demaille <akim@epita.fr>
14448
14449 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14450 definition.
14451 * src/main.c (main): Use them.
14452 Suggested by Hans Aberg.
14453
d39d93b8
AD
144542001-11-12 Akim Demaille <akim@epita.fr>
14455
14456 * src/system.h (ngettext): Now that we use ngettext, be sure to
14457 provide a default definition when NLS are not used.
14458
9edcd895
AD
144592001-11-12 Akim Demaille <akim@epita.fr>
14460
14461 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14462 Use @kbd to denote user input.
14463 (Language and Grammar): ANSIfy the example.
14464 Adjust its layout for info/notinfo.
14465 (Location Tracking Calc): Output error messages to stderr.
14466 Output locations in a more GNUtically correct way.
14467 Fix a couple of Englishos.
14468 Adjust @group/@end group pairs.
14469
7da99ede
AD
144702001-11-12 Akim Demaille <akim@epita.fr>
14471
e3aa65c5 14472 %expect was not functioning at all.
7da99ede
AD
14473
14474 * src/conflicts.c (expected_conflicts): Set to -1.
14475 (conflict_report): Use ngettext.
14476 (conflicts_print): Check %expect and make its violation an error.
14477 * doc/bison.texinfo (Expect Decl): Adjust.
14478 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14479 * tests/regression.at (%expect not enough, %expect right)
14480 (%expect too much): New.
14481
ba9dda1a
AD
144822001-11-12 Akim Demaille <akim@epita.fr>
14483
14484 * tests/regression.at (Conflicts): Rename as...
14485 (Unresolved SR Conflicts): this.
14486 (Solved SR Conflicts): New.
14487
337c5bd1
AD
144882001-11-12 Akim Demaille <akim@epita.fr>
14489
14490 * src/reduce.c (print_results): Rename as...
14491 (reduce_output): This.
14492 Output to OUT, passed as argument, instead of output_obstack.
14493 (dump_grammar): Likewise.
14494 (reduce_free): New.
14495 Also free V1.
14496 (reduce_grammar): No longer call reduce_output, since...
14497 * src/print.c (print_results): do it.
14498 * src/main.c (main): Call reduce_free;
14499
c73a41af
AD
145002001-11-12 Akim Demaille <akim@epita.fr>
14501
14502 * src/conflicts.c (print_reductions): Accept OUT as argument.
14503 Output to it, not to output_obstack.
14504 * src/print.c (print_actions): Adjust.
14505
0df87bb6
AD
145062001-11-12 Akim Demaille <akim@epita.fr>
14507
14508 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14509 the result instead of using...
14510 (src_total, rrc_total, src_count, rrc_count): Remove.
14511 (any_conflicts): Remove.
14512 (print_conflicts): Split into...
14513 (conflicts_print, conflicts_output): New.
14514 * src/conflicts.h: Adjust.
14515 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 14516 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
14517 * tests/regression.at (Conflicts): New.
14518 Reported by Tom Lane.
14519
e4d3d4de
AD
145202001-11-12 Akim Demaille <akim@epita.fr>
14521
14522 * tests/regression.at (Invalid input): Remove, duplicate with
14523 ``Invalid input: 1''.
14524
6d7d248e
AD
145252001-11-12 Akim Demaille <akim@epita.fr>
14526
14527 * tests/torture.at (AT_DATA_STACK_TORTURE)
14528 (Exploding the Stack Size with Alloca)
14529 (Exploding the Stack Size with Malloc): New.
14530
e9e4c321
AD
145312001-11-12 Akim Demaille <akim@epita.fr>
14532
14533 * src/bison.simple (YYSTACK_REALLOC): New.
14534 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 14535 Reported by Per Allansson.
e9e4c321 14536
5f7e0832
AD
145372001-11-12 Pascal Bart <pascal.bart@epita.fr>
14538
14539 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14540 define CPP macro, which substitute YYSTYPE by yystype.
14541 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14542 with yyltype/YYLTYPE. This allows inclusion of the generated
14543 header within the parser if the compiler, such as GGC, accepts
14544 multiple equivalent #defines.
14545 From Akim.
14546
e3f1699f
AD
145472001-11-05 Akim Demaille <akim@epita.fr>
14548
14549 * src/reader.c (symbols_output): New, extracted from...
14550 (packsymbols): here.
14551 (reader): Adjust.
14552
65be0866
AD
145532001-11-05 Akim Demaille <akim@epita.fr>
14554
14555 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14556
e4d910bf
AD
145572001-11-05 Akim Demaille <akim@epita.fr>
14558
14559 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14560 pattern.
14561
951366c1
AD
145622001-11-05 Akim Demaille <akim@epita.fr>
14563
14564 * src/options.h (struct option_table_struct): set_flags is void*.
14565 * src/options.c (longopts): Support `--output' and `%output'.
14566 (usage): Adjust.
14567 * src/lex.h (tok_setopt): Remove, replaced with...
14568 (tok_intopt, tok_stropt): these new guys.
14569 * src/lex.c (getopt.h): Not needed.
14570 (token_buffer, unlexed_token_buffer): Not const.
14571 (percent_table): Promote `-' over `_' in directive names.
14572 Active `%name-prefix', `file-prefix', and `output'.
14573 (parse_percent_token): Accept possible arguments to directives.
14574 Promote `-' over `_' in directive names.
14575
d8988b2f
AD
145762001-11-04 Akim Demaille <akim@epita.fr>
14577
14578 * doc/bison.texinfo (Decl Summary): Split the list into
14579 `directives for grammars' and `directives for bison'.
14580 Sort'em.
14581 Add description of `%name-prefix', `file-prefix', and `output'.
14582 Promote `-' over `_' in directive names.
14583 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14584 Simplify the description of `--name-prefix'.
14585 Promote `-' over `_' in directive names.
14586 Promote `--output' over `--output-file'.
14587 Fix the description of `--defines'.
14588 * tests/output.at: Exercise %file-prefix and %output.
14589
6468d18e
AD
145902001-11-02 Akim Demaille <akim@epita.fr>
14591
14592 * doc/refcard.tex: Update.
14593
6b7e85b9
AD
145942001-11-02 Akim Demaille <akim@epita.fr>
14595
14596 * src/symtab.h (SUNDEF): New.
14597 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14598 stand for `uninitialized', instead of 0.
14599 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14600 * src/lex.c (lex): Adjust.
14601
14602 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14603 Number it 0.
14604 Let yylex return it instead of a plain 0.
14605 Reported by Dick Streefland.
14606
cd5aafcf
AD
146072001-11-02 Akim Demaille <akim@epita.fr>
14608
14609 * tests/regression.at (Mixing %token styles): New test.
14610
037ca2f1
AD
146112001-11-02 Akim Demaille <akim@epita.fr>
14612
14613 * src/reader.c (parse_thong_decl): Formatting changes.
14614 (token_translations_init): New, extracted from...
14615 (packsymbols): Here.
14616 Adjust.
14617
270a173c
AD
146182001-11-01 Akim Demaille <akim@epita.fr>
14619
14620 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14621 Check that `9foo.y' produces correct cpp guards.
14622 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14623 guards.
14624 Reported by Wwp.
14625
561f9a30
AD
146262001-11-01 Akim Demaille <akim@epita.fr>
14627
14628 * tests/regression.at (Invalid input: 2): New.
14629 * src/lex.c (unlexed_token_buffer): New.
14630 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14631 too.
14632 Reported by Wwp.
14633
f987e9d2
AD
146342001-11-01 Akim Demaille <akim@epita.fr>
14635
14636 * tests/calc.at: Catch up with 1.30.
14637 * configure.in: Bump to 1.49a.
14638 Adjust to newer Autotest.
14639
0846f581
PB
146402001-10-19 Pascal Bart <pascal.bart@epita.fr>
14641
14642 * src/conflicts.c: Move global variables rrc_total and src_total ...
14643 (print_conflicts): here.
14644 * src/output.c (output): Free global variable user_toknums.
14645 * src/lex.c (token_obstack): Become static.
14646
3c1a79b3
AD
146472001-10-18 Akim Demaille <akim@epita.fr>
14648
14649 * tests/atlocal.in (GCC): Add.
14650 * tests/calc.at: s/m4_match/m4_bmatch/.
14651 s/m4_patsubst/m4_bpatsubst/.
14652 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14653 * configure.in: AC_SUBST(GCC).
14654
5d52e7d0
MA
146552001-10-14 Marc Autret <autret_m@epita.fr>
14656
14657 * src/options.c (create_long_option_table): Fix.
14658
631aa1d3
AD
146592001-10-10 Akim Demaille <akim@epita.fr>
14660
14661 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14662
f6ec6d13
AD
146632001-10-04 Akim Demaille <akim@epita.fr>
14664
14665 * src/reader.c (parse_union_decl): Push the caracters in
14666 union_obstack, not attrs_obstack.
14667
342b8b6e
AD
146682001-10-04 Akim Demaille <akim@epita.fr>
14669
14670 Merge in the branch 1.29.
14671
14672 * src/reader.c (packsymbols): Use a temporary obstack for
14673 `%%tokendef', since output_stack is already used elsewhere.
14674
14675 2001-10-02 Akim Demaille <akim@epita.fr>
14676
14677 Bump 1.29d.
14678
14679 2001-10-02 Akim Demaille <akim@epita.fr>
14680
14681 Version 1.29c.
14682
14683 2001-10-02 Akim Demaille <akim@epita.fr>
14684
14685 * tests/regression.at (Invalid CPP headers): New.
14686 From Alexander Belopolsky.
14687 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14688
14689 2001-10-02 Akim Demaille <akim@epita.fr>
14690
14691 * tests/regression.at (Invalid input): New.
14692 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14693 Reported by Shura.
14694
14695 2001-10-02 Akim Demaille <akim@epita.fr>
14696
14697 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14698
14699 2001-10-02 Akim Demaille <akim@epita.fr>
14700
14701 * src/output.c (output_parser): Assert `skeleton'.
14702 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14703 systems.
14704 From Shura.
14705
14706 2001-10-01 Marc Autret <autret_m@epita.fr>
14707
14708 * src/lex.h: Echo modifications.
14709 * src/lex.c (unlex): Parameter is now token_t.
14710 From Hans Aberg.
14711
14712 2001-10-01 Marc Autret <autret_m@epita.fr>
14713
14714 * src/main.c: Include lex.h.
14715 From Hans Aberg.
14716
14717 2001-09-29 Akim Demaille <akim@epita.fr>
14718
14719 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14720
14721 2001-09-28 Akim Demaille <akim@epita.fr>
14722
14723 * tests/testsuite.at: Update to newer Autotest.
14724 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14725
14726 2001-09-27 Akim Demaille <akim@epita.fr>
14727
14728 Position independent wrapper.
14729
14730 * tests/bison: Remove.
14731 * tests/bison.in: New.
14732 * configure.in: Adjust.
14733
14734 2001-09-27 Paul Eggert <eggert@twinsun.com>
14735
14736 Port quotearg fixes from tar 1.13.24.
14737
14738 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14739 tm to be declared.
14740 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14741 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14742
14743 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14744 * m4/mbrtowc.m4: New file.
14745 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14746 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14747
14748 2001-09-27 Akim Demaille <akim@epita.fr>
14749
14750 Bump to 1.29c.
14751
14752 2001-09-27 Akim Demaille <akim@epita.fr>
14753
14754 Version 1.29b.
14755
14756 2001-09-25 Akim Demaille <akim@epita.fr>
14757
14758 * src/system.h: Include `xalloc.h'.
14759 Remove it from the C files.
14760 * src/files.c (output_files): Free the obstacks.
14761 * src/lex.c (init_lex): Rename as...
14762 (lex_init): this.
14763 (lex_free): New.
14764 * src/main.c (main): Use it.
14765
14766 2001-09-24 Marc Autret <autret_m@epita.fr>
14767
14768 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14769 to output informations in fout (FILE*).
14770 (open_graph, close_graph): Likewise.
14771 (output_graph, output_edge, output_node): Likewise.
14772 * src/vcg.h: Update function prototypes.
14773 * src/print_graph.c (print_graph): Open output graph file.
14774 (print_actions): Adjust.
14775 * src/files.h: Remove extern declaration.
14776 * src/files.c: Remove graph_obstack declaration.
14777 (open_files): Remove graph_obstack initialization.
14778 (output_files): Remove graph_obstack saving.
14779
14780 2001-09-24 Marc Autret <autret_m@epita.fr>
14781
14782 * src/files.c (compute_output_file_names): Fix.
14783
14784 2001-09-24 Marc Autret <autret_m@epita.fr>,
14785 Akim Demaille <akim@epita.fr>
14786
14787 * src/reader.c (reader): Remove call to free_symtab ().
14788 * src/main.c (main): Call it here.
14789 Include symtab.h.
14790 * src/conflicts.c (initialize_conflicts): Rename as...
14791 (solve_conflicts): this.
14792 * src/print.c (print_core, print_actions, print_state)
14793 (print_grammar): Dump to a file instead a `output_obstack'.
14794 (print_results): Dump `output_obstack', and then proceed with the
14795 FILE *.
14796 * src/files.c (compute_output_file_names, close_files): New.
14797 (output_files): Adjust.
14798 * src/main.c (main): Adjust.
14799
14800 2001-09-23 Marc Autret <autret_m@epita.fr>
14801
14802 * src/files.c (compute_header_macro): Computes header macro name
14803 from spec_defines_file when given.
14804
14805 2001-09-23 Marc Autret <autret_m@epita.fr>
14806
14807 * src/files.c (output_files): Add default extensions.
14808
14809 2001-09-22 Akim Demaille <akim@epita.fr>
14810
14811 * src/conflicts.c (finalize_conflicts): Rename as...
14812 (free_conflicts): this.
14813
14814 2001-09-22 Akim Demaille <akim@epita.fr>
14815
14816 * src/gram.c (gram_free): Rename back as...
14817 (dummy): this.
14818 (output_token_translations): Free `token_translations'.
14819 * src/symtab.c (free_symtab): Free the tag field.
14820
14821 2001-09-22 Akim Demaille <akim@epita.fr>
14822
14823 Remove `translations' as it is always set to true.
14824
14825 * src/gram.h: Adjust.
14826 * src/reader.c (packsymbols, parse_token_decl): Adjust
14827 * src/print.c (print_grammar): Adjust.
14828 * src/output.c (output_token_translations): Adjust.
14829 * src/lex.c (lex): Adjust.
14830 * src/gram.c: Be sure the set pointers to NULL.
14831 (dummy): Rename as...
14832 (gram_free): this.
14833
14834 2001-09-22 Akim Demaille <akim@epita.fr>
14835
14836 * configure.in: Invoke AM_LIB_DMALLOC.
14837 * src/system.h: Use dmalloc.
14838 * src/LR0.c: Be sure to have pointers initialized to NULL.
14839 (allocate_itemsets): Allocate kernel_items only if needed.
14840
14841 2001-09-22 Akim Demaille <akim@epita.fr>
14842
14843 * configure.in: Bump to 1.29b.
14844 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14845 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14846 need xmalloc.c in calc.y.
14847 From Pascal Bart.
14848
14849 2001-09-21 Akim Demaille <akim@epita.fr>
14850
14851 Version 1.29a.
14852 * Makefile.maint, config/config.guess, config/config.sub,
14853 * config/missing: Update from masters.
14854 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14855 upon package.m4.
14856 * configure.in (ALL_LINGUAS): Add `tr'.
14857
14858 2001-09-21 Akim Demaille <akim@epita.fr>
14859
14860 * tests/Makefile.am (package.m4): Move to...
14861 ($(srcdir)/$(TESTSUITE)): here.
14862
14863 2001-09-20 Akim Demaille <akim@epita.fr>
14864
14865 * src/complain.c: No longer try to be standalone: use system.h.
14866 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14867 * src/complain.h: Likewise.
14868 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14869 Remove the unused variable `n'.
14870 From Albert Chin-A-Young.
14871
14872 2001-09-18 Marc Autret <autret_m@epita.fr>
14873
14874 * doc/bison.1: Update.
14875 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14876 descriptions.
14877 (Option Cross Key): Update.
14878 Add --graph.
14879
14880 2001-09-18 Marc Autret <autret_m@epita.fr>
14881
14882 * tests/regression.at: New test (comment in %union).
14883
14884 2001-09-18 Marc Autret <autret_m@epita.fr>
14885
14886 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14887 do that.
14888 Reported by Keith Browne.
14889
14890 2001-09-18 Marc Autret <autret_m@epita.fr>
14891
14892 * tests/output.at: Add tests for --defines and --graph.
14893
14894 2001-09-18 Marc Autret <autret_m@epita.fr>
14895
14896 * tests/output.at: Removes tests of %{header,src}_extension features.
14897
14898 2001-09-18 Akim Demaille <akim@epita.fr>
14899
14900 * tests/Makefile.am (package.m4): New.
14901 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14902 (_AT_CHECK_CALC_ERROR): Likewise.
14903 Factor the `, ' part of verbose error messages.
14904
14905 2001-09-18 Marc Autret <autret_m@epita.fr>
14906
14907 * src/getargs.c (longopts): Declare --defines and --graph as options
14908 with optional arguments.
14909 * src/files.h: Add extern declarations.
14910 * src/files.c (spec_graph_file, spec_defines_file): New.
14911 (output_files): Update.
14912 Remove CPP-outed code.
14913
14914 2001-09-18 Marc Autret <autret_m@epita.fr>
14915
14916 Turn off %{source,header}_extension feature.
14917
14918 * src/files.c (compute_exts_from_gf): Update.
14919 (compute_exts_from_src): Update.
14920 (output_files): CPP-out useless code.
14921 * src/files.h: Remove {header,source}_extension extern declarations.
14922 * src/reader.c (parse_dquoted_param): CPP-out.
14923 (parse_header_extension_decl): Remove.
14924 (parse_source_extension_decl): Remove.
14925 (read_declarations): Remove cases tok_{hdrext,srcext}.
14926 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14927 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14928
14929 2001-09-10 Akim Demaille <akim@epita.fr>
14930
14931 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14932 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14933 (AT_CHECK_OUTPUT): this.
14934 Merely check ls' exit status, its output is useless.
14935
14936 2001-09-10 Akim Demaille <akim@epita.fr>
14937
14938 * tests/calc.at: Use m4_match.
14939 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14940
14941 2001-09-10 Marc Autret <autret_m@epita.fr>,
14942 Akim Demaille <akim@epita.fr>
14943
14944 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14945 enum color_e.
14946 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14947 to `normal'.
14948 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14949 * src/lex.h: Adjust prototype.
14950 (token_t): Add `tok_undef'.
14951 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14952 (parse_percent_token): Now returns token_t.
14953 Add default statement in switch.
14954 (lex): Separate `c' as an input variable, from the token_t result
14955 part.
14956 (unlexed): Is a token_t.
14957
14958 2001-09-10 Akim Demaille <akim@epita.fr>
14959
14960 * configure.in: Bump to 1.29a.
14961
14962 2001-09-07 Akim Demaille <akim@epita.fr>
14963
14964 Version 1.29.
14965
14966 2001-08-30 Akim Demaille <akim@epita.fr>
14967
14968 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14969 * m4/atconfig.m4: Remove.
14970 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14971 * tests/bison: New.
14972 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14973 m4_if, m4_patsubst, and m4_regexp.
14974 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14975 `input' file instead of echo.
14976
14977 2001-08-29 Akim Demaille <akim@epita.fr>
14978
14979 Bump to 1.28e.
14980
14981 2001-08-29 Akim Demaille <akim@epita.fr>
14982
14983 Version 1.28d.
14984
14985 2001-08-29 Paul Eggert <eggert@twinsun.com>
14986
14987 * src/bison.simple (yyparse): Don't take the address of an
14988 item before the start of an array, as that doesn't conform to
14989 the C Standard.
14990
14991 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14992
14993 * doc/bison.texinfo (Location Tracking Calc): New node.
14994
14995 2001-08-29 Paul Eggert <eggert@twinsun.com>
14996
14997 * src/output.c (output): Do not define const, as this now
14998 causes more problems than it cures.
14999
15000 2001-08-29 Akim Demaille <akim@epita.fr>
15001
15002 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15003 the nodes.
15004 Be sure to tag the `detailmenu'.
15005
15006 2001-08-29 Akim Demaille <akim@epita.fr>
15007
15008 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15009 download in a tmp dir.
15010
15011 2001-08-28 Marc Autret <autret_m@epita.fr>
15012
15013 * config/depcomp: New file.
15014
15015 2001-08-28 Marc Autret <autret_m@epita.fr>
15016
15017 * doc/bison.1 (mandoc): Adjust.
15018 From Juan Manuel Guerrero.
15019
15020 2001-08-28 Marc Autret <autret_m@epita.fr>
15021
15022 * src/print_graph.c (print_state): Fix.
15023
15024 2001-08-27 Marc Autret <autret_m@epita.fr>
15025
15026 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15027 char * members.
15028 Echo modifications to the functions prototypes.
15029 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15030
15031 2001-08-27 Marc Autret <autret_m@epita.fr>
15032
15033 * src/vcg.c: Include `xalloc.h'.
15034 (add_colorentry): New.
15035 (add_classname): New.
15036 (add_infoname): New.
15037 * src/vcg.h: Add new prototypes.
15038
15039 2001-08-27 Akim Demaille <akim@epita.fr>
15040
15041 * Makefile.maint: Sync. again with CVS Autoconf.
15042
15043 2001-08-27 Akim Demaille <akim@epita.fr>
15044
15045 * Makefile.maint: Formatting changes.
15046 (po-update, cvs-update, update): New targets.
15047 (AMTAR): Remove.
15048
15049 2001-08-27 Akim Demaille <akim@epita.fr>
15050
15051 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15052 * Makefile.maint: Sync. with CVS Autoconf.
15053
15054 2001-08-27 Marc Autret <autret_m@epita.fr>
15055
15056 * src/vcg.h (struct infoname_s): New.
15057 (struct colorentry_s): New.
15058 (graph_s): New fields {vertical,horizontal}_order in structure.
15059 Add `infoname' field.
15060 Add `colorentry' field;
15061 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
15062 (G_HORIZONTAL_ORDER): New.
15063 (G_INFONAME): New.
15064 (G_COLORENTRY): New.
15065 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
15066 Add output of `infoname'.
15067 Add output of `colorentry'.
15068
15069 2001-08-27 Marc Autret <autret_m@epita.fr>
15070
15071 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
15072 This one shadowed a global parameter.
15073
15074 2001-08-24 Marc Autret <autret_m@epita.fr>
15075
15076 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
15077 instead of `unsigned'.
15078 (print_state): Do not call obstack_object_size () in obstack_grow ()
15079 to avoid macro variables shadowing.
15080
15081 2001-08-23 Marc Autret <autret_m@epita.fr>
15082
15083 * src/lex.c (percent_table): Typo: s/naem/name/.
15084 Add graph option.
15085 Normalize new options declarations.
15086
15087 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
15088
15089 * tests/suite.at: Exercise %header_extension and %source_extension.
15090
15091 2001-08-16 Marc Autret <autret_m@epita.fr>
15092
15093 * src/reader.c (parse_dquoted_param): New.
15094 (parse_header_extension_decl): Use it.
15095 (parse_source_extension_decl): Likewise.
15096
15097 2001-08-16 Marc Autret <autret_m@epita.fr>
15098
15099 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
15100 (get_xxxx_str): Use assert () instead of complain ().
15101 Remove return invokations in default cases.
15102 (get_decision_str): Modify default behaviour. Remove second argument.
15103 Echo modifications on calls.
15104 (output_graph): Fix.
15105
15106 2001-08-16 Marc Autret <autret_m@epita.fr>
15107
15108 * src/getargs.c (usage): Update with ``-g, --graph''.
15109
15110 2001-08-16 Marc Autret <autret_m@epita.fr>
15111
15112 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
15113 (Option Cross Key): Likewise.
15114 * doc/bison.1: Update.
15115
1c8c2190
PB
151162001-09-25 Pascal Bart <pascal.bart@epita.fr>
15117
15118 * src/output.c (output_master_parser): Don't finish action_obstack.
15119 (output_parser): Don't care about the muscle action, here.
15120 (prepare): Copy the action_obstack in the action muscle.
15121 (output): Free action_obstack.
15122
180d45ba
PB
151232001-09-23 Pascal Bart <pascal.bart@epita.fr>
15124
15125 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
15126 will contain `%union' declaration.
15127 (parse_union_decl): Delete #line directive output.
15128 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
15129 informations about %union.
15130 (parse_union_decl): Copy the union_obstack in the muscle stype.
15131 * src/bison.simple: Add new #line directive.
15132 Add typdef %%stype YYSTYPE.
15133
c51d1a19
PB
151342001-09-23 Pascal Bart <pascal.bart@epita.fr>
15135
15136 * src/bison.simple: Add new `#line' directive.
15137
6f9344da
PB
151382001-09-22 Pascal Bart <pascal.bart@epita.fr>
15139
15140 * src/bison.simple: New `#line' directive.
15141 * src/output.c (output_parser): Support new dynamic muscle input_line.
15142
652def80
MA
151432001-09-22 Marc Autret <autret_m@epita.fr>
15144
15145 * src/output.c (output_master_parser): New.
15146 (output_parser): Be more re-entrant.
15147
25b222fa
MA
151482001-09-21 Marc Autret <autret_m@epita.fr>
15149
15150 * src/reader.c (copy_definition, parse_union_decl): Update and use
15151 `linef' muscle.
15152 (copy_action): Likewise.
15153 Use obstack_1grow ().
15154 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
15155
6bc35ae5
MA
151562001-09-21 Marc Autret <autret_m@epita.fr>
15157
15158 * src/options.c (option_table): Adjust.
15159 * src/lex.c (parse_percent_token): Fix.
15160
c0629aa1
PB
151612001-09-20 Pascal Bart <pascal.bart@epita.fr>
15162
15163 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 15164
82b6d266
PB
151652001-09-20 Pascal Bart <pascal.bart@epita.fr>
15166
15167 * src/lex.c (parse_percent_token): Change type of variable `tx', which
15168 is now an option_table_struct*.
15169 (option_strcmp): New function option_strcmp.
15170 (parse_percent_token): Call option_strcmp.
15171 * src/getargs.c (xalloc.h, options.h): Include it.
15172 (getargs): Call create_long_option_table.
15173 (getargs): Free longopts at the end of the function.
15174 (shortopts): Move in options.c.
15175 * src/options.c (create_long_option_table): New function. Convert
15176 information from option_table to option structure.
15177 * src/reader.c (options.h): Include it.
15178
15179 * src/Makefile.am: Adjust.
15180 * src/options.c (option_table): Create from longopts and percent_table.
15181 * src/getargs.c (longopts): Delete.
15182 * src/lex.c (struct percent_table_struct): Delete.
15183 (percent_table): Delete.
15184 (options.h): Include it.
15185 * src/options.c: Create.
15186 * src/options.h: Create.
15187 Declare enum opt_access_e.
15188 Define struct option_table_struct.
15189
75f5aaea
MA
151902001-09-20 Marc Autret <autret_m@epita.fr>
15191
15192 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
15193 sections of Bison.
15194
f508cb0a
PB
151952001-09-19 Pascal Bart <pascal.bart@epita.fr>
15196
15197 * src/bison.simple: s/%%filename/%%skeleton.
15198 * src/muscle_tab.c (getargs.h): Include it.
15199 (muscle_init): Insert new muscle skeleton.
15200
13105fc1
PB
152012001-09-18 Pascal Bart <pascal.bart@epita.fr>
15202
15203 * src/output.c (output_parser): Delete unused variable actions_dumped.
15204
b0c4483e
PB
152052001-09-07 Pascal Bart <pascal.bart@epita.fr>
15206
15207 * src/output.c (output): Delete call to reader_output_yylsp.
15208 * src/reader.c (reader): Likewise.
ba0fe3c7 15209 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 15210
11d82f03
MA
152112001-09-02 Marc Autret <autret_m@epita.fr>
15212
15213 * src/reader.c: Include muscle_tab.h.
15214 (parse_union_decl): Update.
15215 (parse_macro_decl): Rename parse_muscle_decl.
15216 Update to use renamed functions and variable.
15217 (read_declarations, copy_action, read_additionnal_code, : Updated
15218 with correct variables and functions names.
15219 (packsymbols, reader): Likewise.
342b8b6e 15220
11d82f03 15221 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 15222
11d82f03
MA
15223 * src/output.c: Include muscle_tab.h
15224 In all functions using macro_insert, change by using muscle_insert ().
15225 (macro_obstack): Rename muscle_obstack.
15226 Echo modifications in the whole file.
15227 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15228 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15229 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15230
15231 * src/muscle_tab.h: Update double inclusion macros.
15232 (macro_entry_s): Rename muscle_entry_s.
15233 Update prototypes.
342b8b6e 15234
11d82f03
MA
15235 * src/muscle_tab.c: Include muscle_tab.h.
15236 Rename macro_tabble to muscle_table.
15237 (mhash1, mhash2, mcmp): Use muscle_entry.
15238 (macro_init): Rename muscle_init. Update.
15239 (macro_insert): Rename muscle_insert. Update.
15240 (macro_find): Rename muscle_find. Update.
15241
15242 * src/main.c: Include muscle_tab.h.
15243 (main): Call muscle_init ().
15244 * src/Makefile.am (bison_SOURCES): Echo modifications.
15245
93a37297
MA
152462001-09-02 Marc Autret <autret_m@epita.fr>
15247
f753cd62 15248 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 15249
f753cd62
MA
15250 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15251
152522001-09-02 Marc Autret <autret_m@epita.fr>
15253
15254 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 15255
682d48cd
PB
152562001-09-01 Pascal Bart <pascal.bart@epita.fr>
15257
342b8b6e 15258 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
15259 filename.
15260
087c8fda
MA
152612001-09-01 Marc Autret <autret_m@epita.fr>
15262
15263 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15264 to an explicit value to activate the feature. We do it here.
15265
dda680cb
PB
152662001-08-31 Pascal Bart <pascal.bart@epita.fr>
15267
15268 * src/output.c (prepare): Delete the `filename' muscule insertion.
15269 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15270 (parse_union_decl): Likewise.
15271 * src/macrotab.c (macro_init): Initialize filename by infile.
15272
9e644e64
MA
152732001-08-31 Marc Autret <autret_m@epita.fr>
15274
15275 * src/bison.simple (YYLSP_NEEDED): New definition.
15276 * src/output.c (prepare): Add macro insertion of `locations_flag'
15277
17da6427
PB
152782001-08-31 Pascal Bart <pascal.bart@epita.fr>
15279
15280 * src/output.c (prepare): Delete insertion of previous muscles,
15281 and insert the `prefix' muscles.
15282 * src/macrotab.c (macro_init): Likewise.
15283 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 15284 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
15285 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15286 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 15287 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
15288 name_prefix.
15289
e8cb70b9
PB
152902001-08-31 Pascal Bart <pascal.bart@epita.fr>
15291
15292 * src/main.c (main): Standardize.
15293 * src/output.c (output_table_data, output_parser): Likewise.
15294 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15295
63c2d5de
MA
152962001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15297
342b8b6e 15298 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
15299 %%epilogue.
15300 * src/output.c (output): Rename %%declarations to %%prologue.
15301 * src/bison.simple: Echo modifications.
342b8b6e 15302
d8cb5183
MA
153032001-08-31 Marc Autret <autret_m@epita.fr>
15304
15305 * src/reader.c (readgram): CleanUp.
15306 (output_token_defines): Likewise.
15307 (packsymbols): Likewise.
15308 (reader): Likewise.
15309 * src/output.c (output): CPP-out useless code.
15310
6c686258
PB
153112001-08-31 Pascal Bart <pascal.bart@epita.fr>
15312
342b8b6e 15313 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
15314 output_trailers and output_headers.
15315 * src/output.h: Remove obsolete functions prototypes of output_headers
15316 and output_trailers.
15317
8f451ef7
PB
153182001-08-30 Pascal Bart <pascal.bart@epita.fr>
15319
15320 * src/main.c: Include macrotab.h.
342b8b6e 15321 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
15322 Adjust functions prototypes.
15323 * src/macrotab.c (macro_insert): Constify key and value.
15324 (macro_find): Constify key.
15325 (macro_insert): Include 'xalloc.h'
15326 (macro_insert): Use XMALLOC.
15327 (macro_find): Constify return value.
15328 * src/output.c (output_table_data): Rename table to table_data.
15329 (output_parser): Constify macro_key, macro_value.
15330
997b6fd0 153312001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
15332
15333 * src/reader.c (parse_skel_decl): New.
342b8b6e 15334 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
15335 * src/lex.h (token_t): New token `tok_skel'.
15336 * src/lex.c (percent_table): Add skeleton option entry.
15337 Standardize.
15338
ff48177d
MA
153392001-08-29 Marc Autret <autret_m@epita.fr>
15340
15341 * src/bison.simple: Add %%user_code directive at the end.
15342 * src/reader.c (read_additionnal_code): New.
15343 (reader): Use it.
15344 * src/output.c (output_program): Remove.
15345 (output): Update.
15346
b33160bf
MA
153472001-08-28 Marc Autret <autret_m@epita.fr>
15348
15349 * src/output.c (output_actions): Clean up.
4e5caae2 15350 (output_gram): CPP-out useless code.
b33160bf
MA
15351 * src/reader.c (reader): Clean up, CPP-out useless code.
15352
d1a2daf7
PB
153532001-08-28 Pascal Bart <pascal.bart@epita.fr>
15354
342b8b6e 15355 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 15356 directive.
d1a2daf7
PB
15357 * src/bison.simple: Add `%%definitions'.
15358
2b763dfe
MA
153592001-08-28 Marc Autret <autret_m@epita.fr>
15360
15361 * config/depcomp: New file.
15362
f1a87ef6
PE
153632001-08-27 Paul Eggert <eggert@twinsun.com>
15364
15365 * src/bison.simple (yyparse): Don't take the address of an
15366 item before the start of an array, as that doesn't conform to
15367 the C Standard.
15368
82e236e2
RA
153692001-08-27 Robert Anisko <robert.anisko@epita.fr>
15370
f1a87ef6 15371 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
15372 obstack. It was done too late here.
15373
15374 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15375 completely wrong.
15376 (reader): Initialize the macro obstack here, since we need it to grow
15377 '%define' directives.
15378
15379 * src/reader.h: Declare the macro obstack as extern.
15380
b0cfa28a
RA
153812001-08-27 Robert Anisko <robert.anisko@epita.fr>
15382
15383 * src/output.c (output_parser): Fix. Store single '%' characters in
15384 the output obstack instead of throwing them away.
15385
6fc74234
AD
153862001-08-27 Akim Demaille <akim@epita.fr>
15387
15388 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15389
9c76d118
RA
153902001-08-25 Robert Anisko <robert.anisko@epita.fr>
15391
15392 * lib/Makefile.am: Adjust.
15393
a8289c62
RA
153942001-08-25 Robert Anisko <robert.anisko@epita.fr>
15395
15396 * src/bison.simple: Update and add '%%' directives.
15397
b6610515
RA
153982001-08-25 Robert Anisko <robert.anisko@epita.fr>
15399
15400 * src/reader.c (reader): Remove calls to 'output_headers' and
15401 'output_trailers'. Remove some C output.
15402 (readgram): Disable a piece of code that was writing a default
15403 definition for 'YYSTYPE'.
15404 (reader_output_yylsp): Remove.
15405 (packsymbols): Output token defintions to a macro.
15406 (copy_definition): Disable C output.
6fc74234 15407
b6610515
RA
15408 * src/reader.c (parse_macro_decl): New function used to parse macro
15409 declarations.
15410 (copy_string2): Put the body of copy_string into this new function.
15411 Add a parameter to let the caller choose whether he wants to copy the
15412 string delimiters or not.
15413 (copy_string): Be a simple call to copy_string2 with the last argument
15414 bound to true.
15415 (read_declarations): Add case for macro definition.
15416 (copy_identifier): New.
6fc74234 15417 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
15418 rather than lex.
15419
26f609ff
RA
154202001-08-25 Robert Anisko <robert.anisko@epita.fr>
15421
15422 * src/output.c (prepare): Add prefixed names.
15423 (output_parser): Output semantic actions.
15424 (output_parser): Fix bug on '%%line' directives.
6fc74234 15425
26f609ff
RA
15426 * src/output.c (output_headers): Remove. The C code printed by this
15427 function should now be in the skeletons.
15428 (output_trailers): Remove.
15429 (output): Disable call to 'reader_output_yylsp'.
15430 (output_rule_data): Do not output tables to the table obstack.
15431
15432 * src/output.c: Remove some C dedicated output.
15433 Improve the use of macro and output obstacks.
15434 (output_defines): Remove.
6fc74234 15435
26f609ff
RA
15436 * src/output.c (output_token_translations): Associate 'translate'
15437 table with a macro. No output to the table obstack.
15438 (output_gram): Same for 'rhs' and 'prhs'.
15439 (output_stos): Same for 'stos'.
15440 (output_rule_data): Same for 'r1' and 'r2'.
15441 (token_actions): Same for 'defact'.
15442 (goto_actions): Same for 'defgoto'.
15443 (output_base): Same for 'pact' and 'pgoto'.
15444 (output_table): Same for 'table'.
15445 (output_check): Same for 'check'.
6fc74234 15446
26f609ff
RA
15447 * src/output.c (output_table_data): New function.
15448 (output_short_table): Remove.
15449 (output_short_or_char_table): Remove.
6fc74234 15450
26f609ff
RA
15451 * src/output.c (output_parser): Replace most of the skeleton copy code
15452 with something new. Skeletons are now processed character by character
15453 rather than line by line, and Bison looks for '%%' macros. This is the
15454 first step in making Bison's output process (a lot) more flexible.
15455 (output_parser): Use the macro table.
15456
6f43b113
RA
154572001-08-25 Robert Anisko <robert.anisko@epita.fr>
15458
15459 * src/main.c (main): Initialize the macro table.
15460
dd3127cf
RA
154612001-08-25 Robert Anisko <robert.anisko@epita.fr>
15462
15463 * src/lex.c (percent_table): Add tok_define.
15464 * src/lex.h: Add tok_define.
15465
aa321494
RA
154662001-08-25 Robert Anisko <robert.anisko@epita.fr>
15467
15468 * src/macrotab.c: New file.
15469 * src/macrotab.h: New file.
15470 * src/Makefile.am: Update.
15471
68bd3b6b
RA
154722001-08-25 Robert Anisko <robert.anisko@epita.fr>
15473
15474 * lib/hash.c: New file.
15475 * lib/hash.h: New file.
15476 * lib/Makefile.am: Update.
15477
45f8dd1e
AD
154782001-08-15 Akim Demaille <akim@epita.fr>
15479
15480 Version 1.28c.
15481
40a64a7a 154822001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
15483
15484 * src/reader.c (readgram): Indent output macro YYSTYPE.
15485 (packsymbols): Likewise.
15486 (output_token_defines): Likewise.
15487 * src/files.c: Standardize.
15488 (compute_header_macro): New.
15489 (defines_obstack_save): New. Use compute_header_macro.
15490 (output_files): Update. Use defines_obstack_save.
15491
f9a8293a
AD
154922001-08-15 Akim Demaille <akim@epita.fr>
15493
15494 * doc/bison.texinfo (Table of Symbols): Document
15495 YYSTACK_USE_ALLOCA.
15496
150ca7a7
AD
154972001-08-15 Akim Demaille <akim@epita.fr>
15498
15499 * missing: Update from CVS Automake.
15500 * config/config.guess, config/config.sub, config/texinfo.tex:
15501 Update from gnu.org.
15502
69b5cec4
AD
155032001-08-15 Akim Demaille <akim@epita.fr>
15504
15505 * Makefile.maint: Sync with CVS Autoconf.
15506
f2b5126e
PB
155072001-08-14 Pascal Bart <pascal.bart@epita.fr>
15508
69b5cec4 15509 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
15510 `fdl.texi'.
15511 * doc/fdl.texi: Add to package.
15512
4ecbf796
MA
155132001-08-14 Marc Autret <autret_m@epita.fr>
15514
15515 Turn on %{source,header}_extension features.
15516
69b5cec4 15517 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
15518 source_extension.
15519 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 15520 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
15521 between options.
15522
95fb5662
MA
155232001-08-14 Marc Autret <autret_m@epita.fr>
15524
15525 * src/files.c (compute_base_names): Add extensions computing when
15526 `--file-prefix' used.
15527 Standardize function calls.
15528
78d09da9
MA
155292001-08-13 Marc Autret <autret_m@epita.fr>
15530
69b5cec4 15531 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
15532 defining it (defined but null disables alloca).
15533
5a009f2c
MA
155342001-08-13 Marc Autret <autret_m@epita.fr>
15535
15536 * src/bison.simple (_yy_memcpy): CPP reformat.
15537
1e41465a
PB
155382001-08-13 Pascal Bart <pascal.bart@epita.fr>
15539
15540 * tests/atconfig.in (CPPFLAGS): Fix.
15541
c67a198d
PB
155422001-08-10 Pascal Bart <pascal.bart@epita.fr>
15543
79282c6c 15544 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
15545 `gpl.texi'.
15546 * doc/gpl.texi: Add to package.
15547
09a6de7e
MA
155482001-08-10 Marc Autret <autret_m@epita.fr>
15549
15550 * src/print_graph.h: Fix.
15551 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15552
b77b9ee0
AD
155532001-08-10 Akim Demaille <akim@epita.fr>
15554
15555 * src/system.h: Provide default declarations for stpcpy, strndup,
15556 and strnlen.
15557
3e259915
MA
155582001-08-10 Robert Anisko <anisko_r@epita.fr>
15559
15560 * doc/bison.texinfo (Locations): Update @$ stuff.
15561
ca96bc2d
MA
155622001-08-09 Robert Anisko <anisko_r@epita.fr>
15563
15564 * src/bison.simple (YYLLOC_DEFAULT): Update.
15565 (yyparse): Adjust.
15566
fdc6758b
MA
155672001-08-08 Marc Autret <autret_m@epita.fr>
15568
b77b9ee0 15569 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
15570 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15571 Reported by Fabrice Bauzac.
957d4dbf 15572
600cad3b
MA
155732001-08-08 Marc Autret <autret_m@epita.fr>
15574
15575 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15576 * src/vcg.c (output_node): Fix.
15577 * src/vcg.h: Cleanup.
15578 * src/print_graph.c: Add comments.
b77b9ee0 15579 (node_output_size): New global variable. Simplify the formatting of
600cad3b 15580 the VCG graph output.
b77b9ee0 15581 (print_actions): Unused code is now used. It notifies the final state
600cad3b 15582 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 15583 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
15584 blue.
15585 Get the current node name and node_obstack by argument.
15586 (node_obstack): New variable.
15587 (print_state): Manage node_obstack.
15588 (print_core): Use node_obstack given by argument.
15589 A node is not only computed here but in print_actions also.
15590 (print_graph): CPP out useless code instead of commenting it.
15591
976e528f
AD
155922001-08-07 Pascal Bart <pascal.bart@epita.fr>
15593
15594 * tests/atconfig.in (CPPFLAGS): Fix.
15595
20e8e5ca
AD
155962001-08-07 Akim Demaille <akim@epita.fr>
15597
15598 * src/print_graph.c (quote): New.
15599 (print_core): Use it.
15600
957d4dbf 156012001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 15602
3e3da797
AD
15603 * src/vcg.c (complain.h): Include it.
15604 Unepitaize `return' invocations.
c4b66126 15605 [NDEBUG] (main): Remove.
79282c6c 15606 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
15607 * src/files.c (open_files): Initialize graph_obstack.
15608 * src/print_graph.c (print_actions): CPP out useless code.
15609 (print_core): Don't output the last `\n' in labels.
15610 Use `quote'.
15611 * src/files.c (output_files): Output the VCG file.
15612 * src/main.c (main): Invoke print_graph ();
3e3da797 15613
957d4dbf 156142001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
15615
15616 Automaton VCG graph output.
15617 Using option ``-g'' or long option ``--graph'', you can generate
15618 a gram_filename.vcg file containing a VCG description of the LALR (1)
15619 automaton of your grammar.
15620
15621 * src/main.c: Call to print_graph() function.
15622 * src/getargs.h: Update.
15623 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15624 (graph_flag): New flag.
15625 (longopts): Update.
15626 (getargs): Add case `g'.
15627 * src/files.c (graph_obstack): New obstack struct.
15628 (open_files): Initialize new obstack.
15629 (output_files): Saves graph_obstack if required.
15630 * src/files.h (graph_obstack): New extern declaration.
15631 * src/Makefile.am: Add new source files.
15632
927c1557 156332001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
15634
15635 * src/print_graph.c, src/print_graph.h (graph): New.
15636 * src/vcg.h: New file.
15637 * src/vcg.c: New file, VCG graph handling.
15638
7333d403
AD
156392001-08-06 Marc Autret <autret_m@epita.fr>
15640
15641 Add of %source_extension and %header_extension which specify
15642 the source or/and the header output file extension.
15643
15644 * src/files.c (compute_base_names): Remove initialisation of
15645 src_extension and header_extension.
15646 (compute_exts_from_gf): Update.
15647 (compute_exts_from_src): Update.
15648 (output_files): Update.
15649 * src/reader.c (parse_header_extension_decl): New.
15650 (parse_source_extension_decl): New.
15651 (read_declarations): New case statements for the new tokens.
15652 * src/lex.c (percent_table): Add entries for %source_extension
15653 and %header_extension.
15654 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15655
84163231
AD
156562001-08-06 Marc Autret <autret_m@epita.fr>
15657
15658 * configure.in: Bump to 1.28c.
15659 * doc/bison.texinfo: Texinfo thingies.
15660
8303fc42
AD
156612001-08-04 Pascal Bart <pascal.bart@epita.fr>
15662
15663 * tests/atconfig.in (CPPFLAGS): Add.
15664 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15665
70a84437
AD
156662001-08-03 Akim Demaille <akim@epita.fr>
15667
15668 Version 1.28b.
15669
2ce10144
AD
156702001-08-03 Akim Demaille <akim@epita.fr>
15671
15672 * tests/Makefile.am (check-local): Ship testsuite.
15673 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15674 Include `string.h'.
15675
1e3e4bc1
AD
156762001-08-03 Akim Demaille <akim@epita.fr>
15677
15678 * configure.in: Try using -Wformat when compiling.
15679
42b45b7f
AD
156802001-08-03 Akim Demaille <akim@epita.fr>
15681
15682 * configure.in: Bump to 1.28b.
15683
8f13fe33
AD
156842001-08-03 Akim Demaille <akim@epita.fr>
15685
15686 * src/complain.c: Adjust strerror_r portability issues.
15687
b37ba92c
AD
156882001-08-03 Akim Demaille <akim@epita.fr>
15689
15690 Version 1.28a.
15691
b0ce6046
AD
156922001-08-03 Akim Demaille <akim@epita.fr>
15693
15694 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15695 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15696 * src/getargs.c: Include complain.h.
15697 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15698 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15699
d01c415b
AD
157002001-08-03 Akim Demaille <akim@epita.fr>
15701
15702 * src/reader.c (readgram): Display hidden chars in error messages.
15703
459dd1a6
AD
157042001-08-03 Akim Demaille <akim@epita.fr>
15705
15706 Update to gettext 0.10.39.
15707
53b74c0c
AD
157082001-08-03 Akim Demaille <akim@epita.fr>
15709
15710 * lib/strspn.c: New.
15711
234a3be3
AD
157122001-08-01 Marc Autret <autret_m@epita.fr>
15713
15714 * doc/bison.texinfo: Update.
15715 * doc/bison.1 (mandoc): Update.
15716 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15717 * src/files.c: Support output files extensions computing.
15718 (src_extension): New static variable.
15719 (header_extension): New static variable.
15720 (tr): New function.
15721 (get_extension_index): New function, gets the index of an extension
15722 filename in a string.
15723 (compute_exts_from_gf): New function, computes extensions from the
15724 grammar file extension.
15725 (compute_exts_from_src): New functions, computes extensions from the
15726 C source file extension, file given by ``-o'' option.
15727 (compute_base_names): Update.
15728 (output_files): Update.
15729
847bf1f5
AD
157302001-08-01 Robert Anisko <anisko_r@epita.fr>
15731
d995fee7 15732 * doc/bison.texi: Document @$.
847bf1f5
AD
15733 (Locations): New section.
15734
d074a105
AD
157352001-07-18 Akim Demaille <akim@epita.fr>
15736
15737 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15738 * config/prev-version.txt, config/move-if-change: New.
15739 * Makefile.am: Adjust.
15740
3419715d
AD
157412001-07-08 Pascal Bart <pascal.bart@epita.fr>
15742
15743 * src/bison.simple (yyparse): Suppress warning `comparaison
15744 between signed and unsigned'.
15745
62ab6972
AD
157462001-07-05 Pascal Bart <pascal.bart@epita.fr>
15747
15748 * src/getargs.h (raw_flag): Remove.
15749 * src/getargs.c: Die on `-r'/`--raw'.
15750 * src/lex.c (parse_percent_token): Die on `%raw'.
15751 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15752 * tests/calc.at: Suppress test with option `--raw'.
15753
1e24cc5b
AD
157542001-07-14 Akim Demaille <akim@epita.fr>
15755
15756 * config/: New.
15757 * configure.in: Require Autoconf 2.50.
15758 Update to gettext 0.10.38.
15759
32dfccf8
AD
157602001-03-16 Akim Demaille <akim@epita.fr>
15761
15762 * doc/bison.texinfo: ANSIfy the examples.
15763
cd5bd6ac
AD
157642001-03-16 Akim Demaille <akim@epita.fr>
15765
15766 * getargs.c (skeleton): New variable.
15767 (longopts): --skeleton is a new option.
15768 (shortopts, getargs): -S is a new option.
15769 * getargs.h: Declare skeleton.
15770 * output.c (output_parser): Use it.
15771
5141b016
AD
157722001-03-16 Akim Demaille <akim@epita.fr>
15773
15774 * m4/strerror_r.m4: New.
15775 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15776 * lib/error.h, lib/error.c: Update.
15777
447992b9
AD
157782001-03-16 Akim Demaille <akim@epita.fr>
15779
15780 * src/getargs.c (longopts): Clean up.
15781
274d42ce
AD
157822001-02-21 Akim Demaille <akim@epita.fr>
15783
15784 * src/reader.c (gensym): `gensym_count' is your own.
15785 Use a static buf to create the symbol name, as token_buffer is no
15786 longer a buffer.
15787
22c821f3
AD
157882001-02-08 Akim Demaille <akim@epita.fr>
15789
15790 * src/conflicts.c (conflict_report): Be sure not to append to res
15791 between two calls, which could happen if both first sprintf were
15792 skipped, but not the first cp += strlen.
15793
18569462
AD
157942001-02-08 Akim Demaille <akim@epita.fr>
15795
15796 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15797 New, from fileutils 4.0.37.
15798 * configure.in: Require Autoconf 2.49c. I took some time before
15799 making this decision. This is the only way out for portability
15800 issues in Bison, it would mean way too much duplicate effort to
15801 import in Bison features implemented in 2.49c since 2.13.
15802 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15803
0d8f3c8a
AD
158042001-02-02 Akim Demaille <akim@epita.fr>
15805
15806 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 15807 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 15808
f17bcd1f
AD
158092001-01-19 Akim Demaille <akim@epita.fr>
15810
15811 Get rid of the ad hoc handling of token_buffer in the scanner: use
15812 the obstacks.
15813
15814 * src/lex.c (token_obstack): New.
15815 (init_lex): Initialize it. No longer call...
15816 (grow_token_buffer): this. Remove it.
15817 Adjust all the places which used it to use the obstack.
15818
511e79b3
AD
158192001-01-19 Akim Demaille <akim@epita.fr>
15820
15821 * src/lex.h: Rename all the tokens:
15822 s/\bENDFILE\b/tok_eof/g;
15823 s/\bIDENTIFIER\b/tok_identifier/g;
15824 etc.
15825 Let them be enums, not #define, to ease debugging.
15826 Adjust all the code.
15827
0d6508ef
AD
158282001-01-18 Akim Demaille <akim@epita.fr>
15829
15830 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15831 * src/lex.c (maxtoken, grow_token_buffer): Static.
15832
6deb4447
AD
158332001-01-18 Akim Demaille <akim@epita.fr>
15834
15835 Since we now use obstacks, more % directives can be enabled.
15836
15837 * src/lex.c (percent_table): Also accept `%yacc',
15838 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15839 `%debug'.
15840 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15841 instead of returning a token.
15842 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15843 * src/reader.c (read_declarations): Adjust.
15844 * src/files.c (open_files): Don't call `compute_base_names', don't
15845 compute `attrsfile' since they depend upon data which might be
15846 *in* the input file now.
15847 (output_files): Do it here.
15848 * src/output.c (output_headers): Document the fact that this patch
15849 introduces a guaranteed SEGV for semantic parsers.
15850 * doc/bison.texinfo: Document them.
15851 * tests/suite.at: Exercise these %options.
15852
ff4423cc
AD
158532000-12-20 Akim Demaille <akim@epita.fr>
15854
15855 Also handle the output file (--verbose) with obstacks.
15856
15857 * files.c (foutput): Remove.
15858 (output_obstack): New.
15859 Adjust all dependencies.
15860 * src/conflicts.c: Return a string.
15861 * src/system.h (obstack_grow_string): Rename as...
15862 (obstack_sgrow): this. Be ready to work with non literals.
15863 (obstack_fgrow4): New.
15864
956dba3a
AD
158652000-12-20 Akim Demaille <akim@epita.fr>
15866
15867 * src/files.c (open_files): Fix the computation of short_base_name
15868 in the case of `-o foo.tab.c'.
15869
337bab46
AD
158702000-12-20 Akim Demaille <akim@epita.fr>
15871
15872 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15873 (copy_dollar): Now that everything uses obstacks, get rid of the
15874 FILE * parameters.
15875
5d3214b8
AD
158762000-12-20 Akim Demaille <akim@epita.fr>
15877
15878 * src/files.c (open_files): Actually the `.output' file is based
15879 on the short_base_name, not base_name.
15880 * tests/suite.at (Checking output file names): Adjust.
15881
29092a57
AD
158822000-12-20 Akim Demaille <akim@epita.fr>
15883
15884 * src/bison.s1: Remove, we now use directly...
15885 * src/bison.simple: this.
15886 * src/Makefile.am: Use pkgdata instead of data.
15887
ea5607fd
AD
158882000-12-20 Akim Demaille <akim@epita.fr>
15889
15890 * src/files.c (guard_obstack): New.
15891 (open_files): Initialize it.
15892 (output_files): Dump it...
15893 * src/files.h: Export it.
15894 * src/reader.c (copy_guard): Use it.
15895
27110317
AD
158962000-12-19 Akim Demaille <akim@epita.fr>
15897
15898 * src/files.c (outfile, defsfile, actfile): Removed as global
15899 vars.
15900 (open_files): Don't compute them.
15901 (output_files): Adjust.
15902 (base_name, short_base_name): Be global.
15903 Adjust dependencies.
15904
19c50364
AD
159052000-12-19 Akim Demaille <akim@epita.fr>
15906
15907 * src/files.c (strsuffix): New.
15908 (stringappend): Be just like strcat but allocate.
15909 (base_names): Eve out from open_files.
15910 Try to simplify the rather hairy computation of base_name and
15911 short_base_name.
15912 (open_files): Use it.
15913 * tests/suite.at (Checking output file names): New test.
15914
573c1d9f
AD
159152000-12-19 Akim Demaille <akim@epita.fr>
15916
15917 * src/system.h (obstack_grow_literal_string): Rename as...
15918 (obstack_grow_string): this.
15919 * src/output.c (output_parser): Recognize `%% actions' instead of
15920 `$'.
15921 * src/bison.s1: s/$/%% actions/.
15922 * src/bison.hairy: Likewise.
15923
ef7ddedd
AD
159242000-12-19 Akim Demaille <akim@epita.fr>
15925
15926 * src/output.c (output_parser): Compute the `#line' lines when
15927 there are.
15928 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15929 Suggested by Hans Aberg.
15930
ff61dabd
AD
159312000-12-19 Akim Demaille <akim@epita.fr>
15932
15933 Let the handling of the skeleton files be local to the procedures
15934 that use it.
15935
15936 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15937 longer static.
15938 (fparser, open_extra_files): Remove.
15939 (open_files, output_files): Don't take care of fparser.
15940 * src/files.h: Adjust.
15941 * src/output.c (output_parser): Open and close the file to the
15942 skeleton.
15943 * src/reader.c (read_declarations): When %semantic_parser, open
15944 fguard.
15945
55b96341
AD
159462000-12-19 Akim Demaille <akim@epita.fr>
15947
15948 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15949 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15950
358c15b7
AD
159512000-12-19 Akim Demaille <akim@epita.fr>
15952
15953 * src/files.c (open_files): Yipee! We no longer need all the code
15954 looking for `/tmp' since we have no tmp file.
15955
7de3329e
AD
159562000-12-19 Akim Demaille <akim@epita.fr>
15957
15958 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15959 New macros.
15960 * src/files.c (open_files): Less dependency on MSDOS etc.
15961
3abcd459
AD
159622000-12-14 Akim Demaille <akim@epita.fr>
15963
15964 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15965 Provide a default definition.
15966 Use it when executing the default @ action.
15967 * src/reader.c (reader_output_yylsp): No longer include
15968 `timestamp' and `text' in the default YYLTYPE.
15969
2a91a95e
AD
159702000-12-12 Akim Demaille <akim@epita.fr>
15971
15972 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15973 (copy_guard): Quote the file names.
15974 Reported by Laurent Mascherpa.
15975
14d3eb9b
AD
159762000-12-12 Akim Demaille <akim@epita.fr>
15977
15978 * src/output.c (output_headers, output_program, output): Be sure
15979 to escape special characters when outputting filenames.
15980 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15981 (output_headers): Don't depend on them, Use ACTSTR.
15982
d7045ec6
AD
159832000-11-17 Akim Demaille <akim@epita.fr>
15984
15985 * lib/obstack.h: Formatting changes.
15986 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15987 prevents type checking.
15988 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15989 cast the value to (void *): assigning a `foo *' to a `void *'
15990 variable is valid.
15991 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15992 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15993 append characters.
15994
6fd54b73
AD
159952000-11-17 Akim Demaille <akim@epita.fr>
15996
15997 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15998 as...
15999 (suite.m4, regression.m4, calc.m4): these.
16000 * tests/atgeneral.m4: Update from CVS Autoconf.
16001
4c50eae6
AD
160022000-11-17 Akim Demaille <akim@epita.fr>
16003
16004 * tests/regression.m4 (%union and --defines): New test,
16005 demonstrating a current bug in the obstack implementation.
16006
a35f64ea
AD
160072000-11-17 Akim Demaille <akim@epita.fr>
16008
16009 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16010 macros.
16011 Use them to declare the variables which are global or local to
16012 `yyparse'.
16013
7de23534
AD
160142000-11-17 Akim Demaille <akim@epita.fr>
16015
16016 * acconfig.h: Remove, no longer used.
16017
aa7815f5
AD
160182000-11-07 Akim Demaille <akim@epita.fr>
16019
16020 * src: s/Copyright (C)/Copyright/g.
16021
5af1f549
AD
160222000-11-07 Akim Demaille <akim@epita.fr>
16023
16024 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16025 defining.
16026 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16027
553e2b22
AD
160282000-11-07 Akim Demaille <akim@epita.fr>
16029
16030 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16031 Merge in a single CPP if/else.
16032
8a4f41d6
AD
160332000-11-07 Akim Demaille <akim@epita.fr>
16034
16035 * src/output.c (output): Remove useless variables.
16036 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16037 argument `data' for consistency with the prototypes.
16038 Qualify it `const'.
16039 (obstack_copy, obstack_copy0): Rename the second argument as
16040 `address' for consistency. Qualify it `const'.
16041 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16042 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16043 `const' their input argument (`data' or `address').
16044 Adjust the corresponding macros to include `const' in casts.
16045
095a3fb5
AD
160462000-11-03 Akim Demaille <akim@epita.fr>
16047
16048 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16049 s/PFILE1/BISON_HAIRY/.
16050 Adjust dependencies.
16051
d1cdce7c
AD
160522000-11-03 Akim Demaille <akim@epita.fr>
16053
090c5ebf 16054 For some reason, this was not applied.
d1cdce7c
AD
16055
16056 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16057 `unlink': it's no longer used.
16058
9311529b
AD
160592000-11-03 Akim Demaille <akim@epita.fr>
16060
16061 * src/files.c (skeleton_find): New function, eved out of...
16062 (open_files, open_extra_files): here.
16063
d8880f69
AD
160642000-11-03 Akim Demaille <akim@epita.fr>
16065
16066 Don't use `atexit'.
16067
16068 * src/files.c (obstack_save): New function.
16069 (done): Rename as...
16070 (output_files): this.
16071 Use `obstack_save'.
16072 * src/main.c (main): Don't use `atexit' to register `done', since
16073 it no longer has to remove tmp files, just call `output_files'
16074 when there are no errors.
16075
0dbb648e
AD
160762000-11-02 Akim Demaille <akim@epita.fr>
16077
16078 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16079 `unlink': it's no longer used.
16080 * src/files.h: Formatting changes.
16081
896fe5c1
AD
160822000-11-02 Akim Demaille <akim@epita.fr>
16083
16084 Remove the last uses of mktemp and unlink/delete.
16085
16086 * src/files.c (fdefines, ftable): Removed.
16087 (defines_ostack, table_obstack): New.
16088 Adjust dependencies of the former into uses of the latter.
16089 * src/output.c (output_short_or_char_table, output_short_table):
16090 Convert to using obstacks.
16091 * src/reader.c (copy_comment2): Accept one FILE * and two
16092 obstacks.
16093 (output_token_defines, reader_output_yylsp): Use obstacks.
16094 * src/system.h (obstack_fgrow3): New.
1f65350a 16095 * po/POTFILES.in: Adjust.
896fe5c1 16096
dd60faec
AD
160972000-11-01 Akim Demaille <akim@epita.fr>
16098
16099 Change each use of `fattrs' into a use of `attrs_obstack'.
16100
16101 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
16102 * src/files.c (fattrs): Remove.
16103 (attrs_obstack): New.
16104 Adjust all dependencies.
16105 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
16106
8c7ebe49
AD
161072000-11-01 Akim Demaille <akim@epita.fr>
16108
16109 Introduce obstacks.
16110 Change each use of `faction' into a use of `action_obstack'.
16111
16112 * lib/obstack.h, lib/obstack.c: New files.
16113 * src/files.c (faction): Remove.
16114 (action_obstack): New.
16115 Adjust all dependencies.
16116
77aee789
AD
161172000-10-20 Akim Demaille <akim@epita.fr>
16118
16119 * lib/quote.h (PARAMS): New macro. Use it.
16120
43591cec
AD
161212000-10-16 Akim Demaille <akim@epita.fr>
16122
16123 * src/output.c (output_short_or_char_table): New function.
16124 (output_short_table, output_token_translations): Use it.
16125 (goto_actions): Use output_short_table.
16126
1e9798d5
AD
161272000-10-16 Akim Demaille <akim@epita.fr>
16128
16129 * src/symtab.c (bucket_new): New function.
16130 (getsym): Use it.
16131
16132 * src/output.c (output_short_table): New argument to display the
16133 comment associated with the table.
16134 Adjust dependencies.
16135 (output_gram): Use it.
16136 (output_rule_data): Nicer output layout for YYTNAME.
16137
f282676b
AD
161382000-10-16 Akim Demaille <akim@epita.fr>
16139
16140 * src/lex.c (read_typename): New function.
16141 (lex): Use it.
16142 * src/reader.c (copy_dollar): Likewise.
16143
550a72a3
AD
161442000-10-16 Akim Demaille <akim@epita.fr>
16145
16146 * src/reader.c (copy_comment2): Expect the input stream to be on
16147 the `/' which is suspected to open a comment, instead of being
16148 called after `//' or `/*' was read.
16149 (copy_comment, copy_definition, parse_union_decl, copy_action)
16150 (copy_guard): Adjust.
16151
131e2fef
AD
161522000-10-16 Akim Demaille <akim@epita.fr>
16153
16154 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
16155 `read_signed_integer'.
16156
79282c5a
AD
161572000-10-16 Akim Demaille <akim@epita.fr>
16158
16159 * src/reader.c (copy_dollar): New function.
16160 (copy_guard, copy_action): Use it.
16161
ff4a34be
AD
161622000-10-16 Akim Demaille <akim@epita.fr>
16163
16164 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
16165 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
16166 New files, from Fileutils 4.0.27.
16167 * src/main.c (printable_version): Remove.
16168 * src/lex.c, src/reader.c: Use `quote'.
16169
161702000-10-04 Akim Demaille <akim@epita.fr>
16171
16172 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
16173
14ded682
AD
161742000-10-04 Akim Demaille <akim@epita.fr>
16175
16176 * doc/bison.texinfo: Various typos spotted by Neil Booth.
16177
8e03724b
AD
161782000-10-04 Akim Demaille <akim@epita.fr>
16179
16180 When a literal string is used to define two different tokens,
16181 `bison -v' segfaults.
16182 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
16183
16184 * tests/regression.m4: New file.
16185 Include the core of the sample provided by Piotr Gackiewicz.
16186 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
16187 properly.
16188
a9e64249
AD
161892000-10-04 Akim Demaille <akim@epita.fr>
16190
16191 * src/reader.c (parse_expect_decl): Keep `count' within the size
16192 of `buffer'.
16193 From Neil Booth.
16194
da9abf43
AD
161952000-10-02 Paul Eggert <eggert@twinsun.com>
16196
16197 * bison.s1 (yyparse): Assign the default value
16198 unconditionally, to avoid a GCC warning and make the parser a
16199 tad smaller.
16200
c33638bb
AD
162012000-10-02 Akim Demaille <akim@epita.fr>
16202
16203 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
16204 options.
16205
444c570a
AD
162062000-10-02 Akim Demaille <akim@epita.fr>
16207
16208 * src/derives.c, src/print.c, src/reduce.c: To ease the
16209 translation, move some `\n' out of the translated strings.
16210
89cab50d
AD
162112000-10-02 Akim Demaille <akim@epita.fr>
16212
16213 The location tracking mechanism is precious for parse error
16214 messages. Nevertheless, it is enabled only when `@n' is used in
16215 the grammar, which is a different issue (you can use it in error
16216 message, but not in the grammar per se). Therefore, there should
16217 be another means to enable it.
16218
16219 * src/getargs.c (getargs): Support `--locations'.
16220 (usage): Report it.
16221 * src/getargs.h (locationsflag): Export it.
16222 * src/lex.c (percent_table): Support `%locations'.
16223 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16224 with `locationsflag'.
16225 * doc/bison.texinfo: Document `--locations' and `%locations'.
16226 Sort the options.
16227 * tests/calc.m4: Test it.
16228
16229 For regularity of the names, replace each
16230 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16231 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16232 In addition replace each `flag' with `_flag'.
16233
d6c2cba0
AD
162342000-10-02 Akim Demaille <akim@epita.fr>
16235
16236 Also test parse error messages, including with YYERROR_VERBOSE.
16237
16238 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16239 associative).
16240 Use it to check the computations.
16241 Use it to check `nonassoc' is honored.
16242 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16243 `--yyerror-verbose'.
16244 (_AT_CHECK_CALC): Adjust to this option.
16245 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16246
5a35a6cb
AD
162472000-10-02 Akim Demaille <akim@epita.fr>
16248
16249 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16250 the latter demonstrates a flaw in the handling of non debugging
16251 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16252 was used in order to simplify:
16253
16254 #if YYDEBUG
16255 if (yydebug)
16256 {
16257 ...
16258 }
16259 #endif
16260
16261 into
16262
16263 if (yydebug)
16264 {
16265 ...
16266 }
16267
16268 unfortunately this leads to a CPP conflict when
16269 `--name-prefix=foo' is used since it produces `#define yydebug
16270 foodebug'.
16271
16272 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16273 (YYDPRINTF): New macro.
16274 Spread its use.
16275 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16276 the bison options.
16277 Also test `--verbose', `--defines' and `--name-prefix'.
16278
71da9eea
AD
162792000-10-02 Akim Demaille <akim@epita.fr>
16280
16281 Improve the readability of the produced parsers.
16282
16283 * src/bison.s1: Formatting changes.
16284 Improve the comment related to the `$' mark.
16285 (yydefault): Don't fall through to `yyresume': `goto' there.
16286 * src/output.c (output_parser): When the `$' is met, skip the end
16287 of its line.
16288 New variable, `number_of_dollar_signs', to check there's exactly
16289 one `$' in the parser skeleton.
16290
95e36146
AD
162912000-10-02 Akim Demaille <akim@epita.fr>
16292
16293 * lib/xstrdup.c: New file, from the fileutils.
16294 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16295 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16296 instead of strlen + xmalloc + strcpy.
16297 * src/symtab.c (copys): Remove, use xstrdup instead.
16298
d7020c20
AD
162992000-10-02 Akim Demaille <akim@epita.fr>
16300
16301 * src/gram.h (associativity): New enum type which replaces the
16302 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16303 `right_assoc', `left_assoc' and `non_assoc'.
16304 Adjust all dependencies.
16305 * src/reader.c: Formatting changes.
16306 (LTYPESTR): Don't define it, use it as a literal in
16307 `reader_output_yylsp'.
16308 * src/symtab.h (symbol_class): New enum type which replaces the
16309 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16310 `sunknown', `stoken and `snterm'.
16311
1916f98e
AD
163122000-10-02 Akim Demaille <akim@epita.fr>
16313
16314 * src/getargs.c (fixed_outfiles): Rename as...
16315 (yaccflag): for consistency and accuracy.
16316 Adjust dependencies.
16317
d7913476
AD
163182000-10-02 Akim Demaille <akim@epita.fr>
16319
16320 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16321 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16322 difficult and introduced a lot of core dump. It turns out that
16323 Bison used an implementation of `xmalloc' based on `calloc', and
16324 at various places it does depend upon the initialization to 0. I
16325 have not tried to isolate the pertinent places, and all the former
16326 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16327 someone should address this issue.
16328
16329 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16330 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16331 files.
16332 Adjust dependencies.
16333 * src/warshall.h: New file.
16334 Propagate.
16335
340ef489
AD
163362000-10-02 Akim Demaille <akim@epita.fr>
16337
16338 Various anti-`extern in *.c' changes.
16339
16340 * src/system.h: Include `assert.h'.
16341
b2ca4022
AD
163422000-10-02 Akim Demaille <akim@epita.fr>
16343
16344 * src/state.h (nstates, final_state, first_state, first_shift)
16345 (first_reduction): Move their exportation from here...
16346 * src/LR0.h: to here.
16347 Adjust dependencies.
16348 * src/getargs.c (statisticsflag): New variable.
16349 Add support for `--statistics'.
16350 Adjust dependencies.
16351
16352 Remove a lot of now useless `extern' statements in most files.
16353
403b315b
AD
163542000-10-02 Akim Demaille <akim@epita.fr>
16355
16356 * src/LR0.h: New file.
16357 Propagate its use.
16358
07a58c13
AD
163592000-10-02 Akim Demaille <akim@epita.fr>
16360
16361 * src/print.h: New file.
16362 Propagate its use.
16363 * src/print.c: Formatting and ordering changes.
16364 (verbose, terse): Replace with...
16365 (print_results): this new function.
16366 Adjust dependencies.
16367
0619caf0
AD
163682000-10-02 Akim Demaille <akim@epita.fr>
16369
16370 * src/conflicts.c (conflict_report): New function.
16371 (conflict_log, verbose_conflict_log): Replace with...
16372 (print_conflicts): this function.
16373 Adjust dependencies.
16374 * src/conflicts.h: New file.
16375 Propagate its inclusion.
16376
3519ec76
AD
163772000-10-02 Akim Demaille <akim@epita.fr>
16378
16379 * src/nullable.h: New file.
16380 Propagate its inclusion.
16381 * src/nullable.c: Formatting changes.
16382
015acc48
AD
163832000-10-02 Akim Demaille <akim@epita.fr>
16384
16385 * src/reduce.h: New file.
16386 Propagate its inclusion.
16387 * src/reduce.c: Topological sort and other formatting changes.
16388 (bool, TRUE, FALSE): Move their definition to...
16389 * src/system.h: here.
16390
8963a27b
AD
163912000-10-02 Akim Demaille <akim@epita.fr>
16392
16393 * src/files.c: Formatting changes.
16394 (tryopen, tryclose, openfiles): Rename as...
16395 (xfopen, xfclose, open_files): this.
16396 (stringappend): static.
16397 * src/files.h: Complete the list of exported symbols.
16398 Propagate its use.
16399
a70083a3
AD
164002000-10-02 Akim Demaille <akim@epita.fr>
16401
16402 * src/reader.h: New file.
16403 Propagate its use instead of tedious list of `extern' and
16404 prototypes.
16405 * src/reader.c: Formatting changes, topological sort,
16406 s/register//.
16407
abadc117
AD
164082000-10-02 Akim Demaille <akim@epita.fr>
16409
16410 * src/lex.h: Prototype `lex.c' exported functions.
16411 * src/reader.c: Adjust.
16412 * src/lex.c: Formatting changes.
16413 (safegetc): Rename as...
16414 (xgetc): this.
16415
720d742f
AD
164162000-10-02 Akim Demaille <akim@epita.fr>
16417
16418 * src/lalr.h: New file.
16419 Propagate its inclusion instead of prototypes and `extern'.
16420 * src/lalr.c: Formatting changes, topological sorting etc.
16421
f2acea59
AD
164222000-10-02 Akim Demaille <akim@epita.fr>
16423
16424 * src/output.c (token_actions): Introduce a temporary array,
16425 YYDEFACT, that makes it possible for this function to use
16426 output_short_table.
16427
d019d655
AD
164282000-10-02 Akim Demaille <akim@epita.fr>
16429
16430 `user_toknums' is output as a `short[]' in `output.c', while it is
16431 defined as a `int[]' in `reader.c'. For consistency with the
16432 other output tables, `user_toknums' is now defined as a table of
16433 shorts.
16434
16435 * src/reader.c (user_toknums): Be a short table instead of an int
16436 table.
16437 Adjust dependencies.
16438
16439 Factor the short table outputs.
16440
16441 * src/output.c (output_short_table): New function.
16442 * src/output.c (output_gram, output_stos, output_rule_data)
16443 (output_base, output_table, output_check): Use it.
16444
6c89f1c1
AD
164452000-10-02 Akim Demaille <akim@epita.fr>
16446
16447 * src/output.c (output): Topological sort of the functions, in
16448 order to get rid of the `static' prototypes.
16449 No longer use `register'.
16450 * src/output.h: New file.
16451 Propagate its inclusion in files explicitly prototyping functions
16452 from output.c.
16453
d9efd181
AD
164542000-09-21 Akim Demaille <akim@epita.fr>
16455
16456 * src/atgeneral.m4: Update from Autoconf.
16457
c29240e7 164582000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
16459
16460 * src/closure.h: New file.
16461 * src/closure.c: Formatting changes, topological sort over the
16462 functions, use of closure.h.
16463 (initialize_closure, finalize_closure): Rename as...
16464 (new_closure, free_closure): these. Adjust dependencies.
16465 * src/LR0.c: Formatting changes, topological sort, use of
16466 cloture.h.
16467 (initialize_states): Rename as...
16468 (new_states): this.
16469 * src/Makefile.am (noinst_HEADERS): Adjust.
16470
499daa50
AD
164712000-09-20 Akim Demaille <akim@epita.fr>
16472
16473 * src/acconfig.h: Don't protect config.h against multiple
16474 inclusion.
16475 Don't define PARAMS.
16476 * src/system.h: Define PARAMS.
16477 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16478 purpose of config.h. system.h must not try to fix wrong
16479 definitions in config.h.
16480
cc84fd5d
AD
164812000-09-20 Akim Demaille <akim@epita.fr>
16482
16483 * src/derives.h: New file.
16484 * src/main.c, src/derives.h: Use it.
16485 Formatting changes.
16486 * src/Makefile.am (noinst_HEADERS): Adjust.
16487
db5b3a89
AD
164882000-09-20 Akim Demaille <akim@epita.fr>
16489
16490 * tests/atgeneral.m4: Update from Autoconf.
16491 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16492 (AT_CHECK_CALC): New macros.
16493 Use these macros to test bison with options `', `--raw',
16494 `--debug', `--yacc', `--yacc --debug'.
16495
ceed8467
AD
164962000-09-19 Akim Demaille <akim@epita.fr>
16497
16498 * src/output.c: Formatting changes.
16499 * src/machine.h: Remove, leaving its contents in...
16500 * src/system.h: here.
16501 Include stdio.h.
16502 Adjust all dependencies on stdio.h and machine.h.
16503 * src/getargs.h: New file.
16504 Let all `extern' declarations about getargs.c be replaced with
16505 inclusion of `getargs.h'.
16506 * src/Makefile.am (noinst_HEADERS): Adjust.
16507
16508 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16509 scope.
16510 (yyerror): Returns void, not int.
16511 * doc/bison.texinfo: Formatting changes.
16512
05a1d24b
AD
165132000-09-19 Akim Demaille <akim@epita.fr>
16514
16515 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16516 portable.
16517
cbd25751
AD
165182000-09-18 Akim Demaille <akim@epita.fr>
16519
16520 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16521 * src/Makefile.am (INCLUDES): Don't.
16522 Be ready to fetch headers in lib/.
16523
13863333
AD
165242000-09-18 Akim Demaille <akim@epita.fr>
16525
16526 * doc/bison.texinfo: Update the copyright.
16527 ANSIfy and GNUify the examples.
16528 Remove the old menu.
16529
0d533154
AD
165302000-09-18 Akim Demaille <akim@epita.fr>
16531
16532 First set of tests: use the `calc' example from the documentation.
16533
16534 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16535 is defined only when YYDEBUG is.
16536 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16537 * src/files.c (tryopen, tryclose): Formatting changes.
16538 Move to the top and be static.
16539 * src/reader.c (read_signed_integer): Likewise.
16540 * tests/calc.m4: New file.
16541 * Makefile.am, suite.m4: Adjust.
16542 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16543
e79137ac
AD
165442000-09-18 Akim Demaille <akim@epita.fr>
16545
16546 Add support for an Autotest test suite for Bison.
16547
16548 * m4/m4.m4, m4/atconfig.m4: New files.
16549 * m4/Makefile.am (EXTRA_DIST): Adjust.
16550 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16551 files.
16552 * src/getargs.c: Display a more standard --version message.
16553 * src/reader.c (reader): Formatting changes.
16554 No longer depend upon VERSION_STRING.
16555 * configure.in: No longer use `dnl'.
16556 Set up the test suite and the new directory `tests/.
16557 (VERSION_STRING): Remove.
16558
27821bff
AD
165592000-04-14 Akim Demaille <akim@epita.fr>
16560
16561 * src/reader.c (copy_comment2): New function, same as former
16562 `copy_comment', but outputs into two FILE *.
16563 (copy_comment): Use it.
16564 (parse_union_decl): Use it.
16565 (get_type, parse_start_decl): Use the same `invalid' message.
16566 (parse_start_decl, parse_union_decl): Use the same `multiple'
16567 message.
16568 (parse_union_decl, copy_guard, copy_action): Use the same
16569 `unmatched' message.
16570 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16571
cfe5fbc0
AD
165722000-03-31 Akim Demaille <akim@epita.fr>
16573
16574 * src/files.c (tryopen, tryclose): Move to the top.
16575 Be static.
16576
cb7db13e
AD
165772000-03-31 Akim Demaille <akim@epita.fr>
16578
16579 * src/main.c (main): Don't call `done', exit does it.
16580
a0f6b076
AD
165812000-03-31 Akim Demaille <akim@epita.fr>
16582
36281465
AD
16583 * allocate.c: s/return (foo)/return foo/.
16584 * lalr.c: Likewise.
16585 * LR0.c: Likewise.
16586 * output.c: Likewise.
16587 * reader.c: Likewise.
16588 * symtab.c: Likewise.
16589 * vmsgetargs.c: Likewise.
16590
165912000-03-31 Akim Demaille <akim@epita.fr>
16592
16593 Clean up the error reporting functions.
a0f6b076
AD
16594
16595 * src/report.c: New file.
16596 * src/report.h: Likewise.
16597 * src/Makefile.am: Adjust.
16598 * m4/error.m4: New file.
16599 * m4/Makefile.am: Adjust.
16600 * configure.in (jm_PREREQ_ERROR): Call it.
16601 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16602 Remove.
16603 (fatal, fatals): Remove. All callers use complain.c::fatal.
16604 (warn, warni, warns, warnss, warnss): Remove. All callers use
16605 complain.c::complain.
16606 (toomany): Remove, use fatal instead.
16607 * src/files.c (done): No argument, use complain_message_count.
16608 * src/main.c (main): Register `done' to `atexit'.
16609
16610 * src/getargs.c (usage): More `fputs', less `fprintf'.
16611
18539825
AD
166122000-03-28 Akim Demaille <akim@epita.fr>
16613
16614 * lib/: New directory.
16615 * Makefile.am (SUBDIRS): Adjust.
16616 * configure.in: Adjust.
16617 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16618 useless.
16619 * src/alloca.c: Moved to lib/.
16620 * src/getopt.c: Likewise.
16621 * src/getopt1.c: Likewise.
16622 * src/getopt.h: Likewise.
16623 * src/ansi2knr.c: Likewise.
16624 * src/ansi2knr.1: Likewise.
16625 * src/Makefile.am: Adjust.
16626 * lib/Makefile.am: New file.
16627
9f306f2a
AD
166282000-03-28 Akim Demaille <akim@epita.fr>
16629
16630 * src/getargs.c (usage): Refresh the help message.
16631
0ba347b6
AD
166322000-03-17 Akim Demaille <akim@epita.fr>
16633
16634 * src/getopt1.c: Updated from textutils 2.0e
16635 * src/getopt.c: Likewise.
16636 * src/getopt.h: Likewise.
16637
dbe7f271
AD
166382000-03-17 Akim Demaille <akim@epita.fr>
16639
16640 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16641 the file name, not the whole `#line LINE FILE'.
16642
75bbe78d
AD
166432000-03-17 Akim Demaille <akim@epita.fr>
16644
16645 On syntax errors, report the token on which we choked.
16646
aa5fd0ee
AD
16647 * src/bison.s1 (yyparse): In the label yyerrlab, when
16648 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 16649
7b306f52
AD
166502000-03-17 Akim Demaille <akim@epita.fr>
16651
aa5fd0ee 16652 * src/reader.c (copy_at): New function.
7b306f52
AD
16653 (copy_guard): Use it.
16654 (copy_action): Use it.
16655
e87b5700
AD
166562000-03-17 Akim Demaille <akim@epita.fr>
16657
16658 Be kind to translators, save some useless translations.
16659
aa5fd0ee 16660 * src/main.c (banner): New function.
e87b5700
AD
16661 (fatal_banner): Use it.
16662 (warn_banner): Use it.
16663
ae3c3164
AD
166642000-03-17 Akim Demaille <akim@epita.fr>
16665
aa5fd0ee
AD
16666 * src/reader.c (copy_definition): Use copy_string and
16667 copy_comment. Removed now unused `match', `ended',
16668 `cplus_comment'.
ae3c3164
AD
16669 (copy_comment, copy_string): Moved, to be visible from
16670 copy_definition.
16671
4dc58e7c
AD
166722000-03-17 Akim Demaille <akim@epita.fr>
16673
aa5fd0ee
AD
16674 * src/reader.c (copy_string): Declare `static inline'. No
16675 problems with inline, since it is checked by configure.
4dc58e7c
AD
16676 (copy_comment): Likewise.
16677
0a6384c4
AD
166782000-03-17 Akim Demaille <akim@epita.fr>
16679
aa5fd0ee 16680 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 16681
3cef001a
AD
166822000-03-17 Akim Demaille <akim@epita.fr>
16683
aa5fd0ee 16684 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
16685 (copy_action): Use it. Removed now unused `match', `ended',
16686 `cplus_comment'.
16687 (copy_guard): Likewise.
16688
ca36d2ef
AD
166892000-03-17 Akim Demaille <akim@epita.fr>
16690
aa5fd0ee 16691 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
16692 (copy_action): Use it.
16693 (copy_guard): Likewise.
16694
6666f98f
AD
166952000-03-17 Akim Demaille <akim@epita.fr>
16696
16697 Change the handling of @s so that they behave exactly like $s.
16698 There is now a pseudo variable @$ (readble and writable), location
16699 of the lhs of the rule (by default ranging from the location of
16700 the first symbol of the rhs, to the location of the last symbol,
16701 or, if the rhs is empty, YYLLOC).
16702
16703 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16704 yyval.
16705 (yyparse): When providing a default semantic action, provide a
16706 default location action.
16707 (after the $): No longer change `*YYLSP', just stack YYLOC the
16708 same way you stack YYVAL.
16709 * src/reader.c (read_declarations): Use warns.
16710 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16711 (copy_action, case '@'): Likewise.
16712 Use a standard error message, to save useless work from
16713 translators.
16714
41aca2e0
AD
167152000-03-17 Akim Demaille <akim@epita.fr>
16716
aa5fd0ee
AD
16717 * src/bison.s1: Formatting and cosmetics changes.
16718 * src/reader.c: Likewise.
41aca2e0
AD
16719 Update the Copyright notice.
16720
dc08c1d5
AD
167212000-03-17 Akim Demaille <akim@epita.fr>
16722
aa5fd0ee
AD
16723 * src/bison.s1 (#line): All set to `#line' only, since the
16724 Makefile now handles them.
dc08c1d5 16725
9ee3c97b
AD
167262000-03-16 Akim Demaille <akim@epita.fr>
16727
16728 * src/output.c (output_rule_data): Output the documentation of
16729 some of the tables.
16730 (Copyright notice): Update.
16731 Formatting changes.
16732
0de741ca
AD
167332000-03-16 Akim Demaille <akim@epita.fr>
16734
16735 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16736 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16737 One `#if YYDEBUG' remains, since it uses variables which are
16738 defined only if `YYDEBUG != 0'.
16739
bb10be54
AD
167402000-03-16 Akim Demaille <akim@epita.fr>
16741
16742 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16743 and related variables so that the similarities are highlighted.
16744
b07b484a
AD
167452000-03-16 Akim Demaille <akim@epita.fr>
16746
16747 * src/bison.s1: Properly indent CPP directives.
16748
361f60b3
AD
167492000-03-16 Akim Demaille <akim@epita.fr>
16750
16751 * src/bison.s1: Properly indent the `alloca' CPP section.
16752
8c44d3ec
AD
167532000-03-16 Akim Demaille <akim@epita.fr>
16754
16755 Do not hard code values of directories in `configure.in'.
16756 Update the `configure' tool chain.
16757
16758 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16759 src/makefile.am.
16760 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16761 (AC_OUTPUT): Add m4/Makefile.
16762 Bump to bison 1.28a, 1.29 has never been released.
16763 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16764 handled via src/Makefile.am.
16765 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16766 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16767 autoheader.
16768 * Makefile.am (SUBDIRS): Add m4.
16769 (ACLOCAL_AM_FLAGS): New variable.
16770 (AUTOMAKE_OPTIONS): Add check-news.
16771 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16772 the proper line number and file name.
16773 (DEFS): Propagate the location of bison library files and of the
16774 locale files.
16775 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16776 builddir.
16777 * acinclude.m4: Remove, replaced by the directory m4.
16778 * m4/Makefile.am (EXTRA_DIST): New variable.
16779 * m4/gettext.m4: New file, from the fileutils.
16780 * m4/lcmessage.m4: Likewise
16781 * m4/progtest.m4: Likewise.
16782 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16783
f95997e7
AD
167842000-03-10 Akim Demaille <akim@epita.fr>
16785
16786 * src/closure.c:
16787 Formatting changes of various comments.
16788 Respect the GNU coding standards at various places.
16789 Don't use `_()' when no translation is needed.
16790
167911999-12-13 Jesse Thilo <jthilo@gnu.org>
16792
16793 * src/files.c:
16794 OS/2 honors TMPDIR environment variable.
16795
167961999-12-13 Jesse Thilo <jthilo@gnu.org>
16797
16798 * doc/bison.texinfo: Tweaked spelling and grammar.
16799 Updated ISBN.
16800 Removed reference to price of printed copy.
16801 Mention BISON_SIMPLE and BISON_HAIRY.
16802
168031999-12-13 Jesse Thilo <jthilo@gnu.org>
16804
16805 * configure.in, NEWS:
16806 Bison 1.29 released.
16807
168081999-10-27 Jesse Thilo <jthilo@gnu.org>
16809
16810 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16811 Added reference card.
16812
168131999-07-26 Jesse Thilo <jthilo@gnu.org>
16814
16815 * po/ru.po: Added Russian translation.
16816
168171999-07-26 Jesse Thilo <jthilo@gnu.org>
16818
16819 * configure.in: Added Russian translation.
16820
168211999-07-06 Jesse Thilo <jthilo@gnu.org>
16822
16823 * configure.in, NEWS, README:
16824 Released version 1.28.
16825
168261999-06-14 Jesse Thilo <jthilo@gnu.org>
16827
16828 * src/system.h:
16829 Squashed redefinition warning on some systems.
16830
16831 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16832 Have configure build version string instead of relying on ANSI string
16833 concatentation.
16834
168351999-06-14 Jesse Thilo <jthilo@gnu.org>
16836
16837 * po/POTFILES.in: Got rid of version.c.
16838
168391999-06-14 Jesse Thilo <jthilo@gnu.org>
16840
16841 * acconfig.h, configure.in:
16842 Have configure build version string instead of relying on ANSI string
16843 concatentation.
16844
168451999-06-08 Jesse Thilo <jthilo@gnu.org>
16846
16847 * doc/bison.1:
16848 Dropped mention of `+' for long-named options.
16849
168501999-05-30 Jesse Thilo <jthilo@gnu.org>
16851
16852 * src/files.c: Added <unistd.h> for unlink().
16853
16854 * src/Makefile.am, src/system.h:
16855 I18n fixes.
16856
168571999-05-30 Jesse Thilo <jthilo@gnu.org>
16858
16859 * README: Added a FAQ list.
16860
16861 * configure.in, acconfig.h:
16862 I18n fixes.
16863
168641999-05-30 Jesse Thilo <jthilo@gnu.org>
16865
16866 * doc/FAQ, doc/Makefile.am:
16867 Added a FAQ list.
16868
168691999-05-19 Jesse Thilo <jthilo@gnu.org>
16870
16871 * src/alloc.h, src/symtab.h, src/version.c:
16872 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16873
168741999-04-18 Jesse Thilo <jthilo@gnu.org>
16875
16876 * src/.cvsignore, src/Makefile.am:
16877 Reorganized: sources in `src', documentation in `doc'.
16878
16879 * src/lex.c (literalchar):
16880 fixed the code for escaping double quotes (thanks
16881 Jonathan Czisny.)
16882
168831999-04-18 Jesse Thilo <jthilo@gnu.org>
16884
16885 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16886 Adjusted paths to reflect directory reorganization.
16887
168881999-04-18 Jesse Thilo <jthilo@gnu.org>
16889
16890 * doc/.cvsignore, doc/Makefile.am:
16891 Reorganized: sources in `src', documentation in `doc'.
16892
168931999-04-18 Jesse Thilo <jthilo@gnu.org>
16894
16895 * configure.in:
16896 Updated AC_INIT file to reflect directory reorganization.
16897
16898 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16899 Reorganized: sources in `src', documentation in `doc'.
16900
169011999-04-13 Jesse Thilo <jthilo@gnu.org>
16902
16903 * src/allocate.c:
16904 Don't declare calloc() and realloc() if not necessary.
16905
169061999-04-13 Jesse Thilo <jthilo@gnu.org>
16907
16908 * configure.in, acconfig.h, acinclude.m4:
16909 Don't declare calloc() and realloc() if not necessary.
16910
169111999-03-23 Jesse Thilo <jthilo@gnu.org>
16912
16913 * po/.cvsignore: Added i18n support.
16914
169151999-03-23 Jesse Thilo <jthilo@gnu.org>
16916
16917 * acconfig.h, configure.in, Makefile.am:
16918 Added i18n support.
16919
169201999-03-22 Jesse Thilo <jthilo@gnu.org>
16921
16922 * src/bison.s1: Fixed #line numbers.
16923
169241999-03-15 Jesse Thilo <jthilo@gnu.org>
16925
16926 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16927 Added PO files from Translation Project.
16928
169291999-03-03 Jesse Thilo <jthilo@gnu.org>
16930
16931 * Makefile.am:
16932 Added support for non-ANSI compilers (ansi2knr).
16933
169341999-02-16 Jesse Thilo <jthilo@gnu.org>
16935
16936 * configure.in: Bumped version number to 1.27.
16937
16938 * Makefile.am:
16939 Added `bison.simple' to list of files removed by `make distclean'.
16940
169411999-02-12 Jesse Thilo <jthilo@gnu.org>
16942
16943 * src/files.c, src/files.h:
16944 Defined locations of parser files in config.h instead of Makefile.
16945
169461999-02-12 Jesse Thilo <jthilo@gnu.org>
16947
16948 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16949 Defined locations of parser files in config.h instead of Makefile.
16950
169511999-02-09 Jesse Thilo <jthilo@gnu.org>
16952
16953 * Makefile.am:
16954 Removed inappropriate use of $< macro.
16955
169561999-02-05 Jesse Thilo <jthilo@gnu.org>
16957
16958 * po/Makefile.in.in, po/POTFILES.in:
16959 Add `po' directory skeleton.
16960
169611999-01-27 Jesse Thilo <jthilo@gnu.org>
16962
16963 * README: Document help-bison list.
16964
16965 * configure.in: Add check for mkstemp().
16966
169671999-01-20 Jesse Thilo <jthilo@gnu.org>
16968
16969 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16970 Hush a few compiler warnings.
16971
16972 * src/files.c:
16973 Add tryclose(), which verifies that fclose was successful.
16974 Hush a couple of compiler warnings.
16975
169761999-01-20 Jesse Thilo <jthilo@gnu.org>
16977
16978 * Makefile.am, OChangeLog:
16979 ChangeLog is now automatically generated. Include the old version as
16980 OChangeLog.
16981
169821999-01-14 Jesse Thilo <jthilo@gnu.org>
16983
16984 * 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:
16985 Update FSF address.
16986
169871999-01-14 Jesse Thilo <jthilo@gnu.org>
16988
16989 * doc/bison.texinfo: Fix formatting glitch.
16990
16991 * doc/bison.texinfo: Update FSF address.
16992
169931999-01-14 Jesse Thilo <jthilo@gnu.org>
16994
16995 * acconfig.h: Update FSF address.
16996
169971999-01-08 Jesse Thilo <jthilo@gnu.org>
16998
16999 * src/system.h:
17000 Don't define PACKAGE here, since config.h defines it.
17001
170021998-12-30 Jesse Thilo <jthilo@gnu.org>
17003
17004 * src/reader.c: Update copyright date.
17005
17006 * src/main.c:
17007 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17008 favor of output directly to stderr (avoids buffer overruns).
17009
17010 * src/reader.c: Some checks for premature EOF.
17011
17012 * 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:
17013 Use prototypes if the compiler understands them.
17014
17015 * src/files.c: Honor TMPDIR on Unix hosts.
17016 Use prototypes if the compiler understands them.
17017
17018 * src/reader.c:
17019 Fix a couple of buffer overrun bugs.
17020 Use prototypes if the compiler understands them.
17021
17022 * src/system.h: Include unistd.h and ctype.h.
17023 Use #ifdef instead of #if for NLS symbols.
17024
170251998-12-30 Jesse Thilo <jthilo@gnu.org>
17026
17027 * doc/bison.texinfo:
17028 Delete comment "consider using @set for edition number, etc..." since
17029 we now are doing so.
17030
170311998-12-30 Jesse Thilo <jthilo@gnu.org>
17032
17033 * configure.in:
17034 Use prototypes if the compiler understands them.
17035
17036 * NEWS: Document 1.26 highlights.
17037
17038 * Makefile.am: Require Automake 1.3 or later.
17039
17040 * acconfig.h:
17041 Use prototypes if the compiler understands them.
17042
170431998-12-29 Jesse Thilo <jthilo@gnu.org>
17044
17045 * src/version.c:
17046 Use VERSION symbol from automake for version number.
17047
170481998-12-29 Jesse Thilo <jthilo@gnu.org>
17049
17050 * acconfig.h, configure.in, version.cin:
17051 Use VERSION symbol from automake for version number.
17052
170531998-11-28 Jesse Thilo <jthilo@gnu.org>
17054
17055 * Makefile.am:
17056 Distribute original version of simple parser (bison.s1), not built
17057 version (bison.simple).
17058
170591998-11-28 Jesse Thilo <jthilo@gnu.org>
17060
17061 * doc/bison.texinfo: Add info dir entry.
17062
17063 * doc/bison.texinfo:
17064 Let automake put version number into documentation.
17065
170661998-11-26 Jesse Thilo <jthilo@gnu.org>
17067
17068 * src/bison.cld, src/build.com, src/vmshlp.mar:
17069 Add non-RCS files from /gd/gnu/bison.
17070
170711998-11-26 Jesse Thilo <jthilo@gnu.org>
17072
17073 * doc/bison.1:
17074 Document the BISON_HAIRY and BISON_SIMPLE variables.
17075
170761998-11-25 Jesse Thilo <jthilo@gnu.org>
17077
17078 * src/version.c: Build version.c automatically.
17079
17080 * src/reader.c:
17081 Fix token numbering (used to start at 258, not 257).
17082
17083 * src/system.h: Include config.h.
17084
17085 * src/getargs.c: Update bug report address.
17086
17087 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
17088 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
17089
170901998-11-25 Jesse Thilo <jthilo@gnu.org>
17091
17092 * Makefile.am:
17093 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17094
17095 * configure.in, version.cin:
17096 Build version.c automatically.
17097
17098 * AUTHORS: Add AUTHORS file.
17099
17100 * README: Update bug report address.
17101
17102 * bison.simple:
17103 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
17104
17105 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
17106 Add automake stuff.
17107
171081998-11-25 Jesse Thilo <jthilo@gnu.org>
17109
17110 * doc/bison.texinfo: Clean up some formatting.
17111
171121998-05-05 Richard Stallman <rms@gnu.org>
17113
17114 * doc/bison.texinfo:
17115 Explain better why to make a pure parser.
17116
171171998-01-05 Richard Stallman <rms@gnu.org>
17118
17119 * src/files.c (openfiles):
17120 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
17121 find a temporary directory, if possible. Do not unlink files while
17122 they are open.
17123
171241997-08-25 Richard Stallman <rms@gnu.org>
17125
17126 * src/reader.c (stack_offset;):
17127 Change some warni to warns.
17128
17129 * src/lex.c (literalchar): Use warns, not warni.
17130
171311997-06-28 Richard Stallman <rms@gnu.org>
17132
17133 * src/bison.s1: Add a Bison version comment.
17134
17135 * src/main.c (fatal, warn, berror):
17136 Use program_name.
17137
171381997-06-28 Richard Stallman <rms@gnu.org>
17139
17140 * Makefile.in (bison_version): New variable.
17141 (dist): Use that variable.
17142 (bison.s1): Substitute the Bison version into bison.simple.
17143
17144 * bison.simple: Add a Bison version comment.
17145
171461997-06-18 Richard Stallman <rms@gnu.org>
17147
17148 * src/main.c (fatal, warn, berror):
17149 Make error messages standard.
17150 (toomany): Improve error message text.
17151
17152 * 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:
17153 new.h renamed to alloc.h.
17154
171551997-06-18 Richard Stallman <rms@gnu.org>
17156
17157 * Makefile.in: new.h renamed to alloc.h.
17158
171591997-05-24 Richard Stallman <rms@gnu.org>
17160
17161 * src/lex.c (literalchar):
17162 Fix the code for escaping \, " and '.
17163
17164 (lex): Avoid trouble when there are many chars
17165 to discard in a char literal with just several chars in it.
17166
171671997-05-17 Richard Stallman <rms@gnu.org>
17168
17169 * src/bison.s1:
17170 Use malloc, if using alloca is troublesome.
17171 (YYSTACK_USE_ALLOCA): New flag macro.
17172 Define it for some systems and compilers.
17173 (YYSTACK_ALLOC): New macro.
17174 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17175 If it was malloc'd, free it.
17176
171771997-05-17 Richard Stallman <rms@gnu.org>
17178
17179 * bison.simple:
17180 Use malloc, if using alloca is troublesome.
17181 (YYSTACK_USE_ALLOCA): New flag macro.
17182 Define it for some systems and compilers.
17183 (YYSTACK_ALLOC): New macro.
17184 (yyparse): Use YYSTACK_ALLOC to allocate stack.
17185 If it was malloc'd, free it.
17186
171871997-04-23 Richard Stallman <rms@gnu.org>
17188
17189 * src/bison.s1:
17190 (alloca) [__hpux]: Always define as __builtin_alloca.
17191
171921997-04-23 Richard Stallman <rms@gnu.org>
17193
17194 * bison.simple:
17195 (alloca) [__hpux]: Always define as __builtin_alloca.
17196
171971997-04-22 Richard Stallman <rms@gnu.org>
17198
17199 * src/bison.s1:
17200 [__hpux]: Include alloca.h (right for HPUX 10)
17201 instead of declaring alloca (right for HPUX 9).
17202
17203 * src/bison.s1 (__yy_memcpy):
17204 Declare arg `count' as unsigned int.
17205 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17206
172071997-04-22 Richard Stallman <rms@gnu.org>
17208
17209 * bison.simple:
17210 [__hpux]: Include alloca.h (right for HPUX 10)
17211 instead of declaring alloca (right for HPUX 9).
17212
17213 * bison.simple (__yy_memcpy):
17214 Declare arg `count' as unsigned int.
17215 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
17216
172171997-01-03 Richard Stallman <rms@gnu.org>
17218
17219 * src/allocate.c: [__STDC__ or _MSC_VER]:
17220 Declare calloc and realloc to return void *.
17221
172221997-01-02 Richard Stallman <rms@gnu.org>
17223
17224 * src/system.h:
17225 [_MSC_VER]: Include stdlib.h and process.h.
17226 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17227
17228 * src/main.c (main): Return FAILURE as a value.
17229 (printable_version): Declare arg as int, not char.
17230
172311997-01-02 Richard Stallman <rms@gnu.org>
17232
17233 * Makefile.in (dist):
17234 Explicitly check for symlinks, and copy them.
17235
172361996-12-19 Richard Stallman <rms@gnu.org>
17237
17238 * src/files.c:
17239 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17240
172411996-12-18 Paul Eggert <eggert@gnu.org>
17242
17243 * src/bison.s1 (yyparse):
17244 If __GNUC__ and YYPARSE_PARAM are both defined,
17245 declare yyparse to have a void * argument.
17246
172471996-12-18 Paul Eggert <eggert@gnu.org>
17248
17249 * bison.simple (yyparse):
17250 If __GNUC__ and YYPARSE_PARAM are both defined,
17251 declare yyparse to have a void * argument.
17252
172531996-12-17 Richard Stallman <rms@gnu.org>
17254
17255 * src/reduce.c (nbits): Add some casts.
17256
172571996-08-12 Richard Stallman <rms@gnu.org>
17258
17259 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17260
172611996-08-12 Richard Stallman <rms@gnu.org>
17262
17263 * bison.simple: Test _MSDOS as well as _MSDOS_.
17264
172651996-07-31 Richard Stallman <rms@gnu.org>
17266
17267 * src/bison.s1:
17268 [__sun && __i386]: Include alloca.h.
17269
172701996-07-31 Richard Stallman <rms@gnu.org>
17271
17272 * bison.simple:
17273 [__sun && __i386]: Include alloca.h.
17274
172751996-07-30 Richard Stallman <rms@gnu.org>
17276
17277 * src/bison.s1: Comment change.
17278
17279 * src/bison.s1: Test _MSDOS_, not MSDOS.
17280
172811996-07-30 Richard Stallman <rms@gnu.org>
17282
17283 * bison.simple: Comment change.
17284
17285 * bison.simple: Test _MSDOS_, not MSDOS.
17286
172871996-06-01 Richard Stallman <rms@gnu.org>
17288
17289 * 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:
17290 Insert `_' macro around many string constants.
17291
17292 * src/main.c:
17293 Insert `_' macro around many string constants.
17294
17295 (main): Call setlocale, bindtextdomain and textdomain.
17296
17297 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17298 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17299 [ENABLE_NLS]: Include libintl.h.
17300 [ENABLE_NLS] (gettext): Define.
17301 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17302 (N_, PACKAGE, LOCALEDIR): New macros.
17303
173041996-06-01 Richard Stallman <rms@gnu.org>
17305
17306 * POTFILES.in: New file.
17307
17308 * Makefile.in (allocate.o):
17309 Define target explicitly.
17310
17311 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17312 (LDFLAGS): Set to @LDFLAGS@.
17313 (configure): Run autoconf only if preceding `cd' succeeds.
17314 (bison.s1): Redirect output to temporary file then move the
17315 temporary to the target, rather than redirecting directly to bison.s1.
17316 (clean): Remove config.status and config.log.
17317 (distclean): Don't remove config.status here.
17318
173191996-05-12 Richard Stallman <rms@gnu.org>
17320
17321 * src/bison.s1:
17322 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17323
173241996-05-12 Richard Stallman <rms@gnu.org>
17325
17326 * bison.simple:
17327 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17328
173291996-05-11 Richard Stallman <rms@gnu.org>
17330
17331 * src/bison.s1 (__yy_memcpy):
17332 Really reorder the args, as was supposedly done on Feb 14 1995.
17333 (yyparse): Calls changed accordingly.
17334
173351996-05-11 Richard Stallman <rms@gnu.org>
17336
17337 * Makefile.in (dist): Don't use $(srcdir).
17338
17339 * bison.simple (__yy_memcpy):
17340 Really reorder the args, as was supposedly done on Feb 14 1995.
17341 (yyparse): Calls changed accordingly.
17342
173431996-01-27 Richard Stallman <rms@gnu.org>
17344
17345 * src/output.c (output_rule_data):
17346 Test YYERROR_VERBOSE in the conditional
17347 around the definition of ttyname.
17348
173491995-12-29 Richard Stallman <rms@gnu.org>
17350
17351 * src/bison.s1:
17352 Fix line numbers in #line commands.
17353
173541995-12-29 Richard Stallman <rms@gnu.org>
17355
17356 * bison.simple:
17357 Fix line numbers in #line commands.
17358
173591995-12-27 Richard Stallman <rms@gnu.org>
17360
17361 * src/bison.s1 (YYPARSE_PARAM_DECL):
17362 In C++, make it always null.
17363 (YYPARSE_PARAM_ARG): New macro.
17364 (yyparse): Use YYPARSE_PARAM_ARG.
17365
173661995-12-27 Richard Stallman <rms@gnu.org>
17367
17368 * bison.simple (YYPARSE_PARAM_DECL):
17369 In C++, make it always null.
17370 (YYPARSE_PARAM_ARG): New macro.
17371 (yyparse): Use YYPARSE_PARAM_ARG.
17372
173731995-11-29 Richard Stallman <rms@gnu.org>
17374
17375 * doc/bison.texinfo:
17376 Describe literal string tokens, %raw, %no_lines, %token_table.
17377
173781995-11-29 Daniel Hagerty <hag@gnu.org>
17379
17380 * doc/bison.texinfo: Fixed update date
17381
173821995-10-16 Richard Stallman <rms@gnu.org>
17383
17384 * src/version.c: Version 1.25.
17385
173861995-10-16 Richard Stallman <rms@gnu.org>
17387
17388 * NEWS: *** empty log message ***
17389
173901995-10-16 Richard Stallman <rms@gnu.org>
17391
17392 * doc/bison.1, doc/bison.rnh:
17393 Add new options.
17394
173951995-10-15 Richard Stallman <rms@gnu.org>
17396
17397 * src/vmsgetargs.c, src/getargs.c:
17398 Added -n, -k, and -raw switches.
17399 (noparserflag, toknumflag, rawtoknumflag): New variables.
17400
17401 * src/symtab.h (SALIAS):
17402 New #define for adding aliases to %token.
17403 (struct bucket): Added `alias' field.
17404
17405 * src/reduce.c (reduce_grammar):
17406 Revise error message.
17407 (print_notices): Remove final `.' from error message.
17408
17409 * src/reader.c (reader_output_yylsp):
17410 New function.
17411 (readgram): Use `#if 0' around code that accepted %command
17412 inside grammar rules: The documentation doesn't allow it,
17413 and it will fail since the %command processors scan for the next %.
17414 (parse_token_decl): Extended the %token
17415 declaration to allow a multi-character symbol as an alias.
17416 (parse_thong_decl): New function.
17417 (read_declarations): Added %thong declarations.
17418 (read_declarations): Handle NOOP to deal with allowing
17419 % declarations as another means to specify the flags.
17420 (readgram): Allow %prec prior to semantics embedded in a rule.
17421 (skip_to_char, read_declarations, copy_definition)
17422 (parse_token_decl, parse_start_decl, parse_type_decl)
17423 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17424 (get_type_name, copy_guard, copy_action, readgram)
17425 (get_type, packsymbols): Revised most error messages.
17426 Changed `fatal' to `warnxxx' to avoid aborting for error.
17427 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17428 (read_declarations): Improve the error message for
17429 an invalid character. Do not abort.
17430 (read_declarations, copy_guard, copy_action): Use
17431 printable_version to avoid unprintable characters in printed output.
17432 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17433 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17434 Allow the type of a non-terminal can be given
17435 more than once, as long as all specifications give the same type.
17436
17437 * src/output.c:
17438 (output_headers, output_trailers, output, output_gram)
17439 (output_rule_data): Implement noparserflag variable.
17440 Implement toknumflag variable.
17441 (output): Call reader_output_yylsp to output LTYPESTR.
17442
17443 * src/main.c (main):
17444 If reader sees an error, don't process the grammar.
17445 (fatals): Updated to not use VARARGS1.
17446 (printable_version, int_to_string, warn, warni, warns, warnss)
17447 (warnsss): New error reporting functions. Avoid abort for error.
17448
17449 * src/lex.h:
17450 Added THONG and NOOP for alias processing.
17451 Added SETOPT for the new code that allows setting options with %flags.
17452
17453 * src/lex.c:
17454 Include getopt.h. Add some extern decls.
17455 (safegetc): New function to deal with EOF gracefully.
17456 (literalchar); new function to deal with reading \ escapes.
17457 (lex): Use literalchar.
17458 (lex): Implemented "..." tokens.
17459 (literalchar, lex, parse_percent_token): Made tokenbuffer
17460 always contain the token. This includes growing the token
17461 buffer while reading an integer.
17462 (parse_percent_token): Replaced if-else statement with percent_table.
17463 (parse_percent_token): Added % declarations as another
17464 way to specify the flags -n, -l, and -r. Also added hooks for
17465 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17466 major changes to files.c.
17467 (lex) Retain in the incoming stream a character following
17468 an incorrect '/'.
17469 (skip_white_space, lex): Revised most error messages
17470 and changed fatal to warn to avoid aborting.
17471 (percent_table): Added %thong declarations.
17472
17473 * src/gram.h: Comment changes.
17474
17475 * src/files.c (openfiles, open_extra_files, done):
17476 Add faction flag
17477 and actfile file. Handle noparserflag. Both for -n switch.
17478
17479 * src/conflicts.c (resolve_sr_conflict):
17480 Remove use of alloca.
17481
174821995-06-01 Jim Meyering <meyering@gnu.org>
17483
17484 * doc/bison.texinfo: *** empty log message ***
17485
174861995-05-06 Richard Stallman <rms@gnu.org>
17487
17488 * src/bison.s1: Comment change.
17489
174901995-05-06 Richard Stallman <rms@gnu.org>
17491
17492 * bison.simple: Comment change.
17493
174941995-05-03 Richard Stallman <rms@gnu.org>
17495
17496 * src/version.c: Version now 1.24.
17497
17498 * src/bison.s1: Change distribution terms.
17499
17500 * src/version.c: Version now 1.23.
17501
175021995-05-03 Richard Stallman <rms@gnu.org>
17503
17504 * doc/bison.texinfo:
17505 Rewrite "Conditions for Using Bison".
17506 Update version to 1.24.
17507
175081995-05-03 Richard Stallman <rms@gnu.org>
17509
17510 * bison.simple: Change distribution terms.
17511
175121995-02-23 Richard Stallman <rms@gnu.org>
17513
17514 * src/files.c: Test __VMS_POSIX as well as VMS.
17515
175161995-02-14 Jim Meyering <meyering@gnu.org>
17517
17518 * src/bison.s1 (__yy_memcpy):
17519 Renamed from __yy_bcopy to avoid
17520 confusion. Reverse FROM and TO arguments to be consistent with
17521 those of memcpy.
17522
175231995-02-14 Jim Meyering <meyering@gnu.org>
17524
17525 * bison.simple (__yy_memcpy):
17526 Renamed from __yy_bcopy to avoid
17527 confusion. Reverse FROM and TO arguments to be consistent with
17528 those of memcpy.
17529
175301994-11-10 David J. MacKenzie <djm@gnu.org>
17531
17532 * NEWS: reformat
17533
17534 * NEWS: New file.
17535
17536 * Makefile.in (DISTFILES): Include NEWS.
17537
17538 * Makefile.in (DISTFILES):
17539 Include install-sh, not install.sh.
17540
17541 * configure.in: Update to Autoconf v2 macro names.
17542
175431994-10-05 David J. MacKenzie <djm@gnu.org>
17544
17545 * Makefile.in: fix typo
17546
17547 * Makefile.in (prefix, exec_prefix):
17548 Let configure set them.
17549
175501994-09-28 David J. MacKenzie <djm@gnu.org>
17551
17552 * Makefile.in: Set datadir to $(prefix)/share.
17553
175541994-09-15 Richard Stallman <rms@gnu.org>
17555
17556 * src/bison.s1:
17557 Update copyright notice and GPL version.
17558
175591994-09-15 Richard Stallman <rms@gnu.org>
17560
17561 * bison.simple:
17562 Update copyright notice and GPL version.
17563
175641994-07-12 Richard Stallman <rms@gnu.org>
17565
17566 * src/reduce.c, src/reader.c:
17567 entered into RCS
17568
175691994-05-05 David J. MacKenzie <djm@gnu.org>
17570
17571 * Makefile.in: entered into RCS
17572
175731994-03-26 Richard Stallman <rms@gnu.org>
17574
17575 * src/bison.s1: entered into RCS
17576
175771994-03-26 Richard Stallman <rms@gnu.org>
17578
17579 * bison.simple: entered into RCS
17580
175811994-03-25 Richard Stallman <rms@gnu.org>
17582
17583 * src/main.c: entered into RCS
17584
175851994-03-24 Richard Stallman <rms@gnu.org>
17586
17587 * src/conflicts.c: entered into RCS
17588
175891994-01-02 Richard Stallman <rms@gnu.org>
17590
17591 * Makefile.in: *** empty log message ***
17592
175931993-11-21 Richard Stallman <rms@gnu.org>
17594
17595 * src/bison.s1: *** empty log message ***
17596
175971993-11-21 Richard Stallman <rms@gnu.org>
17598
17599 * doc/bison.texinfo: entered into RCS
17600
17601 * doc/bison.texinfo: *** empty log message ***
17602
176031993-11-21 Richard Stallman <rms@gnu.org>
17604
17605 * bison.simple: *** empty log message ***
17606
176071993-10-25 David J. MacKenzie <djm@gnu.org>
17608
17609 * doc/bison.texinfo: *** empty log message ***
17610
176111993-10-19 Richard Stallman <rms@gnu.org>
17612
17613 * src/bison.s1: *** empty log message ***
17614
176151993-10-19 Richard Stallman <rms@gnu.org>
17616
17617 * bison.simple: *** empty log message ***
17618
176191993-10-14 Richard Stallman <rms@gnu.org>
17620
17621 * src/bison.s1: *** empty log message ***
17622
176231993-10-14 Richard Stallman <rms@gnu.org>
17624
17625 * bison.simple: *** empty log message ***
17626
176271993-09-14 David J. MacKenzie <djm@gnu.org>
17628
17629 * doc/bison.texinfo: *** empty log message ***
17630
176311993-09-13 Noah Friedman <friedman@gnu.org>
17632
17633 * Makefile.in: *** empty log message ***
17634
176351993-09-10 Richard Stallman <rms@gnu.org>
17636
17637 * src/conflicts.c: *** empty log message ***
17638
17639 * src/system.h: entered into RCS
17640
176411993-09-10 Richard Stallman <rms@gnu.org>
17642
17643 * doc/bison.1: entered into RCS
17644
176451993-09-06 Noah Friedman <friedman@gnu.org>
17646
17647 * src/version.c: entered into RCS
17648
176491993-09-06 Noah Friedman <friedman@gnu.org>
17650
17651 * Makefile.in: *** empty log message ***
17652
176531993-07-30 David J. MacKenzie <djm@gnu.org>
17654
17655 * Makefile.in: *** empty log message ***
17656
176571993-07-24 Richard Stallman <rms@gnu.org>
17658
17659 * src/bison.s1: *** empty log message ***
17660
176611993-07-24 Richard Stallman <rms@gnu.org>
17662
17663 * bison.simple: *** empty log message ***
17664
176651993-07-08 David J. MacKenzie <djm@gnu.org>
17666
17667 * Makefile.in: *** empty log message ***
17668
176691993-07-04 Richard Stallman <rms@gnu.org>
17670
17671 * src/bison.s1: *** empty log message ***
17672
176731993-07-04 Richard Stallman <rms@gnu.org>
17674
17675 * bison.simple: *** empty log message ***
17676
176771993-06-26 David J. MacKenzie <djm@gnu.org>
17678
17679 * src/getargs.c: entered into RCS
17680
176811993-06-26 David J. MacKenzie <djm@gnu.org>
17682
17683 * doc/bison.texinfo: *** empty log message ***
17684
17685 * doc/bison.1: New file.
17686
176871993-06-25 Richard Stallman <rms@gnu.org>
17688
17689 * src/getargs.c: New file.
17690
176911993-06-16 Richard Stallman <rms@gnu.org>
17692
17693 * src/bison.s1: *** empty log message ***
17694
176951993-06-16 Richard Stallman <rms@gnu.org>
17696
17697 * bison.simple: *** empty log message ***
17698
176991993-06-03 Richard Stallman <rms@gnu.org>
17700
17701 * src/bison.s1: New file.
17702
177031993-06-03 Richard Stallman <rms@gnu.org>
17704
17705 * doc/bison.texinfo: *** empty log message ***
17706
177071993-06-03 Richard Stallman <rms@gnu.org>
17708
17709 * bison.simple: New file.
17710
177111993-05-19 Richard Stallman <rms@gnu.org>
17712
17713 * doc/bison.texinfo: New file.
17714
177151993-05-07 Noah Friedman <friedman@gnu.org>
17716
17717 * Makefile.in: *** empty log message ***
17718
177191993-04-28 Noah Friedman <friedman@gnu.org>
17720
17721 * src/reader.c: *** empty log message ***
17722
177231993-04-23 Noah Friedman <friedman@gnu.org>
17724
17725 * src/alloc.h: entered into RCS
17726
177271993-04-20 David J. MacKenzie <djm@gnu.org>
17728
17729 * src/version.c: *** empty log message ***
17730
17731 * src/files.c, src/allocate.c:
17732 entered into RCS
17733
17734 * src/reader.c: *** empty log message ***
17735
17736 * src/lex.c: entered into RCS
17737
17738 * src/conflicts.c: New file.
17739
17740 * src/symtab.c: entered into RCS
17741
17742 * src/alloc.h: New file.
17743
17744 * src/LR0.c: entered into RCS
17745
177461993-04-18 Noah Friedman <friedman@gnu.org>
17747
17748 * src/reader.c: New file.
17749
17750 * src/version.c: *** empty log message ***
17751
177521993-04-18 Noah Friedman <friedman@gnu.org>
17753
17754 * Makefile.in: *** empty log message ***
17755
177561993-04-17 Noah Friedman <friedman@gnu.org>
17757
17758 * Makefile.in: *** empty log message ***
17759
177601993-04-15 Richard Stallman <rms@gnu.org>
17761
17762 * src/main.c, src/files.c:
17763 New file.
17764
177651993-04-15 Noah Friedman <friedman@gnu.org>
17766
17767 * configure.in: entered into RCS
17768
17769 * configure.in: *** empty log message ***
17770
17771 * configure.in: New file.
17772
177731993-04-14 Richard Stallman <rms@gnu.org>
17774
17775 * Makefile.in: New file.
17776
177771993-04-13 Richard Stallman <rms@gnu.org>
17778
17779 * src/version.c: New file.
17780
177811993-03-25 Richard Stallman <rms@gnu.org>
17782
17783 * src/output.c: entered into RCS
17784
177851992-09-25 Richard Stallman <rms@gnu.org>
17786
17787 * configure.bat: entered into RCS
17788
177891992-06-22 Richard Stallman <rms@gnu.org>
17790
17791 * src/vmsgetargs.c: entered into RCS
17792
177931992-06-22 Richard Stallman <rms@gnu.org>
17794
17795 * doc/bison.rnh: entered into RCS
17796
177971992-04-20 David J. MacKenzie <djm@gnu.org>
17798
17799 * README: entered into RCS
17800
178011992-01-22 Richard Stallman <rms@gnu.org>
17802
17803 * src/machine.h: entered into RCS
17804
178051991-12-21 Richard Stallman <rms@gnu.org>
17806
17807 * src/lalr.c, src/closure.c:
17808 entered into RCS
17809
178101991-12-20 Richard Stallman <rms@gnu.org>
17811
17812 * src/state.h: entered into RCS
17813
178141991-12-18 Richard Stallman <rms@gnu.org>
17815
17816 * src/print.c, src/nullable.c, src/derives.c:
17817 entered into RCS
17818
178191991-11-03 David J. MacKenzie <djm@gnu.org>
17820
17821 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17822 entered into RCS
17823
178241988-09-09 Richard Stallman <rms@gnu.org>
17825
17826 * src/bison.hairy: entered into RCS
17827
178281987-12-16 Richard Stallman <rms@gnu.org>
17829
17830 * REFERENCES: entered into RCS
dc546b0f 17831
f294a2c2 17832
04098407 17833 -----
f294a2c2 17834
04098407 17835 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
17836 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17837 Software Foundation, Inc.
f294a2c2 17838
04098407
PE
17839 Copying and distribution of this file, with or without
17840 modification, are permitted provided the copyright notice and this
17841 notice are preserved.
e9071366
AD
17842
17843$Id$