1 2002-01-03 Akim Demaille <akim@epita.fr>
3 * src/parse-skel.y (process_skeleton): Don't bind the parser's
4 tracing code to --trace, wait for a better --trace option, with
7 2002-01-03 Akim Demaille <akim@epita.fr>
9 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10 The ISO C++ standard is extremely clear about it: stderr is
11 considered a macro, not a regular symbol (see table 94 `Header
12 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
13 Therefore std:: does not apply to it. It still does with fprintf.
14 Also, s/cstdio.h/cstdio/.
16 2002-01-03 Akim Demaille <akim@epita.fr>
18 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19 for non system headers.
21 2002-01-02 Akim Demaille <akim@epita.fr>
23 Equip the skeleton chain with location tracking, runtime trace,
24 pure parser and scanner.
26 * src/parse-skel.y: Request a pure parser, locations, and prefix
28 (%union): Having several members with the same type does not help
29 type mismatches, simplify.
30 (YYPRINT, yyprint): New.
31 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
34 * src/scan-skel.l: Adjust to these changes.
35 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
36 (LOCATION_PRINT, skel_control_t): New.
38 2001-12-30 Akim Demaille <akim@epita.fr>
40 * src/parse-skel.y: Get rid of the shift/reduce conflict:
41 replace `gb' with BLANKS.
42 * src/scan-skel.l: Adjust.
45 2001-12-30 Akim Demaille <akim@epita.fr>
47 * src/system.h: We don't need nor want bcopy.
48 Throw away MS-DOS crap: we don't need getpid.
49 * configure.in: We don't need strndup. It was even causing
50 problems: because Flex includes the headers *before* us,
51 _GNU_SOURCE is not defined by config.h, and therefore strndup was
53 * lib/xstrndup.c: New.
54 * src/scan-skel.l: Use it.
55 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
56 * src/parse-skel.y: Use %directives instead of #defines.
59 2001-12-30 Akim Demaille <akim@epita.fr>
61 * src/skeleton.h: New.
62 * src/output.c (output_parser, output_master_parser): Remove, dead
64 * src/output.h (get_lines_number, actions_output, guards_output)
65 (token_definitions_output): Prototype them.
66 * src/parse-skel.y: Add the license notice.
67 Include output.h and skeleton.h.
68 (process_skeleton): Returns void, and takes a single parameter.
69 * src/scan-skel.l: Add the license notice.
71 Don't use %option yylineno: it seems that then Flex imagines
72 REJECT has been used, and therefore it won't reallocate its
73 buffers (which makes no other sense to me than a bug). It results
74 in warnings for `unused: yy_flex_realloc'.
76 to guess if the generated parsers should have '.tab' in their
77 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
79 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
81 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
82 (MUSCLE_INSERT_PREFIX): ...to there.
83 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
84 (MUSCLE_INSERT_PREFIX): Move from here...
86 * src/bison.hairy: Add a section directive. Put braces around muscle
87 names. This parser skeleton is still broken, but Bison should not
88 choke on a bad muscle 'syntax'.
89 * src/bison.simple: Add a section directive. Put braces around muscle
92 * src/files.h (strsuffix, stringappend): Add declarations.
93 (tab_extension): Add declaration.
94 (short_base_name): Add declaration.
96 * src/files.c (strsuffix, stringappend): No longer static. These
97 functions are used in the skeleton parser.
99 (compute_base_names): Use the computations done in this function
100 to guess if the generated parsers should have '.tab' in their
102 (short_base_name): No longer static.
104 * src/output.c (output_skeleton): New.
105 (output): Disable call to output_master_parser, and give a try to
106 a new skeleton handling system.
107 (guards_output, actions_output): No longer static.
108 (token_definitions_output, get_lines_number): No longer static.
110 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
112 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
115 * src/parse-skel.y: New file.
116 * src/scan-skel.l: New file.
118 2001-12-29 Akim Demaille <akim@epita.fr>
120 %name-prefix is broken.
122 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
123 Adjust all dependencies.
124 * tests/headers.at (export YYLTYPE): Strengthen this test: use
127 Renaming yylval but not yylloc is not consistent. Now we do.
129 * src/bison.simple: Prefix yylloc if used.
130 * doc/bison.texinfo (Decl Summary): Document that.
132 2001-12-29 Akim Demaille <akim@epita.fr>
134 * doc/bison.texinfo: Promote `%long-directive' over
136 Remove all references to fixed-output-files, yacc is enough.
138 2001-12-29 Akim Demaille <akim@epita.fr>
140 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
141 user prologue. These are defaults.
142 * tests/actions.at (Mid-rule actions): Make sure the user can
143 define YYDEBUG and YYERROR_VERBOSE.
145 2001-12-29 Akim Demaille <akim@epita.fr>
147 * src/output.c (header_output): Don't forget to export YYLTYPE and
149 * tests/headers.at (export YYLTYPE): New, make sure it does.
150 * tests/regression.at (%union and --defines, Invalid CPP headers):
152 * tests/headers.at: here.
154 2001-12-29 Akim Demaille <akim@epita.fr>
156 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
158 2001-12-29 Akim Demaille <akim@epita.fr>
160 * tests/actions.at (Mid-rule actions): Output on a single line
163 2001-12-29 Akim Demaille <akim@epita.fr>
165 * doc/bison.texinfo: Formatting changes.
167 2001-12-29 Akim Demaille <akim@epita.fr>
169 Don't store the token defs in a muscle, just be ready to output it
170 on command. Now possible via `symbols'. Fixes a memory leak.
172 * src/output.c (token_definitions_output): New.
173 (output_parser, header_output): Use it.
174 * src/reader.c (symbols_save): Remove.
176 2001-12-29 Akim Demaille <akim@epita.fr>
178 * src/bison.simple: Do not provide a default for YYSTYPE and
179 YYLTYPE before the user's prologue. Otherwise it's hardly... a
182 2001-12-29 Akim Demaille <akim@epita.fr>
184 Mid-rule actions are simply... ignored!
186 * src/reader.c (readgram): Be sure to attach mid-rule actions to
187 the empty-rule associated to the dummy symbol, not to the host
189 * tests/actions.at (Mid-rule actions): New.
191 2001-12-29 Akim Demaille <akim@epita.fr>
195 * src/reader.c (reader): Free grammar.
197 2001-12-29 Akim Demaille <akim@epita.fr>
201 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
202 since it allocates it for each state, although only one is needed.
203 (allocate_storage): Do it here.
205 2001-12-29 Akim Demaille <akim@epita.fr>
207 * src/options.h, src/options.c (create_long_option_table): Rename
209 (long_option_table_new): this, with a clearer prototype.
210 (percent_table): Remove, unused,
211 * src/getargs.c (getargs): Adjust.
213 2001-12-29 Akim Demaille <akim@epita.fr>
215 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
216 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
219 2001-12-29 Akim Demaille <akim@epita.fr>
221 * src/lalr.c (build_relations): Rename `states' as `states1'.
222 Sorry, I don't understand exactly what it is, no better name...
224 2001-12-29 Akim Demaille <akim@epita.fr>
226 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
227 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
228 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
231 2001-12-29 Akim Demaille <akim@epita.fr>
233 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
236 2001-12-29 Akim Demaille <akim@epita.fr>
238 * src/reader.c, src/reader.h (user_toknums): Remove.
239 Adjust all users to use symbols[i]->user_token_number.
241 2001-12-29 Akim Demaille <akim@epita.fr>
243 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
244 Adjust all users to use symbols[i]->prec or ->assoc.
246 2001-12-29 Akim Demaille <akim@epita.fr>
248 * src/reader.c, src/reader.h (tags): Remove.
249 Adjust all users to use symbols[i]->tag.
251 2001-12-29 Akim Demaille <akim@epita.fr>
253 * src/gram.h, src/gram.c (symbols): New, similar to state_table
255 * src/reader.c (packsymbols): Fill this table.
257 * src/conflicts.c (resolve_sr_conflict): Adjust.
258 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
260 Use symbols[i]->tag instead of tags[i].
262 2001-12-29 Akim Demaille <akim@epita.fr>
264 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
265 In addition, put a comment in there, to replace...
266 * tests/regression.at (%union and C comments): Remove.
268 2001-12-29 Akim Demaille <akim@epita.fr>
270 * tests/regression.at (Web2c Actions): Blindly move the actual
271 output as expected output. The contents *seem* right to me, but I
272 can't pretend reading perfectly parser tables... Nonetheless, all
273 the other tests pass correctly, the table look OK, even though the
274 presence of `$axiom' is to be noted: AFAICS it is useless (but
277 2001-12-29 Akim Demaille <akim@epita.fr>
279 * src/reader.c (readgram): Don't add the rule 0 if there were no
280 rules read. In other words, add it _after_ having performed
281 grammar sanity checks.
282 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
284 2001-12-29 Akim Demaille <akim@epita.fr>
286 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
287 visible, and some states have now a different number.
289 2001-12-29 Akim Demaille <akim@epita.fr>
291 * src/reader.c (readgram): Bind the initial rule's lineno to that
293 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
294 (Solved SR Conflicts): Adjust rule 0's line number.
296 2001-12-29 Akim Demaille <akim@epita.fr>
298 Fix the `GAWK Grammar' failure.
300 * src/LR0.c (final_state): Initialize to -1 so that we do compute
301 the reductions of the first state which was mistakenly confused
302 with the final state because precisely final_state was initialized
304 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
305 now noticed by Bison.
306 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
307 have a reduction on $default.
309 2001-12-29 Akim Demaille <akim@epita.fr>
311 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
313 * src/closure.c (print_closure): Likewise.
314 * src/derives.c (print_derives): Likewise.
315 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
318 2001-12-29 Akim Demaille <akim@epita.fr>
320 * src/lalr.c (lookaheads_print): New.
321 (lalr): Call it when --trace-flag.
322 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
325 2001-12-29 Akim Demaille <akim@epita.fr>
327 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
328 when walking through ritem, even via rule->rhs.
329 * src/reduce.c (dump_grammar, useful_production, reduce_output)
330 (useful_production, useless_nonterminals): Likewise.
331 (reduce_grammar_tables): Likewise, plus update nritems.
332 * src/nullable.c (set_nullable): Likewise.
333 * src/lalr.c (build_relations): Likewise.
334 * tests/sets.at (Nullable): Adjust.
335 Fortunately, now, the $axiom is no longer nullable.
337 2001-12-29 Akim Demaille <akim@epita.fr>
339 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
341 * src/gram.c (ritem_longest_rhs): Likewise.
342 * src/reduce.c (nonterminals_reduce): Likewise.
343 * src/print_graph.c (print_graph): Likewise.
344 * src/output.c (output_rule_data): Likewise.
345 * src/nullable.c (set_nullable): Likewise.
347 2001-12-29 Akim Demaille <akim@epita.fr>
349 * src/output.c: Comment changes.
351 2001-12-27 Paul Eggert <eggert@twinsun.com>
353 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
354 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
355 Sparc, as they were causing more porting problems than the
356 (minor) performance improvement was worth.
358 Also, catch up with 1.31's YYSTD.
360 2001-12-27 Akim Demaille <akim@epita.fr>
362 * src/output.c (output_gram): Rely on nritems, not the
363 0-sentinel. See below.
364 Use -1 as separator, not 0.
365 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
366 Rely on -1 as separator in yyrhs, instead of 0.
367 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
368 twice `Now at end of input', therefore there are two lines less to
371 2001-12-27 Akim Demaille <akim@epita.fr>
373 * tests/regression.at (Unresolved SR Conflicts):
374 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
377 2001-12-27 Akim Demaille <akim@epita.fr>
379 * src/LR0.c (new_state): Recognize the final state by the fact it
380 is reached by eoftoken.
381 (insert_start_shifting_state, insert_eof_shifting_state)
382 (insert_accepting_state, augment_automaton): Remove, since now
383 these states are automatically computed from the initial state.
384 (generate_states): Adjust.
385 * src/print.c: When reporting a rule number to the user, substract
386 1, so that the axiom rule is rule 0, and the first user rule is 1.
387 * src/reduce.c: Likewise.
388 * src/print_graph.c (print_core): For the time being, just as for
389 the report, depend upon --trace-flags to dump the full set of
391 * src/reader.c (readgram): Once the grammar read, insert the rule
392 0: `$axiom: START-SYMBOL $'.
393 * tests/set.at: Adjust: rule 0 is now displayed, and since the
394 number of the states has changed (the final state is no longer
395 necessarily the last), catch up.
397 2001-12-27 Akim Demaille <akim@epita.fr>
399 Try to make the use of the eoftoken valid. Given that its value
400 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
401 is used instead of > 0 where appropriate, (ii), depend upon nritems
402 instead of the 0-sentinel.
404 * src/gram.h, src/gram.c (nritems): New.
405 Expected to be duplication of nitems, but for the time being...
406 * src/reader.c (packgram): Assert nritems and nitems are equal.
407 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
408 * src/closure.c (print_closure, print_fderives): Likewise.
409 * src/gram.c (ritem_print): Likewise.
410 * src/print.c (print_core, print_grammar): Likewise.
411 * src/print_graph.c: Likewise.
413 2001-12-27 Akim Demaille <akim@epita.fr>
415 * src/main.c (main): If there are complains after grammar
416 reductions, then output the report anyway if requested, then die.
417 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
418 * src/reader.c (eoftoken): New.
419 (parse_token_decl): If the token being defined has value `0', it
421 (packsymbols): No longer hack `tags' to insert `$' by hand.
422 Be sure to preserve the value of the eoftoken.
423 (reader): Make sure eoftoken is defined.
424 Initialize nsyms to 0: now eoftoken is created just like the others.
425 * src/print.c (print_grammar): Don't special case the eof token.
426 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
427 lie anyway, albeit pleasant.
428 * tests/calc.at: Exercise error messages with eoftoken.
429 Change the grammar so that empty input is invalid.
431 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
433 2001-12-27 Akim Demaille <akim@epita.fr>
435 * configure.in: Check the protos of strchr ans strspn.
436 Replace strchr if needed.
437 * src/system.h: Provide the protos of strchr, strspn and memchr if
440 * src/reader.c (symbols_save): Use strchr.
442 2001-12-27 Akim Demaille <akim@epita.fr>
444 * src/print.c, src/print_graph.c (escape): New.
445 Use it to quote the TAGS outputs.
446 * src/print_graph.c (print_state): Now errors are in red, and
448 Prefer high to wide: output the state number on a line of its own.
450 2001-12-27 Akim Demaille <akim@epita.fr>
452 * src/state.h, src/state.c (reductions_new): New.
453 * src/LR0.c (set_state_table): Let all the states have a
454 `reductions', even if reduced to 0.
455 (save_reductions): Adjust.
456 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
457 * src/print.c (print_reductions, print_actions): Adjust.
458 * src/output.c (action_row): Adjust.
460 2001-12-27 Akim Demaille <akim@epita.fr>
462 * src/state.h, src/state.c (errs_new, errs_dup): New.
463 * src/LR0.c (set_state_table): Let all the states have an errs,
464 even if reduced to 0.
465 * src/print.c (print_errs, print_reductions): Adjust.
466 * src/output.c (output_actions, action_row): Adjust.
467 * src/conflicts.c (resolve_sr_conflict): Adjust.
469 2001-12-27 Akim Demaille <akim@epita.fr>
471 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
473 2001-12-27 Akim Demaille <akim@epita.fr>
475 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
477 (lookaheadset, shiftset): New, used as additional storage by
479 (print_results): Adjust.
480 (print_shifts, print_gotos, print_errs): New, extracted from...
481 (print_actions): here.
482 * src/print_graph.c (print_actions): Remove dead code.
484 2001-12-27 Akim Demaille <akim@epita.fr>
486 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
489 2001-12-27 Akim Demaille <akim@epita.fr>
491 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
492 (build_relations): Adjust.
494 2001-12-27 Akim Demaille <akim@epita.fr>
496 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
499 2001-12-27 Akim Demaille <akim@epita.fr>
501 * src/reader.c (packgram): Catch nitems overflows.
503 2001-12-27 Akim Demaille <akim@epita.fr>
505 * src/files.c, src/files.h (guard_obstack): Remove.
506 * src/output.c (output): Adjust.
507 * src/reader.c (parse_braces): New, factoring...
508 (copy_action, copy_guard): these two which are renamed as...
509 (parse_action, parse_guard): these.
510 As a voluntary consequence, using braces around guards is now
513 2001-12-27 Akim Demaille <akim@epita.fr>
515 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
516 * src/reader.c (symbol_list): `guard' and `guard_line' are new
518 (symbol_list_new): Adjust.
519 (copy_action): action_line is the first line, not the last.
520 (copy_guard): Just as for actions, store the `action' only, not
521 the switch/case/break flesh.
522 Don't parse the user action that might follow the guard, let...
523 (readgram): do it, i.e., now, there can be an action after a
525 In other words the guard is just explicitly optional.
527 * src/output.c (guards_output): New.
528 (output_parser): Call it when needed.
529 (output): Also free the guard and attrs obstacks.
530 * src/files.c, src/files.h (obstack_save): Remove.
531 (output_files): Remove.
532 As a result, if one needs the former `.act' file, using an
533 appropriate skeleton which requires actions and guards is now
535 * src/main.c (main): Adjust.
536 * tests/semantic.at: New.
537 * tests/regression.at: Use `input.y' as input file name.
538 Avoid 8+3 problems by requiring input.c when the test needs the
541 2001-12-27 Akim Demaille <akim@epita.fr>
543 * src/reader.c (symbol_list_new): Be sure to initialize all the
546 2001-12-27 Akim Demaille <akim@epita.fr>
548 All the hacks using a final pseudo state are now useless.
550 * src/LR0.c (set_state_table): state_table holds exactly nstates.
551 * src/lalr.c (nLA): New.
552 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
553 instead of lookaheadsp from the pseudo state (nstate + 1).
555 2001-12-27 Akim Demaille <akim@epita.fr>
557 * src/output.c (action_row, token_actions): Use a state_t instead
558 of a integer, and nlookaheads instead of the following state's
561 2001-12-27 Akim Demaille <akim@epita.fr>
563 * src/conflicts.c (log_resolution, flush_shift)
564 (resolve_sr_conflict, set_conflicts, solve_conflicts)
565 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
566 (conflicts_print, print_reductions): Use a state_t instead of an
567 integer when referring to a state.
568 As much as possible, depend upon nlookaheads, instead of the
569 `lookaheadsp' member of the following state (since lookaheads of
570 successive states are successive, the difference between state n + 1
571 and n served as the number of lookaheads for state n).
572 * src/lalr.c (add_lookback_edge): Likewise.
573 * src/print.c (print_core, print_actions, print_state)
574 (print_results): Likewise.
575 * src/print_graph.c (print_core, print_actions, print_state)
576 (print_graph): Likewise.
577 * src/conflicts.h: Adjust.
579 2001-12-27 Akim Demaille <akim@epita.fr>
581 * src/bison.hairy: Formatting/comment changes.
583 Remove `register' indications.
584 Add plenty of `static'.
586 2001-12-27 Akim Demaille <akim@epita.fr>
588 * src/output.c (prepare): Drop the muscle `ntbase' which
590 * src/bison.simple: Formatting/comment changes.
591 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
592 is an undocumented synonym.
594 2001-12-22 Akim Demaille <akim@epita.fr>
596 * src/output.c (output_table_data): Change the prototype to use
597 `int' for array ranges: some invocations do pass an int, not a
599 Reported by Wayne Green.
601 2001-12-22 Akim Demaille <akim@epita.fr>
603 Some actions of web2c.y are improperly triggered.
604 Reported by Mike Castle.
606 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
607 * tests/regression.at (Web2c): Rename as...
608 (Web2c Report): this.
609 (Web2c Actions): New.
611 2001-12-22 Akim Demaille <akim@epita.fr>
613 Reductions in web2c.y are improperly reported.
614 Reported by Mike Castle.
616 * src/conflicts.c (print_reductions): Fix.
617 * tests/regression.at (Web2c): New.
619 2001-12-18 Akim Demaille <akim@epita.fr>
621 Some host fail on `assert (!"foo")', which expands to
622 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
623 Reported by Nelson Beebee.
625 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
626 `#define it_succeeded 0' and `assert (it_succeeded)'.
628 2001-12-17 Marc Autret <autret_m@epita.fr>
630 * src/bison.simple: Don't hard code the skeleton line and filename.
631 * src/output.c (output_parser): Rename 'line' as 'output_line'.
632 New line counter 'skeleton_line' (skeleton-line muscle).
634 2001-12-17 Paul Eggert <eggert@twinsun.com>
636 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
637 YYDEBUG must be defined to a nonzero value.
639 * src/bison.simple (yytname): Do not assume that the user defines
640 YYDEBUG to a properly parenthesized expression.
642 2001-12-17 Akim Demaille <akim@epita.fr>
644 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
645 nlookaheads is a new member.
647 * src/lalr.h (nlookaheads): Remove this orphan declaration.
648 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
651 2001-12-17 Akim Demaille <akim@epita.fr>
653 * src/files.h, src/files.c (open_files, close_files): Remove.
654 * src/main.c (main): Don't open/close files, nor invoke lex_free,
656 * src/reader.c (reader): Do it.
658 2001-12-17 Akim Demaille <akim@epita.fr>
660 * src/conflicts.c (print_reductions): Formatting changes.
662 2001-12-17 Akim Demaille <akim@epita.fr>
664 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
666 (resolve_sr_conflict): Adjust.
668 2001-12-17 Akim Demaille <akim@epita.fr>
670 * src/output.c (output_obstack): Be static and rename as...
671 (format_obstack): this, to avoid any confusion with files.c's
673 * src/reader.h (muscle_obstack): Move to...
674 * src/output.h: here, since it's defined in output.c.
676 2001-12-17 Akim Demaille <akim@epita.fr>
678 * src/output.c (action_row, save_column, default_goto)
679 (sort_actions, matching_state, pack_vector): Better variable
682 2001-12-17 Akim Demaille <akim@epita.fr>
684 * src/output.c: Various formatting changes.
686 2001-12-17 Akim Demaille <akim@epita.fr>
688 * src/files.c (output_files): Free the output_obstack.
689 * src/main.c (main): Call print and print_graph conditionally.
690 * src/print.c (print): Work unconditionally.
691 * src/print_graph.c (print_graph): Work unconditionally.
692 * src/conflicts.c (log_resolution): Output only if verbose_flag.
694 2001-12-16 Marc Autret <autret_m@epita.fr>
696 * src/output.c (actions_output): Fix. When we use %no-lines,
697 there is one less line per action.
699 2001-12-16 Marc Autret <autret_m@epita.fr>
701 * src/bison.simple: Remove a useless #line directive.
702 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
703 * src/output.c (get_lines_number): New.
704 (output_parser): Adjust, now takes care about the lines of a
707 (actions_output): Computes the number of lines taken by actions.
708 (output_master_parser): Insert new skeleton which is the name of
709 the output parser file name.
711 2001-12-15 Marc Autret <autret_m@epita.fr>
713 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
715 2001-12-15 Marc Autret <autret_m@epita.fr>
717 * src/output.c (output_gram): Keep track of the hairy one.
719 2001-12-15 Akim Demaille <akim@epita.fr>
721 Make `make distcheck' work.
723 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
724 system.h which uses libgettext.h.
726 2001-12-15 Akim Demaille <akim@epita.fr>
728 * src/nullable.c (set_nullable): Useless rules must be skipped,
729 otherwise, since we range over their symbols, we might look at a
730 nonterminal which no longer ``exists'', i.e., it is not counted in
731 `nvars', hence we overflow our arrays.
733 2001-12-15 Akim Demaille <akim@epita.fr>
735 The header can also be produced directly, without any obstack!
738 * src/files.c, src/files.h (defines_obstack): Remove.
739 (compute_header_macro): Global.
740 (defines_obstack_save): Remove.
741 * src/reader.c (parse_union_decl): No longer output to
742 defines_obstack: its content can be found in the `stype' muscle
744 (output_token_translations): Merge into...
745 (symbols_output): this.
747 (symbols_save): this.
749 * src/output.c (header_output): New.
752 2001-12-15 Akim Demaille <akim@epita.fr>
754 * src/reader.c (parse_union_decl): Instead of handling two obstack
755 simultaneously, use one to define the `stype' muscle, and use the
756 value of the latter to fill defines_obstack.
757 (copy_comment): Remove.
758 (copy_comment2): Work for a single obstack.
760 (copy_comment): this.
762 2001-12-15 Akim Demaille <akim@epita.fr>
764 * src/lex.c, src/lex.h (xgetc): No longer static.
765 * src/reader.c (parse_union_decl): Revamp.
767 2001-12-15 Akim Demaille <akim@epita.fr>
769 Still making progress in separating Bison into (i) input, (ii)
770 process, (iii) output: now we can directly output the parser file
771 without using table_obstack at all.
773 * src/files.c, src/files.h (table_obstack): Bye bye.
774 (parser_file_name): New.
775 * src/files.c (compute_output_file_names): Compute it.
776 * src/output.c (actions_output, output_parser)
777 (output_master_parser): To a file instead of an obstack.
779 2001-12-15 Akim Demaille <akim@epita.fr>
781 Attach actions to rules, instead of pre-outputting them to
784 * src/gram.h (rule_t): action and action_line are new members.
785 * src/reader.c (symbol_list): Likewise.
786 (copy_action): Save the actions within the rule.
787 (packgram): Save them in rule_table.
788 * src/output.c (actions_output): New.
789 (output_parser): Use it on `%%actions'.
790 (output_rule_data): Don't free rule_table.
792 (prepare): Don't save the `action' muscle.
793 * src/bison.simple: s/%%action/%%actions/.
795 2001-12-15 Akim Demaille <akim@epita.fr>
797 * src/reader.c (copy_action): When --yacc, don't append a `;'
798 to the user action: let it fail if lacking.
799 Suggested by Arnold Robbins and Tom Tromey.
801 2001-12-14 Akim Demaille <akim@epita.fr>
803 * src/lex.c (literalchar): Simply return the char you decoded, non
804 longer mess around with obstacks and int pointers.
807 2001-12-14 Akim Demaille <akim@epita.fr>
809 * src/lex.c (literalchar): Don't escape the special characters,
810 just decode them, and keep them as char (before, eol was output as
811 the 2 char string `\n' etc.).
812 * src/output.c (output_rule_data): Use quotearg to output the
815 2001-12-13 Paul Eggert <eggert@twinsun.com>
817 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
818 Do not infringe on the global user namespace when using C++.
819 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
820 All uses of `fprintf' and `stderr' changed.
822 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
824 2001-12-13 Akim Demaille <akim@epita.fr>
826 The computation of nullable is broken: it doesn't handle empty
829 * tests/torture.at (GNU AWK Grammar): New.
830 * tests/sets.at (Nullable): New.
831 * src/nullable.c (set_nullable): Instead of blindly looping over
832 `ritems', loop over the rules, and then over their rhs's.
834 Work around Autotest bugs.
836 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
837 frame, because Autotest understand lines starting with a `+' as
838 traces from the shell. Then, they are not processed properly.
839 Admittedly an Autotest bug, but we don't have time to wait for
840 Autotest to catch up.
841 * tests/regression.at (Broken Closure): Adjust to the new table
844 * tests/sets.at: here.
846 2001-12-13 Akim Demaille <akim@epita.fr>
848 * src/closure.c (closure): Use nrules instead of playing tricks
851 2001-12-13 Akim Demaille <akim@epita.fr>
853 * src/print.c (print_actions): Output the handling of `$' as the
854 traces do: shifting the token EOF. Before EOF was treated as a
856 * tests/regression.at: Adjust some tests.
857 * src/print_graph.c (print_core): Complete the set of items via
858 closure. The next-to-final and final states are still unsatisfying,
859 but that's to be addressed elsewhere.
860 No longer output the rule numbers, but do output the state number.
861 A single loop for the shifts + gotos is enough, but picked a
862 distinct color for each.
863 (print_graph): Initialize and finalize closure.
865 2001-12-13 Akim Demaille <akim@epita.fr>
867 * src/reader.c (readgram): Remove dead code, an strip useless
869 (get_type): Remove, unused.
871 2001-12-12 Akim Demaille <akim@epita.fr>
873 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
874 on that of lib/error.c.
876 2001-12-12 Akim Demaille <akim@epita.fr>
878 Some hosts don't like `/' in includes.
880 * src/system.h: Include libgettext.h without qualifying the path.
881 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
884 2001-12-11 Marc Autret <autret_m@epita.fr>
886 * src/output.c (output_parser): Remove useless muscle.
888 2001-12-11 Marc Autret <autret_m@epita.fr>
890 * src/bison.simple: Remove #line just before %%epilogue. It
891 is now handled in ...
892 * src/reader.c (read_additionnal_code): Add the output of a
893 #line for the epilogue.
895 2001-12-10 Marc Autret <autret_m@epita.fr>
897 * src/reader.c (copy_definition): Re-use CPP-outed code which
898 replace precedent remove.
899 * src/bison.simple: Remove #line before %%prologue because
900 %%input-line is wrong at this time.
902 2001-12-10 Marc Autret <autret_m@epita.fr>
904 * src/reader.c (symbols_output): Clean up.
905 * src/output.c (output_gram, output): Clean up.
907 2001-12-10 Akim Demaille <akim@epita.fr>
909 * src/lalr.c (initialize_lookaheads): New. Extracted from...
910 * src/LR0.c (set_state_table): here.
911 * src/lalr.c (lalr): Call it.
913 2001-12-10 Akim Demaille <akim@epita.fr>
915 * src/state.h (shifts): Remove the `number' member: shifts are
916 attached to state, hence no longer need to be labelled with a
919 2001-12-10 Akim Demaille <akim@epita.fr>
921 Now that states have a complete set of members, the linked list of
922 shifts is useless: just fill directly the state's shifts member.
924 * src/state.h (shifts): Remove the `next' member.
925 * src/LR0.c (first_state, last_state): Remove.
927 (augment_automaton): Don't look for the shifts that must be added
928 a shift on EOF: it is those of the state we looked for! But now,
929 since shifts are attached, it is no longer needed to looking
930 merely by its id: its number.
932 2001-12-10 Akim Demaille <akim@epita.fr>
934 * src/LR0.c (augment_automaton): Better variable locality.
935 Remove an impossible branch: if there is a state corresponding to
936 the start symbol being shifted, then there is shift for the start
937 symbol from the initial state.
939 2001-12-10 Akim Demaille <akim@epita.fr>
941 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
942 only when appropriate: when insert_start_shifting_state' is not
944 * tests/regression.at (Rule Line Numbers): Adjust.
946 2001-12-10 Akim Demaille <akim@epita.fr>
948 * src/LR0.c (augment_automaton): Now that all states have shifts,
949 merge the two cases addition shifts to the initial state.
951 2001-12-10 Akim Demaille <akim@epita.fr>
953 * src/lalr.c (set_state_table): Move to...
955 * src/lalr.c (lalr): Don't call it...
956 * src/LR0.c (generate_states): do it.
957 * src/LR0.h (first_state): Remove, only the table is used.
959 2001-12-10 Akim Demaille <akim@epita.fr>
961 * src/LR0.h (first_shift, first_reduction): Remove.
962 * src/lalr.c: Don't use first_shift: find shifts through the
965 2001-12-10 Akim Demaille <akim@epita.fr>
967 * src/LR0.c: Attach shifts to states as soon as they are
969 * src/lalr.c (set_state_table): Instead of assigning shifts to
970 state, just assert that the mapping was properly done.
972 2001-12-10 Akim Demaille <akim@epita.fr>
974 * src/LR0.c (insert_start_shift): Rename as...
975 (insert_start_shifting_state): this.
976 (insert_eof_shifting_state, insert_accepting_state): New.
977 (augment_automaton): Adjust.
978 Better locality of the variables.
979 When looking if the start_symbol is shifted from the initial
980 state, using `while (... symbol != start_symbol ...)' sounds
981 better than `while (... symbol < start_symbol ...)': If fail
982 to see how the order between symbols could be relevant!
984 2001-12-10 Akim Demaille <akim@epita.fr>
986 * src/getargs.h: Don't declare `spec_name_prefix' and
987 `spec_file_prefix', declared by src/files.h.
988 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
989 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
990 * src/output.c (prepare): Adjust.
991 * src/reader.c (symbols_output): Likewise.
992 * src/vmsgetargs.c: Vaguely adjust, but who cares?
994 2001-12-10 Akim Demaille <akim@epita.fr>
996 * src/muscle_tab.c (muscle_init): NULL is a better default than
999 2001-12-10 Akim Demaille <akim@epita.fr>
1001 * src/reader.c (reader): Calling symbols_output once is enough.
1003 2001-12-10 Akim Demaille <akim@epita.fr>
1005 Now that states have a complete set of members, the linked list of
1006 reductions is useless: just fill directly the state's reductions
1009 * src/state.h (struct reductions): Remove member `number' and
1011 * src/LR0.c (first_reduction, last_reduction): Remove.
1012 (save_reductions): Don't link the new reductions, store them in
1014 * src/lalr.c (set_state_table): No need to attach reductions to
1015 states, it's already done.
1016 * src/output.c (output_actions): No longer free the shifts, then
1017 the reductions, then the states: free all the states and their
1020 2001-12-10 Akim Demaille <akim@epita.fr>
1022 * src/options.c (OPTN, DRTV, BOTH): New.
1023 (option_table): Use them.
1025 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1026 the job of system.h.
1027 * src/options.c: Don't include stdio.h and xalloc.h for the same
1030 2001-12-10 Akim Demaille <akim@epita.fr>
1032 * src/output.c (output, prepare): Make sure the values of the
1033 muscles `action' and `prologue' are 0-terminated.
1035 2001-12-10 Akim Demaille <akim@epita.fr>
1037 Clean up GCC warnings.
1039 * src/reader.c (copy_action): `buf' is not used.
1040 (parse_skel_decl): Be static.
1041 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1042 * src/options.h (create_long_option_table): Have a real prototype.
1043 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1044 (hash_delete_at): Return const void *.
1045 Adjust casts to preserve the const.
1047 2001-12-10 Akim Demaille <akim@epita.fr>
1049 * configure.in: Require 2.52g.
1050 M4 is not needed, but AUTOM4TE is.
1052 * tests/Makefile.am: Adjust.
1054 2001-12-10 Akim Demaille <akim@epita.fr>
1056 One structure for states is enough, even though theoretically
1057 there are LR(0) states and LALR(1) states.
1059 * src/lalr.h (state_t): Remove.
1060 (state_table): Be state_t **, not state_t *.
1061 * src/state.h (core, CORE_ALLOC): Rename as...
1062 (state_t, STATE_ALLOC): this.
1063 Add the LALR(1) members: shifts, reductions, errs.
1064 * src/LR0.c (state_table): Rename as...
1065 (state_hash): this, to avoid name clashes with the global
1067 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1068 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1070 2001-12-10 Akim Demaille <akim@epita.fr>
1072 Bison dumps core on bash.y.
1073 Reported by Pascal Bart.
1075 * src/warshall.c (bitmatrix_print): New.
1077 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1078 j must be the outer loop.
1079 * tests/regression.at (Broken Closure): New.
1081 2001-12-05 Akim Demaille <akim@epita.fr>
1083 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1085 Reported by Peter Hámorský.
1087 2001-12-05 Akim Demaille <akim@epita.fr>
1089 * src/conflicts.c (err_table): Remove.
1090 (resolve_sr_conflict): Adjust.
1091 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1093 (state_t.reductions, state_t.shifts): this.
1095 2001-12-05 Akim Demaille <akim@epita.fr>
1097 * src/reduce.c (reduce_grammar_tables): No longer disable the
1098 removal of useless rules via CPP but via `if (0)', so that the
1099 compiler still check the code is valid.
1100 For instance, it should have noticed `rline' no longer exists: use
1101 the `line' member of rule_t.
1102 * src/gram.c (dummy, rline): Remove, unused.
1104 2001-12-05 Akim Demaille <akim@epita.fr>
1106 * src/output.c (pack_vector): Use assert, not berror.
1107 * src/main.c (berror): Remove, unused.
1109 2001-12-05 Akim Demaille <akim@epita.fr>
1111 New experimental feature: if --verbose --trace output all the
1112 items of a state, not only its kernel.
1114 * src/print.c (print_core): If `trace_flag', then invoke closure
1115 before outputting the items of the state (print_core is no longer
1116 a correct name them).
1117 (print_results): Invoke new_closure/free_closure if needed.
1119 2001-12-05 Akim Demaille <akim@epita.fr>
1121 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1122 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1123 (nitemset): for consistency with the rest of the project.
1125 2001-12-05 Akim Demaille <akim@epita.fr>
1127 * src/closure.c (print_closure): Improve.
1128 (closure): Use it for printing input and output.
1130 2001-12-05 Akim Demaille <akim@epita.fr>
1132 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1133 indexed by nonterminals.
1135 2001-12-05 Akim Demaille <akim@epita.fr>
1137 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1139 * src/warshall.h: Remove accidental duplication of the content.
1141 2001-12-05 Akim Demaille <akim@epita.fr>
1143 * src/closure.c (set_fderives): De-obfuscate.
1145 2001-12-05 Akim Demaille <akim@epita.fr>
1147 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1149 2001-12-05 Akim Demaille <akim@epita.fr>
1151 * src/closure.c (set_firsts): De-obfuscate.
1153 2001-12-05 Akim Demaille <akim@epita.fr>
1155 * src/output.c (action_row): De-obfuscate
1156 using the good o' techniques: arrays not pointers, variable
1157 locality, BITISSET, RESETBIT etc.
1159 2001-12-05 Akim Demaille <akim@epita.fr>
1161 Pessimize the code to simplify it: from now on, all the states
1162 have a valid SHIFTS, which NSHIFTS is possibly 0.
1164 * src/LR0.c (shifts_new): Be global and move to..
1165 * src/state.c, src/state.h: here.
1166 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1167 * src/print_graph: Adjust.
1169 2001-12-05 Akim Demaille <akim@epita.fr>
1171 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1172 * src/conflicts.c: Use it.
1173 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1174 incorrectly ``simplified''.
1176 2001-12-05 Akim Demaille <akim@epita.fr>
1178 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1179 using the good o' techniques: arrays not pointers, variable
1180 locality, BITISSET, RESETBIT etc.
1182 2001-12-05 Akim Demaille <akim@epita.fr>
1184 * src/state.h (SHIFT_SYMBOL): New.
1185 * src/conflicts.c: Use it to deobfuscate.
1187 2001-12-05 Akim Demaille <akim@epita.fr>
1189 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1190 (print_reductions): De-obfuscate using the good o' techniques:
1191 arrays not pointers, variable locality, BITISSET.
1193 2001-12-05 Akim Demaille <akim@epita.fr>
1195 * src/conflicts.c (print_reductions): Arrays, not pointers.
1198 2001-12-05 Akim Demaille <akim@epita.fr>
1200 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1202 2001-12-05 Akim Demaille <akim@epita.fr>
1204 * src/conflicts.c (print_reductions): Improve variable locality.
1206 2001-12-05 Akim Demaille <akim@epita.fr>
1208 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1210 2001-12-05 Akim Demaille <akim@epita.fr>
1212 * src/conflicts.c (print_reductions): Improve variable locality.
1214 2001-12-05 Akim Demaille <akim@epita.fr>
1216 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1217 * src/lalr.c: Use them.
1219 2001-12-05 Akim Demaille <akim@epita.fr>
1221 * src/LR0.c (augment_automaton): Formatting changes.
1222 Better variable locality.
1224 2001-12-05 Akim Demaille <akim@epita.fr>
1226 * src/lalr.c (matrix_print): New.
1227 (transpose): Use it.
1228 Use arrays instead of pointers.
1230 2001-12-05 Akim Demaille <akim@epita.fr>
1232 * src/lalr.c (maxrhs): Move to...
1233 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1234 * src/lalr.c (build_relations): Adjust.
1236 2001-12-05 Akim Demaille <akim@epita.fr>
1238 * src/lalr.c (transpose): Free the memory allocated to the
1239 argument, as it is replaced by the results by the unique caller.
1240 (build_relations): Merely invoke transpose: it handles the memory
1242 Improve variable locality.
1243 Avoid variables used as mere abbreviations.
1244 (compute_lookaheads): Use arrays instead of pointers.
1246 2001-12-05 Akim Demaille <akim@epita.fr>
1248 * src/lalr.c (initialize_F): Improve variable locality.
1249 Avoid variables used as mere abbreviations.
1251 2001-12-05 Akim Demaille <akim@epita.fr>
1253 * src/derives.c (print_derives): Display the ruleno.
1254 * src/lalr.c (initialize_F, transpose): Better variable locality
1255 to improve readability.
1256 Avoid variables used as mere abbreviations.
1258 2001-12-05 Akim Demaille <akim@epita.fr>
1260 * src/lalr.c (traverse): Use arrays instead of pointers.
1262 2001-12-05 Akim Demaille <akim@epita.fr>
1264 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1265 the handling of squeue.
1266 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1268 2001-12-05 Akim Demaille <akim@epita.fr>
1270 Because useless nonterminals are now kept alive (instead of being
1271 `destroyed'), we now sometimes examine them, and store information
1272 related to them. Hence we need to know their number, and adjust
1275 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1277 * src/LR0.c (allocate_itemsets): The memory allocated to
1278 `symbol_count' was used for two different purpose: once to count
1279 the number of occurrences of each symbol, and later reassigned to
1280 `shift_symbol', containing the symbol that can be shifted from a
1282 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1284 (new_itemsets): Allocate `shift_symbol' here.
1285 (allocate_itemsets): symbol_count includes useless nonterminals.
1287 (free_storage): Use `free', not `XFREE', for pointers that cannot
1290 2001-12-05 Akim Demaille <akim@epita.fr>
1292 * src/nullable.c (set_nullable): Deobfuscate the handling of
1294 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1296 2001-12-05 Akim Demaille <akim@epita.fr>
1298 * src/gram.c, src/gram.h (ritem_print): New.
1299 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1300 (This useless function was defined only to work around VMS linkers
1301 that can't handle compilation units with variables only).
1302 * src/reduce.c (dump_grammar): Use it to trace the construction of
1305 2001-12-04 Paul Eggert <eggert@twinsun.com>
1307 * src/bison.simple (union yyalloc): Change member names
1308 to be the same as the stack names.
1309 (yyparse): yyptr is now union yyalloc *, not char *.
1310 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1311 and may generate better code on some machines.
1312 (yystpcpy): Use prototype if __STDC__ is defined, not just
1313 if __cplusplus is defined.
1315 2001-11-30 Akim Demaille <akim@epita.fr>
1317 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1318 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1319 Gettext doesn't compile cleanly, and dies with -Werror.
1320 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1321 Include WARNING_CFLAGS here.
1322 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1323 before being defined.
1325 2001-11-27 Paul Eggert <eggert@twinsun.com>
1327 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1328 First arg is int, not unsigned.
1329 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1330 (SIZE_MAX, UINT_MAX): New macros.
1331 (quotearg_n_options): Abort if N is negative.
1332 Avoid overflow check on hosts where size_t is 64 bits and int
1333 is 32 bits, as overflow is impossible there.
1334 Fix off-by-one typo that caused unnecessary reallocation.
1336 2001-11-29 Paul Eggert <eggert@twinsun.com>
1338 Name space cleanup in generated parser.
1340 * doc/bison.texinfo (Bison Parser): Discuss system headers
1341 and their effect on the user name space.
1344 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1345 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1346 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1348 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1349 on user names when possible.
1351 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1352 Simplify test for whather <alloca.h> exists.
1354 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1356 (<stdio.h>): Include if YYDEBUG.
1358 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1359 ! defined (yyoverflow) && ! defined (yymemcpy).
1361 (yymemcpy, yyparse): Rename local variables as needed so that
1362 they all begin with 'yy'.
1364 (yystrlen, yystpcpy): New functions.
1366 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1369 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1370 instead of relying on string.h functions. Use YYSTACK_ALLOC
1371 and YYSTACK_FREE instead of malloc and free.
1373 2001-11-30 Akim Demaille <akim@epita.fr>
1375 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1376 before their first uses.
1377 (YYBISON, YYPURE): Move to the top of the output.
1379 2001-11-30 Akim Demaille <akim@epita.fr>
1381 * tests/reduce.at (Useless Nonterminals): Fix.
1383 2001-11-30 Akim Demaille <akim@epita.fr>
1385 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1386 if body instead of `;' to pacify GCC's warnings.
1388 2001-11-30 Akim Demaille <akim@epita.fr>
1390 Instead of mapping the LHS of unused rules to -1, keep the LHS
1391 valid, but flag the rules as invalid.
1393 * src/gram.h (rule_t): `useful' is a new member.
1394 * src/print.c (print_grammar): Adjust.
1395 * src/derives.c (set_derives): Likewise.
1396 * src/reader.c (packgram, reduce_output): Likewise.
1397 * src/reduce.c (reduce_grammar_tables): Likewise.
1398 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1400 2001-11-30 Akim Demaille <akim@epita.fr>
1402 * src/reduce.c (reduce_output): Formatting changes.
1403 * src/print.c (print_results, print_grammar): Likewise.
1404 * tests/regression.at (Rule Line Numbers)
1405 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1407 2001-11-30 Akim Demaille <akim@epita.fr>
1409 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1410 useless nonterminals, move them at the end of the symbol arrays.
1411 (reduce_output): Adjust.
1412 * tests/reduce.at (Useless Nonterminals): Adjust.
1414 2001-11-30 Akim Demaille <akim@epita.fr>
1416 * src/reduce.c: Various comment/formatting changes.
1417 (nonterminals_reduce): New, extracted from...
1418 (reduce_grammar_tables): here.
1419 (reduce_grammar): Call nonterminals_reduce.
1421 2001-11-29 Paul Eggert <eggert@twinsun.com>
1423 * src/bison.simple (YYSTACK_REALLOC): Remove.
1424 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
1425 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
1427 (union yyalloc): New type.
1428 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
1429 an arbitrary restriction on hosts where size_t is wider than int.
1431 (yyparse): Don't dump core if alloca or malloc fails; instead, report
1432 a parser stack overflow. Allocate just one block of memory for all
1433 three stacks, instead of allocating three blocks; this typically is
1434 faster and reduces fragmentation.
1436 Do not limit the number of items in the stack to a value that fits
1437 in 'int', as this is an arbitrary limit on hosts with 64-bit
1438 size_t and 32-bit int.
1440 2001-11-29 Marc Autret <autret_m@epita.fr>
1442 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
1443 of defining YYERROR_VERBOSE.
1444 [AT_DATA]: $4 is now out of C declarations in the prologue.
1446 2001-11-28 Marc Autret <autret_m@epita.fr>
1448 * src/reader.c (parse_dquoted_param): New.
1449 (parse_skel_decl): Use it.
1450 * src/lex.h: Add its prototype.
1451 * src/lex.c (literalchar): Become not static.
1453 2001-11-28 Marc Autret <autret_m@epita.fr>
1455 * src/output.h: And put its extern declaration here.
1456 * src/output.c (error_verbose): Define here.
1457 (prepare): Echo name modification.
1458 * src/getargs.h: Clean its extern declaration.
1459 * src/getargs.c (error_verbose_flag): Remove.
1460 (getargs): Remove case 'e'.
1461 * src/options.c (option_table): 'error-verbose' is now seen as simple
1465 * src/reader.c (read_declarations): Remove case tok_include.
1466 (parse_include_decl): Remove.
1467 * src/lex.h (token_t): Remove tok_include.
1468 * src/options.c (option_table): 'include' is now a simple command line
1471 2001-11-28 Marc Autret <autret_m@epita.fr>
1473 * src/bison.simple: Adjust muscle names.
1474 * src/muscle_tab.c (muscle_init): Also rename the muscles.
1475 * src/output.c (prepare): s/_/-/ for the muscles names.
1476 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
1478 2001-11-28 Marc Autret <autret_m@epita.fr>
1480 * src/bison.simple: Fix debug.
1481 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
1483 2001-11-28 Akim Demaille <akim@epita.fr>
1485 * src/LR0.c (shifts_new): New.
1486 (save_shifts, insert_start_shift, augment_automaton): Use it.
1488 2001-11-28 Akim Demaille <akim@epita.fr>
1490 * src/closure.c (closure): `b' and `ruleno' denote the same value:
1493 2001-11-28 Akim Demaille <akim@epita.fr>
1495 * src/closure.c (closure): Instead of looping over word in array
1496 then bits in words, loop over bits in array.
1498 2001-11-28 Akim Demaille <akim@epita.fr>
1500 * src/closure.c (closure): No longer optimize the special case
1501 where all the bits of `ruleset[r]' are set to 0, to make the code
1504 2001-11-28 Akim Demaille <akim@epita.fr>
1506 * src/closure.c (closure): `r' and `c' are new variables, used to
1507 de-obfuscate accesses to RULESET and CORE.
1509 2001-11-28 Akim Demaille <akim@epita.fr>
1511 * src/reduce.c (reduce_print): Use ngettext.
1512 (dump_grammar): Improve the trace accuracy.
1514 2001-11-28 Akim Demaille <akim@epita.fr>
1516 * src/reduce.c (dump_grammar): Don't translate trace messages.
1518 2001-11-28 Akim Demaille <akim@epita.fr>
1520 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
1521 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
1522 as all tags are free'ed afterwards.
1525 2001-11-27 Paul Eggert <eggert@twinsun.com>
1527 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
1528 use alloca when we didn't want to, and vice versa.
1530 2001-11-27 Marc Autret <autret_m@epita.fr>
1532 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
1534 * src/output.c (prepare): Remove its update.
1536 2001-11-27 Marc Autret <autret_m@epita.fr>
1538 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
1541 2001-11-27 Marc Autret <autret_m@epita.fr>
1543 * src/bison.simple: Remove YYERROR_VERBOSE using.
1544 Use %%error_verbose.
1545 (yyparse): Likewise.
1546 * src/output.c (prepare): Give its final value.
1547 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
1548 * src/getargs.h: Add its extern declaration.
1549 * src/getargs.c (error_verbose_flag): New int.
1550 (getargs): Update to catch new case.
1551 * src/options.c (option_table): 'error-verbose' is a new option.
1552 (shortopts): Update.
1554 2001-11-27 Akim Demaille <akim@epita.fr>
1556 * src/system.h: Use intl/libgettext.h.
1557 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
1559 2001-11-27 Akim Demaille <akim@epita.fr>
1561 * tests/torture.at (Exploding the Stack Size with Malloc):
1562 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
1564 2001-11-27 Akim Demaille <akim@epita.fr>
1566 * src/files.c: Include error.h.
1567 Reported by Hans Aberg.
1569 2001-11-26 Marc Autret <autret_m@epita.fr>
1571 * src/reader.c (parse_include_decl): New, not yet implemented.
1572 (read_declarations): Add case tok_include.
1573 * src/getargs.h (include): Add its extern definition.
1574 * src/getargs.c (include): New const char *.
1575 (getargs): Add case '-I'.
1576 * src/options.c (option_table): Add include as command line and
1578 * src/lex.h (token_t): Add tok_include.
1580 2001-11-26 Akim Demaille <akim@epita.fr>
1582 * src/reader.c (readgram): Make sure rules for mid-rule actions
1583 have a lineno equal to that of their host rule.
1584 Reported by Hans Aberg.
1585 * tests/regression.at (Rule Line Numbers): New.
1587 2001-11-26 Akim Demaille <akim@epita.fr>
1589 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
1592 2001-11-26 Akim Demaille <akim@epita.fr>
1594 * src/complain.c, src/complain.h (error): Remove, provided by
1597 2001-11-26 Akim Demaille <akim@epita.fr>
1599 * src/reader.c (read_declarations): Don't abort on tok_illegal,
1600 issue an error message.
1601 * tests/regression.at (Invalid %directive): New.
1602 Reported by Hans Aberg.
1604 2001-11-26 Akim Demaille <akim@epita.fr>
1606 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
1607 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1609 2001-11-26 Akim Demaille <akim@epita.fr>
1611 * src/conflicts.c (conflicts_print): Don't complain at all when
1612 there are no reduce/reduce conflicts, and as many shift/reduce
1613 conflicts as expected.
1614 * tests/regression.at (%expect right): Adjust.
1616 2001-11-23 Akim Demaille <akim@epita.fr>
1618 * lib/alloca.c: Update, from fileutils.
1620 2001-11-23 Akim Demaille <akim@epita.fr>
1622 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
1624 2001-11-23 Akim Demaille <akim@epita.fr>
1626 * src/system.h: Include alloca.h.
1627 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
1629 2001-11-23 Akim Demaille <akim@epita.fr>
1631 * src/print_graph.c (print_actions): Remove `rule', unused.
1632 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
1633 pacify GCC's signed < unsigned warnings.
1634 * src/closure.c (itemsetsize): Likewise.
1635 * src/reader.c (symbol_list_new): Static.
1637 2001-11-23 Akim Demaille <akim@epita.fr>
1639 Attaching lineno to buckets is stupid, since only one copy of each
1640 symbol is kept, only the line of the first occurrence is kept too.
1642 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
1643 * src/reader.c (rline_allocated): Remove, unused.
1644 (symbol_list): Have a `line' member.
1645 (symbol_list_new): New.
1647 * src/print.c (print_grammar): Output the rule line numbers.
1648 * tests/regression.at (Solved SR Conflicts)
1649 (Unresolved SR Conflicts): Adjust.
1650 Reported by Hans Aberg.
1652 2001-11-22 Marc Autret <autret_m@epita.fr>
1654 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
1656 2001-11-22 Marc Autret <autret_m@epita.fr>
1658 * src/muscle_tab.c (muscle_init): Remove initialization of
1660 * src/output.c (output_master_parser): Do it here.
1662 2001-11-20 Akim Demaille <akim@epita.fr>
1665 * configure.in (ALL_LINGUAS): Adjust.
1666 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
1667 longer contains strings to translate.
1669 2001-11-19 Akim Demaille <akim@epita.fr>
1671 * src/conflicts.c (conflicts_print): Add a missing \n.
1673 2001-11-19 Akim Demaille <akim@epita.fr>
1675 * src/nullable.c (nullable_print): New.
1676 (set_nullable): Call it when tracing.
1677 Better locality of variables.
1679 2001-11-19 Akim Demaille <akim@epita.fr>
1681 * src/print.c (print_actions): Better locality of variables.
1683 2001-11-19 Akim Demaille <akim@epita.fr>
1685 * src/derives.c (print_derives): Fix and enrich.
1686 * src/closure.c (print_fderives): Likewise.
1688 2001-11-19 Akim Demaille <akim@epita.fr>
1690 * src/closure.c (itemsetend): Remove, replaced with...
1693 2001-11-19 Akim Demaille <akim@epita.fr>
1695 * src/LR0.c (kernel_end): Remove, replaced with...
1698 2001-11-19 Akim Demaille <akim@epita.fr>
1700 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
1703 2001-11-19 Akim Demaille <akim@epita.fr>
1705 * src/closure.c (closure): Use arrays instead of pointers to clarify.
1707 2001-11-19 Akim Demaille <akim@epita.fr>
1709 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
1711 * src/LR0.c: Likewise.
1712 (allocate_itemsets): Use arrays instead of pointers to clarify.
1714 2001-11-19 Akim Demaille <akim@epita.fr>
1716 * src/getargs.c (statistics_flag): Replace with...
1718 (longopts): Accept --trace instead of --statistics.
1719 * src/getargs.h, src/options.c: Adjust.
1720 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
1721 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
1723 2001-11-19 Akim Demaille <akim@epita.fr>
1725 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
1726 pointers to clarify the code.
1727 (save_reductions, save_shifts): Factor common parts of alternatives.
1729 2001-11-19 Akim Demaille <akim@epita.fr>
1731 * src/LR0.c (new_state, get_state): Complete TRACE code.
1732 * src/closure.c: Include `reader.h' to get `tags', needed by the
1734 Rename the conditional DEBUG as TRACE.
1735 Output consistently TRACEs to stderr, not stdout.
1736 * src/derives.c: Likewise.
1737 * src/reduce.c: (inaccessable_symbols): Using if is better style
1739 Use `#if TRACE' instead of `#if 0' for tracing code.
1741 2001-11-19 Akim Demaille <akim@epita.fr>
1743 * src/system.h (LIST_FREE, shortcpy): New.
1744 * src/LR0.c: Use them.
1745 * src/output.c (free_itemsets, free_reductions, free_shifts):
1746 Remove, replaced by LIST_FREE.
1748 2001-11-19 Akim Demaille <akim@epita.fr>
1750 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
1751 (REDUCTIONS_ALLOC): New.
1752 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
1755 2001-11-19 Akim Demaille <akim@epita.fr>
1757 * src/LR0.c (new_state): Complete trace code.
1758 * src/nullable.c (set_nullable): Don't translate traces.
1760 2001-11-19 Akim Demaille <akim@epita.fr>
1762 * src/print_graph.c (print_core): Better locality of variables.
1763 * src/print.c (print_core): Likewise.
1765 2001-11-19 Akim Demaille <akim@epita.fr>
1767 * src/vcg.c: You do the output, so you are responsible of the
1768 handling of VCG syntax, in particular: use quotearg.
1769 * src/print_graph.c: Don't.
1770 (print_actions): Don't output the actions as part of the nodes,
1771 since that's the job of the edges.
1772 (print_state): Don't output by hand: fill the node description,
1773 and ask for its output.
1775 2001-11-19 Akim Demaille <akim@epita.fr>
1777 * src/bison.simple (yyparse): When verbosely reporting an error,
1778 no longer put additional quotes around token names.
1779 * tests/calc.at: Adjust.
1781 2001-11-19 Akim Demaille <akim@epita.fr>
1783 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
1784 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
1785 * src/output.c: Adjust.
1787 2001-11-19 Akim Demaille <akim@epita.fr>
1789 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
1791 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
1793 2001-11-19 Akim Demaille <akim@epita.fr>
1795 * src/gram.h (rule_t): New.
1797 (rrhs, rlhs): Remove, part of state_t.
1798 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
1799 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1800 * src/reader.c, src/reduce.c: Adjust.
1802 2001-11-19 Akim Demaille <akim@epita.fr>
1804 * src/reader.c (symbols_output): New, extracted from...
1805 (packsymbols): Here.
1808 2001-11-19 Akim Demaille <akim@epita.fr>
1810 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
1811 (maxrhs): this new function.
1813 2001-11-19 Akim Demaille <akim@epita.fr>
1815 * src/lalr.c (F): New macro to access the variable F.
1818 2001-11-19 Akim Demaille <akim@epita.fr>
1820 * src/lalr.h (LA): New macro to access the variable LA.
1821 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1822 * src/lalr.c: Adjust.
1824 2001-11-19 Akim Demaille <akim@epita.fr>
1826 * src/lalr.c (initialize_LA): Only initialize LA. Let...
1827 (set_state_table): handle the `lookaheads' members.
1829 2001-11-19 Akim Demaille <akim@epita.fr>
1831 * src/lalr.h (lookaheads): Removed array, whose contents is now
1833 (state_t): this structure.
1834 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1837 2001-11-19 Akim Demaille <akim@epita.fr>
1839 * src/lalr.h (consistent): Removed array, whose contents is now
1841 (state_t): this structure.
1842 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1845 2001-11-19 Akim Demaille <akim@epita.fr>
1847 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
1848 contents are now members of...
1849 (state_t): this structure.
1850 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1853 2001-11-19 Akim Demaille <akim@epita.fr>
1855 * src/lalr.h (state_t): New.
1856 (state_table): Be a state_t * instead of a core **.
1857 (accessing_symbol): Remove, part of state_t.
1858 * src/lalr.c: Adjust.
1859 (set_accessing_symbol): Merge into...
1860 (set_state_table): this.
1861 * src/print_graph.c, src/conflicts.c: Adjust.
1863 2001-11-14 Akim Demaille <akim@epita.fr>
1865 * tests/calc.at, tests/output.at, tests/regression.at,
1866 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
1867 now the tests are run in private dirs, therefore AC_CLEANUP and
1868 family can be simplified to 0-ary.
1869 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
1870 use abs. path to find config.h.
1871 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
1872 stderr, there can be way too much random noise.
1873 Instead pass -Werror to GCC and rely on the exit status.
1874 Reported by Wolfram Wagner.
1876 2001-11-14 Akim Demaille <akim@epita.fr>
1878 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
1879 defined only if yyoverflow is defined, to avoid `warning: unused
1881 Reported by The Test Suite.
1883 2001-11-14 Akim Demaille <akim@epita.fr>
1885 * src/print.c: Include reduce.h.
1886 Reported by Hans Aberg.
1888 2001-11-14 Akim Demaille <akim@epita.fr>
1890 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
1891 Revert a previous patch: these are really const.
1892 * src/conflicts.c (conflict_report): Additional useless pair of
1893 braces to pacify GCC's warnings for `if () if () {} else {}'.
1894 * src/lex.c (parse_percent_token): Replace equal_offset with
1897 Be sure to strdup `arg' when used, since there is no reason for
1898 token_buffer not to change.
1900 2001-11-14 Akim Demaille <akim@epita.fr>
1902 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
1904 * src/main.c (main): Use them.
1905 Suggested by Hans Aberg.
1907 2001-11-12 Akim Demaille <akim@epita.fr>
1909 * src/system.h (ngettext): Now that we use ngettext, be sure to
1910 provide a default definition when NLS are not used.
1912 2001-11-12 Akim Demaille <akim@epita.fr>
1914 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
1915 Use @kbd to denote user input.
1916 (Language and Grammar): ANSIfy the example.
1917 Adjust its layout for info/notinfo.
1918 (Location Tracking Calc): Output error messages to stderr.
1919 Output locations in a more GNUtically correct way.
1920 Fix a couple of Englishos.
1921 Adjust @group/@end group pairs.
1923 2001-11-12 Akim Demaille <akim@epita.fr>
1925 %expext was not functioning at all.
1927 * src/conflicts.c (expected_conflicts): Set to -1.
1928 (conflict_report): Use ngettext.
1929 (conflicts_print): Check %expect and make its violation an error.
1930 * doc/bison.texinfo (Expect Decl): Adjust.
1931 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
1932 * tests/regression.at (%expect not enough, %expect right)
1933 (%expect too much): New.
1935 2001-11-12 Akim Demaille <akim@epita.fr>
1937 * tests/regression.at (Conflicts): Rename as...
1938 (Unresolved SR Conflicts): this.
1939 (Solved SR Conflicts): New.
1941 2001-11-12 Akim Demaille <akim@epita.fr>
1943 * src/reduce.c (print_results): Rename as...
1944 (reduce_output): This.
1945 Output to OUT, passed as argument, instead of output_obstack.
1946 (dump_grammar): Likewise.
1949 (reduce_grammar): No longer call reduce_output, since...
1950 * src/print.c (print_results): do it.
1951 * src/main.c (main): Call reduce_free;
1953 2001-11-12 Akim Demaille <akim@epita.fr>
1955 * src/conflicts.c (print_reductions): Accept OUT as argument.
1956 Output to it, not to output_obstack.
1957 * src/print.c (print_actions): Adjust.
1959 2001-11-12 Akim Demaille <akim@epita.fr>
1961 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
1962 the result instead of using...
1963 (src_total, rrc_total, src_count, rrc_count): Remove.
1964 (any_conflicts): Remove.
1965 (print_conflicts): Split into...
1966 (conflicts_print, conflicts_output): New.
1967 * src/conflicts.h: Adjust.
1968 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
1969 * src/print.c (print_grammar): Issue `\n' between two rules.
1970 * tests/regression.at (Conflicts): New.
1971 Reported by Tom Lane.
1973 2001-11-12 Akim Demaille <akim@epita.fr>
1975 * tests/regression.at (Invalid input): Remove, duplicate with
1976 ``Invalid input: 1''.
1978 2001-11-12 Akim Demaille <akim@epita.fr>
1980 * tests/torture.at (AT_DATA_STACK_TORTURE)
1981 (Exploding the Stack Size with Alloca)
1982 (Exploding the Stack Size with Malloc): New.
1984 2001-11-12 Akim Demaille <akim@epita.fr>
1986 * src/bison.simple (YYSTACK_REALLOC): New.
1987 (yyparse) [!yyoverflow]: Use it and free the old stack.
1988 Reported by Per Allansson.
1990 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
1992 * src/bison.simple: Define type yystype instead of YYSTYPE, and
1993 define CPP macro, which substitute YYSTYPE by yystype.
1994 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
1995 with yyltype/YYLTYPE. This allows inclusion of the generated
1996 header within the parser if the compiler, such as GGC, accepts
1997 multiple equivalent #defines.
2000 2001-11-05 Akim Demaille <akim@epita.fr>
2002 * src/reader.c (symbols_output): New, extracted from...
2003 (packsymbols): here.
2006 2001-11-05 Akim Demaille <akim@epita.fr>
2008 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2010 2001-11-05 Akim Demaille <akim@epita.fr>
2012 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2015 2001-11-05 Akim Demaille <akim@epita.fr>
2017 * src/options.h (struct option_table_struct): set_flags is void*.
2018 * src/options.c (longopts): Support `--output' and `%output'.
2020 * src/lex.h (tok_setopt): Remove, replaced with...
2021 (tok_intopt, tok_stropt): these new guys.
2022 * src/lex.c (getopt.h): Not needed.
2023 (token_buffer, unlexed_token_buffer): Not const.
2024 (percent_table): Promote `-' over `_' in directive names.
2025 Active `%name-prefix', `file-prefix', and `output'.
2026 (parse_percent_token): Accept possible arguments to directives.
2027 Promote `-' over `_' in directive names.
2029 2001-11-04 Akim Demaille <akim@epita.fr>
2031 * doc/bison.texinfo (Decl Summary): Split the list into
2032 `directives for grammars' and `directives for bison'.
2034 Add description of `%name-prefix', `file-prefix', and `output'.
2035 Promote `-' over `_' in directive names.
2036 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2037 Simplify the description of `--name-prefix'.
2038 Promote `-' over `_' in directive names.
2039 Promote `--output' over `--output-file'.
2040 Fix the description of `--defines'.
2041 * tests/output.at: Exercise %file-prefix and %output.
2043 2001-11-02 Akim Demaille <akim@epita.fr>
2045 * doc/refcard.tex: Update.
2047 2001-11-02 Akim Demaille <akim@epita.fr>
2049 * src/symtab.h (SUNDEF): New.
2050 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2051 stand for `uninitialized', instead of 0.
2052 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2053 * src/lex.c (lex): Adjust.
2055 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2057 Let yylex return it instead of a plain 0.
2058 Reported by Dick Streefland.
2060 2001-11-02 Akim Demaille <akim@epita.fr>
2062 * tests/regression.at (Mixing %token styles): New test.
2064 2001-11-02 Akim Demaille <akim@epita.fr>
2066 * src/reader.c (parse_thong_decl): Formatting changes.
2067 (token_translations_init): New, extracted from...
2068 (packsymbols): Here.
2071 2001-11-01 Akim Demaille <akim@epita.fr>
2073 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2074 Check that `9foo.y' produces correct cpp guards.
2075 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2079 2001-11-01 Akim Demaille <akim@epita.fr>
2081 * tests/regression.at (Invalid input: 2): New.
2082 * src/lex.c (unlexed_token_buffer): New.
2083 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2087 2001-11-01 Akim Demaille <akim@epita.fr>
2089 * tests/calc.at: Catch up with 1.30.
2090 * configure.in: Bump to 1.49a.
2091 Adjust to newer Autotest.
2093 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2095 * src/conflicts.c: Move global variables rrc_total and src_total ...
2096 (print_conflicts): here.
2097 * src/output.c (output): Free global variable user_toknums.
2098 * src/lex.c (token_obstack): Become static.
2100 2001-10-18 Akim Demaille <akim@epita.fr>
2102 * tests/atlocal.in (GCC): Add.
2103 * tests/calc.at: s/m4_match/m4_bmatch/.
2104 s/m4_patsubst/m4_bpatsubst/.
2105 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2106 * configure.in: AC_SUBST(GCC).
2108 2001-10-14 Marc Autret <autret_m@epita.fr>
2110 * src/options.c (create_long_option_table): Fix.
2112 2001-10-10 Akim Demaille <akim@epita.fr>
2114 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2116 2001-10-04 Akim Demaille <akim@epita.fr>
2118 * src/reader.c (parse_union_decl): Push the caracters in
2119 union_obstack, not attrs_obstack.
2121 2001-10-04 Akim Demaille <akim@epita.fr>
2123 Merge in the branch 1.29.
2125 * src/reader.c (packsymbols): Use a temporary obstack for
2126 `%%tokendef', since output_stack is already used elsewhere.
2128 2001-10-02 Akim Demaille <akim@epita.fr>
2132 2001-10-02 Akim Demaille <akim@epita.fr>
2136 2001-10-02 Akim Demaille <akim@epita.fr>
2138 * tests/regression.at (Invalid CPP headers): New.
2139 From Alexander Belopolsky.
2140 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2142 2001-10-02 Akim Demaille <akim@epita.fr>
2144 * tests/regression.at (Invalid input): New.
2145 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2148 2001-10-02 Akim Demaille <akim@epita.fr>
2150 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2152 2001-10-02 Akim Demaille <akim@epita.fr>
2154 * src/output.c (output_parser): Assert `skeleton'.
2155 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2159 2001-10-01 Marc Autret <autret_m@epita.fr>
2161 * src/lex.h: Echo modifications.
2162 * src/lex.c (unlex): Parameter is now token_t.
2165 2001-10-01 Marc Autret <autret_m@epita.fr>
2167 * src/main.c: Include lex.h.
2170 2001-09-29 Akim Demaille <akim@epita.fr>
2172 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2174 2001-09-28 Akim Demaille <akim@epita.fr>
2176 * tests/testsuite.at: Update to newer Autotest.
2177 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2179 2001-09-27 Akim Demaille <akim@epita.fr>
2181 Position independent wrapper.
2183 * tests/bison: Remove.
2184 * tests/bison.in: New.
2185 * configure.in: Adjust.
2187 2001-09-27 Paul Eggert <eggert@twinsun.com>
2189 Port quotearg fixes from tar 1.13.24.
2191 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2193 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2194 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2196 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2197 * m4/mbrtowc.m4: New file.
2198 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2199 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2201 2001-09-27 Akim Demaille <akim@epita.fr>
2205 2001-09-27 Akim Demaille <akim@epita.fr>
2209 2001-09-25 Akim Demaille <akim@epita.fr>
2211 * src/system.h: Include `xalloc.h'.
2212 Remove it from the C files.
2213 * src/files.c (output_files): Free the obstacks.
2214 * src/lex.c (init_lex): Rename as...
2217 * src/main.c (main): Use it.
2219 2001-09-24 Marc Autret <autret_m@epita.fr>
2221 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2222 to output informations in fout (FILE*).
2223 (open_graph, close_graph): Likewise.
2224 (output_graph, output_edge, output_node): Likewise.
2225 * src/vcg.h: Update function prototypes.
2226 * src/print_graph.c (print_graph): Open output graph file.
2227 (print_actions): Adjust.
2228 * src/files.h: Remove extern declaration.
2229 * src/files.c: Remove graph_obstack declaration.
2230 (open_files): Remove graph_obstack initialization.
2231 (output_files): Remove graph_obstack saving.
2233 2001-09-24 Marc Autret <autret_m@epita.fr>
2235 * src/files.c (compute_output_file_names): Fix.
2237 2001-09-24 Marc Autret <autret_m@epita.fr>,
2238 Akim Demaille <akim@epita.fr>
2240 * src/reader.c (reader): Remove call to free_symtab ().
2241 * src/main.c (main): Call it here.
2243 * src/conflicts.c (initialize_conflicts): Rename as...
2244 (solve_conflicts): this.
2245 * src/print.c (print_core, print_actions, print_state)
2246 (print_grammar): Dump to a file instead a `output_obstack'.
2247 (print_results): Dump `output_obstack', and then proceed with the
2249 * src/files.c (compute_output_file_names, close_files): New.
2250 (output_files): Adjust.
2251 * src/main.c (main): Adjust.
2253 2001-09-23 Marc Autret <autret_m@epita.fr>
2255 * src/files.c (compute_header_macro): Computes header macro name
2256 from spec_defines_file when given.
2258 2001-09-23 Marc Autret <autret_m@epita.fr>
2260 * src/files.c (output_files): Add default extensions.
2262 2001-09-22 Akim Demaille <akim@epita.fr>
2264 * src/conflicts.c (finalize_conflicts): Rename as...
2265 (free_conflicts): this.
2267 2001-09-22 Akim Demaille <akim@epita.fr>
2269 * src/gram.c (gram_free): Rename back as...
2271 (output_token_translations): Free `token_translations'.
2272 * src/symtab.c (free_symtab): Free the tag field.
2274 2001-09-22 Akim Demaille <akim@epita.fr>
2276 Remove `translations' as it is always set to true.
2278 * src/gram.h: Adjust.
2279 * src/reader.c (packsymbols, parse_token_decl): Adjust
2280 * src/print.c (print_grammar): Adjust.
2281 * src/output.c (output_token_translations): Adjust.
2282 * src/lex.c (lex): Adjust.
2283 * src/gram.c: Be sure the set pointers to NULL.
2284 (dummy): Rename as...
2287 2001-09-22 Akim Demaille <akim@epita.fr>
2289 * configure.in: Invoke AM_LIB_DMALLOC.
2290 * src/system.h: Use dmalloc.
2291 * src/LR0.c: Be sure to have pointers initialized to NULL.
2292 (allocate_itemsets): Allocate kernel_items only if needed.
2294 2001-09-22 Akim Demaille <akim@epita.fr>
2296 * configure.in: Bump to 1.29b.
2297 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2298 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2299 need xmalloc.c in calc.y.
2302 2001-09-21 Akim Demaille <akim@epita.fr>
2305 * Makefile.maint, config/config.guess, config/config.sub,
2306 * config/missing: Update from masters.
2307 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2309 * configure.in (ALL_LINGUAS): Add `tr'.
2311 2001-09-21 Akim Demaille <akim@epita.fr>
2313 * tests/Makefile.am (package.m4): Move to...
2314 ($(srcdir)/$(TESTSUITE)): here.
2316 2001-09-20 Akim Demaille <akim@epita.fr>
2318 * src/complain.c: No longer try to be standalone: use system.h.
2319 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2320 * src/complain.h: Likewise.
2321 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2322 Remove the unused variable `n'.
2323 From Albert Chin-A-Young.
2325 2001-09-18 Marc Autret <autret_m@epita.fr>
2327 * doc/bison.1: Update.
2328 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2330 (Option Cross Key): Update.
2333 2001-09-18 Marc Autret <autret_m@epita.fr>
2335 * tests/regression.at: New test (comment in %union).
2337 2001-09-18 Marc Autret <autret_m@epita.fr>
2339 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2341 Reported by Keith Browne.
2343 2001-09-18 Marc Autret <autret_m@epita.fr>
2345 * tests/output.at: Add tests for --defines and --graph.
2347 2001-09-18 Marc Autret <autret_m@epita.fr>
2349 * tests/output.at: Removes tests of %{header,src}_extension features.
2351 2001-09-18 Akim Demaille <akim@epita.fr>
2353 * tests/Makefile.am (package.m4): New.
2354 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2355 (_AT_CHECK_CALC_ERROR): Likewise.
2356 Factor the `, ' part of verbose error messages.
2358 2001-09-18 Marc Autret <autret_m@epita.fr>
2360 * src/getargs.c (longopts): Declare --defines and --graph as options
2361 with optional arguments.
2362 * src/files.h: Add extern declarations.
2363 * src/files.c (spec_graph_file, spec_defines_file): New.
2364 (output_files): Update.
2365 Remove CPP-outed code.
2367 2001-09-18 Marc Autret <autret_m@epita.fr>
2369 Turn off %{source,header}_extension feature.
2371 * src/files.c (compute_exts_from_gf): Update.
2372 (compute_exts_from_src): Update.
2373 (output_files): CPP-out useless code.
2374 * src/files.h: Remove {header,source}_extension extern declarations.
2375 * src/reader.c (parse_dquoted_param): CPP-out.
2376 (parse_header_extension_decl): Remove.
2377 (parse_source_extension_decl): Remove.
2378 (read_declarations): Remove cases tok_{hdrext,srcext}.
2379 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2380 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2382 2001-09-10 Akim Demaille <akim@epita.fr>
2384 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2385 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2386 (AT_CHECK_OUTPUT): this.
2387 Merely check ls' exit status, its output is useless.
2389 2001-09-10 Akim Demaille <akim@epita.fr>
2391 * tests/calc.at: Use m4_match.
2392 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2394 2001-09-10 Marc Autret <autret_m@epita.fr>,
2395 Akim Demaille <akim@epita.fr>
2397 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2399 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2401 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2402 * src/lex.h: Adjust prototype.
2403 (token_t): Add `tok_undef'.
2404 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2405 (parse_percent_token): Now returns token_t.
2406 Add default statement in switch.
2407 (lex): Separate `c' as an input variable, from the token_t result
2409 (unlexed): Is a token_t.
2411 2001-09-10 Akim Demaille <akim@epita.fr>
2413 * configure.in: Bump to 1.29a.
2415 2001-09-07 Akim Demaille <akim@epita.fr>
2419 2001-08-30 Akim Demaille <akim@epita.fr>
2421 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
2422 * m4/atconfig.m4: Remove.
2423 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
2425 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
2426 m4_if, m4_patsubst, and m4_regexp.
2427 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
2428 `input' file instead of echo.
2430 2001-08-29 Akim Demaille <akim@epita.fr>
2434 2001-08-29 Akim Demaille <akim@epita.fr>
2438 2001-08-29 Paul Eggert <eggert@twinsun.com>
2440 * src/bison.simple (yyparse): Don't take the address of an
2441 item before the start of an array, as that doesn't conform to
2444 2001-08-29 Robert Anisko <anisko_r@epita.fr>
2446 * doc/bison.texinfo (Location Tracking Calc): New node.
2448 2001-08-29 Paul Eggert <eggert@twinsun.com>
2450 * src/output.c (output): Do not define const, as this now
2451 causes more problems than it cures.
2453 2001-08-29 Akim Demaille <akim@epita.fr>
2455 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
2457 Be sure to tag the `detailmenu'.
2459 2001-08-29 Akim Demaille <akim@epita.fr>
2461 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
2462 download in a tmp dir.
2464 2001-08-28 Marc Autret <autret_m@epita.fr>
2466 * config/depcomp: New file.
2468 2001-08-28 Marc Autret <autret_m@epita.fr>
2470 * doc/bison.1 (mandoc): Adjust.
2471 From Juan Manuel Guerrero.
2473 2001-08-28 Marc Autret <autret_m@epita.fr>
2475 * src/print_graph.c (print_state): Fix.
2477 2001-08-27 Marc Autret <autret_m@epita.fr>
2479 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
2481 Echo modifications to the functions prototypes.
2482 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
2484 2001-08-27 Marc Autret <autret_m@epita.fr>
2486 * src/vcg.c: Include `xalloc.h'.
2487 (add_colorentry): New.
2488 (add_classname): New.
2489 (add_infoname): New.
2490 * src/vcg.h: Add new prototypes.
2492 2001-08-27 Akim Demaille <akim@epita.fr>
2494 * Makefile.maint: Sync. again with CVS Autoconf.
2496 2001-08-27 Akim Demaille <akim@epita.fr>
2498 * Makefile.maint: Formatting changes.
2499 (po-update, cvs-update, update): New targets.
2502 2001-08-27 Akim Demaille <akim@epita.fr>
2504 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2505 * Makefile.maint: Sync. with CVS Autoconf.
2507 2001-08-27 Marc Autret <autret_m@epita.fr>
2509 * src/vcg.h (struct infoname_s): New.
2510 (struct colorentry_s): New.
2511 (graph_s): New fields {vertical,horizontal}_order in structure.
2512 Add `infoname' field.
2513 Add `colorentry' field;
2514 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
2515 (G_HORIZONTAL_ORDER): New.
2517 (G_COLORENTRY): New.
2518 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
2519 Add output of `infoname'.
2520 Add output of `colorentry'.
2522 2001-08-27 Marc Autret <autret_m@epita.fr>
2524 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
2525 This one shadowed a global parameter.
2527 2001-08-24 Marc Autret <autret_m@epita.fr>
2529 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
2530 instead of `unsigned'.
2531 (print_state): Do not call obstack_object_size () in obstack_grow ()
2532 to avoid macro variables shadowing.
2534 2001-08-23 Marc Autret <autret_m@epita.fr>
2536 * src/lex.c (percent_table): Typo: s/naem/name/.
2538 Normalize new options declarations.
2540 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
2542 * tests/suite.at: Exercise %header_extension and %source_extension.
2544 2001-08-16 Marc Autret <autret_m@epita.fr>
2546 * src/reader.c (parse_dquoted_param): New.
2547 (parse_header_extension_decl): Use it.
2548 (parse_source_extension_decl): Likewise.
2550 2001-08-16 Marc Autret <autret_m@epita.fr>
2552 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
2553 (get_xxxx_str): Use assert () instead of complain ().
2554 Remove return invokations in default cases.
2555 (get_decision_str): Modify default behaviour. Remove second argument.
2556 Echo modifications on calls.
2557 (output_graph): Fix.
2559 2001-08-16 Marc Autret <autret_m@epita.fr>
2561 * src/getargs.c (usage): Update with ``-g, --graph''.
2563 2001-08-16 Marc Autret <autret_m@epita.fr>
2565 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
2566 (Option Cross Key): Likewise.
2567 * doc/bison.1: Update.
2569 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
2571 * src/output.c (output_master_parser): Don't finish action_obstack.
2572 (output_parser): Don't care about the muscle action, here.
2573 (prepare): Copy the action_obstack in the action muscle.
2574 (output): Free action_obstack.
2576 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2578 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
2579 will contain `%union' declaration.
2580 (parse_union_decl): Delete #line directive output.
2581 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
2582 informations about %union.
2583 (parse_union_decl): Copy the union_obstack in the muscle stype.
2584 * src/bison.simple: Add new #line directive.
2585 Add typdef %%stype YYSTYPE.
2587 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2589 * src/bison.simple: Add new `#line' directive.
2591 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
2593 * src/bison.simple: New `#line' directive.
2594 * src/output.c (output_parser): Support new dynamic muscle input_line.
2596 2001-09-22 Marc Autret <autret_m@epita.fr>
2598 * src/output.c (output_master_parser): New.
2599 (output_parser): Be more re-entrant.
2601 2001-09-21 Marc Autret <autret_m@epita.fr>
2603 * src/reader.c (copy_definition, parse_union_decl): Update and use
2605 (copy_action): Likewise.
2606 Use obstack_1grow ().
2607 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
2609 2001-09-21 Marc Autret <autret_m@epita.fr>
2611 * src/options.c (option_table): Adjust.
2612 * src/lex.c (parse_percent_token): Fix.
2614 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2616 * src/options.c (symtab.h): Include it, need by lex.h.
2618 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2620 * src/lex.c (parse_percent_token): Change type of variable `tx', which
2621 is now an option_table_struct*.
2622 (option_strcmp): New function option_strcmp.
2623 (parse_percent_token): Call option_strcmp.
2624 * src/getargs.c (xalloc.h, options.h): Include it.
2625 (getargs): Call create_long_option_table.
2626 (getargs): Free longopts at the end of the function.
2627 (shortopts): Move in options.c.
2628 * src/options.c (create_long_option_table): New function. Convert
2629 information from option_table to option structure.
2630 * src/reader.c (options.h): Include it.
2632 * src/Makefile.am: Adjust.
2633 * src/options.c (option_table): Create from longopts and percent_table.
2634 * src/getargs.c (longopts): Delete.
2635 * src/lex.c (struct percent_table_struct): Delete.
2636 (percent_table): Delete.
2637 (options.h): Include it.
2638 * src/options.c: Create.
2639 * src/options.h: Create.
2640 Declare enum opt_access_e.
2641 Define struct option_table_struct.
2643 2001-09-20 Marc Autret <autret_m@epita.fr>
2645 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
2648 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
2650 * src/bison.simple: s/%%filename/%%skeleton.
2651 * src/muscle_tab.c (getargs.h): Include it.
2652 (muscle_init): Insert new muscle skeleton.
2654 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
2656 * src/output.c (output_parser): Delete unused variable actions_dumped.
2658 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
2660 * src/output.c (output): Delete call to reader_output_yylsp.
2661 * src/reader.c (reader): Likewise.
2662 * src/reader.h: Delete declaration of reader_output_yylsp.
2664 2001-09-02 Marc Autret <autret_m@epita.fr>
2666 * src/reader.c: Include muscle_tab.h.
2667 (parse_union_decl): Update.
2668 (parse_macro_decl): Rename parse_muscle_decl.
2669 Update to use renamed functions and variable.
2670 (read_declarations, copy_action, read_additionnal_code, : Updated
2671 with correct variables and functions names.
2672 (packsymbols, reader): Likewise.
2674 * src/reader.h (muscle_obstack): Extern declaration update.
2676 * src/output.c: Include muscle_tab.h
2677 In all functions using macro_insert, change by using muscle_insert ().
2678 (macro_obstack): Rename muscle_obstack.
2679 Echo modifications in the whole file.
2680 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
2681 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
2682 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
2684 * src/muscle_tab.h: Update double inclusion macros.
2685 (macro_entry_s): Rename muscle_entry_s.
2688 * src/muscle_tab.c: Include muscle_tab.h.
2689 Rename macro_tabble to muscle_table.
2690 (mhash1, mhash2, mcmp): Use muscle_entry.
2691 (macro_init): Rename muscle_init. Update.
2692 (macro_insert): Rename muscle_insert. Update.
2693 (macro_find): Rename muscle_find. Update.
2695 * src/main.c: Include muscle_tab.h.
2696 (main): Call muscle_init ().
2697 * src/Makefile.am (bison_SOURCES): Echo modifications.
2699 2001-09-02 Marc Autret <autret_m@epita.fr>
2701 Now the files macro_tab.[ch] are named muscle_tab.[ch].
2703 * src/muscle_tab.c, src/muscle_tab.h: Add files.
2705 2001-09-02 Marc Autret <autret_m@epita.fr>
2707 * src/macrotab.c, src/macrotab.h: Remove.
2709 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
2711 * src/reader.c (copy_guard): Use muscle to specify the `#line'
2714 2001-09-01 Marc Autret <autret_m@epita.fr>
2716 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
2717 to an explicit value to activate the feature. We do it here.
2719 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2721 * src/output.c (prepare): Delete the `filename' muscule insertion.
2722 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
2723 (parse_union_decl): Likewise.
2724 * src/macrotab.c (macro_init): Initialize filename by infile.
2726 2001-08-31 Marc Autret <autret_m@epita.fr>
2728 * src/bison.simple (YYLSP_NEEDED): New definition.
2729 * src/output.c (prepare): Add macro insertion of `locations_flag'
2731 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2733 * src/output.c (prepare): Delete insertion of previous muscles,
2734 and insert the `prefix' muscles.
2735 * src/macrotab.c (macro_init): Likewise.
2736 (macro_init): Initialization prefix directive by `yy'.
2737 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
2738 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
2739 yylval, yydebug, yyerror, yynerrs and yyparse.
2740 New directive `#define' to substitute yydebug, ... with option
2743 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2745 * src/main.c (main): Standardize.
2746 * src/output.c (output_table_data, output_parser): Likewise.
2747 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
2749 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
2751 * src/reader.c (read_additionnal_code): Rename %%user_code to
2753 * src/output.c (output): Rename %%declarations to %%prologue.
2754 * src/bison.simple: Echo modifications.
2756 2001-08-31 Marc Autret <autret_m@epita.fr>
2758 * src/reader.c (readgram): CleanUp.
2759 (output_token_defines): Likewise.
2760 (packsymbols): Likewise.
2762 * src/output.c (output): CPP-out useless code.
2764 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2766 * src/reader.c (reader): Delete obsolete call to function
2767 output_trailers and output_headers.
2768 * src/output.h: Remove obsolete functions prototypes of output_headers
2769 and output_trailers.
2771 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
2773 * src/main.c: Include macrotab.h.
2774 * src/macrotab.h (macro_entry_s): Constify fields.
2775 Adjust functions prototypes.
2776 * src/macrotab.c (macro_insert): Constify key and value.
2777 (macro_find): Constify key.
2778 (macro_insert): Include 'xalloc.h'
2779 (macro_insert): Use XMALLOC.
2780 (macro_find): Constify return value.
2781 * src/output.c (output_table_data): Rename table to table_data.
2782 (output_parser): Constify macro_key, macro_value.
2784 2001-08-30 Marc Autret <autret_m@epita.fr>
2786 * src/reader.c (parse_skel_decl): New.
2787 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2788 * src/lex.h (token_t): New token `tok_skel'.
2789 * src/lex.c (percent_table): Add skeleton option entry.
2792 2001-08-29 Marc Autret <autret_m@epita.fr>
2794 * src/bison.simple: Add %%user_code directive at the end.
2795 * src/reader.c (read_additionnal_code): New.
2797 * src/output.c (output_program): Remove.
2800 2001-08-28 Marc Autret <autret_m@epita.fr>
2802 * src/output.c (output_actions): Clean up.
2803 (output_gram): CPP-out useless code.
2804 * src/reader.c (reader): Clean up, CPP-out useless code.
2806 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
2808 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
2810 * src/bison.simple: Add `%%definitions'.
2812 2001-08-28 Marc Autret <autret_m@epita.fr>
2814 * config/depcomp: New file.
2816 2001-08-27 Paul Eggert <eggert@twinsun.com>
2818 * src/bison.simple (yyparse): Don't take the address of an
2819 item before the start of an array, as that doesn't conform to
2822 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
2824 * src/output.c (output): Remove the initialization of the macro
2825 obstack. It was done too late here.
2827 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
2829 (reader): Initialize the macro obstack here, since we need it to grow
2830 '%define' directives.
2832 * src/reader.h: Declare the macro obstack as extern.
2834 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
2836 * src/output.c (output_parser): Fix. Store single '%' characters in
2837 the output obstack instead of throwing them away.
2839 2001-08-27 Akim Demaille <akim@epita.fr>
2841 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2843 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2845 * lib/Makefile.am: Adjust.
2847 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2849 * src/bison.simple: Update and add '%%' directives.
2851 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2853 * src/reader.c (reader): Remove calls to 'output_headers' and
2854 'output_trailers'. Remove some C output.
2855 (readgram): Disable a piece of code that was writing a default
2856 definition for 'YYSTYPE'.
2857 (reader_output_yylsp): Remove.
2858 (packsymbols): Output token defintions to a macro.
2859 (copy_definition): Disable C output.
2861 * src/reader.c (parse_macro_decl): New function used to parse macro
2863 (copy_string2): Put the body of copy_string into this new function.
2864 Add a parameter to let the caller choose whether he wants to copy the
2865 string delimiters or not.
2866 (copy_string): Be a simple call to copy_string2 with the last argument
2868 (read_declarations): Add case for macro definition.
2869 (copy_identifier): New.
2870 (parse_macro_decl): Read macro identifiers using copy_identifier
2873 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2875 * src/output.c (prepare): Add prefixed names.
2876 (output_parser): Output semantic actions.
2877 (output_parser): Fix bug on '%%line' directives.
2879 * src/output.c (output_headers): Remove. The C code printed by this
2880 function should now be in the skeletons.
2881 (output_trailers): Remove.
2882 (output): Disable call to 'reader_output_yylsp'.
2883 (output_rule_data): Do not output tables to the table obstack.
2885 * src/output.c: Remove some C dedicated output.
2886 Improve the use of macro and output obstacks.
2887 (output_defines): Remove.
2889 * src/output.c (output_token_translations): Associate 'translate'
2890 table with a macro. No output to the table obstack.
2891 (output_gram): Same for 'rhs' and 'prhs'.
2892 (output_stos): Same for 'stos'.
2893 (output_rule_data): Same for 'r1' and 'r2'.
2894 (token_actions): Same for 'defact'.
2895 (goto_actions): Same for 'defgoto'.
2896 (output_base): Same for 'pact' and 'pgoto'.
2897 (output_table): Same for 'table'.
2898 (output_check): Same for 'check'.
2900 * src/output.c (output_table_data): New function.
2901 (output_short_table): Remove.
2902 (output_short_or_char_table): Remove.
2904 * src/output.c (output_parser): Replace most of the skeleton copy code
2905 with something new. Skeletons are now processed character by character
2906 rather than line by line, and Bison looks for '%%' macros. This is the
2907 first step in making Bison's output process (a lot) more flexible.
2908 (output_parser): Use the macro table.
2910 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2912 * src/main.c (main): Initialize the macro table.
2914 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2916 * src/lex.c (percent_table): Add tok_define.
2917 * src/lex.h: Add tok_define.
2919 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2921 * src/macrotab.c: New file.
2922 * src/macrotab.h: New file.
2923 * src/Makefile.am: Update.
2925 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2927 * lib/hash.c: New file.
2928 * lib/hash.h: New file.
2929 * lib/Makefile.am: Update.
2931 2001-08-15 Akim Demaille <akim@epita.fr>
2935 2001-08-15 Marc Autret <autret_m@epita.fr>
2937 * src/reader.c (readgram): Indent output macro YYSTYPE.
2938 (packsymbols): Likewise.
2939 (output_token_defines): Likewise.
2940 * src/files.c: Standardize.
2941 (compute_header_macro): New.
2942 (defines_obstack_save): New. Use compute_header_macro.
2943 (output_files): Update. Use defines_obstack_save.
2945 2001-08-15 Akim Demaille <akim@epita.fr>
2947 * doc/bison.texinfo (Table of Symbols): Document
2950 2001-08-15 Akim Demaille <akim@epita.fr>
2952 * missing: Update from CVS Automake.
2953 * config/config.guess, config/config.sub, config/texinfo.tex:
2954 Update from gnu.org.
2956 2001-08-15 Akim Demaille <akim@epita.fr>
2958 * Makefile.maint: Sync with CVS Autoconf.
2960 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
2962 * doc/bison.texinfo: Include GNU Free Documentation License from
2964 * doc/fdl.texi: Add to package.
2966 2001-08-14 Marc Autret <autret_m@epita.fr>
2968 Turn on %{source,header}_extension features.
2970 * src/lex.c (percent_table): Un-CPP out header_extension and
2972 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
2973 (compute_exts_from_src): Remove conditions. It restores priorities
2976 2001-08-14 Marc Autret <autret_m@epita.fr>
2978 * src/files.c (compute_base_names): Add extensions computing when
2979 `--file-prefix' used.
2980 Standardize function calls.
2982 2001-08-13 Marc Autret <autret_m@epita.fr>
2984 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
2985 defining it (defined but null disables alloca).
2987 2001-08-13 Marc Autret <autret_m@epita.fr>
2989 * src/bison.simple (_yy_memcpy): CPP reformat.
2991 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
2993 * tests/atconfig.in (CPPFLAGS): Fix.
2995 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
2997 * doc/bison.texinfo: Include GNU General Public License from
2999 * doc/gpl.texi: Add to package.
3001 2001-08-10 Marc Autret <autret_m@epita.fr>
3003 * src/print_graph.h: Fix.
3004 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3006 2001-08-10 Akim Demaille <akim@epita.fr>
3008 * src/system.h: Provide default declarations for stpcpy, strndup,
3011 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3013 * doc/bison.texinfo (Locations): Update @$ stuff.
3015 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3017 * src/bison.simple (YYLLOC_DEFAULT): Update.
3020 2001-08-08 Marc Autret <autret_m@epita.fr>
3022 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3023 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3024 Reported by Fabrice Bauzac.
3026 2001-08-08 Marc Autret <autret_m@epita.fr>
3028 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3029 * src/vcg.c (output_node): Fix.
3030 * src/vcg.h: Cleanup.
3031 * src/print_graph.c: Add comments.
3032 (node_output_size): New global variable. Simplify the formatting of
3033 the VCG graph output.
3034 (print_actions): Unused code is now used. It notifies the final state
3035 and no action states in the VCG graph. It also give the reduce actions.
3036 The `shift and goto' edges are red and the `go to state' edges are
3038 Get the current node name and node_obstack by argument.
3039 (node_obstack): New variable.
3040 (print_state): Manage node_obstack.
3041 (print_core): Use node_obstack given by argument.
3042 A node is not only computed here but in print_actions also.
3043 (print_graph): CPP out useless code instead of commenting it.
3045 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3047 * tests/atconfig.in (CPPFLAGS): Fix.
3049 2001-08-07 Akim Demaille <akim@epita.fr>
3051 * src/print_graph.c (quote): New.
3052 (print_core): Use it.
3054 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3056 * src/vcg.c (complain.h): Include it.
3057 Unepitaize `return' invocations.
3058 [NDEBUG] (main): Remove.
3059 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3060 * src/files.c (open_files): Initialize graph_obstack.
3061 * src/print_graph.c (print_actions): CPP out useless code.
3062 (print_core): Don't output the last `\n' in labels.
3064 * src/files.c (output_files): Output the VCG file.
3065 * src/main.c (main): Invoke print_graph ();
3067 2001-08-06 Marc Autret <autret_m@epita.fr>
3069 Automaton VCG graph output.
3070 Using option ``-g'' or long option ``--graph'', you can generate
3071 a gram_filename.vcg file containing a VCG description of the LALR (1)
3072 automaton of your grammar.
3074 * src/main.c: Call to print_graph() function.
3075 * src/getargs.h: Update.
3076 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3077 (graph_flag): New flag.
3079 (getargs): Add case `g'.
3080 * src/files.c (graph_obstack): New obstack struct.
3081 (open_files): Initialize new obstack.
3082 (output_files): Saves graph_obstack if required.
3083 * src/files.h (graph_obstack): New extern declaration.
3084 * src/Makefile.am: Add new source files.
3086 2001-08-06 Marc Autret <autret_m@epita.fr>
3088 * src/print_graph.c, src/print_graph.h (graph): New.
3089 * src/vcg.h: New file.
3090 * src/vcg.c: New file, VCG graph handling.
3092 2001-08-06 Marc Autret <autret_m@epita.fr>
3094 Add of %source_extension and %header_extension which specify
3095 the source or/and the header output file extension.
3097 * src/files.c (compute_base_names): Remove initialisation of
3098 src_extension and header_extension.
3099 (compute_exts_from_gf): Update.
3100 (compute_exts_from_src): Update.
3101 (output_files): Update.
3102 * src/reader.c (parse_header_extension_decl): New.
3103 (parse_source_extension_decl): New.
3104 (read_declarations): New case statements for the new tokens.
3105 * src/lex.c (percent_table): Add entries for %source_extension
3106 and %header_extension.
3107 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3109 2001-08-06 Marc Autret <autret_m@epita.fr>
3111 * configure.in: Bump to 1.28c.
3112 * doc/bison.texinfo: Texinfo thingies.
3114 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3116 * tests/atconfig.in (CPPFLAGS): Add.
3117 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3119 2001-08-03 Akim Demaille <akim@epita.fr>
3123 2001-08-03 Akim Demaille <akim@epita.fr>
3125 * tests/Makefile.am (check-local): Ship testsuite.
3126 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3129 2001-08-03 Akim Demaille <akim@epita.fr>
3131 * configure.in: Try using -Wformat when compiling.
3133 2001-08-03 Akim Demaille <akim@epita.fr>
3135 * configure.in: Bump to 1.28b.
3137 2001-08-03 Akim Demaille <akim@epita.fr>
3139 * src/complain.c: Adjust strerror_r portability issues.
3141 2001-08-03 Akim Demaille <akim@epita.fr>
3145 2001-08-03 Akim Demaille <akim@epita.fr>
3147 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3148 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3149 * src/getargs.c: Include complain.h.
3150 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3151 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3153 2001-08-03 Akim Demaille <akim@epita.fr>
3155 * src/reader.c (readgram): Display hidden chars in error messages.
3157 2001-08-03 Akim Demaille <akim@epita.fr>
3159 Update to gettext 0.10.39.
3161 2001-08-03 Akim Demaille <akim@epita.fr>
3163 * lib/strspn.c: New.
3165 2001-08-01 Marc Autret <autret_m@epita.fr>
3167 * doc/bison.texinfo: Update.
3168 * doc/bison.1 (mandoc): Update.
3169 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3170 * src/files.c: Support output files extensions computing.
3171 (src_extension): New static variable.
3172 (header_extension): New static variable.
3174 (get_extension_index): New function, gets the index of an extension
3175 filename in a string.
3176 (compute_exts_from_gf): New function, computes extensions from the
3177 grammar file extension.
3178 (compute_exts_from_src): New functions, computes extensions from the
3179 C source file extension, file given by ``-o'' option.
3180 (compute_base_names): Update.
3181 (output_files): Update.
3183 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3185 * doc/bison.texi: Document @$.
3186 (Locations): New section.
3188 2001-07-18 Akim Demaille <akim@epita.fr>
3190 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3191 * config/prev-version.txt, config/move-if-change: New.
3192 * Makefile.am: Adjust.
3194 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3196 * src/bison.simple (yyparse): Suppress warning `comparaison
3197 between signed and unsigned'.
3199 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3201 * src/getargs.h (raw_flag): Remove.
3202 * src/getargs.c: Die on `-r'/`--raw'.
3203 * src/lex.c (parse_percent_token): Die on `%raw'.
3204 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3205 * tests/calc.at: Suppress test with option `--raw'.
3207 2001-07-14 Akim Demaille <akim@epita.fr>
3210 * configure.in: Require Autoconf 2.50.
3211 Update to gettext 0.10.38.
3213 2001-03-16 Akim Demaille <akim@epita.fr>
3215 * doc/bison.texinfo: ANSIfy the examples.
3217 2001-03-16 Akim Demaille <akim@epita.fr>
3219 * getargs.c (skeleton): New variable.
3220 (longopts): --skeleton is a new option.
3221 (shortopts, getargs): -S is a new option.
3222 * getargs.h: Declare skeleton.
3223 * output.c (output_parser): Use it.
3225 2001-03-16 Akim Demaille <akim@epita.fr>
3227 * m4/strerror_r.m4: New.
3228 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3229 * lib/error.h, lib/error.c: Update.
3231 2001-03-16 Akim Demaille <akim@epita.fr>
3233 * src/getargs.c (longopts): Clean up.
3235 2001-02-21 Akim Demaille <akim@epita.fr>
3237 * src/reader.c (gensym): `gensym_count' is your own.
3238 Use a static buf to create the symbol name, as token_buffer is no
3241 2001-02-08 Akim Demaille <akim@epita.fr>
3243 * src/conflicts.c (conflict_report): Be sure not to append to res
3244 between two calls, which could happen if both first sprintf were
3245 skipped, but not the first cp += strlen.
3247 2001-02-08 Akim Demaille <akim@epita.fr>
3249 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3250 New, from fileutils 4.0.37.
3251 * configure.in: Require Autoconf 2.49c. I took some time before
3252 making this decision. This is the only way out for portability
3253 issues in Bison, it would mean way too much duplicate effort to
3254 import in Bison features implemented in 2.49c since 2.13.
3255 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3257 2001-02-02 Akim Demaille <akim@epita.fr>
3259 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3260 * lib/xalloc.h, lib/xmalloc.c: Update.
3262 2001-01-19 Akim Demaille <akim@epita.fr>
3264 Get rid of the ad hoc handling of token_buffer in the scanner: use
3267 * src/lex.c (token_obstack): New.
3268 (init_lex): Initialize it. No longer call...
3269 (grow_token_buffer): this. Remove it.
3270 Adjust all the places which used it to use the obstack.
3272 2001-01-19 Akim Demaille <akim@epita.fr>
3274 * src/lex.h: Rename all the tokens:
3275 s/\bENDFILE\b/tok_eof/g;
3276 s/\bIDENTIFIER\b/tok_identifier/g;
3278 Let them be enums, not #define, to ease debugging.
3279 Adjust all the code.
3281 2001-01-18 Akim Demaille <akim@epita.fr>
3283 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3284 * src/lex.c (maxtoken, grow_token_buffer): Static.
3286 2001-01-18 Akim Demaille <akim@epita.fr>
3288 Since we now use obstacks, more % directives can be enabled.
3290 * src/lex.c (percent_table): Also accept `%yacc',
3291 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3293 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3294 instead of returning a token.
3295 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3296 * src/reader.c (read_declarations): Adjust.
3297 * src/files.c (open_files): Don't call `compute_base_names', don't
3298 compute `attrsfile' since they depend upon data which might be
3299 *in* the input file now.
3300 (output_files): Do it here.
3301 * src/output.c (output_headers): Document the fact that this patch
3302 introduces a guaranteed SEGV for semantic parsers.
3303 * doc/bison.texinfo: Document them.
3304 * tests/suite.at: Exercise these %options.
3306 2000-12-20 Akim Demaille <akim@epita.fr>
3308 Also handle the output file (--verbose) with obstacks.
3310 * files.c (foutput): Remove.
3311 (output_obstack): New.
3312 Adjust all dependencies.
3313 * src/conflicts.c: Return a string.
3314 * src/system.h (obstack_grow_string): Rename as...
3315 (obstack_sgrow): this. Be ready to work with non literals.
3316 (obstack_fgrow4): New.
3318 2000-12-20 Akim Demaille <akim@epita.fr>
3320 * src/files.c (open_files): Fix the computation of short_base_name
3321 in the case of `-o foo.tab.c'.
3323 2000-12-20 Akim Demaille <akim@epita.fr>
3325 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3326 (copy_dollar): Now that everything uses obstacks, get rid of the
3329 2000-12-20 Akim Demaille <akim@epita.fr>
3331 * src/files.c (open_files): Actually the `.output' file is based
3332 on the short_base_name, not base_name.
3333 * tests/suite.at (Checking output file names): Adjust.
3335 2000-12-20 Akim Demaille <akim@epita.fr>
3337 * src/bison.s1: Remove, we now use directly...
3338 * src/bison.simple: this.
3339 * src/Makefile.am: Use pkgdata instead of data.
3341 2000-12-20 Akim Demaille <akim@epita.fr>
3343 * src/files.c (guard_obstack): New.
3344 (open_files): Initialize it.
3345 (output_files): Dump it...
3346 * src/files.h: Export it.
3347 * src/reader.c (copy_guard): Use it.
3349 2000-12-19 Akim Demaille <akim@epita.fr>
3351 * src/files.c (outfile, defsfile, actfile): Removed as global
3353 (open_files): Don't compute them.
3354 (output_files): Adjust.
3355 (base_name, short_base_name): Be global.
3356 Adjust dependencies.
3358 2000-12-19 Akim Demaille <akim@epita.fr>
3360 * src/files.c (strsuffix): New.
3361 (stringappend): Be just like strcat but allocate.
3362 (base_names): Eve out from open_files.
3363 Try to simplify the rather hairy computation of base_name and
3365 (open_files): Use it.
3366 * tests/suite.at (Checking output file names): New test.
3368 2000-12-19 Akim Demaille <akim@epita.fr>
3370 * src/system.h (obstack_grow_literal_string): Rename as...
3371 (obstack_grow_string): this.
3372 * src/output.c (output_parser): Recognize `%% actions' instead of
3374 * src/bison.s1: s/$/%% actions/.
3375 * src/bison.hairy: Likewise.
3377 2000-12-19 Akim Demaille <akim@epita.fr>
3379 * src/output.c (output_parser): Compute the `#line' lines when
3381 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3382 Suggested by Hans Aberg.
3384 2000-12-19 Akim Demaille <akim@epita.fr>
3386 Let the handling of the skeleton files be local to the procedures
3389 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3391 (fparser, open_extra_files): Remove.
3392 (open_files, output_files): Don't take care of fparser.
3393 * src/files.h: Adjust.
3394 * src/output.c (output_parser): Open and close the file to the
3396 * src/reader.c (read_declarations): When %semantic_parser, open
3399 2000-12-19 Akim Demaille <akim@epita.fr>
3401 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3402 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3404 2000-12-19 Akim Demaille <akim@epita.fr>
3406 * src/files.c (open_files): Yipee! We no longer need all the code
3407 looking for `/tmp' since we have no tmp file.
3409 2000-12-19 Akim Demaille <akim@epita.fr>
3411 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
3413 * src/files.c (open_files): Less dependency on MSDOS etc.
3415 2000-12-14 Akim Demaille <akim@epita.fr>
3417 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
3418 Provide a default definition.
3419 Use it when executing the default @ action.
3420 * src/reader.c (reader_output_yylsp): No longer include
3421 `timestamp' and `text' in the default YYLTYPE.
3423 2000-12-12 Akim Demaille <akim@epita.fr>
3425 * src/reader.c (copy_definition, parse_union_decl, copy_action)
3426 (copy_guard): Quote the file names.
3427 Reported by Laurent Mascherpa.
3429 2000-12-12 Akim Demaille <akim@epita.fr>
3431 * src/output.c (output_headers, output_program, output): Be sure
3432 to escape special characters when outputting filenames.
3433 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
3434 (output_headers): Don't depend on them, Use ACTSTR.
3436 2000-11-17 Akim Demaille <akim@epita.fr>
3438 * lib/obstack.h: Formatting changes.
3439 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
3440 prevents type checking.
3441 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3442 cast the value to (void *): assigning a `foo *' to a `void *'
3444 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3445 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
3448 2000-11-17 Akim Demaille <akim@epita.fr>
3450 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
3452 (suite.m4, regression.m4, calc.m4): these.
3453 * tests/atgeneral.m4: Update from CVS Autoconf.
3455 2000-11-17 Akim Demaille <akim@epita.fr>
3457 * tests/regression.m4 (%union and --defines): New test,
3458 demonstrating a current bug in the obstack implementation.
3460 2000-11-17 Akim Demaille <akim@epita.fr>
3462 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
3464 Use them to declare the variables which are global or local to
3467 2000-11-17 Akim Demaille <akim@epita.fr>
3469 * acconfig.h: Remove, no longer used.
3471 2000-11-07 Akim Demaille <akim@epita.fr>
3473 * src: s/Copyright (C)/Copyright/g.
3475 2000-11-07 Akim Demaille <akim@epita.fr>
3477 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
3479 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
3481 2000-11-07 Akim Demaille <akim@epita.fr>
3483 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
3484 Merge in a single CPP if/else.
3486 2000-11-07 Akim Demaille <akim@epita.fr>
3488 * src/output.c (output): Remove useless variables.
3489 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
3490 argument `data' for consistency with the prototypes.
3492 (obstack_copy, obstack_copy0): Rename the second argument as
3493 `address' for consistency. Qualify it `const'.
3494 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
3495 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
3496 `const' their input argument (`data' or `address').
3497 Adjust the corresponding macros to include `const' in casts.
3499 2000-11-03 Akim Demaille <akim@epita.fr>
3501 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
3502 s/PFILE1/BISON_HAIRY/.
3503 Adjust dependencies.
3505 2000-11-03 Akim Demaille <akim@epita.fr>
3507 For some reason, this was not applied.
3509 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3510 `unlink': it's no longer used.
3512 2000-11-03 Akim Demaille <akim@epita.fr>
3514 * src/files.c (skeleton_find): New function, eved out of...
3515 (open_files, open_extra_files): here.
3517 2000-11-03 Akim Demaille <akim@epita.fr>
3521 * src/files.c (obstack_save): New function.
3522 (done): Rename as...
3523 (output_files): this.
3525 * src/main.c (main): Don't use `atexit' to register `done', since
3526 it no longer has to remove tmp files, just call `output_files'
3527 when there are no errors.
3529 2000-11-02 Akim Demaille <akim@epita.fr>
3531 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3532 `unlink': it's no longer used.
3533 * src/files.h: Formatting changes.
3535 2000-11-02 Akim Demaille <akim@epita.fr>
3537 Remove the last uses of mktemp and unlink/delete.
3539 * src/files.c (fdefines, ftable): Removed.
3540 (defines_ostack, table_obstack): New.
3541 Adjust dependencies of the former into uses of the latter.
3542 * src/output.c (output_short_or_char_table, output_short_table):
3543 Convert to using obstacks.
3544 * src/reader.c (copy_comment2): Accept one FILE * and two
3546 (output_token_defines, reader_output_yylsp): Use obstacks.
3547 * src/system.h (obstack_fgrow3): New.
3549 2000-11-01 Akim Demaille <akim@epita.fr>
3551 Change each use of `fattrs' into a use of `attrs_obstack'.
3553 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
3554 * src/files.c (fattrs): Remove.
3555 (attrs_obstack): New.
3556 Adjust all dependencies.
3557 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
3559 2000-11-01 Akim Demaille <akim@epita.fr>
3562 Change each use of `faction' into a use of `action_obstack'.
3564 * lib/obstack.h, lib/obstack.c: New files.
3565 * src/files.c (faction): Remove.
3566 (action_obstack): New.
3567 Adjust all dependencies.
3569 2000-10-20 Akim Demaille <akim@epita.fr>
3571 * lib/quote.h (PARAMS): New macro. Use it.
3573 2000-10-16 Akim Demaille <akim@epita.fr>
3575 * src/output.c (output_short_or_char_table): New function.
3576 (output_short_table, output_token_translations): Use it.
3577 (goto_actions): Use output_short_table.
3579 2000-10-16 Akim Demaille <akim@epita.fr>
3581 * src/symtab.c (bucket_new): New function.
3584 * src/output.c (output_short_table): New argument to display the
3585 comment associated with the table.
3586 Adjust dependencies.
3587 (output_gram): Use it.
3588 (output_rule_data): Nicer output layout for YYTNAME.
3590 2000-10-16 Akim Demaille <akim@epita.fr>
3592 * src/lex.c (read_typename): New function.
3594 * src/reader.c (copy_dollar): Likewise.
3596 2000-10-16 Akim Demaille <akim@epita.fr>
3598 * src/reader.c (copy_comment2): Expect the input stream to be on
3599 the `/' which is suspected to open a comment, instead of being
3600 called after `//' or `/*' was read.
3601 (copy_comment, copy_definition, parse_union_decl, copy_action)
3602 (copy_guard): Adjust.
3604 2000-10-16 Akim Demaille <akim@epita.fr>
3606 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
3607 `read_signed_integer'.
3609 2000-10-16 Akim Demaille <akim@epita.fr>
3611 * src/reader.c (copy_dollar): New function.
3612 (copy_guard, copy_action): Use it.
3614 2000-10-16 Akim Demaille <akim@epita.fr>
3616 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
3617 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
3618 New files, from Fileutils 4.0.27.
3619 * src/main.c (printable_version): Remove.
3620 * src/lex.c, src/reader.c: Use `quote'.
3622 2000-10-04 Akim Demaille <akim@epita.fr>
3624 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
3626 2000-10-04 Akim Demaille <akim@epita.fr>
3628 * doc/bison.texinfo: Various typos spotted by Neil Booth.
3630 2000-10-04 Akim Demaille <akim@epita.fr>
3632 When a literal string is used to define two different tokens,
3633 `bison -v' segfaults.
3634 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
3636 * tests/regression.m4: New file.
3637 Include the core of the sample provided by Piotr Gackiewicz.
3638 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
3641 2000-10-04 Akim Demaille <akim@epita.fr>
3643 * src/reader.c (parse_expect_decl): Keep `count' within the size
3647 2000-10-02 Paul Eggert <eggert@twinsun.com>
3649 * bison.s1 (yyparse): Assign the default value
3650 unconditionally, to avoid a GCC warning and make the parser a
3653 2000-10-02 Akim Demaille <akim@epita.fr>
3655 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
3658 2000-10-02 Akim Demaille <akim@epita.fr>
3660 * src/derives.c, src/print.c, src/reduce.c: To ease the
3661 translation, move some `\n' out of the translated strings.
3663 2000-10-02 Akim Demaille <akim@epita.fr>
3665 The location tracking mechanism is precious for parse error
3666 messages. Nevertheless, it is enabled only when `@n' is used in
3667 the grammar, which is a different issue (you can use it in error
3668 message, but not in the grammar per se). Therefore, there should
3669 be another means to enable it.
3671 * src/getargs.c (getargs): Support `--locations'.
3673 * src/getargs.h (locationsflag): Export it.
3674 * src/lex.c (percent_table): Support `%locations'.
3675 * src/reader.c (yylsp_needed): Remove this variable, now replaced
3676 with `locationsflag'.
3677 * doc/bison.texinfo: Document `--locations' and `%locations'.
3679 * tests/calc.m4: Test it.
3681 For regularity of the names, replace each
3682 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
3683 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
3684 In addition replace each `flag' with `_flag'.
3686 2000-10-02 Akim Demaille <akim@epita.fr>
3688 Also test parse error messages, including with YYERROR_VERBOSE.
3690 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
3692 Use it to check the computations.
3693 Use it to check `nonassoc' is honored.
3694 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
3695 `--yyerror-verbose'.
3696 (_AT_CHECK_CALC): Adjust to this option.
3697 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
3699 2000-10-02 Akim Demaille <akim@epita.fr>
3701 Test also `--verbose', `--defines' and `--name-prefix'. Testing
3702 the latter demonstrates a flaw in the handling of non debugging
3703 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
3704 was used in order to simplify:
3720 unfortunately this leads to a CPP conflict when
3721 `--name-prefix=foo' is used since it produces `#define yydebug
3724 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
3725 (YYDPRINTF): New macro.
3727 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
3729 Also test `--verbose', `--defines' and `--name-prefix'.
3731 2000-10-02 Akim Demaille <akim@epita.fr>
3733 Improve the readability of the produced parsers.
3735 * src/bison.s1: Formatting changes.
3736 Improve the comment related to the `$' mark.
3737 (yydefault): Don't fall through to `yyresume': `goto' there.
3738 * src/output.c (output_parser): When the `$' is met, skip the end
3740 New variable, `number_of_dollar_signs', to check there's exactly
3741 one `$' in the parser skeleton.
3743 2000-10-02 Akim Demaille <akim@epita.fr>
3745 * lib/xstrdup.c: New file, from the fileutils.
3746 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
3747 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
3748 instead of strlen + xmalloc + strcpy.
3749 * src/symtab.c (copys): Remove, use xstrdup instead.
3751 2000-10-02 Akim Demaille <akim@epita.fr>
3753 * src/gram.h (associativity): New enum type which replaces the
3754 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
3755 `right_assoc', `left_assoc' and `non_assoc'.
3756 Adjust all dependencies.
3757 * src/reader.c: Formatting changes.
3758 (LTYPESTR): Don't define it, use it as a literal in
3759 `reader_output_yylsp'.
3760 * src/symtab.h (symbol_class): New enum type which replaces the
3761 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
3762 `sunknown', `stoken and `snterm'.
3764 2000-10-02 Akim Demaille <akim@epita.fr>
3766 * src/getargs.c (fixed_outfiles): Rename as...
3767 (yaccflag): for consistency and accuracy.
3768 Adjust dependencies.
3770 2000-10-02 Akim Demaille <akim@epita.fr>
3772 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
3773 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
3774 difficult and introduced a lot of core dump. It turns out that
3775 Bison used an implementation of `xmalloc' based on `calloc', and
3776 at various places it does depend upon the initialization to 0. I
3777 have not tried to isolate the pertinent places, and all the former
3778 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
3779 someone should address this issue.
3781 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
3782 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
3784 Adjust dependencies.
3785 * src/warshall.h: New file.
3788 2000-10-02 Akim Demaille <akim@epita.fr>
3790 Various anti-`extern in *.c' changes.
3792 * src/system.h: Include `assert.h'.
3794 2000-10-02 Akim Demaille <akim@epita.fr>
3796 * src/state.h (nstates, final_state, first_state, first_shift)
3797 (first_reduction): Move their exportation from here...
3798 * src/LR0.h: to here.
3799 Adjust dependencies.
3800 * src/getargs.c (statisticsflag): New variable.
3801 Add support for `--statistics'.
3802 Adjust dependencies.
3804 Remove a lot of now useless `extern' statements in most files.
3806 2000-10-02 Akim Demaille <akim@epita.fr>
3808 * src/LR0.h: New file.
3811 2000-10-02 Akim Demaille <akim@epita.fr>
3813 * src/print.h: New file.
3815 * src/print.c: Formatting and ordering changes.
3816 (verbose, terse): Replace with...
3817 (print_results): this new function.
3818 Adjust dependencies.
3820 2000-10-02 Akim Demaille <akim@epita.fr>
3822 * src/conflicts.c (conflict_report): New function.
3823 (conflict_log, verbose_conflict_log): Replace with...
3824 (print_conflicts): this function.
3825 Adjust dependencies.
3826 * src/conflicts.h: New file.
3827 Propagate its inclusion.
3829 2000-10-02 Akim Demaille <akim@epita.fr>
3831 * src/nullable.h: New file.
3832 Propagate its inclusion.
3833 * src/nullable.c: Formatting changes.
3835 2000-10-02 Akim Demaille <akim@epita.fr>
3837 * src/reduce.h: New file.
3838 Propagate its inclusion.
3839 * src/reduce.c: Topological sort and other formatting changes.
3840 (bool, TRUE, FALSE): Move their definition to...
3841 * src/system.h: here.
3843 2000-10-02 Akim Demaille <akim@epita.fr>
3845 * src/files.c: Formatting changes.
3846 (tryopen, tryclose, openfiles): Rename as...
3847 (xfopen, xfclose, open_files): this.
3848 (stringappend): static.
3849 * src/files.h: Complete the list of exported symbols.
3852 2000-10-02 Akim Demaille <akim@epita.fr>
3854 * src/reader.h: New file.
3855 Propagate its use instead of tedious list of `extern' and
3857 * src/reader.c: Formatting changes, topological sort,
3860 2000-10-02 Akim Demaille <akim@epita.fr>
3862 * src/lex.h: Prototype `lex.c' exported functions.
3863 * src/reader.c: Adjust.
3864 * src/lex.c: Formatting changes.
3865 (safegetc): Rename as...
3868 2000-10-02 Akim Demaille <akim@epita.fr>
3870 * src/lalr.h: New file.
3871 Propagate its inclusion instead of prototypes and `extern'.
3872 * src/lalr.c: Formatting changes, topological sorting etc.
3874 2000-10-02 Akim Demaille <akim@epita.fr>
3876 * src/output.c (token_actions): Introduce a temporary array,
3877 YYDEFACT, that makes it possible for this function to use
3880 2000-10-02 Akim Demaille <akim@epita.fr>
3882 `user_toknums' is output as a `short[]' in `output.c', while it is
3883 defined as a `int[]' in `reader.c'. For consistency with the
3884 other output tables, `user_toknums' is now defined as a table of
3887 * src/reader.c (user_toknums): Be a short table instead of an int
3889 Adjust dependencies.
3891 Factor the short table outputs.
3893 * src/output.c (output_short_table): New function.
3894 * src/output.c (output_gram, output_stos, output_rule_data)
3895 (output_base, output_table, output_check): Use it.
3897 2000-10-02 Akim Demaille <akim@epita.fr>
3899 * src/output.c (output): Topological sort of the functions, in
3900 order to get rid of the `static' prototypes.
3901 No longer use `register'.
3902 * src/output.h: New file.
3903 Propagate its inclusion in files explicitly prototyping functions
3906 2000-09-21 Akim Demaille <akim@epita.fr>
3908 * src/atgeneral.m4: Update from Autoconf.
3910 2000-09-21 Akim Demaille <akim@epita.fr>
3912 * src/closure.h: New file.
3913 * src/closure.c: Formatting changes, topological sort over the
3914 functions, use of closure.h.
3915 (initialize_closure, finalize_closure): Rename as...
3916 (new_closure, free_closure): these. Adjust dependencies.
3917 * src/LR0.c: Formatting changes, topological sort, use of
3919 (initialize_states): Rename as...
3921 * src/Makefile.am (noinst_HEADERS): Adjust.
3923 2000-09-20 Akim Demaille <akim@epita.fr>
3925 * src/acconfig.h: Don't protect config.h against multiple
3927 Don't define PARAMS.
3928 * src/system.h: Define PARAMS.
3929 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
3930 purpose of config.h. system.h must not try to fix wrong
3931 definitions in config.h.
3933 2000-09-20 Akim Demaille <akim@epita.fr>
3935 * src/derives.h: New file.
3936 * src/main.c, src/derives.h: Use it.
3938 * src/Makefile.am (noinst_HEADERS): Adjust.
3940 2000-09-20 Akim Demaille <akim@epita.fr>
3942 * tests/atgeneral.m4: Update from Autoconf.
3943 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
3944 (AT_CHECK_CALC): New macros.
3945 Use these macros to test bison with options `', `--raw',
3946 `--debug', `--yacc', `--yacc --debug'.
3948 2000-09-19 Akim Demaille <akim@epita.fr>
3950 * src/output.c: Formatting changes.
3951 * src/machine.h: Remove, leaving its contents in...
3952 * src/system.h: here.
3954 Adjust all dependencies on stdio.h and machine.h.
3955 * src/getargs.h: New file.
3956 Let all `extern' declarations about getargs.c be replaced with
3957 inclusion of `getargs.h'.
3958 * src/Makefile.am (noinst_HEADERS): Adjust.
3960 * tests/calc.m4 (yyin): Be initialized in main, not on the global
3962 (yyerror): Returns void, not int.
3963 * doc/bison.texinfo: Formatting changes.
3965 2000-09-19 Akim Demaille <akim@epita.fr>
3967 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
3970 2000-09-18 Akim Demaille <akim@epita.fr>
3972 * configure.in: Append WARNING_CFLAGS to CFLAGS.
3973 * src/Makefile.am (INCLUDES): Don't.
3974 Be ready to fetch headers in lib/.
3976 2000-09-18 Akim Demaille <akim@epita.fr>
3978 * doc/bison.texinfo: Update the copyright.
3979 ANSIfy and GNUify the examples.
3980 Remove the old menu.
3982 2000-09-18 Akim Demaille <akim@epita.fr>
3984 First set of tests: use the `calc' example from the documentation.
3986 * src/bison.s1 (yyparse): Condition the code using `yytname' which
3987 is defined only when YYDEBUG is.
3988 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
3989 * src/files.c (tryopen, tryclose): Formatting changes.
3990 Move to the top and be static.
3991 * src/reader.c (read_signed_integer): Likewise.
3992 * tests/calc.m4: New file.
3993 * Makefile.am, suite.m4: Adjust.
3994 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
3996 2000-09-18 Akim Demaille <akim@epita.fr>
3998 Add support for an Autotest test suite for Bison.
4000 * m4/m4.m4, m4/atconfig.m4: New files.
4001 * m4/Makefile.am (EXTRA_DIST): Adjust.
4002 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4004 * src/getargs.c: Display a more standard --version message.
4005 * src/reader.c (reader): Formatting changes.
4006 No longer depend upon VERSION_STRING.
4007 * configure.in: No longer use `dnl'.
4008 Set up the test suite and the new directory `tests/.
4009 (VERSION_STRING): Remove.
4011 2000-04-14 Akim Demaille <akim@epita.fr>
4013 * src/reader.c (copy_comment2): New function, same as former
4014 `copy_comment', but outputs into two FILE *.
4015 (copy_comment): Use it.
4016 (parse_union_decl): Use it.
4017 (get_type, parse_start_decl): Use the same `invalid' message.
4018 (parse_start_decl, parse_union_decl): Use the same `multiple'
4020 (parse_union_decl, copy_guard, copy_action): Use the same
4021 `unmatched' message.
4022 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4024 2000-03-31 Akim Demaille <akim@epita.fr>
4026 * src/files.c (tryopen, tryclose): Move to the top.
4029 2000-03-31 Akim Demaille <akim@epita.fr>
4031 * src/main.c (main): Don't call `done', exit does it.
4033 2000-03-31 Akim Demaille <akim@epita.fr>
4035 * allocate.c: s/return (foo)/return foo/.
4038 * output.c: Likewise.
4039 * reader.c: Likewise.
4040 * symtab.c: Likewise.
4041 * vmsgetargs.c: Likewise.
4043 2000-03-31 Akim Demaille <akim@epita.fr>
4045 Clean up the error reporting functions.
4047 * src/report.c: New file.
4048 * src/report.h: Likewise.
4049 * src/Makefile.am: Adjust.
4050 * m4/error.m4: New file.
4051 * m4/Makefile.am: Adjust.
4052 * configure.in (jm_PREREQ_ERROR): Call it.
4053 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4055 (fatal, fatals): Remove. All callers use complain.c::fatal.
4056 (warn, warni, warns, warnss, warnss): Remove. All callers use
4057 complain.c::complain.
4058 (toomany): Remove, use fatal instead.
4059 * src/files.c (done): No argument, use complain_message_count.
4060 * src/main.c (main): Register `done' to `atexit'.
4062 * src/getargs.c (usage): More `fputs', less `fprintf'.
4064 2000-03-28 Akim Demaille <akim@epita.fr>
4066 * lib/: New directory.
4067 * Makefile.am (SUBDIRS): Adjust.
4068 * configure.in: Adjust.
4069 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4071 * src/alloca.c: Moved to lib/.
4072 * src/getopt.c: Likewise.
4073 * src/getopt1.c: Likewise.
4074 * src/getopt.h: Likewise.
4075 * src/ansi2knr.c: Likewise.
4076 * src/ansi2knr.1: Likewise.
4077 * src/Makefile.am: Adjust.
4078 * lib/Makefile.am: New file.
4080 2000-03-28 Akim Demaille <akim@epita.fr>
4082 * src/getargs.c (usage): Refresh the help message.
4084 2000-03-17 Akim Demaille <akim@epita.fr>
4086 * src/getopt1.c: Updated from textutils 2.0e
4087 * src/getopt.c: Likewise.
4088 * src/getopt.h: Likewise.
4090 2000-03-17 Akim Demaille <akim@epita.fr>
4092 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4093 the file name, not the whole `#line LINE FILE'.
4095 2000-03-17 Akim Demaille <akim@epita.fr>
4097 On syntax errors, report the token on which we choked.
4099 * src/bison.s1 (yyparse): In the label yyerrlab, when
4100 YYERROR_VERBOSE, add yychar in msg.
4102 2000-03-17 Akim Demaille <akim@epita.fr>
4104 * src/reader.c (copy_at): New function.
4105 (copy_guard): Use it.
4106 (copy_action): Use it.
4108 2000-03-17 Akim Demaille <akim@epita.fr>
4110 Be kind to translators, save some useless translations.
4112 * src/main.c (banner): New function.
4113 (fatal_banner): Use it.
4114 (warn_banner): Use it.
4116 2000-03-17 Akim Demaille <akim@epita.fr>
4118 * src/reader.c (copy_definition): Use copy_string and
4119 copy_comment. Removed now unused `match', `ended',
4121 (copy_comment, copy_string): Moved, to be visible from
4124 2000-03-17 Akim Demaille <akim@epita.fr>
4126 * src/reader.c (copy_string): Declare `static inline'. No
4127 problems with inline, since it is checked by configure.
4128 (copy_comment): Likewise.
4130 2000-03-17 Akim Demaille <akim@epita.fr>
4132 * src/reader.c (packsymbols): Formatting changes.
4134 2000-03-17 Akim Demaille <akim@epita.fr>
4136 * src/reader.c (copy_comment): New function, factored out from:
4137 (copy_action): Use it. Removed now unused `match', `ended',
4139 (copy_guard): Likewise.
4141 2000-03-17 Akim Demaille <akim@epita.fr>
4143 * src/reader.c (copy_string): New function, factored out from:
4144 (copy_action): Use it.
4145 (copy_guard): Likewise.
4147 2000-03-17 Akim Demaille <akim@epita.fr>
4149 Change the handling of @s so that they behave exactly like $s.
4150 There is now a pseudo variable @$ (readble and writable), location
4151 of the lhs of the rule (by default ranging from the location of
4152 the first symbol of the rhs, to the location of the last symbol,
4153 or, if the rhs is empty, YYLLOC).
4155 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4157 (yyparse): When providing a default semantic action, provide a
4158 default location action.
4159 (after the $): No longer change `*YYLSP', just stack YYLOC the
4160 same way you stack YYVAL.
4161 * src/reader.c (read_declarations): Use warns.
4162 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4163 (copy_action, case '@'): Likewise.
4164 Use a standard error message, to save useless work from
4167 2000-03-17 Akim Demaille <akim@epita.fr>
4169 * src/bison.s1: Formatting and cosmetics changes.
4170 * src/reader.c: Likewise.
4171 Update the Copyright notice.
4173 2000-03-17 Akim Demaille <akim@epita.fr>
4175 * src/bison.s1 (#line): All set to `#line' only, since the
4176 Makefile now handles them.
4178 2000-03-16 Akim Demaille <akim@epita.fr>
4180 * src/output.c (output_rule_data): Output the documentation of
4182 (Copyright notice): Update.
4185 2000-03-16 Akim Demaille <akim@epita.fr>
4187 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4188 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4189 One `#if YYDEBUG' remains, since it uses variables which are
4190 defined only if `YYDEBUG != 0'.
4192 2000-03-16 Akim Demaille <akim@epita.fr>
4194 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4195 and related variables so that the similarities are highlighted.
4197 2000-03-16 Akim Demaille <akim@epita.fr>
4199 * src/bison.s1: Properly indent CPP directives.
4201 2000-03-16 Akim Demaille <akim@epita.fr>
4203 * src/bison.s1: Properly indent the `alloca' CPP section.
4205 2000-03-16 Akim Demaille <akim@epita.fr>
4207 Do not hard code values of directories in `configure.in'.
4208 Update the `configure' tool chain.
4210 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4212 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4213 (AC_OUTPUT): Add m4/Makefile.
4214 Bump to bison 1.28a, 1.29 has never been released.
4215 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4216 handled via src/Makefile.am.
4217 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4218 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4220 * Makefile.am (SUBDIRS): Add m4.
4221 (ACLOCAL_AM_FLAGS): New variable.
4222 (AUTOMAKE_OPTIONS): Add check-news.
4223 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4224 the proper line number and file name.
4225 (DEFS): Propagate the location of bison library files and of the
4227 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4229 * acinclude.m4: Remove, replaced by the directory m4.
4230 * m4/Makefile.am (EXTRA_DIST): New variable.
4231 * m4/gettext.m4: New file, from the fileutils.
4232 * m4/lcmessage.m4: Likewise
4233 * m4/progtest.m4: Likewise.
4234 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4236 2000-03-10 Akim Demaille <akim@epita.fr>
4239 Formatting changes of various comments.
4240 Respect the GNU coding standards at various places.
4241 Don't use `_()' when no translation is needed.
4243 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4246 OS/2 honors TMPDIR environment variable.
4248 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4250 * doc/bison.texinfo: Tweaked spelling and grammar.
4252 Removed reference to price of printed copy.
4253 Mention BISON_SIMPLE and BISON_HAIRY.
4255 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4257 * configure.in, NEWS:
4258 Bison 1.29 released.
4260 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4262 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4263 Added reference card.
4265 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4267 * po/ru.po: Added Russian translation.
4269 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4271 * configure.in: Added Russian translation.
4273 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4275 * configure.in, NEWS, README:
4276 Released version 1.28.
4278 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4281 Squashed redefinition warning on some systems.
4283 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4284 Have configure build version string instead of relying on ANSI string
4287 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4289 * po/POTFILES.in: Got rid of version.c.
4291 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4293 * acconfig.h, configure.in:
4294 Have configure build version string instead of relying on ANSI string
4297 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4300 Dropped mention of `+' for long-named options.
4302 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4304 * src/files.c: Added <unistd.h> for unlink().
4306 * src/Makefile.am, src/system.h:
4309 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4311 * README: Added a FAQ list.
4313 * configure.in, acconfig.h:
4316 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4318 * doc/FAQ, doc/Makefile.am:
4321 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4323 * src/alloc.h, src/symtab.h, src/version.c:
4324 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4326 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4328 * src/.cvsignore, src/Makefile.am:
4329 Reorganized: sources in `src', documentation in `doc'.
4331 * src/lex.c (literalchar):
4332 fixed the code for escaping double quotes (thanks
4335 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4337 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4338 Adjusted paths to reflect directory reorganization.
4340 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4342 * doc/.cvsignore, doc/Makefile.am:
4343 Reorganized: sources in `src', documentation in `doc'.
4345 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4348 Updated AC_INIT file to reflect directory reorganization.
4350 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4351 Reorganized: sources in `src', documentation in `doc'.
4353 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4356 Don't declare calloc() and realloc() if not necessary.
4358 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4360 * configure.in, acconfig.h, acinclude.m4:
4361 Don't declare calloc() and realloc() if not necessary.
4363 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4365 * po/.cvsignore: Added i18n support.
4367 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4369 * acconfig.h, configure.in, Makefile.am:
4372 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4374 * src/bison.s1: Fixed #line numbers.
4376 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4378 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4379 Added PO files from Translation Project.
4381 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4384 Added support for non-ANSI compilers (ansi2knr).
4386 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4388 * configure.in: Bumped version number to 1.27.
4391 Added `bison.simple' to list of files removed by `make distclean'.
4393 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4395 * src/files.c, src/files.h:
4396 Defined locations of parser files in config.h instead of Makefile.
4398 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4400 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4401 Defined locations of parser files in config.h instead of Makefile.
4403 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4406 Removed inappropriate use of $< macro.
4408 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4410 * po/Makefile.in.in, po/POTFILES.in:
4411 Add `po' directory skeleton.
4413 1999-01-27 Jesse Thilo <jthilo@gnu.org>
4415 * README: Document help-bison list.
4417 * configure.in: Add check for mkstemp().
4419 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4421 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
4422 Hush a few compiler warnings.
4425 Add tryclose(), which verifies that fclose was successful.
4426 Hush a couple of compiler warnings.
4428 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4430 * Makefile.am, OChangeLog:
4431 ChangeLog is now automatically generated. Include the old version as
4434 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4436 * 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:
4439 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4441 * doc/bison.texinfo: Fix formatting glitch.
4443 * doc/bison.texinfo: Update FSF address.
4445 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4447 * acconfig.h: Update FSF address.
4449 1999-01-08 Jesse Thilo <jthilo@gnu.org>
4452 Don't define PACKAGE here, since config.h defines it.
4454 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4456 * src/reader.c: Update copyright date.
4459 Ditch sprintf to statically-sized buffers in fatal/warn functions in
4460 favor of output directly to stderr (avoids buffer overruns).
4462 * src/reader.c: Some checks for premature EOF.
4464 * 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:
4465 Use prototypes if the compiler understands them.
4467 * src/files.c: Honor TMPDIR on Unix hosts.
4468 Use prototypes if the compiler understands them.
4471 Fix a couple of buffer overrun bugs.
4472 Use prototypes if the compiler understands them.
4474 * src/system.h: Include unistd.h and ctype.h.
4475 Use #ifdef instead of #if for NLS symbols.
4477 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4479 * doc/bison.texinfo:
4480 Delete comment "consider using @set for edition number, etc..." since
4481 we now are doing so.
4483 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4486 Use prototypes if the compiler understands them.
4488 * NEWS: Document 1.26 highlights.
4490 * Makefile.am: Require Automake 1.3 or later.
4493 Use prototypes if the compiler understands them.
4495 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4498 Use VERSION symbol from automake for version number.
4500 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4502 * acconfig.h, configure.in, version.cin:
4503 Use VERSION symbol from automake for version number.
4505 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4508 Distribute original version of simple parser (bison.s1), not built
4509 version (bison.simple).
4511 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4513 * doc/bison.texinfo: Add info dir entry.
4515 * doc/bison.texinfo:
4516 Let automake put version number into documentation.
4518 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4520 * src/bison.cld, src/build.com, src/vmshlp.mar:
4521 Add non-RCS files from /gd/gnu/bison.
4523 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4526 Document the BISON_HAIRY and BISON_SIMPLE variables.
4528 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4530 * src/version.c: Build version.c automatically.
4533 Fix token numbering (used to start at 258, not 257).
4535 * src/system.h: Include config.h.
4537 * src/getargs.c: Update bug report address.
4539 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
4540 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
4542 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4545 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4547 * configure.in, version.cin:
4548 Build version.c automatically.
4550 * AUTHORS: Add AUTHORS file.
4552 * README: Update bug report address.
4555 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4557 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
4560 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4562 * doc/bison.texinfo: Clean up some formatting.
4564 1998-05-05 Richard Stallman <rms@gnu.org>
4566 * doc/bison.texinfo:
4567 Explain better why to make a pure parser.
4569 1998-01-05 Richard Stallman <rms@gnu.org>
4571 * src/files.c (openfiles):
4572 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
4573 find a temporary directory, if possible. Do not unlink files while
4576 1997-08-25 Richard Stallman <rms@gnu.org>
4578 * src/reader.c (stack_offset;):
4579 Change some warni to warns.
4581 * src/lex.c (literalchar): Use warns, not warni.
4583 1997-06-28 Richard Stallman <rms@gnu.org>
4585 * src/bison.s1: Add a Bison version comment.
4587 * src/main.c (fatal, warn, berror):
4590 1997-06-28 Richard Stallman <rms@gnu.org>
4592 * Makefile.in (bison_version): New variable.
4593 (dist): Use that variable.
4594 (bison.s1): Substitute the Bison version into bison.simple.
4596 * bison.simple: Add a Bison version comment.
4598 1997-06-18 Richard Stallman <rms@gnu.org>
4600 * src/main.c (fatal, warn, berror):
4601 Make error messages standard.
4602 (toomany): Improve error message text.
4604 * 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:
4605 new.h renamed to alloc.h.
4607 1997-06-18 Richard Stallman <rms@gnu.org>
4609 * Makefile.in: new.h renamed to alloc.h.
4611 1997-05-24 Richard Stallman <rms@gnu.org>
4613 * src/lex.c (literalchar):
4614 Fix the code for escaping \, " and '.
4616 (lex): Avoid trouble when there are many chars
4617 to discard in a char literal with just several chars in it.
4619 1997-05-17 Richard Stallman <rms@gnu.org>
4622 Use malloc, if using alloca is troublesome.
4623 (YYSTACK_USE_ALLOCA): New flag macro.
4624 Define it for some systems and compilers.
4625 (YYSTACK_ALLOC): New macro.
4626 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4627 If it was malloc'd, free it.
4629 1997-05-17 Richard Stallman <rms@gnu.org>
4632 Use malloc, if using alloca is troublesome.
4633 (YYSTACK_USE_ALLOCA): New flag macro.
4634 Define it for some systems and compilers.
4635 (YYSTACK_ALLOC): New macro.
4636 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4637 If it was malloc'd, free it.
4639 1997-04-23 Richard Stallman <rms@gnu.org>
4642 (alloca) [__hpux]: Always define as __builtin_alloca.
4644 1997-04-23 Richard Stallman <rms@gnu.org>
4647 (alloca) [__hpux]: Always define as __builtin_alloca.
4649 1997-04-22 Richard Stallman <rms@gnu.org>
4652 [__hpux]: Include alloca.h (right for HPUX 10)
4653 instead of declaring alloca (right for HPUX 9).
4655 * src/bison.s1 (__yy_memcpy):
4656 Declare arg `count' as unsigned int.
4657 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
4659 1997-04-22 Richard Stallman <rms@gnu.org>
4662 [__hpux]: Include alloca.h (right for HPUX 10)
4663 instead of declaring alloca (right for HPUX 9).
4665 * bison.simple (__yy_memcpy):
4666 Declare arg `count' as unsigned int.
4667 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
4669 1997-01-03 Richard Stallman <rms@gnu.org>
4671 * src/allocate.c: [__STDC__ or _MSC_VER]:
4672 Declare calloc and realloc to return void *.
4674 1997-01-02 Richard Stallman <rms@gnu.org>
4677 [_MSC_VER]: Include stdlib.h and process.h.
4678 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
4680 * src/main.c (main): Return FAILURE as a value.
4681 (printable_version): Declare arg as int, not char.
4683 1997-01-02 Richard Stallman <rms@gnu.org>
4685 * Makefile.in (dist):
4686 Explicitly check for symlinks, and copy them.
4688 1996-12-19 Richard Stallman <rms@gnu.org>
4691 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
4693 1996-12-18 Paul Eggert <eggert@gnu.org>
4695 * src/bison.s1 (yyparse):
4696 If __GNUC__ and YYPARSE_PARAM are both defined,
4697 declare yyparse to have a void * argument.
4699 1996-12-18 Paul Eggert <eggert@gnu.org>
4701 * bison.simple (yyparse):
4702 If __GNUC__ and YYPARSE_PARAM are both defined,
4703 declare yyparse to have a void * argument.
4705 1996-12-17 Richard Stallman <rms@gnu.org>
4707 * src/reduce.c (nbits): Add some casts.
4709 1996-08-12 Richard Stallman <rms@gnu.org>
4711 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
4713 1996-08-12 Richard Stallman <rms@gnu.org>
4715 * bison.simple: Test _MSDOS as well as _MSDOS_.
4717 1996-07-31 Richard Stallman <rms@gnu.org>
4720 [__sun && __i386]: Include alloca.h.
4722 1996-07-31 Richard Stallman <rms@gnu.org>
4725 [__sun && __i386]: Include alloca.h.
4727 1996-07-30 Richard Stallman <rms@gnu.org>
4729 * src/bison.s1: Comment change.
4731 * src/bison.s1: Test _MSDOS_, not MSDOS.
4733 1996-07-30 Richard Stallman <rms@gnu.org>
4735 * bison.simple: Comment change.
4737 * bison.simple: Test _MSDOS_, not MSDOS.
4739 1996-06-01 Richard Stallman <rms@gnu.org>
4741 * 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:
4742 Insert `_' macro around many string constants.
4745 Insert `_' macro around many string constants.
4747 (main): Call setlocale, bindtextdomain and textdomain.
4749 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
4750 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
4751 [ENABLE_NLS]: Include libintl.h.
4752 [ENABLE_NLS] (gettext): Define.
4753 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
4754 (N_, PACKAGE, LOCALEDIR): New macros.
4756 1996-06-01 Richard Stallman <rms@gnu.org>
4758 * POTFILES.in: New file.
4760 * Makefile.in (allocate.o):
4761 Define target explicitly.
4763 * Makefile.in (CFLAGS): Set to @CFLAGS@.
4764 (LDFLAGS): Set to @LDFLAGS@.
4765 (configure): Run autoconf only if preceding `cd' succeeds.
4766 (bison.s1): Redirect output to temporary file then move the
4767 temporary to the target, rather than redirecting directly to bison.s1.
4768 (clean): Remove config.status and config.log.
4769 (distclean): Don't remove config.status here.
4771 1996-05-12 Richard Stallman <rms@gnu.org>
4774 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
4776 1996-05-12 Richard Stallman <rms@gnu.org>
4779 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
4781 1996-05-11 Richard Stallman <rms@gnu.org>
4783 * src/bison.s1 (__yy_memcpy):
4784 Really reorder the args, as was supposedly done on Feb 14 1995.
4785 (yyparse): Calls changed accordingly.
4787 1996-05-11 Richard Stallman <rms@gnu.org>
4789 * Makefile.in (dist): Don't use $(srcdir).
4791 * bison.simple (__yy_memcpy):
4792 Really reorder the args, as was supposedly done on Feb 14 1995.
4793 (yyparse): Calls changed accordingly.
4795 1996-01-27 Richard Stallman <rms@gnu.org>
4797 * src/output.c (output_rule_data):
4798 Test YYERROR_VERBOSE in the conditional
4799 around the definition of ttyname.
4801 1995-12-29 Richard Stallman <rms@gnu.org>
4804 Fix line numbers in #line commands.
4806 1995-12-29 Richard Stallman <rms@gnu.org>
4809 Fix line numbers in #line commands.
4811 1995-12-27 Richard Stallman <rms@gnu.org>
4813 * src/bison.s1 (YYPARSE_PARAM_DECL):
4814 In C++, make it always null.
4815 (YYPARSE_PARAM_ARG): New macro.
4816 (yyparse): Use YYPARSE_PARAM_ARG.
4818 1995-12-27 Richard Stallman <rms@gnu.org>
4820 * bison.simple (YYPARSE_PARAM_DECL):
4821 In C++, make it always null.
4822 (YYPARSE_PARAM_ARG): New macro.
4823 (yyparse): Use YYPARSE_PARAM_ARG.
4825 1995-11-29 Richard Stallman <rms@gnu.org>
4827 * doc/bison.texinfo:
4828 Describe literal string tokens, %raw, %no_lines, %token_table.
4830 1995-11-29 Daniel Hagerty <hag@gnu.org>
4832 * doc/bison.texinfo: Fixed update date
4834 1995-10-16 Richard Stallman <rms@gnu.org>
4836 * src/version.c: Version 1.25.
4838 1995-10-16 Richard Stallman <rms@gnu.org>
4840 * NEWS: *** empty log message ***
4842 1995-10-16 Richard Stallman <rms@gnu.org>
4844 * doc/bison.1, doc/bison.rnh:
4847 1995-10-15 Richard Stallman <rms@gnu.org>
4849 * src/vmsgetargs.c, src/getargs.c:
4850 Added -n, -k, and -raw switches.
4851 (noparserflag, toknumflag, rawtoknumflag): New variables.
4853 * src/symtab.h (SALIAS):
4854 New #define for adding aliases to %token.
4855 (struct bucket): Added `alias' field.
4857 * src/reduce.c (reduce_grammar):
4858 Revise error message.
4859 (print_notices): Remove final `.' from error message.
4861 * src/reader.c (reader_output_yylsp):
4863 (readgram): Use `#if 0' around code that accepted %command
4864 inside grammar rules: The documentation doesn't allow it,
4865 and it will fail since the %command processors scan for the next %.
4866 (parse_token_decl): Extended the %token
4867 declaration to allow a multi-character symbol as an alias.
4868 (parse_thong_decl): New function.
4869 (read_declarations): Added %thong declarations.
4870 (read_declarations): Handle NOOP to deal with allowing
4871 % declarations as another means to specify the flags.
4872 (readgram): Allow %prec prior to semantics embedded in a rule.
4873 (skip_to_char, read_declarations, copy_definition)
4874 (parse_token_decl, parse_start_decl, parse_type_decl)
4875 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
4876 (get_type_name, copy_guard, copy_action, readgram)
4877 (get_type, packsymbols): Revised most error messages.
4878 Changed `fatal' to `warnxxx' to avoid aborting for error.
4879 Revised and use multiple warnxxx functions to avoid using VARARGS1.
4880 (read_declarations): Improve the error message for
4881 an invalid character. Do not abort.
4882 (read_declarations, copy_guard, copy_action): Use
4883 printable_version to avoid unprintable characters in printed output.
4884 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
4885 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
4886 Allow the type of a non-terminal can be given
4887 more than once, as long as all specifications give the same type.
4890 (output_headers, output_trailers, output, output_gram)
4891 (output_rule_data): Implement noparserflag variable.
4892 Implement toknumflag variable.
4893 (output): Call reader_output_yylsp to output LTYPESTR.
4895 * src/main.c (main):
4896 If reader sees an error, don't process the grammar.
4897 (fatals): Updated to not use VARARGS1.
4898 (printable_version, int_to_string, warn, warni, warns, warnss)
4899 (warnsss): New error reporting functions. Avoid abort for error.
4902 Added THONG and NOOP for alias processing.
4903 Added SETOPT for the new code that allows setting options with %flags.
4906 Include getopt.h. Add some extern decls.
4907 (safegetc): New function to deal with EOF gracefully.
4908 (literalchar); new function to deal with reading \ escapes.
4909 (lex): Use literalchar.
4910 (lex): Implemented "..." tokens.
4911 (literalchar, lex, parse_percent_token): Made tokenbuffer
4912 always contain the token. This includes growing the token
4913 buffer while reading an integer.
4914 (parse_percent_token): Replaced if-else statement with percent_table.
4915 (parse_percent_token): Added % declarations as another
4916 way to specify the flags -n, -l, and -r. Also added hooks for
4917 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
4918 major changes to files.c.
4919 (lex) Retain in the incoming stream a character following
4921 (skip_white_space, lex): Revised most error messages
4922 and changed fatal to warn to avoid aborting.
4923 (percent_table): Added %thong declarations.
4925 * src/gram.h: Comment changes.
4927 * src/files.c (openfiles, open_extra_files, done):
4929 and actfile file. Handle noparserflag. Both for -n switch.
4931 * src/conflicts.c (resolve_sr_conflict):
4932 Remove use of alloca.
4934 1995-06-01 Jim Meyering <meyering@gnu.org>
4936 * doc/bison.texinfo: *** empty log message ***
4938 1995-05-06 Richard Stallman <rms@gnu.org>
4940 * src/bison.s1: Comment change.
4942 1995-05-06 Richard Stallman <rms@gnu.org>
4944 * bison.simple: Comment change.
4946 1995-05-03 Richard Stallman <rms@gnu.org>
4948 * src/version.c: Version now 1.24.
4950 * src/bison.s1: Change distribution terms.
4952 * src/version.c: Version now 1.23.
4954 1995-05-03 Richard Stallman <rms@gnu.org>
4956 * doc/bison.texinfo:
4957 Rewrite "Conditions for Using Bison".
4958 Update version to 1.24.
4960 1995-05-03 Richard Stallman <rms@gnu.org>
4962 * bison.simple: Change distribution terms.
4964 1995-02-23 Richard Stallman <rms@gnu.org>
4966 * src/files.c: Test __VMS_POSIX as well as VMS.
4968 1995-02-14 Jim Meyering <meyering@gnu.org>
4970 * src/bison.s1 (__yy_memcpy):
4971 Renamed from __yy_bcopy to avoid
4972 confusion. Reverse FROM and TO arguments to be consistent with
4975 1995-02-14 Jim Meyering <meyering@gnu.org>
4977 * bison.simple (__yy_memcpy):
4978 Renamed from __yy_bcopy to avoid
4979 confusion. Reverse FROM and TO arguments to be consistent with
4982 1994-11-10 David J. MacKenzie <djm@gnu.org>
4988 * Makefile.in (DISTFILES): Include NEWS.
4990 * Makefile.in (DISTFILES):
4991 Include install-sh, not install.sh.
4993 * configure.in: Update to Autoconf v2 macro names.
4995 1994-10-05 David J. MacKenzie <djm@gnu.org>
4997 * Makefile.in: fix typo
4999 * Makefile.in (prefix, exec_prefix):
5000 Let configure set them.
5002 1994-09-28 David J. MacKenzie <djm@gnu.org>
5004 * Makefile.in: Set datadir to $(prefix)/share.
5006 1994-09-15 Richard Stallman <rms@gnu.org>
5009 Update copyright notice and GPL version.
5011 1994-09-15 Richard Stallman <rms@gnu.org>
5014 Update copyright notice and GPL version.
5016 1994-07-12 Richard Stallman <rms@gnu.org>
5018 * src/reduce.c, src/reader.c:
5021 1994-05-05 David J. MacKenzie <djm@gnu.org>
5023 * Makefile.in: entered into RCS
5025 1994-03-26 Richard Stallman <rms@gnu.org>
5027 * src/bison.s1: entered into RCS
5029 1994-03-26 Richard Stallman <rms@gnu.org>
5031 * bison.simple: entered into RCS
5033 1994-03-25 Richard Stallman <rms@gnu.org>
5035 * src/main.c: entered into RCS
5037 1994-03-24 Richard Stallman <rms@gnu.org>
5039 * src/conflicts.c: entered into RCS
5041 1994-01-02 Richard Stallman <rms@gnu.org>
5043 * Makefile.in: *** empty log message ***
5045 1993-11-21 Richard Stallman <rms@gnu.org>
5047 * src/bison.s1: *** empty log message ***
5049 1993-11-21 Richard Stallman <rms@gnu.org>
5051 * doc/bison.texinfo: entered into RCS
5053 * doc/bison.texinfo: *** empty log message ***
5055 1993-11-21 Richard Stallman <rms@gnu.org>
5057 * bison.simple: *** empty log message ***
5059 1993-10-25 David J. MacKenzie <djm@gnu.org>
5061 * doc/bison.texinfo: *** empty log message ***
5063 1993-10-19 Richard Stallman <rms@gnu.org>
5065 * src/bison.s1: *** empty log message ***
5067 1993-10-19 Richard Stallman <rms@gnu.org>
5069 * bison.simple: *** empty log message ***
5071 1993-10-14 Richard Stallman <rms@gnu.org>
5073 * src/bison.s1: *** empty log message ***
5075 1993-10-14 Richard Stallman <rms@gnu.org>
5077 * bison.simple: *** empty log message ***
5079 1993-09-14 David J. MacKenzie <djm@gnu.org>
5081 * doc/bison.texinfo: *** empty log message ***
5083 1993-09-13 Noah Friedman <friedman@gnu.org>
5085 * Makefile.in: *** empty log message ***
5087 1993-09-10 Richard Stallman <rms@gnu.org>
5089 * src/conflicts.c: *** empty log message ***
5091 * src/system.h: entered into RCS
5093 1993-09-10 Richard Stallman <rms@gnu.org>
5095 * doc/bison.1: entered into RCS
5097 1993-09-06 Noah Friedman <friedman@gnu.org>
5099 * src/version.c: entered into RCS
5101 1993-09-06 Noah Friedman <friedman@gnu.org>
5103 * Makefile.in: *** empty log message ***
5105 1993-07-30 David J. MacKenzie <djm@gnu.org>
5107 * Makefile.in: *** empty log message ***
5109 1993-07-24 Richard Stallman <rms@gnu.org>
5111 * src/bison.s1: *** empty log message ***
5113 1993-07-24 Richard Stallman <rms@gnu.org>
5115 * bison.simple: *** empty log message ***
5117 1993-07-08 David J. MacKenzie <djm@gnu.org>
5119 * Makefile.in: *** empty log message ***
5121 1993-07-04 Richard Stallman <rms@gnu.org>
5123 * src/bison.s1: *** empty log message ***
5125 1993-07-04 Richard Stallman <rms@gnu.org>
5127 * bison.simple: *** empty log message ***
5129 1993-06-26 David J. MacKenzie <djm@gnu.org>
5131 * src/getargs.c: entered into RCS
5133 1993-06-26 David J. MacKenzie <djm@gnu.org>
5135 * doc/bison.texinfo: *** empty log message ***
5137 * doc/bison.1: New file.
5139 1993-06-25 Richard Stallman <rms@gnu.org>
5141 * src/getargs.c: New file.
5143 1993-06-16 Richard Stallman <rms@gnu.org>
5145 * src/bison.s1: *** empty log message ***
5147 1993-06-16 Richard Stallman <rms@gnu.org>
5149 * bison.simple: *** empty log message ***
5151 1993-06-03 Richard Stallman <rms@gnu.org>
5153 * src/bison.s1: New file.
5155 1993-06-03 Richard Stallman <rms@gnu.org>
5157 * doc/bison.texinfo: *** empty log message ***
5159 1993-06-03 Richard Stallman <rms@gnu.org>
5161 * bison.simple: New file.
5163 1993-05-19 Richard Stallman <rms@gnu.org>
5165 * doc/bison.texinfo: New file.
5167 1993-05-07 Noah Friedman <friedman@gnu.org>
5169 * Makefile.in: *** empty log message ***
5171 1993-04-28 Noah Friedman <friedman@gnu.org>
5173 * src/reader.c: *** empty log message ***
5175 1993-04-23 Noah Friedman <friedman@gnu.org>
5177 * src/alloc.h: entered into RCS
5179 1993-04-20 David J. MacKenzie <djm@gnu.org>
5181 * src/version.c: *** empty log message ***
5183 * src/files.c, src/allocate.c:
5186 * src/reader.c: *** empty log message ***
5188 * src/lex.c: entered into RCS
5190 * src/conflicts.c: New file.
5192 * src/symtab.c: entered into RCS
5194 * src/alloc.h: New file.
5196 * src/LR0.c: entered into RCS
5198 1993-04-18 Noah Friedman <friedman@gnu.org>
5200 * src/reader.c: New file.
5202 * src/version.c: *** empty log message ***
5204 1993-04-18 Noah Friedman <friedman@gnu.org>
5206 * Makefile.in: *** empty log message ***
5208 1993-04-17 Noah Friedman <friedman@gnu.org>
5210 * Makefile.in: *** empty log message ***
5212 1993-04-15 Richard Stallman <rms@gnu.org>
5214 * src/main.c, src/files.c:
5217 1993-04-15 Noah Friedman <friedman@gnu.org>
5219 * configure.in: entered into RCS
5221 * configure.in: *** empty log message ***
5223 * configure.in: New file.
5225 1993-04-14 Richard Stallman <rms@gnu.org>
5227 * Makefile.in: New file.
5229 1993-04-13 Richard Stallman <rms@gnu.org>
5231 * src/version.c: New file.
5233 1993-03-25 Richard Stallman <rms@gnu.org>
5235 * src/output.c: entered into RCS
5237 1992-09-25 Richard Stallman <rms@gnu.org>
5239 * configure.bat: entered into RCS
5241 1992-06-22 Richard Stallman <rms@gnu.org>
5243 * src/vmsgetargs.c: entered into RCS
5245 1992-06-22 Richard Stallman <rms@gnu.org>
5247 * doc/bison.rnh: entered into RCS
5249 1992-04-20 David J. MacKenzie <djm@gnu.org>
5251 * README: entered into RCS
5253 1992-01-22 Richard Stallman <rms@gnu.org>
5255 * src/machine.h: entered into RCS
5257 1991-12-21 Richard Stallman <rms@gnu.org>
5259 * src/lalr.c, src/closure.c:
5262 1991-12-20 Richard Stallman <rms@gnu.org>
5264 * src/state.h: entered into RCS
5266 1991-12-18 Richard Stallman <rms@gnu.org>
5268 * src/print.c, src/nullable.c, src/derives.c:
5271 1991-11-03 David J. MacKenzie <djm@gnu.org>
5273 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5276 1988-09-09 Richard Stallman <rms@gnu.org>
5278 * src/bison.hairy: entered into RCS
5280 1987-12-16 Richard Stallman <rms@gnu.org>
5282 * REFERENCES: entered into RCS