]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* data/bison.c++: Adjust the parser code. Fix some muscles that were
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-02-06 Robert Anisko <robert@lrde.epita.fr>
2
3 * data/bison.c++: Adjust the parser code. Fix some muscles that were
4 not expanded by m4.
5
62002-02-05 Akim Demaille <akim@epita.fr>
7
8 * data/bison.c++: Adjust to the M4 back end.
9 More is certainly needed.
10
112002-02-05 Akim Demaille <akim@epita.fr>
12
13 Give a try to M4 as a back end.
14
15 * lib/readpipe.c: New, from wdiff.
16 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17 BISON_HAIRY.
18 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19 specific values. Now it is m4 that performs the lookup.
20 * src/parse-skel.y: Remove.
21 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
22 * src/output.c (actions_output, guards_output)
23 (token_definitions_output): No longer keeps track of the output
24 line number, hence remove the second argument.
25 (guards_output): Check against the guard member of a rule, not the
26 action member.
27 Adjust callers.
28 (output_skeleton): Don't look for the skeleton location, let m4 do
29 that.
30 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
31 file will be used.
32 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
33 (prepare): Given that for the time being changesyntax is not
34 usable in M4, rename the muscles using `-' to `_'.
35 Define `defines_flag', `output_parser_name' and `output_header_name'.
36 * src/output.h (actions_output, guards_output)
37 (token_definitions_output): Adjust prototypes.
38 * src/scan-skel.l: Instead of scanning the skeletons, it now
39 processes the output of m4: `__oline__' and `#output'.
40 * data/bison.simple: Adjust to be used by M4(sugar).
41 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
42 to date.
43 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
44 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
45 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
46 shamelessly stolen from CVS Autoconf.
47
482002-02-05 Akim Demaille <akim@epita.fr>
49
50 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
51 * configure.in: Check for the declarations of free and malloc.
52 * src/muscle_tab.c: Adjust.
53
542002-02-05 Akim Demaille <akim@epita.fr>
55
56 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
57 which have no values.
58
592002-02-05 Akim Demaille <akim@epita.fr>
60
61 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
62 * data/: here.
63
642002-01-29 Paul Eggert <eggert@twinsun.com>
65
66 * src/bison.simple (YYSIZE_T): Do not define merely because
67 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
68 On some platforms, <alloca.h> does not declare YYSTD (size_t).
69
702002-01-27 Akim Demaille <akim@epita.fr>
71
72 Fix `%nonassoc and eof'.
73
74 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
75 which were not properly copied! Replace
76 memcpy (res->errs, src->errs, src->nerrs);
77 with
78 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
79 !!!
80 * tests/regression.at (%nonassoc and eof): Adjust to newest
81 Autotest: `.' is not in the PATH.
82
832002-01-27 Akim Demaille <akim@epita.fr>
84
85 * tests/sets.at (AT_EXTRACT_SETS): New.
86 (Nullable): Use it.
87 (Firsts): New.
88
892002-01-26 Akim Demaille <akim@epita.fr>
90
91 * tests/actions.at, tests/calc.at, tests/headers.at,
92 * tests/torture.at: Adjust to the newest Autotest which no longer
93 forces `.' in the PATH.
94
952002-01-25 Akim Demaille <akim@epita.fr>
96
97 * tests/regression.at (%nonassoc and eof): New.
98 Suggested by Robert Anisko.
99
1002002-01-24 Akim Demaille <akim@epita.fr>
101
102 Bison dumps core when trying to complain about broken input files.
103 Reported by Cris van Pelt.
104
105 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
106 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
107 into...
108 (Invalid inputs): Strengthen: exercise parse_percent_token.
109
1102002-01-24 Robert Anisko <robert.anisko@epita.fr>
111
112 * src/Makefile.am: Add bison.c++.
113 * src/bison.c++: New skeleton.
114
1152002-01-21 Paolo Bonzini <bonzini@gnu.org>
116
117 * po/it.po: New.
118
1192002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
120
121 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
122
1232002-01-20 Marc Autret <marc@gnu.org>
124
125 * src/files.c (compute_output_file_names): Fix
126
1272002-01-20 Marc Autret <marc@gnu.org>
128
129 * tests/output.at: New test.
130 * src/files.c (compute_base_names): Don't map extensions when
131 the YACC flag is set, use defaults.
132 Reported by Evgeny Stambulchik.
133
1342002-01-20 Marc Autret <marc@gnu.org>
135
136 * src/system.h: Need to define __attribute__ away for non-GCC
137 compilers as well (i.e. the vendor C compiler).
138 Suggested by Albert Chin-A-Young.
139
1402002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
141
142 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
143 canonical definition.
144 * src/system.h: Use the canonical definition for PARAMS (avoids
145 a conflict with the macro from lib/hash.h).
146
1472002-01-11 Akim Demaille <akim@epita.fr>
148
149 * configure.in: Use AC_FUNC_STRNLEN.
150 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
151
1522002-01-09 Akim Demaille <akim@epita.fr>
153
154 * src/files.c, src/files.h (output_infix): New.
155 (tab_extension): Remove.
156 (compute_base_names): Compute the former, drop the latter.
157 * src/output.c (prepare): Insert the muscles `output-infix', and
158 `output-suffix'.
159 * src/parse-skel.y (string, string.1): New.
160 (section.header): Use it.
161 (section.yacc): Remove.
162 (prefix): Remove too.
163 * src/scan-skel.l: Adjust.
164 * src/bison.simple, src/bison.hairy: Adjust.
165
1662002-01-09 Akim Demaille <akim@epita.fr>
167
168 * configure.in (WERROR_CFLAGS): Compute it.
169 * src/Makefile.am (CFLAGS): Pass it.
170 * tests/atlocal.in (CFLAGS): Idem.
171 * src/files.c: Fix a few warnings.
172 (get_extension_index): Remove, unused.
173
1742002-01-08 Akim Demaille <akim@epita.fr>
175
176 * src/getargs.c (AS_FILE_NAME): New.
177 (getargs): Use it to convert DOSish file names.
178 * src/files.c (base_name): Rename as full_base_name to avoid
179 clashes with `base_name ()'.
180 (filename_split): New.
181 (compute_base_names): N-th rewrite, using filename_split.
182
1832002-01-08 Akim Demaille <akim@epita.fr>
184
185 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
186 New, stolen from the Fileutils 4.1.
187 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
188 * configure.in: Check for the presence of memrchr, and of its
189 prototype.
190
1912002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
192
193 * lib/hash.h (__P): Added definition for this macro.
194 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
195 BUILT_SOURCES, to ensure they are generated first.
196 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
197 %error-verbose to allow bootstrapping with bison 1.30x.
198
1992002-01-06 Akim Demaille <akim@epita.fr>
200
201 * src/reader.c (parse_braces): Don't fetch the next char, the
202 convention is to fetch on entry.
203 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
204 'switch' without a following semicolon.
205 * tests/regression.at (braces parsing): New.
206
2072002-01-06 Akim Demaille <akim@epita.fr>
208
209 Bison is dead wrong in its RR conflict reports.
210
211 * tests/torture.at (GNU Cim Grammar): New.
212 * src/conflicts.c (count_rr_conflicts): Fix.
213
2142002-01-06 Akim Demaille <akim@epita.fr>
215
216 Creating package.m4 from configure.ac causes too many problems.
217
218 * tests/Makefile.am (package.m4): Create it by hand,
219 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
220
2212002-01-06 Akim Demaille <akim@epita.fr>
222
223 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
224 skeleton.h.
225
2262002-01-04 Paul Eggert <eggert@twinsun.com>
227
228 * doc/bison.texinfo (Debugging):
229 Remove YYSTDERR; it's no longer defined or used.
230 Also, s/cstdio.h/cstdio/.
231
2322002-01-03 Akim Demaille <akim@epita.fr>
233
234 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
235
2362002-01-03 Akim Demaille <akim@epita.fr>
237
238 * src/parse-skel.y (process_skeleton): Don't bind the parser's
239 tracing code to --trace, wait for a better --trace option, with
240 args.
241
2422002-01-03 Akim Demaille <akim@epita.fr>
243
244 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
245 The ISO C++ standard is extremely clear about it: stderr is
246 considered a macro, not a regular symbol (see table 94 `Header
247 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
248 Therefore std:: does not apply to it. It still does with fprintf.
249 Also, s/cstdio.h/cstdio/.
250
2512002-01-03 Akim Demaille <akim@epita.fr>
252
253 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
254 for non system headers.
255
2562002-01-02 Akim Demaille <akim@epita.fr>
257
258 Equip the skeleton chain with location tracking, runtime trace,
259 pure parser and scanner.
260
261 * src/parse-skel.y: Request a pure parser, locations, and prefix
262 renaming.
263 (%union): Having several members with the same type does not help
264 type mismatches, simplify.
265 (YYPRINT, yyprint): New.
266 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
267 (skel_error): this.
268 Handle locations.
269 * src/scan-skel.l: Adjust to these changes.
270 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
271 (LOCATION_PRINT, skel_control_t): New.
272
2732001-12-30 Akim Demaille <akim@epita.fr>
274
275 * src/parse-skel.y: Get rid of the shift/reduce conflict:
276 replace `gb' with BLANKS.
277 * src/scan-skel.l: Adjust.
278
2792001-12-30 Akim Demaille <akim@epita.fr>
280
281 * src/system.h: We don't need nor want bcopy.
282 Throw away MS-DOS crap: we don't need getpid.
283 * configure.in: We don't need strndup. It was even causing
284 problems: because Flex includes the headers *before* us,
285 _GNU_SOURCE is not defined by config.h, and therefore strndup was
286 not visible.
287 * lib/xstrndup.c: New.
288 * src/scan-skel.l: Use it.
289 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
290 * src/parse-skel.y: Use %directives instead of #defines.
291
2922001-12-30 Akim Demaille <akim@epita.fr>
293
294 * src/skeleton.h: New.
295 * src/output.c (output_parser, output_master_parser): Remove, dead
296 code.
297 * src/output.h (get_lines_number, actions_output, guards_output)
298 (token_definitions_output): Prototype them.
299 * src/parse-skel.y: Add the license notice.
300 Include output.h and skeleton.h.
301 (process_skeleton): Returns void, and takes a single parameter.
302 * src/scan-skel.l: Add the license notice.
303 Include skeleton.h.
304 Don't use %option yylineno: it seems that then Flex imagines
305 REJECT has been used, and therefore it won't reallocate its
306 buffers (which makes no other sense to me than a bug). It results
307 in warnings for `unused: yy_flex_realloc'.
308
3092001-12-30 Robert Anisko <robert.anisko@epita.fr>
310
311 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
312 (MUSCLE_INSERT_PREFIX): ...to there.
313 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
314 (MUSCLE_INSERT_PREFIX): Move from here...
315
316 * src/bison.hairy: Add a section directive. Put braces around muscle
317 names. This parser skeleton is still broken, but Bison should not
318 choke on a bad muscle 'syntax'.
319 * src/bison.simple: Add a section directive. Put braces around muscle
320 names.
321
322 * src/files.h (strsuffix, stringappend): Add declarations.
323 (tab_extension): Add declaration.
324 (short_base_name): Add declaration.
325
326 * src/files.c (strsuffix, stringappend): No longer static. These
327 functions are used in the skeleton parser.
328 (tab_extension): New.
329 (compute_base_names): Use the computations done in this function
330 to guess if the generated parsers should have '.tab' in their
331 names.
332 (short_base_name): No longer static.
333
334 * src/output.c (output_skeleton): New.
335 (output): Disable call to output_master_parser, and give a try to
336 a new skeleton handling system.
337 (guards_output, actions_output): No longer static.
338 (token_definitions_output, get_lines_number): No longer static.
339
340 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
341
342 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
343 parse-skel.y.
344
345 * src/parse-skel.y: New file.
346 * src/scan-skel.l: New file.
347
3482001-12-29 Akim Demaille <akim@epita.fr>
349
350 %name-prefix is broken.
351
352 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
353 Adjust all dependencies.
354 * tests/headers.at (export YYLTYPE): Strengthen this test: use
355 %name-prefix.
356
357 Renaming yylval but not yylloc is not consistent. Now we do.
358
359 * src/bison.simple: Prefix yylloc if used.
360 * doc/bison.texinfo (Decl Summary): Document that.
361
3622001-12-29 Akim Demaille <akim@epita.fr>
363
364 * doc/bison.texinfo: Promote `%long-directive' over
365 `%long_directive'.
366 Remove all references to fixed-output-files, yacc is enough.
367
3682001-12-29 Akim Demaille <akim@epita.fr>
369
370 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
371 user prologue. These are defaults.
372 * tests/actions.at (Mid-rule actions): Make sure the user can
373 define YYDEBUG and YYERROR_VERBOSE.
374
3752001-12-29 Akim Demaille <akim@epita.fr>
376
377 * src/output.c (header_output): Don't forget to export YYLTYPE and
378 yylloc.
379 * tests/headers.at (export YYLTYPE): New, make sure it does.
380 * tests/regression.at (%union and --defines, Invalid CPP headers):
381 Move to...
382 * tests/headers.at: here.
383
3842001-12-29 Akim Demaille <akim@epita.fr>
385
386 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
387
3882001-12-29 Akim Demaille <akim@epita.fr>
389
390 * tests/actions.at (Mid-rule actions): Output on a single line
391 instead of several.
392
3932001-12-29 Akim Demaille <akim@epita.fr>
394
395 * doc/bison.texinfo: Formatting changes.
396
3972001-12-29 Akim Demaille <akim@epita.fr>
398
399 Don't store the token defs in a muscle, just be ready to output it
400 on command. Now possible via `symbols'. Fixes a memory leak.
401
402 * src/output.c (token_definitions_output): New.
403 (output_parser, header_output): Use it.
404 * src/reader.c (symbols_save): Remove.
405
4062001-12-29 Akim Demaille <akim@epita.fr>
407
408 * src/bison.simple: Do not provide a default for YYSTYPE and
409 YYLTYPE before the user's prologue. Otherwise it's hardly... a
410 default.
411
4122001-12-29 Akim Demaille <akim@epita.fr>
413
414 Mid-rule actions are simply... ignored!
415
416 * src/reader.c (readgram): Be sure to attach mid-rule actions to
417 the empty-rule associated to the dummy symbol, not to the host
418 rule.
419 * tests/actions.at (Mid-rule actions): New.
420
4212001-12-29 Akim Demaille <akim@epita.fr>
422
423 Memory leak.
424
425 * src/reader.c (reader): Free grammar.
426
4272001-12-29 Akim Demaille <akim@epita.fr>
428
429 Memory leak.
430
431 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
432 since it allocates it for each state, although only one is needed.
433 (allocate_storage): Do it here.
434
4352001-12-29 Akim Demaille <akim@epita.fr>
436
437 * src/options.h, src/options.c (create_long_option_table): Rename
438 as...
439 (long_option_table_new): this, with a clearer prototype.
440 (percent_table): Remove, unused,
441 * src/getargs.c (getargs): Adjust.
442
4432001-12-29 Akim Demaille <akim@epita.fr>
444
445 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
446 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
447 as states.
448
4492001-12-29 Akim Demaille <akim@epita.fr>
450
451 * src/lalr.c (build_relations): Rename `states' as `states1'.
452 Sorry, I don't understand exactly what it is, no better name...
453
4542001-12-29 Akim Demaille <akim@epita.fr>
455
456 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
457 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
458 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
459 as rules.
460
4612001-12-29 Akim Demaille <akim@epita.fr>
462
463 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
464 ago.
465
4662001-12-29 Akim Demaille <akim@epita.fr>
467
468 * src/reader.c, src/reader.h (user_toknums): Remove.
469 Adjust all users to use symbols[i]->user_token_number.
470
4712001-12-29 Akim Demaille <akim@epita.fr>
472
473 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
474 Adjust all users to use symbols[i]->prec or ->assoc.
475
4762001-12-29 Akim Demaille <akim@epita.fr>
477
478 * src/reader.c, src/reader.h (tags): Remove.
479 Adjust all users to use symbols[i]->tag.
480
4812001-12-29 Akim Demaille <akim@epita.fr>
482
483 * src/gram.h, src/gram.c (symbols): New, similar to state_table
484 and rule_table.
485 * src/reader.c (packsymbols): Fill this table.
486 Drop sprec.
487 * src/conflicts.c (resolve_sr_conflict): Adjust.
488 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
489 single table.
490 Use symbols[i]->tag instead of tags[i].
491
4922001-12-29 Akim Demaille <akim@epita.fr>
493
494 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
495 In addition, put a comment in there, to replace...
496 * tests/regression.at (%union and C comments): Remove.
497
4982001-12-29 Akim Demaille <akim@epita.fr>
499
500 * tests/regression.at (Web2c Actions): Blindly move the actual
501 output as expected output. The contents *seem* right to me, but I
502 can't pretend reading perfectly parser tables... Nonetheless, all
503 the other tests pass correctly, the table look OK, even though the
504 presence of `$axiom' is to be noted: AFAICS it is useless (but
505 harmless).
506
5072001-12-29 Akim Demaille <akim@epita.fr>
508
509 * src/reader.c (readgram): Don't add the rule 0 if there were no
510 rules read. In other words, add it _after_ having performed
511 grammar sanity checks.
512 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
513
5142001-12-29 Akim Demaille <akim@epita.fr>
515
516 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
517 visible, and some states have now a different number.
518
5192001-12-29 Akim Demaille <akim@epita.fr>
520
521 * src/reader.c (readgram): Bind the initial rule's lineno to that
522 of the first rule.
523 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
524 (Solved SR Conflicts): Adjust rule 0's line number.
525
5262001-12-29 Akim Demaille <akim@epita.fr>
527
528 Fix the `GAWK Grammar' failure.
529
530 * src/LR0.c (final_state): Initialize to -1 so that we do compute
531 the reductions of the first state which was mistakenly confused
532 with the final state because precisely final_state was initialized
533 to 0.
534 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
535 now noticed by Bison.
536 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
537 have a reduction on $default.
538
5392001-12-29 Akim Demaille <akim@epita.fr>
540
541 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
542 rule line numbers.
543 * src/closure.c (print_closure): Likewise.
544 * src/derives.c (print_derives): Likewise.
545 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
546 now.
547
5482001-12-29 Akim Demaille <akim@epita.fr>
549
550 * src/lalr.c (lookaheads_print): New.
551 (lalr): Call it when --trace-flag.
552 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
553 are dumped.
554
5552001-12-29 Akim Demaille <akim@epita.fr>
556
557 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
558 when walking through ritem, even via rule->rhs.
559 * src/reduce.c (dump_grammar, useful_production, reduce_output)
560 (useful_production, useless_nonterminals): Likewise.
561 (reduce_grammar_tables): Likewise, plus update nritems.
562 * src/nullable.c (set_nullable): Likewise.
563 * src/lalr.c (build_relations): Likewise.
564 * tests/sets.at (Nullable): Adjust.
565 Fortunately, now, the $axiom is no longer nullable.
566
5672001-12-29 Akim Demaille <akim@epita.fr>
568
569 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
570 the 0-sentinel.
571 * src/gram.c (ritem_longest_rhs): Likewise.
572 * src/reduce.c (nonterminals_reduce): Likewise.
573 * src/print_graph.c (print_graph): Likewise.
574 * src/output.c (output_rule_data): Likewise.
575 * src/nullable.c (set_nullable): Likewise.
576
5772001-12-29 Akim Demaille <akim@epita.fr>
578
579 * src/output.c: Comment changes.
580
5812001-12-27 Paul Eggert <eggert@twinsun.com>
582
583 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
584 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
585 Sparc, as they were causing more porting problems than the
586 (minor) performance improvement was worth.
587
588 Also, catch up with 1.31's YYSTD.
589
5902001-12-27 Akim Demaille <akim@epita.fr>
591
592 * src/output.c (output_gram): Rely on nritems, not the
593 0-sentinel. See below.
594 Use -1 as separator, not 0.
595 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
596 Rely on -1 as separator in yyrhs, instead of 0.
597 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
598 twice `Now at end of input', therefore there are two lines less to
599 expect.
600
6012001-12-27 Akim Demaille <akim@epita.fr>
602
603 * tests/regression.at (Unresolved SR Conflicts):
604 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
605 below.
606
6072001-12-27 Akim Demaille <akim@epita.fr>
608
609 * src/LR0.c (new_state): Recognize the final state by the fact it
610 is reached by eoftoken.
611 (insert_start_shifting_state, insert_eof_shifting_state)
612 (insert_accepting_state, augment_automaton): Remove, since now
613 these states are automatically computed from the initial state.
614 (generate_states): Adjust.
615 * src/print.c: When reporting a rule number to the user, substract
616 1, so that the axiom rule is rule 0, and the first user rule is 1.
617 * src/reduce.c: Likewise.
618 * src/print_graph.c (print_core): For the time being, just as for
619 the report, depend upon --trace-flags to dump the full set of
620 items.
621 * src/reader.c (readgram): Once the grammar read, insert the rule
622 0: `$axiom: START-SYMBOL $'.
623 * tests/set.at: Adjust: rule 0 is now displayed, and since the
624 number of the states has changed (the final state is no longer
625 necessarily the last), catch up.
626
6272001-12-27 Akim Demaille <akim@epita.fr>
628
629 Try to make the use of the eoftoken valid. Given that its value
630 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
631 is used instead of > 0 where appropriate, (ii), depend upon nritems
632 instead of the 0-sentinel.
633
634 * src/gram.h, src/gram.c (nritems): New.
635 Expected to be duplication of nitems, but for the time being...
636 * src/reader.c (packgram): Assert nritems and nitems are equal.
637 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
638 * src/closure.c (print_closure, print_fderives): Likewise.
639 * src/gram.c (ritem_print): Likewise.
640 * src/print.c (print_core, print_grammar): Likewise.
641 * src/print_graph.c: Likewise.
642
6432001-12-27 Akim Demaille <akim@epita.fr>
644
645 * src/main.c (main): If there are complains after grammar
646 reductions, then output the report anyway if requested, then die.
647 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
648 * src/reader.c (eoftoken): New.
649 (parse_token_decl): If the token being defined has value `0', it
650 is the eoftoken.
651 (packsymbols): No longer hack `tags' to insert `$' by hand.
652 Be sure to preserve the value of the eoftoken.
653 (reader): Make sure eoftoken is defined.
654 Initialize nsyms to 0: now eoftoken is created just like the others.
655 * src/print.c (print_grammar): Don't special case the eof token.
656 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
657 lie anyway, albeit pleasant.
658 * tests/calc.at: Exercise error messages with eoftoken.
659 Change the grammar so that empty input is invalid.
660 Adjust expectations.
661 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
662
6632001-12-27 Akim Demaille <akim@epita.fr>
664
665 * configure.in: Check the protos of strchr ans strspn.
666 Replace strchr if needed.
667 * src/system.h: Provide the protos of strchr, strspn and memchr if
668 missing.
669 * lib/strchr.c: New.
670 * src/reader.c (symbols_save): Use strchr.
671
6722001-12-27 Akim Demaille <akim@epita.fr>
673
674 * src/print.c, src/print_graph.c (escape): New.
675 Use it to quote the TAGS outputs.
676 * src/print_graph.c (print_state): Now errors are in red, and
677 reductions in green.
678 Prefer high to wide: output the state number on a line of its own.
679
6802001-12-27 Akim Demaille <akim@epita.fr>
681
682 * src/state.h, src/state.c (reductions_new): New.
683 * src/LR0.c (set_state_table): Let all the states have a
684 `reductions', even if reduced to 0.
685 (save_reductions): Adjust.
686 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
687 * src/print.c (print_reductions, print_actions): Adjust.
688 * src/output.c (action_row): Adjust.
689
6902001-12-27 Akim Demaille <akim@epita.fr>
691
692 * src/state.h, src/state.c (errs_new, errs_dup): New.
693 * src/LR0.c (set_state_table): Let all the states have an errs,
694 even if reduced to 0.
695 * src/print.c (print_errs, print_reductions): Adjust.
696 * src/output.c (output_actions, action_row): Adjust.
697 * src/conflicts.c (resolve_sr_conflict): Adjust.
698
6992001-12-27 Akim Demaille <akim@epita.fr>
700
701 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
702
7032001-12-27 Akim Demaille <akim@epita.fr>
704
705 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
706 * src/print.c: here.
707 (lookaheadset, shiftset): New, used as additional storage by
708 print_reductions.
709 (print_results): Adjust.
710 (print_shifts, print_gotos, print_errs): New, extracted from...
711 (print_actions): here.
712 * src/print_graph.c (print_actions): Remove dead code.
713
7142001-12-27 Akim Demaille <akim@epita.fr>
715
716 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
717 `$n' and `@n'.
718
7192001-12-27 Akim Demaille <akim@epita.fr>
720
721 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
722 (build_relations): Adjust.
723
7242001-12-27 Akim Demaille <akim@epita.fr>
725
726 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
727 duplication.
728
7292001-12-27 Akim Demaille <akim@epita.fr>
730
731 * src/reader.c (packgram): Catch nitems overflows.
732
7332001-12-27 Akim Demaille <akim@epita.fr>
734
735 * src/files.c, src/files.h (guard_obstack): Remove.
736 * src/output.c (output): Adjust.
737 * src/reader.c (parse_braces): New, factoring...
738 (copy_action, copy_guard): these two which are renamed as...
739 (parse_action, parse_guard): these.
740 As a voluntary consequence, using braces around guards is now
741 mandatory.
742
7432001-12-27 Akim Demaille <akim@epita.fr>
744
745 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
746 * src/reader.c (symbol_list): `guard' and `guard_line' are new
747 members.
748 (symbol_list_new): Adjust.
749 (copy_action): action_line is the first line, not the last.
750 (copy_guard): Just as for actions, store the `action' only, not
751 the switch/case/break flesh.
752 Don't parse the user action that might follow the guard, let...
753 (readgram): do it, i.e., now, there can be an action after a
754 guard.
755 In other words the guard is just explicitly optional.
756 (packgram): Adjust.
757 * src/output.c (guards_output): New.
758 (output_parser): Call it when needed.
759 (output): Also free the guard and attrs obstacks.
760 * src/files.c, src/files.h (obstack_save): Remove.
761 (output_files): Remove.
762 As a result, if one needs the former `.act' file, using an
763 appropriate skeleton which requires actions and guards is now
764 required.
765 * src/main.c (main): Adjust.
766 * tests/semantic.at: New.
767 * tests/regression.at: Use `input.y' as input file name.
768 Avoid 8+3 problems by requiring input.c when the test needs the
769 parser.
770
7712001-12-27 Akim Demaille <akim@epita.fr>
772
773 * src/reader.c (symbol_list_new): Be sure to initialize all the
774 fields.
775
7762001-12-27 Akim Demaille <akim@epita.fr>
777
778 All the hacks using a final pseudo state are now useless.
779
780 * src/LR0.c (set_state_table): state_table holds exactly nstates.
781 * src/lalr.c (nLA): New.
782 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
783 instead of lookaheadsp from the pseudo state (nstate + 1).
784
7852001-12-27 Akim Demaille <akim@epita.fr>
786
787 * src/output.c (action_row, token_actions): Use a state_t instead
788 of a integer, and nlookaheads instead of the following state's
789 lookaheadsp.
790
7912001-12-27 Akim Demaille <akim@epita.fr>
792
793 * src/conflicts.c (log_resolution, flush_shift)
794 (resolve_sr_conflict, set_conflicts, solve_conflicts)
795 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
796 (conflicts_print, print_reductions): Use a state_t instead of an
797 integer when referring to a state.
798 As much as possible, depend upon nlookaheads, instead of the
799 `lookaheadsp' member of the following state (since lookaheads of
800 successive states are successive, the difference between state n + 1
801 and n served as the number of lookaheads for state n).
802 * src/lalr.c (add_lookback_edge): Likewise.
803 * src/print.c (print_core, print_actions, print_state)
804 (print_results): Likewise.
805 * src/print_graph.c (print_core, print_actions, print_state)
806 (print_graph): Likewise.
807 * src/conflicts.h: Adjust.
808
8092001-12-27 Akim Demaille <akim@epita.fr>
810
811 * src/bison.hairy: Formatting/comment changes.
812 ANSIfy.
813 Remove `register' indications.
814 Add plenty of `static'.
815
8162001-12-27 Akim Demaille <akim@epita.fr>
817
818 * src/output.c (prepare): Drop the muscle `ntbase' which
819 duplicates ntokens.
820 * src/bison.simple: Formatting/comment changes.
821 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
822 is an undocumented synonym.
823
8242001-12-22 Akim Demaille <akim@epita.fr>
825
826 * src/output.c (output_table_data): Change the prototype to use
827 `int' for array ranges: some invocations do pass an int, not a
828 short.
829 Reported by Wayne Green.
830
8312001-12-22 Akim Demaille <akim@epita.fr>
832
833 Some actions of web2c.y are improperly triggered.
834 Reported by Mike Castle.
835
836 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
837 * tests/regression.at (Web2c): Rename as...
838 (Web2c Report): this.
839 (Web2c Actions): New.
840
8412001-12-22 Akim Demaille <akim@epita.fr>
842
843 Reductions in web2c.y are improperly reported.
844 Reported by Mike Castle.
845
846 * src/conflicts.c (print_reductions): Fix.
847 * tests/regression.at (Web2c): New.
848
8492001-12-18 Akim Demaille <akim@epita.fr>
850
851 Some host fail on `assert (!"foo")', which expands to
852 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
853 Reported by Nelson Beebee.
854
855 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
856 `#define it_succeeded 0' and `assert (it_succeeded)'.
857
8582001-12-17 Marc Autret <autret_m@epita.fr>
859
860 * src/bison.simple: Don't hard code the skeleton line and filename.
861 * src/output.c (output_parser): Rename 'line' as 'output_line'.
862 New line counter 'skeleton_line' (skeleton-line muscle).
863
8642001-12-17 Paul Eggert <eggert@twinsun.com>
865
866 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
867 YYDEBUG must be defined to a nonzero value.
868
869 * src/bison.simple (yytname): Do not assume that the user defines
870 YYDEBUG to a properly parenthesized expression.
871
8722001-12-17 Akim Demaille <akim@epita.fr>
873
874 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
875 nlookaheads is a new member.
876 Adjust all users.
877 * src/lalr.h (nlookaheads): Remove this orphan declaration.
878 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
879 state.
880
8812001-12-17 Akim Demaille <akim@epita.fr>
882
883 * src/files.h, src/files.c (open_files, close_files): Remove.
884 * src/main.c (main): Don't open/close files, nor invoke lex_free,
885 let...
886 * src/reader.c (reader): Do it.
887
8882001-12-17 Akim Demaille <akim@epita.fr>
889
890 * src/conflicts.c (print_reductions): Formatting changes.
891
8922001-12-17 Akim Demaille <akim@epita.fr>
893
894 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
895 (flush_reduce): New.
896 (resolve_sr_conflict): Adjust.
897
8982001-12-17 Akim Demaille <akim@epita.fr>
899
900 * src/output.c (output_obstack): Be static and rename as...
901 (format_obstack): this, to avoid any confusion with files.c's
902 output_obstack.
903 * src/reader.h (muscle_obstack): Move to...
904 * src/output.h: here, since it's defined in output.c.
905
9062001-12-17 Akim Demaille <akim@epita.fr>
907
908 * src/output.c (action_row, save_column, default_goto)
909 (sort_actions, matching_state, pack_vector): Better variable
910 locality.
911
9122001-12-17 Akim Demaille <akim@epita.fr>
913
914 * src/output.c: Various formatting changes.
915
9162001-12-17 Akim Demaille <akim@epita.fr>
917
918 * src/files.c (output_files): Free the output_obstack.
919 * src/main.c (main): Call print and print_graph conditionally.
920 * src/print.c (print): Work unconditionally.
921 * src/print_graph.c (print_graph): Work unconditionally.
922 * src/conflicts.c (log_resolution): Output only if verbose_flag.
923
9242001-12-16 Marc Autret <autret_m@epita.fr>
925
926 * src/output.c (actions_output): Fix. When we use %no-lines,
927 there is one less line per action.
928
9292001-12-16 Marc Autret <autret_m@epita.fr>
930
931 * src/bison.simple: Remove a useless #line directive.
932 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
933 * src/output.c (get_lines_number): New.
934 (output_parser): Adjust, now takes care about the lines of a
935 output muscles.
936 Fix line numbering.
937 (actions_output): Computes the number of lines taken by actions.
938 (output_master_parser): Insert new skeleton which is the name of
939 the output parser file name.
940
9412001-12-15 Marc Autret <autret_m@epita.fr>
942
943 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
944
9452001-12-15 Marc Autret <autret_m@epita.fr>
946
947 * src/output.c (output_gram): Keep track of the hairy one.
948
9492001-12-15 Akim Demaille <akim@epita.fr>
950
951 Make `make distcheck' work.
952
953 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
954 system.h which uses libgettext.h.
955
9562001-12-15 Akim Demaille <akim@epita.fr>
957
958 * src/nullable.c (set_nullable): Useless rules must be skipped,
959 otherwise, since we range over their symbols, we might look at a
960 nonterminal which no longer ``exists'', i.e., it is not counted in
961 `nvars', hence we overflow our arrays.
962
9632001-12-15 Akim Demaille <akim@epita.fr>
964
965 The header can also be produced directly, without any obstack!
966 Yahoo!
967
968 * src/files.c, src/files.h (defines_obstack): Remove.
969 (compute_header_macro): Global.
970 (defines_obstack_save): Remove.
971 * src/reader.c (parse_union_decl): No longer output to
972 defines_obstack: its content can be found in the `stype' muscle
973 anyway.
974 (output_token_translations): Merge into...
975 (symbols_output): this.
976 Rename as...
977 (symbols_save): this.
978 (reader): Adjust.
979 * src/output.c (header_output): New.
980 (output): Call it.
981
9822001-12-15 Akim Demaille <akim@epita.fr>
983
984 * src/reader.c (parse_union_decl): Instead of handling two obstack
985 simultaneously, use one to define the `stype' muscle, and use the
986 value of the latter to fill defines_obstack.
987 (copy_comment): Remove.
988 (copy_comment2): Work for a single obstack.
989 Rename as...
990 (copy_comment): this.
991
9922001-12-15 Akim Demaille <akim@epita.fr>
993
994 * src/lex.c, src/lex.h (xgetc): No longer static.
995 * src/reader.c (parse_union_decl): Revamp.
996
9972001-12-15 Akim Demaille <akim@epita.fr>
998
999 Still making progress in separating Bison into (i) input, (ii)
1000 process, (iii) output: now we can directly output the parser file
1001 without using table_obstack at all.
1002
1003 * src/files.c, src/files.h (table_obstack): Bye bye.
1004 (parser_file_name): New.
1005 * src/files.c (compute_output_file_names): Compute it.
1006 * src/output.c (actions_output, output_parser)
1007 (output_master_parser): To a file instead of an obstack.
1008
10092001-12-15 Akim Demaille <akim@epita.fr>
1010
1011 Attach actions to rules, instead of pre-outputting them to
1012 actions_obstack.
1013
1014 * src/gram.h (rule_t): action and action_line are new members.
1015 * src/reader.c (symbol_list): Likewise.
1016 (copy_action): Save the actions within the rule.
1017 (packgram): Save them in rule_table.
1018 * src/output.c (actions_output): New.
1019 (output_parser): Use it on `%%actions'.
1020 (output_rule_data): Don't free rule_table.
1021 (output): Do it.
1022 (prepare): Don't save the `action' muscle.
1023 * src/bison.simple: s/%%action/%%actions/.
1024
10252001-12-15 Akim Demaille <akim@epita.fr>
1026
1027 * src/reader.c (copy_action): When --yacc, don't append a `;'
1028 to the user action: let it fail if lacking.
1029 Suggested by Arnold Robbins and Tom Tromey.
1030
10312001-12-14 Akim Demaille <akim@epita.fr>
1032
1033 * src/lex.c (literalchar): Simply return the char you decoded, non
1034 longer mess around with obstacks and int pointers.
1035 Adjust all callers.
1036
10372001-12-14 Akim Demaille <akim@epita.fr>
1038
1039 * src/lex.c (literalchar): Don't escape the special characters,
1040 just decode them, and keep them as char (before, eol was output as
1041 the 2 char string `\n' etc.).
1042 * src/output.c (output_rule_data): Use quotearg to output the
1043 token strings.
1044
10452001-12-13 Paul Eggert <eggert@twinsun.com>
1046
1047 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1048 Do not infringe on the global user namespace when using C++.
1049 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1050 All uses of `fprintf' and `stderr' changed.
1051
1052 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1053
10542001-12-13 Akim Demaille <akim@epita.fr>
1055
1056 The computation of nullable is broken: it doesn't handle empty
1057 RHS's properly.
1058
1059 * tests/torture.at (GNU AWK Grammar): New.
1060 * tests/sets.at (Nullable): New.
1061 * src/nullable.c (set_nullable): Instead of blindly looping over
1062 `ritems', loop over the rules, and then over their rhs's.
1063
1064 Work around Autotest bugs.
1065
1066 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1067 frame, because Autotest understand lines starting with a `+' as
1068 traces from the shell. Then, they are not processed properly.
1069 Admittedly an Autotest bug, but we don't have time to wait for
1070 Autotest to catch up.
1071 * tests/regression.at (Broken Closure): Adjust to the new table
1072 frames.
1073 Move to...
1074 * tests/sets.at: here.
1075
10762001-12-13 Akim Demaille <akim@epita.fr>
1077
1078 * src/closure.c (closure): Use nrules instead of playing tricks
1079 with BITS_PER_WORD.
1080
10812001-12-13 Akim Demaille <akim@epita.fr>
1082
1083 * src/print.c (print_actions): Output the handling of `$' as the
1084 traces do: shifting the token EOF. Before EOF was treated as a
1085 nonterminal.
1086 * tests/regression.at: Adjust some tests.
1087 * src/print_graph.c (print_core): Complete the set of items via
1088 closure. The next-to-final and final states are still unsatisfying,
1089 but that's to be addressed elsewhere.
1090 No longer output the rule numbers, but do output the state number.
1091 A single loop for the shifts + gotos is enough, but picked a
1092 distinct color for each.
1093 (print_graph): Initialize and finalize closure.
1094
10952001-12-13 Akim Demaille <akim@epita.fr>
1096
1097 * src/reader.c (readgram): Remove dead code, an strip useless
1098 braces.
1099 (get_type): Remove, unused.
1100
11012001-12-12 Akim Demaille <akim@epita.fr>
1102
1103 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1104 on that of lib/error.c.
1105
11062001-12-12 Akim Demaille <akim@epita.fr>
1107
1108 Some hosts don't like `/' in includes.
1109
1110 * src/system.h: Include libgettext.h without qualifying the path.
1111 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1112 $(top_srcdir).
1113
11142001-12-11 Marc Autret <autret_m@epita.fr>
1115
1116 * src/output.c (output_parser): Remove useless muscle.
1117
11182001-12-11 Marc Autret <autret_m@epita.fr>
1119
1120 * src/bison.simple: Remove #line just before %%epilogue. It
1121 is now handled in ...
1122 * src/reader.c (read_additionnal_code): Add the output of a
1123 #line for the epilogue.
1124
11252001-12-10 Marc Autret <autret_m@epita.fr>
1126
1127 * src/reader.c (copy_definition): Re-use CPP-outed code which
1128 replace precedent remove.
1129 * src/bison.simple: Remove #line before %%prologue because
1130 %%input-line is wrong at this time.
1131
11322001-12-10 Marc Autret <autret_m@epita.fr>
1133
1134 * src/reader.c (symbols_output): Clean up.
1135 * src/output.c (output_gram, output): Clean up.
1136
11372001-12-10 Akim Demaille <akim@epita.fr>
1138
1139 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1140 * src/LR0.c (set_state_table): here.
1141 * src/lalr.c (lalr): Call it.
1142
11432001-12-10 Akim Demaille <akim@epita.fr>
1144
1145 * src/state.h (shifts): Remove the `number' member: shifts are
1146 attached to state, hence no longer need to be labelled with a
1147 state number.
1148
11492001-12-10 Akim Demaille <akim@epita.fr>
1150
1151 Now that states have a complete set of members, the linked list of
1152 shifts is useless: just fill directly the state's shifts member.
1153
1154 * src/state.h (shifts): Remove the `next' member.
1155 * src/LR0.c (first_state, last_state): Remove.
1156 Adjust the callers.
1157 (augment_automaton): Don't look for the shifts that must be added
1158 a shift on EOF: it is those of the state we looked for! But now,
1159 since shifts are attached, it is no longer needed to looking
1160 merely by its id: its number.
1161
11622001-12-10 Akim Demaille <akim@epita.fr>
1163
1164 * src/LR0.c (augment_automaton): Better variable locality.
1165 Remove an impossible branch: if there is a state corresponding to
1166 the start symbol being shifted, then there is shift for the start
1167 symbol from the initial state.
1168
11692001-12-10 Akim Demaille <akim@epita.fr>
1170
1171 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1172 only when appropriate: when insert_start_shifting_state' is not
1173 invoked.
1174 * tests/regression.at (Rule Line Numbers): Adjust.
1175
11762001-12-10 Akim Demaille <akim@epita.fr>
1177
1178 * src/LR0.c (augment_automaton): Now that all states have shifts,
1179 merge the two cases addition shifts to the initial state.
1180
11812001-12-10 Akim Demaille <akim@epita.fr>
1182
1183 * src/lalr.c (set_state_table): Move to...
1184 * src/LR0.c: here.
1185 * src/lalr.c (lalr): Don't call it...
1186 * src/LR0.c (generate_states): do it.
1187 * src/LR0.h (first_state): Remove, only the table is used.
1188
11892001-12-10 Akim Demaille <akim@epita.fr>
1190
1191 * src/LR0.h (first_shift, first_reduction): Remove.
1192 * src/lalr.c: Don't use first_shift: find shifts through the
1193 states.
1194
11952001-12-10 Akim Demaille <akim@epita.fr>
1196
1197 * src/LR0.c: Attach shifts to states as soon as they are
1198 computed.
1199 * src/lalr.c (set_state_table): Instead of assigning shifts to
1200 state, just assert that the mapping was properly done.
1201
12022001-12-10 Akim Demaille <akim@epita.fr>
1203
1204 * src/LR0.c (insert_start_shift): Rename as...
1205 (insert_start_shifting_state): this.
1206 (insert_eof_shifting_state, insert_accepting_state): New.
1207 (augment_automaton): Adjust.
1208 Better locality of the variables.
1209 When looking if the start_symbol is shifted from the initial
1210 state, using `while (... symbol != start_symbol ...)' sounds
1211 better than `while (... symbol < start_symbol ...)': If fail
1212 to see how the order between symbols could be relevant!
1213
12142001-12-10 Akim Demaille <akim@epita.fr>
1215
1216 * src/getargs.h: Don't declare `spec_name_prefix' and
1217 `spec_file_prefix', declared by src/files.h.
1218 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1219 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1220 * src/output.c (prepare): Adjust.
1221 * src/reader.c (symbols_output): Likewise.
1222 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1223
12242001-12-10 Akim Demaille <akim@epita.fr>
1225
1226 * src/muscle_tab.c (muscle_init): NULL is a better default than
1227 `"0"'.
1228
12292001-12-10 Akim Demaille <akim@epita.fr>
1230
1231 * src/reader.c (reader): Calling symbols_output once is enough.
1232
12332001-12-10 Akim Demaille <akim@epita.fr>
1234
1235 Now that states have a complete set of members, the linked list of
1236 reductions is useless: just fill directly the state's reductions
1237 member.
1238
1239 * src/state.h (struct reductions): Remove member `number' and
1240 `next'.
1241 * src/LR0.c (first_reduction, last_reduction): Remove.
1242 (save_reductions): Don't link the new reductions, store them in
1243 this_state.
1244 * src/lalr.c (set_state_table): No need to attach reductions to
1245 states, it's already done.
1246 * src/output.c (output_actions): No longer free the shifts, then
1247 the reductions, then the states: free all the states and their
1248 members.
1249
12502001-12-10 Akim Demaille <akim@epita.fr>
1251
1252 * src/options.c (OPTN, DRTV, BOTH): New.
1253 (option_table): Use them.
1254
1255 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1256 the job of system.h.
1257 * src/options.c: Don't include stdio.h and xalloc.h for the same
1258 reasons.
1259
12602001-12-10 Akim Demaille <akim@epita.fr>
1261
1262 * src/output.c (output, prepare): Make sure the values of the
1263 muscles `action' and `prologue' are 0-terminated.
1264
12652001-12-10 Akim Demaille <akim@epita.fr>
1266
1267 Clean up GCC warnings.
1268
1269 * src/reader.c (copy_action): `buf' is not used.
1270 (parse_skel_decl): Be static.
1271 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1272 * src/options.h (create_long_option_table): Have a real prototype.
1273 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1274 (hash_delete_at): Return const void *.
1275 Adjust casts to preserve the const.
1276
12772001-12-10 Akim Demaille <akim@epita.fr>
1278
1279 * configure.in: Require 2.52g.
1280 M4 is not needed, but AUTOM4TE is.
1281 * m4/m4.m4: Remove.
1282 * tests/Makefile.am: Adjust.
1283
12842001-12-10 Akim Demaille <akim@epita.fr>
1285
1286 One structure for states is enough, even though theoretically
1287 there are LR(0) states and LALR(1) states.
1288
1289 * src/lalr.h (state_t): Remove.
1290 (state_table): Be state_t **, not state_t *.
1291 * src/state.h (core, CORE_ALLOC): Rename as...
1292 (state_t, STATE_ALLOC): this.
1293 Add the LALR(1) members: shifts, reductions, errs.
1294 * src/LR0.c (state_table): Rename as...
1295 (state_hash): this, to avoid name clashes with the global
1296 `state_table'.
1297 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1298 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1299
13002001-12-10 Akim Demaille <akim@epita.fr>
1301
1302 Bison dumps core on bash.y.
1303 Reported by Pascal Bart.
1304
1305 * src/warshall.c (bitmatrix_print): New.
1306 (TC): Use it.
1307 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1308 j must be the outer loop.
1309 * tests/regression.at (Broken Closure): New.
1310
13112001-12-05 Akim Demaille <akim@epita.fr>
1312
1313 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1314 its argument.
1315