]> git.saurik.com Git - bison.git/blame - ChangeLog
* po/it.po: New.
[bison.git] / ChangeLog
CommitLineData
bb0146c2
AD
12002-01-21 Paolo Bonzini <bonzini@gnu.org>
2
3 * po/it.po: New.
4
bec30531
AD
52002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6
7 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8
fc6edc45
MA
92002-01-20 Marc Autret <marc@gnu.org>
10
11 * src/files.c (compute_output_file_names): Fix
12
5e5d5415
MA
132002-01-20 Marc Autret <marc@gnu.org>
14
15 * tests/output.at: New test.
16 * src/files.c (compute_base_names): Don't map extensions when
17 the YACC flag is set, use defaults.
18 Reported by Evgeny Stambulchik.
19
44ea3fbd
MA
202002-01-20 Marc Autret <marc@gnu.org>
21
bb0146c2 22 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
23 compilers as well (i.e. the vendor C compiler).
24 Suggested by Albert Chin-A-Young.
25
338963d1
TVH
262002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
27
28 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
29 canonical definition.
30 * src/system.h: Use the canonical definition for PARAMS (avoids
31 a conflict with the macro from lib/hash.h).
32
c57b2479
AD
332002-01-11 Akim Demaille <akim@epita.fr>
34
35 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 36 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 37
b85810ae
AD
382002-01-09 Akim Demaille <akim@epita.fr>
39
40 * src/files.c, src/files.h (output_infix): New.
41 (tab_extension): Remove.
42 (compute_base_names): Compute the former, drop the latter.
43 * src/output.c (prepare): Insert the muscles `output-infix', and
44 `output-suffix'.
45 * src/parse-skel.y (string, string.1): New.
46 (section.header): Use it.
47 (section.yacc): Remove.
48 (prefix): Remove too.
49 * src/scan-skel.l: Adjust.
50 * src/bison.simple, src/bison.hairy: Adjust.
51
cae60122
AD
522002-01-09 Akim Demaille <akim@epita.fr>
53
54 * configure.in (WERROR_CFLAGS): Compute it.
55 * src/Makefile.am (CFLAGS): Pass it.
56 * tests/atlocal.in (CFLAGS): Idem.
57 * src/files.c: Fix a few warnings.
58 (get_extension_index): Remove, unused.
59
ae404801
AD
602002-01-08 Akim Demaille <akim@epita.fr>
61
62 * src/getargs.c (AS_FILE_NAME): New.
63 (getargs): Use it to convert DOSish file names.
64 * src/files.c (base_name): Rename as full_base_name to avoid
65 clashes with `base_name ()'.
66 (filename_split): New.
67 (compute_base_names): N-th rewrite, using filename_split.
68
22312b71
AD
692002-01-08 Akim Demaille <akim@epita.fr>
70
71 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
72 New, stolen from the Fileutils 4.1.
73 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
74 * configure.in: Check for the presence of memrchr, and of its
75 prototype.
76
a67cef01
TVH
772002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
78
79 * lib/hash.h (__P): Added definition for this macro.
80 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
81 BUILT_SOURCES, to ensure they are generated first.
82 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
83 %error-verbose to allow bootstrapping with bison 1.30x.
84
2b25d624
AD
852002-01-06 Akim Demaille <akim@epita.fr>
86
87 * src/reader.c (parse_braces): Don't fetch the next char, the
88 convention is to fetch on entry.
89 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
90 'switch' without a following semicolon.
91 * tests/regression.at (braces parsing): New.
92
3460813b
AD
932002-01-06 Akim Demaille <akim@epita.fr>
94
95 Bison is dead wrong in its RR conflict reports.
96
97 * tests/torture.at (GNU Cim Grammar): New.
98 * src/conflicts.c (count_rr_conflicts): Fix.
99
73784c64
AD
1002002-01-06 Akim Demaille <akim@epita.fr>
101
102 Creating package.m4 from configure.ac causes too many problems.
103
104 * tests/Makefile.am (package.m4): Create it by hand,
105 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
106
25d81090
AD
1072002-01-06 Akim Demaille <akim@epita.fr>
108
109 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
110 skeleton.h.
111
a9b8959e
PE
1122002-01-04 Paul Eggert <eggert@twinsun.com>
113
114 * doc/bison.texinfo (Debugging):
115 Remove YYSTDERR; it's no longer defined or used.
116 Also, s/cstdio.h/cstdio/.
117
25d81090
AD
1182002-01-03 Akim Demaille <akim@epita.fr>
119
120 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
121
1109455c
AD
1222002-01-03 Akim Demaille <akim@epita.fr>
123
124 * src/parse-skel.y (process_skeleton): Don't bind the parser's
125 tracing code to --trace, wait for a better --trace option, with
126 args.
127
7ea5e977
AD
1282002-01-03 Akim Demaille <akim@epita.fr>
129
130 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
131 The ISO C++ standard is extremely clear about it: stderr is
132 considered a macro, not a regular symbol (see table 94 `Header
133 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
134 Therefore std:: does not apply to it. It still does with fprintf.
135 Also, s/cstdio.h/cstdio/.
136
fab5b110
AD
1372002-01-03 Akim Demaille <akim@epita.fr>
138
139 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
140 for non system headers.
141
aed7fd9b
AD
1422002-01-02 Akim Demaille <akim@epita.fr>
143
144 Equip the skeleton chain with location tracking, runtime trace,
145 pure parser and scanner.
146
147 * src/parse-skel.y: Request a pure parser, locations, and prefix
148 renaming.
149 (%union): Having several members with the same type does not help
150 type mismatches, simplify.
151 (YYPRINT, yyprint): New.
152 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
153 (skel_error): this.
154 Handle locations.
155 * src/scan-skel.l: Adjust to these changes.
156 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
157 (LOCATION_PRINT, skel_control_t): New.
158
24fad99e
AD
1592001-12-30 Akim Demaille <akim@epita.fr>
160
161 * src/parse-skel.y: Get rid of the shift/reduce conflict:
162 replace `gb' with BLANKS.
163 * src/scan-skel.l: Adjust.
164
a4b36db4
AD
1652001-12-30 Akim Demaille <akim@epita.fr>
166
167 * src/system.h: We don't need nor want bcopy.
168 Throw away MS-DOS crap: we don't need getpid.
169 * configure.in: We don't need strndup. It was even causing
170 problems: because Flex includes the headers *before* us,
171 _GNU_SOURCE is not defined by config.h, and therefore strndup was
172 not visible.
173 * lib/xstrndup.c: New.
174 * src/scan-skel.l: Use it.
175 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
176 * src/parse-skel.y: Use %directives instead of #defines.
177
1239777d
AD
1782001-12-30 Akim Demaille <akim@epita.fr>
179
180 * src/skeleton.h: New.
181 * src/output.c (output_parser, output_master_parser): Remove, dead
182 code.
183 * src/output.h (get_lines_number, actions_output, guards_output)
184 (token_definitions_output): Prototype them.
185 * src/parse-skel.y: Add the license notice.
186 Include output.h and skeleton.h.
187 (process_skeleton): Returns void, and takes a single parameter.
188 * src/scan-skel.l: Add the license notice.
189 Include skeleton.h.
190 Don't use %option yylineno: it seems that then Flex imagines
191 REJECT has been used, and therefore it won't reallocate its
192 buffers (which makes no other sense to me than a bug). It results
193 in warnings for `unused: yy_flex_realloc'.
194
9b3add5b
RA
1952001-12-30 Robert Anisko <robert.anisko@epita.fr>
196
197 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
198 (MUSCLE_INSERT_PREFIX): ...to there.
199 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
200 (MUSCLE_INSERT_PREFIX): Move from here...
201
202 * src/bison.hairy: Add a section directive. Put braces around muscle
203 names. This parser skeleton is still broken, but Bison should not
204 choke on a bad muscle 'syntax'.
205 * src/bison.simple: Add a section directive. Put braces around muscle
206 names.
207
208 * src/files.h (strsuffix, stringappend): Add declarations.
209 (tab_extension): Add declaration.
210 (short_base_name): Add declaration.
211
212 * src/files.c (strsuffix, stringappend): No longer static. These
213 functions are used in the skeleton parser.
214 (tab_extension): New.
215 (compute_base_names): Use the computations done in this function
fab5b110 216 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
217 names.
218 (short_base_name): No longer static.
219
220 * src/output.c (output_skeleton): New.
221 (output): Disable call to output_master_parser, and give a try to
222 a new skeleton handling system.
223 (guards_output, actions_output): No longer static.
224 (token_definitions_output, get_lines_number): No longer static.
225
226 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
227
fab5b110 228 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
229 parse-skel.y.
230
231 * src/parse-skel.y: New file.
232 * src/scan-skel.l: New file.
233
b5b61c61
AD
2342001-12-29 Akim Demaille <akim@epita.fr>
235
236 %name-prefix is broken.
237
238 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
239 Adjust all dependencies.
240 * tests/headers.at (export YYLTYPE): Strengthen this test: use
241 %name-prefix.
242
243 Renaming yylval but not yylloc is not consistent. Now we do.
244
245 * src/bison.simple: Prefix yylloc if used.
246 * doc/bison.texinfo (Decl Summary): Document that.
247
8c9a50be
AD
2482001-12-29 Akim Demaille <akim@epita.fr>
249
250 * doc/bison.texinfo: Promote `%long-directive' over
251 `%long_directive'.
252 Remove all references to fixed-output-files, yacc is enough.
253
d99361e6
AD
2542001-12-29 Akim Demaille <akim@epita.fr>
255
256 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
257 user prologue. These are defaults.
258 * tests/actions.at (Mid-rule actions): Make sure the user can
259 define YYDEBUG and YYERROR_VERBOSE.
260
b9cecb91
AD
2612001-12-29 Akim Demaille <akim@epita.fr>
262
263 * src/output.c (header_output): Don't forget to export YYLTYPE and
264 yylloc.
265 * tests/headers.at (export YYLTYPE): New, make sure it does.
266 * tests/regression.at (%union and --defines, Invalid CPP headers):
267 Move to...
268 * tests/headers.at: here.
269
aea13e97
AD
2702001-12-29 Akim Demaille <akim@epita.fr>
271
272 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
273
931394cb
AD
2742001-12-29 Akim Demaille <akim@epita.fr>
275
276 * tests/actions.at (Mid-rule actions): Output on a single line
277 instead of several.
278
704a47c4
AD
2792001-12-29 Akim Demaille <akim@epita.fr>
280
281 * doc/bison.texinfo: Formatting changes.
282
091e20bb
AD
2832001-12-29 Akim Demaille <akim@epita.fr>
284
285 Don't store the token defs in a muscle, just be ready to output it
286 on command. Now possible via `symbols'. Fixes a memory leak.
287
288 * src/output.c (token_definitions_output): New.
289 (output_parser, header_output): Use it.
290 * src/reader.c (symbols_save): Remove.
291
cce71710
AD
2922001-12-29 Akim Demaille <akim@epita.fr>
293
294 * src/bison.simple: Do not provide a default for YYSTYPE and
295 YYLTYPE before the user's prologue. Otherwise it's hardly... a
296 default.
297
82c035a8
AD
2982001-12-29 Akim Demaille <akim@epita.fr>
299
300 Mid-rule actions are simply... ignored!
301
302 * src/reader.c (readgram): Be sure to attach mid-rule actions to
303 the empty-rule associated to the dummy symbol, not to the host
304 rule.
305 * tests/actions.at (Mid-rule actions): New.
306
8419d367
AD
3072001-12-29 Akim Demaille <akim@epita.fr>
308
309 Memory leak.
310
311 * src/reader.c (reader): Free grammar.
312
375d5806
AD
3132001-12-29 Akim Demaille <akim@epita.fr>
314
315 Memory leak.
316
317 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
318 since it allocates it for each state, although only one is needed.
319 (allocate_storage): Do it here.
320
f51cb8ff
AD
3212001-12-29 Akim Demaille <akim@epita.fr>
322
323 * src/options.h, src/options.c (create_long_option_table): Rename
324 as...
325 (long_option_table_new): this, with a clearer prototype.
326 (percent_table): Remove, unused,
327 * src/getargs.c (getargs): Adjust.
328
29e88316
AD
3292001-12-29 Akim Demaille <akim@epita.fr>
330
331 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
332 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
333 as states.
334
b9f71f19
AD
3352001-12-29 Akim Demaille <akim@epita.fr>
336
337 * src/lalr.c (build_relations): Rename `states' as `states1'.
338 Sorry, I don't understand exactly what it is, no better name...
339
1a2b5d37
AD
3402001-12-29 Akim Demaille <akim@epita.fr>
341
342 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
343 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
344 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
345 as rules.
346
1cca533e
AD
3472001-12-29 Akim Demaille <akim@epita.fr>
348
349 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
350 ago.
351
c03ae966
AD
3522001-12-29 Akim Demaille <akim@epita.fr>
353
354 * src/reader.c, src/reader.h (user_toknums): Remove.
355 Adjust all users to use symbols[i]->user_token_number.
356
5a670b1e
AD
3572001-12-29 Akim Demaille <akim@epita.fr>
358
359 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
360 Adjust all users to use symbols[i]->prec or ->assoc.
361
ad949da9
AD
3622001-12-29 Akim Demaille <akim@epita.fr>
363
364 * src/reader.c, src/reader.h (tags): Remove.
365 Adjust all users to use symbols[i]->tag.
366
0e78e603
AD
3672001-12-29 Akim Demaille <akim@epita.fr>
368
369 * src/gram.h, src/gram.c (symbols): New, similar to state_table
370 and rule_table.
371 * src/reader.c (packsymbols): Fill this table.
372 Drop sprec.
373 * src/conflicts.c (resolve_sr_conflict): Adjust.
374 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
375 single table.
376 Use symbols[i]->tag instead of tags[i].
377
213e640e
AD
3782001-12-29 Akim Demaille <akim@epita.fr>
379
380 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
381 In addition, put a comment in there, to replace...
382 * tests/regression.at (%union and C comments): Remove.
383
e7b8bef1
AD
3842001-12-29 Akim Demaille <akim@epita.fr>
385
386 * tests/regression.at (Web2c Actions): Blindly move the actual
387 output as expected output. The contents *seem* right to me, but I
388 can't pretend reading perfectly parser tables... Nonetheless, all
389 the other tests pass correctly, the table look OK, even though the
390 presence of `$axiom' is to be noted: AFAICS it is useless (but
391 harmless).
392
b68e7744
AD
3932001-12-29 Akim Demaille <akim@epita.fr>
394
395 * src/reader.c (readgram): Don't add the rule 0 if there were no
396 rules read. In other words, add it _after_ having performed
397 grammar sanity checks.
398 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
399
78d5bae9
AD
4002001-12-29 Akim Demaille <akim@epita.fr>
401
402 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
403 visible, and some states have now a different number.
404
ff442794
AD
4052001-12-29 Akim Demaille <akim@epita.fr>
406
407 * src/reader.c (readgram): Bind the initial rule's lineno to that
408 of the first rule.
409 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
410 (Solved SR Conflicts): Adjust rule 0's line number.
411
610ab194
AD
4122001-12-29 Akim Demaille <akim@epita.fr>
413
414 Fix the `GAWK Grammar' failure.
415
416 * src/LR0.c (final_state): Initialize to -1 so that we do compute
417 the reductions of the first state which was mistakenly confused
418 with the final state because precisely final_state was initialized
419 to 0.
420 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
421 now noticed by Bison.
422 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
423 have a reduction on $default.
424
29d29c8f
AD
4252001-12-29 Akim Demaille <akim@epita.fr>
426
427 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
428 rule line numbers.
429 * src/closure.c (print_closure): Likewise.
430 * src/derives.c (print_derives): Likewise.
431 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
432 now.
433
7c6b64d0
AD
4342001-12-29 Akim Demaille <akim@epita.fr>
435
436 * src/lalr.c (lookaheads_print): New.
437 (lalr): Call it when --trace-flag.
438 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
439 are dumped.
440
3d4daee3
AD
4412001-12-29 Akim Demaille <akim@epita.fr>
442
443 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
444 when walking through ritem, even via rule->rhs.
445 * src/reduce.c (dump_grammar, useful_production, reduce_output)
446 (useful_production, useless_nonterminals): Likewise.
447 (reduce_grammar_tables): Likewise, plus update nritems.
448 * src/nullable.c (set_nullable): Likewise.
449 * src/lalr.c (build_relations): Likewise.
450 * tests/sets.at (Nullable): Adjust.
451 Fortunately, now, the $axiom is no longer nullable.
452
9e7f6bbd
AD
4532001-12-29 Akim Demaille <akim@epita.fr>
454
455 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
456 the 0-sentinel.
457 * src/gram.c (ritem_longest_rhs): Likewise.
458 * src/reduce.c (nonterminals_reduce): Likewise.
459 * src/print_graph.c (print_graph): Likewise.
460 * src/output.c (output_rule_data): Likewise.
461 * src/nullable.c (set_nullable): Likewise.
462
255ef638
AD
4632001-12-29 Akim Demaille <akim@epita.fr>
464
465 * src/output.c: Comment changes.
466
0d8a7363
AD
4672001-12-27 Paul Eggert <eggert@twinsun.com>
468
469 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
470 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
471 Sparc, as they were causing more porting problems than the
472 (minor) performance improvement was worth.
473
474 Also, catch up with 1.31's YYSTD.
475
3db472b9
AD
4762001-12-27 Akim Demaille <akim@epita.fr>
477
478 * src/output.c (output_gram): Rely on nritems, not the
479 0-sentinel. See below.
480 Use -1 as separator, not 0.
481 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
482 Rely on -1 as separator in yyrhs, instead of 0.
483 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
484 twice `Now at end of input', therefore there are two lines less to
485 expect.
486
b365aa05
AD
4872001-12-27 Akim Demaille <akim@epita.fr>
488
489 * tests/regression.at (Unresolved SR Conflicts):
490 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
491 below.
492
30171f79
AD
4932001-12-27 Akim Demaille <akim@epita.fr>
494
495 * src/LR0.c (new_state): Recognize the final state by the fact it
496 is reached by eoftoken.
497 (insert_start_shifting_state, insert_eof_shifting_state)
498 (insert_accepting_state, augment_automaton): Remove, since now
499 these states are automatically computed from the initial state.
500 (generate_states): Adjust.
501 * src/print.c: When reporting a rule number to the user, substract
502 1, so that the axiom rule is rule 0, and the first user rule is 1.
503 * src/reduce.c: Likewise.
504 * src/print_graph.c (print_core): For the time being, just as for
505 the report, depend upon --trace-flags to dump the full set of
506 items.
507 * src/reader.c (readgram): Once the grammar read, insert the rule
508 0: `$axiom: START-SYMBOL $'.
509 * tests/set.at: Adjust: rule 0 is now displayed, and since the
510 number of the states has changed (the final state is no longer
511 necessarily the last), catch up.
512
75142d45
AD
5132001-12-27 Akim Demaille <akim@epita.fr>
514
515 Try to make the use of the eoftoken valid. Given that its value
516 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
517 is used instead of > 0 where appropriate, (ii), depend upon nritems
518 instead of the 0-sentinel.
519
520 * src/gram.h, src/gram.c (nritems): New.
521 Expected to be duplication of nitems, but for the time being...
522 * src/reader.c (packgram): Assert nritems and nitems are equal.
523 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
524 * src/closure.c (print_closure, print_fderives): Likewise.
525 * src/gram.c (ritem_print): Likewise.
526 * src/print.c (print_core, print_grammar): Likewise.
527 * src/print_graph.c: Likewise.
528
b7c49edf
AD
5292001-12-27 Akim Demaille <akim@epita.fr>
530
531 * src/main.c (main): If there are complains after grammar
532 reductions, then output the report anyway if requested, then die.
533 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
534 * src/reader.c (eoftoken): New.
535 (parse_token_decl): If the token being defined has value `0', it
536 is the eoftoken.
537 (packsymbols): No longer hack `tags' to insert `$' by hand.
538 Be sure to preserve the value of the eoftoken.
539 (reader): Make sure eoftoken is defined.
540 Initialize nsyms to 0: now eoftoken is created just like the others.
541 * src/print.c (print_grammar): Don't special case the eof token.
542 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
543 lie anyway, albeit pleasant.
544 * tests/calc.at: Exercise error messages with eoftoken.
545 Change the grammar so that empty input is invalid.
546 Adjust expectations.
547 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
548
ec2da99f
AD
5492001-12-27 Akim Demaille <akim@epita.fr>
550
551 * configure.in: Check the protos of strchr ans strspn.
552 Replace strchr if needed.
553 * src/system.h: Provide the protos of strchr, strspn and memchr if
554 missing.
555 * lib/strchr.c: New.
556 * src/reader.c (symbols_save): Use strchr.
557
8adfa272
AD
5582001-12-27 Akim Demaille <akim@epita.fr>
559
560 * src/print.c, src/print_graph.c (escape): New.
561 Use it to quote the TAGS outputs.
562 * src/print_graph.c (print_state): Now errors are in red, and
563 reductions in green.
564 Prefer high to wide: output the state number on a line of its own.
565
80dac38c
AD
5662001-12-27 Akim Demaille <akim@epita.fr>
567
568 * src/state.h, src/state.c (reductions_new): New.
569 * src/LR0.c (set_state_table): Let all the states have a
570 `reductions', even if reduced to 0.
571 (save_reductions): Adjust.
572 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
573 * src/print.c (print_reductions, print_actions): Adjust.
574 * src/output.c (action_row): Adjust.
575
2cec70b9
AD
5762001-12-27 Akim Demaille <akim@epita.fr>
577
578 * src/state.h, src/state.c (errs_new, errs_dup): New.
579 * src/LR0.c (set_state_table): Let all the states have an errs,
580 even if reduced to 0.
581 * src/print.c (print_errs, print_reductions): Adjust.
582 * src/output.c (output_actions, action_row): Adjust.
583 * src/conflicts.c (resolve_sr_conflict): Adjust.
584
13ca549a
AD
5852001-12-27 Akim Demaille <akim@epita.fr>
586
587 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
588
5092aba5
AD
5892001-12-27 Akim Demaille <akim@epita.fr>
590
591 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
592 * src/print.c: here.
593 (lookaheadset, shiftset): New, used as additional storage by
594 print_reductions.
595 (print_results): Adjust.
596 (print_shifts, print_gotos, print_errs): New, extracted from...
597 (print_actions): here.
598 * src/print_graph.c (print_actions): Remove dead code.
599
11e2beca
AD
6002001-12-27 Akim Demaille <akim@epita.fr>
601
602 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
603 `$n' and `@n'.
604
dac3c910
AD
6052001-12-27 Akim Demaille <akim@epita.fr>
606
607 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
608 (build_relations): Adjust.
609
d0b0fefa
AD
6102001-12-27 Akim Demaille <akim@epita.fr>
611
612 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
613 duplication.
614
adc8c848
AD
6152001-12-27 Akim Demaille <akim@epita.fr>
616
617 * src/reader.c (packgram): Catch nitems overflows.
618
14d293ac
AD
6192001-12-27 Akim Demaille <akim@epita.fr>
620
621 * src/files.c, src/files.h (guard_obstack): Remove.
622 * src/output.c (output): Adjust.
623 * src/reader.c (parse_braces): New, factoring...
624 (copy_action, copy_guard): these two which are renamed as...
625 (parse_action, parse_guard): these.
626 As a voluntary consequence, using braces around guards is now
627 mandatory.
628
f499b062
AD
6292001-12-27 Akim Demaille <akim@epita.fr>
630
631 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
632 * src/reader.c (symbol_list): `guard' and `guard_line' are new
633 members.
634 (symbol_list_new): Adjust.
635 (copy_action): action_line is the first line, not the last.
636 (copy_guard): Just as for actions, store the `action' only, not
637 the switch/case/break flesh.
638 Don't parse the user action that might follow the guard, let...
639 (readgram): do it, i.e., now, there can be an action after a
640 guard.
641 In other words the guard is just explicitly optional.
642 (packgram): Adjust.
643 * src/output.c (guards_output): New.
644 (output_parser): Call it when needed.
645 (output): Also free the guard and attrs obstacks.
646 * src/files.c, src/files.h (obstack_save): Remove.
647 (output_files): Remove.
648 As a result, if one needs the former `.act' file, using an
649 appropriate skeleton which requires actions and guards is now
650 required.
651 * src/main.c (main): Adjust.
652 * tests/semantic.at: New.
653 * tests/regression.at: Use `input.y' as input file name.
654 Avoid 8+3 problems by requiring input.c when the test needs the
655 parser.
656
d945f5cd
AD
6572001-12-27 Akim Demaille <akim@epita.fr>
658
659 * src/reader.c (symbol_list_new): Be sure to initialize all the
660 fields.
661
d200e455
AD
6622001-12-27 Akim Demaille <akim@epita.fr>
663
664 All the hacks using a final pseudo state are now useless.
665
666 * src/LR0.c (set_state_table): state_table holds exactly nstates.
667 * src/lalr.c (nLA): New.
668 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
669 instead of lookaheadsp from the pseudo state (nstate + 1).
670
f9507c28
AD
6712001-12-27 Akim Demaille <akim@epita.fr>
672
673 * src/output.c (action_row, token_actions): Use a state_t instead
674 of a integer, and nlookaheads instead of the following state's
675 lookaheadsp.
676
065fbd27
AD
6772001-12-27 Akim Demaille <akim@epita.fr>
678
679 * src/conflicts.c (log_resolution, flush_shift)
680 (resolve_sr_conflict, set_conflicts, solve_conflicts)
681 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
682 (conflicts_print, print_reductions): Use a state_t instead of an
683 integer when referring to a state.
684 As much as possible, depend upon nlookaheads, instead of the
685 `lookaheadsp' member of the following state (since lookaheads of
686 successive states are successive, the difference between state n + 1
687 and n served as the number of lookaheads for state n).
688 * src/lalr.c (add_lookback_edge): Likewise.
689 * src/print.c (print_core, print_actions, print_state)
690 (print_results): Likewise.
691 * src/print_graph.c (print_core, print_actions, print_state)
692 (print_graph): Likewise.
693 * src/conflicts.h: Adjust.
694
1b177bd7
AD
6952001-12-27 Akim Demaille <akim@epita.fr>
696
697 * src/bison.hairy: Formatting/comment changes.
698 ANSIfy.
699 Remove `register' indications.
700 Add plenty of `static'.
701
7742ddeb
AD
7022001-12-27 Akim Demaille <akim@epita.fr>
703
704 * src/output.c (prepare): Drop the muscle `ntbase' which
705 duplicates ntokens.
706 * src/bison.simple: Formatting/comment changes.
707 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
708 is an undocumented synonym.
709
1fa14068
AD
7102001-12-22 Akim Demaille <akim@epita.fr>
711
712 * src/output.c (output_table_data): Change the prototype to use
713 `int' for array ranges: some invocations do pass an int, not a
714 short.
715 Reported by Wayne Green.
716
b9752825
AD
7172001-12-22 Akim Demaille <akim@epita.fr>
718
719 Some actions of web2c.y are improperly triggered.
720 Reported by Mike Castle.
721
722 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
723 * tests/regression.at (Web2c): Rename as...
724 (Web2c Report): this.
725 (Web2c Actions): New.
726
776209d6
AD
7272001-12-22 Akim Demaille <akim@epita.fr>
728
729 Reductions in web2c.y are improperly reported.
730 Reported by Mike Castle.
731
732 * src/conflicts.c (print_reductions): Fix.
733 * tests/regression.at (Web2c): New.
734
275fc3ad
AD
7352001-12-18 Akim Demaille <akim@epita.fr>
736
737 Some host fail on `assert (!"foo")', which expands to
738 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
739 Reported by Nelson Beebee.
740
741 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
742 `#define it_succeeded 0' and `assert (it_succeeded)'.
743
897668ee
MA
7442001-12-17 Marc Autret <autret_m@epita.fr>
745
746 * src/bison.simple: Don't hard code the skeleton line and filename.
747 * src/output.c (output_parser): Rename 'line' as 'output_line'.
748 New line counter 'skeleton_line' (skeleton-line muscle).
749
ab3399e0
PE
7502001-12-17 Paul Eggert <eggert@twinsun.com>
751
752 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
753 YYDEBUG must be defined to a nonzero value.
754
755 * src/bison.simple (yytname): Do not assume that the user defines
756 YYDEBUG to a properly parenthesized expression.
757
3877f72b
AD
7582001-12-17 Akim Demaille <akim@epita.fr>
759
760 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
761 nlookaheads is a new member.
762 Adjust all users.
763 * src/lalr.h (nlookaheads): Remove this orphan declaration.
764 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
765 state.
776209d6 766
331dbc1b
AD
7672001-12-17 Akim Demaille <akim@epita.fr>
768
769 * src/files.h, src/files.c (open_files, close_files): Remove.
770 * src/main.c (main): Don't open/close files, nor invoke lex_free,
771 let...
772 * src/reader.c (reader): Do it.
776209d6 773
be750e4c
AD
7742001-12-17 Akim Demaille <akim@epita.fr>
775
776 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 777
709ae8c6
AD
7782001-12-17 Akim Demaille <akim@epita.fr>
779
780 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
781 (flush_reduce): New.
782 (resolve_sr_conflict): Adjust.
776209d6 783
f87685c3
AD
7842001-12-17 Akim Demaille <akim@epita.fr>
785
786 * src/output.c (output_obstack): Be static and rename as...
787 (format_obstack): this, to avoid any confusion with files.c's
788 output_obstack.
789 * src/reader.h (muscle_obstack): Move to...
790 * src/output.h: here, since it's defined in output.c.
791
837491d8
AD
7922001-12-17 Akim Demaille <akim@epita.fr>
793
794 * src/output.c (action_row, save_column, default_goto)
795 (sort_actions, matching_state, pack_vector): Better variable
796 locality.
797
796d61fb
AD
7982001-12-17 Akim Demaille <akim@epita.fr>
799
800 * src/output.c: Various formatting changes.
776209d6 801
64d15509
AD
8022001-12-17 Akim Demaille <akim@epita.fr>
803
804 * src/files.c (output_files): Free the output_obstack.
805 * src/main.c (main): Call print and print_graph conditionally.
806 * src/print.c (print): Work unconditionally.
807 * src/print_graph.c (print_graph): Work unconditionally.
808 * src/conflicts.c (log_resolution): Output only if verbose_flag.
809
fbc8ecb7
MA
8102001-12-16 Marc Autret <autret_m@epita.fr>
811
812 * src/output.c (actions_output): Fix. When we use %no-lines,
813 there is one less line per action.
814
f0440388
MA
8152001-12-16 Marc Autret <autret_m@epita.fr>
816
817 * src/bison.simple: Remove a useless #line directive.
818 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
819 * src/output.c (get_lines_number): New.
776209d6 820 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
821 output muscles.
822 Fix line numbering.
823 (actions_output): Computes the number of lines taken by actions.
824 (output_master_parser): Insert new skeleton which is the name of
825 the output parser file name.
826
a79986b8
MA
8272001-12-15 Marc Autret <autret_m@epita.fr>
828
829 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
830
4ec8e00f
MA
8312001-12-15 Marc Autret <autret_m@epita.fr>
832
833 * src/output.c (output_gram): Keep track of the hairy one.
834
1a4648ff
AD
8352001-12-15 Akim Demaille <akim@epita.fr>
836
837 Make `make distcheck' work.
838
839 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
840 system.h which uses libgettext.h.
841
9c2c67e6
AD
8422001-12-15 Akim Demaille <akim@epita.fr>
843
844 * src/nullable.c (set_nullable): Useless rules must be skipped,
845 otherwise, since we range over their symbols, we might look at a
846 nonterminal which no longer ``exists'', i.e., it is not counted in
847 `nvars', hence we overflow our arrays.
848
93ede233
AD
8492001-12-15 Akim Demaille <akim@epita.fr>
850
851 The header can also be produced directly, without any obstack!
852 Yahoo!
853
854 * src/files.c, src/files.h (defines_obstack): Remove.
855 (compute_header_macro): Global.
856 (defines_obstack_save): Remove.
857 * src/reader.c (parse_union_decl): No longer output to
858 defines_obstack: its content can be found in the `stype' muscle
859 anyway.
860 (output_token_translations): Merge into...
861 (symbols_output): this.
862 Rename as...
863 (symbols_save): this.
864 (reader): Adjust.
865 * src/output.c (header_output): New.
866 (output): Call it.
867
2666f928
AD
8682001-12-15 Akim Demaille <akim@epita.fr>
869
870 * src/reader.c (parse_union_decl): Instead of handling two obstack
871 simultaneously, use one to define the `stype' muscle, and use the
872 value of the latter to fill defines_obstack.
873 (copy_comment): Remove.
874 (copy_comment2): Work for a single obstack.
875 Rename as...
876 (copy_comment): this.
877
428046f8
AD
8782001-12-15 Akim Demaille <akim@epita.fr>
879
880 * src/lex.c, src/lex.h (xgetc): No longer static.
881 * src/reader.c (parse_union_decl): Revamp.
882
ea52d706
AD
8832001-12-15 Akim Demaille <akim@epita.fr>
884
885 Still making progress in separating Bison into (i) input, (ii)
886 process, (iii) output: now we can directly output the parser file
887 without using table_obstack at all.
888
889 * src/files.c, src/files.h (table_obstack): Bye bye.
890 (parser_file_name): New.
891 * src/files.c (compute_output_file_names): Compute it.
892 * src/output.c (actions_output, output_parser)
893 (output_master_parser): To a file instead of an obstack.
894
3f96f4dc
AD
8952001-12-15 Akim Demaille <akim@epita.fr>
896
897 Attach actions to rules, instead of pre-outputting them to
898 actions_obstack.
899
900 * src/gram.h (rule_t): action and action_line are new members.
901 * src/reader.c (symbol_list): Likewise.
902 (copy_action): Save the actions within the rule.
903 (packgram): Save them in rule_table.
904 * src/output.c (actions_output): New.
905 (output_parser): Use it on `%%actions'.
906 (output_rule_data): Don't free rule_table.
907 (output): Do it.
908 (prepare): Don't save the `action' muscle.
909 * src/bison.simple: s/%%action/%%actions/.
910
51576fb3
AD
9112001-12-15 Akim Demaille <akim@epita.fr>
912
913 * src/reader.c (copy_action): When --yacc, don't append a `;'
914 to the user action: let it fail if lacking.
dee049eb 915 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 916
2648a72d
AD
9172001-12-14 Akim Demaille <akim@epita.fr>
918
919 * src/lex.c (literalchar): Simply return the char you decoded, non
920 longer mess around with obstacks and int pointers.
921 Adjust all callers.
922
92790e5b
AD
9232001-12-14 Akim Demaille <akim@epita.fr>
924
925 * src/lex.c (literalchar): Don't escape the special characters,
926 just decode them, and keep them as char (before, eol was output as
927 the 2 char string `\n' etc.).
928 * src/output.c (output_rule_data): Use quotearg to output the
929 token strings.
930
927c1557
PE
9312001-12-13 Paul Eggert <eggert@twinsun.com>
932
933 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
934 Do not infringe on the global user namespace when using C++.
935 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
936 All uses of `fprintf' and `stderr' changed.
937
938 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
939
ed8e1f68
AD
9402001-12-13 Akim Demaille <akim@epita.fr>
941
942 The computation of nullable is broken: it doesn't handle empty
943 RHS's properly.
944
945 * tests/torture.at (GNU AWK Grammar): New.
946 * tests/sets.at (Nullable): New.
947 * src/nullable.c (set_nullable): Instead of blindly looping over
948 `ritems', loop over the rules, and then over their rhs's.
949
950 Work around Autotest bugs.
951
952 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
953 frame, because Autotest understand lines starting with a `+' as
954 traces from the shell. Then, they are not processed properly.
955 Admittedly an Autotest bug, but we don't have time to wait for
956 Autotest to catch up.
957 * tests/regression.at (Broken Closure): Adjust to the new table
958 frames.
959 Move to...
960 * tests/sets.at: here.
961
cb581495
AD
9622001-12-13 Akim Demaille <akim@epita.fr>
963
964 * src/closure.c (closure): Use nrules instead of playing tricks
965 with BITS_PER_WORD.
966
2e729273
AD
9672001-12-13 Akim Demaille <akim@epita.fr>
968
969 * src/print.c (print_actions): Output the handling of `$' as the
970 traces do: shifting the token EOF. Before EOF was treated as a
971 nonterminal.
972 * tests/regression.at: Adjust some tests.
973 * src/print_graph.c (print_core): Complete the set of items via
974 closure. The next-to-final and final states are still unsatisfying,
975 but that's to be addressed elsewhere.
976 No longer output the rule numbers, but do output the state number.
977 A single loop for the shifts + gotos is enough, but picked a
978 distinct color for each.
979 (print_graph): Initialize and finalize closure.
980
107f7dfb
AD
9812001-12-13 Akim Demaille <akim@epita.fr>
982
983 * src/reader.c (readgram): Remove dead code, an strip useless
984 braces.
985 (get_type): Remove, unused.
986
9b53a24f
AD
9872001-12-12 Akim Demaille <akim@epita.fr>
988
989 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
990 on that of lib/error.c.
991
dbfb6dcd
AD
9922001-12-12 Akim Demaille <akim@epita.fr>
993
994 Some hosts don't like `/' in includes.
995
996 * src/system.h: Include libgettext.h without qualifying the path.
997 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
998 $(top_srcdir).
999
c25fb648
MA
10002001-12-11 Marc Autret <autret_m@epita.fr>
1001
1002 * src/output.c (output_parser): Remove useless muscle.
1003
710ddc4f
MA
10042001-12-11 Marc Autret <autret_m@epita.fr>
1005
1006 * src/bison.simple: Remove #line just before %%epilogue. It
1007 is now handled in ...
1008 * src/reader.c (read_additionnal_code): Add the output of a
1009 #line for the epilogue.
1010
e83d80b8
MA
10112001-12-10 Marc Autret <autret_m@epita.fr>
1012
927c1557 1013 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1014 replace precedent remove.
1015 * src/bison.simple: Remove #line before %%prologue because
1016 %%input-line is wrong at this time.
1017
971d5158
MA
10182001-12-10 Marc Autret <autret_m@epita.fr>
1019
1020 * src/reader.c (symbols_output): Clean up.
927c1557 1021 * src/output.c (output_gram, output): Clean up.
971d5158 1022
5edafffd
AD
10232001-12-10 Akim Demaille <akim@epita.fr>
1024
1025 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1026 * src/LR0.c (set_state_table): here.
1027 * src/lalr.c (lalr): Call it.
1028
0279f8e9
AD
10292001-12-10 Akim Demaille <akim@epita.fr>
1030
1031 * src/state.h (shifts): Remove the `number' member: shifts are
1032 attached to state, hence no longer need to be labelled with a
1033 state number.
1034
190c4f5f
AD
10352001-12-10 Akim Demaille <akim@epita.fr>
1036
1037 Now that states have a complete set of members, the linked list of
1038 shifts is useless: just fill directly the state's shifts member.
1039
1040 * src/state.h (shifts): Remove the `next' member.
1041 * src/LR0.c (first_state, last_state): Remove.
1042 Adjust the callers.
1043 (augment_automaton): Don't look for the shifts that must be added
1044 a shift on EOF: it is those of the state we looked for! But now,
1045 since shifts are attached, it is no longer needed to looking
1046 merely by its id: its number.
1047
2a73b93d
AD
10482001-12-10 Akim Demaille <akim@epita.fr>
1049
1050 * src/LR0.c (augment_automaton): Better variable locality.
1051 Remove an impossible branch: if there is a state corresponding to
1052 the start symbol being shifted, then there is shift for the start
1053 symbol from the initial state.
1054
74392f6a
AD
10552001-12-10 Akim Demaille <akim@epita.fr>
1056
1057 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1058 only when appropriate: when insert_start_shifting_state' is not
1059 invoked.
1060 * tests/regression.at (Rule Line Numbers): Adjust.
1061
37c82725
AD
10622001-12-10 Akim Demaille <akim@epita.fr>
1063
1064 * src/LR0.c (augment_automaton): Now that all states have shifts,
1065 merge the two cases addition shifts to the initial state.
1066
6a164e0c
AD
10672001-12-10 Akim Demaille <akim@epita.fr>
1068
1069 * src/lalr.c (set_state_table): Move to...
1070 * src/LR0.c: here.
1071 * src/lalr.c (lalr): Don't call it...
1072 * src/LR0.c (generate_states): do it.
1073 * src/LR0.h (first_state): Remove, only the table is used.
1074
7215de24
AD
10752001-12-10 Akim Demaille <akim@epita.fr>
1076
1077 * src/LR0.h (first_shift, first_reduction): Remove.
1078 * src/lalr.c: Don't use first_shift: find shifts through the
1079 states.
1080
80e25d4d
AD
10812001-12-10 Akim Demaille <akim@epita.fr>
1082
1083 * src/LR0.c: Attach shifts to states as soon as they are
1084 computed.
1085 * src/lalr.c (set_state_table): Instead of assigning shifts to
1086 state, just assert that the mapping was properly done.
1087
0ab3728b
AD
10882001-12-10 Akim Demaille <akim@epita.fr>
1089
1090 * src/LR0.c (insert_start_shift): Rename as...
1091 (insert_start_shifting_state): this.
1092 (insert_eof_shifting_state, insert_accepting_state): New.
1093 (augment_automaton): Adjust.
1094 Better locality of the variables.
1095 When looking if the start_symbol is shifted from the initial
1096 state, using `while (... symbol != start_symbol ...)' sounds
1097 better than `while (... symbol < start_symbol ...)': If fail
1098 to see how the order between symbols could be relevant!
1099
78af9bbc
AD
11002001-12-10 Akim Demaille <akim@epita.fr>
1101
1102 * src/getargs.h: Don't declare `spec_name_prefix' and
1103 `spec_file_prefix', declared by src/files.h.
1104 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1105 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1106 * src/output.c (prepare): Adjust.
1107 * src/reader.c (symbols_output): Likewise.
1108 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1109
bdef2a41
AD
11102001-12-10 Akim Demaille <akim@epita.fr>
1111
1112 * src/muscle_tab.c (muscle_init): NULL is a better default than
1113 `"0"'.
1114
3735969c
AD
11152001-12-10 Akim Demaille <akim@epita.fr>
1116
1117 * src/reader.c (reader): Calling symbols_output once is enough.
1118
49701457
AD
11192001-12-10 Akim Demaille <akim@epita.fr>
1120
1121 Now that states have a complete set of members, the linked list of
1122 reductions is useless: just fill directly the state's reductions
1123 member.
1124
1125 * src/state.h (struct reductions): Remove member `number' and
1126 `next'.
1127 * src/LR0.c (first_reduction, last_reduction): Remove.
1128 (save_reductions): Don't link the new reductions, store them in
1129 this_state.
1130 * src/lalr.c (set_state_table): No need to attach reductions to
1131 states, it's already done.
1132 * src/output.c (output_actions): No longer free the shifts, then
1133 the reductions, then the states: free all the states and their
1134 members.
1135
0edad749
AD
11362001-12-10 Akim Demaille <akim@epita.fr>
1137
1138 * src/options.c (OPTN, DRTV, BOTH): New.
1139 (option_table): Use them.
1140
0edad749
AD
1141 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1142 the job of system.h.
1143 * src/options.c: Don't include stdio.h and xalloc.h for the same
1144 reasons.
1145
5449dd0f
AD
11462001-12-10 Akim Demaille <akim@epita.fr>
1147
1148 * src/output.c (output, prepare): Make sure the values of the
1149 muscles `action' and `prologue' are 0-terminated.
1150
a870c567
AD
11512001-12-10 Akim Demaille <akim@epita.fr>
1152
1153 Clean up GCC warnings.
1154
1155 * src/reader.c (copy_action): `buf' is not used.
1156 (parse_skel_decl): Be static.
1157 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1158 * src/options.h (create_long_option_table): Have a real prototype.
1159 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1160 (hash_delete_at): Return const void *.
1161 Adjust casts to preserve the const.
1162
80df8768
AD
11632001-12-10 Akim Demaille <akim@epita.fr>
1164
1165 * configure.in: Require 2.52g.
1166 M4 is not needed, but AUTOM4TE is.
1167 * m4/m4.m4: Remove.
1168 * tests/Makefile.am: Adjust.
1169
f693ad14
AD
11702001-12-10 Akim Demaille <akim@epita.fr>
1171
1172 One structure for states is enough, even though theoretically
1173 there are LR(0) states and LALR(1) states.
1174
1175 * src/lalr.h (state_t): Remove.
1176 (state_table): Be state_t **, not state_t *.
1177 * src/state.h (core, CORE_ALLOC): Rename as...
1178 (state_t, STATE_ALLOC): this.
1179 Add the LALR(1) members: shifts, reductions, errs.
1180 * src/LR0.c (state_table): Rename as...
1181 (state_hash): this, to avoid name clashes with the global
1182 `state_table'.
1183 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1184 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1185
74ffbcb6
AD
11862001-12-10 Akim Demaille <akim@epita.fr>
1187
1188 Bison dumps core on bash.y.
1189 Reported by Pascal Bart.
1190
1191 * src/warshall.c (bitmatrix_print): New.
1192 (TC): Use it.
1193 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1194 j must be the outer loop.
1195 * tests/regression.at (Broken Closure): New.
1196
07708e19
AD
11972001-12-05 Akim Demaille <akim@epita.fr>
1198
1199 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1200 its argument.
1201