]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Be consistent about 'bool'.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-10-22 Akim Demaille <akim@epita.fr>
2
3 * data/README: New.
4
52002-10-21 Paul Eggert <eggert@twinsun.com>
6
7 Be consistent about 'bool'; the old code used an enum in one
8 module and an int in another, and this violates the C standard.
9 * m4/stdbool.m4: New file, from coreutils 4.5.3.
10 * configure.ac (AC_HEADER_STDBOOL): Add.
11 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
12 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
13 * src/symtab.c (hash_compare_symbol_t): Likewise.
14 * src/system.h (bool, false, true): Use a definition consistent
15 with ../lib/hash.c. All uses changed.
16
17 * src/complain.c (warning_issued): Renamed from warn_message_count,
18 so that we needn't worry about integer overflow (!).
19 Now of type bool. All uses changed.
20 (complaint_issued): Renamed from complain_message_count; likewise.
21
22 * src/main.c (main): Use exit to exit with failure.
23
24 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
25 rather than 1 and 0.
26 * src/main.c (main): Likewise.
27 * src/getargs.c (getargs): Likewise.
28 * src/reader.c (reader): Likewise.
29
30 * src/getarg.c (getargs): Remove duplicate code for
31 "Try `bison --help'".
32
33 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
34 What was that "2" for?
35
36 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
37 * src/getargs.c (usage): Likewise.
38
39 * src/getargs.c (getargs): When there are too few operands, report
40 the last one. When there are too many, report the first extra
41 one. This is how diffutils does it.
42
432002-10-20 Paul Eggert <eggert@twinsun.com>
44
45 Remove K&R vestiges.
46 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
47 * src/complain.c (VA_START): Remove. Assume prototypes.
48 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
49 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
50 fatal): Assume prototypes.
51 * src/complain.h: Assume prototypes.
52 * src/system.h (PARAMS): Remove.
53 Include <limits.h> unconditionally, since it's guaranteeed even
54 for a freestanding C89 compiler.
55 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
56 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
57
582002-10-20 Akim Demaille <akim@epita.fr>
59
60 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
61 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
62 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
63 (yyresolveStates, yyresolveAction, yyresolveStack)
64 (yyprocessOneStack): Use them.
65 (yy_reduce_print): New.
66 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
67
682002-10-20 Akim Demaille <akim@epita.fr>
69
70 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
71 arguments and output `void'.
72 (b4_c_function): Rename as...
73 (b4_c_function_def): this.
74 (b4_c_function_decl, b4_c_ansi_function_def)
75 (b4_c_ansi_function_decl): New.
76 Change the interpretation of the arguments: before `int, foo', now
77 `int foo, foo'.
78 * data/yacc.c (yyparse): Prototype and define thanks to these.
79 Adjust b4_c_function_def uses.
80 * data/glr.c (yyparse): Likewise, but ANSI only.
81
822002-10-20 Akim Demaille <akim@epita.fr>
83
84 * src/output.c (prepare): Move the definition of `tokens_number',
85 `nterms_number', `undef_token_number', `user_token_number_max'
86 to...
87 (prepare_tokens): Here.
88 (prepare_tokens): Rename as...
89 (prepare_symbols): this.
90 (prepare): Move the definition of `rules_number' to...
91 (prepare_rules): here.
92 (prepare): Move the definition of `last', `final_state_number',
93 `states_number' to...
94 (prepare_states): here.
95 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
96
972002-10-20 Akim Demaille <akim@epita.fr>
98
99 * src/tables.h, src/tables.c, src/output.c: Comment changes.
100
1012002-10-20 Akim Demaille <akim@epita.fr>
102
103 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
104 * data/c.m4: here.
105
1062002-10-20 Akim Demaille <akim@epita.fr>
107
108 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
109 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
110 `pair'.
111 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
112 `name' to...
113 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
114 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
115 These.
116
1172002-10-19 Paul Eggert <eggert@twinsun.com>
118
119 Do not create a temporary file, as that involves security and
120 cleanup headaches. Instead, use a pair of pipes.
121 Derived from a suggestion by Florian Krohm.
122 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
123 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
124 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
125 (BISON_PREREQ_SUBPIPE): Add.
126 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
127 Add subpipe.h, subpipe.c.
128 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
129 * po/POTFILES.in: Add lib/subpipe.c.
130 * src/output.c: Include "subpipe.h".
131 (m4_invoke): Remove decl.
132 (scan_skel): New decl.
133 (output_skeleton): Use pipe rather than temporary file for m4 input.
134 Check that m4sugar.m4 is readable, to avoid deadlock.
135 Check for pipe I/O error.
136 * src/scan-skel.l (readpipe): Remove decl.
137 (scan_skel): New function, to be used in place of m4_invoke.
138 Read from stream rather than file.
139
140 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
141 float, as this generates a warning on Solaris 8 + GCC 3.2 with
142 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
143 this generates a more-accurate value anyway.
144
145 * lib/timevar.c (timervar_accumulate): Rename locals to
146 avoid confusion with similarly-named more-global.
147 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
148
149 * src/output.c (prepare): Use xstrdup to convert char const *
150 to char *, to avoid GCC warning.
151
1522002-10-19 Akim Demaille <akim@epita.fr>
153
154 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
155 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
156 Use them to have `calc.y' ready for %pure-parser.
157 * data/yacc.c (YYLEX): Pass a yylex return type to
158 b4_c_function_call.
159
1602002-10-19 Akim Demaille <akim@epita.fr>
161
162 Prototype support of %lex-param and %parse-param.
163
164 * src/parse-gram.y: Add the definition of the %lex-param and
165 %parse-param tokens, plus their rules.
166 Drop the `_' version of %glr-parser.
167 Add the "," token.
168 * src/scan-gram.l (INITIAL): Scan them.
169 * src/muscle_tab.c: Comment changes.
170 (muscle_insert, muscle_find): Rename `pair' as `probe'.
171 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
172 (muscle_entry_s): The `value' member is no longer const.
173 Adjust all dependencies.
174 * src/muscle_tab.c (muscle_init): Adjust: use
175 MUSCLE_INSERT_STRING.
176 Initialize the obstack earlier.
177 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
178 (muscle_pair_list_grow): New.
179 * data/c.m4 (b4_c_function_call, b4_c_args): New.
180 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
181 * tests/calc.at: Use %locations, not --locations.
182 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
183
1842002-10-19 Akim Demaille <akim@epita.fr>
185
186 * src/getargs.c (usage): Take status as argument and exit
187 accordingly.
188 Report the traditional `Try ... --help' message when status != 0.
189 (usage, version): Don't take a FILE * as arg, it is pointless.
190 (getargs): When there is an incorrect number of arguments, make it
191 an error, and report it GNUlically thanks to `usage ()'.
192
1932002-10-18 Paul Eggert <eggert@twinsun.com>
194
195 * data/glr.c (yyreportParseError): Don't assume that sprintf
196 yields the length of the printed string, as this is not true
197 on SunOS 4.1.4. Reported by Peter Klein.
198
199 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
200 * tests/conflicts.at (%nonassoc and eof): Likewise.
201 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
202
2032002-10-17 Akim Demaille <akim@epita.fr>
204
205 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
206 * src/getargs.c (trace_types, trace_args): Adjust.
207 * src/reader.c (grammar_current_rule_prec_set)
208 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
209 Standardize error messages.
210 And s/@prec/%prec/!
211 (reader): Use trace_flag to enable scanner/parser debugging,
212 instead of an adhoc scheme.
213 * src/scan-gram.l: Remove trailing debugging code.
214
2152002-10-16 Paul Eggert <eggert@twinsun.com>
216
217 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
218 MUSCLE_TAB_H.
219
220 * NEWS: Officially drop support for building Bison with K&R C,
221 since it didn't work anyway and it's not worth worrying about.
222 * Makefile.maint (wget_files): Remove ansi2knr.c.
223 (ansi2knr.c-url_prefix): Remove.
224 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
225 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
226 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
227
2282002-10-15 Paul Eggert <eggert@twinsun.com>
229
230 Stop using the "enum_" trick for K&R-style function definitions;
231 it confused me, and I was the author! Instead, assume that people
232 who want to use K&R C compilers (when using these modules in GCC,
233 perhaps?) will run ansi2knr.
234
235 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
236 All uses of "enum_" changed to "enum ".
237 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
238 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
239
240 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
241 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
242 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
243 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
244 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
245 abitset_not, abitset_ones, abitset_or, abitset_or_and,
246 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
247 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
248 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
249 Use function prototypes; this removes the need for declaring
250 static functions simply to provide their prototypes.
251 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
252 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
253 bitset_count_, bitset_create, bitset_dump, bitset_first,
254 bitset_free, bitset_init, bitset_last, bitset_next,
255 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
256 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
257 bitset_print, bitset_release_memory, bitset_toggle_,
258 bitset_type_choose, bitset_type_get, bitset_type_name_get,
259 debug_bitset): Likewise.
260 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
261 * lib/bitset_stats.c (bitset_log_histogram_print,
262 bitset_percent_histogram_print, bitset_stats_and,
263 bitset_stats_and_cmp, bitset_stats_and_or,
264 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
265 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
266 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
267 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
268 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
269 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
270 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
271 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
272 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
273 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
274 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
275 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
276 bitset_stats_zero): Likewise.
277 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
278 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
279 bitsetv_dump, debug_bitsetv): Likewise.
280 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
281 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
282 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
283 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
284 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
285 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
286 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
287 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
288 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
289 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
290 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
291 Likewise.
292 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
293 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
294 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
295 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
296 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
297 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
298 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
299 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
300 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
301 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
302 lbitset_xor_cmp, lbitset_zero): Likewise.
303
3042002-10-14 Akim Demaille <akim@epita.fr>
305
306 Version 1.75.
307
3082002-10-14 Akim Demaille <akim@epita.fr>
309
310 * tests/Makefile.am (maintainer-check-posix): New.
311
3122002-10-14 Akim Demaille <akim@epita.fr>
313
314 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
315 member.
316
3172002-10-14 Akim Demaille <akim@epita.fr>
318
319 * src/tables.c (table_ninf_remap): base -> tab.
320 Reported by Matt Rosing.
321
3222002-10-14 Paul Eggert <eggert@twinsun.com>
323
324 * tests/action.at, tests/calc.at, tests/conflicts.at,
325 tests/cxx-type.at, tests/headers.at, tests/input.at,
326 tests/regression.at, tests/synclines.at, tests/torture.at:
327 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
328 so that the tests still work even if POSIXLY_CORRECT is set.
329 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
330
331 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
332 for portability to K&R hosts. Fix typo: signed char is guaranteed
333 only to 127, not to 128.
334 * data/glr.c (yysigned_char): New type.
335 * data/yacc.c (yysigned_char): Likewise.
336 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
337
3382002-10-13 Paul Eggert <eggert@twinsun.com>
339
340 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
341 true due to limited range of data type" warning from GCC.
342
343 * data/c.m4 (b4_token_defines): Protect against double-inclusion
344 by wrapping enum yytokentype's definition inside #ifndef
345 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
346
3472002-10-13 Akim Demaille <akim@epita.fr>
348
349 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
350 Un yy- yyrhs to avoid the name clash with the global YYRHS.
351
3522002-10-13 Akim Demaille <akim@epita.fr>
353
354 * Makefile.maint: Update from Autoconf 2.54.
355 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
356
3572002-10-13 Akim Demaille <akim@epita.fr>
358
359 * src/print.c (print_state): Separate the list of solved conflicts
360 from the other items.
361 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
362
3632002-10-13 Akim Demaille <akim@epita.fr>
364
365 Let nondeterministic skeletons be usable with deterministic
366 tables.
367
368 With the patch, GAWK compiled by GCC without -O2 passes its test
369 suite using a GLR parser driven by LALR tables. It fails with -O2
370 because `struct stat' gives two different answers on my machine:
371 88 (definition of an auto var) and later 96 (memset on this var).
372 Hence the stack is badly corrumpted. The headers inclusion is to
373 blame: if I move the awk.h inclusion before GLR's system header
374 inclusion, the two struct stat have the same size.
375
376 * src/tables.c (pack_table): Always create conflict_table.
377 (token_actions): Always create conflict_list.
378 * data/glr.c (YYFLAG): Remove, unused.
379
3802002-10-13 Akim Demaille <akim@epita.fr>
381
382 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
383 (O0FLAGS): New.
384 (VALGRIND, GXX): New.
385 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
386 * tests/bison.in: Run $PREBISON a pre-command.
387 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
388 (maintainer-check-g++): New.
389 * Makefile.am (maintainer-check): New.
390
3912002-10-13 Akim Demaille <akim@epita.fr>
392
393 * data/glr.c: Formatting changes.
394 Tweak some trace messages to match yacc.c's.
395
3962002-10-13 Akim Demaille <akim@epita.fr>
397
398 GLR parsers sometimes raise parse errors instead of performing the
399 default reduction.
400 Reported by Charles-Henry de Boysson.
401
402 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
403 check the length of the traces when %glr.
404 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
405 GLR's traces.
406 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
407 Test GLR parsers.
408 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
409 (yyltype): Remove the yy prefix from the member names.
410 (yytable): Complete its comment.
411 (yygetLRActions): Map error action number from YYTABLE from
412 YYTABLE_NINF to 0.
413 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
414 (which was a bug: it should have been YYTABEL_NINF, and yet it was
415 not satisfying as we could compare an YYACTION computed from
416 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
417 only value for error actions.
418 (yyreportParseError): In verbose parse error messages, don't issue
419 `error' in the list of expected tokens.
420 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
421 next action to perform to match glr.c's decoding.
422 (yytable): Complete its comment.
423
4242002-10-13 Paul Eggert <eggert@twinsun.com>
425
426 Fix problem reported by Henrik Grubbstroem in
427 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
428 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
429 because the Bison parser reads the second action before reducing
430 the first one.
431 * src/scan-gram.l (rule_length): New static var.
432 Use it to keep track of the rule length in the scanner, since
433 we can't expect the parser to be in lock-step sync with the scanner.
434 (handle_action_dollar, handle_action_at): Use this var.
435 * tests/actions.at (Exotic Dollars): Test for the problem.
436
4372002-10-12 Paul Eggert <eggert@twinsun.com>
438
439 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
440 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
441 Include <sys/time.h> when checking for clock_t and struct tms.
442 Use same include order as source.
443 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
444 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
445
446 * lib/timevar.c: Update copyright date and clarify comments.
447 (get_time) [IN_GCC]: Keep the GCC version for reference.
448
449 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
450 GCC version as of today, then merge Bison's changes.
451 Change "GCC" to "Bison" in copyright notice. timevar.def's
452 author is Akim, so change that too.
453
454 * src/reader.c (grammar_current_rule_check):
455 Don't worry about the default action if $$ is untyped.
456 Prevents bogus warnings reported by Jim Gifford in
457 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
458
459 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
460 * data/glr.c, data/lalr1.cc, data/yacc.c:
461 Output token definitions before the first part of user declarations.
462 Fixes compatibility problem reported by Jim Gifford for kbd in
463 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
464
4652002-10-11 Paul Eggert <eggert@twinsun.com>
466
467 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
468 (yyparse): here. This undoes some of the 2002-07-25 change.
469 Compatibility problem reported by Ralf S. Engelschall with
470 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
471
4722002-10-11 Akim Demaille <akim@epita.fr>
473
474 * tests/regression.at Characters Escapes): New.
475 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
476 characters.
477 Reported by Jan Nieuwenhuizen.
478
4792002-10-11 Akim Demaille <akim@epita.fr>
480
481 * po/id.po: New.
482
4832002-10-10 Paul Eggert <eggert@twinsun.com>
484
485 Portability fixes for bitsets; this also avoids several GCC
486 warnings.
487
488 * lib/abitset.c: Include <stddef.h>, for offsetof.
489 * lib/lbitset.c: Likewise.
490
491 * lib/abitset.c (abitset_bytes): Return a size that is aligned
492 properly for vectors of objects. Do not assume that adding a
493 header size to a multiple of a word size yields a value that is
494 properly aligned for the whole union.
495 * lib/bitsetv.c (bitsetv_alloc): Likewise.
496
497 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
498 unique names for structures.
499 * lib/ebitset.c (ebitset_bytes): Likewise.
500 * lib/lbitset.c (lbitset_bytes): Likewise.
501
502 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
503 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
504 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
505 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
506 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
507 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
508 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
509 to improve the type-checking that GCC can do.
510 * lib/bitset.c (bitset_op4_cmp): Likewise.
511 * lib/bitset_stats.c (bitset_stats_count,
512 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
513 bitset_stats_copy, bitset_stats_disjoint_p,
514 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
515 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
516 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
517 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
518 bitset_stats_and_or_cmp, bitset_stats_andn_or,
519 bitset_stats_andn_or_cmp, bitset_stats_or_and,
520 bitset_stats_or_and_cmp): Likewise.
521 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
522 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
523 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
524 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
525
526 * lib/abitset.h: Include bitset.h, not bbitset.h.
527 * lib/ebitset.h: Likewise.
528 * lib/lbitset.h: Likewise.
529
530 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
531 All instances of parameters of type enum bitset_opts are now of
532 type enum_bitset_opts, to conform to the C Standard, and similarly
533 for enum_bitset_type.
534 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
535 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
536
537 Do not use "struct bitset_struct" to mean different things in
538 different modules. Not only is this confusing, it violates
539 the C Standard, which requires that structure types in different
540 modules must be compatible if one is to be passed to the other.
541 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
542 All instances of "struct bitset_struct *" replaced with "bitset".
543 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
544 (union bitset_union, struct abitset_struct, struct ebitset_struct,
545 struct lbitset_struct, struct bitset_stats_struct): New types.
546 All uses of struct bitset_struct changed to union bitset_union,
547 etc.
548 * lib/abitset.c (struct abitset_struct, abitset,
549 struct bitset_struct): Remove.
550 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
551 struct bitset_struct): Remove.
552 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
553 bitset_struct): Remove.
554 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
555 Likewise.
556
557 Do not call a function of type T using a call that assumes the
558 function is of a different type U. Standard C requires that a
559 function must be called with a type that is compatible with its
560 definition.
561 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
562 New decls.
563 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
564 New functions.
565 * lib/ebitset.c (PFV): Remove.
566 * lib/lbitset.c (PFV): Likewise.
567 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
568 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
569 decls.
570 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
571 (ebitset_vtable): Use them.
572 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
573 lbitset_xor): New functions.
574 (lbitset_vtable): Use them.
575
576 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
577 Declare.
578
579 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
580 GCC warning.
581 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
582 Use offsetof, for simplicity.
583
5842002-10-06 Paul Eggert <eggert@twinsun.com>
585
586 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
587 the same width as int. This reapplies a hunk of the 2002-08-12 patch
588 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
589 which was inadvertently undone by the 2002-09-30 patch.
590 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
591 the same width as int.
592
5932002-10-04 Paul Eggert <eggert@twinsun.com>
594
595 Version 1.50.
596
597 * configure.ac (AC_INIT), NEWS: Increment version number.
598
599 * doc/bison.texinfo: Minor spelling, grammar, and white space
600 fixes.
601 (Symbols): Mention that any negative value returned from yylex
602 signifies end-of-input. Warn about negative chars. Mention
603 the portable Standard C character set.
604
605 The GNU coding standard says CFLAGS and YFLAGS are reserved
606 for the installer to set.
607 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
608 * src/Makefile.am (AM_CFLAGS): Likewise.
609 (AM_YFLAGS): Renamed from YFLAGS.
610
611 Fix some MAX and MIN problems.
612 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
613 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
614 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
615 * src/reader.c (reader): Use it.
616
617 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
618 POSIX 1003.1-2001 has removed fgrep.
619
6202002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
621
622 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
623 interpreted as signed.
624 * lib/ebitset.c (ebitset_list): Fix bug.
625
6262002-10-01 Paul Eggert <eggert@twinsun.com>
627
628 More fixes for 64-bit hosts and large bitsets.
629
630 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
631 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
632 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
633 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
634 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
635 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
636 bitset_count_): Likewise.
637 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
638 bitset_first, bitset_last): Likewise.
639 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
640 bitset_stats_list_reverse, bitset_stats_size,
641 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
642 Likewise.
643 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
644 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
645 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
646 bitsetv_reflexive_transitive_closure): Likewise.
647 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
648 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
649 Likewise.
650 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
651 Likewise.
652
653 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
654 Use size_t, not unsigned int, to count bytes.
655 * lib/abitset.h (abitset_bytes): Likewise.
656 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
657 Likewise.
658 * lib/bitset.h (bitset_bytes): Likewise.
659 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
660 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
661 * lib/bitsetv.c (bitsetv_alloc): Likewise.
662 * lib/ebitset.c (ebitset_bytes): Likewise.
663 * lib/ebitset.h (ebitset_bytes): Likewise.
664 * lib/lbitset.c (lbitset_bytes): Likewise.
665 * lib/lbitset.h (lbitset_bytes): Likewise.
666
667 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
668 abitset_subset_p, abitset_disjoint_p, abitset_and,
669 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
670 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
671 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
672 abitset_or_and, abitset_or_and_cmp):
673 Use bitset_windex instead of unsigned int.
674 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
675 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
676 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
677 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
678 Likewise.
679 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
680
681 * lib/bitset.c (bitset_print):
682 Use proper printf formats for widths of integer types.
683 * lib/bitset_stats.c (bitset_percent_histogram_print,
684 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
685 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
686 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
687 * lib/lbitset.c (lbitset_bytes): Likewise.
688
689 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
690 BITSET_SIZE_MAX): New macros.
691 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
692 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
693 to BITSET_WINDEX_MAX.
694
695 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
696 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
697 since we now return the bitset_bindex type (not int).
698
699 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
700 when computing sizes.
701 * lib/ebitset.c (ebitset_elts_grow): Likewise.
702
703 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
704 and avoid cast to unsigned.
705
7062002-09-30 Akim Demaille <akim@epita.fr>
707
708 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
709 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
710 Updates from Michael Hayes.
711
7122002-09-30 Art Haas <ahaas@neosoft.com>
713
714 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
715 invocations.
716 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
717 defined.
718
7192002-09-27 Akim Demaille <akim@epita.fr>
720
721 Version 1.49c.
722
7232002-09-27 Akim Demaille <akim@epita.fr>
724
725 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
726 (Because of AC_LIBSOURCE).
727
7282002-09-27 Akim Demaille <akim@epita.fr>
729
730 Playing with Autoscan.
731
732 * configure.ac: Remove the old LIBOBJ tweaks.
733 (AC_REPLACE_FUNCS): Add strrchr and strtol.
734 * lib/strrchr.c: New.
735 * lib/strtol.c: New, from the Coreutils 4.5.1.
736
7372002-09-27 Akim Demaille <akim@epita.fr>
738
739 Playing with Autoscan.
740
741 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
742 * lib/Makefile.am (libbison_a_SOURCES): No longer include
743 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
744 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
745 Coreutils 4.5.1.
746
7472002-09-24 Akim Demaille <akim@epita.fr>
748
749 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
750 (Frequently Asked Questions, Parser Stack Overflow): New.
751
7522002-09-13 Akim Demaille <akim@epita.fr>
753
754 Playing with autoscan.
755
756 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
757 * src/files.c (skeleton_find): Remove, unused.
758 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
759 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
760
7612002-09-13 Akim Demaille <akim@epita.fr>
762
763 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
764 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
765
7662002-09-13 Akim Demaille <akim@epita.fr>
767
768 * configure.ac: Require 2.54.
769 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
770 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
771 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
772 Remove, provided by Autoconf macros.
773
7742002-09-12 Akim Demaille <akim@epita.fr>
775
776 * m4/prereq.m4: Update, from Coreutils 4.5.1.
777
7782002-09-12 Akim Demaille <akim@epita.fr>
779
780 * m4/prereq.m4: Update, from Fileutils 4.1.5.
781 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
782 Reported by Martin Mokrejs.
783
7842002-09-10 Akim Demaille <akim@epita.fr>
785
786 * src/parse-gram.y: Associate a human readable string to each
787 token type.
788 * tests/regression.at (Invalid inputs): Adjust.
789
7902002-09-10 Gary V. Vaughan <gary@gnu.org>
791
792 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
793 with an Autoconf-2.5x style configure.ac.
794
7952002-09-06 Paul Eggert <eggert@twinsun.com>
796
797 * doc/bison.texinfo (Conditions): Make explicit that the GPL
798 exception applies only to yacc.c. This is a modification of a
799 patch originally suggested by Akim Demaille.
800
8012002-09-06 Akim Demaille <akim@epita.fr>
802
803 * data/c.m4 (b4_copyright): Move the GPL exception comment from
804 here to...
805 * data/yacc.c: here.
806
807 * data/lalr1.cc (struct yyltype): Don't define it, since we use
808 LocationType.
809 (b4_ltype): Default to yy::Location from location.hh.
810
8112002-09-04 Jim Meyering <jim@meyering.net>
812
813 * data/yacc.c: Guard the declaration of yytoknum also with
814 `#ifdef YYPRINT', so it is declared only when used.
815
8162002-09-04 Akim Demaille <akim@epita.fr>
817
818 * configure.in: Rename as...
819 * configure.ac: this.
820 Bump to 1.49c.
821
8222002-09-04 Akim Demaille <akim@epita.fr>
823
824 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
825 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
826 translate maintainer only messages.
827
8282002-08-12 Paul Eggert <eggert@twinsun.com>
829
830 Version 1.49b.
831
832 * Makefile.am (SUBDIRS): Remove intl.
833 (DISTCLEANFILES): Remove.
834 * NEWS: Mention that GNU M4 is now required. Clarify what is
835 meant by "larger grammars". Mention the pt_BR translation.
836 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
837 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
838 Bump version from 0.11.2 to 0.11.5.
839 (BISON_PREREQ_STAGE): Remove.
840 (AM_GNU_GETTEXT): Use external gettext.
841 (AC_OUTPUT): Remove intl/Makefile.
842
843 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
844
845 * data/glr.c: Include string.h, for strlen.
846 (yyreportParseError): Use size_t for yysize.
847 (yy_yypstack): No longer nested inside yypstates, as nested
848 functions are not portable. Do not assume size_t is the
849 same width as int.
850 (yypstates): Do not assume that ptrdiff_t is the same width
851 as int, and similarly for yyposn and YYINDEX.
852
853 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
854
855 * lib/Makefile.am (INCLUDES): Do not include from the intl
856 directory, which has been removed.
857 * src/Makefile.am (INCLUDES): Likewise.
858
859 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
860 (bitsets_sources, additional_bitsets_sources, timevars_sources):
861 New vars.
862
863 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
864 * tests/Makefile.am (EXTRA_DIST): Likewise.
865
866 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
867 Do not assume that bitset_windex is the same width as unsigned.
868
869 * lib/abitset.c (abitset_unused_clear): Do not assume that
870 bitset_word is the same width as int.
871 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
872 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
873 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
874 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
875 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
876
877 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
878 portability to one's complement hosts!).
879 * lib/ebitset.c (ebitset_op1): Likewise.
880 * lib/lbitset.c (lbitset_op1): Likewise.
881
882 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
883 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
884 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
885 Sync with fileutils.
886 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
887 lib/gettext.h: Sync with diffutils.
888
889 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
890 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
891
892 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
893 PROTOTYPES to check for prototypes, and "defined __STDC__" to
894 check for void *.
895
896 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
897 size_t; the old version tried to do this but casted improperly.
898 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
899 (bitset_test): Now returns int, not unsigned long.
900
901 * lib/bitset_stats.c: Include "gettext.h".
902 (_): New macro.
903 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
904 name locals "index", as it generates unnecessary warnings on some
905 hosts that have an "index" function.
906
907 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
908 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
909 they need translation.
910 * src/LR0.c (state_list_append, new_itemsets, get_state,
911 append_states, generate_states): Likewise.
912 * src/assoc.c (assoc_to_string): Likewise.
913 * src/closure.c (print_closure, set_firsts, closure): Likewise.
914 * src/gram.c (grammar_dump): Likewise.
915 * src/injections.c (injections_compute): Likewise.
916 * src/lalr.c (lookaheads_print): Likewise.
917 * src/relation.c (relation_transpose): Likewise.
918 * src/scan-gram.l: Likewise.
919 * src/tables.c (table_grow, pack_vector): Likewise.
920
921 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
922 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
923 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
924 * m4/mbstate_t.m4: Sync with fileutils.
925 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
926
927 * po/LINGUAS: Add pt_BR.
928 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
929 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
930 lib/timevar.c.
931 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
932 manual recommends.
933 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
934
935 * src/complain.c (strerror_r): Remove decl; not needed.
936 (strerror): Use same pattern as ../lib/error.c.
937
938 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
939
940 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
941
942 * src/main.c (main): Cast result of bindtextdomain and textdomain
943 to void, to avoid a GCC warning when --disable-nls is in effect.
944
945 * src/scan-gram.l: Use strings rather than escapes when possible,
946 to minimize the number of warnings from xgettext.
947 (handle_action_dollar, handle_action_at): Don't use isdigit,
948 as it mishandles negative chars and it may not work as expected
949 outside the C locale.
950
951 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
952 this is a GCC extension and is not portable to other compilers.
953
954 * src/system.h (alloca): Use same pattern as ../lib/error.c.
955 Do not include <ctype.h>; no longer needed.
956 Do not include <malloc.h>; no longer needed (and generates
957 warnings on OpenBSD 3.0).
958
959 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
960 it's not portable.
961
962 * tests/regression.at: Do not use 'cc -c input.c -o input';
963 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
964
965 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
966 exit status as failure, not just exit status 1. Sun C exits
967 with status 2 sometimes.
968
969 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
970 Use it for the two large tests.
971
9722002-08-02 Akim Demaille <akim@epita.fr>
973
974 * src/conflicts.c (conflicts_output): Don't output rules never
975 reduced here, since anyway that computation doesn't work.
976 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
977 (rule_useless_p, rule_never_reduced_p): New.
978 (grammar_rules_partial_print): Use a filter instead of a range.
979 Display the title only if needed.
980 (grammar_rules_print): Adjust.
981 (grammar_rules_never_reduced_report): New.
982 * src/tables.c (action_row): Move the computation of rules never
983 reduced to...
984 (token_actions): here.
985 * src/main.c (main): Make the parser before making the report, so
986 that rules never reduced are computed.
987 Call grammar_rules_never_reduced_report.
988 * src/print.c (print_results): Report rules never reduced.
989 * tests/conflicts.at, tests/reduce.at: Adjust.
990
9912002-08-01 Akim Demaille <akim@epita.fr>
992
993 Instead of attaching lookaheads and duplicating the rules being
994 reduced by a state, attach the lookaheads to the reductions.
995
996 * src/state.h (state_t): Remove the `lookaheads',
997 `lookaheads_rule' member.
998 (reductions_t): Add a `lookaheads' member.
999 Use a regular array for the `rules'.
1000 * src/state.c (reductions_new): Initialize the lookaheads member
1001 to 0.
1002 (state_rule_lookaheads_print): Adjust.
1003 * src/state.h, src/state.c (state_reductions_find): New.
1004 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
1005 (count_rr_conflicts): Adjust.
1006 * src/lalr.c (LArule): Remove.
1007 (add_lookback_edge): Adjust.
1008 (state_lookaheads_count): New.
1009 (states_lookaheads_initialize): Merge into...
1010 (initialize_LA): this.
1011 (lalr_free): Adjust.
1012 * src/main.c (main): Don't free nullable and derives too early: it
1013 is used by --verbose.
1014 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
1015
10162002-08-01 Akim Demaille <akim@epita.fr>
1017
1018 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
1019 `rule_number_t**'.
1020 (set_derives, free_derives): Rename as...
1021 (derives_compute, derives_free): this.
1022 Adjust all dependencies.
1023 * src/nullable.c (set_nullable, free_nullable): Rename as...
1024 (nullable_compute, nullable_free): these.
1025 (rule_list_t): Store rule_t *, not rule_number_t.
1026 * src/state.c (state_rule_lookaheads_print): Directly compare rule
1027 pointers, instead of their numbers.
1028 * src/main.c (main): Call nullable_free, and derives_free earlier,
1029 as they were lo longer used.
1030
10312002-08-01 Akim Demaille <akim@epita.fr>
1032
1033 * lib/timevar.c (get_time): Include children time.
1034 * src/lalr.h (LA, LArule): Don't export them: used with the
1035 state_t.
1036 * src/lalr.c (LA, LArule): Static.
1037 * src/lalr.h, src/lalr.c (lalr_free): New.
1038 * src/main.c (main): Call it.
1039 * src/tables.c (pack_vector): Check whether loc is >= to the
1040 table_size, not >.
1041 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
1042 (tables_generate): do it, since that's also it which allocates
1043 them.
1044 Don't free LA and LArule, main does.
1045
10462002-07-31 Akim Demaille <akim@epita.fr>
1047
1048 Separate parser tables computation and output.
1049
1050 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
1051 (conflict_list, conflict_list_cnt, table, check, table_ninf)
1052 (yydefgoto, yydefact, high): Move to...
1053 * src/tables.h, src/tables.c: here.
1054 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1055 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1056 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
1057 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
1058 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
1059 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
1060 (action_row, save_row, token_actions, save_column, default_goto)
1061 (goto_actions, sort_actions, matching_state, pack_vector)
1062 (table_ninf_remap, pack_table, prepare_actions): Move to...
1063 * src/tables.c: here.
1064 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
1065 * src/output.c (token_actions, output_base, output_conflicts)
1066 (output_check): Merge into...
1067 (prepare_actions): this.
1068 (actions_output): Rename as...
1069 (user_actions_output): this.
1070 * src/main.c (main): Call tables_generate and tables_free.
1071
10722002-07-31 Akim Demaille <akim@epita.fr>
1073
1074 Steal GCC's --time-report support.
1075
1076 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
1077 stolen/adjusted from GCC.
1078 * m4/stage.m4: Remove time related checks.
1079 * m4/timevar.m4: New.
1080 * configure.in: Adjust.
1081 * src/system.h: Adjust to using timevar.h.
1082 * src/getargs.h, src/getargs.c: Support trace_time for
1083 --trace=time.
1084 * src/main.c (stage): Remove.
1085 (main): Replace `stage' invocations with timevar calls.
1086 * src/output.c: Insert pertinent timevar calls.
1087
10882002-07-31 Akim Demaille <akim@epita.fr>
1089
1090 Let --trace have arguments.
1091
1092 * src/getargs.h (enum trace_e): New.
1093 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
1094 (long_options, short_options): --trace/-T takes an optional
1095 argument.
1096 Change all the uses of trace_flag to reflect the new flags.
1097 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
1098
1099 Strengthen `stage' portability.
1100
1101 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
1102 * configure.in: Use it.
1103 Don't check for malloc.h and sys/times.h.
1104 * src/system.h: Include them when appropriate.
1105 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
1106 times and struct tms are available.
1107
11082002-07-30 Akim Demaille <akim@epita.fr>
1109
1110 In verbose parse error message, don't report `error' as an
1111 expected token.
1112 * tests/actions.at (Printers and Destructors): Adjust.
1113 * tests/calc.at (Calculator $1): Adjust.
1114 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
1115 error message, do not report the parser accepts the error token in
1116 that state.
1117
11182002-07-30 Akim Demaille <akim@epita.fr>
1119
1120 Normalize conflict related messages.
1121
1122 * src/complain.h, src/complain.c (warn, complain): New.
1123 * src/conflicts.c (conflicts_print): Use them.
1124 (conflict_report_yacc): New, extracted from...
1125 (conflicts_print): here.
1126 * tests/conflicts.at, tests/existing.at: Adjust.
1127
11282002-07-30 Akim Demaille <akim@epita.fr>
1129
1130 Report rules which are never reduced by the parser: those hidden
1131 by conflicts.
1132
1133 * src/LR0.c (save_reductions): Don't make the final state too
1134 different: save its reduction (accept) instead of having a state
1135 without any action (no shift or goto, no reduce).
1136 Note: the final state is now a ``regular'' state, i.e., the
1137 parsers now contain `reduce 0' as default reduction.
1138 Nevertheless, since they decide to `accept' when yystate =
1139 final_state, they still will not reduce rule 0.
1140 * src/print.c (print_actions, print_reduction): Adjust.
1141 * src/output.c (action_row): Track reduced rules.
1142 (token_actions): Report rules never reduced.
1143 * tests/conflicts.at, tests/regression.at: Adjust.
1144
11452002-07-30 Akim Demaille <akim@epita.fr>
1146
1147 `stage' was accidently included in a previous patch.
1148 Initiate its autoconfiscation.
1149
1150 * configure.in: Look for malloc.h and sys/times.h.
1151 * src/main.c (stage): Adjust.
1152 Report only when trace_flag.
1153
11542002-07-29 Akim Demaille <akim@epita.fr>
1155
1156 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
1157 state_number_t.
1158 (errs_t): symbol_t*, not symbol_number_t.
1159 (reductions_t): rule_t*, not rule_number_t.
1160 (FOR_EACH_SHIFT): New.
1161 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
1162 * src/print.c, src/print_graph.c: Adjust.
1163
11642002-07-29 Akim Demaille <akim@epita.fr>
1165
1166 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
1167
1168 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
1169 (endtoken, accept): these.
1170 * src/reader.c (reader): Set endtoken's default tag to "$end".
1171 Set undeftoken's tag to "$undefined" instead of "$undefined.".
1172 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
1173 Adjust.
1174
11752002-07-29 Akim Demaille <akim@epita.fr>
1176
1177 * src/reduce.c (reduce_grammar): When the language is empty,
1178 complain about the start symbol, not the axiom.
1179 Use its location.
1180 * tests/reduce.at (Empty Language): New.
1181
11822002-07-26 Akim Demaille <akim@epita.fr>
1183
1184 * src/reader.h, src/reader.c (gram_error): ... can't get
1185 yycontrol without making too strong assumptions on the parser
1186 itself.
1187 * src/output.c (prepare_tokens): Use the real 0th value of
1188 token_translations instead of `0'.
1189 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
1190 visible here.
1191 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
1192 for the time being: %locations ought to provide it to yyerror.
1193
11942002-07-25 Akim Demaille <akim@epita.fr>
1195
1196 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
1197 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
1198 * tests/regression.at (Web2c Actions): Adjust.
1199
12002002-07-25 Akim Demaille <akim@epita.fr>
1201
1202 Stop storing rules from 1 to nrules + 1.
1203
1204 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
1205 * src/nullable.c, src/output.c, src/print.c, src/reader.c
1206 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
1207 Iterate from 0 to nrules.
1208 Use rule_number_as_item_number and item_number_as_rule_number.
1209 Adjust to `derive' now containing possibly 0.
1210 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
1211 Handle the `- 1' part in rule numbers from/to item numbers.
1212 * src/conflicts.c (log_resolution): Fix the message which reversed
1213 shift and reduce.
1214 * src/output.c (action_row): Initialize default_rule to -1.
1215 (token_actions): Adjust.
1216 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
1217 expected output.
1218 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
1219
12202002-07-25 Akim Demaille <akim@epita.fr>
1221
1222 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
1223 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
1224 (b4_c_knr_arg_decl): New.
1225 * data/yacc.c: Use it to define yysymprint, yydestruct, and
1226 yyreport_parse_error.
1227
12282002-07-25 Akim Demaille <akim@epita.fr>
1229
1230 * data/yacc.c (yyreport_parse_error): New, extracted from...
1231 (yyparse): here.
1232 (yydestruct, yysymprint): Move above yyparse.
1233 Be K&R compliant.
1234
12352002-07-25 Akim Demaille <akim@epita.fr>
1236
1237 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
1238 replace...
1239 (b4_sint_type, b4_uint_type): these.
1240 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
1241 * tests/regression.at (Web2c Actions): Adjust.
1242
12432002-07-25 Akim Demaille <akim@epita.fr>
1244
1245 * src/gram.h (TIEM_NUMBER_MAX): New.
1246 (item_number_of_rule_number, rule_number_of_item_number): Rename
1247 as...
1248 (rule_number_as_item_number, item_number_as_rule_number): these.
1249 Adjust dependencies.
1250 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1251 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1252 (symbol_number_to_vector_number): New.
1253 (order): Of vector_number_t* type.
1254 (base_t, BASE_MAX, BASE_MIN): New.
1255 (froms, tos, width, pos, check): Of base_t type.
1256 (action_number_t, ACTION_MIN, ACTION_MAX): New.
1257 (actrow): Of action_number_t type.
1258 (conflrow): Of unsigned int type.
1259 (table_ninf, base_ninf): New.
1260 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
1261 (muscle_insert_int_table, muscle_insert_base_table)
1262 (muscle_insert_rule_number_table): New.
1263 (prepare_tokens): Output `toknum' as int_table.
1264 (action_row): Returns a rule_number_t.
1265 Use ACTION_MIN, not SHRT_MIN.
1266 (token_actions): yydefact is rule_number_t*.
1267 (table_ninf_remap): New.
1268 (pack_table): Use it for `base' and `table'.
1269 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
1270 replaced with...
1271 (YYPACT_NINF, YYTABLE_NINF): these.
1272 (yypact, yytable): Compute their types instead of hard-coded
1273 `short'.
1274 * tests/regression.at (Web2c Actions): Adjust.
1275
12762002-07-19 Akim Demaille <akim@epita.fr>
1277
1278 * src/scan-gram.l (id): Can start with an underscore.
1279
12802002-07-16 Akim Demaille <akim@epita.fr>
1281
1282 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
1283 Adjust all former `associativity' dependencies.
1284 * src/symtab.c (symbol_new): Default associativity is `undef', not
1285 `right'.
1286 (symbol_check_alias_consistence): Adjust.
1287
12882002-07-09 Akim Demaille <akim@epita.fr>
1289
1290 * doc/bison.texinfo: Properly set the ``header'' part.
1291 Use @dircategory ``GNU programming tools'' as per Texinfo's
1292 documentation.
1293 Use @copying.
1294
12952002-07-09 Akim Demaille <akim@epita.fr>
1296
1297 * lib/quotearg.h: Protect against multiple inclusions.
1298 * src/location.h (location_t): Add a `file' member.
1299 (LOCATION_RESET, LOCATION_PRINT): Adjust.
1300 * src/complain.c (warn_at, complain_at, fatal_at): Drop
1301 `error_one_per_line' support.
1302
13032002-07-09 Akim Demaille <akim@epita.fr>
1304
1305 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
1306 * src/reader.c (lineno): Remove.
1307 Adjust all dependencies.
1308 (get_merge_function): Take a location and use complain_at.
1309 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
1310 * tests/regression.at (Invalid inputs, Mixing %token styles):
1311 Adjust.
1312
13132002-07-09 Akim Demaille <akim@epita.fr>
1314
1315 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
1316 recovery rule, and forbid extensions when --yacc.
1317 (gram_error): Use complain_at.
1318 * src/reader.c (reader): Exit if there were parse errors.
1319
13202002-07-09 Akim Demaille <akim@epita.fr>
1321
1322 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
1323 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
1324 Reported by R Blake <blakers@mac.com>.
1325
13262002-07-09 Akim Demaille <akim@epita.fr>
1327
1328 * data/yacc.c: Output the copyright notive in the header.
1329
13302002-07-03 Akim Demaille <akim@epita.fr>
1331
1332 * src/output.c (froms, tos): Are state_number_t.
1333 (save_column): sp, sp1, and sp2 are state_number_t.
1334 (prepare): Rename `final' as `final_state_number', `nnts' as
1335 `nterms_number', `nrules' as `rules_number', `nstates' as
1336 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
1337 unused.
1338 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
1339 * data/lalr1.cc (nsym_): Remove, unused.
1340
13412002-07-03 Akim Demaille <akim@epita.fr>
1342
1343 * src/lalr.h, src/lalr.c (goto_number_t): New.
1344 * src/lalr.c (goto_list_t): New.
1345 Propagate them.
1346 * src/nullable.c (rule_list_t): New.
1347 Propagate.
1348 * src/types.h: Remove.
1349
13502002-07-03 Akim Demaille <akim@epita.fr>
1351
1352 * src/closure.c (print_fderives): Use rule_rhs_print.
1353 * src/derives.c (print_derives): Use rule_rhs_print.
1354 (rule_list_t): New, replaces `shorts'.
1355 (set_derives): Add comments.
1356 * tests/sets.at (Nullable, Firsts): Adjust.
1357
13582002-07-03 Akim Demaille <akim@epita.fr>
1359
1360 * src/output.c (prepare_actions): Free `tally' and `width'.
1361 (prepare_actions): Allocate and free `order'.
1362 * src/symtab.c (symbols_free): Free `symbols'.
1363 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
1364 * src/output.c (m4_invoke): Move to...
1365 * src/scan-skel.l: here.
1366 (<<EOF>>): Close yyout, and free its name.
1367
13682002-07-03 Akim Demaille <akim@epita.fr>
1369
1370 Fix some memory leaks, and fix a bug: state 0 was examined twice.
1371
1372 * src/LR0.c (new_state): Merge into...
1373 (state_list_append): this.
1374 (new_states): Merge into...
1375 (generate_states): here.
1376 (set_states): Don't ensure a proper `errs' state member here, do it...
1377 * src/conflicts.c (conflicts_solve): here.
1378 * src/state.h, src/state.c: Comment changes.
1379 (state_t): Rename member `shifts' as `transitions'.
1380 Adjust all dependencies.
1381 (errs_new): For consistency, also take the values as argument.
1382 (errs_dup): Remove.
1383 (state_errs_set): New.
1384 (state_reductions_set, state_transitions_set): Assert that no
1385 previous value was assigned.
1386 (state_free): New.
1387 (states_free): Use it.
1388 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
1389 temporary storage: use `errs' and `nerrs' as elsewhere.
1390 (set_conflicts): Allocate and free this `errs'.
1391
13922002-07-02 Akim Demaille <akim@epita.fr>
1393
1394 * lib/libiberty.h: New.
1395 * lib: Update the bitset implementation from upstream.
1396 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
1397 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
1398 * src/main.c: Adjust bitset stats calls.
1399
14002002-07-01 Paul Eggert <eggert@twinsun.com>
1401
1402 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
1403 char, so that negative chars don't collide with $.
1404
14052002-06-30 Akim Demaille <akim@epita.fr>
1406
1407 Have the GLR tests be `warning' checked, and fix the warnings.
1408
1409 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
1410 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
1411 (yyremoveDeletes): `yyi' and `yyj' are size_t.
1412 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
1413 (yyaddDeferredAction): static.
1414 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
1415 (yyreportParseError): yyprefix is const.
1416 yytokenp is used only when verbose.
1417 (yy__GNUC__): Replace with __GNUC__.
1418 (yypdumpstack): yyi is size_t.
1419 (yypreference): Un-yy local variables and arguments, to avoid
1420 clashes with `yyr1'. Anyway, we are not in the user name space.
1421 (yytname_size): be an int, as is compared with ints.
1422 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
1423 Use them.
1424 * tests/cxx-gram.at: Use quotation to protect $1.
1425 Use AT_COMPILE to enable warnings hunts.
1426 Prototype yylex and yyerror.
1427 `Use' argc.
1428 Include `string.h', not `strings.h'.
1429 Produce and prototype stmtMerge only when used.
1430 yylex takes a location.
1431
14322002-06-30 Akim Demaille <akim@epita.fr>
1433
1434 We spend a lot of time in quotearg, in particular when --verbose.
1435
1436 * src/symtab.c (symbol_get): Store a quoted version of the key.
1437 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
1438 Adjust all callers.
1439
14402002-06-30 Akim Demaille <akim@epita.fr>
1441
1442 * src/state.h (reductions_t): Rename member `nreds' as num.
1443 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
1444 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
1445
14462002-06-30 Akim Demaille <akim@epita.fr>
1447
1448 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
1449 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
1450 (shifts_to): Rename as...
1451 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
1452 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
1453 (TRANSITION_IS_DISABLED, transitions_to): these.
1454
14552002-06-30 Akim Demaille <akim@epita.fr>
1456
1457 * src/print.c (print_shifts, print_gotos): Merge into...
1458 (print_transitions): this.
1459 (print_transitions, print_errs, print_reductions): Align the
1460 lookaheads columns.
1461 (print_core, print_transitions, print_errs, print_state,
1462 print_grammar): Output empty lines separator before, not after.
1463 (state_default_rule_compute): Rename as...
1464 (state_default_rule): this.
1465 * tests/conflicts.at (Defaulted Conflicted Reduction),
1466 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
1467 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
1468
14692002-06-30 Akim Demaille <akim@epita.fr>
1470
1471 Display items as we display rules.
1472
1473 * src/gram.h, src/gram.c (rule_lhs_print): New.
1474 * src/gram.c (grammar_rules_partial_print): Use it.
1475 * src/print.c (print_core): Likewise.
1476 * tests/conflicts.at (Defaulted Conflicted Reduction),
1477 (Unresolved SR Conflicts): Adjust.
1478 (Unresolved SR Conflicts): Adjust and rename as...
1479 (Resolved SR Conflicts): this, as was meant.
1480 * tests/regression.at (Web2c Report): Adjust.
1481
14822002-06-30 Akim Demaille <akim@epita.fr>
1483
1484 * src/print.c (state_default_rule_compute): New, extracted from...
1485 (print_reductions): here.
1486 Pessimize, but clarify the code.
1487 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
1488
14892002-06-30 Akim Demaille <akim@epita.fr>
1490
1491 * src/output.c (action_row): Let default_rule be always a rule
1492 number.
1493
14942002-06-30 Akim Demaille <akim@epita.fr>
1495
1496 * src/closure.c (print_firsts, print_fderives, closure):
1497 Use BITSET_EXECUTE.
1498 * src/lalr.c (lookaheads_print): Likewise.
1499 * src/state.c (state_rule_lookaheads_print): Likewise.
1500 * src/print_graph.c (print_core): Likewise.
1501 * src/print.c (print_reductions): Likewise.
1502 * src/output.c (action_row): Likewise.
1503 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
1504
15052002-06-30 Akim Demaille <akim@epita.fr>
1506
1507 * src/print_graph.c: Use report_flag.
1508
15092002-06-30 Akim Demaille <akim@epita.fr>
1510
1511 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
1512 to...
1513 * src/relation.h, src/relation.c (traverse, relation_digraph)
1514 (relation_print, relation_transpose): New.
1515
15162002-06-30 Akim Demaille <akim@epita.fr>
1517
1518 * src/state.h, src/state.c (shifts_to): New.
1519 * src/lalr.c (build_relations): Use it.
1520
15212002-06-30 Akim Demaille <akim@epita.fr>
1522
1523 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
1524 (item_number_of_rule_number, rule_number_of_item_number): New.
1525 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
1526 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1527 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
1528 Propagate their use.
1529 Much remains to be done, in particular wrt `shorts' from types.h.
1530
15312002-06-30 Akim Demaille <akim@epita.fr>
1532
1533 * src/symtab.c (symbol_new): Initialize the `printer' member.
1534
15352002-06-30 Akim Demaille <akim@epita.fr>
1536
1537 * src/LR0.c (save_reductions): Remove, replaced by...
1538 * src/state.h, src/state.c (state_reductions_set): New.
1539 (reductions, errs): Rename as...
1540 (reductions_t, errs_t): these.
1541 Adjust all dependencies.
1542
15432002-06-30 Akim Demaille <akim@epita.fr>
1544
1545 * src/LR0.c (state_list_t, state_list_append): New.
1546 (first_state, last_state): Now symbol_list_t.
1547 (this_state): Remove.
1548 (new_itemsets, append_states, save_reductions): Take a state_t as
1549 argument.
1550 (set_states, generate_states): Adjust.
1551 (save_shifts): Remove, replaced by...
1552 * src/state.h, src/state.c (state_shifts_set): New.
1553 (shifts): Rename as...
1554 (shifts_t): this.
1555 Adjust all dependencies.
1556 * src/state.h (state_t): Remove the `next' member.
1557
15582002-06-30 Akim Demaille <akim@epita.fr>
1559
1560 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
1561 escaped in slot 0.
1562
15632002-06-30 Akim Demaille <akim@epita.fr>
1564
1565 Use hash.h for the state hash table.
1566
1567 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
1568 (allocate_storage): Use state_hash_new.
1569 (free_storage): Use state_hash_free.
1570 (new_state, get_state): Adjust.
1571 * src/lalr.h, src/lalr.c (states): Move to...
1572 * src/states.h (state_t): Remove the `link' member, no longer
1573 used.
1574 * src/states.h, src/states.c: here.
1575 (state_hash_new, state_hash_free, state_hash_lookup)
1576 (state_hash_insert, states_free): New.
1577 * src/states.c (state_table, state_compare, state_hash): New.
1578 * src/output.c (output_actions): Do not free states now, since we
1579 still need to know the final_state number in `prepare', called
1580 afterwards. Do it...
1581 * src/main.c (main): here: call states_free after `output'.
1582
15832002-06-30 Akim Demaille <akim@epita.fr>
1584
1585 * src/state.h, src/state.c (state_new): New, extracted from...
1586 * src/LR0.c (new_state): here.
1587 * src/state.h (STATE_ALLOC): Move to...
1588 * src/state.c: here.
1589 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
1590 * src/state.h, src/state.c: here.
1591
15922002-06-30 Akim Demaille <akim@epita.fr>
1593
1594 * src/reader.c (gensym): Rename as...
1595 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
1596 (getsym): Rename as...
1597 (symbol_get): this.
1598
15992002-06-30 Akim Demaille <akim@epita.fr>
1600
1601 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
1602 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
1603 * src/output.c, src/print.c, src/print_graph.c: Propagate.
1604 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
1605
16062002-06-30 Akim Demaille <akim@epita.fr>
1607
1608 Make the test suite pass with warnings checked.
1609
1610 * tests/actions.at (Printers and Destructors): Improve.
1611 Avoid unsigned vs. signed issues.
1612 * tests/calc.at: Don't exercise the scanner here, do it...
1613 * tests/input.at (Torturing the Scanner): here.
1614
16152002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1616
1617 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
1618 reorganize first lines parallel to yacc.c.
1619
16202002-06-28 Akim Demaille <akim@epita.fr>
1621
1622 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
1623 (b4_token_enum, b4_token_defines): New, factored from...
1624 * data/lalr1.cc, data/yacc.c, glr.c: here.
1625
16262002-06-28 Akim Demaille <akim@epita.fr>
1627
1628 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
1629 unused variables.
1630 * src/output.c (merger_output): static.
1631
16322002-06-28 Akim Demaille <akim@epita.fr>
1633
1634 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
1635 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
1636 pacify GCC.
1637 * src/output.c (save_row): Initialize all the variables to pacify GCC.
1638
16392002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1640
1641 Accumulated changelog for new GLR parsing features.
1642
1643 * src/conflicts.c (count_total_conflicts): Change name to
1644 conflicts_total_count.
1645 * src/conflicts.h: Ditto.
1646 * src/output.c (token_actions): Use the new name.
1647 (output_conflicts): Change conflp => conflict_list_heads, and
1648 confl => conflict_list for better readability.
1649 * data/glr.c: Use the new names.
1650 * NEWS: Add self to GLR announcement.
1651
1652 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
1653
1654 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
1655 Akim Demaille.
1656
1657 * data/bison.glr: Change name to glr.c
1658 * data/glr.c: Renamed from bison.glr.
1659 * data/Makefile.am: Add glr.c
1660
1661 * src/getargs.c:
1662
1663 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
1664 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
1665
1666 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1667
1668 * data/bison.glr: Be sure to restore the
1669 current #line when returning to the skeleton contents after having
1670 exposed the input file's #line.
1671
1672 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1673
1674 * data/bison.glr: Bring up to date with changes to bison.simple.
1675
1676 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1677
1678 * data/bison.glr: Correct definitions that use b4_prefix.
1679 Various reformatting.
1680 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
1681 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
1682 yytokenp argument; now part of stack.
1683 (yychar): Define to behave as documented.
1684 (yyclearin): Ditto.
1685
1686 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1687
1688 * src/reader.h: Add declaration for free_merger_functions.
1689
1690 * src/reader.c (merge_functions): New variable.
1691 (get_merge_function): New function.
1692 (free_merger_functions): New function.
1693 (readgram): Check for %prec that is not followed by a symbol.
1694 Handle %dprec and %merge declarations.
1695 (packgram): Initialize dprec and merger fields in rules array.
1696
1697 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
1698 conflict_list_cnt, conflict_list_free): New variables.
1699 (table_grow): Also grow conflict_table.
1700 (prepare_rules): Output dprec and merger tables.
1701 (conflict_row): New function.
1702 (action_row): Output conflict lists for GLR parser. Don't use
1703 default reduction in conflicted states for GLR parser so that there
1704 are spaces for the conflict lists.
1705 (save_row): Also save conflict information.
1706 (token_actions): Allocate conflict list.
1707 (merger_output): New function.
1708 (pack_vector): Pack conflict table, too.
1709 (output_conflicts): New function to output yyconflp and yyconfl.
1710 (output_check): Allocate conflict_tos.
1711 (output_actions): Output conflict tables, also.
1712 (output_skeleton): Output b4_mergers definition.
1713 (prepare): Output b4_max_rhs_length definition.
1714 Use 'bison.glr' as default skeleton for GLR parsers.
1715
1716 * src/gram.c (glr_parser): New flag.
1717 (grammar_free): Call free_merger_functions.
1718
1719 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
1720 all pairs of conflicting reductions, rather than just all tokens
1721 causing conflicts. Needed to size conflict tables.
1722 (conflicts_output): Modify call to count_rr_conflicts for new
1723 interface.
1724 (conflicts_print): Ditto.
1725 (count_total_conflicts): New function.
1726
1727 * src/reader.h (merger_list): New type.
1728 (merge_functions): New variable.
1729
1730 * src/lex.h (tok_dprec, tok_merge): New token types.
1731
1732 * src/gram.h (rule_s): Add dprec and merger fields.
1733 (glr_parser): New flag.
1734
1735 * src/conflicts.h (count_total_conflicts): New function.
1736
1737 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
1738
1739 * doc/bison.texinfo (Generalized LR Parsing): New section.
1740 (GLR Parsers): New section.
1741 (Language and Grammar): Mention GLR parsing.
1742 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
1743 Correct typo ("tge" -> "the").
1744
1745 * data/bison.glr: New skeleton for GLR parsing.
1746
1747 * tests/cxx-gram.at: New tests for GLR parsing.
1748
1749 * tests/testsuite.at: Include cxx-gram.at.
1750
1751 * tests/Makefile.am: Add cxx-gram.at.
1752
1753 * src/parse-gram.y:
1754
1755 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
1756
1757 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
1758
17592002-06-27 Akim Demaille <akim@epita.fr>
1760
1761 * src/options.h, src/options.c: Remove.
1762 * src/getargs.c (short_options, long_options): New.
1763
17642002-06-27 Akim Demaille <akim@epita.fr>
1765
1766 * data/bison.simple, data/bison.c++: Rename as...
1767 * data/yacc.c, data/lalr1.cc: these.
1768 * doc/bison.texinfo (Environment Variables): Remove.
1769
17702002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1771
1772 * src/getargs.c (report_argmatch): Initialize strtok().
1773
17742002-06-20 Akim Demaille <akim@epita.fr>
1775
1776 * data/bison.simple (b4_symbol_actions): New, replaces...
1777 (b4_symbol_destructor, b4_symbol_printer): these.
1778 (yysymprint): Be sure to call YYPRINT only for tokens, and using
1779 user token numbers.
1780
17812002-06-20 Akim Demaille <akim@epita.fr>
1782
1783 * data/bison.simple (yydestructor): Rename as...
1784 (yydestruct): this.
1785
17862002-06-20 Akim Demaille <akim@epita.fr>
1787
1788 * src/symtab.h, src/symtab.c (symbol_type_set)
1789 (symbol_destructor_set, symbol_precedence_set): The location is
1790 the last argument.
1791 Adjust all callers.
1792
17932002-06-20 Akim Demaille <akim@epita.fr>
1794
1795 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
1796 internals.
1797 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
1798 Takes a location.
1799 * src/symtab.h, src/symtab.c (symbol_class_set)
1800 (symbol_user_token_number_set): Likewise.
1801 Adjust all callers.
1802 Promote complain_at.
1803 * tests/input.at (Type Clashes): Adjust.
1804
18052002-06-20 Akim Demaille <akim@epita.fr>
1806
1807 * data/bison.simple (YYLEX): Fix the declaration when
1808 %pure-parser.
1809
18102002-06-20 Akim Demaille <akim@epita.fr>
1811
1812 * data/bison.simple (yysymprint): Don't print the token number,
1813 just its name.
1814 * tests/actions.at (Destructors): Rename as...
1815 (Printers and Destructors): this.
1816 Also exercise %printer.
1817
18182002-06-20 Akim Demaille <akim@epita.fr>
1819
1820 * data/bison.simple (YYDSYMPRINT): New.
1821 Use it to remove many of the #if YYDEBUG/if (yydebug).
1822
18232002-06-20 Akim Demaille <akim@epita.fr>
1824
1825 * src/symtab.h, src/symtab.c (symbol_t): printer and
1826 printer_location are new members.
1827 (symbol_printer_set): New.
1828 * src/parse-gram.y (PERCENT_PRINTER): New token.
1829 Handle its associated rule.
1830 * src/scan-gram.l: Adjust.
1831 (handle_destructor_at, handle_destructor_dollar): Rename as...
1832 (handle_symbol_code_at, handle_symbol_code_dollar): these.
1833 * src/output.c (symbol_printers_output): New.
1834 (output_skeleton): Call it.
1835 * data/bison.simple (yysymprint): New. Cannot be named yyprint
1836 since there are already many grammar files with a user `yyprint'.
1837 Replace the calls to YYPRINT to calls to yysymprint.
1838 * tests/calc.at: Adjust.
1839 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
1840 taking advantage of parser very internal details (stack size!).
1841
18422002-06-20 Akim Demaille <akim@epita.fr>
1843
1844 * src/scan-gram.l: Complete the scanner with the missing patterns
1845 to pacify Flex.
1846 Use `quote' and `symbol_tag_get' where appropriate.
1847
18482002-06-19 Akim Demaille <akim@epita.fr>
1849
1850 * tests/actions.at (Destructors): Augment to test locations.
1851 * data/bison.simple (yydestructor): Pass it the current location
1852 if locations are enabled.
1853 Prototype only when __STDC__ or C++.
1854 Change the argument names to move into the yy name space: there is
1855 user code here.
1856
18572002-06-19 Akim Demaille <akim@epita.fr>
1858
1859 * data/bison.simple (b4_pure_if): New.
1860 Use it instead of #ifdef YYPURE.
1861
18622002-06-19 Akim Demaille <akim@epita.fr>
1863
1864 * data/bison.simple (b4_location_if): New.
1865 Use it instead of #ifdef YYLSP_NEEDED.
1866
18672002-06-19 Akim Demaille <akim@epita.fr>
1868
1869 Prepare @$ in %destructor, but currently don't bind it in the
1870 skeleton, as %location use is not cleaned up yet.
1871
1872 * src/scan-gram.l (handle_dollar, handle_destructor_at)
1873 (handle_action_at): New.
1874 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
1875 a braced_code_t and a location as additional arguments.
1876 (handle_destructor_dollar): Instead of requiring `b4_eval', just
1877 unquote one when outputting `b4_dollar_dollar'.
1878 Adjust callers.
1879 * data/bison.simple (b4_eval): Remove.
1880 (b4_symbol_destructor): Adjust.
1881 * tests/input.at (Invalid @n): Adjust.
1882
18832002-06-19 Zack Weinberg <zack@codesourcery.com>
1884
1885 * doc/bison.texinfo: Document ability to have multiple
1886 prologue sections.
1887
18882002-06-18 Akim Demaille <akim@epita.fr>
1889
1890 * src/files.c (compute_base_names): When computing the output file
1891 names from the input file name, strip the directory part.
1892
18932002-06-18 Akim Demaille <akim@epita.fr>
1894
1895 * data/bison.simple.new: Comment changes.
1896 Reported by Andreas Schwab.
1897
18982002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
1899
1900 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
1901 there are no `label `yyoverflowlab' defined but not used' warnings
1902 when yyoverflow is defined.
1903
19042002-06-18 Akim Demaille <akim@epita.fr>
1905
1906 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
1907 new member.
1908 (symbol_destructor_set): Adjust.
1909 * src/output.c (symbol_destructors_output): Output the destructor
1910 locations.
1911 Output the symbol name.
1912 * data/bison.simple (b4_symbol_destructor): Adjust.
1913
19142002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
1915 and Akim Demaille <akim@epita.fr>
1916
1917 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
1918 what's left on the stack when the error recovery hits EOF.
1919 * tests/actions.at (Destructors): Complete to exercise this case.
1920
19212002-06-17 Akim Demaille <akim@epita.fr>
1922
1923 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
1924 arguments is really empty, not only equal to `[]'.
1925 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
1926 member.
1927 (symbol_destructor_set): New.
1928 * src/output.c (symbol_destructors_output): New.
1929 * src/reader.h (brace_code_t, current_braced_code): New.
1930 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
1931 (handle_dollar): Rename as...
1932 (handle_action_dollar): this.
1933 (handle_destructor_dollar): New.
1934 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
1935 (grammar_declaration): Use it.
1936 * data/bison.simple (yystos): Is always defined.
1937 (yydestructor): New.
1938 * tests/actions.at (Destructors): New.
1939 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
1940
19412002-06-17 Akim Demaille <akim@epita.fr>
1942
1943 * src/symlist.h, src/symlist.c (symbol_list_length): New.
1944 * src/scan-gram.l (handle_dollar, handle_at): Compute the
1945 rule_length only when needed.
1946 * src/output.c (actions_output, token_definitions_output): Output
1947 the full M4 block.
1948 * src/symtab.c: Don't access directly to the symbol tag, use
1949 symbol_tag_get.
1950 * src/parse-gram.y: Use symbol_list_free.
1951
19522002-06-17 Akim Demaille <akim@epita.fr>
1953
1954 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
1955 (symbol_list_prepend, get_type_name): Move to...
1956 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
1957 (symbol_list_prepend, symbol_list_n_type_name_get): here.
1958 Adjust all callers.
1959 (symbol_list_free): New.
1960 * src/scan-gram.l (handle_dollar): Takes a location.
1961 * tests/input.at (Invalid $n): Adjust.
1962
19632002-06-17 Akim Demaille <akim@epita.fr>
1964
1965 * src/reader.h, src/reader.c (symbol_list_new): Export it.
1966 (symbol_list_prepend): New.
1967 * src/parse-gram.y (%union): `list' is a new member.
1968 (symbols.1): New, replaces...
1969 (terms_to_prec.1, nterms_to_type.1): these.
1970 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
1971 Take a location as additional argument.
1972 Adjust all callers.
1973
19742002-06-15 Akim Demaille <akim@epita.fr>
1975
1976 * src/parse-gram.y: Move %token in the declaration section so that
1977 we don't depend upon CVS Bison.
1978
19792002-06-15 Akim Demaille <akim@epita.fr>
1980
1981 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
1982 * src/print.c (print_core): Use it.
1983
19842002-06-15 Akim Demaille <akim@epita.fr>
1985
1986 * src/conflicts.c (log_resolution): Accept the rule involved in
1987 the sr conflicts instead of the lookahead number that points to
1988 that rule.
1989 (flush_reduce): Accept the current lookahead vector as argument,
1990 instead of the index in LA.
1991 (resolve_sr_conflict): Accept the current number of lookahead
1992 bitset to consider for the STATE, instead of the index in LA.
1993 (set_conflicts): Adjust.
1994 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
1995
19962002-06-15 Akim Demaille <akim@epita.fr>
1997
1998 * src/state.h (state_t): Replace the `lookaheadsp' member, a
1999 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
2000 Adjust all dependencies.
2001 * src/lalr.c (initialize_lookaheads): Split into...
2002 (states_lookaheads_count, states_lookaheads_initialize): these.
2003 (lalr): Adjust.
2004
20052002-06-15 Akim Demaille <akim@epita.fr>
2006
2007 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
2008 out of...
2009 (grammar_rules_print): here.
2010 * src/reduce.c (reduce_output): Use it.
2011 * tests/reduce.at (Useless Rules, Reduced Automaton)
2012 (Underivable Rules): Adjust.
2013
20142002-06-15 Akim Demaille <akim@epita.fr>
2015
2016 Copy BYacc's nice way to report the grammar.
2017
2018 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
2019 New.
2020 Don't print the rules' location, it is confusing and useless.
2021 (rule_print): Use grammar_rhs_print.
2022 * src/print.c (print_grammar): Use grammar_rules_print.
2023
20242002-06-15 Akim Demaille <akim@epita.fr>
2025
2026 Complete and rationalize `useless thing' warnings.
2027
2028 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
2029 (symbol_tag_print): New.
2030 Use them everywhere in place of accessing directly the tag member.
2031 * src/gram.h, src/gram.c (rule_print): New.
2032 Use it where a rule used to be printed `by hand'.
2033 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
2034 (reduce_grammar_tables): Report the useless rules.
2035 (reduce_print): Useless things are a warning, not an error.
2036 Report it as such.
2037 * tests/reduce.at (Useless Nonterminals, Useless Rules):
2038 (Reduced Automaton, Underivable Rules): Adjust.
2039 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
2040 * tests/conflicts.at (Unresolved SR Conflicts)
2041 (Solved SR Conflicts): Adjust.
2042
20432002-06-15 Akim Demaille <akim@epita.fr>
2044
2045 Let symbols have a location.
2046
2047 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
2048 (getsym): Adjust.
2049 Adjust all callers.
2050 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
2051 Use location_t, not int.
2052 * src/symtab.c (symbol_check_defined): Take advantage of the
2053 location.
2054 * tests/regression.at (Invalid inputs): Adjust.
2055
20562002-06-15 Akim Demaille <akim@epita.fr>
2057
2058 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
2059 (input): Don't try to initialize yylloc here, do it in the
2060 scanner.
2061 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
2062 * src/gram.h (rule_t): Change line and action_line into location
2063 and action_location, of location_t type.
2064 Adjust all dependencies.
2065 * src/location.h, src/location.c (empty_location): New.
2066 * src/reader.h, src/reader.c (grammar_start_symbol_set)
2067 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
2068 (grammar_current_rule_symbol_append)
2069 (grammar_current_rule_action_append): Expect a location as argument.
2070 * src/reader.c (grammar_midrule_action): Adjust to attach an
2071 action's location as dummy symbol location.
2072 * src/symtab.h, src/symtab.c (startsymbol_location): New.
2073 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
2074 the line numbers.
2075
20762002-06-14 Akim Demaille <akim@epita.fr>
2077
2078 Grammar declarations may be found in the grammar section.
2079
2080 * src/parse-gram.y (rules_or_grammar_declaration): New.
2081 (declarations): Each declaration may end with a semicolon, not
2082 just...
2083 (grammar_declaration): `"%union"'.
2084 (grammar): Branch to rules_or_grammar_declaration.
2085
20862002-06-14 Akim Demaille <akim@epita.fr>
2087
2088 * src/main.c (main): Invoke scanner_free.
2089
20902002-06-14 Akim Demaille <akim@epita.fr>
2091
2092 * src/output.c (m4_invoke): Extracted from...
2093 (output_skeleton): here.
2094 Free tempfile.
2095
20962002-06-14 Akim Demaille <akim@epita.fr>
2097
2098 * src/parse-gram.y (directives, directive, gram)
2099 (grammar_directives, precedence_directives, precedence_directive):
2100 Rename as...
2101 (declarations, declaration, grammar, grammar_declaration)
2102 (precedence_declaration, precedence_declarator): these.
2103 (symbol_declaration): New.
2104
21052002-06-14 Akim Demaille <akim@epita.fr>
2106
2107 * src/files.c (action_obstack): Remove, unused.
2108 (output_obstack): Remove it, and all its dependencies, as it is no
2109 longer needed.
2110 * src/reader.c (epilogue_set): Build the epilogue in the
2111 muscle_obstack.
2112 * src/output.h, src/output.c (muscle_obstack): Move to...
2113 * src/muscle_tab.h, src/muscle_tab.h: here.
2114 (muscle_init): Initialize muscle_obstack.
2115 (muscle_free): New.
2116 * src/main.c (main): Call it.
2117
21182002-06-14 Akim Demaille <akim@epita.fr>
2119
2120 * src/location.h: New, extracted from...
2121 * src/reader.h: here.
2122 * src/Makefile.am (noinst_HEADERS): Merge into
2123 (bison_SOURCES): this.
2124 Add location.h.
2125 * src/parse-gram.y: Use location_t instead of Bison's.
2126 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
2127 Use location_t instead of ints.
2128
21292002-06-14 Akim Demaille <akim@epita.fr>
2130
2131 * data/bison.simple, data/bison.c++: Be sure to restore the
2132 current #line when returning to the skeleton contents after having
2133 exposed the input file's #line.
2134
21352002-06-12 Akim Demaille <akim@epita.fr>
2136
2137 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
2138 eager.
2139 * tests/actions.at (Exotic Dollars): New.
2140
21412002-06-12 Akim Demaille <akim@epita.fr>
2142
2143 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
2144 ['"/] too eagerly.
2145 * tests/input.at (Torturing the Scanner): New.
2146
21472002-06-11 Akim Demaille <akim@epita.fr>
2148
2149 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
2150 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
2151 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
2152 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
2153 * src/reader.c (reader): Use it.
2154
21552002-06-11 Akim Demaille <akim@epita.fr>
2156
2157 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
2158 Adjust all callers.
2159 (scanner_last_string_free): New.
2160
21612002-06-11 Akim Demaille <akim@epita.fr>
2162
2163 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
2164 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
2165 (last_string, YY_OBS_FREE): New.
2166 Use them when returning an ID.
2167
21682002-06-11 Akim Demaille <akim@epita.fr>
2169
2170 Have Bison grammars parsed by a Bison grammar.
2171
2172 * src/reader.c, src/reader.h (prologue_augment): New.
2173 * src/reader.c (copy_definition): Remove.
2174
2175 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
2176 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
2177 (grammar_current_rule_prec_set, grammar_current_rule_check)
2178 (grammar_current_rule_symbol_append)
2179 (grammar_current_rule_action_append): Export.
2180 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
2181 (symbol_list_action_append): Remove.
2182 Hook the routines from reader.
2183 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
2184 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
2185
2186 * src/reader.c (read_declarations): Remove, unused.
2187
2188 * src/parse-gram.y: Handle the epilogue.
2189 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
2190 (grammar_start_symbol_set): this.
2191 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
2192 * src/reader.c (readgram): Remove, unused.
2193 (reader): Adjust to insert eoftoken and axiom where appropriate.
2194
2195 * src/reader.c (copy_dollar): Replace with...
2196 * src/scan-gram.h (handle_dollar): this.
2197 * src/parse-gram.y: Remove `%thong'.
2198
2199 * src/reader.c (copy_at): Replace with...
2200 * src/scan-gram.h (handle_at): this.
2201
2202 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
2203 New.
2204
2205 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
2206 time being.
2207
2208 * src/reader.h, src/reader.c (grammar_rule_end): New.
2209
2210 * src/parse.y (current_type, current_class): New.
2211 Implement `%nterm', `%token' support.
2212 Merge `%term' into `%token'.
2213 (string_as_id): New.
2214 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
2215 type name.
2216
2217 * src/parse-gram.y: Be sure to handle properly the beginning of
2218 rules.
2219
2220 * src/parse-gram.y: Handle %type.
2221 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
2222
2223 * src/parse-gram.y: More directives support.
2224 * src/options.c: No longer handle source directives.
2225
2226 * src/parse-gram.y: Fix %output.
2227
2228 * src/parse-gram.y: Handle %union.
2229 Use the prologue locations.
2230 * src/reader.c (parse_union_decl): Remove.
2231
2232 * src/reader.h, src/reader.c (epilogue_set): New.
2233 * src/parse-gram.y: Use it.
2234
2235 * data/bison.simple, data/bison.c++: b4_stype is now either not
2236 defined, then default to int, or to the contents of %union,
2237 without `union' itself.
2238 Adjust.
2239 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
2240
2241 * src/output.c (actions_output): Don't output braces, as they are
2242 already handled by the scanner.
2243
2244 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
2245 characters to themselves.
2246
2247 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
2248 that the epilogue has a proper #line.
2249
2250 * src/parse-gram.y: Handle precedence/associativity.
2251
2252 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
2253 a terminal.
2254 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
2255 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
2256 at all to define terminals that cannot be emitted.
2257
2258 * src/scan-gram.l: Escape M4 characters.
2259
2260 * src/scan-gram.l: Working properly with escapes in user
2261 strings/characters.
2262
2263 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
2264 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
2265 grammar.
2266 Use more modest sizes, as for the time being the parser does not
2267 release memory, and therefore the process swallows a huge amount
2268 of memory.
2269
2270 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
2271 stricter %token grammar.
2272
2273 * src/symtab.h (associativity): Add `undef_assoc'.
2274 (symbol_precedence_set): Do nothing when passed an undef_assoc.
2275 * src/symtab.c (symbol_check_alias_consistence): Adjust.
2276
2277 * tests/regression.at (Invalid %directive): Remove, as it is now
2278 meaningless.
2279 (Invalid inputs): Adjust to the new error messages.
2280 (Token definitions): The new grammar doesn't allow too many
2281 eccentricities.
2282
2283 * src/lex.h, src/lex.c: Remove.
2284 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
2285 (copy_character, copy_string2, copy_string, copy_identifier)
2286 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
2287 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
2288 (parse_action): Remove.
2289 * po/POTFILES.in: Adjust.
2290
22912002-06-11 Akim Demaille <akim@epita.fr>
2292
2293 * src/reader.c (parse_action): Don't store directly into the
2294 rule's action member: return the action as a string.
2295 Don't require `rule_length' as an argument: compute it.
2296 (grammar_current_rule_symbol_append)
2297 (grammar_current_rule_action_append): New, eved out from
2298 (readgram): here.
2299 Remove `action_flag', `rulelength', unused now.
2300
23012002-06-11 Akim Demaille <akim@epita.fr>
2302
2303 * src/reader.c (grammar_current_rule_prec_set).
2304 (grammar_current_rule_check): New, eved out from...
2305 (readgram): here.
2306 Remove `xaction', `first_rhs': useless.
2307 * tests/input.at (Type clashes): New.
2308 * tests/existing.at (GNU Cim Grammar): Adjust.
2309
23102002-06-11 Akim Demaille <akim@epita.fr>
2311
2312 * src/reader.c (grammar_midrule_action): New, Eved out from
2313 (readgram): here.
2314
23152002-06-11 Akim Demaille <akim@epita.fr>
2316
2317 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
2318 New.
2319 (readgram): Use them as replacement of inlined code, crule and
2320 crule1.
2321
23222002-06-11 Akim Demaille <akim@epita.fr>
2323
2324 * src/reader.c (grammar_end, grammar_symbol_append): New.
2325 (readgram): Use them.
2326 Make the use of `p' as local as possible.
2327
23282002-06-10 Akim Demaille <akim@epita.fr>
2329
2330 GCJ's parser requires the tokens to be defined before the prologue.
2331
2332 * data/bison.simple: Output the token definition before the user's
2333 prologue.
2334 * tests/regression.at (Braces parsing, Duplicate string)
2335 (Mixing %token styles): Check the output from bison.
2336 (Early token definitions): New.
2337
23382002-06-10 Akim Demaille <akim@epita.fr>
2339
2340 * src/symtab.c (symbol_user_token_number_set): Don't complain when
2341 assigning twice the same user number to a token, so that we can
2342 use it in...
2343 * src/lex.c (lex): here.
2344 Also use `symbol_class_set' instead of hand written code.
2345 * src/reader.c (parse_assoc_decl): Likewise.
2346
23472002-06-10 Akim Demaille <akim@epita.fr>
2348
2349 * src/symtab.c, src/symtab.c (symbol_class_set)
2350 (symbol_user_token_number_set): New.
2351 * src/reader.c (parse_token_decl): Use them.
2352 Use a switch instead of ifs.
2353 Use a single argument.
2354
23552002-06-10 Akim Demaille <akim@epita.fr>
2356
2357 Remove `%thong' support as it is undocumented, unused, duplicates
2358 `%token's job, and creates useless e-mail traffic with people who
2359 want to know what it is, why it is undocumented, unused, and
2360 duplicates `%token's job.
2361
2362 * src/reader.c (parse_thong_decl): Remove.
2363 * src/options.c (option_table): Remove "thong".
2364 * src/lex.h (tok_thong): Remove.
2365
23662002-06-10 Akim Demaille <akim@epita.fr>
2367
2368 * src/symtab.c, src/symtab.c (symbol_type_set)
2369 (symbol_precedence_set): New.
2370 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
2371 (value_components_used): Remove, unused.
2372
23732002-06-09 Akim Demaille <akim@epita.fr>
2374
2375 Move symbols handling code out of the reader.
2376
2377 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
2378 (axiom): Move to...
2379 * src/symtab.h, src/symtab.c: here.
2380
2381 * src/gram.c (start_symbol): Remove: use startsymbol->number.
2382 * src/reader.c (startval): Rename as...
2383 * src/symtab.h, src/symtab.c (startsymbol): this.
2384 * src/reader.c: Adjust.
2385
2386 * src/reader.c (symbol_check_defined, symbol_make_alias)
2387 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2388 (token_translations_init)
2389 Move to...
2390 * src/symtab.c: here.
2391 * src/reader.c (packsymbols): Move to...
2392 * src/symtab.h, src/symtab.c (symbols_pack): here.
2393 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
2394 argument.
2395
23962002-06-03 Akim Demaille <akim@epita.fr>
2397
2398 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
2399 then statements.
2400
24012002-06-03 Akim Demaille <akim@epita.fr>
2402
2403 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
2404 structs with non literals.
2405 * src/scan-skel.l: never-interactive.
2406 * src/conflicts.c (enum conflict_resolution_e): No trailing
2407 comma.
2408 * src/getargs.c (usage): Split long literal strings.
2409 Reported by Hans Aberg.
2410
24112002-05-28 Akim Demaille <akim@epita.fr>
2412
2413 * data/bison.c++: Use C++ ostreams.
2414 (cdebug_): New member.
2415
24162002-05-28 Akim Demaille <akim@epita.fr>
2417
2418 * src/output.c (output_skeleton): Be sure to allocate enough room
2419 for `/' _and_ for `\0' in full_skeleton.
2420
24212002-05-28 Akim Demaille <akim@epita.fr>
2422
2423 * data/bison.c++: Catch up with bison.simple:
2424 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2425 and Paul Eggert <eggert@twinsun.com>: `error' handing.
2426 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
2427 and popping traces.
2428
24292002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2430
2431 * src/output.c (output_skeleton): Put an explicit path in front of
2432 the skeleton file name, rather than relying on the -I directory,
2433 to partially alleviate effects of having a skeleton file lying around
2434 in the current directory.
2435
24362002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2437
2438 * src/conflicts.c (log_resolution): Correct typo:
2439 obstack_printf should be obstack_fgrow1.
2440
24412002-05-26 Akim Demaille <akim@epita.fr>
2442
2443 * src/state.h (state_t): `solved_conflicts' is a new member.
2444 * src/LR0.c (new_state): Set it to 0.
2445 * src/conflicts.h, src/conflicts.c (print_conflicts)
2446 (free_conflicts, solve_conflicts): Rename as...
2447 (conflicts_print, conflicts_free, conflicts_solve): these.
2448 Adjust callers.
2449 * src/conflicts.c (enum conflict_resolution_e)
2450 (solved_conflicts_obstack): New, used by...
2451 (log_resolution): this.
2452 Adjust to attach the conflict resolution to each state.
2453 Complete the description with the precedence/associativity
2454 information.
2455 (resolve_sr_conflict): Adjust.
2456 * src/print.c (print_state): Output its solved_conflicts.
2457 * tests/conflicts.at (Unresolved SR Conflicts)
2458 (Solved SR Conflicts): Exercise --report=all.
2459
24602002-05-26 Akim Demaille <akim@epita.fr>
2461
2462 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2463 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2464 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
2465 (token_number_t, item_number_as_token_number)
2466 (token_number_as_item_number, muscle_insert_token_number_table):
2467 Rename as...
2468 (symbol_number_t, item_number_as_symbol_number)
2469 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
2470 these, since it is more appropriate.
2471
24722002-05-26 Akim Demaille <akim@epita.fr>
2473
2474 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
2475 `Error:' lines.
2476 * data/bison.simple (yystos) [YYDEBUG]: New.
2477 (yyparse) [YYDEBUG]: Display the symbols which are popped during
2478 error recovery.
2479 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
2480
24812002-05-25 Akim Demaille <akim@epita.fr>
2482
2483 * doc/bison.texinfo (Debugging): Split into...
2484 (Tracing): this new section, its former contents, and...
2485 (Understanding): this new section.
2486 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
2487 by...
2488 (report_flag): this.
2489 Adjust all dependencies.
2490 (report_args, report_types, report_argmatch): New.
2491 (usage, getargs): Report/support -r, --report.
2492 * src/options.h
2493 (struct option_table_struct): Rename as..,
2494 (struct option_table_s): this.
2495 Rename the `set_flag' member to `flag' to match with getopt_long's
2496 struct.
2497 * src/options.c (option_table): Split verbose into an entry for
2498 %verbose, and another for --verbose.
2499 Support --report/-r, so remove -r from the obsolete --raw.
2500 * src/print.c: Attach full item sets and lookaheads reports to
2501 report_flag instead of trace_flag.
2502 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2503
25042002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2505 and Paul Eggert <eggert@twinsun.com>
2506
2507 * data/bison.simple (yyparse): Correct error handling to conform to
2508 POSIX and yacc. Specifically, after syntax error is discovered,
2509 do not reduce further before shifting the error token.
2510 Clean up the code a bit by removing the labels yyerrdefault,
2511 yyerrhandle, yyerrpop.
2512 * NEWS: Document the above.
2513
25142002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2515
2516 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
2517 type; it isn't always big enough, since it doesn't necessarily
2518 include non-terminals.
2519 (yytranslate): Expand definition of yy_token_number_type, so that
2520 the latter can be removed.
2521 (yy_token_number_type): Remove, only one use.
2522 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
2523 don't use TokenNumberType as element type.
2524
2525 * tests/regression.at: Modify expected output to agree with change
2526 to yyr1 and yytranslate.
2527
25282002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
2529
2530 * src/reader.c (parse_action): Use copy_character instead of
2531 obstack_1grow.
2532
25332002-05-13 Akim Demaille <akim@epita.fr>
2534
2535 * tests/regression.at (Token definitions): Prototype yylex and
2536 yyerror.
2537
25382002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2539
2540 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
2541 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
2542 32-bit arithmetic.
2543 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
2544
25452002-05-07 Akim Demaille <akim@epita.fr>
2546
2547 * tests/synclines.at: Be sure to prototype yylex and yyerror to
2548 avoid GCC warnings.
2549
25502002-05-07 Akim Demaille <akim@epita.fr>
2551
2552 Kill GCC warnings.
2553
2554 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
2555 over the RHS of each rule.
2556 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
2557 * src/state.h (state_t): Member `nitems' is unsigned short.
2558 * src/LR0.c (get_state): Adjust.
2559 * src/reader.c (packgram): Likewise.
2560 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
2561 `Type'.
2562 (muscle_insert_int_table): Remove, unused.
2563 (prepare_rules): Remove `max'.
2564
25652002-05-06 Akim Demaille <akim@epita.fr>
2566
2567 * src/closure.c (print_firsts): Display of the symbol tags.
2568 (bitmatrix_print): Move to...
2569 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
2570 here.
2571 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
2572
25732002-05-06 Akim Demaille <akim@epita.fr>
2574
2575 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
2576 hash_do_for_each.
2577
25782002-05-06 Akim Demaille <akim@epita.fr>
2579
2580 * src/LR0.c (new_state, get_state): Instead of using the global
2581 `kernel_size' and `kernel_base', have two new arguments:
2582 `core_size' and `core'.
2583 Adjust callers.
2584
25852002-05-06 Akim Demaille <akim@epita.fr>
2586
2587 * src/reader.c (packgram): No longer end `ritem' with a 0
2588 sentinel: it is not used.
2589
25902002-05-05 Akim Demaille <akim@epita.fr>
2591
2592 New experimental feature: display the lookaheads in the report and
2593 graph.
2594
2595 * src/print (print_core): When --trace-flag, display the rules
2596 lookaheads.
2597 * src/print_graph.c (print_core): Likewise.
2598 Swap the arguments.
2599 Adjust caller.
2600
26012002-05-05 Akim Demaille <akim@epita.fr>
2602
2603 * tests/torture.at (Many lookaheads): New test.
2604
26052002-05-05 Akim Demaille <akim@epita.fr>
2606
2607 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
2608 (GENERATE_MUSCLE_INSERT_TABLE): this.
2609 (output_int_table, output_unsigned_int_table, output_short_table)
2610 (output_token_number_table, output_item_number_table): Replace with...
2611 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
2612 (muscle_insert_short_table, muscle_insert_token_number_table)
2613 (muscle_insert_item_number_table): these.
2614 Adjust all callers.
2615 (prepare_tokens): Don't free `translations', since...
2616 * src/reader.h, src/reader.c (grammar_free): do it.
2617 Move to...
2618 * src/gram.h, src/gram.c (grammar_free): here.
2619 * data/bison.simple, data/bison.c++: b4_token_number_max is now
2620 b4_translate_max.
2621
26222002-05-05 Akim Demaille <akim@epita.fr>
2623
2624 * src/output.c (output_unsigned_int_table): New.
2625 (prepare_rules): `i' is unsigned.
2626 `prhs', `rline', `r2' are unsigned int.
2627 Rename muscle `rhs_number_max' as `rhs_max'.
2628 Output muscles `prhs_max', `rline_max', and `r2_max'.
2629 Free rline and r1.
2630 * data/bison.simple, data/bison.c++: Adjust to use these muscles
2631 to compute types instead of constant types.
2632 * tests/regression.at (Web2c Actions): Adjust.
2633
26342002-05-04 Akim Demaille <akim@epita.fr>
2635
2636 * src/symtab.h (SALIAS, SUNDEF): Rename as...
2637 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
2638 Adjust dependencies.
2639 * src/output.c (token_definitions_output): Be sure not to output a
2640 `#define 'a'' when fed with `%token 'a' "a"'.
2641 * tests/regression.at (Token definitions): New.
2642
26432002-05-03 Paul Eggert <eggert@twinsun.com>
2644
2645 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2646 for K&R C.
2647
26482002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2649
2650 * Makefile.am (SUBDIRS): Remove intl.
2651 (EXTRA_DIST): Add config/config.rpath.
2652
26532002-05-03 Akim Demaille <akim@epita.fr>
2654
2655 * data/bison.simple (m4_if): Don't output empty enums.
2656 And actually, output valid enum definitions :(.
2657
26582002-05-03 Akim Demaille <akim@epita.fr>
2659
2660 * configure.bat: Remove, completely obsolete.
2661 * Makefile.am (EXTRA_DIST): Adjust.
2662 Don't distribute config.rpath...
2663 * config/Makefile.am (EXTRA_DIST): Do it.
2664
26652002-05-03 Akim Demaille <akim@epita.fr>
2666
2667 * configure.in (GETTEXT_VERSION): New.
2668 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
2669
26702002-05-03 Akim Demaille <akim@epita.fr>
2671
2672 * data/bison.simple (b4_token_enum): New.
2673 (b4_token_defines): Use it to output tokens both as #define and
2674 enums.
2675 Suggested by Paul Eggert.
2676 * src/output.c (token_definitions_output): Don't output spurious
2677 white spaces.
2678
26792002-05-03 Akim Demaille <akim@epita.fr>
2680
2681 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2682
26832002-05-02 Robert Anisko <robert@lrde.epita.fr>
2684
2685 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
2686 Update the stack class, give a try to deque as the default container.
2687
26882002-05-02 Akim Demaille <akim@epita.fr>
2689
2690 * data/bison.simple (yyparse): Do not implement @$ = @1.
2691 (YYLLOC_DEFAULT): Adjust to do it.
2692 * doc/bison.texinfo (Location Default Action): Fix.
2693
26942002-05-02 Akim Demaille <akim@epita.fr>
2695
2696 * src/reader.c (parse_braces): Merge into...
2697 (parse_action): this.
2698
26992002-05-02 Akim Demaille <akim@epita.fr>
2700
2701 * configure.in (ALL_LINGUAS): Remove.
2702 * po/LINGUAS, hr.po: New.
2703
27042002-05-02 Akim Demaille <akim@epita.fr>
2705
2706 Remove the so called hairy (semantic) parsers.
2707
2708 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
2709 * src/gram.h, src/gram.c (semantic_parser): Remove.
2710 (rule_t): Remove the guard and guard_line members.
2711 * src/lex.h (token_t): remove tok_guard.
2712 * src/options.c (option_table): Remove %guard and %semantic_parser
2713 support.
2714 * src/output.c, src/output.h (guards_output): Remove.
2715 (prepare): Adjust.
2716 (token_definitions_output): Don't output the `T'
2717 tokens (???).
2718 (output_skeleton): Don't output the guards.
2719 * src/files.c, src/files.c (attrsfile): Remove.
2720 * src/reader.c (symbol_list): Remove the guard and guard_line
2721 members.
2722 Adjust dependencies.
2723 (parse_guard): Remove.
2724 * data/bison.hairy: Remove.
2725 * doc/bison.texinfo (Environment Variables): Remove occurrences of
2726 BISON_HAIRY.
2727
27282002-05-02 Akim Demaille <akim@epita.fr>
2729
2730 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
2731 (parse_guard): Rename the formal argument `stack_offset' as
2732 `rule_length', which is more readable.
2733 Adjust callers.
2734 (copy_at, copy_dollar): Instead of outputting the hard coded
2735 values of $$, $n and so forth, output invocation to b4_lhs_value,
2736 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
2737 Note: this patch partially drops `semantic-parser' support: it
2738 always does `rule_length - n', where semantic parsers ought to
2739 always use `-n'.
2740 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2741 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2742
27432002-05-02 Akim Demaille <akim@epita.fr>
2744
2745 * configure.in (AC_INIT): Bump to 1.49b.
2746 (AM_INIT_AUTOMAKE): Short invocation.
2747
27482002-05-02 Akim Demaille <akim@epita.fr>
2749
2750 Version 1.49a.
2751
27522002-05-01 Akim Demaille <akim@epita.fr>
2753
2754 * src/skeleton.h: Remove.
2755
27562002-05-01 Akim Demaille <akim@epita.fr>
2757
2758 * src/skeleton.h: Fix the #endif.
2759 Reported by Magnus Fromreide.
2760
27612002-04-26 Paul Eggert <eggert@twinsun.com>
2762
2763 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
2764 Define if we define YYSTYPE and YYLTYPE, respectively.
2765 (YYCOPY): Fix [] quoting problem in the non-GCC case.
2766
27672002-04-25 Robert Anisko <robert@lrde.epita.fr>
2768
2769 * src/scan-skel.l: Postprocess quadrigraphs.
2770
2771 * src/reader.c (copy_character): New function, used to output
2772 single characters while replacing `[' and `]' with quadrigraphs, to
2773 avoid troubles with M4 quotes.
2774 (copy_comment): Output characters with copy_character.
2775 (read_additionnal_code): Likewise.
2776 (copy_string2): Likewise.
2777 (copy_definition): Likewise.
2778
2779 * tests/calc.at: Exercise M4 quoting.
2780
27812002-04-25 Akim Demaille <akim@epita.fr>
2782
2783 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
2784 between `!' and the command.
2785 Reported by Paul Eggert.
2786
27872002-04-24 Robert Anisko <robert@lrde.epita.fr>
2788
2789 * tests/calc.at: Exercise prologue splitting.
2790
2791 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
2792 `b4_post_prologue' instead of `b4_prologue'.
2793
2794 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
2795 muscles.
2796 (output): Free pre_prologue_obstack and post_prologue_obstack.
2797 * src/files.h, src/files.c (attrs_obstack): Remove.
2798 (pre_prologue_obstack, post_prologue_obstack): New.
2799 * src/reader.c (copy_definition): Add a parameter to specify the
2800 obstack to fill, instead of using attrs_obstack unconditionally.
2801 (read_declarations): Pass pre_prologue_obstack to copy_definition if
2802 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
2803
28042002-04-23 Paul Eggert <eggert@twinsun.com>
2805
2806 * data/bison.simple: Remove unnecessary commentary and white
2807 space differences from 1_29-branch.
2808 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
2809
2810 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
2811 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
2812 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
2813 constructors or destructors.
2814
2815 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
2816
28172002-04-23 Akim Demaille <akim@epita.fr>
2818
2819 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
2820 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
2821 location with columns.
2822 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
2823 All reported by Paul Eggert.
2824
28252002-04-22 Akim Demaille <akim@epita.fr>
2826
2827 * src/reduce.c (dump_grammar): Move to...
2828 * src/gram.h, src/gram.c (grammar_dump): here.
2829 Be sure to separate long item numbers.
2830 Don't read the members of a rule's prec if its nil.
2831
28322002-04-22 Akim Demaille <akim@epita.fr>
2833
2834 * src/output.c (table_size, table_grow): New.
2835 (MAXTABLE): Remove, replace uses with table_size.
2836 (pack_vector): Instead of dying when the table is too big, grow it.
2837
28382002-04-22 Akim Demaille <akim@epita.fr>
2839
2840 * data/bison.simple (yyr1): Its type is that of a token number.
2841 * data/bison.c++ (r1_): Likewise.
2842 * tests/regression.at (Web2c Actions): Adjust.
2843
28442002-04-22 Akim Demaille <akim@epita.fr>
2845
2846 * src/reader.c (token_translations_init): 256 is now the default
2847 value for the error token, i.e., it will be assigned another
2848 number if the user assigned 256 to one of her tokens.
2849 (reader): Don't force 256 to error.
2850 * doc/bison.texinfo (Symbols): Adjust.
2851 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
2852 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
2853 etc. instead of 10, 20, 30 (which was used to `jump' over error
2854 (256) and undefined (2)).
2855
28562002-04-22 Akim Demaille <akim@epita.fr>
2857
2858 Propagate more token_number_t.
2859
2860 * src/gram.h (token_number_as_item_number)
2861 (item_number_as_token_number): New.
2862 * src/output.c (GENERATE_OUTPUT_TABLE): New.
2863 Use it to create output_item_number_table and
2864 output_token_number_table.
2865 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2866 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
2867 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
2868 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
2869
28702002-04-22 Akim Demaille <akim@epita.fr>
2871
2872 * src/output.h, src/output.c (get_lines_number): Remove.
2873
28742002-04-19 Akim Demaille <akim@epita.fr>
2875
2876 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
2877 as Lex/Flex'.
2878 (Debugging): More details about enabling the debugging features.
2879 (Table of Symbols): Describe $$, $n, @$, and @n.
2880 Suggested by Tim Josling.
2881
28822002-04-19 Akim Demaille <akim@epita.fr>
2883
2884 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
2885
28862002-04-10 Akim Demaille <akim@epita.fr>
2887
2888 * src/system.h: Rely on HAVE_LIMITS_H.
2889 Suggested by Paul Eggert.
2890
28912002-04-09 Akim Demaille <akim@epita.fr>
2892
2893 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
2894 full stderr, and strip it according to the bison options, instead
2895 of composing the error message from different bits.
2896 This makes it easier to check for several error messages.
2897 Adjust all the invocations.
2898 Add an invocation exercising the error token.
2899 Add an invocation demonstrating a stupid error message.
2900 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
2901 Adjust the tests.
2902 Error message are for stderr, not stdout.
2903
29042002-04-09 Akim Demaille <akim@epita.fr>
2905
2906 * src/gram.h, src/gram.c (error_token_number): Remove, use
2907 errtoken->number.
2908 * src/reader.c (reader): Don't specify the user token number (2)
2909 for $undefined, as it uselessly prevents using it.
2910 * src/gram.h (token_number_t): Move to...
2911 * src/symtab.h: here.
2912 (state_t.number): Is a token_number_t.
2913 * src/print.c, src/reader.c: Use undeftoken->number instead of
2914 hard coded 2.
2915 (Even though this 2 is not the same as above: the number of the
2916 undeftoken remains being 2, it is its user token number which
2917 might not be 2).
2918 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
2919 `user_token_number_max'.
2920 Output `undef_token_number'.
2921 * data/bison.simple, data/bison.c++: Use them.
2922 Be sure to map invalid yylex return values to
2923 `undef_token_number'. This saves us from gratuitous SEGV.
2924
2925 * tests/conflicts.at (Solved SR Conflicts)
2926 (Unresolved SR Conflicts): Adjust.
2927 * tests/regression.at (Web2c Actions): Adjust.
2928
29292002-04-08 Akim Demaille <akim@epita.fr>
2930
2931 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
2932 Adding #line.
2933 Remove the duplicate `typedefs'.
2934 (RhsNumberType): Fix the declaration and various other typos.
2935 Use __ofile__.
2936 * data/bison.simple: Use __ofile__.
2937 * src/scan-skel.l: Handle __ofile__.
2938
29392002-04-08 Akim Demaille <akim@epita.fr>
2940
2941 * src/gram.h (item_number_t): New, the type of item numbers in
2942 RITEM. Note that it must be able to code symbol numbers as
2943 positive number, and the negation of rule numbers as negative
2944 numbers.
2945 Adjust all dependencies (pretty many).
2946 * src/reduce.c (rule): Remove this `short *' pointer: use
2947 item_number_t.
2948 * src/system.h (MINSHORT, MAXSHORT): Remove.
2949 Include `limits.h'.
2950 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
2951 (shortcpy): Remove.
2952 (MAXTABLE): Move to...
2953 * src/output.c (MAXTABLE): here.
2954 (prepare_rules): Use output_int_table to output rhs.
2955 * data/bison.simple, data/bison.c++: Adjust.
2956 * tests/torture.at (Big triangle): Move the limit from 254 to
2957 500.
2958 * tests/regression.at (Web2c Actions): Ajust.
2959
2960 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
2961 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
2962 passes, but produces negative #line number, once fixed, GCC is
2963 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
2964 C), it passes.
2965 * src/state.h (state_h): Code input lines on ints, not shorts.
2966
29672002-04-08 Akim Demaille <akim@epita.fr>
2968
2969 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
2970 and then the grammar.
2971
29722002-04-08 Akim Demaille <akim@epita.fr>
2973
2974 * src/system.h: No longer using strndup.
2975
29762002-04-07 Akim Demaille <akim@epita.fr>
2977
2978 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
2979 * src/output.c (output_table_data): Return the longest number.
2980 (prepare_tokens): Output `token_number_max').
2981 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
2982 New.
2983 Use them to define yy_token_number_type/TokenNumberType.
2984 Use this type for yytranslate.
2985 * tests/torture.at (Big triangle): Push the limit from 124 to
2986 253.
2987 * tests/regression.at (Web2c Actions): Adjust.
2988
29892002-04-07 Akim Demaille <akim@epita.fr>
2990
2991 * tests/torture.at (Big triangle): New.
2992 (GNU AWK Grammar, GNU Cim Grammar): Move to...
2993 * tests/existing.at: here.
2994
29952002-04-07 Akim Demaille <akim@epita.fr>
2996
2997 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
2998 nritems.
2999 Adjust dependencies.
3000
30012002-04-07 Akim Demaille <akim@epita.fr>
3002
3003 * src/reader.c: Normalize increments to prefix form.
3004
30052002-04-07 Akim Demaille <akim@epita.fr>
3006
3007 * src/reader.c, symtab.c: Remove debugging code.
3008
30092002-04-07 Akim Demaille <akim@epita.fr>
3010
3011 Rename all the `bucket's as `symbol_t'.
3012
3013 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
3014 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
3015 * src/symtab.c, src/symtab.h (bucket): Rename as...
3016 (symbol_t): this.
3017 (symbol_list_new, bucket_check_defined, bucket_make_alias)
3018 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
3019 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3020 (buckets_new, buckets_free, buckets_do): Rename as...
3021 (symbol_list_new, symbol_check_defined, symbol_make_alias)
3022 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3023 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
3024 (symbols_new, symbols_free, symbols_do): these.
3025
30262002-04-07 Akim Demaille <akim@epita.fr>
3027
3028 Use lib/hash for the symbol table.
3029
3030 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
3031 EOF.
3032 * src/lex.c (lex): Set the `number' member of new terminals.
3033 * src/reader.c (bucket_check_defined, bucket_make_alias)
3034 (bucket_check_alias_consistence, bucket_translation): New.
3035 (reader, grammar_free, readgram, token_translations_init)
3036 (packsymbols): Adjust.
3037 (reader): Number the predefined tokens.
3038 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
3039 for predefined tokens.
3040 * src/symtab.h (bucket): Remove all the hash table related
3041 members.
3042 * src/symtab.c (symtab): Replace by...
3043 (bucket_table): this.
3044 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3045 (buckets_new, buckets_do): New.
3046
30472002-04-07 Akim Demaille <akim@epita.fr>
3048
3049 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
3050 (start_symbol, max_user_token_number, semantic_parser)
3051 (error_token_number): Initialize.
3052 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
3053 Initialize.
3054 (reader): Don't.
3055 (errtoken, eoftoken, undeftoken, axiom): Extern.
3056
30572002-04-07 Akim Demaille <akim@epita.fr>
3058
3059 * src/gram.h (rule_s): prec and precsym are now pointers
3060 to the bucket giving the priority/associativity.
3061 Member `associativity' removed: useless.
3062 * src/reduce.c, src/conflicts.c: Adjust.
3063
30642002-04-07 Akim Demaille <akim@epita.fr>
3065
3066 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
3067 Properly escape the symbols' TAG when outputting them.
3068
30692002-04-07 Akim Demaille <akim@epita.fr>
3070
3071 * src/lalr.h (LA): Is a bitsetv, not bitset*.
3072
30732002-04-07 Akim Demaille <akim@epita.fr>
3074
3075 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
3076 (LArule): this, which is an array to rule_t*.
3077 * src/print.c, src/conflicts.c: Adjust.
3078
30792002-04-07 Akim Demaille <akim@epita.fr>
3080
3081 * src/gram.h (rule_t): Rename `number' as `user_number'.
3082 `number' is a new member.
3083 Adjust dependencies.
3084 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
3085
30862002-04-07 Akim Demaille <akim@epita.fr>
3087
3088 As a result of the previous patch, it is no longer needed
3089 to reorder ritem itself.
3090
3091 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
3092
30932002-04-07 Akim Demaille <akim@epita.fr>
3094
3095 Be sure never to walk through RITEMS, but use only data related to
3096 the rules themselves. RITEMS should be banished.
3097
3098 * src/output.c (output_token_translations): Rename as...
3099 (prepare_tokens): this.
3100 In addition to `translate', prepare the muscles `tname' and
3101 `toknum', which were handled by...
3102 (output_rule_data): this.
3103 Remove, and move the remainder of its outputs into...
3104 (prepare_rules): this new routines, which also merges content from
3105 (output_gram): this.
3106 (prepare_rules): Be sure never to walk through RITEMS.
3107 (output_stos): Rename as...
3108 (prepare_stos): this.
3109 (output): Always invoke prepare_states, after all, just don't use it
3110 in the output if you don't need it.
3111
31122002-04-07 Akim Demaille <akim@epita.fr>
3113
3114 * src/LR0.c (new_state): Display `nstates' as the name of the
3115 newly created state.
3116 Adjust to initialize first_state and last_state if needed.
3117 Be sure to distinguish the initial from the final state.
3118 (new_states): Create the itemset of the initial state, and use
3119 new_state.
3120 * src/closure.c (closure): Now that the initial state has its
3121 items properly set, there is no need for a special case when
3122 creating `ruleset'.
3123
3124 As a result, now the rule 0, reducing to $axiom, is visible in the
3125 outputs. Adjust the test suite.
3126
3127 * tests/conflicts.at (Solved SR Conflicts)
3128 (Unresolved SR Conflicts): Adjust.
3129 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
3130 * tests/conflicts.at (S/R in initial): New.
3131
31322002-04-07 Akim Demaille <akim@epita.fr>
3133
3134 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
3135 the RHS of the rules.
3136 * src/output.c (output_gram): Likewise.
3137
31382002-04-07 Akim Demaille <akim@epita.fr>
3139
3140 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
3141 bucket.
3142 Adjust all dependencies.
3143 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
3144 `number' of the buckets too.
3145 * src/gram.h: Include `symtab.h'.
3146 (associativity): Move to...
3147 * src/symtab.h: here.
3148 No longer include `gram.h'.
3149
31502002-04-07 Akim Demaille <akim@epita.fr>
3151
3152 * src/gram.h, src/gram.c (rules_rhs_length): New.
3153 (ritem_longest_rhs): Use it.
3154 * src/gram.h (rule_t): `number' is a new member.
3155 * src/reader.c (packgram): Set it.
3156 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
3157 the end of `rules', and count them out of `nrules'.
3158 (reduce_output, dump_grammar): Adjust.
3159 * src/print.c (print_grammar): It is no longer needed to check for
3160 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
3161 * tests/reduce.at (Reduced Automaton): New test.
3162
31632002-04-07 Akim Demaille <akim@epita.fr>
3164
3165 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
3166 lacking `+ 1' to nrules, Bison reported as useless a token if it
3167 was used solely to set the precedence of the last rule...
3168
31692002-04-07 Akim Demaille <akim@epita.fr>
3170
3171 * data/bison.c++, data/bison.simple: Don't output the current file
3172 name in #line, to avoid useless diffs between two identical
3173 outputs under different names.
3174
31752002-04-07 Akim Demaille <akim@epita.fr>
3176
3177 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
3178 Normalize loops to using `< nrules + 1', not `<= nrules'.
3179
31802002-04-07 Akim Demaille <akim@epita.fr>
3181
3182 * TODO: Update.
3183
31842002-04-07 Akim Demaille <akim@epita.fr>
3185
3186 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
3187 bucket.value as bucket.number.
3188
31892002-04-07 Akim Demaille <akim@epita.fr>
3190
3191 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
3192 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
3193 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
3194 RHS, instead of being an index in RITEMS.
3195
31962002-04-04 Paul Eggert <eggert@twinsun.com>
3197
3198 * doc/bison.texinfo: Update copyright date.
3199 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
3200 (Symbols): Warn about running Bison in one character set,
3201 but compiling and/or running in an incompatible one.
3202 Warn about character code 256, too.
3203
32042002-04-03 Paul Eggert <eggert@twinsun.com>
3205
3206 * src/bison.data (YYSTACK_ALLOC): Depend on whether
3207 YYERROR_VERBOSE is nonzero, not whether it is defined.
3208
3209 Merge changes from bison-1_29-branch.
3210
32112002-03-20 Paul Eggert <eggert@twinsun.com>
3212
3213 Merge fixes from Debian bison_1.34-1.diff.
3214
3215 * configure.in (AC_PREREQ): 2.53.
3216
32172002-03-20 Akim Demaille <akim@epita.fr>
3218
3219 * src/conflicts.c (log_resolution): Argument `resolution' is const.
3220
32212002-03-19 Paul Eggert <eggert@twinsun.com>
3222
3223 * src/bison.simple (YYCOPY): New macro.
3224 (YYSTACK_RELOCATE): Use it.
3225 Remove Type arg; no longer needed. All callers changed.
3226 (yymemcpy): Remove; no longer needed.
3227
3228 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
3229 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3230
32312002-03-19 Akim Demaille <akim@epita.fr>
3232
3233 Test and fix the #line outputs.
3234
3235 * tests/atlocal.at (GCC): New.
3236 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
3237 (Prologue synch line, ,%union synch line, Postprologue synch line)
3238 (Action synch line, Epilogue synch line): New tests.
3239 * src/reader.c (parse_union_decl): Define the muscle stype_line.
3240 * data/bison.simple, data/bison.c++: Use it.
3241
32422002-03-19 Akim Demaille <akim@epita.fr>
3243
3244 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
3245 (Solved SR Conflicts, %expect not enough, %expect right)
3246 (%expect too much): Move to...
3247 * tests/conflicts.at: this new file.
3248
32492002-03-19 Akim Demaille <akim@epita.fr>
3250
3251 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3252 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
3253 that we can move to enums for instance.
3254 * src/output.c (token_definitions_output): Output a list of
3255 `token-name, token-number' instead of the #define.
3256 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
3257
32582002-03-14 Akim Demaille <akim@epita.fr>
3259
3260 Use Gettext 0.11.1.
3261
32622002-03-09 Robert Anisko <robert@lrde.epita.fr>
3263
3264 * data/bison.c++: Make the user able to add members to the generated
3265 parser by subclassing.
3266
32672002-03-05 Robert Anisko <robert@lrde.epita.fr>
3268
3269 * src/reader.c (read_additionnal_code): `c' should be an integer, not
3270 a character.
3271 Reported by Nicolas Tisserand and Nicolas Burrus.
3272
32732002-03-04 Robert Anisko <robert@lrde.epita.fr>
3274
3275 * src/reader.c: Warn about lacking semi-colons, do not complain.
3276
32772002-03-04 Robert Anisko <robert@lrde.epita.fr>
3278
3279 * data/bison.c++: Remove a debug line.
3280
32812002-03-04 Robert Anisko <robert@lrde.epita.fr>
3282
3283 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
3284 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
3285 provide a default implementation.
3286
32872002-03-04 Akim Demaille <akim@epita.fr>
3288
3289 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
3290 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
3291 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
3292 * tests/semantic.at (Parsing Guards): Similarly.
3293 * src/reader.at (readgram): Complain if the last rule is not ended
3294 with a semi-colon.
3295
32962002-03-04 Akim Demaille <akim@epita.fr>
3297
3298 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
3299 * src/closure.c: here.
3300 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
3301 RTC.
3302 * src/warshall.h, src/warshall.c: Remove.
3303 * tests/sets.at (Broken Closure): Adjust.
3304
33052002-03-04 Akim Demaille <akim@epita.fr>
3306
3307 * src/output.c (output_skeleton): tempdir is const.
3308 bytes_read is unused.
3309
33102002-03-04 Akim Demaille <akim@epita.fr>
3311
3312 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3313 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
3314 Update.
3315 From Michael Hayes.
3316
33172002-03-04 Akim Demaille <akim@epita.fr>
3318
3319 * src/closure.c (closure): `r' is unused.
3320
33212002-03-04 Akim Demaille <akim@epita.fr>
3322
3323 * tests/sets.at (Broken Closure): Add the ending `;'.
3324 * src/reader.at (readgram): Complain if a rule is not ended with a
3325 semi-colon.
3326
33272002-03-04 Akim Demaille <akim@epita.fr>
3328
3329 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
3330 (count_sr_conflicts): Use bitset_count.
3331 * src/reduce.c (inaccessable_symbols): Ditto.
3332 (bits_size): Remove.
3333 * src/warshall.h, src/warshall.c: Convert to bitsetv.
3334
33352002-03-04 Akim Demaille <akim@epita.fr>
3336
3337 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
3338 * src/reduce.c: Remove the `bitset_zero's following the
3339 `bitset_create's, as now it is performed by the latter.
3340
33412002-03-04 Akim Demaille <akim@epita.fr>
3342
3343 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
3344 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
3345 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
3346 latest sources from Michael.
3347
33482002-03-04 Akim Demaille <akim@epita.fr>
3349
3350 * src/output.c (output): Don't free the grammar.
3351 * src/reader.c (grammar_free): New.
3352 * src/main.c (main): Call it and don't free symtab here.
3353
33542002-03-04 Akim Demaille <akim@epita.fr>
3355
3356 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
3357 before returning.
3358 Reported by Benoit Perrot.
3359
33602002-03-04 Akim Demaille <akim@epita.fr>
3361
3362 Use bitset operations when possible, not loops over bits.
3363
3364 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
3365 bitset_or.
3366 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
3367 * src/reduce.c (useless_nonterminals): Formatting changes.
3368 * src/warshall.c (TC): Use bitset_or.
3369
33702002-03-04 Akim Demaille <akim@epita.fr>
3371
3372 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
3373 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
3374 Ditto.
3375
33762002-03-04 Akim Demaille <akim@epita.fr>
3377
3378 * src/lalr.c (F): Now a bitset*.
3379 Adjust all dependencies.
3380
33812002-03-04 Akim Demaille <akim@epita.fr>
3382
3383 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
3384 Adjust all dependencies.
3385
33862002-03-04 Akim Demaille <akim@epita.fr>
3387
3388 * src/L0.c, src/LR0.h (nstates): Be size_t.
3389 Adjust comparisons (signed vs unsigned).
3390 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
3391 bitset*.
3392 Adjust all dependencies.
3393
33942002-03-04 Akim Demaille <akim@epita.fr>
3395
3396 * src/closure.c (firsts): Now, also a bitset.
3397 Adjust all dependencies.
3398 (varsetsize): Remove, now unused.
3399 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
3400
34012002-03-04 Akim Demaille <akim@epita.fr>
3402
3403 * src/print.c: Convert to use bitset.h, not hand coded iterations
3404 over ints.
3405
34062002-03-04 Akim Demaille <akim@epita.fr>
3407
3408 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
3409
34102002-03-04 Akim Demaille <akim@epita.fr>
3411
3412 * src/closure.c (ruleset): Be a bitset.
3413 (rulesetsize): Remove.
3414
34152002-03-04 Akim Demaille <akim@epita.fr>
3416
3417 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3418 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
3419 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
3420 * src/closure.c (fderives): Be an array of bitsets.
3421
34222002-02-28 Robert Anisko <robert@lrde.epita.fr>
3423
3424 * data/bison.c++: Merge the two generated headers. Insert a copyright
3425 notice in each output file.
3426
34272002-02-28 Akim Demaille <akim@epita.fr>
3428
3429 * data/bison.c++: Copy the prologue of bison.simple to fetch
3430 useful M4 definitions, such as b4_header_guard.
3431
34322002-02-25 Akim Demaille <akim@epita.fr>
3433
3434 * src/getargs.c (version): Give the name of the authors, and use a
3435 translator friendly scheme for the bgr
3436 copyright notice.
3437
34382002-02-25 Akim Demaille <akim@epita.fr>
3439
3440 * src/output.c (header_output): Remove, now handled completely via
3441 M4.
3442
34432002-02-25 Akim Demaille <akim@epita.fr>
3444
3445 * m4/m4.m4: New, from CVS Autoconf.
3446 * configure.in: Invoke it.
3447 * src/output.c (output_skeleton): Use its result instead of the
3448 hard coded name.
3449
34502002-02-25 Akim Demaille <akim@epita.fr>
3451
3452 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
3453 Fileutils 4.1.5.
3454 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
3455 * src/output.c (output_skeleton): Use mkstemp to create a real
3456 temporary file.
3457 Move the filling of `skeleton' and its muscle to...
3458 (prepare): here.
3459 (output): Move the definition of the prologue muscle to...
3460 (prepare): here.
3461 * src/system.h (DEFAULT_TMPDIR): New.
3462
34632002-02-14 Paul Eggert <eggert@twinsun.com>
3464
3465 Remove the support for C++ namespace cleanliness; it was
3466 causing more problems than it was curing, since it didn't work
3467 properly on some nonstandard C++ compilers. This can wait
3468 for a proper C++ parser.
3469
3470 * NEWS: Document this.
3471 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
3472 of C++, as it's treated like C now.
3473 * src/bison.simple (YYSTD): Remove.
3474 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
3475 Treat C++ just like Standard C instead of trying to support
3476 namespace cleanliness.
3477
34782002-02-14 Akim Demaille <akim@epita.fr>
3479
3480 * tests/regression.at (else): Adjust to Andreas' change.
3481
34822002-02-14 Akim Demaille <akim@epita.fr>
3483
3484 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
3485
34862002-02-13 Andreas Schwab <schwab@suse.de>
3487
3488 * src/output.c (output_rule_data): Don't output NULL, it might
3489 not be defined yet.
3490
34912002-02-11 Robert Anisko <robert@lrde.epita.fr>
3492
3493 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
3494 (Copyright notice): Update.
3495
34962002-02-11 Akim Demaille <akim@epita.fr>
3497
3498 * tests/regression.at (%nonassoc and eof): Don't include
3499 nonportable headers.
3500
35012002-02-08 Robert Anisko <robert@lrde.epita.fr>
3502
3503 * data/bison.c++: Correct error recovery. Make the user able to
3504 initialize the starting location.
3505
35062002-02-07 Akim Demaille <akim@epita.fr>
3507
3508 * tests/input.at: New.
3509
35102002-02-07 Robert Anisko <robert@lrde.epita.fr>
3511
3512 * data/bison.c++: Replace some direct m4 expansions by constants. Be
3513 more consistent when naming methods and variables. Put preprocessor
3514 directives around tables only needed for debugging.
3515
35162002-02-07 Robert Anisko <robert@lrde.epita.fr>
3517
3518 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
3519 C++ parsers.
3520 (yy::b4_name::parse): Use print_.
3521
35222002-02-07 Robert Anisko <robert@lrde.epita.fr>
3523
3524 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
3525
35262002-02-07 Robert Anisko <robert@lrde.epita.fr>
3527
3528 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
3529 C++ parsers.
3530 (yy::b4_name::parse): Build verbose error messages, and use error_.
3531
35322002-02-06 Robert Anisko <robert@lrde.epita.fr>
3533
3534 * data/bison.c++: Fix m4 quoting in comments.
3535
35362002-02-06 Robert Anisko <robert@lrde.epita.fr>
3537
3538 * data/bison.c++: Adjust the parser code. Fix some muscles that were
3539 not expanded by m4.
3540
35412002-02-05 Akim Demaille <akim@epita.fr>
3542
3543 * data/bison.c++: Adjust to the M4 back end.
3544 More is certainly needed.
3545
35462002-02-05 Akim Demaille <akim@epita.fr>
3547
3548 Give a try to M4 as a back end.
3549
3550 * lib/readpipe.c: New, from wdiff.
3551 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
3552 BISON_HAIRY.
3553 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
3554 specific values. Now it is m4 that performs the lookup.
3555 * src/parse-skel.y: Remove.
3556 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
3557 * src/output.c (actions_output, guards_output)
3558 (token_definitions_output): No longer keeps track of the output
3559 line number, hence remove the second argument.
3560 (guards_output): Check against the guard member of a rule, not the
3561 action member.
3562 Adjust callers.
3563 (output_skeleton): Don't look for the skeleton location, let m4 do
3564 that.
3565 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
3566 file will be used.
3567 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
3568 (prepare): Given that for the time being changesyntax is not
3569 usable in M4, rename the muscles using `-' to `_'.
3570 Define `defines_flag', `output_parser_name' and `output_header_name'.
3571 * src/output.h (actions_output, guards_output)
3572 (token_definitions_output): Adjust prototypes.
3573 * src/scan-skel.l: Instead of scanning the skeletons, it now
3574 processes the output of m4: `__oline__' and `#output'.
3575 * data/bison.simple: Adjust to be used by M4(sugar).
3576 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
3577 to date.
3578 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
3579 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
3580 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
3581 shamelessly stolen from CVS Autoconf.
3582
35832002-02-05 Akim Demaille <akim@epita.fr>
3584
3585 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
3586 * configure.in: Check for the declarations of free and malloc.
3587 * src/muscle_tab.c: Adjust.
3588
35892002-02-05 Akim Demaille <akim@epita.fr>
3590
3591 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
3592 which have no values.
3593
35942002-02-05 Akim Demaille <akim@epita.fr>
3595
3596 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
3597 * data/: here.
3598
35992002-01-29 Paul Eggert <eggert@twinsun.com>
3600
3601 * src/bison.simple (YYSIZE_T): Do not define merely because
3602 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
3603 On some platforms, <alloca.h> does not declare YYSTD (size_t).
3604
36052002-01-27 Akim Demaille <akim@epita.fr>
3606
3607 Fix `%nonassoc and eof'.
3608
3609 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
3610 which were not properly copied! Replace
3611 memcpy (res->errs, src->errs, src->nerrs);
3612 with
3613 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
3614 !!!
3615 * tests/regression.at (%nonassoc and eof): Adjust to newest
3616 Autotest: `.' is not in the PATH.
3617
36182002-01-27 Akim Demaille <akim@epita.fr>
3619
3620 * tests/sets.at (AT_EXTRACT_SETS): New.
3621 (Nullable): Use it.
3622 (Firsts): New.
3623
36242002-01-26 Akim Demaille <akim@epita.fr>
3625
3626 * tests/actions.at, tests/calc.at, tests/headers.at,
3627 * tests/torture.at: Adjust to the newest Autotest which no longer
3628 forces `.' in the PATH.
3629
36302002-01-25 Akim Demaille <akim@epita.fr>
3631
3632 * tests/regression.at (%nonassoc and eof): New.
3633 Suggested by Robert Anisko.
3634
36352002-01-24 Akim Demaille <akim@epita.fr>
3636
3637 Bison dumps core when trying to complain about broken input files.
3638 Reported by Cris van Pelt.
3639
3640 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
3641 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
3642 into...
3643 (Invalid inputs): Strengthen: exercise parse_percent_token.
3644
36452002-01-24 Robert Anisko <robert.anisko@epita.fr>
3646
3647 * src/Makefile.am: Add bison.c++.
3648 * src/bison.c++: New skeleton.
3649
36502002-01-21 Paolo Bonzini <bonzini@gnu.org>
3651
3652 * po/it.po: New.
3653
36542002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3655
3656 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3657
36582002-01-20 Marc Autret <marc@gnu.org>
3659
3660 * src/files.c (compute_output_file_names): Fix
3661
36622002-01-20 Marc Autret <marc@gnu.org>
3663
3664 * tests/output.at: New test.
3665 * src/files.c (compute_base_names): Don't map extensions when
3666 the YACC flag is set, use defaults.
3667 Reported by Evgeny Stambulchik.
3668
36692002-01-20 Marc Autret <marc@gnu.org>
3670
3671 * src/system.h: Need to define __attribute__ away for non-GCC
3672 compilers as well (i.e. the vendor C compiler).
3673 Suggested by Albert Chin-A-Young.
3674
36752002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
3676
3677 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
3678 canonical definition.
3679 * src/system.h: Use the canonical definition for PARAMS (avoids
3680 a conflict with the macro from lib/hash.h).
3681
36822002-01-11 Akim Demaille <akim@epita.fr>
3683
3684 * configure.in: Use AC_FUNC_STRNLEN.
3685 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
3686
36872002-01-09 Akim Demaille <akim@epita.fr>
3688
3689 * src/files.c, src/files.h (output_infix): New.
3690 (tab_extension): Remove.
3691 (compute_base_names): Compute the former, drop the latter.
3692 * src/output.c (prepare): Insert the muscles `output-infix', and
3693 `output-suffix'.
3694 * src/parse-skel.y (string, string.1): New.
3695 (section.header): Use it.
3696 (section.yacc): Remove.
3697 (prefix): Remove too.
3698 * src/scan-skel.l: Adjust.
3699 * src/bison.simple, src/bison.hairy: Adjust.
3700
37012002-01-09 Akim Demaille <akim@epita.fr>
3702
3703 * configure.in (WERROR_CFLAGS): Compute it.
3704 * src/Makefile.am (CFLAGS): Pass it.
3705 * tests/atlocal.in (CFLAGS): Idem.
3706 * src/files.c: Fix a few warnings.
3707 (get_extension_index): Remove, unused.
3708
37092002-01-08 Akim Demaille <akim@epita.fr>
3710
3711 * src/getargs.c (AS_FILE_NAME): New.
3712 (getargs): Use it to convert DOSish file names.
3713 * src/files.c (base_name): Rename as full_base_name to avoid
3714 clashes with `base_name ()'.
3715 (filename_split): New.
3716 (compute_base_names): N-th rewrite, using filename_split.
3717
37182002-01-08 Akim Demaille <akim@epita.fr>
3719
3720 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
3721 New, stolen from the Fileutils 4.1.
3722 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3723 * configure.in: Check for the presence of memrchr, and of its
3724 prototype.
3725
37262002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
3727
3728 * lib/hash.h (__P): Added definition for this macro.
3729 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
3730 BUILT_SOURCES, to ensure they are generated first.
3731 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
3732 %error-verbose to allow bootstrapping with bison 1.30x.
3733
37342002-01-06 Akim Demaille <akim@epita.fr>
3735
3736 * src/reader.c (parse_braces): Don't fetch the next char, the
3737 convention is to fetch on entry.
3738 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
3739 'switch' without a following semicolon.
3740 * tests/regression.at (braces parsing): New.
3741
37422002-01-06 Akim Demaille <akim@epita.fr>
3743
3744 Bison is dead wrong in its RR conflict reports.
3745
3746 * tests/torture.at (GNU Cim Grammar): New.
3747 * src/conflicts.c (count_rr_conflicts): Fix.
3748
37492002-01-06 Akim Demaille <akim@epita.fr>
3750
3751 Creating package.m4 from configure.ac causes too many problems.
3752
3753 * tests/Makefile.am (package.m4): Create it by hand,
3754 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
3755
37562002-01-06 Akim Demaille <akim@epita.fr>
3757
3758 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3759 skeleton.h.
3760
37612002-01-04 Paul Eggert <eggert@twinsun.com>
3762
3763 * doc/bison.texinfo (Debugging):
3764 Remove YYSTDERR; it's no longer defined or used.
3765 Also, s/cstdio.h/cstdio/.
3766
37672002-01-03 Akim Demaille <akim@epita.fr>
3768
3769 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3770
37712002-01-03 Akim Demaille <akim@epita.fr>
3772
3773 * src/parse-skel.y (process_skeleton): Don't bind the parser's
3774 tracing code to --trace, wait for a better --trace option, with
3775 args.
3776
37772002-01-03 Akim Demaille <akim@epita.fr>
3778
3779 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
3780 The ISO C++ standard is extremely clear about it: stderr is
3781 considered a macro, not a regular symbol (see table 94 `Header
3782 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
3783 Therefore std:: does not apply to it. It still does with fprintf.
3784 Also, s/cstdio.h/cstdio/.
3785
37862002-01-03 Akim Demaille <akim@epita.fr>
3787
3788 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
3789 for non system headers.
3790
37912002-01-02 Akim Demaille <akim@epita.fr>
3792
3793 Equip the skeleton chain with location tracking, runtime trace,
3794 pure parser and scanner.
3795
3796 * src/parse-skel.y: Request a pure parser, locations, and prefix
3797 renaming.
3798 (%union): Having several members with the same type does not help
3799 type mismatches, simplify.
3800 (YYPRINT, yyprint): New.
3801 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
3802 (skel_error): this.
3803 Handle locations.
3804 * src/scan-skel.l: Adjust to these changes.
3805 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
3806 (LOCATION_PRINT, skel_control_t): New.
3807
38082001-12-30 Akim Demaille <akim@epita.fr>
3809
3810 * src/parse-skel.y: Get rid of the shift/reduce conflict:
3811 replace `gb' with BLANKS.
3812 * src/scan-skel.l: Adjust.
3813
38142001-12-30 Akim Demaille <akim@epita.fr>
3815
3816 * src/system.h: We don't need nor want bcopy.
3817 Throw away MS-DOS crap: we don't need getpid.
3818 * configure.in: We don't need strndup. It was even causing
3819 problems: because Flex includes the headers *before* us,
3820 _GNU_SOURCE is not defined by config.h, and therefore strndup was
3821 not visible.
3822 * lib/xstrndup.c: New.
3823 * src/scan-skel.l: Use it.
3824 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
3825 * src/parse-skel.y: Use %directives instead of #defines.
3826
38272001-12-30 Akim Demaille <akim@epita.fr>
3828
3829 * src/skeleton.h: New.
3830 * src/output.c (output_parser, output_master_parser): Remove, dead
3831 code.
3832 * src/output.h (get_lines_number, actions_output, guards_output)
3833 (token_definitions_output): Prototype them.
3834 * src/parse-skel.y: Add the license notice.
3835 Include output.h and skeleton.h.
3836 (process_skeleton): Returns void, and takes a single parameter.
3837 * src/scan-skel.l: Add the license notice.
3838 Include skeleton.h.
3839 Don't use %option yylineno: it seems that then Flex imagines
3840 REJECT has been used, and therefore it won't reallocate its
3841 buffers (which makes no other sense to me than a bug). It results
3842 in warnings for `unused: yy_flex_realloc'.
3843
38442001-12-30 Robert Anisko <robert.anisko@epita.fr>
3845
3846 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3847 (MUSCLE_INSERT_PREFIX): ...to there.
3848 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3849 (MUSCLE_INSERT_PREFIX): Move from here...
3850
3851 * src/bison.hairy: Add a section directive. Put braces around muscle
3852 names. This parser skeleton is still broken, but Bison should not
3853 choke on a bad muscle 'syntax'.
3854 * src/bison.simple: Add a section directive. Put braces around muscle
3855 names.
3856
3857 * src/files.h (strsuffix, stringappend): Add declarations.
3858 (tab_extension): Add declaration.
3859 (short_base_name): Add declaration.
3860
3861 * src/files.c (strsuffix, stringappend): No longer static. These
3862 functions are used in the skeleton parser.
3863 (tab_extension): New.
3864 (compute_base_names): Use the computations done in this function
3865 to guess if the generated parsers should have '.tab' in their
3866 names.
3867 (short_base_name): No longer static.
3868
3869 * src/output.c (output_skeleton): New.
3870 (output): Disable call to output_master_parser, and give a try to
3871 a new skeleton handling system.
3872 (guards_output, actions_output): No longer static.
3873 (token_definitions_output, get_lines_number): No longer static.
3874
3875 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
3876
3877 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
3878 parse-skel.y.
3879
3880 * src/parse-skel.y: New file.
3881 * src/scan-skel.l: New file.
3882
38832001-12-29 Akim Demaille <akim@epita.fr>
3884
3885 %name-prefix is broken.
3886
3887 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
3888 Adjust all dependencies.
3889 * tests/headers.at (export YYLTYPE): Strengthen this test: use
3890 %name-prefix.
3891
3892 Renaming yylval but not yylloc is not consistent. Now we do.
3893
3894 * src/bison.simple: Prefix yylloc if used.
3895 * doc/bison.texinfo (Decl Summary): Document that.
3896
38972001-12-29 Akim Demaille <akim@epita.fr>
3898
3899 * doc/bison.texinfo: Promote `%long-directive' over
3900 `%long_directive'.
3901 Remove all references to fixed-output-files, yacc is enough.
3902
39032001-12-29 Akim Demaille <akim@epita.fr>
3904
3905 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
3906 user prologue. These are defaults.
3907 * tests/actions.at (Mid-rule actions): Make sure the user can
3908 define YYDEBUG and YYERROR_VERBOSE.
3909
39102001-12-29 Akim Demaille <akim@epita.fr>
3911
3912 * src/output.c (header_output): Don't forget to export YYLTYPE and
3913 yylloc.
3914 * tests/headers.at (export YYLTYPE): New, make sure it does.
3915 * tests/regression.at (%union and --defines, Invalid CPP headers):
3916 Move to...
3917 * tests/headers.at: here.
3918
39192001-12-29 Akim Demaille <akim@epita.fr>
3920
3921 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
3922
39232001-12-29 Akim Demaille <akim@epita.fr>
3924
3925 * tests/actions.at (Mid-rule actions): Output on a single line
3926 instead of several.
3927
39282001-12-29 Akim Demaille <akim@epita.fr>
3929
3930 * doc/bison.texinfo: Formatting changes.
3931
39322001-12-29 Akim Demaille <akim@epita.fr>
3933
3934 Don't store the token defs in a muscle, just be ready to output it
3935 on command. Now possible via `symbols'. Fixes a memory leak.
3936
3937 * src/output.c (token_definitions_output): New.
3938 (output_parser, header_output): Use it.
3939 * src/reader.c (symbols_save): Remove.
3940
39412001-12-29 Akim Demaille <akim@epita.fr>
3942
3943 * src/bison.simple: Do not provide a default for YYSTYPE and
3944 YYLTYPE before the user's prologue. Otherwise it's hardly... a
3945 default.
3946
39472001-12-29 Akim Demaille <akim@epita.fr>
3948
3949 Mid-rule actions are simply... ignored!
3950
3951 * src/reader.c (readgram): Be sure to attach mid-rule actions to
3952 the empty-rule associated to the dummy symbol, not to the host
3953 rule.
3954 * tests/actions.at (Mid-rule actions): New.
3955
39562001-12-29 Akim Demaille <akim@epita.fr>
3957
3958 Memory leak.
3959
3960 * src/reader.c (reader): Free grammar.
3961
39622001-12-29 Akim Demaille <akim@epita.fr>
3963
3964 Memory leak.
3965
3966 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
3967 since it allocates it for each state, although only one is needed.
3968 (allocate_storage): Do it here.
3969
39702001-12-29 Akim Demaille <akim@epita.fr>
3971
3972 * src/options.h, src/options.c (create_long_option_table): Rename
3973 as...
3974 (long_option_table_new): this, with a clearer prototype.
3975 (percent_table): Remove, unused,
3976 * src/getargs.c (getargs): Adjust.
3977
39782001-12-29 Akim Demaille <akim@epita.fr>
3979
3980 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
3981 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
3982 as states.
3983
39842001-12-29 Akim Demaille <akim@epita.fr>
3985
3986 * src/lalr.c (build_relations): Rename `states' as `states1'.
3987 Sorry, I don't understand exactly what it is, no better name...
3988
39892001-12-29 Akim Demaille <akim@epita.fr>
3990
3991 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
3992 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
3993 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
3994 as rules.
3995
39962001-12-29 Akim Demaille <akim@epita.fr>
3997
3998 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
3999 ago.
4000
40012001-12-29 Akim Demaille <akim@epita.fr>
4002
4003 * src/reader.c, src/reader.h (user_toknums): Remove.
4004 Adjust all users to use symbols[i]->user_token_number.
4005
40062001-12-29 Akim Demaille <akim@epita.fr>
4007
4008 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
4009 Adjust all users to use symbols[i]->prec or ->assoc.
4010
40112001-12-29 Akim Demaille <akim@epita.fr>
4012
4013 * src/reader.c, src/reader.h (tags): Remove.
4014 Adjust all users to use symbols[i]->tag.
4015
40162001-12-29 Akim Demaille <akim@epita.fr>
4017
4018 * src/gram.h, src/gram.c (symbols): New, similar to state_table
4019 and rule_table.
4020 * src/reader.c (packsymbols): Fill this table.
4021 Drop sprec.
4022 * src/conflicts.c (resolve_sr_conflict): Adjust.
4023 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
4024 single table.
4025 Use symbols[i]->tag instead of tags[i].
4026
40272001-12-29 Akim Demaille <akim@epita.fr>
4028
4029 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
4030 In addition, put a comment in there, to replace...
4031 * tests/regression.at (%union and C comments): Remove.
4032
40332001-12-29 Akim Demaille <akim@epita.fr>
4034
4035 * tests/regression.at (Web2c Actions): Blindly move the actual
4036 output as expected output. The contents *seem* right to me, but I
4037 can't pretend reading perfectly parser tables... Nonetheless, all
4038 the other tests pass correctly, the table look OK, even though the
4039 presence of `$axiom' is to be noted: AFAICS it is useless (but
4040 harmless).
4041
40422001-12-29 Akim Demaille <akim@epita.fr>
4043
4044 * src/reader.c (readgram): Don't add the rule 0 if there were no
4045 rules read. In other words, add it _after_ having performed
4046 grammar sanity checks.
4047 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
4048
40492001-12-29 Akim Demaille <akim@epita.fr>
4050
4051 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
4052 visible, and some states have now a different number.
4053
40542001-12-29 Akim Demaille <akim@epita.fr>
4055
4056 * src/reader.c (readgram): Bind the initial rule's lineno to that
4057 of the first rule.
4058 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
4059 (Solved SR Conflicts): Adjust rule 0's line number.
4060
40612001-12-29 Akim Demaille <akim@epita.fr>
4062
4063 Fix the `GAWK Grammar' failure.
4064
4065 * src/LR0.c (final_state): Initialize to -1 so that we do compute
4066 the reductions of the first state which was mistakenly confused
4067 with the final state because precisely final_state was initialized
4068 to 0.
4069 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
4070 now noticed by Bison.
4071 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
4072 have a reduction on $default.
4073
40742001-12-29 Akim Demaille <akim@epita.fr>
4075
4076 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
4077 rule line numbers.
4078 * src/closure.c (print_closure): Likewise.
4079 * src/derives.c (print_derives): Likewise.
4080 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
4081 now.
4082
40832001-12-29 Akim Demaille <akim@epita.fr>
4084
4085 * src/lalr.c (lookaheads_print): New.
4086 (lalr): Call it when --trace-flag.
4087 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
4088 are dumped.
4089
40902001-12-29 Akim Demaille <akim@epita.fr>
4091
4092 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
4093 when walking through ritem, even via rule->rhs.
4094 * src/reduce.c (dump_grammar, useful_production, reduce_output)
4095 (useful_production, useless_nonterminals): Likewise.
4096 (reduce_grammar_tables): Likewise, plus update nritems.
4097 * src/nullable.c (set_nullable): Likewise.
4098 * src/lalr.c (build_relations): Likewise.
4099 * tests/sets.at (Nullable): Adjust.
4100 Fortunately, now, the $axiom is no longer nullable.
4101
41022001-12-29 Akim Demaille <akim@epita.fr>
4103
4104 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
4105 the 0-sentinel.
4106 * src/gram.c (ritem_longest_rhs): Likewise.
4107 * src/reduce.c (nonterminals_reduce): Likewise.
4108 * src/print_graph.c (print_graph): Likewise.
4109 * src/output.c (output_rule_data): Likewise.
4110 * src/nullable.c (set_nullable): Likewise.
4111
41122001-12-29 Akim Demaille <akim@epita.fr>
4113
4114 * src/output.c: Comment changes.
4115
41162001-12-27 Paul Eggert <eggert@twinsun.com>
4117
4118 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
4119 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
4120 Sparc, as they were causing more porting problems than the
4121 (minor) performance improvement was worth.
4122
4123 Also, catch up with 1.31's YYSTD.
4124
41252001-12-27 Akim Demaille <akim@epita.fr>
4126
4127 * src/output.c (output_gram): Rely on nritems, not the
4128 0-sentinel. See below.
4129 Use -1 as separator, not 0.
4130 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
4131 Rely on -1 as separator in yyrhs, instead of 0.
4132 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
4133 twice `Now at end of input', therefore there are two lines less to
4134 expect.
4135
41362001-12-27 Akim Demaille <akim@epita.fr>
4137
4138 * tests/regression.at (Unresolved SR Conflicts):
4139 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
4140 below.
4141
41422001-12-27 Akim Demaille <akim@epita.fr>
4143
4144 * src/LR0.c (new_state): Recognize the final state by the fact it
4145 is reached by eoftoken.
4146 (insert_start_shifting_state, insert_eof_shifting_state)
4147 (insert_accepting_state, augment_automaton): Remove, since now
4148 these states are automatically computed from the initial state.
4149 (generate_states): Adjust.
4150 * src/print.c: When reporting a rule number to the user, substract
4151 1, so that the axiom rule is rule 0, and the first user rule is 1.
4152 * src/reduce.c: Likewise.
4153 * src/print_graph.c (print_core): For the time being, just as for
4154 the report, depend upon --trace-flags to dump the full set of
4155 items.
4156 * src/reader.c (readgram): Once the grammar read, insert the rule
4157 0: `$axiom: START-SYMBOL $'.
4158 * tests/set.at: Adjust: rule 0 is now displayed, and since the
4159 number of the states has changed (the final state is no longer
4160 necessarily the last), catch up.
4161
41622001-12-27 Akim Demaille <akim@epita.fr>
4163
4164 Try to make the use of the eoftoken valid. Given that its value
4165 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
4166 is used instead of > 0 where appropriate, (ii), depend upon nritems
4167 instead of the 0-sentinel.
4168
4169 * src/gram.h, src/gram.c (nritems): New.
4170 Expected to be duplication of nitems, but for the time being...
4171 * src/reader.c (packgram): Assert nritems and nitems are equal.
4172 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
4173 * src/closure.c (print_closure, print_fderives): Likewise.
4174 * src/gram.c (ritem_print): Likewise.
4175 * src/print.c (print_core, print_grammar): Likewise.
4176 * src/print_graph.c: Likewise.
4177
41782001-12-27 Akim Demaille <akim@epita.fr>
4179
4180 * src/main.c (main): If there are complains after grammar
4181 reductions, then output the report anyway if requested, then die.
4182 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
4183 * src/reader.c (eoftoken): New.
4184 (parse_token_decl): If the token being defined has value `0', it
4185 is the eoftoken.
4186 (packsymbols): No longer hack `tags' to insert `$' by hand.
4187 Be sure to preserve the value of the eoftoken.
4188 (reader): Make sure eoftoken is defined.
4189 Initialize nsyms to 0: now eoftoken is created just like the others.
4190 * src/print.c (print_grammar): Don't special case the eof token.
4191 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
4192 lie anyway, albeit pleasant.
4193 * tests/calc.at: Exercise error messages with eoftoken.
4194 Change the grammar so that empty input is invalid.
4195 Adjust expectations.
4196 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
4197
41982001-12-27 Akim Demaille <akim@epita.fr>
4199
4200 * configure.in: Check the protos of strchr ans strspn.
4201 Replace strchr if needed.
4202 * src/system.h: Provide the protos of strchr, strspn and memchr if
4203 missing.
4204 * lib/strchr.c: New.
4205 * src/reader.c (symbols_save): Use strchr.
4206
42072001-12-27 Akim Demaille <akim@epita.fr>
4208
4209 * src/print.c, src/print_graph.c (escape): New.
4210 Use it to quote the TAGS outputs.
4211 * src/print_graph.c (print_state): Now errors are in red, and
4212 reductions in green.
4213 Prefer high to wide: output the state number on a line of its own.
4214
42152001-12-27 Akim Demaille <akim@epita.fr>
4216
4217 * src/state.h, src/state.c (reductions_new): New.
4218 * src/LR0.c (set_state_table): Let all the states have a
4219 `reductions', even if reduced to 0.
4220 (save_reductions): Adjust.
4221 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
4222 * src/print.c (print_reductions, print_actions): Adjust.
4223 * src/output.c (action_row): Adjust.
4224
42252001-12-27 Akim Demaille <akim@epita.fr>
4226
4227 * src/state.h, src/state.c (errs_new, errs_dup): New.
4228 * src/LR0.c (set_state_table): Let all the states have an errs,
4229 even if reduced to 0.
4230 * src/print.c (print_errs, print_reductions): Adjust.
4231 * src/output.c (output_actions, action_row): Adjust.
4232 * src/conflicts.c (resolve_sr_conflict): Adjust.
4233
42342001-12-27 Akim Demaille <akim@epita.fr>
4235
4236 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
4237
42382001-12-27 Akim Demaille <akim@epita.fr>
4239
4240 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
4241 * src/print.c: here.
4242 (lookaheadset, shiftset): New, used as additional storage by
4243 print_reductions.
4244 (print_results): Adjust.
4245 (print_shifts, print_gotos, print_errs): New, extracted from...
4246 (print_actions): here.
4247 * src/print_graph.c (print_actions): Remove dead code.
4248
42492001-12-27 Akim Demaille <akim@epita.fr>
4250
4251 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
4252 `$n' and `@n'.
4253
42542001-12-27 Akim Demaille <akim@epita.fr>
4255
4256 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
4257 (build_relations): Adjust.
4258
42592001-12-27 Akim Demaille <akim@epita.fr>
4260
4261 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
4262 duplication.
4263
42642001-12-27 Akim Demaille <akim@epita.fr>
4265
4266 * src/reader.c (packgram): Catch nitems overflows.
4267
42682001-12-27 Akim Demaille <akim@epita.fr>
4269
4270 * src/files.c, src/files.h (guard_obstack): Remove.
4271 * src/output.c (output): Adjust.
4272 * src/reader.c (parse_braces): New, factoring...
4273 (copy_action, copy_guard): these two which are renamed as...
4274 (parse_action, parse_guard): these.
4275 As a voluntary consequence, using braces around guards is now
4276 mandatory.
4277
42782001-12-27 Akim Demaille <akim@epita.fr>
4279
4280 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
4281 * src/reader.c (symbol_list): `guard' and `guard_line' are new
4282 members.
4283 (symbol_list_new): Adjust.
4284 (copy_action): action_line is the first line, not the last.
4285 (copy_guard): Just as for actions, store the `action' only, not
4286 the switch/case/break flesh.
4287 Don't parse the user action that might follow the guard, let...
4288 (readgram): do it, i.e., now, there can be an action after a
4289 guard.
4290 In other words the guard is just explicitly optional.
4291 (packgram): Adjust.
4292 * src/output.c (guards_output): New.
4293 (output_parser): Call it when needed.
4294 (output): Also free the guard and attrs obstacks.
4295 * src/files.c, src/files.h (obstack_save): Remove.
4296 (output_files): Remove.
4297 As a result, if one needs the former `.act' file, using an
4298 appropriate skeleton which requires actions and guards is now
4299 required.
4300 * src/main.c (main): Adjust.
4301 * tests/semantic.at: New.
4302 * tests/regression.at: Use `input.y' as input file name.
4303 Avoid 8+3 problems by requiring input.c when the test needs the
4304 parser.
4305
43062001-12-27 Akim Demaille <akim@epita.fr>
4307
4308 * src/reader.c (symbol_list_new): Be sure to initialize all the
4309 fields.
4310
43112001-12-27 Akim Demaille <akim@epita.fr>
4312
4313 All the hacks using a final pseudo state are now useless.
4314
4315 * src/LR0.c (set_state_table): state_table holds exactly nstates.
4316 * src/lalr.c (nLA): New.
4317 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
4318 instead of lookaheadsp from the pseudo state (nstate + 1).
4319
43202001-12-27 Akim Demaille <akim@epita.fr>
4321
4322 * src/output.c (action_row, token_actions): Use a state_t instead
4323 of a integer, and nlookaheads instead of the following state's
4324 lookaheadsp.
4325
43262001-12-27 Akim Demaille <akim@epita.fr>
4327
4328 * src/conflicts.c (log_resolution, flush_shift)
4329 (resolve_sr_conflict, set_conflicts, solve_conflicts)
4330 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
4331 (conflicts_print, print_reductions): Use a state_t instead of an
4332 integer when referring to a state.
4333 As much as possible, depend upon nlookaheads, instead of the
4334 `lookaheadsp' member of the following state (since lookaheads of
4335 successive states are successive, the difference between state n + 1
4336 and n served as the number of lookaheads for state n).
4337 * src/lalr.c (add_lookback_edge): Likewise.
4338 * src/print.c (print_core, print_actions, print_state)
4339 (print_results): Likewise.
4340 * src/print_graph.c (print_core, print_actions, print_state)
4341 (print_graph): Likewise.
4342 * src/conflicts.h: Adjust.
4343
43442001-12-27 Akim Demaille <akim@epita.fr>
4345
4346 * src/bison.hairy: Formatting/comment changes.
4347 ANSIfy.
4348 Remove `register' indications.
4349 Add plenty of `static'.
4350
43512001-12-27 Akim Demaille <akim@epita.fr>
4352
4353 * src/output.c (prepare): Drop the muscle `ntbase' which
4354 duplicates ntokens.
4355 * src/bison.simple: Formatting/comment changes.
4356 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
4357 is an undocumented synonym.
4358
43592001-12-22 Akim Demaille <akim@epita.fr>
4360
4361 * src/output.c (output_table_data): Change the prototype to use
4362 `int' for array ranges: some invocations do pass an int, not a
4363 short.
4364 Reported by Wayne Green.
4365
43662001-12-22 Akim Demaille <akim@epita.fr>
4367
4368 Some actions of web2c.y are improperly triggered.
4369 Reported by Mike Castle.
4370
4371 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
4372 * tests/regression.at (Web2c): Rename as...
4373 (Web2c Report): this.
4374 (Web2c Actions): New.
4375
43762001-12-22 Akim Demaille <akim@epita.fr>
4377
4378 Reductions in web2c.y are improperly reported.
4379 Reported by Mike Castle.
4380
4381 * src/conflicts.c (print_reductions): Fix.
4382 * tests/regression.at (Web2c): New.
4383
43842001-12-18 Akim Demaille <akim@epita.fr>
4385
4386 Some host fail on `assert (!"foo")', which expands to
4387 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
4388 Reported by Nelson Beebee.
4389
4390 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
4391 `#define it_succeeded 0' and `assert (it_succeeded)'.
4392
43932001-12-17 Marc Autret <autret_m@epita.fr>
4394
4395 * src/bison.simple: Don't hard code the skeleton line and filename.
4396 * src/output.c (output_parser): Rename 'line' as 'output_line'.
4397 New line counter 'skeleton_line' (skeleton-line muscle).
4398
43992001-12-17 Paul Eggert <eggert@twinsun.com>
4400
4401 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
4402 YYDEBUG must be defined to a nonzero value.
4403
4404 * src/bison.simple (yytname): Do not assume that the user defines
4405 YYDEBUG to a properly parenthesized expression.
4406
44072001-12-17 Akim Demaille <akim@epita.fr>
4408
4409 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
4410 nlookaheads is a new member.
4411 Adjust all users.
4412 * src/lalr.h (nlookaheads): Remove this orphan declaration.
4413 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
4414 state.
4415
44162001-12-17 Akim Demaille <akim@epita.fr>
4417
4418 * src/files.h, src/files.c (open_files, close_files): Remove.
4419 * src/main.c (main): Don't open/close files, nor invoke lex_free,
4420 let...
4421 * src/reader.c (reader): Do it.
4422
44232001-12-17 Akim Demaille <akim@epita.fr>
4424
4425 * src/conflicts.c (print_reductions): Formatting changes.
4426
44272001-12-17 Akim Demaille <akim@epita.fr>
4428
4429 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
4430 (flush_reduce): New.
4431 (resolve_sr_conflict): Adjust.
4432
44332001-12-17 Akim Demaille <akim@epita.fr>
4434
4435 * src/output.c (output_obstack): Be static and rename as...
4436 (format_obstack): this, to avoid any confusion with files.c's
4437 output_obstack.
4438 * src/reader.h (muscle_obstack): Move to...
4439 * src/output.h: here, since it's defined in output.c.
4440
44412001-12-17 Akim Demaille <akim@epita.fr>
4442
4443 * src/output.c (action_row, save_column, default_goto)
4444 (sort_actions, matching_state, pack_vector): Better variable
4445 locality.
4446
44472001-12-17 Akim Demaille <akim@epita.fr>
4448
4449 * src/output.c: Various formatting changes.
4450
44512001-12-17 Akim Demaille <akim@epita.fr>
4452
4453 * src/files.c (output_files): Free the output_obstack.
4454 * src/main.c (main): Call print and print_graph conditionally.
4455 * src/print.c (print): Work unconditionally.
4456 * src/print_graph.c (print_graph): Work unconditionally.
4457 * src/conflicts.c (log_resolution): Output only if verbose_flag.
4458
44592001-12-16 Marc Autret <autret_m@epita.fr>
4460
4461 * src/output.c (actions_output): Fix. When we use %no-lines,
4462 there is one less line per action.
4463
44642001-12-16 Marc Autret <autret_m@epita.fr>
4465
4466 * src/bison.simple: Remove a useless #line directive.
4467 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
4468 * src/output.c (get_lines_number): New.
4469 (output_parser): Adjust, now takes care about the lines of a
4470 output muscles.
4471 Fix line numbering.
4472 (actions_output): Computes the number of lines taken by actions.
4473 (output_master_parser): Insert new skeleton which is the name of
4474 the output parser file name.
4475
44762001-12-15 Marc Autret <autret_m@epita.fr>
4477
4478 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
4479
44802001-12-15 Marc Autret <autret_m@epita.fr>
4481
4482 * src/output.c (output_gram): Keep track of the hairy one.
4483
44842001-12-15 Akim Demaille <akim@epita.fr>
4485
4486 Make `make distcheck' work.
4487
4488 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
4489 system.h which uses libgettext.h.
4490
44912001-12-15 Akim Demaille <akim@epita.fr>
4492
4493 * src/nullable.c (set_nullable): Useless rules must be skipped,
4494 otherwise, since we range over their symbols, we might look at a
4495 nonterminal which no longer ``exists'', i.e., it is not counted in
4496 `nvars', hence we overflow our arrays.
4497
44982001-12-15 Akim Demaille <akim@epita.fr>
4499
4500 The header can also be produced directly, without any obstack!
4501 Yahoo!
4502
4503 * src/files.c, src/files.h (defines_obstack): Remove.
4504 (compute_header_macro): Global.
4505 (defines_obstack_save): Remove.
4506 * src/reader.c (parse_union_decl): No longer output to
4507 defines_obstack: its content can be found in the `stype' muscle
4508 anyway.
4509 (output_token_translations): Merge into...
4510 (symbols_output): this.
4511 Rename as...
4512 (symbols_save): this.
4513 (reader): Adjust.
4514 * src/output.c (header_output): New.
4515 (output): Call it.
4516
45172001-12-15 Akim Demaille <akim@epita.fr>
4518
4519 * src/reader.c (parse_union_decl): Instead of handling two obstack
4520 simultaneously, use one to define the `stype' muscle, and use the
4521 value of the latter to fill defines_obstack.
4522 (copy_comment): Remove.
4523 (copy_comment2): Work for a single obstack.
4524 Rename as...
4525 (copy_comment): this.
4526
45272001-12-15 Akim Demaille <akim@epita.fr>
4528
4529 * src/lex.c, src/lex.h (xgetc): No longer static.
4530 * src/reader.c (parse_union_decl): Revamp.
4531
45322001-12-15 Akim Demaille <akim@epita.fr>
4533
4534 Still making progress in separating Bison into (i) input, (ii)
4535 process, (iii) output: now we can directly output the parser file
4536 without using table_obstack at all.
4537
4538 * src/files.c, src/files.h (table_obstack): Bye bye.
4539 (parser_file_name): New.
4540 * src/files.c (compute_output_file_names): Compute it.
4541 * src/output.c (actions_output, output_parser)
4542 (output_master_parser): To a file instead of an obstack.
4543
45442001-12-15 Akim Demaille <akim@epita.fr>
4545
4546 Attach actions to rules, instead of pre-outputting them to
4547 actions_obstack.
4548
4549 * src/gram.h (rule_t): action and action_line are new members.
4550 * src/reader.c (symbol_list): Likewise.
4551 (copy_action): Save the actions within the rule.
4552 (packgram): Save them in rule_table.
4553 * src/output.c (actions_output): New.
4554 (output_parser): Use it on `%%actions'.
4555 (output_rule_data): Don't free rule_table.
4556 (output): Do it.
4557 (prepare): Don't save the `action' muscle.
4558 * src/bison.simple: s/%%action/%%actions/.
4559
45602001-12-15 Akim Demaille <akim@epita.fr>
4561
4562 * src/reader.c (copy_action): When --yacc, don't append a `;'
4563 to the user action: let it fail if lacking.
4564 Suggested by Arnold Robbins and Tom Tromey.
4565
45662001-12-14 Akim Demaille <akim@epita.fr>
4567
4568 * src/lex.c (literalchar): Simply return the char you decoded, non
4569 longer mess around with obstacks and int pointers.
4570 Adjust all callers.
4571
45722001-12-14 Akim Demaille <akim@epita.fr>
4573
4574 * src/lex.c (literalchar): Don't escape the special characters,
4575 just decode them, and keep them as char (before, eol was output as
4576 the 2 char string `\n' etc.).
4577 * src/output.c (output_rule_data): Use quotearg to output the
4578 token strings.
4579
45802001-12-13 Paul Eggert <eggert@twinsun.com>
4581
4582 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
4583 Do not infringe on the global user namespace when using C++.
4584 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
4585 All uses of `fprintf' and `stderr' changed.
4586
4587 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
4588
45892001-12-13 Akim Demaille <akim@epita.fr>
4590
4591 The computation of nullable is broken: it doesn't handle empty
4592 RHS's properly.
4593
4594 * tests/torture.at (GNU AWK Grammar): New.
4595 * tests/sets.at (Nullable): New.
4596 * src/nullable.c (set_nullable): Instead of blindly looping over
4597 `ritems', loop over the rules, and then over their rhs's.
4598
4599 Work around Autotest bugs.
4600
4601 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
4602 frame, because Autotest understand lines starting with a `+' as
4603 traces from the shell. Then, they are not processed properly.
4604 Admittedly an Autotest bug, but we don't have time to wait for
4605 Autotest to catch up.
4606 * tests/regression.at (Broken Closure): Adjust to the new table
4607 frames.
4608 Move to...
4609 * tests/sets.at: here.
4610
46112001-12-13 Akim Demaille <akim@epita.fr>
4612
4613 * src/closure.c (closure): Use nrules instead of playing tricks
4614 with BITS_PER_WORD.
4615
46162001-12-13 Akim Demaille <akim@epita.fr>
4617
4618 * src/print.c (print_actions): Output the handling of `$' as the
4619 traces do: shifting the token EOF. Before EOF was treated as a
4620 nonterminal.
4621 * tests/regression.at: Adjust some tests.
4622 * src/print_graph.c (print_core): Complete the set of items via
4623 closure. The next-to-final and final states are still unsatisfying,
4624 but that's to be addressed elsewhere.
4625 No longer output the rule numbers, but do output the state number.
4626 A single loop for the shifts + gotos is enough, but picked a
4627 distinct color for each.
4628 (print_graph): Initialize and finalize closure.
4629
46302001-12-13 Akim Demaille <akim@epita.fr>
4631
4632 * src/reader.c (readgram): Remove dead code, an strip useless
4633 braces.
4634 (get_type): Remove, unused.
4635
46362001-12-12 Akim Demaille <akim@epita.fr>
4637
4638 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
4639 on that of lib/error.c.
4640
46412001-12-12 Akim Demaille <akim@epita.fr>
4642
4643 Some hosts don't like `/' in includes.
4644
4645 * src/system.h: Include libgettext.h without qualifying the path.
4646 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
4647 $(top_srcdir).
4648
46492001-12-11 Marc Autret <autret_m@epita.fr>
4650
4651 * src/output.c (output_parser): Remove useless muscle.
4652
46532001-12-11 Marc Autret <autret_m@epita.fr>
4654
4655 * src/bison.simple: Remove #line just before %%epilogue. It
4656 is now handled in ...
4657 * src/reader.c (read_additionnal_code): Add the output of a
4658 #line for the epilogue.
4659
46602001-12-10 Marc Autret <autret_m@epita.fr>
4661
4662 * src/reader.c (copy_definition): Re-use CPP-outed code which
4663 replace precedent remove.
4664 * src/bison.simple: Remove #line before %%prologue because
4665 %%input-line is wrong at this time.
4666
46672001-12-10 Marc Autret <autret_m@epita.fr>
4668
4669 * src/reader.c (symbols_output): Clean up.
4670 * src/output.c (output_gram, output): Clean up.
4671
46722001-12-10 Akim Demaille <akim@epita.fr>
4673
4674 * src/lalr.c (initialize_lookaheads): New. Extracted from...
4675 * src/LR0.c (set_state_table): here.
4676 * src/lalr.c (lalr): Call it.
4677
46782001-12-10 Akim Demaille <akim@epita.fr>
4679
4680 * src/state.h (shifts): Remove the `number' member: shifts are
4681 attached to state, hence no longer need to be labelled with a
4682 state number.
4683
46842001-12-10 Akim Demaille <akim@epita.fr>
4685
4686 Now that states have a complete set of members, the linked list of
4687 shifts is useless: just fill directly the state's shifts member.
4688
4689 * src/state.h (shifts): Remove the `next' member.
4690 * src/LR0.c (first_state, last_state): Remove.
4691 Adjust the callers.
4692 (augment_automaton): Don't look for the shifts that must be added
4693 a shift on EOF: it is those of the state we looked for! But now,
4694 since shifts are attached, it is no longer needed to looking
4695 merely by its id: its number.
4696
46972001-12-10 Akim Demaille <akim@epita.fr>
4698
4699 * src/LR0.c (augment_automaton): Better variable locality.
4700 Remove an impossible branch: if there is a state corresponding to
4701 the start symbol being shifted, then there is shift for the start
4702 symbol from the initial state.
4703
47042001-12-10 Akim Demaille <akim@epita.fr>
4705
4706 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
4707 only when appropriate: when insert_start_shifting_state' is not
4708 invoked.
4709 * tests/regression.at (Rule Line Numbers): Adjust.
4710
47112001-12-10 Akim Demaille <akim@epita.fr>
4712
4713 * src/LR0.c (augment_automaton): Now that all states have shifts,
4714 merge the two cases addition shifts to the initial state.
4715
47162001-12-10 Akim Demaille <akim@epita.fr>
4717
4718 * src/lalr.c (set_state_table): Move to...
4719 * src/LR0.c: here.
4720 * src/lalr.c (lalr): Don't call it...
4721 * src/LR0.c (generate_states): do it.
4722 * src/LR0.h (first_state): Remove, only the table is used.
4723
47242001-12-10 Akim Demaille <akim@epita.fr>
4725
4726 * src/LR0.h (first_shift, first_reduction): Remove.
4727 * src/lalr.c: Don't use first_shift: find shifts through the
4728 states.
4729
47302001-12-10 Akim Demaille <akim@epita.fr>
4731
4732 * src/LR0.c: Attach shifts to states as soon as they are
4733 computed.
4734 * src/lalr.c (set_state_table): Instead of assigning shifts to
4735 state, just assert that the mapping was properly done.
4736
47372001-12-10 Akim Demaille <akim@epita.fr>
4738
4739 * src/LR0.c (insert_start_shift): Rename as...
4740 (insert_start_shifting_state): this.
4741 (insert_eof_shifting_state, insert_accepting_state): New.
4742 (augment_automaton): Adjust.
4743 Better locality of the variables.
4744 When looking if the start_symbol is shifted from the initial
4745 state, using `while (... symbol != start_symbol ...)' sounds
4746 better than `while (... symbol < start_symbol ...)': If fail
4747 to see how the order between symbols could be relevant!
4748
47492001-12-10 Akim Demaille <akim@epita.fr>
4750
4751 * src/getargs.h: Don't declare `spec_name_prefix' and
4752 `spec_file_prefix', declared by src/files.h.
4753 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
4754 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
4755 * src/output.c (prepare): Adjust.
4756 * src/reader.c (symbols_output): Likewise.
4757 * src/vmsgetargs.c: Vaguely adjust, but who cares?
4758
47592001-12-10 Akim Demaille <akim@epita.fr>
4760
4761 * src/muscle_tab.c (muscle_init): NULL is a better default than
4762 `"0"'.
4763
47642001-12-10 Akim Demaille <akim@epita.fr>
4765
4766 * src/reader.c (reader): Calling symbols_output once is enough.
4767
47682001-12-10 Akim Demaille <akim@epita.fr>
4769
4770 Now that states have a complete set of members, the linked list of
4771 reductions is useless: just fill directly the state's reductions
4772 member.
4773
4774 * src/state.h (struct reductions): Remove member `number' and
4775 `next'.
4776 * src/LR0.c (first_reduction, last_reduction): Remove.
4777 (save_reductions): Don't link the new reductions, store them in
4778 this_state.
4779 * src/lalr.c (set_state_table): No need to attach reductions to
4780 states, it's already done.
4781 * src/output.c (output_actions): No longer free the shifts, then
4782 the reductions, then the states: free all the states and their
4783 members.
4784
47852001-12-10 Akim Demaille <akim@epita.fr>
4786
4787 * src/options.c (OPTN, DRTV, BOTH): New.
4788 (option_table): Use them.
4789
4790 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
4791 the job of system.h.
4792 * src/options.c: Don't include stdio.h and xalloc.h for the same
4793 reasons.
4794
47952001-12-10 Akim Demaille <akim@epita.fr>
4796
4797 * src/output.c (output, prepare): Make sure the values of the
4798 muscles `action' and `prologue' are 0-terminated.
4799
48002001-12-10 Akim Demaille <akim@epita.fr>
4801
4802 Clean up GCC warnings.
4803
4804 * src/reader.c (copy_action): `buf' is not used.
4805 (parse_skel_decl): Be static.
4806 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
4807 * src/options.h (create_long_option_table): Have a real prototype.
4808 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
4809 (hash_delete_at): Return const void *.
4810 Adjust casts to preserve the const.
4811
48122001-12-10 Akim Demaille <akim@epita.fr>
4813
4814 * configure.in: Require 2.52g.
4815 M4 is not needed, but AUTOM4TE is.
4816 * m4/m4.m4: Remove.
4817 * tests/Makefile.am: Adjust.
4818
48192001-12-10 Akim Demaille <akim@epita.fr>
4820
4821 One structure for states is enough, even though theoretically
4822 there are LR(0) states and LALR(1) states.
4823
4824 * src/lalr.h (state_t): Remove.
4825 (state_table): Be state_t **, not state_t *.
4826 * src/state.h (core, CORE_ALLOC): Rename as...
4827 (state_t, STATE_ALLOC): this.
4828 Add the LALR(1) members: shifts, reductions, errs.
4829 * src/LR0.c (state_table): Rename as...
4830 (state_hash): this, to avoid name clashes with the global
4831 `state_table'.
4832 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
4833 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
4834
48352001-12-10 Akim Demaille <akim@epita.fr>
4836
4837 Bison dumps core on bash.y.
4838 Reported by Pascal Bart.
4839
4840 * src/warshall.c (bitmatrix_print): New.
4841 (TC): Use it.
4842 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
4843 j must be the outer loop.
4844 * tests/regression.at (Broken Closure): New.
4845
48462001-12-05 Akim Demaille <akim@epita.fr>
4847
4848 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
4849 its argument.
4850