1 2002-03-19 Paul Eggert <eggert@twinsun.com>
3 * src/bison.simple (YYCOPY): New macro.
4 (YYSTACK_RELOCATE): Use it.
5 Remove Type arg; no longer needed. All callers changed.
6 (yymemcpy): Remove; no longer needed.
8 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
9 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11 2002-03-19 Akim Demaille <akim@epita.fr>
13 Test and fix the #line outputs.
15 * tests/atlocal.at (GCC): New.
16 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17 (Prologue synch line, ,%union synch line, Postprologue synch line)
18 (Action synch line, Epilogue synch line): New tests.
19 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20 * data/bison.simple, data/bison.c++: Use it.
23 2002-03-19 Akim Demaille <akim@epita.fr>
25 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
26 (Solved SR Conflicts, %expect not enough, %expect right)
27 (%expect too much): Move to...
28 * tests/conflicts.at: this new file.
30 2002-03-19 Akim Demaille <akim@epita.fr>
32 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
33 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
34 that we can move to enums for instance.
35 * src/output.c (token_definitions_output): Output a list of
36 `token-name, token-number' instead of the #define.
37 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
39 2002-03-14 Akim Demaille <akim@epita.fr>
43 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
45 * data/bison.c++: Make the user able to add members to the generated
46 parser by subclassing.
48 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
50 * src/reader.c (read_additionnal_code): `c' should be an integer, not
52 Reported by Nicolas Tisserand and Nicolas Burrus.
54 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
56 * src/reader.c: Warn about lacking semi-colons, do not complain.
58 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
60 * data/bison.c++: Remove a debug line.
62 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
64 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
65 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
66 provide a default implementation.
68 2002-03-04 Akim Demaille <akim@epita.fr>
70 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
71 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
72 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
73 * tests/semantic.at (Parsing Guards): Similarly.
74 * src/reader.at (readgram): Complain if the last rule is not ended
77 2002-03-04 Akim Demaille <akim@epita.fr>
79 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
80 * src/closure.c: here.
81 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
83 * src/warshall.h, src/warshall.c: Remove.
84 * tests/sets.at (Broken Closure): Adjust.
86 2002-03-04 Akim Demaille <akim@epita.fr>
88 * src/output.c (output_skeleton): tempdir is const.
91 2002-03-04 Akim Demaille <akim@epita.fr>
93 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
94 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
98 2002-03-04 Akim Demaille <akim@epita.fr>
100 * src/closure.c (closure): `r' is unused.
102 2002-03-04 Akim Demaille <akim@epita.fr>
104 * tests/sets.at (Broken Closure): Add the ending `;'.
105 * src/reader.at (readgram): Complain if a rule is not ended with a
108 2002-03-04 Akim Demaille <akim@epita.fr>
110 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
111 (count_sr_conflicts): Use bitset_count.
112 * src/reduce.c (inaccessable_symbols): Ditto.
114 * src/warshall.h, src/warshall.c: Convert to bitsetv.
116 2002-03-04 Akim Demaille <akim@epita.fr>
118 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
119 * src/reduce.c: Remove the `bitset_zero's following the
120 `bitset_create's, as now it is performed by the latter.
122 2002-03-04 Akim Demaille <akim@epita.fr>
124 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
125 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
126 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
127 latest sources from Michael.
129 2002-03-04 Akim Demaille <akim@epita.fr>
131 * src/output.c (output): Don't free the grammar.
132 * src/reader.c (grammar_free): New.
133 * src/main.c (main): Call it and don't free symtab here.
135 2002-03-04 Akim Demaille <akim@epita.fr>
137 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
139 Reported by Benoit Perrot.
141 2002-03-04 Akim Demaille <akim@epita.fr>
143 Use bitset operations when possible, not loops over bits.
145 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
147 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
148 * src/reduce.c (useless_nonterminals): Formatting changes.
149 * src/warshall.c (TC): Use bitset_or.
151 2002-03-04 Akim Demaille <akim@epita.fr>
153 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
154 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
157 2002-03-04 Akim Demaille <akim@epita.fr>
159 * src/lalr.c (F): Now a bitset*.
160 Adjust all dependencies.
162 2002-03-04 Akim Demaille <akim@epita.fr>
164 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
165 Adjust all dependencies.
167 2002-03-04 Akim Demaille <akim@epita.fr>
169 * src/L0.c, src/LR0.h (nstates): Be size_t.
170 Adjust comparisons (signed vs unsigned).
171 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
173 Adjust all dependencies.
175 2002-03-04 Akim Demaille <akim@epita.fr>
177 * src/closure.c (firsts): Now, also a bitset.
178 Adjust all dependencies.
179 (varsetsize): Remove, now unused.
180 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
182 2002-03-04 Akim Demaille <akim@epita.fr>
184 * src/print.c: Convert to use bitset.h, not hand coded iterations
187 2002-03-04 Akim Demaille <akim@epita.fr>
189 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
191 2002-03-04 Akim Demaille <akim@epita.fr>
193 * src/closure.c (ruleset): Be a bitset.
194 (rulesetsize): Remove.
196 2002-03-04 Akim Demaille <akim@epita.fr>
198 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
199 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
200 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
201 * src/closure.c (fderives): Be an array of bitsets.
203 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
205 * data/bison.c++: Merge the two generated headers. Insert a copyright
206 notice in each output file.
208 2002-02-28 Akim Demaille <akim@epita.fr>
210 * data/bison.c++: Copy the prologue of bison.simple to fetch
211 useful M4 definitions, such as b4_header_guard.
213 2002-02-25 Akim Demaille <akim@epita.fr>
215 * src/getargs.c (version): Give the name of the authors, and use a
216 translator friendly scheme for the bgr
219 2002-02-25 Akim Demaille <akim@epita.fr>
221 * src/output.c (header_output): Remove, now handled completely via
224 2002-02-25 Akim Demaille <akim@epita.fr>
226 * m4/m4.m4: New, from CVS Autoconf.
227 * configure.in: Invoke it.
228 * src/output.c (output_skeleton): Use its result instead of the
231 2002-02-25 Akim Demaille <akim@epita.fr>
233 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
235 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
236 * src/output.c (output_skeleton): Use mkstemp to create a real
238 Move the filling of `skeleton' and its muscle to...
240 (output): Move the definition of the prologue muscle to...
242 * src/system.h (DEFAULT_TMPDIR): New.
244 2002-02-14 Paul Eggert <eggert@twinsun.com>
246 Remove the support for C++ namespace cleanliness; it was
247 causing more problems than it was curing, since it didn't work
248 properly on some nonstandard C++ compilers. This can wait
249 for a proper C++ parser.
251 * NEWS: Document this.
252 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
253 of C++, as it's treated like C now.
254 * src/bison.simple (YYSTD): Remove.
255 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
256 Treat C++ just like Standard C instead of trying to support
257 namespace cleanliness.
259 2002-02-14 Akim Demaille <akim@epita.fr>
261 * tests/regression.at (else): Adjust to Andreas' change.
263 2002-02-14 Akim Demaille <akim@epita.fr>
265 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
267 2002-02-13 Andreas Schwab <schwab@suse.de>
269 * src/output.c (output_rule_data): Don't output NULL, it might
272 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
274 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
275 (Copyright notice): Update.
277 2002-02-11 Akim Demaille <akim@epita.fr>
279 * tests/regression.at (%nonassoc and eof): Don't include
282 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
284 * data/bison.c++: Correct error recovery. Make the user able to
285 initialize the starting location.
287 2002-02-07 Akim Demaille <akim@epita.fr>
289 * tests/input.at: New.
291 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
293 * data/bison.c++: Replace some direct m4 expansions by constants. Be
294 more consistent when naming methods and variables. Put preprocessor
295 directives around tables only needed for debugging.
297 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
299 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
301 (yy::b4_name::parse): Use print_.
303 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
305 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
307 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
309 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
311 (yy::b4_name::parse): Build verbose error messages, and use error_.
313 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
315 * data/bison.c++: Fix m4 quoting in comments.
317 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
319 * data/bison.c++: Adjust the parser code. Fix some muscles that were
322 2002-02-05 Akim Demaille <akim@epita.fr>
324 * data/bison.c++: Adjust to the M4 back end.
325 More is certainly needed.
327 2002-02-05 Akim Demaille <akim@epita.fr>
329 Give a try to M4 as a back end.
331 * lib/readpipe.c: New, from wdiff.
332 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
334 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
335 specific values. Now it is m4 that performs the lookup.
336 * src/parse-skel.y: Remove.
337 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
338 * src/output.c (actions_output, guards_output)
339 (token_definitions_output): No longer keeps track of the output
340 line number, hence remove the second argument.
341 (guards_output): Check against the guard member of a rule, not the
344 (output_skeleton): Don't look for the skeleton location, let m4 do
346 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
348 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
349 (prepare): Given that for the time being changesyntax is not
350 usable in M4, rename the muscles using `-' to `_'.
351 Define `defines_flag', `output_parser_name' and `output_header_name'.
352 * src/output.h (actions_output, guards_output)
353 (token_definitions_output): Adjust prototypes.
354 * src/scan-skel.l: Instead of scanning the skeletons, it now
355 processes the output of m4: `__oline__' and `#output'.
356 * data/bison.simple: Adjust to be used by M4(sugar).
357 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
359 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
360 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
361 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
362 shamelessly stolen from CVS Autoconf.
364 2002-02-05 Akim Demaille <akim@epita.fr>
366 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
367 * configure.in: Check for the declarations of free and malloc.
368 * src/muscle_tab.c: Adjust.
370 2002-02-05 Akim Demaille <akim@epita.fr>
372 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
373 which have no values.
375 2002-02-05 Akim Demaille <akim@epita.fr>
377 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
380 2002-01-29 Paul Eggert <eggert@twinsun.com>
382 * src/bison.simple (YYSIZE_T): Do not define merely because
383 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
384 On some platforms, <alloca.h> does not declare YYSTD (size_t).
386 2002-01-27 Akim Demaille <akim@epita.fr>
388 Fix `%nonassoc and eof'.
390 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
391 which were not properly copied! Replace
392 memcpy (res->errs, src->errs, src->nerrs);
394 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
396 * tests/regression.at (%nonassoc and eof): Adjust to newest
397 Autotest: `.' is not in the PATH.
399 2002-01-27 Akim Demaille <akim@epita.fr>
401 * tests/sets.at (AT_EXTRACT_SETS): New.
405 2002-01-26 Akim Demaille <akim@epita.fr>
407 * tests/actions.at, tests/calc.at, tests/headers.at,
408 * tests/torture.at: Adjust to the newest Autotest which no longer
409 forces `.' in the PATH.
411 2002-01-25 Akim Demaille <akim@epita.fr>
413 * tests/regression.at (%nonassoc and eof): New.
414 Suggested by Robert Anisko.
416 2002-01-24 Akim Demaille <akim@epita.fr>
418 Bison dumps core when trying to complain about broken input files.
419 Reported by Cris van Pelt.
421 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
422 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
424 (Invalid inputs): Strengthen: exercise parse_percent_token.
426 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
428 * src/Makefile.am: Add bison.c++.
429 * src/bison.c++: New skeleton.
431 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
435 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
437 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
439 2002-01-20 Marc Autret <marc@gnu.org>
441 * src/files.c (compute_output_file_names): Fix
443 2002-01-20 Marc Autret <marc@gnu.org>
445 * tests/output.at: New test.
446 * src/files.c (compute_base_names): Don't map extensions when
447 the YACC flag is set, use defaults.
448 Reported by Evgeny Stambulchik.
450 2002-01-20 Marc Autret <marc@gnu.org>
452 * src/system.h: Need to define __attribute__ away for non-GCC
453 compilers as well (i.e. the vendor C compiler).
454 Suggested by Albert Chin-A-Young.
456 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
458 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
459 canonical definition.
460 * src/system.h: Use the canonical definition for PARAMS (avoids
461 a conflict with the macro from lib/hash.h).
463 2002-01-11 Akim Demaille <akim@epita.fr>
465 * configure.in: Use AC_FUNC_STRNLEN.
466 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
468 2002-01-09 Akim Demaille <akim@epita.fr>
470 * src/files.c, src/files.h (output_infix): New.
471 (tab_extension): Remove.
472 (compute_base_names): Compute the former, drop the latter.
473 * src/output.c (prepare): Insert the muscles `output-infix', and
475 * src/parse-skel.y (string, string.1): New.
476 (section.header): Use it.
477 (section.yacc): Remove.
478 (prefix): Remove too.
479 * src/scan-skel.l: Adjust.
480 * src/bison.simple, src/bison.hairy: Adjust.
482 2002-01-09 Akim Demaille <akim@epita.fr>
484 * configure.in (WERROR_CFLAGS): Compute it.
485 * src/Makefile.am (CFLAGS): Pass it.
486 * tests/atlocal.in (CFLAGS): Idem.
487 * src/files.c: Fix a few warnings.
488 (get_extension_index): Remove, unused.
490 2002-01-08 Akim Demaille <akim@epita.fr>
492 * src/getargs.c (AS_FILE_NAME): New.
493 (getargs): Use it to convert DOSish file names.
494 * src/files.c (base_name): Rename as full_base_name to avoid
495 clashes with `base_name ()'.
496 (filename_split): New.
497 (compute_base_names): N-th rewrite, using filename_split.
499 2002-01-08 Akim Demaille <akim@epita.fr>
501 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
502 New, stolen from the Fileutils 4.1.
503 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
504 * configure.in: Check for the presence of memrchr, and of its
507 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
509 * lib/hash.h (__P): Added definition for this macro.
510 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
511 BUILT_SOURCES, to ensure they are generated first.
512 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
513 %error-verbose to allow bootstrapping with bison 1.30x.
515 2002-01-06 Akim Demaille <akim@epita.fr>
517 * src/reader.c (parse_braces): Don't fetch the next char, the
518 convention is to fetch on entry.
519 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
520 'switch' without a following semicolon.
521 * tests/regression.at (braces parsing): New.
523 2002-01-06 Akim Demaille <akim@epita.fr>
525 Bison is dead wrong in its RR conflict reports.
527 * tests/torture.at (GNU Cim Grammar): New.
528 * src/conflicts.c (count_rr_conflicts): Fix.
530 2002-01-06 Akim Demaille <akim@epita.fr>
532 Creating package.m4 from configure.ac causes too many problems.
534 * tests/Makefile.am (package.m4): Create it by hand,
535 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
537 2002-01-06 Akim Demaille <akim@epita.fr>
539 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
542 2002-01-04 Paul Eggert <eggert@twinsun.com>
544 * doc/bison.texinfo (Debugging):
545 Remove YYSTDERR; it's no longer defined or used.
546 Also, s/cstdio.h/cstdio/.
548 2002-01-03 Akim Demaille <akim@epita.fr>
550 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
552 2002-01-03 Akim Demaille <akim@epita.fr>
554 * src/parse-skel.y (process_skeleton): Don't bind the parser's
555 tracing code to --trace, wait for a better --trace option, with
558 2002-01-03 Akim Demaille <akim@epita.fr>
560 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
561 The ISO C++ standard is extremely clear about it: stderr is
562 considered a macro, not a regular symbol (see table 94 `Header
563 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
564 Therefore std:: does not apply to it. It still does with fprintf.
565 Also, s/cstdio.h/cstdio/.
567 2002-01-03 Akim Demaille <akim@epita.fr>
569 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
570 for non system headers.
572 2002-01-02 Akim Demaille <akim@epita.fr>
574 Equip the skeleton chain with location tracking, runtime trace,
575 pure parser and scanner.
577 * src/parse-skel.y: Request a pure parser, locations, and prefix
579 (%union): Having several members with the same type does not help
580 type mismatches, simplify.
581 (YYPRINT, yyprint): New.
582 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
585 * src/scan-skel.l: Adjust to these changes.
586 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
587 (LOCATION_PRINT, skel_control_t): New.
589 2001-12-30 Akim Demaille <akim@epita.fr>
591 * src/parse-skel.y: Get rid of the shift/reduce conflict:
592 replace `gb' with BLANKS.
593 * src/scan-skel.l: Adjust.
595 2001-12-30 Akim Demaille <akim@epita.fr>
597 * src/system.h: We don't need nor want bcopy.
598 Throw away MS-DOS crap: we don't need getpid.
599 * configure.in: We don't need strndup. It was even causing
600 problems: because Flex includes the headers *before* us,
601 _GNU_SOURCE is not defined by config.h, and therefore strndup was
603 * lib/xstrndup.c: New.
604 * src/scan-skel.l: Use it.
605 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
606 * src/parse-skel.y: Use %directives instead of #defines.
608 2001-12-30 Akim Demaille <akim@epita.fr>
610 * src/skeleton.h: New.
611 * src/output.c (output_parser, output_master_parser): Remove, dead
613 * src/output.h (get_lines_number, actions_output, guards_output)
614 (token_definitions_output): Prototype them.
615 * src/parse-skel.y: Add the license notice.
616 Include output.h and skeleton.h.
617 (process_skeleton): Returns void, and takes a single parameter.
618 * src/scan-skel.l: Add the license notice.
620 Don't use %option yylineno: it seems that then Flex imagines
621 REJECT has been used, and therefore it won't reallocate its
622 buffers (which makes no other sense to me than a bug). It results
623 in warnings for `unused: yy_flex_realloc'.
625 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
627 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
628 (MUSCLE_INSERT_PREFIX): ...to there.
629 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
630 (MUSCLE_INSERT_PREFIX): Move from here...
632 * src/bison.hairy: Add a section directive. Put braces around muscle
633 names. This parser skeleton is still broken, but Bison should not
634 choke on a bad muscle 'syntax'.
635 * src/bison.simple: Add a section directive. Put braces around muscle
638 * src/files.h (strsuffix, stringappend): Add declarations.
639 (tab_extension): Add declaration.
640 (short_base_name): Add declaration.
642 * src/files.c (strsuffix, stringappend): No longer static. These
643 functions are used in the skeleton parser.
644 (tab_extension): New.
645 (compute_base_names): Use the computations done in this function
646 to guess if the generated parsers should have '.tab' in their
648 (short_base_name): No longer static.
650 * src/output.c (output_skeleton): New.
651 (output): Disable call to output_master_parser, and give a try to
652 a new skeleton handling system.
653 (guards_output, actions_output): No longer static.
654 (token_definitions_output, get_lines_number): No longer static.
656 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
658 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
661 * src/parse-skel.y: New file.
662 * src/scan-skel.l: New file.
664 2001-12-29 Akim Demaille <akim@epita.fr>
666 %name-prefix is broken.
668 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
669 Adjust all dependencies.
670 * tests/headers.at (export YYLTYPE): Strengthen this test: use
673 Renaming yylval but not yylloc is not consistent. Now we do.
675 * src/bison.simple: Prefix yylloc if used.
676 * doc/bison.texinfo (Decl Summary): Document that.
678 2001-12-29 Akim Demaille <akim@epita.fr>
680 * doc/bison.texinfo: Promote `%long-directive' over
682 Remove all references to fixed-output-files, yacc is enough.
684 2001-12-29 Akim Demaille <akim@epita.fr>
686 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
687 user prologue. These are defaults.
688 * tests/actions.at (Mid-rule actions): Make sure the user can
689 define YYDEBUG and YYERROR_VERBOSE.
691 2001-12-29 Akim Demaille <akim@epita.fr>
693 * src/output.c (header_output): Don't forget to export YYLTYPE and
695 * tests/headers.at (export YYLTYPE): New, make sure it does.
696 * tests/regression.at (%union and --defines, Invalid CPP headers):
698 * tests/headers.at: here.
700 2001-12-29 Akim Demaille <akim@epita.fr>
702 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
704 2001-12-29 Akim Demaille <akim@epita.fr>
706 * tests/actions.at (Mid-rule actions): Output on a single line
709 2001-12-29 Akim Demaille <akim@epita.fr>
711 * doc/bison.texinfo: Formatting changes.
713 2001-12-29 Akim Demaille <akim@epita.fr>
715 Don't store the token defs in a muscle, just be ready to output it
716 on command. Now possible via `symbols'. Fixes a memory leak.
718 * src/output.c (token_definitions_output): New.
719 (output_parser, header_output): Use it.
720 * src/reader.c (symbols_save): Remove.
722 2001-12-29 Akim Demaille <akim@epita.fr>
724 * src/bison.simple: Do not provide a default for YYSTYPE and
725 YYLTYPE before the user's prologue. Otherwise it's hardly... a
728 2001-12-29 Akim Demaille <akim@epita.fr>
730 Mid-rule actions are simply... ignored!
732 * src/reader.c (readgram): Be sure to attach mid-rule actions to
733 the empty-rule associated to the dummy symbol, not to the host
735 * tests/actions.at (Mid-rule actions): New.
737 2001-12-29 Akim Demaille <akim@epita.fr>
741 * src/reader.c (reader): Free grammar.
743 2001-12-29 Akim Demaille <akim@epita.fr>
747 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
748 since it allocates it for each state, although only one is needed.
749 (allocate_storage): Do it here.
751 2001-12-29 Akim Demaille <akim@epita.fr>
753 * src/options.h, src/options.c (create_long_option_table): Rename
755 (long_option_table_new): this, with a clearer prototype.
756 (percent_table): Remove, unused,
757 * src/getargs.c (getargs): Adjust.
759 2001-12-29 Akim Demaille <akim@epita.fr>
761 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
762 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
765 2001-12-29 Akim Demaille <akim@epita.fr>
767 * src/lalr.c (build_relations): Rename `states' as `states1'.
768 Sorry, I don't understand exactly what it is, no better name...
770 2001-12-29 Akim Demaille <akim@epita.fr>
772 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
773 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
774 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
777 2001-12-29 Akim Demaille <akim@epita.fr>
779 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
782 2001-12-29 Akim Demaille <akim@epita.fr>
784 * src/reader.c, src/reader.h (user_toknums): Remove.
785 Adjust all users to use symbols[i]->user_token_number.
787 2001-12-29 Akim Demaille <akim@epita.fr>
789 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
790 Adjust all users to use symbols[i]->prec or ->assoc.
792 2001-12-29 Akim Demaille <akim@epita.fr>
794 * src/reader.c, src/reader.h (tags): Remove.
795 Adjust all users to use symbols[i]->tag.
797 2001-12-29 Akim Demaille <akim@epita.fr>
799 * src/gram.h, src/gram.c (symbols): New, similar to state_table
801 * src/reader.c (packsymbols): Fill this table.
803 * src/conflicts.c (resolve_sr_conflict): Adjust.
804 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
806 Use symbols[i]->tag instead of tags[i].
808 2001-12-29 Akim Demaille <akim@epita.fr>
810 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
811 In addition, put a comment in there, to replace...
812 * tests/regression.at (%union and C comments): Remove.
814 2001-12-29 Akim Demaille <akim@epita.fr>
816 * tests/regression.at (Web2c Actions): Blindly move the actual
817 output as expected output. The contents *seem* right to me, but I
818 can't pretend reading perfectly parser tables... Nonetheless, all
819 the other tests pass correctly, the table look OK, even though the
820 presence of `$axiom' is to be noted: AFAICS it is useless (but
823 2001-12-29 Akim Demaille <akim@epita.fr>
825 * src/reader.c (readgram): Don't add the rule 0 if there were no
826 rules read. In other words, add it _after_ having performed
827 grammar sanity checks.
828 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
830 2001-12-29 Akim Demaille <akim@epita.fr>
832 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
833 visible, and some states have now a different number.
835 2001-12-29 Akim Demaille <akim@epita.fr>
837 * src/reader.c (readgram): Bind the initial rule's lineno to that
839 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
840 (Solved SR Conflicts): Adjust rule 0's line number.
842 2001-12-29 Akim Demaille <akim@epita.fr>
844 Fix the `GAWK Grammar' failure.
846 * src/LR0.c (final_state): Initialize to -1 so that we do compute
847 the reductions of the first state which was mistakenly confused
848 with the final state because precisely final_state was initialized
850 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
851 now noticed by Bison.
852 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
853 have a reduction on $default.
855 2001-12-29 Akim Demaille <akim@epita.fr>
857 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
859 * src/closure.c (print_closure): Likewise.
860 * src/derives.c (print_derives): Likewise.
861 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
864 2001-12-29 Akim Demaille <akim@epita.fr>
866 * src/lalr.c (lookaheads_print): New.
867 (lalr): Call it when --trace-flag.
868 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
871 2001-12-29 Akim Demaille <akim@epita.fr>
873 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
874 when walking through ritem, even via rule->rhs.
875 * src/reduce.c (dump_grammar, useful_production, reduce_output)
876 (useful_production, useless_nonterminals): Likewise.
877 (reduce_grammar_tables): Likewise, plus update nritems.
878 * src/nullable.c (set_nullable): Likewise.
879 * src/lalr.c (build_relations): Likewise.
880 * tests/sets.at (Nullable): Adjust.
881 Fortunately, now, the $axiom is no longer nullable.
883 2001-12-29 Akim Demaille <akim@epita.fr>
885 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
887 * src/gram.c (ritem_longest_rhs): Likewise.
888 * src/reduce.c (nonterminals_reduce): Likewise.
889 * src/print_graph.c (print_graph): Likewise.
890 * src/output.c (output_rule_data): Likewise.
891 * src/nullable.c (set_nullable): Likewise.
893 2001-12-29 Akim Demaille <akim@epita.fr>
895 * src/output.c: Comment changes.
897 2001-12-27 Paul Eggert <eggert@twinsun.com>
899 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
900 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
901 Sparc, as they were causing more porting problems than the
902 (minor) performance improvement was worth.
904 Also, catch up with 1.31's YYSTD.
906 2001-12-27 Akim Demaille <akim@epita.fr>
908 * src/output.c (output_gram): Rely on nritems, not the
909 0-sentinel. See below.
910 Use -1 as separator, not 0.
911 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
912 Rely on -1 as separator in yyrhs, instead of 0.
913 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
914 twice `Now at end of input', therefore there are two lines less to
917 2001-12-27 Akim Demaille <akim@epita.fr>
919 * tests/regression.at (Unresolved SR Conflicts):
920 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
923 2001-12-27 Akim Demaille <akim@epita.fr>
925 * src/LR0.c (new_state): Recognize the final state by the fact it
926 is reached by eoftoken.
927 (insert_start_shifting_state, insert_eof_shifting_state)
928 (insert_accepting_state, augment_automaton): Remove, since now
929 these states are automatically computed from the initial state.
930 (generate_states): Adjust.
931 * src/print.c: When reporting a rule number to the user, substract
932 1, so that the axiom rule is rule 0, and the first user rule is 1.
933 * src/reduce.c: Likewise.
934 * src/print_graph.c (print_core): For the time being, just as for
935 the report, depend upon --trace-flags to dump the full set of
937 * src/reader.c (readgram): Once the grammar read, insert the rule
938 0: `$axiom: START-SYMBOL $'.
939 * tests/set.at: Adjust: rule 0 is now displayed, and since the
940 number of the states has changed (the final state is no longer
941 necessarily the last), catch up.
943 2001-12-27 Akim Demaille <akim@epita.fr>
945 Try to make the use of the eoftoken valid. Given that its value
946 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
947 is used instead of > 0 where appropriate, (ii), depend upon nritems
948 instead of the 0-sentinel.
950 * src/gram.h, src/gram.c (nritems): New.
951 Expected to be duplication of nitems, but for the time being...
952 * src/reader.c (packgram): Assert nritems and nitems are equal.
953 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
954 * src/closure.c (print_closure, print_fderives): Likewise.
955 * src/gram.c (ritem_print): Likewise.
956 * src/print.c (print_core, print_grammar): Likewise.
957 * src/print_graph.c: Likewise.
959 2001-12-27 Akim Demaille <akim@epita.fr>
961 * src/main.c (main): If there are complains after grammar
962 reductions, then output the report anyway if requested, then die.
963 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
964 * src/reader.c (eoftoken): New.
965 (parse_token_decl): If the token being defined has value `0', it
967 (packsymbols): No longer hack `tags' to insert `$' by hand.
968 Be sure to preserve the value of the eoftoken.
969 (reader): Make sure eoftoken is defined.
970 Initialize nsyms to 0: now eoftoken is created just like the others.
971 * src/print.c (print_grammar): Don't special case the eof token.
972 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
973 lie anyway, albeit pleasant.
974 * tests/calc.at: Exercise error messages with eoftoken.
975 Change the grammar so that empty input is invalid.
977 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
979 2001-12-27 Akim Demaille <akim@epita.fr>
981 * configure.in: Check the protos of strchr ans strspn.
982 Replace strchr if needed.
983 * src/system.h: Provide the protos of strchr, strspn and memchr if
986 * src/reader.c (symbols_save): Use strchr.
988 2001-12-27 Akim Demaille <akim@epita.fr>
990 * src/print.c, src/print_graph.c (escape): New.
991 Use it to quote the TAGS outputs.
992 * src/print_graph.c (print_state): Now errors are in red, and
994 Prefer high to wide: output the state number on a line of its own.
996 2001-12-27 Akim Demaille <akim@epita.fr>
998 * src/state.h, src/state.c (reductions_new): New.
999 * src/LR0.c (set_state_table): Let all the states have a
1000 `reductions', even if reduced to 0.
1001 (save_reductions): Adjust.
1002 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1003 * src/print.c (print_reductions, print_actions): Adjust.
1004 * src/output.c (action_row): Adjust.
1006 2001-12-27 Akim Demaille <akim@epita.fr>
1008 * src/state.h, src/state.c (errs_new, errs_dup): New.
1009 * src/LR0.c (set_state_table): Let all the states have an errs,
1010 even if reduced to 0.
1011 * src/print.c (print_errs, print_reductions): Adjust.
1012 * src/output.c (output_actions, action_row): Adjust.
1013 * src/conflicts.c (resolve_sr_conflict): Adjust.
1015 2001-12-27 Akim Demaille <akim@epita.fr>
1017 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1019 2001-12-27 Akim Demaille <akim@epita.fr>
1021 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1022 * src/print.c: here.
1023 (lookaheadset, shiftset): New, used as additional storage by
1025 (print_results): Adjust.
1026 (print_shifts, print_gotos, print_errs): New, extracted from...
1027 (print_actions): here.
1028 * src/print_graph.c (print_actions): Remove dead code.
1030 2001-12-27 Akim Demaille <akim@epita.fr>
1032 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1035 2001-12-27 Akim Demaille <akim@epita.fr>
1037 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1038 (build_relations): Adjust.
1040 2001-12-27 Akim Demaille <akim@epita.fr>
1042 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1045 2001-12-27 Akim Demaille <akim@epita.fr>
1047 * src/reader.c (packgram): Catch nitems overflows.
1049 2001-12-27 Akim Demaille <akim@epita.fr>
1051 * src/files.c, src/files.h (guard_obstack): Remove.
1052 * src/output.c (output): Adjust.
1053 * src/reader.c (parse_braces): New, factoring...
1054 (copy_action, copy_guard): these two which are renamed as...
1055 (parse_action, parse_guard): these.
1056 As a voluntary consequence, using braces around guards is now
1059 2001-12-27 Akim Demaille <akim@epita.fr>
1061 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1062 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1064 (symbol_list_new): Adjust.
1065 (copy_action): action_line is the first line, not the last.
1066 (copy_guard): Just as for actions, store the `action' only, not
1067 the switch/case/break flesh.
1068 Don't parse the user action that might follow the guard, let...
1069 (readgram): do it, i.e., now, there can be an action after a
1071 In other words the guard is just explicitly optional.
1073 * src/output.c (guards_output): New.
1074 (output_parser): Call it when needed.
1075 (output): Also free the guard and attrs obstacks.
1076 * src/files.c, src/files.h (obstack_save): Remove.
1077 (output_files): Remove.
1078 As a result, if one needs the former `.act' file, using an
1079 appropriate skeleton which requires actions and guards is now
1081 * src/main.c (main): Adjust.
1082 * tests/semantic.at: New.
1083 * tests/regression.at: Use `input.y' as input file name.
1084 Avoid 8+3 problems by requiring input.c when the test needs the
1087 2001-12-27 Akim Demaille <akim@epita.fr>
1089 * src/reader.c (symbol_list_new): Be sure to initialize all the
1092 2001-12-27 Akim Demaille <akim@epita.fr>
1094 All the hacks using a final pseudo state are now useless.
1096 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1097 * src/lalr.c (nLA): New.
1098 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1099 instead of lookaheadsp from the pseudo state (nstate + 1).
1101 2001-12-27 Akim Demaille <akim@epita.fr>
1103 * src/output.c (action_row, token_actions): Use a state_t instead
1104 of a integer, and nlookaheads instead of the following state's
1107 2001-12-27 Akim Demaille <akim@epita.fr>
1109 * src/conflicts.c (log_resolution, flush_shift)
1110 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1111 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1112 (conflicts_print, print_reductions): Use a state_t instead of an
1113 integer when referring to a state.
1114 As much as possible, depend upon nlookaheads, instead of the
1115 `lookaheadsp' member of the following state (since lookaheads of
1116 successive states are successive, the difference between state n + 1
1117 and n served as the number of lookaheads for state n).
1118 * src/lalr.c (add_lookback_edge): Likewise.
1119 * src/print.c (print_core, print_actions, print_state)
1120 (print_results): Likewise.
1121 * src/print_graph.c (print_core, print_actions, print_state)
1122 (print_graph): Likewise.
1123 * src/conflicts.h: Adjust.
1125 2001-12-27 Akim Demaille <akim@epita.fr>
1127 * src/bison.hairy: Formatting/comment changes.
1129 Remove `register' indications.
1130 Add plenty of `static'.
1132 2001-12-27 Akim Demaille <akim@epita.fr>
1134 * src/output.c (prepare): Drop the muscle `ntbase' which
1136 * src/bison.simple: Formatting/comment changes.
1137 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1138 is an undocumented synonym.
1140 2001-12-22 Akim Demaille <akim@epita.fr>
1142 * src/output.c (output_table_data): Change the prototype to use
1143 `int' for array ranges: some invocations do pass an int, not a
1145 Reported by Wayne Green.
1147 2001-12-22 Akim Demaille <akim@epita.fr>
1149 Some actions of web2c.y are improperly triggered.
1150 Reported by Mike Castle.
1152 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1153 * tests/regression.at (Web2c): Rename as...
1154 (Web2c Report): this.
1155 (Web2c Actions): New.
1157 2001-12-22 Akim Demaille <akim@epita.fr>
1159 Reductions in web2c.y are improperly reported.
1160 Reported by Mike Castle.
1162 * src/conflicts.c (print_reductions): Fix.
1163 * tests/regression.at (Web2c): New.
1165 2001-12-18 Akim Demaille <akim@epita.fr>
1167 Some host fail on `assert (!"foo")', which expands to
1168 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1169 Reported by Nelson Beebee.
1171 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1172 `#define it_succeeded 0' and `assert (it_succeeded)'.
1174 2001-12-17 Marc Autret <autret_m@epita.fr>
1176 * src/bison.simple: Don't hard code the skeleton line and filename.
1177 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1178 New line counter 'skeleton_line' (skeleton-line muscle).
1180 2001-12-17 Paul Eggert <eggert@twinsun.com>
1182 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1183 YYDEBUG must be defined to a nonzero value.
1185 * src/bison.simple (yytname): Do not assume that the user defines
1186 YYDEBUG to a properly parenthesized expression.
1188 2001-12-17 Akim Demaille <akim@epita.fr>
1190 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1191 nlookaheads is a new member.
1193 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1194 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1197 2001-12-17 Akim Demaille <akim@epita.fr>
1199 * src/files.h, src/files.c (open_files, close_files): Remove.
1200 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1202 * src/reader.c (reader): Do it.
1204 2001-12-17 Akim Demaille <akim@epita.fr>
1206 * src/conflicts.c (print_reductions): Formatting changes.
1208 2001-12-17 Akim Demaille <akim@epita.fr>
1210 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1211 (flush_reduce): New.
1212 (resolve_sr_conflict): Adjust.
1214 2001-12-17 Akim Demaille <akim@epita.fr>
1216 * src/output.c (output_obstack): Be static and rename as...
1217 (format_obstack): this, to avoid any confusion with files.c's
1219 * src/reader.h (muscle_obstack): Move to...
1220 * src/output.h: here, since it's defined in output.c.
1222 2001-12-17 Akim Demaille <akim@epita.fr>
1224 * src/output.c (action_row, save_column, default_goto)
1225 (sort_actions, matching_state, pack_vector): Better variable
1228 2001-12-17 Akim Demaille <akim@epita.fr>
1230 * src/output.c: Various formatting changes.
1232 2001-12-17 Akim Demaille <akim@epita.fr>
1234 * src/files.c (output_files): Free the output_obstack.
1235 * src/main.c (main): Call print and print_graph conditionally.
1236 * src/print.c (print): Work unconditionally.
1237 * src/print_graph.c (print_graph): Work unconditionally.
1238 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1240 2001-12-16 Marc Autret <autret_m@epita.fr>
1242 * src/output.c (actions_output): Fix. When we use %no-lines,
1243 there is one less line per action.
1245 2001-12-16 Marc Autret <autret_m@epita.fr>
1247 * src/bison.simple: Remove a useless #line directive.
1248 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1249 * src/output.c (get_lines_number): New.
1250 (output_parser): Adjust, now takes care about the lines of a
1253 (actions_output): Computes the number of lines taken by actions.
1254 (output_master_parser): Insert new skeleton which is the name of
1255 the output parser file name.
1257 2001-12-15 Marc Autret <autret_m@epita.fr>
1259 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1261 2001-12-15 Marc Autret <autret_m@epita.fr>
1263 * src/output.c (output_gram): Keep track of the hairy one.
1265 2001-12-15 Akim Demaille <akim@epita.fr>
1267 Make `make distcheck' work.
1269 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1270 system.h which uses libgettext.h.
1272 2001-12-15 Akim Demaille <akim@epita.fr>
1274 * src/nullable.c (set_nullable): Useless rules must be skipped,
1275 otherwise, since we range over their symbols, we might look at a
1276 nonterminal which no longer ``exists'', i.e., it is not counted in
1277 `nvars', hence we overflow our arrays.
1279 2001-12-15 Akim Demaille <akim@epita.fr>
1281 The header can also be produced directly, without any obstack!
1284 * src/files.c, src/files.h (defines_obstack): Remove.
1285 (compute_header_macro): Global.
1286 (defines_obstack_save): Remove.
1287 * src/reader.c (parse_union_decl): No longer output to
1288 defines_obstack: its content can be found in the `stype' muscle
1290 (output_token_translations): Merge into...
1291 (symbols_output): this.
1293 (symbols_save): this.
1295 * src/output.c (header_output): New.
1298 2001-12-15 Akim Demaille <akim@epita.fr>
1300 * src/reader.c (parse_union_decl): Instead of handling two obstack
1301 simultaneously, use one to define the `stype' muscle, and use the
1302 value of the latter to fill defines_obstack.
1303 (copy_comment): Remove.
1304 (copy_comment2): Work for a single obstack.
1306 (copy_comment): this.
1308 2001-12-15 Akim Demaille <akim@epita.fr>
1310 * src/lex.c, src/lex.h (xgetc): No longer static.
1311 * src/reader.c (parse_union_decl): Revamp.
1313 2001-12-15 Akim Demaille <akim@epita.fr>
1315 Still making progress in separating Bison into (i) input, (ii)
1316 process, (iii) output: now we can directly output the parser file
1317 without using table_obstack at all.
1319 * src/files.c, src/files.h (table_obstack): Bye bye.
1320 (parser_file_name): New.
1321 * src/files.c (compute_output_file_names): Compute it.
1322 * src/output.c (actions_output, output_parser)
1323 (output_master_parser): To a file instead of an obstack.
1325 2001-12-15 Akim Demaille <akim@epita.fr>
1327 Attach actions to rules, instead of pre-outputting them to
1330 * src/gram.h (rule_t): action and action_line are new members.
1331 * src/reader.c (symbol_list): Likewise.
1332 (copy_action): Save the actions within the rule.
1333 (packgram): Save them in rule_table.
1334 * src/output.c (actions_output): New.
1335 (output_parser): Use it on `%%actions'.
1336 (output_rule_data): Don't free rule_table.
1338 (prepare): Don't save the `action' muscle.
1339 * src/bison.simple: s/%%action/%%actions/.
1341 2001-12-15 Akim Demaille <akim@epita.fr>
1343 * src/reader.c (copy_action): When --yacc, don't append a `;'
1344 to the user action: let it fail if lacking.
1345 Suggested by Arnold Robbins and Tom Tromey.
1347 2001-12-14 Akim Demaille <akim@epita.fr>
1349 * src/lex.c (literalchar): Simply return the char you decoded, non
1350 longer mess around with obstacks and int pointers.
1353 2001-12-14 Akim Demaille <akim@epita.fr>
1355 * src/lex.c (literalchar): Don't escape the special characters,
1356 just decode them, and keep them as char (before, eol was output as
1357 the 2 char string `\n' etc.).
1358 * src/output.c (output_rule_data): Use quotearg to output the
1361 2001-12-13 Paul Eggert <eggert@twinsun.com>
1363 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1364 Do not infringe on the global user namespace when using C++.
1365 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1366 All uses of `fprintf' and `stderr' changed.
1368 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1370 2001-12-13 Akim Demaille <akim@epita.fr>
1372 The computation of nullable is broken: it doesn't handle empty
1375 * tests/torture.at (GNU AWK Grammar): New.
1376 * tests/sets.at (Nullable): New.
1377 * src/nullable.c (set_nullable): Instead of blindly looping over
1378 `ritems', loop over the rules, and then over their rhs's.
1380 Work around Autotest bugs.
1382 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1383 frame, because Autotest understand lines starting with a `+' as
1384 traces from the shell. Then, they are not processed properly.
1385 Admittedly an Autotest bug, but we don't have time to wait for
1386 Autotest to catch up.
1387 * tests/regression.at (Broken Closure): Adjust to the new table
1390 * tests/sets.at: here.
1392 2001-12-13 Akim Demaille <akim@epita.fr>
1394 * src/closure.c (closure): Use nrules instead of playing tricks
1397 2001-12-13 Akim Demaille <akim@epita.fr>
1399 * src/print.c (print_actions): Output the handling of `$' as the
1400 traces do: shifting the token EOF. Before EOF was treated as a
1402 * tests/regression.at: Adjust some tests.
1403 * src/print_graph.c (print_core): Complete the set of items via
1404 closure. The next-to-final and final states are still unsatisfying,
1405 but that's to be addressed elsewhere.
1406 No longer output the rule numbers, but do output the state number.
1407 A single loop for the shifts + gotos is enough, but picked a
1408 distinct color for each.
1409 (print_graph): Initialize and finalize closure.
1411 2001-12-13 Akim Demaille <akim@epita.fr>
1413 * src/reader.c (readgram): Remove dead code, an strip useless
1415 (get_type): Remove, unused.
1417 2001-12-12 Akim Demaille <akim@epita.fr>
1419 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1420 on that of lib/error.c.
1422 2001-12-12 Akim Demaille <akim@epita.fr>
1424 Some hosts don't like `/' in includes.
1426 * src/system.h: Include libgettext.h without qualifying the path.
1427 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1430 2001-12-11 Marc Autret <autret_m@epita.fr>
1432 * src/output.c (output_parser): Remove useless muscle.
1434 2001-12-11 Marc Autret <autret_m@epita.fr>
1436 * src/bison.simple: Remove #line just before %%epilogue. It
1437 is now handled in ...
1438 * src/reader.c (read_additionnal_code): Add the output of a
1439 #line for the epilogue.
1441 2001-12-10 Marc Autret <autret_m@epita.fr>
1443 * src/reader.c (copy_definition): Re-use CPP-outed code which
1444 replace precedent remove.
1445 * src/bison.simple: Remove #line before %%prologue because
1446 %%input-line is wrong at this time.
1448 2001-12-10 Marc Autret <autret_m@epita.fr>
1450 * src/reader.c (symbols_output): Clean up.
1451 * src/output.c (output_gram, output): Clean up.
1453 2001-12-10 Akim Demaille <akim@epita.fr>
1455 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1456 * src/LR0.c (set_state_table): here.
1457 * src/lalr.c (lalr): Call it.
1459 2001-12-10 Akim Demaille <akim@epita.fr>
1461 * src/state.h (shifts): Remove the `number' member: shifts are
1462 attached to state, hence no longer need to be labelled with a
1465 2001-12-10 Akim Demaille <akim@epita.fr>
1467 Now that states have a complete set of members, the linked list of
1468 shifts is useless: just fill directly the state's shifts member.
1470 * src/state.h (shifts): Remove the `next' member.
1471 * src/LR0.c (first_state, last_state): Remove.
1473 (augment_automaton): Don't look for the shifts that must be added
1474 a shift on EOF: it is those of the state we looked for! But now,
1475 since shifts are attached, it is no longer needed to looking
1476 merely by its id: its number.
1478 2001-12-10 Akim Demaille <akim@epita.fr>
1480 * src/LR0.c (augment_automaton): Better variable locality.
1481 Remove an impossible branch: if there is a state corresponding to
1482 the start symbol being shifted, then there is shift for the start
1483 symbol from the initial state.
1485 2001-12-10 Akim Demaille <akim@epita.fr>
1487 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1488 only when appropriate: when insert_start_shifting_state' is not
1490 * tests/regression.at (Rule Line Numbers): Adjust.
1492 2001-12-10 Akim Demaille <akim@epita.fr>
1494 * src/LR0.c (augment_automaton): Now that all states have shifts,
1495 merge the two cases addition shifts to the initial state.
1497 2001-12-10 Akim Demaille <akim@epita.fr>
1499 * src/lalr.c (set_state_table): Move to...
1501 * src/lalr.c (lalr): Don't call it...
1502 * src/LR0.c (generate_states): do it.
1503 * src/LR0.h (first_state): Remove, only the table is used.
1505 2001-12-10 Akim Demaille <akim@epita.fr>
1507 * src/LR0.h (first_shift, first_reduction): Remove.
1508 * src/lalr.c: Don't use first_shift: find shifts through the
1511 2001-12-10 Akim Demaille <akim@epita.fr>
1513 * src/LR0.c: Attach shifts to states as soon as they are
1515 * src/lalr.c (set_state_table): Instead of assigning shifts to
1516 state, just assert that the mapping was properly done.
1518 2001-12-10 Akim Demaille <akim@epita.fr>
1520 * src/LR0.c (insert_start_shift): Rename as...
1521 (insert_start_shifting_state): this.
1522 (insert_eof_shifting_state, insert_accepting_state): New.
1523 (augment_automaton): Adjust.
1524 Better locality of the variables.
1525 When looking if the start_symbol is shifted from the initial
1526 state, using `while (... symbol != start_symbol ...)' sounds
1527 better than `while (... symbol < start_symbol ...)': If fail
1528 to see how the order between symbols could be relevant!
1530 2001-12-10 Akim Demaille <akim@epita.fr>
1532 * src/getargs.h: Don't declare `spec_name_prefix' and
1533 `spec_file_prefix', declared by src/files.h.
1534 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1535 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1536 * src/output.c (prepare): Adjust.
1537 * src/reader.c (symbols_output): Likewise.
1538 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1540 2001-12-10 Akim Demaille <akim@epita.fr>
1542 * src/muscle_tab.c (muscle_init): NULL is a better default than
1545 2001-12-10 Akim Demaille <akim@epita.fr>
1547 * src/reader.c (reader): Calling symbols_output once is enough.
1549 2001-12-10 Akim Demaille <akim@epita.fr>
1551 Now that states have a complete set of members, the linked list of
1552 reductions is useless: just fill directly the state's reductions
1555 * src/state.h (struct reductions): Remove member `number' and
1557 * src/LR0.c (first_reduction, last_reduction): Remove.
1558 (save_reductions): Don't link the new reductions, store them in
1560 * src/lalr.c (set_state_table): No need to attach reductions to
1561 states, it's already done.
1562 * src/output.c (output_actions): No longer free the shifts, then
1563 the reductions, then the states: free all the states and their
1566 2001-12-10 Akim Demaille <akim@epita.fr>
1568 * src/options.c (OPTN, DRTV, BOTH): New.
1569 (option_table): Use them.
1571 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1572 the job of system.h.
1573 * src/options.c: Don't include stdio.h and xalloc.h for the same
1576 2001-12-10 Akim Demaille <akim@epita.fr>
1578 * src/output.c (output, prepare): Make sure the values of the
1579 muscles `action' and `prologue' are 0-terminated.
1581 2001-12-10 Akim Demaille <akim@epita.fr>
1583 Clean up GCC warnings.
1585 * src/reader.c (copy_action): `buf' is not used.
1586 (parse_skel_decl): Be static.
1587 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1588 * src/options.h (create_long_option_table): Have a real prototype.
1589 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1590 (hash_delete_at): Return const void *.
1591 Adjust casts to preserve the const.
1593 2001-12-10 Akim Demaille <akim@epita.fr>
1595 * configure.in: Require 2.52g.
1596 M4 is not needed, but AUTOM4TE is.
1598 * tests/Makefile.am: Adjust.
1600 2001-12-10 Akim Demaille <akim@epita.fr>
1602 One structure for states is enough, even though theoretically
1603 there are LR(0) states and LALR(1) states.
1605 * src/lalr.h (state_t): Remove.
1606 (state_table): Be state_t **, not state_t *.
1607 * src/state.h (core, CORE_ALLOC): Rename as...
1608 (state_t, STATE_ALLOC): this.
1609 Add the LALR(1) members: shifts, reductions, errs.
1610 * src/LR0.c (state_table): Rename as...
1611 (state_hash): this, to avoid name clashes with the global
1613 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1614 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1616 2001-12-10 Akim Demaille <akim@epita.fr>
1618 Bison dumps core on bash.y.
1619 Reported by Pascal Bart.
1621 * src/warshall.c (bitmatrix_print): New.
1623 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1624 j must be the outer loop.
1625 * tests/regression.at (Broken Closure): New.
1627 2001-12-05 Akim Demaille <akim@epita.fr>
1629 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1631 Reported by Peter Hámorský.
1633 2001-12-05 Akim Demaille <akim@epita.fr>
1635 * src/conflicts.c (err_table): Remove.
1636 (resolve_sr_conflict): Adjust.
1637 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1639 (state_t.reductions, state_t.shifts): this.
1641 2001-12-05 Akim Demaille <akim@epita.fr>
1643 * src/reduce.c (reduce_grammar_tables): No longer disable the
1644 removal of useless rules via CPP but via `if (0)', so that the
1645 compiler still check the code is valid.
1646 For instance, it should have noticed `rline' no longer exists: use
1647 the `line' member of rule_t.
1648 * src/gram.c (dummy, rline): Remove, unused.
1650 2001-12-05 Akim Demaille <akim@epita.fr>
1652 * src/output.c (pack_vector): Use assert, not berror.
1653 * src/main.c (berror): Remove, unused.
1655 2001-12-05 Akim Demaille <akim@epita.fr>
1657 New experimental feature: if --verbose --trace output all the
1658 items of a state, not only its kernel.
1660 * src/print.c (print_core): If `trace_flag', then invoke closure
1661 before outputting the items of the state (print_core is no longer
1662 a correct name them).
1663 (print_results): Invoke new_closure/free_closure if needed.
1665 2001-12-05 Akim Demaille <akim@epita.fr>
1667 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1668 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1669 (nitemset): for consistency with the rest of the project.
1671 2001-12-05 Akim Demaille <akim@epita.fr>
1673 * src/closure.c (print_closure): Improve.
1674 (closure): Use it for printing input and output.
1676 2001-12-05 Akim Demaille <akim@epita.fr>
1678 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1679 indexed by nonterminals.
1681 2001-12-05 Akim Demaille <akim@epita.fr>
1683 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1685 * src/warshall.h: Remove accidental duplication of the content.
1687 2001-12-05 Akim Demaille <akim@epita.fr>
1689 * src/closure.c (set_fderives): De-obfuscate.
1691 2001-12-05 Akim Demaille <akim@epita.fr>
1693 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1695 2001-12-05 Akim Demaille <akim@epita.fr>
1697 * src/closure.c (set_firsts): De-obfuscate.
1699 2001-12-05 Akim Demaille <akim@epita.fr>
1701 * src/output.c (action_row): De-obfuscate
1702 using the good o' techniques: arrays not pointers, variable
1703 locality, BITISSET, RESETBIT etc.
1705 2001-12-05 Akim Demaille <akim@epita.fr>
1707 Pessimize the code to simplify it: from now on, all the states
1708 have a valid SHIFTS, which NSHIFTS is possibly 0.
1710 * src/LR0.c (shifts_new): Be global and move to..
1711 * src/state.c, src/state.h: here.
1712 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1713 * src/print_graph: Adjust.
1715 2001-12-05 Akim Demaille <akim@epita.fr>
1717 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1718 * src/conflicts.c: Use it.
1719 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1720 incorrectly ``simplified''.
1722 2001-12-05 Akim Demaille <akim@epita.fr>
1724 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1725 using the good o' techniques: arrays not pointers, variable
1726 locality, BITISSET, RESETBIT etc.
1728 2001-12-05 Akim Demaille <akim@epita.fr>
1730 * src/state.h (SHIFT_SYMBOL): New.
1731 * src/conflicts.c: Use it to deobfuscate.
1733 2001-12-05 Akim Demaille <akim@epita.fr>
1735 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1736 (print_reductions): De-obfuscate using the good o' techniques:
1737 arrays not pointers, variable locality, BITISSET.
1739 2001-12-05 Akim Demaille <akim@epita.fr>
1741 * src/conflicts.c (print_reductions): Arrays, not pointers.
1744 2001-12-05 Akim Demaille <akim@epita.fr>
1746 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1748 2001-12-05 Akim Demaille <akim@epita.fr>
1750 * src/conflicts.c (print_reductions): Improve variable locality.
1752 2001-12-05 Akim Demaille <akim@epita.fr>
1754 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1756 2001-12-05 Akim Demaille <akim@epita.fr>
1758 * src/conflicts.c (print_reductions): Improve variable locality.
1760 2001-12-05 Akim Demaille <akim@epita.fr>
1762 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1763 * src/lalr.c: Use them.
1765 2001-12-05 Akim Demaille <akim@epita.fr>
1767 * src/LR0.c (augment_automaton): Formatting changes.
1768 Better variable locality.
1770 2001-12-05 Akim Demaille <akim@epita.fr>
1772 * src/lalr.c (matrix_print): New.
1773 (transpose): Use it.
1774 Use arrays instead of pointers.
1776 2001-12-05 Akim Demaille <akim@epita.fr>
1778 * src/lalr.c (maxrhs): Move to...
1779 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1780 * src/lalr.c (build_relations): Adjust.
1782 2001-12-05 Akim Demaille <akim@epita.fr>
1784 * src/lalr.c (transpose): Free the memory allocated to the
1785 argument, as it is replaced by the results by the unique caller.
1786 (build_relations): Merely invoke transpose: it handles the memory
1788 Improve variable locality.
1789 Avoid variables used as mere abbreviations.
1790 (compute_lookaheads): Use arrays instead of pointers.
1792 2001-12-05 Akim Demaille <akim@epita.fr>
1794 * src/lalr.c (initialize_F): Improve variable locality.
1795 Avoid variables used as mere abbreviations.
1797 2001-12-05 Akim Demaille <akim@epita.fr>
1799 * src/derives.c (print_derives): Display the ruleno.
1800 * src/lalr.c (initialize_F, transpose): Better variable locality
1801 to improve readability.
1802 Avoid variables used as mere abbreviations.
1804 2001-12-05 Akim Demaille <akim@epita.fr>
1806 * src/lalr.c (traverse): Use arrays instead of pointers.
1808 2001-12-05 Akim Demaille <akim@epita.fr>
1810 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1811 the handling of squeue.
1812 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1814 2001-12-05 Akim Demaille <akim@epita.fr>
1816 Because useless nonterminals are now kept alive (instead of being
1817 `destroyed'), we now sometimes examine them, and store information
1818 related to them. Hence we need to know their number, and adjust
1821 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1823 * src/LR0.c (allocate_itemsets): The memory allocated to
1824 `symbol_count' was used for two different purpose: once to count
1825 the number of occurrences of each symbol, and later reassigned to
1826 `shift_symbol', containing the symbol that can be shifted from a
1828 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1830 (new_itemsets): Allocate `shift_symbol' here.
1831 (allocate_itemsets): symbol_count includes useless nonterminals.
1833 (free_storage): Use `free', not `XFREE', for pointers that cannot
1836 2001-12-05 Akim Demaille <akim@epita.fr>
1838 * src/nullable.c (set_nullable): Deobfuscate the handling of
1840 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1842 2001-12-05 Akim Demaille <akim@epita.fr>
1844 * src/gram.c, src/gram.h (ritem_print): New.
1845 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1846 (This useless function was defined only to work around VMS linkers
1847 that can't handle compilation units with variables only).
1848 * src/reduce.c (dump_grammar): Use it to trace the construction of
1851 2001-12-04 Paul Eggert <eggert@twinsun.com>
1853 * src/bison.simple (union yyalloc): Change member names
1854 to be the same as the stack names.
1855 (yyparse): yyptr is now union yyalloc *, not char *.
1856 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1857 and may generate better code on some machines.
1858 (yystpcpy): Use prototype if __STDC__ is defined, not just
1859 if __cplusplus is defined.
1861 2001-11-30 Akim Demaille <akim@epita.fr>
1863 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1864 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1865 Gettext doesn't compile cleanly, and dies with -Werror.
1866 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1867 Include WARNING_CFLAGS here.
1868 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1869 before being defined.
1871 2001-11-27 Paul Eggert <eggert@twinsun.com>
1873 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1874 First arg is int, not unsigned.
1875 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1876 (SIZE_MAX, UINT_MAX): New macros.
1877 (quotearg_n_options): Abort if N is negative.
1878 Avoid overflow check on hosts where size_t is 64 bits and int
1879 is 32 bits, as overflow is impossible there.
1880 Fix off-by-one typo that caused unnecessary reallocation.
1882 2001-11-29 Paul Eggert <eggert@twinsun.com>
1884 Name space cleanup in generated parser.
1886 * doc/bison.texinfo (Bison Parser): Discuss system headers
1887 and their effect on the user name space.
1890 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1891 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1892 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1894 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1895 on user names when possible.
1897 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1898 Simplify test for whather <alloca.h> exists.
1900 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1902 (<stdio.h>): Include if YYDEBUG.
1904 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1905 ! defined (yyoverflow) && ! defined (yymemcpy).
1907 (yymemcpy, yyparse): Rename local variables as needed so that
1908 they all begin with 'yy'.
1910 (yystrlen, yystpcpy): New functions.
1912 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1915 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1916 instead of relying on string.h functions. Use YYSTACK_ALLOC
1917 and YYSTACK_FREE instead of malloc and free.
1919 2001-11-30 Akim Demaille <akim@epita.fr>
1921 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1922 before their first uses.
1923 (YYBISON, YYPURE): Move to the top of the output.
1925 2001-11-30 Akim Demaille <akim@epita.fr>
1927 * tests/reduce.at (Useless Nonterminals): Fix.
1929 2001-11-30 Akim Demaille <akim@epita.fr>
1931 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1932 if body instead of `;' to pacify GCC's warnings.
1934 2001-11-30 Akim Demaille <akim@epita.fr>
1936 Instead of mapping the LHS of unused rules to -1, keep the LHS
1937 valid, but flag the rules as invalid.
1939 * src/gram.h (rule_t): `useful' is a new member.
1940 * src/print.c (print_grammar): Adjust.
1941 * src/derives.c (set_derives): Likewise.
1942 * src/reader.c (packgram, reduce_output): Likewise.
1943 * src/reduce.c (reduce_grammar_tables): Likewise.
1944 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1946 2001-11-30 Akim Demaille <akim@epita.fr>
1948 * src/reduce.c (reduce_output): Formatting changes.
1949 * src/print.c (print_results, print_grammar): Likewise.
1950 * tests/regression.at (Rule Line Numbers)
1951 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1953 2001-11-30 Akim Demaille <akim@epita.fr>
1955 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1956 useless nonterminals, move them at the end of the symbol arrays.
1957 (reduce_output): Adjust.
1958 * tests/reduce.at (Useless Nonterminals): Adjust.
1960 2001-11-30 Akim Demaille <akim@epita.fr>
1962 * src/reduce.c: Various comment/formatting changes.
1963 (nonterminals_reduce): New, extracted from...
1964 (reduce_grammar_tables): here.
1965 (reduce_grammar): Call nonterminals_reduce.
1967 2001-11-29 Paul Eggert <eggert@twinsun.com>
1969 * src/bison.simple (YYSTACK_REALLOC): Remove.
1970 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
1971 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
1973 (union yyalloc): New type.
1974 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
1975 an arbitrary restriction on hosts where size_t is wider than int.
1977 (yyparse): Don't dump core if alloca or malloc fails; instead, report
1978 a parser stack overflow. Allocate just one block of memory for all
1979 three stacks, instead of allocating three blocks; this typically is
1980 faster and reduces fragmentation.
1982 Do not limit the number of items in the stack to a value that fits
1983 in 'int', as this is an arbitrary limit on hosts with 64-bit
1984 size_t and 32-bit int.
1986 2001-11-29 Marc Autret <autret_m@epita.fr>
1988 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
1989 of defining YYERROR_VERBOSE.
1990 [AT_DATA]: $4 is now out of C declarations in the prologue.
1992 2001-11-28 Marc Autret <autret_m@epita.fr>
1994 * src/reader.c (parse_dquoted_param): New.
1995 (parse_skel_decl): Use it.
1996 * src/lex.h: Add its prototype.
1997 * src/lex.c (literalchar): Become not static.
1999 2001-11-28 Marc Autret <autret_m@epita.fr>
2001 * src/output.h: And put its extern declaration here.
2002 * src/output.c (error_verbose): Define here.
2003 (prepare): Echo name modification.
2004 * src/getargs.h: Clean its extern declaration.
2005 * src/getargs.c (error_verbose_flag): Remove.
2006 (getargs): Remove case 'e'.
2007 * src/options.c (option_table): 'error-verbose' is now seen as simple
2011 * src/reader.c (read_declarations): Remove case tok_include.
2012 (parse_include_decl): Remove.
2013 * src/lex.h (token_t): Remove tok_include.
2014 * src/options.c (option_table): 'include' is now a simple command line
2017 2001-11-28 Marc Autret <autret_m@epita.fr>
2019 * src/bison.simple: Adjust muscle names.
2020 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2021 * src/output.c (prepare): s/_/-/ for the muscles names.
2022 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2024 2001-11-28 Marc Autret <autret_m@epita.fr>
2026 * src/bison.simple: Fix debug.
2027 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2029 2001-11-28 Akim Demaille <akim@epita.fr>
2031 * src/LR0.c (shifts_new): New.
2032 (save_shifts, insert_start_shift, augment_automaton): Use it.
2034 2001-11-28 Akim Demaille <akim@epita.fr>
2036 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2039 2001-11-28 Akim Demaille <akim@epita.fr>
2041 * src/closure.c (closure): Instead of looping over word in array
2042 then bits in words, loop over bits in array.
2044 2001-11-28 Akim Demaille <akim@epita.fr>
2046 * src/closure.c (closure): No longer optimize the special case
2047 where all the bits of `ruleset[r]' are set to 0, to make the code
2050 2001-11-28 Akim Demaille <akim@epita.fr>
2052 * src/closure.c (closure): `r' and `c' are new variables, used to
2053 de-obfuscate accesses to RULESET and CORE.
2055 2001-11-28 Akim Demaille <akim@epita.fr>
2057 * src/reduce.c (reduce_print): Use ngettext.
2058 (dump_grammar): Improve the trace accuracy.
2060 2001-11-28 Akim Demaille <akim@epita.fr>
2062 * src/reduce.c (dump_grammar): Don't translate trace messages.
2064 2001-11-28 Akim Demaille <akim@epita.fr>
2066 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2067 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2068 as all tags are free'ed afterwards.
2071 2001-11-27 Paul Eggert <eggert@twinsun.com>
2073 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2074 use alloca when we didn't want to, and vice versa.
2076 2001-11-27 Marc Autret <autret_m@epita.fr>
2078 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2080 * src/output.c (prepare): Remove its update.
2082 2001-11-27 Marc Autret <autret_m@epita.fr>
2084 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2087 2001-11-27 Marc Autret <autret_m@epita.fr>
2089 * src/bison.simple: Remove YYERROR_VERBOSE using.
2090 Use %%error_verbose.
2091 (yyparse): Likewise.
2092 * src/output.c (prepare): Give its final value.
2093 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2094 * src/getargs.h: Add its extern declaration.
2095 * src/getargs.c (error_verbose_flag): New int.
2096 (getargs): Update to catch new case.
2097 * src/options.c (option_table): 'error-verbose' is a new option.
2098 (shortopts): Update.
2100 2001-11-27 Akim Demaille <akim@epita.fr>
2102 * src/system.h: Use intl/libgettext.h.
2103 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2105 2001-11-27 Akim Demaille <akim@epita.fr>
2107 * tests/torture.at (Exploding the Stack Size with Malloc):
2108 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2110 2001-11-27 Akim Demaille <akim@epita.fr>
2112 * src/files.c: Include error.h.
2113 Reported by Hans Aberg.
2115 2001-11-26 Marc Autret <autret_m@epita.fr>
2117 * src/reader.c (parse_include_decl): New, not yet implemented.
2118 (read_declarations): Add case tok_include.
2119 * src/getargs.h (include): Add its extern definition.
2120 * src/getargs.c (include): New const char *.
2121 (getargs): Add case '-I'.
2122 * src/options.c (option_table): Add include as command line and
2124 * src/lex.h (token_t): Add tok_include.
2126 2001-11-26 Akim Demaille <akim@epita.fr>
2128 * src/reader.c (readgram): Make sure rules for mid-rule actions
2129 have a lineno equal to that of their host rule.
2130 Reported by Hans Aberg.
2131 * tests/regression.at (Rule Line Numbers): New.
2133 2001-11-26 Akim Demaille <akim@epita.fr>
2135 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2138 2001-11-26 Akim Demaille <akim@epita.fr>
2140 * src/complain.c, src/complain.h (error): Remove, provided by
2143 2001-11-26 Akim Demaille <akim@epita.fr>
2145 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2146 issue an error message.
2147 * tests/regression.at (Invalid %directive): New.
2148 Reported by Hans Aberg.
2150 2001-11-26 Akim Demaille <akim@epita.fr>
2152 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2153 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2155 2001-11-26 Akim Demaille <akim@epita.fr>
2157 * src/conflicts.c (conflicts_print): Don't complain at all when
2158 there are no reduce/reduce conflicts, and as many shift/reduce
2159 conflicts as expected.
2160 * tests/regression.at (%expect right): Adjust.
2162 2001-11-23 Akim Demaille <akim@epita.fr>
2164 * lib/alloca.c: Update, from fileutils.
2166 2001-11-23 Akim Demaille <akim@epita.fr>
2168 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2170 2001-11-23 Akim Demaille <akim@epita.fr>
2172 * src/system.h: Include alloca.h.
2173 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2175 2001-11-23 Akim Demaille <akim@epita.fr>
2177 * src/print_graph.c (print_actions): Remove `rule', unused.
2178 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2179 pacify GCC's signed < unsigned warnings.
2180 * src/closure.c (itemsetsize): Likewise.
2181 * src/reader.c (symbol_list_new): Static.
2183 2001-11-23 Akim Demaille <akim@epita.fr>
2185 Attaching lineno to buckets is stupid, since only one copy of each
2186 symbol is kept, only the line of the first occurrence is kept too.
2188 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2189 * src/reader.c (rline_allocated): Remove, unused.
2190 (symbol_list): Have a `line' member.
2191 (symbol_list_new): New.
2193 * src/print.c (print_grammar): Output the rule line numbers.
2194 * tests/regression.at (Solved SR Conflicts)
2195 (Unresolved SR Conflicts): Adjust.
2196 Reported by Hans Aberg.
2198 2001-11-22 Marc Autret <autret_m@epita.fr>
2200 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2202 2001-11-22 Marc Autret <autret_m@epita.fr>
2204 * src/muscle_tab.c (muscle_init): Remove initialization of
2206 * src/output.c (output_master_parser): Do it here.
2208 2001-11-20 Akim Demaille <akim@epita.fr>
2211 * configure.in (ALL_LINGUAS): Adjust.
2212 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2213 longer contains strings to translate.
2215 2001-11-19 Akim Demaille <akim@epita.fr>
2217 * src/conflicts.c (conflicts_print): Add a missing \n.
2219 2001-11-19 Akim Demaille <akim@epita.fr>
2221 * src/nullable.c (nullable_print): New.
2222 (set_nullable): Call it when tracing.
2223 Better locality of variables.
2225 2001-11-19 Akim Demaille <akim@epita.fr>
2227 * src/print.c (print_actions): Better locality of variables.
2229 2001-11-19 Akim Demaille <akim@epita.fr>
2231 * src/derives.c (print_derives): Fix and enrich.
2232 * src/closure.c (print_fderives): Likewise.
2234 2001-11-19 Akim Demaille <akim@epita.fr>
2236 * src/closure.c (itemsetend): Remove, replaced with...
2239 2001-11-19 Akim Demaille <akim@epita.fr>
2241 * src/LR0.c (kernel_end): Remove, replaced with...
2244 2001-11-19 Akim Demaille <akim@epita.fr>
2246 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2249 2001-11-19 Akim Demaille <akim@epita.fr>
2251 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2253 2001-11-19 Akim Demaille <akim@epita.fr>
2255 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2257 * src/LR0.c: Likewise.
2258 (allocate_itemsets): Use arrays instead of pointers to clarify.
2260 2001-11-19 Akim Demaille <akim@epita.fr>
2262 * src/getargs.c (statistics_flag): Replace with...
2264 (longopts): Accept --trace instead of --statistics.
2265 * src/getargs.h, src/options.c: Adjust.
2266 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2267 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2269 2001-11-19 Akim Demaille <akim@epita.fr>
2271 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2272 pointers to clarify the code.
2273 (save_reductions, save_shifts): Factor common parts of alternatives.
2275 2001-11-19 Akim Demaille <akim@epita.fr>
2277 * src/LR0.c (new_state, get_state): Complete TRACE code.
2278 * src/closure.c: Include `reader.h' to get `tags', needed by the
2280 Rename the conditional DEBUG as TRACE.
2281 Output consistently TRACEs to stderr, not stdout.
2282 * src/derives.c: Likewise.
2283 * src/reduce.c: (inaccessable_symbols): Using if is better style
2285 Use `#if TRACE' instead of `#if 0' for tracing code.
2287 2001-11-19 Akim Demaille <akim@epita.fr>
2289 * src/system.h (LIST_FREE, shortcpy): New.
2290 * src/LR0.c: Use them.
2291 * src/output.c (free_itemsets, free_reductions, free_shifts):
2292 Remove, replaced by LIST_FREE.
2294 2001-11-19 Akim Demaille <akim@epita.fr>
2296 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2297 (REDUCTIONS_ALLOC): New.
2298 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2301 2001-11-19 Akim Demaille <akim@epita.fr>
2303 * src/LR0.c (new_state): Complete trace code.
2304 * src/nullable.c (set_nullable): Don't translate traces.
2306 2001-11-19 Akim Demaille <akim@epita.fr>
2308 * src/print_graph.c (print_core): Better locality of variables.
2309 * src/print.c (print_core): Likewise.
2311 2001-11-19 Akim Demaille <akim@epita.fr>
2313 * src/vcg.c: You do the output, so you are responsible of the
2314 handling of VCG syntax, in particular: use quotearg.
2315 * src/print_graph.c: Don't.
2316 (print_actions): Don't output the actions as part of the nodes,
2317 since that's the job of the edges.
2318 (print_state): Don't output by hand: fill the node description,
2319 and ask for its output.
2321 2001-11-19 Akim Demaille <akim@epita.fr>
2323 * src/bison.simple (yyparse): When verbosely reporting an error,
2324 no longer put additional quotes around token names.
2325 * tests/calc.at: Adjust.
2327 2001-11-19 Akim Demaille <akim@epita.fr>
2329 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2330 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2331 * src/output.c: Adjust.
2333 2001-11-19 Akim Demaille <akim@epita.fr>
2335 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2337 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2339 2001-11-19 Akim Demaille <akim@epita.fr>
2341 * src/gram.h (rule_t): New.
2343 (rrhs, rlhs): Remove, part of state_t.
2344 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2345 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2346 * src/reader.c, src/reduce.c: Adjust.
2348 2001-11-19 Akim Demaille <akim@epita.fr>
2350 * src/reader.c (symbols_output): New, extracted from...
2351 (packsymbols): Here.
2354 2001-11-19 Akim Demaille <akim@epita.fr>
2356 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2357 (maxrhs): this new function.
2359 2001-11-19 Akim Demaille <akim@epita.fr>
2361 * src/lalr.c (F): New macro to access the variable F.
2364 2001-11-19 Akim Demaille <akim@epita.fr>
2366 * src/lalr.h (LA): New macro to access the variable LA.
2367 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2368 * src/lalr.c: Adjust.
2370 2001-11-19 Akim Demaille <akim@epita.fr>
2372 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2373 (set_state_table): handle the `lookaheads' members.
2375 2001-11-19 Akim Demaille <akim@epita.fr>
2377 * src/lalr.h (lookaheads): Removed array, whose contents is now
2379 (state_t): this structure.
2380 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2383 2001-11-19 Akim Demaille <akim@epita.fr>
2385 * src/lalr.h (consistent): Removed array, whose contents is now
2387 (state_t): this structure.
2388 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2391 2001-11-19 Akim Demaille <akim@epita.fr>
2393 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2394 contents are now members of...
2395 (state_t): this structure.
2396 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2399 2001-11-19 Akim Demaille <akim@epita.fr>
2401 * src/lalr.h (state_t): New.
2402 (state_table): Be a state_t * instead of a core **.
2403 (accessing_symbol): Remove, part of state_t.
2404 * src/lalr.c: Adjust.
2405 (set_accessing_symbol): Merge into...
2406 (set_state_table): this.
2407 * src/print_graph.c, src/conflicts.c: Adjust.
2409 2001-11-14 Akim Demaille <akim@epita.fr>
2411 * tests/calc.at, tests/output.at, tests/regression.at,
2412 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2413 now the tests are run in private dirs, therefore AC_CLEANUP and
2414 family can be simplified to 0-ary.
2415 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2416 use abs. path to find config.h.
2417 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2418 stderr, there can be way too much random noise.
2419 Instead pass -Werror to GCC and rely on the exit status.
2420 Reported by Wolfram Wagner.
2422 2001-11-14 Akim Demaille <akim@epita.fr>
2424 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2425 defined only if yyoverflow is defined, to avoid `warning: unused
2427 Reported by The Test Suite.
2429 2001-11-14 Akim Demaille <akim@epita.fr>
2431 * src/print.c: Include reduce.h.
2432 Reported by Hans Aberg.
2434 2001-11-14 Akim Demaille <akim@epita.fr>
2436 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2437 Revert a previous patch: these are really const.
2438 * src/conflicts.c (conflict_report): Additional useless pair of
2439 braces to pacify GCC's warnings for `if () if () {} else {}'.
2440 * src/lex.c (parse_percent_token): Replace equal_offset with
2443 Be sure to strdup `arg' when used, since there is no reason for
2444 token_buffer not to change.
2446 2001-11-14 Akim Demaille <akim@epita.fr>
2448 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2450 * src/main.c (main): Use them.
2451 Suggested by Hans Aberg.
2453 2001-11-12 Akim Demaille <akim@epita.fr>
2455 * src/system.h (ngettext): Now that we use ngettext, be sure to
2456 provide a default definition when NLS are not used.
2458 2001-11-12 Akim Demaille <akim@epita.fr>
2460 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2461 Use @kbd to denote user input.
2462 (Language and Grammar): ANSIfy the example.
2463 Adjust its layout for info/notinfo.
2464 (Location Tracking Calc): Output error messages to stderr.
2465 Output locations in a more GNUtically correct way.
2466 Fix a couple of Englishos.
2467 Adjust @group/@end group pairs.
2469 2001-11-12 Akim Demaille <akim@epita.fr>
2471 %expext was not functioning at all.
2473 * src/conflicts.c (expected_conflicts): Set to -1.
2474 (conflict_report): Use ngettext.
2475 (conflicts_print): Check %expect and make its violation an error.
2476 * doc/bison.texinfo (Expect Decl): Adjust.
2477 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2478 * tests/regression.at (%expect not enough, %expect right)
2479 (%expect too much): New.
2481 2001-11-12 Akim Demaille <akim@epita.fr>
2483 * tests/regression.at (Conflicts): Rename as...
2484 (Unresolved SR Conflicts): this.
2485 (Solved SR Conflicts): New.
2487 2001-11-12 Akim Demaille <akim@epita.fr>
2489 * src/reduce.c (print_results): Rename as...
2490 (reduce_output): This.
2491 Output to OUT, passed as argument, instead of output_obstack.
2492 (dump_grammar): Likewise.
2495 (reduce_grammar): No longer call reduce_output, since...
2496 * src/print.c (print_results): do it.
2497 * src/main.c (main): Call reduce_free;
2499 2001-11-12 Akim Demaille <akim@epita.fr>
2501 * src/conflicts.c (print_reductions): Accept OUT as argument.
2502 Output to it, not to output_obstack.
2503 * src/print.c (print_actions): Adjust.
2505 2001-11-12 Akim Demaille <akim@epita.fr>
2507 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2508 the result instead of using...
2509 (src_total, rrc_total, src_count, rrc_count): Remove.
2510 (any_conflicts): Remove.
2511 (print_conflicts): Split into...
2512 (conflicts_print, conflicts_output): New.
2513 * src/conflicts.h: Adjust.
2514 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2515 * src/print.c (print_grammar): Issue `\n' between two rules.
2516 * tests/regression.at (Conflicts): New.
2517 Reported by Tom Lane.
2519 2001-11-12 Akim Demaille <akim@epita.fr>
2521 * tests/regression.at (Invalid input): Remove, duplicate with
2522 ``Invalid input: 1''.
2524 2001-11-12 Akim Demaille <akim@epita.fr>
2526 * tests/torture.at (AT_DATA_STACK_TORTURE)
2527 (Exploding the Stack Size with Alloca)
2528 (Exploding the Stack Size with Malloc): New.
2530 2001-11-12 Akim Demaille <akim@epita.fr>
2532 * src/bison.simple (YYSTACK_REALLOC): New.
2533 (yyparse) [!yyoverflow]: Use it and free the old stack.
2534 Reported by Per Allansson.
2536 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2538 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2539 define CPP macro, which substitute YYSTYPE by yystype.
2540 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2541 with yyltype/YYLTYPE. This allows inclusion of the generated
2542 header within the parser if the compiler, such as GGC, accepts
2543 multiple equivalent #defines.
2546 2001-11-05 Akim Demaille <akim@epita.fr>
2548 * src/reader.c (symbols_output): New, extracted from...
2549 (packsymbols): here.
2552 2001-11-05 Akim Demaille <akim@epita.fr>
2554 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2556 2001-11-05 Akim Demaille <akim@epita.fr>
2558 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2561 2001-11-05 Akim Demaille <akim@epita.fr>
2563 * src/options.h (struct option_table_struct): set_flags is void*.
2564 * src/options.c (longopts): Support `--output' and `%output'.
2566 * src/lex.h (tok_setopt): Remove, replaced with...
2567 (tok_intopt, tok_stropt): these new guys.
2568 * src/lex.c (getopt.h): Not needed.
2569 (token_buffer, unlexed_token_buffer): Not const.
2570 (percent_table): Promote `-' over `_' in directive names.
2571 Active `%name-prefix', `file-prefix', and `output'.
2572 (parse_percent_token): Accept possible arguments to directives.
2573 Promote `-' over `_' in directive names.
2575 2001-11-04 Akim Demaille <akim@epita.fr>
2577 * doc/bison.texinfo (Decl Summary): Split the list into
2578 `directives for grammars' and `directives for bison'.
2580 Add description of `%name-prefix', `file-prefix', and `output'.
2581 Promote `-' over `_' in directive names.
2582 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2583 Simplify the description of `--name-prefix'.
2584 Promote `-' over `_' in directive names.
2585 Promote `--output' over `--output-file'.
2586 Fix the description of `--defines'.
2587 * tests/output.at: Exercise %file-prefix and %output.
2589 2001-11-02 Akim Demaille <akim@epita.fr>
2591 * doc/refcard.tex: Update.
2593 2001-11-02 Akim Demaille <akim@epita.fr>
2595 * src/symtab.h (SUNDEF): New.
2596 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2597 stand for `uninitialized', instead of 0.
2598 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2599 * src/lex.c (lex): Adjust.
2601 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2603 Let yylex return it instead of a plain 0.
2604 Reported by Dick Streefland.
2606 2001-11-02 Akim Demaille <akim@epita.fr>
2608 * tests/regression.at (Mixing %token styles): New test.
2610 2001-11-02 Akim Demaille <akim@epita.fr>
2612 * src/reader.c (parse_thong_decl): Formatting changes.
2613 (token_translations_init): New, extracted from...
2614 (packsymbols): Here.
2617 2001-11-01 Akim Demaille <akim@epita.fr>
2619 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2620 Check that `9foo.y' produces correct cpp guards.
2621 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2625 2001-11-01 Akim Demaille <akim@epita.fr>
2627 * tests/regression.at (Invalid input: 2): New.
2628 * src/lex.c (unlexed_token_buffer): New.
2629 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2633 2001-11-01 Akim Demaille <akim@epita.fr>
2635 * tests/calc.at: Catch up with 1.30.
2636 * configure.in: Bump to 1.49a.
2637 Adjust to newer Autotest.
2639 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2641 * src/conflicts.c: Move global variables rrc_total and src_total ...
2642 (print_conflicts): here.
2643 * src/output.c (output): Free global variable user_toknums.
2644 * src/lex.c (token_obstack): Become static.
2646 2001-10-18 Akim Demaille <akim@epita.fr>
2648 * tests/atlocal.in (GCC): Add.
2649 * tests/calc.at: s/m4_match/m4_bmatch/.
2650 s/m4_patsubst/m4_bpatsubst/.
2651 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2652 * configure.in: AC_SUBST(GCC).
2654 2001-10-14 Marc Autret <autret_m@epita.fr>
2656 * src/options.c (create_long_option_table): Fix.
2658 2001-10-10 Akim Demaille <akim@epita.fr>
2660 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2662 2001-10-04 Akim Demaille <akim@epita.fr>
2664 * src/reader.c (parse_union_decl): Push the caracters in
2665 union_obstack, not attrs_obstack.
2667 2001-10-04 Akim Demaille <akim@epita.fr>
2669 Merge in the branch 1.29.
2671 * src/reader.c (packsymbols): Use a temporary obstack for
2672 `%%tokendef', since output_stack is already used elsewhere.
2674 2001-10-02 Akim Demaille <akim@epita.fr>
2678 2001-10-02 Akim Demaille <akim@epita.fr>
2682 2001-10-02 Akim Demaille <akim@epita.fr>
2684 * tests/regression.at (Invalid CPP headers): New.
2685 From Alexander Belopolsky.
2686 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2688 2001-10-02 Akim Demaille <akim@epita.fr>
2690 * tests/regression.at (Invalid input): New.
2691 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2694 2001-10-02 Akim Demaille <akim@epita.fr>
2696 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2698 2001-10-02 Akim Demaille <akim@epita.fr>
2700 * src/output.c (output_parser): Assert `skeleton'.
2701 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2705 2001-10-01 Marc Autret <autret_m@epita.fr>
2707 * src/lex.h: Echo modifications.
2708 * src/lex.c (unlex): Parameter is now token_t.
2711 2001-10-01 Marc Autret <autret_m@epita.fr>
2713 * src/main.c: Include lex.h.
2716 2001-09-29 Akim Demaille <akim@epita.fr>
2718 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2720 2001-09-28 Akim Demaille <akim@epita.fr>
2722 * tests/testsuite.at: Update to newer Autotest.
2723 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2725 2001-09-27 Akim Demaille <akim@epita.fr>
2727 Position independent wrapper.
2729 * tests/bison: Remove.
2730 * tests/bison.in: New.
2731 * configure.in: Adjust.
2733 2001-09-27 Paul Eggert <eggert@twinsun.com>
2735 Port quotearg fixes from tar 1.13.24.
2737 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2739 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2740 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2742 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2743 * m4/mbrtowc.m4: New file.
2744 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2745 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2747 2001-09-27 Akim Demaille <akim@epita.fr>
2751 2001-09-27 Akim Demaille <akim@epita.fr>
2755 2001-09-25 Akim Demaille <akim@epita.fr>
2757 * src/system.h: Include `xalloc.h'.
2758 Remove it from the C files.
2759 * src/files.c (output_files): Free the obstacks.
2760 * src/lex.c (init_lex): Rename as...
2763 * src/main.c (main): Use it.
2765 2001-09-24 Marc Autret <autret_m@epita.fr>
2767 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2768 to output informations in fout (FILE*).
2769 (open_graph, close_graph): Likewise.
2770 (output_graph, output_edge, output_node): Likewise.
2771 * src/vcg.h: Update function prototypes.
2772 * src/print_graph.c (print_graph): Open output graph file.
2773 (print_actions): Adjust.
2774 * src/files.h: Remove extern declaration.
2775 * src/files.c: Remove graph_obstack declaration.
2776 (open_files): Remove graph_obstack initialization.
2777 (output_files): Remove graph_obstack saving.
2779 2001-09-24 Marc Autret <autret_m@epita.fr>
2781 * src/files.c (compute_output_file_names): Fix.
2783 2001-09-24 Marc Autret <autret_m@epita.fr>,
2784 Akim Demaille <akim@epita.fr>
2786 * src/reader.c (reader): Remove call to free_symtab ().
2787 * src/main.c (main): Call it here.
2789 * src/conflicts.c (initialize_conflicts): Rename as...
2790 (solve_conflicts): this.
2791 * src/print.c (print_core, print_actions, print_state)
2792 (print_grammar): Dump to a file instead a `output_obstack'.
2793 (print_results): Dump `output_obstack', and then proceed with the
2795 * src/files.c (compute_output_file_names, close_files): New.
2796 (output_files): Adjust.
2797 * src/main.c (main): Adjust.
2799 2001-09-23 Marc Autret <autret_m@epita.fr>
2801 * src/files.c (compute_header_macro): Computes header macro name
2802 from spec_defines_file when given.
2804 2001-09-23 Marc Autret <autret_m@epita.fr>
2806 * src/files.c (output_files): Add default extensions.
2808 2001-09-22 Akim Demaille <akim@epita.fr>
2810 * src/conflicts.c (finalize_conflicts): Rename as...
2811 (free_conflicts): this.
2813 2001-09-22 Akim Demaille <akim@epita.fr>
2815 * src/gram.c (gram_free): Rename back as...
2817 (output_token_translations): Free `token_translations'.
2818 * src/symtab.c (free_symtab): Free the tag field.
2820 2001-09-22 Akim Demaille <akim@epita.fr>
2822 Remove `translations' as it is always set to true.
2824 * src/gram.h: Adjust.
2825 * src/reader.c (packsymbols, parse_token_decl): Adjust
2826 * src/print.c (print_grammar): Adjust.
2827 * src/output.c (output_token_translations): Adjust.
2828 * src/lex.c (lex): Adjust.
2829 * src/gram.c: Be sure the set pointers to NULL.
2830 (dummy): Rename as...
2833 2001-09-22 Akim Demaille <akim@epita.fr>
2835 * configure.in: Invoke AM_LIB_DMALLOC.
2836 * src/system.h: Use dmalloc.
2837 * src/LR0.c: Be sure to have pointers initialized to NULL.
2838 (allocate_itemsets): Allocate kernel_items only if needed.
2840 2001-09-22 Akim Demaille <akim@epita.fr>
2842 * configure.in: Bump to 1.29b.
2843 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2844 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2845 need xmalloc.c in calc.y.
2848 2001-09-21 Akim Demaille <akim@epita.fr>
2851 * Makefile.maint, config/config.guess, config/config.sub,
2852 * config/missing: Update from masters.
2853 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2855 * configure.in (ALL_LINGUAS): Add `tr'.
2857 2001-09-21 Akim Demaille <akim@epita.fr>
2859 * tests/Makefile.am (package.m4): Move to...
2860 ($(srcdir)/$(TESTSUITE)): here.
2862 2001-09-20 Akim Demaille <akim@epita.fr>
2864 * src/complain.c: No longer try to be standalone: use system.h.
2865 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2866 * src/complain.h: Likewise.
2867 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2868 Remove the unused variable `n'.
2869 From Albert Chin-A-Young.
2871 2001-09-18 Marc Autret <autret_m@epita.fr>
2873 * doc/bison.1: Update.
2874 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2876 (Option Cross Key): Update.
2879 2001-09-18 Marc Autret <autret_m@epita.fr>
2881 * tests/regression.at: New test (comment in %union).
2883 2001-09-18 Marc Autret <autret_m@epita.fr>
2885 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2887 Reported by Keith Browne.
2889 2001-09-18 Marc Autret <autret_m@epita.fr>
2891 * tests/output.at: Add tests for --defines and --graph.
2893 2001-09-18 Marc Autret <autret_m@epita.fr>
2895 * tests/output.at: Removes tests of %{header,src}_extension features.
2897 2001-09-18 Akim Demaille <akim@epita.fr>
2899 * tests/Makefile.am (package.m4): New.
2900 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2901 (_AT_CHECK_CALC_ERROR): Likewise.
2902 Factor the `, ' part of verbose error messages.
2904 2001-09-18 Marc Autret <autret_m@epita.fr>
2906 * src/getargs.c (longopts): Declare --defines and --graph as options
2907 with optional arguments.
2908 * src/files.h: Add extern declarations.
2909 * src/files.c (spec_graph_file, spec_defines_file): New.
2910 (output_files): Update.
2911 Remove CPP-outed code.
2913 2001-09-18 Marc Autret <autret_m@epita.fr>
2915 Turn off %{source,header}_extension feature.
2917 * src/files.c (compute_exts_from_gf): Update.
2918 (compute_exts_from_src): Update.
2919 (output_files): CPP-out useless code.
2920 * src/files.h: Remove {header,source}_extension extern declarations.
2921 * src/reader.c (parse_dquoted_param): CPP-out.
2922 (parse_header_extension_decl): Remove.
2923 (parse_source_extension_decl): Remove.
2924 (read_declarations): Remove cases tok_{hdrext,srcext}.
2925 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2926 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2928 2001-09-10 Akim Demaille <akim@epita.fr>
2930 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2931 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2932 (AT_CHECK_OUTPUT): this.
2933 Merely check ls' exit status, its output is useless.
2935 2001-09-10 Akim Demaille <akim@epita.fr>
2937 * tests/calc.at: Use m4_match.
2938 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2940 2001-09-10 Marc Autret <autret_m@epita.fr>,
2941 Akim Demaille <akim@epita.fr>
2943 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2945 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2947 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2948 * src/lex.h: Adjust prototype.
2949 (token_t): Add `tok_undef'.
2950 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2951 (parse_percent_token): Now returns token_t.
2952 Add default statement in switch.
2953 (lex): Separate `c' as an input variable, from the token_t result
2955 (unlexed): Is a token_t.
2957 2001-09-10 Akim Demaille <akim@epita.fr>
2959 * configure.in: Bump to 1.29a.
2961 2001-09-07 Akim Demaille <akim@epita.fr>
2965 2001-08-30 Akim Demaille <akim@epita.fr>
2967 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
2968 * m4/atconfig.m4: Remove.
2969 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
2971 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
2972 m4_if, m4_patsubst, and m4_regexp.
2973 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
2974 `input' file instead of echo.
2976 2001-08-29 Akim Demaille <akim@epita.fr>
2980 2001-08-29 Akim Demaille <akim@epita.fr>
2984 2001-08-29 Paul Eggert <eggert@twinsun.com>
2986 * src/bison.simple (yyparse): Don't take the address of an
2987 item before the start of an array, as that doesn't conform to
2990 2001-08-29 Robert Anisko <anisko_r@epita.fr>
2992 * doc/bison.texinfo (Location Tracking Calc): New node.
2994 2001-08-29 Paul Eggert <eggert@twinsun.com>
2996 * src/output.c (output): Do not define const, as this now
2997 causes more problems than it cures.
2999 2001-08-29 Akim Demaille <akim@epita.fr>
3001 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3003 Be sure to tag the `detailmenu'.
3005 2001-08-29 Akim Demaille <akim@epita.fr>
3007 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3008 download in a tmp dir.
3010 2001-08-28 Marc Autret <autret_m@epita.fr>
3012 * config/depcomp: New file.
3014 2001-08-28 Marc Autret <autret_m@epita.fr>
3016 * doc/bison.1 (mandoc): Adjust.
3017 From Juan Manuel Guerrero.
3019 2001-08-28 Marc Autret <autret_m@epita.fr>
3021 * src/print_graph.c (print_state): Fix.
3023 2001-08-27 Marc Autret <autret_m@epita.fr>
3025 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3027 Echo modifications to the functions prototypes.
3028 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3030 2001-08-27 Marc Autret <autret_m@epita.fr>
3032 * src/vcg.c: Include `xalloc.h'.
3033 (add_colorentry): New.
3034 (add_classname): New.
3035 (add_infoname): New.
3036 * src/vcg.h: Add new prototypes.
3038 2001-08-27 Akim Demaille <akim@epita.fr>
3040 * Makefile.maint: Sync. again with CVS Autoconf.
3042 2001-08-27 Akim Demaille <akim@epita.fr>
3044 * Makefile.maint: Formatting changes.
3045 (po-update, cvs-update, update): New targets.
3048 2001-08-27 Akim Demaille <akim@epita.fr>
3050 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3051 * Makefile.maint: Sync. with CVS Autoconf.
3053 2001-08-27 Marc Autret <autret_m@epita.fr>
3055 * src/vcg.h (struct infoname_s): New.
3056 (struct colorentry_s): New.
3057 (graph_s): New fields {vertical,horizontal}_order in structure.
3058 Add `infoname' field.
3059 Add `colorentry' field;
3060 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3061 (G_HORIZONTAL_ORDER): New.
3063 (G_COLORENTRY): New.
3064 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3065 Add output of `infoname'.
3066 Add output of `colorentry'.
3068 2001-08-27 Marc Autret <autret_m@epita.fr>
3070 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3071 This one shadowed a global parameter.
3073 2001-08-24 Marc Autret <autret_m@epita.fr>
3075 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3076 instead of `unsigned'.
3077 (print_state): Do not call obstack_object_size () in obstack_grow ()
3078 to avoid macro variables shadowing.
3080 2001-08-23 Marc Autret <autret_m@epita.fr>
3082 * src/lex.c (percent_table): Typo: s/naem/name/.
3084 Normalize new options declarations.
3086 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3088 * tests/suite.at: Exercise %header_extension and %source_extension.
3090 2001-08-16 Marc Autret <autret_m@epita.fr>
3092 * src/reader.c (parse_dquoted_param): New.
3093 (parse_header_extension_decl): Use it.
3094 (parse_source_extension_decl): Likewise.
3096 2001-08-16 Marc Autret <autret_m@epita.fr>
3098 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3099 (get_xxxx_str): Use assert () instead of complain ().
3100 Remove return invokations in default cases.
3101 (get_decision_str): Modify default behaviour. Remove second argument.
3102 Echo modifications on calls.
3103 (output_graph): Fix.
3105 2001-08-16 Marc Autret <autret_m@epita.fr>
3107 * src/getargs.c (usage): Update with ``-g, --graph''.
3109 2001-08-16 Marc Autret <autret_m@epita.fr>
3111 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3112 (Option Cross Key): Likewise.
3113 * doc/bison.1: Update.
3115 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3117 * src/output.c (output_master_parser): Don't finish action_obstack.
3118 (output_parser): Don't care about the muscle action, here.
3119 (prepare): Copy the action_obstack in the action muscle.
3120 (output): Free action_obstack.
3122 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3124 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3125 will contain `%union' declaration.
3126 (parse_union_decl): Delete #line directive output.
3127 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3128 informations about %union.
3129 (parse_union_decl): Copy the union_obstack in the muscle stype.
3130 * src/bison.simple: Add new #line directive.
3131 Add typdef %%stype YYSTYPE.
3133 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3135 * src/bison.simple: Add new `#line' directive.
3137 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3139 * src/bison.simple: New `#line' directive.
3140 * src/output.c (output_parser): Support new dynamic muscle input_line.
3142 2001-09-22 Marc Autret <autret_m@epita.fr>
3144 * src/output.c (output_master_parser): New.
3145 (output_parser): Be more re-entrant.
3147 2001-09-21 Marc Autret <autret_m@epita.fr>
3149 * src/reader.c (copy_definition, parse_union_decl): Update and use
3151 (copy_action): Likewise.
3152 Use obstack_1grow ().
3153 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3155 2001-09-21 Marc Autret <autret_m@epita.fr>
3157 * src/options.c (option_table): Adjust.
3158 * src/lex.c (parse_percent_token): Fix.
3160 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3162 * src/options.c (symtab.h): Include it, need by lex.h.
3164 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3166 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3167 is now an option_table_struct*.
3168 (option_strcmp): New function option_strcmp.
3169 (parse_percent_token): Call option_strcmp.
3170 * src/getargs.c (xalloc.h, options.h): Include it.
3171 (getargs): Call create_long_option_table.
3172 (getargs): Free longopts at the end of the function.
3173 (shortopts): Move in options.c.
3174 * src/options.c (create_long_option_table): New function. Convert
3175 information from option_table to option structure.
3176 * src/reader.c (options.h): Include it.
3178 * src/Makefile.am: Adjust.
3179 * src/options.c (option_table): Create from longopts and percent_table.
3180 * src/getargs.c (longopts): Delete.
3181 * src/lex.c (struct percent_table_struct): Delete.
3182 (percent_table): Delete.
3183 (options.h): Include it.
3184 * src/options.c: Create.
3185 * src/options.h: Create.
3186 Declare enum opt_access_e.
3187 Define struct option_table_struct.
3189 2001-09-20 Marc Autret <autret_m@epita.fr>
3191 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3194 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3196 * src/bison.simple: s/%%filename/%%skeleton.
3197 * src/muscle_tab.c (getargs.h): Include it.
3198 (muscle_init): Insert new muscle skeleton.
3200 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3202 * src/output.c (output_parser): Delete unused variable actions_dumped.
3204 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3206 * src/output.c (output): Delete call to reader_output_yylsp.
3207 * src/reader.c (reader): Likewise.
3208 * src/reader.h: Delete declaration of reader_output_yylsp.
3210 2001-09-02 Marc Autret <autret_m@epita.fr>
3212 * src/reader.c: Include muscle_tab.h.
3213 (parse_union_decl): Update.
3214 (parse_macro_decl): Rename parse_muscle_decl.
3215 Update to use renamed functions and variable.
3216 (read_declarations, copy_action, read_additionnal_code, : Updated
3217 with correct variables and functions names.
3218 (packsymbols, reader): Likewise.
3220 * src/reader.h (muscle_obstack): Extern declaration update.
3222 * src/output.c: Include muscle_tab.h
3223 In all functions using macro_insert, change by using muscle_insert ().
3224 (macro_obstack): Rename muscle_obstack.
3225 Echo modifications in the whole file.
3226 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3227 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3228 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3230 * src/muscle_tab.h: Update double inclusion macros.
3231 (macro_entry_s): Rename muscle_entry_s.
3234 * src/muscle_tab.c: Include muscle_tab.h.
3235 Rename macro_tabble to muscle_table.
3236 (mhash1, mhash2, mcmp): Use muscle_entry.
3237 (macro_init): Rename muscle_init. Update.
3238 (macro_insert): Rename muscle_insert. Update.
3239 (macro_find): Rename muscle_find. Update.
3241 * src/main.c: Include muscle_tab.h.
3242 (main): Call muscle_init ().
3243 * src/Makefile.am (bison_SOURCES): Echo modifications.
3245 2001-09-02 Marc Autret <autret_m@epita.fr>
3247 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3249 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3251 2001-09-02 Marc Autret <autret_m@epita.fr>
3253 * src/macrotab.c, src/macrotab.h: Remove.
3255 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3257 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3260 2001-09-01 Marc Autret <autret_m@epita.fr>
3262 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3263 to an explicit value to activate the feature. We do it here.
3265 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3267 * src/output.c (prepare): Delete the `filename' muscule insertion.
3268 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3269 (parse_union_decl): Likewise.
3270 * src/macrotab.c (macro_init): Initialize filename by infile.
3272 2001-08-31 Marc Autret <autret_m@epita.fr>
3274 * src/bison.simple (YYLSP_NEEDED): New definition.
3275 * src/output.c (prepare): Add macro insertion of `locations_flag'
3277 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3279 * src/output.c (prepare): Delete insertion of previous muscles,
3280 and insert the `prefix' muscles.
3281 * src/macrotab.c (macro_init): Likewise.
3282 (macro_init): Initialization prefix directive by `yy'.
3283 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3284 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3285 yylval, yydebug, yyerror, yynerrs and yyparse.
3286 New directive `#define' to substitute yydebug, ... with option
3289 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3291 * src/main.c (main): Standardize.
3292 * src/output.c (output_table_data, output_parser): Likewise.
3293 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3295 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3297 * src/reader.c (read_additionnal_code): Rename %%user_code to
3299 * src/output.c (output): Rename %%declarations to %%prologue.
3300 * src/bison.simple: Echo modifications.
3302 2001-08-31 Marc Autret <autret_m@epita.fr>
3304 * src/reader.c (readgram): CleanUp.
3305 (output_token_defines): Likewise.
3306 (packsymbols): Likewise.
3308 * src/output.c (output): CPP-out useless code.
3310 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3312 * src/reader.c (reader): Delete obsolete call to function
3313 output_trailers and output_headers.
3314 * src/output.h: Remove obsolete functions prototypes of output_headers
3315 and output_trailers.
3317 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3319 * src/main.c: Include macrotab.h.
3320 * src/macrotab.h (macro_entry_s): Constify fields.
3321 Adjust functions prototypes.
3322 * src/macrotab.c (macro_insert): Constify key and value.
3323 (macro_find): Constify key.
3324 (macro_insert): Include 'xalloc.h'
3325 (macro_insert): Use XMALLOC.
3326 (macro_find): Constify return value.
3327 * src/output.c (output_table_data): Rename table to table_data.
3328 (output_parser): Constify macro_key, macro_value.
3330 2001-08-30 Marc Autret <autret_m@epita.fr>
3332 * src/reader.c (parse_skel_decl): New.
3333 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3334 * src/lex.h (token_t): New token `tok_skel'.
3335 * src/lex.c (percent_table): Add skeleton option entry.
3338 2001-08-29 Marc Autret <autret_m@epita.fr>
3340 * src/bison.simple: Add %%user_code directive at the end.
3341 * src/reader.c (read_additionnal_code): New.
3343 * src/output.c (output_program): Remove.
3346 2001-08-28 Marc Autret <autret_m@epita.fr>
3348 * src/output.c (output_actions): Clean up.
3349 (output_gram): CPP-out useless code.
3350 * src/reader.c (reader): Clean up, CPP-out useless code.
3352 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3354 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3356 * src/bison.simple: Add `%%definitions'.
3358 2001-08-28 Marc Autret <autret_m@epita.fr>
3360 * config/depcomp: New file.
3362 2001-08-27 Paul Eggert <eggert@twinsun.com>
3364 * src/bison.simple (yyparse): Don't take the address of an
3365 item before the start of an array, as that doesn't conform to
3368 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3370 * src/output.c (output): Remove the initialization of the macro
3371 obstack. It was done too late here.
3373 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3375 (reader): Initialize the macro obstack here, since we need it to grow
3376 '%define' directives.
3378 * src/reader.h: Declare the macro obstack as extern.
3380 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3382 * src/output.c (output_parser): Fix. Store single '%' characters in
3383 the output obstack instead of throwing them away.
3385 2001-08-27 Akim Demaille <akim@epita.fr>
3387 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3389 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3391 * lib/Makefile.am: Adjust.
3393 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3395 * src/bison.simple: Update and add '%%' directives.
3397 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3399 * src/reader.c (reader): Remove calls to 'output_headers' and
3400 'output_trailers'. Remove some C output.
3401 (readgram): Disable a piece of code that was writing a default
3402 definition for 'YYSTYPE'.
3403 (reader_output_yylsp): Remove.
3404 (packsymbols): Output token defintions to a macro.
3405 (copy_definition): Disable C output.
3407 * src/reader.c (parse_macro_decl): New function used to parse macro
3409 (copy_string2): Put the body of copy_string into this new function.
3410 Add a parameter to let the caller choose whether he wants to copy the
3411 string delimiters or not.
3412 (copy_string): Be a simple call to copy_string2 with the last argument
3414 (read_declarations): Add case for macro definition.
3415 (copy_identifier): New.
3416 (parse_macro_decl): Read macro identifiers using copy_identifier
3419 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3421 * src/output.c (prepare): Add prefixed names.
3422 (output_parser): Output semantic actions.
3423 (output_parser): Fix bug on '%%line' directives.
3425 * src/output.c (output_headers): Remove. The C code printed by this
3426 function should now be in the skeletons.
3427 (output_trailers): Remove.
3428 (output): Disable call to 'reader_output_yylsp'.
3429 (output_rule_data): Do not output tables to the table obstack.
3431 * src/output.c: Remove some C dedicated output.
3432 Improve the use of macro and output obstacks.
3433 (output_defines): Remove.
3435 * src/output.c (output_token_translations): Associate 'translate'
3436 table with a macro. No output to the table obstack.
3437 (output_gram): Same for 'rhs' and 'prhs'.
3438 (output_stos): Same for 'stos'.
3439 (output_rule_data): Same for 'r1' and 'r2'.
3440 (token_actions): Same for 'defact'.
3441 (goto_actions): Same for 'defgoto'.
3442 (output_base): Same for 'pact' and 'pgoto'.
3443 (output_table): Same for 'table'.
3444 (output_check): Same for 'check'.
3446 * src/output.c (output_table_data): New function.
3447 (output_short_table): Remove.
3448 (output_short_or_char_table): Remove.
3450 * src/output.c (output_parser): Replace most of the skeleton copy code
3451 with something new. Skeletons are now processed character by character
3452 rather than line by line, and Bison looks for '%%' macros. This is the
3453 first step in making Bison's output process (a lot) more flexible.
3454 (output_parser): Use the macro table.
3456 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3458 * src/main.c (main): Initialize the macro table.
3460 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3462 * src/lex.c (percent_table): Add tok_define.
3463 * src/lex.h: Add tok_define.
3465 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3467 * src/macrotab.c: New file.
3468 * src/macrotab.h: New file.
3469 * src/Makefile.am: Update.
3471 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3473 * lib/hash.c: New file.
3474 * lib/hash.h: New file.
3475 * lib/Makefile.am: Update.
3477 2001-08-15 Akim Demaille <akim@epita.fr>
3481 2001-08-15 Marc Autret <autret_m@epita.fr>
3483 * src/reader.c (readgram): Indent output macro YYSTYPE.
3484 (packsymbols): Likewise.
3485 (output_token_defines): Likewise.
3486 * src/files.c: Standardize.
3487 (compute_header_macro): New.
3488 (defines_obstack_save): New. Use compute_header_macro.
3489 (output_files): Update. Use defines_obstack_save.
3491 2001-08-15 Akim Demaille <akim@epita.fr>
3493 * doc/bison.texinfo (Table of Symbols): Document
3496 2001-08-15 Akim Demaille <akim@epita.fr>
3498 * missing: Update from CVS Automake.
3499 * config/config.guess, config/config.sub, config/texinfo.tex:
3500 Update from gnu.org.
3502 2001-08-15 Akim Demaille <akim@epita.fr>
3504 * Makefile.maint: Sync with CVS Autoconf.
3506 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3508 * doc/bison.texinfo: Include GNU Free Documentation License from
3510 * doc/fdl.texi: Add to package.
3512 2001-08-14 Marc Autret <autret_m@epita.fr>
3514 Turn on %{source,header}_extension features.
3516 * src/lex.c (percent_table): Un-CPP out header_extension and
3518 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3519 (compute_exts_from_src): Remove conditions. It restores priorities
3522 2001-08-14 Marc Autret <autret_m@epita.fr>
3524 * src/files.c (compute_base_names): Add extensions computing when
3525 `--file-prefix' used.
3526 Standardize function calls.
3528 2001-08-13 Marc Autret <autret_m@epita.fr>
3530 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3531 defining it (defined but null disables alloca).
3533 2001-08-13 Marc Autret <autret_m@epita.fr>
3535 * src/bison.simple (_yy_memcpy): CPP reformat.
3537 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3539 * tests/atconfig.in (CPPFLAGS): Fix.
3541 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3543 * doc/bison.texinfo: Include GNU General Public License from
3545 * doc/gpl.texi: Add to package.
3547 2001-08-10 Marc Autret <autret_m@epita.fr>
3549 * src/print_graph.h: Fix.
3550 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3552 2001-08-10 Akim Demaille <akim@epita.fr>
3554 * src/system.h: Provide default declarations for stpcpy, strndup,
3557 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3559 * doc/bison.texinfo (Locations): Update @$ stuff.
3561 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3563 * src/bison.simple (YYLLOC_DEFAULT): Update.
3566 2001-08-08 Marc Autret <autret_m@epita.fr>
3568 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3569 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3570 Reported by Fabrice Bauzac.
3572 2001-08-08 Marc Autret <autret_m@epita.fr>
3574 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3575 * src/vcg.c (output_node): Fix.
3576 * src/vcg.h: Cleanup.
3577 * src/print_graph.c: Add comments.
3578 (node_output_size): New global variable. Simplify the formatting of
3579 the VCG graph output.
3580 (print_actions): Unused code is now used. It notifies the final state
3581 and no action states in the VCG graph. It also give the reduce actions.
3582 The `shift and goto' edges are red and the `go to state' edges are
3584 Get the current node name and node_obstack by argument.
3585 (node_obstack): New variable.
3586 (print_state): Manage node_obstack.
3587 (print_core): Use node_obstack given by argument.
3588 A node is not only computed here but in print_actions also.
3589 (print_graph): CPP out useless code instead of commenting it.
3591 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3593 * tests/atconfig.in (CPPFLAGS): Fix.
3595 2001-08-07 Akim Demaille <akim@epita.fr>
3597 * src/print_graph.c (quote): New.
3598 (print_core): Use it.
3600 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3602 * src/vcg.c (complain.h): Include it.
3603 Unepitaize `return' invocations.
3604 [NDEBUG] (main): Remove.
3605 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3606 * src/files.c (open_files): Initialize graph_obstack.
3607 * src/print_graph.c (print_actions): CPP out useless code.
3608 (print_core): Don't output the last `\n' in labels.
3610 * src/files.c (output_files): Output the VCG file.
3611 * src/main.c (main): Invoke print_graph ();
3613 2001-08-06 Marc Autret <autret_m@epita.fr>
3615 Automaton VCG graph output.
3616 Using option ``-g'' or long option ``--graph'', you can generate
3617 a gram_filename.vcg file containing a VCG description of the LALR (1)
3618 automaton of your grammar.
3620 * src/main.c: Call to print_graph() function.
3621 * src/getargs.h: Update.
3622 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3623 (graph_flag): New flag.
3625 (getargs): Add case `g'.
3626 * src/files.c (graph_obstack): New obstack struct.
3627 (open_files): Initialize new obstack.
3628 (output_files): Saves graph_obstack if required.
3629 * src/files.h (graph_obstack): New extern declaration.
3630 * src/Makefile.am: Add new source files.
3632 2001-08-06 Marc Autret <autret_m@epita.fr>
3634 * src/print_graph.c, src/print_graph.h (graph): New.
3635 * src/vcg.h: New file.
3636 * src/vcg.c: New file, VCG graph handling.
3638 2001-08-06 Marc Autret <autret_m@epita.fr>
3640 Add of %source_extension and %header_extension which specify
3641 the source or/and the header output file extension.
3643 * src/files.c (compute_base_names): Remove initialisation of
3644 src_extension and header_extension.
3645 (compute_exts_from_gf): Update.
3646 (compute_exts_from_src): Update.
3647 (output_files): Update.
3648 * src/reader.c (parse_header_extension_decl): New.
3649 (parse_source_extension_decl): New.
3650 (read_declarations): New case statements for the new tokens.
3651 * src/lex.c (percent_table): Add entries for %source_extension
3652 and %header_extension.
3653 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3655 2001-08-06 Marc Autret <autret_m@epita.fr>
3657 * configure.in: Bump to 1.28c.
3658 * doc/bison.texinfo: Texinfo thingies.
3660 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3662 * tests/atconfig.in (CPPFLAGS): Add.
3663 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3665 2001-08-03 Akim Demaille <akim@epita.fr>
3669 2001-08-03 Akim Demaille <akim@epita.fr>
3671 * tests/Makefile.am (check-local): Ship testsuite.
3672 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3675 2001-08-03 Akim Demaille <akim@epita.fr>
3677 * configure.in: Try using -Wformat when compiling.
3679 2001-08-03 Akim Demaille <akim@epita.fr>
3681 * configure.in: Bump to 1.28b.
3683 2001-08-03 Akim Demaille <akim@epita.fr>
3685 * src/complain.c: Adjust strerror_r portability issues.
3687 2001-08-03 Akim Demaille <akim@epita.fr>
3691 2001-08-03 Akim Demaille <akim@epita.fr>
3693 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3694 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3695 * src/getargs.c: Include complain.h.
3696 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3697 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3699 2001-08-03 Akim Demaille <akim@epita.fr>
3701 * src/reader.c (readgram): Display hidden chars in error messages.
3703 2001-08-03 Akim Demaille <akim@epita.fr>
3705 Update to gettext 0.10.39.
3707 2001-08-03 Akim Demaille <akim@epita.fr>
3709 * lib/strspn.c: New.
3711 2001-08-01 Marc Autret <autret_m@epita.fr>
3713 * doc/bison.texinfo: Update.
3714 * doc/bison.1 (mandoc): Update.
3715 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3716 * src/files.c: Support output files extensions computing.
3717 (src_extension): New static variable.
3718 (header_extension): New static variable.
3720 (get_extension_index): New function, gets the index of an extension
3721 filename in a string.
3722 (compute_exts_from_gf): New function, computes extensions from the
3723 grammar file extension.
3724 (compute_exts_from_src): New functions, computes extensions from the
3725 C source file extension, file given by ``-o'' option.
3726 (compute_base_names): Update.
3727 (output_files): Update.
3729 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3731 * doc/bison.texi: Document @$.
3732 (Locations): New section.
3734 2001-07-18 Akim Demaille <akim@epita.fr>
3736 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3737 * config/prev-version.txt, config/move-if-change: New.
3738 * Makefile.am: Adjust.
3740 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3742 * src/bison.simple (yyparse): Suppress warning `comparaison
3743 between signed and unsigned'.
3745 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3747 * src/getargs.h (raw_flag): Remove.
3748 * src/getargs.c: Die on `-r'/`--raw'.
3749 * src/lex.c (parse_percent_token): Die on `%raw'.
3750 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3751 * tests/calc.at: Suppress test with option `--raw'.
3753 2001-07-14 Akim Demaille <akim@epita.fr>
3756 * configure.in: Require Autoconf 2.50.
3757 Update to gettext 0.10.38.
3759 2001-03-16 Akim Demaille <akim@epita.fr>
3761 * doc/bison.texinfo: ANSIfy the examples.
3763 2001-03-16 Akim Demaille <akim@epita.fr>
3765 * getargs.c (skeleton): New variable.
3766 (longopts): --skeleton is a new option.
3767 (shortopts, getargs): -S is a new option.
3768 * getargs.h: Declare skeleton.
3769 * output.c (output_parser): Use it.
3771 2001-03-16 Akim Demaille <akim@epita.fr>
3773 * m4/strerror_r.m4: New.
3774 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3775 * lib/error.h, lib/error.c: Update.
3777 2001-03-16 Akim Demaille <akim@epita.fr>
3779 * src/getargs.c (longopts): Clean up.
3781 2001-02-21 Akim Demaille <akim@epita.fr>
3783 * src/reader.c (gensym): `gensym_count' is your own.
3784 Use a static buf to create the symbol name, as token_buffer is no
3787 2001-02-08 Akim Demaille <akim@epita.fr>
3789 * src/conflicts.c (conflict_report): Be sure not to append to res
3790 between two calls, which could happen if both first sprintf were
3791 skipped, but not the first cp += strlen.
3793 2001-02-08 Akim Demaille <akim@epita.fr>
3795 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3796 New, from fileutils 4.0.37.
3797 * configure.in: Require Autoconf 2.49c. I took some time before
3798 making this decision. This is the only way out for portability
3799 issues in Bison, it would mean way too much duplicate effort to
3800 import in Bison features implemented in 2.49c since 2.13.
3801 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3803 2001-02-02 Akim Demaille <akim@epita.fr>
3805 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3806 * lib/xalloc.h, lib/xmalloc.c: Update.
3808 2001-01-19 Akim Demaille <akim@epita.fr>
3810 Get rid of the ad hoc handling of token_buffer in the scanner: use
3813 * src/lex.c (token_obstack): New.
3814 (init_lex): Initialize it. No longer call...
3815 (grow_token_buffer): this. Remove it.
3816 Adjust all the places which used it to use the obstack.
3818 2001-01-19 Akim Demaille <akim@epita.fr>
3820 * src/lex.h: Rename all the tokens:
3821 s/\bENDFILE\b/tok_eof/g;
3822 s/\bIDENTIFIER\b/tok_identifier/g;
3824 Let them be enums, not #define, to ease debugging.
3825 Adjust all the code.
3827 2001-01-18 Akim Demaille <akim@epita.fr>
3829 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3830 * src/lex.c (maxtoken, grow_token_buffer): Static.
3832 2001-01-18 Akim Demaille <akim@epita.fr>
3834 Since we now use obstacks, more % directives can be enabled.
3836 * src/lex.c (percent_table): Also accept `%yacc',
3837 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3839 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3840 instead of returning a token.
3841 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3842 * src/reader.c (read_declarations): Adjust.
3843 * src/files.c (open_files): Don't call `compute_base_names', don't
3844 compute `attrsfile' since they depend upon data which might be
3845 *in* the input file now.
3846 (output_files): Do it here.
3847 * src/output.c (output_headers): Document the fact that this patch
3848 introduces a guaranteed SEGV for semantic parsers.
3849 * doc/bison.texinfo: Document them.
3850 * tests/suite.at: Exercise these %options.
3852 2000-12-20 Akim Demaille <akim@epita.fr>
3854 Also handle the output file (--verbose) with obstacks.
3856 * files.c (foutput): Remove.
3857 (output_obstack): New.
3858 Adjust all dependencies.
3859 * src/conflicts.c: Return a string.
3860 * src/system.h (obstack_grow_string): Rename as...
3861 (obstack_sgrow): this. Be ready to work with non literals.
3862 (obstack_fgrow4): New.
3864 2000-12-20 Akim Demaille <akim@epita.fr>
3866 * src/files.c (open_files): Fix the computation of short_base_name
3867 in the case of `-o foo.tab.c'.
3869 2000-12-20 Akim Demaille <akim@epita.fr>
3871 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3872 (copy_dollar): Now that everything uses obstacks, get rid of the
3875 2000-12-20 Akim Demaille <akim@epita.fr>
3877 * src/files.c (open_files): Actually the `.output' file is based
3878 on the short_base_name, not base_name.
3879 * tests/suite.at (Checking output file names): Adjust.
3881 2000-12-20 Akim Demaille <akim@epita.fr>
3883 * src/bison.s1: Remove, we now use directly...
3884 * src/bison.simple: this.
3885 * src/Makefile.am: Use pkgdata instead of data.
3887 2000-12-20 Akim Demaille <akim@epita.fr>
3889 * src/files.c (guard_obstack): New.
3890 (open_files): Initialize it.
3891 (output_files): Dump it...
3892 * src/files.h: Export it.
3893 * src/reader.c (copy_guard): Use it.
3895 2000-12-19 Akim Demaille <akim@epita.fr>
3897 * src/files.c (outfile, defsfile, actfile): Removed as global
3899 (open_files): Don't compute them.
3900 (output_files): Adjust.
3901 (base_name, short_base_name): Be global.
3902 Adjust dependencies.
3904 2000-12-19 Akim Demaille <akim@epita.fr>
3906 * src/files.c (strsuffix): New.
3907 (stringappend): Be just like strcat but allocate.
3908 (base_names): Eve out from open_files.
3909 Try to simplify the rather hairy computation of base_name and
3911 (open_files): Use it.
3912 * tests/suite.at (Checking output file names): New test.
3914 2000-12-19 Akim Demaille <akim@epita.fr>
3916 * src/system.h (obstack_grow_literal_string): Rename as...
3917 (obstack_grow_string): this.
3918 * src/output.c (output_parser): Recognize `%% actions' instead of
3920 * src/bison.s1: s/$/%% actions/.
3921 * src/bison.hairy: Likewise.
3923 2000-12-19 Akim Demaille <akim@epita.fr>
3925 * src/output.c (output_parser): Compute the `#line' lines when
3927 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3928 Suggested by Hans Aberg.
3930 2000-12-19 Akim Demaille <akim@epita.fr>
3932 Let the handling of the skeleton files be local to the procedures
3935 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3937 (fparser, open_extra_files): Remove.
3938 (open_files, output_files): Don't take care of fparser.
3939 * src/files.h: Adjust.
3940 * src/output.c (output_parser): Open and close the file to the
3942 * src/reader.c (read_declarations): When %semantic_parser, open
3945 2000-12-19 Akim Demaille <akim@epita.fr>
3947 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3948 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3950 2000-12-19 Akim Demaille <akim@epita.fr>
3952 * src/files.c (open_files): Yipee! We no longer need all the code
3953 looking for `/tmp' since we have no tmp file.
3955 2000-12-19 Akim Demaille <akim@epita.fr>
3957 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
3959 * src/files.c (open_files): Less dependency on MSDOS etc.
3961 2000-12-14 Akim Demaille <akim@epita.fr>
3963 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
3964 Provide a default definition.
3965 Use it when executing the default @ action.
3966 * src/reader.c (reader_output_yylsp): No longer include
3967 `timestamp' and `text' in the default YYLTYPE.
3969 2000-12-12 Akim Demaille <akim@epita.fr>
3971 * src/reader.c (copy_definition, parse_union_decl, copy_action)
3972 (copy_guard): Quote the file names.
3973 Reported by Laurent Mascherpa.
3975 2000-12-12 Akim Demaille <akim@epita.fr>
3977 * src/output.c (output_headers, output_program, output): Be sure
3978 to escape special characters when outputting filenames.
3979 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
3980 (output_headers): Don't depend on them, Use ACTSTR.
3982 2000-11-17 Akim Demaille <akim@epita.fr>
3984 * lib/obstack.h: Formatting changes.
3985 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
3986 prevents type checking.
3987 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3988 cast the value to (void *): assigning a `foo *' to a `void *'
3990 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3991 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
3994 2000-11-17 Akim Demaille <akim@epita.fr>
3996 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
3998 (suite.m4, regression.m4, calc.m4): these.
3999 * tests/atgeneral.m4: Update from CVS Autoconf.
4001 2000-11-17 Akim Demaille <akim@epita.fr>
4003 * tests/regression.m4 (%union and --defines): New test,
4004 demonstrating a current bug in the obstack implementation.
4006 2000-11-17 Akim Demaille <akim@epita.fr>
4008 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4010 Use them to declare the variables which are global or local to
4013 2000-11-17 Akim Demaille <akim@epita.fr>
4015 * acconfig.h: Remove, no longer used.
4017 2000-11-07 Akim Demaille <akim@epita.fr>
4019 * src: s/Copyright (C)/Copyright/g.
4021 2000-11-07 Akim Demaille <akim@epita.fr>
4023 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4025 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4027 2000-11-07 Akim Demaille <akim@epita.fr>
4029 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4030 Merge in a single CPP if/else.
4032 2000-11-07 Akim Demaille <akim@epita.fr>
4034 * src/output.c (output): Remove useless variables.
4035 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4036 argument `data' for consistency with the prototypes.
4038 (obstack_copy, obstack_copy0): Rename the second argument as
4039 `address' for consistency. Qualify it `const'.
4040 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4041 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4042 `const' their input argument (`data' or `address').
4043 Adjust the corresponding macros to include `const' in casts.
4045 2000-11-03 Akim Demaille <akim@epita.fr>
4047 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4048 s/PFILE1/BISON_HAIRY/.
4049 Adjust dependencies.
4051 2000-11-03 Akim Demaille <akim@epita.fr>
4053 For some reason, this was not applied.
4055 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4056 `unlink': it's no longer used.
4058 2000-11-03 Akim Demaille <akim@epita.fr>
4060 * src/files.c (skeleton_find): New function, eved out of...
4061 (open_files, open_extra_files): here.
4063 2000-11-03 Akim Demaille <akim@epita.fr>
4067 * src/files.c (obstack_save): New function.
4068 (done): Rename as...
4069 (output_files): this.
4071 * src/main.c (main): Don't use `atexit' to register `done', since
4072 it no longer has to remove tmp files, just call `output_files'
4073 when there are no errors.
4075 2000-11-02 Akim Demaille <akim@epita.fr>
4077 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4078 `unlink': it's no longer used.
4079 * src/files.h: Formatting changes.
4081 2000-11-02 Akim Demaille <akim@epita.fr>
4083 Remove the last uses of mktemp and unlink/delete.
4085 * src/files.c (fdefines, ftable): Removed.
4086 (defines_ostack, table_obstack): New.
4087 Adjust dependencies of the former into uses of the latter.
4088 * src/output.c (output_short_or_char_table, output_short_table):
4089 Convert to using obstacks.
4090 * src/reader.c (copy_comment2): Accept one FILE * and two
4092 (output_token_defines, reader_output_yylsp): Use obstacks.
4093 * src/system.h (obstack_fgrow3): New.
4095 2000-11-01 Akim Demaille <akim@epita.fr>
4097 Change each use of `fattrs' into a use of `attrs_obstack'.
4099 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4100 * src/files.c (fattrs): Remove.
4101 (attrs_obstack): New.
4102 Adjust all dependencies.
4103 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4105 2000-11-01 Akim Demaille <akim@epita.fr>
4108 Change each use of `faction' into a use of `action_obstack'.
4110 * lib/obstack.h, lib/obstack.c: New files.
4111 * src/files.c (faction): Remove.
4112 (action_obstack): New.
4113 Adjust all dependencies.
4115 2000-10-20 Akim Demaille <akim@epita.fr>
4117 * lib/quote.h (PARAMS): New macro. Use it.
4119 2000-10-16 Akim Demaille <akim@epita.fr>
4121 * src/output.c (output_short_or_char_table): New function.
4122 (output_short_table, output_token_translations): Use it.
4123 (goto_actions): Use output_short_table.
4125 2000-10-16 Akim Demaille <akim@epita.fr>
4127 * src/symtab.c (bucket_new): New function.
4130 * src/output.c (output_short_table): New argument to display the
4131 comment associated with the table.
4132 Adjust dependencies.
4133 (output_gram): Use it.
4134 (output_rule_data): Nicer output layout for YYTNAME.
4136 2000-10-16 Akim Demaille <akim@epita.fr>
4138 * src/lex.c (read_typename): New function.
4140 * src/reader.c (copy_dollar): Likewise.
4142 2000-10-16 Akim Demaille <akim@epita.fr>
4144 * src/reader.c (copy_comment2): Expect the input stream to be on
4145 the `/' which is suspected to open a comment, instead of being
4146 called after `//' or `/*' was read.
4147 (copy_comment, copy_definition, parse_union_decl, copy_action)
4148 (copy_guard): Adjust.
4150 2000-10-16 Akim Demaille <akim@epita.fr>
4152 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4153 `read_signed_integer'.
4155 2000-10-16 Akim Demaille <akim@epita.fr>
4157 * src/reader.c (copy_dollar): New function.
4158 (copy_guard, copy_action): Use it.
4160 2000-10-16 Akim Demaille <akim@epita.fr>
4162 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4163 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4164 New files, from Fileutils 4.0.27.
4165 * src/main.c (printable_version): Remove.
4166 * src/lex.c, src/reader.c: Use `quote'.
4168 2000-10-04 Akim Demaille <akim@epita.fr>
4170 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4172 2000-10-04 Akim Demaille <akim@epita.fr>
4174 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4176 2000-10-04 Akim Demaille <akim@epita.fr>
4178 When a literal string is used to define two different tokens,
4179 `bison -v' segfaults.
4180 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4182 * tests/regression.m4: New file.
4183 Include the core of the sample provided by Piotr Gackiewicz.
4184 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4187 2000-10-04 Akim Demaille <akim@epita.fr>
4189 * src/reader.c (parse_expect_decl): Keep `count' within the size
4193 2000-10-02 Paul Eggert <eggert@twinsun.com>
4195 * bison.s1 (yyparse): Assign the default value
4196 unconditionally, to avoid a GCC warning and make the parser a
4199 2000-10-02 Akim Demaille <akim@epita.fr>
4201 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4204 2000-10-02 Akim Demaille <akim@epita.fr>
4206 * src/derives.c, src/print.c, src/reduce.c: To ease the
4207 translation, move some `\n' out of the translated strings.
4209 2000-10-02 Akim Demaille <akim@epita.fr>
4211 The location tracking mechanism is precious for parse error
4212 messages. Nevertheless, it is enabled only when `@n' is used in
4213 the grammar, which is a different issue (you can use it in error
4214 message, but not in the grammar per se). Therefore, there should
4215 be another means to enable it.
4217 * src/getargs.c (getargs): Support `--locations'.
4219 * src/getargs.h (locationsflag): Export it.
4220 * src/lex.c (percent_table): Support `%locations'.
4221 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4222 with `locationsflag'.
4223 * doc/bison.texinfo: Document `--locations' and `%locations'.
4225 * tests/calc.m4: Test it.
4227 For regularity of the names, replace each
4228 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4229 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4230 In addition replace each `flag' with `_flag'.
4232 2000-10-02 Akim Demaille <akim@epita.fr>
4234 Also test parse error messages, including with YYERROR_VERBOSE.
4236 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4238 Use it to check the computations.
4239 Use it to check `nonassoc' is honored.
4240 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4241 `--yyerror-verbose'.
4242 (_AT_CHECK_CALC): Adjust to this option.
4243 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4245 2000-10-02 Akim Demaille <akim@epita.fr>
4247 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4248 the latter demonstrates a flaw in the handling of non debugging
4249 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4250 was used in order to simplify:
4266 unfortunately this leads to a CPP conflict when
4267 `--name-prefix=foo' is used since it produces `#define yydebug
4270 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4271 (YYDPRINTF): New macro.
4273 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4275 Also test `--verbose', `--defines' and `--name-prefix'.
4277 2000-10-02 Akim Demaille <akim@epita.fr>
4279 Improve the readability of the produced parsers.
4281 * src/bison.s1: Formatting changes.
4282 Improve the comment related to the `$' mark.
4283 (yydefault): Don't fall through to `yyresume': `goto' there.
4284 * src/output.c (output_parser): When the `$' is met, skip the end
4286 New variable, `number_of_dollar_signs', to check there's exactly
4287 one `$' in the parser skeleton.
4289 2000-10-02 Akim Demaille <akim@epita.fr>
4291 * lib/xstrdup.c: New file, from the fileutils.
4292 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4293 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4294 instead of strlen + xmalloc + strcpy.
4295 * src/symtab.c (copys): Remove, use xstrdup instead.
4297 2000-10-02 Akim Demaille <akim@epita.fr>
4299 * src/gram.h (associativity): New enum type which replaces the
4300 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4301 `right_assoc', `left_assoc' and `non_assoc'.
4302 Adjust all dependencies.
4303 * src/reader.c: Formatting changes.
4304 (LTYPESTR): Don't define it, use it as a literal in
4305 `reader_output_yylsp'.
4306 * src/symtab.h (symbol_class): New enum type which replaces the
4307 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4308 `sunknown', `stoken and `snterm'.
4310 2000-10-02 Akim Demaille <akim@epita.fr>
4312 * src/getargs.c (fixed_outfiles): Rename as...
4313 (yaccflag): for consistency and accuracy.
4314 Adjust dependencies.
4316 2000-10-02 Akim Demaille <akim@epita.fr>
4318 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4319 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4320 difficult and introduced a lot of core dump. It turns out that
4321 Bison used an implementation of `xmalloc' based on `calloc', and
4322 at various places it does depend upon the initialization to 0. I
4323 have not tried to isolate the pertinent places, and all the former
4324 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4325 someone should address this issue.
4327 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4328 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4330 Adjust dependencies.
4331 * src/warshall.h: New file.
4334 2000-10-02 Akim Demaille <akim@epita.fr>
4336 Various anti-`extern in *.c' changes.
4338 * src/system.h: Include `assert.h'.
4340 2000-10-02 Akim Demaille <akim@epita.fr>
4342 * src/state.h (nstates, final_state, first_state, first_shift)
4343 (first_reduction): Move their exportation from here...
4344 * src/LR0.h: to here.
4345 Adjust dependencies.
4346 * src/getargs.c (statisticsflag): New variable.
4347 Add support for `--statistics'.
4348 Adjust dependencies.
4350 Remove a lot of now useless `extern' statements in most files.
4352 2000-10-02 Akim Demaille <akim@epita.fr>
4354 * src/LR0.h: New file.
4357 2000-10-02 Akim Demaille <akim@epita.fr>
4359 * src/print.h: New file.
4361 * src/print.c: Formatting and ordering changes.
4362 (verbose, terse): Replace with...
4363 (print_results): this new function.
4364 Adjust dependencies.
4366 2000-10-02 Akim Demaille <akim@epita.fr>
4368 * src/conflicts.c (conflict_report): New function.
4369 (conflict_log, verbose_conflict_log): Replace with...
4370 (print_conflicts): this function.
4371 Adjust dependencies.
4372 * src/conflicts.h: New file.
4373 Propagate its inclusion.
4375 2000-10-02 Akim Demaille <akim@epita.fr>
4377 * src/nullable.h: New file.
4378 Propagate its inclusion.
4379 * src/nullable.c: Formatting changes.
4381 2000-10-02 Akim Demaille <akim@epita.fr>
4383 * src/reduce.h: New file.
4384 Propagate its inclusion.
4385 * src/reduce.c: Topological sort and other formatting changes.
4386 (bool, TRUE, FALSE): Move their definition to...
4387 * src/system.h: here.
4389 2000-10-02 Akim Demaille <akim@epita.fr>
4391 * src/files.c: Formatting changes.
4392 (tryopen, tryclose, openfiles): Rename as...
4393 (xfopen, xfclose, open_files): this.
4394 (stringappend): static.
4395 * src/files.h: Complete the list of exported symbols.
4398 2000-10-02 Akim Demaille <akim@epita.fr>
4400 * src/reader.h: New file.
4401 Propagate its use instead of tedious list of `extern' and
4403 * src/reader.c: Formatting changes, topological sort,
4406 2000-10-02 Akim Demaille <akim@epita.fr>
4408 * src/lex.h: Prototype `lex.c' exported functions.
4409 * src/reader.c: Adjust.
4410 * src/lex.c: Formatting changes.
4411 (safegetc): Rename as...
4414 2000-10-02 Akim Demaille <akim@epita.fr>
4416 * src/lalr.h: New file.
4417 Propagate its inclusion instead of prototypes and `extern'.
4418 * src/lalr.c: Formatting changes, topological sorting etc.
4420 2000-10-02 Akim Demaille <akim@epita.fr>
4422 * src/output.c (token_actions): Introduce a temporary array,
4423 YYDEFACT, that makes it possible for this function to use
4426 2000-10-02 Akim Demaille <akim@epita.fr>
4428 `user_toknums' is output as a `short[]' in `output.c', while it is
4429 defined as a `int[]' in `reader.c'. For consistency with the
4430 other output tables, `user_toknums' is now defined as a table of
4433 * src/reader.c (user_toknums): Be a short table instead of an int
4435 Adjust dependencies.
4437 Factor the short table outputs.
4439 * src/output.c (output_short_table): New function.
4440 * src/output.c (output_gram, output_stos, output_rule_data)
4441 (output_base, output_table, output_check): Use it.
4443 2000-10-02 Akim Demaille <akim@epita.fr>
4445 * src/output.c (output): Topological sort of the functions, in
4446 order to get rid of the `static' prototypes.
4447 No longer use `register'.
4448 * src/output.h: New file.
4449 Propagate its inclusion in files explicitly prototyping functions
4452 2000-09-21 Akim Demaille <akim@epita.fr>
4454 * src/atgeneral.m4: Update from Autoconf.
4456 2000-09-21 Akim Demaille <akim@epita.fr>
4458 * src/closure.h: New file.
4459 * src/closure.c: Formatting changes, topological sort over the
4460 functions, use of closure.h.
4461 (initialize_closure, finalize_closure): Rename as...
4462 (new_closure, free_closure): these. Adjust dependencies.
4463 * src/LR0.c: Formatting changes, topological sort, use of
4465 (initialize_states): Rename as...
4467 * src/Makefile.am (noinst_HEADERS): Adjust.
4469 2000-09-20 Akim Demaille <akim@epita.fr>
4471 * src/acconfig.h: Don't protect config.h against multiple
4473 Don't define PARAMS.
4474 * src/system.h: Define PARAMS.
4475 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4476 purpose of config.h. system.h must not try to fix wrong
4477 definitions in config.h.
4479 2000-09-20 Akim Demaille <akim@epita.fr>
4481 * src/derives.h: New file.
4482 * src/main.c, src/derives.h: Use it.
4484 * src/Makefile.am (noinst_HEADERS): Adjust.
4486 2000-09-20 Akim Demaille <akim@epita.fr>
4488 * tests/atgeneral.m4: Update from Autoconf.
4489 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4490 (AT_CHECK_CALC): New macros.
4491 Use these macros to test bison with options `', `--raw',
4492 `--debug', `--yacc', `--yacc --debug'.
4494 2000-09-19 Akim Demaille <akim@epita.fr>
4496 * src/output.c: Formatting changes.
4497 * src/machine.h: Remove, leaving its contents in...
4498 * src/system.h: here.
4500 Adjust all dependencies on stdio.h and machine.h.
4501 * src/getargs.h: New file.
4502 Let all `extern' declarations about getargs.c be replaced with
4503 inclusion of `getargs.h'.
4504 * src/Makefile.am (noinst_HEADERS): Adjust.
4506 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4508 (yyerror): Returns void, not int.
4509 * doc/bison.texinfo: Formatting changes.
4511 2000-09-19 Akim Demaille <akim@epita.fr>
4513 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4516 2000-09-18 Akim Demaille <akim@epita.fr>
4518 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4519 * src/Makefile.am (INCLUDES): Don't.
4520 Be ready to fetch headers in lib/.
4522 2000-09-18 Akim Demaille <akim@epita.fr>
4524 * doc/bison.texinfo: Update the copyright.
4525 ANSIfy and GNUify the examples.
4526 Remove the old menu.
4528 2000-09-18 Akim Demaille <akim@epita.fr>
4530 First set of tests: use the `calc' example from the documentation.
4532 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4533 is defined only when YYDEBUG is.
4534 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4535 * src/files.c (tryopen, tryclose): Formatting changes.
4536 Move to the top and be static.
4537 * src/reader.c (read_signed_integer): Likewise.
4538 * tests/calc.m4: New file.
4539 * Makefile.am, suite.m4: Adjust.
4540 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4542 2000-09-18 Akim Demaille <akim@epita.fr>
4544 Add support for an Autotest test suite for Bison.
4546 * m4/m4.m4, m4/atconfig.m4: New files.
4547 * m4/Makefile.am (EXTRA_DIST): Adjust.
4548 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4550 * src/getargs.c: Display a more standard --version message.
4551 * src/reader.c (reader): Formatting changes.
4552 No longer depend upon VERSION_STRING.
4553 * configure.in: No longer use `dnl'.
4554 Set up the test suite and the new directory `tests/.
4555 (VERSION_STRING): Remove.
4557 2000-04-14 Akim Demaille <akim@epita.fr>
4559 * src/reader.c (copy_comment2): New function, same as former
4560 `copy_comment', but outputs into two FILE *.
4561 (copy_comment): Use it.
4562 (parse_union_decl): Use it.
4563 (get_type, parse_start_decl): Use the same `invalid' message.
4564 (parse_start_decl, parse_union_decl): Use the same `multiple'
4566 (parse_union_decl, copy_guard, copy_action): Use the same
4567 `unmatched' message.
4568 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4570 2000-03-31 Akim Demaille <akim@epita.fr>
4572 * src/files.c (tryopen, tryclose): Move to the top.
4575 2000-03-31 Akim Demaille <akim@epita.fr>
4577 * src/main.c (main): Don't call `done', exit does it.
4579 2000-03-31 Akim Demaille <akim@epita.fr>
4581 * allocate.c: s/return (foo)/return foo/.
4584 * output.c: Likewise.
4585 * reader.c: Likewise.
4586 * symtab.c: Likewise.
4587 * vmsgetargs.c: Likewise.
4589 2000-03-31 Akim Demaille <akim@epita.fr>
4591 Clean up the error reporting functions.
4593 * src/report.c: New file.
4594 * src/report.h: Likewise.
4595 * src/Makefile.am: Adjust.
4596 * m4/error.m4: New file.
4597 * m4/Makefile.am: Adjust.
4598 * configure.in (jm_PREREQ_ERROR): Call it.
4599 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4601 (fatal, fatals): Remove. All callers use complain.c::fatal.
4602 (warn, warni, warns, warnss, warnss): Remove. All callers use
4603 complain.c::complain.
4604 (toomany): Remove, use fatal instead.
4605 * src/files.c (done): No argument, use complain_message_count.
4606 * src/main.c (main): Register `done' to `atexit'.
4608 * src/getargs.c (usage): More `fputs', less `fprintf'.
4610 2000-03-28 Akim Demaille <akim@epita.fr>
4612 * lib/: New directory.
4613 * Makefile.am (SUBDIRS): Adjust.
4614 * configure.in: Adjust.
4615 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4617 * src/alloca.c: Moved to lib/.
4618 * src/getopt.c: Likewise.
4619 * src/getopt1.c: Likewise.
4620 * src/getopt.h: Likewise.
4621 * src/ansi2knr.c: Likewise.
4622 * src/ansi2knr.1: Likewise.
4623 * src/Makefile.am: Adjust.
4624 * lib/Makefile.am: New file.
4626 2000-03-28 Akim Demaille <akim@epita.fr>
4628 * src/getargs.c (usage): Refresh the help message.
4630 2000-03-17 Akim Demaille <akim@epita.fr>
4632 * src/getopt1.c: Updated from textutils 2.0e
4633 * src/getopt.c: Likewise.
4634 * src/getopt.h: Likewise.
4636 2000-03-17 Akim Demaille <akim@epita.fr>
4638 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4639 the file name, not the whole `#line LINE FILE'.
4641 2000-03-17 Akim Demaille <akim@epita.fr>
4643 On syntax errors, report the token on which we choked.
4645 * src/bison.s1 (yyparse): In the label yyerrlab, when
4646 YYERROR_VERBOSE, add yychar in msg.
4648 2000-03-17 Akim Demaille <akim@epita.fr>
4650 * src/reader.c (copy_at): New function.
4651 (copy_guard): Use it.
4652 (copy_action): Use it.
4654 2000-03-17 Akim Demaille <akim@epita.fr>
4656 Be kind to translators, save some useless translations.
4658 * src/main.c (banner): New function.
4659 (fatal_banner): Use it.
4660 (warn_banner): Use it.
4662 2000-03-17 Akim Demaille <akim@epita.fr>
4664 * src/reader.c (copy_definition): Use copy_string and
4665 copy_comment. Removed now unused `match', `ended',
4667 (copy_comment, copy_string): Moved, to be visible from
4670 2000-03-17 Akim Demaille <akim@epita.fr>
4672 * src/reader.c (copy_string): Declare `static inline'. No
4673 problems with inline, since it is checked by configure.
4674 (copy_comment): Likewise.
4676 2000-03-17 Akim Demaille <akim@epita.fr>
4678 * src/reader.c (packsymbols): Formatting changes.
4680 2000-03-17 Akim Demaille <akim@epita.fr>
4682 * src/reader.c (copy_comment): New function, factored out from:
4683 (copy_action): Use it. Removed now unused `match', `ended',
4685 (copy_guard): Likewise.
4687 2000-03-17 Akim Demaille <akim@epita.fr>
4689 * src/reader.c (copy_string): New function, factored out from:
4690 (copy_action): Use it.
4691 (copy_guard): Likewise.
4693 2000-03-17 Akim Demaille <akim@epita.fr>
4695 Change the handling of @s so that they behave exactly like $s.
4696 There is now a pseudo variable @$ (readble and writable), location
4697 of the lhs of the rule (by default ranging from the location of
4698 the first symbol of the rhs, to the location of the last symbol,
4699 or, if the rhs is empty, YYLLOC).
4701 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4703 (yyparse): When providing a default semantic action, provide a
4704 default location action.
4705 (after the $): No longer change `*YYLSP', just stack YYLOC the
4706 same way you stack YYVAL.
4707 * src/reader.c (read_declarations): Use warns.
4708 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4709 (copy_action, case '@'): Likewise.
4710 Use a standard error message, to save useless work from
4713 2000-03-17 Akim Demaille <akim@epita.fr>
4715 * src/bison.s1: Formatting and cosmetics changes.
4716 * src/reader.c: Likewise.
4717 Update the Copyright notice.
4719 2000-03-17 Akim Demaille <akim@epita.fr>
4721 * src/bison.s1 (#line): All set to `#line' only, since the
4722 Makefile now handles them.
4724 2000-03-16 Akim Demaille <akim@epita.fr>
4726 * src/output.c (output_rule_data): Output the documentation of
4728 (Copyright notice): Update.
4731 2000-03-16 Akim Demaille <akim@epita.fr>
4733 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4734 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4735 One `#if YYDEBUG' remains, since it uses variables which are
4736 defined only if `YYDEBUG != 0'.
4738 2000-03-16 Akim Demaille <akim@epita.fr>
4740 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4741 and related variables so that the similarities are highlighted.
4743 2000-03-16 Akim Demaille <akim@epita.fr>
4745 * src/bison.s1: Properly indent CPP directives.
4747 2000-03-16 Akim Demaille <akim@epita.fr>
4749 * src/bison.s1: Properly indent the `alloca' CPP section.
4751 2000-03-16 Akim Demaille <akim@epita.fr>
4753 Do not hard code values of directories in `configure.in'.
4754 Update the `configure' tool chain.
4756 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4758 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4759 (AC_OUTPUT): Add m4/Makefile.
4760 Bump to bison 1.28a, 1.29 has never been released.
4761 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4762 handled via src/Makefile.am.
4763 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4764 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4766 * Makefile.am (SUBDIRS): Add m4.
4767 (ACLOCAL_AM_FLAGS): New variable.
4768 (AUTOMAKE_OPTIONS): Add check-news.
4769 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4770 the proper line number and file name.
4771 (DEFS): Propagate the location of bison library files and of the
4773 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4775 * acinclude.m4: Remove, replaced by the directory m4.
4776 * m4/Makefile.am (EXTRA_DIST): New variable.
4777 * m4/gettext.m4: New file, from the fileutils.
4778 * m4/lcmessage.m4: Likewise
4779 * m4/progtest.m4: Likewise.
4780 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4782 2000-03-10 Akim Demaille <akim@epita.fr>
4785 Formatting changes of various comments.
4786 Respect the GNU coding standards at various places.
4787 Don't use `_()' when no translation is needed.
4789 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4792 OS/2 honors TMPDIR environment variable.
4794 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4796 * doc/bison.texinfo: Tweaked spelling and grammar.
4798 Removed reference to price of printed copy.
4799 Mention BISON_SIMPLE and BISON_HAIRY.
4801 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4803 * configure.in, NEWS:
4804 Bison 1.29 released.
4806 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4808 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4809 Added reference card.
4811 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4813 * po/ru.po: Added Russian translation.
4815 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4817 * configure.in: Added Russian translation.
4819 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4821 * configure.in, NEWS, README:
4822 Released version 1.28.
4824 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4827 Squashed redefinition warning on some systems.
4829 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4830 Have configure build version string instead of relying on ANSI string
4833 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4835 * po/POTFILES.in: Got rid of version.c.
4837 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4839 * acconfig.h, configure.in:
4840 Have configure build version string instead of relying on ANSI string
4843 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4846 Dropped mention of `+' for long-named options.
4848 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4850 * src/files.c: Added <unistd.h> for unlink().
4852 * src/Makefile.am, src/system.h:
4855 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4857 * README: Added a FAQ list.
4859 * configure.in, acconfig.h:
4862 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4864 * doc/FAQ, doc/Makefile.am:
4867 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4869 * src/alloc.h, src/symtab.h, src/version.c:
4870 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4872 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4874 * src/.cvsignore, src/Makefile.am:
4875 Reorganized: sources in `src', documentation in `doc'.
4877 * src/lex.c (literalchar):
4878 fixed the code for escaping double quotes (thanks
4881 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4883 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4884 Adjusted paths to reflect directory reorganization.
4886 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4888 * doc/.cvsignore, doc/Makefile.am:
4889 Reorganized: sources in `src', documentation in `doc'.
4891 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4894 Updated AC_INIT file to reflect directory reorganization.
4896 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4897 Reorganized: sources in `src', documentation in `doc'.
4899 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4902 Don't declare calloc() and realloc() if not necessary.
4904 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4906 * configure.in, acconfig.h, acinclude.m4:
4907 Don't declare calloc() and realloc() if not necessary.
4909 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4911 * po/.cvsignore: Added i18n support.
4913 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4915 * acconfig.h, configure.in, Makefile.am:
4918 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4920 * src/bison.s1: Fixed #line numbers.
4922 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4924 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4925 Added PO files from Translation Project.
4927 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4930 Added support for non-ANSI compilers (ansi2knr).
4932 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4934 * configure.in: Bumped version number to 1.27.
4937 Added `bison.simple' to list of files removed by `make distclean'.
4939 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4941 * src/files.c, src/files.h:
4942 Defined locations of parser files in config.h instead of Makefile.
4944 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4946 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4947 Defined locations of parser files in config.h instead of Makefile.
4949 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4952 Removed inappropriate use of $< macro.
4954 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4956 * po/Makefile.in.in, po/POTFILES.in:
4957 Add `po' directory skeleton.
4959 1999-01-27 Jesse Thilo <jthilo@gnu.org>
4961 * README: Document help-bison list.
4963 * configure.in: Add check for mkstemp().
4965 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4967 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
4968 Hush a few compiler warnings.
4971 Add tryclose(), which verifies that fclose was successful.
4972 Hush a couple of compiler warnings.
4974 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4976 * Makefile.am, OChangeLog:
4977 ChangeLog is now automatically generated. Include the old version as
4980 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4982 * 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:
4985 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4987 * doc/bison.texinfo: Fix formatting glitch.
4989 * doc/bison.texinfo: Update FSF address.
4991 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4993 * acconfig.h: Update FSF address.
4995 1999-01-08 Jesse Thilo <jthilo@gnu.org>
4998 Don't define PACKAGE here, since config.h defines it.
5000 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5002 * src/reader.c: Update copyright date.
5005 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5006 favor of output directly to stderr (avoids buffer overruns).
5008 * src/reader.c: Some checks for premature EOF.
5010 * 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:
5011 Use prototypes if the compiler understands them.
5013 * src/files.c: Honor TMPDIR on Unix hosts.
5014 Use prototypes if the compiler understands them.
5017 Fix a couple of buffer overrun bugs.
5018 Use prototypes if the compiler understands them.
5020 * src/system.h: Include unistd.h and ctype.h.
5021 Use #ifdef instead of #if for NLS symbols.
5023 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5025 * doc/bison.texinfo:
5026 Delete comment "consider using @set for edition number, etc..." since
5027 we now are doing so.
5029 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5032 Use prototypes if the compiler understands them.
5034 * NEWS: Document 1.26 highlights.
5036 * Makefile.am: Require Automake 1.3 or later.
5039 Use prototypes if the compiler understands them.
5041 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5044 Use VERSION symbol from automake for version number.
5046 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5048 * acconfig.h, configure.in, version.cin:
5049 Use VERSION symbol from automake for version number.
5051 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5054 Distribute original version of simple parser (bison.s1), not built
5055 version (bison.simple).
5057 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5059 * doc/bison.texinfo: Add info dir entry.
5061 * doc/bison.texinfo:
5062 Let automake put version number into documentation.
5064 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5066 * src/bison.cld, src/build.com, src/vmshlp.mar:
5067 Add non-RCS files from /gd/gnu/bison.
5069 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5072 Document the BISON_HAIRY and BISON_SIMPLE variables.
5074 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5076 * src/version.c: Build version.c automatically.
5079 Fix token numbering (used to start at 258, not 257).
5081 * src/system.h: Include config.h.
5083 * src/getargs.c: Update bug report address.
5085 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5086 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5088 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5091 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5093 * configure.in, version.cin:
5094 Build version.c automatically.
5096 * AUTHORS: Add AUTHORS file.
5098 * README: Update bug report address.
5101 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5103 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5106 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5108 * doc/bison.texinfo: Clean up some formatting.
5110 1998-05-05 Richard Stallman <rms@gnu.org>
5112 * doc/bison.texinfo:
5113 Explain better why to make a pure parser.
5115 1998-01-05 Richard Stallman <rms@gnu.org>
5117 * src/files.c (openfiles):
5118 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5119 find a temporary directory, if possible. Do not unlink files while
5122 1997-08-25 Richard Stallman <rms@gnu.org>
5124 * src/reader.c (stack_offset;):
5125 Change some warni to warns.
5127 * src/lex.c (literalchar): Use warns, not warni.
5129 1997-06-28 Richard Stallman <rms@gnu.org>
5131 * src/bison.s1: Add a Bison version comment.
5133 * src/main.c (fatal, warn, berror):
5136 1997-06-28 Richard Stallman <rms@gnu.org>
5138 * Makefile.in (bison_version): New variable.
5139 (dist): Use that variable.
5140 (bison.s1): Substitute the Bison version into bison.simple.
5142 * bison.simple: Add a Bison version comment.
5144 1997-06-18 Richard Stallman <rms@gnu.org>
5146 * src/main.c (fatal, warn, berror):
5147 Make error messages standard.
5148 (toomany): Improve error message text.
5150 * 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:
5151 new.h renamed to alloc.h.
5153 1997-06-18 Richard Stallman <rms@gnu.org>
5155 * Makefile.in: new.h renamed to alloc.h.
5157 1997-05-24 Richard Stallman <rms@gnu.org>
5159 * src/lex.c (literalchar):
5160 Fix the code for escaping \, " and '.
5162 (lex): Avoid trouble when there are many chars
5163 to discard in a char literal with just several chars in it.
5165 1997-05-17 Richard Stallman <rms@gnu.org>
5168 Use malloc, if using alloca is troublesome.
5169 (YYSTACK_USE_ALLOCA): New flag macro.
5170 Define it for some systems and compilers.
5171 (YYSTACK_ALLOC): New macro.
5172 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5173 If it was malloc'd, free it.
5175 1997-05-17 Richard Stallman <rms@gnu.org>
5178 Use malloc, if using alloca is troublesome.
5179 (YYSTACK_USE_ALLOCA): New flag macro.
5180 Define it for some systems and compilers.
5181 (YYSTACK_ALLOC): New macro.
5182 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5183 If it was malloc'd, free it.
5185 1997-04-23 Richard Stallman <rms@gnu.org>
5188 (alloca) [__hpux]: Always define as __builtin_alloca.
5190 1997-04-23 Richard Stallman <rms@gnu.org>
5193 (alloca) [__hpux]: Always define as __builtin_alloca.
5195 1997-04-22 Richard Stallman <rms@gnu.org>
5198 [__hpux]: Include alloca.h (right for HPUX 10)
5199 instead of declaring alloca (right for HPUX 9).
5201 * src/bison.s1 (__yy_memcpy):
5202 Declare arg `count' as unsigned int.
5203 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5205 1997-04-22 Richard Stallman <rms@gnu.org>
5208 [__hpux]: Include alloca.h (right for HPUX 10)
5209 instead of declaring alloca (right for HPUX 9).
5211 * bison.simple (__yy_memcpy):
5212 Declare arg `count' as unsigned int.
5213 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5215 1997-01-03 Richard Stallman <rms@gnu.org>
5217 * src/allocate.c: [__STDC__ or _MSC_VER]:
5218 Declare calloc and realloc to return void *.
5220 1997-01-02 Richard Stallman <rms@gnu.org>
5223 [_MSC_VER]: Include stdlib.h and process.h.
5224 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5226 * src/main.c (main): Return FAILURE as a value.
5227 (printable_version): Declare arg as int, not char.
5229 1997-01-02 Richard Stallman <rms@gnu.org>
5231 * Makefile.in (dist):
5232 Explicitly check for symlinks, and copy them.
5234 1996-12-19 Richard Stallman <rms@gnu.org>
5237 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5239 1996-12-18 Paul Eggert <eggert@gnu.org>
5241 * src/bison.s1 (yyparse):
5242 If __GNUC__ and YYPARSE_PARAM are both defined,
5243 declare yyparse to have a void * argument.
5245 1996-12-18 Paul Eggert <eggert@gnu.org>
5247 * bison.simple (yyparse):
5248 If __GNUC__ and YYPARSE_PARAM are both defined,
5249 declare yyparse to have a void * argument.
5251 1996-12-17 Richard Stallman <rms@gnu.org>
5253 * src/reduce.c (nbits): Add some casts.
5255 1996-08-12 Richard Stallman <rms@gnu.org>
5257 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5259 1996-08-12 Richard Stallman <rms@gnu.org>
5261 * bison.simple: Test _MSDOS as well as _MSDOS_.
5263 1996-07-31 Richard Stallman <rms@gnu.org>
5266 [__sun && __i386]: Include alloca.h.
5268 1996-07-31 Richard Stallman <rms@gnu.org>
5271 [__sun && __i386]: Include alloca.h.
5273 1996-07-30 Richard Stallman <rms@gnu.org>
5275 * src/bison.s1: Comment change.
5277 * src/bison.s1: Test _MSDOS_, not MSDOS.
5279 1996-07-30 Richard Stallman <rms@gnu.org>
5281 * bison.simple: Comment change.
5283 * bison.simple: Test _MSDOS_, not MSDOS.
5285 1996-06-01 Richard Stallman <rms@gnu.org>
5287 * 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:
5288 Insert `_' macro around many string constants.
5291 Insert `_' macro around many string constants.
5293 (main): Call setlocale, bindtextdomain and textdomain.
5295 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5296 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5297 [ENABLE_NLS]: Include libintl.h.
5298 [ENABLE_NLS] (gettext): Define.
5299 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5300 (N_, PACKAGE, LOCALEDIR): New macros.
5302 1996-06-01 Richard Stallman <rms@gnu.org>
5304 * POTFILES.in: New file.
5306 * Makefile.in (allocate.o):
5307 Define target explicitly.
5309 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5310 (LDFLAGS): Set to @LDFLAGS@.
5311 (configure): Run autoconf only if preceding `cd' succeeds.
5312 (bison.s1): Redirect output to temporary file then move the
5313 temporary to the target, rather than redirecting directly to bison.s1.
5314 (clean): Remove config.status and config.log.
5315 (distclean): Don't remove config.status here.
5317 1996-05-12 Richard Stallman <rms@gnu.org>
5320 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5322 1996-05-12 Richard Stallman <rms@gnu.org>
5325 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5327 1996-05-11 Richard Stallman <rms@gnu.org>
5329 * src/bison.s1 (__yy_memcpy):
5330 Really reorder the args, as was supposedly done on Feb 14 1995.
5331 (yyparse): Calls changed accordingly.
5333 1996-05-11 Richard Stallman <rms@gnu.org>
5335 * Makefile.in (dist): Don't use $(srcdir).
5337 * bison.simple (__yy_memcpy):
5338 Really reorder the args, as was supposedly done on Feb 14 1995.
5339 (yyparse): Calls changed accordingly.
5341 1996-01-27 Richard Stallman <rms@gnu.org>
5343 * src/output.c (output_rule_data):
5344 Test YYERROR_VERBOSE in the conditional
5345 around the definition of ttyname.
5347 1995-12-29 Richard Stallman <rms@gnu.org>
5350 Fix line numbers in #line commands.
5352 1995-12-29 Richard Stallman <rms@gnu.org>
5355 Fix line numbers in #line commands.
5357 1995-12-27 Richard Stallman <rms@gnu.org>
5359 * src/bison.s1 (YYPARSE_PARAM_DECL):
5360 In C++, make it always null.
5361 (YYPARSE_PARAM_ARG): New macro.
5362 (yyparse): Use YYPARSE_PARAM_ARG.
5364 1995-12-27 Richard Stallman <rms@gnu.org>
5366 * bison.simple (YYPARSE_PARAM_DECL):
5367 In C++, make it always null.
5368 (YYPARSE_PARAM_ARG): New macro.
5369 (yyparse): Use YYPARSE_PARAM_ARG.
5371 1995-11-29 Richard Stallman <rms@gnu.org>
5373 * doc/bison.texinfo:
5374 Describe literal string tokens, %raw, %no_lines, %token_table.
5376 1995-11-29 Daniel Hagerty <hag@gnu.org>
5378 * doc/bison.texinfo: Fixed update date
5380 1995-10-16 Richard Stallman <rms@gnu.org>
5382 * src/version.c: Version 1.25.
5384 1995-10-16 Richard Stallman <rms@gnu.org>
5386 * NEWS: *** empty log message ***
5388 1995-10-16 Richard Stallman <rms@gnu.org>
5390 * doc/bison.1, doc/bison.rnh:
5393 1995-10-15 Richard Stallman <rms@gnu.org>
5395 * src/vmsgetargs.c, src/getargs.c:
5396 Added -n, -k, and -raw switches.
5397 (noparserflag, toknumflag, rawtoknumflag): New variables.
5399 * src/symtab.h (SALIAS):
5400 New #define for adding aliases to %token.
5401 (struct bucket): Added `alias' field.
5403 * src/reduce.c (reduce_grammar):
5404 Revise error message.
5405 (print_notices): Remove final `.' from error message.
5407 * src/reader.c (reader_output_yylsp):
5409 (readgram): Use `#if 0' around code that accepted %command
5410 inside grammar rules: The documentation doesn't allow it,
5411 and it will fail since the %command processors scan for the next %.
5412 (parse_token_decl): Extended the %token
5413 declaration to allow a multi-character symbol as an alias.
5414 (parse_thong_decl): New function.
5415 (read_declarations): Added %thong declarations.
5416 (read_declarations): Handle NOOP to deal with allowing
5417 % declarations as another means to specify the flags.
5418 (readgram): Allow %prec prior to semantics embedded in a rule.
5419 (skip_to_char, read_declarations, copy_definition)
5420 (parse_token_decl, parse_start_decl, parse_type_decl)
5421 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5422 (get_type_name, copy_guard, copy_action, readgram)
5423 (get_type, packsymbols): Revised most error messages.
5424 Changed `fatal' to `warnxxx' to avoid aborting for error.
5425 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5426 (read_declarations): Improve the error message for
5427 an invalid character. Do not abort.
5428 (read_declarations, copy_guard, copy_action): Use
5429 printable_version to avoid unprintable characters in printed output.
5430 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5431 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5432 Allow the type of a non-terminal can be given
5433 more than once, as long as all specifications give the same type.
5436 (output_headers, output_trailers, output, output_gram)
5437 (output_rule_data): Implement noparserflag variable.
5438 Implement toknumflag variable.
5439 (output): Call reader_output_yylsp to output LTYPESTR.
5441 * src/main.c (main):
5442 If reader sees an error, don't process the grammar.
5443 (fatals): Updated to not use VARARGS1.
5444 (printable_version, int_to_string, warn, warni, warns, warnss)
5445 (warnsss): New error reporting functions. Avoid abort for error.
5448 Added THONG and NOOP for alias processing.
5449 Added SETOPT for the new code that allows setting options with %flags.
5452 Include getopt.h. Add some extern decls.
5453 (safegetc): New function to deal with EOF gracefully.
5454 (literalchar); new function to deal with reading \ escapes.
5455 (lex): Use literalchar.
5456 (lex): Implemented "..." tokens.
5457 (literalchar, lex, parse_percent_token): Made tokenbuffer
5458 always contain the token. This includes growing the token
5459 buffer while reading an integer.
5460 (parse_percent_token): Replaced if-else statement with percent_table.
5461 (parse_percent_token): Added % declarations as another
5462 way to specify the flags -n, -l, and -r. Also added hooks for
5463 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5464 major changes to files.c.
5465 (lex) Retain in the incoming stream a character following
5467 (skip_white_space, lex): Revised most error messages
5468 and changed fatal to warn to avoid aborting.
5469 (percent_table): Added %thong declarations.
5471 * src/gram.h: Comment changes.
5473 * src/files.c (openfiles, open_extra_files, done):
5475 and actfile file. Handle noparserflag. Both for -n switch.
5477 * src/conflicts.c (resolve_sr_conflict):
5478 Remove use of alloca.
5480 1995-06-01 Jim Meyering <meyering@gnu.org>
5482 * doc/bison.texinfo: *** empty log message ***
5484 1995-05-06 Richard Stallman <rms@gnu.org>
5486 * src/bison.s1: Comment change.
5488 1995-05-06 Richard Stallman <rms@gnu.org>
5490 * bison.simple: Comment change.
5492 1995-05-03 Richard Stallman <rms@gnu.org>
5494 * src/version.c: Version now 1.24.
5496 * src/bison.s1: Change distribution terms.
5498 * src/version.c: Version now 1.23.
5500 1995-05-03 Richard Stallman <rms@gnu.org>
5502 * doc/bison.texinfo:
5503 Rewrite "Conditions for Using Bison".
5504 Update version to 1.24.
5506 1995-05-03 Richard Stallman <rms@gnu.org>
5508 * bison.simple: Change distribution terms.
5510 1995-02-23 Richard Stallman <rms@gnu.org>
5512 * src/files.c: Test __VMS_POSIX as well as VMS.
5514 1995-02-14 Jim Meyering <meyering@gnu.org>
5516 * src/bison.s1 (__yy_memcpy):
5517 Renamed from __yy_bcopy to avoid
5518 confusion. Reverse FROM and TO arguments to be consistent with
5521 1995-02-14 Jim Meyering <meyering@gnu.org>
5523 * bison.simple (__yy_memcpy):
5524 Renamed from __yy_bcopy to avoid
5525 confusion. Reverse FROM and TO arguments to be consistent with
5528 1994-11-10 David J. MacKenzie <djm@gnu.org>
5534 * Makefile.in (DISTFILES): Include NEWS.
5536 * Makefile.in (DISTFILES):
5537 Include install-sh, not install.sh.
5539 * configure.in: Update to Autoconf v2 macro names.
5541 1994-10-05 David J. MacKenzie <djm@gnu.org>
5543 * Makefile.in: fix typo
5545 * Makefile.in (prefix, exec_prefix):
5546 Let configure set them.
5548 1994-09-28 David J. MacKenzie <djm@gnu.org>
5550 * Makefile.in: Set datadir to $(prefix)/share.
5552 1994-09-15 Richard Stallman <rms@gnu.org>
5555 Update copyright notice and GPL version.
5557 1994-09-15 Richard Stallman <rms@gnu.org>
5560 Update copyright notice and GPL version.
5562 1994-07-12 Richard Stallman <rms@gnu.org>
5564 * src/reduce.c, src/reader.c:
5567 1994-05-05 David J. MacKenzie <djm@gnu.org>
5569 * Makefile.in: entered into RCS
5571 1994-03-26 Richard Stallman <rms@gnu.org>
5573 * src/bison.s1: entered into RCS
5575 1994-03-26 Richard Stallman <rms@gnu.org>
5577 * bison.simple: entered into RCS
5579 1994-03-25 Richard Stallman <rms@gnu.org>
5581 * src/main.c: entered into RCS
5583 1994-03-24 Richard Stallman <rms@gnu.org>
5585 * src/conflicts.c: entered into RCS
5587 1994-01-02 Richard Stallman <rms@gnu.org>
5589 * Makefile.in: *** empty log message ***
5591 1993-11-21 Richard Stallman <rms@gnu.org>
5593 * src/bison.s1: *** empty log message ***
5595 1993-11-21 Richard Stallman <rms@gnu.org>
5597 * doc/bison.texinfo: entered into RCS
5599 * doc/bison.texinfo: *** empty log message ***
5601 1993-11-21 Richard Stallman <rms@gnu.org>
5603 * bison.simple: *** empty log message ***
5605 1993-10-25 David J. MacKenzie <djm@gnu.org>
5607 * doc/bison.texinfo: *** empty log message ***
5609 1993-10-19 Richard Stallman <rms@gnu.org>
5611 * src/bison.s1: *** empty log message ***
5613 1993-10-19 Richard Stallman <rms@gnu.org>
5615 * bison.simple: *** empty log message ***
5617 1993-10-14 Richard Stallman <rms@gnu.org>
5619 * src/bison.s1: *** empty log message ***
5621 1993-10-14 Richard Stallman <rms@gnu.org>
5623 * bison.simple: *** empty log message ***
5625 1993-09-14 David J. MacKenzie <djm@gnu.org>
5627 * doc/bison.texinfo: *** empty log message ***
5629 1993-09-13 Noah Friedman <friedman@gnu.org>
5631 * Makefile.in: *** empty log message ***
5633 1993-09-10 Richard Stallman <rms@gnu.org>
5635 * src/conflicts.c: *** empty log message ***
5637 * src/system.h: entered into RCS
5639 1993-09-10 Richard Stallman <rms@gnu.org>
5641 * doc/bison.1: entered into RCS
5643 1993-09-06 Noah Friedman <friedman@gnu.org>
5645 * src/version.c: entered into RCS
5647 1993-09-06 Noah Friedman <friedman@gnu.org>
5649 * Makefile.in: *** empty log message ***
5651 1993-07-30 David J. MacKenzie <djm@gnu.org>
5653 * Makefile.in: *** empty log message ***
5655 1993-07-24 Richard Stallman <rms@gnu.org>
5657 * src/bison.s1: *** empty log message ***
5659 1993-07-24 Richard Stallman <rms@gnu.org>
5661 * bison.simple: *** empty log message ***
5663 1993-07-08 David J. MacKenzie <djm@gnu.org>
5665 * Makefile.in: *** empty log message ***
5667 1993-07-04 Richard Stallman <rms@gnu.org>
5669 * src/bison.s1: *** empty log message ***
5671 1993-07-04 Richard Stallman <rms@gnu.org>
5673 * bison.simple: *** empty log message ***
5675 1993-06-26 David J. MacKenzie <djm@gnu.org>
5677 * src/getargs.c: entered into RCS
5679 1993-06-26 David J. MacKenzie <djm@gnu.org>
5681 * doc/bison.texinfo: *** empty log message ***
5683 * doc/bison.1: New file.
5685 1993-06-25 Richard Stallman <rms@gnu.org>
5687 * src/getargs.c: New file.
5689 1993-06-16 Richard Stallman <rms@gnu.org>
5691 * src/bison.s1: *** empty log message ***
5693 1993-06-16 Richard Stallman <rms@gnu.org>
5695 * bison.simple: *** empty log message ***
5697 1993-06-03 Richard Stallman <rms@gnu.org>
5699 * src/bison.s1: New file.
5701 1993-06-03 Richard Stallman <rms@gnu.org>
5703 * doc/bison.texinfo: *** empty log message ***
5705 1993-06-03 Richard Stallman <rms@gnu.org>
5707 * bison.simple: New file.
5709 1993-05-19 Richard Stallman <rms@gnu.org>
5711 * doc/bison.texinfo: New file.
5713 1993-05-07 Noah Friedman <friedman@gnu.org>
5715 * Makefile.in: *** empty log message ***
5717 1993-04-28 Noah Friedman <friedman@gnu.org>
5719 * src/reader.c: *** empty log message ***
5721 1993-04-23 Noah Friedman <friedman@gnu.org>
5723 * src/alloc.h: entered into RCS
5725 1993-04-20 David J. MacKenzie <djm@gnu.org>
5727 * src/version.c: *** empty log message ***
5729 * src/files.c, src/allocate.c:
5732 * src/reader.c: *** empty log message ***
5734 * src/lex.c: entered into RCS
5736 * src/conflicts.c: New file.
5738 * src/symtab.c: entered into RCS
5740 * src/alloc.h: New file.
5742 * src/LR0.c: entered into RCS
5744 1993-04-18 Noah Friedman <friedman@gnu.org>
5746 * src/reader.c: New file.
5748 * src/version.c: *** empty log message ***
5750 1993-04-18 Noah Friedman <friedman@gnu.org>
5752 * Makefile.in: *** empty log message ***
5754 1993-04-17 Noah Friedman <friedman@gnu.org>
5756 * Makefile.in: *** empty log message ***
5758 1993-04-15 Richard Stallman <rms@gnu.org>
5760 * src/main.c, src/files.c:
5763 1993-04-15 Noah Friedman <friedman@gnu.org>
5765 * configure.in: entered into RCS
5767 * configure.in: *** empty log message ***
5769 * configure.in: New file.
5771 1993-04-14 Richard Stallman <rms@gnu.org>
5773 * Makefile.in: New file.
5775 1993-04-13 Richard Stallman <rms@gnu.org>
5777 * src/version.c: New file.
5779 1993-03-25 Richard Stallman <rms@gnu.org>
5781 * src/output.c: entered into RCS
5783 1992-09-25 Richard Stallman <rms@gnu.org>
5785 * configure.bat: entered into RCS
5787 1992-06-22 Richard Stallman <rms@gnu.org>
5789 * src/vmsgetargs.c: entered into RCS
5791 1992-06-22 Richard Stallman <rms@gnu.org>
5793 * doc/bison.rnh: entered into RCS
5795 1992-04-20 David J. MacKenzie <djm@gnu.org>
5797 * README: entered into RCS
5799 1992-01-22 Richard Stallman <rms@gnu.org>
5801 * src/machine.h: entered into RCS
5803 1991-12-21 Richard Stallman <rms@gnu.org>
5805 * src/lalr.c, src/closure.c:
5808 1991-12-20 Richard Stallman <rms@gnu.org>
5810 * src/state.h: entered into RCS
5812 1991-12-18 Richard Stallman <rms@gnu.org>
5814 * src/print.c, src/nullable.c, src/derives.c:
5817 1991-11-03 David J. MacKenzie <djm@gnu.org>
5819 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5822 1988-09-09 Richard Stallman <rms@gnu.org>
5824 * src/bison.hairy: entered into RCS
5826 1987-12-16 Richard Stallman <rms@gnu.org>
5828 * REFERENCES: entered into RCS