1 2002-01-02 Akim Demaille <akim@epita.fr>
3 Equip the skeleton chain with location tracking, runtime trace,
4 pure parser and scanner.
6 * src/parse-skel.y: Request a pure parser, locations, and prefix
8 (%union): Having several members with the same type does not help
9 type mismatches, simplify.
10 (YYPRINT, yyprint): New.
11 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14 * src/scan-skel.l: Adjust to these changes.
15 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
16 (LOCATION_PRINT, skel_control_t): New.
18 2001-12-30 Akim Demaille <akim@epita.fr>
20 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21 replace `gb' with BLANKS.
22 * src/scan-skel.l: Adjust.
25 2001-12-30 Akim Demaille <akim@epita.fr>
27 * src/system.h: We don't need nor want bcopy.
28 Throw away MS-DOS crap: we don't need getpid.
29 * configure.in: We don't need strndup. It was even causing
30 problems: because Flex includes the headers *before* us,
31 _GNU_SOURCE is not defined by config.h, and therefore strndup was
33 * lib/xstrndup.c: New.
34 * src/scan-skel.l: Use it.
35 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
36 * src/parse-skel.y: Use %directives instead of #defines.
39 2001-12-30 Akim Demaille <akim@epita.fr>
41 * src/skeleton.h: New.
42 * src/output.c (output_parser, output_master_parser): Remove, dead
44 * src/output.h (get_lines_number, actions_output, guards_output)
45 (token_definitions_output): Prototype them.
46 * src/parse-skel.y: Add the license notice.
47 Include output.h and skeleton.h.
48 (process_skeleton): Returns void, and takes a single parameter.
49 * src/scan-skel.l: Add the license notice.
51 Don't use %option yylineno: it seems that then Flex imagines
52 REJECT has been used, and therefore it won't reallocate its
53 buffers (which makes no other sense to me than a bug). It results
54 in warnings for `unused: yy_flex_realloc'.
56 to guess if the generated parsers should have '.tab' in their
57 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
59 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
61 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
62 (MUSCLE_INSERT_PREFIX): ...to there.
63 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
64 (MUSCLE_INSERT_PREFIX): Move from here...
66 * src/bison.hairy: Add a section directive. Put braces around muscle
67 names. This parser skeleton is still broken, but Bison should not
68 choke on a bad muscle 'syntax'.
69 * src/bison.simple: Add a section directive. Put braces around muscle
72 * src/files.h (strsuffix, stringappend): Add declarations.
73 (tab_extension): Add declaration.
74 (short_base_name): Add declaration.
76 * src/files.c (strsuffix, stringappend): No longer static. These
77 functions are used in the skeleton parser.
79 (compute_base_names): Use the computations done in this function
80 to guess if the generated parsers should have '.tab' in their
82 (short_base_name): No longer static.
84 * src/output.c (output_skeleton): New.
85 (output): Disable call to output_master_parser, and give a try to
86 a new skeleton handling system.
87 (guards_output, actions_output): No longer static.
88 (token_definitions_output, get_lines_number): No longer static.
90 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
92 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
95 * src/parse-skel.y: New file.
96 * src/scan-skel.l: New file.
98 2001-12-29 Akim Demaille <akim@epita.fr>
100 %name-prefix is broken.
102 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
103 Adjust all dependencies.
104 * tests/headers.at (export YYLTYPE): Strengthen this test: use
107 Renaming yylval but not yylloc is not consistent. Now we do.
109 * src/bison.simple: Prefix yylloc if used.
110 * doc/bison.texinfo (Decl Summary): Document that.
112 2001-12-29 Akim Demaille <akim@epita.fr>
114 * doc/bison.texinfo: Promote `%long-directive' over
116 Remove all references to fixed-output-files, yacc is enough.
118 2001-12-29 Akim Demaille <akim@epita.fr>
120 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
121 user prologue. These are defaults.
122 * tests/actions.at (Mid-rule actions): Make sure the user can
123 define YYDEBUG and YYERROR_VERBOSE.
125 2001-12-29 Akim Demaille <akim@epita.fr>
127 * src/output.c (header_output): Don't forget to export YYLTYPE and
129 * tests/headers.at (export YYLTYPE): New, make sure it does.
130 * tests/regression.at (%union and --defines, Invalid CPP headers):
132 * tests/headers.at: here.
134 2001-12-29 Akim Demaille <akim@epita.fr>
136 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
138 2001-12-29 Akim Demaille <akim@epita.fr>
140 * tests/actions.at (Mid-rule actions): Output on a single line
143 2001-12-29 Akim Demaille <akim@epita.fr>
145 * doc/bison.texinfo: Formatting changes.
147 2001-12-29 Akim Demaille <akim@epita.fr>
149 Don't store the token defs in a muscle, just be ready to output it
150 on command. Now possible via `symbols'. Fixes a memory leak.
152 * src/output.c (token_definitions_output): New.
153 (output_parser, header_output): Use it.
154 * src/reader.c (symbols_save): Remove.
156 2001-12-29 Akim Demaille <akim@epita.fr>
158 * src/bison.simple: Do not provide a default for YYSTYPE and
159 YYLTYPE before the user's prologue. Otherwise it's hardly... a
162 2001-12-29 Akim Demaille <akim@epita.fr>
164 Mid-rule actions are simply... ignored!
166 * src/reader.c (readgram): Be sure to attach mid-rule actions to
167 the empty-rule associated to the dummy symbol, not to the host
169 * tests/actions.at (Mid-rule actions): New.
171 2001-12-29 Akim Demaille <akim@epita.fr>
175 * src/reader.c (reader): Free grammar.
177 2001-12-29 Akim Demaille <akim@epita.fr>
181 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
182 since it allocates it for each state, although only one is needed.
183 (allocate_storage): Do it here.
185 2001-12-29 Akim Demaille <akim@epita.fr>
187 * src/options.h, src/options.c (create_long_option_table): Rename
189 (long_option_table_new): this, with a clearer prototype.
190 (percent_table): Remove, unused,
191 * src/getargs.c (getargs): Adjust.
193 2001-12-29 Akim Demaille <akim@epita.fr>
195 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
196 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
199 2001-12-29 Akim Demaille <akim@epita.fr>
201 * src/lalr.c (build_relations): Rename `states' as `states1'.
202 Sorry, I don't understand exactly what it is, no better name...
204 2001-12-29 Akim Demaille <akim@epita.fr>
206 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
207 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
208 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
211 2001-12-29 Akim Demaille <akim@epita.fr>
213 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
216 2001-12-29 Akim Demaille <akim@epita.fr>
218 * src/reader.c, src/reader.h (user_toknums): Remove.
219 Adjust all users to use symbols[i]->user_token_number.
221 2001-12-29 Akim Demaille <akim@epita.fr>
223 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
224 Adjust all users to use symbols[i]->prec or ->assoc.
226 2001-12-29 Akim Demaille <akim@epita.fr>
228 * src/reader.c, src/reader.h (tags): Remove.
229 Adjust all users to use symbols[i]->tag.
231 2001-12-29 Akim Demaille <akim@epita.fr>
233 * src/gram.h, src/gram.c (symbols): New, similar to state_table
235 * src/reader.c (packsymbols): Fill this table.
237 * src/conflicts.c (resolve_sr_conflict): Adjust.
238 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
240 Use symbols[i]->tag instead of tags[i].
242 2001-12-29 Akim Demaille <akim@epita.fr>
244 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
245 In addition, put a comment in there, to replace...
246 * tests/regression.at (%union and C comments): Remove.
248 2001-12-29 Akim Demaille <akim@epita.fr>
250 * tests/regression.at (Web2c Actions): Blindly move the actual
251 output as expected output. The contents *seem* right to me, but I
252 can't pretend reading perfectly parser tables... Nonetheless, all
253 the other tests pass correctly, the table look OK, even though the
254 presence of `$axiom' is to be noted: AFAICS it is useless (but
257 2001-12-29 Akim Demaille <akim@epita.fr>
259 * src/reader.c (readgram): Don't add the rule 0 if there were no
260 rules read. In other words, add it _after_ having performed
261 grammar sanity checks.
262 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
264 2001-12-29 Akim Demaille <akim@epita.fr>
266 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
267 visible, and some states have now a different number.
269 2001-12-29 Akim Demaille <akim@epita.fr>
271 * src/reader.c (readgram): Bind the initial rule's lineno to that
273 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
274 (Solved SR Conflicts): Adjust rule 0's line number.
276 2001-12-29 Akim Demaille <akim@epita.fr>
278 Fix the `GAWK Grammar' failure.
280 * src/LR0.c (final_state): Initialize to -1 so that we do compute
281 the reductions of the first state which was mistakenly confused
282 with the final state because precisely final_state was initialized
284 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
285 now noticed by Bison.
286 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
287 have a reduction on $default.
289 2001-12-29 Akim Demaille <akim@epita.fr>
291 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
293 * src/closure.c (print_closure): Likewise.
294 * src/derives.c (print_derives): Likewise.
295 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
298 2001-12-29 Akim Demaille <akim@epita.fr>
300 * src/lalr.c (lookaheads_print): New.
301 (lalr): Call it when --trace-flag.
302 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
305 2001-12-29 Akim Demaille <akim@epita.fr>
307 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
308 when walking through ritem, even via rule->rhs.
309 * src/reduce.c (dump_grammar, useful_production, reduce_output)
310 (useful_production, useless_nonterminals): Likewise.
311 (reduce_grammar_tables): Likewise, plus update nritems.
312 * src/nullable.c (set_nullable): Likewise.
313 * src/lalr.c (build_relations): Likewise.
314 * tests/sets.at (Nullable): Adjust.
315 Fortunately, now, the $axiom is no longer nullable.
317 2001-12-29 Akim Demaille <akim@epita.fr>
319 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
321 * src/gram.c (ritem_longest_rhs): Likewise.
322 * src/reduce.c (nonterminals_reduce): Likewise.
323 * src/print_graph.c (print_graph): Likewise.
324 * src/output.c (output_rule_data): Likewise.
325 * src/nullable.c (set_nullable): Likewise.
327 2001-12-29 Akim Demaille <akim@epita.fr>
329 * src/output.c: Comment changes.
331 2001-12-27 Paul Eggert <eggert@twinsun.com>
333 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
334 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
335 Sparc, as they were causing more porting problems than the
336 (minor) performance improvement was worth.
338 Also, catch up with 1.31's YYSTD.
340 2001-12-27 Akim Demaille <akim@epita.fr>
342 * src/output.c (output_gram): Rely on nritems, not the
343 0-sentinel. See below.
344 Use -1 as separator, not 0.
345 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
346 Rely on -1 as separator in yyrhs, instead of 0.
347 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
348 twice `Now at end of input', therefore there are two lines less to
351 2001-12-27 Akim Demaille <akim@epita.fr>
353 * tests/regression.at (Unresolved SR Conflicts):
354 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
357 2001-12-27 Akim Demaille <akim@epita.fr>
359 * src/LR0.c (new_state): Recognize the final state by the fact it
360 is reached by eoftoken.
361 (insert_start_shifting_state, insert_eof_shifting_state)
362 (insert_accepting_state, augment_automaton): Remove, since now
363 these states are automatically computed from the initial state.
364 (generate_states): Adjust.
365 * src/print.c: When reporting a rule number to the user, substract
366 1, so that the axiom rule is rule 0, and the first user rule is 1.
367 * src/reduce.c: Likewise.
368 * src/print_graph.c (print_core): For the time being, just as for
369 the report, depend upon --trace-flags to dump the full set of
371 * src/reader.c (readgram): Once the grammar read, insert the rule
372 0: `$axiom: START-SYMBOL $'.
373 * tests/set.at: Adjust: rule 0 is now displayed, and since the
374 number of the states has changed (the final state is no longer
375 necessarily the last), catch up.
377 2001-12-27 Akim Demaille <akim@epita.fr>
379 Try to make the use of the eoftoken valid. Given that its value
380 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
381 is used instead of > 0 where appropriate, (ii), depend upon nritems
382 instead of the 0-sentinel.
384 * src/gram.h, src/gram.c (nritems): New.
385 Expected to be duplication of nitems, but for the time being...
386 * src/reader.c (packgram): Assert nritems and nitems are equal.
387 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
388 * src/closure.c (print_closure, print_fderives): Likewise.
389 * src/gram.c (ritem_print): Likewise.
390 * src/print.c (print_core, print_grammar): Likewise.
391 * src/print_graph.c: Likewise.
393 2001-12-27 Akim Demaille <akim@epita.fr>
395 * src/main.c (main): If there are complains after grammar
396 reductions, then output the report anyway if requested, then die.
397 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
398 * src/reader.c (eoftoken): New.
399 (parse_token_decl): If the token being defined has value `0', it
401 (packsymbols): No longer hack `tags' to insert `$' by hand.
402 Be sure to preserve the value of the eoftoken.
403 (reader): Make sure eoftoken is defined.
404 Initialize nsyms to 0: now eoftoken is created just like the others.
405 * src/print.c (print_grammar): Don't special case the eof token.
406 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
407 lie anyway, albeit pleasant.
408 * tests/calc.at: Exercise error messages with eoftoken.
409 Change the grammar so that empty input is invalid.
411 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
413 2001-12-27 Akim Demaille <akim@epita.fr>
415 * configure.in: Check the protos of strchr ans strspn.
416 Replace strchr if needed.
417 * src/system.h: Provide the protos of strchr, strspn and memchr if
420 * src/reader.c (symbols_save): Use strchr.
422 2001-12-27 Akim Demaille <akim@epita.fr>
424 * src/print.c, src/print_graph.c (escape): New.
425 Use it to quote the TAGS outputs.
426 * src/print_graph.c (print_state): Now errors are in red, and
428 Prefer high to wide: output the state number on a line of its own.
430 2001-12-27 Akim Demaille <akim@epita.fr>
432 * src/state.h, src/state.c (reductions_new): New.
433 * src/LR0.c (set_state_table): Let all the states have a
434 `reductions', even if reduced to 0.
435 (save_reductions): Adjust.
436 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
437 * src/print.c (print_reductions, print_actions): Adjust.
438 * src/output.c (action_row): Adjust.
440 2001-12-27 Akim Demaille <akim@epita.fr>
442 * src/state.h, src/state.c (errs_new, errs_dup): New.
443 * src/LR0.c (set_state_table): Let all the states have an errs,
444 even if reduced to 0.
445 * src/print.c (print_errs, print_reductions): Adjust.
446 * src/output.c (output_actions, action_row): Adjust.
447 * src/conflicts.c (resolve_sr_conflict): Adjust.
449 2001-12-27 Akim Demaille <akim@epita.fr>
451 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
453 2001-12-27 Akim Demaille <akim@epita.fr>
455 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
457 (lookaheadset, shiftset): New, used as additional storage by
459 (print_results): Adjust.
460 (print_shifts, print_gotos, print_errs): New, extracted from...
461 (print_actions): here.
462 * src/print_graph.c (print_actions): Remove dead code.
464 2001-12-27 Akim Demaille <akim@epita.fr>
466 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
469 2001-12-27 Akim Demaille <akim@epita.fr>
471 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
472 (build_relations): Adjust.
474 2001-12-27 Akim Demaille <akim@epita.fr>
476 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
479 2001-12-27 Akim Demaille <akim@epita.fr>
481 * src/reader.c (packgram): Catch nitems overflows.
483 2001-12-27 Akim Demaille <akim@epita.fr>
485 * src/files.c, src/files.h (guard_obstack): Remove.
486 * src/output.c (output): Adjust.
487 * src/reader.c (parse_braces): New, factoring...
488 (copy_action, copy_guard): these two which are renamed as...
489 (parse_action, parse_guard): these.
490 As a voluntary consequence, using braces around guards is now
493 2001-12-27 Akim Demaille <akim@epita.fr>
495 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
496 * src/reader.c (symbol_list): `guard' and `guard_line' are new
498 (symbol_list_new): Adjust.
499 (copy_action): action_line is the first line, not the last.
500 (copy_guard): Just as for actions, store the `action' only, not
501 the switch/case/break flesh.
502 Don't parse the user action that might follow the guard, let...
503 (readgram): do it, i.e., now, there can be an action after a
505 In other words the guard is just explicitly optional.
507 * src/output.c (guards_output): New.
508 (output_parser): Call it when needed.
509 (output): Also free the guard and attrs obstacks.
510 * src/files.c, src/files.h (obstack_save): Remove.
511 (output_files): Remove.
512 As a result, if one needs the former `.act' file, using an
513 appropriate skeleton which requires actions and guards is now
515 * src/main.c (main): Adjust.
516 * tests/semantic.at: New.
517 * tests/regression.at: Use `input.y' as input file name.
518 Avoid 8+3 problems by requiring input.c when the test needs the
521 2001-12-27 Akim Demaille <akim@epita.fr>
523 * src/reader.c (symbol_list_new): Be sure to initialize all the
526 2001-12-27 Akim Demaille <akim@epita.fr>
528 All the hacks using a final pseudo state are now useless.
530 * src/LR0.c (set_state_table): state_table holds exactly nstates.
531 * src/lalr.c (nLA): New.
532 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
533 instead of lookaheadsp from the pseudo state (nstate + 1).
535 2001-12-27 Akim Demaille <akim@epita.fr>
537 * src/output.c (action_row, token_actions): Use a state_t instead
538 of a integer, and nlookaheads instead of the following state's
541 2001-12-27 Akim Demaille <akim@epita.fr>
543 * src/conflicts.c (log_resolution, flush_shift)
544 (resolve_sr_conflict, set_conflicts, solve_conflicts)
545 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
546 (conflicts_print, print_reductions): Use a state_t instead of an
547 integer when referring to a state.
548 As much as possible, depend upon nlookaheads, instead of the
549 `lookaheadsp' member of the following state (since lookaheads of
550 successive states are successive, the difference between state n + 1
551 and n served as the number of lookaheads for state n).
552 * src/lalr.c (add_lookback_edge): Likewise.
553 * src/print.c (print_core, print_actions, print_state)
554 (print_results): Likewise.
555 * src/print_graph.c (print_core, print_actions, print_state)
556 (print_graph): Likewise.
557 * src/conflicts.h: Adjust.
559 2001-12-27 Akim Demaille <akim@epita.fr>
561 * src/bison.hairy: Formatting/comment changes.
563 Remove `register' indications.
564 Add plenty of `static'.
566 2001-12-27 Akim Demaille <akim@epita.fr>
568 * src/output.c (prepare): Drop the muscle `ntbase' which
570 * src/bison.simple: Formatting/comment changes.
571 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
572 is an undocumented synonym.
574 2001-12-22 Akim Demaille <akim@epita.fr>
576 * src/output.c (output_table_data): Change the prototype to use
577 `int' for array ranges: some invocations do pass an int, not a
579 Reported by Wayne Green.
581 2001-12-22 Akim Demaille <akim@epita.fr>
583 Some actions of web2c.y are improperly triggered.
584 Reported by Mike Castle.
586 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
587 * tests/regression.at (Web2c): Rename as...
588 (Web2c Report): this.
589 (Web2c Actions): New.
591 2001-12-22 Akim Demaille <akim@epita.fr>
593 Reductions in web2c.y are improperly reported.
594 Reported by Mike Castle.
596 * src/conflicts.c (print_reductions): Fix.
597 * tests/regression.at (Web2c): New.
599 2001-12-18 Akim Demaille <akim@epita.fr>
601 Some host fail on `assert (!"foo")', which expands to
602 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
603 Reported by Nelson Beebee.
605 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
606 `#define it_succeeded 0' and `assert (it_succeeded)'.
608 2001-12-17 Marc Autret <autret_m@epita.fr>
610 * src/bison.simple: Don't hard code the skeleton line and filename.
611 * src/output.c (output_parser): Rename 'line' as 'output_line'.
612 New line counter 'skeleton_line' (skeleton-line muscle).
614 2001-12-17 Paul Eggert <eggert@twinsun.com>
616 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
617 YYDEBUG must be defined to a nonzero value.
619 * src/bison.simple (yytname): Do not assume that the user defines
620 YYDEBUG to a properly parenthesized expression.
622 2001-12-17 Akim Demaille <akim@epita.fr>
624 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
625 nlookaheads is a new member.
627 * src/lalr.h (nlookaheads): Remove this orphan declaration.
628 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
631 2001-12-17 Akim Demaille <akim@epita.fr>
633 * src/files.h, src/files.c (open_files, close_files): Remove.
634 * src/main.c (main): Don't open/close files, nor invoke lex_free,
636 * src/reader.c (reader): Do it.
638 2001-12-17 Akim Demaille <akim@epita.fr>
640 * src/conflicts.c (print_reductions): Formatting changes.
642 2001-12-17 Akim Demaille <akim@epita.fr>
644 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
646 (resolve_sr_conflict): Adjust.
648 2001-12-17 Akim Demaille <akim@epita.fr>
650 * src/output.c (output_obstack): Be static and rename as...
651 (format_obstack): this, to avoid any confusion with files.c's
653 * src/reader.h (muscle_obstack): Move to...
654 * src/output.h: here, since it's defined in output.c.
656 2001-12-17 Akim Demaille <akim@epita.fr>
658 * src/output.c (action_row, save_column, default_goto)
659 (sort_actions, matching_state, pack_vector): Better variable
662 2001-12-17 Akim Demaille <akim@epita.fr>
664 * src/output.c: Various formatting changes.
666 2001-12-17 Akim Demaille <akim@epita.fr>
668 * src/files.c (output_files): Free the output_obstack.
669 * src/main.c (main): Call print and print_graph conditionally.
670 * src/print.c (print): Work unconditionally.
671 * src/print_graph.c (print_graph): Work unconditionally.
672 * src/conflicts.c (log_resolution): Output only if verbose_flag.
674 2001-12-16 Marc Autret <autret_m@epita.fr>
676 * src/output.c (actions_output): Fix. When we use %no-lines,
677 there is one less line per action.
679 2001-12-16 Marc Autret <autret_m@epita.fr>
681 * src/bison.simple: Remove a useless #line directive.
682 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
683 * src/output.c (get_lines_number): New.
684 (output_parser): Adjust, now takes care about the lines of a
687 (actions_output): Computes the number of lines taken by actions.
688 (output_master_parser): Insert new skeleton which is the name of
689 the output parser file name.
691 2001-12-15 Marc Autret <autret_m@epita.fr>
693 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
695 2001-12-15 Marc Autret <autret_m@epita.fr>
697 * src/output.c (output_gram): Keep track of the hairy one.
699 2001-12-15 Akim Demaille <akim@epita.fr>
701 Make `make distcheck' work.
703 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
704 system.h which uses libgettext.h.
706 2001-12-15 Akim Demaille <akim@epita.fr>
708 * src/nullable.c (set_nullable): Useless rules must be skipped,
709 otherwise, since we range over their symbols, we might look at a
710 nonterminal which no longer ``exists'', i.e., it is not counted in
711 `nvars', hence we overflow our arrays.
713 2001-12-15 Akim Demaille <akim@epita.fr>
715 The header can also be produced directly, without any obstack!
718 * src/files.c, src/files.h (defines_obstack): Remove.
719 (compute_header_macro): Global.
720 (defines_obstack_save): Remove.
721 * src/reader.c (parse_union_decl): No longer output to
722 defines_obstack: its content can be found in the `stype' muscle
724 (output_token_translations): Merge into...
725 (symbols_output): this.
727 (symbols_save): this.
729 * src/output.c (header_output): New.
732 2001-12-15 Akim Demaille <akim@epita.fr>
734 * src/reader.c (parse_union_decl): Instead of handling two obstack
735 simultaneously, use one to define the `stype' muscle, and use the
736 value of the latter to fill defines_obstack.
737 (copy_comment): Remove.
738 (copy_comment2): Work for a single obstack.
740 (copy_comment): this.
742 2001-12-15 Akim Demaille <akim@epita.fr>
744 * src/lex.c, src/lex.h (xgetc): No longer static.
745 * src/reader.c (parse_union_decl): Revamp.
747 2001-12-15 Akim Demaille <akim@epita.fr>
749 Still making progress in separating Bison into (i) input, (ii)
750 process, (iii) output: now we can directly output the parser file
751 without using table_obstack at all.
753 * src/files.c, src/files.h (table_obstack): Bye bye.
754 (parser_file_name): New.
755 * src/files.c (compute_output_file_names): Compute it.
756 * src/output.c (actions_output, output_parser)
757 (output_master_parser): To a file instead of an obstack.
759 2001-12-15 Akim Demaille <akim@epita.fr>
761 Attach actions to rules, instead of pre-outputting them to
764 * src/gram.h (rule_t): action and action_line are new members.
765 * src/reader.c (symbol_list): Likewise.
766 (copy_action): Save the actions within the rule.
767 (packgram): Save them in rule_table.
768 * src/output.c (actions_output): New.
769 (output_parser): Use it on `%%actions'.
770 (output_rule_data): Don't free rule_table.
772 (prepare): Don't save the `action' muscle.
773 * src/bison.simple: s/%%action/%%actions/.
775 2001-12-15 Akim Demaille <akim@epita.fr>
777 * src/reader.c (copy_action): When --yacc, don't append a `;'
778 to the user action: let it fail if lacking.
779 Suggested by Arnold Robbins and Tom Tromey.
781 2001-12-14 Akim Demaille <akim@epita.fr>
783 * src/lex.c (literalchar): Simply return the char you decoded, non
784 longer mess around with obstacks and int pointers.
787 2001-12-14 Akim Demaille <akim@epita.fr>
789 * src/lex.c (literalchar): Don't escape the special characters,
790 just decode them, and keep them as char (before, eol was output as
791 the 2 char string `\n' etc.).
792 * src/output.c (output_rule_data): Use quotearg to output the
795 2001-12-13 Paul Eggert <eggert@twinsun.com>
797 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
798 Do not infringe on the global user namespace when using C++.
799 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
800 All uses of `fprintf' and `stderr' changed.
802 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
804 2001-12-13 Akim Demaille <akim@epita.fr>
806 The computation of nullable is broken: it doesn't handle empty
809 * tests/torture.at (GNU AWK Grammar): New.
810 * tests/sets.at (Nullable): New.
811 * src/nullable.c (set_nullable): Instead of blindly looping over
812 `ritems', loop over the rules, and then over their rhs's.
814 Work around Autotest bugs.
816 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
817 frame, because Autotest understand lines starting with a `+' as
818 traces from the shell. Then, they are not processed properly.
819 Admittedly an Autotest bug, but we don't have time to wait for
820 Autotest to catch up.
821 * tests/regression.at (Broken Closure): Adjust to the new table
824 * tests/sets.at: here.
826 2001-12-13 Akim Demaille <akim@epita.fr>
828 * src/closure.c (closure): Use nrules instead of playing tricks
831 2001-12-13 Akim Demaille <akim@epita.fr>
833 * src/print.c (print_actions): Output the handling of `$' as the
834 traces do: shifting the token EOF. Before EOF was treated as a
836 * tests/regression.at: Adjust some tests.
837 * src/print_graph.c (print_core): Complete the set of items via
838 closure. The next-to-final and final states are still unsatisfying,
839 but that's to be addressed elsewhere.
840 No longer output the rule numbers, but do output the state number.
841 A single loop for the shifts + gotos is enough, but picked a
842 distinct color for each.
843 (print_graph): Initialize and finalize closure.
845 2001-12-13 Akim Demaille <akim@epita.fr>
847 * src/reader.c (readgram): Remove dead code, an strip useless
849 (get_type): Remove, unused.
851 2001-12-12 Akim Demaille <akim@epita.fr>
853 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
854 on that of lib/error.c.
856 2001-12-12 Akim Demaille <akim@epita.fr>
858 Some hosts don't like `/' in includes.
860 * src/system.h: Include libgettext.h without qualifying the path.
861 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
864 2001-12-11 Marc Autret <autret_m@epita.fr>
866 * src/output.c (output_parser): Remove useless muscle.
868 2001-12-11 Marc Autret <autret_m@epita.fr>
870 * src/bison.simple: Remove #line just before %%epilogue. It
871 is now handled in ...
872 * src/reader.c (read_additionnal_code): Add the output of a
873 #line for the epilogue.
875 2001-12-10 Marc Autret <autret_m@epita.fr>
877 * src/reader.c (copy_definition): Re-use CPP-outed code which
878 replace precedent remove.
879 * src/bison.simple: Remove #line before %%prologue because
880 %%input-line is wrong at this time.
882 2001-12-10 Marc Autret <autret_m@epita.fr>
884 * src/reader.c (symbols_output): Clean up.
885 * src/output.c (output_gram, output): Clean up.
887 2001-12-10 Akim Demaille <akim@epita.fr>
889 * src/lalr.c (initialize_lookaheads): New. Extracted from...
890 * src/LR0.c (set_state_table): here.
891 * src/lalr.c (lalr): Call it.
893 2001-12-10 Akim Demaille <akim@epita.fr>
895 * src/state.h (shifts): Remove the `number' member: shifts are
896 attached to state, hence no longer need to be labelled with a
899 2001-12-10 Akim Demaille <akim@epita.fr>
901 Now that states have a complete set of members, the linked list of
902 shifts is useless: just fill directly the state's shifts member.
904 * src/state.h (shifts): Remove the `next' member.
905 * src/LR0.c (first_state, last_state): Remove.
907 (augment_automaton): Don't look for the shifts that must be added
908 a shift on EOF: it is those of the state we looked for! But now,
909 since shifts are attached, it is no longer needed to looking
910 merely by its id: its number.
912 2001-12-10 Akim Demaille <akim@epita.fr>
914 * src/LR0.c (augment_automaton): Better variable locality.
915 Remove an impossible branch: if there is a state corresponding to
916 the start symbol being shifted, then there is shift for the start
917 symbol from the initial state.
919 2001-12-10 Akim Demaille <akim@epita.fr>
921 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
922 only when appropriate: when insert_start_shifting_state' is not
924 * tests/regression.at (Rule Line Numbers): Adjust.
926 2001-12-10 Akim Demaille <akim@epita.fr>
928 * src/LR0.c (augment_automaton): Now that all states have shifts,
929 merge the two cases addition shifts to the initial state.
931 2001-12-10 Akim Demaille <akim@epita.fr>
933 * src/lalr.c (set_state_table): Move to...
935 * src/lalr.c (lalr): Don't call it...
936 * src/LR0.c (generate_states): do it.
937 * src/LR0.h (first_state): Remove, only the table is used.
939 2001-12-10 Akim Demaille <akim@epita.fr>
941 * src/LR0.h (first_shift, first_reduction): Remove.
942 * src/lalr.c: Don't use first_shift: find shifts through the
945 2001-12-10 Akim Demaille <akim@epita.fr>
947 * src/LR0.c: Attach shifts to states as soon as they are
949 * src/lalr.c (set_state_table): Instead of assigning shifts to
950 state, just assert that the mapping was properly done.
952 2001-12-10 Akim Demaille <akim@epita.fr>
954 * src/LR0.c (insert_start_shift): Rename as...
955 (insert_start_shifting_state): this.
956 (insert_eof_shifting_state, insert_accepting_state): New.
957 (augment_automaton): Adjust.
958 Better locality of the variables.
959 When looking if the start_symbol is shifted from the initial
960 state, using `while (... symbol != start_symbol ...)' sounds
961 better than `while (... symbol < start_symbol ...)': If fail
962 to see how the order between symbols could be relevant!
964 2001-12-10 Akim Demaille <akim@epita.fr>
966 * src/getargs.h: Don't declare `spec_name_prefix' and
967 `spec_file_prefix', declared by src/files.h.
968 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
969 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
970 * src/output.c (prepare): Adjust.
971 * src/reader.c (symbols_output): Likewise.
972 * src/vmsgetargs.c: Vaguely adjust, but who cares?
974 2001-12-10 Akim Demaille <akim@epita.fr>
976 * src/muscle_tab.c (muscle_init): NULL is a better default than
979 2001-12-10 Akim Demaille <akim@epita.fr>
981 * src/reader.c (reader): Calling symbols_output once is enough.
983 2001-12-10 Akim Demaille <akim@epita.fr>
985 Now that states have a complete set of members, the linked list of
986 reductions is useless: just fill directly the state's reductions
989 * src/state.h (struct reductions): Remove member `number' and
991 * src/LR0.c (first_reduction, last_reduction): Remove.
992 (save_reductions): Don't link the new reductions, store them in
994 * src/lalr.c (set_state_table): No need to attach reductions to
995 states, it's already done.
996 * src/output.c (output_actions): No longer free the shifts, then
997 the reductions, then the states: free all the states and their
1000 2001-12-10 Akim Demaille <akim@epita.fr>
1002 * src/options.c (OPTN, DRTV, BOTH): New.
1003 (option_table): Use them.
1005 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1006 the job of system.h.
1007 * src/options.c: Don't include stdio.h and xalloc.h for the same
1010 2001-12-10 Akim Demaille <akim@epita.fr>
1012 * src/output.c (output, prepare): Make sure the values of the
1013 muscles `action' and `prologue' are 0-terminated.
1015 2001-12-10 Akim Demaille <akim@epita.fr>
1017 Clean up GCC warnings.
1019 * src/reader.c (copy_action): `buf' is not used.
1020 (parse_skel_decl): Be static.
1021 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1022 * src/options.h (create_long_option_table): Have a real prototype.
1023 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1024 (hash_delete_at): Return const void *.
1025 Adjust casts to preserve the const.
1027 2001-12-10 Akim Demaille <akim@epita.fr>
1029 * configure.in: Require 2.52g.
1030 M4 is not needed, but AUTOM4TE is.
1032 * tests/Makefile.am: Adjust.
1034 2001-12-10 Akim Demaille <akim@epita.fr>
1036 One structure for states is enough, even though theoretically
1037 there are LR(0) states and LALR(1) states.
1039 * src/lalr.h (state_t): Remove.
1040 (state_table): Be state_t **, not state_t *.
1041 * src/state.h (core, CORE_ALLOC): Rename as...
1042 (state_t, STATE_ALLOC): this.
1043 Add the LALR(1) members: shifts, reductions, errs.
1044 * src/LR0.c (state_table): Rename as...
1045 (state_hash): this, to avoid name clashes with the global
1047 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1048 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1050 2001-12-10 Akim Demaille <akim@epita.fr>
1052 Bison dumps core on bash.y.
1053 Reported by Pascal Bart.
1055 * src/warshall.c (bitmatrix_print): New.
1057 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1058 j must be the outer loop.
1059 * tests/regression.at (Broken Closure): New.
1061 2001-12-05 Akim Demaille <akim@epita.fr>
1063 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1065 Reported by Peter Hámorský.
1067 2001-12-05 Akim Demaille <akim@epita.fr>
1069 * src/conflicts.c (err_table): Remove.
1070 (resolve_sr_conflict): Adjust.
1071 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1073 (state_t.reductions, state_t.shifts): this.
1075 2001-12-05 Akim Demaille <akim@epita.fr>
1077 * src/reduce.c (reduce_grammar_tables): No longer disable the
1078 removal of useless rules via CPP but via `if (0)', so that the
1079 compiler still check the code is valid.
1080 For instance, it should have noticed `rline' no longer exists: use
1081 the `line' member of rule_t.
1082 * src/gram.c (dummy, rline): Remove, unused.
1084 2001-12-05 Akim Demaille <akim@epita.fr>
1086 * src/output.c (pack_vector): Use assert, not berror.
1087 * src/main.c (berror): Remove, unused.
1089 2001-12-05 Akim Demaille <akim@epita.fr>
1091 New experimental feature: if --verbose --trace output all the
1092 items of a state, not only its kernel.
1094 * src/print.c (print_core): If `trace_flag', then invoke closure
1095 before outputting the items of the state (print_core is no longer
1096 a correct name them).
1097 (print_results): Invoke new_closure/free_closure if needed.
1099 2001-12-05 Akim Demaille <akim@epita.fr>
1101 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1102 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1103 (nitemset): for consistency with the rest of the project.
1105 2001-12-05 Akim Demaille <akim@epita.fr>
1107 * src/closure.c (print_closure): Improve.
1108 (closure): Use it for printing input and output.
1110 2001-12-05 Akim Demaille <akim@epita.fr>
1112 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1113 indexed by nonterminals.
1115 2001-12-05 Akim Demaille <akim@epita.fr>
1117 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1119 * src/warshall.h: Remove accidental duplication of the content.
1121 2001-12-05 Akim Demaille <akim@epita.fr>
1123 * src/closure.c (set_fderives): De-obfuscate.
1125 2001-12-05 Akim Demaille <akim@epita.fr>
1127 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1129 2001-12-05 Akim Demaille <akim@epita.fr>
1131 * src/closure.c (set_firsts): De-obfuscate.
1133 2001-12-05 Akim Demaille <akim@epita.fr>
1135 * src/output.c (action_row): De-obfuscate
1136 using the good o' techniques: arrays not pointers, variable
1137 locality, BITISSET, RESETBIT etc.
1139 2001-12-05 Akim Demaille <akim@epita.fr>
1141 Pessimize the code to simplify it: from now on, all the states
1142 have a valid SHIFTS, which NSHIFTS is possibly 0.
1144 * src/LR0.c (shifts_new): Be global and move to..
1145 * src/state.c, src/state.h: here.
1146 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1147 * src/print_graph: Adjust.
1149 2001-12-05 Akim Demaille <akim@epita.fr>
1151 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1152 * src/conflicts.c: Use it.
1153 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1154 incorrectly ``simplified''.
1156 2001-12-05 Akim Demaille <akim@epita.fr>
1158 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1159 using the good o' techniques: arrays not pointers, variable
1160 locality, BITISSET, RESETBIT etc.
1162 2001-12-05 Akim Demaille <akim@epita.fr>
1164 * src/state.h (SHIFT_SYMBOL): New.
1165 * src/conflicts.c: Use it to deobfuscate.
1167 2001-12-05 Akim Demaille <akim@epita.fr>
1169 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1170 (print_reductions): De-obfuscate using the good o' techniques:
1171 arrays not pointers, variable locality, BITISSET.
1173 2001-12-05 Akim Demaille <akim@epita.fr>
1175 * src/conflicts.c (print_reductions): Arrays, not pointers.
1178 2001-12-05 Akim Demaille <akim@epita.fr>
1180 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1182 2001-12-05 Akim Demaille <akim@epita.fr>
1184 * src/conflicts.c (print_reductions): Improve variable locality.
1186 2001-12-05 Akim Demaille <akim@epita.fr>
1188 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1190 2001-12-05 Akim Demaille <akim@epita.fr>
1192 * src/conflicts.c (print_reductions): Improve variable locality.
1194 2001-12-05 Akim Demaille <akim@epita.fr>
1196 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1197 * src/lalr.c: Use them.
1199 2001-12-05 Akim Demaille <akim@epita.fr>
1201 * src/LR0.c (augment_automaton): Formatting changes.
1202 Better variable locality.
1204 2001-12-05 Akim Demaille <akim@epita.fr>
1206 * src/lalr.c (matrix_print): New.
1207 (transpose): Use it.
1208 Use arrays instead of pointers.
1210 2001-12-05 Akim Demaille <akim@epita.fr>
1212 * src/lalr.c (maxrhs): Move to...
1213 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1214 * src/lalr.c (build_relations): Adjust.
1216 2001-12-05 Akim Demaille <akim@epita.fr>
1218 * src/lalr.c (transpose): Free the memory allocated to the
1219 argument, as it is replaced by the results by the unique caller.
1220 (build_relations): Merely invoke transpose: it handles the memory
1222 Improve variable locality.
1223 Avoid variables used as mere abbreviations.
1224 (compute_lookaheads): Use arrays instead of pointers.
1226 2001-12-05 Akim Demaille <akim@epita.fr>
1228 * src/lalr.c (initialize_F): Improve variable locality.
1229 Avoid variables used as mere abbreviations.
1231 2001-12-05 Akim Demaille <akim@epita.fr>
1233 * src/derives.c (print_derives): Display the ruleno.
1234 * src/lalr.c (initialize_F, transpose): Better variable locality
1235 to improve readability.
1236 Avoid variables used as mere abbreviations.
1238 2001-12-05 Akim Demaille <akim@epita.fr>
1240 * src/lalr.c (traverse): Use arrays instead of pointers.
1242 2001-12-05 Akim Demaille <akim@epita.fr>
1244 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1245 the handling of squeue.
1246 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1248 2001-12-05 Akim Demaille <akim@epita.fr>
1250 Because useless nonterminals are now kept alive (instead of being
1251 `destroyed'), we now sometimes examine them, and store information
1252 related to them. Hence we need to know their number, and adjust
1255 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1257 * src/LR0.c (allocate_itemsets): The memory allocated to
1258 `symbol_count' was used for two different purpose: once to count
1259 the number of occurrences of each symbol, and later reassigned to
1260 `shift_symbol', containing the symbol that can be shifted from a
1262 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1264 (new_itemsets): Allocate `shift_symbol' here.
1265 (allocate_itemsets): symbol_count includes useless nonterminals.
1267 (free_storage): Use `free', not `XFREE', for pointers that cannot
1270 2001-12-05 Akim Demaille <akim@epita.fr>
1272 * src/nullable.c (set_nullable): Deobfuscate the handling of
1274 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1276 2001-12-05 Akim Demaille <akim@epita.fr>
1278 * src/gram.c, src/gram.h (ritem_print): New.
1279 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1280 (This useless function was defined only to work around VMS linkers
1281 that can't handle compilation units with variables only).
1282 * src/reduce.c (dump_grammar): Use it to trace the construction of
1285 2001-12-04 Paul Eggert <eggert@twinsun.com>
1287 * src/bison.simple (union yyalloc): Change member names
1288 to be the same as the stack names.
1289 (yyparse): yyptr is now union yyalloc *, not char *.
1290 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1291 and may generate better code on some machines.
1292 (yystpcpy): Use prototype if __STDC__ is defined, not just
1293 if __cplusplus is defined.
1295 2001-11-30 Akim Demaille <akim@epita.fr>
1297 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1298 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1299 Gettext doesn't compile cleanly, and dies with -Werror.
1300 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1301 Include WARNING_CFLAGS here.
1302 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1303 before being defined.
1305 2001-11-27 Paul Eggert <eggert@twinsun.com>
1307 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1308 First arg is int, not unsigned.
1309 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1310 (SIZE_MAX, UINT_MAX): New macros.
1311 (quotearg_n_options): Abort if N is negative.
1312 Avoid overflow check on hosts where size_t is 64 bits and int
1313 is 32 bits, as overflow is impossible there.
1314 Fix off-by-one typo that caused unnecessary reallocation.
1316 2001-11-29 Paul Eggert <eggert@twinsun.com>
1318 Name space cleanup in generated parser.
1320 * doc/bison.texinfo (Bison Parser): Discuss system headers
1321 and their effect on the user name space.
1324 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1325 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1326 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1328 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1329 on user names when possible.
1331 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1332 Simplify test for whather <alloca.h> exists.
1334 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1336 (<stdio.h>): Include if YYDEBUG.
1338 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1339 ! defined (yyoverflow) && ! defined (yymemcpy).
1341 (yymemcpy, yyparse): Rename local variables as needed so that
1342 they all begin with 'yy'.
1344 (yystrlen, yystpcpy): New functions.
1346 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1349 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1350 instead of relying on string.h functions. Use YYSTACK_ALLOC
1351 and YYSTACK_FREE instead of malloc and free.
1353 2001-11-30 Akim Demaille <akim@epita.fr>
1355 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1356 before their first uses.
1357 (YYBISON, YYPURE): Move to the top of the output.
1359 2001-11-30 Akim Demaille <akim@epita.fr>
1361 * tests/reduce.at (Useless Nonterminals): Fix.
1363 2001-11-30 Akim Demaille <akim@epita.fr>
1365 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1366 if body instead of `;' to pacify GCC's warnings.
1368 2001-11-30 Akim Demaille <akim@epita.fr>
1370 Instead of mapping the LHS of unused rules to -1, keep the LHS
1371 valid, but flag the rules as invalid.
1373 * src/gram.h (rule_t): `useful' is a new member.
1374 * src/print.c (print_grammar): Adjust.
1375 * src/derives.c (set_derives): Likewise.
1376 * src/reader.c (packgram, reduce_output): Likewise.
1377 * src/reduce.c (reduce_grammar_tables): Likewise.
1378 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1380 2001-11-30 Akim Demaille <akim@epita.fr>
1382 * src/reduce.c (reduce_output): Formatting changes.
1383 * src/print.c (print_results, print_grammar): Likewise.
1384 * tests/regression.at (Rule Line Numbers)
1385 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1387 2001-11-30 Akim Demaille <akim@epita.fr>
1389 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1390 useless nonterminals, move them at the end of the symbol arrays.
1391 (reduce_output): Adjust.
1392 * tests/reduce.at (Useless Nonterminals): Adjust.
1394 2001-11-30 Akim Demaille <akim@epita.fr>
1396 * src/reduce.c: Various comment/formatting changes.
1397 (nonterminals_reduce): New, extracted from...
1398 (reduce_grammar_tables): here.
1399 (reduce_grammar): Call nonterminals_reduce.
1401 2001-11-29 Paul Eggert <eggert@twinsun.com>
1403 * src/bison.simple (YYSTACK_REALLOC): Remove.
1404 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
1405 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
1407 (union yyalloc): New type.
1408 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
1409 an arbitrary restriction on hosts where size_t is wider than int.
1411 (yyparse): Don't dump core if alloca or malloc fails; instead, report
1412 a parser stack overflow. Allocate just one block of memory for all
1413 three stacks, instead of allocating three blocks; this typically is
1414 faster and reduces fragmentation.
1416 Do not limit the number of items in the stack to a value that fits
1417 in 'int', as this is an arbitrary limit on hosts with 64-bit
1418 size_t and 32-bit int.
1420 2001-11-29 Marc Autret <autret_m@epita.fr>
1422 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
1423 of defining YYERROR_VERBOSE.
1424 [AT_DATA]: $4 is now out of C declarations in the prologue.
1426 2001-11-28 Marc Autret <autret_m@epita.fr>
1428 * src/reader.c (parse_dquoted_param): New.
1429 (parse_skel_decl): Use it.
1430 * src/lex.h: Add its prototype.
1431 * src/lex.c (literalchar): Become not static.
1433 2001-11-28 Marc Autret <autret_m@epita.fr>
1435 * src/output.h: And put its extern declaration here.
1436 * src/output.c (error_verbose): Define here.
1437 (prepare): Echo name modification.
1438 * src/getargs.h: Clean its extern declaration.
1439 * src/getargs.c (error_verbose_flag): Remove.
1440 (getargs): Remove case 'e'.
1441 * src/options.c (option_table): 'error-verbose' is now seen as simple
1445 * src/reader.c (read_declarations): Remove case tok_include.
1446 (parse_include_decl): Remove.
1447 * src/lex.h (token_t): Remove tok_include.
1448 * src/options.c (option_table): 'include' is now a simple command line
1451 2001-11-28 Marc Autret <autret_m@epita.fr>
1453 * src/bison.simple: Adjust muscle names.
1454 * src/muscle_tab.c (muscle_init): Also rename the muscles.
1455 * src/output.c (prepare): s/_/-/ for the muscles names.
1456 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
1458 2001-11-28 Marc Autret <autret_m@epita.fr>
1460 * src/bison.simple: Fix debug.
1461 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
1463 2001-11-28 Akim Demaille <akim@epita.fr>
1465 * src/LR0.c (shifts_new): New.
1466 (save_shifts, insert_start_shift, augment_automaton): Use it.
1468 2001-11-28 Akim Demaille <akim@epita.fr>
1470 * src/closure.c (closure): `b' and `ruleno' denote the same value:
1473 2001-11-28 Akim Demaille <akim@epita.fr>
1475 * src/closure.c (closure): Instead of looping over word in array
1476 then bits in words, loop over bits in array.
1478 2001-11-28 Akim Demaille <akim@epita.fr>
1480 * src/closure.c (closure): No longer optimize the special case
1481 where all the bits of `ruleset[r]' are set to 0, to make the code
1484 2001-11-28 Akim Demaille <akim@epita.fr>
1486 * src/closure.c (closure): `r' and `c' are new variables, used to
1487 de-obfuscate accesses to RULESET and CORE.
1489 2001-11-28 Akim Demaille <akim@epita.fr>
1491 * src/reduce.c (reduce_print): Use ngettext.
1492 (dump_grammar): Improve the trace accuracy.
1494 2001-11-28 Akim Demaille <akim@epita.fr>
1496 * src/reduce.c (dump_grammar): Don't translate trace messages.
1498 2001-11-28 Akim Demaille <akim@epita.fr>
1500 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
1501 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
1502 as all tags are free'ed afterwards.
1505 2001-11-27 Paul Eggert <eggert@twinsun.com>
1507 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
1508 use alloca when we didn't want to, and vice versa.
1510 2001-11-27 Marc Autret <autret_m@epita.fr>
1512 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
1514 * src/output.c (prepare): Remove its update.
1516 2001-11-27 Marc Autret <autret_m@epita.fr>
1518 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
1521 2001-11-27 Marc Autret <autret_m@epita.fr>
1523 * src/bison.simple: Remove YYERROR_VERBOSE using.
1524 Use %%error_verbose.
1525 (yyparse): Likewise.
1526 * src/output.c (prepare): Give its final value.
1527 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
1528 * src/getargs.h: Add its extern declaration.
1529 * src/getargs.c (error_verbose_flag): New int.
1530 (getargs): Update to catch new case.
1531 * src/options.c (option_table): 'error-verbose' is a new option.
1532 (shortopts): Update.
1534 2001-11-27 Akim Demaille <akim@epita.fr>
1536 * src/system.h: Use intl/libgettext.h.
1537 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
1539 2001-11-27 Akim Demaille <akim@epita.fr>
1541 * tests/torture.at (Exploding the Stack Size with Malloc):
1542 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
1544 2001-11-27 Akim Demaille <akim@epita.fr>
1546 * src/files.c: Include error.h.
1547 Reported by Hans Aberg.
1549 2001-11-26 Marc Autret <autret_m@epita.fr>
1551 * src/reader.c (parse_include_decl): New, not yet implemented.
1552 (read_declarations): Add case tok_include.
1553 * src/getargs.h (include): Add its extern definition.
1554 * src/getargs.c (include): New const char *.
1555 (getargs): Add case '-I'.
1556 * src/options.c (option_table): Add include as command line and
1558 * src/lex.h (token_t): Add tok_include.
1560 2001-11-26 Akim Demaille <akim@epita.fr>
1562 * src/reader.c (readgram): Make sure rules for mid-rule actions
1563 have a lineno equal to that of their host rule.
1564 Reported by Hans Aberg.
1565 * tests/regression.at (Rule Line Numbers): New.
1567 2001-11-26 Akim Demaille <akim@epita.fr>
1569 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
1572 2001-11-26 Akim Demaille <akim@epita.fr>
1574 * src/complain.c, src/complain.h (error): Remove, provided by
1577 2001-11-26 Akim Demaille <akim@epita.fr>
1579 * src/reader.c (read_declarations): Don't abort on tok_illegal,
1580 issue an error message.
1581 * tests/regression.at (Invalid %directive): New.
1582 Reported by Hans Aberg.
1584 2001-11-26 Akim Demaille <akim@epita.fr>
1586 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
1587 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1589 2001-11-26 Akim Demaille <akim@epita.fr>
1591 * src/conflicts.c (conflicts_print): Don't complain at all when
1592 there are no reduce/reduce conflicts, and as many shift/reduce
1593 conflicts as expected.
1594 * tests/regression.at (%expect right): Adjust.
1596 2001-11-23 Akim Demaille <akim@epita.fr>
1598 * lib/alloca.c: Update, from fileutils.
1600 2001-11-23 Akim Demaille <akim@epita.fr>
1602 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
1604 2001-11-23 Akim Demaille <akim@epita.fr>
1606 * src/system.h: Include alloca.h.
1607 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
1609 2001-11-23 Akim Demaille <akim@epita.fr>
1611 * src/print_graph.c (print_actions): Remove `rule', unused.
1612 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
1613 pacify GCC's signed < unsigned warnings.
1614 * src/closure.c (itemsetsize): Likewise.
1615 * src/reader.c (symbol_list_new): Static.
1617 2001-11-23 Akim Demaille <akim@epita.fr>
1619 Attaching lineno to buckets is stupid, since only one copy of each
1620 symbol is kept, only the line of the first occurrence is kept too.
1622 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
1623 * src/reader.c (rline_allocated): Remove, unused.
1624 (symbol_list): Have a `line' member.
1625 (symbol_list_new): New.
1627 * src/print.c (print_grammar): Output the rule line numbers.
1628 * tests/regression.at (Solved SR Conflicts)
1629 (Unresolved SR Conflicts): Adjust.
1630 Reported by Hans Aberg.
1632 2001-11-22 Marc Autret <autret_m@epita.fr>
1634 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
1636 2001-11-22 Marc Autret <autret_m@epita.fr>
1638 * src/muscle_tab.c (muscle_init): Remove initialization of
1640 * src/output.c (output_master_parser): Do it here.
1642 2001-11-20 Akim Demaille <akim@epita.fr>
1645 * configure.in (ALL_LINGUAS): Adjust.
1646 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
1647 longer contains strings to translate.
1649 2001-11-19 Akim Demaille <akim@epita.fr>
1651 * src/conflicts.c (conflicts_print): Add a missing \n.
1653 2001-11-19 Akim Demaille <akim@epita.fr>
1655 * src/nullable.c (nullable_print): New.
1656 (set_nullable): Call it when tracing.
1657 Better locality of variables.
1659 2001-11-19 Akim Demaille <akim@epita.fr>
1661 * src/print.c (print_actions): Better locality of variables.
1663 2001-11-19 Akim Demaille <akim@epita.fr>
1665 * src/derives.c (print_derives): Fix and enrich.
1666 * src/closure.c (print_fderives): Likewise.
1668 2001-11-19 Akim Demaille <akim@epita.fr>
1670 * src/closure.c (itemsetend): Remove, replaced with...
1673 2001-11-19 Akim Demaille <akim@epita.fr>
1675 * src/LR0.c (kernel_end): Remove, replaced with...
1678 2001-11-19 Akim Demaille <akim@epita.fr>
1680 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
1683 2001-11-19 Akim Demaille <akim@epita.fr>
1685 * src/closure.c (closure): Use arrays instead of pointers to clarify.
1687 2001-11-19 Akim Demaille <akim@epita.fr>
1689 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
1691 * src/LR0.c: Likewise.
1692 (allocate_itemsets): Use arrays instead of pointers to clarify.
1694 2001-11-19 Akim Demaille <akim@epita.fr>
1696 * src/getargs.c (statistics_flag): Replace with...
1698 (longopts): Accept --trace instead of --statistics.
1699 * src/getargs.h, src/options.c: Adjust.
1700 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
1701 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
1703 2001-11-19 Akim Demaille <akim@epita.fr>
1705 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
1706 pointers to clarify the code.
1707 (save_reductions, save_shifts): Factor common parts of alternatives.
1709 2001-11-19 Akim Demaille <akim@epita.fr>
1711 * src/LR0.c (new_state, get_state): Complete TRACE code.
1712 * src/closure.c: Include `reader.h' to get `tags', needed by the
1714 Rename the conditional DEBUG as TRACE.
1715 Output consistently TRACEs to stderr, not stdout.
1716 * src/derives.c: Likewise.
1717 * src/reduce.c: (inaccessable_symbols): Using if is better style
1719 Use `#if TRACE' instead of `#if 0' for tracing code.
1721 2001-11-19 Akim Demaille <akim@epita.fr>
1723 * src/system.h (LIST_FREE, shortcpy): New.
1724 * src/LR0.c: Use them.
1725 * src/output.c (free_itemsets, free_reductions, free_shifts):
1726 Remove, replaced by LIST_FREE.
1728 2001-11-19 Akim Demaille <akim@epita.fr>
1730 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
1731 (REDUCTIONS_ALLOC): New.
1732 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
1735 2001-11-19 Akim Demaille <akim@epita.fr>
1737 * src/LR0.c (new_state): Complete trace code.
1738 * src/nullable.c (set_nullable): Don't translate traces.
1740 2001-11-19 Akim Demaille <akim@epita.fr>
1742 * src/print_graph.c (print_core): Better locality of variables.
1743 * src/print.c (print_core): Likewise.
1745 2001-11-19 Akim Demaille <akim@epita.fr>
1747 * src/vcg.c: You do the output, so you are responsible of the
1748 handling of VCG syntax, in particular: use quotearg.
1749 * src/print_graph.c: Don't.
1750 (print_actions): Don't output the actions as part of the nodes,
1751 since that's the job of the edges.
1752 (print_state): Don't output by hand: fill the node description,
1753 and ask for its output.
1755 2001-11-19 Akim Demaille <akim@epita.fr>
1757 * src/bison.simple (yyparse): When verbosely reporting an error,
1758 no longer put additional quotes around token names.
1759 * tests/calc.at: Adjust.
1761 2001-11-19 Akim Demaille <akim@epita.fr>
1763 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
1764 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
1765 * src/output.c: Adjust.
1767 2001-11-19 Akim Demaille <akim@epita.fr>
1769 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
1771 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
1773 2001-11-19 Akim Demaille <akim@epita.fr>
1775 * src/gram.h (rule_t): New.
1777 (rrhs, rlhs): Remove, part of state_t.
1778 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
1779 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1780 * src/reader.c, src/reduce.c: Adjust.
1782 2001-11-19 Akim Demaille <akim@epita.fr>
1784 * src/reader.c (symbols_output): New, extracted from...
1785 (packsymbols): Here.
1788 2001-11-19 Akim Demaille <akim@epita.fr>
1790 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
1791 (maxrhs): this new function.
1793 2001-11-19 Akim Demaille <akim@epita.fr>
1795 * src/lalr.c (F): New macro to access the variable F.
1798 2001-11-19 Akim Demaille <akim@epita.fr>
1800 * src/lalr.h (LA): New macro to access the variable LA.
1801 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1802 * src/lalr.c: Adjust.
1804 2001-11-19 Akim Demaille <akim@epita.fr>
1806 * src/lalr.c (initialize_LA): Only initialize LA. Let...
1807 (set_state_table): handle the `lookaheads' members.
1809 2001-11-19 Akim Demaille <akim@epita.fr>
1811 * src/lalr.h (lookaheads): Removed array, whose contents is now
1813 (state_t): this structure.
1814 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1817 2001-11-19 Akim Demaille <akim@epita.fr>
1819 * src/lalr.h (consistent): Removed array, whose contents is now
1821 (state_t): this structure.
1822 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1825 2001-11-19 Akim Demaille <akim@epita.fr>
1827 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
1828 contents are now members of...
1829 (state_t): this structure.
1830 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
1833 2001-11-19 Akim Demaille <akim@epita.fr>
1835 * src/lalr.h (state_t): New.
1836 (state_table): Be a state_t * instead of a core **.
1837 (accessing_symbol): Remove, part of state_t.
1838 * src/lalr.c: Adjust.
1839 (set_accessing_symbol): Merge into...
1840 (set_state_table): this.
1841 * src/print_graph.c, src/conflicts.c: Adjust.
1843 2001-11-14 Akim Demaille <akim@epita.fr>
1845 * tests/calc.at, tests/output.at, tests/regression.at,
1846 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
1847 now the tests are run in private dirs, therefore AC_CLEANUP and
1848 family can be simplified to 0-ary.
1849 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
1850 use abs. path to find config.h.
1851 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
1852 stderr, there can be way too much random noise.
1853 Instead pass -Werror to GCC and rely on the exit status.
1854 Reported by Wolfram Wagner.
1856 2001-11-14 Akim Demaille <akim@epita.fr>
1858 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
1859 defined only if yyoverflow is defined, to avoid `warning: unused
1861 Reported by The Test Suite.
1863 2001-11-14 Akim Demaille <akim@epita.fr>
1865 * src/print.c: Include reduce.h.
1866 Reported by Hans Aberg.
1868 2001-11-14 Akim Demaille <akim@epita.fr>
1870 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
1871 Revert a previous patch: these are really const.
1872 * src/conflicts.c (conflict_report): Additional useless pair of
1873 braces to pacify GCC's warnings for `if () if () {} else {}'.
1874 * src/lex.c (parse_percent_token): Replace equal_offset with
1877 Be sure to strdup `arg' when used, since there is no reason for
1878 token_buffer not to change.
1880 2001-11-14 Akim Demaille <akim@epita.fr>
1882 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
1884 * src/main.c (main): Use them.
1885 Suggested by Hans Aberg.
1887 2001-11-12 Akim Demaille <akim@epita.fr>
1889 * src/system.h (ngettext): Now that we use ngettext, be sure to
1890 provide a default definition when NLS are not used.
1892 2001-11-12 Akim Demaille <akim@epita.fr>
1894 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
1895 Use @kbd to denote user input.
1896 (Language and Grammar): ANSIfy the example.
1897 Adjust its layout for info/notinfo.
1898 (Location Tracking Calc): Output error messages to stderr.
1899 Output locations in a more GNUtically correct way.
1900 Fix a couple of Englishos.
1901 Adjust @group/@end group pairs.
1903 2001-11-12 Akim Demaille <akim@epita.fr>
1905 %expext was not functioning at all.
1907 * src/conflicts.c (expected_conflicts): Set to -1.
1908 (conflict_report): Use ngettext.
1909 (conflicts_print): Check %expect and make its violation an error.
1910 * doc/bison.texinfo (Expect Decl): Adjust.
1911 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
1912 * tests/regression.at (%expect not enough, %expect right)
1913 (%expect too much): New.
1915 2001-11-12 Akim Demaille <akim@epita.fr>
1917 * tests/regression.at (Conflicts): Rename as...
1918 (Unresolved SR Conflicts): this.
1919 (Solved SR Conflicts): New.
1921 2001-11-12 Akim Demaille <akim@epita.fr>
1923 * src/reduce.c (print_results): Rename as...
1924 (reduce_output): This.
1925 Output to OUT, passed as argument, instead of output_obstack.
1926 (dump_grammar): Likewise.
1929 (reduce_grammar): No longer call reduce_output, since...
1930 * src/print.c (print_results): do it.
1931 * src/main.c (main): Call reduce_free;
1933 2001-11-12 Akim Demaille <akim@epita.fr>
1935 * src/conflicts.c (print_reductions): Accept OUT as argument.
1936 Output to it, not to output_obstack.
1937 * src/print.c (print_actions): Adjust.
1939 2001-11-12 Akim Demaille <akim@epita.fr>
1941 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
1942 the result instead of using...
1943 (src_total, rrc_total, src_count, rrc_count): Remove.
1944 (any_conflicts): Remove.
1945 (print_conflicts): Split into...
1946 (conflicts_print, conflicts_output): New.
1947 * src/conflicts.h: Adjust.
1948 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
1949 * src/print.c (print_grammar): Issue `\n' between two rules.
1950 * tests/regression.at (Conflicts): New.
1951 Reported by Tom Lane.
1953 2001-11-12 Akim Demaille <akim@epita.fr>
1955 * tests/regression.at (Invalid input): Remove, duplicate with
1956 ``Invalid input: 1''.
1958 2001-11-12 Akim Demaille <akim@epita.fr>
1960 * tests/torture.at (AT_DATA_STACK_TORTURE)
1961 (Exploding the Stack Size with Alloca)
1962 (Exploding the Stack Size with Malloc): New.
1964 2001-11-12 Akim Demaille <akim@epita.fr>
1966 * src/bison.simple (YYSTACK_REALLOC): New.
1967 (yyparse) [!yyoverflow]: Use it and free the old stack.
1968 Reported by Per Allansson.
1970 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
1972 * src/bison.simple: Define type yystype instead of YYSTYPE, and
1973 define CPP macro, which substitute YYSTYPE by yystype.
1974 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
1975 with yyltype/YYLTYPE. This allows inclusion of the generated
1976 header within the parser if the compiler, such as GGC, accepts
1977 multiple equivalent #defines.
1980 2001-11-05 Akim Demaille <akim@epita.fr>
1982 * src/reader.c (symbols_output): New, extracted from...
1983 (packsymbols): here.
1986 2001-11-05 Akim Demaille <akim@epita.fr>
1988 * src/lex.c (parse_percent_token): s/quotearg/quote/.
1990 2001-11-05 Akim Demaille <akim@epita.fr>
1992 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
1995 2001-11-05 Akim Demaille <akim@epita.fr>
1997 * src/options.h (struct option_table_struct): set_flags is void*.
1998 * src/options.c (longopts): Support `--output' and `%output'.
2000 * src/lex.h (tok_setopt): Remove, replaced with...
2001 (tok_intopt, tok_stropt): these new guys.
2002 * src/lex.c (getopt.h): Not needed.
2003 (token_buffer, unlexed_token_buffer): Not const.
2004 (percent_table): Promote `-' over `_' in directive names.
2005 Active `%name-prefix', `file-prefix', and `output'.
2006 (parse_percent_token): Accept possible arguments to directives.
2007 Promote `-' over `_' in directive names.
2009 2001-11-04 Akim Demaille <akim@epita.fr>
2011 * doc/bison.texinfo (Decl Summary): Split the list into
2012 `directives for grammars' and `directives for bison'.
2014 Add description of `%name-prefix', `file-prefix', and `output'.
2015 Promote `-' over `_' in directive names.
2016 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2017 Simplify the description of `--name-prefix'.
2018 Promote `-' over `_' in directive names.
2019 Promote `--output' over `--output-file'.
2020 Fix the description of `--defines'.
2021 * tests/output.at: Exercise %file-prefix and %output.
2023 2001-11-02 Akim Demaille <akim@epita.fr>
2025 * doc/refcard.tex: Update.
2027 2001-11-02 Akim Demaille <akim@epita.fr>
2029 * src/symtab.h (SUNDEF): New.
2030 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2031 stand for `uninitialized', instead of 0.
2032 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2033 * src/lex.c (lex): Adjust.
2035 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2037 Let yylex return it instead of a plain 0.
2038 Reported by Dick Streefland.
2040 2001-11-02 Akim Demaille <akim@epita.fr>
2042 * tests/regression.at (Mixing %token styles): New test.
2044 2001-11-02 Akim Demaille <akim@epita.fr>
2046 * src/reader.c (parse_thong_decl): Formatting changes.
2047 (token_translations_init): New, extracted from...
2048 (packsymbols): Here.
2051 2001-11-01 Akim Demaille <akim@epita.fr>
2053 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2054 Check that `9foo.y' produces correct cpp guards.
2055 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2059 2001-11-01 Akim Demaille <akim@epita.fr>
2061 * tests/regression.at (Invalid input: 2): New.
2062 * src/lex.c (unlexed_token_buffer): New.
2063 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2067 2001-11-01 Akim Demaille <akim@epita.fr>
2069 * tests/calc.at: Catch up with 1.30.
2070 * configure.in: Bump to 1.49a.
2071 Adjust to newer Autotest.
2073 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2075 * src/conflicts.c: Move global variables rrc_total and src_total ...
2076 (print_conflicts): here.
2077 * src/output.c (output): Free global variable user_toknums.
2078 * src/lex.c (token_obstack): Become static.
2080 2001-10-18 Akim Demaille <akim@epita.fr>
2082 * tests/atlocal.in (GCC): Add.
2083 * tests/calc.at: s/m4_match/m4_bmatch/.
2084 s/m4_patsubst/m4_bpatsubst/.
2085 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2086 * configure.in: AC_SUBST(GCC).
2088 2001-10-14 Marc Autret <autret_m@epita.fr>
2090 * src/options.c (create_long_option_table): Fix.
2092 2001-10-10 Akim Demaille <akim@epita.fr>
2094 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2096 2001-10-04 Akim Demaille <akim@epita.fr>
2098 * src/reader.c (parse_union_decl): Push the caracters in
2099 union_obstack, not attrs_obstack.
2101 2001-10-04 Akim Demaille <akim@epita.fr>
2103 Merge in the branch 1.29.
2105 * src/reader.c (packsymbols): Use a temporary obstack for
2106 `%%tokendef', since output_stack is already used elsewhere.
2108 2001-10-02 Akim Demaille <akim@epita.fr>
2112 2001-10-02 Akim Demaille <akim@epita.fr>
2116 2001-10-02 Akim Demaille <akim@epita.fr>
2118 * tests/regression.at (Invalid CPP headers): New.
2119 From Alexander Belopolsky.
2120 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2122 2001-10-02 Akim Demaille <akim@epita.fr>
2124 * tests/regression.at (Invalid input): New.
2125 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2128 2001-10-02 Akim Demaille <akim@epita.fr>
2130 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2132 2001-10-02 Akim Demaille <akim@epita.fr>
2134 * src/output.c (output_parser): Assert `skeleton'.
2135 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2139 2001-10-01 Marc Autret <autret_m@epita.fr>
2141 * src/lex.h: Echo modifications.
2142 * src/lex.c (unlex): Parameter is now token_t.
2145 2001-10-01 Marc Autret <autret_m@epita.fr>
2147 * src/main.c: Include lex.h.
2150 2001-09-29 Akim Demaille <akim@epita.fr>
2152 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2154 2001-09-28 Akim Demaille <akim@epita.fr>
2156 * tests/testsuite.at: Update to newer Autotest.
2157 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2159 2001-09-27 Akim Demaille <akim@epita.fr>
2161 Position independent wrapper.
2163 * tests/bison: Remove.
2164 * tests/bison.in: New.
2165 * configure.in: Adjust.
2167 2001-09-27 Paul Eggert <eggert@twinsun.com>
2169 Port quotearg fixes from tar 1.13.24.
2171 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2173 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2174 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2176 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2177 * m4/mbrtowc.m4: New file.
2178 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2179 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2181 2001-09-27 Akim Demaille <akim@epita.fr>
2185 2001-09-27 Akim Demaille <akim@epita.fr>
2189 2001-09-25 Akim Demaille <akim@epita.fr>
2191 * src/system.h: Include `xalloc.h'.
2192 Remove it from the C files.
2193 * src/files.c (output_files): Free the obstacks.
2194 * src/lex.c (init_lex): Rename as...
2197 * src/main.c (main): Use it.
2199 2001-09-24 Marc Autret <autret_m@epita.fr>
2201 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2202 to output informations in fout (FILE*).
2203 (open_graph, close_graph): Likewise.
2204 (output_graph, output_edge, output_node): Likewise.
2205 * src/vcg.h: Update function prototypes.
2206 * src/print_graph.c (print_graph): Open output graph file.
2207 (print_actions): Adjust.
2208 * src/files.h: Remove extern declaration.
2209 * src/files.c: Remove graph_obstack declaration.
2210 (open_files): Remove graph_obstack initialization.
2211 (output_files): Remove graph_obstack saving.
2213 2001-09-24 Marc Autret <autret_m@epita.fr>
2215 * src/files.c (compute_output_file_names): Fix.
2217 2001-09-24 Marc Autret <autret_m@epita.fr>,
2218 Akim Demaille <akim@epita.fr>
2220 * src/reader.c (reader): Remove call to free_symtab ().
2221 * src/main.c (main): Call it here.
2223 * src/conflicts.c (initialize_conflicts): Rename as...
2224 (solve_conflicts): this.
2225 * src/print.c (print_core, print_actions, print_state)
2226 (print_grammar): Dump to a file instead a `output_obstack'.
2227 (print_results): Dump `output_obstack', and then proceed with the
2229 * src/files.c (compute_output_file_names, close_files): New.
2230 (output_files): Adjust.
2231 * src/main.c (main): Adjust.
2233 2001-09-23 Marc Autret <autret_m@epita.fr>
2235 * src/files.c (compute_header_macro): Computes header macro name
2236 from spec_defines_file when given.
2238 2001-09-23 Marc Autret <autret_m@epita.fr>
2240 * src/files.c (output_files): Add default extensions.
2242 2001-09-22 Akim Demaille <akim@epita.fr>
2244 * src/conflicts.c (finalize_conflicts): Rename as...
2245 (free_conflicts): this.
2247 2001-09-22 Akim Demaille <akim@epita.fr>
2249 * src/gram.c (gram_free): Rename back as...
2251 (output_token_translations): Free `token_translations'.
2252 * src/symtab.c (free_symtab): Free the tag field.
2254 2001-09-22 Akim Demaille <akim@epita.fr>
2256 Remove `translations' as it is always set to true.
2258 * src/gram.h: Adjust.
2259 * src/reader.c (packsymbols, parse_token_decl): Adjust
2260 * src/print.c (print_grammar): Adjust.
2261 * src/output.c (output_token_translations): Adjust.
2262 * src/lex.c (lex): Adjust.
2263 * src/gram.c: Be sure the set pointers to NULL.
2264 (dummy): Rename as...
2267 2001-09-22 Akim Demaille <akim@epita.fr>
2269 * configure.in: Invoke AM_LIB_DMALLOC.
2270 * src/system.h: Use dmalloc.
2271 * src/LR0.c: Be sure to have pointers initialized to NULL.
2272 (allocate_itemsets): Allocate kernel_items only if needed.
2274 2001-09-22 Akim Demaille <akim@epita.fr>
2276 * configure.in: Bump to 1.29b.
2277 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2278 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2279 need xmalloc.c in calc.y.
2282 2001-09-21 Akim Demaille <akim@epita.fr>
2285 * Makefile.maint, config/config.guess, config/config.sub,
2286 * config/missing: Update from masters.
2287 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2289 * configure.in (ALL_LINGUAS): Add `tr'.
2291 2001-09-21 Akim Demaille <akim@epita.fr>
2293 * tests/Makefile.am (package.m4): Move to...
2294 ($(srcdir)/$(TESTSUITE)): here.
2296 2001-09-20 Akim Demaille <akim@epita.fr>
2298 * src/complain.c: No longer try to be standalone: use system.h.
2299 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2300 * src/complain.h: Likewise.
2301 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2302 Remove the unused variable `n'.
2303 From Albert Chin-A-Young.
2305 2001-09-18 Marc Autret <autret_m@epita.fr>
2307 * doc/bison.1: Update.
2308 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2310 (Option Cross Key): Update.
2313 2001-09-18 Marc Autret <autret_m@epita.fr>
2315 * tests/regression.at: New test (comment in %union).
2317 2001-09-18 Marc Autret <autret_m@epita.fr>
2319 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2321 Reported by Keith Browne.
2323 2001-09-18 Marc Autret <autret_m@epita.fr>
2325 * tests/output.at: Add tests for --defines and --graph.
2327 2001-09-18 Marc Autret <autret_m@epita.fr>
2329 * tests/output.at: Removes tests of %{header,src}_extension features.
2331 2001-09-18 Akim Demaille <akim@epita.fr>
2333 * tests/Makefile.am (package.m4): New.
2334 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2335 (_AT_CHECK_CALC_ERROR): Likewise.
2336 Factor the `, ' part of verbose error messages.
2338 2001-09-18 Marc Autret <autret_m@epita.fr>
2340 * src/getargs.c (longopts): Declare --defines and --graph as options
2341 with optional arguments.
2342 * src/files.h: Add extern declarations.
2343 * src/files.c (spec_graph_file, spec_defines_file): New.
2344 (output_files): Update.
2345 Remove CPP-outed code.
2347 2001-09-18 Marc Autret <autret_m@epita.fr>
2349 Turn off %{source,header}_extension feature.
2351 * src/files.c (compute_exts_from_gf): Update.
2352 (compute_exts_from_src): Update.
2353 (output_files): CPP-out useless code.
2354 * src/files.h: Remove {header,source}_extension extern declarations.
2355 * src/reader.c (parse_dquoted_param): CPP-out.
2356 (parse_header_extension_decl): Remove.
2357 (parse_source_extension_decl): Remove.
2358 (read_declarations): Remove cases tok_{hdrext,srcext}.
2359 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2360 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2362 2001-09-10 Akim Demaille <akim@epita.fr>
2364 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2365 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2366 (AT_CHECK_OUTPUT): this.
2367 Merely check ls' exit status, its output is useless.
2369 2001-09-10 Akim Demaille <akim@epita.fr>
2371 * tests/calc.at: Use m4_match.
2372 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2374 2001-09-10 Marc Autret <autret_m@epita.fr>,
2375 Akim Demaille <akim@epita.fr>
2377 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2379 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2381 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2382 * src/lex.h: Adjust prototype.
2383 (token_t): Add `tok_undef'.
2384 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2385 (parse_percent_token): Now returns token_t.
2386 Add default statement in switch.
2387 (lex): Separate `c' as an input variable, from the token_t result
2389 (unlexed): Is a token_t.
2391 2001-09-10 Akim Demaille <akim@epita.fr>
2393 * configure.in: Bump to 1.29a.
2395 2001-09-07 Akim Demaille <akim@epita.fr>
2399 2001-08-30 Akim Demaille <akim@epita.fr>
2401 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
2402 * m4/atconfig.m4: Remove.
2403 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
2405 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
2406 m4_if, m4_patsubst, and m4_regexp.
2407 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
2408 `input' file instead of echo.
2410 2001-08-29 Akim Demaille <akim@epita.fr>
2414 2001-08-29 Akim Demaille <akim@epita.fr>
2418 2001-08-29 Paul Eggert <eggert@twinsun.com>
2420 * src/bison.simple (yyparse): Don't take the address of an
2421 item before the start of an array, as that doesn't conform to
2424 2001-08-29 Robert Anisko <anisko_r@epita.fr>
2426 * doc/bison.texinfo (Location Tracking Calc): New node.
2428 2001-08-29 Paul Eggert <eggert@twinsun.com>
2430 * src/output.c (output): Do not define const, as this now
2431 causes more problems than it cures.
2433 2001-08-29 Akim Demaille <akim@epita.fr>
2435 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
2437 Be sure to tag the `detailmenu'.
2439 2001-08-29 Akim Demaille <akim@epita.fr>
2441 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
2442 download in a tmp dir.
2444 2001-08-28 Marc Autret <autret_m@epita.fr>
2446 * config/depcomp: New file.
2448 2001-08-28 Marc Autret <autret_m@epita.fr>
2450 * doc/bison.1 (mandoc): Adjust.
2451 From Juan Manuel Guerrero.
2453 2001-08-28 Marc Autret <autret_m@epita.fr>
2455 * src/print_graph.c (print_state): Fix.
2457 2001-08-27 Marc Autret <autret_m@epita.fr>
2459 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
2461 Echo modifications to the functions prototypes.
2462 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
2464 2001-08-27 Marc Autret <autret_m@epita.fr>
2466 * src/vcg.c: Include `xalloc.h'.
2467 (add_colorentry): New.
2468 (add_classname): New.
2469 (add_infoname): New.
2470 * src/vcg.h: Add new prototypes.
2472 2001-08-27 Akim Demaille <akim@epita.fr>
2474 * Makefile.maint: Sync. again with CVS Autoconf.
2476 2001-08-27 Akim Demaille <akim@epita.fr>
2478 * Makefile.maint: Formatting changes.
2479 (po-update, cvs-update, update): New targets.
2482 2001-08-27 Akim Demaille <akim@epita.fr>
2484 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2485 * Makefile.maint: Sync. with CVS Autoconf.
2487 2001-08-27 Marc Autret <autret_m@epita.fr>
2489 * src/vcg.h (struct infoname_s): New.
2490 (struct colorentry_s): New.
2491 (graph_s): New fields {vertical,horizontal}_order in structure.
2492 Add `infoname' field.
2493 Add `colorentry' field;
2494 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
2495 (G_HORIZONTAL_ORDER): New.
2497 (G_COLORENTRY): New.
2498 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
2499 Add output of `infoname'.
2500 Add output of `colorentry'.
2502 2001-08-27 Marc Autret <autret_m@epita.fr>
2504 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
2505 This one shadowed a global parameter.
2507 2001-08-24 Marc Autret <autret_m@epita.fr>
2509 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
2510 instead of `unsigned'.
2511 (print_state): Do not call obstack_object_size () in obstack_grow ()
2512 to avoid macro variables shadowing.
2514 2001-08-23 Marc Autret <autret_m@epita.fr>
2516 * src/lex.c (percent_table): Typo: s/naem/name/.
2518 Normalize new options declarations.
2520 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
2522 * tests/suite.at: Exercise %header_extension and %source_extension.
2524 2001-08-16 Marc Autret <autret_m@epita.fr>
2526 * src/reader.c (parse_dquoted_param): New.
2527 (parse_header_extension_decl): Use it.
2528 (parse_source_extension_decl): Likewise.
2530 2001-08-16 Marc Autret <autret_m@epita.fr>
2532 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
2533 (get_xxxx_str): Use assert () instead of complain ().
2534 Remove return invokations in default cases.
2535 (get_decision_str): Modify default behaviour. Remove second argument.
2536 Echo modifications on calls.
2537 (output_graph): Fix.
2539 2001-08-16 Marc Autret <autret_m@epita.fr>
2541 * src/getargs.c (usage): Update with ``-g, --graph''.
2543 2001-08-16 Marc Autret <autret_m@epita.fr>
2545 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
2546 (Option Cross Key): Likewise.
2547 * doc/bison.1: Update.
2549 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
2551 * src/output.c (output_master_parser): Don't finish action_obstack.
2552 (output_parser): Don't care about the muscle action, here.
2553 (prepare): Copy the action_obstack in the action muscle.
2554 (output): Free action_obstack.
2556 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2558 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
2559 will contain `%union' declaration.
2560 (parse_union_decl): Delete #line directive output.
2561 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
2562 informations about %union.
2563 (parse_union_decl): Copy the union_obstack in the muscle stype.
2564 * src/bison.simple: Add new #line directive.
2565 Add typdef %%stype YYSTYPE.
2567 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
2569 * src/bison.simple: Add new `#line' directive.
2571 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
2573 * src/bison.simple: New `#line' directive.
2574 * src/output.c (output_parser): Support new dynamic muscle input_line.
2576 2001-09-22 Marc Autret <autret_m@epita.fr>
2578 * src/output.c (output_master_parser): New.
2579 (output_parser): Be more re-entrant.
2581 2001-09-21 Marc Autret <autret_m@epita.fr>
2583 * src/reader.c (copy_definition, parse_union_decl): Update and use
2585 (copy_action): Likewise.
2586 Use obstack_1grow ().
2587 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
2589 2001-09-21 Marc Autret <autret_m@epita.fr>
2591 * src/options.c (option_table): Adjust.
2592 * src/lex.c (parse_percent_token): Fix.
2594 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2596 * src/options.c (symtab.h): Include it, need by lex.h.
2598 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
2600 * src/lex.c (parse_percent_token): Change type of variable `tx', which
2601 is now an option_table_struct*.
2602 (option_strcmp): New function option_strcmp.
2603 (parse_percent_token): Call option_strcmp.
2604 * src/getargs.c (xalloc.h, options.h): Include it.
2605 (getargs): Call create_long_option_table.
2606 (getargs): Free longopts at the end of the function.
2607 (shortopts): Move in options.c.
2608 * src/options.c (create_long_option_table): New function. Convert
2609 information from option_table to option structure.
2610 * src/reader.c (options.h): Include it.
2612 * src/Makefile.am: Adjust.
2613 * src/options.c (option_table): Create from longopts and percent_table.
2614 * src/getargs.c (longopts): Delete.
2615 * src/lex.c (struct percent_table_struct): Delete.
2616 (percent_table): Delete.
2617 (options.h): Include it.
2618 * src/options.c: Create.
2619 * src/options.h: Create.
2620 Declare enum opt_access_e.
2621 Define struct option_table_struct.
2623 2001-09-20 Marc Autret <autret_m@epita.fr>
2625 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
2628 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
2630 * src/bison.simple: s/%%filename/%%skeleton.
2631 * src/muscle_tab.c (getargs.h): Include it.
2632 (muscle_init): Insert new muscle skeleton.
2634 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
2636 * src/output.c (output_parser): Delete unused variable actions_dumped.
2638 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
2640 * src/output.c (output): Delete call to reader_output_yylsp.
2641 * src/reader.c (reader): Likewise.
2642 * src/reader.h: Delete declaration of reader_output_yylsp.
2644 2001-09-02 Marc Autret <autret_m@epita.fr>
2646 * src/reader.c: Include muscle_tab.h.
2647 (parse_union_decl): Update.
2648 (parse_macro_decl): Rename parse_muscle_decl.
2649 Update to use renamed functions and variable.
2650 (read_declarations, copy_action, read_additionnal_code, : Updated
2651 with correct variables and functions names.
2652 (packsymbols, reader): Likewise.
2654 * src/reader.h (muscle_obstack): Extern declaration update.
2656 * src/output.c: Include muscle_tab.h
2657 In all functions using macro_insert, change by using muscle_insert ().
2658 (macro_obstack): Rename muscle_obstack.
2659 Echo modifications in the whole file.
2660 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
2661 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
2662 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
2664 * src/muscle_tab.h: Update double inclusion macros.
2665 (macro_entry_s): Rename muscle_entry_s.
2668 * src/muscle_tab.c: Include muscle_tab.h.
2669 Rename macro_tabble to muscle_table.
2670 (mhash1, mhash2, mcmp): Use muscle_entry.
2671 (macro_init): Rename muscle_init. Update.
2672 (macro_insert): Rename muscle_insert. Update.
2673 (macro_find): Rename muscle_find. Update.
2675 * src/main.c: Include muscle_tab.h.
2676 (main): Call muscle_init ().
2677 * src/Makefile.am (bison_SOURCES): Echo modifications.
2679 2001-09-02 Marc Autret <autret_m@epita.fr>
2681 Now the files macro_tab.[ch] are named muscle_tab.[ch].
2683 * src/muscle_tab.c, src/muscle_tab.h: Add files.
2685 2001-09-02 Marc Autret <autret_m@epita.fr>
2687 * src/macrotab.c, src/macrotab.h: Remove.
2689 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
2691 * src/reader.c (copy_guard): Use muscle to specify the `#line'
2694 2001-09-01 Marc Autret <autret_m@epita.fr>
2696 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
2697 to an explicit value to activate the feature. We do it here.
2699 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2701 * src/output.c (prepare): Delete the `filename' muscule insertion.
2702 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
2703 (parse_union_decl): Likewise.
2704 * src/macrotab.c (macro_init): Initialize filename by infile.
2706 2001-08-31 Marc Autret <autret_m@epita.fr>
2708 * src/bison.simple (YYLSP_NEEDED): New definition.
2709 * src/output.c (prepare): Add macro insertion of `locations_flag'
2711 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2713 * src/output.c (prepare): Delete insertion of previous muscles,
2714 and insert the `prefix' muscles.
2715 * src/macrotab.c (macro_init): Likewise.
2716 (macro_init): Initialization prefix directive by `yy'.
2717 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
2718 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
2719 yylval, yydebug, yyerror, yynerrs and yyparse.
2720 New directive `#define' to substitute yydebug, ... with option
2723 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2725 * src/main.c (main): Standardize.
2726 * src/output.c (output_table_data, output_parser): Likewise.
2727 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
2729 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
2731 * src/reader.c (read_additionnal_code): Rename %%user_code to
2733 * src/output.c (output): Rename %%declarations to %%prologue.
2734 * src/bison.simple: Echo modifications.
2736 2001-08-31 Marc Autret <autret_m@epita.fr>
2738 * src/reader.c (readgram): CleanUp.
2739 (output_token_defines): Likewise.
2740 (packsymbols): Likewise.
2742 * src/output.c (output): CPP-out useless code.
2744 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
2746 * src/reader.c (reader): Delete obsolete call to function
2747 output_trailers and output_headers.
2748 * src/output.h: Remove obsolete functions prototypes of output_headers
2749 and output_trailers.
2751 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
2753 * src/main.c: Include macrotab.h.
2754 * src/macrotab.h (macro_entry_s): Constify fields.
2755 Adjust functions prototypes.
2756 * src/macrotab.c (macro_insert): Constify key and value.
2757 (macro_find): Constify key.
2758 (macro_insert): Include 'xalloc.h'
2759 (macro_insert): Use XMALLOC.
2760 (macro_find): Constify return value.
2761 * src/output.c (output_table_data): Rename table to table_data.
2762 (output_parser): Constify macro_key, macro_value.
2764 2001-08-30 Marc Autret <autret_m@epita.fr>
2766 * src/reader.c (parse_skel_decl): New.
2767 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2768 * src/lex.h (token_t): New token `tok_skel'.
2769 * src/lex.c (percent_table): Add skeleton option entry.
2772 2001-08-29 Marc Autret <autret_m@epita.fr>
2774 * src/bison.simple: Add %%user_code directive at the end.
2775 * src/reader.c (read_additionnal_code): New.
2777 * src/output.c (output_program): Remove.
2780 2001-08-28 Marc Autret <autret_m@epita.fr>
2782 * src/output.c (output_actions): Clean up.
2783 (output_gram): CPP-out useless code.
2784 * src/reader.c (reader): Clean up, CPP-out useless code.
2786 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
2788 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
2790 * src/bison.simple: Add `%%definitions'.
2792 2001-08-28 Marc Autret <autret_m@epita.fr>
2794 * config/depcomp: New file.
2796 2001-08-27 Paul Eggert <eggert@twinsun.com>
2798 * src/bison.simple (yyparse): Don't take the address of an
2799 item before the start of an array, as that doesn't conform to
2802 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
2804 * src/output.c (output): Remove the initialization of the macro
2805 obstack. It was done too late here.
2807 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
2809 (reader): Initialize the macro obstack here, since we need it to grow
2810 '%define' directives.
2812 * src/reader.h: Declare the macro obstack as extern.
2814 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
2816 * src/output.c (output_parser): Fix. Store single '%' characters in
2817 the output obstack instead of throwing them away.
2819 2001-08-27 Akim Demaille <akim@epita.fr>
2821 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
2823 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2825 * lib/Makefile.am: Adjust.
2827 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2829 * src/bison.simple: Update and add '%%' directives.
2831 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2833 * src/reader.c (reader): Remove calls to 'output_headers' and
2834 'output_trailers'. Remove some C output.
2835 (readgram): Disable a piece of code that was writing a default
2836 definition for 'YYSTYPE'.
2837 (reader_output_yylsp): Remove.
2838 (packsymbols): Output token defintions to a macro.
2839 (copy_definition): Disable C output.
2841 * src/reader.c (parse_macro_decl): New function used to parse macro
2843 (copy_string2): Put the body of copy_string into this new function.
2844 Add a parameter to let the caller choose whether he wants to copy the
2845 string delimiters or not.
2846 (copy_string): Be a simple call to copy_string2 with the last argument
2848 (read_declarations): Add case for macro definition.
2849 (copy_identifier): New.
2850 (parse_macro_decl): Read macro identifiers using copy_identifier
2853 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2855 * src/output.c (prepare): Add prefixed names.
2856 (output_parser): Output semantic actions.
2857 (output_parser): Fix bug on '%%line' directives.
2859 * src/output.c (output_headers): Remove. The C code printed by this
2860 function should now be in the skeletons.
2861 (output_trailers): Remove.
2862 (output): Disable call to 'reader_output_yylsp'.
2863 (output_rule_data): Do not output tables to the table obstack.
2865 * src/output.c: Remove some C dedicated output.
2866 Improve the use of macro and output obstacks.
2867 (output_defines): Remove.
2869 * src/output.c (output_token_translations): Associate 'translate'
2870 table with a macro. No output to the table obstack.
2871 (output_gram): Same for 'rhs' and 'prhs'.
2872 (output_stos): Same for 'stos'.
2873 (output_rule_data): Same for 'r1' and 'r2'.
2874 (token_actions): Same for 'defact'.
2875 (goto_actions): Same for 'defgoto'.
2876 (output_base): Same for 'pact' and 'pgoto'.
2877 (output_table): Same for 'table'.
2878 (output_check): Same for 'check'.
2880 * src/output.c (output_table_data): New function.
2881 (output_short_table): Remove.
2882 (output_short_or_char_table): Remove.
2884 * src/output.c (output_parser): Replace most of the skeleton copy code
2885 with something new. Skeletons are now processed character by character
2886 rather than line by line, and Bison looks for '%%' macros. This is the
2887 first step in making Bison's output process (a lot) more flexible.
2888 (output_parser): Use the macro table.
2890 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2892 * src/main.c (main): Initialize the macro table.
2894 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2896 * src/lex.c (percent_table): Add tok_define.
2897 * src/lex.h: Add tok_define.
2899 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2901 * src/macrotab.c: New file.
2902 * src/macrotab.h: New file.
2903 * src/Makefile.am: Update.
2905 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
2907 * lib/hash.c: New file.
2908 * lib/hash.h: New file.
2909 * lib/Makefile.am: Update.
2911 2001-08-15 Akim Demaille <akim@epita.fr>
2915 2001-08-15 Marc Autret <autret_m@epita.fr>
2917 * src/reader.c (readgram): Indent output macro YYSTYPE.
2918 (packsymbols): Likewise.
2919 (output_token_defines): Likewise.
2920 * src/files.c: Standardize.
2921 (compute_header_macro): New.
2922 (defines_obstack_save): New. Use compute_header_macro.
2923 (output_files): Update. Use defines_obstack_save.
2925 2001-08-15 Akim Demaille <akim@epita.fr>
2927 * doc/bison.texinfo (Table of Symbols): Document
2930 2001-08-15 Akim Demaille <akim@epita.fr>
2932 * missing: Update from CVS Automake.
2933 * config/config.guess, config/config.sub, config/texinfo.tex:
2934 Update from gnu.org.
2936 2001-08-15 Akim Demaille <akim@epita.fr>
2938 * Makefile.maint: Sync with CVS Autoconf.
2940 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
2942 * doc/bison.texinfo: Include GNU Free Documentation License from
2944 * doc/fdl.texi: Add to package.
2946 2001-08-14 Marc Autret <autret_m@epita.fr>
2948 Turn on %{source,header}_extension features.
2950 * src/lex.c (percent_table): Un-CPP out header_extension and
2952 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
2953 (compute_exts_from_src): Remove conditions. It restores priorities
2956 2001-08-14 Marc Autret <autret_m@epita.fr>
2958 * src/files.c (compute_base_names): Add extensions computing when
2959 `--file-prefix' used.
2960 Standardize function calls.
2962 2001-08-13 Marc Autret <autret_m@epita.fr>
2964 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
2965 defining it (defined but null disables alloca).
2967 2001-08-13 Marc Autret <autret_m@epita.fr>
2969 * src/bison.simple (_yy_memcpy): CPP reformat.
2971 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
2973 * tests/atconfig.in (CPPFLAGS): Fix.
2975 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
2977 * doc/bison.texinfo: Include GNU General Public License from
2979 * doc/gpl.texi: Add to package.
2981 2001-08-10 Marc Autret <autret_m@epita.fr>
2983 * src/print_graph.h: Fix.
2984 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
2986 2001-08-10 Akim Demaille <akim@epita.fr>
2988 * src/system.h: Provide default declarations for stpcpy, strndup,
2991 2001-08-10 Robert Anisko <anisko_r@epita.fr>
2993 * doc/bison.texinfo (Locations): Update @$ stuff.
2995 2001-08-09 Robert Anisko <anisko_r@epita.fr>
2997 * src/bison.simple (YYLLOC_DEFAULT): Update.
3000 2001-08-08 Marc Autret <autret_m@epita.fr>
3002 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3003 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3004 Reported by Fabrice Bauzac.
3006 2001-08-08 Marc Autret <autret_m@epita.fr>
3008 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3009 * src/vcg.c (output_node): Fix.
3010 * src/vcg.h: Cleanup.
3011 * src/print_graph.c: Add comments.
3012 (node_output_size): New global variable. Simplify the formatting of
3013 the VCG graph output.
3014 (print_actions): Unused code is now used. It notifies the final state
3015 and no action states in the VCG graph. It also give the reduce actions.
3016 The `shift and goto' edges are red and the `go to state' edges are
3018 Get the current node name and node_obstack by argument.
3019 (node_obstack): New variable.
3020 (print_state): Manage node_obstack.
3021 (print_core): Use node_obstack given by argument.
3022 A node is not only computed here but in print_actions also.
3023 (print_graph): CPP out useless code instead of commenting it.
3025 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3027 * tests/atconfig.in (CPPFLAGS): Fix.
3029 2001-08-07 Akim Demaille <akim@epita.fr>
3031 * src/print_graph.c (quote): New.
3032 (print_core): Use it.
3034 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3036 * src/vcg.c (complain.h): Include it.
3037 Unepitaize `return' invocations.
3038 [NDEBUG] (main): Remove.
3039 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3040 * src/files.c (open_files): Initialize graph_obstack.
3041 * src/print_graph.c (print_actions): CPP out useless code.
3042 (print_core): Don't output the last `\n' in labels.
3044 * src/files.c (output_files): Output the VCG file.
3045 * src/main.c (main): Invoke print_graph ();
3047 2001-08-06 Marc Autret <autret_m@epita.fr>
3049 Automaton VCG graph output.
3050 Using option ``-g'' or long option ``--graph'', you can generate
3051 a gram_filename.vcg file containing a VCG description of the LALR (1)
3052 automaton of your grammar.
3054 * src/main.c: Call to print_graph() function.
3055 * src/getargs.h: Update.
3056 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3057 (graph_flag): New flag.
3059 (getargs): Add case `g'.
3060 * src/files.c (graph_obstack): New obstack struct.
3061 (open_files): Initialize new obstack.
3062 (output_files): Saves graph_obstack if required.
3063 * src/files.h (graph_obstack): New extern declaration.
3064 * src/Makefile.am: Add new source files.
3066 2001-08-06 Marc Autret <autret_m@epita.fr>
3068 * src/print_graph.c, src/print_graph.h (graph): New.
3069 * src/vcg.h: New file.
3070 * src/vcg.c: New file, VCG graph handling.
3072 2001-08-06 Marc Autret <autret_m@epita.fr>
3074 Add of %source_extension and %header_extension which specify
3075 the source or/and the header output file extension.
3077 * src/files.c (compute_base_names): Remove initialisation of
3078 src_extension and header_extension.
3079 (compute_exts_from_gf): Update.
3080 (compute_exts_from_src): Update.
3081 (output_files): Update.
3082 * src/reader.c (parse_header_extension_decl): New.
3083 (parse_source_extension_decl): New.
3084 (read_declarations): New case statements for the new tokens.
3085 * src/lex.c (percent_table): Add entries for %source_extension
3086 and %header_extension.
3087 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3089 2001-08-06 Marc Autret <autret_m@epita.fr>
3091 * configure.in: Bump to 1.28c.
3092 * doc/bison.texinfo: Texinfo thingies.
3094 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3096 * tests/atconfig.in (CPPFLAGS): Add.
3097 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3099 2001-08-03 Akim Demaille <akim@epita.fr>
3103 2001-08-03 Akim Demaille <akim@epita.fr>
3105 * tests/Makefile.am (check-local): Ship testsuite.
3106 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3109 2001-08-03 Akim Demaille <akim@epita.fr>
3111 * configure.in: Try using -Wformat when compiling.
3113 2001-08-03 Akim Demaille <akim@epita.fr>
3115 * configure.in: Bump to 1.28b.
3117 2001-08-03 Akim Demaille <akim@epita.fr>
3119 * src/complain.c: Adjust strerror_r portability issues.
3121 2001-08-03 Akim Demaille <akim@epita.fr>
3125 2001-08-03 Akim Demaille <akim@epita.fr>
3127 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3128 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3129 * src/getargs.c: Include complain.h.
3130 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3131 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3133 2001-08-03 Akim Demaille <akim@epita.fr>
3135 * src/reader.c (readgram): Display hidden chars in error messages.
3137 2001-08-03 Akim Demaille <akim@epita.fr>
3139 Update to gettext 0.10.39.
3141 2001-08-03 Akim Demaille <akim@epita.fr>
3143 * lib/strspn.c: New.
3145 2001-08-01 Marc Autret <autret_m@epita.fr>
3147 * doc/bison.texinfo: Update.
3148 * doc/bison.1 (mandoc): Update.
3149 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3150 * src/files.c: Support output files extensions computing.
3151 (src_extension): New static variable.
3152 (header_extension): New static variable.
3154 (get_extension_index): New function, gets the index of an extension
3155 filename in a string.
3156 (compute_exts_from_gf): New function, computes extensions from the
3157 grammar file extension.
3158 (compute_exts_from_src): New functions, computes extensions from the
3159 C source file extension, file given by ``-o'' option.
3160 (compute_base_names): Update.
3161 (output_files): Update.
3163 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3165 * doc/bison.texi: Document @$.
3166 (Locations): New section.
3168 2001-07-18 Akim Demaille <akim@epita.fr>
3170 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3171 * config/prev-version.txt, config/move-if-change: New.
3172 * Makefile.am: Adjust.
3174 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3176 * src/bison.simple (yyparse): Suppress warning `comparaison
3177 between signed and unsigned'.
3179 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3181 * src/getargs.h (raw_flag): Remove.
3182 * src/getargs.c: Die on `-r'/`--raw'.
3183 * src/lex.c (parse_percent_token): Die on `%raw'.
3184 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3185 * tests/calc.at: Suppress test with option `--raw'.
3187 2001-07-14 Akim Demaille <akim@epita.fr>
3190 * configure.in: Require Autoconf 2.50.
3191 Update to gettext 0.10.38.
3193 2001-03-16 Akim Demaille <akim@epita.fr>
3195 * doc/bison.texinfo: ANSIfy the examples.
3197 2001-03-16 Akim Demaille <akim@epita.fr>
3199 * getargs.c (skeleton): New variable.
3200 (longopts): --skeleton is a new option.
3201 (shortopts, getargs): -S is a new option.
3202 * getargs.h: Declare skeleton.
3203 * output.c (output_parser): Use it.
3205 2001-03-16 Akim Demaille <akim@epita.fr>
3207 * m4/strerror_r.m4: New.
3208 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3209 * lib/error.h, lib/error.c: Update.
3211 2001-03-16 Akim Demaille <akim@epita.fr>
3213 * src/getargs.c (longopts): Clean up.
3215 2001-02-21 Akim Demaille <akim@epita.fr>
3217 * src/reader.c (gensym): `gensym_count' is your own.
3218 Use a static buf to create the symbol name, as token_buffer is no
3221 2001-02-08 Akim Demaille <akim@epita.fr>
3223 * src/conflicts.c (conflict_report): Be sure not to append to res
3224 between two calls, which could happen if both first sprintf were
3225 skipped, but not the first cp += strlen.
3227 2001-02-08 Akim Demaille <akim@epita.fr>
3229 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3230 New, from fileutils 4.0.37.
3231 * configure.in: Require Autoconf 2.49c. I took some time before
3232 making this decision. This is the only way out for portability
3233 issues in Bison, it would mean way too much duplicate effort to
3234 import in Bison features implemented in 2.49c since 2.13.
3235 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3237 2001-02-02 Akim Demaille <akim@epita.fr>
3239 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3240 * lib/xalloc.h, lib/xmalloc.c: Update.
3242 2001-01-19 Akim Demaille <akim@epita.fr>
3244 Get rid of the ad hoc handling of token_buffer in the scanner: use
3247 * src/lex.c (token_obstack): New.
3248 (init_lex): Initialize it. No longer call...
3249 (grow_token_buffer): this. Remove it.
3250 Adjust all the places which used it to use the obstack.
3252 2001-01-19 Akim Demaille <akim@epita.fr>
3254 * src/lex.h: Rename all the tokens:
3255 s/\bENDFILE\b/tok_eof/g;
3256 s/\bIDENTIFIER\b/tok_identifier/g;
3258 Let them be enums, not #define, to ease debugging.
3259 Adjust all the code.
3261 2001-01-18 Akim Demaille <akim@epita.fr>
3263 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3264 * src/lex.c (maxtoken, grow_token_buffer): Static.
3266 2001-01-18 Akim Demaille <akim@epita.fr>
3268 Since we now use obstacks, more % directives can be enabled.
3270 * src/lex.c (percent_table): Also accept `%yacc',
3271 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3273 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3274 instead of returning a token.
3275 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3276 * src/reader.c (read_declarations): Adjust.
3277 * src/files.c (open_files): Don't call `compute_base_names', don't
3278 compute `attrsfile' since they depend upon data which might be
3279 *in* the input file now.
3280 (output_files): Do it here.
3281 * src/output.c (output_headers): Document the fact that this patch
3282 introduces a guaranteed SEGV for semantic parsers.
3283 * doc/bison.texinfo: Document them.
3284 * tests/suite.at: Exercise these %options.
3286 2000-12-20 Akim Demaille <akim@epita.fr>
3288 Also handle the output file (--verbose) with obstacks.
3290 * files.c (foutput): Remove.
3291 (output_obstack): New.
3292 Adjust all dependencies.
3293 * src/conflicts.c: Return a string.
3294 * src/system.h (obstack_grow_string): Rename as...
3295 (obstack_sgrow): this. Be ready to work with non literals.
3296 (obstack_fgrow4): New.
3298 2000-12-20 Akim Demaille <akim@epita.fr>
3300 * src/files.c (open_files): Fix the computation of short_base_name
3301 in the case of `-o foo.tab.c'.
3303 2000-12-20 Akim Demaille <akim@epita.fr>
3305 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3306 (copy_dollar): Now that everything uses obstacks, get rid of the
3309 2000-12-20 Akim Demaille <akim@epita.fr>
3311 * src/files.c (open_files): Actually the `.output' file is based
3312 on the short_base_name, not base_name.
3313 * tests/suite.at (Checking output file names): Adjust.
3315 2000-12-20 Akim Demaille <akim@epita.fr>
3317 * src/bison.s1: Remove, we now use directly...
3318 * src/bison.simple: this.
3319 * src/Makefile.am: Use pkgdata instead of data.
3321 2000-12-20 Akim Demaille <akim@epita.fr>
3323 * src/files.c (guard_obstack): New.
3324 (open_files): Initialize it.
3325 (output_files): Dump it...
3326 * src/files.h: Export it.
3327 * src/reader.c (copy_guard): Use it.
3329 2000-12-19 Akim Demaille <akim@epita.fr>
3331 * src/files.c (outfile, defsfile, actfile): Removed as global
3333 (open_files): Don't compute them.
3334 (output_files): Adjust.
3335 (base_name, short_base_name): Be global.
3336 Adjust dependencies.
3338 2000-12-19 Akim Demaille <akim@epita.fr>
3340 * src/files.c (strsuffix): New.
3341 (stringappend): Be just like strcat but allocate.
3342 (base_names): Eve out from open_files.
3343 Try to simplify the rather hairy computation of base_name and
3345 (open_files): Use it.
3346 * tests/suite.at (Checking output file names): New test.
3348 2000-12-19 Akim Demaille <akim@epita.fr>
3350 * src/system.h (obstack_grow_literal_string): Rename as...
3351 (obstack_grow_string): this.
3352 * src/output.c (output_parser): Recognize `%% actions' instead of
3354 * src/bison.s1: s/$/%% actions/.
3355 * src/bison.hairy: Likewise.
3357 2000-12-19 Akim Demaille <akim@epita.fr>
3359 * src/output.c (output_parser): Compute the `#line' lines when
3361 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3362 Suggested by Hans Aberg.
3364 2000-12-19 Akim Demaille <akim@epita.fr>
3366 Let the handling of the skeleton files be local to the procedures
3369 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3371 (fparser, open_extra_files): Remove.
3372 (open_files, output_files): Don't take care of fparser.
3373 * src/files.h: Adjust.
3374 * src/output.c (output_parser): Open and close the file to the
3376 * src/reader.c (read_declarations): When %semantic_parser, open
3379 2000-12-19 Akim Demaille <akim@epita.fr>
3381 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3382 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3384 2000-12-19 Akim Demaille <akim@epita.fr>
3386 * src/files.c (open_files): Yipee! We no longer need all the code
3387 looking for `/tmp' since we have no tmp file.
3389 2000-12-19 Akim Demaille <akim@epita.fr>
3391 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
3393 * src/files.c (open_files): Less dependency on MSDOS etc.
3395 2000-12-14 Akim Demaille <akim@epita.fr>
3397 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
3398 Provide a default definition.
3399 Use it when executing the default @ action.
3400 * src/reader.c (reader_output_yylsp): No longer include
3401 `timestamp' and `text' in the default YYLTYPE.
3403 2000-12-12 Akim Demaille <akim@epita.fr>
3405 * src/reader.c (copy_definition, parse_union_decl, copy_action)
3406 (copy_guard): Quote the file names.
3407 Reported by Laurent Mascherpa.
3409 2000-12-12 Akim Demaille <akim@epita.fr>
3411 * src/output.c (output_headers, output_program, output): Be sure
3412 to escape special characters when outputting filenames.
3413 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
3414 (output_headers): Don't depend on them, Use ACTSTR.
3416 2000-11-17 Akim Demaille <akim@epita.fr>
3418 * lib/obstack.h: Formatting changes.
3419 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
3420 prevents type checking.
3421 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3422 cast the value to (void *): assigning a `foo *' to a `void *'
3424 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3425 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
3428 2000-11-17 Akim Demaille <akim@epita.fr>
3430 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
3432 (suite.m4, regression.m4, calc.m4): these.
3433 * tests/atgeneral.m4: Update from CVS Autoconf.
3435 2000-11-17 Akim Demaille <akim@epita.fr>
3437 * tests/regression.m4 (%union and --defines): New test,
3438 demonstrating a current bug in the obstack implementation.
3440 2000-11-17 Akim Demaille <akim@epita.fr>
3442 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
3444 Use them to declare the variables which are global or local to
3447 2000-11-17 Akim Demaille <akim@epita.fr>
3449 * acconfig.h: Remove, no longer used.
3451 2000-11-07 Akim Demaille <akim@epita.fr>
3453 * src: s/Copyright (C)/Copyright/g.
3455 2000-11-07 Akim Demaille <akim@epita.fr>
3457 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
3459 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
3461 2000-11-07 Akim Demaille <akim@epita.fr>
3463 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
3464 Merge in a single CPP if/else.
3466 2000-11-07 Akim Demaille <akim@epita.fr>
3468 * src/output.c (output): Remove useless variables.
3469 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
3470 argument `data' for consistency with the prototypes.
3472 (obstack_copy, obstack_copy0): Rename the second argument as
3473 `address' for consistency. Qualify it `const'.
3474 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
3475 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
3476 `const' their input argument (`data' or `address').
3477 Adjust the corresponding macros to include `const' in casts.
3479 2000-11-03 Akim Demaille <akim@epita.fr>
3481 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
3482 s/PFILE1/BISON_HAIRY/.
3483 Adjust dependencies.
3485 2000-11-03 Akim Demaille <akim@epita.fr>
3487 For some reason, this was not applied.
3489 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3490 `unlink': it's no longer used.
3492 2000-11-03 Akim Demaille <akim@epita.fr>
3494 * src/files.c (skeleton_find): New function, eved out of...
3495 (open_files, open_extra_files): here.
3497 2000-11-03 Akim Demaille <akim@epita.fr>
3501 * src/files.c (obstack_save): New function.
3502 (done): Rename as...
3503 (output_files): this.
3505 * src/main.c (main): Don't use `atexit' to register `done', since
3506 it no longer has to remove tmp files, just call `output_files'
3507 when there are no errors.
3509 2000-11-02 Akim Demaille <akim@epita.fr>
3511 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
3512 `unlink': it's no longer used.
3513 * src/files.h: Formatting changes.
3515 2000-11-02 Akim Demaille <akim@epita.fr>
3517 Remove the last uses of mktemp and unlink/delete.
3519 * src/files.c (fdefines, ftable): Removed.
3520 (defines_ostack, table_obstack): New.
3521 Adjust dependencies of the former into uses of the latter.
3522 * src/output.c (output_short_or_char_table, output_short_table):
3523 Convert to using obstacks.
3524 * src/reader.c (copy_comment2): Accept one FILE * and two
3526 (output_token_defines, reader_output_yylsp): Use obstacks.
3527 * src/system.h (obstack_fgrow3): New.
3529 2000-11-01 Akim Demaille <akim@epita.fr>
3531 Change each use of `fattrs' into a use of `attrs_obstack'.
3533 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
3534 * src/files.c (fattrs): Remove.
3535 (attrs_obstack): New.
3536 Adjust all dependencies.
3537 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
3539 2000-11-01 Akim Demaille <akim@epita.fr>
3542 Change each use of `faction' into a use of `action_obstack'.
3544 * lib/obstack.h, lib/obstack.c: New files.
3545 * src/files.c (faction): Remove.
3546 (action_obstack): New.
3547 Adjust all dependencies.
3549 2000-10-20 Akim Demaille <akim@epita.fr>
3551 * lib/quote.h (PARAMS): New macro. Use it.
3553 2000-10-16 Akim Demaille <akim@epita.fr>
3555 * src/output.c (output_short_or_char_table): New function.
3556 (output_short_table, output_token_translations): Use it.
3557 (goto_actions): Use output_short_table.
3559 2000-10-16 Akim Demaille <akim@epita.fr>
3561 * src/symtab.c (bucket_new): New function.
3564 * src/output.c (output_short_table): New argument to display the
3565 comment associated with the table.
3566 Adjust dependencies.
3567 (output_gram): Use it.
3568 (output_rule_data): Nicer output layout for YYTNAME.
3570 2000-10-16 Akim Demaille <akim@epita.fr>
3572 * src/lex.c (read_typename): New function.
3574 * src/reader.c (copy_dollar): Likewise.
3576 2000-10-16 Akim Demaille <akim@epita.fr>
3578 * src/reader.c (copy_comment2): Expect the input stream to be on
3579 the `/' which is suspected to open a comment, instead of being
3580 called after `//' or `/*' was read.
3581 (copy_comment, copy_definition, parse_union_decl, copy_action)
3582 (copy_guard): Adjust.
3584 2000-10-16 Akim Demaille <akim@epita.fr>
3586 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
3587 `read_signed_integer'.
3589 2000-10-16 Akim Demaille <akim@epita.fr>
3591 * src/reader.c (copy_dollar): New function.
3592 (copy_guard, copy_action): Use it.
3594 2000-10-16 Akim Demaille <akim@epita.fr>
3596 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
3597 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
3598 New files, from Fileutils 4.0.27.
3599 * src/main.c (printable_version): Remove.
3600 * src/lex.c, src/reader.c: Use `quote'.
3602 2000-10-04 Akim Demaille <akim@epita.fr>
3604 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
3606 2000-10-04 Akim Demaille <akim@epita.fr>
3608 * doc/bison.texinfo: Various typos spotted by Neil Booth.
3610 2000-10-04 Akim Demaille <akim@epita.fr>
3612 When a literal string is used to define two different tokens,
3613 `bison -v' segfaults.
3614 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
3616 * tests/regression.m4: New file.
3617 Include the core of the sample provided by Piotr Gackiewicz.
3618 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
3621 2000-10-04 Akim Demaille <akim@epita.fr>
3623 * src/reader.c (parse_expect_decl): Keep `count' within the size
3627 2000-10-02 Paul Eggert <eggert@twinsun.com>
3629 * bison.s1 (yyparse): Assign the default value
3630 unconditionally, to avoid a GCC warning and make the parser a
3633 2000-10-02 Akim Demaille <akim@epita.fr>
3635 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
3638 2000-10-02 Akim Demaille <akim@epita.fr>
3640 * src/derives.c, src/print.c, src/reduce.c: To ease the
3641 translation, move some `\n' out of the translated strings.
3643 2000-10-02 Akim Demaille <akim@epita.fr>
3645 The location tracking mechanism is precious for parse error
3646 messages. Nevertheless, it is enabled only when `@n' is used in
3647 the grammar, which is a different issue (you can use it in error
3648 message, but not in the grammar per se). Therefore, there should
3649 be another means to enable it.
3651 * src/getargs.c (getargs): Support `--locations'.
3653 * src/getargs.h (locationsflag): Export it.
3654 * src/lex.c (percent_table): Support `%locations'.
3655 * src/reader.c (yylsp_needed): Remove this variable, now replaced
3656 with `locationsflag'.
3657 * doc/bison.texinfo: Document `--locations' and `%locations'.
3659 * tests/calc.m4: Test it.
3661 For regularity of the names, replace each
3662 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
3663 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
3664 In addition replace each `flag' with `_flag'.
3666 2000-10-02 Akim Demaille <akim@epita.fr>
3668 Also test parse error messages, including with YYERROR_VERBOSE.
3670 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
3672 Use it to check the computations.
3673 Use it to check `nonassoc' is honored.
3674 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
3675 `--yyerror-verbose'.
3676 (_AT_CHECK_CALC): Adjust to this option.
3677 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
3679 2000-10-02 Akim Demaille <akim@epita.fr>
3681 Test also `--verbose', `--defines' and `--name-prefix'. Testing
3682 the latter demonstrates a flaw in the handling of non debugging
3683 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
3684 was used in order to simplify:
3700 unfortunately this leads to a CPP conflict when
3701 `--name-prefix=foo' is used since it produces `#define yydebug
3704 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
3705 (YYDPRINTF): New macro.
3707 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
3709 Also test `--verbose', `--defines' and `--name-prefix'.
3711 2000-10-02 Akim Demaille <akim@epita.fr>
3713 Improve the readability of the produced parsers.
3715 * src/bison.s1: Formatting changes.
3716 Improve the comment related to the `$' mark.
3717 (yydefault): Don't fall through to `yyresume': `goto' there.
3718 * src/output.c (output_parser): When the `$' is met, skip the end
3720 New variable, `number_of_dollar_signs', to check there's exactly
3721 one `$' in the parser skeleton.
3723 2000-10-02 Akim Demaille <akim@epita.fr>
3725 * lib/xstrdup.c: New file, from the fileutils.
3726 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
3727 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
3728 instead of strlen + xmalloc + strcpy.
3729 * src/symtab.c (copys): Remove, use xstrdup instead.
3731 2000-10-02 Akim Demaille <akim@epita.fr>
3733 * src/gram.h (associativity): New enum type which replaces the
3734 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
3735 `right_assoc', `left_assoc' and `non_assoc'.
3736 Adjust all dependencies.
3737 * src/reader.c: Formatting changes.
3738 (LTYPESTR): Don't define it, use it as a literal in
3739 `reader_output_yylsp'.
3740 * src/symtab.h (symbol_class): New enum type which replaces the
3741 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
3742 `sunknown', `stoken and `snterm'.
3744 2000-10-02 Akim Demaille <akim@epita.fr>
3746 * src/getargs.c (fixed_outfiles): Rename as...
3747 (yaccflag): for consistency and accuracy.
3748 Adjust dependencies.
3750 2000-10-02 Akim Demaille <akim@epita.fr>
3752 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
3753 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
3754 difficult and introduced a lot of core dump. It turns out that
3755 Bison used an implementation of `xmalloc' based on `calloc', and
3756 at various places it does depend upon the initialization to 0. I
3757 have not tried to isolate the pertinent places, and all the former
3758 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
3759 someone should address this issue.
3761 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
3762 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
3764 Adjust dependencies.
3765 * src/warshall.h: New file.
3768 2000-10-02 Akim Demaille <akim@epita.fr>
3770 Various anti-`extern in *.c' changes.
3772 * src/system.h: Include `assert.h'.
3774 2000-10-02 Akim Demaille <akim@epita.fr>
3776 * src/state.h (nstates, final_state, first_state, first_shift)
3777 (first_reduction): Move their exportation from here...
3778 * src/LR0.h: to here.
3779 Adjust dependencies.
3780 * src/getargs.c (statisticsflag): New variable.
3781 Add support for `--statistics'.
3782 Adjust dependencies.
3784 Remove a lot of now useless `extern' statements in most files.
3786 2000-10-02 Akim Demaille <akim@epita.fr>
3788 * src/LR0.h: New file.
3791 2000-10-02 Akim Demaille <akim@epita.fr>
3793 * src/print.h: New file.
3795 * src/print.c: Formatting and ordering changes.
3796 (verbose, terse): Replace with...
3797 (print_results): this new function.
3798 Adjust dependencies.
3800 2000-10-02 Akim Demaille <akim@epita.fr>
3802 * src/conflicts.c (conflict_report): New function.
3803 (conflict_log, verbose_conflict_log): Replace with...
3804 (print_conflicts): this function.
3805 Adjust dependencies.
3806 * src/conflicts.h: New file.
3807 Propagate its inclusion.
3809 2000-10-02 Akim Demaille <akim@epita.fr>
3811 * src/nullable.h: New file.
3812 Propagate its inclusion.
3813 * src/nullable.c: Formatting changes.
3815 2000-10-02 Akim Demaille <akim@epita.fr>
3817 * src/reduce.h: New file.
3818 Propagate its inclusion.
3819 * src/reduce.c: Topological sort and other formatting changes.
3820 (bool, TRUE, FALSE): Move their definition to...
3821 * src/system.h: here.
3823 2000-10-02 Akim Demaille <akim@epita.fr>
3825 * src/files.c: Formatting changes.
3826 (tryopen, tryclose, openfiles): Rename as...
3827 (xfopen, xfclose, open_files): this.
3828 (stringappend): static.
3829 * src/files.h: Complete the list of exported symbols.
3832 2000-10-02 Akim Demaille <akim@epita.fr>
3834 * src/reader.h: New file.
3835 Propagate its use instead of tedious list of `extern' and
3837 * src/reader.c: Formatting changes, topological sort,
3840 2000-10-02 Akim Demaille <akim@epita.fr>
3842 * src/lex.h: Prototype `lex.c' exported functions.
3843 * src/reader.c: Adjust.
3844 * src/lex.c: Formatting changes.
3845 (safegetc): Rename as...
3848 2000-10-02 Akim Demaille <akim@epita.fr>
3850 * src/lalr.h: New file.
3851 Propagate its inclusion instead of prototypes and `extern'.
3852 * src/lalr.c: Formatting changes, topological sorting etc.
3854 2000-10-02 Akim Demaille <akim@epita.fr>
3856 * src/output.c (token_actions): Introduce a temporary array,
3857 YYDEFACT, that makes it possible for this function to use
3860 2000-10-02 Akim Demaille <akim@epita.fr>
3862 `user_toknums' is output as a `short[]' in `output.c', while it is
3863 defined as a `int[]' in `reader.c'. For consistency with the
3864 other output tables, `user_toknums' is now defined as a table of
3867 * src/reader.c (user_toknums): Be a short table instead of an int
3869 Adjust dependencies.
3871 Factor the short table outputs.
3873 * src/output.c (output_short_table): New function.
3874 * src/output.c (output_gram, output_stos, output_rule_data)
3875 (output_base, output_table, output_check): Use it.
3877 2000-10-02 Akim Demaille <akim@epita.fr>
3879 * src/output.c (output): Topological sort of the functions, in
3880 order to get rid of the `static' prototypes.
3881 No longer use `register'.
3882 * src/output.h: New file.
3883 Propagate its inclusion in files explicitly prototyping functions
3886 2000-09-21 Akim Demaille <akim@epita.fr>
3888 * src/atgeneral.m4: Update from Autoconf.
3890 2000-09-21 Akim Demaille <akim@epita.fr>
3892 * src/closure.h: New file.
3893 * src/closure.c: Formatting changes, topological sort over the
3894 functions, use of closure.h.
3895 (initialize_closure, finalize_closure): Rename as...
3896 (new_closure, free_closure): these. Adjust dependencies.
3897 * src/LR0.c: Formatting changes, topological sort, use of
3899 (initialize_states): Rename as...
3901 * src/Makefile.am (noinst_HEADERS): Adjust.
3903 2000-09-20 Akim Demaille <akim@epita.fr>
3905 * src/acconfig.h: Don't protect config.h against multiple
3907 Don't define PARAMS.
3908 * src/system.h: Define PARAMS.
3909 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
3910 purpose of config.h. system.h must not try to fix wrong
3911 definitions in config.h.
3913 2000-09-20 Akim Demaille <akim@epita.fr>
3915 * src/derives.h: New file.
3916 * src/main.c, src/derives.h: Use it.
3918 * src/Makefile.am (noinst_HEADERS): Adjust.
3920 2000-09-20 Akim Demaille <akim@epita.fr>
3922 * tests/atgeneral.m4: Update from Autoconf.
3923 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
3924 (AT_CHECK_CALC): New macros.
3925 Use these macros to test bison with options `', `--raw',
3926 `--debug', `--yacc', `--yacc --debug'.
3928 2000-09-19 Akim Demaille <akim@epita.fr>
3930 * src/output.c: Formatting changes.
3931 * src/machine.h: Remove, leaving its contents in...
3932 * src/system.h: here.
3934 Adjust all dependencies on stdio.h and machine.h.
3935 * src/getargs.h: New file.
3936 Let all `extern' declarations about getargs.c be replaced with
3937 inclusion of `getargs.h'.
3938 * src/Makefile.am (noinst_HEADERS): Adjust.
3940 * tests/calc.m4 (yyin): Be initialized in main, not on the global
3942 (yyerror): Returns void, not int.
3943 * doc/bison.texinfo: Formatting changes.
3945 2000-09-19 Akim Demaille <akim@epita.fr>
3947 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
3950 2000-09-18 Akim Demaille <akim@epita.fr>
3952 * configure.in: Append WARNING_CFLAGS to CFLAGS.
3953 * src/Makefile.am (INCLUDES): Don't.
3954 Be ready to fetch headers in lib/.
3956 2000-09-18 Akim Demaille <akim@epita.fr>
3958 * doc/bison.texinfo: Update the copyright.
3959 ANSIfy and GNUify the examples.
3960 Remove the old menu.
3962 2000-09-18 Akim Demaille <akim@epita.fr>
3964 First set of tests: use the `calc' example from the documentation.
3966 * src/bison.s1 (yyparse): Condition the code using `yytname' which
3967 is defined only when YYDEBUG is.
3968 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
3969 * src/files.c (tryopen, tryclose): Formatting changes.
3970 Move to the top and be static.
3971 * src/reader.c (read_signed_integer): Likewise.
3972 * tests/calc.m4: New file.
3973 * Makefile.am, suite.m4: Adjust.
3974 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
3976 2000-09-18 Akim Demaille <akim@epita.fr>
3978 Add support for an Autotest test suite for Bison.
3980 * m4/m4.m4, m4/atconfig.m4: New files.
3981 * m4/Makefile.am (EXTRA_DIST): Adjust.
3982 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
3984 * src/getargs.c: Display a more standard --version message.
3985 * src/reader.c (reader): Formatting changes.
3986 No longer depend upon VERSION_STRING.
3987 * configure.in: No longer use `dnl'.
3988 Set up the test suite and the new directory `tests/.
3989 (VERSION_STRING): Remove.
3991 2000-04-14 Akim Demaille <akim@epita.fr>
3993 * src/reader.c (copy_comment2): New function, same as former
3994 `copy_comment', but outputs into two FILE *.
3995 (copy_comment): Use it.
3996 (parse_union_decl): Use it.
3997 (get_type, parse_start_decl): Use the same `invalid' message.
3998 (parse_start_decl, parse_union_decl): Use the same `multiple'
4000 (parse_union_decl, copy_guard, copy_action): Use the same
4001 `unmatched' message.
4002 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4004 2000-03-31 Akim Demaille <akim@epita.fr>
4006 * src/files.c (tryopen, tryclose): Move to the top.
4009 2000-03-31 Akim Demaille <akim@epita.fr>
4011 * src/main.c (main): Don't call `done', exit does it.
4013 2000-03-31 Akim Demaille <akim@epita.fr>
4015 * allocate.c: s/return (foo)/return foo/.
4018 * output.c: Likewise.
4019 * reader.c: Likewise.
4020 * symtab.c: Likewise.
4021 * vmsgetargs.c: Likewise.
4023 2000-03-31 Akim Demaille <akim@epita.fr>
4025 Clean up the error reporting functions.
4027 * src/report.c: New file.
4028 * src/report.h: Likewise.
4029 * src/Makefile.am: Adjust.
4030 * m4/error.m4: New file.
4031 * m4/Makefile.am: Adjust.
4032 * configure.in (jm_PREREQ_ERROR): Call it.
4033 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4035 (fatal, fatals): Remove. All callers use complain.c::fatal.
4036 (warn, warni, warns, warnss, warnss): Remove. All callers use
4037 complain.c::complain.
4038 (toomany): Remove, use fatal instead.
4039 * src/files.c (done): No argument, use complain_message_count.
4040 * src/main.c (main): Register `done' to `atexit'.
4042 * src/getargs.c (usage): More `fputs', less `fprintf'.
4044 2000-03-28 Akim Demaille <akim@epita.fr>
4046 * lib/: New directory.
4047 * Makefile.am (SUBDIRS): Adjust.
4048 * configure.in: Adjust.
4049 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4051 * src/alloca.c: Moved to lib/.
4052 * src/getopt.c: Likewise.
4053 * src/getopt1.c: Likewise.
4054 * src/getopt.h: Likewise.
4055 * src/ansi2knr.c: Likewise.
4056 * src/ansi2knr.1: Likewise.
4057 * src/Makefile.am: Adjust.
4058 * lib/Makefile.am: New file.
4060 2000-03-28 Akim Demaille <akim@epita.fr>
4062 * src/getargs.c (usage): Refresh the help message.
4064 2000-03-17 Akim Demaille <akim@epita.fr>
4066 * src/getopt1.c: Updated from textutils 2.0e
4067 * src/getopt.c: Likewise.
4068 * src/getopt.h: Likewise.
4070 2000-03-17 Akim Demaille <akim@epita.fr>
4072 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4073 the file name, not the whole `#line LINE FILE'.
4075 2000-03-17 Akim Demaille <akim@epita.fr>
4077 On syntax errors, report the token on which we choked.
4079 * src/bison.s1 (yyparse): In the label yyerrlab, when
4080 YYERROR_VERBOSE, add yychar in msg.
4082 2000-03-17 Akim Demaille <akim@epita.fr>
4084 * src/reader.c (copy_at): New function.
4085 (copy_guard): Use it.
4086 (copy_action): Use it.
4088 2000-03-17 Akim Demaille <akim@epita.fr>
4090 Be kind to translators, save some useless translations.
4092 * src/main.c (banner): New function.
4093 (fatal_banner): Use it.
4094 (warn_banner): Use it.
4096 2000-03-17 Akim Demaille <akim@epita.fr>
4098 * src/reader.c (copy_definition): Use copy_string and
4099 copy_comment. Removed now unused `match', `ended',
4101 (copy_comment, copy_string): Moved, to be visible from
4104 2000-03-17 Akim Demaille <akim@epita.fr>
4106 * src/reader.c (copy_string): Declare `static inline'. No
4107 problems with inline, since it is checked by configure.
4108 (copy_comment): Likewise.
4110 2000-03-17 Akim Demaille <akim@epita.fr>
4112 * src/reader.c (packsymbols): Formatting changes.
4114 2000-03-17 Akim Demaille <akim@epita.fr>
4116 * src/reader.c (copy_comment): New function, factored out from:
4117 (copy_action): Use it. Removed now unused `match', `ended',
4119 (copy_guard): Likewise.
4121 2000-03-17 Akim Demaille <akim@epita.fr>
4123 * src/reader.c (copy_string): New function, factored out from:
4124 (copy_action): Use it.
4125 (copy_guard): Likewise.
4127 2000-03-17 Akim Demaille <akim@epita.fr>
4129 Change the handling of @s so that they behave exactly like $s.
4130 There is now a pseudo variable @$ (readble and writable), location
4131 of the lhs of the rule (by default ranging from the location of
4132 the first symbol of the rhs, to the location of the last symbol,
4133 or, if the rhs is empty, YYLLOC).
4135 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4137 (yyparse): When providing a default semantic action, provide a
4138 default location action.
4139 (after the $): No longer change `*YYLSP', just stack YYLOC the
4140 same way you stack YYVAL.
4141 * src/reader.c (read_declarations): Use warns.
4142 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4143 (copy_action, case '@'): Likewise.
4144 Use a standard error message, to save useless work from
4147 2000-03-17 Akim Demaille <akim@epita.fr>
4149 * src/bison.s1: Formatting and cosmetics changes.
4150 * src/reader.c: Likewise.
4151 Update the Copyright notice.
4153 2000-03-17 Akim Demaille <akim@epita.fr>
4155 * src/bison.s1 (#line): All set to `#line' only, since the
4156 Makefile now handles them.
4158 2000-03-16 Akim Demaille <akim@epita.fr>
4160 * src/output.c (output_rule_data): Output the documentation of
4162 (Copyright notice): Update.
4165 2000-03-16 Akim Demaille <akim@epita.fr>
4167 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4168 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4169 One `#if YYDEBUG' remains, since it uses variables which are
4170 defined only if `YYDEBUG != 0'.
4172 2000-03-16 Akim Demaille <akim@epita.fr>
4174 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4175 and related variables so that the similarities are highlighted.
4177 2000-03-16 Akim Demaille <akim@epita.fr>
4179 * src/bison.s1: Properly indent CPP directives.
4181 2000-03-16 Akim Demaille <akim@epita.fr>
4183 * src/bison.s1: Properly indent the `alloca' CPP section.
4185 2000-03-16 Akim Demaille <akim@epita.fr>
4187 Do not hard code values of directories in `configure.in'.
4188 Update the `configure' tool chain.
4190 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4192 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4193 (AC_OUTPUT): Add m4/Makefile.
4194 Bump to bison 1.28a, 1.29 has never been released.
4195 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4196 handled via src/Makefile.am.
4197 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4198 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4200 * Makefile.am (SUBDIRS): Add m4.
4201 (ACLOCAL_AM_FLAGS): New variable.
4202 (AUTOMAKE_OPTIONS): Add check-news.
4203 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4204 the proper line number and file name.
4205 (DEFS): Propagate the location of bison library files and of the
4207 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4209 * acinclude.m4: Remove, replaced by the directory m4.
4210 * m4/Makefile.am (EXTRA_DIST): New variable.
4211 * m4/gettext.m4: New file, from the fileutils.
4212 * m4/lcmessage.m4: Likewise
4213 * m4/progtest.m4: Likewise.
4214 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4216 2000-03-10 Akim Demaille <akim@epita.fr>
4219 Formatting changes of various comments.
4220 Respect the GNU coding standards at various places.
4221 Don't use `_()' when no translation is needed.
4223 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4226 OS/2 honors TMPDIR environment variable.
4228 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4230 * doc/bison.texinfo: Tweaked spelling and grammar.
4232 Removed reference to price of printed copy.
4233 Mention BISON_SIMPLE and BISON_HAIRY.
4235 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4237 * configure.in, NEWS:
4238 Bison 1.29 released.
4240 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4242 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4243 Added reference card.
4245 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4247 * po/ru.po: Added Russian translation.
4249 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4251 * configure.in: Added Russian translation.
4253 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4255 * configure.in, NEWS, README:
4256 Released version 1.28.
4258 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4261 Squashed redefinition warning on some systems.
4263 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4264 Have configure build version string instead of relying on ANSI string
4267 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4269 * po/POTFILES.in: Got rid of version.c.
4271 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4273 * acconfig.h, configure.in:
4274 Have configure build version string instead of relying on ANSI string
4277 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4280 Dropped mention of `+' for long-named options.
4282 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4284 * src/files.c: Added <unistd.h> for unlink().
4286 * src/Makefile.am, src/system.h:
4289 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4291 * README: Added a FAQ list.
4293 * configure.in, acconfig.h:
4296 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4298 * doc/FAQ, doc/Makefile.am:
4301 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4303 * src/alloc.h, src/symtab.h, src/version.c:
4304 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4306 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4308 * src/.cvsignore, src/Makefile.am:
4309 Reorganized: sources in `src', documentation in `doc'.
4311 * src/lex.c (literalchar):
4312 fixed the code for escaping double quotes (thanks
4315 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4317 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4318 Adjusted paths to reflect directory reorganization.
4320 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4322 * doc/.cvsignore, doc/Makefile.am:
4323 Reorganized: sources in `src', documentation in `doc'.
4325 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4328 Updated AC_INIT file to reflect directory reorganization.
4330 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4331 Reorganized: sources in `src', documentation in `doc'.
4333 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4336 Don't declare calloc() and realloc() if not necessary.
4338 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4340 * configure.in, acconfig.h, acinclude.m4:
4341 Don't declare calloc() and realloc() if not necessary.
4343 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4345 * po/.cvsignore: Added i18n support.
4347 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4349 * acconfig.h, configure.in, Makefile.am:
4352 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4354 * src/bison.s1: Fixed #line numbers.
4356 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4358 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4359 Added PO files from Translation Project.
4361 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4364 Added support for non-ANSI compilers (ansi2knr).
4366 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4368 * configure.in: Bumped version number to 1.27.
4371 Added `bison.simple' to list of files removed by `make distclean'.
4373 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4375 * src/files.c, src/files.h:
4376 Defined locations of parser files in config.h instead of Makefile.
4378 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4380 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4381 Defined locations of parser files in config.h instead of Makefile.
4383 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4386 Removed inappropriate use of $< macro.
4388 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4390 * po/Makefile.in.in, po/POTFILES.in:
4391 Add `po' directory skeleton.
4393 1999-01-27 Jesse Thilo <jthilo@gnu.org>
4395 * README: Document help-bison list.
4397 * configure.in: Add check for mkstemp().
4399 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4401 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
4402 Hush a few compiler warnings.
4405 Add tryclose(), which verifies that fclose was successful.
4406 Hush a couple of compiler warnings.
4408 1999-01-20 Jesse Thilo <jthilo@gnu.org>
4410 * Makefile.am, OChangeLog:
4411 ChangeLog is now automatically generated. Include the old version as
4414 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4416 * 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:
4419 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4421 * doc/bison.texinfo: Fix formatting glitch.
4423 * doc/bison.texinfo: Update FSF address.
4425 1999-01-14 Jesse Thilo <jthilo@gnu.org>
4427 * acconfig.h: Update FSF address.
4429 1999-01-08 Jesse Thilo <jthilo@gnu.org>
4432 Don't define PACKAGE here, since config.h defines it.
4434 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4436 * src/reader.c: Update copyright date.
4439 Ditch sprintf to statically-sized buffers in fatal/warn functions in
4440 favor of output directly to stderr (avoids buffer overruns).
4442 * src/reader.c: Some checks for premature EOF.
4444 * 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:
4445 Use prototypes if the compiler understands them.
4447 * src/files.c: Honor TMPDIR on Unix hosts.
4448 Use prototypes if the compiler understands them.
4451 Fix a couple of buffer overrun bugs.
4452 Use prototypes if the compiler understands them.
4454 * src/system.h: Include unistd.h and ctype.h.
4455 Use #ifdef instead of #if for NLS symbols.
4457 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4459 * doc/bison.texinfo:
4460 Delete comment "consider using @set for edition number, etc..." since
4461 we now are doing so.
4463 1998-12-30 Jesse Thilo <jthilo@gnu.org>
4466 Use prototypes if the compiler understands them.
4468 * NEWS: Document 1.26 highlights.
4470 * Makefile.am: Require Automake 1.3 or later.
4473 Use prototypes if the compiler understands them.
4475 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4478 Use VERSION symbol from automake for version number.
4480 1998-12-29 Jesse Thilo <jthilo@gnu.org>
4482 * acconfig.h, configure.in, version.cin:
4483 Use VERSION symbol from automake for version number.
4485 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4488 Distribute original version of simple parser (bison.s1), not built
4489 version (bison.simple).
4491 1998-11-28 Jesse Thilo <jthilo@gnu.org>
4493 * doc/bison.texinfo: Add info dir entry.
4495 * doc/bison.texinfo:
4496 Let automake put version number into documentation.
4498 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4500 * src/bison.cld, src/build.com, src/vmshlp.mar:
4501 Add non-RCS files from /gd/gnu/bison.
4503 1998-11-26 Jesse Thilo <jthilo@gnu.org>
4506 Document the BISON_HAIRY and BISON_SIMPLE variables.
4508 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4510 * src/version.c: Build version.c automatically.
4513 Fix token numbering (used to start at 258, not 257).
4515 * src/system.h: Include config.h.
4517 * src/getargs.c: Update bug report address.
4519 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
4520 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
4522 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4525 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4527 * configure.in, version.cin:
4528 Build version.c automatically.
4530 * AUTHORS: Add AUTHORS file.
4532 * README: Update bug report address.
4535 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
4537 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
4540 1998-11-25 Jesse Thilo <jthilo@gnu.org>
4542 * doc/bison.texinfo: Clean up some formatting.
4544 1998-05-05 Richard Stallman <rms@gnu.org>
4546 * doc/bison.texinfo:
4547 Explain better why to make a pure parser.
4549 1998-01-05 Richard Stallman <rms@gnu.org>
4551 * src/files.c (openfiles):
4552 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
4553 find a temporary directory, if possible. Do not unlink files while
4556 1997-08-25 Richard Stallman <rms@gnu.org>
4558 * src/reader.c (stack_offset;):
4559 Change some warni to warns.
4561 * src/lex.c (literalchar): Use warns, not warni.
4563 1997-06-28 Richard Stallman <rms@gnu.org>
4565 * src/bison.s1: Add a Bison version comment.
4567 * src/main.c (fatal, warn, berror):
4570 1997-06-28 Richard Stallman <rms@gnu.org>
4572 * Makefile.in (bison_version): New variable.
4573 (dist): Use that variable.
4574 (bison.s1): Substitute the Bison version into bison.simple.
4576 * bison.simple: Add a Bison version comment.
4578 1997-06-18 Richard Stallman <rms@gnu.org>
4580 * src/main.c (fatal, warn, berror):
4581 Make error messages standard.
4582 (toomany): Improve error message text.
4584 * 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:
4585 new.h renamed to alloc.h.
4587 1997-06-18 Richard Stallman <rms@gnu.org>
4589 * Makefile.in: new.h renamed to alloc.h.
4591 1997-05-24 Richard Stallman <rms@gnu.org>
4593 * src/lex.c (literalchar):
4594 Fix the code for escaping \, " and '.
4596 (lex): Avoid trouble when there are many chars
4597 to discard in a char literal with just several chars in it.
4599 1997-05-17 Richard Stallman <rms@gnu.org>
4602 Use malloc, if using alloca is troublesome.
4603 (YYSTACK_USE_ALLOCA): New flag macro.
4604 Define it for some systems and compilers.
4605 (YYSTACK_ALLOC): New macro.
4606 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4607 If it was malloc'd, free it.
4609 1997-05-17 Richard Stallman <rms@gnu.org>
4612 Use malloc, if using alloca is troublesome.
4613 (YYSTACK_USE_ALLOCA): New flag macro.
4614 Define it for some systems and compilers.
4615 (YYSTACK_ALLOC): New macro.
4616 (yyparse): Use YYSTACK_ALLOC to allocate stack.
4617 If it was malloc'd, free it.
4619 1997-04-23 Richard Stallman <rms@gnu.org>
4622 (alloca) [__hpux]: Always define as __builtin_alloca.
4624 1997-04-23 Richard Stallman <rms@gnu.org>
4627 (alloca) [__hpux]: Always define as __builtin_alloca.
4629 1997-04-22 Richard Stallman <rms@gnu.org>
4632 [__hpux]: Include alloca.h (right for HPUX 10)
4633 instead of declaring alloca (right for HPUX 9).
4635 * src/bison.s1 (__yy_memcpy):
4636 Declare arg `count' as unsigned int.
4637 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
4639 1997-04-22 Richard Stallman <rms@gnu.org>
4642 [__hpux]: Include alloca.h (right for HPUX 10)
4643 instead of declaring alloca (right for HPUX 9).
4645 * bison.simple (__yy_memcpy):
4646 Declare arg `count' as unsigned int.
4647 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
4649 1997-01-03 Richard Stallman <rms@gnu.org>
4651 * src/allocate.c: [__STDC__ or _MSC_VER]:
4652 Declare calloc and realloc to return void *.
4654 1997-01-02 Richard Stallman <rms@gnu.org>
4657 [_MSC_VER]: Include stdlib.h and process.h.
4658 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
4660 * src/main.c (main): Return FAILURE as a value.
4661 (printable_version): Declare arg as int, not char.
4663 1997-01-02 Richard Stallman <rms@gnu.org>
4665 * Makefile.in (dist):
4666 Explicitly check for symlinks, and copy them.
4668 1996-12-19 Richard Stallman <rms@gnu.org>
4671 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
4673 1996-12-18 Paul Eggert <eggert@gnu.org>
4675 * src/bison.s1 (yyparse):
4676 If __GNUC__ and YYPARSE_PARAM are both defined,
4677 declare yyparse to have a void * argument.
4679 1996-12-18 Paul Eggert <eggert@gnu.org>
4681 * bison.simple (yyparse):
4682 If __GNUC__ and YYPARSE_PARAM are both defined,
4683 declare yyparse to have a void * argument.
4685 1996-12-17 Richard Stallman <rms@gnu.org>
4687 * src/reduce.c (nbits): Add some casts.
4689 1996-08-12 Richard Stallman <rms@gnu.org>
4691 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
4693 1996-08-12 Richard Stallman <rms@gnu.org>
4695 * bison.simple: Test _MSDOS as well as _MSDOS_.
4697 1996-07-31 Richard Stallman <rms@gnu.org>
4700 [__sun && __i386]: Include alloca.h.
4702 1996-07-31 Richard Stallman <rms@gnu.org>
4705 [__sun && __i386]: Include alloca.h.
4707 1996-07-30 Richard Stallman <rms@gnu.org>
4709 * src/bison.s1: Comment change.
4711 * src/bison.s1: Test _MSDOS_, not MSDOS.
4713 1996-07-30 Richard Stallman <rms@gnu.org>
4715 * bison.simple: Comment change.
4717 * bison.simple: Test _MSDOS_, not MSDOS.
4719 1996-06-01 Richard Stallman <rms@gnu.org>
4721 * 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:
4722 Insert `_' macro around many string constants.
4725 Insert `_' macro around many string constants.
4727 (main): Call setlocale, bindtextdomain and textdomain.
4729 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
4730 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
4731 [ENABLE_NLS]: Include libintl.h.
4732 [ENABLE_NLS] (gettext): Define.
4733 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
4734 (N_, PACKAGE, LOCALEDIR): New macros.
4736 1996-06-01 Richard Stallman <rms@gnu.org>
4738 * POTFILES.in: New file.
4740 * Makefile.in (allocate.o):
4741 Define target explicitly.
4743 * Makefile.in (CFLAGS): Set to @CFLAGS@.
4744 (LDFLAGS): Set to @LDFLAGS@.
4745 (configure): Run autoconf only if preceding `cd' succeeds.
4746 (bison.s1): Redirect output to temporary file then move the
4747 temporary to the target, rather than redirecting directly to bison.s1.
4748 (clean): Remove config.status and config.log.
4749 (distclean): Don't remove config.status here.
4751 1996-05-12 Richard Stallman <rms@gnu.org>
4754 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
4756 1996-05-12 Richard Stallman <rms@gnu.org>
4759 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
4761 1996-05-11 Richard Stallman <rms@gnu.org>
4763 * src/bison.s1 (__yy_memcpy):
4764 Really reorder the args, as was supposedly done on Feb 14 1995.
4765 (yyparse): Calls changed accordingly.
4767 1996-05-11 Richard Stallman <rms@gnu.org>
4769 * Makefile.in (dist): Don't use $(srcdir).
4771 * bison.simple (__yy_memcpy):
4772 Really reorder the args, as was supposedly done on Feb 14 1995.
4773 (yyparse): Calls changed accordingly.
4775 1996-01-27 Richard Stallman <rms@gnu.org>
4777 * src/output.c (output_rule_data):
4778 Test YYERROR_VERBOSE in the conditional
4779 around the definition of ttyname.
4781 1995-12-29 Richard Stallman <rms@gnu.org>
4784 Fix line numbers in #line commands.
4786 1995-12-29 Richard Stallman <rms@gnu.org>
4789 Fix line numbers in #line commands.
4791 1995-12-27 Richard Stallman <rms@gnu.org>
4793 * src/bison.s1 (YYPARSE_PARAM_DECL):
4794 In C++, make it always null.
4795 (YYPARSE_PARAM_ARG): New macro.
4796 (yyparse): Use YYPARSE_PARAM_ARG.
4798 1995-12-27 Richard Stallman <rms@gnu.org>
4800 * bison.simple (YYPARSE_PARAM_DECL):
4801 In C++, make it always null.
4802 (YYPARSE_PARAM_ARG): New macro.
4803 (yyparse): Use YYPARSE_PARAM_ARG.
4805 1995-11-29 Richard Stallman <rms@gnu.org>
4807 * doc/bison.texinfo:
4808 Describe literal string tokens, %raw, %no_lines, %token_table.
4810 1995-11-29 Daniel Hagerty <hag@gnu.org>
4812 * doc/bison.texinfo: Fixed update date
4814 1995-10-16 Richard Stallman <rms@gnu.org>
4816 * src/version.c: Version 1.25.
4818 1995-10-16 Richard Stallman <rms@gnu.org>
4820 * NEWS: *** empty log message ***
4822 1995-10-16 Richard Stallman <rms@gnu.org>
4824 * doc/bison.1, doc/bison.rnh:
4827 1995-10-15 Richard Stallman <rms@gnu.org>
4829 * src/vmsgetargs.c, src/getargs.c:
4830 Added -n, -k, and -raw switches.
4831 (noparserflag, toknumflag, rawtoknumflag): New variables.
4833 * src/symtab.h (SALIAS):
4834 New #define for adding aliases to %token.
4835 (struct bucket): Added `alias' field.
4837 * src/reduce.c (reduce_grammar):
4838 Revise error message.
4839 (print_notices): Remove final `.' from error message.
4841 * src/reader.c (reader_output_yylsp):
4843 (readgram): Use `#if 0' around code that accepted %command
4844 inside grammar rules: The documentation doesn't allow it,
4845 and it will fail since the %command processors scan for the next %.
4846 (parse_token_decl): Extended the %token
4847 declaration to allow a multi-character symbol as an alias.
4848 (parse_thong_decl): New function.
4849 (read_declarations): Added %thong declarations.
4850 (read_declarations): Handle NOOP to deal with allowing
4851 % declarations as another means to specify the flags.
4852 (readgram): Allow %prec prior to semantics embedded in a rule.
4853 (skip_to_char, read_declarations, copy_definition)
4854 (parse_token_decl, parse_start_decl, parse_type_decl)
4855 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
4856 (get_type_name, copy_guard, copy_action, readgram)
4857 (get_type, packsymbols): Revised most error messages.
4858 Changed `fatal' to `warnxxx' to avoid aborting for error.
4859 Revised and use multiple warnxxx functions to avoid using VARARGS1.
4860 (read_declarations): Improve the error message for
4861 an invalid character. Do not abort.
4862 (read_declarations, copy_guard, copy_action): Use
4863 printable_version to avoid unprintable characters in printed output.
4864 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
4865 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
4866 Allow the type of a non-terminal can be given
4867 more than once, as long as all specifications give the same type.
4870 (output_headers, output_trailers, output, output_gram)
4871 (output_rule_data): Implement noparserflag variable.
4872 Implement toknumflag variable.
4873 (output): Call reader_output_yylsp to output LTYPESTR.
4875 * src/main.c (main):
4876 If reader sees an error, don't process the grammar.
4877 (fatals): Updated to not use VARARGS1.
4878 (printable_version, int_to_string, warn, warni, warns, warnss)
4879 (warnsss): New error reporting functions. Avoid abort for error.
4882 Added THONG and NOOP for alias processing.
4883 Added SETOPT for the new code that allows setting options with %flags.
4886 Include getopt.h. Add some extern decls.
4887 (safegetc): New function to deal with EOF gracefully.
4888 (literalchar); new function to deal with reading \ escapes.
4889 (lex): Use literalchar.
4890 (lex): Implemented "..." tokens.
4891 (literalchar, lex, parse_percent_token): Made tokenbuffer
4892 always contain the token. This includes growing the token
4893 buffer while reading an integer.
4894 (parse_percent_token): Replaced if-else statement with percent_table.
4895 (parse_percent_token): Added % declarations as another
4896 way to specify the flags -n, -l, and -r. Also added hooks for
4897 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
4898 major changes to files.c.
4899 (lex) Retain in the incoming stream a character following
4901 (skip_white_space, lex): Revised most error messages
4902 and changed fatal to warn to avoid aborting.
4903 (percent_table): Added %thong declarations.
4905 * src/gram.h: Comment changes.
4907 * src/files.c (openfiles, open_extra_files, done):
4909 and actfile file. Handle noparserflag. Both for -n switch.
4911 * src/conflicts.c (resolve_sr_conflict):
4912 Remove use of alloca.
4914 1995-06-01 Jim Meyering <meyering@gnu.org>
4916 * doc/bison.texinfo: *** empty log message ***
4918 1995-05-06 Richard Stallman <rms@gnu.org>
4920 * src/bison.s1: Comment change.
4922 1995-05-06 Richard Stallman <rms@gnu.org>
4924 * bison.simple: Comment change.
4926 1995-05-03 Richard Stallman <rms@gnu.org>
4928 * src/version.c: Version now 1.24.
4930 * src/bison.s1: Change distribution terms.
4932 * src/version.c: Version now 1.23.
4934 1995-05-03 Richard Stallman <rms@gnu.org>
4936 * doc/bison.texinfo:
4937 Rewrite "Conditions for Using Bison".
4938 Update version to 1.24.
4940 1995-05-03 Richard Stallman <rms@gnu.org>
4942 * bison.simple: Change distribution terms.
4944 1995-02-23 Richard Stallman <rms@gnu.org>
4946 * src/files.c: Test __VMS_POSIX as well as VMS.
4948 1995-02-14 Jim Meyering <meyering@gnu.org>
4950 * src/bison.s1 (__yy_memcpy):
4951 Renamed from __yy_bcopy to avoid
4952 confusion. Reverse FROM and TO arguments to be consistent with
4955 1995-02-14 Jim Meyering <meyering@gnu.org>
4957 * bison.simple (__yy_memcpy):
4958 Renamed from __yy_bcopy to avoid
4959 confusion. Reverse FROM and TO arguments to be consistent with
4962 1994-11-10 David J. MacKenzie <djm@gnu.org>
4968 * Makefile.in (DISTFILES): Include NEWS.
4970 * Makefile.in (DISTFILES):
4971 Include install-sh, not install.sh.
4973 * configure.in: Update to Autoconf v2 macro names.
4975 1994-10-05 David J. MacKenzie <djm@gnu.org>
4977 * Makefile.in: fix typo
4979 * Makefile.in (prefix, exec_prefix):
4980 Let configure set them.
4982 1994-09-28 David J. MacKenzie <djm@gnu.org>
4984 * Makefile.in: Set datadir to $(prefix)/share.
4986 1994-09-15 Richard Stallman <rms@gnu.org>
4989 Update copyright notice and GPL version.
4991 1994-09-15 Richard Stallman <rms@gnu.org>
4994 Update copyright notice and GPL version.
4996 1994-07-12 Richard Stallman <rms@gnu.org>
4998 * src/reduce.c, src/reader.c:
5001 1994-05-05 David J. MacKenzie <djm@gnu.org>
5003 * Makefile.in: entered into RCS
5005 1994-03-26 Richard Stallman <rms@gnu.org>
5007 * src/bison.s1: entered into RCS
5009 1994-03-26 Richard Stallman <rms@gnu.org>
5011 * bison.simple: entered into RCS
5013 1994-03-25 Richard Stallman <rms@gnu.org>
5015 * src/main.c: entered into RCS
5017 1994-03-24 Richard Stallman <rms@gnu.org>
5019 * src/conflicts.c: entered into RCS
5021 1994-01-02 Richard Stallman <rms@gnu.org>
5023 * Makefile.in: *** empty log message ***
5025 1993-11-21 Richard Stallman <rms@gnu.org>
5027 * src/bison.s1: *** empty log message ***
5029 1993-11-21 Richard Stallman <rms@gnu.org>
5031 * doc/bison.texinfo: entered into RCS
5033 * doc/bison.texinfo: *** empty log message ***
5035 1993-11-21 Richard Stallman <rms@gnu.org>
5037 * bison.simple: *** empty log message ***
5039 1993-10-25 David J. MacKenzie <djm@gnu.org>
5041 * doc/bison.texinfo: *** empty log message ***
5043 1993-10-19 Richard Stallman <rms@gnu.org>
5045 * src/bison.s1: *** empty log message ***
5047 1993-10-19 Richard Stallman <rms@gnu.org>
5049 * bison.simple: *** empty log message ***
5051 1993-10-14 Richard Stallman <rms@gnu.org>
5053 * src/bison.s1: *** empty log message ***
5055 1993-10-14 Richard Stallman <rms@gnu.org>
5057 * bison.simple: *** empty log message ***
5059 1993-09-14 David J. MacKenzie <djm@gnu.org>
5061 * doc/bison.texinfo: *** empty log message ***
5063 1993-09-13 Noah Friedman <friedman@gnu.org>
5065 * Makefile.in: *** empty log message ***
5067 1993-09-10 Richard Stallman <rms@gnu.org>
5069 * src/conflicts.c: *** empty log message ***
5071 * src/system.h: entered into RCS
5073 1993-09-10 Richard Stallman <rms@gnu.org>
5075 * doc/bison.1: entered into RCS
5077 1993-09-06 Noah Friedman <friedman@gnu.org>
5079 * src/version.c: entered into RCS
5081 1993-09-06 Noah Friedman <friedman@gnu.org>
5083 * Makefile.in: *** empty log message ***
5085 1993-07-30 David J. MacKenzie <djm@gnu.org>
5087 * Makefile.in: *** empty log message ***
5089 1993-07-24 Richard Stallman <rms@gnu.org>
5091 * src/bison.s1: *** empty log message ***
5093 1993-07-24 Richard Stallman <rms@gnu.org>
5095 * bison.simple: *** empty log message ***
5097 1993-07-08 David J. MacKenzie <djm@gnu.org>
5099 * Makefile.in: *** empty log message ***
5101 1993-07-04 Richard Stallman <rms@gnu.org>
5103 * src/bison.s1: *** empty log message ***
5105 1993-07-04 Richard Stallman <rms@gnu.org>
5107 * bison.simple: *** empty log message ***
5109 1993-06-26 David J. MacKenzie <djm@gnu.org>
5111 * src/getargs.c: entered into RCS
5113 1993-06-26 David J. MacKenzie <djm@gnu.org>
5115 * doc/bison.texinfo: *** empty log message ***
5117 * doc/bison.1: New file.
5119 1993-06-25 Richard Stallman <rms@gnu.org>
5121 * src/getargs.c: New file.
5123 1993-06-16 Richard Stallman <rms@gnu.org>
5125 * src/bison.s1: *** empty log message ***
5127 1993-06-16 Richard Stallman <rms@gnu.org>
5129 * bison.simple: *** empty log message ***
5131 1993-06-03 Richard Stallman <rms@gnu.org>
5133 * src/bison.s1: New file.
5135 1993-06-03 Richard Stallman <rms@gnu.org>
5137 * doc/bison.texinfo: *** empty log message ***
5139 1993-06-03 Richard Stallman <rms@gnu.org>
5141 * bison.simple: New file.
5143 1993-05-19 Richard Stallman <rms@gnu.org>
5145 * doc/bison.texinfo: New file.
5147 1993-05-07 Noah Friedman <friedman@gnu.org>
5149 * Makefile.in: *** empty log message ***
5151 1993-04-28 Noah Friedman <friedman@gnu.org>
5153 * src/reader.c: *** empty log message ***
5155 1993-04-23 Noah Friedman <friedman@gnu.org>
5157 * src/alloc.h: entered into RCS
5159 1993-04-20 David J. MacKenzie <djm@gnu.org>
5161 * src/version.c: *** empty log message ***
5163 * src/files.c, src/allocate.c:
5166 * src/reader.c: *** empty log message ***
5168 * src/lex.c: entered into RCS
5170 * src/conflicts.c: New file.
5172 * src/symtab.c: entered into RCS
5174 * src/alloc.h: New file.
5176 * src/LR0.c: entered into RCS
5178 1993-04-18 Noah Friedman <friedman@gnu.org>
5180 * src/reader.c: New file.
5182 * src/version.c: *** empty log message ***
5184 1993-04-18 Noah Friedman <friedman@gnu.org>
5186 * Makefile.in: *** empty log message ***
5188 1993-04-17 Noah Friedman <friedman@gnu.org>
5190 * Makefile.in: *** empty log message ***
5192 1993-04-15 Richard Stallman <rms@gnu.org>
5194 * src/main.c, src/files.c:
5197 1993-04-15 Noah Friedman <friedman@gnu.org>
5199 * configure.in: entered into RCS
5201 * configure.in: *** empty log message ***
5203 * configure.in: New file.
5205 1993-04-14 Richard Stallman <rms@gnu.org>
5207 * Makefile.in: New file.
5209 1993-04-13 Richard Stallman <rms@gnu.org>
5211 * src/version.c: New file.
5213 1993-03-25 Richard Stallman <rms@gnu.org>
5215 * src/output.c: entered into RCS
5217 1992-09-25 Richard Stallman <rms@gnu.org>
5219 * configure.bat: entered into RCS
5221 1992-06-22 Richard Stallman <rms@gnu.org>
5223 * src/vmsgetargs.c: entered into RCS
5225 1992-06-22 Richard Stallman <rms@gnu.org>
5227 * doc/bison.rnh: entered into RCS
5229 1992-04-20 David J. MacKenzie <djm@gnu.org>
5231 * README: entered into RCS
5233 1992-01-22 Richard Stallman <rms@gnu.org>
5235 * src/machine.h: entered into RCS
5237 1991-12-21 Richard Stallman <rms@gnu.org>
5239 * src/lalr.c, src/closure.c:
5242 1991-12-20 Richard Stallman <rms@gnu.org>
5244 * src/state.h: entered into RCS
5246 1991-12-18 Richard Stallman <rms@gnu.org>
5248 * src/print.c, src/nullable.c, src/derives.c:
5251 1991-11-03 David J. MacKenzie <djm@gnu.org>
5253 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5256 1988-09-09 Richard Stallman <rms@gnu.org>
5258 * src/bison.hairy: entered into RCS
5260 1987-12-16 Richard Stallman <rms@gnu.org>
5262 * REFERENCES: entered into RCS