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