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