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