1 2002-04-19 Akim Demaille <akim@epita.fr>
3 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5 (Debugging): More details about enabling the debugging features.
6 (Table of Symbols): Describe $$, $n, @$, and @n.
7 Suggested by Tim Josling.
9 2002-04-19 Akim Demaille <akim@epita.fr>
11 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13 2002-04-10 Akim Demaille <akim@epita.fr>
15 * src/system.h: Rely on HAVE_LIMITS_H.
16 Suggested by Paul Eggert.
18 2002-04-09 Akim Demaille <akim@epita.fr>
20 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
21 full stderr, and strip it according to the bison options, instead
22 of composing the error message from different bits.
23 This makes it easier to check for several error messages.
24 Adjust all the invocations.
25 Add an invocation exercising the error token.
26 Add an invocation demonstrating a stupid error message.
27 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
29 Error message are for stderr, not stdout.
31 2002-04-09 Akim Demaille <akim@epita.fr>
33 * src/gram.h, src/gram.c (error_token_number): Remove, use
35 * src/reader.c (reader): Don't specify the user token number (2)
36 for $undefined, as it uselessly prevents using it.
37 * src/gram.h (token_number_t): Move to...
39 (state_t.number): Is a token_number_t.
40 * src/print.c, src/reader.c: Use undeftoken->number instead of
42 (Even though this 2 is not the same as above: the number of the
43 undeftoken remains being 2, it is its user token number which
45 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
46 `user_token_number_max'.
47 Output `undef_token_number'.
48 * data/bison.simple, data/bison.c++: Use them.
49 Be sure to map invalid yylex return values to
50 `undef_token_number'. This saves us from gratuitous SEGV.
52 * tests/conflicts.at (Solved SR Conflicts)
53 (Unresolved SR Conflicts): Adjust.
54 * tests/regression.at (Web2c Actions): Adjust.
56 2002-04-08 Akim Demaille <akim@epita.fr>
58 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
60 Remove the duplicate `typedefs'.
61 (RhsNumberType): Fix the declaration and various other typos.
63 * data/bison.simple: Use __ofile__.
64 * src/scan-skel.l: Handle __ofile__.
66 2002-04-08 Akim Demaille <akim@epita.fr>
68 * src/gram.h (item_number_t): New, the type of item numbers in
69 RITEM. Note that it must be able to code symbol numbers as
70 positive number, and the negation of rule numbers as negative
72 Adjust all dependencies (pretty many).
73 * src/reduce.c (rule): Remove this `short *' pointer: use
75 * src/system.h (MINSHORT, MAXSHORT): Remove.
77 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
79 (MAXTABLE): Move to...
80 * src/output.c (MAXTABLE): here.
81 (prepare_rules): Use output_int_table to output rhs.
82 * data/bison.simple, data/bison.c++: Adjust.
83 * tests/torture.at (Big triangle): Move the limit from 254 to
85 * tests/regression.at (Web2c Actions): Ajust.
87 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
88 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
89 passes, but produces negative #line number, once fixed, GCC is
90 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
92 * src/state.h (state_h): Code input lines on ints, not shorts.
94 2002-04-08 Akim Demaille <akim@epita.fr>
96 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
99 2002-04-08 Akim Demaille <akim@epita.fr>
101 * src/system.h: No longer using strndup.
103 2002-04-07 Akim Demaille <akim@epita.fr>
105 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
106 * src/output.c (output_table_data): Return the longest number.
107 (prepare_tokens): Output `token_number_max').
108 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
110 Use them to define yy_token_number_type/TokenNumberType.
111 Use this type for yytranslate.
112 * tests/torture.at (Big triangle): Push the limit from 124 to
114 * tests/regression.at (Web2c Actions): Adjust.
116 2002-04-07 Akim Demaille <akim@epita.fr>
118 * tests/torture.at (Big triangle): New.
119 (GNU AWK Grammar, GNU Cim Grammar): Move to...
120 * tests/existing.at: here.
122 2002-04-07 Akim Demaille <akim@epita.fr>
124 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
128 2002-04-07 Akim Demaille <akim@epita.fr>
130 * src/reader.c: Normalize increments to prefix form.
132 2002-04-07 Akim Demaille <akim@epita.fr>
134 * src/reader.c, symtab.c: Remove debugging code.
136 2002-04-07 Akim Demaille <akim@epita.fr>
138 Rename all the `bucket's as `symbol_t'.
140 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
141 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
142 * src/symtab.c, src/symtab.h (bucket): Rename as...
144 (symbol_list_new, bucket_check_defined, bucket_make_alias)
145 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
146 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
147 (buckets_new, buckets_free, buckets_do): Rename as...
148 (symbol_list_new, symbol_check_defined, symbol_make_alias)
149 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
150 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
151 (symbols_new, symbols_free, symbols_do): these.
153 2002-04-07 Akim Demaille <akim@epita.fr>
155 Use lib/hash for the symbol table.
157 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
159 * src/lex.c (lex): Set the `number' member of new terminals.
160 * src/reader.c (bucket_check_defined, bucket_make_alias)
161 (bucket_check_alias_consistence, bucket_translation): New.
162 (reader, grammar_free, readgram, token_translations_init)
163 (packsymbols): Adjust.
164 (reader): Number the predefined tokens.
165 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
166 for predefined tokens.
167 * src/symtab.h (bucket): Remove all the hash table related
169 * src/symtab.c (symtab): Replace by...
170 (bucket_table): this.
171 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
172 (buckets_new, buckets_do): New.
174 2002-04-07 Akim Demaille <akim@epita.fr>
176 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
177 (start_symbol, max_user_token_number, semantic_parser)
178 (error_token_number): Initialize.
179 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
182 (errtoken, eoftoken, undeftoken, axiom): Extern.
184 2002-04-07 Akim Demaille <akim@epita.fr>
186 * src/gram.h (rule_s): prec and precsym are now pointers
187 to the bucket giving the priority/associativity.
188 Member `associativity' removed: useless.
189 * src/reduce.c, src/conflicts.c: Adjust.
191 2002-04-07 Akim Demaille <akim@epita.fr>
193 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
194 Properly escape the symbols' TAG when outputting them.
196 2002-04-07 Akim Demaille <akim@epita.fr>
198 * src/lalr.h (LA): Is a bitsetv, not bitset*.
200 2002-04-07 Akim Demaille <akim@epita.fr>
202 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
203 (LArule): this, which is an array to rule_t*.
204 * src/print.c, src/conflicts.c: Adjust.
206 2002-04-07 Akim Demaille <akim@epita.fr>
208 * src/gram.h (rule_t): Rename `number' as `user_number'.
209 `number' is a new member.
211 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
213 2002-04-07 Akim Demaille <akim@epita.fr>
215 As a result of the previous patch, it is no longer needed
216 to reorder ritem itself.
218 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
220 2002-04-07 Akim Demaille <akim@epita.fr>
222 Be sure never to walk through RITEMS, but use only data related to
223 the rules themselves. RITEMS should be banished.
225 * src/output.c (output_token_translations): Rename as...
226 (prepare_tokens): this.
227 In addition to `translate', prepare the muscles `tname' and
228 `toknum', which were handled by...
229 (output_rule_data): this.
230 Remove, and move the remainder of its outputs into...
231 (prepare_rules): this new routines, which also merges content from
233 (prepare_rules): Be sure never to walk through RITEMS.
234 (output_stos): Rename as...
235 (prepare_stos): this.
236 (output): Always invoke prepare_states, after all, just don't use it
237 in the output if you don't need it.
239 2002-04-07 Akim Demaille <akim@epita.fr>
241 * src/LR0.c (new_state): Display `nstates' as the name of the
243 Adjust to initialize first_state and last_state if needed.
244 Be sure to distinguish the initial from the final state.
245 (new_states): Create the itemset of the initial state, and use
247 * src/closure.c (closure): Now that the initial state has its
248 items properly set, there is no need for a special case when
251 As a result, now the rule 0, reducing to $axiom, is visible in the
252 outputs. Adjust the test suite.
254 * tests/conflicts.at (Solved SR Conflicts)
255 (Unresolved SR Conflicts): Adjust.
256 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
257 * tests/conflicts.at (S/R in initial): New.
259 2002-04-07 Akim Demaille <akim@epita.fr>
261 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
262 the RHS of the rules.
263 * src/output.c (output_gram): Likewise.
265 2002-04-07 Akim Demaille <akim@epita.fr>
267 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
269 Adjust all dependencies.
270 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
271 `number' of the buckets too.
272 * src/gram.h: Include `symtab.h'.
273 (associativity): Move to...
274 * src/symtab.h: here.
275 No longer include `gram.h'.
277 2002-04-07 Akim Demaille <akim@epita.fr>
279 * src/gram.h, src/gram.c (rules_rhs_length): New.
280 (ritem_longest_rhs): Use it.
281 * src/gram.h (rule_t): `number' is a new member.
282 * src/reader.c (packgram): Set it.
283 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
284 the end of `rules', and count them out of `nrules'.
285 (reduce_output, dump_grammar): Adjust.
286 * src/print.c (print_grammar): It is no longer needed to check for
287 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
288 * tests/reduce.at (Reduced Automaton): New test.
290 2002-04-07 Akim Demaille <akim@epita.fr>
292 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
293 lacking `+ 1' to nrules, Bison reported as useless a token if it
294 was used solely to set the precedence of the last rule...
296 2002-04-07 Akim Demaille <akim@epita.fr>
298 * data/bison.c++, data/bison.simple: Don't output the current file
299 name in #line, to avoid useless diffs between two identical
300 outputs under different names.
302 2002-04-07 Akim Demaille <akim@epita.fr>
304 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
305 Normalize loops to using `< nrules + 1', not `<= nrules'.
307 2002-04-07 Akim Demaille <akim@epita.fr>
311 2002-04-07 Akim Demaille <akim@epita.fr>
313 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
314 bucket.value as bucket.number.
316 2002-04-07 Akim Demaille <akim@epita.fr>
318 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
319 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
320 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
321 RHS, instead of being an index in RITEMS.
323 2002-04-04 Paul Eggert <eggert@twinsun.com>
325 * doc/bison.texinfo: Update copyright date.
326 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
327 (Symbols): Warn about running Bison in one character set,
328 but compiling and/or running in an incompatible one.
329 Warn about character code 256, too.
331 2002-04-03 Paul Eggert <eggert@twinsun.com>
333 * src/bison.data (YYSTACK_ALLOC): Depend on whether
334 YYERROR_VERBOSE is nonzero, not whether it is defined.
336 Merge changes from bison-1_29-branch.
338 2002-03-20 Paul Eggert <eggert@twinsun.com>
340 Merge fixes from Debian bison_1.34-1.diff.
342 * configure.in (AC_PREREQ): 2.53.
344 2002-03-20 Akim Demaille <akim@epita.fr>
346 * src/conflicts.c (log_resolution): Argument `resolution' is const.
348 2002-03-19 Paul Eggert <eggert@twinsun.com>
350 * src/bison.simple (YYCOPY): New macro.
351 (YYSTACK_RELOCATE): Use it.
352 Remove Type arg; no longer needed. All callers changed.
353 (yymemcpy): Remove; no longer needed.
355 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
356 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
358 2002-03-19 Akim Demaille <akim@epita.fr>
360 Test and fix the #line outputs.
362 * tests/atlocal.at (GCC): New.
363 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
364 (Prologue synch line, ,%union synch line, Postprologue synch line)
365 (Action synch line, Epilogue synch line): New tests.
366 * src/reader.c (parse_union_decl): Define the muscle stype_line.
367 * data/bison.simple, data/bison.c++: Use it.
369 2002-03-19 Akim Demaille <akim@epita.fr>
371 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
372 (Solved SR Conflicts, %expect not enough, %expect right)
373 (%expect too much): Move to...
374 * tests/conflicts.at: this new file.
376 2002-03-19 Akim Demaille <akim@epita.fr>
378 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
379 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
380 that we can move to enums for instance.
381 * src/output.c (token_definitions_output): Output a list of
382 `token-name, token-number' instead of the #define.
383 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
385 2002-03-14 Akim Demaille <akim@epita.fr>
389 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
391 * data/bison.c++: Make the user able to add members to the generated
392 parser by subclassing.
394 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
396 * src/reader.c (read_additionnal_code): `c' should be an integer, not
398 Reported by Nicolas Tisserand and Nicolas Burrus.
400 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
402 * src/reader.c: Warn about lacking semi-colons, do not complain.
404 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
406 * data/bison.c++: Remove a debug line.
408 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
410 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
411 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
412 provide a default implementation.
414 2002-03-04 Akim Demaille <akim@epita.fr>
416 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
417 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
418 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
419 * tests/semantic.at (Parsing Guards): Similarly.
420 * src/reader.at (readgram): Complain if the last rule is not ended
423 2002-03-04 Akim Demaille <akim@epita.fr>
425 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
426 * src/closure.c: here.
427 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
429 * src/warshall.h, src/warshall.c: Remove.
430 * tests/sets.at (Broken Closure): Adjust.
432 2002-03-04 Akim Demaille <akim@epita.fr>
434 * src/output.c (output_skeleton): tempdir is const.
435 bytes_read is unused.
437 2002-03-04 Akim Demaille <akim@epita.fr>
439 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
440 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
444 2002-03-04 Akim Demaille <akim@epita.fr>
446 * src/closure.c (closure): `r' is unused.
448 2002-03-04 Akim Demaille <akim@epita.fr>
450 * tests/sets.at (Broken Closure): Add the ending `;'.
451 * src/reader.at (readgram): Complain if a rule is not ended with a
454 2002-03-04 Akim Demaille <akim@epita.fr>
456 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
457 (count_sr_conflicts): Use bitset_count.
458 * src/reduce.c (inaccessable_symbols): Ditto.
460 * src/warshall.h, src/warshall.c: Convert to bitsetv.
462 2002-03-04 Akim Demaille <akim@epita.fr>
464 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
465 * src/reduce.c: Remove the `bitset_zero's following the
466 `bitset_create's, as now it is performed by the latter.
468 2002-03-04 Akim Demaille <akim@epita.fr>
470 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
471 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
472 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
473 latest sources from Michael.
475 2002-03-04 Akim Demaille <akim@epita.fr>
477 * src/output.c (output): Don't free the grammar.
478 * src/reader.c (grammar_free): New.
479 * src/main.c (main): Call it and don't free symtab here.
481 2002-03-04 Akim Demaille <akim@epita.fr>
483 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
485 Reported by Benoit Perrot.
487 2002-03-04 Akim Demaille <akim@epita.fr>
489 Use bitset operations when possible, not loops over bits.
491 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
493 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
494 * src/reduce.c (useless_nonterminals): Formatting changes.
495 * src/warshall.c (TC): Use bitset_or.
497 2002-03-04 Akim Demaille <akim@epita.fr>
499 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
500 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
503 2002-03-04 Akim Demaille <akim@epita.fr>
505 * src/lalr.c (F): Now a bitset*.
506 Adjust all dependencies.
508 2002-03-04 Akim Demaille <akim@epita.fr>
510 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
511 Adjust all dependencies.
513 2002-03-04 Akim Demaille <akim@epita.fr>
515 * src/L0.c, src/LR0.h (nstates): Be size_t.
516 Adjust comparisons (signed vs unsigned).
517 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
519 Adjust all dependencies.
521 2002-03-04 Akim Demaille <akim@epita.fr>
523 * src/closure.c (firsts): Now, also a bitset.
524 Adjust all dependencies.
525 (varsetsize): Remove, now unused.
526 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
528 2002-03-04 Akim Demaille <akim@epita.fr>
530 * src/print.c: Convert to use bitset.h, not hand coded iterations
533 2002-03-04 Akim Demaille <akim@epita.fr>
535 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
537 2002-03-04 Akim Demaille <akim@epita.fr>
539 * src/closure.c (ruleset): Be a bitset.
540 (rulesetsize): Remove.
542 2002-03-04 Akim Demaille <akim@epita.fr>
544 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
545 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
546 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
547 * src/closure.c (fderives): Be an array of bitsets.
549 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
551 * data/bison.c++: Merge the two generated headers. Insert a copyright
552 notice in each output file.
554 2002-02-28 Akim Demaille <akim@epita.fr>
556 * data/bison.c++: Copy the prologue of bison.simple to fetch
557 useful M4 definitions, such as b4_header_guard.
559 2002-02-25 Akim Demaille <akim@epita.fr>
561 * src/getargs.c (version): Give the name of the authors, and use a
562 translator friendly scheme for the bgr
565 2002-02-25 Akim Demaille <akim@epita.fr>
567 * src/output.c (header_output): Remove, now handled completely via
570 2002-02-25 Akim Demaille <akim@epita.fr>
572 * m4/m4.m4: New, from CVS Autoconf.
573 * configure.in: Invoke it.
574 * src/output.c (output_skeleton): Use its result instead of the
577 2002-02-25 Akim Demaille <akim@epita.fr>
579 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
581 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
582 * src/output.c (output_skeleton): Use mkstemp to create a real
584 Move the filling of `skeleton' and its muscle to...
586 (output): Move the definition of the prologue muscle to...
588 * src/system.h (DEFAULT_TMPDIR): New.
590 2002-02-14 Paul Eggert <eggert@twinsun.com>
592 Remove the support for C++ namespace cleanliness; it was
593 causing more problems than it was curing, since it didn't work
594 properly on some nonstandard C++ compilers. This can wait
595 for a proper C++ parser.
597 * NEWS: Document this.
598 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
599 of C++, as it's treated like C now.
600 * src/bison.simple (YYSTD): Remove.
601 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
602 Treat C++ just like Standard C instead of trying to support
603 namespace cleanliness.
605 2002-02-14 Akim Demaille <akim@epita.fr>
607 * tests/regression.at (else): Adjust to Andreas' change.
609 2002-02-14 Akim Demaille <akim@epita.fr>
611 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
613 2002-02-13 Andreas Schwab <schwab@suse.de>
615 * src/output.c (output_rule_data): Don't output NULL, it might
618 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
620 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
621 (Copyright notice): Update.
623 2002-02-11 Akim Demaille <akim@epita.fr>
625 * tests/regression.at (%nonassoc and eof): Don't include
628 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
630 * data/bison.c++: Correct error recovery. Make the user able to
631 initialize the starting location.
633 2002-02-07 Akim Demaille <akim@epita.fr>
635 * tests/input.at: New.
637 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
639 * data/bison.c++: Replace some direct m4 expansions by constants. Be
640 more consistent when naming methods and variables. Put preprocessor
641 directives around tables only needed for debugging.
643 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
645 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
647 (yy::b4_name::parse): Use print_.
649 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
651 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
653 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
655 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
657 (yy::b4_name::parse): Build verbose error messages, and use error_.
659 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
661 * data/bison.c++: Fix m4 quoting in comments.
663 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
665 * data/bison.c++: Adjust the parser code. Fix some muscles that were
668 2002-02-05 Akim Demaille <akim@epita.fr>
670 * data/bison.c++: Adjust to the M4 back end.
671 More is certainly needed.
673 2002-02-05 Akim Demaille <akim@epita.fr>
675 Give a try to M4 as a back end.
677 * lib/readpipe.c: New, from wdiff.
678 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
680 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
681 specific values. Now it is m4 that performs the lookup.
682 * src/parse-skel.y: Remove.
683 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
684 * src/output.c (actions_output, guards_output)
685 (token_definitions_output): No longer keeps track of the output
686 line number, hence remove the second argument.
687 (guards_output): Check against the guard member of a rule, not the
690 (output_skeleton): Don't look for the skeleton location, let m4 do
692 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
694 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
695 (prepare): Given that for the time being changesyntax is not
696 usable in M4, rename the muscles using `-' to `_'.
697 Define `defines_flag', `output_parser_name' and `output_header_name'.
698 * src/output.h (actions_output, guards_output)
699 (token_definitions_output): Adjust prototypes.
700 * src/scan-skel.l: Instead of scanning the skeletons, it now
701 processes the output of m4: `__oline__' and `#output'.
702 * data/bison.simple: Adjust to be used by M4(sugar).
703 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
705 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
706 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
707 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
708 shamelessly stolen from CVS Autoconf.
710 2002-02-05 Akim Demaille <akim@epita.fr>
712 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
713 * configure.in: Check for the declarations of free and malloc.
714 * src/muscle_tab.c: Adjust.
716 2002-02-05 Akim Demaille <akim@epita.fr>
718 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
719 which have no values.
721 2002-02-05 Akim Demaille <akim@epita.fr>
723 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
726 2002-01-29 Paul Eggert <eggert@twinsun.com>
728 * src/bison.simple (YYSIZE_T): Do not define merely because
729 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
730 On some platforms, <alloca.h> does not declare YYSTD (size_t).
732 2002-01-27 Akim Demaille <akim@epita.fr>
734 Fix `%nonassoc and eof'.
736 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
737 which were not properly copied! Replace
738 memcpy (res->errs, src->errs, src->nerrs);
740 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
742 * tests/regression.at (%nonassoc and eof): Adjust to newest
743 Autotest: `.' is not in the PATH.
745 2002-01-27 Akim Demaille <akim@epita.fr>
747 * tests/sets.at (AT_EXTRACT_SETS): New.
751 2002-01-26 Akim Demaille <akim@epita.fr>
753 * tests/actions.at, tests/calc.at, tests/headers.at,
754 * tests/torture.at: Adjust to the newest Autotest which no longer
755 forces `.' in the PATH.
757 2002-01-25 Akim Demaille <akim@epita.fr>
759 * tests/regression.at (%nonassoc and eof): New.
760 Suggested by Robert Anisko.
762 2002-01-24 Akim Demaille <akim@epita.fr>
764 Bison dumps core when trying to complain about broken input files.
765 Reported by Cris van Pelt.
767 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
768 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
770 (Invalid inputs): Strengthen: exercise parse_percent_token.
772 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
774 * src/Makefile.am: Add bison.c++.
775 * src/bison.c++: New skeleton.
777 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
781 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
783 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
785 2002-01-20 Marc Autret <marc@gnu.org>
787 * src/files.c (compute_output_file_names): Fix
789 2002-01-20 Marc Autret <marc@gnu.org>
791 * tests/output.at: New test.
792 * src/files.c (compute_base_names): Don't map extensions when
793 the YACC flag is set, use defaults.
794 Reported by Evgeny Stambulchik.
796 2002-01-20 Marc Autret <marc@gnu.org>
798 * src/system.h: Need to define __attribute__ away for non-GCC
799 compilers as well (i.e. the vendor C compiler).
800 Suggested by Albert Chin-A-Young.
802 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
804 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
805 canonical definition.
806 * src/system.h: Use the canonical definition for PARAMS (avoids
807 a conflict with the macro from lib/hash.h).
809 2002-01-11 Akim Demaille <akim@epita.fr>
811 * configure.in: Use AC_FUNC_STRNLEN.
812 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
814 2002-01-09 Akim Demaille <akim@epita.fr>
816 * src/files.c, src/files.h (output_infix): New.
817 (tab_extension): Remove.
818 (compute_base_names): Compute the former, drop the latter.
819 * src/output.c (prepare): Insert the muscles `output-infix', and
821 * src/parse-skel.y (string, string.1): New.
822 (section.header): Use it.
823 (section.yacc): Remove.
824 (prefix): Remove too.
825 * src/scan-skel.l: Adjust.
826 * src/bison.simple, src/bison.hairy: Adjust.
828 2002-01-09 Akim Demaille <akim@epita.fr>
830 * configure.in (WERROR_CFLAGS): Compute it.
831 * src/Makefile.am (CFLAGS): Pass it.
832 * tests/atlocal.in (CFLAGS): Idem.
833 * src/files.c: Fix a few warnings.
834 (get_extension_index): Remove, unused.
836 2002-01-08 Akim Demaille <akim@epita.fr>
838 * src/getargs.c (AS_FILE_NAME): New.
839 (getargs): Use it to convert DOSish file names.
840 * src/files.c (base_name): Rename as full_base_name to avoid
841 clashes with `base_name ()'.
842 (filename_split): New.
843 (compute_base_names): N-th rewrite, using filename_split.
845 2002-01-08 Akim Demaille <akim@epita.fr>
847 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
848 New, stolen from the Fileutils 4.1.
849 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
850 * configure.in: Check for the presence of memrchr, and of its
853 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
855 * lib/hash.h (__P): Added definition for this macro.
856 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
857 BUILT_SOURCES, to ensure they are generated first.
858 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
859 %error-verbose to allow bootstrapping with bison 1.30x.
861 2002-01-06 Akim Demaille <akim@epita.fr>
863 * src/reader.c (parse_braces): Don't fetch the next char, the
864 convention is to fetch on entry.
865 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
866 'switch' without a following semicolon.
867 * tests/regression.at (braces parsing): New.
869 2002-01-06 Akim Demaille <akim@epita.fr>
871 Bison is dead wrong in its RR conflict reports.
873 * tests/torture.at (GNU Cim Grammar): New.
874 * src/conflicts.c (count_rr_conflicts): Fix.
876 2002-01-06 Akim Demaille <akim@epita.fr>
878 Creating package.m4 from configure.ac causes too many problems.
880 * tests/Makefile.am (package.m4): Create it by hand,
881 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
883 2002-01-06 Akim Demaille <akim@epita.fr>
885 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
888 2002-01-04 Paul Eggert <eggert@twinsun.com>
890 * doc/bison.texinfo (Debugging):
891 Remove YYSTDERR; it's no longer defined or used.
892 Also, s/cstdio.h/cstdio/.
894 2002-01-03 Akim Demaille <akim@epita.fr>
896 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
898 2002-01-03 Akim Demaille <akim@epita.fr>
900 * src/parse-skel.y (process_skeleton): Don't bind the parser's
901 tracing code to --trace, wait for a better --trace option, with
904 2002-01-03 Akim Demaille <akim@epita.fr>
906 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
907 The ISO C++ standard is extremely clear about it: stderr is
908 considered a macro, not a regular symbol (see table 94 `Header
909 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
910 Therefore std:: does not apply to it. It still does with fprintf.
911 Also, s/cstdio.h/cstdio/.
913 2002-01-03 Akim Demaille <akim@epita.fr>
915 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
916 for non system headers.
918 2002-01-02 Akim Demaille <akim@epita.fr>
920 Equip the skeleton chain with location tracking, runtime trace,
921 pure parser and scanner.
923 * src/parse-skel.y: Request a pure parser, locations, and prefix
925 (%union): Having several members with the same type does not help
926 type mismatches, simplify.
927 (YYPRINT, yyprint): New.
928 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
931 * src/scan-skel.l: Adjust to these changes.
932 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
933 (LOCATION_PRINT, skel_control_t): New.
935 2001-12-30 Akim Demaille <akim@epita.fr>
937 * src/parse-skel.y: Get rid of the shift/reduce conflict:
938 replace `gb' with BLANKS.
939 * src/scan-skel.l: Adjust.
941 2001-12-30 Akim Demaille <akim@epita.fr>
943 * src/system.h: We don't need nor want bcopy.
944 Throw away MS-DOS crap: we don't need getpid.
945 * configure.in: We don't need strndup. It was even causing
946 problems: because Flex includes the headers *before* us,
947 _GNU_SOURCE is not defined by config.h, and therefore strndup was
949 * lib/xstrndup.c: New.
950 * src/scan-skel.l: Use it.
951 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
952 * src/parse-skel.y: Use %directives instead of #defines.
954 2001-12-30 Akim Demaille <akim@epita.fr>
956 * src/skeleton.h: New.
957 * src/output.c (output_parser, output_master_parser): Remove, dead
959 * src/output.h (get_lines_number, actions_output, guards_output)
960 (token_definitions_output): Prototype them.
961 * src/parse-skel.y: Add the license notice.
962 Include output.h and skeleton.h.
963 (process_skeleton): Returns void, and takes a single parameter.
964 * src/scan-skel.l: Add the license notice.
966 Don't use %option yylineno: it seems that then Flex imagines
967 REJECT has been used, and therefore it won't reallocate its
968 buffers (which makes no other sense to me than a bug). It results
969 in warnings for `unused: yy_flex_realloc'.
971 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
973 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
974 (MUSCLE_INSERT_PREFIX): ...to there.
975 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
976 (MUSCLE_INSERT_PREFIX): Move from here...
978 * src/bison.hairy: Add a section directive. Put braces around muscle
979 names. This parser skeleton is still broken, but Bison should not
980 choke on a bad muscle 'syntax'.
981 * src/bison.simple: Add a section directive. Put braces around muscle
984 * src/files.h (strsuffix, stringappend): Add declarations.
985 (tab_extension): Add declaration.
986 (short_base_name): Add declaration.
988 * src/files.c (strsuffix, stringappend): No longer static. These
989 functions are used in the skeleton parser.
990 (tab_extension): New.
991 (compute_base_names): Use the computations done in this function
992 to guess if the generated parsers should have '.tab' in their
994 (short_base_name): No longer static.
996 * src/output.c (output_skeleton): New.
997 (output): Disable call to output_master_parser, and give a try to
998 a new skeleton handling system.
999 (guards_output, actions_output): No longer static.
1000 (token_definitions_output, get_lines_number): No longer static.
1002 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1004 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1007 * src/parse-skel.y: New file.
1008 * src/scan-skel.l: New file.
1010 2001-12-29 Akim Demaille <akim@epita.fr>
1012 %name-prefix is broken.
1014 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1015 Adjust all dependencies.
1016 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1019 Renaming yylval but not yylloc is not consistent. Now we do.
1021 * src/bison.simple: Prefix yylloc if used.
1022 * doc/bison.texinfo (Decl Summary): Document that.
1024 2001-12-29 Akim Demaille <akim@epita.fr>
1026 * doc/bison.texinfo: Promote `%long-directive' over
1028 Remove all references to fixed-output-files, yacc is enough.
1030 2001-12-29 Akim Demaille <akim@epita.fr>
1032 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1033 user prologue. These are defaults.
1034 * tests/actions.at (Mid-rule actions): Make sure the user can
1035 define YYDEBUG and YYERROR_VERBOSE.
1037 2001-12-29 Akim Demaille <akim@epita.fr>
1039 * src/output.c (header_output): Don't forget to export YYLTYPE and
1041 * tests/headers.at (export YYLTYPE): New, make sure it does.
1042 * tests/regression.at (%union and --defines, Invalid CPP headers):
1044 * tests/headers.at: here.
1046 2001-12-29 Akim Demaille <akim@epita.fr>
1048 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1050 2001-12-29 Akim Demaille <akim@epita.fr>
1052 * tests/actions.at (Mid-rule actions): Output on a single line
1055 2001-12-29 Akim Demaille <akim@epita.fr>
1057 * doc/bison.texinfo: Formatting changes.
1059 2001-12-29 Akim Demaille <akim@epita.fr>
1061 Don't store the token defs in a muscle, just be ready to output it
1062 on command. Now possible via `symbols'. Fixes a memory leak.
1064 * src/output.c (token_definitions_output): New.
1065 (output_parser, header_output): Use it.
1066 * src/reader.c (symbols_save): Remove.
1068 2001-12-29 Akim Demaille <akim@epita.fr>
1070 * src/bison.simple: Do not provide a default for YYSTYPE and
1071 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1074 2001-12-29 Akim Demaille <akim@epita.fr>
1076 Mid-rule actions are simply... ignored!
1078 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1079 the empty-rule associated to the dummy symbol, not to the host
1081 * tests/actions.at (Mid-rule actions): New.
1083 2001-12-29 Akim Demaille <akim@epita.fr>
1087 * src/reader.c (reader): Free grammar.
1089 2001-12-29 Akim Demaille <akim@epita.fr>
1093 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1094 since it allocates it for each state, although only one is needed.
1095 (allocate_storage): Do it here.
1097 2001-12-29 Akim Demaille <akim@epita.fr>
1099 * src/options.h, src/options.c (create_long_option_table): Rename
1101 (long_option_table_new): this, with a clearer prototype.
1102 (percent_table): Remove, unused,
1103 * src/getargs.c (getargs): Adjust.
1105 2001-12-29 Akim Demaille <akim@epita.fr>
1107 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1108 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1111 2001-12-29 Akim Demaille <akim@epita.fr>
1113 * src/lalr.c (build_relations): Rename `states' as `states1'.
1114 Sorry, I don't understand exactly what it is, no better name...
1116 2001-12-29 Akim Demaille <akim@epita.fr>
1118 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1119 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1120 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1123 2001-12-29 Akim Demaille <akim@epita.fr>
1125 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1128 2001-12-29 Akim Demaille <akim@epita.fr>
1130 * src/reader.c, src/reader.h (user_toknums): Remove.
1131 Adjust all users to use symbols[i]->user_token_number.
1133 2001-12-29 Akim Demaille <akim@epita.fr>
1135 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1136 Adjust all users to use symbols[i]->prec or ->assoc.
1138 2001-12-29 Akim Demaille <akim@epita.fr>
1140 * src/reader.c, src/reader.h (tags): Remove.
1141 Adjust all users to use symbols[i]->tag.
1143 2001-12-29 Akim Demaille <akim@epita.fr>
1145 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1147 * src/reader.c (packsymbols): Fill this table.
1149 * src/conflicts.c (resolve_sr_conflict): Adjust.
1150 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1152 Use symbols[i]->tag instead of tags[i].
1154 2001-12-29 Akim Demaille <akim@epita.fr>
1156 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1157 In addition, put a comment in there, to replace...
1158 * tests/regression.at (%union and C comments): Remove.
1160 2001-12-29 Akim Demaille <akim@epita.fr>
1162 * tests/regression.at (Web2c Actions): Blindly move the actual
1163 output as expected output. The contents *seem* right to me, but I
1164 can't pretend reading perfectly parser tables... Nonetheless, all
1165 the other tests pass correctly, the table look OK, even though the
1166 presence of `$axiom' is to be noted: AFAICS it is useless (but
1169 2001-12-29 Akim Demaille <akim@epita.fr>
1171 * src/reader.c (readgram): Don't add the rule 0 if there were no
1172 rules read. In other words, add it _after_ having performed
1173 grammar sanity checks.
1174 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1176 2001-12-29 Akim Demaille <akim@epita.fr>
1178 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1179 visible, and some states have now a different number.
1181 2001-12-29 Akim Demaille <akim@epita.fr>
1183 * src/reader.c (readgram): Bind the initial rule's lineno to that
1185 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1186 (Solved SR Conflicts): Adjust rule 0's line number.
1188 2001-12-29 Akim Demaille <akim@epita.fr>
1190 Fix the `GAWK Grammar' failure.
1192 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1193 the reductions of the first state which was mistakenly confused
1194 with the final state because precisely final_state was initialized
1196 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1197 now noticed by Bison.
1198 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1199 have a reduction on $default.
1201 2001-12-29 Akim Demaille <akim@epita.fr>
1203 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1205 * src/closure.c (print_closure): Likewise.
1206 * src/derives.c (print_derives): Likewise.
1207 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1210 2001-12-29 Akim Demaille <akim@epita.fr>
1212 * src/lalr.c (lookaheads_print): New.
1213 (lalr): Call it when --trace-flag.
1214 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1217 2001-12-29 Akim Demaille <akim@epita.fr>
1219 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1220 when walking through ritem, even via rule->rhs.
1221 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1222 (useful_production, useless_nonterminals): Likewise.
1223 (reduce_grammar_tables): Likewise, plus update nritems.
1224 * src/nullable.c (set_nullable): Likewise.
1225 * src/lalr.c (build_relations): Likewise.
1226 * tests/sets.at (Nullable): Adjust.
1227 Fortunately, now, the $axiom is no longer nullable.
1229 2001-12-29 Akim Demaille <akim@epita.fr>
1231 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1233 * src/gram.c (ritem_longest_rhs): Likewise.
1234 * src/reduce.c (nonterminals_reduce): Likewise.
1235 * src/print_graph.c (print_graph): Likewise.
1236 * src/output.c (output_rule_data): Likewise.
1237 * src/nullable.c (set_nullable): Likewise.
1239 2001-12-29 Akim Demaille <akim@epita.fr>
1241 * src/output.c: Comment changes.
1243 2001-12-27 Paul Eggert <eggert@twinsun.com>
1245 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1246 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1247 Sparc, as they were causing more porting problems than the
1248 (minor) performance improvement was worth.
1250 Also, catch up with 1.31's YYSTD.
1252 2001-12-27 Akim Demaille <akim@epita.fr>
1254 * src/output.c (output_gram): Rely on nritems, not the
1255 0-sentinel. See below.
1256 Use -1 as separator, not 0.
1257 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1258 Rely on -1 as separator in yyrhs, instead of 0.
1259 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1260 twice `Now at end of input', therefore there are two lines less to
1263 2001-12-27 Akim Demaille <akim@epita.fr>
1265 * tests/regression.at (Unresolved SR Conflicts):
1266 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1269 2001-12-27 Akim Demaille <akim@epita.fr>
1271 * src/LR0.c (new_state): Recognize the final state by the fact it
1272 is reached by eoftoken.
1273 (insert_start_shifting_state, insert_eof_shifting_state)
1274 (insert_accepting_state, augment_automaton): Remove, since now
1275 these states are automatically computed from the initial state.
1276 (generate_states): Adjust.
1277 * src/print.c: When reporting a rule number to the user, substract
1278 1, so that the axiom rule is rule 0, and the first user rule is 1.
1279 * src/reduce.c: Likewise.
1280 * src/print_graph.c (print_core): For the time being, just as for
1281 the report, depend upon --trace-flags to dump the full set of
1283 * src/reader.c (readgram): Once the grammar read, insert the rule
1284 0: `$axiom: START-SYMBOL $'.
1285 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1286 number of the states has changed (the final state is no longer
1287 necessarily the last), catch up.
1289 2001-12-27 Akim Demaille <akim@epita.fr>
1291 Try to make the use of the eoftoken valid. Given that its value
1292 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1293 is used instead of > 0 where appropriate, (ii), depend upon nritems
1294 instead of the 0-sentinel.
1296 * src/gram.h, src/gram.c (nritems): New.
1297 Expected to be duplication of nitems, but for the time being...
1298 * src/reader.c (packgram): Assert nritems and nitems are equal.
1299 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1300 * src/closure.c (print_closure, print_fderives): Likewise.
1301 * src/gram.c (ritem_print): Likewise.
1302 * src/print.c (print_core, print_grammar): Likewise.
1303 * src/print_graph.c: Likewise.
1305 2001-12-27 Akim Demaille <akim@epita.fr>
1307 * src/main.c (main): If there are complains after grammar
1308 reductions, then output the report anyway if requested, then die.
1309 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1310 * src/reader.c (eoftoken): New.
1311 (parse_token_decl): If the token being defined has value `0', it
1313 (packsymbols): No longer hack `tags' to insert `$' by hand.
1314 Be sure to preserve the value of the eoftoken.
1315 (reader): Make sure eoftoken is defined.
1316 Initialize nsyms to 0: now eoftoken is created just like the others.
1317 * src/print.c (print_grammar): Don't special case the eof token.
1318 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1319 lie anyway, albeit pleasant.
1320 * tests/calc.at: Exercise error messages with eoftoken.
1321 Change the grammar so that empty input is invalid.
1322 Adjust expectations.
1323 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1325 2001-12-27 Akim Demaille <akim@epita.fr>
1327 * configure.in: Check the protos of strchr ans strspn.
1328 Replace strchr if needed.
1329 * src/system.h: Provide the protos of strchr, strspn and memchr if
1331 * lib/strchr.c: New.
1332 * src/reader.c (symbols_save): Use strchr.
1334 2001-12-27 Akim Demaille <akim@epita.fr>
1336 * src/print.c, src/print_graph.c (escape): New.
1337 Use it to quote the TAGS outputs.
1338 * src/print_graph.c (print_state): Now errors are in red, and
1339 reductions in green.
1340 Prefer high to wide: output the state number on a line of its own.
1342 2001-12-27 Akim Demaille <akim@epita.fr>
1344 * src/state.h, src/state.c (reductions_new): New.
1345 * src/LR0.c (set_state_table): Let all the states have a
1346 `reductions', even if reduced to 0.
1347 (save_reductions): Adjust.
1348 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1349 * src/print.c (print_reductions, print_actions): Adjust.
1350 * src/output.c (action_row): Adjust.
1352 2001-12-27 Akim Demaille <akim@epita.fr>
1354 * src/state.h, src/state.c (errs_new, errs_dup): New.
1355 * src/LR0.c (set_state_table): Let all the states have an errs,
1356 even if reduced to 0.
1357 * src/print.c (print_errs, print_reductions): Adjust.
1358 * src/output.c (output_actions, action_row): Adjust.
1359 * src/conflicts.c (resolve_sr_conflict): Adjust.
1361 2001-12-27 Akim Demaille <akim@epita.fr>
1363 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1365 2001-12-27 Akim Demaille <akim@epita.fr>
1367 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1368 * src/print.c: here.
1369 (lookaheadset, shiftset): New, used as additional storage by
1371 (print_results): Adjust.
1372 (print_shifts, print_gotos, print_errs): New, extracted from...
1373 (print_actions): here.
1374 * src/print_graph.c (print_actions): Remove dead code.
1376 2001-12-27 Akim Demaille <akim@epita.fr>
1378 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1381 2001-12-27 Akim Demaille <akim@epita.fr>
1383 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1384 (build_relations): Adjust.
1386 2001-12-27 Akim Demaille <akim@epita.fr>
1388 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1391 2001-12-27 Akim Demaille <akim@epita.fr>
1393 * src/reader.c (packgram): Catch nitems overflows.
1395 2001-12-27 Akim Demaille <akim@epita.fr>
1397 * src/files.c, src/files.h (guard_obstack): Remove.
1398 * src/output.c (output): Adjust.
1399 * src/reader.c (parse_braces): New, factoring...
1400 (copy_action, copy_guard): these two which are renamed as...
1401 (parse_action, parse_guard): these.
1402 As a voluntary consequence, using braces around guards is now
1405 2001-12-27 Akim Demaille <akim@epita.fr>
1407 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1408 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1410 (symbol_list_new): Adjust.
1411 (copy_action): action_line is the first line, not the last.
1412 (copy_guard): Just as for actions, store the `action' only, not
1413 the switch/case/break flesh.
1414 Don't parse the user action that might follow the guard, let...
1415 (readgram): do it, i.e., now, there can be an action after a
1417 In other words the guard is just explicitly optional.
1419 * src/output.c (guards_output): New.
1420 (output_parser): Call it when needed.
1421 (output): Also free the guard and attrs obstacks.
1422 * src/files.c, src/files.h (obstack_save): Remove.
1423 (output_files): Remove.
1424 As a result, if one needs the former `.act' file, using an
1425 appropriate skeleton which requires actions and guards is now
1427 * src/main.c (main): Adjust.
1428 * tests/semantic.at: New.
1429 * tests/regression.at: Use `input.y' as input file name.
1430 Avoid 8+3 problems by requiring input.c when the test needs the
1433 2001-12-27 Akim Demaille <akim@epita.fr>
1435 * src/reader.c (symbol_list_new): Be sure to initialize all the
1438 2001-12-27 Akim Demaille <akim@epita.fr>
1440 All the hacks using a final pseudo state are now useless.
1442 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1443 * src/lalr.c (nLA): New.
1444 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1445 instead of lookaheadsp from the pseudo state (nstate + 1).
1447 2001-12-27 Akim Demaille <akim@epita.fr>
1449 * src/output.c (action_row, token_actions): Use a state_t instead
1450 of a integer, and nlookaheads instead of the following state's
1453 2001-12-27 Akim Demaille <akim@epita.fr>
1455 * src/conflicts.c (log_resolution, flush_shift)
1456 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1457 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1458 (conflicts_print, print_reductions): Use a state_t instead of an
1459 integer when referring to a state.
1460 As much as possible, depend upon nlookaheads, instead of the
1461 `lookaheadsp' member of the following state (since lookaheads of
1462 successive states are successive, the difference between state n + 1
1463 and n served as the number of lookaheads for state n).
1464 * src/lalr.c (add_lookback_edge): Likewise.
1465 * src/print.c (print_core, print_actions, print_state)
1466 (print_results): Likewise.
1467 * src/print_graph.c (print_core, print_actions, print_state)
1468 (print_graph): Likewise.
1469 * src/conflicts.h: Adjust.
1471 2001-12-27 Akim Demaille <akim@epita.fr>
1473 * src/bison.hairy: Formatting/comment changes.
1475 Remove `register' indications.
1476 Add plenty of `static'.
1478 2001-12-27 Akim Demaille <akim@epita.fr>
1480 * src/output.c (prepare): Drop the muscle `ntbase' which
1482 * src/bison.simple: Formatting/comment changes.
1483 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1484 is an undocumented synonym.
1486 2001-12-22 Akim Demaille <akim@epita.fr>
1488 * src/output.c (output_table_data): Change the prototype to use
1489 `int' for array ranges: some invocations do pass an int, not a
1491 Reported by Wayne Green.
1493 2001-12-22 Akim Demaille <akim@epita.fr>
1495 Some actions of web2c.y are improperly triggered.
1496 Reported by Mike Castle.
1498 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1499 * tests/regression.at (Web2c): Rename as...
1500 (Web2c Report): this.
1501 (Web2c Actions): New.
1503 2001-12-22 Akim Demaille <akim@epita.fr>
1505 Reductions in web2c.y are improperly reported.
1506 Reported by Mike Castle.
1508 * src/conflicts.c (print_reductions): Fix.
1509 * tests/regression.at (Web2c): New.
1511 2001-12-18 Akim Demaille <akim@epita.fr>
1513 Some host fail on `assert (!"foo")', which expands to
1514 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1515 Reported by Nelson Beebee.
1517 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1518 `#define it_succeeded 0' and `assert (it_succeeded)'.
1520 2001-12-17 Marc Autret <autret_m@epita.fr>
1522 * src/bison.simple: Don't hard code the skeleton line and filename.
1523 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1524 New line counter 'skeleton_line' (skeleton-line muscle).
1526 2001-12-17 Paul Eggert <eggert@twinsun.com>
1528 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1529 YYDEBUG must be defined to a nonzero value.
1531 * src/bison.simple (yytname): Do not assume that the user defines
1532 YYDEBUG to a properly parenthesized expression.
1534 2001-12-17 Akim Demaille <akim@epita.fr>
1536 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1537 nlookaheads is a new member.
1539 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1540 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1543 2001-12-17 Akim Demaille <akim@epita.fr>
1545 * src/files.h, src/files.c (open_files, close_files): Remove.
1546 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1548 * src/reader.c (reader): Do it.
1550 2001-12-17 Akim Demaille <akim@epita.fr>
1552 * src/conflicts.c (print_reductions): Formatting changes.
1554 2001-12-17 Akim Demaille <akim@epita.fr>
1556 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1557 (flush_reduce): New.
1558 (resolve_sr_conflict): Adjust.
1560 2001-12-17 Akim Demaille <akim@epita.fr>
1562 * src/output.c (output_obstack): Be static and rename as...
1563 (format_obstack): this, to avoid any confusion with files.c's
1565 * src/reader.h (muscle_obstack): Move to...
1566 * src/output.h: here, since it's defined in output.c.
1568 2001-12-17 Akim Demaille <akim@epita.fr>
1570 * src/output.c (action_row, save_column, default_goto)
1571 (sort_actions, matching_state, pack_vector): Better variable
1574 2001-12-17 Akim Demaille <akim@epita.fr>
1576 * src/output.c: Various formatting changes.
1578 2001-12-17 Akim Demaille <akim@epita.fr>
1580 * src/files.c (output_files): Free the output_obstack.
1581 * src/main.c (main): Call print and print_graph conditionally.
1582 * src/print.c (print): Work unconditionally.
1583 * src/print_graph.c (print_graph): Work unconditionally.
1584 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1586 2001-12-16 Marc Autret <autret_m@epita.fr>
1588 * src/output.c (actions_output): Fix. When we use %no-lines,
1589 there is one less line per action.
1591 2001-12-16 Marc Autret <autret_m@epita.fr>
1593 * src/bison.simple: Remove a useless #line directive.
1594 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1595 * src/output.c (get_lines_number): New.
1596 (output_parser): Adjust, now takes care about the lines of a
1599 (actions_output): Computes the number of lines taken by actions.
1600 (output_master_parser): Insert new skeleton which is the name of
1601 the output parser file name.
1603 2001-12-15 Marc Autret <autret_m@epita.fr>
1605 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1607 2001-12-15 Marc Autret <autret_m@epita.fr>
1609 * src/output.c (output_gram): Keep track of the hairy one.
1611 2001-12-15 Akim Demaille <akim@epita.fr>
1613 Make `make distcheck' work.
1615 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1616 system.h which uses libgettext.h.
1618 2001-12-15 Akim Demaille <akim@epita.fr>
1620 * src/nullable.c (set_nullable): Useless rules must be skipped,
1621 otherwise, since we range over their symbols, we might look at a
1622 nonterminal which no longer ``exists'', i.e., it is not counted in
1623 `nvars', hence we overflow our arrays.
1625 2001-12-15 Akim Demaille <akim@epita.fr>
1627 The header can also be produced directly, without any obstack!
1630 * src/files.c, src/files.h (defines_obstack): Remove.
1631 (compute_header_macro): Global.
1632 (defines_obstack_save): Remove.
1633 * src/reader.c (parse_union_decl): No longer output to
1634 defines_obstack: its content can be found in the `stype' muscle
1636 (output_token_translations): Merge into...
1637 (symbols_output): this.
1639 (symbols_save): this.
1641 * src/output.c (header_output): New.
1644 2001-12-15 Akim Demaille <akim@epita.fr>
1646 * src/reader.c (parse_union_decl): Instead of handling two obstack
1647 simultaneously, use one to define the `stype' muscle, and use the
1648 value of the latter to fill defines_obstack.
1649 (copy_comment): Remove.
1650 (copy_comment2): Work for a single obstack.
1652 (copy_comment): this.
1654 2001-12-15 Akim Demaille <akim@epita.fr>
1656 * src/lex.c, src/lex.h (xgetc): No longer static.
1657 * src/reader.c (parse_union_decl): Revamp.
1659 2001-12-15 Akim Demaille <akim@epita.fr>
1661 Still making progress in separating Bison into (i) input, (ii)
1662 process, (iii) output: now we can directly output the parser file
1663 without using table_obstack at all.
1665 * src/files.c, src/files.h (table_obstack): Bye bye.
1666 (parser_file_name): New.
1667 * src/files.c (compute_output_file_names): Compute it.
1668 * src/output.c (actions_output, output_parser)
1669 (output_master_parser): To a file instead of an obstack.
1671 2001-12-15 Akim Demaille <akim@epita.fr>
1673 Attach actions to rules, instead of pre-outputting them to
1676 * src/gram.h (rule_t): action and action_line are new members.
1677 * src/reader.c (symbol_list): Likewise.
1678 (copy_action): Save the actions within the rule.
1679 (packgram): Save them in rule_table.
1680 * src/output.c (actions_output): New.
1681 (output_parser): Use it on `%%actions'.
1682 (output_rule_data): Don't free rule_table.
1684 (prepare): Don't save the `action' muscle.
1685 * src/bison.simple: s/%%action/%%actions/.
1687 2001-12-15 Akim Demaille <akim@epita.fr>
1689 * src/reader.c (copy_action): When --yacc, don't append a `;'
1690 to the user action: let it fail if lacking.
1691 Suggested by Arnold Robbins and Tom Tromey.
1693 2001-12-14 Akim Demaille <akim@epita.fr>
1695 * src/lex.c (literalchar): Simply return the char you decoded, non
1696 longer mess around with obstacks and int pointers.
1699 2001-12-14 Akim Demaille <akim@epita.fr>
1701 * src/lex.c (literalchar): Don't escape the special characters,
1702 just decode them, and keep them as char (before, eol was output as
1703 the 2 char string `\n' etc.).
1704 * src/output.c (output_rule_data): Use quotearg to output the
1707 2001-12-13 Paul Eggert <eggert@twinsun.com>
1709 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1710 Do not infringe on the global user namespace when using C++.
1711 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1712 All uses of `fprintf' and `stderr' changed.
1714 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1716 2001-12-13 Akim Demaille <akim@epita.fr>
1718 The computation of nullable is broken: it doesn't handle empty
1721 * tests/torture.at (GNU AWK Grammar): New.
1722 * tests/sets.at (Nullable): New.
1723 * src/nullable.c (set_nullable): Instead of blindly looping over
1724 `ritems', loop over the rules, and then over their rhs's.
1726 Work around Autotest bugs.
1728 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1729 frame, because Autotest understand lines starting with a `+' as
1730 traces from the shell. Then, they are not processed properly.
1731 Admittedly an Autotest bug, but we don't have time to wait for
1732 Autotest to catch up.
1733 * tests/regression.at (Broken Closure): Adjust to the new table
1736 * tests/sets.at: here.
1738 2001-12-13 Akim Demaille <akim@epita.fr>
1740 * src/closure.c (closure): Use nrules instead of playing tricks
1743 2001-12-13 Akim Demaille <akim@epita.fr>
1745 * src/print.c (print_actions): Output the handling of `$' as the
1746 traces do: shifting the token EOF. Before EOF was treated as a
1748 * tests/regression.at: Adjust some tests.
1749 * src/print_graph.c (print_core): Complete the set of items via
1750 closure. The next-to-final and final states are still unsatisfying,
1751 but that's to be addressed elsewhere.
1752 No longer output the rule numbers, but do output the state number.
1753 A single loop for the shifts + gotos is enough, but picked a
1754 distinct color for each.
1755 (print_graph): Initialize and finalize closure.
1757 2001-12-13 Akim Demaille <akim@epita.fr>
1759 * src/reader.c (readgram): Remove dead code, an strip useless
1761 (get_type): Remove, unused.
1763 2001-12-12 Akim Demaille <akim@epita.fr>
1765 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1766 on that of lib/error.c.
1768 2001-12-12 Akim Demaille <akim@epita.fr>
1770 Some hosts don't like `/' in includes.
1772 * src/system.h: Include libgettext.h without qualifying the path.
1773 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1776 2001-12-11 Marc Autret <autret_m@epita.fr>
1778 * src/output.c (output_parser): Remove useless muscle.
1780 2001-12-11 Marc Autret <autret_m@epita.fr>
1782 * src/bison.simple: Remove #line just before %%epilogue. It
1783 is now handled in ...
1784 * src/reader.c (read_additionnal_code): Add the output of a
1785 #line for the epilogue.
1787 2001-12-10 Marc Autret <autret_m@epita.fr>
1789 * src/reader.c (copy_definition): Re-use CPP-outed code which
1790 replace precedent remove.
1791 * src/bison.simple: Remove #line before %%prologue because
1792 %%input-line is wrong at this time.
1794 2001-12-10 Marc Autret <autret_m@epita.fr>
1796 * src/reader.c (symbols_output): Clean up.
1797 * src/output.c (output_gram, output): Clean up.
1799 2001-12-10 Akim Demaille <akim@epita.fr>
1801 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1802 * src/LR0.c (set_state_table): here.
1803 * src/lalr.c (lalr): Call it.
1805 2001-12-10 Akim Demaille <akim@epita.fr>
1807 * src/state.h (shifts): Remove the `number' member: shifts are
1808 attached to state, hence no longer need to be labelled with a
1811 2001-12-10 Akim Demaille <akim@epita.fr>
1813 Now that states have a complete set of members, the linked list of
1814 shifts is useless: just fill directly the state's shifts member.
1816 * src/state.h (shifts): Remove the `next' member.
1817 * src/LR0.c (first_state, last_state): Remove.
1819 (augment_automaton): Don't look for the shifts that must be added
1820 a shift on EOF: it is those of the state we looked for! But now,
1821 since shifts are attached, it is no longer needed to looking
1822 merely by its id: its number.
1824 2001-12-10 Akim Demaille <akim@epita.fr>
1826 * src/LR0.c (augment_automaton): Better variable locality.
1827 Remove an impossible branch: if there is a state corresponding to
1828 the start symbol being shifted, then there is shift for the start
1829 symbol from the initial state.
1831 2001-12-10 Akim Demaille <akim@epita.fr>
1833 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1834 only when appropriate: when insert_start_shifting_state' is not
1836 * tests/regression.at (Rule Line Numbers): Adjust.
1838 2001-12-10 Akim Demaille <akim@epita.fr>
1840 * src/LR0.c (augment_automaton): Now that all states have shifts,
1841 merge the two cases addition shifts to the initial state.
1843 2001-12-10 Akim Demaille <akim@epita.fr>
1845 * src/lalr.c (set_state_table): Move to...
1847 * src/lalr.c (lalr): Don't call it...
1848 * src/LR0.c (generate_states): do it.
1849 * src/LR0.h (first_state): Remove, only the table is used.
1851 2001-12-10 Akim Demaille <akim@epita.fr>
1853 * src/LR0.h (first_shift, first_reduction): Remove.
1854 * src/lalr.c: Don't use first_shift: find shifts through the
1857 2001-12-10 Akim Demaille <akim@epita.fr>
1859 * src/LR0.c: Attach shifts to states as soon as they are
1861 * src/lalr.c (set_state_table): Instead of assigning shifts to
1862 state, just assert that the mapping was properly done.
1864 2001-12-10 Akim Demaille <akim@epita.fr>
1866 * src/LR0.c (insert_start_shift): Rename as...
1867 (insert_start_shifting_state): this.
1868 (insert_eof_shifting_state, insert_accepting_state): New.
1869 (augment_automaton): Adjust.
1870 Better locality of the variables.
1871 When looking if the start_symbol is shifted from the initial
1872 state, using `while (... symbol != start_symbol ...)' sounds
1873 better than `while (... symbol < start_symbol ...)': If fail
1874 to see how the order between symbols could be relevant!
1876 2001-12-10 Akim Demaille <akim@epita.fr>
1878 * src/getargs.h: Don't declare `spec_name_prefix' and
1879 `spec_file_prefix', declared by src/files.h.
1880 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1881 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1882 * src/output.c (prepare): Adjust.
1883 * src/reader.c (symbols_output): Likewise.
1884 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1886 2001-12-10 Akim Demaille <akim@epita.fr>
1888 * src/muscle_tab.c (muscle_init): NULL is a better default than
1891 2001-12-10 Akim Demaille <akim@epita.fr>
1893 * src/reader.c (reader): Calling symbols_output once is enough.
1895 2001-12-10 Akim Demaille <akim@epita.fr>
1897 Now that states have a complete set of members, the linked list of
1898 reductions is useless: just fill directly the state's reductions
1901 * src/state.h (struct reductions): Remove member `number' and
1903 * src/LR0.c (first_reduction, last_reduction): Remove.
1904 (save_reductions): Don't link the new reductions, store them in
1906 * src/lalr.c (set_state_table): No need to attach reductions to
1907 states, it's already done.
1908 * src/output.c (output_actions): No longer free the shifts, then
1909 the reductions, then the states: free all the states and their
1912 2001-12-10 Akim Demaille <akim@epita.fr>
1914 * src/options.c (OPTN, DRTV, BOTH): New.
1915 (option_table): Use them.
1917 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1918 the job of system.h.
1919 * src/options.c: Don't include stdio.h and xalloc.h for the same
1922 2001-12-10 Akim Demaille <akim@epita.fr>
1924 * src/output.c (output, prepare): Make sure the values of the
1925 muscles `action' and `prologue' are 0-terminated.
1927 2001-12-10 Akim Demaille <akim@epita.fr>
1929 Clean up GCC warnings.
1931 * src/reader.c (copy_action): `buf' is not used.
1932 (parse_skel_decl): Be static.
1933 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1934 * src/options.h (create_long_option_table): Have a real prototype.
1935 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1936 (hash_delete_at): Return const void *.
1937 Adjust casts to preserve the const.
1939 2001-12-10 Akim Demaille <akim@epita.fr>
1941 * configure.in: Require 2.52g.
1942 M4 is not needed, but AUTOM4TE is.
1944 * tests/Makefile.am: Adjust.
1946 2001-12-10 Akim Demaille <akim@epita.fr>
1948 One structure for states is enough, even though theoretically
1949 there are LR(0) states and LALR(1) states.
1951 * src/lalr.h (state_t): Remove.
1952 (state_table): Be state_t **, not state_t *.
1953 * src/state.h (core, CORE_ALLOC): Rename as...
1954 (state_t, STATE_ALLOC): this.
1955 Add the LALR(1) members: shifts, reductions, errs.
1956 * src/LR0.c (state_table): Rename as...
1957 (state_hash): this, to avoid name clashes with the global
1959 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1960 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1962 2001-12-10 Akim Demaille <akim@epita.fr>
1964 Bison dumps core on bash.y.
1965 Reported by Pascal Bart.
1967 * src/warshall.c (bitmatrix_print): New.
1969 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1970 j must be the outer loop.
1971 * tests/regression.at (Broken Closure): New.
1973 2001-12-05 Akim Demaille <akim@epita.fr>
1975 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1977 Reported by Peter Hámorský.
1979 2001-12-05 Akim Demaille <akim@epita.fr>
1981 * src/conflicts.c (err_table): Remove.
1982 (resolve_sr_conflict): Adjust.
1983 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1985 (state_t.reductions, state_t.shifts): this.
1987 2001-12-05 Akim Demaille <akim@epita.fr>
1989 * src/reduce.c (reduce_grammar_tables): No longer disable the
1990 removal of useless rules via CPP but via `if (0)', so that the
1991 compiler still check the code is valid.
1992 For instance, it should have noticed `rline' no longer exists: use
1993 the `line' member of rule_t.
1994 * src/gram.c (dummy, rline): Remove, unused.
1996 2001-12-05 Akim Demaille <akim@epita.fr>
1998 * src/output.c (pack_vector): Use assert, not berror.
1999 * src/main.c (berror): Remove, unused.
2001 2001-12-05 Akim Demaille <akim@epita.fr>
2003 New experimental feature: if --verbose --trace output all the
2004 items of a state, not only its kernel.
2006 * src/print.c (print_core): If `trace_flag', then invoke closure
2007 before outputting the items of the state (print_core is no longer
2008 a correct name them).
2009 (print_results): Invoke new_closure/free_closure if needed.
2011 2001-12-05 Akim Demaille <akim@epita.fr>
2013 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
2014 * src/closure.c, src/closure.h (itemsetsize): Rename as...
2015 (nitemset): for consistency with the rest of the project.
2017 2001-12-05 Akim Demaille <akim@epita.fr>
2019 * src/closure.c (print_closure): Improve.
2020 (closure): Use it for printing input and output.
2022 2001-12-05 Akim Demaille <akim@epita.fr>
2024 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
2025 indexed by nonterminals.
2027 2001-12-05 Akim Demaille <akim@epita.fr>
2029 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
2031 * src/warshall.h: Remove accidental duplication of the content.
2033 2001-12-05 Akim Demaille <akim@epita.fr>
2035 * src/closure.c (set_fderives): De-obfuscate.
2037 2001-12-05 Akim Demaille <akim@epita.fr>
2039 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
2041 2001-12-05 Akim Demaille <akim@epita.fr>
2043 * src/closure.c (set_firsts): De-obfuscate.
2045 2001-12-05 Akim Demaille <akim@epita.fr>
2047 * src/output.c (action_row): De-obfuscate
2048 using the good o' techniques: arrays not pointers, variable
2049 locality, BITISSET, RESETBIT etc.
2051 2001-12-05 Akim Demaille <akim@epita.fr>
2053 Pessimize the code to simplify it: from now on, all the states
2054 have a valid SHIFTS, which NSHIFTS is possibly 0.
2056 * src/LR0.c (shifts_new): Be global and move to..
2057 * src/state.c, src/state.h: here.
2058 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
2059 * src/print_graph: Adjust.
2061 2001-12-05 Akim Demaille <akim@epita.fr>
2063 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
2064 * src/conflicts.c: Use it.
2065 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
2066 incorrectly ``simplified''.
2068 2001-12-05 Akim Demaille <akim@epita.fr>
2070 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
2071 using the good o' techniques: arrays not pointers, variable
2072 locality, BITISSET, RESETBIT etc.
2074 2001-12-05 Akim Demaille <akim@epita.fr>
2076 * src/state.h (SHIFT_SYMBOL): New.
2077 * src/conflicts.c: Use it to deobfuscate.
2079 2001-12-05 Akim Demaille <akim@epita.fr>
2081 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
2082 (print_reductions): De-obfuscate using the good o' techniques:
2083 arrays not pointers, variable locality, BITISSET.
2085 2001-12-05 Akim Demaille <akim@epita.fr>
2087 * src/conflicts.c (print_reductions): Arrays, not pointers.
2090 2001-12-05 Akim Demaille <akim@epita.fr>
2092 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2094 2001-12-05 Akim Demaille <akim@epita.fr>
2096 * src/conflicts.c (print_reductions): Improve variable locality.
2098 2001-12-05 Akim Demaille <akim@epita.fr>
2100 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2102 2001-12-05 Akim Demaille <akim@epita.fr>
2104 * src/conflicts.c (print_reductions): Improve variable locality.
2106 2001-12-05 Akim Demaille <akim@epita.fr>
2108 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
2109 * src/lalr.c: Use them.
2111 2001-12-05 Akim Demaille <akim@epita.fr>
2113 * src/LR0.c (augment_automaton): Formatting changes.
2114 Better variable locality.
2116 2001-12-05 Akim Demaille <akim@epita.fr>
2118 * src/lalr.c (matrix_print): New.
2119 (transpose): Use it.
2120 Use arrays instead of pointers.
2122 2001-12-05 Akim Demaille <akim@epita.fr>
2124 * src/lalr.c (maxrhs): Move to...
2125 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
2126 * src/lalr.c (build_relations): Adjust.
2128 2001-12-05 Akim Demaille <akim@epita.fr>
2130 * src/lalr.c (transpose): Free the memory allocated to the
2131 argument, as it is replaced by the results by the unique caller.
2132 (build_relations): Merely invoke transpose: it handles the memory
2134 Improve variable locality.
2135 Avoid variables used as mere abbreviations.
2136 (compute_lookaheads): Use arrays instead of pointers.
2138 2001-12-05 Akim Demaille <akim@epita.fr>
2140 * src/lalr.c (initialize_F): Improve variable locality.
2141 Avoid variables used as mere abbreviations.
2143 2001-12-05 Akim Demaille <akim@epita.fr>
2145 * src/derives.c (print_derives): Display the ruleno.
2146 * src/lalr.c (initialize_F, transpose): Better variable locality
2147 to improve readability.
2148 Avoid variables used as mere abbreviations.
2150 2001-12-05 Akim Demaille <akim@epita.fr>
2152 * src/lalr.c (traverse): Use arrays instead of pointers.
2154 2001-12-05 Akim Demaille <akim@epita.fr>
2156 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
2157 the handling of squeue.
2158 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2160 2001-12-05 Akim Demaille <akim@epita.fr>
2162 Because useless nonterminals are now kept alive (instead of being
2163 `destroyed'), we now sometimes examine them, and store information
2164 related to them. Hence we need to know their number, and adjust
2167 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
2169 * src/LR0.c (allocate_itemsets): The memory allocated to
2170 `symbol_count' was used for two different purpose: once to count
2171 the number of occurrences of each symbol, and later reassigned to
2172 `shift_symbol', containing the symbol that can be shifted from a
2174 Deobfuscate, i.e., allocate, use and free `symbol_count' here
2176 (new_itemsets): Allocate `shift_symbol' here.
2177 (allocate_itemsets): symbol_count includes useless nonterminals.
2179 (free_storage): Use `free', not `XFREE', for pointers that cannot
2182 2001-12-05 Akim Demaille <akim@epita.fr>
2184 * src/nullable.c (set_nullable): Deobfuscate the handling of
2186 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2188 2001-12-05 Akim Demaille <akim@epita.fr>
2190 * src/gram.c, src/gram.h (ritem_print): New.
2191 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
2192 (This useless function was defined only to work around VMS linkers
2193 that can't handle compilation units with variables only).
2194 * src/reduce.c (dump_grammar): Use it to trace the construction of
2197 2001-12-04 Paul Eggert <eggert@twinsun.com>
2199 * src/bison.simple (union yyalloc): Change member names
2200 to be the same as the stack names.
2201 (yyparse): yyptr is now union yyalloc *, not char *.
2202 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
2203 and may generate better code on some machines.
2204 (yystpcpy): Use prototype if __STDC__ is defined, not just
2205 if __cplusplus is defined.
2207 2001-11-30 Akim Demaille <akim@epita.fr>
2209 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
2210 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
2211 Gettext doesn't compile cleanly, and dies with -Werror.
2212 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
2213 Include WARNING_CFLAGS here.
2214 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
2215 before being defined.
2217 2001-11-27 Paul Eggert <eggert@twinsun.com>
2219 * lib/quotearg.h (quotearg_n, quotearg_n_style):
2220 First arg is int, not unsigned.
2221 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2222 (SIZE_MAX, UINT_MAX): New macros.
2223 (quotearg_n_options): Abort if N is negative.
2224 Avoid overflow check on hosts where size_t is 64 bits and int
2225 is 32 bits, as overflow is impossible there.
2226 Fix off-by-one typo that caused unnecessary reallocation.
2228 2001-11-29 Paul Eggert <eggert@twinsun.com>
2230 Name space cleanup in generated parser.
2232 * doc/bison.texinfo (Bison Parser): Discuss system headers
2233 and their effect on the user name space.
2236 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
2237 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
2238 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
2240 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
2241 on user names when possible.
2243 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
2244 Simplify test for whather <alloca.h> exists.
2246 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
2248 (<stdio.h>): Include if YYDEBUG.
2250 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
2251 ! defined (yyoverflow) && ! defined (yymemcpy).
2253 (yymemcpy, yyparse): Rename local variables as needed so that
2254 they all begin with 'yy'.
2256 (yystrlen, yystpcpy): New functions.
2258 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
2261 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
2262 instead of relying on string.h functions. Use YYSTACK_ALLOC
2263 and YYSTACK_FREE instead of malloc and free.
2265 2001-11-30 Akim Demaille <akim@epita.fr>
2267 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
2268 before their first uses.
2269 (YYBISON, YYPURE): Move to the top of the output.
2271 2001-11-30 Akim Demaille <akim@epita.fr>
2273 * tests/reduce.at (Useless Nonterminals): Fix.
2275 2001-11-30 Akim Demaille <akim@epita.fr>
2277 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
2278 if body instead of `;' to pacify GCC's warnings.
2280 2001-11-30 Akim Demaille <akim@epita.fr>
2282 Instead of mapping the LHS of unused rules to -1, keep the LHS
2283 valid, but flag the rules as invalid.
2285 * src/gram.h (rule_t): `useful' is a new member.
2286 * src/print.c (print_grammar): Adjust.
2287 * src/derives.c (set_derives): Likewise.
2288 * src/reader.c (packgram, reduce_output): Likewise.
2289 * src/reduce.c (reduce_grammar_tables): Likewise.
2290 * tests/reduce.at (Underivable Rules, Useless Rules): New.
2292 2001-11-30 Akim Demaille <akim@epita.fr>
2294 * src/reduce.c (reduce_output): Formatting changes.
2295 * src/print.c (print_results, print_grammar): Likewise.
2296 * tests/regression.at (Rule Line Numbers)
2297 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2299 2001-11-30 Akim Demaille <akim@epita.fr>
2301 * src/reduce.c (nonterminals_reduce): Instead of throwing away
2302 useless nonterminals, move them at the end of the symbol arrays.
2303 (reduce_output): Adjust.
2304 * tests/reduce.at (Useless Nonterminals): Adjust.
2306 2001-11-30 Akim Demaille <akim@epita.fr>
2308 * src/reduce.c: Various comment/formatting changes.
2309 (nonterminals_reduce): New, extracted from...
2310 (reduce_grammar_tables): here.
2311 (reduce_grammar): Call nonterminals_reduce.
2313 2001-11-29 Paul Eggert <eggert@twinsun.com>
2315 * src/bison.simple (YYSTACK_REALLOC): Remove.
2316 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2317 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2319 (union yyalloc): New type.
2320 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2321 an arbitrary restriction on hosts where size_t is wider than int.
2323 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2324 a parser stack overflow. Allocate just one block of memory for all
2325 three stacks, instead of allocating three blocks; this typically is
2326 faster and reduces fragmentation.
2328 Do not limit the number of items in the stack to a value that fits
2329 in 'int', as this is an arbitrary limit on hosts with 64-bit
2330 size_t and 32-bit int.
2332 2001-11-29 Marc Autret <autret_m@epita.fr>
2334 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2335 of defining YYERROR_VERBOSE.
2336 [AT_DATA]: $4 is now out of C declarations in the prologue.
2338 2001-11-28 Marc Autret <autret_m@epita.fr>
2340 * src/reader.c (parse_dquoted_param): New.
2341 (parse_skel_decl): Use it.
2342 * src/lex.h: Add its prototype.
2343 * src/lex.c (literalchar): Become not static.
2345 2001-11-28 Marc Autret <autret_m@epita.fr>
2347 * src/output.h: And put its extern declaration here.
2348 * src/output.c (error_verbose): Define here.
2349 (prepare): Echo name modification.
2350 * src/getargs.h: Clean its extern declaration.
2351 * src/getargs.c (error_verbose_flag): Remove.
2352 (getargs): Remove case 'e'.
2353 * src/options.c (option_table): 'error-verbose' is now seen as simple
2357 * src/reader.c (read_declarations): Remove case tok_include.
2358 (parse_include_decl): Remove.
2359 * src/lex.h (token_t): Remove tok_include.
2360 * src/options.c (option_table): 'include' is now a simple command line
2363 2001-11-28 Marc Autret <autret_m@epita.fr>
2365 * src/bison.simple: Adjust muscle names.
2366 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2367 * src/output.c (prepare): s/_/-/ for the muscles names.
2368 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2370 2001-11-28 Marc Autret <autret_m@epita.fr>
2372 * src/bison.simple: Fix debug.
2373 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2375 2001-11-28 Akim Demaille <akim@epita.fr>
2377 * src/LR0.c (shifts_new): New.
2378 (save_shifts, insert_start_shift, augment_automaton): Use it.
2380 2001-11-28 Akim Demaille <akim@epita.fr>
2382 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2385 2001-11-28 Akim Demaille <akim@epita.fr>
2387 * src/closure.c (closure): Instead of looping over word in array
2388 then bits in words, loop over bits in array.
2390 2001-11-28 Akim Demaille <akim@epita.fr>
2392 * src/closure.c (closure): No longer optimize the special case
2393 where all the bits of `ruleset[r]' are set to 0, to make the code
2396 2001-11-28 Akim Demaille <akim@epita.fr>
2398 * src/closure.c (closure): `r' and `c' are new variables, used to
2399 de-obfuscate accesses to RULESET and CORE.
2401 2001-11-28 Akim Demaille <akim@epita.fr>
2403 * src/reduce.c (reduce_print): Use ngettext.
2404 (dump_grammar): Improve the trace accuracy.
2406 2001-11-28 Akim Demaille <akim@epita.fr>
2408 * src/reduce.c (dump_grammar): Don't translate trace messages.
2410 2001-11-28 Akim Demaille <akim@epita.fr>
2412 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2413 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2414 as all tags are free'ed afterwards.
2417 2001-11-27 Paul Eggert <eggert@twinsun.com>
2419 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2420 use alloca when we didn't want to, and vice versa.
2422 2001-11-27 Marc Autret <autret_m@epita.fr>
2424 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2426 * src/output.c (prepare): Remove its update.
2428 2001-11-27 Marc Autret <autret_m@epita.fr>
2430 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2433 2001-11-27 Marc Autret <autret_m@epita.fr>
2435 * src/bison.simple: Remove YYERROR_VERBOSE using.
2436 Use %%error_verbose.
2437 (yyparse): Likewise.
2438 * src/output.c (prepare): Give its final value.
2439 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2440 * src/getargs.h: Add its extern declaration.
2441 * src/getargs.c (error_verbose_flag): New int.
2442 (getargs): Update to catch new case.
2443 * src/options.c (option_table): 'error-verbose' is a new option.
2444 (shortopts): Update.
2446 2001-11-27 Akim Demaille <akim@epita.fr>
2448 * src/system.h: Use intl/libgettext.h.
2449 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2451 2001-11-27 Akim Demaille <akim@epita.fr>
2453 * tests/torture.at (Exploding the Stack Size with Malloc):
2454 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2456 2001-11-27 Akim Demaille <akim@epita.fr>
2458 * src/files.c: Include error.h.
2459 Reported by Hans Aberg.
2461 2001-11-26 Marc Autret <autret_m@epita.fr>
2463 * src/reader.c (parse_include_decl): New, not yet implemented.
2464 (read_declarations): Add case tok_include.
2465 * src/getargs.h (include): Add its extern definition.
2466 * src/getargs.c (include): New const char *.
2467 (getargs): Add case '-I'.
2468 * src/options.c (option_table): Add include as command line and
2470 * src/lex.h (token_t): Add tok_include.
2472 2001-11-26 Akim Demaille <akim@epita.fr>
2474 * src/reader.c (readgram): Make sure rules for mid-rule actions
2475 have a lineno equal to that of their host rule.
2476 Reported by Hans Aberg.
2477 * tests/regression.at (Rule Line Numbers): New.
2479 2001-11-26 Akim Demaille <akim@epita.fr>
2481 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2484 2001-11-26 Akim Demaille <akim@epita.fr>
2486 * src/complain.c, src/complain.h (error): Remove, provided by
2489 2001-11-26 Akim Demaille <akim@epita.fr>
2491 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2492 issue an error message.
2493 * tests/regression.at (Invalid %directive): New.
2494 Reported by Hans Aberg.
2496 2001-11-26 Akim Demaille <akim@epita.fr>
2498 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2499 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2501 2001-11-26 Akim Demaille <akim@epita.fr>
2503 * src/conflicts.c (conflicts_print): Don't complain at all when
2504 there are no reduce/reduce conflicts, and as many shift/reduce
2505 conflicts as expected.
2506 * tests/regression.at (%expect right): Adjust.
2508 2001-11-23 Akim Demaille <akim@epita.fr>
2510 * lib/alloca.c: Update, from fileutils.
2512 2001-11-23 Akim Demaille <akim@epita.fr>
2514 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2516 2001-11-23 Akim Demaille <akim@epita.fr>
2518 * src/system.h: Include alloca.h.
2519 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2521 2001-11-23 Akim Demaille <akim@epita.fr>
2523 * src/print_graph.c (print_actions): Remove `rule', unused.
2524 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2525 pacify GCC's signed < unsigned warnings.
2526 * src/closure.c (itemsetsize): Likewise.
2527 * src/reader.c (symbol_list_new): Static.
2529 2001-11-23 Akim Demaille <akim@epita.fr>
2531 Attaching lineno to buckets is stupid, since only one copy of each
2532 symbol is kept, only the line of the first occurrence is kept too.
2534 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2535 * src/reader.c (rline_allocated): Remove, unused.
2536 (symbol_list): Have a `line' member.
2537 (symbol_list_new): New.
2539 * src/print.c (print_grammar): Output the rule line numbers.
2540 * tests/regression.at (Solved SR Conflicts)
2541 (Unresolved SR Conflicts): Adjust.
2542 Reported by Hans Aberg.
2544 2001-11-22 Marc Autret <autret_m@epita.fr>
2546 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2548 2001-11-22 Marc Autret <autret_m@epita.fr>
2550 * src/muscle_tab.c (muscle_init): Remove initialization of
2552 * src/output.c (output_master_parser): Do it here.
2554 2001-11-20 Akim Demaille <akim@epita.fr>
2557 * configure.in (ALL_LINGUAS): Adjust.
2558 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2559 longer contains strings to translate.
2561 2001-11-19 Akim Demaille <akim@epita.fr>
2563 * src/conflicts.c (conflicts_print): Add a missing \n.
2565 2001-11-19 Akim Demaille <akim@epita.fr>
2567 * src/nullable.c (nullable_print): New.
2568 (set_nullable): Call it when tracing.
2569 Better locality of variables.
2571 2001-11-19 Akim Demaille <akim@epita.fr>
2573 * src/print.c (print_actions): Better locality of variables.
2575 2001-11-19 Akim Demaille <akim@epita.fr>
2577 * src/derives.c (print_derives): Fix and enrich.
2578 * src/closure.c (print_fderives): Likewise.
2580 2001-11-19 Akim Demaille <akim@epita.fr>
2582 * src/closure.c (itemsetend): Remove, replaced with...
2585 2001-11-19 Akim Demaille <akim@epita.fr>
2587 * src/LR0.c (kernel_end): Remove, replaced with...
2590 2001-11-19 Akim Demaille <akim@epita.fr>
2592 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2595 2001-11-19 Akim Demaille <akim@epita.fr>
2597 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2599 2001-11-19 Akim Demaille <akim@epita.fr>
2601 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2603 * src/LR0.c: Likewise.
2604 (allocate_itemsets): Use arrays instead of pointers to clarify.
2606 2001-11-19 Akim Demaille <akim@epita.fr>
2608 * src/getargs.c (statistics_flag): Replace with...
2610 (longopts): Accept --trace instead of --statistics.
2611 * src/getargs.h, src/options.c: Adjust.
2612 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2613 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2615 2001-11-19 Akim Demaille <akim@epita.fr>
2617 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2618 pointers to clarify the code.
2619 (save_reductions, save_shifts): Factor common parts of alternatives.
2621 2001-11-19 Akim Demaille <akim@epita.fr>
2623 * src/LR0.c (new_state, get_state): Complete TRACE code.
2624 * src/closure.c: Include `reader.h' to get `tags', needed by the
2626 Rename the conditional DEBUG as TRACE.
2627 Output consistently TRACEs to stderr, not stdout.
2628 * src/derives.c: Likewise.
2629 * src/reduce.c: (inaccessable_symbols): Using if is better style
2631 Use `#if TRACE' instead of `#if 0' for tracing code.
2633 2001-11-19 Akim Demaille <akim@epita.fr>
2635 * src/system.h (LIST_FREE, shortcpy): New.
2636 * src/LR0.c: Use them.
2637 * src/output.c (free_itemsets, free_reductions, free_shifts):
2638 Remove, replaced by LIST_FREE.
2640 2001-11-19 Akim Demaille <akim@epita.fr>
2642 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2643 (REDUCTIONS_ALLOC): New.
2644 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2647 2001-11-19 Akim Demaille <akim@epita.fr>
2649 * src/LR0.c (new_state): Complete trace code.
2650 * src/nullable.c (set_nullable): Don't translate traces.
2652 2001-11-19 Akim Demaille <akim@epita.fr>
2654 * src/print_graph.c (print_core): Better locality of variables.
2655 * src/print.c (print_core): Likewise.
2657 2001-11-19 Akim Demaille <akim@epita.fr>
2659 * src/vcg.c: You do the output, so you are responsible of the
2660 handling of VCG syntax, in particular: use quotearg.
2661 * src/print_graph.c: Don't.
2662 (print_actions): Don't output the actions as part of the nodes,
2663 since that's the job of the edges.
2664 (print_state): Don't output by hand: fill the node description,
2665 and ask for its output.
2667 2001-11-19 Akim Demaille <akim@epita.fr>
2669 * src/bison.simple (yyparse): When verbosely reporting an error,
2670 no longer put additional quotes around token names.
2671 * tests/calc.at: Adjust.
2673 2001-11-19 Akim Demaille <akim@epita.fr>
2675 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2676 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2677 * src/output.c: Adjust.
2679 2001-11-19 Akim Demaille <akim@epita.fr>
2681 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2683 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2685 2001-11-19 Akim Demaille <akim@epita.fr>
2687 * src/gram.h (rule_t): New.
2689 (rrhs, rlhs): Remove, part of state_t.
2690 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2691 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2692 * src/reader.c, src/reduce.c: Adjust.
2694 2001-11-19 Akim Demaille <akim@epita.fr>
2696 * src/reader.c (symbols_output): New, extracted from...
2697 (packsymbols): Here.
2700 2001-11-19 Akim Demaille <akim@epita.fr>
2702 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2703 (maxrhs): this new function.
2705 2001-11-19 Akim Demaille <akim@epita.fr>
2707 * src/lalr.c (F): New macro to access the variable F.
2710 2001-11-19 Akim Demaille <akim@epita.fr>
2712 * src/lalr.h (LA): New macro to access the variable LA.
2713 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2714 * src/lalr.c: Adjust.
2716 2001-11-19 Akim Demaille <akim@epita.fr>
2718 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2719 (set_state_table): handle the `lookaheads' members.
2721 2001-11-19 Akim Demaille <akim@epita.fr>
2723 * src/lalr.h (lookaheads): Removed array, whose contents is now
2725 (state_t): this structure.
2726 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2729 2001-11-19 Akim Demaille <akim@epita.fr>
2731 * src/lalr.h (consistent): Removed array, whose contents is now
2733 (state_t): this structure.
2734 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2737 2001-11-19 Akim Demaille <akim@epita.fr>
2739 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2740 contents are now members of...
2741 (state_t): this structure.
2742 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2745 2001-11-19 Akim Demaille <akim@epita.fr>
2747 * src/lalr.h (state_t): New.
2748 (state_table): Be a state_t * instead of a core **.
2749 (accessing_symbol): Remove, part of state_t.
2750 * src/lalr.c: Adjust.
2751 (set_accessing_symbol): Merge into...
2752 (set_state_table): this.
2753 * src/print_graph.c, src/conflicts.c: Adjust.
2755 2001-11-14 Akim Demaille <akim@epita.fr>
2757 * tests/calc.at, tests/output.at, tests/regression.at,
2758 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2759 now the tests are run in private dirs, therefore AC_CLEANUP and
2760 family can be simplified to 0-ary.
2761 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2762 use abs. path to find config.h.
2763 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2764 stderr, there can be way too much random noise.
2765 Instead pass -Werror to GCC and rely on the exit status.
2766 Reported by Wolfram Wagner.
2768 2001-11-14 Akim Demaille <akim@epita.fr>
2770 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2771 defined only if yyoverflow is defined, to avoid `warning: unused
2773 Reported by The Test Suite.
2775 2001-11-14 Akim Demaille <akim@epita.fr>
2777 * src/print.c: Include reduce.h.
2778 Reported by Hans Aberg.
2780 2001-11-14 Akim Demaille <akim@epita.fr>
2782 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2783 Revert a previous patch: these are really const.
2784 * src/conflicts.c (conflict_report): Additional useless pair of
2785 braces to pacify GCC's warnings for `if () if () {} else {}'.
2786 * src/lex.c (parse_percent_token): Replace equal_offset with
2789 Be sure to strdup `arg' when used, since there is no reason for
2790 token_buffer not to change.
2792 2001-11-14 Akim Demaille <akim@epita.fr>
2794 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2796 * src/main.c (main): Use them.
2797 Suggested by Hans Aberg.
2799 2001-11-12 Akim Demaille <akim@epita.fr>
2801 * src/system.h (ngettext): Now that we use ngettext, be sure to
2802 provide a default definition when NLS are not used.
2804 2001-11-12 Akim Demaille <akim@epita.fr>
2806 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2807 Use @kbd to denote user input.
2808 (Language and Grammar): ANSIfy the example.
2809 Adjust its layout for info/notinfo.
2810 (Location Tracking Calc): Output error messages to stderr.
2811 Output locations in a more GNUtically correct way.
2812 Fix a couple of Englishos.
2813 Adjust @group/@end group pairs.
2815 2001-11-12 Akim Demaille <akim@epita.fr>
2817 %expext was not functioning at all.
2819 * src/conflicts.c (expected_conflicts): Set to -1.
2820 (conflict_report): Use ngettext.
2821 (conflicts_print): Check %expect and make its violation an error.
2822 * doc/bison.texinfo (Expect Decl): Adjust.
2823 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2824 * tests/regression.at (%expect not enough, %expect right)
2825 (%expect too much): New.
2827 2001-11-12 Akim Demaille <akim@epita.fr>
2829 * tests/regression.at (Conflicts): Rename as...
2830 (Unresolved SR Conflicts): this.
2831 (Solved SR Conflicts): New.
2833 2001-11-12 Akim Demaille <akim@epita.fr>
2835 * src/reduce.c (print_results): Rename as...
2836 (reduce_output): This.
2837 Output to OUT, passed as argument, instead of output_obstack.
2838 (dump_grammar): Likewise.
2841 (reduce_grammar): No longer call reduce_output, since...
2842 * src/print.c (print_results): do it.
2843 * src/main.c (main): Call reduce_free;
2845 2001-11-12 Akim Demaille <akim@epita.fr>
2847 * src/conflicts.c (print_reductions): Accept OUT as argument.
2848 Output to it, not to output_obstack.
2849 * src/print.c (print_actions): Adjust.
2851 2001-11-12 Akim Demaille <akim@epita.fr>
2853 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2854 the result instead of using...
2855 (src_total, rrc_total, src_count, rrc_count): Remove.
2856 (any_conflicts): Remove.
2857 (print_conflicts): Split into...
2858 (conflicts_print, conflicts_output): New.
2859 * src/conflicts.h: Adjust.
2860 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2861 * src/print.c (print_grammar): Issue `\n' between two rules.
2862 * tests/regression.at (Conflicts): New.
2863 Reported by Tom Lane.
2865 2001-11-12 Akim Demaille <akim@epita.fr>
2867 * tests/regression.at (Invalid input): Remove, duplicate with
2868 ``Invalid input: 1''.
2870 2001-11-12 Akim Demaille <akim@epita.fr>
2872 * tests/torture.at (AT_DATA_STACK_TORTURE)
2873 (Exploding the Stack Size with Alloca)
2874 (Exploding the Stack Size with Malloc): New.
2876 2001-11-12 Akim Demaille <akim@epita.fr>
2878 * src/bison.simple (YYSTACK_REALLOC): New.
2879 (yyparse) [!yyoverflow]: Use it and free the old stack.
2880 Reported by Per Allansson.
2882 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2884 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2885 define CPP macro, which substitute YYSTYPE by yystype.
2886 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2887 with yyltype/YYLTYPE. This allows inclusion of the generated
2888 header within the parser if the compiler, such as GGC, accepts
2889 multiple equivalent #defines.
2892 2001-11-05 Akim Demaille <akim@epita.fr>
2894 * src/reader.c (symbols_output): New, extracted from...
2895 (packsymbols): here.
2898 2001-11-05 Akim Demaille <akim@epita.fr>
2900 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2902 2001-11-05 Akim Demaille <akim@epita.fr>
2904 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2907 2001-11-05 Akim Demaille <akim@epita.fr>
2909 * src/options.h (struct option_table_struct): set_flags is void*.
2910 * src/options.c (longopts): Support `--output' and `%output'.
2912 * src/lex.h (tok_setopt): Remove, replaced with...
2913 (tok_intopt, tok_stropt): these new guys.
2914 * src/lex.c (getopt.h): Not needed.
2915 (token_buffer, unlexed_token_buffer): Not const.
2916 (percent_table): Promote `-' over `_' in directive names.
2917 Active `%name-prefix', `file-prefix', and `output'.
2918 (parse_percent_token): Accept possible arguments to directives.
2919 Promote `-' over `_' in directive names.
2921 2001-11-04 Akim Demaille <akim@epita.fr>
2923 * doc/bison.texinfo (Decl Summary): Split the list into
2924 `directives for grammars' and `directives for bison'.
2926 Add description of `%name-prefix', `file-prefix', and `output'.
2927 Promote `-' over `_' in directive names.
2928 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2929 Simplify the description of `--name-prefix'.
2930 Promote `-' over `_' in directive names.
2931 Promote `--output' over `--output-file'.
2932 Fix the description of `--defines'.
2933 * tests/output.at: Exercise %file-prefix and %output.
2935 2001-11-02 Akim Demaille <akim@epita.fr>
2937 * doc/refcard.tex: Update.
2939 2001-11-02 Akim Demaille <akim@epita.fr>
2941 * src/symtab.h (SUNDEF): New.
2942 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2943 stand for `uninitialized', instead of 0.
2944 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2945 * src/lex.c (lex): Adjust.
2947 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2949 Let yylex return it instead of a plain 0.
2950 Reported by Dick Streefland.
2952 2001-11-02 Akim Demaille <akim@epita.fr>
2954 * tests/regression.at (Mixing %token styles): New test.
2956 2001-11-02 Akim Demaille <akim@epita.fr>
2958 * src/reader.c (parse_thong_decl): Formatting changes.
2959 (token_translations_init): New, extracted from...
2960 (packsymbols): Here.
2963 2001-11-01 Akim Demaille <akim@epita.fr>
2965 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2966 Check that `9foo.y' produces correct cpp guards.
2967 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2971 2001-11-01 Akim Demaille <akim@epita.fr>
2973 * tests/regression.at (Invalid input: 2): New.
2974 * src/lex.c (unlexed_token_buffer): New.
2975 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2979 2001-11-01 Akim Demaille <akim@epita.fr>
2981 * tests/calc.at: Catch up with 1.30.
2982 * configure.in: Bump to 1.49a.
2983 Adjust to newer Autotest.
2985 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2987 * src/conflicts.c: Move global variables rrc_total and src_total ...
2988 (print_conflicts): here.
2989 * src/output.c (output): Free global variable user_toknums.
2990 * src/lex.c (token_obstack): Become static.
2992 2001-10-18 Akim Demaille <akim@epita.fr>
2994 * tests/atlocal.in (GCC): Add.
2995 * tests/calc.at: s/m4_match/m4_bmatch/.
2996 s/m4_patsubst/m4_bpatsubst/.
2997 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2998 * configure.in: AC_SUBST(GCC).
3000 2001-10-14 Marc Autret <autret_m@epita.fr>
3002 * src/options.c (create_long_option_table): Fix.
3004 2001-10-10 Akim Demaille <akim@epita.fr>
3006 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
3008 2001-10-04 Akim Demaille <akim@epita.fr>
3010 * src/reader.c (parse_union_decl): Push the caracters in
3011 union_obstack, not attrs_obstack.
3013 2001-10-04 Akim Demaille <akim@epita.fr>
3015 Merge in the branch 1.29.
3017 * src/reader.c (packsymbols): Use a temporary obstack for
3018 `%%tokendef', since output_stack is already used elsewhere.
3020 2001-10-02 Akim Demaille <akim@epita.fr>
3024 2001-10-02 Akim Demaille <akim@epita.fr>
3028 2001-10-02 Akim Demaille <akim@epita.fr>
3030 * tests/regression.at (Invalid CPP headers): New.
3031 From Alexander Belopolsky.
3032 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
3034 2001-10-02 Akim Demaille <akim@epita.fr>
3036 * tests/regression.at (Invalid input): New.
3037 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
3040 2001-10-02 Akim Demaille <akim@epita.fr>
3042 * tests/calc.at: Now that --debug works, the tests must be adjusted.
3044 2001-10-02 Akim Demaille <akim@epita.fr>
3046 * src/output.c (output_parser): Assert `skeleton'.
3047 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
3051 2001-10-01 Marc Autret <autret_m@epita.fr>
3053 * src/lex.h: Echo modifications.
3054 * src/lex.c (unlex): Parameter is now token_t.
3057 2001-10-01 Marc Autret <autret_m@epita.fr>
3059 * src/main.c: Include lex.h.
3062 2001-09-29 Akim Demaille <akim@epita.fr>
3064 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
3066 2001-09-28 Akim Demaille <akim@epita.fr>
3068 * tests/testsuite.at: Update to newer Autotest.
3069 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
3071 2001-09-27 Akim Demaille <akim@epita.fr>
3073 Position independent wrapper.
3075 * tests/bison: Remove.
3076 * tests/bison.in: New.
3077 * configure.in: Adjust.
3079 2001-09-27 Paul Eggert <eggert@twinsun.com>
3081 Port quotearg fixes from tar 1.13.24.
3083 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3085 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3086 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3088 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
3089 * m4/mbrtowc.m4: New file.
3090 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
3091 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
3093 2001-09-27 Akim Demaille <akim@epita.fr>
3097 2001-09-27 Akim Demaille <akim@epita.fr>
3101 2001-09-25 Akim Demaille <akim@epita.fr>
3103 * src/system.h: Include `xalloc.h'.
3104 Remove it from the C files.
3105 * src/files.c (output_files): Free the obstacks.
3106 * src/lex.c (init_lex): Rename as...
3109 * src/main.c (main): Use it.
3111 2001-09-24 Marc Autret <autret_m@epita.fr>
3113 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
3114 to output informations in fout (FILE*).
3115 (open_graph, close_graph): Likewise.
3116 (output_graph, output_edge, output_node): Likewise.
3117 * src/vcg.h: Update function prototypes.
3118 * src/print_graph.c (print_graph): Open output graph file.
3119 (print_actions): Adjust.
3120 * src/files.h: Remove extern declaration.
3121 * src/files.c: Remove graph_obstack declaration.
3122 (open_files): Remove graph_obstack initialization.
3123 (output_files): Remove graph_obstack saving.
3125 2001-09-24 Marc Autret <autret_m@epita.fr>
3127 * src/files.c (compute_output_file_names): Fix.
3129 2001-09-24 Marc Autret <autret_m@epita.fr>,
3130 Akim Demaille <akim@epita.fr>
3132 * src/reader.c (reader): Remove call to free_symtab ().
3133 * src/main.c (main): Call it here.
3135 * src/conflicts.c (initialize_conflicts): Rename as...
3136 (solve_conflicts): this.
3137 * src/print.c (print_core, print_actions, print_state)
3138 (print_grammar): Dump to a file instead a `output_obstack'.
3139 (print_results): Dump `output_obstack', and then proceed with the
3141 * src/files.c (compute_output_file_names, close_files): New.
3142 (output_files): Adjust.
3143 * src/main.c (main): Adjust.
3145 2001-09-23 Marc Autret <autret_m@epita.fr>
3147 * src/files.c (compute_header_macro): Computes header macro name
3148 from spec_defines_file when given.
3150 2001-09-23 Marc Autret <autret_m@epita.fr>
3152 * src/files.c (output_files): Add default extensions.
3154 2001-09-22 Akim Demaille <akim@epita.fr>
3156 * src/conflicts.c (finalize_conflicts): Rename as...
3157 (free_conflicts): this.
3159 2001-09-22 Akim Demaille <akim@epita.fr>
3161 * src/gram.c (gram_free): Rename back as...
3163 (output_token_translations): Free `token_translations'.
3164 * src/symtab.c (free_symtab): Free the tag field.
3166 2001-09-22 Akim Demaille <akim@epita.fr>
3168 Remove `translations' as it is always set to true.
3170 * src/gram.h: Adjust.
3171 * src/reader.c (packsymbols, parse_token_decl): Adjust
3172 * src/print.c (print_grammar): Adjust.
3173 * src/output.c (output_token_translations): Adjust.
3174 * src/lex.c (lex): Adjust.
3175 * src/gram.c: Be sure the set pointers to NULL.
3176 (dummy): Rename as...
3179 2001-09-22 Akim Demaille <akim@epita.fr>
3181 * configure.in: Invoke AM_LIB_DMALLOC.
3182 * src/system.h: Use dmalloc.
3183 * src/LR0.c: Be sure to have pointers initialized to NULL.
3184 (allocate_itemsets): Allocate kernel_items only if needed.
3186 2001-09-22 Akim Demaille <akim@epita.fr>
3188 * configure.in: Bump to 1.29b.
3189 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
3190 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
3191 need xmalloc.c in calc.y.
3194 2001-09-21 Akim Demaille <akim@epita.fr>
3197 * Makefile.maint, config/config.guess, config/config.sub,
3198 * config/missing: Update from masters.
3199 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
3201 * configure.in (ALL_LINGUAS): Add `tr'.
3203 2001-09-21 Akim Demaille <akim@epita.fr>
3205 * tests/Makefile.am (package.m4): Move to...
3206 ($(srcdir)/$(TESTSUITE)): here.
3208 2001-09-20 Akim Demaille <akim@epita.fr>
3210 * src/complain.c: No longer try to be standalone: use system.h.
3211 Don't assume __STDC__ is defined to 1. Just test if it is defined.
3212 * src/complain.h: Likewise.
3213 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
3214 Remove the unused variable `n'.
3215 From Albert Chin-A-Young.
3217 2001-09-18 Marc Autret <autret_m@epita.fr>
3219 * doc/bison.1: Update.
3220 * doc/bison.texinfo (Bison Options): Update --defines and --graph
3222 (Option Cross Key): Update.
3225 2001-09-18 Marc Autret <autret_m@epita.fr>
3227 * tests/regression.at: New test (comment in %union).
3229 2001-09-18 Marc Autret <autret_m@epita.fr>
3231 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
3233 Reported by Keith Browne.
3235 2001-09-18 Marc Autret <autret_m@epita.fr>
3237 * tests/output.at: Add tests for --defines and --graph.
3239 2001-09-18 Marc Autret <autret_m@epita.fr>
3241 * tests/output.at: Removes tests of %{header,src}_extension features.
3243 2001-09-18 Akim Demaille <akim@epita.fr>
3245 * tests/Makefile.am (package.m4): New.
3246 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
3247 (_AT_CHECK_CALC_ERROR): Likewise.
3248 Factor the `, ' part of verbose error messages.
3250 2001-09-18 Marc Autret <autret_m@epita.fr>
3252 * src/getargs.c (longopts): Declare --defines and --graph as options
3253 with optional arguments.
3254 * src/files.h: Add extern declarations.
3255 * src/files.c (spec_graph_file, spec_defines_file): New.
3256 (output_files): Update.
3257 Remove CPP-outed code.
3259 2001-09-18 Marc Autret <autret_m@epita.fr>
3261 Turn off %{source,header}_extension feature.
3263 * src/files.c (compute_exts_from_gf): Update.
3264 (compute_exts_from_src): Update.
3265 (output_files): CPP-out useless code.
3266 * src/files.h: Remove {header,source}_extension extern declarations.
3267 * src/reader.c (parse_dquoted_param): CPP-out.
3268 (parse_header_extension_decl): Remove.
3269 (parse_source_extension_decl): Remove.
3270 (read_declarations): Remove cases tok_{hdrext,srcext}.
3271 * src/lex.c (percent_table): Remove {header,source}_extension entries.
3272 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
3274 2001-09-10 Akim Demaille <akim@epita.fr>
3276 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
3277 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
3278 (AT_CHECK_OUTPUT): this.
3279 Merely check ls' exit status, its output is useless.
3281 2001-09-10 Akim Demaille <akim@epita.fr>
3283 * tests/calc.at: Use m4_match.
3284 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
3286 2001-09-10 Marc Autret <autret_m@epita.fr>,
3287 Akim Demaille <akim@epita.fr>
3289 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
3291 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
3293 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
3294 * src/lex.h: Adjust prototype.
3295 (token_t): Add `tok_undef'.
3296 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
3297 (parse_percent_token): Now returns token_t.
3298 Add default statement in switch.
3299 (lex): Separate `c' as an input variable, from the token_t result
3301 (unlexed): Is a token_t.
3303 2001-09-10 Akim Demaille <akim@epita.fr>
3305 * configure.in: Bump to 1.29a.
3307 2001-09-07 Akim Demaille <akim@epita.fr>
3311 2001-08-30 Akim Demaille <akim@epita.fr>
3313 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3314 * m4/atconfig.m4: Remove.
3315 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3317 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3318 m4_if, m4_patsubst, and m4_regexp.
3319 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3320 `input' file instead of echo.
3322 2001-08-29 Akim Demaille <akim@epita.fr>
3326 2001-08-29 Akim Demaille <akim@epita.fr>
3330 2001-08-29 Paul Eggert <eggert@twinsun.com>
3332 * src/bison.simple (yyparse): Don't take the address of an
3333 item before the start of an array, as that doesn't conform to
3336 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3338 * doc/bison.texinfo (Location Tracking Calc): New node.
3340 2001-08-29 Paul Eggert <eggert@twinsun.com>
3342 * src/output.c (output): Do not define const, as this now
3343 causes more problems than it cures.
3345 2001-08-29 Akim Demaille <akim@epita.fr>
3347 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3349 Be sure to tag the `detailmenu'.
3351 2001-08-29 Akim Demaille <akim@epita.fr>
3353 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3354 download in a tmp dir.
3356 2001-08-28 Marc Autret <autret_m@epita.fr>
3358 * config/depcomp: New file.
3360 2001-08-28 Marc Autret <autret_m@epita.fr>
3362 * doc/bison.1 (mandoc): Adjust.
3363 From Juan Manuel Guerrero.
3365 2001-08-28 Marc Autret <autret_m@epita.fr>
3367 * src/print_graph.c (print_state): Fix.
3369 2001-08-27 Marc Autret <autret_m@epita.fr>
3371 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3373 Echo modifications to the functions prototypes.
3374 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3376 2001-08-27 Marc Autret <autret_m@epita.fr>
3378 * src/vcg.c: Include `xalloc.h'.
3379 (add_colorentry): New.
3380 (add_classname): New.
3381 (add_infoname): New.
3382 * src/vcg.h: Add new prototypes.
3384 2001-08-27 Akim Demaille <akim@epita.fr>
3386 * Makefile.maint: Sync. again with CVS Autoconf.
3388 2001-08-27 Akim Demaille <akim@epita.fr>
3390 * Makefile.maint: Formatting changes.
3391 (po-update, cvs-update, update): New targets.
3394 2001-08-27 Akim Demaille <akim@epita.fr>
3396 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3397 * Makefile.maint: Sync. with CVS Autoconf.
3399 2001-08-27 Marc Autret <autret_m@epita.fr>
3401 * src/vcg.h (struct infoname_s): New.
3402 (struct colorentry_s): New.
3403 (graph_s): New fields {vertical,horizontal}_order in structure.
3404 Add `infoname' field.
3405 Add `colorentry' field;
3406 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3407 (G_HORIZONTAL_ORDER): New.
3409 (G_COLORENTRY): New.
3410 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3411 Add output of `infoname'.
3412 Add output of `colorentry'.
3414 2001-08-27 Marc Autret <autret_m@epita.fr>
3416 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3417 This one shadowed a global parameter.
3419 2001-08-24 Marc Autret <autret_m@epita.fr>
3421 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3422 instead of `unsigned'.
3423 (print_state): Do not call obstack_object_size () in obstack_grow ()
3424 to avoid macro variables shadowing.
3426 2001-08-23 Marc Autret <autret_m@epita.fr>
3428 * src/lex.c (percent_table): Typo: s/naem/name/.
3430 Normalize new options declarations.
3432 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3434 * tests/suite.at: Exercise %header_extension and %source_extension.
3436 2001-08-16 Marc Autret <autret_m@epita.fr>
3438 * src/reader.c (parse_dquoted_param): New.
3439 (parse_header_extension_decl): Use it.
3440 (parse_source_extension_decl): Likewise.
3442 2001-08-16 Marc Autret <autret_m@epita.fr>
3444 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3445 (get_xxxx_str): Use assert () instead of complain ().
3446 Remove return invokations in default cases.
3447 (get_decision_str): Modify default behaviour. Remove second argument.
3448 Echo modifications on calls.
3449 (output_graph): Fix.
3451 2001-08-16 Marc Autret <autret_m@epita.fr>
3453 * src/getargs.c (usage): Update with ``-g, --graph''.
3455 2001-08-16 Marc Autret <autret_m@epita.fr>
3457 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3458 (Option Cross Key): Likewise.
3459 * doc/bison.1: Update.
3461 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3463 * src/output.c (output_master_parser): Don't finish action_obstack.
3464 (output_parser): Don't care about the muscle action, here.
3465 (prepare): Copy the action_obstack in the action muscle.
3466 (output): Free action_obstack.
3468 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3470 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3471 will contain `%union' declaration.
3472 (parse_union_decl): Delete #line directive output.
3473 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3474 informations about %union.
3475 (parse_union_decl): Copy the union_obstack in the muscle stype.
3476 * src/bison.simple: Add new #line directive.
3477 Add typdef %%stype YYSTYPE.
3479 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3481 * src/bison.simple: Add new `#line' directive.
3483 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3485 * src/bison.simple: New `#line' directive.
3486 * src/output.c (output_parser): Support new dynamic muscle input_line.
3488 2001-09-22 Marc Autret <autret_m@epita.fr>
3490 * src/output.c (output_master_parser): New.
3491 (output_parser): Be more re-entrant.
3493 2001-09-21 Marc Autret <autret_m@epita.fr>
3495 * src/reader.c (copy_definition, parse_union_decl): Update and use
3497 (copy_action): Likewise.
3498 Use obstack_1grow ().
3499 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3501 2001-09-21 Marc Autret <autret_m@epita.fr>
3503 * src/options.c (option_table): Adjust.
3504 * src/lex.c (parse_percent_token): Fix.
3506 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3508 * src/options.c (symtab.h): Include it, need by lex.h.
3510 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3512 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3513 is now an option_table_struct*.
3514 (option_strcmp): New function option_strcmp.
3515 (parse_percent_token): Call option_strcmp.
3516 * src/getargs.c (xalloc.h, options.h): Include it.
3517 (getargs): Call create_long_option_table.
3518 (getargs): Free longopts at the end of the function.
3519 (shortopts): Move in options.c.
3520 * src/options.c (create_long_option_table): New function. Convert
3521 information from option_table to option structure.
3522 * src/reader.c (options.h): Include it.
3524 * src/Makefile.am: Adjust.
3525 * src/options.c (option_table): Create from longopts and percent_table.
3526 * src/getargs.c (longopts): Delete.
3527 * src/lex.c (struct percent_table_struct): Delete.
3528 (percent_table): Delete.
3529 (options.h): Include it.
3530 * src/options.c: Create.
3531 * src/options.h: Create.
3532 Declare enum opt_access_e.
3533 Define struct option_table_struct.
3535 2001-09-20 Marc Autret <autret_m@epita.fr>
3537 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3540 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3542 * src/bison.simple: s/%%filename/%%skeleton.
3543 * src/muscle_tab.c (getargs.h): Include it.
3544 (muscle_init): Insert new muscle skeleton.
3546 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3548 * src/output.c (output_parser): Delete unused variable actions_dumped.
3550 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3552 * src/output.c (output): Delete call to reader_output_yylsp.
3553 * src/reader.c (reader): Likewise.
3554 * src/reader.h: Delete declaration of reader_output_yylsp.
3556 2001-09-02 Marc Autret <autret_m@epita.fr>
3558 * src/reader.c: Include muscle_tab.h.
3559 (parse_union_decl): Update.
3560 (parse_macro_decl): Rename parse_muscle_decl.
3561 Update to use renamed functions and variable.
3562 (read_declarations, copy_action, read_additionnal_code, : Updated
3563 with correct variables and functions names.
3564 (packsymbols, reader): Likewise.
3566 * src/reader.h (muscle_obstack): Extern declaration update.
3568 * src/output.c: Include muscle_tab.h
3569 In all functions using macro_insert, change by using muscle_insert ().
3570 (macro_obstack): Rename muscle_obstack.
3571 Echo modifications in the whole file.
3572 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3573 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3574 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3576 * src/muscle_tab.h: Update double inclusion macros.
3577 (macro_entry_s): Rename muscle_entry_s.
3580 * src/muscle_tab.c: Include muscle_tab.h.
3581 Rename macro_tabble to muscle_table.
3582 (mhash1, mhash2, mcmp): Use muscle_entry.
3583 (macro_init): Rename muscle_init. Update.
3584 (macro_insert): Rename muscle_insert. Update.
3585 (macro_find): Rename muscle_find. Update.
3587 * src/main.c: Include muscle_tab.h.
3588 (main): Call muscle_init ().
3589 * src/Makefile.am (bison_SOURCES): Echo modifications.
3591 2001-09-02 Marc Autret <autret_m@epita.fr>
3593 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3595 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3597 2001-09-02 Marc Autret <autret_m@epita.fr>
3599 * src/macrotab.c, src/macrotab.h: Remove.
3601 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3603 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3606 2001-09-01 Marc Autret <autret_m@epita.fr>
3608 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3609 to an explicit value to activate the feature. We do it here.
3611 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3613 * src/output.c (prepare): Delete the `filename' muscule insertion.
3614 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3615 (parse_union_decl): Likewise.
3616 * src/macrotab.c (macro_init): Initialize filename by infile.
3618 2001-08-31 Marc Autret <autret_m@epita.fr>
3620 * src/bison.simple (YYLSP_NEEDED): New definition.
3621 * src/output.c (prepare): Add macro insertion of `locations_flag'
3623 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3625 * src/output.c (prepare): Delete insertion of previous muscles,
3626 and insert the `prefix' muscles.
3627 * src/macrotab.c (macro_init): Likewise.
3628 (macro_init): Initialization prefix directive by `yy'.
3629 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3630 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3631 yylval, yydebug, yyerror, yynerrs and yyparse.
3632 New directive `#define' to substitute yydebug, ... with option
3635 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3637 * src/main.c (main): Standardize.
3638 * src/output.c (output_table_data, output_parser): Likewise.
3639 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3641 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3643 * src/reader.c (read_additionnal_code): Rename %%user_code to
3645 * src/output.c (output): Rename %%declarations to %%prologue.
3646 * src/bison.simple: Echo modifications.
3648 2001-08-31 Marc Autret <autret_m@epita.fr>
3650 * src/reader.c (readgram): CleanUp.
3651 (output_token_defines): Likewise.
3652 (packsymbols): Likewise.
3654 * src/output.c (output): CPP-out useless code.
3656 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3658 * src/reader.c (reader): Delete obsolete call to function
3659 output_trailers and output_headers.
3660 * src/output.h: Remove obsolete functions prototypes of output_headers
3661 and output_trailers.
3663 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3665 * src/main.c: Include macrotab.h.
3666 * src/macrotab.h (macro_entry_s): Constify fields.
3667 Adjust functions prototypes.
3668 * src/macrotab.c (macro_insert): Constify key and value.
3669 (macro_find): Constify key.
3670 (macro_insert): Include 'xalloc.h'
3671 (macro_insert): Use XMALLOC.
3672 (macro_find): Constify return value.
3673 * src/output.c (output_table_data): Rename table to table_data.
3674 (output_parser): Constify macro_key, macro_value.
3676 2001-08-30 Marc Autret <autret_m@epita.fr>
3678 * src/reader.c (parse_skel_decl): New.
3679 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3680 * src/lex.h (token_t): New token `tok_skel'.
3681 * src/lex.c (percent_table): Add skeleton option entry.
3684 2001-08-29 Marc Autret <autret_m@epita.fr>
3686 * src/bison.simple: Add %%user_code directive at the end.
3687 * src/reader.c (read_additionnal_code): New.
3689 * src/output.c (output_program): Remove.
3692 2001-08-28 Marc Autret <autret_m@epita.fr>
3694 * src/output.c (output_actions): Clean up.
3695 (output_gram): CPP-out useless code.
3696 * src/reader.c (reader): Clean up, CPP-out useless code.
3698 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3700 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3702 * src/bison.simple: Add `%%definitions'.
3704 2001-08-28 Marc Autret <autret_m@epita.fr>
3706 * config/depcomp: New file.
3708 2001-08-27 Paul Eggert <eggert@twinsun.com>
3710 * src/bison.simple (yyparse): Don't take the address of an
3711 item before the start of an array, as that doesn't conform to
3714 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3716 * src/output.c (output): Remove the initialization of the macro
3717 obstack. It was done too late here.
3719 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3721 (reader): Initialize the macro obstack here, since we need it to grow
3722 '%define' directives.
3724 * src/reader.h: Declare the macro obstack as extern.
3726 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3728 * src/output.c (output_parser): Fix. Store single '%' characters in
3729 the output obstack instead of throwing them away.
3731 2001-08-27 Akim Demaille <akim@epita.fr>
3733 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3735 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3737 * lib/Makefile.am: Adjust.
3739 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3741 * src/bison.simple: Update and add '%%' directives.
3743 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3745 * src/reader.c (reader): Remove calls to 'output_headers' and
3746 'output_trailers'. Remove some C output.
3747 (readgram): Disable a piece of code that was writing a default
3748 definition for 'YYSTYPE'.
3749 (reader_output_yylsp): Remove.
3750 (packsymbols): Output token defintions to a macro.
3751 (copy_definition): Disable C output.
3753 * src/reader.c (parse_macro_decl): New function used to parse macro
3755 (copy_string2): Put the body of copy_string into this new function.
3756 Add a parameter to let the caller choose whether he wants to copy the
3757 string delimiters or not.
3758 (copy_string): Be a simple call to copy_string2 with the last argument
3760 (read_declarations): Add case for macro definition.
3761 (copy_identifier): New.
3762 (parse_macro_decl): Read macro identifiers using copy_identifier
3765 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3767 * src/output.c (prepare): Add prefixed names.
3768 (output_parser): Output semantic actions.
3769 (output_parser): Fix bug on '%%line' directives.
3771 * src/output.c (output_headers): Remove. The C code printed by this
3772 function should now be in the skeletons.
3773 (output_trailers): Remove.
3774 (output): Disable call to 'reader_output_yylsp'.
3775 (output_rule_data): Do not output tables to the table obstack.
3777 * src/output.c: Remove some C dedicated output.
3778 Improve the use of macro and output obstacks.
3779 (output_defines): Remove.
3781 * src/output.c (output_token_translations): Associate 'translate'
3782 table with a macro. No output to the table obstack.
3783 (output_gram): Same for 'rhs' and 'prhs'.
3784 (output_stos): Same for 'stos'.
3785 (output_rule_data): Same for 'r1' and 'r2'.
3786 (token_actions): Same for 'defact'.
3787 (goto_actions): Same for 'defgoto'.
3788 (output_base): Same for 'pact' and 'pgoto'.
3789 (output_table): Same for 'table'.
3790 (output_check): Same for 'check'.
3792 * src/output.c (output_table_data): New function.
3793 (output_short_table): Remove.
3794 (output_short_or_char_table): Remove.
3796 * src/output.c (output_parser): Replace most of the skeleton copy code
3797 with something new. Skeletons are now processed character by character
3798 rather than line by line, and Bison looks for '%%' macros. This is the
3799 first step in making Bison's output process (a lot) more flexible.
3800 (output_parser): Use the macro table.
3802 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3804 * src/main.c (main): Initialize the macro table.
3806 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3808 * src/lex.c (percent_table): Add tok_define.
3809 * src/lex.h: Add tok_define.
3811 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3813 * src/macrotab.c: New file.
3814 * src/macrotab.h: New file.
3815 * src/Makefile.am: Update.
3817 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3819 * lib/hash.c: New file.
3820 * lib/hash.h: New file.
3821 * lib/Makefile.am: Update.
3823 2001-08-15 Akim Demaille <akim@epita.fr>
3827 2001-08-15 Marc Autret <autret_m@epita.fr>
3829 * src/reader.c (readgram): Indent output macro YYSTYPE.
3830 (packsymbols): Likewise.
3831 (output_token_defines): Likewise.
3832 * src/files.c: Standardize.
3833 (compute_header_macro): New.
3834 (defines_obstack_save): New. Use compute_header_macro.
3835 (output_files): Update. Use defines_obstack_save.
3837 2001-08-15 Akim Demaille <akim@epita.fr>
3839 * doc/bison.texinfo (Table of Symbols): Document
3842 2001-08-15 Akim Demaille <akim@epita.fr>
3844 * missing: Update from CVS Automake.
3845 * config/config.guess, config/config.sub, config/texinfo.tex:
3846 Update from gnu.org.
3848 2001-08-15 Akim Demaille <akim@epita.fr>
3850 * Makefile.maint: Sync with CVS Autoconf.
3852 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3854 * doc/bison.texinfo: Include GNU Free Documentation License from
3856 * doc/fdl.texi: Add to package.
3858 2001-08-14 Marc Autret <autret_m@epita.fr>
3860 Turn on %{source,header}_extension features.
3862 * src/lex.c (percent_table): Un-CPP out header_extension and
3864 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3865 (compute_exts_from_src): Remove conditions. It restores priorities
3868 2001-08-14 Marc Autret <autret_m@epita.fr>
3870 * src/files.c (compute_base_names): Add extensions computing when
3871 `--file-prefix' used.
3872 Standardize function calls.
3874 2001-08-13 Marc Autret <autret_m@epita.fr>
3876 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3877 defining it (defined but null disables alloca).
3879 2001-08-13 Marc Autret <autret_m@epita.fr>
3881 * src/bison.simple (_yy_memcpy): CPP reformat.
3883 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3885 * tests/atconfig.in (CPPFLAGS): Fix.
3887 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3889 * doc/bison.texinfo: Include GNU General Public License from
3891 * doc/gpl.texi: Add to package.
3893 2001-08-10 Marc Autret <autret_m@epita.fr>
3895 * src/print_graph.h: Fix.
3896 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3898 2001-08-10 Akim Demaille <akim@epita.fr>
3900 * src/system.h: Provide default declarations for stpcpy, strndup,
3903 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3905 * doc/bison.texinfo (Locations): Update @$ stuff.
3907 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3909 * src/bison.simple (YYLLOC_DEFAULT): Update.
3912 2001-08-08 Marc Autret <autret_m@epita.fr>
3914 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3915 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3916 Reported by Fabrice Bauzac.
3918 2001-08-08 Marc Autret <autret_m@epita.fr>
3920 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3921 * src/vcg.c (output_node): Fix.
3922 * src/vcg.h: Cleanup.
3923 * src/print_graph.c: Add comments.
3924 (node_output_size): New global variable. Simplify the formatting of
3925 the VCG graph output.
3926 (print_actions): Unused code is now used. It notifies the final state
3927 and no action states in the VCG graph. It also give the reduce actions.
3928 The `shift and goto' edges are red and the `go to state' edges are
3930 Get the current node name and node_obstack by argument.
3931 (node_obstack): New variable.
3932 (print_state): Manage node_obstack.
3933 (print_core): Use node_obstack given by argument.
3934 A node is not only computed here but in print_actions also.
3935 (print_graph): CPP out useless code instead of commenting it.
3937 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3939 * tests/atconfig.in (CPPFLAGS): Fix.
3941 2001-08-07 Akim Demaille <akim@epita.fr>
3943 * src/print_graph.c (quote): New.
3944 (print_core): Use it.
3946 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3948 * src/vcg.c (complain.h): Include it.
3949 Unepitaize `return' invocations.
3950 [NDEBUG] (main): Remove.
3951 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3952 * src/files.c (open_files): Initialize graph_obstack.
3953 * src/print_graph.c (print_actions): CPP out useless code.
3954 (print_core): Don't output the last `\n' in labels.
3956 * src/files.c (output_files): Output the VCG file.
3957 * src/main.c (main): Invoke print_graph ();
3959 2001-08-06 Marc Autret <autret_m@epita.fr>
3961 Automaton VCG graph output.
3962 Using option ``-g'' or long option ``--graph'', you can generate
3963 a gram_filename.vcg file containing a VCG description of the LALR (1)
3964 automaton of your grammar.
3966 * src/main.c: Call to print_graph() function.
3967 * src/getargs.h: Update.
3968 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3969 (graph_flag): New flag.
3971 (getargs): Add case `g'.
3972 * src/files.c (graph_obstack): New obstack struct.
3973 (open_files): Initialize new obstack.
3974 (output_files): Saves graph_obstack if required.
3975 * src/files.h (graph_obstack): New extern declaration.
3976 * src/Makefile.am: Add new source files.
3978 2001-08-06 Marc Autret <autret_m@epita.fr>
3980 * src/print_graph.c, src/print_graph.h (graph): New.
3981 * src/vcg.h: New file.
3982 * src/vcg.c: New file, VCG graph handling.
3984 2001-08-06 Marc Autret <autret_m@epita.fr>
3986 Add of %source_extension and %header_extension which specify
3987 the source or/and the header output file extension.
3989 * src/files.c (compute_base_names): Remove initialisation of
3990 src_extension and header_extension.
3991 (compute_exts_from_gf): Update.
3992 (compute_exts_from_src): Update.
3993 (output_files): Update.
3994 * src/reader.c (parse_header_extension_decl): New.
3995 (parse_source_extension_decl): New.
3996 (read_declarations): New case statements for the new tokens.
3997 * src/lex.c (percent_table): Add entries for %source_extension
3998 and %header_extension.
3999 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
4001 2001-08-06 Marc Autret <autret_m@epita.fr>
4003 * configure.in: Bump to 1.28c.
4004 * doc/bison.texinfo: Texinfo thingies.
4006 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
4008 * tests/atconfig.in (CPPFLAGS): Add.
4009 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
4011 2001-08-03 Akim Demaille <akim@epita.fr>
4015 2001-08-03 Akim Demaille <akim@epita.fr>
4017 * tests/Makefile.am (check-local): Ship testsuite.
4018 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
4021 2001-08-03 Akim Demaille <akim@epita.fr>
4023 * configure.in: Try using -Wformat when compiling.
4025 2001-08-03 Akim Demaille <akim@epita.fr>
4027 * configure.in: Bump to 1.28b.
4029 2001-08-03 Akim Demaille <akim@epita.fr>
4031 * src/complain.c: Adjust strerror_r portability issues.
4033 2001-08-03 Akim Demaille <akim@epita.fr>
4037 2001-08-03 Akim Demaille <akim@epita.fr>
4039 * src/getargs.c, src/getarg.h (skeleton)): Constify.
4040 * src/lex.c (literalchar): Avoid name clashes on `buf'.
4041 * src/getargs.c: Include complain.h.
4042 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
4043 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
4045 2001-08-03 Akim Demaille <akim@epita.fr>
4047 * src/reader.c (readgram): Display hidden chars in error messages.
4049 2001-08-03 Akim Demaille <akim@epita.fr>
4051 Update to gettext 0.10.39.
4053 2001-08-03 Akim Demaille <akim@epita.fr>
4055 * lib/strspn.c: New.
4057 2001-08-01 Marc Autret <autret_m@epita.fr>
4059 * doc/bison.texinfo: Update.
4060 * doc/bison.1 (mandoc): Update.
4061 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
4062 * src/files.c: Support output files extensions computing.
4063 (src_extension): New static variable.
4064 (header_extension): New static variable.
4066 (get_extension_index): New function, gets the index of an extension
4067 filename in a string.
4068 (compute_exts_from_gf): New function, computes extensions from the
4069 grammar file extension.
4070 (compute_exts_from_src): New functions, computes extensions from the
4071 C source file extension, file given by ``-o'' option.
4072 (compute_base_names): Update.
4073 (output_files): Update.
4075 2001-08-01 Robert Anisko <anisko_r@epita.fr>
4077 * doc/bison.texi: Document @$.
4078 (Locations): New section.
4080 2001-07-18 Akim Demaille <akim@epita.fr>
4082 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
4083 * config/prev-version.txt, config/move-if-change: New.
4084 * Makefile.am: Adjust.
4086 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
4088 * src/bison.simple (yyparse): Suppress warning `comparaison
4089 between signed and unsigned'.
4091 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
4093 * src/getargs.h (raw_flag): Remove.
4094 * src/getargs.c: Die on `-r'/`--raw'.
4095 * src/lex.c (parse_percent_token): Die on `%raw'.
4096 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
4097 * tests/calc.at: Suppress test with option `--raw'.
4099 2001-07-14 Akim Demaille <akim@epita.fr>
4102 * configure.in: Require Autoconf 2.50.
4103 Update to gettext 0.10.38.
4105 2001-03-16 Akim Demaille <akim@epita.fr>
4107 * doc/bison.texinfo: ANSIfy the examples.
4109 2001-03-16 Akim Demaille <akim@epita.fr>
4111 * getargs.c (skeleton): New variable.
4112 (longopts): --skeleton is a new option.
4113 (shortopts, getargs): -S is a new option.
4114 * getargs.h: Declare skeleton.
4115 * output.c (output_parser): Use it.
4117 2001-03-16 Akim Demaille <akim@epita.fr>
4119 * m4/strerror_r.m4: New.
4120 * m4/error.m4: Run AC_FUNC_STRERROR_R.
4121 * lib/error.h, lib/error.c: Update.
4123 2001-03-16 Akim Demaille <akim@epita.fr>
4125 * src/getargs.c (longopts): Clean up.
4127 2001-02-21 Akim Demaille <akim@epita.fr>
4129 * src/reader.c (gensym): `gensym_count' is your own.
4130 Use a static buf to create the symbol name, as token_buffer is no
4133 2001-02-08 Akim Demaille <akim@epita.fr>
4135 * src/conflicts.c (conflict_report): Be sure not to append to res
4136 between two calls, which could happen if both first sprintf were
4137 skipped, but not the first cp += strlen.
4139 2001-02-08 Akim Demaille <akim@epita.fr>
4141 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
4142 New, from fileutils 4.0.37.
4143 * configure.in: Require Autoconf 2.49c. I took some time before
4144 making this decision. This is the only way out for portability
4145 issues in Bison, it would mean way too much duplicate effort to
4146 import in Bison features implemented in 2.49c since 2.13.
4147 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
4149 2001-02-02 Akim Demaille <akim@epita.fr>
4151 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
4152 * lib/xalloc.h, lib/xmalloc.c: Update.
4154 2001-01-19 Akim Demaille <akim@epita.fr>
4156 Get rid of the ad hoc handling of token_buffer in the scanner: use
4159 * src/lex.c (token_obstack): New.
4160 (init_lex): Initialize it. No longer call...
4161 (grow_token_buffer): this. Remove it.
4162 Adjust all the places which used it to use the obstack.
4164 2001-01-19 Akim Demaille <akim@epita.fr>
4166 * src/lex.h: Rename all the tokens:
4167 s/\bENDFILE\b/tok_eof/g;
4168 s/\bIDENTIFIER\b/tok_identifier/g;
4170 Let them be enums, not #define, to ease debugging.
4171 Adjust all the code.
4173 2001-01-18 Akim Demaille <akim@epita.fr>
4175 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
4176 * src/lex.c (maxtoken, grow_token_buffer): Static.
4178 2001-01-18 Akim Demaille <akim@epita.fr>
4180 Since we now use obstacks, more % directives can be enabled.
4182 * src/lex.c (percent_table): Also accept `%yacc',
4183 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
4185 Handle the actions for `%semantic_parser' and `%pure_parser' here,
4186 instead of returning a token.
4187 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
4188 * src/reader.c (read_declarations): Adjust.
4189 * src/files.c (open_files): Don't call `compute_base_names', don't
4190 compute `attrsfile' since they depend upon data which might be
4191 *in* the input file now.
4192 (output_files): Do it here.
4193 * src/output.c (output_headers): Document the fact that this patch
4194 introduces a guaranteed SEGV for semantic parsers.
4195 * doc/bison.texinfo: Document them.
4196 * tests/suite.at: Exercise these %options.
4198 2000-12-20 Akim Demaille <akim@epita.fr>
4200 Also handle the output file (--verbose) with obstacks.
4202 * files.c (foutput): Remove.
4203 (output_obstack): New.
4204 Adjust all dependencies.
4205 * src/conflicts.c: Return a string.
4206 * src/system.h (obstack_grow_string): Rename as...
4207 (obstack_sgrow): this. Be ready to work with non literals.
4208 (obstack_fgrow4): New.
4210 2000-12-20 Akim Demaille <akim@epita.fr>
4212 * src/files.c (open_files): Fix the computation of short_base_name
4213 in the case of `-o foo.tab.c'.
4215 2000-12-20 Akim Demaille <akim@epita.fr>
4217 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
4218 (copy_dollar): Now that everything uses obstacks, get rid of the
4221 2000-12-20 Akim Demaille <akim@epita.fr>
4223 * src/files.c (open_files): Actually the `.output' file is based
4224 on the short_base_name, not base_name.
4225 * tests/suite.at (Checking output file names): Adjust.
4227 2000-12-20 Akim Demaille <akim@epita.fr>
4229 * src/bison.s1: Remove, we now use directly...
4230 * src/bison.simple: this.
4231 * src/Makefile.am: Use pkgdata instead of data.
4233 2000-12-20 Akim Demaille <akim@epita.fr>
4235 * src/files.c (guard_obstack): New.
4236 (open_files): Initialize it.
4237 (output_files): Dump it...
4238 * src/files.h: Export it.
4239 * src/reader.c (copy_guard): Use it.
4241 2000-12-19 Akim Demaille <akim@epita.fr>
4243 * src/files.c (outfile, defsfile, actfile): Removed as global
4245 (open_files): Don't compute them.
4246 (output_files): Adjust.
4247 (base_name, short_base_name): Be global.
4248 Adjust dependencies.
4250 2000-12-19 Akim Demaille <akim@epita.fr>
4252 * src/files.c (strsuffix): New.
4253 (stringappend): Be just like strcat but allocate.
4254 (base_names): Eve out from open_files.
4255 Try to simplify the rather hairy computation of base_name and
4257 (open_files): Use it.
4258 * tests/suite.at (Checking output file names): New test.
4260 2000-12-19 Akim Demaille <akim@epita.fr>
4262 * src/system.h (obstack_grow_literal_string): Rename as...
4263 (obstack_grow_string): this.
4264 * src/output.c (output_parser): Recognize `%% actions' instead of
4266 * src/bison.s1: s/$/%% actions/.
4267 * src/bison.hairy: Likewise.
4269 2000-12-19 Akim Demaille <akim@epita.fr>
4271 * src/output.c (output_parser): Compute the `#line' lines when
4273 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
4274 Suggested by Hans Aberg.
4276 2000-12-19 Akim Demaille <akim@epita.fr>
4278 Let the handling of the skeleton files be local to the procedures
4281 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
4283 (fparser, open_extra_files): Remove.
4284 (open_files, output_files): Don't take care of fparser.
4285 * src/files.h: Adjust.
4286 * src/output.c (output_parser): Open and close the file to the
4288 * src/reader.c (read_declarations): When %semantic_parser, open
4291 2000-12-19 Akim Demaille <akim@epita.fr>
4293 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
4294 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
4296 2000-12-19 Akim Demaille <akim@epita.fr>
4298 * src/files.c (open_files): Yipee! We no longer need all the code
4299 looking for `/tmp' since we have no tmp file.
4301 2000-12-19 Akim Demaille <akim@epita.fr>
4303 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4305 * src/files.c (open_files): Less dependency on MSDOS etc.
4307 2000-12-14 Akim Demaille <akim@epita.fr>
4309 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4310 Provide a default definition.
4311 Use it when executing the default @ action.
4312 * src/reader.c (reader_output_yylsp): No longer include
4313 `timestamp' and `text' in the default YYLTYPE.
4315 2000-12-12 Akim Demaille <akim@epita.fr>
4317 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4318 (copy_guard): Quote the file names.
4319 Reported by Laurent Mascherpa.
4321 2000-12-12 Akim Demaille <akim@epita.fr>
4323 * src/output.c (output_headers, output_program, output): Be sure
4324 to escape special characters when outputting filenames.
4325 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4326 (output_headers): Don't depend on them, Use ACTSTR.
4328 2000-11-17 Akim Demaille <akim@epita.fr>
4330 * lib/obstack.h: Formatting changes.
4331 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4332 prevents type checking.
4333 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4334 cast the value to (void *): assigning a `foo *' to a `void *'
4336 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4337 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4340 2000-11-17 Akim Demaille <akim@epita.fr>
4342 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4344 (suite.m4, regression.m4, calc.m4): these.
4345 * tests/atgeneral.m4: Update from CVS Autoconf.
4347 2000-11-17 Akim Demaille <akim@epita.fr>
4349 * tests/regression.m4 (%union and --defines): New test,
4350 demonstrating a current bug in the obstack implementation.
4352 2000-11-17 Akim Demaille <akim@epita.fr>
4354 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4356 Use them to declare the variables which are global or local to
4359 2000-11-17 Akim Demaille <akim@epita.fr>
4361 * acconfig.h: Remove, no longer used.
4363 2000-11-07 Akim Demaille <akim@epita.fr>
4365 * src: s/Copyright (C)/Copyright/g.
4367 2000-11-07 Akim Demaille <akim@epita.fr>
4369 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4371 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4373 2000-11-07 Akim Demaille <akim@epita.fr>
4375 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4376 Merge in a single CPP if/else.
4378 2000-11-07 Akim Demaille <akim@epita.fr>
4380 * src/output.c (output): Remove useless variables.
4381 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4382 argument `data' for consistency with the prototypes.
4384 (obstack_copy, obstack_copy0): Rename the second argument as
4385 `address' for consistency. Qualify it `const'.
4386 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4387 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4388 `const' their input argument (`data' or `address').
4389 Adjust the corresponding macros to include `const' in casts.
4391 2000-11-03 Akim Demaille <akim@epita.fr>
4393 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4394 s/PFILE1/BISON_HAIRY/.
4395 Adjust dependencies.
4397 2000-11-03 Akim Demaille <akim@epita.fr>
4399 For some reason, this was not applied.
4401 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4402 `unlink': it's no longer used.
4404 2000-11-03 Akim Demaille <akim@epita.fr>
4406 * src/files.c (skeleton_find): New function, eved out of...
4407 (open_files, open_extra_files): here.
4409 2000-11-03 Akim Demaille <akim@epita.fr>
4413 * src/files.c (obstack_save): New function.
4414 (done): Rename as...
4415 (output_files): this.
4417 * src/main.c (main): Don't use `atexit' to register `done', since
4418 it no longer has to remove tmp files, just call `output_files'
4419 when there are no errors.
4421 2000-11-02 Akim Demaille <akim@epita.fr>
4423 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4424 `unlink': it's no longer used.
4425 * src/files.h: Formatting changes.
4427 2000-11-02 Akim Demaille <akim@epita.fr>
4429 Remove the last uses of mktemp and unlink/delete.
4431 * src/files.c (fdefines, ftable): Removed.
4432 (defines_ostack, table_obstack): New.
4433 Adjust dependencies of the former into uses of the latter.
4434 * src/output.c (output_short_or_char_table, output_short_table):
4435 Convert to using obstacks.
4436 * src/reader.c (copy_comment2): Accept one FILE * and two
4438 (output_token_defines, reader_output_yylsp): Use obstacks.
4439 * src/system.h (obstack_fgrow3): New.
4441 2000-11-01 Akim Demaille <akim@epita.fr>
4443 Change each use of `fattrs' into a use of `attrs_obstack'.
4445 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4446 * src/files.c (fattrs): Remove.
4447 (attrs_obstack): New.
4448 Adjust all dependencies.
4449 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4451 2000-11-01 Akim Demaille <akim@epita.fr>
4454 Change each use of `faction' into a use of `action_obstack'.
4456 * lib/obstack.h, lib/obstack.c: New files.
4457 * src/files.c (faction): Remove.
4458 (action_obstack): New.
4459 Adjust all dependencies.
4461 2000-10-20 Akim Demaille <akim@epita.fr>
4463 * lib/quote.h (PARAMS): New macro. Use it.
4465 2000-10-16 Akim Demaille <akim@epita.fr>
4467 * src/output.c (output_short_or_char_table): New function.
4468 (output_short_table, output_token_translations): Use it.
4469 (goto_actions): Use output_short_table.
4471 2000-10-16 Akim Demaille <akim@epita.fr>
4473 * src/symtab.c (bucket_new): New function.
4476 * src/output.c (output_short_table): New argument to display the
4477 comment associated with the table.
4478 Adjust dependencies.
4479 (output_gram): Use it.
4480 (output_rule_data): Nicer output layout for YYTNAME.
4482 2000-10-16 Akim Demaille <akim@epita.fr>
4484 * src/lex.c (read_typename): New function.
4486 * src/reader.c (copy_dollar): Likewise.
4488 2000-10-16 Akim Demaille <akim@epita.fr>
4490 * src/reader.c (copy_comment2): Expect the input stream to be on
4491 the `/' which is suspected to open a comment, instead of being
4492 called after `//' or `/*' was read.
4493 (copy_comment, copy_definition, parse_union_decl, copy_action)
4494 (copy_guard): Adjust.
4496 2000-10-16 Akim Demaille <akim@epita.fr>
4498 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4499 `read_signed_integer'.
4501 2000-10-16 Akim Demaille <akim@epita.fr>
4503 * src/reader.c (copy_dollar): New function.
4504 (copy_guard, copy_action): Use it.
4506 2000-10-16 Akim Demaille <akim@epita.fr>
4508 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4509 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4510 New files, from Fileutils 4.0.27.
4511 * src/main.c (printable_version): Remove.
4512 * src/lex.c, src/reader.c: Use `quote'.
4514 2000-10-04 Akim Demaille <akim@epita.fr>
4516 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4518 2000-10-04 Akim Demaille <akim@epita.fr>
4520 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4522 2000-10-04 Akim Demaille <akim@epita.fr>
4524 When a literal string is used to define two different tokens,
4525 `bison -v' segfaults.
4526 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4528 * tests/regression.m4: New file.
4529 Include the core of the sample provided by Piotr Gackiewicz.
4530 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4533 2000-10-04 Akim Demaille <akim@epita.fr>
4535 * src/reader.c (parse_expect_decl): Keep `count' within the size
4539 2000-10-02 Paul Eggert <eggert@twinsun.com>
4541 * bison.s1 (yyparse): Assign the default value
4542 unconditionally, to avoid a GCC warning and make the parser a
4545 2000-10-02 Akim Demaille <akim@epita.fr>
4547 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4550 2000-10-02 Akim Demaille <akim@epita.fr>
4552 * src/derives.c, src/print.c, src/reduce.c: To ease the
4553 translation, move some `\n' out of the translated strings.
4555 2000-10-02 Akim Demaille <akim@epita.fr>
4557 The location tracking mechanism is precious for parse error
4558 messages. Nevertheless, it is enabled only when `@n' is used in
4559 the grammar, which is a different issue (you can use it in error
4560 message, but not in the grammar per se). Therefore, there should
4561 be another means to enable it.
4563 * src/getargs.c (getargs): Support `--locations'.
4565 * src/getargs.h (locationsflag): Export it.
4566 * src/lex.c (percent_table): Support `%locations'.
4567 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4568 with `locationsflag'.
4569 * doc/bison.texinfo: Document `--locations' and `%locations'.
4571 * tests/calc.m4: Test it.
4573 For regularity of the names, replace each
4574 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4575 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4576 In addition replace each `flag' with `_flag'.
4578 2000-10-02 Akim Demaille <akim@epita.fr>
4580 Also test parse error messages, including with YYERROR_VERBOSE.
4582 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4584 Use it to check the computations.
4585 Use it to check `nonassoc' is honored.
4586 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4587 `--yyerror-verbose'.
4588 (_AT_CHECK_CALC): Adjust to this option.
4589 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4591 2000-10-02 Akim Demaille <akim@epita.fr>
4593 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4594 the latter demonstrates a flaw in the handling of non debugging
4595 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4596 was used in order to simplify:
4612 unfortunately this leads to a CPP conflict when
4613 `--name-prefix=foo' is used since it produces `#define yydebug
4616 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4617 (YYDPRINTF): New macro.
4619 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4621 Also test `--verbose', `--defines' and `--name-prefix'.
4623 2000-10-02 Akim Demaille <akim@epita.fr>
4625 Improve the readability of the produced parsers.
4627 * src/bison.s1: Formatting changes.
4628 Improve the comment related to the `$' mark.
4629 (yydefault): Don't fall through to `yyresume': `goto' there.
4630 * src/output.c (output_parser): When the `$' is met, skip the end
4632 New variable, `number_of_dollar_signs', to check there's exactly
4633 one `$' in the parser skeleton.
4635 2000-10-02 Akim Demaille <akim@epita.fr>
4637 * lib/xstrdup.c: New file, from the fileutils.
4638 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4639 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4640 instead of strlen + xmalloc + strcpy.
4641 * src/symtab.c (copys): Remove, use xstrdup instead.
4643 2000-10-02 Akim Demaille <akim@epita.fr>
4645 * src/gram.h (associativity): New enum type which replaces the
4646 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4647 `right_assoc', `left_assoc' and `non_assoc'.
4648 Adjust all dependencies.
4649 * src/reader.c: Formatting changes.
4650 (LTYPESTR): Don't define it, use it as a literal in
4651 `reader_output_yylsp'.
4652 * src/symtab.h (symbol_class): New enum type which replaces the
4653 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4654 `sunknown', `stoken and `snterm'.
4656 2000-10-02 Akim Demaille <akim@epita.fr>
4658 * src/getargs.c (fixed_outfiles): Rename as...
4659 (yaccflag): for consistency and accuracy.
4660 Adjust dependencies.
4662 2000-10-02 Akim Demaille <akim@epita.fr>
4664 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4665 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4666 difficult and introduced a lot of core dump. It turns out that
4667 Bison used an implementation of `xmalloc' based on `calloc', and
4668 at various places it does depend upon the initialization to 0. I
4669 have not tried to isolate the pertinent places, and all the former
4670 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4671 someone should address this issue.
4673 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4674 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4676 Adjust dependencies.
4677 * src/warshall.h: New file.
4680 2000-10-02 Akim Demaille <akim@epita.fr>
4682 Various anti-`extern in *.c' changes.
4684 * src/system.h: Include `assert.h'.
4686 2000-10-02 Akim Demaille <akim@epita.fr>
4688 * src/state.h (nstates, final_state, first_state, first_shift)
4689 (first_reduction): Move their exportation from here...
4690 * src/LR0.h: to here.
4691 Adjust dependencies.
4692 * src/getargs.c (statisticsflag): New variable.
4693 Add support for `--statistics'.
4694 Adjust dependencies.
4696 Remove a lot of now useless `extern' statements in most files.
4698 2000-10-02 Akim Demaille <akim@epita.fr>
4700 * src/LR0.h: New file.
4703 2000-10-02 Akim Demaille <akim@epita.fr>
4705 * src/print.h: New file.
4707 * src/print.c: Formatting and ordering changes.
4708 (verbose, terse): Replace with...
4709 (print_results): this new function.
4710 Adjust dependencies.
4712 2000-10-02 Akim Demaille <akim@epita.fr>
4714 * src/conflicts.c (conflict_report): New function.
4715 (conflict_log, verbose_conflict_log): Replace with...
4716 (print_conflicts): this function.
4717 Adjust dependencies.
4718 * src/conflicts.h: New file.
4719 Propagate its inclusion.
4721 2000-10-02 Akim Demaille <akim@epita.fr>
4723 * src/nullable.h: New file.
4724 Propagate its inclusion.
4725 * src/nullable.c: Formatting changes.
4727 2000-10-02 Akim Demaille <akim@epita.fr>
4729 * src/reduce.h: New file.
4730 Propagate its inclusion.
4731 * src/reduce.c: Topological sort and other formatting changes.
4732 (bool, TRUE, FALSE): Move their definition to...
4733 * src/system.h: here.
4735 2000-10-02 Akim Demaille <akim@epita.fr>
4737 * src/files.c: Formatting changes.
4738 (tryopen, tryclose, openfiles): Rename as...
4739 (xfopen, xfclose, open_files): this.
4740 (stringappend): static.
4741 * src/files.h: Complete the list of exported symbols.
4744 2000-10-02 Akim Demaille <akim@epita.fr>
4746 * src/reader.h: New file.
4747 Propagate its use instead of tedious list of `extern' and
4749 * src/reader.c: Formatting changes, topological sort,
4752 2000-10-02 Akim Demaille <akim@epita.fr>
4754 * src/lex.h: Prototype `lex.c' exported functions.
4755 * src/reader.c: Adjust.
4756 * src/lex.c: Formatting changes.
4757 (safegetc): Rename as...
4760 2000-10-02 Akim Demaille <akim@epita.fr>
4762 * src/lalr.h: New file.
4763 Propagate its inclusion instead of prototypes and `extern'.
4764 * src/lalr.c: Formatting changes, topological sorting etc.
4766 2000-10-02 Akim Demaille <akim@epita.fr>
4768 * src/output.c (token_actions): Introduce a temporary array,
4769 YYDEFACT, that makes it possible for this function to use
4772 2000-10-02 Akim Demaille <akim@epita.fr>
4774 `user_toknums' is output as a `short[]' in `output.c', while it is
4775 defined as a `int[]' in `reader.c'. For consistency with the
4776 other output tables, `user_toknums' is now defined as a table of
4779 * src/reader.c (user_toknums): Be a short table instead of an int
4781 Adjust dependencies.
4783 Factor the short table outputs.
4785 * src/output.c (output_short_table): New function.
4786 * src/output.c (output_gram, output_stos, output_rule_data)
4787 (output_base, output_table, output_check): Use it.
4789 2000-10-02 Akim Demaille <akim@epita.fr>
4791 * src/output.c (output): Topological sort of the functions, in
4792 order to get rid of the `static' prototypes.
4793 No longer use `register'.
4794 * src/output.h: New file.
4795 Propagate its inclusion in files explicitly prototyping functions
4798 2000-09-21 Akim Demaille <akim@epita.fr>
4800 * src/atgeneral.m4: Update from Autoconf.
4802 2000-09-21 Akim Demaille <akim@epita.fr>
4804 * src/closure.h: New file.
4805 * src/closure.c: Formatting changes, topological sort over the
4806 functions, use of closure.h.
4807 (initialize_closure, finalize_closure): Rename as...
4808 (new_closure, free_closure): these. Adjust dependencies.
4809 * src/LR0.c: Formatting changes, topological sort, use of
4811 (initialize_states): Rename as...
4813 * src/Makefile.am (noinst_HEADERS): Adjust.
4815 2000-09-20 Akim Demaille <akim@epita.fr>
4817 * src/acconfig.h: Don't protect config.h against multiple
4819 Don't define PARAMS.
4820 * src/system.h: Define PARAMS.
4821 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4822 purpose of config.h. system.h must not try to fix wrong
4823 definitions in config.h.
4825 2000-09-20 Akim Demaille <akim@epita.fr>
4827 * src/derives.h: New file.
4828 * src/main.c, src/derives.h: Use it.
4830 * src/Makefile.am (noinst_HEADERS): Adjust.
4832 2000-09-20 Akim Demaille <akim@epita.fr>
4834 * tests/atgeneral.m4: Update from Autoconf.
4835 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4836 (AT_CHECK_CALC): New macros.
4837 Use these macros to test bison with options `', `--raw',
4838 `--debug', `--yacc', `--yacc --debug'.
4840 2000-09-19 Akim Demaille <akim@epita.fr>
4842 * src/output.c: Formatting changes.
4843 * src/machine.h: Remove, leaving its contents in...
4844 * src/system.h: here.
4846 Adjust all dependencies on stdio.h and machine.h.
4847 * src/getargs.h: New file.
4848 Let all `extern' declarations about getargs.c be replaced with
4849 inclusion of `getargs.h'.
4850 * src/Makefile.am (noinst_HEADERS): Adjust.
4852 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4854 (yyerror): Returns void, not int.
4855 * doc/bison.texinfo: Formatting changes.
4857 2000-09-19 Akim Demaille <akim@epita.fr>
4859 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4862 2000-09-18 Akim Demaille <akim@epita.fr>
4864 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4865 * src/Makefile.am (INCLUDES): Don't.
4866 Be ready to fetch headers in lib/.
4868 2000-09-18 Akim Demaille <akim@epita.fr>
4870 * doc/bison.texinfo: Update the copyright.
4871 ANSIfy and GNUify the examples.
4872 Remove the old menu.
4874 2000-09-18 Akim Demaille <akim@epita.fr>
4876 First set of tests: use the `calc' example from the documentation.
4878 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4879 is defined only when YYDEBUG is.
4880 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4881 * src/files.c (tryopen, tryclose): Formatting changes.
4882 Move to the top and be static.
4883 * src/reader.c (read_signed_integer): Likewise.
4884 * tests/calc.m4: New file.
4885 * Makefile.am, suite.m4: Adjust.
4886 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4888 2000-09-18 Akim Demaille <akim@epita.fr>
4890 Add support for an Autotest test suite for Bison.
4892 * m4/m4.m4, m4/atconfig.m4: New files.
4893 * m4/Makefile.am (EXTRA_DIST): Adjust.
4894 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4896 * src/getargs.c: Display a more standard --version message.
4897 * src/reader.c (reader): Formatting changes.
4898 No longer depend upon VERSION_STRING.
4899 * configure.in: No longer use `dnl'.
4900 Set up the test suite and the new directory `tests/.
4901 (VERSION_STRING): Remove.
4903 2000-04-14 Akim Demaille <akim@epita.fr>
4905 * src/reader.c (copy_comment2): New function, same as former
4906 `copy_comment', but outputs into two FILE *.
4907 (copy_comment): Use it.
4908 (parse_union_decl): Use it.
4909 (get_type, parse_start_decl): Use the same `invalid' message.
4910 (parse_start_decl, parse_union_decl): Use the same `multiple'
4912 (parse_union_decl, copy_guard, copy_action): Use the same
4913 `unmatched' message.
4914 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4916 2000-03-31 Akim Demaille <akim@epita.fr>
4918 * src/files.c (tryopen, tryclose): Move to the top.
4921 2000-03-31 Akim Demaille <akim@epita.fr>
4923 * src/main.c (main): Don't call `done', exit does it.
4925 2000-03-31 Akim Demaille <akim@epita.fr>
4927 * allocate.c: s/return (foo)/return foo/.
4930 * output.c: Likewise.
4931 * reader.c: Likewise.
4932 * symtab.c: Likewise.
4933 * vmsgetargs.c: Likewise.
4935 2000-03-31 Akim Demaille <akim@epita.fr>
4937 Clean up the error reporting functions.
4939 * src/report.c: New file.
4940 * src/report.h: Likewise.
4941 * src/Makefile.am: Adjust.
4942 * m4/error.m4: New file.
4943 * m4/Makefile.am: Adjust.
4944 * configure.in (jm_PREREQ_ERROR): Call it.
4945 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4947 (fatal, fatals): Remove. All callers use complain.c::fatal.
4948 (warn, warni, warns, warnss, warnss): Remove. All callers use
4949 complain.c::complain.
4950 (toomany): Remove, use fatal instead.
4951 * src/files.c (done): No argument, use complain_message_count.
4952 * src/main.c (main): Register `done' to `atexit'.
4954 * src/getargs.c (usage): More `fputs', less `fprintf'.
4956 2000-03-28 Akim Demaille <akim@epita.fr>
4958 * lib/: New directory.
4959 * Makefile.am (SUBDIRS): Adjust.
4960 * configure.in: Adjust.
4961 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4963 * src/alloca.c: Moved to lib/.
4964 * src/getopt.c: Likewise.
4965 * src/getopt1.c: Likewise.
4966 * src/getopt.h: Likewise.
4967 * src/ansi2knr.c: Likewise.
4968 * src/ansi2knr.1: Likewise.
4969 * src/Makefile.am: Adjust.
4970 * lib/Makefile.am: New file.
4972 2000-03-28 Akim Demaille <akim@epita.fr>
4974 * src/getargs.c (usage): Refresh the help message.
4976 2000-03-17 Akim Demaille <akim@epita.fr>
4978 * src/getopt1.c: Updated from textutils 2.0e
4979 * src/getopt.c: Likewise.
4980 * src/getopt.h: Likewise.
4982 2000-03-17 Akim Demaille <akim@epita.fr>
4984 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4985 the file name, not the whole `#line LINE FILE'.
4987 2000-03-17 Akim Demaille <akim@epita.fr>
4989 On syntax errors, report the token on which we choked.
4991 * src/bison.s1 (yyparse): In the label yyerrlab, when
4992 YYERROR_VERBOSE, add yychar in msg.
4994 2000-03-17 Akim Demaille <akim@epita.fr>
4996 * src/reader.c (copy_at): New function.
4997 (copy_guard): Use it.
4998 (copy_action): Use it.
5000 2000-03-17 Akim Demaille <akim@epita.fr>
5002 Be kind to translators, save some useless translations.
5004 * src/main.c (banner): New function.
5005 (fatal_banner): Use it.
5006 (warn_banner): Use it.
5008 2000-03-17 Akim Demaille <akim@epita.fr>
5010 * src/reader.c (copy_definition): Use copy_string and
5011 copy_comment. Removed now unused `match', `ended',
5013 (copy_comment, copy_string): Moved, to be visible from
5016 2000-03-17 Akim Demaille <akim@epita.fr>
5018 * src/reader.c (copy_string): Declare `static inline'. No
5019 problems with inline, since it is checked by configure.
5020 (copy_comment): Likewise.
5022 2000-03-17 Akim Demaille <akim@epita.fr>
5024 * src/reader.c (packsymbols): Formatting changes.
5026 2000-03-17 Akim Demaille <akim@epita.fr>
5028 * src/reader.c (copy_comment): New function, factored out from:
5029 (copy_action): Use it. Removed now unused `match', `ended',
5031 (copy_guard): Likewise.
5033 2000-03-17 Akim Demaille <akim@epita.fr>
5035 * src/reader.c (copy_string): New function, factored out from:
5036 (copy_action): Use it.
5037 (copy_guard): Likewise.
5039 2000-03-17 Akim Demaille <akim@epita.fr>
5041 Change the handling of @s so that they behave exactly like $s.
5042 There is now a pseudo variable @$ (readble and writable), location
5043 of the lhs of the rule (by default ranging from the location of
5044 the first symbol of the rhs, to the location of the last symbol,
5045 or, if the rhs is empty, YYLLOC).
5047 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
5049 (yyparse): When providing a default semantic action, provide a
5050 default location action.
5051 (after the $): No longer change `*YYLSP', just stack YYLOC the
5052 same way you stack YYVAL.
5053 * src/reader.c (read_declarations): Use warns.
5054 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
5055 (copy_action, case '@'): Likewise.
5056 Use a standard error message, to save useless work from
5059 2000-03-17 Akim Demaille <akim@epita.fr>
5061 * src/bison.s1: Formatting and cosmetics changes.
5062 * src/reader.c: Likewise.
5063 Update the Copyright notice.
5065 2000-03-17 Akim Demaille <akim@epita.fr>
5067 * src/bison.s1 (#line): All set to `#line' only, since the
5068 Makefile now handles them.
5070 2000-03-16 Akim Demaille <akim@epita.fr>
5072 * src/output.c (output_rule_data): Output the documentation of
5074 (Copyright notice): Update.
5077 2000-03-16 Akim Demaille <akim@epita.fr>
5079 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
5080 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
5081 One `#if YYDEBUG' remains, since it uses variables which are
5082 defined only if `YYDEBUG != 0'.
5084 2000-03-16 Akim Demaille <akim@epita.fr>
5086 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
5087 and related variables so that the similarities are highlighted.
5089 2000-03-16 Akim Demaille <akim@epita.fr>
5091 * src/bison.s1: Properly indent CPP directives.
5093 2000-03-16 Akim Demaille <akim@epita.fr>
5095 * src/bison.s1: Properly indent the `alloca' CPP section.
5097 2000-03-16 Akim Demaille <akim@epita.fr>
5099 Do not hard code values of directories in `configure.in'.
5100 Update the `configure' tool chain.
5102 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
5104 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
5105 (AC_OUTPUT): Add m4/Makefile.
5106 Bump to bison 1.28a, 1.29 has never been released.
5107 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
5108 handled via src/Makefile.am.
5109 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
5110 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
5112 * Makefile.am (SUBDIRS): Add m4.
5113 (ACLOCAL_AM_FLAGS): New variable.
5114 (AUTOMAKE_OPTIONS): Add check-news.
5115 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
5116 the proper line number and file name.
5117 (DEFS): Propagate the location of bison library files and of the
5119 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
5121 * acinclude.m4: Remove, replaced by the directory m4.
5122 * m4/Makefile.am (EXTRA_DIST): New variable.
5123 * m4/gettext.m4: New file, from the fileutils.
5124 * m4/lcmessage.m4: Likewise
5125 * m4/progtest.m4: Likewise.
5126 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
5128 2000-03-10 Akim Demaille <akim@epita.fr>
5131 Formatting changes of various comments.
5132 Respect the GNU coding standards at various places.
5133 Don't use `_()' when no translation is needed.
5135 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5138 OS/2 honors TMPDIR environment variable.
5140 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5142 * doc/bison.texinfo: Tweaked spelling and grammar.
5144 Removed reference to price of printed copy.
5145 Mention BISON_SIMPLE and BISON_HAIRY.
5147 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5149 * configure.in, NEWS:
5150 Bison 1.29 released.
5152 1999-10-27 Jesse Thilo <jthilo@gnu.org>
5154 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
5155 Added reference card.
5157 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5159 * po/ru.po: Added Russian translation.
5161 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5163 * configure.in: Added Russian translation.
5165 1999-07-06 Jesse Thilo <jthilo@gnu.org>
5167 * configure.in, NEWS, README:
5168 Released version 1.28.
5170 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5173 Squashed redefinition warning on some systems.
5175 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
5176 Have configure build version string instead of relying on ANSI string
5179 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5181 * po/POTFILES.in: Got rid of version.c.
5183 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5185 * acconfig.h, configure.in:
5186 Have configure build version string instead of relying on ANSI string
5189 1999-06-08 Jesse Thilo <jthilo@gnu.org>
5192 Dropped mention of `+' for long-named options.
5194 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5196 * src/files.c: Added <unistd.h> for unlink().
5198 * src/Makefile.am, src/system.h:
5201 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5203 * README: Added a FAQ list.
5205 * configure.in, acconfig.h:
5208 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5210 * doc/FAQ, doc/Makefile.am:
5213 1999-05-19 Jesse Thilo <jthilo@gnu.org>
5215 * src/alloc.h, src/symtab.h, src/version.c:
5216 Protected inclusion of "config.h" with HAVE_CONFIG_H.
5218 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5220 * src/.cvsignore, src/Makefile.am:
5221 Reorganized: sources in `src', documentation in `doc'.
5223 * src/lex.c (literalchar):
5224 fixed the code for escaping double quotes (thanks
5227 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5229 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
5230 Adjusted paths to reflect directory reorganization.
5232 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5234 * doc/.cvsignore, doc/Makefile.am:
5235 Reorganized: sources in `src', documentation in `doc'.
5237 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5240 Updated AC_INIT file to reflect directory reorganization.
5242 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
5243 Reorganized: sources in `src', documentation in `doc'.
5245 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5248 Don't declare calloc() and realloc() if not necessary.
5250 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5252 * configure.in, acconfig.h, acinclude.m4:
5253 Don't declare calloc() and realloc() if not necessary.
5255 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5257 * po/.cvsignore: Added i18n support.
5259 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5261 * acconfig.h, configure.in, Makefile.am:
5264 1999-03-22 Jesse Thilo <jthilo@gnu.org>
5266 * src/bison.s1: Fixed #line numbers.
5268 1999-03-15 Jesse Thilo <jthilo@gnu.org>
5270 * po/es.po, po/fr.po, po/nl.po, po/de.po:
5271 Added PO files from Translation Project.
5273 1999-03-03 Jesse Thilo <jthilo@gnu.org>
5276 Added support for non-ANSI compilers (ansi2knr).
5278 1999-02-16 Jesse Thilo <jthilo@gnu.org>
5280 * configure.in: Bumped version number to 1.27.
5283 Added `bison.simple' to list of files removed by `make distclean'.
5285 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5287 * src/files.c, src/files.h:
5288 Defined locations of parser files in config.h instead of Makefile.
5290 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5292 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
5293 Defined locations of parser files in config.h instead of Makefile.
5295 1999-02-09 Jesse Thilo <jthilo@gnu.org>
5298 Removed inappropriate use of $< macro.
5300 1999-02-05 Jesse Thilo <jthilo@gnu.org>
5302 * po/Makefile.in.in, po/POTFILES.in:
5303 Add `po' directory skeleton.
5305 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5307 * README: Document help-bison list.
5309 * configure.in: Add check for mkstemp().
5311 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5313 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5314 Hush a few compiler warnings.
5317 Add tryclose(), which verifies that fclose was successful.
5318 Hush a couple of compiler warnings.
5320 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5322 * Makefile.am, OChangeLog:
5323 ChangeLog is now automatically generated. Include the old version as
5326 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5328 * 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:
5331 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5333 * doc/bison.texinfo: Fix formatting glitch.
5335 * doc/bison.texinfo: Update FSF address.
5337 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5339 * acconfig.h: Update FSF address.
5341 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5344 Don't define PACKAGE here, since config.h defines it.
5346 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5348 * src/reader.c: Update copyright date.
5351 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5352 favor of output directly to stderr (avoids buffer overruns).
5354 * src/reader.c: Some checks for premature EOF.
5356 * 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:
5357 Use prototypes if the compiler understands them.
5359 * src/files.c: Honor TMPDIR on Unix hosts.
5360 Use prototypes if the compiler understands them.
5363 Fix a couple of buffer overrun bugs.
5364 Use prototypes if the compiler understands them.
5366 * src/system.h: Include unistd.h and ctype.h.
5367 Use #ifdef instead of #if for NLS symbols.
5369 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5371 * doc/bison.texinfo:
5372 Delete comment "consider using @set for edition number, etc..." since
5373 we now are doing so.
5375 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5378 Use prototypes if the compiler understands them.
5380 * NEWS: Document 1.26 highlights.
5382 * Makefile.am: Require Automake 1.3 or later.
5385 Use prototypes if the compiler understands them.
5387 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5390 Use VERSION symbol from automake for version number.
5392 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5394 * acconfig.h, configure.in, version.cin:
5395 Use VERSION symbol from automake for version number.
5397 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5400 Distribute original version of simple parser (bison.s1), not built
5401 version (bison.simple).
5403 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5405 * doc/bison.texinfo: Add info dir entry.
5407 * doc/bison.texinfo:
5408 Let automake put version number into documentation.
5410 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5412 * src/bison.cld, src/build.com, src/vmshlp.mar:
5413 Add non-RCS files from /gd/gnu/bison.
5415 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5418 Document the BISON_HAIRY and BISON_SIMPLE variables.
5420 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5422 * src/version.c: Build version.c automatically.
5425 Fix token numbering (used to start at 258, not 257).
5427 * src/system.h: Include config.h.
5429 * src/getargs.c: Update bug report address.
5431 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5432 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5434 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5437 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5439 * configure.in, version.cin:
5440 Build version.c automatically.
5442 * AUTHORS: Add AUTHORS file.
5444 * README: Update bug report address.
5447 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5449 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5452 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5454 * doc/bison.texinfo: Clean up some formatting.
5456 1998-05-05 Richard Stallman <rms@gnu.org>
5458 * doc/bison.texinfo:
5459 Explain better why to make a pure parser.
5461 1998-01-05 Richard Stallman <rms@gnu.org>
5463 * src/files.c (openfiles):
5464 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5465 find a temporary directory, if possible. Do not unlink files while
5468 1997-08-25 Richard Stallman <rms@gnu.org>
5470 * src/reader.c (stack_offset;):
5471 Change some warni to warns.
5473 * src/lex.c (literalchar): Use warns, not warni.
5475 1997-06-28 Richard Stallman <rms@gnu.org>
5477 * src/bison.s1: Add a Bison version comment.
5479 * src/main.c (fatal, warn, berror):
5482 1997-06-28 Richard Stallman <rms@gnu.org>
5484 * Makefile.in (bison_version): New variable.
5485 (dist): Use that variable.
5486 (bison.s1): Substitute the Bison version into bison.simple.
5488 * bison.simple: Add a Bison version comment.
5490 1997-06-18 Richard Stallman <rms@gnu.org>
5492 * src/main.c (fatal, warn, berror):
5493 Make error messages standard.
5494 (toomany): Improve error message text.
5496 * 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:
5497 new.h renamed to alloc.h.
5499 1997-06-18 Richard Stallman <rms@gnu.org>
5501 * Makefile.in: new.h renamed to alloc.h.
5503 1997-05-24 Richard Stallman <rms@gnu.org>
5505 * src/lex.c (literalchar):
5506 Fix the code for escaping \, " and '.
5508 (lex): Avoid trouble when there are many chars
5509 to discard in a char literal with just several chars in it.
5511 1997-05-17 Richard Stallman <rms@gnu.org>
5514 Use malloc, if using alloca is troublesome.
5515 (YYSTACK_USE_ALLOCA): New flag macro.
5516 Define it for some systems and compilers.
5517 (YYSTACK_ALLOC): New macro.
5518 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5519 If it was malloc'd, free it.
5521 1997-05-17 Richard Stallman <rms@gnu.org>
5524 Use malloc, if using alloca is troublesome.
5525 (YYSTACK_USE_ALLOCA): New flag macro.
5526 Define it for some systems and compilers.
5527 (YYSTACK_ALLOC): New macro.
5528 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5529 If it was malloc'd, free it.
5531 1997-04-23 Richard Stallman <rms@gnu.org>
5534 (alloca) [__hpux]: Always define as __builtin_alloca.
5536 1997-04-23 Richard Stallman <rms@gnu.org>
5539 (alloca) [__hpux]: Always define as __builtin_alloca.
5541 1997-04-22 Richard Stallman <rms@gnu.org>
5544 [__hpux]: Include alloca.h (right for HPUX 10)
5545 instead of declaring alloca (right for HPUX 9).
5547 * src/bison.s1 (__yy_memcpy):
5548 Declare arg `count' as unsigned int.
5549 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5551 1997-04-22 Richard Stallman <rms@gnu.org>
5554 [__hpux]: Include alloca.h (right for HPUX 10)
5555 instead of declaring alloca (right for HPUX 9).
5557 * bison.simple (__yy_memcpy):
5558 Declare arg `count' as unsigned int.
5559 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5561 1997-01-03 Richard Stallman <rms@gnu.org>
5563 * src/allocate.c: [__STDC__ or _MSC_VER]:
5564 Declare calloc and realloc to return void *.
5566 1997-01-02 Richard Stallman <rms@gnu.org>
5569 [_MSC_VER]: Include stdlib.h and process.h.
5570 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5572 * src/main.c (main): Return FAILURE as a value.
5573 (printable_version): Declare arg as int, not char.
5575 1997-01-02 Richard Stallman <rms@gnu.org>
5577 * Makefile.in (dist):
5578 Explicitly check for symlinks, and copy them.
5580 1996-12-19 Richard Stallman <rms@gnu.org>
5583 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5585 1996-12-18 Paul Eggert <eggert@gnu.org>
5587 * src/bison.s1 (yyparse):
5588 If __GNUC__ and YYPARSE_PARAM are both defined,
5589 declare yyparse to have a void * argument.
5591 1996-12-18 Paul Eggert <eggert@gnu.org>
5593 * bison.simple (yyparse):
5594 If __GNUC__ and YYPARSE_PARAM are both defined,
5595 declare yyparse to have a void * argument.
5597 1996-12-17 Richard Stallman <rms@gnu.org>
5599 * src/reduce.c (nbits): Add some casts.
5601 1996-08-12 Richard Stallman <rms@gnu.org>
5603 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5605 1996-08-12 Richard Stallman <rms@gnu.org>
5607 * bison.simple: Test _MSDOS as well as _MSDOS_.
5609 1996-07-31 Richard Stallman <rms@gnu.org>
5612 [__sun && __i386]: Include alloca.h.
5614 1996-07-31 Richard Stallman <rms@gnu.org>
5617 [__sun && __i386]: Include alloca.h.
5619 1996-07-30 Richard Stallman <rms@gnu.org>
5621 * src/bison.s1: Comment change.
5623 * src/bison.s1: Test _MSDOS_, not MSDOS.
5625 1996-07-30 Richard Stallman <rms@gnu.org>
5627 * bison.simple: Comment change.
5629 * bison.simple: Test _MSDOS_, not MSDOS.
5631 1996-06-01 Richard Stallman <rms@gnu.org>
5633 * 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:
5634 Insert `_' macro around many string constants.
5637 Insert `_' macro around many string constants.
5639 (main): Call setlocale, bindtextdomain and textdomain.
5641 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5642 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5643 [ENABLE_NLS]: Include libintl.h.
5644 [ENABLE_NLS] (gettext): Define.
5645 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5646 (N_, PACKAGE, LOCALEDIR): New macros.
5648 1996-06-01 Richard Stallman <rms@gnu.org>
5650 * POTFILES.in: New file.
5652 * Makefile.in (allocate.o):
5653 Define target explicitly.
5655 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5656 (LDFLAGS): Set to @LDFLAGS@.
5657 (configure): Run autoconf only if preceding `cd' succeeds.
5658 (bison.s1): Redirect output to temporary file then move the
5659 temporary to the target, rather than redirecting directly to bison.s1.
5660 (clean): Remove config.status and config.log.
5661 (distclean): Don't remove config.status here.
5663 1996-05-12 Richard Stallman <rms@gnu.org>
5666 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5668 1996-05-12 Richard Stallman <rms@gnu.org>
5671 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5673 1996-05-11 Richard Stallman <rms@gnu.org>
5675 * src/bison.s1 (__yy_memcpy):
5676 Really reorder the args, as was supposedly done on Feb 14 1995.
5677 (yyparse): Calls changed accordingly.
5679 1996-05-11 Richard Stallman <rms@gnu.org>
5681 * Makefile.in (dist): Don't use $(srcdir).
5683 * bison.simple (__yy_memcpy):
5684 Really reorder the args, as was supposedly done on Feb 14 1995.
5685 (yyparse): Calls changed accordingly.
5687 1996-01-27 Richard Stallman <rms@gnu.org>
5689 * src/output.c (output_rule_data):
5690 Test YYERROR_VERBOSE in the conditional
5691 around the definition of ttyname.
5693 1995-12-29 Richard Stallman <rms@gnu.org>
5696 Fix line numbers in #line commands.
5698 1995-12-29 Richard Stallman <rms@gnu.org>
5701 Fix line numbers in #line commands.
5703 1995-12-27 Richard Stallman <rms@gnu.org>
5705 * src/bison.s1 (YYPARSE_PARAM_DECL):
5706 In C++, make it always null.
5707 (YYPARSE_PARAM_ARG): New macro.
5708 (yyparse): Use YYPARSE_PARAM_ARG.
5710 1995-12-27 Richard Stallman <rms@gnu.org>
5712 * bison.simple (YYPARSE_PARAM_DECL):
5713 In C++, make it always null.
5714 (YYPARSE_PARAM_ARG): New macro.
5715 (yyparse): Use YYPARSE_PARAM_ARG.
5717 1995-11-29 Richard Stallman <rms@gnu.org>
5719 * doc/bison.texinfo:
5720 Describe literal string tokens, %raw, %no_lines, %token_table.
5722 1995-11-29 Daniel Hagerty <hag@gnu.org>
5724 * doc/bison.texinfo: Fixed update date
5726 1995-10-16 Richard Stallman <rms@gnu.org>
5728 * src/version.c: Version 1.25.
5730 1995-10-16 Richard Stallman <rms@gnu.org>
5732 * NEWS: *** empty log message ***
5734 1995-10-16 Richard Stallman <rms@gnu.org>
5736 * doc/bison.1, doc/bison.rnh:
5739 1995-10-15 Richard Stallman <rms@gnu.org>
5741 * src/vmsgetargs.c, src/getargs.c:
5742 Added -n, -k, and -raw switches.
5743 (noparserflag, toknumflag, rawtoknumflag): New variables.
5745 * src/symtab.h (SALIAS):
5746 New #define for adding aliases to %token.
5747 (struct bucket): Added `alias' field.
5749 * src/reduce.c (reduce_grammar):
5750 Revise error message.
5751 (print_notices): Remove final `.' from error message.
5753 * src/reader.c (reader_output_yylsp):
5755 (readgram): Use `#if 0' around code that accepted %command
5756 inside grammar rules: The documentation doesn't allow it,
5757 and it will fail since the %command processors scan for the next %.
5758 (parse_token_decl): Extended the %token
5759 declaration to allow a multi-character symbol as an alias.
5760 (parse_thong_decl): New function.
5761 (read_declarations): Added %thong declarations.
5762 (read_declarations): Handle NOOP to deal with allowing
5763 % declarations as another means to specify the flags.
5764 (readgram): Allow %prec prior to semantics embedded in a rule.
5765 (skip_to_char, read_declarations, copy_definition)
5766 (parse_token_decl, parse_start_decl, parse_type_decl)
5767 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5768 (get_type_name, copy_guard, copy_action, readgram)
5769 (get_type, packsymbols): Revised most error messages.
5770 Changed `fatal' to `warnxxx' to avoid aborting for error.
5771 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5772 (read_declarations): Improve the error message for
5773 an invalid character. Do not abort.
5774 (read_declarations, copy_guard, copy_action): Use
5775 printable_version to avoid unprintable characters in printed output.
5776 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5777 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5778 Allow the type of a non-terminal can be given
5779 more than once, as long as all specifications give the same type.
5782 (output_headers, output_trailers, output, output_gram)
5783 (output_rule_data): Implement noparserflag variable.
5784 Implement toknumflag variable.
5785 (output): Call reader_output_yylsp to output LTYPESTR.
5787 * src/main.c (main):
5788 If reader sees an error, don't process the grammar.
5789 (fatals): Updated to not use VARARGS1.
5790 (printable_version, int_to_string, warn, warni, warns, warnss)
5791 (warnsss): New error reporting functions. Avoid abort for error.
5794 Added THONG and NOOP for alias processing.
5795 Added SETOPT for the new code that allows setting options with %flags.
5798 Include getopt.h. Add some extern decls.
5799 (safegetc): New function to deal with EOF gracefully.
5800 (literalchar); new function to deal with reading \ escapes.
5801 (lex): Use literalchar.
5802 (lex): Implemented "..." tokens.
5803 (literalchar, lex, parse_percent_token): Made tokenbuffer
5804 always contain the token. This includes growing the token
5805 buffer while reading an integer.
5806 (parse_percent_token): Replaced if-else statement with percent_table.
5807 (parse_percent_token): Added % declarations as another
5808 way to specify the flags -n, -l, and -r. Also added hooks for
5809 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5810 major changes to files.c.
5811 (lex) Retain in the incoming stream a character following
5813 (skip_white_space, lex): Revised most error messages
5814 and changed fatal to warn to avoid aborting.
5815 (percent_table): Added %thong declarations.
5817 * src/gram.h: Comment changes.
5819 * src/files.c (openfiles, open_extra_files, done):
5821 and actfile file. Handle noparserflag. Both for -n switch.
5823 * src/conflicts.c (resolve_sr_conflict):
5824 Remove use of alloca.
5826 1995-06-01 Jim Meyering <meyering@gnu.org>
5828 * doc/bison.texinfo: *** empty log message ***
5830 1995-05-06 Richard Stallman <rms@gnu.org>
5832 * src/bison.s1: Comment change.
5834 1995-05-06 Richard Stallman <rms@gnu.org>
5836 * bison.simple: Comment change.
5838 1995-05-03 Richard Stallman <rms@gnu.org>
5840 * src/version.c: Version now 1.24.
5842 * src/bison.s1: Change distribution terms.
5844 * src/version.c: Version now 1.23.
5846 1995-05-03 Richard Stallman <rms@gnu.org>
5848 * doc/bison.texinfo:
5849 Rewrite "Conditions for Using Bison".
5850 Update version to 1.24.
5852 1995-05-03 Richard Stallman <rms@gnu.org>
5854 * bison.simple: Change distribution terms.
5856 1995-02-23 Richard Stallman <rms@gnu.org>
5858 * src/files.c: Test __VMS_POSIX as well as VMS.
5860 1995-02-14 Jim Meyering <meyering@gnu.org>
5862 * src/bison.s1 (__yy_memcpy):
5863 Renamed from __yy_bcopy to avoid
5864 confusion. Reverse FROM and TO arguments to be consistent with
5867 1995-02-14 Jim Meyering <meyering@gnu.org>
5869 * bison.simple (__yy_memcpy):
5870 Renamed from __yy_bcopy to avoid
5871 confusion. Reverse FROM and TO arguments to be consistent with
5874 1994-11-10 David J. MacKenzie <djm@gnu.org>
5880 * Makefile.in (DISTFILES): Include NEWS.
5882 * Makefile.in (DISTFILES):
5883 Include install-sh, not install.sh.
5885 * configure.in: Update to Autoconf v2 macro names.
5887 1994-10-05 David J. MacKenzie <djm@gnu.org>
5889 * Makefile.in: fix typo
5891 * Makefile.in (prefix, exec_prefix):
5892 Let configure set them.
5894 1994-09-28 David J. MacKenzie <djm@gnu.org>
5896 * Makefile.in: Set datadir to $(prefix)/share.
5898 1994-09-15 Richard Stallman <rms@gnu.org>
5901 Update copyright notice and GPL version.
5903 1994-09-15 Richard Stallman <rms@gnu.org>
5906 Update copyright notice and GPL version.
5908 1994-07-12 Richard Stallman <rms@gnu.org>
5910 * src/reduce.c, src/reader.c:
5913 1994-05-05 David J. MacKenzie <djm@gnu.org>
5915 * Makefile.in: entered into RCS
5917 1994-03-26 Richard Stallman <rms@gnu.org>
5919 * src/bison.s1: entered into RCS
5921 1994-03-26 Richard Stallman <rms@gnu.org>
5923 * bison.simple: entered into RCS
5925 1994-03-25 Richard Stallman <rms@gnu.org>
5927 * src/main.c: entered into RCS
5929 1994-03-24 Richard Stallman <rms@gnu.org>
5931 * src/conflicts.c: entered into RCS
5933 1994-01-02 Richard Stallman <rms@gnu.org>
5935 * Makefile.in: *** empty log message ***
5937 1993-11-21 Richard Stallman <rms@gnu.org>
5939 * src/bison.s1: *** empty log message ***
5941 1993-11-21 Richard Stallman <rms@gnu.org>
5943 * doc/bison.texinfo: entered into RCS
5945 * doc/bison.texinfo: *** empty log message ***
5947 1993-11-21 Richard Stallman <rms@gnu.org>
5949 * bison.simple: *** empty log message ***
5951 1993-10-25 David J. MacKenzie <djm@gnu.org>
5953 * doc/bison.texinfo: *** empty log message ***
5955 1993-10-19 Richard Stallman <rms@gnu.org>
5957 * src/bison.s1: *** empty log message ***
5959 1993-10-19 Richard Stallman <rms@gnu.org>
5961 * bison.simple: *** empty log message ***
5963 1993-10-14 Richard Stallman <rms@gnu.org>
5965 * src/bison.s1: *** empty log message ***
5967 1993-10-14 Richard Stallman <rms@gnu.org>
5969 * bison.simple: *** empty log message ***
5971 1993-09-14 David J. MacKenzie <djm@gnu.org>
5973 * doc/bison.texinfo: *** empty log message ***
5975 1993-09-13 Noah Friedman <friedman@gnu.org>
5977 * Makefile.in: *** empty log message ***
5979 1993-09-10 Richard Stallman <rms@gnu.org>
5981 * src/conflicts.c: *** empty log message ***
5983 * src/system.h: entered into RCS
5985 1993-09-10 Richard Stallman <rms@gnu.org>
5987 * doc/bison.1: entered into RCS
5989 1993-09-06 Noah Friedman <friedman@gnu.org>
5991 * src/version.c: entered into RCS
5993 1993-09-06 Noah Friedman <friedman@gnu.org>
5995 * Makefile.in: *** empty log message ***
5997 1993-07-30 David J. MacKenzie <djm@gnu.org>
5999 * Makefile.in: *** empty log message ***
6001 1993-07-24 Richard Stallman <rms@gnu.org>
6003 * src/bison.s1: *** empty log message ***
6005 1993-07-24 Richard Stallman <rms@gnu.org>
6007 * bison.simple: *** empty log message ***
6009 1993-07-08 David J. MacKenzie <djm@gnu.org>
6011 * Makefile.in: *** empty log message ***
6013 1993-07-04 Richard Stallman <rms@gnu.org>
6015 * src/bison.s1: *** empty log message ***
6017 1993-07-04 Richard Stallman <rms@gnu.org>
6019 * bison.simple: *** empty log message ***
6021 1993-06-26 David J. MacKenzie <djm@gnu.org>
6023 * src/getargs.c: entered into RCS
6025 1993-06-26 David J. MacKenzie <djm@gnu.org>
6027 * doc/bison.texinfo: *** empty log message ***
6029 * doc/bison.1: New file.
6031 1993-06-25 Richard Stallman <rms@gnu.org>
6033 * src/getargs.c: New file.
6035 1993-06-16 Richard Stallman <rms@gnu.org>
6037 * src/bison.s1: *** empty log message ***
6039 1993-06-16 Richard Stallman <rms@gnu.org>
6041 * bison.simple: *** empty log message ***
6043 1993-06-03 Richard Stallman <rms@gnu.org>
6045 * src/bison.s1: New file.
6047 1993-06-03 Richard Stallman <rms@gnu.org>
6049 * doc/bison.texinfo: *** empty log message ***
6051 1993-06-03 Richard Stallman <rms@gnu.org>
6053 * bison.simple: New file.
6055 1993-05-19 Richard Stallman <rms@gnu.org>
6057 * doc/bison.texinfo: New file.
6059 1993-05-07 Noah Friedman <friedman@gnu.org>
6061 * Makefile.in: *** empty log message ***
6063 1993-04-28 Noah Friedman <friedman@gnu.org>
6065 * src/reader.c: *** empty log message ***
6067 1993-04-23 Noah Friedman <friedman@gnu.org>
6069 * src/alloc.h: entered into RCS
6071 1993-04-20 David J. MacKenzie <djm@gnu.org>
6073 * src/version.c: *** empty log message ***
6075 * src/files.c, src/allocate.c:
6078 * src/reader.c: *** empty log message ***
6080 * src/lex.c: entered into RCS
6082 * src/conflicts.c: New file.
6084 * src/symtab.c: entered into RCS
6086 * src/alloc.h: New file.
6088 * src/LR0.c: entered into RCS
6090 1993-04-18 Noah Friedman <friedman@gnu.org>
6092 * src/reader.c: New file.
6094 * src/version.c: *** empty log message ***
6096 1993-04-18 Noah Friedman <friedman@gnu.org>
6098 * Makefile.in: *** empty log message ***
6100 1993-04-17 Noah Friedman <friedman@gnu.org>
6102 * Makefile.in: *** empty log message ***
6104 1993-04-15 Richard Stallman <rms@gnu.org>
6106 * src/main.c, src/files.c:
6109 1993-04-15 Noah Friedman <friedman@gnu.org>
6111 * configure.in: entered into RCS
6113 * configure.in: *** empty log message ***
6115 * configure.in: New file.
6117 1993-04-14 Richard Stallman <rms@gnu.org>
6119 * Makefile.in: New file.
6121 1993-04-13 Richard Stallman <rms@gnu.org>
6123 * src/version.c: New file.
6125 1993-03-25 Richard Stallman <rms@gnu.org>
6127 * src/output.c: entered into RCS
6129 1992-09-25 Richard Stallman <rms@gnu.org>
6131 * configure.bat: entered into RCS
6133 1992-06-22 Richard Stallman <rms@gnu.org>
6135 * src/vmsgetargs.c: entered into RCS
6137 1992-06-22 Richard Stallman <rms@gnu.org>
6139 * doc/bison.rnh: entered into RCS
6141 1992-04-20 David J. MacKenzie <djm@gnu.org>
6143 * README: entered into RCS
6145 1992-01-22 Richard Stallman <rms@gnu.org>
6147 * src/machine.h: entered into RCS
6149 1991-12-21 Richard Stallman <rms@gnu.org>
6151 * src/lalr.c, src/closure.c:
6154 1991-12-20 Richard Stallman <rms@gnu.org>
6156 * src/state.h: entered into RCS
6158 1991-12-18 Richard Stallman <rms@gnu.org>
6160 * src/print.c, src/nullable.c, src/derives.c:
6163 1991-11-03 David J. MacKenzie <djm@gnu.org>
6165 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
6168 1988-09-09 Richard Stallman <rms@gnu.org>
6170 * src/bison.hairy: entered into RCS
6172 1987-12-16 Richard Stallman <rms@gnu.org>
6174 * REFERENCES: entered into RCS
6177 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6179 This file is part of GNU Autoconf.
6181 GNU Autoconf is free software; you can redistribute it and/or modify
6182 it under the terms of the GNU General Public License as published by
6183 the Free Software Foundation; either version 2, or (at your option)
6186 GNU Autoconf is distributed in the hope that it will be useful,
6187 but WITHOUT ANY WARRANTY; without even the implied warranty of
6188 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6189 GNU General Public License for more details.
6191 You should have received a copy of the GNU General Public License
6192 along with autoconf; see the file COPYING. If not, write to
6193 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6194 Boston, MA 02111-1307, USA.