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