1 2002-04-07 Akim Demaille <akim@epita.fr>
6 2002-04-07 Akim Demaille <akim@epita.fr>
8 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
9 bucket.value as bucket.number.
12 2002-04-07 Akim Demaille <akim@epita.fr>
14 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17 RHS, instead of being an index in RITEMS.
19 2002-04-04 Paul Eggert <eggert@twinsun.com>
21 * doc/bison.texinfo: Update copyright date.
22 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
23 (Symbols): Warn about running Bison in one character set,
24 but compiling and/or running in an incompatible one.
25 Warn about character code 256, too.
27 2002-04-03 Paul Eggert <eggert@twinsun.com>
29 * src/bison.data (YYSTACK_ALLOC): Depend on whether
30 YYERROR_VERBOSE is nonzero, not whether it is defined.
32 Merge changes from bison-1_29-branch.
34 2002-03-20 Paul Eggert <eggert@twinsun.com>
36 Merge fixes from Debian bison_1.34-1.diff.
38 * configure.in (AC_PREREQ): 2.53.
40 2002-03-20 Akim Demaille <akim@epita.fr>
42 * src/conflicts.c (log_resolution): Argument `resolution' is const.
44 2002-03-19 Paul Eggert <eggert@twinsun.com>
46 * src/bison.simple (YYCOPY): New macro.
47 (YYSTACK_RELOCATE): Use it.
48 Remove Type arg; no longer needed. All callers changed.
49 (yymemcpy): Remove; no longer needed.
51 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
52 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
54 2002-03-19 Akim Demaille <akim@epita.fr>
56 Test and fix the #line outputs.
58 * tests/atlocal.at (GCC): New.
59 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
60 (Prologue synch line, ,%union synch line, Postprologue synch line)
61 (Action synch line, Epilogue synch line): New tests.
62 * src/reader.c (parse_union_decl): Define the muscle stype_line.
63 * data/bison.simple, data/bison.c++: Use it.
66 2002-03-19 Akim Demaille <akim@epita.fr>
68 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
69 (Solved SR Conflicts, %expect not enough, %expect right)
70 (%expect too much): Move to...
71 * tests/conflicts.at: this new file.
73 2002-03-19 Akim Demaille <akim@epita.fr>
75 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
76 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
77 that we can move to enums for instance.
78 * src/output.c (token_definitions_output): Output a list of
79 `token-name, token-number' instead of the #define.
80 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
82 2002-03-14 Akim Demaille <akim@epita.fr>
86 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
88 * data/bison.c++: Make the user able to add members to the generated
89 parser by subclassing.
91 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
93 * src/reader.c (read_additionnal_code): `c' should be an integer, not
95 Reported by Nicolas Tisserand and Nicolas Burrus.
97 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
99 * src/reader.c: Warn about lacking semi-colons, do not complain.
101 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
103 * data/bison.c++: Remove a debug line.
105 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
107 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
108 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
109 provide a default implementation.
111 2002-03-04 Akim Demaille <akim@epita.fr>
113 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
114 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
115 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
116 * tests/semantic.at (Parsing Guards): Similarly.
117 * src/reader.at (readgram): Complain if the last rule is not ended
120 2002-03-04 Akim Demaille <akim@epita.fr>
122 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
123 * src/closure.c: here.
124 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
126 * src/warshall.h, src/warshall.c: Remove.
127 * tests/sets.at (Broken Closure): Adjust.
129 2002-03-04 Akim Demaille <akim@epita.fr>
131 * src/output.c (output_skeleton): tempdir is const.
132 bytes_read is unused.
134 2002-03-04 Akim Demaille <akim@epita.fr>
136 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
137 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
141 2002-03-04 Akim Demaille <akim@epita.fr>
143 * src/closure.c (closure): `r' is unused.
145 2002-03-04 Akim Demaille <akim@epita.fr>
147 * tests/sets.at (Broken Closure): Add the ending `;'.
148 * src/reader.at (readgram): Complain if a rule is not ended with a
151 2002-03-04 Akim Demaille <akim@epita.fr>
153 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
154 (count_sr_conflicts): Use bitset_count.
155 * src/reduce.c (inaccessable_symbols): Ditto.
157 * src/warshall.h, src/warshall.c: Convert to bitsetv.
159 2002-03-04 Akim Demaille <akim@epita.fr>
161 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
162 * src/reduce.c: Remove the `bitset_zero's following the
163 `bitset_create's, as now it is performed by the latter.
165 2002-03-04 Akim Demaille <akim@epita.fr>
167 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
168 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
169 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
170 latest sources from Michael.
172 2002-03-04 Akim Demaille <akim@epita.fr>
174 * src/output.c (output): Don't free the grammar.
175 * src/reader.c (grammar_free): New.
176 * src/main.c (main): Call it and don't free symtab here.
178 2002-03-04 Akim Demaille <akim@epita.fr>
180 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
182 Reported by Benoit Perrot.
184 2002-03-04 Akim Demaille <akim@epita.fr>
186 Use bitset operations when possible, not loops over bits.
188 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
190 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
191 * src/reduce.c (useless_nonterminals): Formatting changes.
192 * src/warshall.c (TC): Use bitset_or.
194 2002-03-04 Akim Demaille <akim@epita.fr>
196 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
197 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
200 2002-03-04 Akim Demaille <akim@epita.fr>
202 * src/lalr.c (F): Now a bitset*.
203 Adjust all dependencies.
205 2002-03-04 Akim Demaille <akim@epita.fr>
207 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
208 Adjust all dependencies.
210 2002-03-04 Akim Demaille <akim@epita.fr>
212 * src/L0.c, src/LR0.h (nstates): Be size_t.
213 Adjust comparisons (signed vs unsigned).
214 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
216 Adjust all dependencies.
218 2002-03-04 Akim Demaille <akim@epita.fr>
220 * src/closure.c (firsts): Now, also a bitset.
221 Adjust all dependencies.
222 (varsetsize): Remove, now unused.
223 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
225 2002-03-04 Akim Demaille <akim@epita.fr>
227 * src/print.c: Convert to use bitset.h, not hand coded iterations
230 2002-03-04 Akim Demaille <akim@epita.fr>
232 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
234 2002-03-04 Akim Demaille <akim@epita.fr>
236 * src/closure.c (ruleset): Be a bitset.
237 (rulesetsize): Remove.
239 2002-03-04 Akim Demaille <akim@epita.fr>
241 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
242 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
243 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
244 * src/closure.c (fderives): Be an array of bitsets.
246 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
248 * data/bison.c++: Merge the two generated headers. Insert a copyright
249 notice in each output file.
251 2002-02-28 Akim Demaille <akim@epita.fr>
253 * data/bison.c++: Copy the prologue of bison.simple to fetch
254 useful M4 definitions, such as b4_header_guard.
256 2002-02-25 Akim Demaille <akim@epita.fr>
258 * src/getargs.c (version): Give the name of the authors, and use a
259 translator friendly scheme for the bgr
262 2002-02-25 Akim Demaille <akim@epita.fr>
264 * src/output.c (header_output): Remove, now handled completely via
267 2002-02-25 Akim Demaille <akim@epita.fr>
269 * m4/m4.m4: New, from CVS Autoconf.
270 * configure.in: Invoke it.
271 * src/output.c (output_skeleton): Use its result instead of the
274 2002-02-25 Akim Demaille <akim@epita.fr>
276 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
278 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
279 * src/output.c (output_skeleton): Use mkstemp to create a real
281 Move the filling of `skeleton' and its muscle to...
283 (output): Move the definition of the prologue muscle to...
285 * src/system.h (DEFAULT_TMPDIR): New.
287 2002-02-14 Paul Eggert <eggert@twinsun.com>
289 Remove the support for C++ namespace cleanliness; it was
290 causing more problems than it was curing, since it didn't work
291 properly on some nonstandard C++ compilers. This can wait
292 for a proper C++ parser.
294 * NEWS: Document this.
295 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
296 of C++, as it's treated like C now.
297 * src/bison.simple (YYSTD): Remove.
298 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
299 Treat C++ just like Standard C instead of trying to support
300 namespace cleanliness.
302 2002-02-14 Akim Demaille <akim@epita.fr>
304 * tests/regression.at (else): Adjust to Andreas' change.
306 2002-02-14 Akim Demaille <akim@epita.fr>
308 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
310 2002-02-13 Andreas Schwab <schwab@suse.de>
312 * src/output.c (output_rule_data): Don't output NULL, it might
315 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
317 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
318 (Copyright notice): Update.
320 2002-02-11 Akim Demaille <akim@epita.fr>
322 * tests/regression.at (%nonassoc and eof): Don't include
325 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
327 * data/bison.c++: Correct error recovery. Make the user able to
328 initialize the starting location.
330 2002-02-07 Akim Demaille <akim@epita.fr>
332 * tests/input.at: New.
334 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
336 * data/bison.c++: Replace some direct m4 expansions by constants. Be
337 more consistent when naming methods and variables. Put preprocessor
338 directives around tables only needed for debugging.
340 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
342 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
344 (yy::b4_name::parse): Use print_.
346 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
348 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
350 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
352 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
354 (yy::b4_name::parse): Build verbose error messages, and use error_.
356 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
358 * data/bison.c++: Fix m4 quoting in comments.
360 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
362 * data/bison.c++: Adjust the parser code. Fix some muscles that were
365 2002-02-05 Akim Demaille <akim@epita.fr>
367 * data/bison.c++: Adjust to the M4 back end.
368 More is certainly needed.
370 2002-02-05 Akim Demaille <akim@epita.fr>
372 Give a try to M4 as a back end.
374 * lib/readpipe.c: New, from wdiff.
375 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
377 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
378 specific values. Now it is m4 that performs the lookup.
379 * src/parse-skel.y: Remove.
380 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
381 * src/output.c (actions_output, guards_output)
382 (token_definitions_output): No longer keeps track of the output
383 line number, hence remove the second argument.
384 (guards_output): Check against the guard member of a rule, not the
387 (output_skeleton): Don't look for the skeleton location, let m4 do
389 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
391 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
392 (prepare): Given that for the time being changesyntax is not
393 usable in M4, rename the muscles using `-' to `_'.
394 Define `defines_flag', `output_parser_name' and `output_header_name'.
395 * src/output.h (actions_output, guards_output)
396 (token_definitions_output): Adjust prototypes.
397 * src/scan-skel.l: Instead of scanning the skeletons, it now
398 processes the output of m4: `__oline__' and `#output'.
399 * data/bison.simple: Adjust to be used by M4(sugar).
400 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
402 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
403 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
404 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
405 shamelessly stolen from CVS Autoconf.
407 2002-02-05 Akim Demaille <akim@epita.fr>
409 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
410 * configure.in: Check for the declarations of free and malloc.
411 * src/muscle_tab.c: Adjust.
413 2002-02-05 Akim Demaille <akim@epita.fr>
415 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
416 which have no values.
418 2002-02-05 Akim Demaille <akim@epita.fr>
420 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
423 2002-01-29 Paul Eggert <eggert@twinsun.com>
425 * src/bison.simple (YYSIZE_T): Do not define merely because
426 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
427 On some platforms, <alloca.h> does not declare YYSTD (size_t).
429 2002-01-27 Akim Demaille <akim@epita.fr>
431 Fix `%nonassoc and eof'.
433 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
434 which were not properly copied! Replace
435 memcpy (res->errs, src->errs, src->nerrs);
437 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
439 * tests/regression.at (%nonassoc and eof): Adjust to newest
440 Autotest: `.' is not in the PATH.
442 2002-01-27 Akim Demaille <akim@epita.fr>
444 * tests/sets.at (AT_EXTRACT_SETS): New.
448 2002-01-26 Akim Demaille <akim@epita.fr>
450 * tests/actions.at, tests/calc.at, tests/headers.at,
451 * tests/torture.at: Adjust to the newest Autotest which no longer
452 forces `.' in the PATH.
454 2002-01-25 Akim Demaille <akim@epita.fr>
456 * tests/regression.at (%nonassoc and eof): New.
457 Suggested by Robert Anisko.
459 2002-01-24 Akim Demaille <akim@epita.fr>
461 Bison dumps core when trying to complain about broken input files.
462 Reported by Cris van Pelt.
464 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
465 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
467 (Invalid inputs): Strengthen: exercise parse_percent_token.
469 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
471 * src/Makefile.am: Add bison.c++.
472 * src/bison.c++: New skeleton.
474 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
478 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
480 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
482 2002-01-20 Marc Autret <marc@gnu.org>
484 * src/files.c (compute_output_file_names): Fix
486 2002-01-20 Marc Autret <marc@gnu.org>
488 * tests/output.at: New test.
489 * src/files.c (compute_base_names): Don't map extensions when
490 the YACC flag is set, use defaults.
491 Reported by Evgeny Stambulchik.
493 2002-01-20 Marc Autret <marc@gnu.org>
495 * src/system.h: Need to define __attribute__ away for non-GCC
496 compilers as well (i.e. the vendor C compiler).
497 Suggested by Albert Chin-A-Young.
499 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
501 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
502 canonical definition.
503 * src/system.h: Use the canonical definition for PARAMS (avoids
504 a conflict with the macro from lib/hash.h).
506 2002-01-11 Akim Demaille <akim@epita.fr>
508 * configure.in: Use AC_FUNC_STRNLEN.
509 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
511 2002-01-09 Akim Demaille <akim@epita.fr>
513 * src/files.c, src/files.h (output_infix): New.
514 (tab_extension): Remove.
515 (compute_base_names): Compute the former, drop the latter.
516 * src/output.c (prepare): Insert the muscles `output-infix', and
518 * src/parse-skel.y (string, string.1): New.
519 (section.header): Use it.
520 (section.yacc): Remove.
521 (prefix): Remove too.
522 * src/scan-skel.l: Adjust.
523 * src/bison.simple, src/bison.hairy: Adjust.
525 2002-01-09 Akim Demaille <akim@epita.fr>
527 * configure.in (WERROR_CFLAGS): Compute it.
528 * src/Makefile.am (CFLAGS): Pass it.
529 * tests/atlocal.in (CFLAGS): Idem.
530 * src/files.c: Fix a few warnings.
531 (get_extension_index): Remove, unused.
533 2002-01-08 Akim Demaille <akim@epita.fr>
535 * src/getargs.c (AS_FILE_NAME): New.
536 (getargs): Use it to convert DOSish file names.
537 * src/files.c (base_name): Rename as full_base_name to avoid
538 clashes with `base_name ()'.
539 (filename_split): New.
540 (compute_base_names): N-th rewrite, using filename_split.
542 2002-01-08 Akim Demaille <akim@epita.fr>
544 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
545 New, stolen from the Fileutils 4.1.
546 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
547 * configure.in: Check for the presence of memrchr, and of its
550 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
552 * lib/hash.h (__P): Added definition for this macro.
553 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
554 BUILT_SOURCES, to ensure they are generated first.
555 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
556 %error-verbose to allow bootstrapping with bison 1.30x.
558 2002-01-06 Akim Demaille <akim@epita.fr>
560 * src/reader.c (parse_braces): Don't fetch the next char, the
561 convention is to fetch on entry.
562 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
563 'switch' without a following semicolon.
564 * tests/regression.at (braces parsing): New.
566 2002-01-06 Akim Demaille <akim@epita.fr>
568 Bison is dead wrong in its RR conflict reports.
570 * tests/torture.at (GNU Cim Grammar): New.
571 * src/conflicts.c (count_rr_conflicts): Fix.
573 2002-01-06 Akim Demaille <akim@epita.fr>
575 Creating package.m4 from configure.ac causes too many problems.
577 * tests/Makefile.am (package.m4): Create it by hand,
578 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
580 2002-01-06 Akim Demaille <akim@epita.fr>
582 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
585 2002-01-04 Paul Eggert <eggert@twinsun.com>
587 * doc/bison.texinfo (Debugging):
588 Remove YYSTDERR; it's no longer defined or used.
589 Also, s/cstdio.h/cstdio/.
591 2002-01-03 Akim Demaille <akim@epita.fr>
593 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
595 2002-01-03 Akim Demaille <akim@epita.fr>
597 * src/parse-skel.y (process_skeleton): Don't bind the parser's
598 tracing code to --trace, wait for a better --trace option, with
601 2002-01-03 Akim Demaille <akim@epita.fr>
603 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
604 The ISO C++ standard is extremely clear about it: stderr is
605 considered a macro, not a regular symbol (see table 94 `Header
606 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
607 Therefore std:: does not apply to it. It still does with fprintf.
608 Also, s/cstdio.h/cstdio/.
610 2002-01-03 Akim Demaille <akim@epita.fr>
612 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
613 for non system headers.
615 2002-01-02 Akim Demaille <akim@epita.fr>
617 Equip the skeleton chain with location tracking, runtime trace,
618 pure parser and scanner.
620 * src/parse-skel.y: Request a pure parser, locations, and prefix
622 (%union): Having several members with the same type does not help
623 type mismatches, simplify.
624 (YYPRINT, yyprint): New.
625 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
628 * src/scan-skel.l: Adjust to these changes.
629 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
630 (LOCATION_PRINT, skel_control_t): New.
632 2001-12-30 Akim Demaille <akim@epita.fr>
634 * src/parse-skel.y: Get rid of the shift/reduce conflict:
635 replace `gb' with BLANKS.
636 * src/scan-skel.l: Adjust.
638 2001-12-30 Akim Demaille <akim@epita.fr>
640 * src/system.h: We don't need nor want bcopy.
641 Throw away MS-DOS crap: we don't need getpid.
642 * configure.in: We don't need strndup. It was even causing
643 problems: because Flex includes the headers *before* us,
644 _GNU_SOURCE is not defined by config.h, and therefore strndup was
646 * lib/xstrndup.c: New.
647 * src/scan-skel.l: Use it.
648 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
649 * src/parse-skel.y: Use %directives instead of #defines.
651 2001-12-30 Akim Demaille <akim@epita.fr>
653 * src/skeleton.h: New.
654 * src/output.c (output_parser, output_master_parser): Remove, dead
656 * src/output.h (get_lines_number, actions_output, guards_output)
657 (token_definitions_output): Prototype them.
658 * src/parse-skel.y: Add the license notice.
659 Include output.h and skeleton.h.
660 (process_skeleton): Returns void, and takes a single parameter.
661 * src/scan-skel.l: Add the license notice.
663 Don't use %option yylineno: it seems that then Flex imagines
664 REJECT has been used, and therefore it won't reallocate its
665 buffers (which makes no other sense to me than a bug). It results
666 in warnings for `unused: yy_flex_realloc'.
668 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
670 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
671 (MUSCLE_INSERT_PREFIX): ...to there.
672 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
673 (MUSCLE_INSERT_PREFIX): Move from here...
675 * src/bison.hairy: Add a section directive. Put braces around muscle
676 names. This parser skeleton is still broken, but Bison should not
677 choke on a bad muscle 'syntax'.
678 * src/bison.simple: Add a section directive. Put braces around muscle
681 * src/files.h (strsuffix, stringappend): Add declarations.
682 (tab_extension): Add declaration.
683 (short_base_name): Add declaration.
685 * src/files.c (strsuffix, stringappend): No longer static. These
686 functions are used in the skeleton parser.
687 (tab_extension): New.
688 (compute_base_names): Use the computations done in this function
689 to guess if the generated parsers should have '.tab' in their
691 (short_base_name): No longer static.
693 * src/output.c (output_skeleton): New.
694 (output): Disable call to output_master_parser, and give a try to
695 a new skeleton handling system.
696 (guards_output, actions_output): No longer static.
697 (token_definitions_output, get_lines_number): No longer static.
699 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
701 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
704 * src/parse-skel.y: New file.
705 * src/scan-skel.l: New file.
707 2001-12-29 Akim Demaille <akim@epita.fr>
709 %name-prefix is broken.
711 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
712 Adjust all dependencies.
713 * tests/headers.at (export YYLTYPE): Strengthen this test: use
716 Renaming yylval but not yylloc is not consistent. Now we do.
718 * src/bison.simple: Prefix yylloc if used.
719 * doc/bison.texinfo (Decl Summary): Document that.
721 2001-12-29 Akim Demaille <akim@epita.fr>
723 * doc/bison.texinfo: Promote `%long-directive' over
725 Remove all references to fixed-output-files, yacc is enough.
727 2001-12-29 Akim Demaille <akim@epita.fr>
729 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
730 user prologue. These are defaults.
731 * tests/actions.at (Mid-rule actions): Make sure the user can
732 define YYDEBUG and YYERROR_VERBOSE.
734 2001-12-29 Akim Demaille <akim@epita.fr>
736 * src/output.c (header_output): Don't forget to export YYLTYPE and
738 * tests/headers.at (export YYLTYPE): New, make sure it does.
739 * tests/regression.at (%union and --defines, Invalid CPP headers):
741 * tests/headers.at: here.
743 2001-12-29 Akim Demaille <akim@epita.fr>
745 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
747 2001-12-29 Akim Demaille <akim@epita.fr>
749 * tests/actions.at (Mid-rule actions): Output on a single line
752 2001-12-29 Akim Demaille <akim@epita.fr>
754 * doc/bison.texinfo: Formatting changes.
756 2001-12-29 Akim Demaille <akim@epita.fr>
758 Don't store the token defs in a muscle, just be ready to output it
759 on command. Now possible via `symbols'. Fixes a memory leak.
761 * src/output.c (token_definitions_output): New.
762 (output_parser, header_output): Use it.
763 * src/reader.c (symbols_save): Remove.
765 2001-12-29 Akim Demaille <akim@epita.fr>
767 * src/bison.simple: Do not provide a default for YYSTYPE and
768 YYLTYPE before the user's prologue. Otherwise it's hardly... a
771 2001-12-29 Akim Demaille <akim@epita.fr>
773 Mid-rule actions are simply... ignored!
775 * src/reader.c (readgram): Be sure to attach mid-rule actions to
776 the empty-rule associated to the dummy symbol, not to the host
778 * tests/actions.at (Mid-rule actions): New.
780 2001-12-29 Akim Demaille <akim@epita.fr>
784 * src/reader.c (reader): Free grammar.
786 2001-12-29 Akim Demaille <akim@epita.fr>
790 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
791 since it allocates it for each state, although only one is needed.
792 (allocate_storage): Do it here.
794 2001-12-29 Akim Demaille <akim@epita.fr>
796 * src/options.h, src/options.c (create_long_option_table): Rename
798 (long_option_table_new): this, with a clearer prototype.
799 (percent_table): Remove, unused,
800 * src/getargs.c (getargs): Adjust.
802 2001-12-29 Akim Demaille <akim@epita.fr>
804 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
805 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
808 2001-12-29 Akim Demaille <akim@epita.fr>
810 * src/lalr.c (build_relations): Rename `states' as `states1'.
811 Sorry, I don't understand exactly what it is, no better name...
813 2001-12-29 Akim Demaille <akim@epita.fr>
815 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
816 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
817 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
820 2001-12-29 Akim Demaille <akim@epita.fr>
822 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
825 2001-12-29 Akim Demaille <akim@epita.fr>
827 * src/reader.c, src/reader.h (user_toknums): Remove.
828 Adjust all users to use symbols[i]->user_token_number.
830 2001-12-29 Akim Demaille <akim@epita.fr>
832 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
833 Adjust all users to use symbols[i]->prec or ->assoc.
835 2001-12-29 Akim Demaille <akim@epita.fr>
837 * src/reader.c, src/reader.h (tags): Remove.
838 Adjust all users to use symbols[i]->tag.
840 2001-12-29 Akim Demaille <akim@epita.fr>
842 * src/gram.h, src/gram.c (symbols): New, similar to state_table
844 * src/reader.c (packsymbols): Fill this table.
846 * src/conflicts.c (resolve_sr_conflict): Adjust.
847 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
849 Use symbols[i]->tag instead of tags[i].
851 2001-12-29 Akim Demaille <akim@epita.fr>
853 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
854 In addition, put a comment in there, to replace...
855 * tests/regression.at (%union and C comments): Remove.
857 2001-12-29 Akim Demaille <akim@epita.fr>
859 * tests/regression.at (Web2c Actions): Blindly move the actual
860 output as expected output. The contents *seem* right to me, but I
861 can't pretend reading perfectly parser tables... Nonetheless, all
862 the other tests pass correctly, the table look OK, even though the
863 presence of `$axiom' is to be noted: AFAICS it is useless (but
866 2001-12-29 Akim Demaille <akim@epita.fr>
868 * src/reader.c (readgram): Don't add the rule 0 if there were no
869 rules read. In other words, add it _after_ having performed
870 grammar sanity checks.
871 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
873 2001-12-29 Akim Demaille <akim@epita.fr>
875 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
876 visible, and some states have now a different number.
878 2001-12-29 Akim Demaille <akim@epita.fr>
880 * src/reader.c (readgram): Bind the initial rule's lineno to that
882 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
883 (Solved SR Conflicts): Adjust rule 0's line number.
885 2001-12-29 Akim Demaille <akim@epita.fr>
887 Fix the `GAWK Grammar' failure.
889 * src/LR0.c (final_state): Initialize to -1 so that we do compute
890 the reductions of the first state which was mistakenly confused
891 with the final state because precisely final_state was initialized
893 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
894 now noticed by Bison.
895 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
896 have a reduction on $default.
898 2001-12-29 Akim Demaille <akim@epita.fr>
900 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
902 * src/closure.c (print_closure): Likewise.
903 * src/derives.c (print_derives): Likewise.
904 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
907 2001-12-29 Akim Demaille <akim@epita.fr>
909 * src/lalr.c (lookaheads_print): New.
910 (lalr): Call it when --trace-flag.
911 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
914 2001-12-29 Akim Demaille <akim@epita.fr>
916 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
917 when walking through ritem, even via rule->rhs.
918 * src/reduce.c (dump_grammar, useful_production, reduce_output)
919 (useful_production, useless_nonterminals): Likewise.
920 (reduce_grammar_tables): Likewise, plus update nritems.
921 * src/nullable.c (set_nullable): Likewise.
922 * src/lalr.c (build_relations): Likewise.
923 * tests/sets.at (Nullable): Adjust.
924 Fortunately, now, the $axiom is no longer nullable.
926 2001-12-29 Akim Demaille <akim@epita.fr>
928 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
930 * src/gram.c (ritem_longest_rhs): Likewise.
931 * src/reduce.c (nonterminals_reduce): Likewise.
932 * src/print_graph.c (print_graph): Likewise.
933 * src/output.c (output_rule_data): Likewise.
934 * src/nullable.c (set_nullable): Likewise.
936 2001-12-29 Akim Demaille <akim@epita.fr>
938 * src/output.c: Comment changes.
940 2001-12-27 Paul Eggert <eggert@twinsun.com>
942 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
943 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
944 Sparc, as they were causing more porting problems than the
945 (minor) performance improvement was worth.
947 Also, catch up with 1.31's YYSTD.
949 2001-12-27 Akim Demaille <akim@epita.fr>
951 * src/output.c (output_gram): Rely on nritems, not the
952 0-sentinel. See below.
953 Use -1 as separator, not 0.
954 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
955 Rely on -1 as separator in yyrhs, instead of 0.
956 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
957 twice `Now at end of input', therefore there are two lines less to
960 2001-12-27 Akim Demaille <akim@epita.fr>
962 * tests/regression.at (Unresolved SR Conflicts):
963 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
966 2001-12-27 Akim Demaille <akim@epita.fr>
968 * src/LR0.c (new_state): Recognize the final state by the fact it
969 is reached by eoftoken.
970 (insert_start_shifting_state, insert_eof_shifting_state)
971 (insert_accepting_state, augment_automaton): Remove, since now
972 these states are automatically computed from the initial state.
973 (generate_states): Adjust.
974 * src/print.c: When reporting a rule number to the user, substract
975 1, so that the axiom rule is rule 0, and the first user rule is 1.
976 * src/reduce.c: Likewise.
977 * src/print_graph.c (print_core): For the time being, just as for
978 the report, depend upon --trace-flags to dump the full set of
980 * src/reader.c (readgram): Once the grammar read, insert the rule
981 0: `$axiom: START-SYMBOL $'.
982 * tests/set.at: Adjust: rule 0 is now displayed, and since the
983 number of the states has changed (the final state is no longer
984 necessarily the last), catch up.
986 2001-12-27 Akim Demaille <akim@epita.fr>
988 Try to make the use of the eoftoken valid. Given that its value
989 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
990 is used instead of > 0 where appropriate, (ii), depend upon nritems
991 instead of the 0-sentinel.
993 * src/gram.h, src/gram.c (nritems): New.
994 Expected to be duplication of nitems, but for the time being...
995 * src/reader.c (packgram): Assert nritems and nitems are equal.
996 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
997 * src/closure.c (print_closure, print_fderives): Likewise.
998 * src/gram.c (ritem_print): Likewise.
999 * src/print.c (print_core, print_grammar): Likewise.
1000 * src/print_graph.c: Likewise.
1002 2001-12-27 Akim Demaille <akim@epita.fr>
1004 * src/main.c (main): If there are complains after grammar
1005 reductions, then output the report anyway if requested, then die.
1006 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1007 * src/reader.c (eoftoken): New.
1008 (parse_token_decl): If the token being defined has value `0', it
1010 (packsymbols): No longer hack `tags' to insert `$' by hand.
1011 Be sure to preserve the value of the eoftoken.
1012 (reader): Make sure eoftoken is defined.
1013 Initialize nsyms to 0: now eoftoken is created just like the others.
1014 * src/print.c (print_grammar): Don't special case the eof token.
1015 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1016 lie anyway, albeit pleasant.
1017 * tests/calc.at: Exercise error messages with eoftoken.
1018 Change the grammar so that empty input is invalid.
1019 Adjust expectations.
1020 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1022 2001-12-27 Akim Demaille <akim@epita.fr>
1024 * configure.in: Check the protos of strchr ans strspn.
1025 Replace strchr if needed.
1026 * src/system.h: Provide the protos of strchr, strspn and memchr if
1028 * lib/strchr.c: New.
1029 * src/reader.c (symbols_save): Use strchr.
1031 2001-12-27 Akim Demaille <akim@epita.fr>
1033 * src/print.c, src/print_graph.c (escape): New.
1034 Use it to quote the TAGS outputs.
1035 * src/print_graph.c (print_state): Now errors are in red, and
1036 reductions in green.
1037 Prefer high to wide: output the state number on a line of its own.
1039 2001-12-27 Akim Demaille <akim@epita.fr>
1041 * src/state.h, src/state.c (reductions_new): New.
1042 * src/LR0.c (set_state_table): Let all the states have a
1043 `reductions', even if reduced to 0.
1044 (save_reductions): Adjust.
1045 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1046 * src/print.c (print_reductions, print_actions): Adjust.
1047 * src/output.c (action_row): Adjust.
1049 2001-12-27 Akim Demaille <akim@epita.fr>
1051 * src/state.h, src/state.c (errs_new, errs_dup): New.
1052 * src/LR0.c (set_state_table): Let all the states have an errs,
1053 even if reduced to 0.
1054 * src/print.c (print_errs, print_reductions): Adjust.
1055 * src/output.c (output_actions, action_row): Adjust.
1056 * src/conflicts.c (resolve_sr_conflict): Adjust.
1058 2001-12-27 Akim Demaille <akim@epita.fr>
1060 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1062 2001-12-27 Akim Demaille <akim@epita.fr>
1064 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1065 * src/print.c: here.
1066 (lookaheadset, shiftset): New, used as additional storage by
1068 (print_results): Adjust.
1069 (print_shifts, print_gotos, print_errs): New, extracted from...
1070 (print_actions): here.
1071 * src/print_graph.c (print_actions): Remove dead code.
1073 2001-12-27 Akim Demaille <akim@epita.fr>
1075 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1078 2001-12-27 Akim Demaille <akim@epita.fr>
1080 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1081 (build_relations): Adjust.
1083 2001-12-27 Akim Demaille <akim@epita.fr>
1085 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1088 2001-12-27 Akim Demaille <akim@epita.fr>
1090 * src/reader.c (packgram): Catch nitems overflows.
1092 2001-12-27 Akim Demaille <akim@epita.fr>
1094 * src/files.c, src/files.h (guard_obstack): Remove.
1095 * src/output.c (output): Adjust.
1096 * src/reader.c (parse_braces): New, factoring...
1097 (copy_action, copy_guard): these two which are renamed as...
1098 (parse_action, parse_guard): these.
1099 As a voluntary consequence, using braces around guards is now
1102 2001-12-27 Akim Demaille <akim@epita.fr>
1104 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1105 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1107 (symbol_list_new): Adjust.
1108 (copy_action): action_line is the first line, not the last.
1109 (copy_guard): Just as for actions, store the `action' only, not
1110 the switch/case/break flesh.
1111 Don't parse the user action that might follow the guard, let...
1112 (readgram): do it, i.e., now, there can be an action after a
1114 In other words the guard is just explicitly optional.
1116 * src/output.c (guards_output): New.
1117 (output_parser): Call it when needed.
1118 (output): Also free the guard and attrs obstacks.
1119 * src/files.c, src/files.h (obstack_save): Remove.
1120 (output_files): Remove.
1121 As a result, if one needs the former `.act' file, using an
1122 appropriate skeleton which requires actions and guards is now
1124 * src/main.c (main): Adjust.
1125 * tests/semantic.at: New.
1126 * tests/regression.at: Use `input.y' as input file name.
1127 Avoid 8+3 problems by requiring input.c when the test needs the
1130 2001-12-27 Akim Demaille <akim@epita.fr>
1132 * src/reader.c (symbol_list_new): Be sure to initialize all the
1135 2001-12-27 Akim Demaille <akim@epita.fr>
1137 All the hacks using a final pseudo state are now useless.
1139 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1140 * src/lalr.c (nLA): New.
1141 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1142 instead of lookaheadsp from the pseudo state (nstate + 1).
1144 2001-12-27 Akim Demaille <akim@epita.fr>
1146 * src/output.c (action_row, token_actions): Use a state_t instead
1147 of a integer, and nlookaheads instead of the following state's
1150 2001-12-27 Akim Demaille <akim@epita.fr>
1152 * src/conflicts.c (log_resolution, flush_shift)
1153 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1154 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1155 (conflicts_print, print_reductions): Use a state_t instead of an
1156 integer when referring to a state.
1157 As much as possible, depend upon nlookaheads, instead of the
1158 `lookaheadsp' member of the following state (since lookaheads of
1159 successive states are successive, the difference between state n + 1
1160 and n served as the number of lookaheads for state n).
1161 * src/lalr.c (add_lookback_edge): Likewise.
1162 * src/print.c (print_core, print_actions, print_state)
1163 (print_results): Likewise.
1164 * src/print_graph.c (print_core, print_actions, print_state)
1165 (print_graph): Likewise.
1166 * src/conflicts.h: Adjust.
1168 2001-12-27 Akim Demaille <akim@epita.fr>
1170 * src/bison.hairy: Formatting/comment changes.
1172 Remove `register' indications.
1173 Add plenty of `static'.
1175 2001-12-27 Akim Demaille <akim@epita.fr>
1177 * src/output.c (prepare): Drop the muscle `ntbase' which
1179 * src/bison.simple: Formatting/comment changes.
1180 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1181 is an undocumented synonym.
1183 2001-12-22 Akim Demaille <akim@epita.fr>
1185 * src/output.c (output_table_data): Change the prototype to use
1186 `int' for array ranges: some invocations do pass an int, not a
1188 Reported by Wayne Green.
1190 2001-12-22 Akim Demaille <akim@epita.fr>
1192 Some actions of web2c.y are improperly triggered.
1193 Reported by Mike Castle.
1195 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1196 * tests/regression.at (Web2c): Rename as...
1197 (Web2c Report): this.
1198 (Web2c Actions): New.
1200 2001-12-22 Akim Demaille <akim@epita.fr>
1202 Reductions in web2c.y are improperly reported.
1203 Reported by Mike Castle.
1205 * src/conflicts.c (print_reductions): Fix.
1206 * tests/regression.at (Web2c): New.
1208 2001-12-18 Akim Demaille <akim@epita.fr>
1210 Some host fail on `assert (!"foo")', which expands to
1211 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1212 Reported by Nelson Beebee.
1214 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1215 `#define it_succeeded 0' and `assert (it_succeeded)'.
1217 2001-12-17 Marc Autret <autret_m@epita.fr>
1219 * src/bison.simple: Don't hard code the skeleton line and filename.
1220 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1221 New line counter 'skeleton_line' (skeleton-line muscle).
1223 2001-12-17 Paul Eggert <eggert@twinsun.com>
1225 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1226 YYDEBUG must be defined to a nonzero value.
1228 * src/bison.simple (yytname): Do not assume that the user defines
1229 YYDEBUG to a properly parenthesized expression.
1231 2001-12-17 Akim Demaille <akim@epita.fr>
1233 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1234 nlookaheads is a new member.
1236 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1237 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1240 2001-12-17 Akim Demaille <akim@epita.fr>
1242 * src/files.h, src/files.c (open_files, close_files): Remove.
1243 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1245 * src/reader.c (reader): Do it.
1247 2001-12-17 Akim Demaille <akim@epita.fr>
1249 * src/conflicts.c (print_reductions): Formatting changes.
1251 2001-12-17 Akim Demaille <akim@epita.fr>
1253 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1254 (flush_reduce): New.
1255 (resolve_sr_conflict): Adjust.
1257 2001-12-17 Akim Demaille <akim@epita.fr>
1259 * src/output.c (output_obstack): Be static and rename as...
1260 (format_obstack): this, to avoid any confusion with files.c's
1262 * src/reader.h (muscle_obstack): Move to...
1263 * src/output.h: here, since it's defined in output.c.
1265 2001-12-17 Akim Demaille <akim@epita.fr>
1267 * src/output.c (action_row, save_column, default_goto)
1268 (sort_actions, matching_state, pack_vector): Better variable
1271 2001-12-17 Akim Demaille <akim@epita.fr>
1273 * src/output.c: Various formatting changes.
1275 2001-12-17 Akim Demaille <akim@epita.fr>
1277 * src/files.c (output_files): Free the output_obstack.
1278 * src/main.c (main): Call print and print_graph conditionally.
1279 * src/print.c (print): Work unconditionally.
1280 * src/print_graph.c (print_graph): Work unconditionally.
1281 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1283 2001-12-16 Marc Autret <autret_m@epita.fr>
1285 * src/output.c (actions_output): Fix. When we use %no-lines,
1286 there is one less line per action.
1288 2001-12-16 Marc Autret <autret_m@epita.fr>
1290 * src/bison.simple: Remove a useless #line directive.
1291 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1292 * src/output.c (get_lines_number): New.
1293 (output_parser): Adjust, now takes care about the lines of a
1296 (actions_output): Computes the number of lines taken by actions.
1297 (output_master_parser): Insert new skeleton which is the name of
1298 the output parser file name.
1300 2001-12-15 Marc Autret <autret_m@epita.fr>
1302 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1304 2001-12-15 Marc Autret <autret_m@epita.fr>
1306 * src/output.c (output_gram): Keep track of the hairy one.
1308 2001-12-15 Akim Demaille <akim@epita.fr>
1310 Make `make distcheck' work.
1312 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1313 system.h which uses libgettext.h.
1315 2001-12-15 Akim Demaille <akim@epita.fr>
1317 * src/nullable.c (set_nullable): Useless rules must be skipped,
1318 otherwise, since we range over their symbols, we might look at a
1319 nonterminal which no longer ``exists'', i.e., it is not counted in
1320 `nvars', hence we overflow our arrays.
1322 2001-12-15 Akim Demaille <akim@epita.fr>
1324 The header can also be produced directly, without any obstack!
1327 * src/files.c, src/files.h (defines_obstack): Remove.
1328 (compute_header_macro): Global.
1329 (defines_obstack_save): Remove.
1330 * src/reader.c (parse_union_decl): No longer output to
1331 defines_obstack: its content can be found in the `stype' muscle
1333 (output_token_translations): Merge into...
1334 (symbols_output): this.
1336 (symbols_save): this.
1338 * src/output.c (header_output): New.
1341 2001-12-15 Akim Demaille <akim@epita.fr>
1343 * src/reader.c (parse_union_decl): Instead of handling two obstack
1344 simultaneously, use one to define the `stype' muscle, and use the
1345 value of the latter to fill defines_obstack.
1346 (copy_comment): Remove.
1347 (copy_comment2): Work for a single obstack.
1349 (copy_comment): this.
1351 2001-12-15 Akim Demaille <akim@epita.fr>
1353 * src/lex.c, src/lex.h (xgetc): No longer static.
1354 * src/reader.c (parse_union_decl): Revamp.
1356 2001-12-15 Akim Demaille <akim@epita.fr>
1358 Still making progress in separating Bison into (i) input, (ii)
1359 process, (iii) output: now we can directly output the parser file
1360 without using table_obstack at all.
1362 * src/files.c, src/files.h (table_obstack): Bye bye.
1363 (parser_file_name): New.
1364 * src/files.c (compute_output_file_names): Compute it.
1365 * src/output.c (actions_output, output_parser)
1366 (output_master_parser): To a file instead of an obstack.
1368 2001-12-15 Akim Demaille <akim@epita.fr>
1370 Attach actions to rules, instead of pre-outputting them to
1373 * src/gram.h (rule_t): action and action_line are new members.
1374 * src/reader.c (symbol_list): Likewise.
1375 (copy_action): Save the actions within the rule.
1376 (packgram): Save them in rule_table.
1377 * src/output.c (actions_output): New.
1378 (output_parser): Use it on `%%actions'.
1379 (output_rule_data): Don't free rule_table.
1381 (prepare): Don't save the `action' muscle.
1382 * src/bison.simple: s/%%action/%%actions/.
1384 2001-12-15 Akim Demaille <akim@epita.fr>
1386 * src/reader.c (copy_action): When --yacc, don't append a `;'
1387 to the user action: let it fail if lacking.
1388 Suggested by Arnold Robbins and Tom Tromey.
1390 2001-12-14 Akim Demaille <akim@epita.fr>
1392 * src/lex.c (literalchar): Simply return the char you decoded, non
1393 longer mess around with obstacks and int pointers.
1396 2001-12-14 Akim Demaille <akim@epita.fr>
1398 * src/lex.c (literalchar): Don't escape the special characters,
1399 just decode them, and keep them as char (before, eol was output as
1400 the 2 char string `\n' etc.).
1401 * src/output.c (output_rule_data): Use quotearg to output the
1404 2001-12-13 Paul Eggert <eggert@twinsun.com>
1406 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1407 Do not infringe on the global user namespace when using C++.
1408 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1409 All uses of `fprintf' and `stderr' changed.
1411 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1413 2001-12-13 Akim Demaille <akim@epita.fr>
1415 The computation of nullable is broken: it doesn't handle empty
1418 * tests/torture.at (GNU AWK Grammar): New.
1419 * tests/sets.at (Nullable): New.
1420 * src/nullable.c (set_nullable): Instead of blindly looping over
1421 `ritems', loop over the rules, and then over their rhs's.
1423 Work around Autotest bugs.
1425 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1426 frame, because Autotest understand lines starting with a `+' as
1427 traces from the shell. Then, they are not processed properly.
1428 Admittedly an Autotest bug, but we don't have time to wait for
1429 Autotest to catch up.
1430 * tests/regression.at (Broken Closure): Adjust to the new table
1433 * tests/sets.at: here.
1435 2001-12-13 Akim Demaille <akim@epita.fr>
1437 * src/closure.c (closure): Use nrules instead of playing tricks
1440 2001-12-13 Akim Demaille <akim@epita.fr>
1442 * src/print.c (print_actions): Output the handling of `$' as the
1443 traces do: shifting the token EOF. Before EOF was treated as a
1445 * tests/regression.at: Adjust some tests.
1446 * src/print_graph.c (print_core): Complete the set of items via
1447 closure. The next-to-final and final states are still unsatisfying,
1448 but that's to be addressed elsewhere.
1449 No longer output the rule numbers, but do output the state number.
1450 A single loop for the shifts + gotos is enough, but picked a
1451 distinct color for each.
1452 (print_graph): Initialize and finalize closure.
1454 2001-12-13 Akim Demaille <akim@epita.fr>
1456 * src/reader.c (readgram): Remove dead code, an strip useless
1458 (get_type): Remove, unused.
1460 2001-12-12 Akim Demaille <akim@epita.fr>
1462 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1463 on that of lib/error.c.
1465 2001-12-12 Akim Demaille <akim@epita.fr>
1467 Some hosts don't like `/' in includes.
1469 * src/system.h: Include libgettext.h without qualifying the path.
1470 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1473 2001-12-11 Marc Autret <autret_m@epita.fr>
1475 * src/output.c (output_parser): Remove useless muscle.
1477 2001-12-11 Marc Autret <autret_m@epita.fr>
1479 * src/bison.simple: Remove #line just before %%epilogue. It
1480 is now handled in ...
1481 * src/reader.c (read_additionnal_code): Add the output of a
1482 #line for the epilogue.
1484 2001-12-10 Marc Autret <autret_m@epita.fr>
1486 * src/reader.c (copy_definition): Re-use CPP-outed code which
1487 replace precedent remove.
1488 * src/bison.simple: Remove #line before %%prologue because
1489 %%input-line is wrong at this time.
1491 2001-12-10 Marc Autret <autret_m@epita.fr>
1493 * src/reader.c (symbols_output): Clean up.
1494 * src/output.c (output_gram, output): Clean up.
1496 2001-12-10 Akim Demaille <akim@epita.fr>
1498 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1499 * src/LR0.c (set_state_table): here.
1500 * src/lalr.c (lalr): Call it.
1502 2001-12-10 Akim Demaille <akim@epita.fr>
1504 * src/state.h (shifts): Remove the `number' member: shifts are
1505 attached to state, hence no longer need to be labelled with a
1508 2001-12-10 Akim Demaille <akim@epita.fr>
1510 Now that states have a complete set of members, the linked list of
1511 shifts is useless: just fill directly the state's shifts member.
1513 * src/state.h (shifts): Remove the `next' member.
1514 * src/LR0.c (first_state, last_state): Remove.
1516 (augment_automaton): Don't look for the shifts that must be added
1517 a shift on EOF: it is those of the state we looked for! But now,
1518 since shifts are attached, it is no longer needed to looking
1519 merely by its id: its number.
1521 2001-12-10 Akim Demaille <akim@epita.fr>
1523 * src/LR0.c (augment_automaton): Better variable locality.
1524 Remove an impossible branch: if there is a state corresponding to
1525 the start symbol being shifted, then there is shift for the start
1526 symbol from the initial state.
1528 2001-12-10 Akim Demaille <akim@epita.fr>
1530 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1531 only when appropriate: when insert_start_shifting_state' is not
1533 * tests/regression.at (Rule Line Numbers): Adjust.
1535 2001-12-10 Akim Demaille <akim@epita.fr>
1537 * src/LR0.c (augment_automaton): Now that all states have shifts,
1538 merge the two cases addition shifts to the initial state.
1540 2001-12-10 Akim Demaille <akim@epita.fr>
1542 * src/lalr.c (set_state_table): Move to...
1544 * src/lalr.c (lalr): Don't call it...
1545 * src/LR0.c (generate_states): do it.
1546 * src/LR0.h (first_state): Remove, only the table is used.
1548 2001-12-10 Akim Demaille <akim@epita.fr>
1550 * src/LR0.h (first_shift, first_reduction): Remove.
1551 * src/lalr.c: Don't use first_shift: find shifts through the
1554 2001-12-10 Akim Demaille <akim@epita.fr>
1556 * src/LR0.c: Attach shifts to states as soon as they are
1558 * src/lalr.c (set_state_table): Instead of assigning shifts to
1559 state, just assert that the mapping was properly done.
1561 2001-12-10 Akim Demaille <akim@epita.fr>
1563 * src/LR0.c (insert_start_shift): Rename as...
1564 (insert_start_shifting_state): this.
1565 (insert_eof_shifting_state, insert_accepting_state): New.
1566 (augment_automaton): Adjust.
1567 Better locality of the variables.
1568 When looking if the start_symbol is shifted from the initial
1569 state, using `while (... symbol != start_symbol ...)' sounds
1570 better than `while (... symbol < start_symbol ...)': If fail
1571 to see how the order between symbols could be relevant!
1573 2001-12-10 Akim Demaille <akim@epita.fr>
1575 * src/getargs.h: Don't declare `spec_name_prefix' and
1576 `spec_file_prefix', declared by src/files.h.
1577 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1578 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1579 * src/output.c (prepare): Adjust.
1580 * src/reader.c (symbols_output): Likewise.
1581 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1583 2001-12-10 Akim Demaille <akim@epita.fr>
1585 * src/muscle_tab.c (muscle_init): NULL is a better default than
1588 2001-12-10 Akim Demaille <akim@epita.fr>
1590 * src/reader.c (reader): Calling symbols_output once is enough.
1592 2001-12-10 Akim Demaille <akim@epita.fr>
1594 Now that states have a complete set of members, the linked list of
1595 reductions is useless: just fill directly the state's reductions
1598 * src/state.h (struct reductions): Remove member `number' and
1600 * src/LR0.c (first_reduction, last_reduction): Remove.
1601 (save_reductions): Don't link the new reductions, store them in
1603 * src/lalr.c (set_state_table): No need to attach reductions to
1604 states, it's already done.
1605 * src/output.c (output_actions): No longer free the shifts, then
1606 the reductions, then the states: free all the states and their
1609 2001-12-10 Akim Demaille <akim@epita.fr>
1611 * src/options.c (OPTN, DRTV, BOTH): New.
1612 (option_table): Use them.
1614 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1615 the job of system.h.
1616 * src/options.c: Don't include stdio.h and xalloc.h for the same
1619 2001-12-10 Akim Demaille <akim@epita.fr>
1621 * src/output.c (output, prepare): Make sure the values of the
1622 muscles `action' and `prologue' are 0-terminated.
1624 2001-12-10 Akim Demaille <akim@epita.fr>
1626 Clean up GCC warnings.
1628 * src/reader.c (copy_action): `buf' is not used.
1629 (parse_skel_decl): Be static.
1630 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1631 * src/options.h (create_long_option_table): Have a real prototype.
1632 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1633 (hash_delete_at): Return const void *.
1634 Adjust casts to preserve the const.
1636 2001-12-10 Akim Demaille <akim@epita.fr>
1638 * configure.in: Require 2.52g.
1639 M4 is not needed, but AUTOM4TE is.
1641 * tests/Makefile.am: Adjust.
1643 2001-12-10 Akim Demaille <akim@epita.fr>
1645 One structure for states is enough, even though theoretically
1646 there are LR(0) states and LALR(1) states.
1648 * src/lalr.h (state_t): Remove.
1649 (state_table): Be state_t **, not state_t *.
1650 * src/state.h (core, CORE_ALLOC): Rename as...
1651 (state_t, STATE_ALLOC): this.
1652 Add the LALR(1) members: shifts, reductions, errs.
1653 * src/LR0.c (state_table): Rename as...
1654 (state_hash): this, to avoid name clashes with the global
1656 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1657 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1659 2001-12-10 Akim Demaille <akim@epita.fr>
1661 Bison dumps core on bash.y.
1662 Reported by Pascal Bart.
1664 * src/warshall.c (bitmatrix_print): New.
1666 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1667 j must be the outer loop.
1668 * tests/regression.at (Broken Closure): New.
1670 2001-12-05 Akim Demaille <akim@epita.fr>
1672 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1674 Reported by Peter Hámorský.
1676 2001-12-05 Akim Demaille <akim@epita.fr>
1678 * src/conflicts.c (err_table): Remove.
1679 (resolve_sr_conflict): Adjust.
1680 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1682 (state_t.reductions, state_t.shifts): this.
1684 2001-12-05 Akim Demaille <akim@epita.fr>
1686 * src/reduce.c (reduce_grammar_tables): No longer disable the
1687 removal of useless rules via CPP but via `if (0)', so that the
1688 compiler still check the code is valid.
1689 For instance, it should have noticed `rline' no longer exists: use
1690 the `line' member of rule_t.
1691 * src/gram.c (dummy, rline): Remove, unused.
1693 2001-12-05 Akim Demaille <akim@epita.fr>
1695 * src/output.c (pack_vector): Use assert, not berror.
1696 * src/main.c (berror): Remove, unused.
1698 2001-12-05 Akim Demaille <akim@epita.fr>
1700 New experimental feature: if --verbose --trace output all the
1701 items of a state, not only its kernel.
1703 * src/print.c (print_core): If `trace_flag', then invoke closure
1704 before outputting the items of the state (print_core is no longer
1705 a correct name them).
1706 (print_results): Invoke new_closure/free_closure if needed.
1708 2001-12-05 Akim Demaille <akim@epita.fr>
1710 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1711 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1712 (nitemset): for consistency with the rest of the project.
1714 2001-12-05 Akim Demaille <akim@epita.fr>
1716 * src/closure.c (print_closure): Improve.
1717 (closure): Use it for printing input and output.
1719 2001-12-05 Akim Demaille <akim@epita.fr>
1721 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1722 indexed by nonterminals.
1724 2001-12-05 Akim Demaille <akim@epita.fr>
1726 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1728 * src/warshall.h: Remove accidental duplication of the content.
1730 2001-12-05 Akim Demaille <akim@epita.fr>
1732 * src/closure.c (set_fderives): De-obfuscate.
1734 2001-12-05 Akim Demaille <akim@epita.fr>
1736 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1738 2001-12-05 Akim Demaille <akim@epita.fr>
1740 * src/closure.c (set_firsts): De-obfuscate.
1742 2001-12-05 Akim Demaille <akim@epita.fr>
1744 * src/output.c (action_row): De-obfuscate
1745 using the good o' techniques: arrays not pointers, variable
1746 locality, BITISSET, RESETBIT etc.
1748 2001-12-05 Akim Demaille <akim@epita.fr>
1750 Pessimize the code to simplify it: from now on, all the states
1751 have a valid SHIFTS, which NSHIFTS is possibly 0.
1753 * src/LR0.c (shifts_new): Be global and move to..
1754 * src/state.c, src/state.h: here.
1755 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1756 * src/print_graph: Adjust.
1758 2001-12-05 Akim Demaille <akim@epita.fr>
1760 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1761 * src/conflicts.c: Use it.
1762 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1763 incorrectly ``simplified''.
1765 2001-12-05 Akim Demaille <akim@epita.fr>
1767 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1768 using the good o' techniques: arrays not pointers, variable
1769 locality, BITISSET, RESETBIT etc.
1771 2001-12-05 Akim Demaille <akim@epita.fr>
1773 * src/state.h (SHIFT_SYMBOL): New.
1774 * src/conflicts.c: Use it to deobfuscate.
1776 2001-12-05 Akim Demaille <akim@epita.fr>
1778 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1779 (print_reductions): De-obfuscate using the good o' techniques:
1780 arrays not pointers, variable locality, BITISSET.
1782 2001-12-05 Akim Demaille <akim@epita.fr>
1784 * src/conflicts.c (print_reductions): Arrays, not pointers.
1787 2001-12-05 Akim Demaille <akim@epita.fr>
1789 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1791 2001-12-05 Akim Demaille <akim@epita.fr>
1793 * src/conflicts.c (print_reductions): Improve variable locality.
1795 2001-12-05 Akim Demaille <akim@epita.fr>
1797 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1799 2001-12-05 Akim Demaille <akim@epita.fr>
1801 * src/conflicts.c (print_reductions): Improve variable locality.
1803 2001-12-05 Akim Demaille <akim@epita.fr>
1805 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1806 * src/lalr.c: Use them.
1808 2001-12-05 Akim Demaille <akim@epita.fr>
1810 * src/LR0.c (augment_automaton): Formatting changes.
1811 Better variable locality.
1813 2001-12-05 Akim Demaille <akim@epita.fr>
1815 * src/lalr.c (matrix_print): New.
1816 (transpose): Use it.
1817 Use arrays instead of pointers.
1819 2001-12-05 Akim Demaille <akim@epita.fr>
1821 * src/lalr.c (maxrhs): Move to...
1822 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1823 * src/lalr.c (build_relations): Adjust.
1825 2001-12-05 Akim Demaille <akim@epita.fr>
1827 * src/lalr.c (transpose): Free the memory allocated to the
1828 argument, as it is replaced by the results by the unique caller.
1829 (build_relations): Merely invoke transpose: it handles the memory
1831 Improve variable locality.
1832 Avoid variables used as mere abbreviations.
1833 (compute_lookaheads): Use arrays instead of pointers.
1835 2001-12-05 Akim Demaille <akim@epita.fr>
1837 * src/lalr.c (initialize_F): Improve variable locality.
1838 Avoid variables used as mere abbreviations.
1840 2001-12-05 Akim Demaille <akim@epita.fr>
1842 * src/derives.c (print_derives): Display the ruleno.
1843 * src/lalr.c (initialize_F, transpose): Better variable locality
1844 to improve readability.
1845 Avoid variables used as mere abbreviations.
1847 2001-12-05 Akim Demaille <akim@epita.fr>
1849 * src/lalr.c (traverse): Use arrays instead of pointers.
1851 2001-12-05 Akim Demaille <akim@epita.fr>
1853 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1854 the handling of squeue.
1855 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1857 2001-12-05 Akim Demaille <akim@epita.fr>
1859 Because useless nonterminals are now kept alive (instead of being
1860 `destroyed'), we now sometimes examine them, and store information
1861 related to them. Hence we need to know their number, and adjust
1864 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1866 * src/LR0.c (allocate_itemsets): The memory allocated to
1867 `symbol_count' was used for two different purpose: once to count
1868 the number of occurrences of each symbol, and later reassigned to
1869 `shift_symbol', containing the symbol that can be shifted from a
1871 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1873 (new_itemsets): Allocate `shift_symbol' here.
1874 (allocate_itemsets): symbol_count includes useless nonterminals.
1876 (free_storage): Use `free', not `XFREE', for pointers that cannot
1879 2001-12-05 Akim Demaille <akim@epita.fr>
1881 * src/nullable.c (set_nullable): Deobfuscate the handling of
1883 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1885 2001-12-05 Akim Demaille <akim@epita.fr>
1887 * src/gram.c, src/gram.h (ritem_print): New.
1888 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1889 (This useless function was defined only to work around VMS linkers
1890 that can't handle compilation units with variables only).
1891 * src/reduce.c (dump_grammar): Use it to trace the construction of
1894 2001-12-04 Paul Eggert <eggert@twinsun.com>
1896 * src/bison.simple (union yyalloc): Change member names
1897 to be the same as the stack names.
1898 (yyparse): yyptr is now union yyalloc *, not char *.
1899 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1900 and may generate better code on some machines.
1901 (yystpcpy): Use prototype if __STDC__ is defined, not just
1902 if __cplusplus is defined.
1904 2001-11-30 Akim Demaille <akim@epita.fr>
1906 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1907 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1908 Gettext doesn't compile cleanly, and dies with -Werror.
1909 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1910 Include WARNING_CFLAGS here.
1911 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1912 before being defined.
1914 2001-11-27 Paul Eggert <eggert@twinsun.com>
1916 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1917 First arg is int, not unsigned.
1918 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1919 (SIZE_MAX, UINT_MAX): New macros.
1920 (quotearg_n_options): Abort if N is negative.
1921 Avoid overflow check on hosts where size_t is 64 bits and int
1922 is 32 bits, as overflow is impossible there.
1923 Fix off-by-one typo that caused unnecessary reallocation.
1925 2001-11-29 Paul Eggert <eggert@twinsun.com>
1927 Name space cleanup in generated parser.
1929 * doc/bison.texinfo (Bison Parser): Discuss system headers
1930 and their effect on the user name space.
1933 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1934 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1935 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1937 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1938 on user names when possible.
1940 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1941 Simplify test for whather <alloca.h> exists.
1943 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1945 (<stdio.h>): Include if YYDEBUG.
1947 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1948 ! defined (yyoverflow) && ! defined (yymemcpy).
1950 (yymemcpy, yyparse): Rename local variables as needed so that
1951 they all begin with 'yy'.
1953 (yystrlen, yystpcpy): New functions.
1955 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1958 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1959 instead of relying on string.h functions. Use YYSTACK_ALLOC
1960 and YYSTACK_FREE instead of malloc and free.
1962 2001-11-30 Akim Demaille <akim@epita.fr>
1964 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1965 before their first uses.
1966 (YYBISON, YYPURE): Move to the top of the output.
1968 2001-11-30 Akim Demaille <akim@epita.fr>
1970 * tests/reduce.at (Useless Nonterminals): Fix.
1972 2001-11-30 Akim Demaille <akim@epita.fr>
1974 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1975 if body instead of `;' to pacify GCC's warnings.
1977 2001-11-30 Akim Demaille <akim@epita.fr>
1979 Instead of mapping the LHS of unused rules to -1, keep the LHS
1980 valid, but flag the rules as invalid.
1982 * src/gram.h (rule_t): `useful' is a new member.
1983 * src/print.c (print_grammar): Adjust.
1984 * src/derives.c (set_derives): Likewise.
1985 * src/reader.c (packgram, reduce_output): Likewise.
1986 * src/reduce.c (reduce_grammar_tables): Likewise.
1987 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1989 2001-11-30 Akim Demaille <akim@epita.fr>
1991 * src/reduce.c (reduce_output): Formatting changes.
1992 * src/print.c (print_results, print_grammar): Likewise.
1993 * tests/regression.at (Rule Line Numbers)
1994 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1996 2001-11-30 Akim Demaille <akim@epita.fr>
1998 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1999 useless nonterminals, move them at the end of the symbol arrays.
2000 (reduce_output): Adjust.
2001 * tests/reduce.at (Useless Nonterminals): Adjust.
2003 2001-11-30 Akim Demaille <akim@epita.fr>
2005 * src/reduce.c: Various comment/formatting changes.
2006 (nonterminals_reduce): New, extracted from...
2007 (reduce_grammar_tables): here.
2008 (reduce_grammar): Call nonterminals_reduce.
2010 2001-11-29 Paul Eggert <eggert@twinsun.com>
2012 * src/bison.simple (YYSTACK_REALLOC): Remove.
2013 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2014 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2016 (union yyalloc): New type.
2017 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2018 an arbitrary restriction on hosts where size_t is wider than int.
2020 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2021 a parser stack overflow. Allocate just one block of memory for all
2022 three stacks, instead of allocating three blocks; this typically is
2023 faster and reduces fragmentation.
2025 Do not limit the number of items in the stack to a value that fits
2026 in 'int', as this is an arbitrary limit on hosts with 64-bit
2027 size_t and 32-bit int.
2029 2001-11-29 Marc Autret <autret_m@epita.fr>
2031 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2032 of defining YYERROR_VERBOSE.
2033 [AT_DATA]: $4 is now out of C declarations in the prologue.
2035 2001-11-28 Marc Autret <autret_m@epita.fr>
2037 * src/reader.c (parse_dquoted_param): New.
2038 (parse_skel_decl): Use it.
2039 * src/lex.h: Add its prototype.
2040 * src/lex.c (literalchar): Become not static.
2042 2001-11-28 Marc Autret <autret_m@epita.fr>
2044 * src/output.h: And put its extern declaration here.
2045 * src/output.c (error_verbose): Define here.
2046 (prepare): Echo name modification.
2047 * src/getargs.h: Clean its extern declaration.
2048 * src/getargs.c (error_verbose_flag): Remove.
2049 (getargs): Remove case 'e'.
2050 * src/options.c (option_table): 'error-verbose' is now seen as simple
2054 * src/reader.c (read_declarations): Remove case tok_include.
2055 (parse_include_decl): Remove.
2056 * src/lex.h (token_t): Remove tok_include.
2057 * src/options.c (option_table): 'include' is now a simple command line
2060 2001-11-28 Marc Autret <autret_m@epita.fr>
2062 * src/bison.simple: Adjust muscle names.
2063 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2064 * src/output.c (prepare): s/_/-/ for the muscles names.
2065 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2067 2001-11-28 Marc Autret <autret_m@epita.fr>
2069 * src/bison.simple: Fix debug.
2070 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2072 2001-11-28 Akim Demaille <akim@epita.fr>
2074 * src/LR0.c (shifts_new): New.
2075 (save_shifts, insert_start_shift, augment_automaton): Use it.
2077 2001-11-28 Akim Demaille <akim@epita.fr>
2079 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2082 2001-11-28 Akim Demaille <akim@epita.fr>
2084 * src/closure.c (closure): Instead of looping over word in array
2085 then bits in words, loop over bits in array.
2087 2001-11-28 Akim Demaille <akim@epita.fr>
2089 * src/closure.c (closure): No longer optimize the special case
2090 where all the bits of `ruleset[r]' are set to 0, to make the code
2093 2001-11-28 Akim Demaille <akim@epita.fr>
2095 * src/closure.c (closure): `r' and `c' are new variables, used to
2096 de-obfuscate accesses to RULESET and CORE.
2098 2001-11-28 Akim Demaille <akim@epita.fr>
2100 * src/reduce.c (reduce_print): Use ngettext.
2101 (dump_grammar): Improve the trace accuracy.
2103 2001-11-28 Akim Demaille <akim@epita.fr>
2105 * src/reduce.c (dump_grammar): Don't translate trace messages.
2107 2001-11-28 Akim Demaille <akim@epita.fr>
2109 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2110 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2111 as all tags are free'ed afterwards.
2114 2001-11-27 Paul Eggert <eggert@twinsun.com>
2116 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2117 use alloca when we didn't want to, and vice versa.
2119 2001-11-27 Marc Autret <autret_m@epita.fr>
2121 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2123 * src/output.c (prepare): Remove its update.
2125 2001-11-27 Marc Autret <autret_m@epita.fr>
2127 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2130 2001-11-27 Marc Autret <autret_m@epita.fr>
2132 * src/bison.simple: Remove YYERROR_VERBOSE using.
2133 Use %%error_verbose.
2134 (yyparse): Likewise.
2135 * src/output.c (prepare): Give its final value.
2136 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2137 * src/getargs.h: Add its extern declaration.
2138 * src/getargs.c (error_verbose_flag): New int.
2139 (getargs): Update to catch new case.
2140 * src/options.c (option_table): 'error-verbose' is a new option.
2141 (shortopts): Update.
2143 2001-11-27 Akim Demaille <akim@epita.fr>
2145 * src/system.h: Use intl/libgettext.h.
2146 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2148 2001-11-27 Akim Demaille <akim@epita.fr>
2150 * tests/torture.at (Exploding the Stack Size with Malloc):
2151 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2153 2001-11-27 Akim Demaille <akim@epita.fr>
2155 * src/files.c: Include error.h.
2156 Reported by Hans Aberg.
2158 2001-11-26 Marc Autret <autret_m@epita.fr>
2160 * src/reader.c (parse_include_decl): New, not yet implemented.
2161 (read_declarations): Add case tok_include.
2162 * src/getargs.h (include): Add its extern definition.
2163 * src/getargs.c (include): New const char *.
2164 (getargs): Add case '-I'.
2165 * src/options.c (option_table): Add include as command line and
2167 * src/lex.h (token_t): Add tok_include.
2169 2001-11-26 Akim Demaille <akim@epita.fr>
2171 * src/reader.c (readgram): Make sure rules for mid-rule actions
2172 have a lineno equal to that of their host rule.
2173 Reported by Hans Aberg.
2174 * tests/regression.at (Rule Line Numbers): New.
2176 2001-11-26 Akim Demaille <akim@epita.fr>
2178 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2181 2001-11-26 Akim Demaille <akim@epita.fr>
2183 * src/complain.c, src/complain.h (error): Remove, provided by
2186 2001-11-26 Akim Demaille <akim@epita.fr>
2188 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2189 issue an error message.
2190 * tests/regression.at (Invalid %directive): New.
2191 Reported by Hans Aberg.
2193 2001-11-26 Akim Demaille <akim@epita.fr>
2195 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2196 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2198 2001-11-26 Akim Demaille <akim@epita.fr>
2200 * src/conflicts.c (conflicts_print): Don't complain at all when
2201 there are no reduce/reduce conflicts, and as many shift/reduce
2202 conflicts as expected.
2203 * tests/regression.at (%expect right): Adjust.
2205 2001-11-23 Akim Demaille <akim@epita.fr>
2207 * lib/alloca.c: Update, from fileutils.
2209 2001-11-23 Akim Demaille <akim@epita.fr>
2211 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2213 2001-11-23 Akim Demaille <akim@epita.fr>
2215 * src/system.h: Include alloca.h.
2216 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2218 2001-11-23 Akim Demaille <akim@epita.fr>
2220 * src/print_graph.c (print_actions): Remove `rule', unused.
2221 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2222 pacify GCC's signed < unsigned warnings.
2223 * src/closure.c (itemsetsize): Likewise.
2224 * src/reader.c (symbol_list_new): Static.
2226 2001-11-23 Akim Demaille <akim@epita.fr>
2228 Attaching lineno to buckets is stupid, since only one copy of each
2229 symbol is kept, only the line of the first occurrence is kept too.
2231 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2232 * src/reader.c (rline_allocated): Remove, unused.
2233 (symbol_list): Have a `line' member.
2234 (symbol_list_new): New.
2236 * src/print.c (print_grammar): Output the rule line numbers.
2237 * tests/regression.at (Solved SR Conflicts)
2238 (Unresolved SR Conflicts): Adjust.
2239 Reported by Hans Aberg.
2241 2001-11-22 Marc Autret <autret_m@epita.fr>
2243 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2245 2001-11-22 Marc Autret <autret_m@epita.fr>
2247 * src/muscle_tab.c (muscle_init): Remove initialization of
2249 * src/output.c (output_master_parser): Do it here.
2251 2001-11-20 Akim Demaille <akim@epita.fr>
2254 * configure.in (ALL_LINGUAS): Adjust.
2255 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2256 longer contains strings to translate.
2258 2001-11-19 Akim Demaille <akim@epita.fr>
2260 * src/conflicts.c (conflicts_print): Add a missing \n.
2262 2001-11-19 Akim Demaille <akim@epita.fr>
2264 * src/nullable.c (nullable_print): New.
2265 (set_nullable): Call it when tracing.
2266 Better locality of variables.
2268 2001-11-19 Akim Demaille <akim@epita.fr>
2270 * src/print.c (print_actions): Better locality of variables.
2272 2001-11-19 Akim Demaille <akim@epita.fr>
2274 * src/derives.c (print_derives): Fix and enrich.
2275 * src/closure.c (print_fderives): Likewise.
2277 2001-11-19 Akim Demaille <akim@epita.fr>
2279 * src/closure.c (itemsetend): Remove, replaced with...
2282 2001-11-19 Akim Demaille <akim@epita.fr>
2284 * src/LR0.c (kernel_end): Remove, replaced with...
2287 2001-11-19 Akim Demaille <akim@epita.fr>
2289 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2292 2001-11-19 Akim Demaille <akim@epita.fr>
2294 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2296 2001-11-19 Akim Demaille <akim@epita.fr>
2298 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2300 * src/LR0.c: Likewise.
2301 (allocate_itemsets): Use arrays instead of pointers to clarify.
2303 2001-11-19 Akim Demaille <akim@epita.fr>
2305 * src/getargs.c (statistics_flag): Replace with...
2307 (longopts): Accept --trace instead of --statistics.
2308 * src/getargs.h, src/options.c: Adjust.
2309 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2310 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2312 2001-11-19 Akim Demaille <akim@epita.fr>
2314 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2315 pointers to clarify the code.
2316 (save_reductions, save_shifts): Factor common parts of alternatives.
2318 2001-11-19 Akim Demaille <akim@epita.fr>
2320 * src/LR0.c (new_state, get_state): Complete TRACE code.
2321 * src/closure.c: Include `reader.h' to get `tags', needed by the
2323 Rename the conditional DEBUG as TRACE.
2324 Output consistently TRACEs to stderr, not stdout.
2325 * src/derives.c: Likewise.
2326 * src/reduce.c: (inaccessable_symbols): Using if is better style
2328 Use `#if TRACE' instead of `#if 0' for tracing code.
2330 2001-11-19 Akim Demaille <akim@epita.fr>
2332 * src/system.h (LIST_FREE, shortcpy): New.
2333 * src/LR0.c: Use them.
2334 * src/output.c (free_itemsets, free_reductions, free_shifts):
2335 Remove, replaced by LIST_FREE.
2337 2001-11-19 Akim Demaille <akim@epita.fr>
2339 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2340 (REDUCTIONS_ALLOC): New.
2341 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2344 2001-11-19 Akim Demaille <akim@epita.fr>
2346 * src/LR0.c (new_state): Complete trace code.
2347 * src/nullable.c (set_nullable): Don't translate traces.
2349 2001-11-19 Akim Demaille <akim@epita.fr>
2351 * src/print_graph.c (print_core): Better locality of variables.
2352 * src/print.c (print_core): Likewise.
2354 2001-11-19 Akim Demaille <akim@epita.fr>
2356 * src/vcg.c: You do the output, so you are responsible of the
2357 handling of VCG syntax, in particular: use quotearg.
2358 * src/print_graph.c: Don't.
2359 (print_actions): Don't output the actions as part of the nodes,
2360 since that's the job of the edges.
2361 (print_state): Don't output by hand: fill the node description,
2362 and ask for its output.
2364 2001-11-19 Akim Demaille <akim@epita.fr>
2366 * src/bison.simple (yyparse): When verbosely reporting an error,
2367 no longer put additional quotes around token names.
2368 * tests/calc.at: Adjust.
2370 2001-11-19 Akim Demaille <akim@epita.fr>
2372 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2373 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2374 * src/output.c: Adjust.
2376 2001-11-19 Akim Demaille <akim@epita.fr>
2378 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2380 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2382 2001-11-19 Akim Demaille <akim@epita.fr>
2384 * src/gram.h (rule_t): New.
2386 (rrhs, rlhs): Remove, part of state_t.
2387 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2388 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2389 * src/reader.c, src/reduce.c: Adjust.
2391 2001-11-19 Akim Demaille <akim@epita.fr>
2393 * src/reader.c (symbols_output): New, extracted from...
2394 (packsymbols): Here.
2397 2001-11-19 Akim Demaille <akim@epita.fr>
2399 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2400 (maxrhs): this new function.
2402 2001-11-19 Akim Demaille <akim@epita.fr>
2404 * src/lalr.c (F): New macro to access the variable F.
2407 2001-11-19 Akim Demaille <akim@epita.fr>
2409 * src/lalr.h (LA): New macro to access the variable LA.
2410 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2411 * src/lalr.c: Adjust.
2413 2001-11-19 Akim Demaille <akim@epita.fr>
2415 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2416 (set_state_table): handle the `lookaheads' members.
2418 2001-11-19 Akim Demaille <akim@epita.fr>
2420 * src/lalr.h (lookaheads): Removed array, whose contents is now
2422 (state_t): this structure.
2423 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2426 2001-11-19 Akim Demaille <akim@epita.fr>
2428 * src/lalr.h (consistent): Removed array, whose contents is now
2430 (state_t): this structure.
2431 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2434 2001-11-19 Akim Demaille <akim@epita.fr>
2436 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2437 contents are now members of...
2438 (state_t): this structure.
2439 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2442 2001-11-19 Akim Demaille <akim@epita.fr>
2444 * src/lalr.h (state_t): New.
2445 (state_table): Be a state_t * instead of a core **.
2446 (accessing_symbol): Remove, part of state_t.
2447 * src/lalr.c: Adjust.
2448 (set_accessing_symbol): Merge into...
2449 (set_state_table): this.
2450 * src/print_graph.c, src/conflicts.c: Adjust.
2452 2001-11-14 Akim Demaille <akim@epita.fr>
2454 * tests/calc.at, tests/output.at, tests/regression.at,
2455 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2456 now the tests are run in private dirs, therefore AC_CLEANUP and
2457 family can be simplified to 0-ary.
2458 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2459 use abs. path to find config.h.
2460 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2461 stderr, there can be way too much random noise.
2462 Instead pass -Werror to GCC and rely on the exit status.
2463 Reported by Wolfram Wagner.
2465 2001-11-14 Akim Demaille <akim@epita.fr>
2467 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2468 defined only if yyoverflow is defined, to avoid `warning: unused
2470 Reported by The Test Suite.
2472 2001-11-14 Akim Demaille <akim@epita.fr>
2474 * src/print.c: Include reduce.h.
2475 Reported by Hans Aberg.
2477 2001-11-14 Akim Demaille <akim@epita.fr>
2479 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2480 Revert a previous patch: these are really const.
2481 * src/conflicts.c (conflict_report): Additional useless pair of
2482 braces to pacify GCC's warnings for `if () if () {} else {}'.
2483 * src/lex.c (parse_percent_token): Replace equal_offset with
2486 Be sure to strdup `arg' when used, since there is no reason for
2487 token_buffer not to change.
2489 2001-11-14 Akim Demaille <akim@epita.fr>
2491 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2493 * src/main.c (main): Use them.
2494 Suggested by Hans Aberg.
2496 2001-11-12 Akim Demaille <akim@epita.fr>
2498 * src/system.h (ngettext): Now that we use ngettext, be sure to
2499 provide a default definition when NLS are not used.
2501 2001-11-12 Akim Demaille <akim@epita.fr>
2503 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2504 Use @kbd to denote user input.
2505 (Language and Grammar): ANSIfy the example.
2506 Adjust its layout for info/notinfo.
2507 (Location Tracking Calc): Output error messages to stderr.
2508 Output locations in a more GNUtically correct way.
2509 Fix a couple of Englishos.
2510 Adjust @group/@end group pairs.
2512 2001-11-12 Akim Demaille <akim@epita.fr>
2514 %expext was not functioning at all.
2516 * src/conflicts.c (expected_conflicts): Set to -1.
2517 (conflict_report): Use ngettext.
2518 (conflicts_print): Check %expect and make its violation an error.
2519 * doc/bison.texinfo (Expect Decl): Adjust.
2520 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2521 * tests/regression.at (%expect not enough, %expect right)
2522 (%expect too much): New.
2524 2001-11-12 Akim Demaille <akim@epita.fr>
2526 * tests/regression.at (Conflicts): Rename as...
2527 (Unresolved SR Conflicts): this.
2528 (Solved SR Conflicts): New.
2530 2001-11-12 Akim Demaille <akim@epita.fr>
2532 * src/reduce.c (print_results): Rename as...
2533 (reduce_output): This.
2534 Output to OUT, passed as argument, instead of output_obstack.
2535 (dump_grammar): Likewise.
2538 (reduce_grammar): No longer call reduce_output, since...
2539 * src/print.c (print_results): do it.
2540 * src/main.c (main): Call reduce_free;
2542 2001-11-12 Akim Demaille <akim@epita.fr>
2544 * src/conflicts.c (print_reductions): Accept OUT as argument.
2545 Output to it, not to output_obstack.
2546 * src/print.c (print_actions): Adjust.
2548 2001-11-12 Akim Demaille <akim@epita.fr>
2550 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2551 the result instead of using...
2552 (src_total, rrc_total, src_count, rrc_count): Remove.
2553 (any_conflicts): Remove.
2554 (print_conflicts): Split into...
2555 (conflicts_print, conflicts_output): New.
2556 * src/conflicts.h: Adjust.
2557 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2558 * src/print.c (print_grammar): Issue `\n' between two rules.
2559 * tests/regression.at (Conflicts): New.
2560 Reported by Tom Lane.
2562 2001-11-12 Akim Demaille <akim@epita.fr>
2564 * tests/regression.at (Invalid input): Remove, duplicate with
2565 ``Invalid input: 1''.
2567 2001-11-12 Akim Demaille <akim@epita.fr>
2569 * tests/torture.at (AT_DATA_STACK_TORTURE)
2570 (Exploding the Stack Size with Alloca)
2571 (Exploding the Stack Size with Malloc): New.
2573 2001-11-12 Akim Demaille <akim@epita.fr>
2575 * src/bison.simple (YYSTACK_REALLOC): New.
2576 (yyparse) [!yyoverflow]: Use it and free the old stack.
2577 Reported by Per Allansson.
2579 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2581 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2582 define CPP macro, which substitute YYSTYPE by yystype.
2583 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2584 with yyltype/YYLTYPE. This allows inclusion of the generated
2585 header within the parser if the compiler, such as GGC, accepts
2586 multiple equivalent #defines.
2589 2001-11-05 Akim Demaille <akim@epita.fr>
2591 * src/reader.c (symbols_output): New, extracted from...
2592 (packsymbols): here.
2595 2001-11-05 Akim Demaille <akim@epita.fr>
2597 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2599 2001-11-05 Akim Demaille <akim@epita.fr>
2601 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2604 2001-11-05 Akim Demaille <akim@epita.fr>
2606 * src/options.h (struct option_table_struct): set_flags is void*.
2607 * src/options.c (longopts): Support `--output' and `%output'.
2609 * src/lex.h (tok_setopt): Remove, replaced with...
2610 (tok_intopt, tok_stropt): these new guys.
2611 * src/lex.c (getopt.h): Not needed.
2612 (token_buffer, unlexed_token_buffer): Not const.
2613 (percent_table): Promote `-' over `_' in directive names.
2614 Active `%name-prefix', `file-prefix', and `output'.
2615 (parse_percent_token): Accept possible arguments to directives.
2616 Promote `-' over `_' in directive names.
2618 2001-11-04 Akim Demaille <akim@epita.fr>
2620 * doc/bison.texinfo (Decl Summary): Split the list into
2621 `directives for grammars' and `directives for bison'.
2623 Add description of `%name-prefix', `file-prefix', and `output'.
2624 Promote `-' over `_' in directive names.
2625 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2626 Simplify the description of `--name-prefix'.
2627 Promote `-' over `_' in directive names.
2628 Promote `--output' over `--output-file'.
2629 Fix the description of `--defines'.
2630 * tests/output.at: Exercise %file-prefix and %output.
2632 2001-11-02 Akim Demaille <akim@epita.fr>
2634 * doc/refcard.tex: Update.
2636 2001-11-02 Akim Demaille <akim@epita.fr>
2638 * src/symtab.h (SUNDEF): New.
2639 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2640 stand for `uninitialized', instead of 0.
2641 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2642 * src/lex.c (lex): Adjust.
2644 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2646 Let yylex return it instead of a plain 0.
2647 Reported by Dick Streefland.
2649 2001-11-02 Akim Demaille <akim@epita.fr>
2651 * tests/regression.at (Mixing %token styles): New test.
2653 2001-11-02 Akim Demaille <akim@epita.fr>
2655 * src/reader.c (parse_thong_decl): Formatting changes.
2656 (token_translations_init): New, extracted from...
2657 (packsymbols): Here.
2660 2001-11-01 Akim Demaille <akim@epita.fr>
2662 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2663 Check that `9foo.y' produces correct cpp guards.
2664 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2668 2001-11-01 Akim Demaille <akim@epita.fr>
2670 * tests/regression.at (Invalid input: 2): New.
2671 * src/lex.c (unlexed_token_buffer): New.
2672 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2676 2001-11-01 Akim Demaille <akim@epita.fr>
2678 * tests/calc.at: Catch up with 1.30.
2679 * configure.in: Bump to 1.49a.
2680 Adjust to newer Autotest.
2682 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2684 * src/conflicts.c: Move global variables rrc_total and src_total ...
2685 (print_conflicts): here.
2686 * src/output.c (output): Free global variable user_toknums.
2687 * src/lex.c (token_obstack): Become static.
2689 2001-10-18 Akim Demaille <akim@epita.fr>
2691 * tests/atlocal.in (GCC): Add.
2692 * tests/calc.at: s/m4_match/m4_bmatch/.
2693 s/m4_patsubst/m4_bpatsubst/.
2694 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2695 * configure.in: AC_SUBST(GCC).
2697 2001-10-14 Marc Autret <autret_m@epita.fr>
2699 * src/options.c (create_long_option_table): Fix.
2701 2001-10-10 Akim Demaille <akim@epita.fr>
2703 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2705 2001-10-04 Akim Demaille <akim@epita.fr>
2707 * src/reader.c (parse_union_decl): Push the caracters in
2708 union_obstack, not attrs_obstack.
2710 2001-10-04 Akim Demaille <akim@epita.fr>
2712 Merge in the branch 1.29.
2714 * src/reader.c (packsymbols): Use a temporary obstack for
2715 `%%tokendef', since output_stack is already used elsewhere.
2717 2001-10-02 Akim Demaille <akim@epita.fr>
2721 2001-10-02 Akim Demaille <akim@epita.fr>
2725 2001-10-02 Akim Demaille <akim@epita.fr>
2727 * tests/regression.at (Invalid CPP headers): New.
2728 From Alexander Belopolsky.
2729 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2731 2001-10-02 Akim Demaille <akim@epita.fr>
2733 * tests/regression.at (Invalid input): New.
2734 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2737 2001-10-02 Akim Demaille <akim@epita.fr>
2739 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2741 2001-10-02 Akim Demaille <akim@epita.fr>
2743 * src/output.c (output_parser): Assert `skeleton'.
2744 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2748 2001-10-01 Marc Autret <autret_m@epita.fr>
2750 * src/lex.h: Echo modifications.
2751 * src/lex.c (unlex): Parameter is now token_t.
2754 2001-10-01 Marc Autret <autret_m@epita.fr>
2756 * src/main.c: Include lex.h.
2759 2001-09-29 Akim Demaille <akim@epita.fr>
2761 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2763 2001-09-28 Akim Demaille <akim@epita.fr>
2765 * tests/testsuite.at: Update to newer Autotest.
2766 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2768 2001-09-27 Akim Demaille <akim@epita.fr>
2770 Position independent wrapper.
2772 * tests/bison: Remove.
2773 * tests/bison.in: New.
2774 * configure.in: Adjust.
2776 2001-09-27 Paul Eggert <eggert@twinsun.com>
2778 Port quotearg fixes from tar 1.13.24.
2780 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2782 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2783 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2785 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2786 * m4/mbrtowc.m4: New file.
2787 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2788 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2790 2001-09-27 Akim Demaille <akim@epita.fr>
2794 2001-09-27 Akim Demaille <akim@epita.fr>
2798 2001-09-25 Akim Demaille <akim@epita.fr>
2800 * src/system.h: Include `xalloc.h'.
2801 Remove it from the C files.
2802 * src/files.c (output_files): Free the obstacks.
2803 * src/lex.c (init_lex): Rename as...
2806 * src/main.c (main): Use it.
2808 2001-09-24 Marc Autret <autret_m@epita.fr>
2810 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2811 to output informations in fout (FILE*).
2812 (open_graph, close_graph): Likewise.
2813 (output_graph, output_edge, output_node): Likewise.
2814 * src/vcg.h: Update function prototypes.
2815 * src/print_graph.c (print_graph): Open output graph file.
2816 (print_actions): Adjust.
2817 * src/files.h: Remove extern declaration.
2818 * src/files.c: Remove graph_obstack declaration.
2819 (open_files): Remove graph_obstack initialization.
2820 (output_files): Remove graph_obstack saving.
2822 2001-09-24 Marc Autret <autret_m@epita.fr>
2824 * src/files.c (compute_output_file_names): Fix.
2826 2001-09-24 Marc Autret <autret_m@epita.fr>,
2827 Akim Demaille <akim@epita.fr>
2829 * src/reader.c (reader): Remove call to free_symtab ().
2830 * src/main.c (main): Call it here.
2832 * src/conflicts.c (initialize_conflicts): Rename as...
2833 (solve_conflicts): this.
2834 * src/print.c (print_core, print_actions, print_state)
2835 (print_grammar): Dump to a file instead a `output_obstack'.
2836 (print_results): Dump `output_obstack', and then proceed with the
2838 * src/files.c (compute_output_file_names, close_files): New.
2839 (output_files): Adjust.
2840 * src/main.c (main): Adjust.
2842 2001-09-23 Marc Autret <autret_m@epita.fr>
2844 * src/files.c (compute_header_macro): Computes header macro name
2845 from spec_defines_file when given.
2847 2001-09-23 Marc Autret <autret_m@epita.fr>
2849 * src/files.c (output_files): Add default extensions.
2851 2001-09-22 Akim Demaille <akim@epita.fr>
2853 * src/conflicts.c (finalize_conflicts): Rename as...
2854 (free_conflicts): this.
2856 2001-09-22 Akim Demaille <akim@epita.fr>
2858 * src/gram.c (gram_free): Rename back as...
2860 (output_token_translations): Free `token_translations'.
2861 * src/symtab.c (free_symtab): Free the tag field.
2863 2001-09-22 Akim Demaille <akim@epita.fr>
2865 Remove `translations' as it is always set to true.
2867 * src/gram.h: Adjust.
2868 * src/reader.c (packsymbols, parse_token_decl): Adjust
2869 * src/print.c (print_grammar): Adjust.
2870 * src/output.c (output_token_translations): Adjust.
2871 * src/lex.c (lex): Adjust.
2872 * src/gram.c: Be sure the set pointers to NULL.
2873 (dummy): Rename as...
2876 2001-09-22 Akim Demaille <akim@epita.fr>
2878 * configure.in: Invoke AM_LIB_DMALLOC.
2879 * src/system.h: Use dmalloc.
2880 * src/LR0.c: Be sure to have pointers initialized to NULL.
2881 (allocate_itemsets): Allocate kernel_items only if needed.
2883 2001-09-22 Akim Demaille <akim@epita.fr>
2885 * configure.in: Bump to 1.29b.
2886 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2887 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2888 need xmalloc.c in calc.y.
2891 2001-09-21 Akim Demaille <akim@epita.fr>
2894 * Makefile.maint, config/config.guess, config/config.sub,
2895 * config/missing: Update from masters.
2896 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2898 * configure.in (ALL_LINGUAS): Add `tr'.
2900 2001-09-21 Akim Demaille <akim@epita.fr>
2902 * tests/Makefile.am (package.m4): Move to...
2903 ($(srcdir)/$(TESTSUITE)): here.
2905 2001-09-20 Akim Demaille <akim@epita.fr>
2907 * src/complain.c: No longer try to be standalone: use system.h.
2908 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2909 * src/complain.h: Likewise.
2910 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2911 Remove the unused variable `n'.
2912 From Albert Chin-A-Young.
2914 2001-09-18 Marc Autret <autret_m@epita.fr>
2916 * doc/bison.1: Update.
2917 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2919 (Option Cross Key): Update.
2922 2001-09-18 Marc Autret <autret_m@epita.fr>
2924 * tests/regression.at: New test (comment in %union).
2926 2001-09-18 Marc Autret <autret_m@epita.fr>
2928 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2930 Reported by Keith Browne.
2932 2001-09-18 Marc Autret <autret_m@epita.fr>
2934 * tests/output.at: Add tests for --defines and --graph.
2936 2001-09-18 Marc Autret <autret_m@epita.fr>
2938 * tests/output.at: Removes tests of %{header,src}_extension features.
2940 2001-09-18 Akim Demaille <akim@epita.fr>
2942 * tests/Makefile.am (package.m4): New.
2943 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2944 (_AT_CHECK_CALC_ERROR): Likewise.
2945 Factor the `, ' part of verbose error messages.
2947 2001-09-18 Marc Autret <autret_m@epita.fr>
2949 * src/getargs.c (longopts): Declare --defines and --graph as options
2950 with optional arguments.
2951 * src/files.h: Add extern declarations.
2952 * src/files.c (spec_graph_file, spec_defines_file): New.
2953 (output_files): Update.
2954 Remove CPP-outed code.
2956 2001-09-18 Marc Autret <autret_m@epita.fr>
2958 Turn off %{source,header}_extension feature.
2960 * src/files.c (compute_exts_from_gf): Update.
2961 (compute_exts_from_src): Update.
2962 (output_files): CPP-out useless code.
2963 * src/files.h: Remove {header,source}_extension extern declarations.
2964 * src/reader.c (parse_dquoted_param): CPP-out.
2965 (parse_header_extension_decl): Remove.
2966 (parse_source_extension_decl): Remove.
2967 (read_declarations): Remove cases tok_{hdrext,srcext}.
2968 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2969 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2971 2001-09-10 Akim Demaille <akim@epita.fr>
2973 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2974 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2975 (AT_CHECK_OUTPUT): this.
2976 Merely check ls' exit status, its output is useless.
2978 2001-09-10 Akim Demaille <akim@epita.fr>
2980 * tests/calc.at: Use m4_match.
2981 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2983 2001-09-10 Marc Autret <autret_m@epita.fr>,
2984 Akim Demaille <akim@epita.fr>
2986 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2988 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2990 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2991 * src/lex.h: Adjust prototype.
2992 (token_t): Add `tok_undef'.
2993 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2994 (parse_percent_token): Now returns token_t.
2995 Add default statement in switch.
2996 (lex): Separate `c' as an input variable, from the token_t result
2998 (unlexed): Is a token_t.
3000 2001-09-10 Akim Demaille <akim@epita.fr>
3002 * configure.in: Bump to 1.29a.
3004 2001-09-07 Akim Demaille <akim@epita.fr>
3008 2001-08-30 Akim Demaille <akim@epita.fr>
3010 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3011 * m4/atconfig.m4: Remove.
3012 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3014 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3015 m4_if, m4_patsubst, and m4_regexp.
3016 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3017 `input' file instead of echo.
3019 2001-08-29 Akim Demaille <akim@epita.fr>
3023 2001-08-29 Akim Demaille <akim@epita.fr>
3027 2001-08-29 Paul Eggert <eggert@twinsun.com>
3029 * src/bison.simple (yyparse): Don't take the address of an
3030 item before the start of an array, as that doesn't conform to
3033 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3035 * doc/bison.texinfo (Location Tracking Calc): New node.
3037 2001-08-29 Paul Eggert <eggert@twinsun.com>
3039 * src/output.c (output): Do not define const, as this now
3040 causes more problems than it cures.
3042 2001-08-29 Akim Demaille <akim@epita.fr>
3044 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3046 Be sure to tag the `detailmenu'.
3048 2001-08-29 Akim Demaille <akim@epita.fr>
3050 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3051 download in a tmp dir.
3053 2001-08-28 Marc Autret <autret_m@epita.fr>
3055 * config/depcomp: New file.
3057 2001-08-28 Marc Autret <autret_m@epita.fr>
3059 * doc/bison.1 (mandoc): Adjust.
3060 From Juan Manuel Guerrero.
3062 2001-08-28 Marc Autret <autret_m@epita.fr>
3064 * src/print_graph.c (print_state): Fix.
3066 2001-08-27 Marc Autret <autret_m@epita.fr>
3068 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3070 Echo modifications to the functions prototypes.
3071 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3073 2001-08-27 Marc Autret <autret_m@epita.fr>
3075 * src/vcg.c: Include `xalloc.h'.
3076 (add_colorentry): New.
3077 (add_classname): New.
3078 (add_infoname): New.
3079 * src/vcg.h: Add new prototypes.
3081 2001-08-27 Akim Demaille <akim@epita.fr>
3083 * Makefile.maint: Sync. again with CVS Autoconf.
3085 2001-08-27 Akim Demaille <akim@epita.fr>
3087 * Makefile.maint: Formatting changes.
3088 (po-update, cvs-update, update): New targets.
3091 2001-08-27 Akim Demaille <akim@epita.fr>
3093 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3094 * Makefile.maint: Sync. with CVS Autoconf.
3096 2001-08-27 Marc Autret <autret_m@epita.fr>
3098 * src/vcg.h (struct infoname_s): New.
3099 (struct colorentry_s): New.
3100 (graph_s): New fields {vertical,horizontal}_order in structure.
3101 Add `infoname' field.
3102 Add `colorentry' field;
3103 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3104 (G_HORIZONTAL_ORDER): New.
3106 (G_COLORENTRY): New.
3107 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3108 Add output of `infoname'.
3109 Add output of `colorentry'.
3111 2001-08-27 Marc Autret <autret_m@epita.fr>
3113 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3114 This one shadowed a global parameter.
3116 2001-08-24 Marc Autret <autret_m@epita.fr>
3118 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3119 instead of `unsigned'.
3120 (print_state): Do not call obstack_object_size () in obstack_grow ()
3121 to avoid macro variables shadowing.
3123 2001-08-23 Marc Autret <autret_m@epita.fr>
3125 * src/lex.c (percent_table): Typo: s/naem/name/.
3127 Normalize new options declarations.
3129 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3131 * tests/suite.at: Exercise %header_extension and %source_extension.
3133 2001-08-16 Marc Autret <autret_m@epita.fr>
3135 * src/reader.c (parse_dquoted_param): New.
3136 (parse_header_extension_decl): Use it.
3137 (parse_source_extension_decl): Likewise.
3139 2001-08-16 Marc Autret <autret_m@epita.fr>
3141 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3142 (get_xxxx_str): Use assert () instead of complain ().
3143 Remove return invokations in default cases.
3144 (get_decision_str): Modify default behaviour. Remove second argument.
3145 Echo modifications on calls.
3146 (output_graph): Fix.
3148 2001-08-16 Marc Autret <autret_m@epita.fr>
3150 * src/getargs.c (usage): Update with ``-g, --graph''.
3152 2001-08-16 Marc Autret <autret_m@epita.fr>
3154 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3155 (Option Cross Key): Likewise.
3156 * doc/bison.1: Update.
3158 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3160 * src/output.c (output_master_parser): Don't finish action_obstack.
3161 (output_parser): Don't care about the muscle action, here.
3162 (prepare): Copy the action_obstack in the action muscle.
3163 (output): Free action_obstack.
3165 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3167 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3168 will contain `%union' declaration.
3169 (parse_union_decl): Delete #line directive output.
3170 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3171 informations about %union.
3172 (parse_union_decl): Copy the union_obstack in the muscle stype.
3173 * src/bison.simple: Add new #line directive.
3174 Add typdef %%stype YYSTYPE.
3176 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3178 * src/bison.simple: Add new `#line' directive.
3180 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3182 * src/bison.simple: New `#line' directive.
3183 * src/output.c (output_parser): Support new dynamic muscle input_line.
3185 2001-09-22 Marc Autret <autret_m@epita.fr>
3187 * src/output.c (output_master_parser): New.
3188 (output_parser): Be more re-entrant.
3190 2001-09-21 Marc Autret <autret_m@epita.fr>
3192 * src/reader.c (copy_definition, parse_union_decl): Update and use
3194 (copy_action): Likewise.
3195 Use obstack_1grow ().
3196 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3198 2001-09-21 Marc Autret <autret_m@epita.fr>
3200 * src/options.c (option_table): Adjust.
3201 * src/lex.c (parse_percent_token): Fix.
3203 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3205 * src/options.c (symtab.h): Include it, need by lex.h.
3207 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3209 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3210 is now an option_table_struct*.
3211 (option_strcmp): New function option_strcmp.
3212 (parse_percent_token): Call option_strcmp.
3213 * src/getargs.c (xalloc.h, options.h): Include it.
3214 (getargs): Call create_long_option_table.
3215 (getargs): Free longopts at the end of the function.
3216 (shortopts): Move in options.c.
3217 * src/options.c (create_long_option_table): New function. Convert
3218 information from option_table to option structure.
3219 * src/reader.c (options.h): Include it.
3221 * src/Makefile.am: Adjust.
3222 * src/options.c (option_table): Create from longopts and percent_table.
3223 * src/getargs.c (longopts): Delete.
3224 * src/lex.c (struct percent_table_struct): Delete.
3225 (percent_table): Delete.
3226 (options.h): Include it.
3227 * src/options.c: Create.
3228 * src/options.h: Create.
3229 Declare enum opt_access_e.
3230 Define struct option_table_struct.
3232 2001-09-20 Marc Autret <autret_m@epita.fr>
3234 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3237 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3239 * src/bison.simple: s/%%filename/%%skeleton.
3240 * src/muscle_tab.c (getargs.h): Include it.
3241 (muscle_init): Insert new muscle skeleton.
3243 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3245 * src/output.c (output_parser): Delete unused variable actions_dumped.
3247 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3249 * src/output.c (output): Delete call to reader_output_yylsp.
3250 * src/reader.c (reader): Likewise.
3251 * src/reader.h: Delete declaration of reader_output_yylsp.
3253 2001-09-02 Marc Autret <autret_m@epita.fr>
3255 * src/reader.c: Include muscle_tab.h.
3256 (parse_union_decl): Update.
3257 (parse_macro_decl): Rename parse_muscle_decl.
3258 Update to use renamed functions and variable.
3259 (read_declarations, copy_action, read_additionnal_code, : Updated
3260 with correct variables and functions names.
3261 (packsymbols, reader): Likewise.
3263 * src/reader.h (muscle_obstack): Extern declaration update.
3265 * src/output.c: Include muscle_tab.h
3266 In all functions using macro_insert, change by using muscle_insert ().
3267 (macro_obstack): Rename muscle_obstack.
3268 Echo modifications in the whole file.
3269 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3270 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3271 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3273 * src/muscle_tab.h: Update double inclusion macros.
3274 (macro_entry_s): Rename muscle_entry_s.
3277 * src/muscle_tab.c: Include muscle_tab.h.
3278 Rename macro_tabble to muscle_table.
3279 (mhash1, mhash2, mcmp): Use muscle_entry.
3280 (macro_init): Rename muscle_init. Update.
3281 (macro_insert): Rename muscle_insert. Update.
3282 (macro_find): Rename muscle_find. Update.
3284 * src/main.c: Include muscle_tab.h.
3285 (main): Call muscle_init ().
3286 * src/Makefile.am (bison_SOURCES): Echo modifications.
3288 2001-09-02 Marc Autret <autret_m@epita.fr>
3290 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3292 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3294 2001-09-02 Marc Autret <autret_m@epita.fr>
3296 * src/macrotab.c, src/macrotab.h: Remove.
3298 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3300 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3303 2001-09-01 Marc Autret <autret_m@epita.fr>
3305 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3306 to an explicit value to activate the feature. We do it here.
3308 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3310 * src/output.c (prepare): Delete the `filename' muscule insertion.
3311 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3312 (parse_union_decl): Likewise.
3313 * src/macrotab.c (macro_init): Initialize filename by infile.
3315 2001-08-31 Marc Autret <autret_m@epita.fr>
3317 * src/bison.simple (YYLSP_NEEDED): New definition.
3318 * src/output.c (prepare): Add macro insertion of `locations_flag'
3320 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3322 * src/output.c (prepare): Delete insertion of previous muscles,
3323 and insert the `prefix' muscles.
3324 * src/macrotab.c (macro_init): Likewise.
3325 (macro_init): Initialization prefix directive by `yy'.
3326 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3327 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3328 yylval, yydebug, yyerror, yynerrs and yyparse.
3329 New directive `#define' to substitute yydebug, ... with option
3332 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3334 * src/main.c (main): Standardize.
3335 * src/output.c (output_table_data, output_parser): Likewise.
3336 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3338 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3340 * src/reader.c (read_additionnal_code): Rename %%user_code to
3342 * src/output.c (output): Rename %%declarations to %%prologue.
3343 * src/bison.simple: Echo modifications.
3345 2001-08-31 Marc Autret <autret_m@epita.fr>
3347 * src/reader.c (readgram): CleanUp.
3348 (output_token_defines): Likewise.
3349 (packsymbols): Likewise.
3351 * src/output.c (output): CPP-out useless code.
3353 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3355 * src/reader.c (reader): Delete obsolete call to function
3356 output_trailers and output_headers.
3357 * src/output.h: Remove obsolete functions prototypes of output_headers
3358 and output_trailers.
3360 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3362 * src/main.c: Include macrotab.h.
3363 * src/macrotab.h (macro_entry_s): Constify fields.
3364 Adjust functions prototypes.
3365 * src/macrotab.c (macro_insert): Constify key and value.
3366 (macro_find): Constify key.
3367 (macro_insert): Include 'xalloc.h'
3368 (macro_insert): Use XMALLOC.
3369 (macro_find): Constify return value.
3370 * src/output.c (output_table_data): Rename table to table_data.
3371 (output_parser): Constify macro_key, macro_value.
3373 2001-08-30 Marc Autret <autret_m@epita.fr>
3375 * src/reader.c (parse_skel_decl): New.
3376 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3377 * src/lex.h (token_t): New token `tok_skel'.
3378 * src/lex.c (percent_table): Add skeleton option entry.
3381 2001-08-29 Marc Autret <autret_m@epita.fr>
3383 * src/bison.simple: Add %%user_code directive at the end.
3384 * src/reader.c (read_additionnal_code): New.
3386 * src/output.c (output_program): Remove.
3389 2001-08-28 Marc Autret <autret_m@epita.fr>
3391 * src/output.c (output_actions): Clean up.
3392 (output_gram): CPP-out useless code.
3393 * src/reader.c (reader): Clean up, CPP-out useless code.
3395 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3397 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3399 * src/bison.simple: Add `%%definitions'.
3401 2001-08-28 Marc Autret <autret_m@epita.fr>
3403 * config/depcomp: New file.
3405 2001-08-27 Paul Eggert <eggert@twinsun.com>
3407 * src/bison.simple (yyparse): Don't take the address of an
3408 item before the start of an array, as that doesn't conform to
3411 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3413 * src/output.c (output): Remove the initialization of the macro
3414 obstack. It was done too late here.
3416 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3418 (reader): Initialize the macro obstack here, since we need it to grow
3419 '%define' directives.
3421 * src/reader.h: Declare the macro obstack as extern.
3423 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3425 * src/output.c (output_parser): Fix. Store single '%' characters in
3426 the output obstack instead of throwing them away.
3428 2001-08-27 Akim Demaille <akim@epita.fr>
3430 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3432 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3434 * lib/Makefile.am: Adjust.
3436 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3438 * src/bison.simple: Update and add '%%' directives.
3440 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3442 * src/reader.c (reader): Remove calls to 'output_headers' and
3443 'output_trailers'. Remove some C output.
3444 (readgram): Disable a piece of code that was writing a default
3445 definition for 'YYSTYPE'.
3446 (reader_output_yylsp): Remove.
3447 (packsymbols): Output token defintions to a macro.
3448 (copy_definition): Disable C output.
3450 * src/reader.c (parse_macro_decl): New function used to parse macro
3452 (copy_string2): Put the body of copy_string into this new function.
3453 Add a parameter to let the caller choose whether he wants to copy the
3454 string delimiters or not.
3455 (copy_string): Be a simple call to copy_string2 with the last argument
3457 (read_declarations): Add case for macro definition.
3458 (copy_identifier): New.
3459 (parse_macro_decl): Read macro identifiers using copy_identifier
3462 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3464 * src/output.c (prepare): Add prefixed names.
3465 (output_parser): Output semantic actions.
3466 (output_parser): Fix bug on '%%line' directives.
3468 * src/output.c (output_headers): Remove. The C code printed by this
3469 function should now be in the skeletons.
3470 (output_trailers): Remove.
3471 (output): Disable call to 'reader_output_yylsp'.
3472 (output_rule_data): Do not output tables to the table obstack.
3474 * src/output.c: Remove some C dedicated output.
3475 Improve the use of macro and output obstacks.
3476 (output_defines): Remove.
3478 * src/output.c (output_token_translations): Associate 'translate'
3479 table with a macro. No output to the table obstack.
3480 (output_gram): Same for 'rhs' and 'prhs'.
3481 (output_stos): Same for 'stos'.
3482 (output_rule_data): Same for 'r1' and 'r2'.
3483 (token_actions): Same for 'defact'.
3484 (goto_actions): Same for 'defgoto'.
3485 (output_base): Same for 'pact' and 'pgoto'.
3486 (output_table): Same for 'table'.
3487 (output_check): Same for 'check'.
3489 * src/output.c (output_table_data): New function.
3490 (output_short_table): Remove.
3491 (output_short_or_char_table): Remove.
3493 * src/output.c (output_parser): Replace most of the skeleton copy code
3494 with something new. Skeletons are now processed character by character
3495 rather than line by line, and Bison looks for '%%' macros. This is the
3496 first step in making Bison's output process (a lot) more flexible.
3497 (output_parser): Use the macro table.
3499 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3501 * src/main.c (main): Initialize the macro table.
3503 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3505 * src/lex.c (percent_table): Add tok_define.
3506 * src/lex.h: Add tok_define.
3508 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3510 * src/macrotab.c: New file.
3511 * src/macrotab.h: New file.
3512 * src/Makefile.am: Update.
3514 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3516 * lib/hash.c: New file.
3517 * lib/hash.h: New file.
3518 * lib/Makefile.am: Update.
3520 2001-08-15 Akim Demaille <akim@epita.fr>
3524 2001-08-15 Marc Autret <autret_m@epita.fr>
3526 * src/reader.c (readgram): Indent output macro YYSTYPE.
3527 (packsymbols): Likewise.
3528 (output_token_defines): Likewise.
3529 * src/files.c: Standardize.
3530 (compute_header_macro): New.
3531 (defines_obstack_save): New. Use compute_header_macro.
3532 (output_files): Update. Use defines_obstack_save.
3534 2001-08-15 Akim Demaille <akim@epita.fr>
3536 * doc/bison.texinfo (Table of Symbols): Document
3539 2001-08-15 Akim Demaille <akim@epita.fr>
3541 * missing: Update from CVS Automake.
3542 * config/config.guess, config/config.sub, config/texinfo.tex:
3543 Update from gnu.org.
3545 2001-08-15 Akim Demaille <akim@epita.fr>
3547 * Makefile.maint: Sync with CVS Autoconf.
3549 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3551 * doc/bison.texinfo: Include GNU Free Documentation License from
3553 * doc/fdl.texi: Add to package.
3555 2001-08-14 Marc Autret <autret_m@epita.fr>
3557 Turn on %{source,header}_extension features.
3559 * src/lex.c (percent_table): Un-CPP out header_extension and
3561 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3562 (compute_exts_from_src): Remove conditions. It restores priorities
3565 2001-08-14 Marc Autret <autret_m@epita.fr>
3567 * src/files.c (compute_base_names): Add extensions computing when
3568 `--file-prefix' used.
3569 Standardize function calls.
3571 2001-08-13 Marc Autret <autret_m@epita.fr>
3573 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3574 defining it (defined but null disables alloca).
3576 2001-08-13 Marc Autret <autret_m@epita.fr>
3578 * src/bison.simple (_yy_memcpy): CPP reformat.
3580 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3582 * tests/atconfig.in (CPPFLAGS): Fix.
3584 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3586 * doc/bison.texinfo: Include GNU General Public License from
3588 * doc/gpl.texi: Add to package.
3590 2001-08-10 Marc Autret <autret_m@epita.fr>
3592 * src/print_graph.h: Fix.
3593 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3595 2001-08-10 Akim Demaille <akim@epita.fr>
3597 * src/system.h: Provide default declarations for stpcpy, strndup,
3600 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3602 * doc/bison.texinfo (Locations): Update @$ stuff.
3604 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3606 * src/bison.simple (YYLLOC_DEFAULT): Update.
3609 2001-08-08 Marc Autret <autret_m@epita.fr>
3611 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3612 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3613 Reported by Fabrice Bauzac.
3615 2001-08-08 Marc Autret <autret_m@epita.fr>
3617 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3618 * src/vcg.c (output_node): Fix.
3619 * src/vcg.h: Cleanup.
3620 * src/print_graph.c: Add comments.
3621 (node_output_size): New global variable. Simplify the formatting of
3622 the VCG graph output.
3623 (print_actions): Unused code is now used. It notifies the final state
3624 and no action states in the VCG graph. It also give the reduce actions.
3625 The `shift and goto' edges are red and the `go to state' edges are
3627 Get the current node name and node_obstack by argument.
3628 (node_obstack): New variable.
3629 (print_state): Manage node_obstack.
3630 (print_core): Use node_obstack given by argument.
3631 A node is not only computed here but in print_actions also.
3632 (print_graph): CPP out useless code instead of commenting it.
3634 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3636 * tests/atconfig.in (CPPFLAGS): Fix.
3638 2001-08-07 Akim Demaille <akim@epita.fr>
3640 * src/print_graph.c (quote): New.
3641 (print_core): Use it.
3643 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3645 * src/vcg.c (complain.h): Include it.
3646 Unepitaize `return' invocations.
3647 [NDEBUG] (main): Remove.
3648 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3649 * src/files.c (open_files): Initialize graph_obstack.
3650 * src/print_graph.c (print_actions): CPP out useless code.
3651 (print_core): Don't output the last `\n' in labels.
3653 * src/files.c (output_files): Output the VCG file.
3654 * src/main.c (main): Invoke print_graph ();
3656 2001-08-06 Marc Autret <autret_m@epita.fr>
3658 Automaton VCG graph output.
3659 Using option ``-g'' or long option ``--graph'', you can generate
3660 a gram_filename.vcg file containing a VCG description of the LALR (1)
3661 automaton of your grammar.
3663 * src/main.c: Call to print_graph() function.
3664 * src/getargs.h: Update.
3665 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3666 (graph_flag): New flag.
3668 (getargs): Add case `g'.
3669 * src/files.c (graph_obstack): New obstack struct.
3670 (open_files): Initialize new obstack.
3671 (output_files): Saves graph_obstack if required.
3672 * src/files.h (graph_obstack): New extern declaration.
3673 * src/Makefile.am: Add new source files.
3675 2001-08-06 Marc Autret <autret_m@epita.fr>
3677 * src/print_graph.c, src/print_graph.h (graph): New.
3678 * src/vcg.h: New file.
3679 * src/vcg.c: New file, VCG graph handling.
3681 2001-08-06 Marc Autret <autret_m@epita.fr>
3683 Add of %source_extension and %header_extension which specify
3684 the source or/and the header output file extension.
3686 * src/files.c (compute_base_names): Remove initialisation of
3687 src_extension and header_extension.
3688 (compute_exts_from_gf): Update.
3689 (compute_exts_from_src): Update.
3690 (output_files): Update.
3691 * src/reader.c (parse_header_extension_decl): New.
3692 (parse_source_extension_decl): New.
3693 (read_declarations): New case statements for the new tokens.
3694 * src/lex.c (percent_table): Add entries for %source_extension
3695 and %header_extension.
3696 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3698 2001-08-06 Marc Autret <autret_m@epita.fr>
3700 * configure.in: Bump to 1.28c.
3701 * doc/bison.texinfo: Texinfo thingies.
3703 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3705 * tests/atconfig.in (CPPFLAGS): Add.
3706 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3708 2001-08-03 Akim Demaille <akim@epita.fr>
3712 2001-08-03 Akim Demaille <akim@epita.fr>
3714 * tests/Makefile.am (check-local): Ship testsuite.
3715 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3718 2001-08-03 Akim Demaille <akim@epita.fr>
3720 * configure.in: Try using -Wformat when compiling.
3722 2001-08-03 Akim Demaille <akim@epita.fr>
3724 * configure.in: Bump to 1.28b.
3726 2001-08-03 Akim Demaille <akim@epita.fr>
3728 * src/complain.c: Adjust strerror_r portability issues.
3730 2001-08-03 Akim Demaille <akim@epita.fr>
3734 2001-08-03 Akim Demaille <akim@epita.fr>
3736 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3737 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3738 * src/getargs.c: Include complain.h.
3739 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3740 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3742 2001-08-03 Akim Demaille <akim@epita.fr>
3744 * src/reader.c (readgram): Display hidden chars in error messages.
3746 2001-08-03 Akim Demaille <akim@epita.fr>
3748 Update to gettext 0.10.39.
3750 2001-08-03 Akim Demaille <akim@epita.fr>
3752 * lib/strspn.c: New.
3754 2001-08-01 Marc Autret <autret_m@epita.fr>
3756 * doc/bison.texinfo: Update.
3757 * doc/bison.1 (mandoc): Update.
3758 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3759 * src/files.c: Support output files extensions computing.
3760 (src_extension): New static variable.
3761 (header_extension): New static variable.
3763 (get_extension_index): New function, gets the index of an extension
3764 filename in a string.
3765 (compute_exts_from_gf): New function, computes extensions from the
3766 grammar file extension.
3767 (compute_exts_from_src): New functions, computes extensions from the
3768 C source file extension, file given by ``-o'' option.
3769 (compute_base_names): Update.
3770 (output_files): Update.
3772 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3774 * doc/bison.texi: Document @$.
3775 (Locations): New section.
3777 2001-07-18 Akim Demaille <akim@epita.fr>
3779 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3780 * config/prev-version.txt, config/move-if-change: New.
3781 * Makefile.am: Adjust.
3783 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3785 * src/bison.simple (yyparse): Suppress warning `comparaison
3786 between signed and unsigned'.
3788 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3790 * src/getargs.h (raw_flag): Remove.
3791 * src/getargs.c: Die on `-r'/`--raw'.
3792 * src/lex.c (parse_percent_token): Die on `%raw'.
3793 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3794 * tests/calc.at: Suppress test with option `--raw'.
3796 2001-07-14 Akim Demaille <akim@epita.fr>
3799 * configure.in: Require Autoconf 2.50.
3800 Update to gettext 0.10.38.
3802 2001-03-16 Akim Demaille <akim@epita.fr>
3804 * doc/bison.texinfo: ANSIfy the examples.
3806 2001-03-16 Akim Demaille <akim@epita.fr>
3808 * getargs.c (skeleton): New variable.
3809 (longopts): --skeleton is a new option.
3810 (shortopts, getargs): -S is a new option.
3811 * getargs.h: Declare skeleton.
3812 * output.c (output_parser): Use it.
3814 2001-03-16 Akim Demaille <akim@epita.fr>
3816 * m4/strerror_r.m4: New.
3817 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3818 * lib/error.h, lib/error.c: Update.
3820 2001-03-16 Akim Demaille <akim@epita.fr>
3822 * src/getargs.c (longopts): Clean up.
3824 2001-02-21 Akim Demaille <akim@epita.fr>
3826 * src/reader.c (gensym): `gensym_count' is your own.
3827 Use a static buf to create the symbol name, as token_buffer is no
3830 2001-02-08 Akim Demaille <akim@epita.fr>
3832 * src/conflicts.c (conflict_report): Be sure not to append to res
3833 between two calls, which could happen if both first sprintf were
3834 skipped, but not the first cp += strlen.
3836 2001-02-08 Akim Demaille <akim@epita.fr>
3838 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3839 New, from fileutils 4.0.37.
3840 * configure.in: Require Autoconf 2.49c. I took some time before
3841 making this decision. This is the only way out for portability
3842 issues in Bison, it would mean way too much duplicate effort to
3843 import in Bison features implemented in 2.49c since 2.13.
3844 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3846 2001-02-02 Akim Demaille <akim@epita.fr>
3848 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3849 * lib/xalloc.h, lib/xmalloc.c: Update.
3851 2001-01-19 Akim Demaille <akim@epita.fr>
3853 Get rid of the ad hoc handling of token_buffer in the scanner: use
3856 * src/lex.c (token_obstack): New.
3857 (init_lex): Initialize it. No longer call...
3858 (grow_token_buffer): this. Remove it.
3859 Adjust all the places which used it to use the obstack.
3861 2001-01-19 Akim Demaille <akim@epita.fr>
3863 * src/lex.h: Rename all the tokens:
3864 s/\bENDFILE\b/tok_eof/g;
3865 s/\bIDENTIFIER\b/tok_identifier/g;
3867 Let them be enums, not #define, to ease debugging.
3868 Adjust all the code.
3870 2001-01-18 Akim Demaille <akim@epita.fr>
3872 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3873 * src/lex.c (maxtoken, grow_token_buffer): Static.
3875 2001-01-18 Akim Demaille <akim@epita.fr>
3877 Since we now use obstacks, more % directives can be enabled.
3879 * src/lex.c (percent_table): Also accept `%yacc',
3880 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3882 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3883 instead of returning a token.
3884 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3885 * src/reader.c (read_declarations): Adjust.
3886 * src/files.c (open_files): Don't call `compute_base_names', don't
3887 compute `attrsfile' since they depend upon data which might be
3888 *in* the input file now.
3889 (output_files): Do it here.
3890 * src/output.c (output_headers): Document the fact that this patch
3891 introduces a guaranteed SEGV for semantic parsers.
3892 * doc/bison.texinfo: Document them.
3893 * tests/suite.at: Exercise these %options.
3895 2000-12-20 Akim Demaille <akim@epita.fr>
3897 Also handle the output file (--verbose) with obstacks.
3899 * files.c (foutput): Remove.
3900 (output_obstack): New.
3901 Adjust all dependencies.
3902 * src/conflicts.c: Return a string.
3903 * src/system.h (obstack_grow_string): Rename as...
3904 (obstack_sgrow): this. Be ready to work with non literals.
3905 (obstack_fgrow4): New.
3907 2000-12-20 Akim Demaille <akim@epita.fr>
3909 * src/files.c (open_files): Fix the computation of short_base_name
3910 in the case of `-o foo.tab.c'.
3912 2000-12-20 Akim Demaille <akim@epita.fr>
3914 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3915 (copy_dollar): Now that everything uses obstacks, get rid of the
3918 2000-12-20 Akim Demaille <akim@epita.fr>
3920 * src/files.c (open_files): Actually the `.output' file is based
3921 on the short_base_name, not base_name.
3922 * tests/suite.at (Checking output file names): Adjust.
3924 2000-12-20 Akim Demaille <akim@epita.fr>
3926 * src/bison.s1: Remove, we now use directly...
3927 * src/bison.simple: this.
3928 * src/Makefile.am: Use pkgdata instead of data.
3930 2000-12-20 Akim Demaille <akim@epita.fr>
3932 * src/files.c (guard_obstack): New.
3933 (open_files): Initialize it.
3934 (output_files): Dump it...
3935 * src/files.h: Export it.
3936 * src/reader.c (copy_guard): Use it.
3938 2000-12-19 Akim Demaille <akim@epita.fr>
3940 * src/files.c (outfile, defsfile, actfile): Removed as global
3942 (open_files): Don't compute them.
3943 (output_files): Adjust.
3944 (base_name, short_base_name): Be global.
3945 Adjust dependencies.
3947 2000-12-19 Akim Demaille <akim@epita.fr>
3949 * src/files.c (strsuffix): New.
3950 (stringappend): Be just like strcat but allocate.
3951 (base_names): Eve out from open_files.
3952 Try to simplify the rather hairy computation of base_name and
3954 (open_files): Use it.
3955 * tests/suite.at (Checking output file names): New test.
3957 2000-12-19 Akim Demaille <akim@epita.fr>
3959 * src/system.h (obstack_grow_literal_string): Rename as...
3960 (obstack_grow_string): this.
3961 * src/output.c (output_parser): Recognize `%% actions' instead of
3963 * src/bison.s1: s/$/%% actions/.
3964 * src/bison.hairy: Likewise.
3966 2000-12-19 Akim Demaille <akim@epita.fr>
3968 * src/output.c (output_parser): Compute the `#line' lines when
3970 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3971 Suggested by Hans Aberg.
3973 2000-12-19 Akim Demaille <akim@epita.fr>
3975 Let the handling of the skeleton files be local to the procedures
3978 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3980 (fparser, open_extra_files): Remove.
3981 (open_files, output_files): Don't take care of fparser.
3982 * src/files.h: Adjust.
3983 * src/output.c (output_parser): Open and close the file to the
3985 * src/reader.c (read_declarations): When %semantic_parser, open
3988 2000-12-19 Akim Demaille <akim@epita.fr>
3990 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3991 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3993 2000-12-19 Akim Demaille <akim@epita.fr>
3995 * src/files.c (open_files): Yipee! We no longer need all the code
3996 looking for `/tmp' since we have no tmp file.
3998 2000-12-19 Akim Demaille <akim@epita.fr>
4000 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4002 * src/files.c (open_files): Less dependency on MSDOS etc.
4004 2000-12-14 Akim Demaille <akim@epita.fr>
4006 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4007 Provide a default definition.
4008 Use it when executing the default @ action.
4009 * src/reader.c (reader_output_yylsp): No longer include
4010 `timestamp' and `text' in the default YYLTYPE.
4012 2000-12-12 Akim Demaille <akim@epita.fr>
4014 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4015 (copy_guard): Quote the file names.
4016 Reported by Laurent Mascherpa.
4018 2000-12-12 Akim Demaille <akim@epita.fr>
4020 * src/output.c (output_headers, output_program, output): Be sure
4021 to escape special characters when outputting filenames.
4022 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4023 (output_headers): Don't depend on them, Use ACTSTR.
4025 2000-11-17 Akim Demaille <akim@epita.fr>
4027 * lib/obstack.h: Formatting changes.
4028 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4029 prevents type checking.
4030 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4031 cast the value to (void *): assigning a `foo *' to a `void *'
4033 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4034 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4037 2000-11-17 Akim Demaille <akim@epita.fr>
4039 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4041 (suite.m4, regression.m4, calc.m4): these.
4042 * tests/atgeneral.m4: Update from CVS Autoconf.
4044 2000-11-17 Akim Demaille <akim@epita.fr>
4046 * tests/regression.m4 (%union and --defines): New test,
4047 demonstrating a current bug in the obstack implementation.
4049 2000-11-17 Akim Demaille <akim@epita.fr>
4051 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4053 Use them to declare the variables which are global or local to
4056 2000-11-17 Akim Demaille <akim@epita.fr>
4058 * acconfig.h: Remove, no longer used.
4060 2000-11-07 Akim Demaille <akim@epita.fr>
4062 * src: s/Copyright (C)/Copyright/g.
4064 2000-11-07 Akim Demaille <akim@epita.fr>
4066 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4068 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4070 2000-11-07 Akim Demaille <akim@epita.fr>
4072 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4073 Merge in a single CPP if/else.
4075 2000-11-07 Akim Demaille <akim@epita.fr>
4077 * src/output.c (output): Remove useless variables.
4078 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4079 argument `data' for consistency with the prototypes.
4081 (obstack_copy, obstack_copy0): Rename the second argument as
4082 `address' for consistency. Qualify it `const'.
4083 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4084 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4085 `const' their input argument (`data' or `address').
4086 Adjust the corresponding macros to include `const' in casts.
4088 2000-11-03 Akim Demaille <akim@epita.fr>
4090 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4091 s/PFILE1/BISON_HAIRY/.
4092 Adjust dependencies.
4094 2000-11-03 Akim Demaille <akim@epita.fr>
4096 For some reason, this was not applied.
4098 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4099 `unlink': it's no longer used.
4101 2000-11-03 Akim Demaille <akim@epita.fr>
4103 * src/files.c (skeleton_find): New function, eved out of...
4104 (open_files, open_extra_files): here.
4106 2000-11-03 Akim Demaille <akim@epita.fr>
4110 * src/files.c (obstack_save): New function.
4111 (done): Rename as...
4112 (output_files): this.
4114 * src/main.c (main): Don't use `atexit' to register `done', since
4115 it no longer has to remove tmp files, just call `output_files'
4116 when there are no errors.
4118 2000-11-02 Akim Demaille <akim@epita.fr>
4120 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4121 `unlink': it's no longer used.
4122 * src/files.h: Formatting changes.
4124 2000-11-02 Akim Demaille <akim@epita.fr>
4126 Remove the last uses of mktemp and unlink/delete.
4128 * src/files.c (fdefines, ftable): Removed.
4129 (defines_ostack, table_obstack): New.
4130 Adjust dependencies of the former into uses of the latter.
4131 * src/output.c (output_short_or_char_table, output_short_table):
4132 Convert to using obstacks.
4133 * src/reader.c (copy_comment2): Accept one FILE * and two
4135 (output_token_defines, reader_output_yylsp): Use obstacks.
4136 * src/system.h (obstack_fgrow3): New.
4138 2000-11-01 Akim Demaille <akim@epita.fr>
4140 Change each use of `fattrs' into a use of `attrs_obstack'.
4142 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4143 * src/files.c (fattrs): Remove.
4144 (attrs_obstack): New.
4145 Adjust all dependencies.
4146 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4148 2000-11-01 Akim Demaille <akim@epita.fr>
4151 Change each use of `faction' into a use of `action_obstack'.
4153 * lib/obstack.h, lib/obstack.c: New files.
4154 * src/files.c (faction): Remove.
4155 (action_obstack): New.
4156 Adjust all dependencies.
4158 2000-10-20 Akim Demaille <akim@epita.fr>
4160 * lib/quote.h (PARAMS): New macro. Use it.
4162 2000-10-16 Akim Demaille <akim@epita.fr>
4164 * src/output.c (output_short_or_char_table): New function.
4165 (output_short_table, output_token_translations): Use it.
4166 (goto_actions): Use output_short_table.
4168 2000-10-16 Akim Demaille <akim@epita.fr>
4170 * src/symtab.c (bucket_new): New function.
4173 * src/output.c (output_short_table): New argument to display the
4174 comment associated with the table.
4175 Adjust dependencies.
4176 (output_gram): Use it.
4177 (output_rule_data): Nicer output layout for YYTNAME.
4179 2000-10-16 Akim Demaille <akim@epita.fr>
4181 * src/lex.c (read_typename): New function.
4183 * src/reader.c (copy_dollar): Likewise.
4185 2000-10-16 Akim Demaille <akim@epita.fr>
4187 * src/reader.c (copy_comment2): Expect the input stream to be on
4188 the `/' which is suspected to open a comment, instead of being
4189 called after `//' or `/*' was read.
4190 (copy_comment, copy_definition, parse_union_decl, copy_action)
4191 (copy_guard): Adjust.
4193 2000-10-16 Akim Demaille <akim@epita.fr>
4195 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4196 `read_signed_integer'.
4198 2000-10-16 Akim Demaille <akim@epita.fr>
4200 * src/reader.c (copy_dollar): New function.
4201 (copy_guard, copy_action): Use it.
4203 2000-10-16 Akim Demaille <akim@epita.fr>
4205 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4206 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4207 New files, from Fileutils 4.0.27.
4208 * src/main.c (printable_version): Remove.
4209 * src/lex.c, src/reader.c: Use `quote'.
4211 2000-10-04 Akim Demaille <akim@epita.fr>
4213 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4215 2000-10-04 Akim Demaille <akim@epita.fr>
4217 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4219 2000-10-04 Akim Demaille <akim@epita.fr>
4221 When a literal string is used to define two different tokens,
4222 `bison -v' segfaults.
4223 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4225 * tests/regression.m4: New file.
4226 Include the core of the sample provided by Piotr Gackiewicz.
4227 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4230 2000-10-04 Akim Demaille <akim@epita.fr>
4232 * src/reader.c (parse_expect_decl): Keep `count' within the size
4236 2000-10-02 Paul Eggert <eggert@twinsun.com>
4238 * bison.s1 (yyparse): Assign the default value
4239 unconditionally, to avoid a GCC warning and make the parser a
4242 2000-10-02 Akim Demaille <akim@epita.fr>
4244 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4247 2000-10-02 Akim Demaille <akim@epita.fr>
4249 * src/derives.c, src/print.c, src/reduce.c: To ease the
4250 translation, move some `\n' out of the translated strings.
4252 2000-10-02 Akim Demaille <akim@epita.fr>
4254 The location tracking mechanism is precious for parse error
4255 messages. Nevertheless, it is enabled only when `@n' is used in
4256 the grammar, which is a different issue (you can use it in error
4257 message, but not in the grammar per se). Therefore, there should
4258 be another means to enable it.
4260 * src/getargs.c (getargs): Support `--locations'.
4262 * src/getargs.h (locationsflag): Export it.
4263 * src/lex.c (percent_table): Support `%locations'.
4264 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4265 with `locationsflag'.
4266 * doc/bison.texinfo: Document `--locations' and `%locations'.
4268 * tests/calc.m4: Test it.
4270 For regularity of the names, replace each
4271 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4272 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4273 In addition replace each `flag' with `_flag'.
4275 2000-10-02 Akim Demaille <akim@epita.fr>
4277 Also test parse error messages, including with YYERROR_VERBOSE.
4279 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4281 Use it to check the computations.
4282 Use it to check `nonassoc' is honored.
4283 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4284 `--yyerror-verbose'.
4285 (_AT_CHECK_CALC): Adjust to this option.
4286 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4288 2000-10-02 Akim Demaille <akim@epita.fr>
4290 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4291 the latter demonstrates a flaw in the handling of non debugging
4292 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4293 was used in order to simplify:
4309 unfortunately this leads to a CPP conflict when
4310 `--name-prefix=foo' is used since it produces `#define yydebug
4313 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4314 (YYDPRINTF): New macro.
4316 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4318 Also test `--verbose', `--defines' and `--name-prefix'.
4320 2000-10-02 Akim Demaille <akim@epita.fr>
4322 Improve the readability of the produced parsers.
4324 * src/bison.s1: Formatting changes.
4325 Improve the comment related to the `$' mark.
4326 (yydefault): Don't fall through to `yyresume': `goto' there.
4327 * src/output.c (output_parser): When the `$' is met, skip the end
4329 New variable, `number_of_dollar_signs', to check there's exactly
4330 one `$' in the parser skeleton.
4332 2000-10-02 Akim Demaille <akim@epita.fr>
4334 * lib/xstrdup.c: New file, from the fileutils.
4335 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4336 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4337 instead of strlen + xmalloc + strcpy.
4338 * src/symtab.c (copys): Remove, use xstrdup instead.
4340 2000-10-02 Akim Demaille <akim@epita.fr>
4342 * src/gram.h (associativity): New enum type which replaces the
4343 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4344 `right_assoc', `left_assoc' and `non_assoc'.
4345 Adjust all dependencies.
4346 * src/reader.c: Formatting changes.
4347 (LTYPESTR): Don't define it, use it as a literal in
4348 `reader_output_yylsp'.
4349 * src/symtab.h (symbol_class): New enum type which replaces the
4350 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4351 `sunknown', `stoken and `snterm'.
4353 2000-10-02 Akim Demaille <akim@epita.fr>
4355 * src/getargs.c (fixed_outfiles): Rename as...
4356 (yaccflag): for consistency and accuracy.
4357 Adjust dependencies.
4359 2000-10-02 Akim Demaille <akim@epita.fr>
4361 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4362 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4363 difficult and introduced a lot of core dump. It turns out that
4364 Bison used an implementation of `xmalloc' based on `calloc', and
4365 at various places it does depend upon the initialization to 0. I
4366 have not tried to isolate the pertinent places, and all the former
4367 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4368 someone should address this issue.
4370 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4371 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4373 Adjust dependencies.
4374 * src/warshall.h: New file.
4377 2000-10-02 Akim Demaille <akim@epita.fr>
4379 Various anti-`extern in *.c' changes.
4381 * src/system.h: Include `assert.h'.
4383 2000-10-02 Akim Demaille <akim@epita.fr>
4385 * src/state.h (nstates, final_state, first_state, first_shift)
4386 (first_reduction): Move their exportation from here...
4387 * src/LR0.h: to here.
4388 Adjust dependencies.
4389 * src/getargs.c (statisticsflag): New variable.
4390 Add support for `--statistics'.
4391 Adjust dependencies.
4393 Remove a lot of now useless `extern' statements in most files.
4395 2000-10-02 Akim Demaille <akim@epita.fr>
4397 * src/LR0.h: New file.
4400 2000-10-02 Akim Demaille <akim@epita.fr>
4402 * src/print.h: New file.
4404 * src/print.c: Formatting and ordering changes.
4405 (verbose, terse): Replace with...
4406 (print_results): this new function.
4407 Adjust dependencies.
4409 2000-10-02 Akim Demaille <akim@epita.fr>
4411 * src/conflicts.c (conflict_report): New function.
4412 (conflict_log, verbose_conflict_log): Replace with...
4413 (print_conflicts): this function.
4414 Adjust dependencies.
4415 * src/conflicts.h: New file.
4416 Propagate its inclusion.
4418 2000-10-02 Akim Demaille <akim@epita.fr>
4420 * src/nullable.h: New file.
4421 Propagate its inclusion.
4422 * src/nullable.c: Formatting changes.
4424 2000-10-02 Akim Demaille <akim@epita.fr>
4426 * src/reduce.h: New file.
4427 Propagate its inclusion.
4428 * src/reduce.c: Topological sort and other formatting changes.
4429 (bool, TRUE, FALSE): Move their definition to...
4430 * src/system.h: here.
4432 2000-10-02 Akim Demaille <akim@epita.fr>
4434 * src/files.c: Formatting changes.
4435 (tryopen, tryclose, openfiles): Rename as...
4436 (xfopen, xfclose, open_files): this.
4437 (stringappend): static.
4438 * src/files.h: Complete the list of exported symbols.
4441 2000-10-02 Akim Demaille <akim@epita.fr>
4443 * src/reader.h: New file.
4444 Propagate its use instead of tedious list of `extern' and
4446 * src/reader.c: Formatting changes, topological sort,
4449 2000-10-02 Akim Demaille <akim@epita.fr>
4451 * src/lex.h: Prototype `lex.c' exported functions.
4452 * src/reader.c: Adjust.
4453 * src/lex.c: Formatting changes.
4454 (safegetc): Rename as...
4457 2000-10-02 Akim Demaille <akim@epita.fr>
4459 * src/lalr.h: New file.
4460 Propagate its inclusion instead of prototypes and `extern'.
4461 * src/lalr.c: Formatting changes, topological sorting etc.
4463 2000-10-02 Akim Demaille <akim@epita.fr>
4465 * src/output.c (token_actions): Introduce a temporary array,
4466 YYDEFACT, that makes it possible for this function to use
4469 2000-10-02 Akim Demaille <akim@epita.fr>
4471 `user_toknums' is output as a `short[]' in `output.c', while it is
4472 defined as a `int[]' in `reader.c'. For consistency with the
4473 other output tables, `user_toknums' is now defined as a table of
4476 * src/reader.c (user_toknums): Be a short table instead of an int
4478 Adjust dependencies.
4480 Factor the short table outputs.
4482 * src/output.c (output_short_table): New function.
4483 * src/output.c (output_gram, output_stos, output_rule_data)
4484 (output_base, output_table, output_check): Use it.
4486 2000-10-02 Akim Demaille <akim@epita.fr>
4488 * src/output.c (output): Topological sort of the functions, in
4489 order to get rid of the `static' prototypes.
4490 No longer use `register'.
4491 * src/output.h: New file.
4492 Propagate its inclusion in files explicitly prototyping functions
4495 2000-09-21 Akim Demaille <akim@epita.fr>
4497 * src/atgeneral.m4: Update from Autoconf.
4499 2000-09-21 Akim Demaille <akim@epita.fr>
4501 * src/closure.h: New file.
4502 * src/closure.c: Formatting changes, topological sort over the
4503 functions, use of closure.h.
4504 (initialize_closure, finalize_closure): Rename as...
4505 (new_closure, free_closure): these. Adjust dependencies.
4506 * src/LR0.c: Formatting changes, topological sort, use of
4508 (initialize_states): Rename as...
4510 * src/Makefile.am (noinst_HEADERS): Adjust.
4512 2000-09-20 Akim Demaille <akim@epita.fr>
4514 * src/acconfig.h: Don't protect config.h against multiple
4516 Don't define PARAMS.
4517 * src/system.h: Define PARAMS.
4518 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4519 purpose of config.h. system.h must not try to fix wrong
4520 definitions in config.h.
4522 2000-09-20 Akim Demaille <akim@epita.fr>
4524 * src/derives.h: New file.
4525 * src/main.c, src/derives.h: Use it.
4527 * src/Makefile.am (noinst_HEADERS): Adjust.
4529 2000-09-20 Akim Demaille <akim@epita.fr>
4531 * tests/atgeneral.m4: Update from Autoconf.
4532 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4533 (AT_CHECK_CALC): New macros.
4534 Use these macros to test bison with options `', `--raw',
4535 `--debug', `--yacc', `--yacc --debug'.
4537 2000-09-19 Akim Demaille <akim@epita.fr>
4539 * src/output.c: Formatting changes.
4540 * src/machine.h: Remove, leaving its contents in...
4541 * src/system.h: here.
4543 Adjust all dependencies on stdio.h and machine.h.
4544 * src/getargs.h: New file.
4545 Let all `extern' declarations about getargs.c be replaced with
4546 inclusion of `getargs.h'.
4547 * src/Makefile.am (noinst_HEADERS): Adjust.
4549 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4551 (yyerror): Returns void, not int.
4552 * doc/bison.texinfo: Formatting changes.
4554 2000-09-19 Akim Demaille <akim@epita.fr>
4556 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4559 2000-09-18 Akim Demaille <akim@epita.fr>
4561 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4562 * src/Makefile.am (INCLUDES): Don't.
4563 Be ready to fetch headers in lib/.
4565 2000-09-18 Akim Demaille <akim@epita.fr>
4567 * doc/bison.texinfo: Update the copyright.
4568 ANSIfy and GNUify the examples.
4569 Remove the old menu.
4571 2000-09-18 Akim Demaille <akim@epita.fr>
4573 First set of tests: use the `calc' example from the documentation.
4575 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4576 is defined only when YYDEBUG is.
4577 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4578 * src/files.c (tryopen, tryclose): Formatting changes.
4579 Move to the top and be static.
4580 * src/reader.c (read_signed_integer): Likewise.
4581 * tests/calc.m4: New file.
4582 * Makefile.am, suite.m4: Adjust.
4583 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4585 2000-09-18 Akim Demaille <akim@epita.fr>
4587 Add support for an Autotest test suite for Bison.
4589 * m4/m4.m4, m4/atconfig.m4: New files.
4590 * m4/Makefile.am (EXTRA_DIST): Adjust.
4591 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4593 * src/getargs.c: Display a more standard --version message.
4594 * src/reader.c (reader): Formatting changes.
4595 No longer depend upon VERSION_STRING.
4596 * configure.in: No longer use `dnl'.
4597 Set up the test suite and the new directory `tests/.
4598 (VERSION_STRING): Remove.
4600 2000-04-14 Akim Demaille <akim@epita.fr>
4602 * src/reader.c (copy_comment2): New function, same as former
4603 `copy_comment', but outputs into two FILE *.
4604 (copy_comment): Use it.
4605 (parse_union_decl): Use it.
4606 (get_type, parse_start_decl): Use the same `invalid' message.
4607 (parse_start_decl, parse_union_decl): Use the same `multiple'
4609 (parse_union_decl, copy_guard, copy_action): Use the same
4610 `unmatched' message.
4611 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4613 2000-03-31 Akim Demaille <akim@epita.fr>
4615 * src/files.c (tryopen, tryclose): Move to the top.
4618 2000-03-31 Akim Demaille <akim@epita.fr>
4620 * src/main.c (main): Don't call `done', exit does it.
4622 2000-03-31 Akim Demaille <akim@epita.fr>
4624 * allocate.c: s/return (foo)/return foo/.
4627 * output.c: Likewise.
4628 * reader.c: Likewise.
4629 * symtab.c: Likewise.
4630 * vmsgetargs.c: Likewise.
4632 2000-03-31 Akim Demaille <akim@epita.fr>
4634 Clean up the error reporting functions.
4636 * src/report.c: New file.
4637 * src/report.h: Likewise.
4638 * src/Makefile.am: Adjust.
4639 * m4/error.m4: New file.
4640 * m4/Makefile.am: Adjust.
4641 * configure.in (jm_PREREQ_ERROR): Call it.
4642 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4644 (fatal, fatals): Remove. All callers use complain.c::fatal.
4645 (warn, warni, warns, warnss, warnss): Remove. All callers use
4646 complain.c::complain.
4647 (toomany): Remove, use fatal instead.
4648 * src/files.c (done): No argument, use complain_message_count.
4649 * src/main.c (main): Register `done' to `atexit'.
4651 * src/getargs.c (usage): More `fputs', less `fprintf'.
4653 2000-03-28 Akim Demaille <akim@epita.fr>
4655 * lib/: New directory.
4656 * Makefile.am (SUBDIRS): Adjust.
4657 * configure.in: Adjust.
4658 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4660 * src/alloca.c: Moved to lib/.
4661 * src/getopt.c: Likewise.
4662 * src/getopt1.c: Likewise.
4663 * src/getopt.h: Likewise.
4664 * src/ansi2knr.c: Likewise.
4665 * src/ansi2knr.1: Likewise.
4666 * src/Makefile.am: Adjust.
4667 * lib/Makefile.am: New file.
4669 2000-03-28 Akim Demaille <akim@epita.fr>
4671 * src/getargs.c (usage): Refresh the help message.
4673 2000-03-17 Akim Demaille <akim@epita.fr>
4675 * src/getopt1.c: Updated from textutils 2.0e
4676 * src/getopt.c: Likewise.
4677 * src/getopt.h: Likewise.
4679 2000-03-17 Akim Demaille <akim@epita.fr>
4681 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4682 the file name, not the whole `#line LINE FILE'.
4684 2000-03-17 Akim Demaille <akim@epita.fr>
4686 On syntax errors, report the token on which we choked.
4688 * src/bison.s1 (yyparse): In the label yyerrlab, when
4689 YYERROR_VERBOSE, add yychar in msg.
4691 2000-03-17 Akim Demaille <akim@epita.fr>
4693 * src/reader.c (copy_at): New function.
4694 (copy_guard): Use it.
4695 (copy_action): Use it.
4697 2000-03-17 Akim Demaille <akim@epita.fr>
4699 Be kind to translators, save some useless translations.
4701 * src/main.c (banner): New function.
4702 (fatal_banner): Use it.
4703 (warn_banner): Use it.
4705 2000-03-17 Akim Demaille <akim@epita.fr>
4707 * src/reader.c (copy_definition): Use copy_string and
4708 copy_comment. Removed now unused `match', `ended',
4710 (copy_comment, copy_string): Moved, to be visible from
4713 2000-03-17 Akim Demaille <akim@epita.fr>
4715 * src/reader.c (copy_string): Declare `static inline'. No
4716 problems with inline, since it is checked by configure.
4717 (copy_comment): Likewise.
4719 2000-03-17 Akim Demaille <akim@epita.fr>
4721 * src/reader.c (packsymbols): Formatting changes.
4723 2000-03-17 Akim Demaille <akim@epita.fr>
4725 * src/reader.c (copy_comment): New function, factored out from:
4726 (copy_action): Use it. Removed now unused `match', `ended',
4728 (copy_guard): Likewise.
4730 2000-03-17 Akim Demaille <akim@epita.fr>
4732 * src/reader.c (copy_string): New function, factored out from:
4733 (copy_action): Use it.
4734 (copy_guard): Likewise.
4736 2000-03-17 Akim Demaille <akim@epita.fr>
4738 Change the handling of @s so that they behave exactly like $s.
4739 There is now a pseudo variable @$ (readble and writable), location
4740 of the lhs of the rule (by default ranging from the location of
4741 the first symbol of the rhs, to the location of the last symbol,
4742 or, if the rhs is empty, YYLLOC).
4744 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4746 (yyparse): When providing a default semantic action, provide a
4747 default location action.
4748 (after the $): No longer change `*YYLSP', just stack YYLOC the
4749 same way you stack YYVAL.
4750 * src/reader.c (read_declarations): Use warns.
4751 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4752 (copy_action, case '@'): Likewise.
4753 Use a standard error message, to save useless work from
4756 2000-03-17 Akim Demaille <akim@epita.fr>
4758 * src/bison.s1: Formatting and cosmetics changes.
4759 * src/reader.c: Likewise.
4760 Update the Copyright notice.
4762 2000-03-17 Akim Demaille <akim@epita.fr>
4764 * src/bison.s1 (#line): All set to `#line' only, since the
4765 Makefile now handles them.
4767 2000-03-16 Akim Demaille <akim@epita.fr>
4769 * src/output.c (output_rule_data): Output the documentation of
4771 (Copyright notice): Update.
4774 2000-03-16 Akim Demaille <akim@epita.fr>
4776 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4777 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4778 One `#if YYDEBUG' remains, since it uses variables which are
4779 defined only if `YYDEBUG != 0'.
4781 2000-03-16 Akim Demaille <akim@epita.fr>
4783 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4784 and related variables so that the similarities are highlighted.
4786 2000-03-16 Akim Demaille <akim@epita.fr>
4788 * src/bison.s1: Properly indent CPP directives.
4790 2000-03-16 Akim Demaille <akim@epita.fr>
4792 * src/bison.s1: Properly indent the `alloca' CPP section.
4794 2000-03-16 Akim Demaille <akim@epita.fr>
4796 Do not hard code values of directories in `configure.in'.
4797 Update the `configure' tool chain.
4799 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4801 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4802 (AC_OUTPUT): Add m4/Makefile.
4803 Bump to bison 1.28a, 1.29 has never been released.
4804 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4805 handled via src/Makefile.am.
4806 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4807 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4809 * Makefile.am (SUBDIRS): Add m4.
4810 (ACLOCAL_AM_FLAGS): New variable.
4811 (AUTOMAKE_OPTIONS): Add check-news.
4812 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4813 the proper line number and file name.
4814 (DEFS): Propagate the location of bison library files and of the
4816 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4818 * acinclude.m4: Remove, replaced by the directory m4.
4819 * m4/Makefile.am (EXTRA_DIST): New variable.
4820 * m4/gettext.m4: New file, from the fileutils.
4821 * m4/lcmessage.m4: Likewise
4822 * m4/progtest.m4: Likewise.
4823 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4825 2000-03-10 Akim Demaille <akim@epita.fr>
4828 Formatting changes of various comments.
4829 Respect the GNU coding standards at various places.
4830 Don't use `_()' when no translation is needed.
4832 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4835 OS/2 honors TMPDIR environment variable.
4837 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4839 * doc/bison.texinfo: Tweaked spelling and grammar.
4841 Removed reference to price of printed copy.
4842 Mention BISON_SIMPLE and BISON_HAIRY.
4844 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4846 * configure.in, NEWS:
4847 Bison 1.29 released.
4849 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4851 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4852 Added reference card.
4854 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4856 * po/ru.po: Added Russian translation.
4858 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4860 * configure.in: Added Russian translation.
4862 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4864 * configure.in, NEWS, README:
4865 Released version 1.28.
4867 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4870 Squashed redefinition warning on some systems.
4872 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4873 Have configure build version string instead of relying on ANSI string
4876 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4878 * po/POTFILES.in: Got rid of version.c.
4880 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4882 * acconfig.h, configure.in:
4883 Have configure build version string instead of relying on ANSI string
4886 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4889 Dropped mention of `+' for long-named options.
4891 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4893 * src/files.c: Added <unistd.h> for unlink().
4895 * src/Makefile.am, src/system.h:
4898 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4900 * README: Added a FAQ list.
4902 * configure.in, acconfig.h:
4905 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4907 * doc/FAQ, doc/Makefile.am:
4910 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4912 * src/alloc.h, src/symtab.h, src/version.c:
4913 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4915 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4917 * src/.cvsignore, src/Makefile.am:
4918 Reorganized: sources in `src', documentation in `doc'.
4920 * src/lex.c (literalchar):
4921 fixed the code for escaping double quotes (thanks
4924 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4926 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4927 Adjusted paths to reflect directory reorganization.
4929 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4931 * doc/.cvsignore, doc/Makefile.am:
4932 Reorganized: sources in `src', documentation in `doc'.
4934 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4937 Updated AC_INIT file to reflect directory reorganization.
4939 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4940 Reorganized: sources in `src', documentation in `doc'.
4942 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4945 Don't declare calloc() and realloc() if not necessary.
4947 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4949 * configure.in, acconfig.h, acinclude.m4:
4950 Don't declare calloc() and realloc() if not necessary.
4952 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4954 * po/.cvsignore: Added i18n support.
4956 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4958 * acconfig.h, configure.in, Makefile.am:
4961 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4963 * src/bison.s1: Fixed #line numbers.
4965 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4967 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4968 Added PO files from Translation Project.
4970 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4973 Added support for non-ANSI compilers (ansi2knr).
4975 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4977 * configure.in: Bumped version number to 1.27.
4980 Added `bison.simple' to list of files removed by `make distclean'.
4982 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4984 * src/files.c, src/files.h:
4985 Defined locations of parser files in config.h instead of Makefile.
4987 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4989 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4990 Defined locations of parser files in config.h instead of Makefile.
4992 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4995 Removed inappropriate use of $< macro.
4997 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4999 * po/Makefile.in.in, po/POTFILES.in:
5000 Add `po' directory skeleton.
5002 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5004 * README: Document help-bison list.
5006 * configure.in: Add check for mkstemp().
5008 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5010 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5011 Hush a few compiler warnings.
5014 Add tryclose(), which verifies that fclose was successful.
5015 Hush a couple of compiler warnings.
5017 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5019 * Makefile.am, OChangeLog:
5020 ChangeLog is now automatically generated. Include the old version as
5023 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5025 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
5028 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5030 * doc/bison.texinfo: Fix formatting glitch.
5032 * doc/bison.texinfo: Update FSF address.
5034 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5036 * acconfig.h: Update FSF address.
5038 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5041 Don't define PACKAGE here, since config.h defines it.
5043 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5045 * src/reader.c: Update copyright date.
5048 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5049 favor of output directly to stderr (avoids buffer overruns).
5051 * src/reader.c: Some checks for premature EOF.
5053 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
5054 Use prototypes if the compiler understands them.
5056 * src/files.c: Honor TMPDIR on Unix hosts.
5057 Use prototypes if the compiler understands them.
5060 Fix a couple of buffer overrun bugs.
5061 Use prototypes if the compiler understands them.
5063 * src/system.h: Include unistd.h and ctype.h.
5064 Use #ifdef instead of #if for NLS symbols.
5066 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5068 * doc/bison.texinfo:
5069 Delete comment "consider using @set for edition number, etc..." since
5070 we now are doing so.
5072 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5075 Use prototypes if the compiler understands them.
5077 * NEWS: Document 1.26 highlights.
5079 * Makefile.am: Require Automake 1.3 or later.
5082 Use prototypes if the compiler understands them.
5084 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5087 Use VERSION symbol from automake for version number.
5089 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5091 * acconfig.h, configure.in, version.cin:
5092 Use VERSION symbol from automake for version number.
5094 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5097 Distribute original version of simple parser (bison.s1), not built
5098 version (bison.simple).
5100 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5102 * doc/bison.texinfo: Add info dir entry.
5104 * doc/bison.texinfo:
5105 Let automake put version number into documentation.
5107 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5109 * src/bison.cld, src/build.com, src/vmshlp.mar:
5110 Add non-RCS files from /gd/gnu/bison.
5112 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5115 Document the BISON_HAIRY and BISON_SIMPLE variables.
5117 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5119 * src/version.c: Build version.c automatically.
5122 Fix token numbering (used to start at 258, not 257).
5124 * src/system.h: Include config.h.
5126 * src/getargs.c: Update bug report address.
5128 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5129 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5131 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5134 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5136 * configure.in, version.cin:
5137 Build version.c automatically.
5139 * AUTHORS: Add AUTHORS file.
5141 * README: Update bug report address.
5144 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5146 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5149 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5151 * doc/bison.texinfo: Clean up some formatting.
5153 1998-05-05 Richard Stallman <rms@gnu.org>
5155 * doc/bison.texinfo:
5156 Explain better why to make a pure parser.
5158 1998-01-05 Richard Stallman <rms@gnu.org>
5160 * src/files.c (openfiles):
5161 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5162 find a temporary directory, if possible. Do not unlink files while
5165 1997-08-25 Richard Stallman <rms@gnu.org>
5167 * src/reader.c (stack_offset;):
5168 Change some warni to warns.
5170 * src/lex.c (literalchar): Use warns, not warni.
5172 1997-06-28 Richard Stallman <rms@gnu.org>
5174 * src/bison.s1: Add a Bison version comment.
5176 * src/main.c (fatal, warn, berror):
5179 1997-06-28 Richard Stallman <rms@gnu.org>
5181 * Makefile.in (bison_version): New variable.
5182 (dist): Use that variable.
5183 (bison.s1): Substitute the Bison version into bison.simple.
5185 * bison.simple: Add a Bison version comment.
5187 1997-06-18 Richard Stallman <rms@gnu.org>
5189 * src/main.c (fatal, warn, berror):
5190 Make error messages standard.
5191 (toomany): Improve error message text.
5193 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
5194 new.h renamed to alloc.h.
5196 1997-06-18 Richard Stallman <rms@gnu.org>
5198 * Makefile.in: new.h renamed to alloc.h.
5200 1997-05-24 Richard Stallman <rms@gnu.org>
5202 * src/lex.c (literalchar):
5203 Fix the code for escaping \, " and '.
5205 (lex): Avoid trouble when there are many chars
5206 to discard in a char literal with just several chars in it.
5208 1997-05-17 Richard Stallman <rms@gnu.org>
5211 Use malloc, if using alloca is troublesome.
5212 (YYSTACK_USE_ALLOCA): New flag macro.
5213 Define it for some systems and compilers.
5214 (YYSTACK_ALLOC): New macro.
5215 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5216 If it was malloc'd, free it.
5218 1997-05-17 Richard Stallman <rms@gnu.org>
5221 Use malloc, if using alloca is troublesome.
5222 (YYSTACK_USE_ALLOCA): New flag macro.
5223 Define it for some systems and compilers.
5224 (YYSTACK_ALLOC): New macro.
5225 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5226 If it was malloc'd, free it.
5228 1997-04-23 Richard Stallman <rms@gnu.org>
5231 (alloca) [__hpux]: Always define as __builtin_alloca.
5233 1997-04-23 Richard Stallman <rms@gnu.org>
5236 (alloca) [__hpux]: Always define as __builtin_alloca.
5238 1997-04-22 Richard Stallman <rms@gnu.org>
5241 [__hpux]: Include alloca.h (right for HPUX 10)
5242 instead of declaring alloca (right for HPUX 9).
5244 * src/bison.s1 (__yy_memcpy):
5245 Declare arg `count' as unsigned int.
5246 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5248 1997-04-22 Richard Stallman <rms@gnu.org>
5251 [__hpux]: Include alloca.h (right for HPUX 10)
5252 instead of declaring alloca (right for HPUX 9).
5254 * bison.simple (__yy_memcpy):
5255 Declare arg `count' as unsigned int.
5256 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5258 1997-01-03 Richard Stallman <rms@gnu.org>
5260 * src/allocate.c: [__STDC__ or _MSC_VER]:
5261 Declare calloc and realloc to return void *.
5263 1997-01-02 Richard Stallman <rms@gnu.org>
5266 [_MSC_VER]: Include stdlib.h and process.h.
5267 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5269 * src/main.c (main): Return FAILURE as a value.
5270 (printable_version): Declare arg as int, not char.
5272 1997-01-02 Richard Stallman <rms@gnu.org>
5274 * Makefile.in (dist):
5275 Explicitly check for symlinks, and copy them.
5277 1996-12-19 Richard Stallman <rms@gnu.org>
5280 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5282 1996-12-18 Paul Eggert <eggert@gnu.org>
5284 * src/bison.s1 (yyparse):
5285 If __GNUC__ and YYPARSE_PARAM are both defined,
5286 declare yyparse to have a void * argument.
5288 1996-12-18 Paul Eggert <eggert@gnu.org>
5290 * bison.simple (yyparse):
5291 If __GNUC__ and YYPARSE_PARAM are both defined,
5292 declare yyparse to have a void * argument.
5294 1996-12-17 Richard Stallman <rms@gnu.org>
5296 * src/reduce.c (nbits): Add some casts.
5298 1996-08-12 Richard Stallman <rms@gnu.org>
5300 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5302 1996-08-12 Richard Stallman <rms@gnu.org>
5304 * bison.simple: Test _MSDOS as well as _MSDOS_.
5306 1996-07-31 Richard Stallman <rms@gnu.org>
5309 [__sun && __i386]: Include alloca.h.
5311 1996-07-31 Richard Stallman <rms@gnu.org>
5314 [__sun && __i386]: Include alloca.h.
5316 1996-07-30 Richard Stallman <rms@gnu.org>
5318 * src/bison.s1: Comment change.
5320 * src/bison.s1: Test _MSDOS_, not MSDOS.
5322 1996-07-30 Richard Stallman <rms@gnu.org>
5324 * bison.simple: Comment change.
5326 * bison.simple: Test _MSDOS_, not MSDOS.
5328 1996-06-01 Richard Stallman <rms@gnu.org>
5330 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
5331 Insert `_' macro around many string constants.
5334 Insert `_' macro around many string constants.
5336 (main): Call setlocale, bindtextdomain and textdomain.
5338 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5339 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5340 [ENABLE_NLS]: Include libintl.h.
5341 [ENABLE_NLS] (gettext): Define.
5342 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5343 (N_, PACKAGE, LOCALEDIR): New macros.
5345 1996-06-01 Richard Stallman <rms@gnu.org>
5347 * POTFILES.in: New file.
5349 * Makefile.in (allocate.o):
5350 Define target explicitly.
5352 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5353 (LDFLAGS): Set to @LDFLAGS@.
5354 (configure): Run autoconf only if preceding `cd' succeeds.
5355 (bison.s1): Redirect output to temporary file then move the
5356 temporary to the target, rather than redirecting directly to bison.s1.
5357 (clean): Remove config.status and config.log.
5358 (distclean): Don't remove config.status here.
5360 1996-05-12 Richard Stallman <rms@gnu.org>
5363 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5365 1996-05-12 Richard Stallman <rms@gnu.org>
5368 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5370 1996-05-11 Richard Stallman <rms@gnu.org>
5372 * src/bison.s1 (__yy_memcpy):
5373 Really reorder the args, as was supposedly done on Feb 14 1995.
5374 (yyparse): Calls changed accordingly.
5376 1996-05-11 Richard Stallman <rms@gnu.org>
5378 * Makefile.in (dist): Don't use $(srcdir).
5380 * bison.simple (__yy_memcpy):
5381 Really reorder the args, as was supposedly done on Feb 14 1995.
5382 (yyparse): Calls changed accordingly.
5384 1996-01-27 Richard Stallman <rms@gnu.org>
5386 * src/output.c (output_rule_data):
5387 Test YYERROR_VERBOSE in the conditional
5388 around the definition of ttyname.
5390 1995-12-29 Richard Stallman <rms@gnu.org>
5393 Fix line numbers in #line commands.
5395 1995-12-29 Richard Stallman <rms@gnu.org>
5398 Fix line numbers in #line commands.
5400 1995-12-27 Richard Stallman <rms@gnu.org>
5402 * src/bison.s1 (YYPARSE_PARAM_DECL):
5403 In C++, make it always null.
5404 (YYPARSE_PARAM_ARG): New macro.
5405 (yyparse): Use YYPARSE_PARAM_ARG.
5407 1995-12-27 Richard Stallman <rms@gnu.org>
5409 * bison.simple (YYPARSE_PARAM_DECL):
5410 In C++, make it always null.
5411 (YYPARSE_PARAM_ARG): New macro.
5412 (yyparse): Use YYPARSE_PARAM_ARG.
5414 1995-11-29 Richard Stallman <rms@gnu.org>
5416 * doc/bison.texinfo:
5417 Describe literal string tokens, %raw, %no_lines, %token_table.
5419 1995-11-29 Daniel Hagerty <hag@gnu.org>
5421 * doc/bison.texinfo: Fixed update date
5423 1995-10-16 Richard Stallman <rms@gnu.org>
5425 * src/version.c: Version 1.25.
5427 1995-10-16 Richard Stallman <rms@gnu.org>
5429 * NEWS: *** empty log message ***
5431 1995-10-16 Richard Stallman <rms@gnu.org>
5433 * doc/bison.1, doc/bison.rnh:
5436 1995-10-15 Richard Stallman <rms@gnu.org>
5438 * src/vmsgetargs.c, src/getargs.c:
5439 Added -n, -k, and -raw switches.
5440 (noparserflag, toknumflag, rawtoknumflag): New variables.
5442 * src/symtab.h (SALIAS):
5443 New #define for adding aliases to %token.
5444 (struct bucket): Added `alias' field.
5446 * src/reduce.c (reduce_grammar):
5447 Revise error message.
5448 (print_notices): Remove final `.' from error message.
5450 * src/reader.c (reader_output_yylsp):
5452 (readgram): Use `#if 0' around code that accepted %command
5453 inside grammar rules: The documentation doesn't allow it,
5454 and it will fail since the %command processors scan for the next %.
5455 (parse_token_decl): Extended the %token
5456 declaration to allow a multi-character symbol as an alias.
5457 (parse_thong_decl): New function.
5458 (read_declarations): Added %thong declarations.
5459 (read_declarations): Handle NOOP to deal with allowing
5460 % declarations as another means to specify the flags.
5461 (readgram): Allow %prec prior to semantics embedded in a rule.
5462 (skip_to_char, read_declarations, copy_definition)
5463 (parse_token_decl, parse_start_decl, parse_type_decl)
5464 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5465 (get_type_name, copy_guard, copy_action, readgram)
5466 (get_type, packsymbols): Revised most error messages.
5467 Changed `fatal' to `warnxxx' to avoid aborting for error.
5468 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5469 (read_declarations): Improve the error message for
5470 an invalid character. Do not abort.
5471 (read_declarations, copy_guard, copy_action): Use
5472 printable_version to avoid unprintable characters in printed output.
5473 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5474 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5475 Allow the type of a non-terminal can be given
5476 more than once, as long as all specifications give the same type.
5479 (output_headers, output_trailers, output, output_gram)
5480 (output_rule_data): Implement noparserflag variable.
5481 Implement toknumflag variable.
5482 (output): Call reader_output_yylsp to output LTYPESTR.
5484 * src/main.c (main):
5485 If reader sees an error, don't process the grammar.
5486 (fatals): Updated to not use VARARGS1.
5487 (printable_version, int_to_string, warn, warni, warns, warnss)
5488 (warnsss): New error reporting functions. Avoid abort for error.
5491 Added THONG and NOOP for alias processing.
5492 Added SETOPT for the new code that allows setting options with %flags.
5495 Include getopt.h. Add some extern decls.
5496 (safegetc): New function to deal with EOF gracefully.
5497 (literalchar); new function to deal with reading \ escapes.
5498 (lex): Use literalchar.
5499 (lex): Implemented "..." tokens.
5500 (literalchar, lex, parse_percent_token): Made tokenbuffer
5501 always contain the token. This includes growing the token
5502 buffer while reading an integer.
5503 (parse_percent_token): Replaced if-else statement with percent_table.
5504 (parse_percent_token): Added % declarations as another
5505 way to specify the flags -n, -l, and -r. Also added hooks for
5506 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5507 major changes to files.c.
5508 (lex) Retain in the incoming stream a character following
5510 (skip_white_space, lex): Revised most error messages
5511 and changed fatal to warn to avoid aborting.
5512 (percent_table): Added %thong declarations.
5514 * src/gram.h: Comment changes.
5516 * src/files.c (openfiles, open_extra_files, done):
5518 and actfile file. Handle noparserflag. Both for -n switch.
5520 * src/conflicts.c (resolve_sr_conflict):
5521 Remove use of alloca.
5523 1995-06-01 Jim Meyering <meyering@gnu.org>
5525 * doc/bison.texinfo: *** empty log message ***
5527 1995-05-06 Richard Stallman <rms@gnu.org>
5529 * src/bison.s1: Comment change.
5531 1995-05-06 Richard Stallman <rms@gnu.org>
5533 * bison.simple: Comment change.
5535 1995-05-03 Richard Stallman <rms@gnu.org>
5537 * src/version.c: Version now 1.24.
5539 * src/bison.s1: Change distribution terms.
5541 * src/version.c: Version now 1.23.
5543 1995-05-03 Richard Stallman <rms@gnu.org>
5545 * doc/bison.texinfo:
5546 Rewrite "Conditions for Using Bison".
5547 Update version to 1.24.
5549 1995-05-03 Richard Stallman <rms@gnu.org>
5551 * bison.simple: Change distribution terms.
5553 1995-02-23 Richard Stallman <rms@gnu.org>
5555 * src/files.c: Test __VMS_POSIX as well as VMS.
5557 1995-02-14 Jim Meyering <meyering@gnu.org>
5559 * src/bison.s1 (__yy_memcpy):
5560 Renamed from __yy_bcopy to avoid
5561 confusion. Reverse FROM and TO arguments to be consistent with
5564 1995-02-14 Jim Meyering <meyering@gnu.org>
5566 * bison.simple (__yy_memcpy):
5567 Renamed from __yy_bcopy to avoid
5568 confusion. Reverse FROM and TO arguments to be consistent with
5571 1994-11-10 David J. MacKenzie <djm@gnu.org>
5577 * Makefile.in (DISTFILES): Include NEWS.
5579 * Makefile.in (DISTFILES):
5580 Include install-sh, not install.sh.
5582 * configure.in: Update to Autoconf v2 macro names.
5584 1994-10-05 David J. MacKenzie <djm@gnu.org>
5586 * Makefile.in: fix typo
5588 * Makefile.in (prefix, exec_prefix):
5589 Let configure set them.
5591 1994-09-28 David J. MacKenzie <djm@gnu.org>
5593 * Makefile.in: Set datadir to $(prefix)/share.
5595 1994-09-15 Richard Stallman <rms@gnu.org>
5598 Update copyright notice and GPL version.
5600 1994-09-15 Richard Stallman <rms@gnu.org>
5603 Update copyright notice and GPL version.
5605 1994-07-12 Richard Stallman <rms@gnu.org>
5607 * src/reduce.c, src/reader.c:
5610 1994-05-05 David J. MacKenzie <djm@gnu.org>
5612 * Makefile.in: entered into RCS
5614 1994-03-26 Richard Stallman <rms@gnu.org>
5616 * src/bison.s1: entered into RCS
5618 1994-03-26 Richard Stallman <rms@gnu.org>
5620 * bison.simple: entered into RCS
5622 1994-03-25 Richard Stallman <rms@gnu.org>
5624 * src/main.c: entered into RCS
5626 1994-03-24 Richard Stallman <rms@gnu.org>
5628 * src/conflicts.c: entered into RCS
5630 1994-01-02 Richard Stallman <rms@gnu.org>
5632 * Makefile.in: *** empty log message ***
5634 1993-11-21 Richard Stallman <rms@gnu.org>
5636 * src/bison.s1: *** empty log message ***
5638 1993-11-21 Richard Stallman <rms@gnu.org>
5640 * doc/bison.texinfo: entered into RCS
5642 * doc/bison.texinfo: *** empty log message ***
5644 1993-11-21 Richard Stallman <rms@gnu.org>
5646 * bison.simple: *** empty log message ***
5648 1993-10-25 David J. MacKenzie <djm@gnu.org>
5650 * doc/bison.texinfo: *** empty log message ***
5652 1993-10-19 Richard Stallman <rms@gnu.org>
5654 * src/bison.s1: *** empty log message ***
5656 1993-10-19 Richard Stallman <rms@gnu.org>
5658 * bison.simple: *** empty log message ***
5660 1993-10-14 Richard Stallman <rms@gnu.org>
5662 * src/bison.s1: *** empty log message ***
5664 1993-10-14 Richard Stallman <rms@gnu.org>
5666 * bison.simple: *** empty log message ***
5668 1993-09-14 David J. MacKenzie <djm@gnu.org>
5670 * doc/bison.texinfo: *** empty log message ***
5672 1993-09-13 Noah Friedman <friedman@gnu.org>
5674 * Makefile.in: *** empty log message ***
5676 1993-09-10 Richard Stallman <rms@gnu.org>
5678 * src/conflicts.c: *** empty log message ***
5680 * src/system.h: entered into RCS
5682 1993-09-10 Richard Stallman <rms@gnu.org>
5684 * doc/bison.1: entered into RCS
5686 1993-09-06 Noah Friedman <friedman@gnu.org>
5688 * src/version.c: entered into RCS
5690 1993-09-06 Noah Friedman <friedman@gnu.org>
5692 * Makefile.in: *** empty log message ***
5694 1993-07-30 David J. MacKenzie <djm@gnu.org>
5696 * Makefile.in: *** empty log message ***
5698 1993-07-24 Richard Stallman <rms@gnu.org>
5700 * src/bison.s1: *** empty log message ***
5702 1993-07-24 Richard Stallman <rms@gnu.org>
5704 * bison.simple: *** empty log message ***
5706 1993-07-08 David J. MacKenzie <djm@gnu.org>
5708 * Makefile.in: *** empty log message ***
5710 1993-07-04 Richard Stallman <rms@gnu.org>
5712 * src/bison.s1: *** empty log message ***
5714 1993-07-04 Richard Stallman <rms@gnu.org>
5716 * bison.simple: *** empty log message ***
5718 1993-06-26 David J. MacKenzie <djm@gnu.org>
5720 * src/getargs.c: entered into RCS
5722 1993-06-26 David J. MacKenzie <djm@gnu.org>
5724 * doc/bison.texinfo: *** empty log message ***
5726 * doc/bison.1: New file.
5728 1993-06-25 Richard Stallman <rms@gnu.org>
5730 * src/getargs.c: New file.
5732 1993-06-16 Richard Stallman <rms@gnu.org>
5734 * src/bison.s1: *** empty log message ***
5736 1993-06-16 Richard Stallman <rms@gnu.org>
5738 * bison.simple: *** empty log message ***
5740 1993-06-03 Richard Stallman <rms@gnu.org>
5742 * src/bison.s1: New file.
5744 1993-06-03 Richard Stallman <rms@gnu.org>
5746 * doc/bison.texinfo: *** empty log message ***
5748 1993-06-03 Richard Stallman <rms@gnu.org>
5750 * bison.simple: New file.
5752 1993-05-19 Richard Stallman <rms@gnu.org>
5754 * doc/bison.texinfo: New file.
5756 1993-05-07 Noah Friedman <friedman@gnu.org>
5758 * Makefile.in: *** empty log message ***
5760 1993-04-28 Noah Friedman <friedman@gnu.org>
5762 * src/reader.c: *** empty log message ***
5764 1993-04-23 Noah Friedman <friedman@gnu.org>
5766 * src/alloc.h: entered into RCS
5768 1993-04-20 David J. MacKenzie <djm@gnu.org>
5770 * src/version.c: *** empty log message ***
5772 * src/files.c, src/allocate.c:
5775 * src/reader.c: *** empty log message ***
5777 * src/lex.c: entered into RCS
5779 * src/conflicts.c: New file.
5781 * src/symtab.c: entered into RCS
5783 * src/alloc.h: New file.
5785 * src/LR0.c: entered into RCS
5787 1993-04-18 Noah Friedman <friedman@gnu.org>
5789 * src/reader.c: New file.
5791 * src/version.c: *** empty log message ***
5793 1993-04-18 Noah Friedman <friedman@gnu.org>
5795 * Makefile.in: *** empty log message ***
5797 1993-04-17 Noah Friedman <friedman@gnu.org>
5799 * Makefile.in: *** empty log message ***
5801 1993-04-15 Richard Stallman <rms@gnu.org>
5803 * src/main.c, src/files.c:
5806 1993-04-15 Noah Friedman <friedman@gnu.org>
5808 * configure.in: entered into RCS
5810 * configure.in: *** empty log message ***
5812 * configure.in: New file.
5814 1993-04-14 Richard Stallman <rms@gnu.org>
5816 * Makefile.in: New file.
5818 1993-04-13 Richard Stallman <rms@gnu.org>
5820 * src/version.c: New file.
5822 1993-03-25 Richard Stallman <rms@gnu.org>
5824 * src/output.c: entered into RCS
5826 1992-09-25 Richard Stallman <rms@gnu.org>
5828 * configure.bat: entered into RCS
5830 1992-06-22 Richard Stallman <rms@gnu.org>
5832 * src/vmsgetargs.c: entered into RCS
5834 1992-06-22 Richard Stallman <rms@gnu.org>
5836 * doc/bison.rnh: entered into RCS
5838 1992-04-20 David J. MacKenzie <djm@gnu.org>
5840 * README: entered into RCS
5842 1992-01-22 Richard Stallman <rms@gnu.org>
5844 * src/machine.h: entered into RCS
5846 1991-12-21 Richard Stallman <rms@gnu.org>
5848 * src/lalr.c, src/closure.c:
5851 1991-12-20 Richard Stallman <rms@gnu.org>
5853 * src/state.h: entered into RCS
5855 1991-12-18 Richard Stallman <rms@gnu.org>
5857 * src/print.c, src/nullable.c, src/derives.c:
5860 1991-11-03 David J. MacKenzie <djm@gnu.org>
5862 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5865 1988-09-09 Richard Stallman <rms@gnu.org>
5867 * src/bison.hairy: entered into RCS
5869 1987-12-16 Richard Stallman <rms@gnu.org>
5871 * REFERENCES: entered into RCS