]> git.saurik.com Git - bison.git/blame - ChangeLog
(AC_INIT): Version 1.50.
[bison.git] / ChangeLog
CommitLineData
ff68026d
PE
12002-10-01 Paul Eggert <eggert@twinsun.com>
2
3 More fixes for 64-bit hosts and large bitsets.
4
5 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
7 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
10 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11 bitset_count_): Likewise.
12 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
13 bitset_first, bitset_last): Likewise.
14 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15 bitset_stats_list_reverse, bitset_stats_size,
16 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
17 Likewise.
18 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
19 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
20 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
21 bitsetv_reflexive_transitive_closure): Likewise.
22 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
23 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
24 Likewise.
25 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
26 Likewise.
27
28 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
29 Use size_t, not unsigned int, to count bytes.
30 * lib/abitset.h (abitset_bytes): Likewise.
31 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
32 Likewise.
33 * lib/bitset.h (bitset_bytes): Likewise.
34 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
35 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
36 * lib/bitsetv.c (bitsetv_alloc): Likewise.
37 * lib/ebitset.c (ebitset_bytes): Likewise.
38 * lib/ebitset.h (ebitset_bytes): Likewise.
39 * lib/lbitset.c (lbitset_bytes): Likewise.
40 * lib/lbitset.h (lbitset_bytes): Likewise.
41
42 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
43 abitset_subset_p, abitset_disjoint_p, abitset_and,
44 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
45 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
46 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
47 abitset_or_and, abitset_or_and_cmp):
48 Use bitset_windex instead of unsigned int.
49 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
50 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
51 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
52 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
53 Likewise.
54 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
55
56 * lib/bitset.c (bitset_print):
57 Use proper printf formats for widths of integer types.
58 * lib/bitset_stats.c (bitset_percent_histogram_print,
59 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
60 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
61 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
62 * lib/lbitset.c (lbitset_bytes): Likewise.
63
64 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
65 BITSET_SIZE_MAX): New macros.
66 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
67 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
68 to BITSET_WINDEX_MAX.
69
70 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
71 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
72 since we now return the bitset_bindex type (not int).
73
74 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
75 when computing sizes.
76 * lib/ebitset.c (ebitset_elts_grow): Likewise.
77
78 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
79 and avoid cast to unsigned.
80
6aa452a6
AD
812002-09-30 Akim Demaille <akim@epita.fr>
82
83 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
84 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
85 Updates from Michael Hayes.
86
927f7817
AD
872002-09-30 Art Haas <ahaas@neosoft.com>
88
89 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
90 invocations.
91 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
92 defined.
93
9738f41e
AD
942002-09-27 Akim Demaille <akim@epita.fr>
95
96 Version 1.49c.
97
a5c75d7f
AD
982002-09-27 Akim Demaille <akim@epita.fr>
99
100 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
101 (Because of AC_LIBSOURCE).
102
8280e179
AD
1032002-09-27 Akim Demaille <akim@epita.fr>
104
105 Playing with Autoscan.
106
107 * configure.ac: Remove the old LIBOBJ tweaks.
108 (AC_REPLACE_FUNCS): Add strrchr and strtol.
109 * lib/strrchr.c: New.
110 * lib/strtol.c: New, from the Coreutils 4.5.1.
111
ae64af35
AD
1122002-09-27 Akim Demaille <akim@epita.fr>
113
114 Playing with Autoscan.
115
116 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
117 * lib/Makefile.am (libbison_a_SOURCES): No longer include
118 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
119 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
120 Coreutils 4.5.1.
121
d1a1114f
AD
1222002-09-24 Akim Demaille <akim@epita.fr>
123
124 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
125 (Frequently Asked Questions, Parser Stack Overflow): New.
126
b906441c
AD
1272002-09-13 Akim Demaille <akim@epita.fr>
128
129 Playing with autoscan.
130
131 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
132 * src/files.c (skeleton_find): Remove, unused.
133 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
134 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
135
bd701811
AD
1362002-09-13 Akim Demaille <akim@epita.fr>
137
138 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
139 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
140
e0a13e7b
AD
1412002-09-13 Akim Demaille <akim@epita.fr>
142
143 * configure.ac: Require 2.54.
144 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
145 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
146 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
147 Remove, provided by Autoconf macros.
148
c97011bf
AD
1492002-09-12 Akim Demaille <akim@epita.fr>
150
151 * m4/prereq.m4: Update, from Coreutils 4.5.1.
152
d862b1be
AD
1532002-09-12 Akim Demaille <akim@epita.fr>
154
155 * m4/prereq.m4: Update, from Fileutils 4.1.5.
156 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
157 Reported by Martin Mokrejs.
158
3d38c03a
AD
1592002-09-10 Akim Demaille <akim@epita.fr>
160
161 * src/parse-gram.y: Associate a human readable string to each
162 token type.
163 * tests/regression.at (Invalid inputs): Adjust.
164
b6347355
AD
1652002-09-10 Gary V. Vaughan <gary@gnu.org>
166
167 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
168 with an Autoconf-2.5x style configure.ac.
169
09ba4ab2
PE
1702002-09-06 Paul Eggert <eggert@twinsun.com>
171
172 * doc/bison.texinfo (Conditions): Make explicit that the GPL
173 exception applies only to yacc.c. This is a modification of a
174 patch originally suggested by Akim Demaille.
175
21846f69
AD
1762002-09-06 Akim Demaille <akim@epita.fr>
177
09ba4ab2
PE
178 * data/c.m4 (b4_copyright): Move the GPL exception comment from
179 here to...
180 * data/yacc.c: here.
181
21846f69
AD
182 * data/lalr1.cc (struct yyltype): Don't define it, since we use
183 LocationType.
184 (b4_ltype): Default to yy::Location from location.hh.
185
c0ad8bf3
AD
1862002-09-04 Jim Meyering <jim@meyering.net>
187
188 * data/yacc.c: Guard the declaration of yytoknum also with
189 `#ifdef YYPRINT', so it is declared only when used.
190
3a93251e
AD
1912002-09-04 Akim Demaille <akim@epita.fr>
192
193 * configure.in: Rename as...
194 * configure.ac: this.
195 Bump to 1.49c.
196
427c0dda
AD
1972002-09-04 Akim Demaille <akim@epita.fr>
198
199 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
200 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
201 translate maintainer only messages.
202
6a254321
PE
2032002-08-12 Paul Eggert <eggert@twinsun.com>
204
645e30d1
PE
205 Version 1.49b.
206
6a254321
PE
207 * Makefile.am (SUBDIRS): Remove intl.
208 (DISTCLEANFILES): Remove.
209 * NEWS: Mention that GNU M4 is now required. Clarify what is
210 meant by "larger grammars". Mention the pt_BR translation.
211 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
212 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
213 Bump version from 0.11.2 to 0.11.5.
214 (BISON_PREREQ_STAGE): Remove.
215 (AM_GNU_GETTEXT): Use external gettext.
216 (AC_OUTPUT): Remove intl/Makefile.
217
218 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
219
220 * data/glr.c: Include string.h, for strlen.
221 (yyreportParseError): Use size_t for yysize.
222 (yy_yypstack): No longer nested inside yypstates, as nested
223 functions are not portable. Do not assume size_t is the
224 same width as int.
225 (yypstates): Do not assume that ptrdiff_t is the same width
226 as int, and similarly for yyposn and YYINDEX.
227
228 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
229
230 * lib/Makefile.am (INCLUDES): Do not include from the intl
231 directory, which has been removed.
232 * src/Makefile.am (INCLUDES): Likewise.
233
234 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
235 (bitsets_sources, additional_bitsets_sources, timevars_sources):
236 New vars.
237
238 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
239 * tests/Makefile.am (EXTRA_DIST): Likewise.
240
241 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
242 Do not assume that bitset_windex is the same width as unsigned.
243
244 * lib/abitset.c (abitset_unused_clear): Do not assume that
245 bitset_word is the same width as int.
246 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
247 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
248 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
249 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
250 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
251
252 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
253 portability to one's complement hosts!).
254 * lib/ebitset.c (ebitset_op1): Likewise.
255 * lib/lbitset.c (lbitset_op1): Likewise.
256
257 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
258 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
259 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
260 Sync with fileutils.
261 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
262 lib/gettext.h: Sync with diffutils.
263
264 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
265 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
266
267 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
268 PROTOTYPES to check for prototypes, and "defined __STDC__" to
269 check for void *.
270
271 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
272 size_t; the old version tried to do this but casted improperly.
273 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
274 (bitset_test): Now returns int, not unsigned long.
275
276 * lib/bitset_stats.c: Include "gettext.h".
277 (_): New macro.
278 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
279 name locals "index", as it generates unnecessary warnings on some
280 hosts that have an "index" function.
281
282 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
283 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
284 they need translation.
285 * src/LR0.c (state_list_append, new_itemsets, get_state,
286 append_states, generate_states): Likewise.
287 * src/assoc.c (assoc_to_string): Likewise.
288 * src/closure.c (print_closure, set_firsts, closure): Likewise.
289 * src/gram.c (grammar_dump): Likewise.
290 * src/injections.c (injections_compute): Likewise.
291 * src/lalr.c (lookaheads_print): Likewise.
292 * src/relation.c (relation_transpose): Likewise.
293 * src/scan-gram.l: Likewise.
294 * src/tables.c (table_grow, pack_vector): Likewise.
295
296 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
297 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
298 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
299 * m4/mbstate_t.m4: Sync with fileutils.
300 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
301
302 * po/LINGUAS: Add pt_BR.
303 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
304 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
305 lib/timevar.c.
306 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
307 manual recommends.
308 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
309
310 * src/complain.c (strerror_r): Remove decl; not needed.
311 (strerror): Use same pattern as ../lib/error.c.
312
313 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
314
315 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
316
317 * src/main.c (main): Cast result of bindtextdomain and textdomain
318 to void, to avoid a GCC warning when --disable-nls is in effect.
319
320 * src/scan-gram.l: Use strings rather than escapes when possible,
321 to minimize the number of warnings from xgettext.
322 (handle_action_dollar, handle_action_at): Don't use isdigit,
323 as it mishandles negative chars and it may not work as expected
324 outside the C locale.
325
326 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
327 this is a GCC extension and is not portable to other compilers.
328
329 * src/system.h (alloca): Use same pattern as ../lib/error.c.
330 Do not include <ctype.h>; no longer needed.
331 Do not include <malloc.h>; no longer needed (and generates
332 warnings on OpenBSD 3.0).
333
334 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
335 it's not portable.
336
337 * tests/regression.at: Do not use 'cc -c input.c -o input';
338 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
339
340 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
341 exit status as failure, not just exit status 1. Sun C exits
342 with status 2 sometimes.
343
344 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
345 Use it for the two large tests.
346
c8f002c7
AD
3472002-08-02 Akim Demaille <akim@epita.fr>
348
349 * src/conflicts.c (conflicts_output): Don't output rules never
350 reduced here, since anyway that computation doesn't work.
351 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
352 (rule_useless_p, rule_never_reduced_p): New.
353 (grammar_rules_partial_print): Use a filter instead of a range.
354 Display the title only if needed.
355 (grammar_rules_print): Adjust.
356 (grammar_rules_never_reduced_report): New.
357 * src/tables.c (action_row): Move the computation of rules never
358 reduced to...
359 (token_actions): here.
360 * src/main.c (main): Make the parser before making the report, so
361 that rules never reduced are computed.
362 Call grammar_rules_never_reduced_report.
363 * src/print.c (print_results): Report rules never reduced.
364 * tests/conflicts.at, tests/reduce.at: Adjust.
365
cd08e51e
AD
3662002-08-01 Akim Demaille <akim@epita.fr>
367
368 Instead of attaching lookaheads and duplicating the rules being
369 reduced by a state, attach the lookaheads to the reductions.
370
371 * src/state.h (state_t): Remove the `lookaheads',
372 `lookaheads_rule' member.
373 (reductions_t): Add a `lookaheads' member.
374 Use a regular array for the `rules'.
375 * src/state.c (reductions_new): Initialize the lookaheads member
376 to 0.
377 (state_rule_lookaheads_print): Adjust.
378 * src/state.h, src/state.c (state_reductions_find): New.
379 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
380 (count_rr_conflicts): Adjust.
381 * src/lalr.c (LArule): Remove.
382 (add_lookback_edge): Adjust.
383 (state_lookaheads_count): New.
384 (states_lookaheads_initialize): Merge into...
385 (initialize_LA): this.
386 (lalr_free): Adjust.
387 * src/main.c (main): Don't free nullable and derives too early: it
388 is used by --verbose.
389 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
390
bb0027a9
AD
3912002-08-01 Akim Demaille <akim@epita.fr>
392
393 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
394 `rule_number_t**'.
395 (set_derives, free_derives): Rename as...
396 (derives_compute, derives_free): this.
397 Adjust all dependencies.
398 * src/nullable.c (set_nullable, free_nullable): Rename as...
399 (nullable_compute, nullable_free): these.
400 (rule_list_t): Store rule_t *, not rule_number_t.
401 * src/state.c (state_rule_lookaheads_print): Directly compare rule
402 pointers, instead of their numbers.
403 * src/main.c (main): Call nullable_free, and derives_free earlier,
404 as they were lo longer used.
405
3325ddc4
AD
4062002-08-01 Akim Demaille <akim@epita.fr>
407
408 * lib/timevar.c (get_time): Include children time.
409 * src/lalr.h (LA, LArule): Don't export them: used with the
410 state_t.
411 * src/lalr.c (LA, LArule): Static.
412 * src/lalr.h, src/lalr.c (lalr_free): New.
413 * src/main.c (main): Call it.
414 * src/tables.c (pack_vector): Check whether loc is >= to the
415 table_size, not >.
416 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
417 (tables_generate): do it, since that's also it which allocates
418 them.
419 Don't free LA and LArule, main does.
420
c6f1a33c
AD
4212002-07-31 Akim Demaille <akim@epita.fr>
422
423 Separate parser tables computation and output.
424
425 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
426 (conflict_list, conflict_list_cnt, table, check, table_ninf)
427 (yydefgoto, yydefact, high): Move to...
428 * src/tables.h, src/tables.c: here.
429 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
430 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
431 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
432 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
433 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
434 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
435 (action_row, save_row, token_actions, save_column, default_goto)
436 (goto_actions, sort_actions, matching_state, pack_vector)
437 (table_ninf_remap, pack_table, prepare_actions): Move to...
438 * src/tables.c: here.
439 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
440 * src/output.c (token_actions, output_base, output_conflicts)
441 (output_check): Merge into...
442 (prepare_actions): this.
443 (actions_output): Rename as...
444 (user_actions_output): this.
445 * src/main.c (main): Call tables_generate and tables_free.
446
1509d42f
AD
4472002-07-31 Akim Demaille <akim@epita.fr>
448
449 Steal GCC's --time-report support.
450
451 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
452 stolen/adjusted from GCC.
453 * m4/stage.m4: Remove time related checks.
454 * m4/timevar.m4: New.
455 * configure.in: Adjust.
456 * src/system.h: Adjust to using timevar.h.
457 * src/getargs.h, src/getargs.c: Support trace_time for
458 --trace=time.
459 * src/main.c (stage): Remove.
460 (main): Replace `stage' invocations with timevar calls.
461 * src/output.c: Insert pertinent timevar calls.
462
273a74fa
AD
4632002-07-31 Akim Demaille <akim@epita.fr>
464
465 Let --trace have arguments.
466
467 * src/getargs.h (enum trace_e): New.
468 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
469 (long_options, short_options): --trace/-T takes an optional
470 argument.
471 Change all the uses of trace_flag to reflect the new flags.
472 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
473
474 Strengthen `stage' portability.
475
476 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
477 * configure.in: Use it.
478 Don't check for malloc.h and sys/times.h.
479 * src/system.h: Include them when appropriate.
480 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
481 times and struct tms are available.
482
217598da
AD
4832002-07-30 Akim Demaille <akim@epita.fr>
484
485 In verbose parse error message, don't report `error' as an
486 expected token.
487 * tests/actions.at (Printers and Destructors): Adjust.
488 * tests/calc.at (Calculator $1): Adjust.
489 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
490 error message, do not report the parser accepts the error token in
491 that state.
492
52489d44
AD
4932002-07-30 Akim Demaille <akim@epita.fr>
494
495 Normalize conflict related messages.
496
497 * src/complain.h, src/complain.c (warn, complain): New.
498 * src/conflicts.c (conflicts_print): Use them.
499 (conflict_report_yacc): New, extracted from...
500 (conflicts_print): here.
501 * tests/conflicts.at, tests/existing.at: Adjust.
502
e8832397
AD
5032002-07-30 Akim Demaille <akim@epita.fr>
504
505 Report rules which are never reduced by the parser: those hidden
506 by conflicts.
507
508 * src/LR0.c (save_reductions): Don't make the final state too
509 different: save its reduction (accept) instead of having a state
510 without any action (no shift or goto, no reduce).
511 Note: the final state is now a ``regular'' state, i.e., the
512 parsers now contain `reduce 0' as default reduction.
513 Nevertheless, since they decide to `accept' when yystate =
514 final_state, they still will not reduce rule 0.
515 * src/print.c (print_actions, print_reduction): Adjust.
516 * src/output.c (action_row): Track reduced rules.
517 (token_actions): Report rules never reduced.
518 * tests/conflicts.at, tests/regression.at: Adjust.
519
caf23d24
AD
5202002-07-30 Akim Demaille <akim@epita.fr>
521
522 `stage' was accidently included in a previous patch.
523 Initiate its autoconfiscation.
524
525 * configure.in: Look for malloc.h and sys/times.h.
526 * src/main.c (stage): Adjust.
527 Report only when trace_flag.
528
640748ee
AD
5292002-07-29 Akim Demaille <akim@epita.fr>
530
531 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
532 state_number_t.
533 (errs_t): symbol_t*, not symbol_number_t.
534 (reductions_t): rule_t*, not rule_number_t.
535 (FOR_EACH_SHIFT): New.
536 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
537 * src/print.c, src/print_graph.c: Adjust.
538
88bce5a2
AD
5392002-07-29 Akim Demaille <akim@epita.fr>
540
541 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
542
543 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
544 (endtoken, accept): these.
545 * src/reader.c (reader): Set endtoken's default tag to "$end".
546 Set undeftoken's tag to "$undefined" instead of "$undefined.".
547 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
548 Adjust.
549
1bfb97db
AD
5502002-07-29 Akim Demaille <akim@epita.fr>
551
552 * src/reduce.c (reduce_grammar): When the language is empty,
553 complain about the start symbol, not the axiom.
554 Use its location.
555 * tests/reduce.at (Empty Language): New.
556
fc5734fe
AD
5572002-07-26 Akim Demaille <akim@epita.fr>
558
559 * src/reader.h, src/reader.c (gram_error): ... can't get
560 yycontrol without making too strong assumptions on the parser
561 itself.
562 * src/output.c (prepare_tokens): Use the real 0th value of
563 token_translations instead of `0'.
564 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
565 visible here.
566 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
567 for the time being: %locations ought to provide it to yyerror.
568
3650b4b8
AD
5692002-07-25 Akim Demaille <akim@epita.fr>
570
571 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
572 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
573 * tests/regression.at (Web2c Actions): Adjust.
574
4b3d3a8e
AD
5752002-07-25 Akim Demaille <akim@epita.fr>
576
577 Stop storing rules from 1 to nrules + 1.
578
579 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
580 * src/nullable.c, src/output.c, src/print.c, src/reader.c
581 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
582 Iterate from 0 to nrules.
583 Use rule_number_as_item_number and item_number_as_rule_number.
584 Adjust to `derive' now containing possibly 0.
585 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
586 Handle the `- 1' part in rule numbers from/to item numbers.
587 * src/conflicts.c (log_resolution): Fix the message which reversed
588 shift and reduce.
589 * src/output.c (action_row): Initialize default_rule to -1.
590 (token_actions): Adjust.
591 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
592 expected output.
593 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
594
4a2a22f4
AD
5952002-07-25 Akim Demaille <akim@epita.fr>
596
597 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
598 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
599 (b4_c_knr_arg_decl): New.
600 * data/yacc.c: Use it to define yysymprint, yydestruct, and
601 yyreport_parse_error.
602
b8df3223
AD
6032002-07-25 Akim Demaille <akim@epita.fr>
604
605 * data/yacc.c (yyreport_parse_error): New, extracted from...
606 (yyparse): here.
607 (yydestruct, yysymprint): Move above yyparse.
608 Be K&R compliant.
609
a762e609
AD
6102002-07-25 Akim Demaille <akim@epita.fr>
611
612 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
613 replace...
614 (b4_sint_type, b4_uint_type): these.
615 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
616 * tests/regression.at (Web2c Actions): Adjust.
617
12b0043a
AD
6182002-07-25 Akim Demaille <akim@epita.fr>
619
620 * src/gram.h (TIEM_NUMBER_MAX): New.
621 (item_number_of_rule_number, rule_number_of_item_number): Rename
622 as...
623 (rule_number_as_item_number, item_number_as_rule_number): these.
624 Adjust dependencies.
625 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
626 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
627 (symbol_number_to_vector_number): New.
628 (order): Of vector_number_t* type.
629 (base_t, BASE_MAX, BASE_MIN): New.
630 (froms, tos, width, pos, check): Of base_t type.
631 (action_number_t, ACTION_MIN, ACTION_MAX): New.
632 (actrow): Of action_number_t type.
633 (conflrow): Of unsigned int type.
634 (table_ninf, base_ninf): New.
635 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
636 (muscle_insert_int_table, muscle_insert_base_table)
637 (muscle_insert_rule_number_table): New.
638 (prepare_tokens): Output `toknum' as int_table.
639 (action_row): Returns a rule_number_t.
640 Use ACTION_MIN, not SHRT_MIN.
641 (token_actions): yydefact is rule_number_t*.
642 (table_ninf_remap): New.
643 (pack_table): Use it for `base' and `table'.
644 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
645 replaced with...
646 (YYPACT_NINF, YYTABLE_NINF): these.
647 (yypact, yytable): Compute their types instead of hard-coded
648 `short'.
649 * tests/regression.at (Web2c Actions): Adjust.
650
5dde258a
AD
6512002-07-19 Akim Demaille <akim@epita.fr>
652
653 * src/scan-gram.l (id): Can start with an underscore.
654
a945ec39
AD
6552002-07-16 Akim Demaille <akim@epita.fr>
656
657 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
658 Adjust all former `associativity' dependencies.
659 * src/symtab.c (symbol_new): Default associativity is `undef', not
660 `right'.
661 (symbol_check_alias_consistence): Adjust.
662
fae437e8
AD
6632002-07-09 Akim Demaille <akim@epita.fr>
664
665 * doc/bison.texinfo: Properly set the ``header'' part.
666 Use @dircategory ``GNU programming tools'' as per Texinfo's
667 documentation.
668 Use @copying.
669
1a715ef2
AD
6702002-07-09 Akim Demaille <akim@epita.fr>
671
672 * lib/quotearg.h: Protect against multiple inclusions.
673 * src/location.h (location_t): Add a `file' member.
674 (LOCATION_RESET, LOCATION_PRINT): Adjust.
675 * src/complain.c (warn_at, complain_at, fatal_at): Drop
676 `error_one_per_line' support.
677
a5d50994
AD
6782002-07-09 Akim Demaille <akim@epita.fr>
679
680 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
681 * src/reader.c (lineno): Remove.
682 Adjust all dependencies.
683 (get_merge_function): Take a location and use complain_at.
684 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
685 * tests/regression.at (Invalid inputs, Mixing %token styles):
686 Adjust.
687
b275314e
AD
6882002-07-09 Akim Demaille <akim@epita.fr>
689
690 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
691 recovery rule, and forbid extensions when --yacc.
692 (gram_error): Use complain_at.
693 * src/reader.c (reader): Exit if there were parse errors.
694
865b9df1
AD
6952002-07-09 Akim Demaille <akim@epita.fr>
696
697 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
698 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
699 Reported by R Blake <blakers@mac.com>.
700
c76e14da
AD
7012002-07-09 Akim Demaille <akim@epita.fr>
702
703 * data/yacc.c: Output the copyright notive in the header.
704
7db2ed2d
AD
7052002-07-03 Akim Demaille <akim@epita.fr>
706
707 * src/output.c (froms, tos): Are state_number_t.
708 (save_column): sp, sp1, and sp2 are state_number_t.
709 (prepare): Rename `final' as `final_state_number', `nnts' as
710 `nterms_number', `nrules' as `rules_number', `nstates' as
711 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
712 unused.
713 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
714 * data/lalr1.cc (nsym_): Remove, unused.
715
e68e0410
AD
7162002-07-03 Akim Demaille <akim@epita.fr>
717
718 * src/lalr.h, src/lalr.c (goto_number_t): New.
719 * src/lalr.c (goto_list_t): New.
720 Propagate them.
721 * src/nullable.c (rule_list_t): New.
722 Propagate.
723 * src/types.h: Remove.
724
e1a4f3a4
AD
7252002-07-03 Akim Demaille <akim@epita.fr>
726
727 * src/closure.c (print_fderives): Use rule_rhs_print.
728 * src/derives.c (print_derives): Use rule_rhs_print.
729 (rule_list_t): New, replaces `shorts'.
730 (set_derives): Add comments.
731 * tests/sets.at (Nullable, Firsts): Adjust.
732
536545f3
AD
7332002-07-03 Akim Demaille <akim@epita.fr>
734
735 * src/output.c (prepare_actions): Free `tally' and `width'.
736 (prepare_actions): Allocate and free `order'.
737 * src/symtab.c (symbols_free): Free `symbols'.
738 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
739 * src/output.c (m4_invoke): Move to...
740 * src/scan-skel.l: here.
741 (<<EOF>>): Close yyout, and free its name.
742
8b752b00
AD
7432002-07-03 Akim Demaille <akim@epita.fr>
744
745 Fix some memory leaks, and fix a bug: state 0 was examined twice.
746
747 * src/LR0.c (new_state): Merge into...
748 (state_list_append): this.
749 (new_states): Merge into...
750 (generate_states): here.
751 (set_states): Don't ensure a proper `errs' state member here, do it...
752 * src/conflicts.c (conflicts_solve): here.
753 * src/state.h, src/state.c: Comment changes.
754 (state_t): Rename member `shifts' as `transitions'.
755 Adjust all dependencies.
756 (errs_new): For consistency, also take the values as argument.
757 (errs_dup): Remove.
758 (state_errs_set): New.
759 (state_reductions_set, state_transitions_set): Assert that no
760 previous value was assigned.
761 (state_free): New.
762 (states_free): Use it.
763 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
764 temporary storage: use `errs' and `nerrs' as elsewhere.
765 (set_conflicts): Allocate and free this `errs'.
766
613f5e1a
AD
7672002-07-02 Akim Demaille <akim@epita.fr>
768
769 * lib/libiberty.h: New.
770 * lib: Update the bitset implementation from upstream.
771 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
772 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
773 * src/main.c: Adjust bitset stats calls.
774
26e0cadc
PE
7752002-07-01 Paul Eggert <eggert@twinsun.com>
776
777 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
778 char, so that negative chars don't collide with $.
779
1154cced
AD
7802002-06-30 Akim Demaille <akim@epita.fr>
781
782 Have the GLR tests be `warning' checked, and fix the warnings.
783
784 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
785 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
786 (yyremoveDeletes): `yyi' and `yyj' are size_t.
787 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
788 (yyaddDeferredAction): static.
789 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
790 (yyreportParseError): yyprefix is const.
791 yytokenp is used only when verbose.
792 (yy__GNUC__): Replace with __GNUC__.
793 (yypdumpstack): yyi is size_t.
794 (yypreference): Un-yy local variables and arguments, to avoid
795 clashes with `yyr1'. Anyway, we are not in the user name space.
796 (yytname_size): be an int, as is compared with ints.
797 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
798 Use them.
799 * tests/cxx-gram.at: Use quotation to protect $1.
800 Use AT_COMPILE to enable warnings hunts.
801 Prototype yylex and yyerror.
802 `Use' argc.
803 Include `string.h', not `strings.h'.
804 Produce and prototype stmtMerge only when used.
805 yylex takes a location.
806
97650f4e
AD
8072002-06-30 Akim Demaille <akim@epita.fr>
808
809 We spend a lot of time in quotearg, in particular when --verbose.
810
811 * src/symtab.c (symbol_get): Store a quoted version of the key.
812 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
813 Adjust all callers.
814
d2576365
AD
8152002-06-30 Akim Demaille <akim@epita.fr>
816
817 * src/state.h (reductions_t): Rename member `nreds' as num.
818 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
819 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
820
ccaf65bc
AD
8212002-06-30 Akim Demaille <akim@epita.fr>
822
823 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
824 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
825 (shifts_to): Rename as...
826 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
827 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
828 (TRANSITION_IS_DISABLED, transitions_to): these.
829
87675353
AD
8302002-06-30 Akim Demaille <akim@epita.fr>
831
832 * src/print.c (print_shifts, print_gotos): Merge into...
833 (print_transitions): this.
834 (print_transitions, print_errs, print_reductions): Align the
835 lookaheads columns.
836 (print_core, print_transitions, print_errs, print_state,
837 print_grammar): Output empty lines separator before, not after.
838 (state_default_rule_compute): Rename as...
839 (state_default_rule): this.
840 * tests/conflicts.at (Defaulted Conflicted Reduction),
841 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
842 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
843
ce4ccb4b
AD
8442002-06-30 Akim Demaille <akim@epita.fr>
845
846 Display items as we display rules.
847
848 * src/gram.h, src/gram.c (rule_lhs_print): New.
849 * src/gram.c (grammar_rules_partial_print): Use it.
850 * src/print.c (print_core): Likewise.
851 * tests/conflicts.at (Defaulted Conflicted Reduction),
852 (Unresolved SR Conflicts): Adjust.
853 (Unresolved SR Conflicts): Adjust and rename as...
854 (Resolved SR Conflicts): this, as was meant.
855 * tests/regression.at (Web2c Report): Adjust.
856
bc933ef1
AD
8572002-06-30 Akim Demaille <akim@epita.fr>
858
859 * src/print.c (state_default_rule_compute): New, extracted from...
860 (print_reductions): here.
861 Pessimize, but clarify the code.
862 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
863
53d4308d
AD
8642002-06-30 Akim Demaille <akim@epita.fr>
865
866 * src/output.c (action_row): Let default_rule be always a rule
867 number.
868
574fb2d5
AD
8692002-06-30 Akim Demaille <akim@epita.fr>
870
871 * src/closure.c (print_firsts, print_fderives, closure):
872 Use BITSET_EXECUTE.
873 * src/lalr.c (lookaheads_print): Likewise.
874 * src/state.c (state_rule_lookaheads_print): Likewise.
875 * src/print_graph.c (print_core): Likewise.
876 * src/print.c (print_reductions): Likewise.
877 * src/output.c (action_row): Likewise.
878 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
879
05811fd7
AD
8802002-06-30 Akim Demaille <akim@epita.fr>
881
882 * src/print_graph.c: Use report_flag.
883
0e4d5753
AD
8842002-06-30 Akim Demaille <akim@epita.fr>
885
886 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
887 to...
888 * src/relation.h, src/relation.c (traverse, relation_digraph)
889 (relation_print, relation_transpose): New.
890
24c7d800
AD
8912002-06-30 Akim Demaille <akim@epita.fr>
892
893 * src/state.h, src/state.c (shifts_to): New.
894 * src/lalr.c (build_relations): Use it.
895
9222837b
AD
8962002-06-30 Akim Demaille <akim@epita.fr>
897
898 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
899 (item_number_of_rule_number, rule_number_of_item_number): New.
900 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
901 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
902 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
903 Propagate their use.
904 Much remains to be done, in particular wrt `shorts' from types.h.
905
260008e5
AD
9062002-06-30 Akim Demaille <akim@epita.fr>
907
908 * src/symtab.c (symbol_new): Initialize the `printer' member.
909
8a731ca8
AD
9102002-06-30 Akim Demaille <akim@epita.fr>
911
912 * src/LR0.c (save_reductions): Remove, replaced by...
913 * src/state.h, src/state.c (state_reductions_set): New.
914 (reductions, errs): Rename as...
915 (reductions_t, errs_t): these.
916 Adjust all dependencies.
917
32e1e0a4
AD
9182002-06-30 Akim Demaille <akim@epita.fr>
919
920 * src/LR0.c (state_list_t, state_list_append): New.
921 (first_state, last_state): Now symbol_list_t.
922 (this_state): Remove.
923 (new_itemsets, append_states, save_reductions): Take a state_t as
924 argument.
925 (set_states, generate_states): Adjust.
926 (save_shifts): Remove, replaced by...
927 * src/state.h, src/state.c (state_shifts_set): New.
928 (shifts): Rename as...
929 (shifts_t): this.
930 Adjust all dependencies.
931 * src/state.h (state_t): Remove the `next' member.
932
e5fb6710
AD
9332002-06-30 Akim Demaille <akim@epita.fr>
934
935 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
936 escaped in slot 0.
937
c7ca99d4
AD
9382002-06-30 Akim Demaille <akim@epita.fr>
939
940 Use hash.h for the state hash table.
941
942 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
943 (allocate_storage): Use state_hash_new.
944 (free_storage): Use state_hash_free.
945 (new_state, get_state): Adjust.
946 * src/lalr.h, src/lalr.c (states): Move to...
947 * src/states.h (state_t): Remove the `link' member, no longer
948 used.
949 * src/states.h, src/states.c: here.
950 (state_hash_new, state_hash_free, state_hash_lookup)
951 (state_hash_insert, states_free): New.
952 * src/states.c (state_table, state_compare, state_hash): New.
953 * src/output.c (output_actions): Do not free states now, since we
954 still need to know the final_state number in `prepare', called
955 afterwards. Do it...
956 * src/main.c (main): here: call states_free after `output'.
957
df0e7316
AD
9582002-06-30 Akim Demaille <akim@epita.fr>
959
960 * src/state.h, src/state.c (state_new): New, extracted from...
961 * src/LR0.c (new_state): here.
962 * src/state.h (STATE_ALLOC): Move to...
963 * src/state.c: here.
964 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
965 * src/state.h, src/state.c: here.
966
39f41916
AD
9672002-06-30 Akim Demaille <akim@epita.fr>
968
969 * src/reader.c (gensym): Rename as...
970 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
971 (getsym): Rename as...
972 (symbol_get): this.
973
d57650a5
AD
9742002-06-30 Akim Demaille <akim@epita.fr>
975
976 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
977 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
978 * src/output.c, src/print.c, src/print_graph.c: Propagate.
979 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
980
5a08f1ce
AD
9812002-06-30 Akim Demaille <akim@epita.fr>
982
983 Make the test suite pass with warnings checked.
984
985 * tests/actions.at (Printers and Destructors): Improve.
986 Avoid unsigned vs. signed issues.
987 * tests/calc.at: Don't exercise the scanner here, do it...
988 * tests/input.at (Torturing the Scanner): here.
989
720623af
PH
9902002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
991
88e7e941 992 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
993 reorganize first lines parallel to yacc.c.
994
fb8135fa
AD
9952002-06-28 Akim Demaille <akim@epita.fr>
996
997 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
998 (b4_token_enum, b4_token_defines): New, factored from...
999 * data/lalr1.cc, data/yacc.c, glr.c: here.
1000
41442480
AD
10012002-06-28 Akim Demaille <akim@epita.fr>
1002
1003 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
1004 unused variables.
1005 * src/output.c (merger_output): static.
1006
e0e5bf84
AD
10072002-06-28 Akim Demaille <akim@epita.fr>
1008
1009 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
1010 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
1011 pacify GCC.
1012 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 1013
676385e2
PH
10142002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1015
1016 Accumulated changelog for new GLR parsing features.
1017
6a254321 1018 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
1019 conflicts_total_count.
1020 * src/conflicts.h: Ditto.
1021 * src/output.c (token_actions): Use the new name.
1022 (output_conflicts): Change conflp => conflict_list_heads, and
1023 confl => conflict_list for better readability.
1024 * data/glr.c: Use the new names.
1025 * NEWS: Add self to GLR announcement.
e0e5bf84 1026
676385e2
PH
1027 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
1028
1029 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
1030 Akim Demaille.
1031
1032 * data/bison.glr: Change name to glr.c
1033 * data/glr.c: Renamed from bison.glr.
1034 * data/Makefile.am: Add glr.c
e0e5bf84
AD
1035
1036 * src/getargs.c:
1037
676385e2
PH
1038 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
1039 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 1040
676385e2
PH
1041 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1042
1043 * data/bison.glr: Be sure to restore the
1044 current #line when returning to the skeleton contents after having
1045 exposed the input file's #line.
1046
1047 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1048
1049 * data/bison.glr: Bring up to date with changes to bison.simple.
1050
1051 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1052
1053 * data/bison.glr: Correct definitions that use b4_prefix.
1054 Various reformatting.
1055 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
1056 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
1057 yytokenp argument; now part of stack.
1058 (yychar): Define to behave as documented.
1059 (yyclearin): Ditto.
e0e5bf84 1060
676385e2
PH
1061 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1062
1063 * src/reader.h: Add declaration for free_merger_functions.
1064
1065 * src/reader.c (merge_functions): New variable.
1066 (get_merge_function): New function.
1067 (free_merger_functions): New function.
1068 (readgram): Check for %prec that is not followed by a symbol.
1069 Handle %dprec and %merge declarations.
1070 (packgram): Initialize dprec and merger fields in rules array.
1071
1072 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
1073 conflict_list_cnt, conflict_list_free): New variables.
1074 (table_grow): Also grow conflict_table.
e0e5bf84 1075 (prepare_rules): Output dprec and merger tables.
676385e2 1076 (conflict_row): New function.
e0e5bf84 1077 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
1078 default reduction in conflicted states for GLR parser so that there
1079 are spaces for the conflict lists.
1080 (save_row): Also save conflict information.
1081 (token_actions): Allocate conflict list.
1082 (merger_output): New function.
1083 (pack_vector): Pack conflict table, too.
1084 (output_conflicts): New function to output yyconflp and yyconfl.
1085 (output_check): Allocate conflict_tos.
1086 (output_actions): Output conflict tables, also.
1087 (output_skeleton): Output b4_mergers definition.
1088 (prepare): Output b4_max_rhs_length definition.
1089 Use 'bison.glr' as default skeleton for GLR parsers.
1090
1091 * src/gram.c (glr_parser): New flag.
1092 (grammar_free): Call free_merger_functions.
1093
1094 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
1095 all pairs of conflicting reductions, rather than just all tokens
1096 causing conflicts. Needed to size conflict tables.
e0e5bf84 1097 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
1098 interface.
1099 (conflicts_print): Ditto.
1100 (count_total_conflicts): New function.
1101
1102 * src/reader.h (merger_list): New type.
1103 (merge_functions): New variable.
1104
1105 * src/lex.h (tok_dprec, tok_merge): New token types.
1106
1107 * src/gram.h (rule_s): Add dprec and merger fields.
1108 (glr_parser): New flag.
1109
1110 * src/conflicts.h (count_total_conflicts): New function.
1111
1112 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
1113
1114 * doc/bison.texinfo (Generalized LR Parsing): New section.
1115 (GLR Parsers): New section.
1116 (Language and Grammar): Mention GLR parsing.
1117 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
1118 Correct typo ("tge" -> "the").
1119
1120 * data/bison.glr: New skeleton for GLR parsing.
1121
1122 * tests/cxx-gram.at: New tests for GLR parsing.
1123
1124 * tests/testsuite.at: Include cxx-gram.at.
1125
1126 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 1127
676385e2
PH
1128 * src/parse-gram.y:
1129
1130 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
1131
1132 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 1133
b5480d74 11342002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
1135
1136 * src/options.h, src/options.c: Remove.
1137 * src/getargs.c (short_options, long_options): New.
1138
60491a94
AD
11392002-06-27 Akim Demaille <akim@epita.fr>
1140
1141 * data/bison.simple, data/bison.c++: Rename as...
1142 * data/yacc.c, data/lalr1.cc: these.
1143 * doc/bison.texinfo (Environment Variables): Remove.
1144
9be0c25b
AD
11452002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1146
1147 * src/getargs.c (report_argmatch): Initialize strtok().
1148
1ae72863
AD
11492002-06-20 Akim Demaille <akim@epita.fr>
1150
1151 * data/bison.simple (b4_symbol_actions): New, replaces...
1152 (b4_symbol_destructor, b4_symbol_printer): these.
1153 (yysymprint): Be sure to call YYPRINT only for tokens, and using
1154 user token numbers.
1155
87542d29
AD
11562002-06-20 Akim Demaille <akim@epita.fr>
1157
1158 * data/bison.simple (yydestructor): Rename as...
1159 (yydestruct): this.
1160
1a31ed21
AD
11612002-06-20 Akim Demaille <akim@epita.fr>
1162
1163 * src/symtab.h, src/symtab.c (symbol_type_set)
1164 (symbol_destructor_set, symbol_precedence_set): The location is
1165 the last argument.
1166 Adjust all callers.
1167
e776192e
AD
11682002-06-20 Akim Demaille <akim@epita.fr>
1169
1170 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
1171 internals.
1172 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
1173 Takes a location.
1174 * src/symtab.h, src/symtab.c (symbol_class_set)
1175 (symbol_user_token_number_set): Likewise.
1176 Adjust all callers.
1177 Promote complain_at.
1178 * tests/input.at (Type Clashes): Adjust.
1179
5c1180b3
AD
11802002-06-20 Akim Demaille <akim@epita.fr>
1181
1182 * data/bison.simple (YYLEX): Fix the declaration when
1183 %pure-parser.
1184
e3170060
AD
11852002-06-20 Akim Demaille <akim@epita.fr>
1186
1187 * data/bison.simple (yysymprint): Don't print the token number,
1188 just its name.
1189 * tests/actions.at (Destructors): Rename as...
1190 (Printers and Destructors): this.
1191 Also exercise %printer.
1192
253862fd
AD
11932002-06-20 Akim Demaille <akim@epita.fr>
1194
1195 * data/bison.simple (YYDSYMPRINT): New.
1196 Use it to remove many of the #if YYDEBUG/if (yydebug).
1197
366eea36
AD
11982002-06-20 Akim Demaille <akim@epita.fr>
1199
1200 * src/symtab.h, src/symtab.c (symbol_t): printer and
1201 printer_location are new members.
1202 (symbol_printer_set): New.
1203 * src/parse-gram.y (PERCENT_PRINTER): New token.
1204 Handle its associated rule.
1205 * src/scan-gram.l: Adjust.
1206 (handle_destructor_at, handle_destructor_dollar): Rename as...
1207 (handle_symbol_code_at, handle_symbol_code_dollar): these.
1208 * src/output.c (symbol_printers_output): New.
1209 (output_skeleton): Call it.
1210 * data/bison.simple (yysymprint): New. Cannot be named yyprint
1211 since there are already many grammar files with a user `yyprint'.
1212 Replace the calls to YYPRINT to calls to yysymprint.
1213 * tests/calc.at: Adjust.
1214 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
1215 taking advantage of parser very internal details (stack size!).
1216
4f25ebb0
AD
12172002-06-20 Akim Demaille <akim@epita.fr>
1218
1219 * src/scan-gram.l: Complete the scanner with the missing patterns
1220 to pacify Flex.
1221 Use `quote' and `symbol_tag_get' where appropriate.
1222
93b68a0e
AD
12232002-06-19 Akim Demaille <akim@epita.fr>
1224
1225 * tests/actions.at (Destructors): Augment to test locations.
1226 * data/bison.simple (yydestructor): Pass it the current location
1227 if locations are enabled.
1228 Prototype only when __STDC__ or C++.
1229 Change the argument names to move into the yy name space: there is
1230 user code here.
1231
58612f1d
AD
12322002-06-19 Akim Demaille <akim@epita.fr>
1233
74310291
AD
1234 * data/bison.simple (b4_pure_if): New.
1235 Use it instead of #ifdef YYPURE.
1236
12372002-06-19 Akim Demaille <akim@epita.fr>
1238
1239 * data/bison.simple (b4_location_if): New.
58612f1d
AD
1240 Use it instead of #ifdef YYLSP_NEEDED.
1241
f25bfb75
AD
12422002-06-19 Akim Demaille <akim@epita.fr>
1243
1244 Prepare @$ in %destructor, but currently don't bind it in the
1245 skeleton, as %location use is not cleaned up yet.
1246
1247 * src/scan-gram.l (handle_dollar, handle_destructor_at)
1248 (handle_action_at): New.
1249 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
1250 a braced_code_t and a location as additional arguments.
1251 (handle_destructor_dollar): Instead of requiring `b4_eval', just
1252 unquote one when outputting `b4_dollar_dollar'.
1253 Adjust callers.
1254 * data/bison.simple (b4_eval): Remove.
1255 (b4_symbol_destructor): Adjust.
1256 * tests/input.at (Invalid @n): Adjust.
1257
c732d2c6
AD
12582002-06-19 Zack Weinberg <zack@codesourcery.com>
1259
1260 * doc/bison.texinfo: Document ability to have multiple
1261 prologue sections.
1262
8c165d89
AD
12632002-06-18 Akim Demaille <akim@epita.fr>
1264
1265 * src/files.c (compute_base_names): When computing the output file
1266 names from the input file name, strip the directory part.
1267
ca98bf57
AD
12682002-06-18 Akim Demaille <akim@epita.fr>
1269
1270 * data/bison.simple.new: Comment changes.
1271 Reported by Andreas Schwab.
1272
0bfb02ff
AD
12732002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
1274
1275 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
1276 there are no `label `yyoverflowlab' defined but not used' warnings
1277 when yyoverflow is defined.
1278
24c0aad7
AD
12792002-06-18 Akim Demaille <akim@epita.fr>
1280
1281 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
1282 new member.
1283 (symbol_destructor_set): Adjust.
1284 * src/output.c (symbol_destructors_output): Output the destructor
1285 locations.
1286 Output the symbol name.
1287 * data/bison.simple (b4_symbol_destructor): Adjust.
1288
5719c109
AD
12892002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
1290 and Akim Demaille <akim@epita.fr>
1291
1292 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
1293 what's left on the stack when the error recovery hits EOF.
1294 * tests/actions.at (Destructors): Complete to exercise this case.
1295
9280d3ef
AD
12962002-06-17 Akim Demaille <akim@epita.fr>
1297
1298 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
1299 arguments is really empty, not only equal to `[]'.
1300 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
1301 member.
1302 (symbol_destructor_set): New.
1303 * src/output.c (symbol_destructors_output): New.
1304 * src/reader.h (brace_code_t, current_braced_code): New.
1305 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
1306 (handle_dollar): Rename as...
1307 (handle_action_dollar): this.
1308 (handle_destructor_dollar): New.
1309 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
1310 (grammar_declaration): Use it.
1311 * data/bison.simple (yystos): Is always defined.
1312 (yydestructor): New.
1313 * tests/actions.at (Destructors): New.
1314 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
1315
dafdc66f
AD
13162002-06-17 Akim Demaille <akim@epita.fr>
1317
1318 * src/symlist.h, src/symlist.c (symbol_list_length): New.
1319 * src/scan-gram.l (handle_dollar, handle_at): Compute the
1320 rule_length only when needed.
1321 * src/output.c (actions_output, token_definitions_output): Output
1322 the full M4 block.
1323 * src/symtab.c: Don't access directly to the symbol tag, use
1324 symbol_tag_get.
1325 * src/parse-gram.y: Use symbol_list_free.
1326
56c47203
AD
13272002-06-17 Akim Demaille <akim@epita.fr>
1328
1329 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
1330 (symbol_list_prepend, get_type_name): Move to...
1331 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
1332 (symbol_list_prepend, symbol_list_n_type_name_get): here.
1333 Adjust all callers.
1334 (symbol_list_free): New.
1335 * src/scan-gram.l (handle_dollar): Takes a location.
1336 * tests/input.at (Invalid $n): Adjust.
1337
1e0bab92
AD
13382002-06-17 Akim Demaille <akim@epita.fr>
1339
1340 * src/reader.h, src/reader.c (symbol_list_new): Export it.
1341 (symbol_list_prepend): New.
1342 * src/parse-gram.y (%union): `list' is a new member.
1343 (symbols.1): New, replaces...
1344 (terms_to_prec.1, nterms_to_type.1): these.
1345 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
1346 Take a location as additional argument.
1347 Adjust all callers.
1348
04e60654
AD
13492002-06-15 Akim Demaille <akim@epita.fr>
1350
1351 * src/parse-gram.y: Move %token in the declaration section so that
1352 we don't depend upon CVS Bison.
1353
10e5b8bd
AD
13542002-06-15 Akim Demaille <akim@epita.fr>
1355
1356 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
1357 * src/print.c (print_core): Use it.
1358
9801d40c
AD
13592002-06-15 Akim Demaille <akim@epita.fr>
1360
1361 * src/conflicts.c (log_resolution): Accept the rule involved in
1362 the sr conflicts instead of the lookahead number that points to
1363 that rule.
1364 (flush_reduce): Accept the current lookahead vector as argument,
1365 instead of the index in LA.
1366 (resolve_sr_conflict): Accept the current number of lookahead
1367 bitset to consider for the STATE, instead of the index in LA.
1368 (set_conflicts): Adjust.
1369 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
1370
c0263492
AD
13712002-06-15 Akim Demaille <akim@epita.fr>
1372
1373 * src/state.h (state_t): Replace the `lookaheadsp' member, a
1374 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
1375 Adjust all dependencies.
1376 * src/lalr.c (initialize_lookaheads): Split into...
1377 (states_lookaheads_count, states_lookaheads_initialize): these.
1378 (lalr): Adjust.
1379
9757c359
AD
13802002-06-15 Akim Demaille <akim@epita.fr>
1381
1382 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
1383 out of...
1384 (grammar_rules_print): here.
1385 * src/reduce.c (reduce_output): Use it.
1386 * tests/reduce.at (Useless Rules, Reduced Automaton)
1387 (Underivable Rules): Adjust.
1388
6b98e4b5
AD
13892002-06-15 Akim Demaille <akim@epita.fr>
1390
1391 Copy BYacc's nice way to report the grammar.
1392
1393 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
1394 New.
1395 Don't print the rules' location, it is confusing and useless.
1396 (rule_print): Use grammar_rhs_print.
1397 * src/print.c (print_grammar): Use grammar_rules_print.
1398
6b98e4b5
AD
13992002-06-15 Akim Demaille <akim@epita.fr>
1400
1401 Complete and rationalize `useless thing' warnings.
1402
1403 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
1404 (symbol_tag_print): New.
1405 Use them everywhere in place of accessing directly the tag member.
1406 * src/gram.h, src/gram.c (rule_print): New.
1407 Use it where a rule used to be printed `by hand'.
1408 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
1409 (reduce_grammar_tables): Report the useless rules.
1410 (reduce_print): Useless things are a warning, not an error.
1411 Report it as such.
1412 * tests/reduce.at (Useless Nonterminals, Useless Rules):
1413 (Reduced Automaton, Underivable Rules): Adjust.
1414 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
1415 * tests/conflicts.at (Unresolved SR Conflicts)
1416 (Solved SR Conflicts): Adjust.
1417
ee000ba4
AD
14182002-06-15 Akim Demaille <akim@epita.fr>
1419
1420 Let symbols have a location.
1421
1422 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
1423 (getsym): Adjust.
1424 Adjust all callers.
1425 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
1426 Use location_t, not int.
1427 * src/symtab.c (symbol_check_defined): Take advantage of the
1428 location.
1429 * tests/regression.at (Invalid inputs): Adjust.
1430
8efe435c
AD
14312002-06-15 Akim Demaille <akim@epita.fr>
1432
1433 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
1434 (input): Don't try to initialize yylloc here, do it in the
1435 scanner.
1436 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
1437 * src/gram.h (rule_t): Change line and action_line into location
1438 and action_location, of location_t type.
1439 Adjust all dependencies.
1440 * src/location.h, src/location.c (empty_location): New.
1441 * src/reader.h, src/reader.c (grammar_start_symbol_set)
1442 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
1443 (grammar_current_rule_symbol_append)
1444 (grammar_current_rule_action_append): Expect a location as argument.
1445 * src/reader.c (grammar_midrule_action): Adjust to attach an
1446 action's location as dummy symbol location.
1447 * src/symtab.h, src/symtab.c (startsymbol_location): New.
1448 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
1449 the line numbers.
1450
1921f1d7
AD
14512002-06-14 Akim Demaille <akim@epita.fr>
1452
1453 Grammar declarations may be found in the grammar section.
1454
1455 * src/parse-gram.y (rules_or_grammar_declaration): New.
1456 (declarations): Each declaration may end with a semicolon, not
1457 just...
1458 (grammar_declaration): `"%union"'.
1459 (grammar): Branch to rules_or_grammar_declaration.
1460
4515534c
AD
14612002-06-14 Akim Demaille <akim@epita.fr>
1462
1463 * src/main.c (main): Invoke scanner_free.
1464
f958596b
AD
14652002-06-14 Akim Demaille <akim@epita.fr>
1466
1467 * src/output.c (m4_invoke): Extracted from...
1468 (output_skeleton): here.
1469 Free tempfile.
1470
2c569025
AD
14712002-06-14 Akim Demaille <akim@epita.fr>
1472
1473 * src/parse-gram.y (directives, directive, gram)
1474 (grammar_directives, precedence_directives, precedence_directive):
1475 Rename as...
1476 (declarations, declaration, grammar, grammar_declaration)
1477 (precedence_declaration, precedence_declarator): these.
1478 (symbol_declaration): New.
1479
592e8d4d
AD
14802002-06-14 Akim Demaille <akim@epita.fr>
1481
1482 * src/files.c (action_obstack): Remove, unused.
1483 (output_obstack): Remove it, and all its dependencies, as it is no
1484 longer needed.
1485 * src/reader.c (epilogue_set): Build the epilogue in the
1486 muscle_obstack.
1487 * src/output.h, src/output.c (muscle_obstack): Move to...
1488 * src/muscle_tab.h, src/muscle_tab.h: here.
1489 (muscle_init): Initialize muscle_obstack.
1490 (muscle_free): New.
1491 * src/main.c (main): Call it.
1492
0c15323d
AD
14932002-06-14 Akim Demaille <akim@epita.fr>
1494
1495 * src/location.h: New, extracted from...
1496 * src/reader.h: here.
1497 * src/Makefile.am (noinst_HEADERS): Merge into
1498 (bison_SOURCES): this.
1499 Add location.h.
1500 * src/parse-gram.y: Use location_t instead of Bison's.
1501 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
1502 Use location_t instead of ints.
1503
e96c9728
AD
15042002-06-14 Akim Demaille <akim@epita.fr>
1505
1506 * data/bison.simple, data/bison.c++: Be sure to restore the
1507 current #line when returning to the skeleton contents after having
1508 exposed the input file's #line.
1509
75d1fe16
AD
15102002-06-12 Akim Demaille <akim@epita.fr>
1511
1512 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
1513 eager.
1514 * tests/actions.at (Exotic Dollars): New.
1515
6c35d22c
AD
15162002-06-12 Akim Demaille <akim@epita.fr>
1517
1518 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
1519 ['"/] too eagerly.
1520 * tests/input.at (Torturing the Scanner): New.
1521
1d6412ad
AD
15222002-06-11 Akim Demaille <akim@epita.fr>
1523
1524 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
1525 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
1526 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
1527 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
1528 * src/reader.c (reader): Use it.
1529
4cdb01db
AD
15302002-06-11 Akim Demaille <akim@epita.fr>
1531
1532 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
1533 Adjust all callers.
1534 (scanner_last_string_free): New.
1535
44995b2e
AD
15362002-06-11 Akim Demaille <akim@epita.fr>
1537
1538 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
1539 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
1540 (last_string, YY_OBS_FREE): New.
1541 Use them when returning an ID.
1542
e9955c83
AD
15432002-06-11 Akim Demaille <akim@epita.fr>
1544
1545 Have Bison grammars parsed by a Bison grammar.
1546
1547 * src/reader.c, src/reader.h (prologue_augment): New.
1548 * src/reader.c (copy_definition): Remove.
1549
1550 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
1551 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
1552 (grammar_current_rule_prec_set, grammar_current_rule_check)
1553 (grammar_current_rule_symbol_append)
1554 (grammar_current_rule_action_append): Export.
1555 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
1556 (symbol_list_action_append): Remove.
1557 Hook the routines from reader.
1558 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
1559 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
1560
1561 * src/reader.c (read_declarations): Remove, unused.
1562
1563 * src/parse-gram.y: Handle the epilogue.
1564 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
1565 (grammar_start_symbol_set): this.
1566 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
1567 * src/reader.c (readgram): Remove, unused.
1568 (reader): Adjust to insert eoftoken and axiom where appropriate.
1569
1570 * src/reader.c (copy_dollar): Replace with...
1571 * src/scan-gram.h (handle_dollar): this.
1572 * src/parse-gram.y: Remove `%thong'.
1573
1574 * src/reader.c (copy_at): Replace with...
1575 * src/scan-gram.h (handle_at): this.
1576
1577 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
1578 New.
1579
1580 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
1581 time being.
1582
1583 * src/reader.h, src/reader.c (grammar_rule_end): New.
1584
1585 * src/parse.y (current_type, current_class): New.
1586 Implement `%nterm', `%token' support.
1587 Merge `%term' into `%token'.
1588 (string_as_id): New.
1589 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
1590 type name.
1591
1592 * src/parse-gram.y: Be sure to handle properly the beginning of
1593 rules.
1594
1595 * src/parse-gram.y: Handle %type.
1596 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
1597
1598 * src/parse-gram.y: More directives support.
1599 * src/options.c: No longer handle source directives.
1600
1601 * src/parse-gram.y: Fix %output.
1602
1603 * src/parse-gram.y: Handle %union.
1604 Use the prologue locations.
1605 * src/reader.c (parse_union_decl): Remove.
1606
1607 * src/reader.h, src/reader.c (epilogue_set): New.
1608 * src/parse-gram.y: Use it.
1609
1610 * data/bison.simple, data/bison.c++: b4_stype is now either not
1611 defined, then default to int, or to the contents of %union,
1612 without `union' itself.
1613 Adjust.
1614 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
1615
1616 * src/output.c (actions_output): Don't output braces, as they are
1617 already handled by the scanner.
1618
1619 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
1620 characters to themselves.
1621
1622 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
1623 that the epilogue has a proper #line.
1624
1625 * src/parse-gram.y: Handle precedence/associativity.
1626
1627 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
1628 a terminal.
1629 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
1630 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
1631 at all to define terminals that cannot be emitted.
1632
1633 * src/scan-gram.l: Escape M4 characters.
1634
1635 * src/scan-gram.l: Working properly with escapes in user
1636 strings/characters.
1637
1638 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
1639 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
1640 grammar.
1641 Use more modest sizes, as for the time being the parser does not
1642 release memory, and therefore the process swallows a huge amount
1643 of memory.
1644
1645 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
1646 stricter %token grammar.
1647
1648 * src/symtab.h (associativity): Add `undef_assoc'.
1649 (symbol_precedence_set): Do nothing when passed an undef_assoc.
1650 * src/symtab.c (symbol_check_alias_consistence): Adjust.
1651
1652 * tests/regression.at (Invalid %directive): Remove, as it is now
1653 meaningless.
1654 (Invalid inputs): Adjust to the new error messages.
1655 (Token definitions): The new grammar doesn't allow too many
1656 eccentricities.
1657
1658 * src/lex.h, src/lex.c: Remove.
1659 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
1660 (copy_character, copy_string2, copy_string, copy_identifier)
1661 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
1662 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
1663 (parse_action): Remove.
1664 * po/POTFILES.in: Adjust.
1665
2e047461
AD
16662002-06-11 Akim Demaille <akim@epita.fr>
1667
1668 * src/reader.c (parse_action): Don't store directly into the
1669 rule's action member: return the action as a string.
1670 Don't require `rule_length' as an argument: compute it.
1671 (grammar_current_rule_symbol_append)
1672 (grammar_current_rule_action_append): New, eved out from
1673 (readgram): here.
1674 Remove `action_flag', `rulelength', unused now.
1675
9af3fbce
AD
16762002-06-11 Akim Demaille <akim@epita.fr>
1677
1678 * src/reader.c (grammar_current_rule_prec_set).
1679 (grammar_current_rule_check): New, eved out from...
1680 (readgram): here.
1681 Remove `xaction', `first_rhs': useless.
1682 * tests/input.at (Type clashes): New.
1683 * tests/existing.at (GNU Cim Grammar): Adjust.
1684
1485e106
AD
16852002-06-11 Akim Demaille <akim@epita.fr>
1686
1687 * src/reader.c (grammar_midrule_action): New, Eved out from
1688 (readgram): here.
1689
da4160c3
AD
16902002-06-11 Akim Demaille <akim@epita.fr>
1691
1692 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
1693 New.
1694 (readgram): Use them as replacement of inlined code, crule and
1695 crule1.
1696
f6d0f937
AD
16972002-06-11 Akim Demaille <akim@epita.fr>
1698
1699 * src/reader.c (grammar_end, grammar_symbol_append): New.
1700 (readgram): Use them.
1701 Make the use of `p' as local as possible.
1702
69078d4b
AD
17032002-06-10 Akim Demaille <akim@epita.fr>
1704
1705 GCJ's parser requires the tokens to be defined before the prologue.
1706
1707 * data/bison.simple: Output the token definition before the user's
1708 prologue.
1709 * tests/regression.at (Braces parsing, Duplicate string)
1710 (Mixing %token styles): Check the output from bison.
1711 (Early token definitions): New.
1712
5e424082
AD
17132002-06-10 Akim Demaille <akim@epita.fr>
1714
1715 * src/symtab.c (symbol_user_token_number_set): Don't complain when
1716 assigning twice the same user number to a token, so that we can
1717 use it in...
1718 * src/lex.c (lex): here.
1719 Also use `symbol_class_set' instead of hand written code.
1720 * src/reader.c (parse_assoc_decl): Likewise.
1721
44536b35
AD
17222002-06-10 Akim Demaille <akim@epita.fr>
1723
1724 * src/symtab.c, src/symtab.c (symbol_class_set)
1725 (symbol_user_token_number_set): New.
1726 * src/reader.c (parse_token_decl): Use them.
1727 Use a switch instead of ifs.
1728 Use a single argument.
1729
8b9f2372
AD
17302002-06-10 Akim Demaille <akim@epita.fr>
1731
1732 Remove `%thong' support as it is undocumented, unused, duplicates
1733 `%token's job, and creates useless e-mail traffic with people who
1734 want to know what it is, why it is undocumented, unused, and
1735 duplicates `%token's job.
1736
1737 * src/reader.c (parse_thong_decl): Remove.
1738 * src/options.c (option_table): Remove "thong".
1739 * src/lex.h (tok_thong): Remove.
1740
3ae2b51f
AD
17412002-06-10 Akim Demaille <akim@epita.fr>
1742
1743 * src/symtab.c, src/symtab.c (symbol_type_set)
1744 (symbol_precedence_set): New.
1745 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
1746 (value_components_used): Remove, unused.
1747
2f1afb73
AD
17482002-06-09 Akim Demaille <akim@epita.fr>
1749
1750 Move symbols handling code out of the reader.
1751
1752 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
1753 (axiom): Move to...
1754 * src/symtab.h, src/symtab.c: here.
1755
1756 * src/gram.c (start_symbol): Remove: use startsymbol->number.
1757 * src/reader.c (startval): Rename as...
1758 * src/symtab.h, src/symtab.c (startsymbol): this.
1759 * src/reader.c: Adjust.
1760
1761 * src/reader.c (symbol_check_defined, symbol_make_alias)
1762 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
1763 (token_translations_init)
1764 Move to...
1765 * src/symtab.c: here.
1766 * src/reader.c (packsymbols): Move to...
1767 * src/symtab.h, src/symtab.c (symbols_pack): here.
1768 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
1769 argument.
1770
e9bca3ad
AD
17712002-06-03 Akim Demaille <akim@epita.fr>
1772
1773 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
1774 then statements.
1775
86eff183
AD
17762002-06-03 Akim Demaille <akim@epita.fr>
1777
1778 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
1779 structs with non literals.
1780 * src/scan-skel.l: never-interactive.
1781 * src/conflicts.c (enum conflict_resolution_e): No trailing
1782 comma.
1783 * src/getargs.c (usage): Split long literal strings.
1784 Reported by Hans Aberg.
1785
717be197
AD
17862002-05-28 Akim Demaille <akim@epita.fr>
1787
1788 * data/bison.c++: Use C++ ostreams.
1789 (cdebug_): New member.
1790
670ddffd
AD
17912002-05-28 Akim Demaille <akim@epita.fr>
1792
1793 * src/output.c (output_skeleton): Be sure to allocate enough room
1794 for `/' _and_ for `\0' in full_skeleton.
1795
769b430f
AD
17962002-05-28 Akim Demaille <akim@epita.fr>
1797
1798 * data/bison.c++: Catch up with bison.simple:
1799 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1800 and Paul Eggert <eggert@twinsun.com>: `error' handing.
1801 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
1802 and popping traces.
1803
7067cb36
PH
18042002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1805
1806 * src/output.c (output_skeleton): Put an explicit path in front of
1807 the skeleton file name, rather than relying on the -I directory,
1808 to partially alleviate effects of having a skeleton file lying around
1809 in the current directory.
769b430f 1810
4a713ec2
PH
18112002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1812
769b430f 1813 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
1814 obstack_printf should be obstack_fgrow1.
1815
b408954b
AD
18162002-05-26 Akim Demaille <akim@epita.fr>
1817
1818 * src/state.h (state_t): `solved_conflicts' is a new member.
1819 * src/LR0.c (new_state): Set it to 0.
1820 * src/conflicts.h, src/conflicts.c (print_conflicts)
1821 (free_conflicts, solve_conflicts): Rename as...
1822 (conflicts_print, conflicts_free, conflicts_solve): these.
1823 Adjust callers.
1824 * src/conflicts.c (enum conflict_resolution_e)
1825 (solved_conflicts_obstack): New, used by...
1826 (log_resolution): this.
1827 Adjust to attach the conflict resolution to each state.
1828 Complete the description with the precedence/associativity
1829 information.
1830 (resolve_sr_conflict): Adjust.
1831 * src/print.c (print_state): Output its solved_conflicts.
1832 * tests/conflicts.at (Unresolved SR Conflicts)
1833 (Solved SR Conflicts): Exercise --report=all.
1834
a49aecd5
AD
18352002-05-26 Akim Demaille <akim@epita.fr>
1836
1837 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
1838 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1839 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
1840 (token_number_t, item_number_as_token_number)
1841 (token_number_as_item_number, muscle_insert_token_number_table):
1842 Rename as...
1843 (symbol_number_t, item_number_as_symbol_number)
1844 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
1845 these, since it is more appropriate.
1846
5504898e
AD
18472002-05-26 Akim Demaille <akim@epita.fr>
1848
1849 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
1850 `Error:' lines.
1851 * data/bison.simple (yystos) [YYDEBUG]: New.
1852 (yyparse) [YYDEBUG]: Display the symbols which are popped during
1853 error recovery.
1854 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
1855
ec3bc396
AD
18562002-05-25 Akim Demaille <akim@epita.fr>
1857
1858 * doc/bison.texinfo (Debugging): Split into...
1859 (Tracing): this new section, its former contents, and...
1860 (Understanding): this new section.
1861 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
1862 by...
1863 (report_flag): this.
1864 Adjust all dependencies.
1865 (report_args, report_types, report_argmatch): New.
1866 (usage, getargs): Report/support -r, --report.
1867 * src/options.h
1868 (struct option_table_struct): Rename as..,
1869 (struct option_table_s): this.
1870 Rename the `set_flag' member to `flag' to match with getopt_long's
1871 struct.
1872 * src/options.c (option_table): Split verbose into an entry for
1873 %verbose, and another for --verbose.
1874 Support --report/-r, so remove -r from the obsolete --raw.
1875 * src/print.c: Attach full item sets and lookaheads reports to
1876 report_flag instead of trace_flag.
1877 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
1878
78df8250
PE
18792002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1880 and Paul Eggert <eggert@twinsun.com>
769b430f 1881
78df8250
PE
1882 * data/bison.simple (yyparse): Correct error handling to conform to
1883 POSIX and yacc. Specifically, after syntax error is discovered,
1884 do not reduce further before shifting the error token.
1885 Clean up the code a bit by removing the labels yyerrdefault,
1886 yyerrhandle, yyerrpop.
1887 * NEWS: Document the above.
1888
c0c9ea05
PH
18892002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1890
1891 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
1892 type; it isn't always big enough, since it doesn't necessarily
1893 include non-terminals.
769b430f 1894 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
1895 the latter can be removed.
1896 (yy_token_number_type): Remove, only one use.
1897 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
1898 don't use TokenNumberType as element type.
769b430f 1899
c0c9ea05
PH
1900 * tests/regression.at: Modify expected output to agree with change
1901 to yyr1 and yytranslate.
769b430f 1902
6390a83f
FK
19032002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
1904
1905 * src/reader.c (parse_action): Use copy_character instead of
1906 obstack_1grow.
1907
db7c8e9a
AD
19082002-05-13 Akim Demaille <akim@epita.fr>
1909
1910 * tests/regression.at (Token definitions): Prototype yylex and
1911 yyerror.
1912
fcc61800
PH
19132002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1914
158c687b 1915 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
1916 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
1917 32-bit arithmetic.
1918 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
1919
5683e9b2
AD
19202002-05-07 Akim Demaille <akim@epita.fr>
1921
1922 * tests/synclines.at: Be sure to prototype yylex and yyerror to
1923 avoid GCC warnings.
1924
0c2d3f4c
AD
19252002-05-07 Akim Demaille <akim@epita.fr>
1926
1927 Kill GCC warnings.
1928
1929 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
1930 over the RHS of each rule.
1931 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
1932 * src/state.h (state_t): Member `nitems' is unsigned short.
1933 * src/LR0.c (get_state): Adjust.
1934 * src/reader.c (packgram): Likewise.
1935 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
1936 `Type'.
1937 (muscle_insert_int_table): Remove, unused.
1938 (prepare_rules): Remove `max'.
1939
1565b720
AD
19402002-05-06 Akim Demaille <akim@epita.fr>
1941
1942 * src/closure.c (print_firsts): Display of the symbol tags.
1943 (bitmatrix_print): Move to...
1944 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
1945 here.
1946 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
1947
cfaee611
AD
19482002-05-06 Akim Demaille <akim@epita.fr>
1949
1950 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
1951 hash_do_for_each.
1952
458be8e0
AD
19532002-05-06 Akim Demaille <akim@epita.fr>
1954
1955 * src/LR0.c (new_state, get_state): Instead of using the global
1956 `kernel_size' and `kernel_base', have two new arguments:
1957 `core_size' and `core'.
1958 Adjust callers.
1959
a900a624
AD
19602002-05-06 Akim Demaille <akim@epita.fr>
1961
1962 * src/reader.c (packgram): No longer end `ritem' with a 0
1963 sentinel: it is not used.
1964
d4e7d3a1
AD
19652002-05-05 Akim Demaille <akim@epita.fr>
1966
1967 New experimental feature: display the lookaheads in the report and
1968 graph.
1969
1970 * src/print (print_core): When --trace-flag, display the rules
1971 lookaheads.
1972 * src/print_graph.c (print_core): Likewise.
1973 Swap the arguments.
1974 Adjust caller.
1975
39ceb25b
AD
19762002-05-05 Akim Demaille <akim@epita.fr>
1977
1978 * tests/torture.at (Many lookaheads): New test.
1979
5372019f
AD
19802002-05-05 Akim Demaille <akim@epita.fr>
1981
1982 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
1983 (GENERATE_MUSCLE_INSERT_TABLE): this.
1984 (output_int_table, output_unsigned_int_table, output_short_table)
1985 (output_token_number_table, output_item_number_table): Replace with...
1986 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
1987 (muscle_insert_short_table, muscle_insert_token_number_table)
1988 (muscle_insert_item_number_table): these.
1989 Adjust all callers.
1990 (prepare_tokens): Don't free `translations', since...
1991 * src/reader.h, src/reader.c (grammar_free): do it.
1992 Move to...
1993 * src/gram.h, src/gram.c (grammar_free): here.
1994 * data/bison.simple, data/bison.c++: b4_token_number_max is now
1995 b4_translate_max.
1996
5df5f6d5
AD
19972002-05-05 Akim Demaille <akim@epita.fr>
1998
1999 * src/output.c (output_unsigned_int_table): New.
2000 (prepare_rules): `i' is unsigned.
2001 `prhs', `rline', `r2' are unsigned int.
2002 Rename muscle `rhs_number_max' as `rhs_max'.
2003 Output muscles `prhs_max', `rline_max', and `r2_max'.
2004 Free rline and r1.
2005 * data/bison.simple, data/bison.c++: Adjust to use these muscles
2006 to compute types instead of constant types.
2007 * tests/regression.at (Web2c Actions): Adjust.
2008
b87f8b21
AD
20092002-05-04 Akim Demaille <akim@epita.fr>
2010
2011 * src/symtab.h (SALIAS, SUNDEF): Rename as...
2012 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
2013 Adjust dependencies.
2014 * src/output.c (token_definitions_output): Be sure not to output a
2015 `#define 'a'' when fed with `%token 'a' "a"'.
2016 * tests/regression.at (Token definitions): New.
2017
8bb936e4
PE
20182002-05-03 Paul Eggert <eggert@twinsun.com>
2019
2020 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2021 for K&R C.
2022
20232002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2024
2025 * Makefile.am (SUBDIRS): Remove intl.
2026 (EXTRA_DIST): Add config/config.rpath.
2027
53c71a12
AD
20282002-05-03 Akim Demaille <akim@epita.fr>
2029
2030 * data/bison.simple (m4_if): Don't output empty enums.
2031 And actually, output valid enum definitions :(.
2032
289dd0cf
AD
20332002-05-03 Akim Demaille <akim@epita.fr>
2034
2035 * configure.bat: Remove, completely obsolete.
2036 * Makefile.am (EXTRA_DIST): Adjust.
2037 Don't distribute config.rpath...
2038 * config/Makefile.am (EXTRA_DIST): Do it.
2039
db85e524
AD
20402002-05-03 Akim Demaille <akim@epita.fr>
2041
2042 * configure.in (GETTEXT_VERSION): New.
2043 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
2044
83ccf991
AD
20452002-05-03 Akim Demaille <akim@epita.fr>
2046
2047 * data/bison.simple (b4_token_enum): New.
2048 (b4_token_defines): Use it to output tokens both as #define and
2049 enums.
2050 Suggested by Paul Eggert.
2051 * src/output.c (token_definitions_output): Don't output spurious
2052 white spaces.
2053
1f418995
AD
20542002-05-03 Akim Demaille <akim@epita.fr>
2055
2056 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2057
45119f04
RA
20582002-05-02 Robert Anisko <robert@lrde.epita.fr>
2059
2060 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
2061 Update the stack class, give a try to deque as the default container.
2062
b2d52318
AD
20632002-05-02 Akim Demaille <akim@epita.fr>
2064
2065 * data/bison.simple (yyparse): Do not implement @$ = @1.
2066 (YYLLOC_DEFAULT): Adjust to do it.
2067 * doc/bison.texinfo (Location Default Action): Fix.
2068
3a8b4109
AD
20692002-05-02 Akim Demaille <akim@epita.fr>
2070
2071 * src/reader.c (parse_braces): Merge into...
2072 (parse_action): this.
2073
84614e13
AD
20742002-05-02 Akim Demaille <akim@epita.fr>
2075
2076 * configure.in (ALL_LINGUAS): Remove.
2077 * po/LINGUAS, hr.po: New.
2078
fdbcd8e2
AD
20792002-05-02 Akim Demaille <akim@epita.fr>
2080
2081 Remove the so called hairy (semantic) parsers.
2082
2083 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
2084 * src/gram.h, src/gram.c (semantic_parser): Remove.
2085 (rule_t): Remove the guard and guard_line members.
2086 * src/lex.h (token_t): remove tok_guard.
2087 * src/options.c (option_table): Remove %guard and %semantic_parser
2088 support.
2089 * src/output.c, src/output.h (guards_output): Remove.
2090 (prepare): Adjust.
2091 (token_definitions_output): Don't output the `T'
2092 tokens (???).
2093 (output_skeleton): Don't output the guards.
2094 * src/files.c, src/files.c (attrsfile): Remove.
2095 * src/reader.c (symbol_list): Remove the guard and guard_line
2096 members.
2097 Adjust dependencies.
2098 (parse_guard): Remove.
2099 * data/bison.hairy: Remove.
2100 * doc/bison.texinfo (Environment Variables): Remove occurrences of
2101 BISON_HAIRY.
2102
82b6cb3f
AD
21032002-05-02 Akim Demaille <akim@epita.fr>
2104
2105 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
2106 (parse_guard): Rename the formal argument `stack_offset' as
2107 `rule_length', which is more readable.
2108 Adjust callers.
2109 (copy_at, copy_dollar): Instead of outputting the hard coded
2110 values of $$, $n and so forth, output invocation to b4_lhs_value,
2111 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
2112 Note: this patch partially drops `semantic-parser' support: it
2113 always does `rule_length - n', where semantic parsers ought to
2114 always use `-n'.
82b6cb3f
AD
2115 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2116 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2117
6cbfbcc5
AD
21182002-05-02 Akim Demaille <akim@epita.fr>
2119
2120 * configure.in (AC_INIT): Bump to 1.49b.
2121 (AM_INIT_AUTOMAKE): Short invocation.
2122
b8548114
AD
21232002-05-02 Akim Demaille <akim@epita.fr>
2124
2125 Version 1.49a.
2126
c20cd1fa
AD
21272002-05-01 Akim Demaille <akim@epita.fr>
2128
2129 * src/skeleton.h: Remove.
2130
8a9566d4
AD
21312002-05-01 Akim Demaille <akim@epita.fr>
2132
2133 * src/skeleton.h: Fix the #endif.
2134 Reported by Magnus Fromreide.
2135
8c6d399a
PE
21362002-04-26 Paul Eggert <eggert@twinsun.com>
2137
2138 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
2139 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 2140 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 2141
2b7ed18a
RA
21422002-04-25 Robert Anisko <robert@lrde.epita.fr>
2143
2144 * src/scan-skel.l: Postprocess quadrigraphs.
2145
2146 * src/reader.c (copy_character): New function, used to output
2147 single characters while replacing `[' and `]' with quadrigraphs, to
2148 avoid troubles with M4 quotes.
2149 (copy_comment): Output characters with copy_character.
2150 (read_additionnal_code): Likewise.
2151 (copy_string2): Likewise.
2152 (copy_definition): Likewise.
2153
2154 * tests/calc.at: Exercise M4 quoting.
2155
34a89c50
AD
21562002-04-25 Akim Demaille <akim@epita.fr>
2157
2158 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
2159 between `!' and the command.
2160 Reported by Paul Eggert.
2161
0dd1580a
RA
21622002-04-24 Robert Anisko <robert@lrde.epita.fr>
2163
2164 * tests/calc.at: Exercise prologue splitting.
2165
2166 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
2167 `b4_post_prologue' instead of `b4_prologue'.
2168
2169 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
2170 muscles.
2171 (output): Free pre_prologue_obstack and post_prologue_obstack.
2172 * src/files.h, src/files.c (attrs_obstack): Remove.
2173 (pre_prologue_obstack, post_prologue_obstack): New.
2174 * src/reader.c (copy_definition): Add a parameter to specify the
2175 obstack to fill, instead of using attrs_obstack unconditionally.
2176 (read_declarations): Pass pre_prologue_obstack to copy_definition if
2177 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
2178
83c1796f
PE
21792002-04-23 Paul Eggert <eggert@twinsun.com>
2180
2181 * data/bison.simple: Remove unnecessary commentary and white
2182 space differences from 1_29-branch.
2183 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
2184
2185 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
2186 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
2187 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
2188 constructors or destructors.
2189
2190 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
2191
1207eeac
AD
21922002-04-23 Akim Demaille <akim@epita.fr>
2193
2194 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
2195 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
2196 location with columns.
2197 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
2198 All reported by Paul Eggert.
2199
78ab8f67
AD
22002002-04-22 Akim Demaille <akim@epita.fr>
2201
2202 * src/reduce.c (dump_grammar): Move to...
2203 * src/gram.h, src/gram.c (grammar_dump): here.
2204 Be sure to separate long item numbers.
2205 Don't read the members of a rule's prec if its nil.
2206
133c20e2
AD
22072002-04-22 Akim Demaille <akim@epita.fr>
2208
2209 * src/output.c (table_size, table_grow): New.
2210 (MAXTABLE): Remove, replace uses with table_size.
2211 (pack_vector): Instead of dying when the table is too big, grow it.
2212
9515e8a7
AD
22132002-04-22 Akim Demaille <akim@epita.fr>
2214
2215 * data/bison.simple (yyr1): Its type is that of a token number.
2216 * data/bison.c++ (r1_): Likewise.
2217 * tests/regression.at (Web2c Actions): Adjust.
2218
23c5a174
AD
22192002-04-22 Akim Demaille <akim@epita.fr>
2220
2221 * src/reader.c (token_translations_init): 256 is now the default
2222 value for the error token, i.e., it will be assigned another
2223 number if the user assigned 256 to one of her tokens.
2224 (reader): Don't force 256 to error.
2225 * doc/bison.texinfo (Symbols): Adjust.
2226 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
2227 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
2228 etc. instead of 10, 20, 30 (which was used to `jump' over error
2229 (256) and undefined (2)).
2230
5fbb0954
AD
22312002-04-22 Akim Demaille <akim@epita.fr>
2232
2233 Propagate more token_number_t.
2234
2235 * src/gram.h (token_number_as_item_number)
2236 (item_number_as_token_number): New.
2237 * src/output.c (GENERATE_OUTPUT_TABLE): New.
2238 Use it to create output_item_number_table and
2239 output_token_number_table.
2240 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2241 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
2242 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
2243 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
2244
4f940944
AD
22452002-04-22 Akim Demaille <akim@epita.fr>
2246
2247 * src/output.h, src/output.c (get_lines_number): Remove.
2248
3ded9a63
AD
22492002-04-19 Akim Demaille <akim@epita.fr>
2250
2251 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
2252 as Lex/Flex'.
2253 (Debugging): More details about enabling the debugging features.
2254 (Table of Symbols): Describe $$, $n, @$, and @n.
2255 Suggested by Tim Josling.
2256
e0c471a9
AD
22572002-04-19 Akim Demaille <akim@epita.fr>
2258
2259 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
2260
fecc10cd
AD
22612002-04-10 Akim Demaille <akim@epita.fr>
2262
2263 * src/system.h: Rely on HAVE_LIMITS_H.
2264 Suggested by Paul Eggert.
2265
51dec47b
AD
22662002-04-09 Akim Demaille <akim@epita.fr>
2267
2268 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
2269 full stderr, and strip it according to the bison options, instead
2270 of composing the error message from different bits.
2271 This makes it easier to check for several error messages.
2272 Adjust all the invocations.
2273 Add an invocation exercising the error token.
2274 Add an invocation demonstrating a stupid error message.
2275 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
2276 Adjust the tests.
2277 Error message are for stderr, not stdout.
2278
007a50a4
AD
22792002-04-09 Akim Demaille <akim@epita.fr>
2280
2281 * src/gram.h, src/gram.c (error_token_number): Remove, use
2282 errtoken->number.
2283 * src/reader.c (reader): Don't specify the user token number (2)
2284 for $undefined, as it uselessly prevents using it.
2285 * src/gram.h (token_number_t): Move to...
2286 * src/symtab.h: here.
2287 (state_t.number): Is a token_number_t.
2288 * src/print.c, src/reader.c: Use undeftoken->number instead of
2289 hard coded 2.
2290 (Even though this 2 is not the same as above: the number of the
2291 undeftoken remains being 2, it is its user token number which
2292 might not be 2).
2293 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
2294 `user_token_number_max'.
2295 Output `undef_token_number'.
2296 * data/bison.simple, data/bison.c++: Use them.
2297 Be sure to map invalid yylex return values to
2298 `undef_token_number'. This saves us from gratuitous SEGV.
2299
2300 * tests/conflicts.at (Solved SR Conflicts)
2301 (Unresolved SR Conflicts): Adjust.
2302 * tests/regression.at (Web2c Actions): Adjust.
2303
06446ccf
AD
23042002-04-08 Akim Demaille <akim@epita.fr>
2305
2306 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
2307 Adding #line.
2308 Remove the duplicate `typedefs'.
2309 (RhsNumberType): Fix the declaration and various other typos.
2310 Use __ofile__.
2311 * data/bison.simple: Use __ofile__.
2312 * src/scan-skel.l: Handle __ofile__.
2313
62a3e4f0
AD
23142002-04-08 Akim Demaille <akim@epita.fr>
2315
2316 * src/gram.h (item_number_t): New, the type of item numbers in
2317 RITEM. Note that it must be able to code symbol numbers as
2318 positive number, and the negation of rule numbers as negative
2319 numbers.
2320 Adjust all dependencies (pretty many).
2321 * src/reduce.c (rule): Remove this `short *' pointer: use
2322 item_number_t.
2323 * src/system.h (MINSHORT, MAXSHORT): Remove.
2324 Include `limits.h'.
2325 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
2326 (shortcpy): Remove.
2327 (MAXTABLE): Move to...
2328 * src/output.c (MAXTABLE): here.
2329 (prepare_rules): Use output_int_table to output rhs.
2330 * data/bison.simple, data/bison.c++: Adjust.
2331 * tests/torture.at (Big triangle): Move the limit from 254 to
2332 500.
2333 * tests/regression.at (Web2c Actions): Ajust.
2334
2335 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
2336 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
2337 passes, but produces negative #line number, once fixed, GCC is
2338 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
2339 C), it passes.
2340 * src/state.h (state_h): Code input lines on ints, not shorts.
2341
bb88b0fc
AD
23422002-04-08 Akim Demaille <akim@epita.fr>
2343
2344 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
2345 and then the grammar.
2346
9a636f47
AD
23472002-04-08 Akim Demaille <akim@epita.fr>
2348
2349 * src/system.h: No longer using strndup.
2350
680e8701
AD
23512002-04-07 Akim Demaille <akim@epita.fr>
2352
2353 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
2354 * src/output.c (output_table_data): Return the longest number.
2355 (prepare_tokens): Output `token_number_max').
2356 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
2357 New.
2358 Use them to define yy_token_number_type/TokenNumberType.
2359 Use this type for yytranslate.
2360 * tests/torture.at (Big triangle): Push the limit from 124 to
2361 253.
2362 * tests/regression.at (Web2c Actions): Adjust.
2363
817e9f41
AD
23642002-04-07 Akim Demaille <akim@epita.fr>
2365
2366 * tests/torture.at (Big triangle): New.
2367 (GNU AWK Grammar, GNU Cim Grammar): Move to...
2368 * tests/existing.at: here.
2369
5123689b
AD
23702002-04-07 Akim Demaille <akim@epita.fr>
2371
2372 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
2373 nritems.
2374 Adjust dependencies.
2375
f3849179
AD
23762002-04-07 Akim Demaille <akim@epita.fr>
2377
2378 * src/reader.c: Normalize increments to prefix form.
2379
bd02036a
AD
23802002-04-07 Akim Demaille <akim@epita.fr>
2381
2382 * src/reader.c, symtab.c: Remove debugging code.
2383
db8837cb
AD
23842002-04-07 Akim Demaille <akim@epita.fr>
2385
2386 Rename all the `bucket's as `symbol_t'.
2387
2388 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
2389 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
2390 * src/symtab.c, src/symtab.h (bucket): Rename as...
2391 (symbol_t): this.
2392 (symbol_list_new, bucket_check_defined, bucket_make_alias)
2393 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
2394 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2395 (buckets_new, buckets_free, buckets_do): Rename as...
2396 (symbol_list_new, symbol_check_defined, symbol_make_alias)
2397 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2398 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
2399 (symbols_new, symbols_free, symbols_do): these.
2400
72a23c97
AD
24012002-04-07 Akim Demaille <akim@epita.fr>
2402
2403 Use lib/hash for the symbol table.
2404
2405 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
2406 EOF.
2407 * src/lex.c (lex): Set the `number' member of new terminals.
2408 * src/reader.c (bucket_check_defined, bucket_make_alias)
2409 (bucket_check_alias_consistence, bucket_translation): New.
2410 (reader, grammar_free, readgram, token_translations_init)
2411 (packsymbols): Adjust.
2412 (reader): Number the predefined tokens.
2413 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
2414 for predefined tokens.
2415 * src/symtab.h (bucket): Remove all the hash table related
2416 members.
2417 * src/symtab.c (symtab): Replace by...
2418 (bucket_table): this.
2419 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2420 (buckets_new, buckets_do): New.
2421
280a38c3
AD
24222002-04-07 Akim Demaille <akim@epita.fr>
2423
2424 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
2425 (start_symbol, max_user_token_number, semantic_parser)
2426 (error_token_number): Initialize.
2427 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
2428 Initialize.
2429 (reader): Don't.
2430 (errtoken, eoftoken, undeftoken, axiom): Extern.
2431
03b31c0c
AD
24322002-04-07 Akim Demaille <akim@epita.fr>
2433
2434 * src/gram.h (rule_s): prec and precsym are now pointers
2435 to the bucket giving the priority/associativity.
2436 Member `associativity' removed: useless.
2437 * src/reduce.c, src/conflicts.c: Adjust.
2438
8b3df748
AD
24392002-04-07 Akim Demaille <akim@epita.fr>
2440
2441 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
2442 Properly escape the symbols' TAG when outputting them.
2443
e601aa1d
AD
24442002-04-07 Akim Demaille <akim@epita.fr>
2445
2446 * src/lalr.h (LA): Is a bitsetv, not bitset*.
2447
b0299a2e
AD
24482002-04-07 Akim Demaille <akim@epita.fr>
2449
2450 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
2451 (LArule): this, which is an array to rule_t*.
2452 * src/print.c, src/conflicts.c: Adjust.
2453
d7e1f00c
AD
24542002-04-07 Akim Demaille <akim@epita.fr>
2455
2456 * src/gram.h (rule_t): Rename `number' as `user_number'.
2457 `number' is a new member.
2458 Adjust dependencies.
2459 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
2460
cc9305dd
AD
24612002-04-07 Akim Demaille <akim@epita.fr>
2462
2463 As a result of the previous patch, it is no longer needed
2464 to reorder ritem itself.
2465
2466 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
2467
b0940840
AD
24682002-04-07 Akim Demaille <akim@epita.fr>
2469
2470 Be sure never to walk through RITEMS, but use only data related to
2471 the rules themselves. RITEMS should be banished.
2472
2473 * src/output.c (output_token_translations): Rename as...
2474 (prepare_tokens): this.
2475 In addition to `translate', prepare the muscles `tname' and
2476 `toknum', which were handled by...
2477 (output_rule_data): this.
2478 Remove, and move the remainder of its outputs into...
2479 (prepare_rules): this new routines, which also merges content from
2480 (output_gram): this.
2481 (prepare_rules): Be sure never to walk through RITEMS.
2482 (output_stos): Rename as...
2483 (prepare_stos): this.
2484 (output): Always invoke prepare_states, after all, just don't use it
2485 in the output if you don't need it.
2486
643a5994
AD
24872002-04-07 Akim Demaille <akim@epita.fr>
2488
2489 * src/LR0.c (new_state): Display `nstates' as the name of the
2490 newly created state.
2491 Adjust to initialize first_state and last_state if needed.
2492 Be sure to distinguish the initial from the final state.
2493 (new_states): Create the itemset of the initial state, and use
2494 new_state.
2495 * src/closure.c (closure): Now that the initial state has its
2496 items properly set, there is no need for a special case when
2497 creating `ruleset'.
2498
2499 As a result, now the rule 0, reducing to $axiom, is visible in the
2500 outputs. Adjust the test suite.
2501
2502 * tests/conflicts.at (Solved SR Conflicts)
2503 (Unresolved SR Conflicts): Adjust.
2504 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
2505 * tests/conflicts.at (S/R in initial): New.
2506
b4c4ccc2
AD
25072002-04-07 Akim Demaille <akim@epita.fr>
2508
2509 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
2510 the RHS of the rules.
2511 * src/output.c (output_gram): Likewise.
2512
bba97eb2
AD
25132002-04-07 Akim Demaille <akim@epita.fr>
2514
2515 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
2516 bucket.
2517 Adjust all dependencies.
2518 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
2519 `number' of the buckets too.
2520 * src/gram.h: Include `symtab.h'.
2521 (associativity): Move to...
2522 * src/symtab.h: here.
2523 No longer include `gram.h'.
2524
c3b407f4
AD
25252002-04-07 Akim Demaille <akim@epita.fr>
2526
2527 * src/gram.h, src/gram.c (rules_rhs_length): New.
2528 (ritem_longest_rhs): Use it.
2529 * src/gram.h (rule_t): `number' is a new member.
2530 * src/reader.c (packgram): Set it.
2531 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
2532 the end of `rules', and count them out of `nrules'.
2533 (reduce_output, dump_grammar): Adjust.
2534 * src/print.c (print_grammar): It is no longer needed to check for
2535 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
2536 * tests/reduce.at (Reduced Automaton): New test.
2537
11652ab3
AD
25382002-04-07 Akim Demaille <akim@epita.fr>
2539
2540 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
2541 lacking `+ 1' to nrules, Bison reported as useless a token if it
2542 was used solely to set the precedence of the last rule...
2543
26b23c1a
AD
25442002-04-07 Akim Demaille <akim@epita.fr>
2545
2546 * data/bison.c++, data/bison.simple: Don't output the current file
2547 name in #line, to avoid useless diffs between two identical
2548 outputs under different names.
2549
18bcecb0
AD
25502002-04-07 Akim Demaille <akim@epita.fr>
2551
2552 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
2553 Normalize loops to using `< nrules + 1', not `<= nrules'.
2554
fa770c86
AD
25552002-04-07 Akim Demaille <akim@epita.fr>
2556
2557 * TODO: Update.
2558
d9b739c3
AD
25592002-04-07 Akim Demaille <akim@epita.fr>
2560
2561 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
2562 bucket.value as bucket.number.
2563
99013900
AD
25642002-04-07 Akim Demaille <akim@epita.fr>
2565
2566 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
2567 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2568 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
2569 RHS, instead of being an index in RITEMS.
2570
e966383b
PE
25712002-04-04 Paul Eggert <eggert@twinsun.com>
2572
2573 * doc/bison.texinfo: Update copyright date.
2574 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
2575 (Symbols): Warn about running Bison in one character set,
2576 but compiling and/or running in an incompatible one.
2577 Warn about character code 256, too.
2578
25792002-04-03 Paul Eggert <eggert@twinsun.com>
2580
2581 * src/bison.data (YYSTACK_ALLOC): Depend on whether
2582 YYERROR_VERBOSE is nonzero, not whether it is defined.
2583
2584 Merge changes from bison-1_29-branch.
c307773e 2585
8d6c48b9
PE
25862002-03-20 Paul Eggert <eggert@twinsun.com>
2587
2588 Merge fixes from Debian bison_1.34-1.diff.
2589
2590 * configure.in (AC_PREREQ): 2.53.
2591
e53c6322
AD
25922002-03-20 Akim Demaille <akim@epita.fr>
2593
2594 * src/conflicts.c (log_resolution): Argument `resolution' is const.
2595
9ffbeca7
PE
25962002-03-19 Paul Eggert <eggert@twinsun.com>
2597
21db0b2a
PE
2598 * src/bison.simple (YYCOPY): New macro.
2599 (YYSTACK_RELOCATE): Use it.
2600 Remove Type arg; no longer needed. All callers changed.
2601 (yymemcpy): Remove; no longer needed.
2602
9ffbeca7
PE
2603 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
2604 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2605
642cb8f8
AD
26062002-03-19 Akim Demaille <akim@epita.fr>
2607
2608 Test and fix the #line outputs.
2609
2610 * tests/atlocal.at (GCC): New.
2611 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
2612 (Prologue synch line, ,%union synch line, Postprologue synch line)
2613 (Action synch line, Epilogue synch line): New tests.
2614 * src/reader.c (parse_union_decl): Define the muscle stype_line.
2615 * data/bison.simple, data/bison.c++: Use it.
2616
3c31a486
AD
26172002-03-19 Akim Demaille <akim@epita.fr>
2618
2619 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
2620 (Solved SR Conflicts, %expect not enough, %expect right)
2621 (%expect too much): Move to...
2622 * tests/conflicts.at: this new file.
2623
0d8bed56
AD
26242002-03-19 Akim Demaille <akim@epita.fr>
2625
2626 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2627 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
2628 that we can move to enums for instance.
2629 * src/output.c (token_definitions_output): Output a list of
2630 `token-name, token-number' instead of the #define.
2631 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
2632
9208d17f
AD
26332002-03-14 Akim Demaille <akim@epita.fr>
2634
2635 Use Gettext 0.11.1.
2636
af27eacb
RA
26372002-03-09 Robert Anisko <robert@lrde.epita.fr>
2638
2639 * data/bison.c++: Make the user able to add members to the generated
2640 parser by subclassing.
2641
9101a310
RA
26422002-03-05 Robert Anisko <robert@lrde.epita.fr>
2643
2644 * src/reader.c (read_additionnal_code): `c' should be an integer, not
2645 a character.
2646 Reported by Nicolas Tisserand and Nicolas Burrus.
2647
fff9bf0b
RA
26482002-03-04 Robert Anisko <robert@lrde.epita.fr>
2649
2650 * src/reader.c: Warn about lacking semi-colons, do not complain.
2651
64dba31e
RA
26522002-03-04 Robert Anisko <robert@lrde.epita.fr>
2653
2654 * data/bison.c++: Remove a debug line.
2655
374f5a14
RA
26562002-03-04 Robert Anisko <robert@lrde.epita.fr>
2657
2658 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
2659 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
2660 provide a default implementation.
2661
bfcf1f3a
AD
26622002-03-04 Akim Demaille <akim@epita.fr>
2663
2664 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
2665 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
2666 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
2667 * tests/semantic.at (Parsing Guards): Similarly.
2668 * src/reader.at (readgram): Complain if the last rule is not ended
2669 with a semi-colon.
2670
65ccf9fc
AD
26712002-03-04 Akim Demaille <akim@epita.fr>
2672
2673 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
2674 * src/closure.c: here.
2675 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
2676 RTC.
2677 * src/warshall.h, src/warshall.c: Remove.
2678 * tests/sets.at (Broken Closure): Adjust.
2679
d0039cbc
AD
26802002-03-04 Akim Demaille <akim@epita.fr>
2681
2682 * src/output.c (output_skeleton): tempdir is const.
2683 bytes_read is unused.
2684
345cea78
AD
26852002-03-04 Akim Demaille <akim@epita.fr>
2686
2687 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
2688 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
2689 Update.
2690 From Michael Hayes.
2691
564801f7
AD
26922002-03-04 Akim Demaille <akim@epita.fr>
2693
2694 * src/closure.c (closure): `r' is unused.
2695
e5352bc7
AD
26962002-03-04 Akim Demaille <akim@epita.fr>
2697
2698 * tests/sets.at (Broken Closure): Add the ending `;'.
2699 * src/reader.at (readgram): Complain if a rule is not ended with a
2700 semi-colon.
2701
914feea9
AD
27022002-03-04 Akim Demaille <akim@epita.fr>
2703
2704 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
2705 (count_sr_conflicts): Use bitset_count.
2706 * src/reduce.c (inaccessable_symbols): Ditto.
2707 (bits_size): Remove.
2708 * src/warshall.h, src/warshall.c: Convert to bitsetv.
2709
f0250de6
AD
27102002-03-04 Akim Demaille <akim@epita.fr>
2711
2712 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
2713 * src/reduce.c: Remove the `bitset_zero's following the
2714 `bitset_create's, as now it is performed by the latter.
2715
ef017502
AD
27162002-03-04 Akim Demaille <akim@epita.fr>
2717
2718 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
2719 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
2720 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
2721 latest sources from Michael.
2722
76514394
AD
27232002-03-04 Akim Demaille <akim@epita.fr>
2724
2725 * src/output.c (output): Don't free the grammar.
2726 * src/reader.c (grammar_free): New.
2727 * src/main.c (main): Call it and don't free symtab here.
2728
55024580
AD
27292002-03-04 Akim Demaille <akim@epita.fr>
2730
2731 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
2732 before returning.
2733 Reported by Benoit Perrot.
2734
f9abaa2c
AD
27352002-03-04 Akim Demaille <akim@epita.fr>
2736
2737 Use bitset operations when possible, not loops over bits.
2738
2739 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
2740 bitset_or.
2741 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
2742 * src/reduce.c (useless_nonterminals): Formatting changes.
2743 * src/warshall.c (TC): Use bitset_or.
2744
0e721e75
AD
27452002-03-04 Akim Demaille <akim@epita.fr>
2746
2747 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
2748 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
2749 Ditto.
2750
0fb1ffb1
AD
27512002-03-04 Akim Demaille <akim@epita.fr>
2752
2753 * src/lalr.c (F): Now a bitset*.
2754 Adjust all dependencies.
2755
b86796bf
AD
27562002-03-04 Akim Demaille <akim@epita.fr>
2757
2758 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
2759 Adjust all dependencies.
2760
602bbf31
AD
27612002-03-04 Akim Demaille <akim@epita.fr>
2762
2763 * src/L0.c, src/LR0.h (nstates): Be size_t.
2764 Adjust comparisons (signed vs unsigned).
2765 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
2766 bitset*.
2767 Adjust all dependencies.
2768
d8a0245c
AD
27692002-03-04 Akim Demaille <akim@epita.fr>
2770
2771 * src/closure.c (firsts): Now, also a bitset.
2772 Adjust all dependencies.
2773 (varsetsize): Remove, now unused.
2774 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
2775
34ba9743
AD
27762002-03-04 Akim Demaille <akim@epita.fr>
2777
2778 * src/print.c: Convert to use bitset.h, not hand coded iterations
2779 over ints.
2780
ed86e78c
AD
27812002-03-04 Akim Demaille <akim@epita.fr>
2782
2783 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
2784
dfdb1797
AD
27852002-03-04 Akim Demaille <akim@epita.fr>
2786
2787 * src/closure.c (ruleset): Be a bitset.
2788 (rulesetsize): Remove.
2789
7086e707
AD
27902002-03-04 Akim Demaille <akim@epita.fr>
2791
2792 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
2793 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
2794 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
2795 * src/closure.c (fderives): Be an array of bitsets.
2796
98254360
RA
27972002-02-28 Robert Anisko <robert@lrde.epita.fr>
2798
2799 * data/bison.c++: Merge the two generated headers. Insert a copyright
2800 notice in each output file.
2801
a75c057f
AD
28022002-02-28 Akim Demaille <akim@epita.fr>
2803
2804 * data/bison.c++: Copy the prologue of bison.simple to fetch
2805 useful M4 definitions, such as b4_header_guard.
2806
06b00abc
AD
28072002-02-25 Akim Demaille <akim@epita.fr>
2808
2809 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
2810 translator friendly scheme for the bgr
2811 copyright notice.
06b00abc 2812
70e7d534
AD
28132002-02-25 Akim Demaille <akim@epita.fr>
2814
2815 * src/output.c (header_output): Remove, now handled completely via
2816 M4.
2817
abe017f6
AD
28182002-02-25 Akim Demaille <akim@epita.fr>
2819
2820 * m4/m4.m4: New, from CVS Autoconf.
2821 * configure.in: Invoke it.
2822 * src/output.c (output_skeleton): Use its result instead of the
2823 hard coded name.
2824
381fb12e
AD
28252002-02-25 Akim Demaille <akim@epita.fr>
2826
2827 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
2828 Fileutils 4.1.5.
2829 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
2830 * src/output.c (output_skeleton): Use mkstemp to create a real
2831 temporary file.
2832 Move the filling of `skeleton' and its muscle to...
2833 (prepare): here.
2834 (output): Move the definition of the prologue muscle to...
2835 (prepare): here.
2836 * src/system.h (DEFAULT_TMPDIR): New.
2837
6f38107f
PE
28382002-02-14 Paul Eggert <eggert@twinsun.com>
2839
2840 Remove the support for C++ namespace cleanliness; it was
2841 causing more problems than it was curing, since it didn't work
2842 properly on some nonstandard C++ compilers. This can wait
2843 for a proper C++ parser.
2844
2845 * NEWS: Document this.
2846 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
2847 of C++, as it's treated like C now.
2848 * src/bison.simple (YYSTD): Remove.
2849 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
2850 Treat C++ just like Standard C instead of trying to support
2851 namespace cleanliness.
2852
80cce3da
AD
28532002-02-14 Akim Demaille <akim@epita.fr>
2854
2855 * tests/regression.at (else): Adjust to Andreas' change.
2856
842e8679
AD
28572002-02-14 Akim Demaille <akim@epita.fr>
2858
2859 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
2860
4bda3f10
AD
28612002-02-13 Andreas Schwab <schwab@suse.de>
2862
2863 * src/output.c (output_rule_data): Don't output NULL, it might
2864 not be defined yet.
2865
4162fa07 28662002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 2867
4162fa07
RA
2868 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
2869 (Copyright notice): Update.
b418ecd8 2870
bd16a5dc
AD
28712002-02-11 Akim Demaille <akim@epita.fr>
2872
2873 * tests/regression.at (%nonassoc and eof): Don't include
2874 nonportable headers.
2875
8d69a1a3
RA
28762002-02-08 Robert Anisko <robert@lrde.epita.fr>
2877
2878 * data/bison.c++: Correct error recovery. Make the user able to
2879 initialize the starting location.
2880
9b2d0677
AD
28812002-02-07 Akim Demaille <akim@epita.fr>
2882
2883 * tests/input.at: New.
2884
69e2658b
RA
28852002-02-07 Robert Anisko <robert@lrde.epita.fr>
2886
2887 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 2888 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
2889 directives around tables only needed for debugging.
2890
4aacc3a7
RA
28912002-02-07 Robert Anisko <robert@lrde.epita.fr>
2892
2893 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
2894 C++ parsers.
2895 (yy::b4_name::parse): Use print_.
2896
762a801e
RA
28972002-02-07 Robert Anisko <robert@lrde.epita.fr>
2898
2899 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
2900
4bb2bc3f
RA
29012002-02-07 Robert Anisko <robert@lrde.epita.fr>
2902
2903 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
2904 C++ parsers.
2905 (yy::b4_name::parse): Build verbose error messages, and use error_.
2906
6b45a3ca
RA
29072002-02-06 Robert Anisko <robert@lrde.epita.fr>
2908
2909 * data/bison.c++: Fix m4 quoting in comments.
2910
50997c6e
RA
29112002-02-06 Robert Anisko <robert@lrde.epita.fr>
2912
2913 * data/bison.c++: Adjust the parser code. Fix some muscles that were
2914 not expanded by m4.
2915
3f3eed27
AD
29162002-02-05 Akim Demaille <akim@epita.fr>
2917
2918 * data/bison.c++: Adjust to the M4 back end.
2919 More is certainly needed.
2920
be2a1a68
AD
29212002-02-05 Akim Demaille <akim@epita.fr>
2922
2923 Give a try to M4 as a back end.
2924
2925 * lib/readpipe.c: New, from wdiff.
2926 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
2927 BISON_HAIRY.
2928 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
2929 specific values. Now it is m4 that performs the lookup.
2930 * src/parse-skel.y: Remove.
2931 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
2932 * src/output.c (actions_output, guards_output)
2933 (token_definitions_output): No longer keeps track of the output
2934 line number, hence remove the second argument.
2935 (guards_output): Check against the guard member of a rule, not the
2936 action member.
2937 Adjust callers.
2938 (output_skeleton): Don't look for the skeleton location, let m4 do
2939 that.
2940 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
2941 file will be used.
2942 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
2943 (prepare): Given that for the time being changesyntax is not
2944 usable in M4, rename the muscles using `-' to `_'.
2945 Define `defines_flag', `output_parser_name' and `output_header_name'.
2946 * src/output.h (actions_output, guards_output)
2947 (token_definitions_output): Adjust prototypes.
2948 * src/scan-skel.l: Instead of scanning the skeletons, it now
2949 processes the output of m4: `__oline__' and `#output'.
2950 * data/bison.simple: Adjust to be used by M4(sugar).
2951 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
2952 to date.
2953 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
2954 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
2955 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
2956 shamelessly stolen from CVS Autoconf.
2957
beda758b
AD
29582002-02-05 Akim Demaille <akim@epita.fr>
2959
2960 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
2961 * configure.in: Check for the declarations of free and malloc.
2962 * src/muscle_tab.c: Adjust.
2963
5ece6d43
AD
29642002-02-05 Akim Demaille <akim@epita.fr>
2965
2966 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
2967 which have no values.
2968
5bb18f9a
AD
29692002-02-05 Akim Demaille <akim@epita.fr>
2970
2971 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
2972 * data/: here.
2973
894dd62e
PE
29742002-01-29 Paul Eggert <eggert@twinsun.com>
2975
2976 * src/bison.simple (YYSIZE_T): Do not define merely because
2977 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
2978 On some platforms, <alloca.h> does not declare YYSTD (size_t).
2979
82841af7
AD
29802002-01-27 Akim Demaille <akim@epita.fr>
2981
2982 Fix `%nonassoc and eof'.
2983
2984 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
2985 which were not properly copied! Replace
2986 memcpy (res->errs, src->errs, src->nerrs);
2987 with
2988 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
2989 !!!
2990 * tests/regression.at (%nonassoc and eof): Adjust to newest
2991 Autotest: `.' is not in the PATH.
2992
318b76e9
AD
29932002-01-27 Akim Demaille <akim@epita.fr>
2994
2995 * tests/sets.at (AT_EXTRACT_SETS): New.
2996 (Nullable): Use it.
2997 (Firsts): New.
2998
30d2f3d5
AD
29992002-01-26 Akim Demaille <akim@epita.fr>
3000
3001 * tests/actions.at, tests/calc.at, tests/headers.at,
3002 * tests/torture.at: Adjust to the newest Autotest which no longer
3003 forces `.' in the PATH.
3004
30f8c395
AD
30052002-01-25 Akim Demaille <akim@epita.fr>
3006
3007 * tests/regression.at (%nonassoc and eof): New.
3008 Suggested by Robert Anisko.
3009
29ae55f1
AD
30102002-01-24 Akim Demaille <akim@epita.fr>
3011
3012 Bison dumps core when trying to complain about broken input files.
3013 Reported by Cris van Pelt.
3014
3015 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
3016 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
3017 into...
3018 (Invalid inputs): Strengthen: exercise parse_percent_token.
3019
2b548aa6
RA
30202002-01-24 Robert Anisko <robert.anisko@epita.fr>
3021
3022 * src/Makefile.am: Add bison.c++.
3023 * src/bison.c++: New skeleton.
3024
bb0146c2
AD
30252002-01-21 Paolo Bonzini <bonzini@gnu.org>
3026
3027 * po/it.po: New.
3028
bec30531
AD
30292002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3030
3031 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3032
fc6edc45
MA
30332002-01-20 Marc Autret <marc@gnu.org>
3034
3035 * src/files.c (compute_output_file_names): Fix
3036
5e5d5415
MA
30372002-01-20 Marc Autret <marc@gnu.org>
3038
3039 * tests/output.at: New test.
3040 * src/files.c (compute_base_names): Don't map extensions when
3041 the YACC flag is set, use defaults.
3042 Reported by Evgeny Stambulchik.
3043
44ea3fbd
MA
30442002-01-20 Marc Autret <marc@gnu.org>
3045
bb0146c2 3046 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
3047 compilers as well (i.e. the vendor C compiler).
3048 Suggested by Albert Chin-A-Young.
3049
338963d1
TVH
30502002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
3051
3052 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
3053 canonical definition.
3054 * src/system.h: Use the canonical definition for PARAMS (avoids
3055 a conflict with the macro from lib/hash.h).
3056
c57b2479
AD
30572002-01-11 Akim Demaille <akim@epita.fr>
3058
3059 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 3060 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 3061
b85810ae
AD
30622002-01-09 Akim Demaille <akim@epita.fr>
3063
3064 * src/files.c, src/files.h (output_infix): New.
3065 (tab_extension): Remove.
3066 (compute_base_names): Compute the former, drop the latter.
3067 * src/output.c (prepare): Insert the muscles `output-infix', and
3068 `output-suffix'.
3069 * src/parse-skel.y (string, string.1): New.
3070 (section.header): Use it.
3071 (section.yacc): Remove.
3072 (prefix): Remove too.
3073 * src/scan-skel.l: Adjust.
3074 * src/bison.simple, src/bison.hairy: Adjust.
3075
cae60122
AD
30762002-01-09 Akim Demaille <akim@epita.fr>
3077
3078 * configure.in (WERROR_CFLAGS): Compute it.
3079 * src/Makefile.am (CFLAGS): Pass it.
3080 * tests/atlocal.in (CFLAGS): Idem.
3081 * src/files.c: Fix a few warnings.
3082 (get_extension_index): Remove, unused.
3083
ae404801
AD
30842002-01-08 Akim Demaille <akim@epita.fr>
3085
3086 * src/getargs.c (AS_FILE_NAME): New.
3087 (getargs): Use it to convert DOSish file names.
3088 * src/files.c (base_name): Rename as full_base_name to avoid
3089 clashes with `base_name ()'.
3090 (filename_split): New.
3091 (compute_base_names): N-th rewrite, using filename_split.
3092
22312b71
AD
30932002-01-08 Akim Demaille <akim@epita.fr>
3094
3095 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
3096 New, stolen from the Fileutils 4.1.
3097 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3098 * configure.in: Check for the presence of memrchr, and of its
3099 prototype.
3100
a67cef01
TVH
31012002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
3102
3103 * lib/hash.h (__P): Added definition for this macro.
3104 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
3105 BUILT_SOURCES, to ensure they are generated first.
3106 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
3107 %error-verbose to allow bootstrapping with bison 1.30x.
3108
2b25d624
AD
31092002-01-06 Akim Demaille <akim@epita.fr>
3110
3111 * src/reader.c (parse_braces): Don't fetch the next char, the
3112 convention is to fetch on entry.
3113 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
3114 'switch' without a following semicolon.
3115 * tests/regression.at (braces parsing): New.
3116
3460813b
AD
31172002-01-06 Akim Demaille <akim@epita.fr>
3118
3119 Bison is dead wrong in its RR conflict reports.
3120
3121 * tests/torture.at (GNU Cim Grammar): New.
3122 * src/conflicts.c (count_rr_conflicts): Fix.
3123
73784c64
AD
31242002-01-06 Akim Demaille <akim@epita.fr>
3125
3126 Creating package.m4 from configure.ac causes too many problems.
3127
3128 * tests/Makefile.am (package.m4): Create it by hand,
3129 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
3130
25d81090
AD
31312002-01-06 Akim Demaille <akim@epita.fr>
3132
3133 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3134 skeleton.h.
3135
a9b8959e
PE
31362002-01-04 Paul Eggert <eggert@twinsun.com>
3137
3138 * doc/bison.texinfo (Debugging):
3139 Remove YYSTDERR; it's no longer defined or used.
3140 Also, s/cstdio.h/cstdio/.
3141
25d81090
AD
31422002-01-03 Akim Demaille <akim@epita.fr>
3143
3144 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3145
1109455c
AD
31462002-01-03 Akim Demaille <akim@epita.fr>
3147
3148 * src/parse-skel.y (process_skeleton): Don't bind the parser's
3149 tracing code to --trace, wait for a better --trace option, with
3150 args.
3151
7ea5e977
AD
31522002-01-03 Akim Demaille <akim@epita.fr>
3153
3154 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
3155 The ISO C++ standard is extremely clear about it: stderr is
3156 considered a macro, not a regular symbol (see table 94 `Header
3157 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
3158 Therefore std:: does not apply to it. It still does with fprintf.
3159 Also, s/cstdio.h/cstdio/.
3160
fab5b110
AD
31612002-01-03 Akim Demaille <akim@epita.fr>
3162
3163 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
3164 for non system headers.
3165
aed7fd9b
AD
31662002-01-02 Akim Demaille <akim@epita.fr>
3167
3168 Equip the skeleton chain with location tracking, runtime trace,
3169 pure parser and scanner.
3170
3171 * src/parse-skel.y: Request a pure parser, locations, and prefix
3172 renaming.
3173 (%union): Having several members with the same type does not help
3174 type mismatches, simplify.
3175 (YYPRINT, yyprint): New.
3176 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
3177 (skel_error): this.
3178 Handle locations.
3179 * src/scan-skel.l: Adjust to these changes.
3180 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
3181 (LOCATION_PRINT, skel_control_t): New.
3182
24fad99e
AD
31832001-12-30 Akim Demaille <akim@epita.fr>
3184
3185 * src/parse-skel.y: Get rid of the shift/reduce conflict:
3186 replace `gb' with BLANKS.
3187 * src/scan-skel.l: Adjust.
3188
a4b36db4
AD
31892001-12-30 Akim Demaille <akim@epita.fr>
3190
3191 * src/system.h: We don't need nor want bcopy.
3192 Throw away MS-DOS crap: we don't need getpid.
3193 * configure.in: We don't need strndup. It was even causing
3194 problems: because Flex includes the headers *before* us,
3195 _GNU_SOURCE is not defined by config.h, and therefore strndup was
3196 not visible.
3197 * lib/xstrndup.c: New.
3198 * src/scan-skel.l: Use it.
3199 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
3200 * src/parse-skel.y: Use %directives instead of #defines.
3201
1239777d
AD
32022001-12-30 Akim Demaille <akim@epita.fr>
3203
3204 * src/skeleton.h: New.
3205 * src/output.c (output_parser, output_master_parser): Remove, dead
3206 code.
3207 * src/output.h (get_lines_number, actions_output, guards_output)
3208 (token_definitions_output): Prototype them.
3209 * src/parse-skel.y: Add the license notice.
3210 Include output.h and skeleton.h.
3211 (process_skeleton): Returns void, and takes a single parameter.
3212 * src/scan-skel.l: Add the license notice.
3213 Include skeleton.h.
3214 Don't use %option yylineno: it seems that then Flex imagines
3215 REJECT has been used, and therefore it won't reallocate its
3216 buffers (which makes no other sense to me than a bug). It results
3217 in warnings for `unused: yy_flex_realloc'.
3218
9b3add5b
RA
32192001-12-30 Robert Anisko <robert.anisko@epita.fr>
3220
3221 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3222 (MUSCLE_INSERT_PREFIX): ...to there.
3223 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3224 (MUSCLE_INSERT_PREFIX): Move from here...
3225
3226 * src/bison.hairy: Add a section directive. Put braces around muscle
3227 names. This parser skeleton is still broken, but Bison should not
3228 choke on a bad muscle 'syntax'.
3229 * src/bison.simple: Add a section directive. Put braces around muscle
3230 names.
3231
3232 * src/files.h (strsuffix, stringappend): Add declarations.
3233 (tab_extension): Add declaration.
3234 (short_base_name): Add declaration.
3235
3236 * src/files.c (strsuffix, stringappend): No longer static. These
3237 functions are used in the skeleton parser.
3238 (tab_extension): New.
3239 (compute_base_names): Use the computations done in this function
fab5b110 3240 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
3241 names.
3242 (short_base_name): No longer static.
3243
3244 * src/output.c (output_skeleton): New.
3245 (output): Disable call to output_master_parser, and give a try to
3246 a new skeleton handling system.
3247 (guards_output, actions_output): No longer static.
3248 (token_definitions_output, get_lines_number): No longer static.
3249
3250 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
3251
fab5b110 3252 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
3253 parse-skel.y.
3254
3255 * src/parse-skel.y: New file.
3256 * src/scan-skel.l: New file.
3257
b5b61c61
AD
32582001-12-29 Akim Demaille <akim@epita.fr>
3259
3260 %name-prefix is broken.
3261
3262 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
3263 Adjust all dependencies.
3264 * tests/headers.at (export YYLTYPE): Strengthen this test: use
3265 %name-prefix.
3266
3267 Renaming yylval but not yylloc is not consistent. Now we do.
3268
3269 * src/bison.simple: Prefix yylloc if used.
3270 * doc/bison.texinfo (Decl Summary): Document that.
3271
8c9a50be
AD
32722001-12-29 Akim Demaille <akim@epita.fr>
3273
3274 * doc/bison.texinfo: Promote `%long-directive' over
3275 `%long_directive'.
3276 Remove all references to fixed-output-files, yacc is enough.
3277
d99361e6
AD
32782001-12-29 Akim Demaille <akim@epita.fr>
3279
3280 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
3281 user prologue. These are defaults.
3282 * tests/actions.at (Mid-rule actions): Make sure the user can
3283 define YYDEBUG and YYERROR_VERBOSE.
3284
b9cecb91
AD
32852001-12-29 Akim Demaille <akim@epita.fr>
3286
3287 * src/output.c (header_output): Don't forget to export YYLTYPE and
3288 yylloc.
3289 * tests/headers.at (export YYLTYPE): New, make sure it does.
3290 * tests/regression.at (%union and --defines, Invalid CPP headers):
3291 Move to...
3292 * tests/headers.at: here.
3293
aea13e97
AD
32942001-12-29 Akim Demaille <akim@epita.fr>
3295
3296 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
3297
931394cb
AD
32982001-12-29 Akim Demaille <akim@epita.fr>
3299
3300 * tests/actions.at (Mid-rule actions): Output on a single line
3301 instead of several.
3302
704a47c4
AD
33032001-12-29 Akim Demaille <akim@epita.fr>
3304
3305 * doc/bison.texinfo: Formatting changes.
3306
091e20bb
AD
33072001-12-29 Akim Demaille <akim@epita.fr>
3308
3309 Don't store the token defs in a muscle, just be ready to output it
3310 on command. Now possible via `symbols'. Fixes a memory leak.
3311
3312 * src/output.c (token_definitions_output): New.
3313 (output_parser, header_output): Use it.
3314 * src/reader.c (symbols_save): Remove.
3315
cce71710
AD
33162001-12-29 Akim Demaille <akim@epita.fr>
3317
3318 * src/bison.simple: Do not provide a default for YYSTYPE and
3319 YYLTYPE before the user's prologue. Otherwise it's hardly... a
3320 default.
3321
82c035a8
AD
33222001-12-29 Akim Demaille <akim@epita.fr>
3323
3324 Mid-rule actions are simply... ignored!
3325
3326 * src/reader.c (readgram): Be sure to attach mid-rule actions to
3327 the empty-rule associated to the dummy symbol, not to the host
3328 rule.
3329 * tests/actions.at (Mid-rule actions): New.
3330
8419d367
AD
33312001-12-29 Akim Demaille <akim@epita.fr>
3332
3333 Memory leak.
3334
3335 * src/reader.c (reader): Free grammar.
3336
375d5806
AD
33372001-12-29 Akim Demaille <akim@epita.fr>
3338
3339 Memory leak.
3340
3341 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
3342 since it allocates it for each state, although only one is needed.
3343 (allocate_storage): Do it here.
3344
f51cb8ff
AD
33452001-12-29 Akim Demaille <akim@epita.fr>
3346
3347 * src/options.h, src/options.c (create_long_option_table): Rename
3348 as...
3349 (long_option_table_new): this, with a clearer prototype.
3350 (percent_table): Remove, unused,
3351 * src/getargs.c (getargs): Adjust.
3352
29e88316
AD
33532001-12-29 Akim Demaille <akim@epita.fr>
3354
3355 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
3356 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
3357 as states.
3358
b9f71f19
AD
33592001-12-29 Akim Demaille <akim@epita.fr>
3360
3361 * src/lalr.c (build_relations): Rename `states' as `states1'.
3362 Sorry, I don't understand exactly what it is, no better name...
3363
1a2b5d37
AD
33642001-12-29 Akim Demaille <akim@epita.fr>
3365
3366 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
3367 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
3368 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
3369 as rules.
3370
1cca533e
AD
33712001-12-29 Akim Demaille <akim@epita.fr>
3372
3373 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
3374 ago.
3375
c03ae966
AD
33762001-12-29 Akim Demaille <akim@epita.fr>
3377
3378 * src/reader.c, src/reader.h (user_toknums): Remove.
3379 Adjust all users to use symbols[i]->user_token_number.
3380
5a670b1e
AD
33812001-12-29 Akim Demaille <akim@epita.fr>
3382
3383 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
3384 Adjust all users to use symbols[i]->prec or ->assoc.
3385
ad949da9
AD
33862001-12-29 Akim Demaille <akim@epita.fr>
3387
3388 * src/reader.c, src/reader.h (tags): Remove.
3389 Adjust all users to use symbols[i]->tag.
3390
0e78e603
AD
33912001-12-29 Akim Demaille <akim@epita.fr>
3392
3393 * src/gram.h, src/gram.c (symbols): New, similar to state_table
3394 and rule_table.
3395 * src/reader.c (packsymbols): Fill this table.
3396 Drop sprec.
3397 * src/conflicts.c (resolve_sr_conflict): Adjust.
3398 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
3399 single table.
3400 Use symbols[i]->tag instead of tags[i].
3401
213e640e
AD
34022001-12-29 Akim Demaille <akim@epita.fr>
3403
3404 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
3405 In addition, put a comment in there, to replace...
3406 * tests/regression.at (%union and C comments): Remove.
3407
e7b8bef1
AD
34082001-12-29 Akim Demaille <akim@epita.fr>
3409
3410 * tests/regression.at (Web2c Actions): Blindly move the actual
3411 output as expected output. The contents *seem* right to me, but I
3412 can't pretend reading perfectly parser tables... Nonetheless, all
3413 the other tests pass correctly, the table look OK, even though the
3414 presence of `$axiom' is to be noted: AFAICS it is useless (but
3415 harmless).
3416
b68e7744
AD
34172001-12-29 Akim Demaille <akim@epita.fr>
3418
3419 * src/reader.c (readgram): Don't add the rule 0 if there were no
3420 rules read. In other words, add it _after_ having performed
3421 grammar sanity checks.
3422 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
3423
78d5bae9
AD
34242001-12-29 Akim Demaille <akim@epita.fr>
3425
3426 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
3427 visible, and some states have now a different number.
3428
ff442794
AD
34292001-12-29 Akim Demaille <akim@epita.fr>
3430
3431 * src/reader.c (readgram): Bind the initial rule's lineno to that
3432 of the first rule.
3433 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
3434 (Solved SR Conflicts): Adjust rule 0's line number.
3435
610ab194
AD
34362001-12-29 Akim Demaille <akim@epita.fr>
3437
3438 Fix the `GAWK Grammar' failure.
3439
3440 * src/LR0.c (final_state): Initialize to -1 so that we do compute
3441 the reductions of the first state which was mistakenly confused
3442 with the final state because precisely final_state was initialized
3443 to 0.
3444 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
3445 now noticed by Bison.
3446 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
3447 have a reduction on $default.
3448
29d29c8f
AD
34492001-12-29 Akim Demaille <akim@epita.fr>
3450
3451 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
3452 rule line numbers.
3453 * src/closure.c (print_closure): Likewise.
3454 * src/derives.c (print_derives): Likewise.
3455 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
3456 now.
3457
7c6b64d0
AD
34582001-12-29 Akim Demaille <akim@epita.fr>
3459
3460 * src/lalr.c (lookaheads_print): New.
3461 (lalr): Call it when --trace-flag.
3462 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
3463 are dumped.
3464
3d4daee3
AD
34652001-12-29 Akim Demaille <akim@epita.fr>
3466
3467 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
3468 when walking through ritem, even via rule->rhs.
3469 * src/reduce.c (dump_grammar, useful_production, reduce_output)
3470 (useful_production, useless_nonterminals): Likewise.
3471 (reduce_grammar_tables): Likewise, plus update nritems.
3472 * src/nullable.c (set_nullable): Likewise.
3473 * src/lalr.c (build_relations): Likewise.
3474 * tests/sets.at (Nullable): Adjust.
3475 Fortunately, now, the $axiom is no longer nullable.
3476
9e7f6bbd
AD
34772001-12-29 Akim Demaille <akim@epita.fr>
3478
3479 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
3480 the 0-sentinel.
3481 * src/gram.c (ritem_longest_rhs): Likewise.
3482 * src/reduce.c (nonterminals_reduce): Likewise.
3483 * src/print_graph.c (print_graph): Likewise.
3484 * src/output.c (output_rule_data): Likewise.
3485 * src/nullable.c (set_nullable): Likewise.
3486
255ef638
AD
34872001-12-29 Akim Demaille <akim@epita.fr>
3488
3489 * src/output.c: Comment changes.
3490
0d8a7363
AD
34912001-12-27 Paul Eggert <eggert@twinsun.com>
3492
3493 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
3494 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
3495 Sparc, as they were causing more porting problems than the
3496 (minor) performance improvement was worth.
3497
3498 Also, catch up with 1.31's YYSTD.
3499
3db472b9
AD
35002001-12-27 Akim Demaille <akim@epita.fr>
3501
3502 * src/output.c (output_gram): Rely on nritems, not the
3503 0-sentinel. See below.
3504 Use -1 as separator, not 0.
3505 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
3506 Rely on -1 as separator in yyrhs, instead of 0.
3507 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
3508 twice `Now at end of input', therefore there are two lines less to
3509 expect.
3510
b365aa05
AD
35112001-12-27 Akim Demaille <akim@epita.fr>
3512
3513 * tests/regression.at (Unresolved SR Conflicts):
3514 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
3515 below.
3516
30171f79
AD
35172001-12-27 Akim Demaille <akim@epita.fr>
3518
3519 * src/LR0.c (new_state): Recognize the final state by the fact it
3520 is reached by eoftoken.
3521 (insert_start_shifting_state, insert_eof_shifting_state)
3522 (insert_accepting_state, augment_automaton): Remove, since now
3523 these states are automatically computed from the initial state.
3524 (generate_states): Adjust.
3525 * src/print.c: When reporting a rule number to the user, substract
3526 1, so that the axiom rule is rule 0, and the first user rule is 1.
3527 * src/reduce.c: Likewise.
3528 * src/print_graph.c (print_core): For the time being, just as for
3529 the report, depend upon --trace-flags to dump the full set of
3530 items.
3531 * src/reader.c (readgram): Once the grammar read, insert the rule
3532 0: `$axiom: START-SYMBOL $'.
3533 * tests/set.at: Adjust: rule 0 is now displayed, and since the
3534 number of the states has changed (the final state is no longer
3535 necessarily the last), catch up.
3536
75142d45
AD
35372001-12-27 Akim Demaille <akim@epita.fr>
3538
3539 Try to make the use of the eoftoken valid. Given that its value
3540 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
3541 is used instead of > 0 where appropriate, (ii), depend upon nritems
3542 instead of the 0-sentinel.
3543
3544 * src/gram.h, src/gram.c (nritems): New.
3545 Expected to be duplication of nitems, but for the time being...
3546 * src/reader.c (packgram): Assert nritems and nitems are equal.
3547 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
3548 * src/closure.c (print_closure, print_fderives): Likewise.
3549 * src/gram.c (ritem_print): Likewise.
3550 * src/print.c (print_core, print_grammar): Likewise.
3551 * src/print_graph.c: Likewise.
3552
b7c49edf
AD
35532001-12-27 Akim Demaille <akim@epita.fr>
3554
3555 * src/main.c (main): If there are complains after grammar
3556 reductions, then output the report anyway if requested, then die.
3557 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
3558 * src/reader.c (eoftoken): New.
3559 (parse_token_decl): If the token being defined has value `0', it
3560 is the eoftoken.
3561 (packsymbols): No longer hack `tags' to insert `$' by hand.
3562 Be sure to preserve the value of the eoftoken.
3563 (reader): Make sure eoftoken is defined.
3564 Initialize nsyms to 0: now eoftoken is created just like the others.
3565 * src/print.c (print_grammar): Don't special case the eof token.
3566 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
3567 lie anyway, albeit pleasant.
3568 * tests/calc.at: Exercise error messages with eoftoken.
3569 Change the grammar so that empty input is invalid.
3570 Adjust expectations.
3571 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
3572
ec2da99f
AD
35732001-12-27 Akim Demaille <akim@epita.fr>
3574
3575 * configure.in: Check the protos of strchr ans strspn.
3576 Replace strchr if needed.
3577 * src/system.h: Provide the protos of strchr, strspn and memchr if
3578 missing.
3579 * lib/strchr.c: New.
3580 * src/reader.c (symbols_save): Use strchr.
3581
8adfa272
AD
35822001-12-27 Akim Demaille <akim@epita.fr>
3583
3584 * src/print.c, src/print_graph.c (escape): New.
3585 Use it to quote the TAGS outputs.
3586 * src/print_graph.c (print_state): Now errors are in red, and
3587 reductions in green.
3588 Prefer high to wide: output the state number on a line of its own.
3589
80dac38c
AD
35902001-12-27 Akim Demaille <akim@epita.fr>
3591
3592 * src/state.h, src/state.c (reductions_new): New.
3593 * src/LR0.c (set_state_table): Let all the states have a
3594 `reductions', even if reduced to 0.
3595 (save_reductions): Adjust.
3596 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
3597 * src/print.c (print_reductions, print_actions): Adjust.
3598 * src/output.c (action_row): Adjust.
3599
2cec70b9
AD
36002001-12-27 Akim Demaille <akim@epita.fr>
3601
3602 * src/state.h, src/state.c (errs_new, errs_dup): New.
3603 * src/LR0.c (set_state_table): Let all the states have an errs,
3604 even if reduced to 0.
3605 * src/print.c (print_errs, print_reductions): Adjust.
3606 * src/output.c (output_actions, action_row): Adjust.
3607 * src/conflicts.c (resolve_sr_conflict): Adjust.
3608
13ca549a
AD
36092001-12-27 Akim Demaille <akim@epita.fr>
3610
3611 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
3612
5092aba5
AD
36132001-12-27 Akim Demaille <akim@epita.fr>
3614
3615 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
3616 * src/print.c: here.
3617 (lookaheadset, shiftset): New, used as additional storage by
3618 print_reductions.
3619 (print_results): Adjust.
3620 (print_shifts, print_gotos, print_errs): New, extracted from...
3621 (print_actions): here.
3622 * src/print_graph.c (print_actions): Remove dead code.
3623
11e2beca
AD
36242001-12-27 Akim Demaille <akim@epita.fr>
3625
3626 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
3627 `$n' and `@n'.
3628
dac3c910
AD
36292001-12-27 Akim Demaille <akim@epita.fr>
3630
3631 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
3632 (build_relations): Adjust.
3633
d0b0fefa
AD
36342001-12-27 Akim Demaille <akim@epita.fr>
3635
3636 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
3637 duplication.
3638
adc8c848
AD
36392001-12-27 Akim Demaille <akim@epita.fr>
3640
3641 * src/reader.c (packgram): Catch nitems overflows.
3642
14d293ac
AD
36432001-12-27 Akim Demaille <akim@epita.fr>
3644
3645 * src/files.c, src/files.h (guard_obstack): Remove.
3646 * src/output.c (output): Adjust.
3647 * src/reader.c (parse_braces): New, factoring...
3648 (copy_action, copy_guard): these two which are renamed as...
3649 (parse_action, parse_guard): these.
3650 As a voluntary consequence, using braces around guards is now
3651 mandatory.
3652
f499b062
AD
36532001-12-27 Akim Demaille <akim@epita.fr>
3654
3655 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
3656 * src/reader.c (symbol_list): `guard' and `guard_line' are new
3657 members.
3658 (symbol_list_new): Adjust.
3659 (copy_action): action_line is the first line, not the last.
3660 (copy_guard): Just as for actions, store the `action' only, not
3661 the switch/case/break flesh.
3662 Don't parse the user action that might follow the guard, let...
3663 (readgram): do it, i.e., now, there can be an action after a
3664 guard.
3665 In other words the guard is just explicitly optional.
3666 (packgram): Adjust.
3667 * src/output.c (guards_output): New.
3668 (output_parser): Call it when needed.
3669 (output): Also free the guard and attrs obstacks.
3670 * src/files.c, src/files.h (obstack_save): Remove.
3671 (output_files): Remove.
3672 As a result, if one needs the former `.act' file, using an
3673 appropriate skeleton which requires actions and guards is now
3674 required.
3675 * src/main.c (main): Adjust.
3676 * tests/semantic.at: New.
3677 * tests/regression.at: Use `input.y' as input file name.
3678 Avoid 8+3 problems by requiring input.c when the test needs the
3679 parser.
3680
d945f5cd
AD
36812001-12-27 Akim Demaille <akim@epita.fr>
3682
3683 * src/reader.c (symbol_list_new): Be sure to initialize all the
3684 fields.
3685
d200e455
AD
36862001-12-27 Akim Demaille <akim@epita.fr>
3687
3688 All the hacks using a final pseudo state are now useless.
3689
3690 * src/LR0.c (set_state_table): state_table holds exactly nstates.
3691 * src/lalr.c (nLA): New.
3692 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
3693 instead of lookaheadsp from the pseudo state (nstate + 1).
3694
f9507c28
AD
36952001-12-27 Akim Demaille <akim@epita.fr>
3696
3697 * src/output.c (action_row, token_actions): Use a state_t instead
3698 of a integer, and nlookaheads instead of the following state's
3699 lookaheadsp.
3700
065fbd27
AD
37012001-12-27 Akim Demaille <akim@epita.fr>
3702
3703 * src/conflicts.c (log_resolution, flush_shift)
3704 (resolve_sr_conflict, set_conflicts, solve_conflicts)
3705 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
3706 (conflicts_print, print_reductions): Use a state_t instead of an
3707 integer when referring to a state.
3708 As much as possible, depend upon nlookaheads, instead of the
3709 `lookaheadsp' member of the following state (since lookaheads of
3710 successive states are successive, the difference between state n + 1
3711 and n served as the number of lookaheads for state n).
3712 * src/lalr.c (add_lookback_edge): Likewise.
3713 * src/print.c (print_core, print_actions, print_state)
3714 (print_results): Likewise.
3715 * src/print_graph.c (print_core, print_actions, print_state)
3716 (print_graph): Likewise.
3717 * src/conflicts.h: Adjust.
3718
1b177bd7
AD
37192001-12-27 Akim Demaille <akim@epita.fr>
3720
3721 * src/bison.hairy: Formatting/comment changes.
3722 ANSIfy.
3723 Remove `register' indications.
3724 Add plenty of `static'.
3725
7742ddeb
AD
37262001-12-27 Akim Demaille <akim@epita.fr>
3727
3728 * src/output.c (prepare): Drop the muscle `ntbase' which
3729 duplicates ntokens.
3730 * src/bison.simple: Formatting/comment changes.
3731 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
3732 is an undocumented synonym.
3733
1fa14068
AD
37342001-12-22 Akim Demaille <akim@epita.fr>
3735
3736 * src/output.c (output_table_data): Change the prototype to use
3737 `int' for array ranges: some invocations do pass an int, not a
3738 short.
3739 Reported by Wayne Green.
3740
b9752825
AD
37412001-12-22 Akim Demaille <akim@epita.fr>
3742
3743 Some actions of web2c.y are improperly triggered.
3744 Reported by Mike Castle.
3745
3746 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
3747 * tests/regression.at (Web2c): Rename as...
3748 (Web2c Report): this.
3749 (Web2c Actions): New.
3750
776209d6
AD
37512001-12-22 Akim Demaille <akim@epita.fr>
3752
3753 Reductions in web2c.y are improperly reported.
3754 Reported by Mike Castle.
3755
3756 * src/conflicts.c (print_reductions): Fix.
3757 * tests/regression.at (Web2c): New.
3758
275fc3ad
AD
37592001-12-18 Akim Demaille <akim@epita.fr>
3760
3761 Some host fail on `assert (!"foo")', which expands to
3762 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
3763 Reported by Nelson Beebee.
3764
3765 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
3766 `#define it_succeeded 0' and `assert (it_succeeded)'.
3767
897668ee
MA
37682001-12-17 Marc Autret <autret_m@epita.fr>
3769
3770 * src/bison.simple: Don't hard code the skeleton line and filename.
3771 * src/output.c (output_parser): Rename 'line' as 'output_line'.
3772 New line counter 'skeleton_line' (skeleton-line muscle).
3773
ab3399e0
PE
37742001-12-17 Paul Eggert <eggert@twinsun.com>
3775
3776 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
3777 YYDEBUG must be defined to a nonzero value.
3778
3779 * src/bison.simple (yytname): Do not assume that the user defines
3780 YYDEBUG to a properly parenthesized expression.
3781
3877f72b
AD
37822001-12-17 Akim Demaille <akim@epita.fr>
3783
3784 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
3785 nlookaheads is a new member.
3786 Adjust all users.
3787 * src/lalr.h (nlookaheads): Remove this orphan declaration.
3788 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
3789 state.
776209d6 3790
331dbc1b
AD
37912001-12-17 Akim Demaille <akim@epita.fr>
3792
3793 * src/files.h, src/files.c (open_files, close_files): Remove.
3794 * src/main.c (main): Don't open/close files, nor invoke lex_free,
3795 let...
3796 * src/reader.c (reader): Do it.
776209d6 3797
be750e4c
AD
37982001-12-17 Akim Demaille <akim@epita.fr>
3799
3800 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 3801
709ae8c6
AD
38022001-12-17 Akim Demaille <akim@epita.fr>
3803
3804 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
3805 (flush_reduce): New.
3806 (resolve_sr_conflict): Adjust.
776209d6 3807
f87685c3
AD
38082001-12-17 Akim Demaille <akim@epita.fr>
3809
3810 * src/output.c (output_obstack): Be static and rename as...
3811 (format_obstack): this, to avoid any confusion with files.c's
3812 output_obstack.
3813 * src/reader.h (muscle_obstack): Move to...
3814 * src/output.h: here, since it's defined in output.c.
3815
837491d8
AD
38162001-12-17 Akim Demaille <akim@epita.fr>
3817
3818 * src/output.c (action_row, save_column, default_goto)
3819 (sort_actions, matching_state, pack_vector): Better variable
3820 locality.
3821
796d61fb
AD
38222001-12-17 Akim Demaille <akim@epita.fr>
3823
3824 * src/output.c: Various formatting changes.
776209d6 3825
64d15509
AD
38262001-12-17 Akim Demaille <akim@epita.fr>
3827
3828 * src/files.c (output_files): Free the output_obstack.
3829 * src/main.c (main): Call print and print_graph conditionally.
3830 * src/print.c (print): Work unconditionally.
3831 * src/print_graph.c (print_graph): Work unconditionally.
3832 * src/conflicts.c (log_resolution): Output only if verbose_flag.
3833
fbc8ecb7
MA
38342001-12-16 Marc Autret <autret_m@epita.fr>
3835
3836 * src/output.c (actions_output): Fix. When we use %no-lines,
3837 there is one less line per action.
3838
f0440388
MA
38392001-12-16 Marc Autret <autret_m@epita.fr>
3840
3841 * src/bison.simple: Remove a useless #line directive.
3842 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
3843 * src/output.c (get_lines_number): New.
776209d6 3844 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
3845 output muscles.
3846 Fix line numbering.
3847 (actions_output): Computes the number of lines taken by actions.
3848 (output_master_parser): Insert new skeleton which is the name of
3849 the output parser file name.
3850
a79986b8
MA
38512001-12-15 Marc Autret <autret_m@epita.fr>
3852
3853 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
3854
4ec8e00f
MA
38552001-12-15 Marc Autret <autret_m@epita.fr>
3856
3857 * src/output.c (output_gram): Keep track of the hairy one.
3858
1a4648ff
AD
38592001-12-15 Akim Demaille <akim@epita.fr>
3860
3861 Make `make distcheck' work.
3862
3863 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
3864 system.h which uses libgettext.h.
3865
9c2c67e6
AD
38662001-12-15 Akim Demaille <akim@epita.fr>
3867
3868 * src/nullable.c (set_nullable): Useless rules must be skipped,
3869 otherwise, since we range over their symbols, we might look at a
3870 nonterminal which no longer ``exists'', i.e., it is not counted in
3871 `nvars', hence we overflow our arrays.
3872
93ede233
AD
38732001-12-15 Akim Demaille <akim@epita.fr>
3874
3875 The header can also be produced directly, without any obstack!
3876 Yahoo!
3877
3878 * src/files.c, src/files.h (defines_obstack): Remove.
3879 (compute_header_macro): Global.
3880 (defines_obstack_save): Remove.
3881 * src/reader.c (parse_union_decl): No longer output to
3882 defines_obstack: its content can be found in the `stype' muscle
3883 anyway.
3884 (output_token_translations): Merge into...
3885 (symbols_output): this.
3886 Rename as...
3887 (symbols_save): this.
3888 (reader): Adjust.
3889 * src/output.c (header_output): New.
3890 (output): Call it.
3891
2666f928
AD
38922001-12-15 Akim Demaille <akim@epita.fr>
3893
3894 * src/reader.c (parse_union_decl): Instead of handling two obstack
3895 simultaneously, use one to define the `stype' muscle, and use the
3896 value of the latter to fill defines_obstack.
3897 (copy_comment): Remove.
3898 (copy_comment2): Work for a single obstack.
3899 Rename as...
3900 (copy_comment): this.
3901
428046f8
AD
39022001-12-15 Akim Demaille <akim@epita.fr>
3903
3904 * src/lex.c, src/lex.h (xgetc): No longer static.
3905 * src/reader.c (parse_union_decl): Revamp.
3906
ea52d706
AD
39072001-12-15 Akim Demaille <akim@epita.fr>
3908
3909 Still making progress in separating Bison into (i) input, (ii)
3910 process, (iii) output: now we can directly output the parser file
3911 without using table_obstack at all.
3912
3913 * src/files.c, src/files.h (table_obstack): Bye bye.
3914 (parser_file_name): New.
3915 * src/files.c (compute_output_file_names): Compute it.
3916 * src/output.c (actions_output, output_parser)
3917 (output_master_parser): To a file instead of an obstack.
3918
3f96f4dc
AD
39192001-12-15 Akim Demaille <akim@epita.fr>
3920
3921 Attach actions to rules, instead of pre-outputting them to
3922 actions_obstack.
3923
3924 * src/gram.h (rule_t): action and action_line are new members.
3925 * src/reader.c (symbol_list): Likewise.
3926 (copy_action): Save the actions within the rule.
3927 (packgram): Save them in rule_table.
3928 * src/output.c (actions_output): New.
3929 (output_parser): Use it on `%%actions'.
3930 (output_rule_data): Don't free rule_table.
3931 (output): Do it.
3932 (prepare): Don't save the `action' muscle.
3933 * src/bison.simple: s/%%action/%%actions/.
3934
51576fb3
AD
39352001-12-15 Akim Demaille <akim@epita.fr>
3936
3937 * src/reader.c (copy_action): When --yacc, don't append a `;'
3938 to the user action: let it fail if lacking.
dee049eb 3939 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 3940
2648a72d
AD
39412001-12-14 Akim Demaille <akim@epita.fr>
3942
3943 * src/lex.c (literalchar): Simply return the char you decoded, non
3944 longer mess around with obstacks and int pointers.
3945 Adjust all callers.
3946
92790e5b
AD
39472001-12-14 Akim Demaille <akim@epita.fr>
3948
3949 * src/lex.c (literalchar): Don't escape the special characters,
3950 just decode them, and keep them as char (before, eol was output as
3951 the 2 char string `\n' etc.).
3952 * src/output.c (output_rule_data): Use quotearg to output the
3953 token strings.
3954
927c1557
PE
39552001-12-13 Paul Eggert <eggert@twinsun.com>
3956
3957 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
3958 Do not infringe on the global user namespace when using C++.
3959 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
3960 All uses of `fprintf' and `stderr' changed.
3961
3962 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
3963
ed8e1f68
AD
39642001-12-13 Akim Demaille <akim@epita.fr>
3965
3966 The computation of nullable is broken: it doesn't handle empty
3967 RHS's properly.
3968
3969 * tests/torture.at (GNU AWK Grammar): New.
3970 * tests/sets.at (Nullable): New.
3971 * src/nullable.c (set_nullable): Instead of blindly looping over
3972 `ritems', loop over the rules, and then over their rhs's.
3973
3974 Work around Autotest bugs.
3975
3976 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
3977 frame, because Autotest understand lines starting with a `+' as
3978 traces from the shell. Then, they are not processed properly.
3979 Admittedly an Autotest bug, but we don't have time to wait for
3980 Autotest to catch up.
3981 * tests/regression.at (Broken Closure): Adjust to the new table
3982 frames.
3983 Move to...
3984 * tests/sets.at: here.
3985
cb581495
AD
39862001-12-13 Akim Demaille <akim@epita.fr>
3987
3988 * src/closure.c (closure): Use nrules instead of playing tricks
3989 with BITS_PER_WORD.
3990
2e729273
AD
39912001-12-13 Akim Demaille <akim@epita.fr>
3992
3993 * src/print.c (print_actions): Output the handling of `$' as the
3994 traces do: shifting the token EOF. Before EOF was treated as a
3995 nonterminal.
3996 * tests/regression.at: Adjust some tests.
3997 * src/print_graph.c (print_core): Complete the set of items via
3998 closure. The next-to-final and final states are still unsatisfying,
3999 but that's to be addressed elsewhere.
4000 No longer output the rule numbers, but do output the state number.
4001 A single loop for the shifts + gotos is enough, but picked a
4002 distinct color for each.
4003 (print_graph): Initialize and finalize closure.
4004
107f7dfb
AD
40052001-12-13 Akim Demaille <akim@epita.fr>
4006
4007 * src/reader.c (readgram): Remove dead code, an strip useless
4008 braces.
4009 (get_type): Remove, unused.
4010
9b53a24f
AD
40112001-12-12 Akim Demaille <akim@epita.fr>
4012
4013 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
4014 on that of lib/error.c.
4015
dbfb6dcd
AD
40162001-12-12 Akim Demaille <akim@epita.fr>
4017
4018 Some hosts don't like `/' in includes.
4019
4020 * src/system.h: Include libgettext.h without qualifying the path.
4021 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
4022 $(top_srcdir).
4023
c25fb648
MA
40242001-12-11 Marc Autret <autret_m@epita.fr>
4025
4026 * src/output.c (output_parser): Remove useless muscle.
4027
710ddc4f
MA
40282001-12-11 Marc Autret <autret_m@epita.fr>
4029
4030 * src/bison.simple: Remove #line just before %%epilogue. It
4031 is now handled in ...
4032 * src/reader.c (read_additionnal_code): Add the output of a
4033 #line for the epilogue.
4034
e83d80b8
MA
40352001-12-10 Marc Autret <autret_m@epita.fr>
4036
927c1557 4037 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
4038 replace precedent remove.
4039 * src/bison.simple: Remove #line before %%prologue because
4040 %%input-line is wrong at this time.
4041
971d5158
MA
40422001-12-10 Marc Autret <autret_m@epita.fr>
4043
4044 * src/reader.c (symbols_output): Clean up.
927c1557 4045 * src/output.c (output_gram, output): Clean up.
971d5158 4046
5edafffd
AD
40472001-12-10 Akim Demaille <akim@epita.fr>
4048
4049 * src/lalr.c (initialize_lookaheads): New. Extracted from...
4050 * src/LR0.c (set_state_table): here.
4051 * src/lalr.c (lalr): Call it.
4052
0279f8e9
AD
40532001-12-10 Akim Demaille <akim@epita.fr>
4054
4055 * src/state.h (shifts): Remove the `number' member: shifts are
4056 attached to state, hence no longer need to be labelled with a
4057 state number.
4058
190c4f5f
AD
40592001-12-10 Akim Demaille <akim@epita.fr>
4060
4061 Now that states have a complete set of members, the linked list of
4062 shifts is useless: just fill directly the state's shifts member.
4063
4064 * src/state.h (shifts): Remove the `next' member.
4065 * src/LR0.c (first_state, last_state): Remove.
4066 Adjust the callers.
4067 (augment_automaton): Don't look for the shifts that must be added
4068 a shift on EOF: it is those of the state we looked for! But now,
4069 since shifts are attached, it is no longer needed to looking
4070 merely by its id: its number.
4071
2a73b93d
AD
40722001-12-10 Akim Demaille <akim@epita.fr>
4073
4074 * src/LR0.c (augment_automaton): Better variable locality.
4075 Remove an impossible branch: if there is a state corresponding to
4076 the start symbol being shifted, then there is shift for the start
4077 symbol from the initial state.
4078
74392f6a
AD
40792001-12-10 Akim Demaille <akim@epita.fr>
4080
4081 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
4082 only when appropriate: when insert_start_shifting_state' is not
4083 invoked.
4084 * tests/regression.at (Rule Line Numbers): Adjust.
4085
37c82725
AD
40862001-12-10 Akim Demaille <akim@epita.fr>
4087
4088 * src/LR0.c (augment_automaton): Now that all states have shifts,
4089 merge the two cases addition shifts to the initial state.
4090
6a164e0c
AD
40912001-12-10 Akim Demaille <akim@epita.fr>
4092
4093 * src/lalr.c (set_state_table): Move to...
4094 * src/LR0.c: here.
4095 * src/lalr.c (lalr): Don't call it...
4096 * src/LR0.c (generate_states): do it.
4097 * src/LR0.h (first_state): Remove, only the table is used.
4098
7215de24
AD
40992001-12-10 Akim Demaille <akim@epita.fr>
4100
4101 * src/LR0.h (first_shift, first_reduction): Remove.
4102 * src/lalr.c: Don't use first_shift: find shifts through the
4103 states.
4104
80e25d4d
AD
41052001-12-10 Akim Demaille <akim@epita.fr>
4106
4107 * src/LR0.c: Attach shifts to states as soon as they are
4108 computed.
4109 * src/lalr.c (set_state_table): Instead of assigning shifts to
4110 state, just assert that the mapping was properly done.
4111
0ab3728b
AD
41122001-12-10 Akim Demaille <akim@epita.fr>
4113
4114 * src/LR0.c (insert_start_shift): Rename as...
4115 (insert_start_shifting_state): this.
4116 (insert_eof_shifting_state, insert_accepting_state): New.
4117 (augment_automaton): Adjust.
4118 Better locality of the variables.
4119 When looking if the start_symbol is shifted from the initial
4120 state, using `while (... symbol != start_symbol ...)' sounds
4121 better than `while (... symbol < start_symbol ...)': If fail
4122 to see how the order between symbols could be relevant!
4123
78af9bbc
AD
41242001-12-10 Akim Demaille <akim@epita.fr>
4125
4126 * src/getargs.h: Don't declare `spec_name_prefix' and
4127 `spec_file_prefix', declared by src/files.h.
4128 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
4129 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
4130 * src/output.c (prepare): Adjust.
4131 * src/reader.c (symbols_output): Likewise.
4132 * src/vmsgetargs.c: Vaguely adjust, but who cares?
4133
bdef2a41
AD
41342001-12-10 Akim Demaille <akim@epita.fr>
4135
4136 * src/muscle_tab.c (muscle_init): NULL is a better default than
4137 `"0"'.
4138
3735969c
AD
41392001-12-10 Akim Demaille <akim@epita.fr>
4140
4141 * src/reader.c (reader): Calling symbols_output once is enough.
4142
49701457
AD
41432001-12-10 Akim Demaille <akim@epita.fr>
4144
4145 Now that states have a complete set of members, the linked list of
4146 reductions is useless: just fill directly the state's reductions
4147 member.
4148
4149 * src/state.h (struct reductions): Remove member `number' and
4150 `next'.
4151 * src/LR0.c (first_reduction, last_reduction): Remove.
4152 (save_reductions): Don't link the new reductions, store them in
4153 this_state.
4154 * src/lalr.c (set_state_table): No need to attach reductions to
4155 states, it's already done.
4156 * src/output.c (output_actions): No longer free the shifts, then
4157 the reductions, then the states: free all the states and their
4158 members.
4159
0edad749
AD
41602001-12-10 Akim Demaille <akim@epita.fr>
4161
4162 * src/options.c (OPTN, DRTV, BOTH): New.
4163 (option_table): Use them.
4164
0edad749
AD
4165 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
4166 the job of system.h.
4167 * src/options.c: Don't include stdio.h and xalloc.h for the same
4168 reasons.
4169
5449dd0f
AD
41702001-12-10 Akim Demaille <akim@epita.fr>
4171
4172 * src/output.c (output, prepare): Make sure the values of the
4173 muscles `action' and `prologue' are 0-terminated.
4174
a870c567
AD
41752001-12-10 Akim Demaille <akim@epita.fr>
4176
4177 Clean up GCC warnings.
4178
4179 * src/reader.c (copy_action): `buf' is not used.
4180 (parse_skel_decl): Be static.
4181 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
4182 * src/options.h (create_long_option_table): Have a real prototype.
4183 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
4184 (hash_delete_at): Return const void *.
4185 Adjust casts to preserve the const.
4186
80df8768
AD
41872001-12-10 Akim Demaille <akim@epita.fr>
4188
4189 * configure.in: Require 2.52g.
4190 M4 is not needed, but AUTOM4TE is.
4191 * m4/m4.m4: Remove.
4192 * tests/Makefile.am: Adjust.
4193
f693ad14
AD
41942001-12-10 Akim Demaille <akim@epita.fr>
4195
4196 One structure for states is enough, even though theoretically
4197 there are LR(0) states and LALR(1) states.
4198
4199 * src/lalr.h (state_t): Remove.
4200 (state_table): Be state_t **, not state_t *.
4201 * src/state.h (core, CORE_ALLOC): Rename as...
4202 (state_t, STATE_ALLOC): this.
4203 Add the LALR(1) members: shifts, reductions, errs.
4204 * src/LR0.c (state_table): Rename as...
4205 (state_hash): this, to avoid name clashes with the global
4206 `state_table'.
4207 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
4208 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
4209
74ffbcb6
AD
42102001-12-10 Akim Demaille <akim@epita.fr>
4211
4212 Bison dumps core on bash.y.
4213 Reported by Pascal Bart.
4214
4215 * src/warshall.c (bitmatrix_print): New.
4216 (TC): Use it.
4217 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
4218 j must be the outer loop.
4219 * tests/regression.at (Broken Closure): New.
4220
07708e19
AD
42212001-12-05 Akim Demaille <akim@epita.fr>
4222
4223 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
4224 its argument.
4225