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