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