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