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