]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
[bison.git] / ChangeLog
CommitLineData
bba97eb2
AD
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4 bucket.
5 Adjust all dependencies.
6 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
7 `number' of the buckets too.
8 * src/gram.h: Include `symtab.h'.
9 (associativity): Move to...
10 * src/symtab.h: here.
11 No longer include `gram.h'.
12
13
c3b407f4
AD
142002-04-07 Akim Demaille <akim@epita.fr>
15
16 * src/gram.h, src/gram.c (rules_rhs_length): New.
17 (ritem_longest_rhs): Use it.
18 * src/gram.h (rule_t): `number' is a new member.
19 * src/reader.c (packgram): Set it.
20 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
21 the end of `rules', and count them out of `nrules'.
22 (reduce_output, dump_grammar): Adjust.
23 * src/print.c (print_grammar): It is no longer needed to check for
24 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
25 * tests/reduce.at (Reduced Automaton): New test.
26
11652ab3
AD
272002-04-07 Akim Demaille <akim@epita.fr>
28
29 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
30 lacking `+ 1' to nrules, Bison reported as useless a token if it
31 was used solely to set the precedence of the last rule...
32
26b23c1a
AD
332002-04-07 Akim Demaille <akim@epita.fr>
34
35 * data/bison.c++, data/bison.simple: Don't output the current file
36 name in #line, to avoid useless diffs between two identical
37 outputs under different names.
38
18bcecb0
AD
392002-04-07 Akim Demaille <akim@epita.fr>
40
41 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
42 Normalize loops to using `< nrules + 1', not `<= nrules'.
43
fa770c86
AD
442002-04-07 Akim Demaille <akim@epita.fr>
45
46 * TODO: Update.
47
d9b739c3
AD
482002-04-07 Akim Demaille <akim@epita.fr>
49
50 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
51 bucket.value as bucket.number.
52
99013900
AD
532002-04-07 Akim Demaille <akim@epita.fr>
54
55 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
56 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
57 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
58 RHS, instead of being an index in RITEMS.
59
e966383b
PE
602002-04-04 Paul Eggert <eggert@twinsun.com>
61
62 * doc/bison.texinfo: Update copyright date.
63 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
64 (Symbols): Warn about running Bison in one character set,
65 but compiling and/or running in an incompatible one.
66 Warn about character code 256, too.
67
682002-04-03 Paul Eggert <eggert@twinsun.com>
69
70 * src/bison.data (YYSTACK_ALLOC): Depend on whether
71 YYERROR_VERBOSE is nonzero, not whether it is defined.
72
73 Merge changes from bison-1_29-branch.
c307773e 74
8d6c48b9
PE
752002-03-20 Paul Eggert <eggert@twinsun.com>
76
77 Merge fixes from Debian bison_1.34-1.diff.
78
79 * configure.in (AC_PREREQ): 2.53.
80
e53c6322
AD
812002-03-20 Akim Demaille <akim@epita.fr>
82
83 * src/conflicts.c (log_resolution): Argument `resolution' is const.
84
9ffbeca7
PE
852002-03-19 Paul Eggert <eggert@twinsun.com>
86
21db0b2a
PE
87 * src/bison.simple (YYCOPY): New macro.
88 (YYSTACK_RELOCATE): Use it.
89 Remove Type arg; no longer needed. All callers changed.
90 (yymemcpy): Remove; no longer needed.
91
9ffbeca7
PE
92 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
93 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
94
642cb8f8
AD
952002-03-19 Akim Demaille <akim@epita.fr>
96
97 Test and fix the #line outputs.
98
99 * tests/atlocal.at (GCC): New.
100 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
101 (Prologue synch line, ,%union synch line, Postprologue synch line)
102 (Action synch line, Epilogue synch line): New tests.
103 * src/reader.c (parse_union_decl): Define the muscle stype_line.
104 * data/bison.simple, data/bison.c++: Use it.
105
3c31a486
AD
1062002-03-19 Akim Demaille <akim@epita.fr>
107
108 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
109 (Solved SR Conflicts, %expect not enough, %expect right)
110 (%expect too much): Move to...
111 * tests/conflicts.at: this new file.
112
0d8bed56
AD
1132002-03-19 Akim Demaille <akim@epita.fr>
114
115 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
116 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
117 that we can move to enums for instance.
118 * src/output.c (token_definitions_output): Output a list of
119 `token-name, token-number' instead of the #define.
120 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
121
9208d17f
AD
1222002-03-14 Akim Demaille <akim@epita.fr>
123
124 Use Gettext 0.11.1.
125
af27eacb
RA
1262002-03-09 Robert Anisko <robert@lrde.epita.fr>
127
128 * data/bison.c++: Make the user able to add members to the generated
129 parser by subclassing.
130
9101a310
RA
1312002-03-05 Robert Anisko <robert@lrde.epita.fr>
132
133 * src/reader.c (read_additionnal_code): `c' should be an integer, not
134 a character.
135 Reported by Nicolas Tisserand and Nicolas Burrus.
136
fff9bf0b
RA
1372002-03-04 Robert Anisko <robert@lrde.epita.fr>
138
139 * src/reader.c: Warn about lacking semi-colons, do not complain.
140
64dba31e
RA
1412002-03-04 Robert Anisko <robert@lrde.epita.fr>
142
143 * data/bison.c++: Remove a debug line.
144
374f5a14
RA
1452002-03-04 Robert Anisko <robert@lrde.epita.fr>
146
147 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
148 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
149 provide a default implementation.
150
bfcf1f3a
AD
1512002-03-04 Akim Demaille <akim@epita.fr>
152
153 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
154 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
155 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
156 * tests/semantic.at (Parsing Guards): Similarly.
157 * src/reader.at (readgram): Complain if the last rule is not ended
158 with a semi-colon.
159
65ccf9fc
AD
1602002-03-04 Akim Demaille <akim@epita.fr>
161
162 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
163 * src/closure.c: here.
164 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
165 RTC.
166 * src/warshall.h, src/warshall.c: Remove.
167 * tests/sets.at (Broken Closure): Adjust.
168
d0039cbc
AD
1692002-03-04 Akim Demaille <akim@epita.fr>
170
171 * src/output.c (output_skeleton): tempdir is const.
172 bytes_read is unused.
173
345cea78
AD
1742002-03-04 Akim Demaille <akim@epita.fr>
175
176 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
177 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
178 Update.
179 From Michael Hayes.
180
564801f7
AD
1812002-03-04 Akim Demaille <akim@epita.fr>
182
183 * src/closure.c (closure): `r' is unused.
184
e5352bc7
AD
1852002-03-04 Akim Demaille <akim@epita.fr>
186
187 * tests/sets.at (Broken Closure): Add the ending `;'.
188 * src/reader.at (readgram): Complain if a rule is not ended with a
189 semi-colon.
190
914feea9
AD
1912002-03-04 Akim Demaille <akim@epita.fr>
192
193 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
194 (count_sr_conflicts): Use bitset_count.
195 * src/reduce.c (inaccessable_symbols): Ditto.
196 (bits_size): Remove.
197 * src/warshall.h, src/warshall.c: Convert to bitsetv.
198
f0250de6
AD
1992002-03-04 Akim Demaille <akim@epita.fr>
200
201 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
202 * src/reduce.c: Remove the `bitset_zero's following the
203 `bitset_create's, as now it is performed by the latter.
204
ef017502
AD
2052002-03-04 Akim Demaille <akim@epita.fr>
206
207 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
208 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
209 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
210 latest sources from Michael.
211
76514394
AD
2122002-03-04 Akim Demaille <akim@epita.fr>
213
214 * src/output.c (output): Don't free the grammar.
215 * src/reader.c (grammar_free): New.
216 * src/main.c (main): Call it and don't free symtab here.
217
55024580
AD
2182002-03-04 Akim Demaille <akim@epita.fr>
219
220 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
221 before returning.
222 Reported by Benoit Perrot.
223
f9abaa2c
AD
2242002-03-04 Akim Demaille <akim@epita.fr>
225
226 Use bitset operations when possible, not loops over bits.
227
228 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
229 bitset_or.
230 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
231 * src/reduce.c (useless_nonterminals): Formatting changes.
232 * src/warshall.c (TC): Use bitset_or.
233
0e721e75
AD
2342002-03-04 Akim Demaille <akim@epita.fr>
235
236 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
237 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
238 Ditto.
239
0fb1ffb1
AD
2402002-03-04 Akim Demaille <akim@epita.fr>
241
242 * src/lalr.c (F): Now a bitset*.
243 Adjust all dependencies.
244
b86796bf
AD
2452002-03-04 Akim Demaille <akim@epita.fr>
246
247 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
248 Adjust all dependencies.
249
602bbf31
AD
2502002-03-04 Akim Demaille <akim@epita.fr>
251
252 * src/L0.c, src/LR0.h (nstates): Be size_t.
253 Adjust comparisons (signed vs unsigned).
254 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
255 bitset*.
256 Adjust all dependencies.
257
d8a0245c
AD
2582002-03-04 Akim Demaille <akim@epita.fr>
259
260 * src/closure.c (firsts): Now, also a bitset.
261 Adjust all dependencies.
262 (varsetsize): Remove, now unused.
263 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
264
34ba9743
AD
2652002-03-04 Akim Demaille <akim@epita.fr>
266
267 * src/print.c: Convert to use bitset.h, not hand coded iterations
268 over ints.
269
ed86e78c
AD
2702002-03-04 Akim Demaille <akim@epita.fr>
271
272 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
273
dfdb1797
AD
2742002-03-04 Akim Demaille <akim@epita.fr>
275
276 * src/closure.c (ruleset): Be a bitset.
277 (rulesetsize): Remove.
278
7086e707
AD
2792002-03-04 Akim Demaille <akim@epita.fr>
280
281 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
282 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
283 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
284 * src/closure.c (fderives): Be an array of bitsets.
285
98254360
RA
2862002-02-28 Robert Anisko <robert@lrde.epita.fr>
287
288 * data/bison.c++: Merge the two generated headers. Insert a copyright
289 notice in each output file.
290
a75c057f
AD
2912002-02-28 Akim Demaille <akim@epita.fr>
292
293 * data/bison.c++: Copy the prologue of bison.simple to fetch
294 useful M4 definitions, such as b4_header_guard.
295
06b00abc
AD
2962002-02-25 Akim Demaille <akim@epita.fr>
297
298 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
299 translator friendly scheme for the bgr
300 copyright notice.
06b00abc 301
70e7d534
AD
3022002-02-25 Akim Demaille <akim@epita.fr>
303
304 * src/output.c (header_output): Remove, now handled completely via
305 M4.
306
abe017f6
AD
3072002-02-25 Akim Demaille <akim@epita.fr>
308
309 * m4/m4.m4: New, from CVS Autoconf.
310 * configure.in: Invoke it.
311 * src/output.c (output_skeleton): Use its result instead of the
312 hard coded name.
313
381fb12e
AD
3142002-02-25 Akim Demaille <akim@epita.fr>
315
316 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
317 Fileutils 4.1.5.
318 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
319 * src/output.c (output_skeleton): Use mkstemp to create a real
320 temporary file.
321 Move the filling of `skeleton' and its muscle to...
322 (prepare): here.
323 (output): Move the definition of the prologue muscle to...
324 (prepare): here.
325 * src/system.h (DEFAULT_TMPDIR): New.
326
6f38107f
PE
3272002-02-14 Paul Eggert <eggert@twinsun.com>
328
329 Remove the support for C++ namespace cleanliness; it was
330 causing more problems than it was curing, since it didn't work
331 properly on some nonstandard C++ compilers. This can wait
332 for a proper C++ parser.
333
334 * NEWS: Document this.
335 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
336 of C++, as it's treated like C now.
337 * src/bison.simple (YYSTD): Remove.
338 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
339 Treat C++ just like Standard C instead of trying to support
340 namespace cleanliness.
341
80cce3da
AD
3422002-02-14 Akim Demaille <akim@epita.fr>
343
344 * tests/regression.at (else): Adjust to Andreas' change.
345
842e8679
AD
3462002-02-14 Akim Demaille <akim@epita.fr>
347
348 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
349
4bda3f10
AD
3502002-02-13 Andreas Schwab <schwab@suse.de>
351
352 * src/output.c (output_rule_data): Don't output NULL, it might
353 not be defined yet.
354
4162fa07 3552002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 356
4162fa07
RA
357 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
358 (Copyright notice): Update.
b418ecd8 359
bd16a5dc
AD
3602002-02-11 Akim Demaille <akim@epita.fr>
361
362 * tests/regression.at (%nonassoc and eof): Don't include
363 nonportable headers.
364
8d69a1a3
RA
3652002-02-08 Robert Anisko <robert@lrde.epita.fr>
366
367 * data/bison.c++: Correct error recovery. Make the user able to
368 initialize the starting location.
369
9b2d0677
AD
3702002-02-07 Akim Demaille <akim@epita.fr>
371
372 * tests/input.at: New.
373
69e2658b
RA
3742002-02-07 Robert Anisko <robert@lrde.epita.fr>
375
376 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 377 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
378 directives around tables only needed for debugging.
379
4aacc3a7
RA
3802002-02-07 Robert Anisko <robert@lrde.epita.fr>
381
382 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
383 C++ parsers.
384 (yy::b4_name::parse): Use print_.
385
762a801e
RA
3862002-02-07 Robert Anisko <robert@lrde.epita.fr>
387
388 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
389
4bb2bc3f
RA
3902002-02-07 Robert Anisko <robert@lrde.epita.fr>
391
392 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
393 C++ parsers.
394 (yy::b4_name::parse): Build verbose error messages, and use error_.
395
6b45a3ca
RA
3962002-02-06 Robert Anisko <robert@lrde.epita.fr>
397
398 * data/bison.c++: Fix m4 quoting in comments.
399
50997c6e
RA
4002002-02-06 Robert Anisko <robert@lrde.epita.fr>
401
402 * data/bison.c++: Adjust the parser code. Fix some muscles that were
403 not expanded by m4.
404
3f3eed27
AD
4052002-02-05 Akim Demaille <akim@epita.fr>
406
407 * data/bison.c++: Adjust to the M4 back end.
408 More is certainly needed.
409
be2a1a68
AD
4102002-02-05 Akim Demaille <akim@epita.fr>
411
412 Give a try to M4 as a back end.
413
414 * lib/readpipe.c: New, from wdiff.
415 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
416 BISON_HAIRY.
417 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
418 specific values. Now it is m4 that performs the lookup.
419 * src/parse-skel.y: Remove.
420 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
421 * src/output.c (actions_output, guards_output)
422 (token_definitions_output): No longer keeps track of the output
423 line number, hence remove the second argument.
424 (guards_output): Check against the guard member of a rule, not the
425 action member.
426 Adjust callers.
427 (output_skeleton): Don't look for the skeleton location, let m4 do
428 that.
429 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
430 file will be used.
431 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
432 (prepare): Given that for the time being changesyntax is not
433 usable in M4, rename the muscles using `-' to `_'.
434 Define `defines_flag', `output_parser_name' and `output_header_name'.
435 * src/output.h (actions_output, guards_output)
436 (token_definitions_output): Adjust prototypes.
437 * src/scan-skel.l: Instead of scanning the skeletons, it now
438 processes the output of m4: `__oline__' and `#output'.
439 * data/bison.simple: Adjust to be used by M4(sugar).
440 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
441 to date.
442 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
443 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
444 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
445 shamelessly stolen from CVS Autoconf.
446
beda758b
AD
4472002-02-05 Akim Demaille <akim@epita.fr>
448
449 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
450 * configure.in: Check for the declarations of free and malloc.
451 * src/muscle_tab.c: Adjust.
452
5ece6d43
AD
4532002-02-05 Akim Demaille <akim@epita.fr>
454
455 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
456 which have no values.
457
5bb18f9a
AD
4582002-02-05 Akim Demaille <akim@epita.fr>
459
460 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
461 * data/: here.
462
894dd62e
PE
4632002-01-29 Paul Eggert <eggert@twinsun.com>
464
465 * src/bison.simple (YYSIZE_T): Do not define merely because
466 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
467 On some platforms, <alloca.h> does not declare YYSTD (size_t).
468
82841af7
AD
4692002-01-27 Akim Demaille <akim@epita.fr>
470
471 Fix `%nonassoc and eof'.
472
473 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
474 which were not properly copied! Replace
475 memcpy (res->errs, src->errs, src->nerrs);
476 with
477 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
478 !!!
479 * tests/regression.at (%nonassoc and eof): Adjust to newest
480 Autotest: `.' is not in the PATH.
481
318b76e9
AD
4822002-01-27 Akim Demaille <akim@epita.fr>
483
484 * tests/sets.at (AT_EXTRACT_SETS): New.
485 (Nullable): Use it.
486 (Firsts): New.
487
30d2f3d5
AD
4882002-01-26 Akim Demaille <akim@epita.fr>
489
490 * tests/actions.at, tests/calc.at, tests/headers.at,
491 * tests/torture.at: Adjust to the newest Autotest which no longer
492 forces `.' in the PATH.
493
30f8c395
AD
4942002-01-25 Akim Demaille <akim@epita.fr>
495
496 * tests/regression.at (%nonassoc and eof): New.
497 Suggested by Robert Anisko.
498
29ae55f1
AD
4992002-01-24 Akim Demaille <akim@epita.fr>
500
501 Bison dumps core when trying to complain about broken input files.
502 Reported by Cris van Pelt.
503
504 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
505 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
506 into...
507 (Invalid inputs): Strengthen: exercise parse_percent_token.
508
2b548aa6
RA
5092002-01-24 Robert Anisko <robert.anisko@epita.fr>
510
511 * src/Makefile.am: Add bison.c++.
512 * src/bison.c++: New skeleton.
513
bb0146c2
AD
5142002-01-21 Paolo Bonzini <bonzini@gnu.org>
515
516 * po/it.po: New.
517
bec30531
AD
5182002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
519
520 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
521
fc6edc45
MA
5222002-01-20 Marc Autret <marc@gnu.org>
523
524 * src/files.c (compute_output_file_names): Fix
525
5e5d5415
MA
5262002-01-20 Marc Autret <marc@gnu.org>
527
528 * tests/output.at: New test.
529 * src/files.c (compute_base_names): Don't map extensions when
530 the YACC flag is set, use defaults.
531 Reported by Evgeny Stambulchik.
532
44ea3fbd
MA
5332002-01-20 Marc Autret <marc@gnu.org>
534
bb0146c2 535 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
536 compilers as well (i.e. the vendor C compiler).
537 Suggested by Albert Chin-A-Young.
538
338963d1
TVH
5392002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
540
541 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
542 canonical definition.
543 * src/system.h: Use the canonical definition for PARAMS (avoids
544 a conflict with the macro from lib/hash.h).
545
c57b2479
AD
5462002-01-11 Akim Demaille <akim@epita.fr>
547
548 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 549 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 550
b85810ae
AD
5512002-01-09 Akim Demaille <akim@epita.fr>
552
553 * src/files.c, src/files.h (output_infix): New.
554 (tab_extension): Remove.
555 (compute_base_names): Compute the former, drop the latter.
556 * src/output.c (prepare): Insert the muscles `output-infix', and
557 `output-suffix'.
558 * src/parse-skel.y (string, string.1): New.
559 (section.header): Use it.
560 (section.yacc): Remove.
561 (prefix): Remove too.
562 * src/scan-skel.l: Adjust.
563 * src/bison.simple, src/bison.hairy: Adjust.
564
cae60122
AD
5652002-01-09 Akim Demaille <akim@epita.fr>
566
567 * configure.in (WERROR_CFLAGS): Compute it.
568 * src/Makefile.am (CFLAGS): Pass it.
569 * tests/atlocal.in (CFLAGS): Idem.
570 * src/files.c: Fix a few warnings.
571 (get_extension_index): Remove, unused.
572
ae404801
AD
5732002-01-08 Akim Demaille <akim@epita.fr>
574
575 * src/getargs.c (AS_FILE_NAME): New.
576 (getargs): Use it to convert DOSish file names.
577 * src/files.c (base_name): Rename as full_base_name to avoid
578 clashes with `base_name ()'.
579 (filename_split): New.
580 (compute_base_names): N-th rewrite, using filename_split.
581
22312b71
AD
5822002-01-08 Akim Demaille <akim@epita.fr>
583
584 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
585 New, stolen from the Fileutils 4.1.
586 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
587 * configure.in: Check for the presence of memrchr, and of its
588 prototype.
589
a67cef01
TVH
5902002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
591
592 * lib/hash.h (__P): Added definition for this macro.
593 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
594 BUILT_SOURCES, to ensure they are generated first.
595 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
596 %error-verbose to allow bootstrapping with bison 1.30x.
597
2b25d624
AD
5982002-01-06 Akim Demaille <akim@epita.fr>
599
600 * src/reader.c (parse_braces): Don't fetch the next char, the
601 convention is to fetch on entry.
602 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
603 'switch' without a following semicolon.
604 * tests/regression.at (braces parsing): New.
605
3460813b
AD
6062002-01-06 Akim Demaille <akim@epita.fr>
607
608 Bison is dead wrong in its RR conflict reports.
609
610 * tests/torture.at (GNU Cim Grammar): New.
611 * src/conflicts.c (count_rr_conflicts): Fix.
612
73784c64
AD
6132002-01-06 Akim Demaille <akim@epita.fr>
614
615 Creating package.m4 from configure.ac causes too many problems.
616
617 * tests/Makefile.am (package.m4): Create it by hand,
618 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
619
25d81090
AD
6202002-01-06 Akim Demaille <akim@epita.fr>
621
622 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
623 skeleton.h.
624
a9b8959e
PE
6252002-01-04 Paul Eggert <eggert@twinsun.com>
626
627 * doc/bison.texinfo (Debugging):
628 Remove YYSTDERR; it's no longer defined or used.
629 Also, s/cstdio.h/cstdio/.
630
25d81090
AD
6312002-01-03 Akim Demaille <akim@epita.fr>
632
633 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
634
1109455c
AD
6352002-01-03 Akim Demaille <akim@epita.fr>
636
637 * src/parse-skel.y (process_skeleton): Don't bind the parser's
638 tracing code to --trace, wait for a better --trace option, with
639 args.
640
7ea5e977
AD
6412002-01-03 Akim Demaille <akim@epita.fr>
642
643 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
644 The ISO C++ standard is extremely clear about it: stderr is
645 considered a macro, not a regular symbol (see table 94 `Header
646 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
647 Therefore std:: does not apply to it. It still does with fprintf.
648 Also, s/cstdio.h/cstdio/.
649
fab5b110
AD
6502002-01-03 Akim Demaille <akim@epita.fr>
651
652 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
653 for non system headers.
654
aed7fd9b
AD
6552002-01-02 Akim Demaille <akim@epita.fr>
656
657 Equip the skeleton chain with location tracking, runtime trace,
658 pure parser and scanner.
659
660 * src/parse-skel.y: Request a pure parser, locations, and prefix
661 renaming.
662 (%union): Having several members with the same type does not help
663 type mismatches, simplify.
664 (YYPRINT, yyprint): New.
665 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
666 (skel_error): this.
667 Handle locations.
668 * src/scan-skel.l: Adjust to these changes.
669 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
670 (LOCATION_PRINT, skel_control_t): New.
671
24fad99e
AD
6722001-12-30 Akim Demaille <akim@epita.fr>
673
674 * src/parse-skel.y: Get rid of the shift/reduce conflict:
675 replace `gb' with BLANKS.
676 * src/scan-skel.l: Adjust.
677
a4b36db4
AD
6782001-12-30 Akim Demaille <akim@epita.fr>
679
680 * src/system.h: We don't need nor want bcopy.
681 Throw away MS-DOS crap: we don't need getpid.
682 * configure.in: We don't need strndup. It was even causing
683 problems: because Flex includes the headers *before* us,
684 _GNU_SOURCE is not defined by config.h, and therefore strndup was
685 not visible.
686 * lib/xstrndup.c: New.
687 * src/scan-skel.l: Use it.
688 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
689 * src/parse-skel.y: Use %directives instead of #defines.
690
1239777d
AD
6912001-12-30 Akim Demaille <akim@epita.fr>
692
693 * src/skeleton.h: New.
694 * src/output.c (output_parser, output_master_parser): Remove, dead
695 code.
696 * src/output.h (get_lines_number, actions_output, guards_output)
697 (token_definitions_output): Prototype them.
698 * src/parse-skel.y: Add the license notice.
699 Include output.h and skeleton.h.
700 (process_skeleton): Returns void, and takes a single parameter.
701 * src/scan-skel.l: Add the license notice.
702 Include skeleton.h.
703 Don't use %option yylineno: it seems that then Flex imagines
704 REJECT has been used, and therefore it won't reallocate its
705 buffers (which makes no other sense to me than a bug). It results
706 in warnings for `unused: yy_flex_realloc'.
707
9b3add5b
RA
7082001-12-30 Robert Anisko <robert.anisko@epita.fr>
709
710 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
711 (MUSCLE_INSERT_PREFIX): ...to there.
712 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
713 (MUSCLE_INSERT_PREFIX): Move from here...
714
715 * src/bison.hairy: Add a section directive. Put braces around muscle
716 names. This parser skeleton is still broken, but Bison should not
717 choke on a bad muscle 'syntax'.
718 * src/bison.simple: Add a section directive. Put braces around muscle
719 names.
720
721 * src/files.h (strsuffix, stringappend): Add declarations.
722 (tab_extension): Add declaration.
723 (short_base_name): Add declaration.
724
725 * src/files.c (strsuffix, stringappend): No longer static. These
726 functions are used in the skeleton parser.
727 (tab_extension): New.
728 (compute_base_names): Use the computations done in this function
fab5b110 729 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
730 names.
731 (short_base_name): No longer static.
732
733 * src/output.c (output_skeleton): New.
734 (output): Disable call to output_master_parser, and give a try to
735 a new skeleton handling system.
736 (guards_output, actions_output): No longer static.
737 (token_definitions_output, get_lines_number): No longer static.
738
739 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
740
fab5b110 741 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
742 parse-skel.y.
743
744 * src/parse-skel.y: New file.
745 * src/scan-skel.l: New file.
746
b5b61c61
AD
7472001-12-29 Akim Demaille <akim@epita.fr>
748
749 %name-prefix is broken.
750
751 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
752 Adjust all dependencies.
753 * tests/headers.at (export YYLTYPE): Strengthen this test: use
754 %name-prefix.
755
756 Renaming yylval but not yylloc is not consistent. Now we do.
757
758 * src/bison.simple: Prefix yylloc if used.
759 * doc/bison.texinfo (Decl Summary): Document that.
760
8c9a50be
AD
7612001-12-29 Akim Demaille <akim@epita.fr>
762
763 * doc/bison.texinfo: Promote `%long-directive' over
764 `%long_directive'.
765 Remove all references to fixed-output-files, yacc is enough.
766
d99361e6
AD
7672001-12-29 Akim Demaille <akim@epita.fr>
768
769 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
770 user prologue. These are defaults.
771 * tests/actions.at (Mid-rule actions): Make sure the user can
772 define YYDEBUG and YYERROR_VERBOSE.
773
b9cecb91
AD
7742001-12-29 Akim Demaille <akim@epita.fr>
775
776 * src/output.c (header_output): Don't forget to export YYLTYPE and
777 yylloc.
778 * tests/headers.at (export YYLTYPE): New, make sure it does.
779 * tests/regression.at (%union and --defines, Invalid CPP headers):
780 Move to...
781 * tests/headers.at: here.
782
aea13e97
AD
7832001-12-29 Akim Demaille <akim@epita.fr>
784
785 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
786
931394cb
AD
7872001-12-29 Akim Demaille <akim@epita.fr>
788
789 * tests/actions.at (Mid-rule actions): Output on a single line
790 instead of several.
791
704a47c4
AD
7922001-12-29 Akim Demaille <akim@epita.fr>
793
794 * doc/bison.texinfo: Formatting changes.
795
091e20bb
AD
7962001-12-29 Akim Demaille <akim@epita.fr>
797
798 Don't store the token defs in a muscle, just be ready to output it
799 on command. Now possible via `symbols'. Fixes a memory leak.
800
801 * src/output.c (token_definitions_output): New.
802 (output_parser, header_output): Use it.
803 * src/reader.c (symbols_save): Remove.
804
cce71710
AD
8052001-12-29 Akim Demaille <akim@epita.fr>
806
807 * src/bison.simple: Do not provide a default for YYSTYPE and
808 YYLTYPE before the user's prologue. Otherwise it's hardly... a
809 default.
810
82c035a8
AD
8112001-12-29 Akim Demaille <akim@epita.fr>
812
813 Mid-rule actions are simply... ignored!
814
815 * src/reader.c (readgram): Be sure to attach mid-rule actions to
816 the empty-rule associated to the dummy symbol, not to the host
817 rule.
818 * tests/actions.at (Mid-rule actions): New.
819
8419d367
AD
8202001-12-29 Akim Demaille <akim@epita.fr>
821
822 Memory leak.
823
824 * src/reader.c (reader): Free grammar.
825
375d5806
AD
8262001-12-29 Akim Demaille <akim@epita.fr>
827
828 Memory leak.
829
830 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
831 since it allocates it for each state, although only one is needed.
832 (allocate_storage): Do it here.
833
f51cb8ff
AD
8342001-12-29 Akim Demaille <akim@epita.fr>
835
836 * src/options.h, src/options.c (create_long_option_table): Rename
837 as...
838 (long_option_table_new): this, with a clearer prototype.
839 (percent_table): Remove, unused,
840 * src/getargs.c (getargs): Adjust.
841
29e88316
AD
8422001-12-29 Akim Demaille <akim@epita.fr>
843
844 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
845 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
846 as states.
847
b9f71f19
AD
8482001-12-29 Akim Demaille <akim@epita.fr>
849
850 * src/lalr.c (build_relations): Rename `states' as `states1'.
851 Sorry, I don't understand exactly what it is, no better name...
852
1a2b5d37
AD
8532001-12-29 Akim Demaille <akim@epita.fr>
854
855 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
856 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
857 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
858 as rules.
859
1cca533e
AD
8602001-12-29 Akim Demaille <akim@epita.fr>
861
862 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
863 ago.
864
c03ae966
AD
8652001-12-29 Akim Demaille <akim@epita.fr>
866
867 * src/reader.c, src/reader.h (user_toknums): Remove.
868 Adjust all users to use symbols[i]->user_token_number.
869
5a670b1e
AD
8702001-12-29 Akim Demaille <akim@epita.fr>
871
872 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
873 Adjust all users to use symbols[i]->prec or ->assoc.
874
ad949da9
AD
8752001-12-29 Akim Demaille <akim@epita.fr>
876
877 * src/reader.c, src/reader.h (tags): Remove.
878 Adjust all users to use symbols[i]->tag.
879
0e78e603
AD
8802001-12-29 Akim Demaille <akim@epita.fr>
881
882 * src/gram.h, src/gram.c (symbols): New, similar to state_table
883 and rule_table.
884 * src/reader.c (packsymbols): Fill this table.
885 Drop sprec.
886 * src/conflicts.c (resolve_sr_conflict): Adjust.
887 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
888 single table.
889 Use symbols[i]->tag instead of tags[i].
890
213e640e
AD
8912001-12-29 Akim Demaille <akim@epita.fr>
892
893 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
894 In addition, put a comment in there, to replace...
895 * tests/regression.at (%union and C comments): Remove.
896
e7b8bef1
AD
8972001-12-29 Akim Demaille <akim@epita.fr>
898
899 * tests/regression.at (Web2c Actions): Blindly move the actual
900 output as expected output. The contents *seem* right to me, but I
901 can't pretend reading perfectly parser tables... Nonetheless, all
902 the other tests pass correctly, the table look OK, even though the
903 presence of `$axiom' is to be noted: AFAICS it is useless (but
904 harmless).
905
b68e7744
AD
9062001-12-29 Akim Demaille <akim@epita.fr>
907
908 * src/reader.c (readgram): Don't add the rule 0 if there were no
909 rules read. In other words, add it _after_ having performed
910 grammar sanity checks.
911 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
912
78d5bae9
AD
9132001-12-29 Akim Demaille <akim@epita.fr>
914
915 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
916 visible, and some states have now a different number.
917
ff442794
AD
9182001-12-29 Akim Demaille <akim@epita.fr>
919
920 * src/reader.c (readgram): Bind the initial rule's lineno to that
921 of the first rule.
922 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
923 (Solved SR Conflicts): Adjust rule 0's line number.
924
610ab194
AD
9252001-12-29 Akim Demaille <akim@epita.fr>
926
927 Fix the `GAWK Grammar' failure.
928
929 * src/LR0.c (final_state): Initialize to -1 so that we do compute
930 the reductions of the first state which was mistakenly confused
931 with the final state because precisely final_state was initialized
932 to 0.
933 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
934 now noticed by Bison.
935 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
936 have a reduction on $default.
937
29d29c8f
AD
9382001-12-29 Akim Demaille <akim@epita.fr>
939
940 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
941 rule line numbers.
942 * src/closure.c (print_closure): Likewise.
943 * src/derives.c (print_derives): Likewise.
944 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
945 now.
946
7c6b64d0
AD
9472001-12-29 Akim Demaille <akim@epita.fr>
948
949 * src/lalr.c (lookaheads_print): New.
950 (lalr): Call it when --trace-flag.
951 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
952 are dumped.
953
3d4daee3
AD
9542001-12-29 Akim Demaille <akim@epita.fr>
955
956 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
957 when walking through ritem, even via rule->rhs.
958 * src/reduce.c (dump_grammar, useful_production, reduce_output)
959 (useful_production, useless_nonterminals): Likewise.
960 (reduce_grammar_tables): Likewise, plus update nritems.
961 * src/nullable.c (set_nullable): Likewise.
962 * src/lalr.c (build_relations): Likewise.
963 * tests/sets.at (Nullable): Adjust.
964 Fortunately, now, the $axiom is no longer nullable.
965
9e7f6bbd
AD
9662001-12-29 Akim Demaille <akim@epita.fr>
967
968 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
969 the 0-sentinel.
970 * src/gram.c (ritem_longest_rhs): Likewise.
971 * src/reduce.c (nonterminals_reduce): Likewise.
972 * src/print_graph.c (print_graph): Likewise.
973 * src/output.c (output_rule_data): Likewise.
974 * src/nullable.c (set_nullable): Likewise.
975
255ef638
AD
9762001-12-29 Akim Demaille <akim@epita.fr>
977
978 * src/output.c: Comment changes.
979
0d8a7363
AD
9802001-12-27 Paul Eggert <eggert@twinsun.com>
981
982 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
983 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
984 Sparc, as they were causing more porting problems than the
985 (minor) performance improvement was worth.
986
987 Also, catch up with 1.31's YYSTD.
988
3db472b9
AD
9892001-12-27 Akim Demaille <akim@epita.fr>
990
991 * src/output.c (output_gram): Rely on nritems, not the
992 0-sentinel. See below.
993 Use -1 as separator, not 0.
994 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
995 Rely on -1 as separator in yyrhs, instead of 0.
996 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
997 twice `Now at end of input', therefore there are two lines less to
998 expect.
999
b365aa05
AD
10002001-12-27 Akim Demaille <akim@epita.fr>
1001
1002 * tests/regression.at (Unresolved SR Conflicts):
1003 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1004 below.
1005
30171f79
AD
10062001-12-27 Akim Demaille <akim@epita.fr>
1007
1008 * src/LR0.c (new_state): Recognize the final state by the fact it
1009 is reached by eoftoken.
1010 (insert_start_shifting_state, insert_eof_shifting_state)
1011 (insert_accepting_state, augment_automaton): Remove, since now
1012 these states are automatically computed from the initial state.
1013 (generate_states): Adjust.
1014 * src/print.c: When reporting a rule number to the user, substract
1015 1, so that the axiom rule is rule 0, and the first user rule is 1.
1016 * src/reduce.c: Likewise.
1017 * src/print_graph.c (print_core): For the time being, just as for
1018 the report, depend upon --trace-flags to dump the full set of
1019 items.
1020 * src/reader.c (readgram): Once the grammar read, insert the rule
1021 0: `$axiom: START-SYMBOL $'.
1022 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1023 number of the states has changed (the final state is no longer
1024 necessarily the last), catch up.
1025
75142d45
AD
10262001-12-27 Akim Demaille <akim@epita.fr>
1027
1028 Try to make the use of the eoftoken valid. Given that its value
1029 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1030 is used instead of > 0 where appropriate, (ii), depend upon nritems
1031 instead of the 0-sentinel.
1032
1033 * src/gram.h, src/gram.c (nritems): New.
1034 Expected to be duplication of nitems, but for the time being...
1035 * src/reader.c (packgram): Assert nritems and nitems are equal.
1036 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1037 * src/closure.c (print_closure, print_fderives): Likewise.
1038 * src/gram.c (ritem_print): Likewise.
1039 * src/print.c (print_core, print_grammar): Likewise.
1040 * src/print_graph.c: Likewise.
1041
b7c49edf
AD
10422001-12-27 Akim Demaille <akim@epita.fr>
1043
1044 * src/main.c (main): If there are complains after grammar
1045 reductions, then output the report anyway if requested, then die.
1046 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1047 * src/reader.c (eoftoken): New.
1048 (parse_token_decl): If the token being defined has value `0', it
1049 is the eoftoken.
1050 (packsymbols): No longer hack `tags' to insert `$' by hand.
1051 Be sure to preserve the value of the eoftoken.
1052 (reader): Make sure eoftoken is defined.
1053 Initialize nsyms to 0: now eoftoken is created just like the others.
1054 * src/print.c (print_grammar): Don't special case the eof token.
1055 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1056 lie anyway, albeit pleasant.
1057 * tests/calc.at: Exercise error messages with eoftoken.
1058 Change the grammar so that empty input is invalid.
1059 Adjust expectations.
1060 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1061
ec2da99f
AD
10622001-12-27 Akim Demaille <akim@epita.fr>
1063
1064 * configure.in: Check the protos of strchr ans strspn.
1065 Replace strchr if needed.
1066 * src/system.h: Provide the protos of strchr, strspn and memchr if
1067 missing.
1068 * lib/strchr.c: New.
1069 * src/reader.c (symbols_save): Use strchr.
1070
8adfa272
AD
10712001-12-27 Akim Demaille <akim@epita.fr>
1072
1073 * src/print.c, src/print_graph.c (escape): New.
1074 Use it to quote the TAGS outputs.
1075 * src/print_graph.c (print_state): Now errors are in red, and
1076 reductions in green.
1077 Prefer high to wide: output the state number on a line of its own.
1078
80dac38c
AD
10792001-12-27 Akim Demaille <akim@epita.fr>
1080
1081 * src/state.h, src/state.c (reductions_new): New.
1082 * src/LR0.c (set_state_table): Let all the states have a
1083 `reductions', even if reduced to 0.
1084 (save_reductions): Adjust.
1085 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1086 * src/print.c (print_reductions, print_actions): Adjust.
1087 * src/output.c (action_row): Adjust.
1088
2cec70b9
AD
10892001-12-27 Akim Demaille <akim@epita.fr>
1090
1091 * src/state.h, src/state.c (errs_new, errs_dup): New.
1092 * src/LR0.c (set_state_table): Let all the states have an errs,
1093 even if reduced to 0.
1094 * src/print.c (print_errs, print_reductions): Adjust.
1095 * src/output.c (output_actions, action_row): Adjust.
1096 * src/conflicts.c (resolve_sr_conflict): Adjust.
1097
13ca549a
AD
10982001-12-27 Akim Demaille <akim@epita.fr>
1099
1100 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1101
5092aba5
AD
11022001-12-27 Akim Demaille <akim@epita.fr>
1103
1104 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1105 * src/print.c: here.
1106 (lookaheadset, shiftset): New, used as additional storage by
1107 print_reductions.
1108 (print_results): Adjust.
1109 (print_shifts, print_gotos, print_errs): New, extracted from...
1110 (print_actions): here.
1111 * src/print_graph.c (print_actions): Remove dead code.
1112
11e2beca
AD
11132001-12-27 Akim Demaille <akim@epita.fr>
1114
1115 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1116 `$n' and `@n'.
1117
dac3c910
AD
11182001-12-27 Akim Demaille <akim@epita.fr>
1119
1120 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1121 (build_relations): Adjust.
1122
d0b0fefa
AD
11232001-12-27 Akim Demaille <akim@epita.fr>
1124
1125 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1126 duplication.
1127
adc8c848
AD
11282001-12-27 Akim Demaille <akim@epita.fr>
1129
1130 * src/reader.c (packgram): Catch nitems overflows.
1131
14d293ac
AD
11322001-12-27 Akim Demaille <akim@epita.fr>
1133
1134 * src/files.c, src/files.h (guard_obstack): Remove.
1135 * src/output.c (output): Adjust.
1136 * src/reader.c (parse_braces): New, factoring...
1137 (copy_action, copy_guard): these two which are renamed as...
1138 (parse_action, parse_guard): these.
1139 As a voluntary consequence, using braces around guards is now
1140 mandatory.
1141
f499b062
AD
11422001-12-27 Akim Demaille <akim@epita.fr>
1143
1144 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1145 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1146 members.
1147 (symbol_list_new): Adjust.
1148 (copy_action): action_line is the first line, not the last.
1149 (copy_guard): Just as for actions, store the `action' only, not
1150 the switch/case/break flesh.
1151 Don't parse the user action that might follow the guard, let...
1152 (readgram): do it, i.e., now, there can be an action after a
1153 guard.
1154 In other words the guard is just explicitly optional.
1155 (packgram): Adjust.
1156 * src/output.c (guards_output): New.
1157 (output_parser): Call it when needed.
1158 (output): Also free the guard and attrs obstacks.
1159 * src/files.c, src/files.h (obstack_save): Remove.
1160 (output_files): Remove.
1161 As a result, if one needs the former `.act' file, using an
1162 appropriate skeleton which requires actions and guards is now
1163 required.
1164 * src/main.c (main): Adjust.
1165 * tests/semantic.at: New.
1166 * tests/regression.at: Use `input.y' as input file name.
1167 Avoid 8+3 problems by requiring input.c when the test needs the
1168 parser.
1169
d945f5cd
AD
11702001-12-27 Akim Demaille <akim@epita.fr>
1171
1172 * src/reader.c (symbol_list_new): Be sure to initialize all the
1173 fields.
1174
d200e455
AD
11752001-12-27 Akim Demaille <akim@epita.fr>
1176
1177 All the hacks using a final pseudo state are now useless.
1178
1179 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1180 * src/lalr.c (nLA): New.
1181 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1182 instead of lookaheadsp from the pseudo state (nstate + 1).
1183
f9507c28
AD
11842001-12-27 Akim Demaille <akim@epita.fr>
1185
1186 * src/output.c (action_row, token_actions): Use a state_t instead
1187 of a integer, and nlookaheads instead of the following state's
1188 lookaheadsp.
1189
065fbd27
AD
11902001-12-27 Akim Demaille <akim@epita.fr>
1191
1192 * src/conflicts.c (log_resolution, flush_shift)
1193 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1194 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1195 (conflicts_print, print_reductions): Use a state_t instead of an
1196 integer when referring to a state.
1197 As much as possible, depend upon nlookaheads, instead of the
1198 `lookaheadsp' member of the following state (since lookaheads of
1199 successive states are successive, the difference between state n + 1
1200 and n served as the number of lookaheads for state n).
1201 * src/lalr.c (add_lookback_edge): Likewise.
1202 * src/print.c (print_core, print_actions, print_state)
1203 (print_results): Likewise.
1204 * src/print_graph.c (print_core, print_actions, print_state)
1205 (print_graph): Likewise.
1206 * src/conflicts.h: Adjust.
1207
1b177bd7
AD
12082001-12-27 Akim Demaille <akim@epita.fr>
1209
1210 * src/bison.hairy: Formatting/comment changes.
1211 ANSIfy.
1212 Remove `register' indications.
1213 Add plenty of `static'.
1214
7742ddeb
AD
12152001-12-27 Akim Demaille <akim@epita.fr>
1216
1217 * src/output.c (prepare): Drop the muscle `ntbase' which
1218 duplicates ntokens.
1219 * src/bison.simple: Formatting/comment changes.
1220 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1221 is an undocumented synonym.
1222
1fa14068
AD
12232001-12-22 Akim Demaille <akim@epita.fr>
1224
1225 * src/output.c (output_table_data): Change the prototype to use
1226 `int' for array ranges: some invocations do pass an int, not a
1227 short.
1228 Reported by Wayne Green.
1229
b9752825
AD
12302001-12-22 Akim Demaille <akim@epita.fr>
1231
1232 Some actions of web2c.y are improperly triggered.
1233 Reported by Mike Castle.
1234
1235 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1236 * tests/regression.at (Web2c): Rename as...
1237 (Web2c Report): this.
1238 (Web2c Actions): New.
1239
776209d6
AD
12402001-12-22 Akim Demaille <akim@epita.fr>
1241
1242 Reductions in web2c.y are improperly reported.
1243 Reported by Mike Castle.
1244
1245 * src/conflicts.c (print_reductions): Fix.
1246 * tests/regression.at (Web2c): New.
1247
275fc3ad
AD
12482001-12-18 Akim Demaille <akim@epita.fr>
1249
1250 Some host fail on `assert (!"foo")', which expands to
1251 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1252 Reported by Nelson Beebee.
1253
1254 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1255 `#define it_succeeded 0' and `assert (it_succeeded)'.
1256
897668ee
MA
12572001-12-17 Marc Autret <autret_m@epita.fr>
1258
1259 * src/bison.simple: Don't hard code the skeleton line and filename.
1260 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1261 New line counter 'skeleton_line' (skeleton-line muscle).
1262
ab3399e0
PE
12632001-12-17 Paul Eggert <eggert@twinsun.com>
1264
1265 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1266 YYDEBUG must be defined to a nonzero value.
1267
1268 * src/bison.simple (yytname): Do not assume that the user defines
1269 YYDEBUG to a properly parenthesized expression.
1270
3877f72b
AD
12712001-12-17 Akim Demaille <akim@epita.fr>
1272
1273 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1274 nlookaheads is a new member.
1275 Adjust all users.
1276 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1277 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1278 state.
776209d6 1279
331dbc1b
AD
12802001-12-17 Akim Demaille <akim@epita.fr>
1281
1282 * src/files.h, src/files.c (open_files, close_files): Remove.
1283 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1284 let...
1285 * src/reader.c (reader): Do it.
776209d6 1286
be750e4c
AD
12872001-12-17 Akim Demaille <akim@epita.fr>
1288
1289 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1290
709ae8c6
AD
12912001-12-17 Akim Demaille <akim@epita.fr>
1292
1293 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1294 (flush_reduce): New.
1295 (resolve_sr_conflict): Adjust.
776209d6 1296
f87685c3
AD
12972001-12-17 Akim Demaille <akim@epita.fr>
1298
1299 * src/output.c (output_obstack): Be static and rename as...
1300 (format_obstack): this, to avoid any confusion with files.c's
1301 output_obstack.
1302 * src/reader.h (muscle_obstack): Move to...
1303 * src/output.h: here, since it's defined in output.c.
1304
837491d8
AD
13052001-12-17 Akim Demaille <akim@epita.fr>
1306
1307 * src/output.c (action_row, save_column, default_goto)
1308 (sort_actions, matching_state, pack_vector): Better variable
1309 locality.
1310
796d61fb
AD
13112001-12-17 Akim Demaille <akim@epita.fr>
1312
1313 * src/output.c: Various formatting changes.
776209d6 1314
64d15509
AD
13152001-12-17 Akim Demaille <akim@epita.fr>
1316
1317 * src/files.c (output_files): Free the output_obstack.
1318 * src/main.c (main): Call print and print_graph conditionally.
1319 * src/print.c (print): Work unconditionally.
1320 * src/print_graph.c (print_graph): Work unconditionally.
1321 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1322
fbc8ecb7
MA
13232001-12-16 Marc Autret <autret_m@epita.fr>
1324
1325 * src/output.c (actions_output): Fix. When we use %no-lines,
1326 there is one less line per action.
1327
f0440388
MA
13282001-12-16 Marc Autret <autret_m@epita.fr>
1329
1330 * src/bison.simple: Remove a useless #line directive.
1331 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1332 * src/output.c (get_lines_number): New.
776209d6 1333 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1334 output muscles.
1335 Fix line numbering.
1336 (actions_output): Computes the number of lines taken by actions.
1337 (output_master_parser): Insert new skeleton which is the name of
1338 the output parser file name.
1339
a79986b8
MA
13402001-12-15 Marc Autret <autret_m@epita.fr>
1341
1342 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1343
4ec8e00f
MA
13442001-12-15 Marc Autret <autret_m@epita.fr>
1345
1346 * src/output.c (output_gram): Keep track of the hairy one.
1347
1a4648ff
AD
13482001-12-15 Akim Demaille <akim@epita.fr>
1349
1350 Make `make distcheck' work.
1351
1352 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1353 system.h which uses libgettext.h.
1354
9c2c67e6
AD
13552001-12-15 Akim Demaille <akim@epita.fr>
1356
1357 * src/nullable.c (set_nullable): Useless rules must be skipped,
1358 otherwise, since we range over their symbols, we might look at a
1359 nonterminal which no longer ``exists'', i.e., it is not counted in
1360 `nvars', hence we overflow our arrays.
1361
93ede233
AD
13622001-12-15 Akim Demaille <akim@epita.fr>
1363
1364 The header can also be produced directly, without any obstack!
1365 Yahoo!
1366
1367 * src/files.c, src/files.h (defines_obstack): Remove.
1368 (compute_header_macro): Global.
1369 (defines_obstack_save): Remove.
1370 * src/reader.c (parse_union_decl): No longer output to
1371 defines_obstack: its content can be found in the `stype' muscle
1372 anyway.
1373 (output_token_translations): Merge into...
1374 (symbols_output): this.
1375 Rename as...
1376 (symbols_save): this.
1377 (reader): Adjust.
1378 * src/output.c (header_output): New.
1379 (output): Call it.
1380
2666f928
AD
13812001-12-15 Akim Demaille <akim@epita.fr>
1382
1383 * src/reader.c (parse_union_decl): Instead of handling two obstack
1384 simultaneously, use one to define the `stype' muscle, and use the
1385 value of the latter to fill defines_obstack.
1386 (copy_comment): Remove.
1387 (copy_comment2): Work for a single obstack.
1388 Rename as...
1389 (copy_comment): this.
1390
428046f8
AD
13912001-12-15 Akim Demaille <akim@epita.fr>
1392
1393 * src/lex.c, src/lex.h (xgetc): No longer static.
1394 * src/reader.c (parse_union_decl): Revamp.
1395
ea52d706
AD
13962001-12-15 Akim Demaille <akim@epita.fr>
1397
1398 Still making progress in separating Bison into (i) input, (ii)
1399 process, (iii) output: now we can directly output the parser file
1400 without using table_obstack at all.
1401
1402 * src/files.c, src/files.h (table_obstack): Bye bye.
1403 (parser_file_name): New.
1404 * src/files.c (compute_output_file_names): Compute it.
1405 * src/output.c (actions_output, output_parser)
1406 (output_master_parser): To a file instead of an obstack.
1407
3f96f4dc
AD
14082001-12-15 Akim Demaille <akim@epita.fr>
1409
1410 Attach actions to rules, instead of pre-outputting them to
1411 actions_obstack.
1412
1413 * src/gram.h (rule_t): action and action_line are new members.
1414 * src/reader.c (symbol_list): Likewise.
1415 (copy_action): Save the actions within the rule.
1416 (packgram): Save them in rule_table.
1417 * src/output.c (actions_output): New.
1418 (output_parser): Use it on `%%actions'.
1419 (output_rule_data): Don't free rule_table.
1420 (output): Do it.
1421 (prepare): Don't save the `action' muscle.
1422 * src/bison.simple: s/%%action/%%actions/.
1423
51576fb3
AD
14242001-12-15 Akim Demaille <akim@epita.fr>
1425
1426 * src/reader.c (copy_action): When --yacc, don't append a `;'
1427 to the user action: let it fail if lacking.
dee049eb 1428 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1429
2648a72d
AD
14302001-12-14 Akim Demaille <akim@epita.fr>
1431
1432 * src/lex.c (literalchar): Simply return the char you decoded, non
1433 longer mess around with obstacks and int pointers.
1434 Adjust all callers.
1435
92790e5b
AD
14362001-12-14 Akim Demaille <akim@epita.fr>
1437
1438 * src/lex.c (literalchar): Don't escape the special characters,
1439 just decode them, and keep them as char (before, eol was output as
1440 the 2 char string `\n' etc.).
1441 * src/output.c (output_rule_data): Use quotearg to output the
1442 token strings.
1443
927c1557
PE
14442001-12-13 Paul Eggert <eggert@twinsun.com>
1445
1446 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1447 Do not infringe on the global user namespace when using C++.
1448 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1449 All uses of `fprintf' and `stderr' changed.
1450
1451 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1452
ed8e1f68
AD
14532001-12-13 Akim Demaille <akim@epita.fr>
1454
1455 The computation of nullable is broken: it doesn't handle empty
1456 RHS's properly.
1457
1458 * tests/torture.at (GNU AWK Grammar): New.
1459 * tests/sets.at (Nullable): New.
1460 * src/nullable.c (set_nullable): Instead of blindly looping over
1461 `ritems', loop over the rules, and then over their rhs's.
1462
1463 Work around Autotest bugs.
1464
1465 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1466 frame, because Autotest understand lines starting with a `+' as
1467 traces from the shell. Then, they are not processed properly.
1468 Admittedly an Autotest bug, but we don't have time to wait for
1469 Autotest to catch up.
1470 * tests/regression.at (Broken Closure): Adjust to the new table
1471 frames.
1472 Move to...
1473 * tests/sets.at: here.
1474
cb581495
AD
14752001-12-13 Akim Demaille <akim@epita.fr>
1476
1477 * src/closure.c (closure): Use nrules instead of playing tricks
1478 with BITS_PER_WORD.
1479
2e729273
AD
14802001-12-13 Akim Demaille <akim@epita.fr>
1481
1482 * src/print.c (print_actions): Output the handling of `$' as the
1483 traces do: shifting the token EOF. Before EOF was treated as a
1484 nonterminal.
1485 * tests/regression.at: Adjust some tests.
1486 * src/print_graph.c (print_core): Complete the set of items via
1487 closure. The next-to-final and final states are still unsatisfying,
1488 but that's to be addressed elsewhere.
1489 No longer output the rule numbers, but do output the state number.
1490 A single loop for the shifts + gotos is enough, but picked a
1491 distinct color for each.
1492 (print_graph): Initialize and finalize closure.
1493
107f7dfb
AD
14942001-12-13 Akim Demaille <akim@epita.fr>
1495
1496 * src/reader.c (readgram): Remove dead code, an strip useless
1497 braces.
1498 (get_type): Remove, unused.
1499
9b53a24f
AD
15002001-12-12 Akim Demaille <akim@epita.fr>
1501
1502 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1503 on that of lib/error.c.
1504
dbfb6dcd
AD
15052001-12-12 Akim Demaille <akim@epita.fr>
1506
1507 Some hosts don't like `/' in includes.
1508
1509 * src/system.h: Include libgettext.h without qualifying the path.
1510 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1511 $(top_srcdir).
1512
c25fb648
MA
15132001-12-11 Marc Autret <autret_m@epita.fr>
1514
1515 * src/output.c (output_parser): Remove useless muscle.
1516
710ddc4f
MA
15172001-12-11 Marc Autret <autret_m@epita.fr>
1518
1519 * src/bison.simple: Remove #line just before %%epilogue. It
1520 is now handled in ...
1521 * src/reader.c (read_additionnal_code): Add the output of a
1522 #line for the epilogue.
1523
e83d80b8
MA
15242001-12-10 Marc Autret <autret_m@epita.fr>
1525
927c1557 1526 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1527 replace precedent remove.
1528 * src/bison.simple: Remove #line before %%prologue because
1529 %%input-line is wrong at this time.
1530
971d5158
MA
15312001-12-10 Marc Autret <autret_m@epita.fr>
1532
1533 * src/reader.c (symbols_output): Clean up.
927c1557 1534 * src/output.c (output_gram, output): Clean up.
971d5158 1535
5edafffd
AD
15362001-12-10 Akim Demaille <akim@epita.fr>
1537
1538 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1539 * src/LR0.c (set_state_table): here.
1540 * src/lalr.c (lalr): Call it.
1541
0279f8e9
AD
15422001-12-10 Akim Demaille <akim@epita.fr>
1543
1544 * src/state.h (shifts): Remove the `number' member: shifts are
1545 attached to state, hence no longer need to be labelled with a
1546 state number.
1547
190c4f5f
AD
15482001-12-10 Akim Demaille <akim@epita.fr>
1549
1550 Now that states have a complete set of members, the linked list of
1551 shifts is useless: just fill directly the state's shifts member.
1552
1553 * src/state.h (shifts): Remove the `next' member.
1554 * src/LR0.c (first_state, last_state): Remove.
1555 Adjust the callers.
1556 (augment_automaton): Don't look for the shifts that must be added
1557 a shift on EOF: it is those of the state we looked for! But now,
1558 since shifts are attached, it is no longer needed to looking
1559 merely by its id: its number.
1560
2a73b93d
AD
15612001-12-10 Akim Demaille <akim@epita.fr>
1562
1563 * src/LR0.c (augment_automaton): Better variable locality.
1564 Remove an impossible branch: if there is a state corresponding to
1565 the start symbol being shifted, then there is shift for the start
1566 symbol from the initial state.
1567
74392f6a
AD
15682001-12-10 Akim Demaille <akim@epita.fr>
1569
1570 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1571 only when appropriate: when insert_start_shifting_state' is not
1572 invoked.
1573 * tests/regression.at (Rule Line Numbers): Adjust.
1574
37c82725
AD
15752001-12-10 Akim Demaille <akim@epita.fr>
1576
1577 * src/LR0.c (augment_automaton): Now that all states have shifts,
1578 merge the two cases addition shifts to the initial state.
1579
6a164e0c
AD
15802001-12-10 Akim Demaille <akim@epita.fr>
1581
1582 * src/lalr.c (set_state_table): Move to...
1583 * src/LR0.c: here.
1584 * src/lalr.c (lalr): Don't call it...
1585 * src/LR0.c (generate_states): do it.
1586 * src/LR0.h (first_state): Remove, only the table is used.
1587
7215de24
AD
15882001-12-10 Akim Demaille <akim@epita.fr>
1589
1590 * src/LR0.h (first_shift, first_reduction): Remove.
1591 * src/lalr.c: Don't use first_shift: find shifts through the
1592 states.
1593
80e25d4d
AD
15942001-12-10 Akim Demaille <akim@epita.fr>
1595
1596 * src/LR0.c: Attach shifts to states as soon as they are
1597 computed.
1598 * src/lalr.c (set_state_table): Instead of assigning shifts to
1599 state, just assert that the mapping was properly done.
1600
0ab3728b
AD
16012001-12-10 Akim Demaille <akim@epita.fr>
1602
1603 * src/LR0.c (insert_start_shift): Rename as...
1604 (insert_start_shifting_state): this.
1605 (insert_eof_shifting_state, insert_accepting_state): New.
1606 (augment_automaton): Adjust.
1607 Better locality of the variables.
1608 When looking if the start_symbol is shifted from the initial
1609 state, using `while (... symbol != start_symbol ...)' sounds
1610 better than `while (... symbol < start_symbol ...)': If fail
1611 to see how the order between symbols could be relevant!
1612
78af9bbc
AD
16132001-12-10 Akim Demaille <akim@epita.fr>
1614
1615 * src/getargs.h: Don't declare `spec_name_prefix' and
1616 `spec_file_prefix', declared by src/files.h.
1617 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1618 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1619 * src/output.c (prepare): Adjust.
1620 * src/reader.c (symbols_output): Likewise.
1621 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1622
bdef2a41
AD
16232001-12-10 Akim Demaille <akim@epita.fr>
1624
1625 * src/muscle_tab.c (muscle_init): NULL is a better default than
1626 `"0"'.
1627
3735969c
AD
16282001-12-10 Akim Demaille <akim@epita.fr>
1629
1630 * src/reader.c (reader): Calling symbols_output once is enough.
1631
49701457
AD
16322001-12-10 Akim Demaille <akim@epita.fr>
1633
1634 Now that states have a complete set of members, the linked list of
1635 reductions is useless: just fill directly the state's reductions
1636 member.
1637
1638 * src/state.h (struct reductions): Remove member `number' and
1639 `next'.
1640 * src/LR0.c (first_reduction, last_reduction): Remove.
1641 (save_reductions): Don't link the new reductions, store them in
1642 this_state.
1643 * src/lalr.c (set_state_table): No need to attach reductions to
1644 states, it's already done.
1645 * src/output.c (output_actions): No longer free the shifts, then
1646 the reductions, then the states: free all the states and their
1647 members.
1648
0edad749
AD
16492001-12-10 Akim Demaille <akim@epita.fr>
1650
1651 * src/options.c (OPTN, DRTV, BOTH): New.
1652 (option_table): Use them.
1653
0edad749
AD
1654 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1655 the job of system.h.
1656 * src/options.c: Don't include stdio.h and xalloc.h for the same
1657 reasons.
1658
5449dd0f
AD
16592001-12-10 Akim Demaille <akim@epita.fr>
1660
1661 * src/output.c (output, prepare): Make sure the values of the
1662 muscles `action' and `prologue' are 0-terminated.
1663
a870c567
AD
16642001-12-10 Akim Demaille <akim@epita.fr>
1665
1666 Clean up GCC warnings.
1667
1668 * src/reader.c (copy_action): `buf' is not used.
1669 (parse_skel_decl): Be static.
1670 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1671 * src/options.h (create_long_option_table): Have a real prototype.
1672 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1673 (hash_delete_at): Return const void *.
1674 Adjust casts to preserve the const.
1675
80df8768
AD
16762001-12-10 Akim Demaille <akim@epita.fr>
1677
1678 * configure.in: Require 2.52g.
1679 M4 is not needed, but AUTOM4TE is.
1680 * m4/m4.m4: Remove.
1681 * tests/Makefile.am: Adjust.
1682
f693ad14
AD
16832001-12-10 Akim Demaille <akim@epita.fr>
1684
1685 One structure for states is enough, even though theoretically
1686 there are LR(0) states and LALR(1) states.
1687
1688 * src/lalr.h (state_t): Remove.
1689 (state_table): Be state_t **, not state_t *.
1690 * src/state.h (core, CORE_ALLOC): Rename as...
1691 (state_t, STATE_ALLOC): this.
1692 Add the LALR(1) members: shifts, reductions, errs.
1693 * src/LR0.c (state_table): Rename as...
1694 (state_hash): this, to avoid name clashes with the global
1695 `state_table'.
1696 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1697 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1698
74ffbcb6
AD
16992001-12-10 Akim Demaille <akim@epita.fr>
1700
1701 Bison dumps core on bash.y.
1702 Reported by Pascal Bart.
1703
1704 * src/warshall.c (bitmatrix_print): New.
1705 (TC): Use it.
1706 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1707 j must be the outer loop.
1708 * tests/regression.at (Broken Closure): New.
1709
07708e19
AD
17102001-12-05 Akim Demaille <akim@epita.fr>
1711
1712 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1713 its argument.
1714