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