]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/closure.c (ruleset): Be a bitset.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-03-04 Akim Demaille <akim@epita.fr>
2
3 * src/closure.c (ruleset): Be a bitset.
4 (rulesetsize): Remove.
5
6
72002-03-04 Akim Demaille <akim@epita.fr>
8
9 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
12 * src/closure.c (fderives): Be an array of bitsets.
13
142002-02-28 Robert Anisko <robert@lrde.epita.fr>
15
16 * data/bison.c++: Merge the two generated headers. Insert a copyright
17 notice in each output file.
18
192002-02-28 Akim Demaille <akim@epita.fr>
20
21 * data/bison.c++: Copy the prologue of bison.simple to fetch
22 useful M4 definitions, such as b4_header_guard.
23
242002-02-25 Akim Demaille <akim@epita.fr>
25
26 * src/getargs.c (version): Give the name of the authors, and use a
27 translator friendly scheme for the bgr
28 copyright notice.
29
302002-02-25 Akim Demaille <akim@epita.fr>
31
32 * src/output.c (header_output): Remove, now handled completely via
33 M4.
34
352002-02-25 Akim Demaille <akim@epita.fr>
36
37 * m4/m4.m4: New, from CVS Autoconf.
38 * configure.in: Invoke it.
39 * src/output.c (output_skeleton): Use its result instead of the
40 hard coded name.
41
422002-02-25 Akim Demaille <akim@epita.fr>
43
44 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
45 Fileutils 4.1.5.
46 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
47 * src/output.c (output_skeleton): Use mkstemp to create a real
48 temporary file.
49 Move the filling of `skeleton' and its muscle to...
50 (prepare): here.
51 (output): Move the definition of the prologue muscle to...
52 (prepare): here.
53 * src/system.h (DEFAULT_TMPDIR): New.
54
552002-02-14 Paul Eggert <eggert@twinsun.com>
56
57 Remove the support for C++ namespace cleanliness; it was
58 causing more problems than it was curing, since it didn't work
59 properly on some nonstandard C++ compilers. This can wait
60 for a proper C++ parser.
61
62 * NEWS: Document this.
63 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
64 of C++, as it's treated like C now.
65 * src/bison.simple (YYSTD): Remove.
66 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
67 Treat C++ just like Standard C instead of trying to support
68 namespace cleanliness.
69
702002-02-14 Akim Demaille <akim@epita.fr>
71
72 * tests/regression.at (else): Adjust to Andreas' change.
73
742002-02-14 Akim Demaille <akim@epita.fr>
75
76 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
77
782002-02-13 Andreas Schwab <schwab@suse.de>
79
80 * src/output.c (output_rule_data): Don't output NULL, it might
81 not be defined yet.
82
832002-02-11 Robert Anisko <robert@lrde.epita.fr>
84
85 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
86 (Copyright notice): Update.
87
882002-02-11 Akim Demaille <akim@epita.fr>
89
90 * tests/regression.at (%nonassoc and eof): Don't include
91 nonportable headers.
92
932002-02-08 Robert Anisko <robert@lrde.epita.fr>
94
95 * data/bison.c++: Correct error recovery. Make the user able to
96 initialize the starting location.
97
982002-02-07 Akim Demaille <akim@epita.fr>
99
100 * tests/input.at: New.
101
1022002-02-07 Robert Anisko <robert@lrde.epita.fr>
103
104 * data/bison.c++: Replace some direct m4 expansions by constants. Be
105 more consistent when naming methods and variables. Put preprocessor
106 directives around tables only needed for debugging.
107
1082002-02-07 Robert Anisko <robert@lrde.epita.fr>
109
110 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
111 C++ parsers.
112 (yy::b4_name::parse): Use print_.
113
1142002-02-07 Robert Anisko <robert@lrde.epita.fr>
115
116 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
117
1182002-02-07 Robert Anisko <robert@lrde.epita.fr>
119
120 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
121 C++ parsers.
122 (yy::b4_name::parse): Build verbose error messages, and use error_.
123
1242002-02-06 Robert Anisko <robert@lrde.epita.fr>
125
126 * data/bison.c++: Fix m4 quoting in comments.
127
1282002-02-06 Robert Anisko <robert@lrde.epita.fr>
129
130 * data/bison.c++: Adjust the parser code. Fix some muscles that were
131 not expanded by m4.
132
1332002-02-05 Akim Demaille <akim@epita.fr>
134
135 * data/bison.c++: Adjust to the M4 back end.
136 More is certainly needed.
137
1382002-02-05 Akim Demaille <akim@epita.fr>
139
140 Give a try to M4 as a back end.
141
142 * lib/readpipe.c: New, from wdiff.
143 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
144 BISON_HAIRY.
145 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
146 specific values. Now it is m4 that performs the lookup.
147 * src/parse-skel.y: Remove.
148 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
149 * src/output.c (actions_output, guards_output)
150 (token_definitions_output): No longer keeps track of the output
151 line number, hence remove the second argument.
152 (guards_output): Check against the guard member of a rule, not the
153 action member.
154 Adjust callers.
155 (output_skeleton): Don't look for the skeleton location, let m4 do
156 that.
157 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
158 file will be used.
159 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
160 (prepare): Given that for the time being changesyntax is not
161 usable in M4, rename the muscles using `-' to `_'.
162 Define `defines_flag', `output_parser_name' and `output_header_name'.
163 * src/output.h (actions_output, guards_output)
164 (token_definitions_output): Adjust prototypes.
165 * src/scan-skel.l: Instead of scanning the skeletons, it now
166 processes the output of m4: `__oline__' and `#output'.
167 * data/bison.simple: Adjust to be used by M4(sugar).
168 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
169 to date.
170 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
171 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
172 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
173 shamelessly stolen from CVS Autoconf.
174
1752002-02-05 Akim Demaille <akim@epita.fr>
176
177 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
178 * configure.in: Check for the declarations of free and malloc.
179 * src/muscle_tab.c: Adjust.
180
1812002-02-05 Akim Demaille <akim@epita.fr>
182
183 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
184 which have no values.
185
1862002-02-05 Akim Demaille <akim@epita.fr>
187
188 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
189 * data/: here.
190
1912002-01-29 Paul Eggert <eggert@twinsun.com>
192
193 * src/bison.simple (YYSIZE_T): Do not define merely because
194 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
195 On some platforms, <alloca.h> does not declare YYSTD (size_t).
196
1972002-01-27 Akim Demaille <akim@epita.fr>
198
199 Fix `%nonassoc and eof'.
200
201 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
202 which were not properly copied! Replace
203 memcpy (res->errs, src->errs, src->nerrs);
204 with
205 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
206 !!!
207 * tests/regression.at (%nonassoc and eof): Adjust to newest
208 Autotest: `.' is not in the PATH.
209
2102002-01-27 Akim Demaille <akim@epita.fr>
211
212 * tests/sets.at (AT_EXTRACT_SETS): New.
213 (Nullable): Use it.
214 (Firsts): New.
215
2162002-01-26 Akim Demaille <akim@epita.fr>
217
218 * tests/actions.at, tests/calc.at, tests/headers.at,
219 * tests/torture.at: Adjust to the newest Autotest which no longer
220 forces `.' in the PATH.
221
2222002-01-25 Akim Demaille <akim@epita.fr>
223
224 * tests/regression.at (%nonassoc and eof): New.
225 Suggested by Robert Anisko.
226
2272002-01-24 Akim Demaille <akim@epita.fr>
228
229 Bison dumps core when trying to complain about broken input files.
230 Reported by Cris van Pelt.
231
232 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
233 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
234 into...
235 (Invalid inputs): Strengthen: exercise parse_percent_token.
236
2372002-01-24 Robert Anisko <robert.anisko@epita.fr>
238
239 * src/Makefile.am: Add bison.c++.
240 * src/bison.c++: New skeleton.
241
2422002-01-21 Paolo Bonzini <bonzini@gnu.org>
243
244 * po/it.po: New.
245
2462002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
247
248 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
249
2502002-01-20 Marc Autret <marc@gnu.org>
251
252 * src/files.c (compute_output_file_names): Fix
253
2542002-01-20 Marc Autret <marc@gnu.org>
255
256 * tests/output.at: New test.
257 * src/files.c (compute_base_names): Don't map extensions when
258 the YACC flag is set, use defaults.
259 Reported by Evgeny Stambulchik.
260
2612002-01-20 Marc Autret <marc@gnu.org>
262
263 * src/system.h: Need to define __attribute__ away for non-GCC
264 compilers as well (i.e. the vendor C compiler).
265 Suggested by Albert Chin-A-Young.
266
2672002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
268
269 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
270 canonical definition.
271 * src/system.h: Use the canonical definition for PARAMS (avoids
272 a conflict with the macro from lib/hash.h).
273
2742002-01-11 Akim Demaille <akim@epita.fr>
275
276 * configure.in: Use AC_FUNC_STRNLEN.
277 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
278
2792002-01-09 Akim Demaille <akim@epita.fr>
280
281 * src/files.c, src/files.h (output_infix): New.
282 (tab_extension): Remove.
283 (compute_base_names): Compute the former, drop the latter.
284 * src/output.c (prepare): Insert the muscles `output-infix', and
285 `output-suffix'.
286 * src/parse-skel.y (string, string.1): New.
287 (section.header): Use it.
288 (section.yacc): Remove.
289 (prefix): Remove too.
290 * src/scan-skel.l: Adjust.
291 * src/bison.simple, src/bison.hairy: Adjust.
292
2932002-01-09 Akim Demaille <akim@epita.fr>
294
295 * configure.in (WERROR_CFLAGS): Compute it.
296 * src/Makefile.am (CFLAGS): Pass it.
297 * tests/atlocal.in (CFLAGS): Idem.
298 * src/files.c: Fix a few warnings.
299 (get_extension_index): Remove, unused.
300
3012002-01-08 Akim Demaille <akim@epita.fr>
302
303 * src/getargs.c (AS_FILE_NAME): New.
304 (getargs): Use it to convert DOSish file names.
305 * src/files.c (base_name): Rename as full_base_name to avoid
306 clashes with `base_name ()'.
307 (filename_split): New.
308 (compute_base_names): N-th rewrite, using filename_split.
309
3102002-01-08 Akim Demaille <akim@epita.fr>
311
312 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
313 New, stolen from the Fileutils 4.1.
314 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
315 * configure.in: Check for the presence of memrchr, and of its
316 prototype.
317
3182002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
319
320 * lib/hash.h (__P): Added definition for this macro.
321 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
322 BUILT_SOURCES, to ensure they are generated first.
323 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
324 %error-verbose to allow bootstrapping with bison 1.30x.
325
3262002-01-06 Akim Demaille <akim@epita.fr>
327
328 * src/reader.c (parse_braces): Don't fetch the next char, the
329 convention is to fetch on entry.
330 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
331 'switch' without a following semicolon.
332 * tests/regression.at (braces parsing): New.
333
3342002-01-06 Akim Demaille <akim@epita.fr>
335
336 Bison is dead wrong in its RR conflict reports.
337
338 * tests/torture.at (GNU Cim Grammar): New.
339 * src/conflicts.c (count_rr_conflicts): Fix.
340
3412002-01-06 Akim Demaille <akim@epita.fr>
342
343 Creating package.m4 from configure.ac causes too many problems.
344
345 * tests/Makefile.am (package.m4): Create it by hand,
346 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
347
3482002-01-06 Akim Demaille <akim@epita.fr>
349
350 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
351 skeleton.h.
352
3532002-01-04 Paul Eggert <eggert@twinsun.com>
354
355 * doc/bison.texinfo (Debugging):
356 Remove YYSTDERR; it's no longer defined or used.
357 Also, s/cstdio.h/cstdio/.
358
3592002-01-03 Akim Demaille <akim@epita.fr>
360
361 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
362
3632002-01-03 Akim Demaille <akim@epita.fr>
364
365 * src/parse-skel.y (process_skeleton): Don't bind the parser's
366 tracing code to --trace, wait for a better --trace option, with
367 args.
368
3692002-01-03 Akim Demaille <akim@epita.fr>
370
371 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
372 The ISO C++ standard is extremely clear about it: stderr is
373 considered a macro, not a regular symbol (see table 94 `Header
374 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
375 Therefore std:: does not apply to it. It still does with fprintf.
376 Also, s/cstdio.h/cstdio/.
377
3782002-01-03 Akim Demaille <akim@epita.fr>
379
380 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
381 for non system headers.
382
3832002-01-02 Akim Demaille <akim@epita.fr>
384
385 Equip the skeleton chain with location tracking, runtime trace,
386 pure parser and scanner.
387
388 * src/parse-skel.y: Request a pure parser, locations, and prefix
389 renaming.
390 (%union): Having several members with the same type does not help
391 type mismatches, simplify.
392 (YYPRINT, yyprint): New.
393 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
394 (skel_error): this.
395 Handle locations.
396 * src/scan-skel.l: Adjust to these changes.
397 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
398 (LOCATION_PRINT, skel_control_t): New.
399
4002001-12-30 Akim Demaille <akim@epita.fr>
401
402 * src/parse-skel.y: Get rid of the shift/reduce conflict:
403 replace `gb' with BLANKS.
404 * src/scan-skel.l: Adjust.
405
4062001-12-30 Akim Demaille <akim@epita.fr>
407
408 * src/system.h: We don't need nor want bcopy.
409 Throw away MS-DOS crap: we don't need getpid.
410 * configure.in: We don't need strndup. It was even causing
411 problems: because Flex includes the headers *before* us,
412 _GNU_SOURCE is not defined by config.h, and therefore strndup was
413 not visible.
414 * lib/xstrndup.c: New.
415 * src/scan-skel.l: Use it.
416 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
417 * src/parse-skel.y: Use %directives instead of #defines.
418
4192001-12-30 Akim Demaille <akim@epita.fr>
420
421 * src/skeleton.h: New.
422 * src/output.c (output_parser, output_master_parser): Remove, dead
423 code.
424 * src/output.h (get_lines_number, actions_output, guards_output)
425 (token_definitions_output): Prototype them.
426 * src/parse-skel.y: Add the license notice.
427 Include output.h and skeleton.h.
428 (process_skeleton): Returns void, and takes a single parameter.
429 * src/scan-skel.l: Add the license notice.
430 Include skeleton.h.
431 Don't use %option yylineno: it seems that then Flex imagines
432 REJECT has been used, and therefore it won't reallocate its
433 buffers (which makes no other sense to me than a bug). It results
434 in warnings for `unused: yy_flex_realloc'.
435
4362001-12-30 Robert Anisko <robert.anisko@epita.fr>
437
438 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
439 (MUSCLE_INSERT_PREFIX): ...to there.
440 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
441 (MUSCLE_INSERT_PREFIX): Move from here...
442
443 * src/bison.hairy: Add a section directive. Put braces around muscle
444 names. This parser skeleton is still broken, but Bison should not
445 choke on a bad muscle 'syntax'.
446 * src/bison.simple: Add a section directive. Put braces around muscle
447 names.
448
449 * src/files.h (strsuffix, stringappend): Add declarations.
450 (tab_extension): Add declaration.
451 (short_base_name): Add declaration.
452
453 * src/files.c (strsuffix, stringappend): No longer static. These
454 functions are used in the skeleton parser.
455 (tab_extension): New.
456 (compute_base_names): Use the computations done in this function
457 to guess if the generated parsers should have '.tab' in their
458 names.
459 (short_base_name): No longer static.
460
461 * src/output.c (output_skeleton): New.
462 (output): Disable call to output_master_parser, and give a try to
463 a new skeleton handling system.
464 (guards_output, actions_output): No longer static.
465 (token_definitions_output, get_lines_number): No longer static.
466
467 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
468
469 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
470 parse-skel.y.
471
472 * src/parse-skel.y: New file.
473 * src/scan-skel.l: New file.
474
4752001-12-29 Akim Demaille <akim@epita.fr>
476
477 %name-prefix is broken.
478
479 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
480 Adjust all dependencies.
481 * tests/headers.at (export YYLTYPE): Strengthen this test: use
482 %name-prefix.
483
484 Renaming yylval but not yylloc is not consistent. Now we do.
485
486 * src/bison.simple: Prefix yylloc if used.
487 * doc/bison.texinfo (Decl Summary): Document that.
488
4892001-12-29 Akim Demaille <akim@epita.fr>
490
491 * doc/bison.texinfo: Promote `%long-directive' over
492 `%long_directive'.
493 Remove all references to fixed-output-files, yacc is enough.
494
4952001-12-29 Akim Demaille <akim@epita.fr>
496
497 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
498 user prologue. These are defaults.
499 * tests/actions.at (Mid-rule actions): Make sure the user can
500 define YYDEBUG and YYERROR_VERBOSE.
501
5022001-12-29 Akim Demaille <akim@epita.fr>
503
504 * src/output.c (header_output): Don't forget to export YYLTYPE and
505 yylloc.
506 * tests/headers.at (export YYLTYPE): New, make sure it does.
507 * tests/regression.at (%union and --defines, Invalid CPP headers):
508 Move to...
509 * tests/headers.at: here.
510
5112001-12-29 Akim Demaille <akim@epita.fr>
512
513 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
514
5152001-12-29 Akim Demaille <akim@epita.fr>
516
517 * tests/actions.at (Mid-rule actions): Output on a single line
518 instead of several.
519
5202001-12-29 Akim Demaille <akim@epita.fr>
521
522 * doc/bison.texinfo: Formatting changes.
523
5242001-12-29 Akim Demaille <akim@epita.fr>
525
526 Don't store the token defs in a muscle, just be ready to output it
527 on command. Now possible via `symbols'. Fixes a memory leak.
528
529 * src/output.c (token_definitions_output): New.
530 (output_parser, header_output): Use it.
531 * src/reader.c (symbols_save): Remove.
532
5332001-12-29 Akim Demaille <akim@epita.fr>
534
535 * src/bison.simple: Do not provide a default for YYSTYPE and
536 YYLTYPE before the user's prologue. Otherwise it's hardly... a
537 default.
538
5392001-12-29 Akim Demaille <akim@epita.fr>
540
541 Mid-rule actions are simply... ignored!
542
543 * src/reader.c (readgram): Be sure to attach mid-rule actions to
544 the empty-rule associated to the dummy symbol, not to the host
545 rule.
546 * tests/actions.at (Mid-rule actions): New.
547
5482001-12-29 Akim Demaille <akim@epita.fr>
549
550 Memory leak.
551
552 * src/reader.c (reader): Free grammar.
553
5542001-12-29 Akim Demaille <akim@epita.fr>
555
556 Memory leak.
557
558 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
559 since it allocates it for each state, although only one is needed.
560 (allocate_storage): Do it here.
561
5622001-12-29 Akim Demaille <akim@epita.fr>
563
564 * src/options.h, src/options.c (create_long_option_table): Rename
565 as...
566 (long_option_table_new): this, with a clearer prototype.
567 (percent_table): Remove, unused,
568 * src/getargs.c (getargs): Adjust.
569
5702001-12-29 Akim Demaille <akim@epita.fr>
571
572 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
573 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
574 as states.
575
5762001-12-29 Akim Demaille <akim@epita.fr>
577
578 * src/lalr.c (build_relations): Rename `states' as `states1'.
579 Sorry, I don't understand exactly what it is, no better name...
580
5812001-12-29 Akim Demaille <akim@epita.fr>
582
583 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
584 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
585 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
586 as rules.
587
5882001-12-29 Akim Demaille <akim@epita.fr>
589
590 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
591 ago.
592
5932001-12-29 Akim Demaille <akim@epita.fr>
594
595 * src/reader.c, src/reader.h (user_toknums): Remove.
596 Adjust all users to use symbols[i]->user_token_number.
597
5982001-12-29 Akim Demaille <akim@epita.fr>
599
600 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
601 Adjust all users to use symbols[i]->prec or ->assoc.
602
6032001-12-29 Akim Demaille <akim@epita.fr>
604
605 * src/reader.c, src/reader.h (tags): Remove.
606 Adjust all users to use symbols[i]->tag.
607
6082001-12-29 Akim Demaille <akim@epita.fr>
609
610 * src/gram.h, src/gram.c (symbols): New, similar to state_table
611 and rule_table.
612 * src/reader.c (packsymbols): Fill this table.
613 Drop sprec.
614 * src/conflicts.c (resolve_sr_conflict): Adjust.
615 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
616 single table.
617 Use symbols[i]->tag instead of tags[i].
618
6192001-12-29 Akim Demaille <akim@epita.fr>
620
621 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
622 In addition, put a comment in there, to replace...
623 * tests/regression.at (%union and C comments): Remove.
624
6252001-12-29 Akim Demaille <akim@epita.fr>
626
627 * tests/regression.at (Web2c Actions): Blindly move the actual
628 output as expected output. The contents *seem* right to me, but I
629 can't pretend reading perfectly parser tables... Nonetheless, all
630 the other tests pass correctly, the table look OK, even though the
631 presence of `$axiom' is to be noted: AFAICS it is useless (but
632 harmless).
633
6342001-12-29 Akim Demaille <akim@epita.fr>
635
636 * src/reader.c (readgram): Don't add the rule 0 if there were no
637 rules read. In other words, add it _after_ having performed
638 grammar sanity checks.
639 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
640
6412001-12-29 Akim Demaille <akim@epita.fr>
642
643 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
644 visible, and some states have now a different number.
645
6462001-12-29 Akim Demaille <akim@epita.fr>
647
648 * src/reader.c (readgram): Bind the initial rule's lineno to that
649 of the first rule.
650 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
651 (Solved SR Conflicts): Adjust rule 0's line number.
652
6532001-12-29 Akim Demaille <akim@epita.fr>
654
655 Fix the `GAWK Grammar' failure.
656
657 * src/LR0.c (final_state): Initialize to -1 so that we do compute
658 the reductions of the first state which was mistakenly confused
659 with the final state because precisely final_state was initialized
660 to 0.
661 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
662 now noticed by Bison.
663 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
664 have a reduction on $default.
665
6662001-12-29 Akim Demaille <akim@epita.fr>
667
668 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
669 rule line numbers.
670 * src/closure.c (print_closure): Likewise.
671 * src/derives.c (print_derives): Likewise.
672 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
673 now.
674
6752001-12-29 Akim Demaille <akim@epita.fr>
676
677 * src/lalr.c (lookaheads_print): New.
678 (lalr): Call it when --trace-flag.
679 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
680 are dumped.
681
6822001-12-29 Akim Demaille <akim@epita.fr>
683
684 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
685 when walking through ritem, even via rule->rhs.
686 * src/reduce.c (dump_grammar, useful_production, reduce_output)
687 (useful_production, useless_nonterminals): Likewise.
688 (reduce_grammar_tables): Likewise, plus update nritems.
689 * src/nullable.c (set_nullable): Likewise.
690 * src/lalr.c (build_relations): Likewise.
691 * tests/sets.at (Nullable): Adjust.
692 Fortunately, now, the $axiom is no longer nullable.
693
6942001-12-29 Akim Demaille <akim@epita.fr>
695
696 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
697 the 0-sentinel.
698 * src/gram.c (ritem_longest_rhs): Likewise.
699 * src/reduce.c (nonterminals_reduce): Likewise.
700 * src/print_graph.c (print_graph): Likewise.
701 * src/output.c (output_rule_data): Likewise.
702 * src/nullable.c (set_nullable): Likewise.
703
7042001-12-29 Akim Demaille <akim@epita.fr>
705
706 * src/output.c: Comment changes.
707
7082001-12-27 Paul Eggert <eggert@twinsun.com>
709
710 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
711 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
712 Sparc, as they were causing more porting problems than the
713 (minor) performance improvement was worth.
714
715 Also, catch up with 1.31's YYSTD.
716
7172001-12-27 Akim Demaille <akim@epita.fr>
718
719 * src/output.c (output_gram): Rely on nritems, not the
720 0-sentinel. See below.
721 Use -1 as separator, not 0.
722 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
723 Rely on -1 as separator in yyrhs, instead of 0.
724 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
725 twice `Now at end of input', therefore there are two lines less to
726 expect.
727
7282001-12-27 Akim Demaille <akim@epita.fr>
729
730 * tests/regression.at (Unresolved SR Conflicts):
731 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
732 below.
733
7342001-12-27 Akim Demaille <akim@epita.fr>
735
736 * src/LR0.c (new_state): Recognize the final state by the fact it
737 is reached by eoftoken.
738 (insert_start_shifting_state, insert_eof_shifting_state)
739 (insert_accepting_state, augment_automaton): Remove, since now
740 these states are automatically computed from the initial state.
741 (generate_states): Adjust.
742 * src/print.c: When reporting a rule number to the user, substract
743 1, so that the axiom rule is rule 0, and the first user rule is 1.
744 * src/reduce.c: Likewise.
745 * src/print_graph.c (print_core): For the time being, just as for
746 the report, depend upon --trace-flags to dump the full set of
747 items.
748 * src/reader.c (readgram): Once the grammar read, insert the rule
749 0: `$axiom: START-SYMBOL $'.
750 * tests/set.at: Adjust: rule 0 is now displayed, and since the
751 number of the states has changed (the final state is no longer
752 necessarily the last), catch up.
753
7542001-12-27 Akim Demaille <akim@epita.fr>
755
756 Try to make the use of the eoftoken valid. Given that its value
757 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
758 is used instead of > 0 where appropriate, (ii), depend upon nritems
759 instead of the 0-sentinel.
760
761 * src/gram.h, src/gram.c (nritems): New.
762 Expected to be duplication of nitems, but for the time being...
763 * src/reader.c (packgram): Assert nritems and nitems are equal.
764 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
765 * src/closure.c (print_closure, print_fderives): Likewise.
766 * src/gram.c (ritem_print): Likewise.
767 * src/print.c (print_core, print_grammar): Likewise.
768 * src/print_graph.c: Likewise.
769
7702001-12-27 Akim Demaille <akim@epita.fr>
771
772 * src/main.c (main): If there are complains after grammar
773 reductions, then output the report anyway if requested, then die.
774 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
775 * src/reader.c (eoftoken): New.
776 (parse_token_decl): If the token being defined has value `0', it
777 is the eoftoken.
778 (packsymbols): No longer hack `tags' to insert `$' by hand.
779 Be sure to preserve the value of the eoftoken.
780 (reader): Make sure eoftoken is defined.
781 Initialize nsyms to 0: now eoftoken is created just like the others.
782 * src/print.c (print_grammar): Don't special case the eof token.
783 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
784 lie anyway, albeit pleasant.
785 * tests/calc.at: Exercise error messages with eoftoken.
786 Change the grammar so that empty input is invalid.
787 Adjust expectations.
788 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
789
7902001-12-27 Akim Demaille <akim@epita.fr>
791
792 * configure.in: Check the protos of strchr ans strspn.
793 Replace strchr if needed.
794 * src/system.h: Provide the protos of strchr, strspn and memchr if
795 missing.
796 * lib/strchr.c: New.
797 * src/reader.c (symbols_save): Use strchr.
798
7992001-12-27 Akim Demaille <akim@epita.fr>
800
801 * src/print.c, src/print_graph.c (escape): New.
802 Use it to quote the TAGS outputs.
803 * src/print_graph.c (print_state): Now errors are in red, and
804 reductions in green.
805 Prefer high to wide: output the state number on a line of its own.
806
8072001-12-27 Akim Demaille <akim@epita.fr>
808
809 * src/state.h, src/state.c (reductions_new): New.
810 * src/LR0.c (set_state_table): Let all the states have a
811 `reductions', even if reduced to 0.
812 (save_reductions): Adjust.
813 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
814 * src/print.c (print_reductions, print_actions): Adjust.
815 * src/output.c (action_row): Adjust.
816
8172001-12-27 Akim Demaille <akim@epita.fr>
818
819 * src/state.h, src/state.c (errs_new, errs_dup): New.
820 * src/LR0.c (set_state_table): Let all the states have an errs,
821 even if reduced to 0.
822 * src/print.c (print_errs, print_reductions): Adjust.
823 * src/output.c (output_actions, action_row): Adjust.
824 * src/conflicts.c (resolve_sr_conflict): Adjust.
825
8262001-12-27 Akim Demaille <akim@epita.fr>
827
828 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
829
8302001-12-27 Akim Demaille <akim@epita.fr>
831
832 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
833 * src/print.c: here.
834 (lookaheadset, shiftset): New, used as additional storage by
835 print_reductions.
836 (print_results): Adjust.
837 (print_shifts, print_gotos, print_errs): New, extracted from...
838 (print_actions): here.
839 * src/print_graph.c (print_actions): Remove dead code.
840
8412001-12-27 Akim Demaille <akim@epita.fr>
842
843 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
844 `$n' and `@n'.
845
8462001-12-27 Akim Demaille <akim@epita.fr>
847
848 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
849 (build_relations): Adjust.
850
8512001-12-27 Akim Demaille <akim@epita.fr>
852
853 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
854 duplication.
855
8562001-12-27 Akim Demaille <akim@epita.fr>
857
858 * src/reader.c (packgram): Catch nitems overflows.
859
8602001-12-27 Akim Demaille <akim@epita.fr>
861
862 * src/files.c, src/files.h (guard_obstack): Remove.
863 * src/output.c (output): Adjust.
864 * src/reader.c (parse_braces): New, factoring...
865 (copy_action, copy_guard): these two which are renamed as...
866 (parse_action, parse_guard): these.
867 As a voluntary consequence, using braces around guards is now
868 mandatory.
869
8702001-12-27 Akim Demaille <akim@epita.fr>
871
872 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
873 * src/reader.c (symbol_list): `guard' and `guard_line' are new
874 members.
875 (symbol_list_new): Adjust.
876 (copy_action): action_line is the first line, not the last.
877 (copy_guard): Just as for actions, store the `action' only, not
878 the switch/case/break flesh.
879 Don't parse the user action that might follow the guard, let...
880 (readgram): do it, i.e., now, there can be an action after a
881 guard.
882 In other words the guard is just explicitly optional.
883 (packgram): Adjust.
884 * src/output.c (guards_output): New.
885 (output_parser): Call it when needed.
886 (output): Also free the guard and attrs obstacks.
887 * src/files.c, src/files.h (obstack_save): Remove.
888 (output_files): Remove.
889 As a result, if one needs the former `.act' file, using an
890 appropriate skeleton which requires actions and guards is now
891 required.
892 * src/main.c (main): Adjust.
893 * tests/semantic.at: New.
894 * tests/regression.at: Use `input.y' as input file name.
895 Avoid 8+3 problems by requiring input.c when the test needs the
896 parser.
897
8982001-12-27 Akim Demaille <akim@epita.fr>
899
900 * src/reader.c (symbol_list_new): Be sure to initialize all the
901 fields.
902
9032001-12-27 Akim Demaille <akim@epita.fr>
904
905 All the hacks using a final pseudo state are now useless.
906
907 * src/LR0.c (set_state_table): state_table holds exactly nstates.
908 * src/lalr.c (nLA): New.
909 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
910 instead of lookaheadsp from the pseudo state (nstate + 1).
911
9122001-12-27 Akim Demaille <akim@epita.fr>
913
914 * src/output.c (action_row, token_actions): Use a state_t instead
915 of a integer, and nlookaheads instead of the following state's
916 lookaheadsp.
917
9182001-12-27 Akim Demaille <akim@epita.fr>
919
920 * src/conflicts.c (log_resolution, flush_shift)
921 (resolve_sr_conflict, set_conflicts, solve_conflicts)
922 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
923 (conflicts_print, print_reductions): Use a state_t instead of an
924 integer when referring to a state.
925 As much as possible, depend upon nlookaheads, instead of the
926 `lookaheadsp' member of the following state (since lookaheads of
927 successive states are successive, the difference between state n + 1
928 and n served as the number of lookaheads for state n).
929 * src/lalr.c (add_lookback_edge): Likewise.
930 * src/print.c (print_core, print_actions, print_state)
931 (print_results): Likewise.
932 * src/print_graph.c (print_core, print_actions, print_state)
933 (print_graph): Likewise.
934 * src/conflicts.h: Adjust.
935
9362001-12-27 Akim Demaille <akim@epita.fr>
937
938 * src/bison.hairy: Formatting/comment changes.
939 ANSIfy.
940 Remove `register' indications.
941 Add plenty of `static'.
942
9432001-12-27 Akim Demaille <akim@epita.fr>
944
945 * src/output.c (prepare): Drop the muscle `ntbase' which
946 duplicates ntokens.
947 * src/bison.simple: Formatting/comment changes.
948 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
949 is an undocumented synonym.
950
9512001-12-22 Akim Demaille <akim@epita.fr>
952
953 * src/output.c (output_table_data): Change the prototype to use
954 `int' for array ranges: some invocations do pass an int, not a
955 short.
956 Reported by Wayne Green.
957
9582001-12-22 Akim Demaille <akim@epita.fr>
959
960 Some actions of web2c.y are improperly triggered.
961 Reported by Mike Castle.
962
963 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
964 * tests/regression.at (Web2c): Rename as...
965 (Web2c Report): this.
966 (Web2c Actions): New.
967
9682001-12-22 Akim Demaille <akim@epita.fr>
969
970 Reductions in web2c.y are improperly reported.
971 Reported by Mike Castle.
972
973 * src/conflicts.c (print_reductions): Fix.
974 * tests/regression.at (Web2c): New.
975
9762001-12-18 Akim Demaille <akim@epita.fr>
977
978 Some host fail on `assert (!"foo")', which expands to
979 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
980 Reported by Nelson Beebee.
981
982 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
983 `#define it_succeeded 0' and `assert (it_succeeded)'.
984
9852001-12-17 Marc Autret <autret_m@epita.fr>
986
987 * src/bison.simple: Don't hard code the skeleton line and filename.
988 * src/output.c (output_parser): Rename 'line' as 'output_line'.
989 New line counter 'skeleton_line' (skeleton-line muscle).
990
9912001-12-17 Paul Eggert <eggert@twinsun.com>
992
993 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
994 YYDEBUG must be defined to a nonzero value.
995
996 * src/bison.simple (yytname): Do not assume that the user defines
997 YYDEBUG to a properly parenthesized expression.
998
9992001-12-17 Akim Demaille <akim@epita.fr>
1000
1001 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1002 nlookaheads is a new member.
1003 Adjust all users.
1004 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1005 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1006 state.
1007
10082001-12-17 Akim Demaille <akim@epita.fr>
1009
1010 * src/files.h, src/files.c (open_files, close_files): Remove.
1011 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1012 let...
1013 * src/reader.c (reader): Do it.
1014
10152001-12-17 Akim Demaille <akim@epita.fr>
1016
1017 * src/conflicts.c (print_reductions): Formatting changes.
1018
10192001-12-17 Akim Demaille <akim@epita.fr>
1020
1021 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1022 (flush_reduce): New.
1023 (resolve_sr_conflict): Adjust.
1024
10252001-12-17 Akim Demaille <akim@epita.fr>
1026
1027 * src/output.c (output_obstack): Be static and rename as...
1028 (format_obstack): this, to avoid any confusion with files.c's
1029 output_obstack.
1030 * src/reader.h (muscle_obstack): Move to...
1031 * src/output.h: here, since it's defined in output.c.
1032
10332001-12-17 Akim Demaille <akim@epita.fr>
1034
1035 * src/output.c (action_row, save_column, default_goto)
1036 (sort_actions, matching_state, pack_vector): Better variable
1037 locality.
1038
10392001-12-17 Akim Demaille <akim@epita.fr>
1040
1041 * src/output.c: Various formatting changes.
1042
10432001-12-17 Akim Demaille <akim@epita.fr>
1044
1045 * src/files.c (output_files): Free the output_obstack.
1046 * src/main.c (main): Call print and print_graph conditionally.
1047 * src/print.c (print): Work unconditionally.
1048 * src/print_graph.c (print_graph): Work unconditionally.
1049 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1050
10512001-12-16 Marc Autret <autret_m@epita.fr>
1052
1053 * src/output.c (actions_output): Fix. When we use %no-lines,
1054 there is one less line per action.
1055
10562001-12-16 Marc Autret <autret_m@epita.fr>
1057
1058 * src/bison.simple: Remove a useless #line directive.
1059 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1060 * src/output.c (get_lines_number): New.
1061 (output_parser): Adjust, now takes care about the lines of a
1062 output muscles.
1063 Fix line numbering.
1064 (actions_output): Computes the number of lines taken by actions.
1065 (output_master_parser): Insert new skeleton which is the name of
1066 the output parser file name.
1067
10682001-12-15 Marc Autret <autret_m@epita.fr>
1069
1070 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1071
10722001-12-15 Marc Autret <autret_m@epita.fr>
1073
1074 * src/output.c (output_gram): Keep track of the hairy one.
1075
10762001-12-15 Akim Demaille <akim@epita.fr>
1077
1078 Make `make distcheck' work.
1079
1080 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1081 system.h which uses libgettext.h.
1082
10832001-12-15 Akim Demaille <akim@epita.fr>
1084
1085 * src/nullable.c (set_nullable): Useless rules must be skipped,
1086 otherwise, since we range over their symbols, we might look at a
1087 nonterminal which no longer ``exists'', i.e., it is not counted in
1088 `nvars', hence we overflow our arrays.
1089
10902001-12-15 Akim Demaille <akim@epita.fr>
1091
1092 The header can also be produced directly, without any obstack!
1093 Yahoo!
1094
1095 * src/files.c, src/files.h (defines_obstack): Remove.
1096 (compute_header_macro): Global.
1097 (defines_obstack_save): Remove.
1098 * src/reader.c (parse_union_decl): No longer output to
1099 defines_obstack: its content can be found in the `stype' muscle
1100 anyway.
1101 (output_token_translations): Merge into...
1102 (symbols_output): this.
1103 Rename as...
1104 (symbols_save): this.
1105 (reader): Adjust.
1106 * src/output.c (header_output): New.
1107 (output): Call it.
1108
11092001-12-15 Akim Demaille <akim@epita.fr>
1110
1111 * src/reader.c (parse_union_decl): Instead of handling two obstack
1112 simultaneously, use one to define the `stype' muscle, and use the
1113 value of the latter to fill defines_obstack.
1114 (copy_comment): Remove.
1115 (copy_comment2): Work for a single obstack.
1116 Rename as...
1117 (copy_comment): this.
1118
11192001-12-15 Akim Demaille <akim@epita.fr>
1120
1121 * src/lex.c, src/lex.h (xgetc): No longer static.
1122 * src/reader.c (parse_union_decl): Revamp.
1123
11242001-12-15 Akim Demaille <akim@epita.fr>
1125
1126 Still making progress in separating Bison into (i) input, (ii)
1127 process, (iii) output: now we can directly output the parser file
1128 without using table_obstack at all.
1129
1130 * src/files.c, src/files.h (table_obstack): Bye bye.
1131 (parser_file_name): New.
1132 * src/files.c (compute_output_file_names): Compute it.
1133 * src/output.c (actions_output, output_parser)
1134 (output_master_parser): To a file instead of an obstack.
1135
11362001-12-15 Akim Demaille <akim@epita.fr>
1137
1138 Attach actions to rules, instead of pre-outputting them to
1139 actions_obstack.
1140
1141 * src/gram.h (rule_t): action and action_line are new members.
1142 * src/reader.c (symbol_list): Likewise.
1143 (copy_action): Save the actions within the rule.
1144 (packgram): Save them in rule_table.
1145 * src/output.c (actions_output): New.
1146 (output_parser): Use it on `%%actions'.
1147 (output_rule_data): Don't free rule_table.
1148 (output): Do it.
1149 (prepare): Don't save the `action' muscle.
1150 * src/bison.simple: s/%%action/%%actions/.
1151
11522001-12-15 Akim Demaille <akim@epita.fr>
1153
1154 * src/reader.c (copy_action): When --yacc, don't append a `;'
1155 to the user action: let it fail if lacking.
1156 Suggested by Arnold Robbins and Tom Tromey.
1157
11582001-12-14 Akim Demaille <akim@epita.fr>
1159
1160 * src/lex.c (literalchar): Simply return the char you decoded, non
1161 longer mess around with obstacks and int pointers.
1162 Adjust all callers.
1163
11642001-12-14 Akim Demaille <akim@epita.fr>
1165
1166 * src/lex.c (literalchar): Don't escape the special characters,
1167 just decode them, and keep them as char (before, eol was output as
1168 the 2 char string `\n' etc.).
1169 * src/output.c (output_rule_data): Use quotearg to output the
1170 token strings.
1171
11722001-12-13 Paul Eggert <eggert@twinsun.com>
1173
1174 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1175 Do not infringe on the global user namespace when using C++.
1176 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1177 All uses of `fprintf' and `stderr' changed.
1178
1179 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1180
11812001-12-13 Akim Demaille <akim@epita.fr>
1182
1183 The computation of nullable is broken: it doesn't handle empty
1184 RHS's properly.
1185
1186 * tests/torture.at (GNU AWK Grammar): New.
1187 * tests/sets.at (Nullable): New.
1188 * src/nullable.c (set_nullable): Instead of blindly looping over
1189 `ritems', loop over the rules, and then over their rhs's.
1190
1191 Work around Autotest bugs.
1192
1193 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1194 frame, because Autotest understand lines starting with a `+' as
1195 traces from the shell. Then, they are not processed properly.
1196 Admittedly an Autotest bug, but we don't have time to wait for
1197 Autotest to catch up.
1198 * tests/regression.at (Broken Closure): Adjust to the new table
1199 frames.
1200 Move to...
1201 * tests/sets.at: here.
1202
12032001-12-13 Akim Demaille <akim@epita.fr>
1204
1205 * src/closure.c (closure): Use nrules instead of playing tricks
1206 with BITS_PER_WORD.
1207
12082001-12-13 Akim Demaille <akim@epita.fr>
1209
1210 * src/print.c (print_actions): Output the handling of `$' as the
1211 traces do: shifting the token EOF. Before EOF was treated as a
1212 nonterminal.
1213 * tests/regression.at: Adjust some tests.
1214 * src/print_graph.c (print_core): Complete the set of items via
1215 closure. The next-to-final and final states are still unsatisfying,
1216 but that's to be addressed elsewhere.
1217 No longer output the rule numbers, but do output the state number.
1218 A single loop for the shifts + gotos is enough, but picked a
1219 distinct color for each.
1220 (print_graph): Initialize and finalize closure.
1221
12222001-12-13 Akim Demaille <akim@epita.fr>
1223
1224 * src/reader.c (readgram): Remove dead code, an strip useless
1225 braces.
1226 (get_type): Remove, unused.
1227
12282001-12-12 Akim Demaille <akim@epita.fr>
1229
1230 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1231 on that of lib/error.c.
1232
12332001-12-12 Akim Demaille <akim@epita.fr>
1234
1235 Some hosts don't like `/' in includes.
1236
1237 * src/system.h: Include libgettext.h without qualifying the path.
1238 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1239 $(top_srcdir).
1240
12412001-12-11 Marc Autret <autret_m@epita.fr>
1242
1243 * src/output.c (output_parser): Remove useless muscle.
1244
12452001-12-11 Marc Autret <autret_m@epita.fr>
1246
1247 * src/bison.simple: Remove #line just before %%epilogue. It
1248 is now handled in ...
1249 * src/reader.c (read_additionnal_code): Add the output of a
1250 #line for the epilogue.
1251
12522001-12-10 Marc Autret <autret_m@epita.fr>
1253
1254 * src/reader.c (copy_definition): Re-use CPP-outed code which
1255 replace precedent remove.
1256 * src/bison.simple: Remove #line before %%prologue because
1257 %%input-line is wrong at this time.
1258
12592001-12-10 Marc Autret <autret_m@epita.fr>
1260
1261 * src/reader.c (symbols_output): Clean up.
1262 * src/output.c (output_gram, output): Clean up.
1263
12642001-12-10 Akim Demaille <akim@epita.fr>
1265
1266 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1267 * src/LR0.c (set_state_table): here.
1268 * src/lalr.c (lalr): Call it.
1269
12702001-12-10 Akim Demaille <akim@epita.fr>
1271
1272 * src/state.h (shifts): Remove the `number' member: shifts are
1273 attached to state, hence no longer need to be labelled with a
1274 state number.
1275
12762001-12-10 Akim Demaille <akim@epita.fr>
1277
1278 Now that states have a complete set of members, the linked list of
1279 shifts is useless: just fill directly the state's shifts member.
1280
1281 * src/state.h (shifts): Remove the `next' member.
1282 * src/LR0.c (first_state, last_state): Remove.
1283 Adjust the callers.
1284 (augment_automaton): Don't look for the shifts that must be added
1285 a shift on EOF: it is those of the state we looked for! But now,
1286 since shifts are attached, it is no longer needed to looking
1287 merely by its id: its number.
1288
12892001-12-10 Akim Demaille <akim@epita.fr>
1290
1291 * src/LR0.c (augment_automaton): Better variable locality.
1292 Remove an impossible branch: if there is a state corresponding to
1293 the start symbol being shifted, then there is shift for the start
1294 symbol from the initial state.
1295
12962001-12-10 Akim Demaille <akim@epita.fr>
1297
1298 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1299 only when appropriate: when insert_start_shifting_state' is not
1300 invoked.
1301 * tests/regression.at (Rule Line Numbers): Adjust.
1302
13032001-12-10 Akim Demaille <akim@epita.fr>
1304
1305 * src/LR0.c (augment_automaton): Now that all states have shifts,
1306 merge the two cases addition shifts to the initial state.
1307
13082001-12-10 Akim Demaille <akim@epita.fr>
1309
1310 * src/lalr.c (set_state_table): Move to...
1311 * src/LR0.c: here.
1312 * src/lalr.c (lalr): Don't call it...
1313 * src/LR0.c (generate_states): do it.
1314 * src/LR0.h (first_state): Remove, only the table is used.
1315
13162001-12-10 Akim Demaille <akim@epita.fr>
1317
1318 * src/LR0.h (first_shift, first_reduction): Remove.
1319 * src/lalr.c: Don't use first_shift: find shifts through the
1320 states.
1321
13222001-12-10 Akim Demaille <akim@epita.fr>
1323
1324 * src/LR0.c: Attach shifts to states as soon as they are
1325 computed.
1326 * src/lalr.c (set_state_table): Instead of assigning shifts to
1327 state, just assert that the mapping was properly done.
1328
13292001-12-10 Akim Demaille <akim@epita.fr>
1330
1331 * src/LR0.c (insert_start_shift): Rename as...
1332 (insert_start_shifting_state): this.
1333 (insert_eof_shifting_state, insert_accepting_state): New.
1334 (augment_automaton): Adjust.
1335 Better locality of the variables.
1336 When looking if the start_symbol is shifted from the initial
1337 state, using `while (... symbol != start_symbol ...)' sounds
1338 better than `while (... symbol < start_symbol ...)': If fail
1339 to see how the order between symbols could be relevant!
1340
13412001-12-10 Akim Demaille <akim@epita.fr>
1342
1343 * src/getargs.h: Don't declare `spec_name_prefix' and
1344 `spec_file_prefix', declared by src/files.h.
1345 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1346 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1347 * src/output.c (prepare): Adjust.
1348 * src/reader.c (symbols_output): Likewise.
1349 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1350
13512001-12-10 Akim Demaille <akim@epita.fr>
1352
1353 * src/muscle_tab.c (muscle_init): NULL is a better default than
1354 `"0"'.
1355
13562001-12-10 Akim Demaille <akim@epita.fr>
1357
1358 * src/reader.c (reader): Calling symbols_output once is enough.
1359
13602001-12-10 Akim Demaille <akim@epita.fr>
1361
1362 Now that states have a complete set of members, the linked list of
1363 reductions is useless: just fill directly the state's reductions
1364 member.
1365
1366 * src/state.h (struct reductions): Remove member `number' and
1367 `next'.
1368 * src/LR0.c (first_reduction, last_reduction): Remove.
1369 (save_reductions): Don't link the new reductions, store them in
1370 this_state.
1371 * src/lalr.c (set_state_table): No need to attach reductions to
1372 states, it's already done.
1373 * src/output.c (output_actions): No longer free the shifts, then
1374 the reductions, then the states: free all the states and their
1375 members.
1376
13772001-12-10 Akim Demaille <akim@epita.fr>
1378
1379 * src/options.c (OPTN, DRTV, BOTH): New.
1380 (option_table): Use them.
1381
1382 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1383 the job of system.h.
1384 * src/options.c: Don't include stdio.h and xalloc.h for the same
1385 reasons.
1386
13872001-12-10 Akim Demaille <akim@epita.fr>
1388
1389 * src/output.c (output, prepare): Make sure the values of the
1390 muscles `action' and `prologue' are 0-terminated.
1391
13922001-12-10 Akim Demaille <akim@epita.fr>
1393
1394 Clean up GCC warnings.
1395
1396 * src/reader.c (copy_action): `buf' is not used.
1397 (parse_skel_decl): Be static.
1398 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1399 * src/options.h (create_long_option_table): Have a real prototype.
1400 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1401 (hash_delete_at): Return const void *.
1402 Adjust casts to preserve the const.
1403
14042001-12-10 Akim Demaille <akim@epita.fr>
1405
1406 * configure.in: Require 2.52g.
1407 M4 is not needed, but AUTOM4TE is.
1408 * m4/m4.m4: Remove.
1409 * tests/Makefile.am: Adjust.
1410
14112001-12-10 Akim Demaille <akim@epita.fr>
1412
1413 One structure for states is enough, even though theoretically
1414 there are LR(0) states and LALR(1) states.
1415
1416 * src/lalr.h (state_t): Remove.
1417 (state_table): Be state_t **, not state_t *.
1418 * src/state.h (core, CORE_ALLOC): Rename as...
1419 (state_t, STATE_ALLOC): this.
1420 Add the LALR(1) members: shifts, reductions, errs.
1421 * src/LR0.c (state_table): Rename as...
1422 (state_hash): this, to avoid name clashes with the global
1423 `state_table'.
1424 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1425 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1426
14272001-12-10 Akim Demaille <akim@epita.fr>
1428
1429 Bison dumps core on bash.y.
1430 Reported by Pascal Bart.
1431
1432 * src/warshall.c (bitmatrix_print): New.
1433 (TC): Use it.
1434 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1435 j must be the outer loop.
1436 * tests/regression.at (Broken Closure): New.
1437
14382001-12-05 Akim Demaille <akim@epita.fr>
1439
1440 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1441 its argument.
1442