1 2002-02-25 Akim Demaille <akim@epita.fr>
3 * src/getargs.c (version): Give the name of the authors, and use a
4 translator friendly scheme for the copyright notice.
6 2002-02-25 Akim Demaille <akim@epita.fr>
8 * src/output.c (header_output): Remove, now handled completely via
11 2002-02-25 Akim Demaille <akim@epita.fr>
13 * m4/m4.m4: New, from CVS Autoconf.
14 * configure.in: Invoke it.
15 * src/output.c (output_skeleton): Use its result instead of the
18 2002-02-25 Akim Demaille <akim@epita.fr>
20 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
22 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
23 * src/output.c (output_skeleton): Use mkstemp to create a real
25 Move the filling of `skeleton' and its muscle to...
27 (output): Move the definition of the prologue muscle to...
29 * src/system.h (DEFAULT_TMPDIR): New.
31 2002-02-14 Paul Eggert <eggert@twinsun.com>
33 Remove the support for C++ namespace cleanliness; it was
34 causing more problems than it was curing, since it didn't work
35 properly on some nonstandard C++ compilers. This can wait
36 for a proper C++ parser.
38 * NEWS: Document this.
39 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
40 of C++, as it's treated like C now.
41 * src/bison.simple (YYSTD): Remove.
42 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
43 Treat C++ just like Standard C instead of trying to support
44 namespace cleanliness.
46 2002-02-14 Akim Demaille <akim@epita.fr>
48 * tests/regression.at (else): Adjust to Andreas' change.
50 2002-02-14 Akim Demaille <akim@epita.fr>
52 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
54 2002-02-13 Andreas Schwab <schwab@suse.de>
56 * src/output.c (output_rule_data): Don't output NULL, it might
59 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
61 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
62 (Copyright notice): Update.
64 2002-02-11 Akim Demaille <akim@epita.fr>
66 * tests/regression.at (%nonassoc and eof): Don't include
69 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
71 * data/bison.c++: Correct error recovery. Make the user able to
72 initialize the starting location.
74 2002-02-07 Akim Demaille <akim@epita.fr>
76 * tests/input.at: New.
78 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
80 * data/bison.c++: Replace some direct m4 expansions by constants. Be
81 more consistent when naming methods and variables. Put preprocessor
82 directives around tables only needed for debugging.
84 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
86 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
88 (yy::b4_name::parse): Use print_.
90 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
92 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
94 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
96 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
98 (yy::b4_name::parse): Build verbose error messages, and use error_.
100 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
102 * data/bison.c++: Fix m4 quoting in comments.
104 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
106 * data/bison.c++: Adjust the parser code. Fix some muscles that were
109 2002-02-05 Akim Demaille <akim@epita.fr>
111 * data/bison.c++: Adjust to the M4 back end.
112 More is certainly needed.
114 2002-02-05 Akim Demaille <akim@epita.fr>
116 Give a try to M4 as a back end.
118 * lib/readpipe.c: New, from wdiff.
119 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
121 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
122 specific values. Now it is m4 that performs the lookup.
123 * src/parse-skel.y: Remove.
124 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
125 * src/output.c (actions_output, guards_output)
126 (token_definitions_output): No longer keeps track of the output
127 line number, hence remove the second argument.
128 (guards_output): Check against the guard member of a rule, not the
131 (output_skeleton): Don't look for the skeleton location, let m4 do
133 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
135 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
136 (prepare): Given that for the time being changesyntax is not
137 usable in M4, rename the muscles using `-' to `_'.
138 Define `defines_flag', `output_parser_name' and `output_header_name'.
139 * src/output.h (actions_output, guards_output)
140 (token_definitions_output): Adjust prototypes.
141 * src/scan-skel.l: Instead of scanning the skeletons, it now
142 processes the output of m4: `__oline__' and `#output'.
143 * data/bison.simple: Adjust to be used by M4(sugar).
144 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
146 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
147 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
148 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
149 shamelessly stolen from CVS Autoconf.
151 2002-02-05 Akim Demaille <akim@epita.fr>
153 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
154 * configure.in: Check for the declarations of free and malloc.
155 * src/muscle_tab.c: Adjust.
157 2002-02-05 Akim Demaille <akim@epita.fr>
159 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
160 which have no values.
162 2002-02-05 Akim Demaille <akim@epita.fr>
164 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
167 2002-01-29 Paul Eggert <eggert@twinsun.com>
169 * src/bison.simple (YYSIZE_T): Do not define merely because
170 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
171 On some platforms, <alloca.h> does not declare YYSTD (size_t).
173 2002-01-27 Akim Demaille <akim@epita.fr>
175 Fix `%nonassoc and eof'.
177 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
178 which were not properly copied! Replace
179 memcpy (res->errs, src->errs, src->nerrs);
181 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
183 * tests/regression.at (%nonassoc and eof): Adjust to newest
184 Autotest: `.' is not in the PATH.
186 2002-01-27 Akim Demaille <akim@epita.fr>
188 * tests/sets.at (AT_EXTRACT_SETS): New.
192 2002-01-26 Akim Demaille <akim@epita.fr>
194 * tests/actions.at, tests/calc.at, tests/headers.at,
195 * tests/torture.at: Adjust to the newest Autotest which no longer
196 forces `.' in the PATH.
198 2002-01-25 Akim Demaille <akim@epita.fr>
200 * tests/regression.at (%nonassoc and eof): New.
201 Suggested by Robert Anisko.
203 2002-01-24 Akim Demaille <akim@epita.fr>
205 Bison dumps core when trying to complain about broken input files.
206 Reported by Cris van Pelt.
208 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
209 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
211 (Invalid inputs): Strengthen: exercise parse_percent_token.
213 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
215 * src/Makefile.am: Add bison.c++.
216 * src/bison.c++: New skeleton.
218 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
222 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
224 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
226 2002-01-20 Marc Autret <marc@gnu.org>
228 * src/files.c (compute_output_file_names): Fix
230 2002-01-20 Marc Autret <marc@gnu.org>
232 * tests/output.at: New test.
233 * src/files.c (compute_base_names): Don't map extensions when
234 the YACC flag is set, use defaults.
235 Reported by Evgeny Stambulchik.
237 2002-01-20 Marc Autret <marc@gnu.org>
239 * src/system.h: Need to define __attribute__ away for non-GCC
240 compilers as well (i.e. the vendor C compiler).
241 Suggested by Albert Chin-A-Young.
243 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
245 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
246 canonical definition.
247 * src/system.h: Use the canonical definition for PARAMS (avoids
248 a conflict with the macro from lib/hash.h).
250 2002-01-11 Akim Demaille <akim@epita.fr>
252 * configure.in: Use AC_FUNC_STRNLEN.
253 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
255 2002-01-09 Akim Demaille <akim@epita.fr>
257 * src/files.c, src/files.h (output_infix): New.
258 (tab_extension): Remove.
259 (compute_base_names): Compute the former, drop the latter.
260 * src/output.c (prepare): Insert the muscles `output-infix', and
262 * src/parse-skel.y (string, string.1): New.
263 (section.header): Use it.
264 (section.yacc): Remove.
265 (prefix): Remove too.
266 * src/scan-skel.l: Adjust.
267 * src/bison.simple, src/bison.hairy: Adjust.
269 2002-01-09 Akim Demaille <akim@epita.fr>
271 * configure.in (WERROR_CFLAGS): Compute it.
272 * src/Makefile.am (CFLAGS): Pass it.
273 * tests/atlocal.in (CFLAGS): Idem.
274 * src/files.c: Fix a few warnings.
275 (get_extension_index): Remove, unused.
277 2002-01-08 Akim Demaille <akim@epita.fr>
279 * src/getargs.c (AS_FILE_NAME): New.
280 (getargs): Use it to convert DOSish file names.
281 * src/files.c (base_name): Rename as full_base_name to avoid
282 clashes with `base_name ()'.
283 (filename_split): New.
284 (compute_base_names): N-th rewrite, using filename_split.
286 2002-01-08 Akim Demaille <akim@epita.fr>
288 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
289 New, stolen from the Fileutils 4.1.
290 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
291 * configure.in: Check for the presence of memrchr, and of its
294 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
296 * lib/hash.h (__P): Added definition for this macro.
297 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
298 BUILT_SOURCES, to ensure they are generated first.
299 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
300 %error-verbose to allow bootstrapping with bison 1.30x.
302 2002-01-06 Akim Demaille <akim@epita.fr>
304 * src/reader.c (parse_braces): Don't fetch the next char, the
305 convention is to fetch on entry.
306 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
307 'switch' without a following semicolon.
308 * tests/regression.at (braces parsing): New.
310 2002-01-06 Akim Demaille <akim@epita.fr>
312 Bison is dead wrong in its RR conflict reports.
314 * tests/torture.at (GNU Cim Grammar): New.
315 * src/conflicts.c (count_rr_conflicts): Fix.
317 2002-01-06 Akim Demaille <akim@epita.fr>
319 Creating package.m4 from configure.ac causes too many problems.
321 * tests/Makefile.am (package.m4): Create it by hand,
322 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
324 2002-01-06 Akim Demaille <akim@epita.fr>
326 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
329 2002-01-04 Paul Eggert <eggert@twinsun.com>
331 * doc/bison.texinfo (Debugging):
332 Remove YYSTDERR; it's no longer defined or used.
333 Also, s/cstdio.h/cstdio/.
335 2002-01-03 Akim Demaille <akim@epita.fr>
337 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
339 2002-01-03 Akim Demaille <akim@epita.fr>
341 * src/parse-skel.y (process_skeleton): Don't bind the parser's
342 tracing code to --trace, wait for a better --trace option, with
345 2002-01-03 Akim Demaille <akim@epita.fr>
347 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
348 The ISO C++ standard is extremely clear about it: stderr is
349 considered a macro, not a regular symbol (see table 94 `Header
350 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
351 Therefore std:: does not apply to it. It still does with fprintf.
352 Also, s/cstdio.h/cstdio/.
354 2002-01-03 Akim Demaille <akim@epita.fr>
356 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
357 for non system headers.
359 2002-01-02 Akim Demaille <akim@epita.fr>
361 Equip the skeleton chain with location tracking, runtime trace,
362 pure parser and scanner.
364 * src/parse-skel.y: Request a pure parser, locations, and prefix
366 (%union): Having several members with the same type does not help
367 type mismatches, simplify.
368 (YYPRINT, yyprint): New.
369 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
372 * src/scan-skel.l: Adjust to these changes.
373 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
374 (LOCATION_PRINT, skel_control_t): New.
376 2001-12-30 Akim Demaille <akim@epita.fr>
378 * src/parse-skel.y: Get rid of the shift/reduce conflict:
379 replace `gb' with BLANKS.
380 * src/scan-skel.l: Adjust.
382 2001-12-30 Akim Demaille <akim@epita.fr>
384 * src/system.h: We don't need nor want bcopy.
385 Throw away MS-DOS crap: we don't need getpid.
386 * configure.in: We don't need strndup. It was even causing
387 problems: because Flex includes the headers *before* us,
388 _GNU_SOURCE is not defined by config.h, and therefore strndup was
390 * lib/xstrndup.c: New.
391 * src/scan-skel.l: Use it.
392 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
393 * src/parse-skel.y: Use %directives instead of #defines.
395 2001-12-30 Akim Demaille <akim@epita.fr>
397 * src/skeleton.h: New.
398 * src/output.c (output_parser, output_master_parser): Remove, dead
400 * src/output.h (get_lines_number, actions_output, guards_output)
401 (token_definitions_output): Prototype them.
402 * src/parse-skel.y: Add the license notice.
403 Include output.h and skeleton.h.
404 (process_skeleton): Returns void, and takes a single parameter.
405 * src/scan-skel.l: Add the license notice.
407 Don't use %option yylineno: it seems that then Flex imagines
408 REJECT has been used, and therefore it won't reallocate its
409 buffers (which makes no other sense to me than a bug). It results
410 in warnings for `unused: yy_flex_realloc'.
412 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
414 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
415 (MUSCLE_INSERT_PREFIX): ...to there.
416 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
417 (MUSCLE_INSERT_PREFIX): Move from here...
419 * src/bison.hairy: Add a section directive. Put braces around muscle
420 names. This parser skeleton is still broken, but Bison should not
421 choke on a bad muscle 'syntax'.
422 * src/bison.simple: Add a section directive. Put braces around muscle
425 * src/files.h (strsuffix, stringappend): Add declarations.
426 (tab_extension): Add declaration.
427 (short_base_name): Add declaration.
429 * src/files.c (strsuffix, stringappend): No longer static. These
430 functions are used in the skeleton parser.
431 (tab_extension): New.
432 (compute_base_names): Use the computations done in this function
433 to guess if the generated parsers should have '.tab' in their
435 (short_base_name): No longer static.
437 * src/output.c (output_skeleton): New.
438 (output): Disable call to output_master_parser, and give a try to
439 a new skeleton handling system.
440 (guards_output, actions_output): No longer static.
441 (token_definitions_output, get_lines_number): No longer static.
443 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
445 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
448 * src/parse-skel.y: New file.
449 * src/scan-skel.l: New file.
451 2001-12-29 Akim Demaille <akim@epita.fr>
453 %name-prefix is broken.
455 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
456 Adjust all dependencies.
457 * tests/headers.at (export YYLTYPE): Strengthen this test: use
460 Renaming yylval but not yylloc is not consistent. Now we do.
462 * src/bison.simple: Prefix yylloc if used.
463 * doc/bison.texinfo (Decl Summary): Document that.
465 2001-12-29 Akim Demaille <akim@epita.fr>
467 * doc/bison.texinfo: Promote `%long-directive' over
469 Remove all references to fixed-output-files, yacc is enough.
471 2001-12-29 Akim Demaille <akim@epita.fr>
473 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
474 user prologue. These are defaults.
475 * tests/actions.at (Mid-rule actions): Make sure the user can
476 define YYDEBUG and YYERROR_VERBOSE.
478 2001-12-29 Akim Demaille <akim@epita.fr>
480 * src/output.c (header_output): Don't forget to export YYLTYPE and
482 * tests/headers.at (export YYLTYPE): New, make sure it does.
483 * tests/regression.at (%union and --defines, Invalid CPP headers):
485 * tests/headers.at: here.
487 2001-12-29 Akim Demaille <akim@epita.fr>
489 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
491 2001-12-29 Akim Demaille <akim@epita.fr>
493 * tests/actions.at (Mid-rule actions): Output on a single line
496 2001-12-29 Akim Demaille <akim@epita.fr>
498 * doc/bison.texinfo: Formatting changes.
500 2001-12-29 Akim Demaille <akim@epita.fr>
502 Don't store the token defs in a muscle, just be ready to output it
503 on command. Now possible via `symbols'. Fixes a memory leak.
505 * src/output.c (token_definitions_output): New.
506 (output_parser, header_output): Use it.
507 * src/reader.c (symbols_save): Remove.
509 2001-12-29 Akim Demaille <akim@epita.fr>
511 * src/bison.simple: Do not provide a default for YYSTYPE and
512 YYLTYPE before the user's prologue. Otherwise it's hardly... a
515 2001-12-29 Akim Demaille <akim@epita.fr>
517 Mid-rule actions are simply... ignored!
519 * src/reader.c (readgram): Be sure to attach mid-rule actions to
520 the empty-rule associated to the dummy symbol, not to the host
522 * tests/actions.at (Mid-rule actions): New.
524 2001-12-29 Akim Demaille <akim@epita.fr>
528 * src/reader.c (reader): Free grammar.
530 2001-12-29 Akim Demaille <akim@epita.fr>
534 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
535 since it allocates it for each state, although only one is needed.
536 (allocate_storage): Do it here.
538 2001-12-29 Akim Demaille <akim@epita.fr>
540 * src/options.h, src/options.c (create_long_option_table): Rename
542 (long_option_table_new): this, with a clearer prototype.
543 (percent_table): Remove, unused,
544 * src/getargs.c (getargs): Adjust.
546 2001-12-29 Akim Demaille <akim@epita.fr>
548 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
549 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
552 2001-12-29 Akim Demaille <akim@epita.fr>
554 * src/lalr.c (build_relations): Rename `states' as `states1'.
555 Sorry, I don't understand exactly what it is, no better name...
557 2001-12-29 Akim Demaille <akim@epita.fr>
559 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
560 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
561 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
564 2001-12-29 Akim Demaille <akim@epita.fr>
566 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
569 2001-12-29 Akim Demaille <akim@epita.fr>
571 * src/reader.c, src/reader.h (user_toknums): Remove.
572 Adjust all users to use symbols[i]->user_token_number.
574 2001-12-29 Akim Demaille <akim@epita.fr>
576 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
577 Adjust all users to use symbols[i]->prec or ->assoc.
579 2001-12-29 Akim Demaille <akim@epita.fr>
581 * src/reader.c, src/reader.h (tags): Remove.
582 Adjust all users to use symbols[i]->tag.
584 2001-12-29 Akim Demaille <akim@epita.fr>
586 * src/gram.h, src/gram.c (symbols): New, similar to state_table
588 * src/reader.c (packsymbols): Fill this table.
590 * src/conflicts.c (resolve_sr_conflict): Adjust.
591 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
593 Use symbols[i]->tag instead of tags[i].
595 2001-12-29 Akim Demaille <akim@epita.fr>
597 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
598 In addition, put a comment in there, to replace...
599 * tests/regression.at (%union and C comments): Remove.
601 2001-12-29 Akim Demaille <akim@epita.fr>
603 * tests/regression.at (Web2c Actions): Blindly move the actual
604 output as expected output. The contents *seem* right to me, but I
605 can't pretend reading perfectly parser tables... Nonetheless, all
606 the other tests pass correctly, the table look OK, even though the
607 presence of `$axiom' is to be noted: AFAICS it is useless (but
610 2001-12-29 Akim Demaille <akim@epita.fr>
612 * src/reader.c (readgram): Don't add the rule 0 if there were no
613 rules read. In other words, add it _after_ having performed
614 grammar sanity checks.
615 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
617 2001-12-29 Akim Demaille <akim@epita.fr>
619 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
620 visible, and some states have now a different number.
622 2001-12-29 Akim Demaille <akim@epita.fr>
624 * src/reader.c (readgram): Bind the initial rule's lineno to that
626 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
627 (Solved SR Conflicts): Adjust rule 0's line number.
629 2001-12-29 Akim Demaille <akim@epita.fr>
631 Fix the `GAWK Grammar' failure.
633 * src/LR0.c (final_state): Initialize to -1 so that we do compute
634 the reductions of the first state which was mistakenly confused
635 with the final state because precisely final_state was initialized
637 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
638 now noticed by Bison.
639 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
640 have a reduction on $default.
642 2001-12-29 Akim Demaille <akim@epita.fr>
644 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
646 * src/closure.c (print_closure): Likewise.
647 * src/derives.c (print_derives): Likewise.
648 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
651 2001-12-29 Akim Demaille <akim@epita.fr>
653 * src/lalr.c (lookaheads_print): New.
654 (lalr): Call it when --trace-flag.
655 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
658 2001-12-29 Akim Demaille <akim@epita.fr>
660 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
661 when walking through ritem, even via rule->rhs.
662 * src/reduce.c (dump_grammar, useful_production, reduce_output)
663 (useful_production, useless_nonterminals): Likewise.
664 (reduce_grammar_tables): Likewise, plus update nritems.
665 * src/nullable.c (set_nullable): Likewise.
666 * src/lalr.c (build_relations): Likewise.
667 * tests/sets.at (Nullable): Adjust.
668 Fortunately, now, the $axiom is no longer nullable.
670 2001-12-29 Akim Demaille <akim@epita.fr>
672 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
674 * src/gram.c (ritem_longest_rhs): Likewise.
675 * src/reduce.c (nonterminals_reduce): Likewise.
676 * src/print_graph.c (print_graph): Likewise.
677 * src/output.c (output_rule_data): Likewise.
678 * src/nullable.c (set_nullable): Likewise.
680 2001-12-29 Akim Demaille <akim@epita.fr>
682 * src/output.c: Comment changes.
684 2001-12-27 Paul Eggert <eggert@twinsun.com>
686 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
687 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
688 Sparc, as they were causing more porting problems than the
689 (minor) performance improvement was worth.
691 Also, catch up with 1.31's YYSTD.
693 2001-12-27 Akim Demaille <akim@epita.fr>
695 * src/output.c (output_gram): Rely on nritems, not the
696 0-sentinel. See below.
697 Use -1 as separator, not 0.
698 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
699 Rely on -1 as separator in yyrhs, instead of 0.
700 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
701 twice `Now at end of input', therefore there are two lines less to
704 2001-12-27 Akim Demaille <akim@epita.fr>
706 * tests/regression.at (Unresolved SR Conflicts):
707 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
710 2001-12-27 Akim Demaille <akim@epita.fr>
712 * src/LR0.c (new_state): Recognize the final state by the fact it
713 is reached by eoftoken.
714 (insert_start_shifting_state, insert_eof_shifting_state)
715 (insert_accepting_state, augment_automaton): Remove, since now
716 these states are automatically computed from the initial state.
717 (generate_states): Adjust.
718 * src/print.c: When reporting a rule number to the user, substract
719 1, so that the axiom rule is rule 0, and the first user rule is 1.
720 * src/reduce.c: Likewise.
721 * src/print_graph.c (print_core): For the time being, just as for
722 the report, depend upon --trace-flags to dump the full set of
724 * src/reader.c (readgram): Once the grammar read, insert the rule
725 0: `$axiom: START-SYMBOL $'.
726 * tests/set.at: Adjust: rule 0 is now displayed, and since the
727 number of the states has changed (the final state is no longer
728 necessarily the last), catch up.
730 2001-12-27 Akim Demaille <akim@epita.fr>
732 Try to make the use of the eoftoken valid. Given that its value
733 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
734 is used instead of > 0 where appropriate, (ii), depend upon nritems
735 instead of the 0-sentinel.
737 * src/gram.h, src/gram.c (nritems): New.
738 Expected to be duplication of nitems, but for the time being...
739 * src/reader.c (packgram): Assert nritems and nitems are equal.
740 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
741 * src/closure.c (print_closure, print_fderives): Likewise.
742 * src/gram.c (ritem_print): Likewise.
743 * src/print.c (print_core, print_grammar): Likewise.
744 * src/print_graph.c: Likewise.
746 2001-12-27 Akim Demaille <akim@epita.fr>
748 * src/main.c (main): If there are complains after grammar
749 reductions, then output the report anyway if requested, then die.
750 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
751 * src/reader.c (eoftoken): New.
752 (parse_token_decl): If the token being defined has value `0', it
754 (packsymbols): No longer hack `tags' to insert `$' by hand.
755 Be sure to preserve the value of the eoftoken.
756 (reader): Make sure eoftoken is defined.
757 Initialize nsyms to 0: now eoftoken is created just like the others.
758 * src/print.c (print_grammar): Don't special case the eof token.
759 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
760 lie anyway, albeit pleasant.
761 * tests/calc.at: Exercise error messages with eoftoken.
762 Change the grammar so that empty input is invalid.
764 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
766 2001-12-27 Akim Demaille <akim@epita.fr>
768 * configure.in: Check the protos of strchr ans strspn.
769 Replace strchr if needed.
770 * src/system.h: Provide the protos of strchr, strspn and memchr if
773 * src/reader.c (symbols_save): Use strchr.
775 2001-12-27 Akim Demaille <akim@epita.fr>
777 * src/print.c, src/print_graph.c (escape): New.
778 Use it to quote the TAGS outputs.
779 * src/print_graph.c (print_state): Now errors are in red, and
781 Prefer high to wide: output the state number on a line of its own.
783 2001-12-27 Akim Demaille <akim@epita.fr>
785 * src/state.h, src/state.c (reductions_new): New.
786 * src/LR0.c (set_state_table): Let all the states have a
787 `reductions', even if reduced to 0.
788 (save_reductions): Adjust.
789 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
790 * src/print.c (print_reductions, print_actions): Adjust.
791 * src/output.c (action_row): Adjust.
793 2001-12-27 Akim Demaille <akim@epita.fr>
795 * src/state.h, src/state.c (errs_new, errs_dup): New.
796 * src/LR0.c (set_state_table): Let all the states have an errs,
797 even if reduced to 0.
798 * src/print.c (print_errs, print_reductions): Adjust.
799 * src/output.c (output_actions, action_row): Adjust.
800 * src/conflicts.c (resolve_sr_conflict): Adjust.
802 2001-12-27 Akim Demaille <akim@epita.fr>
804 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
806 2001-12-27 Akim Demaille <akim@epita.fr>
808 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
810 (lookaheadset, shiftset): New, used as additional storage by
812 (print_results): Adjust.
813 (print_shifts, print_gotos, print_errs): New, extracted from...
814 (print_actions): here.
815 * src/print_graph.c (print_actions): Remove dead code.
817 2001-12-27 Akim Demaille <akim@epita.fr>
819 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
822 2001-12-27 Akim Demaille <akim@epita.fr>
824 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
825 (build_relations): Adjust.
827 2001-12-27 Akim Demaille <akim@epita.fr>
829 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
832 2001-12-27 Akim Demaille <akim@epita.fr>
834 * src/reader.c (packgram): Catch nitems overflows.
836 2001-12-27 Akim Demaille <akim@epita.fr>
838 * src/files.c, src/files.h (guard_obstack): Remove.
839 * src/output.c (output): Adjust.
840 * src/reader.c (parse_braces): New, factoring...
841 (copy_action, copy_guard): these two which are renamed as...
842 (parse_action, parse_guard): these.
843 As a voluntary consequence, using braces around guards is now
846 2001-12-27 Akim Demaille <akim@epita.fr>
848 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
849 * src/reader.c (symbol_list): `guard' and `guard_line' are new
851 (symbol_list_new): Adjust.
852 (copy_action): action_line is the first line, not the last.
853 (copy_guard): Just as for actions, store the `action' only, not
854 the switch/case/break flesh.
855 Don't parse the user action that might follow the guard, let...
856 (readgram): do it, i.e., now, there can be an action after a
858 In other words the guard is just explicitly optional.
860 * src/output.c (guards_output): New.
861 (output_parser): Call it when needed.
862 (output): Also free the guard and attrs obstacks.
863 * src/files.c, src/files.h (obstack_save): Remove.
864 (output_files): Remove.
865 As a result, if one needs the former `.act' file, using an
866 appropriate skeleton which requires actions and guards is now
868 * src/main.c (main): Adjust.
869 * tests/semantic.at: New.
870 * tests/regression.at: Use `input.y' as input file name.
871 Avoid 8+3 problems by requiring input.c when the test needs the
874 2001-12-27 Akim Demaille <akim@epita.fr>
876 * src/reader.c (symbol_list_new): Be sure to initialize all the
879 2001-12-27 Akim Demaille <akim@epita.fr>
881 All the hacks using a final pseudo state are now useless.
883 * src/LR0.c (set_state_table): state_table holds exactly nstates.
884 * src/lalr.c (nLA): New.
885 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
886 instead of lookaheadsp from the pseudo state (nstate + 1).
888 2001-12-27 Akim Demaille <akim@epita.fr>
890 * src/output.c (action_row, token_actions): Use a state_t instead
891 of a integer, and nlookaheads instead of the following state's
894 2001-12-27 Akim Demaille <akim@epita.fr>
896 * src/conflicts.c (log_resolution, flush_shift)
897 (resolve_sr_conflict, set_conflicts, solve_conflicts)
898 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
899 (conflicts_print, print_reductions): Use a state_t instead of an
900 integer when referring to a state.
901 As much as possible, depend upon nlookaheads, instead of the
902 `lookaheadsp' member of the following state (since lookaheads of
903 successive states are successive, the difference between state n + 1
904 and n served as the number of lookaheads for state n).
905 * src/lalr.c (add_lookback_edge): Likewise.
906 * src/print.c (print_core, print_actions, print_state)
907 (print_results): Likewise.
908 * src/print_graph.c (print_core, print_actions, print_state)
909 (print_graph): Likewise.
910 * src/conflicts.h: Adjust.
912 2001-12-27 Akim Demaille <akim@epita.fr>
914 * src/bison.hairy: Formatting/comment changes.
916 Remove `register' indications.
917 Add plenty of `static'.
919 2001-12-27 Akim Demaille <akim@epita.fr>
921 * src/output.c (prepare): Drop the muscle `ntbase' which
923 * src/bison.simple: Formatting/comment changes.
924 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
925 is an undocumented synonym.
927 2001-12-22 Akim Demaille <akim@epita.fr>
929 * src/output.c (output_table_data): Change the prototype to use
930 `int' for array ranges: some invocations do pass an int, not a
932 Reported by Wayne Green.
934 2001-12-22 Akim Demaille <akim@epita.fr>
936 Some actions of web2c.y are improperly triggered.
937 Reported by Mike Castle.
939 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
940 * tests/regression.at (Web2c): Rename as...
941 (Web2c Report): this.
942 (Web2c Actions): New.
944 2001-12-22 Akim Demaille <akim@epita.fr>
946 Reductions in web2c.y are improperly reported.
947 Reported by Mike Castle.
949 * src/conflicts.c (print_reductions): Fix.
950 * tests/regression.at (Web2c): New.
952 2001-12-18 Akim Demaille <akim@epita.fr>
954 Some host fail on `assert (!"foo")', which expands to
955 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
956 Reported by Nelson Beebee.
958 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
959 `#define it_succeeded 0' and `assert (it_succeeded)'.
961 2001-12-17 Marc Autret <autret_m@epita.fr>
963 * src/bison.simple: Don't hard code the skeleton line and filename.
964 * src/output.c (output_parser): Rename 'line' as 'output_line'.
965 New line counter 'skeleton_line' (skeleton-line muscle).
967 2001-12-17 Paul Eggert <eggert@twinsun.com>
969 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
970 YYDEBUG must be defined to a nonzero value.
972 * src/bison.simple (yytname): Do not assume that the user defines
973 YYDEBUG to a properly parenthesized expression.
975 2001-12-17 Akim Demaille <akim@epita.fr>
977 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
978 nlookaheads is a new member.
980 * src/lalr.h (nlookaheads): Remove this orphan declaration.
981 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
984 2001-12-17 Akim Demaille <akim@epita.fr>
986 * src/files.h, src/files.c (open_files, close_files): Remove.
987 * src/main.c (main): Don't open/close files, nor invoke lex_free,
989 * src/reader.c (reader): Do it.
991 2001-12-17 Akim Demaille <akim@epita.fr>
993 * src/conflicts.c (print_reductions): Formatting changes.
995 2001-12-17 Akim Demaille <akim@epita.fr>
997 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
999 (resolve_sr_conflict): Adjust.
1001 2001-12-17 Akim Demaille <akim@epita.fr>
1003 * src/output.c (output_obstack): Be static and rename as...
1004 (format_obstack): this, to avoid any confusion with files.c's
1006 * src/reader.h (muscle_obstack): Move to...
1007 * src/output.h: here, since it's defined in output.c.
1009 2001-12-17 Akim Demaille <akim@epita.fr>
1011 * src/output.c (action_row, save_column, default_goto)
1012 (sort_actions, matching_state, pack_vector): Better variable
1015 2001-12-17 Akim Demaille <akim@epita.fr>
1017 * src/output.c: Various formatting changes.
1019 2001-12-17 Akim Demaille <akim@epita.fr>
1021 * src/files.c (output_files): Free the output_obstack.
1022 * src/main.c (main): Call print and print_graph conditionally.
1023 * src/print.c (print): Work unconditionally.
1024 * src/print_graph.c (print_graph): Work unconditionally.
1025 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1027 2001-12-16 Marc Autret <autret_m@epita.fr>
1029 * src/output.c (actions_output): Fix. When we use %no-lines,
1030 there is one less line per action.
1032 2001-12-16 Marc Autret <autret_m@epita.fr>
1034 * src/bison.simple: Remove a useless #line directive.
1035 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1036 * src/output.c (get_lines_number): New.
1037 (output_parser): Adjust, now takes care about the lines of a
1040 (actions_output): Computes the number of lines taken by actions.
1041 (output_master_parser): Insert new skeleton which is the name of
1042 the output parser file name.
1044 2001-12-15 Marc Autret <autret_m@epita.fr>
1046 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1048 2001-12-15 Marc Autret <autret_m@epita.fr>
1050 * src/output.c (output_gram): Keep track of the hairy one.
1052 2001-12-15 Akim Demaille <akim@epita.fr>
1054 Make `make distcheck' work.
1056 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1057 system.h which uses libgettext.h.
1059 2001-12-15 Akim Demaille <akim@epita.fr>
1061 * src/nullable.c (set_nullable): Useless rules must be skipped,
1062 otherwise, since we range over their symbols, we might look at a
1063 nonterminal which no longer ``exists'', i.e., it is not counted in
1064 `nvars', hence we overflow our arrays.
1066 2001-12-15 Akim Demaille <akim@epita.fr>
1068 The header can also be produced directly, without any obstack!
1071 * src/files.c, src/files.h (defines_obstack): Remove.
1072 (compute_header_macro): Global.
1073 (defines_obstack_save): Remove.
1074 * src/reader.c (parse_union_decl): No longer output to
1075 defines_obstack: its content can be found in the `stype' muscle
1077 (output_token_translations): Merge into...
1078 (symbols_output): this.
1080 (symbols_save): this.
1082 * src/output.c (header_output): New.
1085 2001-12-15 Akim Demaille <akim@epita.fr>
1087 * src/reader.c (parse_union_decl): Instead of handling two obstack
1088 simultaneously, use one to define the `stype' muscle, and use the
1089 value of the latter to fill defines_obstack.
1090 (copy_comment): Remove.
1091 (copy_comment2): Work for a single obstack.
1093 (copy_comment): this.
1095 2001-12-15 Akim Demaille <akim@epita.fr>
1097 * src/lex.c, src/lex.h (xgetc): No longer static.
1098 * src/reader.c (parse_union_decl): Revamp.
1100 2001-12-15 Akim Demaille <akim@epita.fr>
1102 Still making progress in separating Bison into (i) input, (ii)
1103 process, (iii) output: now we can directly output the parser file
1104 without using table_obstack at all.
1106 * src/files.c, src/files.h (table_obstack): Bye bye.
1107 (parser_file_name): New.
1108 * src/files.c (compute_output_file_names): Compute it.
1109 * src/output.c (actions_output, output_parser)
1110 (output_master_parser): To a file instead of an obstack.
1112 2001-12-15 Akim Demaille <akim@epita.fr>
1114 Attach actions to rules, instead of pre-outputting them to
1117 * src/gram.h (rule_t): action and action_line are new members.
1118 * src/reader.c (symbol_list): Likewise.
1119 (copy_action): Save the actions within the rule.
1120 (packgram): Save them in rule_table.
1121 * src/output.c (actions_output): New.
1122 (output_parser): Use it on `%%actions'.
1123 (output_rule_data): Don't free rule_table.
1125 (prepare): Don't save the `action' muscle.
1126 * src/bison.simple: s/%%action/%%actions/.
1128 2001-12-15 Akim Demaille <akim@epita.fr>
1130 * src/reader.c (copy_action): When --yacc, don't append a `;'
1131 to the user action: let it fail if lacking.
1132 Suggested by Arnold Robbins and Tom Tromey.
1134 2001-12-14 Akim Demaille <akim@epita.fr>
1136 * src/lex.c (literalchar): Simply return the char you decoded, non
1137 longer mess around with obstacks and int pointers.
1140 2001-12-14 Akim Demaille <akim@epita.fr>
1142 * src/lex.c (literalchar): Don't escape the special characters,
1143 just decode them, and keep them as char (before, eol was output as
1144 the 2 char string `\n' etc.).
1145 * src/output.c (output_rule_data): Use quotearg to output the
1148 2001-12-13 Paul Eggert <eggert@twinsun.com>
1150 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1151 Do not infringe on the global user namespace when using C++.
1152 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1153 All uses of `fprintf' and `stderr' changed.
1155 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1157 2001-12-13 Akim Demaille <akim@epita.fr>
1159 The computation of nullable is broken: it doesn't handle empty
1162 * tests/torture.at (GNU AWK Grammar): New.
1163 * tests/sets.at (Nullable): New.
1164 * src/nullable.c (set_nullable): Instead of blindly looping over
1165 `ritems', loop over the rules, and then over their rhs's.
1167 Work around Autotest bugs.
1169 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1170 frame, because Autotest understand lines starting with a `+' as
1171 traces from the shell. Then, they are not processed properly.
1172 Admittedly an Autotest bug, but we don't have time to wait for
1173 Autotest to catch up.
1174 * tests/regression.at (Broken Closure): Adjust to the new table
1177 * tests/sets.at: here.
1179 2001-12-13 Akim Demaille <akim@epita.fr>
1181 * src/closure.c (closure): Use nrules instead of playing tricks
1184 2001-12-13 Akim Demaille <akim@epita.fr>
1186 * src/print.c (print_actions): Output the handling of `$' as the
1187 traces do: shifting the token EOF. Before EOF was treated as a
1189 * tests/regression.at: Adjust some tests.
1190 * src/print_graph.c (print_core): Complete the set of items via
1191 closure. The next-to-final and final states are still unsatisfying,
1192 but that's to be addressed elsewhere.
1193 No longer output the rule numbers, but do output the state number.
1194 A single loop for the shifts + gotos is enough, but picked a
1195 distinct color for each.
1196 (print_graph): Initialize and finalize closure.
1198 2001-12-13 Akim Demaille <akim@epita.fr>
1200 * src/reader.c (readgram): Remove dead code, an strip useless
1202 (get_type): Remove, unused.
1204 2001-12-12 Akim Demaille <akim@epita.fr>
1206 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1207 on that of lib/error.c.
1209 2001-12-12 Akim Demaille <akim@epita.fr>
1211 Some hosts don't like `/' in includes.
1213 * src/system.h: Include libgettext.h without qualifying the path.
1214 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1217 2001-12-11 Marc Autret <autret_m@epita.fr>
1219 * src/output.c (output_parser): Remove useless muscle.
1221 2001-12-11 Marc Autret <autret_m@epita.fr>
1223 * src/bison.simple: Remove #line just before %%epilogue. It
1224 is now handled in ...
1225 * src/reader.c (read_additionnal_code): Add the output of a
1226 #line for the epilogue.
1228 2001-12-10 Marc Autret <autret_m@epita.fr>
1230 * src/reader.c (copy_definition): Re-use CPP-outed code which
1231 replace precedent remove.
1232 * src/bison.simple: Remove #line before %%prologue because
1233 %%input-line is wrong at this time.
1235 2001-12-10 Marc Autret <autret_m@epita.fr>
1237 * src/reader.c (symbols_output): Clean up.
1238 * src/output.c (output_gram, output): Clean up.
1240 2001-12-10 Akim Demaille <akim@epita.fr>
1242 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1243 * src/LR0.c (set_state_table): here.
1244 * src/lalr.c (lalr): Call it.
1246 2001-12-10 Akim Demaille <akim@epita.fr>
1248 * src/state.h (shifts): Remove the `number' member: shifts are
1249 attached to state, hence no longer need to be labelled with a
1252 2001-12-10 Akim Demaille <akim@epita.fr>
1254 Now that states have a complete set of members, the linked list of
1255 shifts is useless: just fill directly the state's shifts member.
1257 * src/state.h (shifts): Remove the `next' member.
1258 * src/LR0.c (first_state, last_state): Remove.
1260 (augment_automaton): Don't look for the shifts that must be added
1261 a shift on EOF: it is those of the state we looked for! But now,
1262 since shifts are attached, it is no longer needed to looking
1263 merely by its id: its number.
1265 2001-12-10 Akim Demaille <akim@epita.fr>
1267 * src/LR0.c (augment_automaton): Better variable locality.
1268 Remove an impossible branch: if there is a state corresponding to
1269 the start symbol being shifted, then there is shift for the start
1270 symbol from the initial state.
1272 2001-12-10 Akim Demaille <akim@epita.fr>
1274 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1275 only when appropriate: when insert_start_shifting_state' is not
1277 * tests/regression.at (Rule Line Numbers): Adjust.
1279 2001-12-10 Akim Demaille <akim@epita.fr>
1281 * src/LR0.c (augment_automaton): Now that all states have shifts,
1282 merge the two cases addition shifts to the initial state.
1284 2001-12-10 Akim Demaille <akim@epita.fr>
1286 * src/lalr.c (set_state_table): Move to...
1288 * src/lalr.c (lalr): Don't call it...
1289 * src/LR0.c (generate_states): do it.
1290 * src/LR0.h (first_state): Remove, only the table is used.
1292 2001-12-10 Akim Demaille <akim@epita.fr>
1294 * src/LR0.h (first_shift, first_reduction): Remove.
1295 * src/lalr.c: Don't use first_shift: find shifts through the
1298 2001-12-10 Akim Demaille <akim@epita.fr>
1300 * src/LR0.c: Attach shifts to states as soon as they are
1302 * src/lalr.c (set_state_table): Instead of assigning shifts to
1303 state, just assert that the mapping was properly done.
1305 2001-12-10 Akim Demaille <akim@epita.fr>
1307 * src/LR0.c (insert_start_shift): Rename as...
1308 (insert_start_shifting_state): this.
1309 (insert_eof_shifting_state, insert_accepting_state): New.
1310 (augment_automaton): Adjust.
1311 Better locality of the variables.
1312 When looking if the start_symbol is shifted from the initial
1313 state, using `while (... symbol != start_symbol ...)' sounds
1314 better than `while (... symbol < start_symbol ...)': If fail
1315 to see how the order between symbols could be relevant!
1317 2001-12-10 Akim Demaille <akim@epita.fr>
1319 * src/getargs.h: Don't declare `spec_name_prefix' and
1320 `spec_file_prefix', declared by src/files.h.
1321 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1322 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1323 * src/output.c (prepare): Adjust.
1324 * src/reader.c (symbols_output): Likewise.
1325 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1327 2001-12-10 Akim Demaille <akim@epita.fr>
1329 * src/muscle_tab.c (muscle_init): NULL is a better default than
1332 2001-12-10 Akim Demaille <akim@epita.fr>
1334 * src/reader.c (reader): Calling symbols_output once is enough.
1336 2001-12-10 Akim Demaille <akim@epita.fr>
1338 Now that states have a complete set of members, the linked list of
1339 reductions is useless: just fill directly the state's reductions
1342 * src/state.h (struct reductions): Remove member `number' and
1344 * src/LR0.c (first_reduction, last_reduction): Remove.
1345 (save_reductions): Don't link the new reductions, store them in
1347 * src/lalr.c (set_state_table): No need to attach reductions to
1348 states, it's already done.
1349 * src/output.c (output_actions): No longer free the shifts, then
1350 the reductions, then the states: free all the states and their
1353 2001-12-10 Akim Demaille <akim@epita.fr>
1355 * src/options.c (OPTN, DRTV, BOTH): New.
1356 (option_table): Use them.
1358 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1359 the job of system.h.
1360 * src/options.c: Don't include stdio.h and xalloc.h for the same
1363 2001-12-10 Akim Demaille <akim@epita.fr>
1365 * src/output.c (output, prepare): Make sure the values of the
1366 muscles `action' and `prologue' are 0-terminated.
1368 2001-12-10 Akim Demaille <akim@epita.fr>
1370 Clean up GCC warnings.
1372 * src/reader.c (copy_action): `buf' is not used.
1373 (parse_skel_decl): Be static.
1374 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1375 * src/options.h (create_long_option_table): Have a real prototype.
1376 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1377 (hash_delete_at): Return const void *.
1378 Adjust casts to preserve the const.
1380 2001-12-10 Akim Demaille <akim@epita.fr>
1382 * configure.in: Require 2.52g.
1383 M4 is not needed, but AUTOM4TE is.
1385 * tests/Makefile.am: Adjust.
1387 2001-12-10 Akim Demaille <akim@epita.fr>
1389 One structure for states is enough, even though theoretically
1390 there are LR(0) states and LALR(1) states.
1392 * src/lalr.h (state_t): Remove.
1393 (state_table): Be state_t **, not state_t *.
1394 * src/state.h (core, CORE_ALLOC): Rename as...
1395 (state_t, STATE_ALLOC): this.
1396 Add the LALR(1) members: shifts, reductions, errs.
1397 * src/LR0.c (state_table): Rename as...
1398 (state_hash): this, to avoid name clashes with the global
1400 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1401 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1403 2001-12-10 Akim Demaille <akim@epita.fr>
1405 Bison dumps core on bash.y.
1406 Reported by Pascal Bart.
1408 * src/warshall.c (bitmatrix_print): New.
1410 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1411 j must be the outer loop.
1412 * tests/regression.at (Broken Closure): New.
1414 2001-12-05 Akim Demaille <akim@epita.fr>
1416 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1418 Reported by Peter Hámorský.
1420 2001-12-05 Akim Demaille <akim@epita.fr>
1422 * src/conflicts.c (err_table): Remove.
1423 (resolve_sr_conflict): Adjust.
1424 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1426 (state_t.reductions, state_t.shifts): this.
1428 2001-12-05 Akim Demaille <akim@epita.fr>
1430 * src/reduce.c (reduce_grammar_tables): No longer disable the
1431 removal of useless rules via CPP but via `if (0)', so that the
1432 compiler still check the code is valid.
1433 For instance, it should have noticed `rline' no longer exists: use
1434 the `line' member of rule_t.
1435 * src/gram.c (dummy, rline): Remove, unused.
1437 2001-12-05 Akim Demaille <akim@epita.fr>
1439 * src/output.c (pack_vector): Use assert, not berror.
1440 * src/main.c (berror): Remove, unused.
1442 2001-12-05 Akim Demaille <akim@epita.fr>
1444 New experimental feature: if --verbose --trace output all the
1445 items of a state, not only its kernel.
1447 * src/print.c (print_core): If `trace_flag', then invoke closure
1448 before outputting the items of the state (print_core is no longer
1449 a correct name them).
1450 (print_results): Invoke new_closure/free_closure if needed.
1452 2001-12-05 Akim Demaille <akim@epita.fr>
1454 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1455 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1456 (nitemset): for consistency with the rest of the project.
1458 2001-12-05 Akim Demaille <akim@epita.fr>
1460 * src/closure.c (print_closure): Improve.
1461 (closure): Use it for printing input and output.
1463 2001-12-05 Akim Demaille <akim@epita.fr>
1465 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1466 indexed by nonterminals.
1468 2001-12-05 Akim Demaille <akim@epita.fr>
1470 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1472 * src/warshall.h: Remove accidental duplication of the content.
1474 2001-12-05 Akim Demaille <akim@epita.fr>
1476 * src/closure.c (set_fderives): De-obfuscate.
1478 2001-12-05 Akim Demaille <akim@epita.fr>
1480 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1482 2001-12-05 Akim Demaille <akim@epita.fr>
1484 * src/closure.c (set_firsts): De-obfuscate.
1486 2001-12-05 Akim Demaille <akim@epita.fr>
1488 * src/output.c (action_row): De-obfuscate
1489 using the good o' techniques: arrays not pointers, variable
1490 locality, BITISSET, RESETBIT etc.
1492 2001-12-05 Akim Demaille <akim@epita.fr>
1494 Pessimize the code to simplify it: from now on, all the states
1495 have a valid SHIFTS, which NSHIFTS is possibly 0.
1497 * src/LR0.c (shifts_new): Be global and move to..
1498 * src/state.c, src/state.h: here.
1499 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1500 * src/print_graph: Adjust.
1502 2001-12-05 Akim Demaille <akim@epita.fr>
1504 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1505 * src/conflicts.c: Use it.
1506 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1507 incorrectly ``simplified''.
1509 2001-12-05 Akim Demaille <akim@epita.fr>
1511 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1512 using the good o' techniques: arrays not pointers, variable
1513 locality, BITISSET, RESETBIT etc.
1515 2001-12-05 Akim Demaille <akim@epita.fr>
1517 * src/state.h (SHIFT_SYMBOL): New.
1518 * src/conflicts.c: Use it to deobfuscate.
1520 2001-12-05 Akim Demaille <akim@epita.fr>
1522 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1523 (print_reductions): De-obfuscate using the good o' techniques:
1524 arrays not pointers, variable locality, BITISSET.
1526 2001-12-05 Akim Demaille <akim@epita.fr>
1528 * src/conflicts.c (print_reductions): Arrays, not pointers.
1531 2001-12-05 Akim Demaille <akim@epita.fr>
1533 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1535 2001-12-05 Akim Demaille <akim@epita.fr>
1537 * src/conflicts.c (print_reductions): Improve variable locality.
1539 2001-12-05 Akim Demaille <akim@epita.fr>
1541 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1543 2001-12-05 Akim Demaille <akim@epita.fr>
1545 * src/conflicts.c (print_reductions): Improve variable locality.
1547 2001-12-05 Akim Demaille <akim@epita.fr>
1549 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1550 * src/lalr.c: Use them.
1552 2001-12-05 Akim Demaille <akim@epita.fr>
1554 * src/LR0.c (augment_automaton): Formatting changes.
1555 Better variable locality.
1557 2001-12-05 Akim Demaille <akim@epita.fr>
1559 * src/lalr.c (matrix_print): New.
1560 (transpose): Use it.
1561 Use arrays instead of pointers.
1563 2001-12-05 Akim Demaille <akim@epita.fr>
1565 * src/lalr.c (maxrhs): Move to...
1566 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1567 * src/lalr.c (build_relations): Adjust.
1569 2001-12-05 Akim Demaille <akim@epita.fr>
1571 * src/lalr.c (transpose): Free the memory allocated to the
1572 argument, as it is replaced by the results by the unique caller.
1573 (build_relations): Merely invoke transpose: it handles the memory
1575 Improve variable locality.
1576 Avoid variables used as mere abbreviations.
1577 (compute_lookaheads): Use arrays instead of pointers.
1579 2001-12-05 Akim Demaille <akim@epita.fr>
1581 * src/lalr.c (initialize_F): Improve variable locality.
1582 Avoid variables used as mere abbreviations.
1584 2001-12-05 Akim Demaille <akim@epita.fr>
1586 * src/derives.c (print_derives): Display the ruleno.
1587 * src/lalr.c (initialize_F, transpose): Better variable locality
1588 to improve readability.
1589 Avoid variables used as mere abbreviations.
1591 2001-12-05 Akim Demaille <akim@epita.fr>
1593 * src/lalr.c (traverse): Use arrays instead of pointers.
1595 2001-12-05 Akim Demaille <akim@epita.fr>
1597 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1598 the handling of squeue.
1599 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1601 2001-12-05 Akim Demaille <akim@epita.fr>
1603 Because useless nonterminals are now kept alive (instead of being
1604 `destroyed'), we now sometimes examine them, and store information
1605 related to them. Hence we need to know their number, and adjust
1608 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1610 * src/LR0.c (allocate_itemsets): The memory allocated to
1611 `symbol_count' was used for two different purpose: once to count
1612 the number of occurrences of each symbol, and later reassigned to
1613 `shift_symbol', containing the symbol that can be shifted from a
1615 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1617 (new_itemsets): Allocate `shift_symbol' here.
1618 (allocate_itemsets): symbol_count includes useless nonterminals.
1620 (free_storage): Use `free', not `XFREE', for pointers that cannot
1623 2001-12-05 Akim Demaille <akim@epita.fr>
1625 * src/nullable.c (set_nullable): Deobfuscate the handling of
1627 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1629 2001-12-05 Akim Demaille <akim@epita.fr>
1631 * src/gram.c, src/gram.h (ritem_print): New.
1632 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1633 (This useless function was defined only to work around VMS linkers
1634 that can't handle compilation units with variables only).
1635 * src/reduce.c (dump_grammar): Use it to trace the construction of
1638 2001-12-04 Paul Eggert <eggert@twinsun.com>
1640 * src/bison.simple (union yyalloc): Change member names
1641 to be the same as the stack names.
1642 (yyparse): yyptr is now union yyalloc *, not char *.
1643 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1644 and may generate better code on some machines.
1645 (yystpcpy): Use prototype if __STDC__ is defined, not just
1646 if __cplusplus is defined.
1648 2001-11-30 Akim Demaille <akim@epita.fr>
1650 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1651 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1652 Gettext doesn't compile cleanly, and dies with -Werror.
1653 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1654 Include WARNING_CFLAGS here.
1655 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1656 before being defined.
1658 2001-11-27 Paul Eggert <eggert@twinsun.com>
1660 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1661 First arg is int, not unsigned.
1662 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1663 (SIZE_MAX, UINT_MAX): New macros.
1664 (quotearg_n_options): Abort if N is negative.
1665 Avoid overflow check on hosts where size_t is 64 bits and int
1666 is 32 bits, as overflow is impossible there.
1667 Fix off-by-one typo that caused unnecessary reallocation.
1669 2001-11-29 Paul Eggert <eggert@twinsun.com>
1671 Name space cleanup in generated parser.
1673 * doc/bison.texinfo (Bison Parser): Discuss system headers
1674 and their effect on the user name space.
1677 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1678 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1679 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1681 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1682 on user names when possible.
1684 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1685 Simplify test for whather <alloca.h> exists.
1687 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1689 (<stdio.h>): Include if YYDEBUG.
1691 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1692 ! defined (yyoverflow) && ! defined (yymemcpy).
1694 (yymemcpy, yyparse): Rename local variables as needed so that
1695 they all begin with 'yy'.
1697 (yystrlen, yystpcpy): New functions.
1699 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1702 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1703 instead of relying on string.h functions. Use YYSTACK_ALLOC
1704 and YYSTACK_FREE instead of malloc and free.
1706 2001-11-30 Akim Demaille <akim@epita.fr>
1708 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1709 before their first uses.
1710 (YYBISON, YYPURE): Move to the top of the output.
1712 2001-11-30 Akim Demaille <akim@epita.fr>
1714 * tests/reduce.at (Useless Nonterminals): Fix.
1716 2001-11-30 Akim Demaille <akim@epita.fr>
1718 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1719 if body instead of `;' to pacify GCC's warnings.
1721 2001-11-30 Akim Demaille <akim@epita.fr>
1723 Instead of mapping the LHS of unused rules to -1, keep the LHS
1724 valid, but flag the rules as invalid.
1726 * src/gram.h (rule_t): `useful' is a new member.
1727 * src/print.c (print_grammar): Adjust.
1728 * src/derives.c (set_derives): Likewise.
1729 * src/reader.c (packgram, reduce_output): Likewise.
1730 * src/reduce.c (reduce_grammar_tables): Likewise.
1731 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1733 2001-11-30 Akim Demaille <akim@epita.fr>
1735 * src/reduce.c (reduce_output): Formatting changes.
1736 * src/print.c (print_results, print_grammar): Likewise.
1737 * tests/regression.at (Rule Line Numbers)
1738 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1740 2001-11-30 Akim Demaille <akim@epita.fr>
1742 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1743 useless nonterminals, move them at the end of the symbol arrays.
1744 (reduce_output): Adjust.
1745 * tests/reduce.at (Useless Nonterminals): Adjust.
1747 2001-11-30 Akim Demaille <akim@epita.fr>
1749 * src/reduce.c: Various comment/formatting changes.
1750 (nonterminals_reduce): New, extracted from...
1751 (reduce_grammar_tables): here.
1752 (reduce_grammar): Call nonterminals_reduce.
1754 2001-11-29 Paul Eggert <eggert@twinsun.com>
1756 * src/bison.simple (YYSTACK_REALLOC): Remove.
1757 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
1758 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
1760 (union yyalloc): New type.
1761 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
1762 an arbitrary restriction on hosts where size_t is wider than int.
1764 (yyparse): Don't dump core if alloca or malloc fails; instead, report
1765 a parser stack overflow. Allocate just one block of memory for all
1766 three stacks, instead of allocating three blocks; this typically is
1767 faster and reduces fragmentation.
1769 Do not limit the number of items in the stack to a value that fits
1770 in 'int', as this is an arbitrary limit on hosts with 64-bit
1771 size_t and 32-bit int.
1773 2001-11-29 Marc Autret <autret_m@epita.fr>
1775 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
1776 of defining YYERROR_VERBOSE.
1777 [AT_DATA]: $4 is now out of C declarations in the prologue.
1779 2001-11-28 Marc Autret <autret_m@epita.fr>
1781 * src/reader.c (parse_dquoted_param): New.
1782 (parse_skel_decl): Use it.
1783 * src/lex.h: Add its prototype.
1784 * src/lex.c (literalchar): Become not static.
1786 2001-11-28 Marc Autret <autret_m@epita.fr>
1788 * src/output.h: And put its extern declaration here.
1789 * src/output.c (error_verbose): Define here.
1790 (prepare): Echo name modification.
1791 * src/getargs.h: Clean its extern declaration.
1792 * src/getargs.c (error_verbose_flag): Remove.
1793 (getargs): Remove case 'e'.
1794 * src/options.c (option_table): 'error-verbose' is now seen as simple
1798 * src/reader.c (read_declarations): Remove case tok_include.
1799 (parse_include_decl): Remove.
1800 * src/lex.h (token_t): Remove tok_include.
1801 * src/options.c (option_table): 'include' is now a simple command line
1804 2001-11-28 Marc Autret <autret_m@epita.fr>
1806 * src/bison.simple: Adjust muscle names.
1807 * src/muscle_tab.c (muscle_init): Also rename the muscles.
1808 * src/output.c (prepare): s/_/-/ for the muscles names.
1809 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
1811 2001-11-28 Marc Autret <autret_m@epita.fr>
1813 * src/bison.simple: Fix debug.
1814 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
1816 2001-11-28 Akim Demaille <akim@epita.fr>
1818 * src/LR0.c (shifts_new): New.
1819 (save_shifts, insert_start_shift, augment_automaton): Use it.
1821 2001-11-28 Akim Demaille <akim@epita.fr>
1823 * src/closure.c (closure): `b' and `ruleno' denote the same value:
1826 2001-11-28 Akim Demaille <akim@epita.fr>
1828 * src/closure.c (closure): Instead of looping over word in array
1829 then bits in words, loop over bits in array.
1831 2001-11-28 Akim Demaille <akim@epita.fr>
1833 * src/closure.c (closure): No longer optimize the special case
1834 where all the bits of `ruleset[r]' are set to 0, to make the code
1837 2001-11-28 Akim Demaille <akim@epita.fr>
1839 * src/closure.c (closure): `r' and `c' are new variables, used to
1840 de-obfuscate accesses to RULESET and CORE.
1842 2001-11-28 Akim Demaille <akim@epita.fr>
1844 * src/reduce.c (reduce_print): Use ngettext.
1845 (dump_grammar): Improve the trace accuracy.
1847 2001-11-28 Akim Demaille <akim@epita.fr>
1849 * src/reduce.c (dump_grammar): Don't translate trace messages.
1851 2001-11-28 Akim Demaille <akim@epita.fr>
1853 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
1854 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
1855 as all tags are free'ed afterwards.
1858 2001-11-27 Paul Eggert <eggert@twinsun.com>
1860 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
1861 use alloca when we didn't want to, and vice versa.
1863 2001-11-27 Marc Autret <autret_m@epita.fr>
1865 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
1867 * src/output.c (prepare): Remove its update.
1869 2001-11-27 Marc Autret <autret_m@epita.fr>
1871 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
1874 2001-11-27 Marc Autret <autret_m@epita.fr>
1876 * src/bison.simple: Remove YYERROR_VERBOSE using.
1877 Use %%error_verbose.
1878 (yyparse): Likewise.
1879 * src/output.c (prepare): Give its final value.
1880 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
1881 * src/getargs.h: Add its extern declaration.
1882 * src/getargs.c (error_verbose_flag): New int.
1883 (getargs): Update to catch new case.
1884 * src/options.c (option_table): 'error-verbose' is a new option.
1885 (shortopts): Update.
1887 2001-11-27 Akim Demaille <akim@epita.fr>
1889 * src/system.h: Use intl/libgettext.h.
1890 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
1892 2001-11-27 Akim Demaille <akim@epita.fr>
1894 * tests/torture.at (Exploding the Stack Size with Malloc):
1895 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
1897 2001-11-27 Akim Demaille <akim@epita.fr>
1899 * src/files.c: Include error.h.
1900 Reported by Hans Aberg.
1902 2001-11-26 Marc Autret <autret_m@epita.fr>
1904 * src/reader.c (parse_include_decl): New, not yet implemented.
1905 (read_declarations): Add case tok_include.
1906 * src/getargs.h (include): Add its extern definition.
1907 * src/getargs.c (include): New const char *.
1908 (getargs): Add case '-I'.
1909 * src/options.c (option_table): Add include as command line and
1911 * src/lex.h (token_t): Add tok_include.
1913 2001-11-26 Akim Demaille <akim@epita.fr>
1915 * src/reader.c (readgram): Make sure rules for mid-rule actions
1916 have a lineno equal to that of their host rule.
1917 Reported by Hans Aberg.
1918 * tests/regression.at (Rule Line Numbers): New.
1920 2001-11-26 Akim Demaille <akim@epita.fr>
1922 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
1925 2001-11-26 Akim Demaille <akim@epita.fr>
1927 * src/complain.c, src/complain.h (error): Remove, provided by
1930 2001-11-26 Akim Demaille <akim@epita.fr>
1932 * src/reader.c (read_declarations): Don't abort on tok_illegal,
1933 issue an error message.
1934 * tests/regression.at (Invalid %directive): New.
1935 Reported by Hans Aberg.
1937 2001-11-26 Akim Demaille <akim@epita.fr>
1939 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
1940 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1942 2001-11-26 Akim Demaille <akim@epita.fr>
1944 * src/conflicts.c (conflicts_print): Don't complain at all when
1945 there are no reduce/reduce conflicts, and as many shift/reduce
1946 conflicts as expected.
1947 * tests/regression.at (%expect right): Adjust.
1949 2001-11-23 Akim Demaille <akim@epita.fr>
1951 * lib/alloca.c: Update, from fileutils.
1953 2001-11-23 Akim Demaille <akim@epita.fr>
1955 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
1957 2001-11-23 Akim Demaille <akim@epita.fr>
1959 * src/system.h: Include alloca.h.
1960 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
1962 2001-11-23 Akim Demaille <akim@epita.fr>
1964 * src/print_graph.c (print_actions): Remove `rule', unused.
1965 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
1966 pacify GCC's signed < unsigned warnings.
1967 * src/closure.c (itemsetsize): Likewise.
1968 * src/reader.c (symbol_list_new): Static.
1970 2001-11-23 Akim Demaille <akim@epita.fr>
1972 Attaching lineno to buckets is stupid, since only one copy of each
1973 symbol is kept, only the line of the first occurrence is kept too.
1975 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
1976 * src/reader.c (rline_allocated): Remove, unused.
1977 (symbol_list): Have a `line' member.
1978 (symbol_list_new): New.
1980 * src/print.c (print_grammar): Output the rule line numbers.
1981 * tests/regression.at (Solved SR Conflicts)
1982 (Unresolved SR Conflicts): Adjust.
1983 Reported by Hans Aberg.
1985 2001-11-22 Marc Autret <autret_m@epita.fr>
1987 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
1989 2001-11-22 Marc Autret <autret_m@epita.fr>
1991 * src/muscle_tab.c (muscle_init): Remove initialization of
1993 * src/output.c (output_master_parser): Do it here.
1995 2001-11-20 Akim Demaille <akim@epita.fr>
1998 * configure.in (ALL_LINGUAS): Adjust.
1999 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2000 longer contains strings to translate.
2002 2001-11-19 Akim Demaille <akim@epita.fr>
2004 * src/conflicts.c (conflicts_print): Add a missing \n.
2006 2001-11-19 Akim Demaille <akim@epita.fr>
2008 * src/nullable.c (nullable_print): New.
2009 (set_nullable): Call it when tracing.
2010 Better locality of variables.
2012 2001-11-19 Akim Demaille <akim@epita.fr>
2014 * src/print.c (print_actions): Better locality of variables.
2016 2001-11-19 Akim Demaille <akim@epita.fr>
2018 * src/derives.c (print_derives): Fix and enrich.
2019 * src/closure.c (print_fderives): Likewise.
2021 2001-11-19 Akim Demaille <akim@epita.fr>
2023 * src/closure.c (itemsetend): Remove, replaced with...
2026 2001-11-19 Akim Demaille <akim@epita.fr>
2028 * src/LR0.c (kernel_end): Remove, replaced with...
2031 2001-11-19 Akim Demaille <akim@epita.fr>
2033 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2036 2001-11-19 Akim Demaille <akim@epita.fr>
2038 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2040 2001-11-19 Akim Demaille <akim@epita.fr>
2042 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2044 * src/LR0.c: Likewise.
2045 (allocate_itemsets): Use arrays instead of pointers to clarify.
2047 2001-11-19 Akim Demaille <akim@epita.fr>
2049 * src/getargs.c (statistics_flag): Replace with...
2051 (longopts): Accept --trace instead of --statistics.
2052 * src/getargs.h, src/options.c: Adjust.
2053 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2054 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2056 2001-11-19 Akim Demaille <akim@epita.fr>
2058 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2059 pointers to clarify the code.
2060 (save_reductions, save_shifts): Factor common parts of alternatives.
2062 2001-11-19 Akim Demaille <akim@epita.fr>
2064 * src/LR0.c (new_state, get_state): Complete TRACE code.
2065 * src/closure.c: Include `reader.h' to get `tags', needed by the
2067 Rename the conditional DEBUG as TRACE.
2068 Output consistently TRACEs to stderr, not stdout.
2069 * src/derives.c: Likewise.
2070 * src/reduce.c: (inaccessable_symbols): Using if is better style
2072 Use `#if TRACE' instead of `#if 0' for tracing code.
2074 2001-11-19 Akim Demaille <akim@epita.fr>
2076 * src/system.h (LIST_FREE, shortcpy): New.
2077 * src/LR0.c: Use them.
2078 * src/output.c (free_itemsets, free_reductions, free_shifts):
2079 Remove, replaced by LIST_FREE.
2081 2001-11-19 Akim Demaille <akim@epita.fr>
2083 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2084 (REDUCTIONS_ALLOC): New.
2085 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2088 2001-11-19 Akim Demaille <akim@epita.fr>
2090 * src/LR0.c (new_state): Complete trace code.
2091 * src/nullable.c (set_nullable): Don't translate traces.
2093 2001-11-19 Akim Demaille <akim@epita.fr>
2095 * src/print_graph.c (print_core): Better locality of variables.
2096 * src/print.c (print_core): Likewise.
2098 2001-11-19 Akim Demaille <akim@epita.fr>
2100 * src/vcg.c: You do the output, so you are responsible of the
2101 handling of VCG syntax, in particular: use quotearg.
2102 * src/print_graph.c: Don't.
2103 (print_actions): Don't output the actions as part of the nodes,
2104 since that's the job of the edges.
2105 (print_state): Don't output by hand: fill the node description,
2106 and ask for its output.
2108 2001-11-19 Akim Demaille <akim@epita.fr>
2110 * src/bison.simple (yyparse): When verbosely reporting an error,
2111 no longer put additional quotes around token names.
2112 * tests/calc.at: Adjust.
2114 2001-11-19 Akim Demaille <akim@epita.fr>
2116 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2117 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2118 * src/output.c: Adjust.
2120 2001-11-19 Akim Demaille <akim@epita.fr>
2122 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2124 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2126 2001-11-19 Akim Demaille <akim@epita.fr>
2128 * src/gram.h (rule_t): New.
2130 (rrhs, rlhs): Remove, part of state_t.
2131 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2132 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2133 * src/reader.c, src/reduce.c: Adjust.
2135 2001-11-19 Akim Demaille <akim@epita.fr>
2137 * src/reader.c (symbols_output): New, extracted from...
2138 (packsymbols): Here.
2141 2001-11-19 Akim Demaille <akim@epita.fr>
2143 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2144 (maxrhs): this new function.
2146 2001-11-19 Akim Demaille <akim@epita.fr>
2148 * src/lalr.c (F): New macro to access the variable F.
2151 2001-11-19 Akim Demaille <akim@epita.fr>
2153 * src/lalr.h (LA): New macro to access the variable LA.
2154 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2155 * src/lalr.c: Adjust.
2157 2001-11-19 Akim Demaille <akim@epita.fr>
2159 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2160 (set_state_table): handle the `lookaheads' members.
2162 2001-11-19 Akim Demaille <akim@epita.fr>
2164 * src/lalr.h (lookaheads): Removed array, whose contents is now
2166 (state_t): this structure.
2167 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2170 2001-11-19 Akim Demaille <akim@epita.fr>
2172 * src/lalr.h (consistent): Removed array, whose contents is now
2174 (state_t): this structure.
2175 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2178 2001-11-19 Akim Demaille <akim@epita.fr>
2180 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2181 contents are now members of...
2182 (state_t): this structure.
2183 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2186 2001-11-19 Akim Demaille <akim@epita.fr>
2188 * src/lalr.h (state_t): New.
2189 (state_table): Be a state_t * instead of a core **.
2190 (accessing_symbol): Remove, part of state_t.
2191 * src/lalr.c: Adjust.
2192 (set_accessing_symbol): Merge into...
2193 (set_state_table): this.
2194 * src/print_graph.c, src/conflicts.c: Adjust.
2196 2001-11-14 Akim Demaille <akim@epita.fr>
2198 * tests/calc.at, tests/output.at, tests/regression.at,
2199 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2200 now the tests are run in private dirs, therefore AC_CLEANUP and
2201 family can be simplified to 0-ary.
2202 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2203 use abs. path to find config.h.
2204 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2205 stderr, there can be way too much random noise.
2206 Instead pass -Werror to GCC and rely on the exit status.
2207 Reported by Wolfram Wagner.
2209 2001-11-14 Akim Demaille <akim@epita.fr>
2211 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2212 defined only if yyoverflow is defined, to avoid `warning: unused
2214 Reported by The Test Suite.
2216 2001-11-14 Akim Demaille <akim@epita.fr>
2218 * src/print.c: Include reduce.h.
2219 Reported by Hans Aberg.
2221 2001-11-14 Akim Demaille <akim@epita.fr>
2223 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2224 Revert a previous patch: these are really const.
2225 * src/conflicts.c (conflict_report): Additional useless pair of
2226 braces to pacify GCC's warnings for `if () if () {} else {}'.
2227 * src/lex.c (parse_percent_token): Replace equal_offset with
2230 Be sure to strdup `arg' when used, since there is no reason for
2231 token_buffer not to change.
2233 2001-11-14 Akim Demaille <akim@epita.fr>
2235 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2237 * src/main.c (main): Use them.
2238 Suggested by Hans Aberg.
2240 2001-11-12 Akim Demaille <akim@epita.fr>
2242 * src/system.h (ngettext): Now that we use ngettext, be sure to
2243 provide a default definition when NLS are not used.
2245 2001-11-12 Akim Demaille <akim@epita.fr>
2247 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2248 Use @kbd to denote user input.
2249 (Language and Grammar): ANSIfy the example.
2250 Adjust its layout for info/notinfo.
2251 (Location Tracking Calc): Output error messages to stderr.
2252 Output locations in a more GNUtically correct way.
2253 Fix a couple of Englishos.
2254 Adjust @group/@end group pairs.
2256 2001-11-12 Akim Demaille <akim@epita.fr>
2258 %expext was not functioning at all.
2260 * src/conflicts.c (expected_conflicts): Set to -1.
2261 (conflict_report): Use ngettext.
2262 (conflicts_print): Check %expect and make its violation an error.
2263 * doc/bison.texinfo (Expect Decl): Adjust.
2264 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2265 * tests/regression.at (%expect not enough, %expect right)
2266 (%expect too much): New.
2268 2001-11-12 Akim Demaille <akim@epita.fr>
2270 * tests/regression.at (Conflicts): Rename as...
2271 (Unresolved SR Conflicts): this.
2272 (Solved SR Conflicts): New.
2274 2001-11-12 Akim Demaille <akim@epita.fr>
2276 * src/reduce.c (print_results): Rename as...
2277 (reduce_output): This.
2278 Output to OUT, passed as argument, instead of output_obstack.
2279 (dump_grammar): Likewise.
2282 (reduce_grammar): No longer call reduce_output, since...
2283 * src/print.c (print_results): do it.
2284 * src/main.c (main): Call reduce_free;
2286 2001-11-12 Akim Demaille <akim@epita.fr>
2288 * src/conflicts.c (print_reductions): Accept OUT as argument.
2289 Output to it, not to output_obstack.
2290 * src/print.c (print_actions): Adjust.
2292 2001-11-12 Akim Demaille <akim@epita.fr>
2294 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2295 the result instead of using...
2296 (src_total, rrc_total, src_count, rrc_count): Remove.
2297 (any_conflicts): Remove.
2298 (print_conflicts): Split into...
2299 (conflicts_print, conflicts_output): New.
2300 * src/conflicts.h: Adjust.
2301 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2302 * src/print.c (print_grammar): Issue `\n' between two rules.
2303 * tests/regression.at (Conflicts): New.
2304 Reported by Tom Lane.
2306 2001-11-12 Akim Demaille <akim@epita.fr>
2308 * tests/regression.at (Invalid input): Remove, duplicate with
2309 ``Invalid input: 1''.
2311 2001-11-12 Akim Demaille <akim@epita.fr>
2313 * tests/torture.at (AT_DATA_STACK_TORTURE)
2314 (Exploding the Stack Size with Alloca)
2315 (Exploding the Stack Size with Malloc): New.
2317 2001-11-12 Akim Demaille <akim@epita.fr>
2319 * src/bison.simple (YYSTACK_REALLOC): New.
2320 (yyparse) [!yyoverflow]: Use it and free the old stack.
2321 Reported by Per Allansson.
2323 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2325 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2326 define CPP macro, which substitute YYSTYPE by yystype.
2327 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2328 with yyltype/YYLTYPE. This allows inclusion of the generated
2329 header within the parser if the compiler, such as GGC, accepts
2330 multiple equivalent #defines.
2333 2001-11-05 Akim Demaille <akim@epita.fr>
2335 * src/reader.c (symbols_output): New, extracted from...
2336 (packsymbols): here.
2339 2001-11-05 Akim Demaille <akim@epita.fr>
2341 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2343 2001-11-05 Akim Demaille <akim@epita.fr>
2345 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2348 2001-11-05 Akim Demaille <akim@epita.fr>
2350 * src/options.h (struct option_table_struct): set_flags is void*.
2351 * src/options.c (longopts): Support `--output' and `%output'.
2353 * src/lex.h (tok_setopt): Remove, replaced with...
2354 (tok_intopt, tok_stropt): these new guys.
2355 * src/lex.c (getopt.h): Not needed.
2356 (token_buffer, unlexed_token_buffer): Not const.
2357 (percent_table): Promote `-' over `_' in directive names.
2358 Active `%name-prefix', `file-prefix', and `output'.
2359 (parse_percent_token): Accept possible arguments to directives.
2360 Promote `-' over `_' in directive names.
2362 2001-11-04 Akim Demaille <akim@epita.fr>
2364 * doc/bison.texinfo (Decl Summary): Split the list into
2365 `directives for grammars' and `directives for bison'.
2367 Add description of `%name-prefix', `file-prefix', and `output'.
2368 Promote `-' over `_' in directive names.
2369 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2370 Simplify the description of `--name-prefix'.
2371 Promote `-' over `_' in directive names.
2372 Promote `--output' over `--output-file'.
2373 Fix the description of `--defines'.
2374 * tests/output.at: Exercise %file-prefix and %output.
2376 2001-11-02 Akim Demaille <akim@epita.fr>
2378 * doc/refcard.tex: Update.
2380 2001-11-02 Akim Demaille <akim@epita.fr>
2382 * src/symtab.h (SUNDEF): New.
2383 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2384 stand for `uninitialized', instead of 0.
2385 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2386 * src/lex.c (lex): Adjust.
2388 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2390 Let yylex return it instead of a plain 0.
2391 Reported by Dick Streefland.
2393 2001-11-02 Akim Demaille <akim@epita.fr>
2395 * tests/regression.at (Mixing %token styles): New test.
2397 2001-11-02 Akim Demaille <akim@epita.fr>
2399 * src/reader.c (parse_thong_decl): Formatting changes.
2400 (token_translations_init): New, extracted from...
2401 (packsymbols): Here.
2404 2001-11-01 Akim Demaille <akim@epita.fr>
2406 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2407 Check that `9foo.y' produces correct cpp guards.
2408 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2412 2001-11-01 Akim Demaille <akim@epita.fr>
2414 * tests/regression.at (Invalid input: 2): New.
2415 * src/lex.c (unlexed_token_buffer): New.
2416 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2420 2001-11-01 Akim Demaille <akim@epita.fr>
2422 * tests/calc.at: Catch up with 1.30.
2423 * configure.in: Bump to 1.49a.
2424 Adjust to newer Autotest.
2426 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2428 * src/conflicts.c: Move global variables rrc_total and src_total ...
2429 (print_conflicts): here.
2430 * src/output.c (output): Free global variable user_toknums.
2431 * src/lex.c (token_obstack): Become static.
2433 2001-10-18 Akim Demaille <akim@epita.fr>
2435 * tests/atlocal.in (GCC): Add.
2436 * tests/calc.at: s/m4_match/m4_bmatch/.
2437 s/m4_patsubst/m4_bpatsubst/.
2438 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2439 * configure.in: AC_SUBST(GCC).
2441 2001-10-14 Marc Autret <autret_m@epita.fr>
2443 * src/options.c (create_long_option_table): Fix.
2445 2001-10-10 Akim Demaille <akim@epita.fr>
2447 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2449 2001-10-04 Akim Demaille <akim@epita.fr>
2451 * src/reader.c (parse_union_decl): Push the caracters in
2452 union_obstack, not attrs_obstack.
2454 2001-10-04 Akim Demaille <akim@epita.fr>
2456 Merge in the branch 1.29.
2458 * src/reader.c (packsymbols): Use a temporary obstack for
2459 `%%tokendef', since output_stack is already used elsewhere.
2461 2001-10-02 Akim Demaille <akim@epita.fr>
2465 2001-10-02 Akim Demaille <akim@epita.fr>
2469 2001-10-02 Akim Demaille <akim@epita.fr>
2471 * tests/regression.at (Invalid CPP headers): New.
2472 From Alexander Belopolsky.
2473 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2475 2001-10-02 Akim Demaille <akim@epita.fr>
2477 * tests/regression.at (Invalid input): New.
2478 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2481 2001-10-02 Akim Demaille <akim@epita.fr>
2483 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2485 2001-10-02 Akim Demaille <akim@epita.fr>
2487 * src/output.c (output_parser): Assert `skeleton'.
2488 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2492 2001-10-01 Marc Autret <autret_m@epita.fr>
2494 * src/lex.h: Echo modifications.
2495 * src/lex.c (unlex): Parameter is now token_t.
2498 2001-10-01 Marc Autret <autret_m@epita.fr>
2500 * src/main.c: Include lex.h.
2503 2001-09-29 Akim Demaille <akim@epita.fr>
2505 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2507 2001-09-28 Akim Demaille <akim@epita.fr>
2509 * tests/testsuite.at: Update to newer Autotest.
2510 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2512 2001-09-27 Akim Demaille <akim@epita.fr>
2514 Position independent wrapper.
2516 * tests/bison: Remove.
2517 * tests/bison.in: New.
2518 * configure.in: Adjust.
2520 2001-09-27 Paul Eggert <eggert@twinsun.com>
2522 Port quotearg fixes from tar 1.13.24.
2524 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2526 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2527 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2529 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2530 * m4/mbrtowc.m4: New file.
2531 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2532 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2534 2001-09-27 Akim Demaille <akim@epita.fr>
2538 2001-09-27 Akim Demaille <akim@epita.fr>
2542 2001-09-25 Akim Demaille <akim@epita.fr>
2544 * src/system.h: Include `xalloc.h'.
2545 Remove it from the C files.
2546 * src/files.c (output_files): Free the obstacks.
2547 * src/lex.c (init_lex): Rename as...
2550 * src/main.c (main): Use it.
2552 2001-09-24 Marc Autret <autret_m@epita.fr>
2554 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2555 to output informations in fout (FILE*).
2556 (open_graph, close_graph): Likewise.
2557 (output_graph, output_edge, output_node): Likewise.
2558 * src/vcg.h: Update function prototypes.
2559 * src/print_graph.c (print_graph): Open output graph file.
2560 (print_actions): Adjust.
2561 * src/files.h: Remove extern declaration.
2562 * src/files.c: Remove graph_obstack declaration.
2563 (open_files): Remove graph_obstack initialization.
2564 (output_files): Remove graph_obstack saving.
2566 2001-09-24 Marc Autret <autret_m@epita.fr>
2568 * src/files.c (compute_output_file_names): Fix.
2570 2001-09-24 Marc Autret <autret_m@epita.fr>,
2571 Akim Demaille <akim@epita.fr>
2573 * src/reader.c (reader): Remove call to free_symtab ().
2574 * src/main.c (main): Call it here.
2576 * src/conflicts.c (initialize_conflicts): Rename as...
2577 (solve_conflicts): this.
2578 * src/print.c (print_core, print_actions, print_state)
2579 (print_grammar): Dump to a file instead a `output_obstack'.
2580 (print_results): Dump `output_obstack', and then proceed with the
2582 * src/files.c (compute_output_file_names, close_files): New.
2583 (output_files): Adjust.
2584 * src/main.c (main): Adjust.
2586 2001-09-23 Marc Autret <autret_m@epita.fr>
2588 * src/files.c (compute_header_macro): Computes header macro name
2589 from spec_defines_file when given.
2591 2001-09-23 Marc Autret <autret_m@epita.fr>
2593 * src/files.c (output_files): Add default extensions.
2595 2001-09-22 Akim Demaille <akim@epita.fr>
2597 * src/conflicts.c (finalize_conflicts): Rename as...
2598 (free_conflicts): this.
2600 2001-09-22 Akim Demaille <akim@epita.fr>
2602 * src/gram.c (gram_free): Rename back as...
2604 (output_token_translations): Free `token_translations'.
2605 * src/symtab.c (free_symtab): Free the tag field.
2607 2001-09-22 Akim Demaille <akim@epita.fr>
2609 Remove `translations' as it is always set to true.
2611 * src/gram.h: Adjust.
2612 * src/reader.c (packsymbols, parse_token_decl): Adjust
2613 * src/print.c (print_grammar): Adjust.
2614 * src/output.c (output_token_translations): Adjust.
2615 * src/lex.c (lex): Adjust.
2616 * src/gram.c: Be sure the set pointers to NULL.
2617 (dummy): Rename as...
2620 2001-09-22 Akim Demaille <akim@epita.fr>
2622 * configure.in: Invoke AM_LIB_DMALLOC.
2623 * src/system.h: Use dmalloc.
2624 * src/LR0.c: Be sure to have pointers initialized to NULL.
2625 (allocate_itemsets): Allocate kernel_items only if needed.
2627 2001-09-22 Akim Demaille <akim@epita.fr>
2629 * configure.in: Bump to 1.29b.
2630 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2631 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2632 need xmalloc.c in calc.y.
2635 2001-09-21 Akim Demaille <akim@epita.fr>
2638 * Makefile.maint, config/config.guess, config/config.sub,
2639 * config/missing: Update from masters.
2640 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2642 * configure.in (ALL_LINGUAS): Add `tr'.
2644 2001-09-21 Akim Demaille <akim@epita.fr>
2646 * tests/Makefile.am (package.m4): Move to...
2647 ($(srcdir)/$(TESTSUITE)): here.
2649 2001-09-20 Akim Demaille <akim@epita.fr>
2651 * src/complain.c: No longer try to be standalone: use system.h.
2652 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2653 * src/complain.h: Likewise.
2654 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2655 Remove the unused variable `n'.
2656 From Albert Chin-A-Young.
2658 2001-09-18 Marc Autret <autret_m@epita.fr>
2660 * doc/bison.1: Update.
2661 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2663 (Option Cross Key): Update.
2666 2001-09-18 Marc Autret <autret_m@epita.fr>
2668 * tests/regression.at: New test (comment in %union).
2670 2001-09-18 Marc Autret <autret_m@epita.fr>
2672 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2674 Reported by Keith Browne.
2676 2001-09-18 Marc Autret <autret_m@epita.fr>
2678 * tests/output.at: Add tests for --defines and --graph.
2680 2001-09-18 Marc Autret <autret_m@epita.fr>
2682 * tests/output.at: Removes tests of %{header,src}_extension features.
2684 2001-09-18 Akim Demaille <akim@epita.fr>
2686 * tests/Makefile.am (package.m4): New.
2687 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2688 (_AT_CHECK_CALC_ERROR): Likewise.
2689 Factor the `, ' part of verbose error messages.
2691 2001-09-18 Marc Autret <autret_m@epita.fr>
2693 * src/getargs.c (longopts): Declare --defines and --graph as options
2694 with optional arguments.
2695 * src/files.h: Add extern declarations.
2696 * src/files.c (spec_graph_file, spec_defines_file): New.
2697 (output_files): Update.
2698 Remove CPP-outed code.
2700 2001-09-18 Marc Autret <autret_m@epita.fr>
2702 Turn off %{source,header}_extension feature.
2704 * src/files.c (compute_exts_from_gf): Update.
2705 (compute_exts_from_src): Update.
2706 (output_files): CPP-out useless code.
2707 * src/files.h: Remove {header,source}_extension extern declarations.
2708 * src/reader.c (parse_dquoted_param): CPP-out.
2709 (parse_header_extension_decl): Remove.
2710 (parse_source_extension_decl): Remove.
2711 (read_declarations): Remove cases tok_{hdrext,srcext}.
2712 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2713 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2715 2001-09-10 Akim Demaille <akim@epita.fr>
2717 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2718 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2719 (AT_CHECK_OUTPUT): this.
2720 Merely check ls' exit status, its output is useless.
2722 2001-09-10 Akim Demaille <akim@epita.fr>
2724 * tests/calc.at: Use m4_match.
2725 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2727 2001-09-10 Marc Autret <autret_m@epita.fr>,
2728 Akim Demaille <akim@epita.fr>
2730 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2732 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2734 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2735 * src/lex.h: Adjust prototype.
2736 (token_t): Add `tok_undef'.
2737 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2738 (parse_percent_token): Now returns token_t.
2739 Add default statement in switch.
2740 (lex): Separate `c' as an input variable, from the token_t result
2742 (unlexed): Is a token_t.
2744 2001-09-10 Akim Demaille <akim@epita.fr>
2746 * configure.in: Bump to 1.29a.
2748 2001-09-07 Akim Demaille <akim@epita.fr>
2752 2001-08-30 Akim Demaille <akim@epita.fr>
2754 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
2755 * m4/atconfig.m4: Remove.
2756 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
2758 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
2759 m4_if, m4_patsubst, and m4_regexp.
2760 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
2761 `input' file instead of echo.
2763 2001-08-29 Akim Demaille <akim@epita.fr>
2767 2001-08-29 Akim Demaille <akim@epita.fr>
2771 2001-08-29 Paul Eggert <eggert@twinsun.com>
2773 * src/bison.simple (yyparse): Don't take the address of an
2774 item before the start of an array, as that doesn't conform to
2777 2001-08-29 Robert Anisko <anisko_r@epita.fr>
2779 * doc/bison.texinfo (Location Tracking Calc): New node.
2781 2001-08-29 Paul Eggert <eggert@twinsun.com>
2783 * src/output.c (output): Do not define const, as this now
2784 causes more problems than it cures.
2786 2001-08-29 Akim Demaille <akim@epita.fr>
2788 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
2790 Be sure to tag the `detailmenu'.
2792 2001-08-29 Akim Demaille <akim@epita.fr>
2794 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
2795 download in a tmp dir.
2797 2001-08-28 Marc Autret <autret_m@epita.fr>
2799 * config/depcomp: New file.
2801 2001-08-28 Marc Autret <autret_m@epita.fr>
2803 * doc/bison.1 (mandoc): Adjust.
2804 From Juan Manuel Guerrero.
2806 2001-08-28 Marc Autret <autret_m@epita.fr>
2808 * src/print_graph.c (print_state): Fix.
2810 2001-08-27 Marc Autret <autret_m@epita.fr>
2812 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
2814 Echo modifications to the functions prototypes.
2815 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
2817 2001-08-27 Marc Autret <autret_m@epita.fr>
2819 * src/vcg.c: Include `xalloc.h'.
2820 (add_colorentry): New.
2821 (add_classname): New.
2822 (add_infoname): New.
2823 * src/vcg.h: Add new prototypes.
2825 2001-08-27 Akim Demaille <akim@epita.fr>
2827 * Makefile.maint: Sync. again with CVS Autoconf.
2829 2001-08-27 Akim Demaille <akim@epita.fr>
2831 * Makefile.maint: Formatting changes.
2832 (po-update, cvs-update, update): New targets.
2835 2001-08-27 Akim Demaille <akim@epita.fr>
2837 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2838 * Makefile.maint: Sync. with CVS Autoconf.
2840 2001-08-27 Marc Autret <autret_m@epita.fr>
2842 * src/vcg.h (struct infoname_s): New.
2843 (struct colorentry_s): New.
2844 (graph_s): New fields {vertical,horizontal}_order in structure.
2845 Add `infoname' field.
2846 Add `colorentry' field;
2847 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
2848 (G_HORIZONTAL_ORDER): New.
2850 (G_COLORENTRY): New.
2851 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
2852 Add output of `infoname'.
2853 Add output of `colorentry'.
2855 2001-08-27 Marc Autret <autret_m@epita.fr>
2857 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
2858 This one shadowed a global parameter.
2860 2001-08-24 Marc Autret <autret_m@epita.fr>
2862 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
2863 instead of `unsigned'.
2864 (print_state): Do not call obstack_object_size () in obstack_grow ()
2865 to avoid macro variables shadowing.
2867 2001-08-23 Marc Autret <autret_m@epita.fr>
2869 * src/lex.c (percent_table): Typo: s/naem/name/.
2871 Normalize new options declarations.
2873 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
2875 * tests/suite.at: Exercise %header_extension and %source_extension.
2877 2001-08-16 Marc Autret <autret_m@epita.fr>
2879 * src/reader.c (parse_dquoted_param): New.
2880 (parse_header_extension_decl): Use it.
2881 (parse_source_extension_decl): Likewise.
2883 2001-08-16 Marc Autret <autret_m@epita.fr>
2885 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
2886 (get_xxxx_str): Use assert () instead of complain ().
2887 Remove return invokations in default cases.
2888 (get_decision_str): Modify default behaviour. Remove second argument.
2889 Echo modifications on calls.
2890 (output_graph): Fix.
2892 2001-08-16 Marc Autret <autret_m@epita.fr>
2894 * src/getargs.c (usage): Update with ``-g, --graph''.
2896 2001-08-16 Marc Autret <autret_m@epita.fr>
2898 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
2899 (Option Cross Key): Likewise.
2900 * doc/bison.1: Update.
2902 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
2904 * src/output.c (output_master_parser): Don't finish action_obstack.
2905 (output_parser): Don't care about the muscle action, here.
2906 (prepare): Copy the action_obstack in the action muscle.
2907 (output): Free action_obstack.
2909 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2911 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
2912 will contain `%union' declaration.
2913 (parse_union_decl): Delete #line directive output.
2914 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
2915 informations about %union.
2916 (parse_union_decl): Copy the union_obstack in the muscle stype.
2917 * src/bison.simple: Add new #line directive.
2918 Add typdef %%stype YYSTYPE.
2920 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2922 * src/bison.simple: Add new `#line' directive.
2924 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
2926 * src/bison.simple: New `#line' directive.
2927 * src/output.c (output_parser): Support new dynamic muscle input_line.
2929 2001-09-22 Marc Autret <autret_m@epita.fr>
2931 * src/output.c (output_master_parser): New.
2932 (output_parser): Be more re-entrant.
2934 2001-09-21 Marc Autret <autret_m@epita.fr>
2936 * src/reader.c (copy_definition, parse_union_decl): Update and use
2938 (copy_action): Likewise.
2939 Use obstack_1grow ().
2940 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
2942 2001-09-21 Marc Autret <autret_m@epita.fr>
2944 * src/options.c (option_table): Adjust.
2945 * src/lex.c (parse_percent_token): Fix.
2947 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2949 * src/options.c (symtab.h): Include it, need by lex.h.
2951 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2953 * src/lex.c (parse_percent_token): Change type of variable `tx', which
2954 is now an option_table_struct*.
2955 (option_strcmp): New function option_strcmp.
2956 (parse_percent_token): Call option_strcmp.
2957 * src/getargs.c (xalloc.h, options.h): Include it.
2958 (getargs): Call create_long_option_table.
2959 (getargs): Free longopts at the end of the function.
2960 (shortopts): Move in options.c.
2961 * src/options.c (create_long_option_table): New function. Convert
2962 information from option_table to option structure.
2963 * src/reader.c (options.h): Include it.
2965 * src/Makefile.am: Adjust.
2966 * src/options.c (option_table): Create from longopts and percent_table.
2967 * src/getargs.c (longopts): Delete.
2968 * src/lex.c (struct percent_table_struct): Delete.
2969 (percent_table): Delete.
2970 (options.h): Include it.
2971 * src/options.c: Create.
2972 * src/options.h: Create.
2973 Declare enum opt_access_e.
2974 Define struct option_table_struct.
2976 2001-09-20 Marc Autret <autret_m@epita.fr>
2978 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
2981 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
2983 * src/bison.simple: s/%%filename/%%skeleton.
2984 * src/muscle_tab.c (getargs.h): Include it.
2985 (muscle_init): Insert new muscle skeleton.
2987 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
2989 * src/output.c (output_parser): Delete unused variable actions_dumped.
2991 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
2993 * src/output.c (output): Delete call to reader_output_yylsp.
2994 * src/reader.c (reader): Likewise.
2995 * src/reader.h: Delete declaration of reader_output_yylsp.
2997 2001-09-02 Marc Autret <autret_m@epita.fr>
2999 * src/reader.c: Include muscle_tab.h.
3000 (parse_union_decl): Update.
3001 (parse_macro_decl): Rename parse_muscle_decl.
3002 Update to use renamed functions and variable.
3003 (read_declarations, copy_action, read_additionnal_code, : Updated
3004 with correct variables and functions names.
3005 (packsymbols, reader): Likewise.
3007 * src/reader.h (muscle_obstack): Extern declaration update.
3009 * src/output.c: Include muscle_tab.h
3010 In all functions using macro_insert, change by using muscle_insert ().
3011 (macro_obstack): Rename muscle_obstack.
3012 Echo modifications in the whole file.
3013 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3014 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3015 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3017 * src/muscle_tab.h: Update double inclusion macros.
3018 (macro_entry_s): Rename muscle_entry_s.
3021 * src/muscle_tab.c: Include muscle_tab.h.
3022 Rename macro_tabble to muscle_table.
3023 (mhash1, mhash2, mcmp): Use muscle_entry.
3024 (macro_init): Rename muscle_init. Update.
3025 (macro_insert): Rename muscle_insert. Update.
3026 (macro_find): Rename muscle_find. Update.
3028 * src/main.c: Include muscle_tab.h.
3029 (main): Call muscle_init ().
3030 * src/Makefile.am (bison_SOURCES): Echo modifications.
3032 2001-09-02 Marc Autret <autret_m@epita.fr>
3034 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3036 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3038 2001-09-02 Marc Autret <autret_m@epita.fr>
3040 * src/macrotab.c, src/macrotab.h: Remove.
3042 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3044 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3047 2001-09-01 Marc Autret <autret_m@epita.fr>
3049 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3050 to an explicit value to activate the feature. We do it here.
3052 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3054 * src/output.c (prepare): Delete the `filename' muscule insertion.
3055 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3056 (parse_union_decl): Likewise.
3057 * src/macrotab.c (macro_init): Initialize filename by infile.
3059 2001-08-31 Marc Autret <autret_m@epita.fr>
3061 * src/bison.simple (YYLSP_NEEDED): New definition.
3062 * src/output.c (prepare): Add macro insertion of `locations_flag'
3064 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3066 * src/output.c (prepare): Delete insertion of previous muscles,
3067 and insert the `prefix' muscles.
3068 * src/macrotab.c (macro_init): Likewise.
3069 (macro_init): Initialization prefix directive by `yy'.
3070 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3071 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3072 yylval, yydebug, yyerror, yynerrs and yyparse.
3073 New directive `#define' to substitute yydebug, ... with option
3076 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3078 * src/main.c (main): Standardize.
3079 * src/output.c (output_table_data, output_parser): Likewise.
3080 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3082 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3084 * src/reader.c (read_additionnal_code): Rename %%user_code to
3086 * src/output.c (output): Rename %%declarations to %%prologue.
3087 * src/bison.simple: Echo modifications.
3089 2001-08-31 Marc Autret <autret_m@epita.fr>
3091 * src/reader.c (readgram): CleanUp.
3092 (output_token_defines): Likewise.
3093 (packsymbols): Likewise.
3095 * src/output.c (output): CPP-out useless code.
3097 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3099 * src/reader.c (reader): Delete obsolete call to function
3100 output_trailers and output_headers.
3101 * src/output.h: Remove obsolete functions prototypes of output_headers
3102 and output_trailers.
3104 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3106 * src/main.c: Include macrotab.h.
3107 * src/macrotab.h (macro_entry_s): Constify fields.
3108 Adjust functions prototypes.
3109 * src/macrotab.c (macro_insert): Constify key and value.
3110 (macro_find): Constify key.
3111 (macro_insert): Include 'xalloc.h'
3112 (macro_insert): Use XMALLOC.
3113 (macro_find): Constify return value.
3114 * src/output.c (output_table_data): Rename table to table_data.
3115 (output_parser): Constify macro_key, macro_value.
3117 2001-08-30 Marc Autret <autret_m@epita.fr>
3119 * src/reader.c (parse_skel_decl): New.
3120 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3121 * src/lex.h (token_t): New token `tok_skel'.
3122 * src/lex.c (percent_table): Add skeleton option entry.
3125 2001-08-29 Marc Autret <autret_m@epita.fr>
3127 * src/bison.simple: Add %%user_code directive at the end.
3128 * src/reader.c (read_additionnal_code): New.
3130 * src/output.c (output_program): Remove.
3133 2001-08-28 Marc Autret <autret_m@epita.fr>
3135 * src/output.c (output_actions): Clean up.
3136 (output_gram): CPP-out useless code.
3137 * src/reader.c (reader): Clean up, CPP-out useless code.
3139 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3141 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3143 * src/bison.simple: Add `%%definitions'.
3145 2001-08-28 Marc Autret <autret_m@epita.fr>
3147 * config/depcomp: New file.
3149 2001-08-27 Paul Eggert <eggert@twinsun.com>
3151 * src/bison.simple (yyparse): Don't take the address of an
3152 item before the start of an array, as that doesn't conform to
3155 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3157 * src/output.c (output): Remove the initialization of the macro
3158 obstack. It was done too late here.
3160 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3162 (reader): Initialize the macro obstack here, since we need it to grow
3163 '%define' directives.
3165 * src/reader.h: Declare the macro obstack as extern.
3167 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3169 * src/output.c (output_parser): Fix. Store single '%' characters in
3170 the output obstack instead of throwing them away.
3172 2001-08-27 Akim Demaille <akim@epita.fr>
3174 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3176 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3178 * lib/Makefile.am: Adjust.
3180 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3182 * src/bison.simple: Update and add '%%' directives.
3184 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3186 * src/reader.c (reader): Remove calls to 'output_headers' and
3187 'output_trailers'. Remove some C output.
3188 (readgram): Disable a piece of code that was writing a default
3189 definition for 'YYSTYPE'.
3190 (reader_output_yylsp): Remove.
3191 (packsymbols): Output token defintions to a macro.
3192 (copy_definition): Disable C output.
3194 * src/reader.c (parse_macro_decl): New function used to parse macro
3196 (copy_string2): Put the body of copy_string into this new function.
3197 Add a parameter to let the caller choose whether he wants to copy the
3198 string delimiters or not.
3199 (copy_string): Be a simple call to copy_string2 with the last argument
3201 (read_declarations): Add case for macro definition.
3202 (copy_identifier): New.
3203 (parse_macro_decl): Read macro identifiers using copy_identifier
3206 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3208 * src/output.c (prepare): Add prefixed names.
3209 (output_parser): Output semantic actions.
3210 (output_parser): Fix bug on '%%line' directives.
3212 * src/output.c (output_headers): Remove. The C code printed by this
3213 function should now be in the skeletons.
3214 (output_trailers): Remove.
3215 (output): Disable call to 'reader_output_yylsp'.
3216 (output_rule_data): Do not output tables to the table obstack.
3218 * src/output.c: Remove some C dedicated output.
3219 Improve the use of macro and output obstacks.
3220 (output_defines): Remove.
3222 * src/output.c (output_token_translations): Associate 'translate'
3223 table with a macro. No output to the table obstack.
3224 (output_gram): Same for 'rhs' and 'prhs'.
3225 (output_stos): Same for 'stos'.
3226 (output_rule_data): Same for 'r1' and 'r2'.
3227 (token_actions): Same for 'defact'.
3228 (goto_actions): Same for 'defgoto'.
3229 (output_base): Same for 'pact' and 'pgoto'.
3230 (output_table): Same for 'table'.
3231 (output_check): Same for 'check'.
3233 * src/output.c (output_table_data): New function.
3234 (output_short_table): Remove.
3235 (output_short_or_char_table): Remove.
3237 * src/output.c (output_parser): Replace most of the skeleton copy code
3238 with something new. Skeletons are now processed character by character
3239 rather than line by line, and Bison looks for '%%' macros. This is the
3240 first step in making Bison's output process (a lot) more flexible.
3241 (output_parser): Use the macro table.
3243 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3245 * src/main.c (main): Initialize the macro table.
3247 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3249 * src/lex.c (percent_table): Add tok_define.
3250 * src/lex.h: Add tok_define.
3252 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3254 * src/macrotab.c: New file.
3255 * src/macrotab.h: New file.
3256 * src/Makefile.am: Update.
3258 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3260 * lib/hash.c: New file.
3261 * lib/hash.h: New file.
3262 * lib/Makefile.am: Update.
3264 2001-08-15 Akim Demaille <akim@epita.fr>
3268 2001-08-15 Marc Autret <autret_m@epita.fr>
3270 * src/reader.c (readgram): Indent output macro YYSTYPE.
3271 (packsymbols): Likewise.
3272 (output_token_defines): Likewise.
3273 * src/files.c: Standardize.
3274 (compute_header_macro): New.
3275 (defines_obstack_save): New. Use compute_header_macro.
3276 (output_files): Update. Use defines_obstack_save.
3278 2001-08-15 Akim Demaille <akim@epita.fr>
3280 * doc/bison.texinfo (Table of Symbols): Document
3283 2001-08-15 Akim Demaille <akim@epita.fr>
3285 * missing: Update from CVS Automake.
3286 * config/config.guess, config/config.sub, config/texinfo.tex:
3287 Update from gnu.org.
3289 2001-08-15 Akim Demaille <akim@epita.fr>
3291 * Makefile.maint: Sync with CVS Autoconf.
3293 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3295 * doc/bison.texinfo: Include GNU Free Documentation License from
3297 * doc/fdl.texi: Add to package.
3299 2001-08-14 Marc Autret <autret_m@epita.fr>
3301 Turn on %{source,header}_extension features.
3303 * src/lex.c (percent_table): Un-CPP out header_extension and
3305 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3306 (compute_exts_from_src): Remove conditions. It restores priorities
3309 2001-08-14 Marc Autret <autret_m@epita.fr>
3311 * src/files.c (compute_base_names): Add extensions computing when
3312 `--file-prefix' used.
3313 Standardize function calls.
3315 2001-08-13 Marc Autret <autret_m@epita.fr>
3317 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3318 defining it (defined but null disables alloca).
3320 2001-08-13 Marc Autret <autret_m@epita.fr>
3322 * src/bison.simple (_yy_memcpy): CPP reformat.
3324 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3326 * tests/atconfig.in (CPPFLAGS): Fix.
3328 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3330 * doc/bison.texinfo: Include GNU General Public License from
3332 * doc/gpl.texi: Add to package.
3334 2001-08-10 Marc Autret <autret_m@epita.fr>
3336 * src/print_graph.h: Fix.
3337 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3339 2001-08-10 Akim Demaille <akim@epita.fr>
3341 * src/system.h: Provide default declarations for stpcpy, strndup,
3344 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3346 * doc/bison.texinfo (Locations): Update @$ stuff.
3348 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3350 * src/bison.simple (YYLLOC_DEFAULT): Update.
3353 2001-08-08 Marc Autret <autret_m@epita.fr>
3355 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3356 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3357 Reported by Fabrice Bauzac.
3359 2001-08-08 Marc Autret <autret_m@epita.fr>
3361 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3362 * src/vcg.c (output_node): Fix.
3363 * src/vcg.h: Cleanup.
3364 * src/print_graph.c: Add comments.
3365 (node_output_size): New global variable. Simplify the formatting of
3366 the VCG graph output.
3367 (print_actions): Unused code is now used. It notifies the final state
3368 and no action states in the VCG graph. It also give the reduce actions.
3369 The `shift and goto' edges are red and the `go to state' edges are
3371 Get the current node name and node_obstack by argument.
3372 (node_obstack): New variable.
3373 (print_state): Manage node_obstack.
3374 (print_core): Use node_obstack given by argument.
3375 A node is not only computed here but in print_actions also.
3376 (print_graph): CPP out useless code instead of commenting it.
3378 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3380 * tests/atconfig.in (CPPFLAGS): Fix.
3382 2001-08-07 Akim Demaille <akim@epita.fr>
3384 * src/print_graph.c (quote): New.
3385 (print_core): Use it.
3387 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3389 * src/vcg.c (complain.h): Include it.
3390 Unepitaize `return' invocations.
3391 [NDEBUG] (main): Remove.
3392 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3393 * src/files.c (open_files): Initialize graph_obstack.
3394 * src/print_graph.c (print_actions): CPP out useless code.
3395 (print_core): Don't output the last `\n' in labels.
3397 * src/files.c (output_files): Output the VCG file.
3398 * src/main.c (main): Invoke print_graph ();
3400 2001-08-06 Marc Autret <autret_m@epita.fr>
3402 Automaton VCG graph output.
3403 Using option ``-g'' or long option ``--graph'', you can generate
3404 a gram_filename.vcg file containing a VCG description of the LALR (1)
3405 automaton of your grammar.
3407 * src/main.c: Call to print_graph() function.
3408 * src/getargs.h: Update.
3409 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3410 (graph_flag): New flag.
3412 (getargs): Add case `g'.
3413 * src/files.c (graph_obstack): New obstack struct.
3414 (open_files): Initialize new obstack.
3415 (output_files): Saves graph_obstack if required.
3416 * src/files.h (graph_obstack): New extern declaration.
3417 * src/Makefile.am: Add new source files.
3419 2001-08-06 Marc Autret <autret_m@epita.fr>
3421 * src/print_graph.c, src/print_graph.h (graph): New.
3422 * src/vcg.h: New file.
3423 * src/vcg.c: New file, VCG graph handling.
3425 2001-08-06 Marc Autret <autret_m@epita.fr>
3427 Add of %source_extension and %header_extension which specify
3428 the source or/and the header output file extension.
3430 * src/files.c (compute_base_names): Remove initialisation of
3431 src_extension and header_extension.
3432 (compute_exts_from_gf): Update.
3433 (compute_exts_from_src): Update.
3434 (output_files): Update.
3435 * src/reader.c (parse_header_extension_decl): New.
3436 (parse_source_extension_decl): New.
3437 (read_declarations): New case statements for the new tokens.
3438 * src/lex.c (percent_table): Add entries for %source_extension
3439 and %header_extension.
3440 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3442 2001-08-06 Marc Autret <autret_m@epita.fr>
3444 * configure.in: Bump to 1.28c.
3445 * doc/bison.texinfo: Texinfo thingies.
3447 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3449 * tests/atconfig.in (CPPFLAGS): Add.
3450 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3452 2001-08-03 Akim Demaille <akim@epita.fr>
3456 2001-08-03 Akim Demaille <akim@epita.fr>
3458 * tests/Makefile.am (check-local): Ship testsuite.
3459 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3462 2001-08-03 Akim Demaille <akim@epita.fr>
3464 * configure.in: Try using -Wformat when compiling.
3466 2001-08-03 Akim Demaille <akim@epita.fr>
3468 * configure.in: Bump to 1.28b.
3470 2001-08-03 Akim Demaille <akim@epita.fr>
3472 * src/complain.c: Adjust strerror_r portability issues.
3474 2001-08-03 Akim Demaille <akim@epita.fr>
3478 2001-08-03 Akim Demaille <akim@epita.fr>
3480 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3481 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3482 * src/getargs.c: Include complain.h.
3483 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3484 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3486 2001-08-03 Akim Demaille <akim@epita.fr>
3488 * src/reader.c (readgram): Display hidden chars in error messages.
3490 2001-08-03 Akim Demaille <akim@epita.fr>
3492 Update to gettext 0.10.39.
3494 2001-08-03 Akim Demaille <akim@epita.fr>
3496 * lib/strspn.c: New.
3498 2001-08-01 Marc Autret <autret_m@epita.fr>
3500 * doc/bison.texinfo: Update.
3501 * doc/bison.1 (mandoc): Update.
3502 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3503 * src/files.c: Support output files extensions computing.
3504 (src_extension): New static variable.
3505 (header_extension): New static variable.
3507 (get_extension_index): New function, gets the index of an extension
3508 filename in a string.
3509 (compute_exts_from_gf): New function, computes extensions from the
3510 grammar file extension.
3511 (compute_exts_from_src): New functions, computes extensions from the
3512 C source file extension, file given by ``-o'' option.
3513 (compute_base_names): Update.
3514 (output_files): Update.
3516 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3518 * doc/bison.texi: Document @$.
3519 (Locations): New section.
3521 2001-07-18 Akim Demaille <akim@epita.fr>
3523 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3524 * config/prev-version.txt, config/move-if-change: New.
3525 * Makefile.am: Adjust.
3527 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3529 * src/bison.simple (yyparse): Suppress warning `comparaison
3530 between signed and unsigned'.
3532 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3534 * src/getargs.h (raw_flag): Remove.
3535 * src/getargs.c: Die on `-r'/`--raw'.
3536 * src/lex.c (parse_percent_token): Die on `%raw'.
3537 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3538 * tests/calc.at: Suppress test with option `--raw'.
3540 2001-07-14 Akim Demaille <akim@epita.fr>
3543 * configure.in: Require Autoconf 2.50.
3544 Update to gettext 0.10.38.
3546 2001-03-16 Akim Demaille <akim@epita.fr>
3548 * doc/bison.texinfo: ANSIfy the examples.
3550 2001-03-16 Akim Demaille <akim@epita.fr>
3552 * getargs.c (skeleton): New variable.
3553 (longopts): --skeleton is a new option.
3554 (shortopts, getargs): -S is a new option.
3555 * getargs.h: Declare skeleton.
3556 * output.c (output_parser): Use it.
3558 2001-03-16 Akim Demaille <akim@epita.fr>
3560 * m4/strerror_r.m4: New.
3561 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3562 * lib/error.h, lib/error.c: Update.
3564 2001-03-16 Akim Demaille <akim@epita.fr>
3566 * src/getargs.c (longopts): Clean up.
3568 2001-02-21 Akim Demaille <akim@epita.fr>
3570 * src/reader.c (gensym): `gensym_count' is your own.
3571 Use a static buf to create the symbol name, as token_buffer is no
3574 2001-02-08 Akim Demaille <akim@epita.fr>
3576 * src/conflicts.c (conflict_report): Be sure not to append to res
3577 between two calls, which could happen if both first sprintf were
3578 skipped, but not the first cp += strlen.
3580 2001-02-08 Akim Demaille <akim@epita.fr>
3582 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3583 New, from fileutils 4.0.37.
3584 * configure.in: Require Autoconf 2.49c. I took some time before
3585 making this decision. This is the only way out for portability
3586 issues in Bison, it would mean way too much duplicate effort to
3587 import in Bison features implemented in 2.49c since 2.13.
3588 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3590 2001-02-02 Akim Demaille <akim@epita.fr>
3592 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3593 * lib/xalloc.h, lib/xmalloc.c: Update.
3595 2001-01-19 Akim Demaille <akim@epita.fr>
3597 Get rid of the ad hoc handling of token_buffer in the scanner: use
3600 * src/lex.c (token_obstack): New.
3601 (init_lex): Initialize it. No longer call...
3602 (grow_token_buffer): this. Remove it.
3603 Adjust all the places which used it to use the obstack.
3605 2001-01-19 Akim Demaille <akim@epita.fr>
3607 * src/lex.h: Rename all the tokens:
3608 s/\bENDFILE\b/tok_eof/g;
3609 s/\bIDENTIFIER\b/tok_identifier/g;
3611 Let them be enums, not #define, to ease debugging.
3612 Adjust all the code.
3614 2001-01-18 Akim Demaille <akim@epita.fr>
3616 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3617 * src/lex.c (maxtoken, grow_token_buffer): Static.
3619 2001-01-18 Akim Demaille <akim@epita.fr>
3621 Since we now use obstacks, more % directives can be enabled.
3623 * src/lex.c (percent_table): Also accept `%yacc',
3624 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3626 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3627 instead of returning a token.
3628 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3629 * src/reader.c (read_declarations): Adjust.
3630 * src/files.c (open_files): Don't call `compute_base_names', don't
3631 compute `attrsfile' since they depend upon data which might be
3632 *in* the input file now.
3633 (output_files): Do it here.
3634 * src/output.c (output_headers): Document the fact that this patch
3635 introduces a guaranteed SEGV for semantic parsers.
3636 * doc/bison.texinfo: Document them.
3637 * tests/suite.at: Exercise these %options.
3639 2000-12-20 Akim Demaille <akim@epita.fr>
3641 Also handle the output file (--verbose) with obstacks.
3643 * files.c (foutput): Remove.
3644 (output_obstack): New.
3645 Adjust all dependencies.
3646 * src/conflicts.c: Return a string.
3647 * src/system.h (obstack_grow_string): Rename as...
3648 (obstack_sgrow): this. Be ready to work with non literals.
3649 (obstack_fgrow4): New.
3651 2000-12-20 Akim Demaille <akim@epita.fr>
3653 * src/files.c (open_files): Fix the computation of short_base_name
3654 in the case of `-o foo.tab.c'.
3656 2000-12-20 Akim Demaille <akim@epita.fr>
3658 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3659 (copy_dollar): Now that everything uses obstacks, get rid of the
3662 2000-12-20 Akim Demaille <akim@epita.fr>
3664 * src/files.c (open_files): Actually the `.output' file is based
3665 on the short_base_name, not base_name.
3666 * tests/suite.at (Checking output file names): Adjust.
3668 2000-12-20 Akim Demaille <akim@epita.fr>
3670 * src/bison.s1: Remove, we now use directly...
3671 * src/bison.simple: this.
3672 * src/Makefile.am: Use pkgdata instead of data.
3674 2000-12-20 Akim Demaille <akim@epita.fr>
3676 * src/files.c (guard_obstack): New.
3677 (open_files): Initialize it.
3678 (output_files): Dump it...
3679 * src/files.h: Export it.
3680 * src/reader.c (copy_guard): Use it.
3682 2000-12-19 Akim Demaille <akim@epita.fr>
3684 * src/files.c (outfile, defsfile, actfile): Removed as global
3686 (open_files): Don't compute them.
3687 (output_files): Adjust.
3688 (base_name, short_base_name): Be global.
3689 Adjust dependencies.
3691 2000-12-19 Akim Demaille <akim@epita.fr>
3693 * src/files.c (strsuffix): New.
3694 (stringappend): Be just like strcat but allocate.
3695 (base_names): Eve out from open_files.
3696 Try to simplify the rather hairy computation of base_name and
3698 (open_files): Use it.
3699 * tests/suite.at (Checking output file names): New test.
3701 2000-12-19 Akim Demaille <akim@epita.fr>
3703 * src/system.h (obstack_grow_literal_string): Rename as...
3704 (obstack_grow_string): this.
3705 * src/output.c (output_parser): Recognize `%% actions' instead of
3707 * src/bison.s1: s/$/%% actions/.
3708 * src/bison.hairy: Likewise.
3710 2000-12-19 Akim Demaille <akim@epita.fr>
3712 * src/output.c (output_parser): Compute the `#line' lines when
3714 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3715 Suggested by Hans Aberg.
3717 2000-12-19 Akim Demaille <akim@epita.fr>
3719 Let the handling of the skeleton files be local to the procedures
3722 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3724 (fparser, open_extra_files): Remove.
3725 (open_files, output_files): Don't take care of fparser.
3726 * src/files.h: Adjust.
3727 * src/output.c (output_parser): Open and close the file to the
3729 * src/reader.c (read_declarations): When %semantic_parser, open
3732 2000-12-19 Akim Demaille <akim@epita.fr>
3734 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3735 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3737 2000-12-19 Akim Demaille <akim@epita.fr>
3739 * src/files.c (open_files): Yipee! We no longer need all the code
3740 looking for `/tmp' since we have no tmp file.
3742 2000-12-19 Akim Demaille <akim@epita.fr>
3744 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
3746 * src/files.c (open_files): Less dependency on MSDOS etc.
3748 2000-12-14 Akim Demaille <akim@epita.fr>
3750 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
3751 Provide a default definition.
3752 Use it when executing the default @ action.
3753 * src/reader.c (reader_output_yylsp): No longer include
3754 `timestamp' and `text' in the default YYLTYPE.
3756 2000-12-12 Akim Demaille <akim@epita.fr>
3758 * src/reader.c (copy_definition, parse_union_decl, copy_action)
3759 (copy_guard): Quote the file names.
3760 Reported by Laurent Mascherpa.
3762 2000-12-12 Akim Demaille <akim@epita.fr>
3764 * src/output.c (output_headers, output_program, output): Be sure
3765 to escape special characters when outputting filenames.
3766 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
3767 (output_headers): Don't depend on them, Use ACTSTR.
3769 2000-11-17 Akim Demaille <akim@epita.fr>
3771 * lib/obstack.h: Formatting changes.
3772 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
3773 prevents type checking.
3774 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3775 cast the value to (void *): assigning a `foo *' to a `void *'
3777 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3778 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
3781 2000-11-17 Akim Demaille <akim@epita.fr>
3783 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
3785 (suite.m4, regression.m4, calc.m4): these.
3786 * tests/atgeneral.m4: Update from CVS Autoconf.
3788 2000-11-17 Akim Demaille <akim@epita.fr>
3790 * tests/regression.m4 (%union and --defines): New test,
3791 demonstrating a current bug in the obstack implementation.
3793 2000-11-17 Akim Demaille <akim@epita.fr>
3795 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
3797 Use them to declare the variables which are global or local to
3800 2000-11-17 Akim Demaille <akim@epita.fr>
3802 * acconfig.h: Remove, no longer used.
3804 2000-11-07 Akim Demaille <akim@epita.fr>
3806 * src: s/Copyright (C)/Copyright/g.
3808 2000-11-07 Akim Demaille <akim@epita.fr>
3810 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
3812 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
3814 2000-11-07 Akim Demaille <akim@epita.fr>
3816 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
3817 Merge in a single CPP if/else.
3819 2000-11-07 Akim Demaille <akim@epita.fr>
3821 * src/output.c (output): Remove useless variables.
3822 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
3823 argument `data' for consistency with the prototypes.
3825 (obstack_copy, obstack_copy0): Rename the second argument as
3826 `address' for consistency. Qualify it `const'.
3827 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
3828 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
3829 `const' their input argument (`data' or `address').
3830 Adjust the corresponding macros to include `const' in casts.
3832 2000-11-03 Akim Demaille <akim@epita.fr>
3834 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
3835 s/PFILE1/BISON_HAIRY/.
3836 Adjust dependencies.
3838 2000-11-03 Akim Demaille <akim@epita.fr>
3840 For some reason, this was not applied.
3842 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3843 `unlink': it's no longer used.
3845 2000-11-03 Akim Demaille <akim@epita.fr>
3847 * src/files.c (skeleton_find): New function, eved out of...
3848 (open_files, open_extra_files): here.
3850 2000-11-03 Akim Demaille <akim@epita.fr>
3854 * src/files.c (obstack_save): New function.
3855 (done): Rename as...
3856 (output_files): this.
3858 * src/main.c (main): Don't use `atexit' to register `done', since
3859 it no longer has to remove tmp files, just call `output_files'
3860 when there are no errors.
3862 2000-11-02 Akim Demaille <akim@epita.fr>
3864 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3865 `unlink': it's no longer used.
3866 * src/files.h: Formatting changes.
3868 2000-11-02 Akim Demaille <akim@epita.fr>
3870 Remove the last uses of mktemp and unlink/delete.
3872 * src/files.c (fdefines, ftable): Removed.
3873 (defines_ostack, table_obstack): New.
3874 Adjust dependencies of the former into uses of the latter.
3875 * src/output.c (output_short_or_char_table, output_short_table):
3876 Convert to using obstacks.
3877 * src/reader.c (copy_comment2): Accept one FILE * and two
3879 (output_token_defines, reader_output_yylsp): Use obstacks.
3880 * src/system.h (obstack_fgrow3): New.
3882 2000-11-01 Akim Demaille <akim@epita.fr>
3884 Change each use of `fattrs' into a use of `attrs_obstack'.
3886 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
3887 * src/files.c (fattrs): Remove.
3888 (attrs_obstack): New.
3889 Adjust all dependencies.
3890 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
3892 2000-11-01 Akim Demaille <akim@epita.fr>
3895 Change each use of `faction' into a use of `action_obstack'.
3897 * lib/obstack.h, lib/obstack.c: New files.
3898 * src/files.c (faction): Remove.
3899 (action_obstack): New.
3900 Adjust all dependencies.
3902 2000-10-20 Akim Demaille <akim@epita.fr>
3904 * lib/quote.h (PARAMS): New macro. Use it.
3906 2000-10-16 Akim Demaille <akim@epita.fr>
3908 * src/output.c (output_short_or_char_table): New function.
3909 (output_short_table, output_token_translations): Use it.
3910 (goto_actions): Use output_short_table.
3912 2000-10-16 Akim Demaille <akim@epita.fr>
3914 * src/symtab.c (bucket_new): New function.
3917 * src/output.c (output_short_table): New argument to display the
3918 comment associated with the table.
3919 Adjust dependencies.
3920 (output_gram): Use it.
3921 (output_rule_data): Nicer output layout for YYTNAME.
3923 2000-10-16 Akim Demaille <akim@epita.fr>
3925 * src/lex.c (read_typename): New function.
3927 * src/reader.c (copy_dollar): Likewise.
3929 2000-10-16 Akim Demaille <akim@epita.fr>
3931 * src/reader.c (copy_comment2): Expect the input stream to be on
3932 the `/' which is suspected to open a comment, instead of being
3933 called after `//' or `/*' was read.
3934 (copy_comment, copy_definition, parse_union_decl, copy_action)
3935 (copy_guard): Adjust.
3937 2000-10-16 Akim Demaille <akim@epita.fr>
3939 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
3940 `read_signed_integer'.
3942 2000-10-16 Akim Demaille <akim@epita.fr>
3944 * src/reader.c (copy_dollar): New function.
3945 (copy_guard, copy_action): Use it.
3947 2000-10-16 Akim Demaille <akim@epita.fr>
3949 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
3950 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
3951 New files, from Fileutils 4.0.27.
3952 * src/main.c (printable_version): Remove.
3953 * src/lex.c, src/reader.c: Use `quote'.
3955 2000-10-04 Akim Demaille <akim@epita.fr>
3957 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
3959 2000-10-04 Akim Demaille <akim@epita.fr>
3961 * doc/bison.texinfo: Various typos spotted by Neil Booth.
3963 2000-10-04 Akim Demaille <akim@epita.fr>
3965 When a literal string is used to define two different tokens,
3966 `bison -v' segfaults.
3967 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
3969 * tests/regression.m4: New file.
3970 Include the core of the sample provided by Piotr Gackiewicz.
3971 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
3974 2000-10-04 Akim Demaille <akim@epita.fr>
3976 * src/reader.c (parse_expect_decl): Keep `count' within the size
3980 2000-10-02 Paul Eggert <eggert@twinsun.com>
3982 * bison.s1 (yyparse): Assign the default value
3983 unconditionally, to avoid a GCC warning and make the parser a
3986 2000-10-02 Akim Demaille <akim@epita.fr>
3988 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
3991 2000-10-02 Akim Demaille <akim@epita.fr>
3993 * src/derives.c, src/print.c, src/reduce.c: To ease the
3994 translation, move some `\n' out of the translated strings.
3996 2000-10-02 Akim Demaille <akim@epita.fr>
3998 The location tracking mechanism is precious for parse error
3999 messages. Nevertheless, it is enabled only when `@n' is used in
4000 the grammar, which is a different issue (you can use it in error
4001 message, but not in the grammar per se). Therefore, there should
4002 be another means to enable it.
4004 * src/getargs.c (getargs): Support `--locations'.
4006 * src/getargs.h (locationsflag): Export it.
4007 * src/lex.c (percent_table): Support `%locations'.
4008 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4009 with `locationsflag'.
4010 * doc/bison.texinfo: Document `--locations' and `%locations'.
4012 * tests/calc.m4: Test it.
4014 For regularity of the names, replace each
4015 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4016 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4017 In addition replace each `flag' with `_flag'.
4019 2000-10-02 Akim Demaille <akim@epita.fr>
4021 Also test parse error messages, including with YYERROR_VERBOSE.
4023 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4025 Use it to check the computations.
4026 Use it to check `nonassoc' is honored.
4027 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4028 `--yyerror-verbose'.
4029 (_AT_CHECK_CALC): Adjust to this option.
4030 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4032 2000-10-02 Akim Demaille <akim@epita.fr>
4034 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4035 the latter demonstrates a flaw in the handling of non debugging
4036 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4037 was used in order to simplify:
4053 unfortunately this leads to a CPP conflict when
4054 `--name-prefix=foo' is used since it produces `#define yydebug
4057 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4058 (YYDPRINTF): New macro.
4060 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4062 Also test `--verbose', `--defines' and `--name-prefix'.
4064 2000-10-02 Akim Demaille <akim@epita.fr>
4066 Improve the readability of the produced parsers.
4068 * src/bison.s1: Formatting changes.
4069 Improve the comment related to the `$' mark.
4070 (yydefault): Don't fall through to `yyresume': `goto' there.
4071 * src/output.c (output_parser): When the `$' is met, skip the end
4073 New variable, `number_of_dollar_signs', to check there's exactly
4074 one `$' in the parser skeleton.
4076 2000-10-02 Akim Demaille <akim@epita.fr>
4078 * lib/xstrdup.c: New file, from the fileutils.
4079 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4080 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4081 instead of strlen + xmalloc + strcpy.
4082 * src/symtab.c (copys): Remove, use xstrdup instead.
4084 2000-10-02 Akim Demaille <akim@epita.fr>
4086 * src/gram.h (associativity): New enum type which replaces the
4087 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4088 `right_assoc', `left_assoc' and `non_assoc'.
4089 Adjust all dependencies.
4090 * src/reader.c: Formatting changes.
4091 (LTYPESTR): Don't define it, use it as a literal in
4092 `reader_output_yylsp'.
4093 * src/symtab.h (symbol_class): New enum type which replaces the
4094 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4095 `sunknown', `stoken and `snterm'.
4097 2000-10-02 Akim Demaille <akim@epita.fr>
4099 * src/getargs.c (fixed_outfiles): Rename as...
4100 (yaccflag): for consistency and accuracy.
4101 Adjust dependencies.
4103 2000-10-02 Akim Demaille <akim@epita.fr>
4105 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4106 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4107 difficult and introduced a lot of core dump. It turns out that
4108 Bison used an implementation of `xmalloc' based on `calloc', and
4109 at various places it does depend upon the initialization to 0. I
4110 have not tried to isolate the pertinent places, and all the former
4111 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4112 someone should address this issue.
4114 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4115 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4117 Adjust dependencies.
4118 * src/warshall.h: New file.
4121 2000-10-02 Akim Demaille <akim@epita.fr>
4123 Various anti-`extern in *.c' changes.
4125 * src/system.h: Include `assert.h'.
4127 2000-10-02 Akim Demaille <akim@epita.fr>
4129 * src/state.h (nstates, final_state, first_state, first_shift)
4130 (first_reduction): Move their exportation from here...
4131 * src/LR0.h: to here.
4132 Adjust dependencies.
4133 * src/getargs.c (statisticsflag): New variable.
4134 Add support for `--statistics'.
4135 Adjust dependencies.
4137 Remove a lot of now useless `extern' statements in most files.
4139 2000-10-02 Akim Demaille <akim@epita.fr>
4141 * src/LR0.h: New file.
4144 2000-10-02 Akim Demaille <akim@epita.fr>
4146 * src/print.h: New file.
4148 * src/print.c: Formatting and ordering changes.
4149 (verbose, terse): Replace with...
4150 (print_results): this new function.
4151 Adjust dependencies.
4153 2000-10-02 Akim Demaille <akim@epita.fr>
4155 * src/conflicts.c (conflict_report): New function.
4156 (conflict_log, verbose_conflict_log): Replace with...
4157 (print_conflicts): this function.
4158 Adjust dependencies.
4159 * src/conflicts.h: New file.
4160 Propagate its inclusion.
4162 2000-10-02 Akim Demaille <akim@epita.fr>
4164 * src/nullable.h: New file.
4165 Propagate its inclusion.
4166 * src/nullable.c: Formatting changes.
4168 2000-10-02 Akim Demaille <akim@epita.fr>
4170 * src/reduce.h: New file.
4171 Propagate its inclusion.
4172 * src/reduce.c: Topological sort and other formatting changes.
4173 (bool, TRUE, FALSE): Move their definition to...
4174 * src/system.h: here.
4176 2000-10-02 Akim Demaille <akim@epita.fr>
4178 * src/files.c: Formatting changes.
4179 (tryopen, tryclose, openfiles): Rename as...
4180 (xfopen, xfclose, open_files): this.
4181 (stringappend): static.
4182 * src/files.h: Complete the list of exported symbols.
4185 2000-10-02 Akim Demaille <akim@epita.fr>
4187 * src/reader.h: New file.
4188 Propagate its use instead of tedious list of `extern' and
4190 * src/reader.c: Formatting changes, topological sort,
4193 2000-10-02 Akim Demaille <akim@epita.fr>
4195 * src/lex.h: Prototype `lex.c' exported functions.
4196 * src/reader.c: Adjust.
4197 * src/lex.c: Formatting changes.
4198 (safegetc): Rename as...
4201 2000-10-02 Akim Demaille <akim@epita.fr>
4203 * src/lalr.h: New file.
4204 Propagate its inclusion instead of prototypes and `extern'.
4205 * src/lalr.c: Formatting changes, topological sorting etc.
4207 2000-10-02 Akim Demaille <akim@epita.fr>
4209 * src/output.c (token_actions): Introduce a temporary array,
4210 YYDEFACT, that makes it possible for this function to use
4213 2000-10-02 Akim Demaille <akim@epita.fr>
4215 `user_toknums' is output as a `short[]' in `output.c', while it is
4216 defined as a `int[]' in `reader.c'. For consistency with the
4217 other output tables, `user_toknums' is now defined as a table of
4220 * src/reader.c (user_toknums): Be a short table instead of an int
4222 Adjust dependencies.
4224 Factor the short table outputs.
4226 * src/output.c (output_short_table): New function.
4227 * src/output.c (output_gram, output_stos, output_rule_data)
4228 (output_base, output_table, output_check): Use it.
4230 2000-10-02 Akim Demaille <akim@epita.fr>
4232 * src/output.c (output): Topological sort of the functions, in
4233 order to get rid of the `static' prototypes.
4234 No longer use `register'.
4235 * src/output.h: New file.
4236 Propagate its inclusion in files explicitly prototyping functions
4239 2000-09-21 Akim Demaille <akim@epita.fr>
4241 * src/atgeneral.m4: Update from Autoconf.
4243 2000-09-21 Akim Demaille <akim@epita.fr>
4245 * src/closure.h: New file.
4246 * src/closure.c: Formatting changes, topological sort over the
4247 functions, use of closure.h.
4248 (initialize_closure, finalize_closure): Rename as...
4249 (new_closure, free_closure): these. Adjust dependencies.
4250 * src/LR0.c: Formatting changes, topological sort, use of
4252 (initialize_states): Rename as...
4254 * src/Makefile.am (noinst_HEADERS): Adjust.
4256 2000-09-20 Akim Demaille <akim@epita.fr>
4258 * src/acconfig.h: Don't protect config.h against multiple
4260 Don't define PARAMS.
4261 * src/system.h: Define PARAMS.
4262 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4263 purpose of config.h. system.h must not try to fix wrong
4264 definitions in config.h.
4266 2000-09-20 Akim Demaille <akim@epita.fr>
4268 * src/derives.h: New file.
4269 * src/main.c, src/derives.h: Use it.
4271 * src/Makefile.am (noinst_HEADERS): Adjust.
4273 2000-09-20 Akim Demaille <akim@epita.fr>
4275 * tests/atgeneral.m4: Update from Autoconf.
4276 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4277 (AT_CHECK_CALC): New macros.
4278 Use these macros to test bison with options `', `--raw',
4279 `--debug', `--yacc', `--yacc --debug'.
4281 2000-09-19 Akim Demaille <akim@epita.fr>
4283 * src/output.c: Formatting changes.
4284 * src/machine.h: Remove, leaving its contents in...
4285 * src/system.h: here.
4287 Adjust all dependencies on stdio.h and machine.h.
4288 * src/getargs.h: New file.
4289 Let all `extern' declarations about getargs.c be replaced with
4290 inclusion of `getargs.h'.
4291 * src/Makefile.am (noinst_HEADERS): Adjust.
4293 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4295 (yyerror): Returns void, not int.
4296 * doc/bison.texinfo: Formatting changes.
4298 2000-09-19 Akim Demaille <akim@epita.fr>
4300 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4303 2000-09-18 Akim Demaille <akim@epita.fr>
4305 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4306 * src/Makefile.am (INCLUDES): Don't.
4307 Be ready to fetch headers in lib/.
4309 2000-09-18 Akim Demaille <akim@epita.fr>
4311 * doc/bison.texinfo: Update the copyright.
4312 ANSIfy and GNUify the examples.
4313 Remove the old menu.
4315 2000-09-18 Akim Demaille <akim@epita.fr>
4317 First set of tests: use the `calc' example from the documentation.
4319 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4320 is defined only when YYDEBUG is.
4321 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4322 * src/files.c (tryopen, tryclose): Formatting changes.
4323 Move to the top and be static.
4324 * src/reader.c (read_signed_integer): Likewise.
4325 * tests/calc.m4: New file.
4326 * Makefile.am, suite.m4: Adjust.
4327 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4329 2000-09-18 Akim Demaille <akim@epita.fr>
4331 Add support for an Autotest test suite for Bison.
4333 * m4/m4.m4, m4/atconfig.m4: New files.
4334 * m4/Makefile.am (EXTRA_DIST): Adjust.
4335 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4337 * src/getargs.c: Display a more standard --version message.
4338 * src/reader.c (reader): Formatting changes.
4339 No longer depend upon VERSION_STRING.
4340 * configure.in: No longer use `dnl'.
4341 Set up the test suite and the new directory `tests/.
4342 (VERSION_STRING): Remove.
4344 2000-04-14 Akim Demaille <akim@epita.fr>
4346 * src/reader.c (copy_comment2): New function, same as former
4347 `copy_comment', but outputs into two FILE *.
4348 (copy_comment): Use it.
4349 (parse_union_decl): Use it.
4350 (get_type, parse_start_decl): Use the same `invalid' message.
4351 (parse_start_decl, parse_union_decl): Use the same `multiple'
4353 (parse_union_decl, copy_guard, copy_action): Use the same
4354 `unmatched' message.
4355 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4357 2000-03-31 Akim Demaille <akim@epita.fr>
4359 * src/files.c (tryopen, tryclose): Move to the top.
4362 2000-03-31 Akim Demaille <akim@epita.fr>
4364 * src/main.c (main): Don't call `done', exit does it.
4366 2000-03-31 Akim Demaille <akim@epita.fr>
4368 * allocate.c: s/return (foo)/return foo/.
4371 * output.c: Likewise.
4372 * reader.c: Likewise.
4373 * symtab.c: Likewise.
4374 * vmsgetargs.c: Likewise.
4376 2000-03-31 Akim Demaille <akim@epita.fr>
4378 Clean up the error reporting functions.
4380 * src/report.c: New file.
4381 * src/report.h: Likewise.
4382 * src/Makefile.am: Adjust.
4383 * m4/error.m4: New file.
4384 * m4/Makefile.am: Adjust.
4385 * configure.in (jm_PREREQ_ERROR): Call it.
4386 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4388 (fatal, fatals): Remove. All callers use complain.c::fatal.
4389 (warn, warni, warns, warnss, warnss): Remove. All callers use
4390 complain.c::complain.
4391 (toomany): Remove, use fatal instead.
4392 * src/files.c (done): No argument, use complain_message_count.
4393 * src/main.c (main): Register `done' to `atexit'.
4395 * src/getargs.c (usage): More `fputs', less `fprintf'.
4397 2000-03-28 Akim Demaille <akim@epita.fr>
4399 * lib/: New directory.
4400 * Makefile.am (SUBDIRS): Adjust.
4401 * configure.in: Adjust.
4402 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4404 * src/alloca.c: Moved to lib/.
4405 * src/getopt.c: Likewise.
4406 * src/getopt1.c: Likewise.
4407 * src/getopt.h: Likewise.
4408 * src/ansi2knr.c: Likewise.
4409 * src/ansi2knr.1: Likewise.
4410 * src/Makefile.am: Adjust.
4411 * lib/Makefile.am: New file.
4413 2000-03-28 Akim Demaille <akim@epita.fr>
4415 * src/getargs.c (usage): Refresh the help message.
4417 2000-03-17 Akim Demaille <akim@epita.fr>
4419 * src/getopt1.c: Updated from textutils 2.0e
4420 * src/getopt.c: Likewise.
4421 * src/getopt.h: Likewise.
4423 2000-03-17 Akim Demaille <akim@epita.fr>
4425 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4426 the file name, not the whole `#line LINE FILE'.
4428 2000-03-17 Akim Demaille <akim@epita.fr>
4430 On syntax errors, report the token on which we choked.
4432 * src/bison.s1 (yyparse): In the label yyerrlab, when
4433 YYERROR_VERBOSE, add yychar in msg.
4435 2000-03-17 Akim Demaille <akim@epita.fr>
4437 * src/reader.c (copy_at): New function.
4438 (copy_guard): Use it.
4439 (copy_action): Use it.
4441 2000-03-17 Akim Demaille <akim@epita.fr>
4443 Be kind to translators, save some useless translations.
4445 * src/main.c (banner): New function.
4446 (fatal_banner): Use it.
4447 (warn_banner): Use it.
4449 2000-03-17 Akim Demaille <akim@epita.fr>
4451 * src/reader.c (copy_definition): Use copy_string and
4452 copy_comment. Removed now unused `match', `ended',
4454 (copy_comment, copy_string): Moved, to be visible from
4457 2000-03-17 Akim Demaille <akim@epita.fr>
4459 * src/reader.c (copy_string): Declare `static inline'. No
4460 problems with inline, since it is checked by configure.
4461 (copy_comment): Likewise.
4463 2000-03-17 Akim Demaille <akim@epita.fr>
4465 * src/reader.c (packsymbols): Formatting changes.
4467 2000-03-17 Akim Demaille <akim@epita.fr>
4469 * src/reader.c (copy_comment): New function, factored out from:
4470 (copy_action): Use it. Removed now unused `match', `ended',
4472 (copy_guard): Likewise.
4474 2000-03-17 Akim Demaille <akim@epita.fr>
4476 * src/reader.c (copy_string): New function, factored out from:
4477 (copy_action): Use it.
4478 (copy_guard): Likewise.
4480 2000-03-17 Akim Demaille <akim@epita.fr>
4482 Change the handling of @s so that they behave exactly like $s.
4483 There is now a pseudo variable @$ (readble and writable), location
4484 of the lhs of the rule (by default ranging from the location of
4485 the first symbol of the rhs, to the location of the last symbol,
4486 or, if the rhs is empty, YYLLOC).
4488 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4490 (yyparse): When providing a default semantic action, provide a
4491 default location action.
4492 (after the $): No longer change `*YYLSP', just stack YYLOC the
4493 same way you stack YYVAL.
4494 * src/reader.c (read_declarations): Use warns.
4495 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4496 (copy_action, case '@'): Likewise.
4497 Use a standard error message, to save useless work from
4500 2000-03-17 Akim Demaille <akim@epita.fr>
4502 * src/bison.s1: Formatting and cosmetics changes.
4503 * src/reader.c: Likewise.
4504 Update the Copyright notice.
4506 2000-03-17 Akim Demaille <akim@epita.fr>
4508 * src/bison.s1 (#line): All set to `#line' only, since the
4509 Makefile now handles them.
4511 2000-03-16 Akim Demaille <akim@epita.fr>
4513 * src/output.c (output_rule_data): Output the documentation of
4515 (Copyright notice): Update.
4518 2000-03-16 Akim Demaille <akim@epita.fr>
4520 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4521 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4522 One `#if YYDEBUG' remains, since it uses variables which are
4523 defined only if `YYDEBUG != 0'.
4525 2000-03-16 Akim Demaille <akim@epita.fr>
4527 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4528 and related variables so that the similarities are highlighted.
4530 2000-03-16 Akim Demaille <akim@epita.fr>
4532 * src/bison.s1: Properly indent CPP directives.
4534 2000-03-16 Akim Demaille <akim@epita.fr>
4536 * src/bison.s1: Properly indent the `alloca' CPP section.
4538 2000-03-16 Akim Demaille <akim@epita.fr>
4540 Do not hard code values of directories in `configure.in'.
4541 Update the `configure' tool chain.
4543 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4545 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4546 (AC_OUTPUT): Add m4/Makefile.
4547 Bump to bison 1.28a, 1.29 has never been released.
4548 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4549 handled via src/Makefile.am.
4550 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4551 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4553 * Makefile.am (SUBDIRS): Add m4.
4554 (ACLOCAL_AM_FLAGS): New variable.
4555 (AUTOMAKE_OPTIONS): Add check-news.
4556 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4557 the proper line number and file name.
4558 (DEFS): Propagate the location of bison library files and of the
4560 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4562 * acinclude.m4: Remove, replaced by the directory m4.
4563 * m4/Makefile.am (EXTRA_DIST): New variable.
4564 * m4/gettext.m4: New file, from the fileutils.
4565 * m4/lcmessage.m4: Likewise
4566 * m4/progtest.m4: Likewise.
4567 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4569 2000-03-10 Akim Demaille <akim@epita.fr>
4572 Formatting changes of various comments.
4573 Respect the GNU coding standards at various places.
4574 Don't use `_()' when no translation is needed.
4576 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4579 OS/2 honors TMPDIR environment variable.
4581 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4583 * doc/bison.texinfo: Tweaked spelling and grammar.
4585 Removed reference to price of printed copy.
4586 Mention BISON_SIMPLE and BISON_HAIRY.
4588 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4590 * configure.in, NEWS:
4591 Bison 1.29 released.
4593 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4595 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4596 Added reference card.
4598 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4600 * po/ru.po: Added Russian translation.
4602 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4604 * configure.in: Added Russian translation.
4606 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4608 * configure.in, NEWS, README:
4609 Released version 1.28.
4611 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4614 Squashed redefinition warning on some systems.
4616 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4617 Have configure build version string instead of relying on ANSI string
4620 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4622 * po/POTFILES.in: Got rid of version.c.
4624 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4626 * acconfig.h, configure.in:
4627 Have configure build version string instead of relying on ANSI string
4630 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4633 Dropped mention of `+' for long-named options.
4635 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4637 * src/files.c: Added <unistd.h> for unlink().
4639 * src/Makefile.am, src/system.h:
4642 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4644 * README: Added a FAQ list.
4646 * configure.in, acconfig.h:
4649 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4651 * doc/FAQ, doc/Makefile.am:
4654 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4656 * src/alloc.h, src/symtab.h, src/version.c:
4657 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4659 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4661 * src/.cvsignore, src/Makefile.am:
4662 Reorganized: sources in `src', documentation in `doc'.
4664 * src/lex.c (literalchar):
4665 fixed the code for escaping double quotes (thanks
4668 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4670 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4671 Adjusted paths to reflect directory reorganization.
4673 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4675 * doc/.cvsignore, doc/Makefile.am:
4676 Reorganized: sources in `src', documentation in `doc'.
4678 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4681 Updated AC_INIT file to reflect directory reorganization.
4683 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4684 Reorganized: sources in `src', documentation in `doc'.
4686 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4689 Don't declare calloc() and realloc() if not necessary.
4691 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4693 * configure.in, acconfig.h, acinclude.m4:
4694 Don't declare calloc() and realloc() if not necessary.
4696 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4698 * po/.cvsignore: Added i18n support.
4700 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4702 * acconfig.h, configure.in, Makefile.am:
4705 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4707 * src/bison.s1: Fixed #line numbers.
4709 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4711 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4712 Added PO files from Translation Project.
4714 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4717 Added support for non-ANSI compilers (ansi2knr).
4719 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4721 * configure.in: Bumped version number to 1.27.
4724 Added `bison.simple' to list of files removed by `make distclean'.
4726 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4728 * src/files.c, src/files.h:
4729 Defined locations of parser files in config.h instead of Makefile.
4731 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4733 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4734 Defined locations of parser files in config.h instead of Makefile.
4736 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4739 Removed inappropriate use of $< macro.
4741 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4743 * po/Makefile.in.in, po/POTFILES.in:
4744 Add `po' directory skeleton.
4746 1999-01-27 Jesse Thilo <jthilo@gnu.org>
4748 * README: Document help-bison list.
4750 * configure.in: Add check for mkstemp().
4752 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4754 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
4755 Hush a few compiler warnings.
4758 Add tryclose(), which verifies that fclose was successful.
4759 Hush a couple of compiler warnings.
4761 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4763 * Makefile.am, OChangeLog:
4764 ChangeLog is now automatically generated. Include the old version as
4767 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4769 * 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:
4772 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4774 * doc/bison.texinfo: Fix formatting glitch.
4776 * doc/bison.texinfo: Update FSF address.
4778 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4780 * acconfig.h: Update FSF address.
4782 1999-01-08 Jesse Thilo <jthilo@gnu.org>
4785 Don't define PACKAGE here, since config.h defines it.
4787 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4789 * src/reader.c: Update copyright date.
4792 Ditch sprintf to statically-sized buffers in fatal/warn functions in
4793 favor of output directly to stderr (avoids buffer overruns).
4795 * src/reader.c: Some checks for premature EOF.
4797 * 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:
4798 Use prototypes if the compiler understands them.
4800 * src/files.c: Honor TMPDIR on Unix hosts.
4801 Use prototypes if the compiler understands them.
4804 Fix a couple of buffer overrun bugs.
4805 Use prototypes if the compiler understands them.
4807 * src/system.h: Include unistd.h and ctype.h.
4808 Use #ifdef instead of #if for NLS symbols.
4810 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4812 * doc/bison.texinfo:
4813 Delete comment "consider using @set for edition number, etc..." since
4814 we now are doing so.
4816 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4819 Use prototypes if the compiler understands them.
4821 * NEWS: Document 1.26 highlights.
4823 * Makefile.am: Require Automake 1.3 or later.
4826 Use prototypes if the compiler understands them.
4828 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4831 Use VERSION symbol from automake for version number.
4833 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4835 * acconfig.h, configure.in, version.cin:
4836 Use VERSION symbol from automake for version number.
4838 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4841 Distribute original version of simple parser (bison.s1), not built
4842 version (bison.simple).
4844 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4846 * doc/bison.texinfo: Add info dir entry.
4848 * doc/bison.texinfo:
4849 Let automake put version number into documentation.
4851 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4853 * src/bison.cld, src/build.com, src/vmshlp.mar:
4854 Add non-RCS files from /gd/gnu/bison.
4856 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4859 Document the BISON_HAIRY and BISON_SIMPLE variables.
4861 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4863 * src/version.c: Build version.c automatically.
4866 Fix token numbering (used to start at 258, not 257).
4868 * src/system.h: Include config.h.
4870 * src/getargs.c: Update bug report address.
4872 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
4873 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
4875 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4878 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4880 * configure.in, version.cin:
4881 Build version.c automatically.
4883 * AUTHORS: Add AUTHORS file.
4885 * README: Update bug report address.
4888 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4890 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
4893 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4895 * doc/bison.texinfo: Clean up some formatting.
4897 1998-05-05 Richard Stallman <rms@gnu.org>
4899 * doc/bison.texinfo:
4900 Explain better why to make a pure parser.
4902 1998-01-05 Richard Stallman <rms@gnu.org>
4904 * src/files.c (openfiles):
4905 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
4906 find a temporary directory, if possible. Do not unlink files while
4909 1997-08-25 Richard Stallman <rms@gnu.org>
4911 * src/reader.c (stack_offset;):
4912 Change some warni to warns.
4914 * src/lex.c (literalchar): Use warns, not warni.
4916 1997-06-28 Richard Stallman <rms@gnu.org>
4918 * src/bison.s1: Add a Bison version comment.
4920 * src/main.c (fatal, warn, berror):
4923 1997-06-28 Richard Stallman <rms@gnu.org>
4925 * Makefile.in (bison_version): New variable.
4926 (dist): Use that variable.
4927 (bison.s1): Substitute the Bison version into bison.simple.
4929 * bison.simple: Add a Bison version comment.
4931 1997-06-18 Richard Stallman <rms@gnu.org>
4933 * src/main.c (fatal, warn, berror):
4934 Make error messages standard.
4935 (toomany): Improve error message text.
4937 * 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:
4938 new.h renamed to alloc.h.
4940 1997-06-18 Richard Stallman <rms@gnu.org>
4942 * Makefile.in: new.h renamed to alloc.h.
4944 1997-05-24 Richard Stallman <rms@gnu.org>
4946 * src/lex.c (literalchar):
4947 Fix the code for escaping \, " and '.
4949 (lex): Avoid trouble when there are many chars
4950 to discard in a char literal with just several chars in it.
4952 1997-05-17 Richard Stallman <rms@gnu.org>
4955 Use malloc, if using alloca is troublesome.
4956 (YYSTACK_USE_ALLOCA): New flag macro.
4957 Define it for some systems and compilers.
4958 (YYSTACK_ALLOC): New macro.
4959 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4960 If it was malloc'd, free it.
4962 1997-05-17 Richard Stallman <rms@gnu.org>
4965 Use malloc, if using alloca is troublesome.
4966 (YYSTACK_USE_ALLOCA): New flag macro.
4967 Define it for some systems and compilers.
4968 (YYSTACK_ALLOC): New macro.
4969 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4970 If it was malloc'd, free it.
4972 1997-04-23 Richard Stallman <rms@gnu.org>
4975 (alloca) [__hpux]: Always define as __builtin_alloca.
4977 1997-04-23 Richard Stallman <rms@gnu.org>
4980 (alloca) [__hpux]: Always define as __builtin_alloca.
4982 1997-04-22 Richard Stallman <rms@gnu.org>
4985 [__hpux]: Include alloca.h (right for HPUX 10)
4986 instead of declaring alloca (right for HPUX 9).
4988 * src/bison.s1 (__yy_memcpy):
4989 Declare arg `count' as unsigned int.
4990 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
4992 1997-04-22 Richard Stallman <rms@gnu.org>
4995 [__hpux]: Include alloca.h (right for HPUX 10)
4996 instead of declaring alloca (right for HPUX 9).
4998 * bison.simple (__yy_memcpy):
4999 Declare arg `count' as unsigned int.
5000 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5002 1997-01-03 Richard Stallman <rms@gnu.org>
5004 * src/allocate.c: [__STDC__ or _MSC_VER]:
5005 Declare calloc and realloc to return void *.
5007 1997-01-02 Richard Stallman <rms@gnu.org>
5010 [_MSC_VER]: Include stdlib.h and process.h.
5011 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5013 * src/main.c (main): Return FAILURE as a value.
5014 (printable_version): Declare arg as int, not char.
5016 1997-01-02 Richard Stallman <rms@gnu.org>
5018 * Makefile.in (dist):
5019 Explicitly check for symlinks, and copy them.
5021 1996-12-19 Richard Stallman <rms@gnu.org>
5024 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5026 1996-12-18 Paul Eggert <eggert@gnu.org>
5028 * src/bison.s1 (yyparse):
5029 If __GNUC__ and YYPARSE_PARAM are both defined,
5030 declare yyparse to have a void * argument.
5032 1996-12-18 Paul Eggert <eggert@gnu.org>
5034 * bison.simple (yyparse):
5035 If __GNUC__ and YYPARSE_PARAM are both defined,
5036 declare yyparse to have a void * argument.
5038 1996-12-17 Richard Stallman <rms@gnu.org>
5040 * src/reduce.c (nbits): Add some casts.
5042 1996-08-12 Richard Stallman <rms@gnu.org>
5044 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5046 1996-08-12 Richard Stallman <rms@gnu.org>
5048 * bison.simple: Test _MSDOS as well as _MSDOS_.
5050 1996-07-31 Richard Stallman <rms@gnu.org>
5053 [__sun && __i386]: Include alloca.h.
5055 1996-07-31 Richard Stallman <rms@gnu.org>
5058 [__sun && __i386]: Include alloca.h.
5060 1996-07-30 Richard Stallman <rms@gnu.org>
5062 * src/bison.s1: Comment change.
5064 * src/bison.s1: Test _MSDOS_, not MSDOS.
5066 1996-07-30 Richard Stallman <rms@gnu.org>
5068 * bison.simple: Comment change.
5070 * bison.simple: Test _MSDOS_, not MSDOS.
5072 1996-06-01 Richard Stallman <rms@gnu.org>
5074 * 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:
5075 Insert `_' macro around many string constants.
5078 Insert `_' macro around many string constants.
5080 (main): Call setlocale, bindtextdomain and textdomain.
5082 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5083 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5084 [ENABLE_NLS]: Include libintl.h.
5085 [ENABLE_NLS] (gettext): Define.
5086 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5087 (N_, PACKAGE, LOCALEDIR): New macros.
5089 1996-06-01 Richard Stallman <rms@gnu.org>
5091 * POTFILES.in: New file.
5093 * Makefile.in (allocate.o):
5094 Define target explicitly.
5096 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5097 (LDFLAGS): Set to @LDFLAGS@.
5098 (configure): Run autoconf only if preceding `cd' succeeds.
5099 (bison.s1): Redirect output to temporary file then move the
5100 temporary to the target, rather than redirecting directly to bison.s1.
5101 (clean): Remove config.status and config.log.
5102 (distclean): Don't remove config.status here.
5104 1996-05-12 Richard Stallman <rms@gnu.org>
5107 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5109 1996-05-12 Richard Stallman <rms@gnu.org>
5112 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5114 1996-05-11 Richard Stallman <rms@gnu.org>
5116 * src/bison.s1 (__yy_memcpy):
5117 Really reorder the args, as was supposedly done on Feb 14 1995.
5118 (yyparse): Calls changed accordingly.
5120 1996-05-11 Richard Stallman <rms@gnu.org>
5122 * Makefile.in (dist): Don't use $(srcdir).
5124 * bison.simple (__yy_memcpy):
5125 Really reorder the args, as was supposedly done on Feb 14 1995.
5126 (yyparse): Calls changed accordingly.
5128 1996-01-27 Richard Stallman <rms@gnu.org>
5130 * src/output.c (output_rule_data):
5131 Test YYERROR_VERBOSE in the conditional
5132 around the definition of ttyname.
5134 1995-12-29 Richard Stallman <rms@gnu.org>
5137 Fix line numbers in #line commands.
5139 1995-12-29 Richard Stallman <rms@gnu.org>
5142 Fix line numbers in #line commands.
5144 1995-12-27 Richard Stallman <rms@gnu.org>
5146 * src/bison.s1 (YYPARSE_PARAM_DECL):
5147 In C++, make it always null.
5148 (YYPARSE_PARAM_ARG): New macro.
5149 (yyparse): Use YYPARSE_PARAM_ARG.
5151 1995-12-27 Richard Stallman <rms@gnu.org>
5153 * bison.simple (YYPARSE_PARAM_DECL):
5154 In C++, make it always null.
5155 (YYPARSE_PARAM_ARG): New macro.
5156 (yyparse): Use YYPARSE_PARAM_ARG.
5158 1995-11-29 Richard Stallman <rms@gnu.org>
5160 * doc/bison.texinfo:
5161 Describe literal string tokens, %raw, %no_lines, %token_table.
5163 1995-11-29 Daniel Hagerty <hag@gnu.org>
5165 * doc/bison.texinfo: Fixed update date
5167 1995-10-16 Richard Stallman <rms@gnu.org>
5169 * src/version.c: Version 1.25.
5171 1995-10-16 Richard Stallman <rms@gnu.org>
5173 * NEWS: *** empty log message ***
5175 1995-10-16 Richard Stallman <rms@gnu.org>
5177 * doc/bison.1, doc/bison.rnh:
5180 1995-10-15 Richard Stallman <rms@gnu.org>
5182 * src/vmsgetargs.c, src/getargs.c:
5183 Added -n, -k, and -raw switches.
5184 (noparserflag, toknumflag, rawtoknumflag): New variables.
5186 * src/symtab.h (SALIAS):
5187 New #define for adding aliases to %token.
5188 (struct bucket): Added `alias' field.
5190 * src/reduce.c (reduce_grammar):
5191 Revise error message.
5192 (print_notices): Remove final `.' from error message.
5194 * src/reader.c (reader_output_yylsp):
5196 (readgram): Use `#if 0' around code that accepted %command
5197 inside grammar rules: The documentation doesn't allow it,
5198 and it will fail since the %command processors scan for the next %.
5199 (parse_token_decl): Extended the %token
5200 declaration to allow a multi-character symbol as an alias.
5201 (parse_thong_decl): New function.
5202 (read_declarations): Added %thong declarations.
5203 (read_declarations): Handle NOOP to deal with allowing
5204 % declarations as another means to specify the flags.
5205 (readgram): Allow %prec prior to semantics embedded in a rule.
5206 (skip_to_char, read_declarations, copy_definition)
5207 (parse_token_decl, parse_start_decl, parse_type_decl)
5208 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5209 (get_type_name, copy_guard, copy_action, readgram)
5210 (get_type, packsymbols): Revised most error messages.
5211 Changed `fatal' to `warnxxx' to avoid aborting for error.
5212 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5213 (read_declarations): Improve the error message for
5214 an invalid character. Do not abort.
5215 (read_declarations, copy_guard, copy_action): Use
5216 printable_version to avoid unprintable characters in printed output.
5217 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5218 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5219 Allow the type of a non-terminal can be given
5220 more than once, as long as all specifications give the same type.
5223 (output_headers, output_trailers, output, output_gram)
5224 (output_rule_data): Implement noparserflag variable.
5225 Implement toknumflag variable.
5226 (output): Call reader_output_yylsp to output LTYPESTR.
5228 * src/main.c (main):
5229 If reader sees an error, don't process the grammar.
5230 (fatals): Updated to not use VARARGS1.
5231 (printable_version, int_to_string, warn, warni, warns, warnss)
5232 (warnsss): New error reporting functions. Avoid abort for error.
5235 Added THONG and NOOP for alias processing.
5236 Added SETOPT for the new code that allows setting options with %flags.
5239 Include getopt.h. Add some extern decls.
5240 (safegetc): New function to deal with EOF gracefully.
5241 (literalchar); new function to deal with reading \ escapes.
5242 (lex): Use literalchar.
5243 (lex): Implemented "..." tokens.
5244 (literalchar, lex, parse_percent_token): Made tokenbuffer
5245 always contain the token. This includes growing the token
5246 buffer while reading an integer.
5247 (parse_percent_token): Replaced if-else statement with percent_table.
5248 (parse_percent_token): Added % declarations as another
5249 way to specify the flags -n, -l, and -r. Also added hooks for
5250 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5251 major changes to files.c.
5252 (lex) Retain in the incoming stream a character following
5254 (skip_white_space, lex): Revised most error messages
5255 and changed fatal to warn to avoid aborting.
5256 (percent_table): Added %thong declarations.
5258 * src/gram.h: Comment changes.
5260 * src/files.c (openfiles, open_extra_files, done):
5262 and actfile file. Handle noparserflag. Both for -n switch.
5264 * src/conflicts.c (resolve_sr_conflict):
5265 Remove use of alloca.
5267 1995-06-01 Jim Meyering <meyering@gnu.org>
5269 * doc/bison.texinfo: *** empty log message ***
5271 1995-05-06 Richard Stallman <rms@gnu.org>
5273 * src/bison.s1: Comment change.
5275 1995-05-06 Richard Stallman <rms@gnu.org>
5277 * bison.simple: Comment change.
5279 1995-05-03 Richard Stallman <rms@gnu.org>
5281 * src/version.c: Version now 1.24.
5283 * src/bison.s1: Change distribution terms.
5285 * src/version.c: Version now 1.23.
5287 1995-05-03 Richard Stallman <rms@gnu.org>
5289 * doc/bison.texinfo:
5290 Rewrite "Conditions for Using Bison".
5291 Update version to 1.24.
5293 1995-05-03 Richard Stallman <rms@gnu.org>
5295 * bison.simple: Change distribution terms.
5297 1995-02-23 Richard Stallman <rms@gnu.org>
5299 * src/files.c: Test __VMS_POSIX as well as VMS.
5301 1995-02-14 Jim Meyering <meyering@gnu.org>
5303 * src/bison.s1 (__yy_memcpy):
5304 Renamed from __yy_bcopy to avoid
5305 confusion. Reverse FROM and TO arguments to be consistent with
5308 1995-02-14 Jim Meyering <meyering@gnu.org>
5310 * bison.simple (__yy_memcpy):
5311 Renamed from __yy_bcopy to avoid
5312 confusion. Reverse FROM and TO arguments to be consistent with
5315 1994-11-10 David J. MacKenzie <djm@gnu.org>
5321 * Makefile.in (DISTFILES): Include NEWS.
5323 * Makefile.in (DISTFILES):
5324 Include install-sh, not install.sh.
5326 * configure.in: Update to Autoconf v2 macro names.
5328 1994-10-05 David J. MacKenzie <djm@gnu.org>
5330 * Makefile.in: fix typo
5332 * Makefile.in (prefix, exec_prefix):
5333 Let configure set them.
5335 1994-09-28 David J. MacKenzie <djm@gnu.org>
5337 * Makefile.in: Set datadir to $(prefix)/share.
5339 1994-09-15 Richard Stallman <rms@gnu.org>
5342 Update copyright notice and GPL version.
5344 1994-09-15 Richard Stallman <rms@gnu.org>
5347 Update copyright notice and GPL version.
5349 1994-07-12 Richard Stallman <rms@gnu.org>
5351 * src/reduce.c, src/reader.c:
5354 1994-05-05 David J. MacKenzie <djm@gnu.org>
5356 * Makefile.in: entered into RCS
5358 1994-03-26 Richard Stallman <rms@gnu.org>
5360 * src/bison.s1: entered into RCS
5362 1994-03-26 Richard Stallman <rms@gnu.org>
5364 * bison.simple: entered into RCS
5366 1994-03-25 Richard Stallman <rms@gnu.org>
5368 * src/main.c: entered into RCS
5370 1994-03-24 Richard Stallman <rms@gnu.org>
5372 * src/conflicts.c: entered into RCS
5374 1994-01-02 Richard Stallman <rms@gnu.org>
5376 * Makefile.in: *** empty log message ***
5378 1993-11-21 Richard Stallman <rms@gnu.org>
5380 * src/bison.s1: *** empty log message ***
5382 1993-11-21 Richard Stallman <rms@gnu.org>
5384 * doc/bison.texinfo: entered into RCS
5386 * doc/bison.texinfo: *** empty log message ***
5388 1993-11-21 Richard Stallman <rms@gnu.org>
5390 * bison.simple: *** empty log message ***
5392 1993-10-25 David J. MacKenzie <djm@gnu.org>
5394 * doc/bison.texinfo: *** empty log message ***
5396 1993-10-19 Richard Stallman <rms@gnu.org>
5398 * src/bison.s1: *** empty log message ***
5400 1993-10-19 Richard Stallman <rms@gnu.org>
5402 * bison.simple: *** empty log message ***
5404 1993-10-14 Richard Stallman <rms@gnu.org>
5406 * src/bison.s1: *** empty log message ***
5408 1993-10-14 Richard Stallman <rms@gnu.org>
5410 * bison.simple: *** empty log message ***
5412 1993-09-14 David J. MacKenzie <djm@gnu.org>
5414 * doc/bison.texinfo: *** empty log message ***
5416 1993-09-13 Noah Friedman <friedman@gnu.org>
5418 * Makefile.in: *** empty log message ***
5420 1993-09-10 Richard Stallman <rms@gnu.org>
5422 * src/conflicts.c: *** empty log message ***
5424 * src/system.h: entered into RCS
5426 1993-09-10 Richard Stallman <rms@gnu.org>
5428 * doc/bison.1: entered into RCS
5430 1993-09-06 Noah Friedman <friedman@gnu.org>
5432 * src/version.c: entered into RCS
5434 1993-09-06 Noah Friedman <friedman@gnu.org>
5436 * Makefile.in: *** empty log message ***
5438 1993-07-30 David J. MacKenzie <djm@gnu.org>
5440 * Makefile.in: *** empty log message ***
5442 1993-07-24 Richard Stallman <rms@gnu.org>
5444 * src/bison.s1: *** empty log message ***
5446 1993-07-24 Richard Stallman <rms@gnu.org>
5448 * bison.simple: *** empty log message ***
5450 1993-07-08 David J. MacKenzie <djm@gnu.org>
5452 * Makefile.in: *** empty log message ***
5454 1993-07-04 Richard Stallman <rms@gnu.org>
5456 * src/bison.s1: *** empty log message ***
5458 1993-07-04 Richard Stallman <rms@gnu.org>
5460 * bison.simple: *** empty log message ***
5462 1993-06-26 David J. MacKenzie <djm@gnu.org>
5464 * src/getargs.c: entered into RCS
5466 1993-06-26 David J. MacKenzie <djm@gnu.org>
5468 * doc/bison.texinfo: *** empty log message ***
5470 * doc/bison.1: New file.
5472 1993-06-25 Richard Stallman <rms@gnu.org>
5474 * src/getargs.c: New file.
5476 1993-06-16 Richard Stallman <rms@gnu.org>
5478 * src/bison.s1: *** empty log message ***
5480 1993-06-16 Richard Stallman <rms@gnu.org>
5482 * bison.simple: *** empty log message ***
5484 1993-06-03 Richard Stallman <rms@gnu.org>
5486 * src/bison.s1: New file.
5488 1993-06-03 Richard Stallman <rms@gnu.org>
5490 * doc/bison.texinfo: *** empty log message ***
5492 1993-06-03 Richard Stallman <rms@gnu.org>
5494 * bison.simple: New file.
5496 1993-05-19 Richard Stallman <rms@gnu.org>
5498 * doc/bison.texinfo: New file.
5500 1993-05-07 Noah Friedman <friedman@gnu.org>
5502 * Makefile.in: *** empty log message ***
5504 1993-04-28 Noah Friedman <friedman@gnu.org>
5506 * src/reader.c: *** empty log message ***
5508 1993-04-23 Noah Friedman <friedman@gnu.org>
5510 * src/alloc.h: entered into RCS
5512 1993-04-20 David J. MacKenzie <djm@gnu.org>
5514 * src/version.c: *** empty log message ***
5516 * src/files.c, src/allocate.c:
5519 * src/reader.c: *** empty log message ***
5521 * src/lex.c: entered into RCS
5523 * src/conflicts.c: New file.
5525 * src/symtab.c: entered into RCS
5527 * src/alloc.h: New file.
5529 * src/LR0.c: entered into RCS
5531 1993-04-18 Noah Friedman <friedman@gnu.org>
5533 * src/reader.c: New file.
5535 * src/version.c: *** empty log message ***
5537 1993-04-18 Noah Friedman <friedman@gnu.org>
5539 * Makefile.in: *** empty log message ***
5541 1993-04-17 Noah Friedman <friedman@gnu.org>
5543 * Makefile.in: *** empty log message ***
5545 1993-04-15 Richard Stallman <rms@gnu.org>
5547 * src/main.c, src/files.c:
5550 1993-04-15 Noah Friedman <friedman@gnu.org>
5552 * configure.in: entered into RCS
5554 * configure.in: *** empty log message ***
5556 * configure.in: New file.
5558 1993-04-14 Richard Stallman <rms@gnu.org>
5560 * Makefile.in: New file.
5562 1993-04-13 Richard Stallman <rms@gnu.org>
5564 * src/version.c: New file.
5566 1993-03-25 Richard Stallman <rms@gnu.org>
5568 * src/output.c: entered into RCS
5570 1992-09-25 Richard Stallman <rms@gnu.org>
5572 * configure.bat: entered into RCS
5574 1992-06-22 Richard Stallman <rms@gnu.org>
5576 * src/vmsgetargs.c: entered into RCS
5578 1992-06-22 Richard Stallman <rms@gnu.org>
5580 * doc/bison.rnh: entered into RCS
5582 1992-04-20 David J. MacKenzie <djm@gnu.org>
5584 * README: entered into RCS
5586 1992-01-22 Richard Stallman <rms@gnu.org>
5588 * src/machine.h: entered into RCS
5590 1991-12-21 Richard Stallman <rms@gnu.org>
5592 * src/lalr.c, src/closure.c:
5595 1991-12-20 Richard Stallman <rms@gnu.org>
5597 * src/state.h: entered into RCS
5599 1991-12-18 Richard Stallman <rms@gnu.org>
5601 * src/print.c, src/nullable.c, src/derives.c:
5604 1991-11-03 David J. MacKenzie <djm@gnu.org>
5606 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5609 1988-09-09 Richard Stallman <rms@gnu.org>
5611 * src/bison.hairy: entered into RCS
5613 1987-12-16 Richard Stallman <rms@gnu.org>
5615 * REFERENCES: entered into RCS