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