1 2002-04-22 Akim Demaille <akim@epita.fr>
3 * src/reduce.c (dump_grammar): Move to...
4 * src/gram.h, src/gram.c (grammar_dump): here.
5 Be sure to separate long item numbers.
6 Don't read the members of a rule's prec if its nil.
8 2002-04-22 Akim Demaille <akim@epita.fr>
10 * src/output.c (table_size, table_grow): New.
11 (MAXTABLE): Remove, replace uses with table_size.
12 (pack_vector): Instead of dying when the table is too big, grow it.
14 2002-04-22 Akim Demaille <akim@epita.fr>
16 * data/bison.simple (yyr1): Its type is that of a token number.
17 * data/bison.c++ (r1_): Likewise.
18 * tests/regression.at (Web2c Actions): Adjust.
20 2002-04-22 Akim Demaille <akim@epita.fr>
22 * src/reader.c (token_translations_init): 256 is now the default
23 value for the error token, i.e., it will be assigned another
24 number if the user assigned 256 to one of her tokens.
25 (reader): Don't force 256 to error.
26 * doc/bison.texinfo (Symbols): Adjust.
27 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
28 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
29 etc. instead of 10, 20, 30 (which was used to `jump' over error
30 (256) and undefined (2)).
32 2002-04-22 Akim Demaille <akim@epita.fr>
34 Propagate more token_number_t.
36 * src/gram.h (token_number_as_item_number)
37 (item_number_as_token_number): New.
38 * src/output.c (GENERATE_OUTPUT_TABLE): New.
39 Use it to create output_item_number_table and
40 output_token_number_table.
41 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
42 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
43 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
44 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
47 2002-04-22 Akim Demaille <akim@epita.fr>
49 * src/output.h, src/output.c (get_lines_number): Remove.
51 2002-04-19 Akim Demaille <akim@epita.fr>
53 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
55 (Debugging): More details about enabling the debugging features.
56 (Table of Symbols): Describe $$, $n, @$, and @n.
57 Suggested by Tim Josling.
59 2002-04-19 Akim Demaille <akim@epita.fr>
61 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
63 2002-04-10 Akim Demaille <akim@epita.fr>
65 * src/system.h: Rely on HAVE_LIMITS_H.
66 Suggested by Paul Eggert.
68 2002-04-09 Akim Demaille <akim@epita.fr>
70 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
71 full stderr, and strip it according to the bison options, instead
72 of composing the error message from different bits.
73 This makes it easier to check for several error messages.
74 Adjust all the invocations.
75 Add an invocation exercising the error token.
76 Add an invocation demonstrating a stupid error message.
77 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
79 Error message are for stderr, not stdout.
81 2002-04-09 Akim Demaille <akim@epita.fr>
83 * src/gram.h, src/gram.c (error_token_number): Remove, use
85 * src/reader.c (reader): Don't specify the user token number (2)
86 for $undefined, as it uselessly prevents using it.
87 * src/gram.h (token_number_t): Move to...
89 (state_t.number): Is a token_number_t.
90 * src/print.c, src/reader.c: Use undeftoken->number instead of
92 (Even though this 2 is not the same as above: the number of the
93 undeftoken remains being 2, it is its user token number which
95 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
96 `user_token_number_max'.
97 Output `undef_token_number'.
98 * data/bison.simple, data/bison.c++: Use them.
99 Be sure to map invalid yylex return values to
100 `undef_token_number'. This saves us from gratuitous SEGV.
102 * tests/conflicts.at (Solved SR Conflicts)
103 (Unresolved SR Conflicts): Adjust.
104 * tests/regression.at (Web2c Actions): Adjust.
106 2002-04-08 Akim Demaille <akim@epita.fr>
108 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
110 Remove the duplicate `typedefs'.
111 (RhsNumberType): Fix the declaration and various other typos.
113 * data/bison.simple: Use __ofile__.
114 * src/scan-skel.l: Handle __ofile__.
116 2002-04-08 Akim Demaille <akim@epita.fr>
118 * src/gram.h (item_number_t): New, the type of item numbers in
119 RITEM. Note that it must be able to code symbol numbers as
120 positive number, and the negation of rule numbers as negative
122 Adjust all dependencies (pretty many).
123 * src/reduce.c (rule): Remove this `short *' pointer: use
125 * src/system.h (MINSHORT, MAXSHORT): Remove.
127 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
129 (MAXTABLE): Move to...
130 * src/output.c (MAXTABLE): here.
131 (prepare_rules): Use output_int_table to output rhs.
132 * data/bison.simple, data/bison.c++: Adjust.
133 * tests/torture.at (Big triangle): Move the limit from 254 to
135 * tests/regression.at (Web2c Actions): Ajust.
137 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
138 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
139 passes, but produces negative #line number, once fixed, GCC is
140 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
142 * src/state.h (state_h): Code input lines on ints, not shorts.
144 2002-04-08 Akim Demaille <akim@epita.fr>
146 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
147 and then the grammar.
149 2002-04-08 Akim Demaille <akim@epita.fr>
151 * src/system.h: No longer using strndup.
153 2002-04-07 Akim Demaille <akim@epita.fr>
155 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
156 * src/output.c (output_table_data): Return the longest number.
157 (prepare_tokens): Output `token_number_max').
158 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
160 Use them to define yy_token_number_type/TokenNumberType.
161 Use this type for yytranslate.
162 * tests/torture.at (Big triangle): Push the limit from 124 to
164 * tests/regression.at (Web2c Actions): Adjust.
166 2002-04-07 Akim Demaille <akim@epita.fr>
168 * tests/torture.at (Big triangle): New.
169 (GNU AWK Grammar, GNU Cim Grammar): Move to...
170 * tests/existing.at: here.
172 2002-04-07 Akim Demaille <akim@epita.fr>
174 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
178 2002-04-07 Akim Demaille <akim@epita.fr>
180 * src/reader.c: Normalize increments to prefix form.
182 2002-04-07 Akim Demaille <akim@epita.fr>
184 * src/reader.c, symtab.c: Remove debugging code.
186 2002-04-07 Akim Demaille <akim@epita.fr>
188 Rename all the `bucket's as `symbol_t'.
190 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
191 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
192 * src/symtab.c, src/symtab.h (bucket): Rename as...
194 (symbol_list_new, bucket_check_defined, bucket_make_alias)
195 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
196 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
197 (buckets_new, buckets_free, buckets_do): Rename as...
198 (symbol_list_new, symbol_check_defined, symbol_make_alias)
199 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
200 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
201 (symbols_new, symbols_free, symbols_do): these.
203 2002-04-07 Akim Demaille <akim@epita.fr>
205 Use lib/hash for the symbol table.
207 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
209 * src/lex.c (lex): Set the `number' member of new terminals.
210 * src/reader.c (bucket_check_defined, bucket_make_alias)
211 (bucket_check_alias_consistence, bucket_translation): New.
212 (reader, grammar_free, readgram, token_translations_init)
213 (packsymbols): Adjust.
214 (reader): Number the predefined tokens.
215 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
216 for predefined tokens.
217 * src/symtab.h (bucket): Remove all the hash table related
219 * src/symtab.c (symtab): Replace by...
220 (bucket_table): this.
221 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
222 (buckets_new, buckets_do): New.
224 2002-04-07 Akim Demaille <akim@epita.fr>
226 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
227 (start_symbol, max_user_token_number, semantic_parser)
228 (error_token_number): Initialize.
229 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
232 (errtoken, eoftoken, undeftoken, axiom): Extern.
234 2002-04-07 Akim Demaille <akim@epita.fr>
236 * src/gram.h (rule_s): prec and precsym are now pointers
237 to the bucket giving the priority/associativity.
238 Member `associativity' removed: useless.
239 * src/reduce.c, src/conflicts.c: Adjust.
241 2002-04-07 Akim Demaille <akim@epita.fr>
243 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
244 Properly escape the symbols' TAG when outputting them.
246 2002-04-07 Akim Demaille <akim@epita.fr>
248 * src/lalr.h (LA): Is a bitsetv, not bitset*.
250 2002-04-07 Akim Demaille <akim@epita.fr>
252 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
253 (LArule): this, which is an array to rule_t*.
254 * src/print.c, src/conflicts.c: Adjust.
256 2002-04-07 Akim Demaille <akim@epita.fr>
258 * src/gram.h (rule_t): Rename `number' as `user_number'.
259 `number' is a new member.
261 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
263 2002-04-07 Akim Demaille <akim@epita.fr>
265 As a result of the previous patch, it is no longer needed
266 to reorder ritem itself.
268 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
270 2002-04-07 Akim Demaille <akim@epita.fr>
272 Be sure never to walk through RITEMS, but use only data related to
273 the rules themselves. RITEMS should be banished.
275 * src/output.c (output_token_translations): Rename as...
276 (prepare_tokens): this.
277 In addition to `translate', prepare the muscles `tname' and
278 `toknum', which were handled by...
279 (output_rule_data): this.
280 Remove, and move the remainder of its outputs into...
281 (prepare_rules): this new routines, which also merges content from
283 (prepare_rules): Be sure never to walk through RITEMS.
284 (output_stos): Rename as...
285 (prepare_stos): this.
286 (output): Always invoke prepare_states, after all, just don't use it
287 in the output if you don't need it.
289 2002-04-07 Akim Demaille <akim@epita.fr>
291 * src/LR0.c (new_state): Display `nstates' as the name of the
293 Adjust to initialize first_state and last_state if needed.
294 Be sure to distinguish the initial from the final state.
295 (new_states): Create the itemset of the initial state, and use
297 * src/closure.c (closure): Now that the initial state has its
298 items properly set, there is no need for a special case when
301 As a result, now the rule 0, reducing to $axiom, is visible in the
302 outputs. Adjust the test suite.
304 * tests/conflicts.at (Solved SR Conflicts)
305 (Unresolved SR Conflicts): Adjust.
306 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
307 * tests/conflicts.at (S/R in initial): New.
309 2002-04-07 Akim Demaille <akim@epita.fr>
311 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
312 the RHS of the rules.
313 * src/output.c (output_gram): Likewise.
315 2002-04-07 Akim Demaille <akim@epita.fr>
317 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
319 Adjust all dependencies.
320 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
321 `number' of the buckets too.
322 * src/gram.h: Include `symtab.h'.
323 (associativity): Move to...
324 * src/symtab.h: here.
325 No longer include `gram.h'.
327 2002-04-07 Akim Demaille <akim@epita.fr>
329 * src/gram.h, src/gram.c (rules_rhs_length): New.
330 (ritem_longest_rhs): Use it.
331 * src/gram.h (rule_t): `number' is a new member.
332 * src/reader.c (packgram): Set it.
333 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
334 the end of `rules', and count them out of `nrules'.
335 (reduce_output, dump_grammar): Adjust.
336 * src/print.c (print_grammar): It is no longer needed to check for
337 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
338 * tests/reduce.at (Reduced Automaton): New test.
340 2002-04-07 Akim Demaille <akim@epita.fr>
342 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
343 lacking `+ 1' to nrules, Bison reported as useless a token if it
344 was used solely to set the precedence of the last rule...
346 2002-04-07 Akim Demaille <akim@epita.fr>
348 * data/bison.c++, data/bison.simple: Don't output the current file
349 name in #line, to avoid useless diffs between two identical
350 outputs under different names.
352 2002-04-07 Akim Demaille <akim@epita.fr>
354 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
355 Normalize loops to using `< nrules + 1', not `<= nrules'.
357 2002-04-07 Akim Demaille <akim@epita.fr>
361 2002-04-07 Akim Demaille <akim@epita.fr>
363 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
364 bucket.value as bucket.number.
366 2002-04-07 Akim Demaille <akim@epita.fr>
368 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
369 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
370 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
371 RHS, instead of being an index in RITEMS.
373 2002-04-04 Paul Eggert <eggert@twinsun.com>
375 * doc/bison.texinfo: Update copyright date.
376 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
377 (Symbols): Warn about running Bison in one character set,
378 but compiling and/or running in an incompatible one.
379 Warn about character code 256, too.
381 2002-04-03 Paul Eggert <eggert@twinsun.com>
383 * src/bison.data (YYSTACK_ALLOC): Depend on whether
384 YYERROR_VERBOSE is nonzero, not whether it is defined.
386 Merge changes from bison-1_29-branch.
388 2002-03-20 Paul Eggert <eggert@twinsun.com>
390 Merge fixes from Debian bison_1.34-1.diff.
392 * configure.in (AC_PREREQ): 2.53.
394 2002-03-20 Akim Demaille <akim@epita.fr>
396 * src/conflicts.c (log_resolution): Argument `resolution' is const.
398 2002-03-19 Paul Eggert <eggert@twinsun.com>
400 * src/bison.simple (YYCOPY): New macro.
401 (YYSTACK_RELOCATE): Use it.
402 Remove Type arg; no longer needed. All callers changed.
403 (yymemcpy): Remove; no longer needed.
405 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
406 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
408 2002-03-19 Akim Demaille <akim@epita.fr>
410 Test and fix the #line outputs.
412 * tests/atlocal.at (GCC): New.
413 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
414 (Prologue synch line, ,%union synch line, Postprologue synch line)
415 (Action synch line, Epilogue synch line): New tests.
416 * src/reader.c (parse_union_decl): Define the muscle stype_line.
417 * data/bison.simple, data/bison.c++: Use it.
419 2002-03-19 Akim Demaille <akim@epita.fr>
421 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
422 (Solved SR Conflicts, %expect not enough, %expect right)
423 (%expect too much): Move to...
424 * tests/conflicts.at: this new file.
426 2002-03-19 Akim Demaille <akim@epita.fr>
428 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
429 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
430 that we can move to enums for instance.
431 * src/output.c (token_definitions_output): Output a list of
432 `token-name, token-number' instead of the #define.
433 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
435 2002-03-14 Akim Demaille <akim@epita.fr>
439 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
441 * data/bison.c++: Make the user able to add members to the generated
442 parser by subclassing.
444 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
446 * src/reader.c (read_additionnal_code): `c' should be an integer, not
448 Reported by Nicolas Tisserand and Nicolas Burrus.
450 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
452 * src/reader.c: Warn about lacking semi-colons, do not complain.
454 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
456 * data/bison.c++: Remove a debug line.
458 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
460 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
461 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
462 provide a default implementation.
464 2002-03-04 Akim Demaille <akim@epita.fr>
466 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
467 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
468 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
469 * tests/semantic.at (Parsing Guards): Similarly.
470 * src/reader.at (readgram): Complain if the last rule is not ended
473 2002-03-04 Akim Demaille <akim@epita.fr>
475 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
476 * src/closure.c: here.
477 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
479 * src/warshall.h, src/warshall.c: Remove.
480 * tests/sets.at (Broken Closure): Adjust.
482 2002-03-04 Akim Demaille <akim@epita.fr>
484 * src/output.c (output_skeleton): tempdir is const.
485 bytes_read is unused.
487 2002-03-04 Akim Demaille <akim@epita.fr>
489 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
490 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
494 2002-03-04 Akim Demaille <akim@epita.fr>
496 * src/closure.c (closure): `r' is unused.
498 2002-03-04 Akim Demaille <akim@epita.fr>
500 * tests/sets.at (Broken Closure): Add the ending `;'.
501 * src/reader.at (readgram): Complain if a rule is not ended with a
504 2002-03-04 Akim Demaille <akim@epita.fr>
506 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
507 (count_sr_conflicts): Use bitset_count.
508 * src/reduce.c (inaccessable_symbols): Ditto.
510 * src/warshall.h, src/warshall.c: Convert to bitsetv.
512 2002-03-04 Akim Demaille <akim@epita.fr>
514 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
515 * src/reduce.c: Remove the `bitset_zero's following the
516 `bitset_create's, as now it is performed by the latter.
518 2002-03-04 Akim Demaille <akim@epita.fr>
520 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
521 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
522 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
523 latest sources from Michael.
525 2002-03-04 Akim Demaille <akim@epita.fr>
527 * src/output.c (output): Don't free the grammar.
528 * src/reader.c (grammar_free): New.
529 * src/main.c (main): Call it and don't free symtab here.
531 2002-03-04 Akim Demaille <akim@epita.fr>
533 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
535 Reported by Benoit Perrot.
537 2002-03-04 Akim Demaille <akim@epita.fr>
539 Use bitset operations when possible, not loops over bits.
541 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
543 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
544 * src/reduce.c (useless_nonterminals): Formatting changes.
545 * src/warshall.c (TC): Use bitset_or.
547 2002-03-04 Akim Demaille <akim@epita.fr>
549 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
550 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
553 2002-03-04 Akim Demaille <akim@epita.fr>
555 * src/lalr.c (F): Now a bitset*.
556 Adjust all dependencies.
558 2002-03-04 Akim Demaille <akim@epita.fr>
560 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
561 Adjust all dependencies.
563 2002-03-04 Akim Demaille <akim@epita.fr>
565 * src/L0.c, src/LR0.h (nstates): Be size_t.
566 Adjust comparisons (signed vs unsigned).
567 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
569 Adjust all dependencies.
571 2002-03-04 Akim Demaille <akim@epita.fr>
573 * src/closure.c (firsts): Now, also a bitset.
574 Adjust all dependencies.
575 (varsetsize): Remove, now unused.
576 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
578 2002-03-04 Akim Demaille <akim@epita.fr>
580 * src/print.c: Convert to use bitset.h, not hand coded iterations
583 2002-03-04 Akim Demaille <akim@epita.fr>
585 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
587 2002-03-04 Akim Demaille <akim@epita.fr>
589 * src/closure.c (ruleset): Be a bitset.
590 (rulesetsize): Remove.
592 2002-03-04 Akim Demaille <akim@epita.fr>
594 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
595 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
596 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
597 * src/closure.c (fderives): Be an array of bitsets.
599 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
601 * data/bison.c++: Merge the two generated headers. Insert a copyright
602 notice in each output file.
604 2002-02-28 Akim Demaille <akim@epita.fr>
606 * data/bison.c++: Copy the prologue of bison.simple to fetch
607 useful M4 definitions, such as b4_header_guard.
609 2002-02-25 Akim Demaille <akim@epita.fr>
611 * src/getargs.c (version): Give the name of the authors, and use a
612 translator friendly scheme for the bgr
615 2002-02-25 Akim Demaille <akim@epita.fr>
617 * src/output.c (header_output): Remove, now handled completely via
620 2002-02-25 Akim Demaille <akim@epita.fr>
622 * m4/m4.m4: New, from CVS Autoconf.
623 * configure.in: Invoke it.
624 * src/output.c (output_skeleton): Use its result instead of the
627 2002-02-25 Akim Demaille <akim@epita.fr>
629 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
631 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
632 * src/output.c (output_skeleton): Use mkstemp to create a real
634 Move the filling of `skeleton' and its muscle to...
636 (output): Move the definition of the prologue muscle to...
638 * src/system.h (DEFAULT_TMPDIR): New.
640 2002-02-14 Paul Eggert <eggert@twinsun.com>
642 Remove the support for C++ namespace cleanliness; it was
643 causing more problems than it was curing, since it didn't work
644 properly on some nonstandard C++ compilers. This can wait
645 for a proper C++ parser.
647 * NEWS: Document this.
648 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
649 of C++, as it's treated like C now.
650 * src/bison.simple (YYSTD): Remove.
651 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
652 Treat C++ just like Standard C instead of trying to support
653 namespace cleanliness.
655 2002-02-14 Akim Demaille <akim@epita.fr>
657 * tests/regression.at (else): Adjust to Andreas' change.
659 2002-02-14 Akim Demaille <akim@epita.fr>
661 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
663 2002-02-13 Andreas Schwab <schwab@suse.de>
665 * src/output.c (output_rule_data): Don't output NULL, it might
668 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
670 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
671 (Copyright notice): Update.
673 2002-02-11 Akim Demaille <akim@epita.fr>
675 * tests/regression.at (%nonassoc and eof): Don't include
678 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
680 * data/bison.c++: Correct error recovery. Make the user able to
681 initialize the starting location.
683 2002-02-07 Akim Demaille <akim@epita.fr>
685 * tests/input.at: New.
687 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
689 * data/bison.c++: Replace some direct m4 expansions by constants. Be
690 more consistent when naming methods and variables. Put preprocessor
691 directives around tables only needed for debugging.
693 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
695 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
697 (yy::b4_name::parse): Use print_.
699 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
701 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
703 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
705 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
707 (yy::b4_name::parse): Build verbose error messages, and use error_.
709 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
711 * data/bison.c++: Fix m4 quoting in comments.
713 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
715 * data/bison.c++: Adjust the parser code. Fix some muscles that were
718 2002-02-05 Akim Demaille <akim@epita.fr>
720 * data/bison.c++: Adjust to the M4 back end.
721 More is certainly needed.
723 2002-02-05 Akim Demaille <akim@epita.fr>
725 Give a try to M4 as a back end.
727 * lib/readpipe.c: New, from wdiff.
728 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
730 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
731 specific values. Now it is m4 that performs the lookup.
732 * src/parse-skel.y: Remove.
733 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
734 * src/output.c (actions_output, guards_output)
735 (token_definitions_output): No longer keeps track of the output
736 line number, hence remove the second argument.
737 (guards_output): Check against the guard member of a rule, not the
740 (output_skeleton): Don't look for the skeleton location, let m4 do
742 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
744 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
745 (prepare): Given that for the time being changesyntax is not
746 usable in M4, rename the muscles using `-' to `_'.
747 Define `defines_flag', `output_parser_name' and `output_header_name'.
748 * src/output.h (actions_output, guards_output)
749 (token_definitions_output): Adjust prototypes.
750 * src/scan-skel.l: Instead of scanning the skeletons, it now
751 processes the output of m4: `__oline__' and `#output'.
752 * data/bison.simple: Adjust to be used by M4(sugar).
753 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
755 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
756 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
757 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
758 shamelessly stolen from CVS Autoconf.
760 2002-02-05 Akim Demaille <akim@epita.fr>
762 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
763 * configure.in: Check for the declarations of free and malloc.
764 * src/muscle_tab.c: Adjust.
766 2002-02-05 Akim Demaille <akim@epita.fr>
768 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
769 which have no values.
771 2002-02-05 Akim Demaille <akim@epita.fr>
773 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
776 2002-01-29 Paul Eggert <eggert@twinsun.com>
778 * src/bison.simple (YYSIZE_T): Do not define merely because
779 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
780 On some platforms, <alloca.h> does not declare YYSTD (size_t).
782 2002-01-27 Akim Demaille <akim@epita.fr>
784 Fix `%nonassoc and eof'.
786 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
787 which were not properly copied! Replace
788 memcpy (res->errs, src->errs, src->nerrs);
790 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
792 * tests/regression.at (%nonassoc and eof): Adjust to newest
793 Autotest: `.' is not in the PATH.
795 2002-01-27 Akim Demaille <akim@epita.fr>
797 * tests/sets.at (AT_EXTRACT_SETS): New.
801 2002-01-26 Akim Demaille <akim@epita.fr>
803 * tests/actions.at, tests/calc.at, tests/headers.at,
804 * tests/torture.at: Adjust to the newest Autotest which no longer
805 forces `.' in the PATH.
807 2002-01-25 Akim Demaille <akim@epita.fr>
809 * tests/regression.at (%nonassoc and eof): New.
810 Suggested by Robert Anisko.
812 2002-01-24 Akim Demaille <akim@epita.fr>
814 Bison dumps core when trying to complain about broken input files.
815 Reported by Cris van Pelt.
817 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
818 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
820 (Invalid inputs): Strengthen: exercise parse_percent_token.
822 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
824 * src/Makefile.am: Add bison.c++.
825 * src/bison.c++: New skeleton.
827 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
831 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
833 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
835 2002-01-20 Marc Autret <marc@gnu.org>
837 * src/files.c (compute_output_file_names): Fix
839 2002-01-20 Marc Autret <marc@gnu.org>
841 * tests/output.at: New test.
842 * src/files.c (compute_base_names): Don't map extensions when
843 the YACC flag is set, use defaults.
844 Reported by Evgeny Stambulchik.
846 2002-01-20 Marc Autret <marc@gnu.org>
848 * src/system.h: Need to define __attribute__ away for non-GCC
849 compilers as well (i.e. the vendor C compiler).
850 Suggested by Albert Chin-A-Young.
852 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
854 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
855 canonical definition.
856 * src/system.h: Use the canonical definition for PARAMS (avoids
857 a conflict with the macro from lib/hash.h).
859 2002-01-11 Akim Demaille <akim@epita.fr>
861 * configure.in: Use AC_FUNC_STRNLEN.
862 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
864 2002-01-09 Akim Demaille <akim@epita.fr>
866 * src/files.c, src/files.h (output_infix): New.
867 (tab_extension): Remove.
868 (compute_base_names): Compute the former, drop the latter.
869 * src/output.c (prepare): Insert the muscles `output-infix', and
871 * src/parse-skel.y (string, string.1): New.
872 (section.header): Use it.
873 (section.yacc): Remove.
874 (prefix): Remove too.
875 * src/scan-skel.l: Adjust.
876 * src/bison.simple, src/bison.hairy: Adjust.
878 2002-01-09 Akim Demaille <akim@epita.fr>
880 * configure.in (WERROR_CFLAGS): Compute it.
881 * src/Makefile.am (CFLAGS): Pass it.
882 * tests/atlocal.in (CFLAGS): Idem.
883 * src/files.c: Fix a few warnings.
884 (get_extension_index): Remove, unused.
886 2002-01-08 Akim Demaille <akim@epita.fr>
888 * src/getargs.c (AS_FILE_NAME): New.
889 (getargs): Use it to convert DOSish file names.
890 * src/files.c (base_name): Rename as full_base_name to avoid
891 clashes with `base_name ()'.
892 (filename_split): New.
893 (compute_base_names): N-th rewrite, using filename_split.
895 2002-01-08 Akim Demaille <akim@epita.fr>
897 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
898 New, stolen from the Fileutils 4.1.
899 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
900 * configure.in: Check for the presence of memrchr, and of its
903 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
905 * lib/hash.h (__P): Added definition for this macro.
906 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
907 BUILT_SOURCES, to ensure they are generated first.
908 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
909 %error-verbose to allow bootstrapping with bison 1.30x.
911 2002-01-06 Akim Demaille <akim@epita.fr>
913 * src/reader.c (parse_braces): Don't fetch the next char, the
914 convention is to fetch on entry.
915 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
916 'switch' without a following semicolon.
917 * tests/regression.at (braces parsing): New.
919 2002-01-06 Akim Demaille <akim@epita.fr>
921 Bison is dead wrong in its RR conflict reports.
923 * tests/torture.at (GNU Cim Grammar): New.
924 * src/conflicts.c (count_rr_conflicts): Fix.
926 2002-01-06 Akim Demaille <akim@epita.fr>
928 Creating package.m4 from configure.ac causes too many problems.
930 * tests/Makefile.am (package.m4): Create it by hand,
931 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
933 2002-01-06 Akim Demaille <akim@epita.fr>
935 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
938 2002-01-04 Paul Eggert <eggert@twinsun.com>
940 * doc/bison.texinfo (Debugging):
941 Remove YYSTDERR; it's no longer defined or used.
942 Also, s/cstdio.h/cstdio/.
944 2002-01-03 Akim Demaille <akim@epita.fr>
946 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
948 2002-01-03 Akim Demaille <akim@epita.fr>
950 * src/parse-skel.y (process_skeleton): Don't bind the parser's
951 tracing code to --trace, wait for a better --trace option, with
954 2002-01-03 Akim Demaille <akim@epita.fr>
956 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
957 The ISO C++ standard is extremely clear about it: stderr is
958 considered a macro, not a regular symbol (see table 94 `Header
959 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
960 Therefore std:: does not apply to it. It still does with fprintf.
961 Also, s/cstdio.h/cstdio/.
963 2002-01-03 Akim Demaille <akim@epita.fr>
965 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
966 for non system headers.
968 2002-01-02 Akim Demaille <akim@epita.fr>
970 Equip the skeleton chain with location tracking, runtime trace,
971 pure parser and scanner.
973 * src/parse-skel.y: Request a pure parser, locations, and prefix
975 (%union): Having several members with the same type does not help
976 type mismatches, simplify.
977 (YYPRINT, yyprint): New.
978 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
981 * src/scan-skel.l: Adjust to these changes.
982 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
983 (LOCATION_PRINT, skel_control_t): New.
985 2001-12-30 Akim Demaille <akim@epita.fr>
987 * src/parse-skel.y: Get rid of the shift/reduce conflict:
988 replace `gb' with BLANKS.
989 * src/scan-skel.l: Adjust.
991 2001-12-30 Akim Demaille <akim@epita.fr>
993 * src/system.h: We don't need nor want bcopy.
994 Throw away MS-DOS crap: we don't need getpid.
995 * configure.in: We don't need strndup. It was even causing
996 problems: because Flex includes the headers *before* us,
997 _GNU_SOURCE is not defined by config.h, and therefore strndup was
999 * lib/xstrndup.c: New.
1000 * src/scan-skel.l: Use it.
1001 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1002 * src/parse-skel.y: Use %directives instead of #defines.
1004 2001-12-30 Akim Demaille <akim@epita.fr>
1006 * src/skeleton.h: New.
1007 * src/output.c (output_parser, output_master_parser): Remove, dead
1009 * src/output.h (get_lines_number, actions_output, guards_output)
1010 (token_definitions_output): Prototype them.
1011 * src/parse-skel.y: Add the license notice.
1012 Include output.h and skeleton.h.
1013 (process_skeleton): Returns void, and takes a single parameter.
1014 * src/scan-skel.l: Add the license notice.
1016 Don't use %option yylineno: it seems that then Flex imagines
1017 REJECT has been used, and therefore it won't reallocate its
1018 buffers (which makes no other sense to me than a bug). It results
1019 in warnings for `unused: yy_flex_realloc'.
1021 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
1023 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1024 (MUSCLE_INSERT_PREFIX): ...to there.
1025 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1026 (MUSCLE_INSERT_PREFIX): Move from here...
1028 * src/bison.hairy: Add a section directive. Put braces around muscle
1029 names. This parser skeleton is still broken, but Bison should not
1030 choke on a bad muscle 'syntax'.
1031 * src/bison.simple: Add a section directive. Put braces around muscle
1034 * src/files.h (strsuffix, stringappend): Add declarations.
1035 (tab_extension): Add declaration.
1036 (short_base_name): Add declaration.
1038 * src/files.c (strsuffix, stringappend): No longer static. These
1039 functions are used in the skeleton parser.
1040 (tab_extension): New.
1041 (compute_base_names): Use the computations done in this function
1042 to guess if the generated parsers should have '.tab' in their
1044 (short_base_name): No longer static.
1046 * src/output.c (output_skeleton): New.
1047 (output): Disable call to output_master_parser, and give a try to
1048 a new skeleton handling system.
1049 (guards_output, actions_output): No longer static.
1050 (token_definitions_output, get_lines_number): No longer static.
1052 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1054 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1057 * src/parse-skel.y: New file.
1058 * src/scan-skel.l: New file.
1060 2001-12-29 Akim Demaille <akim@epita.fr>
1062 %name-prefix is broken.
1064 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1065 Adjust all dependencies.
1066 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1069 Renaming yylval but not yylloc is not consistent. Now we do.
1071 * src/bison.simple: Prefix yylloc if used.
1072 * doc/bison.texinfo (Decl Summary): Document that.
1074 2001-12-29 Akim Demaille <akim@epita.fr>
1076 * doc/bison.texinfo: Promote `%long-directive' over
1078 Remove all references to fixed-output-files, yacc is enough.
1080 2001-12-29 Akim Demaille <akim@epita.fr>
1082 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1083 user prologue. These are defaults.
1084 * tests/actions.at (Mid-rule actions): Make sure the user can
1085 define YYDEBUG and YYERROR_VERBOSE.
1087 2001-12-29 Akim Demaille <akim@epita.fr>
1089 * src/output.c (header_output): Don't forget to export YYLTYPE and
1091 * tests/headers.at (export YYLTYPE): New, make sure it does.
1092 * tests/regression.at (%union and --defines, Invalid CPP headers):
1094 * tests/headers.at: here.
1096 2001-12-29 Akim Demaille <akim@epita.fr>
1098 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1100 2001-12-29 Akim Demaille <akim@epita.fr>
1102 * tests/actions.at (Mid-rule actions): Output on a single line
1105 2001-12-29 Akim Demaille <akim@epita.fr>
1107 * doc/bison.texinfo: Formatting changes.
1109 2001-12-29 Akim Demaille <akim@epita.fr>
1111 Don't store the token defs in a muscle, just be ready to output it
1112 on command. Now possible via `symbols'. Fixes a memory leak.
1114 * src/output.c (token_definitions_output): New.
1115 (output_parser, header_output): Use it.
1116 * src/reader.c (symbols_save): Remove.
1118 2001-12-29 Akim Demaille <akim@epita.fr>
1120 * src/bison.simple: Do not provide a default for YYSTYPE and
1121 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1124 2001-12-29 Akim Demaille <akim@epita.fr>
1126 Mid-rule actions are simply... ignored!
1128 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1129 the empty-rule associated to the dummy symbol, not to the host
1131 * tests/actions.at (Mid-rule actions): New.
1133 2001-12-29 Akim Demaille <akim@epita.fr>
1137 * src/reader.c (reader): Free grammar.
1139 2001-12-29 Akim Demaille <akim@epita.fr>
1143 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1144 since it allocates it for each state, although only one is needed.
1145 (allocate_storage): Do it here.
1147 2001-12-29 Akim Demaille <akim@epita.fr>
1149 * src/options.h, src/options.c (create_long_option_table): Rename
1151 (long_option_table_new): this, with a clearer prototype.
1152 (percent_table): Remove, unused,
1153 * src/getargs.c (getargs): Adjust.
1155 2001-12-29 Akim Demaille <akim@epita.fr>
1157 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1158 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1161 2001-12-29 Akim Demaille <akim@epita.fr>
1163 * src/lalr.c (build_relations): Rename `states' as `states1'.
1164 Sorry, I don't understand exactly what it is, no better name...
1166 2001-12-29 Akim Demaille <akim@epita.fr>
1168 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1169 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1170 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1173 2001-12-29 Akim Demaille <akim@epita.fr>
1175 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1178 2001-12-29 Akim Demaille <akim@epita.fr>
1180 * src/reader.c, src/reader.h (user_toknums): Remove.
1181 Adjust all users to use symbols[i]->user_token_number.
1183 2001-12-29 Akim Demaille <akim@epita.fr>
1185 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1186 Adjust all users to use symbols[i]->prec or ->assoc.
1188 2001-12-29 Akim Demaille <akim@epita.fr>
1190 * src/reader.c, src/reader.h (tags): Remove.
1191 Adjust all users to use symbols[i]->tag.
1193 2001-12-29 Akim Demaille <akim@epita.fr>
1195 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1197 * src/reader.c (packsymbols): Fill this table.
1199 * src/conflicts.c (resolve_sr_conflict): Adjust.
1200 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1202 Use symbols[i]->tag instead of tags[i].
1204 2001-12-29 Akim Demaille <akim@epita.fr>
1206 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1207 In addition, put a comment in there, to replace...
1208 * tests/regression.at (%union and C comments): Remove.
1210 2001-12-29 Akim Demaille <akim@epita.fr>
1212 * tests/regression.at (Web2c Actions): Blindly move the actual
1213 output as expected output. The contents *seem* right to me, but I
1214 can't pretend reading perfectly parser tables... Nonetheless, all
1215 the other tests pass correctly, the table look OK, even though the
1216 presence of `$axiom' is to be noted: AFAICS it is useless (but
1219 2001-12-29 Akim Demaille <akim@epita.fr>
1221 * src/reader.c (readgram): Don't add the rule 0 if there were no
1222 rules read. In other words, add it _after_ having performed
1223 grammar sanity checks.
1224 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1226 2001-12-29 Akim Demaille <akim@epita.fr>
1228 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1229 visible, and some states have now a different number.
1231 2001-12-29 Akim Demaille <akim@epita.fr>
1233 * src/reader.c (readgram): Bind the initial rule's lineno to that
1235 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1236 (Solved SR Conflicts): Adjust rule 0's line number.
1238 2001-12-29 Akim Demaille <akim@epita.fr>
1240 Fix the `GAWK Grammar' failure.
1242 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1243 the reductions of the first state which was mistakenly confused
1244 with the final state because precisely final_state was initialized
1246 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1247 now noticed by Bison.
1248 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1249 have a reduction on $default.
1251 2001-12-29 Akim Demaille <akim@epita.fr>
1253 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1255 * src/closure.c (print_closure): Likewise.
1256 * src/derives.c (print_derives): Likewise.
1257 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1260 2001-12-29 Akim Demaille <akim@epita.fr>
1262 * src/lalr.c (lookaheads_print): New.
1263 (lalr): Call it when --trace-flag.
1264 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1267 2001-12-29 Akim Demaille <akim@epita.fr>
1269 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1270 when walking through ritem, even via rule->rhs.
1271 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1272 (useful_production, useless_nonterminals): Likewise.
1273 (reduce_grammar_tables): Likewise, plus update nritems.
1274 * src/nullable.c (set_nullable): Likewise.
1275 * src/lalr.c (build_relations): Likewise.
1276 * tests/sets.at (Nullable): Adjust.
1277 Fortunately, now, the $axiom is no longer nullable.
1279 2001-12-29 Akim Demaille <akim@epita.fr>
1281 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1283 * src/gram.c (ritem_longest_rhs): Likewise.
1284 * src/reduce.c (nonterminals_reduce): Likewise.
1285 * src/print_graph.c (print_graph): Likewise.
1286 * src/output.c (output_rule_data): Likewise.
1287 * src/nullable.c (set_nullable): Likewise.
1289 2001-12-29 Akim Demaille <akim@epita.fr>
1291 * src/output.c: Comment changes.
1293 2001-12-27 Paul Eggert <eggert@twinsun.com>
1295 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1296 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1297 Sparc, as they were causing more porting problems than the
1298 (minor) performance improvement was worth.
1300 Also, catch up with 1.31's YYSTD.
1302 2001-12-27 Akim Demaille <akim@epita.fr>
1304 * src/output.c (output_gram): Rely on nritems, not the
1305 0-sentinel. See below.
1306 Use -1 as separator, not 0.
1307 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1308 Rely on -1 as separator in yyrhs, instead of 0.
1309 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1310 twice `Now at end of input', therefore there are two lines less to
1313 2001-12-27 Akim Demaille <akim@epita.fr>
1315 * tests/regression.at (Unresolved SR Conflicts):
1316 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1319 2001-12-27 Akim Demaille <akim@epita.fr>
1321 * src/LR0.c (new_state): Recognize the final state by the fact it
1322 is reached by eoftoken.
1323 (insert_start_shifting_state, insert_eof_shifting_state)
1324 (insert_accepting_state, augment_automaton): Remove, since now
1325 these states are automatically computed from the initial state.
1326 (generate_states): Adjust.
1327 * src/print.c: When reporting a rule number to the user, substract
1328 1, so that the axiom rule is rule 0, and the first user rule is 1.
1329 * src/reduce.c: Likewise.
1330 * src/print_graph.c (print_core): For the time being, just as for
1331 the report, depend upon --trace-flags to dump the full set of
1333 * src/reader.c (readgram): Once the grammar read, insert the rule
1334 0: `$axiom: START-SYMBOL $'.
1335 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1336 number of the states has changed (the final state is no longer
1337 necessarily the last), catch up.
1339 2001-12-27 Akim Demaille <akim@epita.fr>
1341 Try to make the use of the eoftoken valid. Given that its value
1342 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1343 is used instead of > 0 where appropriate, (ii), depend upon nritems
1344 instead of the 0-sentinel.
1346 * src/gram.h, src/gram.c (nritems): New.
1347 Expected to be duplication of nitems, but for the time being...
1348 * src/reader.c (packgram): Assert nritems and nitems are equal.
1349 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1350 * src/closure.c (print_closure, print_fderives): Likewise.
1351 * src/gram.c (ritem_print): Likewise.
1352 * src/print.c (print_core, print_grammar): Likewise.
1353 * src/print_graph.c: Likewise.
1355 2001-12-27 Akim Demaille <akim@epita.fr>
1357 * src/main.c (main): If there are complains after grammar
1358 reductions, then output the report anyway if requested, then die.
1359 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1360 * src/reader.c (eoftoken): New.
1361 (parse_token_decl): If the token being defined has value `0', it
1363 (packsymbols): No longer hack `tags' to insert `$' by hand.
1364 Be sure to preserve the value of the eoftoken.
1365 (reader): Make sure eoftoken is defined.
1366 Initialize nsyms to 0: now eoftoken is created just like the others.
1367 * src/print.c (print_grammar): Don't special case the eof token.
1368 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1369 lie anyway, albeit pleasant.
1370 * tests/calc.at: Exercise error messages with eoftoken.
1371 Change the grammar so that empty input is invalid.
1372 Adjust expectations.
1373 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1375 2001-12-27 Akim Demaille <akim@epita.fr>
1377 * configure.in: Check the protos of strchr ans strspn.
1378 Replace strchr if needed.
1379 * src/system.h: Provide the protos of strchr, strspn and memchr if
1381 * lib/strchr.c: New.
1382 * src/reader.c (symbols_save): Use strchr.
1384 2001-12-27 Akim Demaille <akim@epita.fr>
1386 * src/print.c, src/print_graph.c (escape): New.
1387 Use it to quote the TAGS outputs.
1388 * src/print_graph.c (print_state): Now errors are in red, and
1389 reductions in green.
1390 Prefer high to wide: output the state number on a line of its own.
1392 2001-12-27 Akim Demaille <akim@epita.fr>
1394 * src/state.h, src/state.c (reductions_new): New.
1395 * src/LR0.c (set_state_table): Let all the states have a
1396 `reductions', even if reduced to 0.
1397 (save_reductions): Adjust.
1398 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1399 * src/print.c (print_reductions, print_actions): Adjust.
1400 * src/output.c (action_row): Adjust.
1402 2001-12-27 Akim Demaille <akim@epita.fr>
1404 * src/state.h, src/state.c (errs_new, errs_dup): New.
1405 * src/LR0.c (set_state_table): Let all the states have an errs,
1406 even if reduced to 0.
1407 * src/print.c (print_errs, print_reductions): Adjust.
1408 * src/output.c (output_actions, action_row): Adjust.
1409 * src/conflicts.c (resolve_sr_conflict): Adjust.
1411 2001-12-27 Akim Demaille <akim@epita.fr>
1413 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1415 2001-12-27 Akim Demaille <akim@epita.fr>
1417 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1418 * src/print.c: here.
1419 (lookaheadset, shiftset): New, used as additional storage by
1421 (print_results): Adjust.
1422 (print_shifts, print_gotos, print_errs): New, extracted from...
1423 (print_actions): here.
1424 * src/print_graph.c (print_actions): Remove dead code.
1426 2001-12-27 Akim Demaille <akim@epita.fr>
1428 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1431 2001-12-27 Akim Demaille <akim@epita.fr>
1433 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1434 (build_relations): Adjust.
1436 2001-12-27 Akim Demaille <akim@epita.fr>
1438 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1441 2001-12-27 Akim Demaille <akim@epita.fr>
1443 * src/reader.c (packgram): Catch nitems overflows.
1445 2001-12-27 Akim Demaille <akim@epita.fr>
1447 * src/files.c, src/files.h (guard_obstack): Remove.
1448 * src/output.c (output): Adjust.
1449 * src/reader.c (parse_braces): New, factoring...
1450 (copy_action, copy_guard): these two which are renamed as...
1451 (parse_action, parse_guard): these.
1452 As a voluntary consequence, using braces around guards is now
1455 2001-12-27 Akim Demaille <akim@epita.fr>
1457 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1458 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1460 (symbol_list_new): Adjust.
1461 (copy_action): action_line is the first line, not the last.
1462 (copy_guard): Just as for actions, store the `action' only, not
1463 the switch/case/break flesh.
1464 Don't parse the user action that might follow the guard, let...
1465 (readgram): do it, i.e., now, there can be an action after a
1467 In other words the guard is just explicitly optional.
1469 * src/output.c (guards_output): New.
1470 (output_parser): Call it when needed.
1471 (output): Also free the guard and attrs obstacks.
1472 * src/files.c, src/files.h (obstack_save): Remove.
1473 (output_files): Remove.
1474 As a result, if one needs the former `.act' file, using an
1475 appropriate skeleton which requires actions and guards is now
1477 * src/main.c (main): Adjust.
1478 * tests/semantic.at: New.
1479 * tests/regression.at: Use `input.y' as input file name.
1480 Avoid 8+3 problems by requiring input.c when the test needs the
1483 2001-12-27 Akim Demaille <akim@epita.fr>
1485 * src/reader.c (symbol_list_new): Be sure to initialize all the
1488 2001-12-27 Akim Demaille <akim@epita.fr>
1490 All the hacks using a final pseudo state are now useless.
1492 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1493 * src/lalr.c (nLA): New.
1494 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1495 instead of lookaheadsp from the pseudo state (nstate + 1).
1497 2001-12-27 Akim Demaille <akim@epita.fr>
1499 * src/output.c (action_row, token_actions): Use a state_t instead
1500 of a integer, and nlookaheads instead of the following state's
1503 2001-12-27 Akim Demaille <akim@epita.fr>
1505 * src/conflicts.c (log_resolution, flush_shift)
1506 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1507 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1508 (conflicts_print, print_reductions): Use a state_t instead of an
1509 integer when referring to a state.
1510 As much as possible, depend upon nlookaheads, instead of the
1511 `lookaheadsp' member of the following state (since lookaheads of
1512 successive states are successive, the difference between state n + 1
1513 and n served as the number of lookaheads for state n).
1514 * src/lalr.c (add_lookback_edge): Likewise.
1515 * src/print.c (print_core, print_actions, print_state)
1516 (print_results): Likewise.
1517 * src/print_graph.c (print_core, print_actions, print_state)
1518 (print_graph): Likewise.
1519 * src/conflicts.h: Adjust.
1521 2001-12-27 Akim Demaille <akim@epita.fr>
1523 * src/bison.hairy: Formatting/comment changes.
1525 Remove `register' indications.
1526 Add plenty of `static'.
1528 2001-12-27 Akim Demaille <akim@epita.fr>
1530 * src/output.c (prepare): Drop the muscle `ntbase' which
1532 * src/bison.simple: Formatting/comment changes.
1533 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1534 is an undocumented synonym.
1536 2001-12-22 Akim Demaille <akim@epita.fr>
1538 * src/output.c (output_table_data): Change the prototype to use
1539 `int' for array ranges: some invocations do pass an int, not a
1541 Reported by Wayne Green.
1543 2001-12-22 Akim Demaille <akim@epita.fr>
1545 Some actions of web2c.y are improperly triggered.
1546 Reported by Mike Castle.
1548 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1549 * tests/regression.at (Web2c): Rename as...
1550 (Web2c Report): this.
1551 (Web2c Actions): New.
1553 2001-12-22 Akim Demaille <akim@epita.fr>
1555 Reductions in web2c.y are improperly reported.
1556 Reported by Mike Castle.
1558 * src/conflicts.c (print_reductions): Fix.
1559 * tests/regression.at (Web2c): New.
1561 2001-12-18 Akim Demaille <akim@epita.fr>
1563 Some host fail on `assert (!"foo")', which expands to
1564 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1565 Reported by Nelson Beebee.
1567 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1568 `#define it_succeeded 0' and `assert (it_succeeded)'.
1570 2001-12-17 Marc Autret <autret_m@epita.fr>
1572 * src/bison.simple: Don't hard code the skeleton line and filename.
1573 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1574 New line counter 'skeleton_line' (skeleton-line muscle).
1576 2001-12-17 Paul Eggert <eggert@twinsun.com>
1578 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1579 YYDEBUG must be defined to a nonzero value.
1581 * src/bison.simple (yytname): Do not assume that the user defines
1582 YYDEBUG to a properly parenthesized expression.
1584 2001-12-17 Akim Demaille <akim@epita.fr>
1586 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1587 nlookaheads is a new member.
1589 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1590 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1593 2001-12-17 Akim Demaille <akim@epita.fr>
1595 * src/files.h, src/files.c (open_files, close_files): Remove.
1596 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1598 * src/reader.c (reader): Do it.
1600 2001-12-17 Akim Demaille <akim@epita.fr>
1602 * src/conflicts.c (print_reductions): Formatting changes.
1604 2001-12-17 Akim Demaille <akim@epita.fr>
1606 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1607 (flush_reduce): New.
1608 (resolve_sr_conflict): Adjust.
1610 2001-12-17 Akim Demaille <akim@epita.fr>
1612 * src/output.c (output_obstack): Be static and rename as...
1613 (format_obstack): this, to avoid any confusion with files.c's
1615 * src/reader.h (muscle_obstack): Move to...
1616 * src/output.h: here, since it's defined in output.c.
1618 2001-12-17 Akim Demaille <akim@epita.fr>
1620 * src/output.c (action_row, save_column, default_goto)
1621 (sort_actions, matching_state, pack_vector): Better variable
1624 2001-12-17 Akim Demaille <akim@epita.fr>
1626 * src/output.c: Various formatting changes.
1628 2001-12-17 Akim Demaille <akim@epita.fr>
1630 * src/files.c (output_files): Free the output_obstack.
1631 * src/main.c (main): Call print and print_graph conditionally.
1632 * src/print.c (print): Work unconditionally.
1633 * src/print_graph.c (print_graph): Work unconditionally.
1634 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1636 2001-12-16 Marc Autret <autret_m@epita.fr>
1638 * src/output.c (actions_output): Fix. When we use %no-lines,
1639 there is one less line per action.
1641 2001-12-16 Marc Autret <autret_m@epita.fr>
1643 * src/bison.simple: Remove a useless #line directive.
1644 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1645 * src/output.c (get_lines_number): New.
1646 (output_parser): Adjust, now takes care about the lines of a
1649 (actions_output): Computes the number of lines taken by actions.
1650 (output_master_parser): Insert new skeleton which is the name of
1651 the output parser file name.
1653 2001-12-15 Marc Autret <autret_m@epita.fr>
1655 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1657 2001-12-15 Marc Autret <autret_m@epita.fr>
1659 * src/output.c (output_gram): Keep track of the hairy one.
1661 2001-12-15 Akim Demaille <akim@epita.fr>
1663 Make `make distcheck' work.
1665 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1666 system.h which uses libgettext.h.
1668 2001-12-15 Akim Demaille <akim@epita.fr>
1670 * src/nullable.c (set_nullable): Useless rules must be skipped,
1671 otherwise, since we range over their symbols, we might look at a
1672 nonterminal which no longer ``exists'', i.e., it is not counted in
1673 `nvars', hence we overflow our arrays.
1675 2001-12-15 Akim Demaille <akim@epita.fr>
1677 The header can also be produced directly, without any obstack!
1680 * src/files.c, src/files.h (defines_obstack): Remove.
1681 (compute_header_macro): Global.
1682 (defines_obstack_save): Remove.
1683 * src/reader.c (parse_union_decl): No longer output to
1684 defines_obstack: its content can be found in the `stype' muscle
1686 (output_token_translations): Merge into...
1687 (symbols_output): this.
1689 (symbols_save): this.
1691 * src/output.c (header_output): New.
1694 2001-12-15 Akim Demaille <akim@epita.fr>
1696 * src/reader.c (parse_union_decl): Instead of handling two obstack
1697 simultaneously, use one to define the `stype' muscle, and use the
1698 value of the latter to fill defines_obstack.
1699 (copy_comment): Remove.
1700 (copy_comment2): Work for a single obstack.
1702 (copy_comment): this.
1704 2001-12-15 Akim Demaille <akim@epita.fr>
1706 * src/lex.c, src/lex.h (xgetc): No longer static.
1707 * src/reader.c (parse_union_decl): Revamp.
1709 2001-12-15 Akim Demaille <akim@epita.fr>
1711 Still making progress in separating Bison into (i) input, (ii)
1712 process, (iii) output: now we can directly output the parser file
1713 without using table_obstack at all.
1715 * src/files.c, src/files.h (table_obstack): Bye bye.
1716 (parser_file_name): New.
1717 * src/files.c (compute_output_file_names): Compute it.
1718 * src/output.c (actions_output, output_parser)
1719 (output_master_parser): To a file instead of an obstack.
1721 2001-12-15 Akim Demaille <akim@epita.fr>
1723 Attach actions to rules, instead of pre-outputting them to
1726 * src/gram.h (rule_t): action and action_line are new members.
1727 * src/reader.c (symbol_list): Likewise.
1728 (copy_action): Save the actions within the rule.
1729 (packgram): Save them in rule_table.
1730 * src/output.c (actions_output): New.
1731 (output_parser): Use it on `%%actions'.
1732 (output_rule_data): Don't free rule_table.
1734 (prepare): Don't save the `action' muscle.
1735 * src/bison.simple: s/%%action/%%actions/.
1737 2001-12-15 Akim Demaille <akim@epita.fr>
1739 * src/reader.c (copy_action): When --yacc, don't append a `;'
1740 to the user action: let it fail if lacking.
1741 Suggested by Arnold Robbins and Tom Tromey.
1743 2001-12-14 Akim Demaille <akim@epita.fr>
1745 * src/lex.c (literalchar): Simply return the char you decoded, non
1746 longer mess around with obstacks and int pointers.
1749 2001-12-14 Akim Demaille <akim@epita.fr>
1751 * src/lex.c (literalchar): Don't escape the special characters,
1752 just decode them, and keep them as char (before, eol was output as
1753 the 2 char string `\n' etc.).
1754 * src/output.c (output_rule_data): Use quotearg to output the
1757 2001-12-13 Paul Eggert <eggert@twinsun.com>
1759 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1760 Do not infringe on the global user namespace when using C++.
1761 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1762 All uses of `fprintf' and `stderr' changed.
1764 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1766 2001-12-13 Akim Demaille <akim@epita.fr>
1768 The computation of nullable is broken: it doesn't handle empty
1771 * tests/torture.at (GNU AWK Grammar): New.
1772 * tests/sets.at (Nullable): New.
1773 * src/nullable.c (set_nullable): Instead of blindly looping over
1774 `ritems', loop over the rules, and then over their rhs's.
1776 Work around Autotest bugs.
1778 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1779 frame, because Autotest understand lines starting with a `+' as
1780 traces from the shell. Then, they are not processed properly.
1781 Admittedly an Autotest bug, but we don't have time to wait for
1782 Autotest to catch up.
1783 * tests/regression.at (Broken Closure): Adjust to the new table
1786 * tests/sets.at: here.
1788 2001-12-13 Akim Demaille <akim@epita.fr>
1790 * src/closure.c (closure): Use nrules instead of playing tricks
1793 2001-12-13 Akim Demaille <akim@epita.fr>
1795 * src/print.c (print_actions): Output the handling of `$' as the
1796 traces do: shifting the token EOF. Before EOF was treated as a
1798 * tests/regression.at: Adjust some tests.
1799 * src/print_graph.c (print_core): Complete the set of items via
1800 closure. The next-to-final and final states are still unsatisfying,
1801 but that's to be addressed elsewhere.
1802 No longer output the rule numbers, but do output the state number.
1803 A single loop for the shifts + gotos is enough, but picked a
1804 distinct color for each.
1805 (print_graph): Initialize and finalize closure.
1807 2001-12-13 Akim Demaille <akim@epita.fr>
1809 * src/reader.c (readgram): Remove dead code, an strip useless
1811 (get_type): Remove, unused.
1813 2001-12-12 Akim Demaille <akim@epita.fr>
1815 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1816 on that of lib/error.c.
1818 2001-12-12 Akim Demaille <akim@epita.fr>
1820 Some hosts don't like `/' in includes.
1822 * src/system.h: Include libgettext.h without qualifying the path.
1823 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1826 2001-12-11 Marc Autret <autret_m@epita.fr>
1828 * src/output.c (output_parser): Remove useless muscle.
1830 2001-12-11 Marc Autret <autret_m@epita.fr>
1832 * src/bison.simple: Remove #line just before %%epilogue. It
1833 is now handled in ...
1834 * src/reader.c (read_additionnal_code): Add the output of a
1835 #line for the epilogue.
1837 2001-12-10 Marc Autret <autret_m@epita.fr>
1839 * src/reader.c (copy_definition): Re-use CPP-outed code which
1840 replace precedent remove.
1841 * src/bison.simple: Remove #line before %%prologue because
1842 %%input-line is wrong at this time.
1844 2001-12-10 Marc Autret <autret_m@epita.fr>
1846 * src/reader.c (symbols_output): Clean up.
1847 * src/output.c (output_gram, output): Clean up.
1849 2001-12-10 Akim Demaille <akim@epita.fr>
1851 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1852 * src/LR0.c (set_state_table): here.
1853 * src/lalr.c (lalr): Call it.
1855 2001-12-10 Akim Demaille <akim@epita.fr>
1857 * src/state.h (shifts): Remove the `number' member: shifts are
1858 attached to state, hence no longer need to be labelled with a
1861 2001-12-10 Akim Demaille <akim@epita.fr>
1863 Now that states have a complete set of members, the linked list of
1864 shifts is useless: just fill directly the state's shifts member.
1866 * src/state.h (shifts): Remove the `next' member.
1867 * src/LR0.c (first_state, last_state): Remove.
1869 (augment_automaton): Don't look for the shifts that must be added
1870 a shift on EOF: it is those of the state we looked for! But now,
1871 since shifts are attached, it is no longer needed to looking
1872 merely by its id: its number.
1874 2001-12-10 Akim Demaille <akim@epita.fr>
1876 * src/LR0.c (augment_automaton): Better variable locality.
1877 Remove an impossible branch: if there is a state corresponding to
1878 the start symbol being shifted, then there is shift for the start
1879 symbol from the initial state.
1881 2001-12-10 Akim Demaille <akim@epita.fr>
1883 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1884 only when appropriate: when insert_start_shifting_state' is not
1886 * tests/regression.at (Rule Line Numbers): Adjust.
1888 2001-12-10 Akim Demaille <akim@epita.fr>
1890 * src/LR0.c (augment_automaton): Now that all states have shifts,
1891 merge the two cases addition shifts to the initial state.
1893 2001-12-10 Akim Demaille <akim@epita.fr>
1895 * src/lalr.c (set_state_table): Move to...
1897 * src/lalr.c (lalr): Don't call it...
1898 * src/LR0.c (generate_states): do it.
1899 * src/LR0.h (first_state): Remove, only the table is used.
1901 2001-12-10 Akim Demaille <akim@epita.fr>
1903 * src/LR0.h (first_shift, first_reduction): Remove.
1904 * src/lalr.c: Don't use first_shift: find shifts through the
1907 2001-12-10 Akim Demaille <akim@epita.fr>
1909 * src/LR0.c: Attach shifts to states as soon as they are
1911 * src/lalr.c (set_state_table): Instead of assigning shifts to
1912 state, just assert that the mapping was properly done.
1914 2001-12-10 Akim Demaille <akim@epita.fr>
1916 * src/LR0.c (insert_start_shift): Rename as...
1917 (insert_start_shifting_state): this.
1918 (insert_eof_shifting_state, insert_accepting_state): New.
1919 (augment_automaton): Adjust.
1920 Better locality of the variables.
1921 When looking if the start_symbol is shifted from the initial
1922 state, using `while (... symbol != start_symbol ...)' sounds
1923 better than `while (... symbol < start_symbol ...)': If fail
1924 to see how the order between symbols could be relevant!
1926 2001-12-10 Akim Demaille <akim@epita.fr>
1928 * src/getargs.h: Don't declare `spec_name_prefix' and
1929 `spec_file_prefix', declared by src/files.h.
1930 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1931 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1932 * src/output.c (prepare): Adjust.
1933 * src/reader.c (symbols_output): Likewise.
1934 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1936 2001-12-10 Akim Demaille <akim@epita.fr>
1938 * src/muscle_tab.c (muscle_init): NULL is a better default than
1941 2001-12-10 Akim Demaille <akim@epita.fr>
1943 * src/reader.c (reader): Calling symbols_output once is enough.
1945 2001-12-10 Akim Demaille <akim@epita.fr>
1947 Now that states have a complete set of members, the linked list of
1948 reductions is useless: just fill directly the state's reductions
1951 * src/state.h (struct reductions): Remove member `number' and
1953 * src/LR0.c (first_reduction, last_reduction): Remove.
1954 (save_reductions): Don't link the new reductions, store them in
1956 * src/lalr.c (set_state_table): No need to attach reductions to
1957 states, it's already done.
1958 * src/output.c (output_actions): No longer free the shifts, then
1959 the reductions, then the states: free all the states and their
1962 2001-12-10 Akim Demaille <akim@epita.fr>
1964 * src/options.c (OPTN, DRTV, BOTH): New.
1965 (option_table): Use them.
1967 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1968 the job of system.h.
1969 * src/options.c: Don't include stdio.h and xalloc.h for the same
1972 2001-12-10 Akim Demaille <akim@epita.fr>
1974 * src/output.c (output, prepare): Make sure the values of the
1975 muscles `action' and `prologue' are 0-terminated.
1977 2001-12-10 Akim Demaille <akim@epita.fr>
1979 Clean up GCC warnings.
1981 * src/reader.c (copy_action): `buf' is not used.
1982 (parse_skel_decl): Be static.
1983 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1984 * src/options.h (create_long_option_table): Have a real prototype.
1985 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1986 (hash_delete_at): Return const void *.
1987 Adjust casts to preserve the const.
1989 2001-12-10 Akim Demaille <akim@epita.fr>
1991 * configure.in: Require 2.52g.
1992 M4 is not needed, but AUTOM4TE is.
1994 * tests/Makefile.am: Adjust.
1996 2001-12-10 Akim Demaille <akim@epita.fr>
1998 One structure for states is enough, even though theoretically
1999 there are LR(0) states and LALR(1) states.
2001 * src/lalr.h (state_t): Remove.
2002 (state_table): Be state_t **, not state_t *.
2003 * src/state.h (core, CORE_ALLOC): Rename as...
2004 (state_t, STATE_ALLOC): this.
2005 Add the LALR(1) members: shifts, reductions, errs.
2006 * src/LR0.c (state_table): Rename as...
2007 (state_hash): this, to avoid name clashes with the global
2009 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2010 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2012 2001-12-10 Akim Demaille <akim@epita.fr>
2014 Bison dumps core on bash.y.
2015 Reported by Pascal Bart.
2017 * src/warshall.c (bitmatrix_print): New.
2019 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2020 j must be the outer loop.
2021 * tests/regression.at (Broken Closure): New.
2023 2001-12-05 Akim Demaille <akim@epita.fr>
2025 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2027 Reported by Peter Hámorský.
2029 2001-12-05 Akim Demaille <akim@epita.fr>
2031 * src/conflicts.c (err_table): Remove.
2032 (resolve_sr_conflict): Adjust.
2033 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
2035 (state_t.reductions, state_t.shifts): this.
2037 2001-12-05 Akim Demaille <akim@epita.fr>
2039 * src/reduce.c (reduce_grammar_tables): No longer disable the
2040 removal of useless rules via CPP but via `if (0)', so that the
2041 compiler still check the code is valid.
2042 For instance, it should have noticed `rline' no longer exists: use
2043 the `line' member of rule_t.
2044 * src/gram.c (dummy, rline): Remove, unused.
2046 2001-12-05 Akim Demaille <akim@epita.fr>
2048 * src/output.c (pack_vector): Use assert, not berror.
2049 * src/main.c (berror): Remove, unused.
2051 2001-12-05 Akim Demaille <akim@epita.fr>
2053 New experimental feature: if --verbose --trace output all the
2054 items of a state, not only its kernel.
2056 * src/print.c (print_core): If `trace_flag', then invoke closure
2057 before outputting the items of the state (print_core is no longer
2058 a correct name them).
2059 (print_results): Invoke new_closure/free_closure if needed.
2061 2001-12-05 Akim Demaille <akim@epita.fr>
2063 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
2064 * src/closure.c, src/closure.h (itemsetsize): Rename as...
2065 (nitemset): for consistency with the rest of the project.
2067 2001-12-05 Akim Demaille <akim@epita.fr>
2069 * src/closure.c (print_closure): Improve.
2070 (closure): Use it for printing input and output.
2072 2001-12-05 Akim Demaille <akim@epita.fr>
2074 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
2075 indexed by nonterminals.
2077 2001-12-05 Akim Demaille <akim@epita.fr>
2079 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
2081 * src/warshall.h: Remove accidental duplication of the content.
2083 2001-12-05 Akim Demaille <akim@epita.fr>
2085 * src/closure.c (set_fderives): De-obfuscate.
2087 2001-12-05 Akim Demaille <akim@epita.fr>
2089 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
2091 2001-12-05 Akim Demaille <akim@epita.fr>
2093 * src/closure.c (set_firsts): De-obfuscate.
2095 2001-12-05 Akim Demaille <akim@epita.fr>
2097 * src/output.c (action_row): De-obfuscate
2098 using the good o' techniques: arrays not pointers, variable
2099 locality, BITISSET, RESETBIT etc.
2101 2001-12-05 Akim Demaille <akim@epita.fr>
2103 Pessimize the code to simplify it: from now on, all the states
2104 have a valid SHIFTS, which NSHIFTS is possibly 0.
2106 * src/LR0.c (shifts_new): Be global and move to..
2107 * src/state.c, src/state.h: here.
2108 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
2109 * src/print_graph: Adjust.
2111 2001-12-05 Akim Demaille <akim@epita.fr>
2113 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
2114 * src/conflicts.c: Use it.
2115 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
2116 incorrectly ``simplified''.
2118 2001-12-05 Akim Demaille <akim@epita.fr>
2120 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
2121 using the good o' techniques: arrays not pointers, variable
2122 locality, BITISSET, RESETBIT etc.
2124 2001-12-05 Akim Demaille <akim@epita.fr>
2126 * src/state.h (SHIFT_SYMBOL): New.
2127 * src/conflicts.c: Use it to deobfuscate.
2129 2001-12-05 Akim Demaille <akim@epita.fr>
2131 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
2132 (print_reductions): De-obfuscate using the good o' techniques:
2133 arrays not pointers, variable locality, BITISSET.
2135 2001-12-05 Akim Demaille <akim@epita.fr>
2137 * src/conflicts.c (print_reductions): Arrays, not pointers.
2140 2001-12-05 Akim Demaille <akim@epita.fr>
2142 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2144 2001-12-05 Akim Demaille <akim@epita.fr>
2146 * src/conflicts.c (print_reductions): Improve variable locality.
2148 2001-12-05 Akim Demaille <akim@epita.fr>
2150 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2152 2001-12-05 Akim Demaille <akim@epita.fr>
2154 * src/conflicts.c (print_reductions): Improve variable locality.
2156 2001-12-05 Akim Demaille <akim@epita.fr>
2158 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
2159 * src/lalr.c: Use them.
2161 2001-12-05 Akim Demaille <akim@epita.fr>
2163 * src/LR0.c (augment_automaton): Formatting changes.
2164 Better variable locality.
2166 2001-12-05 Akim Demaille <akim@epita.fr>
2168 * src/lalr.c (matrix_print): New.
2169 (transpose): Use it.
2170 Use arrays instead of pointers.
2172 2001-12-05 Akim Demaille <akim@epita.fr>
2174 * src/lalr.c (maxrhs): Move to...
2175 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
2176 * src/lalr.c (build_relations): Adjust.
2178 2001-12-05 Akim Demaille <akim@epita.fr>
2180 * src/lalr.c (transpose): Free the memory allocated to the
2181 argument, as it is replaced by the results by the unique caller.
2182 (build_relations): Merely invoke transpose: it handles the memory
2184 Improve variable locality.
2185 Avoid variables used as mere abbreviations.
2186 (compute_lookaheads): Use arrays instead of pointers.
2188 2001-12-05 Akim Demaille <akim@epita.fr>
2190 * src/lalr.c (initialize_F): Improve variable locality.
2191 Avoid variables used as mere abbreviations.
2193 2001-12-05 Akim Demaille <akim@epita.fr>
2195 * src/derives.c (print_derives): Display the ruleno.
2196 * src/lalr.c (initialize_F, transpose): Better variable locality
2197 to improve readability.
2198 Avoid variables used as mere abbreviations.
2200 2001-12-05 Akim Demaille <akim@epita.fr>
2202 * src/lalr.c (traverse): Use arrays instead of pointers.
2204 2001-12-05 Akim Demaille <akim@epita.fr>
2206 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
2207 the handling of squeue.
2208 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2210 2001-12-05 Akim Demaille <akim@epita.fr>
2212 Because useless nonterminals are now kept alive (instead of being
2213 `destroyed'), we now sometimes examine them, and store information
2214 related to them. Hence we need to know their number, and adjust
2217 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
2219 * src/LR0.c (allocate_itemsets): The memory allocated to
2220 `symbol_count' was used for two different purpose: once to count
2221 the number of occurrences of each symbol, and later reassigned to
2222 `shift_symbol', containing the symbol that can be shifted from a
2224 Deobfuscate, i.e., allocate, use and free `symbol_count' here
2226 (new_itemsets): Allocate `shift_symbol' here.
2227 (allocate_itemsets): symbol_count includes useless nonterminals.
2229 (free_storage): Use `free', not `XFREE', for pointers that cannot
2232 2001-12-05 Akim Demaille <akim@epita.fr>
2234 * src/nullable.c (set_nullable): Deobfuscate the handling of
2236 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2238 2001-12-05 Akim Demaille <akim@epita.fr>
2240 * src/gram.c, src/gram.h (ritem_print): New.
2241 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
2242 (This useless function was defined only to work around VMS linkers
2243 that can't handle compilation units with variables only).
2244 * src/reduce.c (dump_grammar): Use it to trace the construction of
2247 2001-12-04 Paul Eggert <eggert@twinsun.com>
2249 * src/bison.simple (union yyalloc): Change member names
2250 to be the same as the stack names.
2251 (yyparse): yyptr is now union yyalloc *, not char *.
2252 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
2253 and may generate better code on some machines.
2254 (yystpcpy): Use prototype if __STDC__ is defined, not just
2255 if __cplusplus is defined.
2257 2001-11-30 Akim Demaille <akim@epita.fr>
2259 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
2260 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
2261 Gettext doesn't compile cleanly, and dies with -Werror.
2262 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
2263 Include WARNING_CFLAGS here.
2264 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
2265 before being defined.
2267 2001-11-27 Paul Eggert <eggert@twinsun.com>
2269 * lib/quotearg.h (quotearg_n, quotearg_n_style):
2270 First arg is int, not unsigned.
2271 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2272 (SIZE_MAX, UINT_MAX): New macros.
2273 (quotearg_n_options): Abort if N is negative.
2274 Avoid overflow check on hosts where size_t is 64 bits and int
2275 is 32 bits, as overflow is impossible there.
2276 Fix off-by-one typo that caused unnecessary reallocation.
2278 2001-11-29 Paul Eggert <eggert@twinsun.com>
2280 Name space cleanup in generated parser.
2282 * doc/bison.texinfo (Bison Parser): Discuss system headers
2283 and their effect on the user name space.
2286 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
2287 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
2288 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
2290 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
2291 on user names when possible.
2293 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
2294 Simplify test for whather <alloca.h> exists.
2296 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
2298 (<stdio.h>): Include if YYDEBUG.
2300 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
2301 ! defined (yyoverflow) && ! defined (yymemcpy).
2303 (yymemcpy, yyparse): Rename local variables as needed so that
2304 they all begin with 'yy'.
2306 (yystrlen, yystpcpy): New functions.
2308 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
2311 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
2312 instead of relying on string.h functions. Use YYSTACK_ALLOC
2313 and YYSTACK_FREE instead of malloc and free.
2315 2001-11-30 Akim Demaille <akim@epita.fr>
2317 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
2318 before their first uses.
2319 (YYBISON, YYPURE): Move to the top of the output.
2321 2001-11-30 Akim Demaille <akim@epita.fr>
2323 * tests/reduce.at (Useless Nonterminals): Fix.
2325 2001-11-30 Akim Demaille <akim@epita.fr>
2327 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
2328 if body instead of `;' to pacify GCC's warnings.
2330 2001-11-30 Akim Demaille <akim@epita.fr>
2332 Instead of mapping the LHS of unused rules to -1, keep the LHS
2333 valid, but flag the rules as invalid.
2335 * src/gram.h (rule_t): `useful' is a new member.
2336 * src/print.c (print_grammar): Adjust.
2337 * src/derives.c (set_derives): Likewise.
2338 * src/reader.c (packgram, reduce_output): Likewise.
2339 * src/reduce.c (reduce_grammar_tables): Likewise.
2340 * tests/reduce.at (Underivable Rules, Useless Rules): New.
2342 2001-11-30 Akim Demaille <akim@epita.fr>
2344 * src/reduce.c (reduce_output): Formatting changes.
2345 * src/print.c (print_results, print_grammar): Likewise.
2346 * tests/regression.at (Rule Line Numbers)
2347 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2349 2001-11-30 Akim Demaille <akim@epita.fr>
2351 * src/reduce.c (nonterminals_reduce): Instead of throwing away
2352 useless nonterminals, move them at the end of the symbol arrays.
2353 (reduce_output): Adjust.
2354 * tests/reduce.at (Useless Nonterminals): Adjust.
2356 2001-11-30 Akim Demaille <akim@epita.fr>
2358 * src/reduce.c: Various comment/formatting changes.
2359 (nonterminals_reduce): New, extracted from...
2360 (reduce_grammar_tables): here.
2361 (reduce_grammar): Call nonterminals_reduce.
2363 2001-11-29 Paul Eggert <eggert@twinsun.com>
2365 * src/bison.simple (YYSTACK_REALLOC): Remove.
2366 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2367 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2369 (union yyalloc): New type.
2370 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2371 an arbitrary restriction on hosts where size_t is wider than int.
2373 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2374 a parser stack overflow. Allocate just one block of memory for all
2375 three stacks, instead of allocating three blocks; this typically is
2376 faster and reduces fragmentation.
2378 Do not limit the number of items in the stack to a value that fits
2379 in 'int', as this is an arbitrary limit on hosts with 64-bit
2380 size_t and 32-bit int.
2382 2001-11-29 Marc Autret <autret_m@epita.fr>
2384 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2385 of defining YYERROR_VERBOSE.
2386 [AT_DATA]: $4 is now out of C declarations in the prologue.
2388 2001-11-28 Marc Autret <autret_m@epita.fr>
2390 * src/reader.c (parse_dquoted_param): New.
2391 (parse_skel_decl): Use it.
2392 * src/lex.h: Add its prototype.
2393 * src/lex.c (literalchar): Become not static.
2395 2001-11-28 Marc Autret <autret_m@epita.fr>
2397 * src/output.h: And put its extern declaration here.
2398 * src/output.c (error_verbose): Define here.
2399 (prepare): Echo name modification.
2400 * src/getargs.h: Clean its extern declaration.
2401 * src/getargs.c (error_verbose_flag): Remove.
2402 (getargs): Remove case 'e'.
2403 * src/options.c (option_table): 'error-verbose' is now seen as simple
2407 * src/reader.c (read_declarations): Remove case tok_include.
2408 (parse_include_decl): Remove.
2409 * src/lex.h (token_t): Remove tok_include.
2410 * src/options.c (option_table): 'include' is now a simple command line
2413 2001-11-28 Marc Autret <autret_m@epita.fr>
2415 * src/bison.simple: Adjust muscle names.
2416 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2417 * src/output.c (prepare): s/_/-/ for the muscles names.
2418 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2420 2001-11-28 Marc Autret <autret_m@epita.fr>
2422 * src/bison.simple: Fix debug.
2423 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2425 2001-11-28 Akim Demaille <akim@epita.fr>
2427 * src/LR0.c (shifts_new): New.
2428 (save_shifts, insert_start_shift, augment_automaton): Use it.
2430 2001-11-28 Akim Demaille <akim@epita.fr>
2432 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2435 2001-11-28 Akim Demaille <akim@epita.fr>
2437 * src/closure.c (closure): Instead of looping over word in array
2438 then bits in words, loop over bits in array.
2440 2001-11-28 Akim Demaille <akim@epita.fr>
2442 * src/closure.c (closure): No longer optimize the special case
2443 where all the bits of `ruleset[r]' are set to 0, to make the code
2446 2001-11-28 Akim Demaille <akim@epita.fr>
2448 * src/closure.c (closure): `r' and `c' are new variables, used to
2449 de-obfuscate accesses to RULESET and CORE.
2451 2001-11-28 Akim Demaille <akim@epita.fr>
2453 * src/reduce.c (reduce_print): Use ngettext.
2454 (dump_grammar): Improve the trace accuracy.
2456 2001-11-28 Akim Demaille <akim@epita.fr>
2458 * src/reduce.c (dump_grammar): Don't translate trace messages.
2460 2001-11-28 Akim Demaille <akim@epita.fr>
2462 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2463 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2464 as all tags are free'ed afterwards.
2467 2001-11-27 Paul Eggert <eggert@twinsun.com>
2469 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2470 use alloca when we didn't want to, and vice versa.
2472 2001-11-27 Marc Autret <autret_m@epita.fr>
2474 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2476 * src/output.c (prepare): Remove its update.
2478 2001-11-27 Marc Autret <autret_m@epita.fr>
2480 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2483 2001-11-27 Marc Autret <autret_m@epita.fr>
2485 * src/bison.simple: Remove YYERROR_VERBOSE using.
2486 Use %%error_verbose.
2487 (yyparse): Likewise.
2488 * src/output.c (prepare): Give its final value.
2489 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2490 * src/getargs.h: Add its extern declaration.
2491 * src/getargs.c (error_verbose_flag): New int.
2492 (getargs): Update to catch new case.
2493 * src/options.c (option_table): 'error-verbose' is a new option.
2494 (shortopts): Update.
2496 2001-11-27 Akim Demaille <akim@epita.fr>
2498 * src/system.h: Use intl/libgettext.h.
2499 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2501 2001-11-27 Akim Demaille <akim@epita.fr>
2503 * tests/torture.at (Exploding the Stack Size with Malloc):
2504 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2506 2001-11-27 Akim Demaille <akim@epita.fr>
2508 * src/files.c: Include error.h.
2509 Reported by Hans Aberg.
2511 2001-11-26 Marc Autret <autret_m@epita.fr>
2513 * src/reader.c (parse_include_decl): New, not yet implemented.
2514 (read_declarations): Add case tok_include.
2515 * src/getargs.h (include): Add its extern definition.
2516 * src/getargs.c (include): New const char *.
2517 (getargs): Add case '-I'.
2518 * src/options.c (option_table): Add include as command line and
2520 * src/lex.h (token_t): Add tok_include.
2522 2001-11-26 Akim Demaille <akim@epita.fr>
2524 * src/reader.c (readgram): Make sure rules for mid-rule actions
2525 have a lineno equal to that of their host rule.
2526 Reported by Hans Aberg.
2527 * tests/regression.at (Rule Line Numbers): New.
2529 2001-11-26 Akim Demaille <akim@epita.fr>
2531 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2534 2001-11-26 Akim Demaille <akim@epita.fr>
2536 * src/complain.c, src/complain.h (error): Remove, provided by
2539 2001-11-26 Akim Demaille <akim@epita.fr>
2541 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2542 issue an error message.
2543 * tests/regression.at (Invalid %directive): New.
2544 Reported by Hans Aberg.
2546 2001-11-26 Akim Demaille <akim@epita.fr>
2548 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2549 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2551 2001-11-26 Akim Demaille <akim@epita.fr>
2553 * src/conflicts.c (conflicts_print): Don't complain at all when
2554 there are no reduce/reduce conflicts, and as many shift/reduce
2555 conflicts as expected.
2556 * tests/regression.at (%expect right): Adjust.
2558 2001-11-23 Akim Demaille <akim@epita.fr>
2560 * lib/alloca.c: Update, from fileutils.
2562 2001-11-23 Akim Demaille <akim@epita.fr>
2564 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2566 2001-11-23 Akim Demaille <akim@epita.fr>
2568 * src/system.h: Include alloca.h.
2569 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2571 2001-11-23 Akim Demaille <akim@epita.fr>
2573 * src/print_graph.c (print_actions): Remove `rule', unused.
2574 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2575 pacify GCC's signed < unsigned warnings.
2576 * src/closure.c (itemsetsize): Likewise.
2577 * src/reader.c (symbol_list_new): Static.
2579 2001-11-23 Akim Demaille <akim@epita.fr>
2581 Attaching lineno to buckets is stupid, since only one copy of each
2582 symbol is kept, only the line of the first occurrence is kept too.
2584 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2585 * src/reader.c (rline_allocated): Remove, unused.
2586 (symbol_list): Have a `line' member.
2587 (symbol_list_new): New.
2589 * src/print.c (print_grammar): Output the rule line numbers.
2590 * tests/regression.at (Solved SR Conflicts)
2591 (Unresolved SR Conflicts): Adjust.
2592 Reported by Hans Aberg.
2594 2001-11-22 Marc Autret <autret_m@epita.fr>
2596 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2598 2001-11-22 Marc Autret <autret_m@epita.fr>
2600 * src/muscle_tab.c (muscle_init): Remove initialization of
2602 * src/output.c (output_master_parser): Do it here.
2604 2001-11-20 Akim Demaille <akim@epita.fr>
2607 * configure.in (ALL_LINGUAS): Adjust.
2608 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2609 longer contains strings to translate.
2611 2001-11-19 Akim Demaille <akim@epita.fr>
2613 * src/conflicts.c (conflicts_print): Add a missing \n.
2615 2001-11-19 Akim Demaille <akim@epita.fr>
2617 * src/nullable.c (nullable_print): New.
2618 (set_nullable): Call it when tracing.
2619 Better locality of variables.
2621 2001-11-19 Akim Demaille <akim@epita.fr>
2623 * src/print.c (print_actions): Better locality of variables.
2625 2001-11-19 Akim Demaille <akim@epita.fr>
2627 * src/derives.c (print_derives): Fix and enrich.
2628 * src/closure.c (print_fderives): Likewise.
2630 2001-11-19 Akim Demaille <akim@epita.fr>
2632 * src/closure.c (itemsetend): Remove, replaced with...
2635 2001-11-19 Akim Demaille <akim@epita.fr>
2637 * src/LR0.c (kernel_end): Remove, replaced with...
2640 2001-11-19 Akim Demaille <akim@epita.fr>
2642 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2645 2001-11-19 Akim Demaille <akim@epita.fr>
2647 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2649 2001-11-19 Akim Demaille <akim@epita.fr>
2651 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2653 * src/LR0.c: Likewise.
2654 (allocate_itemsets): Use arrays instead of pointers to clarify.
2656 2001-11-19 Akim Demaille <akim@epita.fr>
2658 * src/getargs.c (statistics_flag): Replace with...
2660 (longopts): Accept --trace instead of --statistics.
2661 * src/getargs.h, src/options.c: Adjust.
2662 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2663 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2665 2001-11-19 Akim Demaille <akim@epita.fr>
2667 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2668 pointers to clarify the code.
2669 (save_reductions, save_shifts): Factor common parts of alternatives.
2671 2001-11-19 Akim Demaille <akim@epita.fr>
2673 * src/LR0.c (new_state, get_state): Complete TRACE code.
2674 * src/closure.c: Include `reader.h' to get `tags', needed by the
2676 Rename the conditional DEBUG as TRACE.
2677 Output consistently TRACEs to stderr, not stdout.
2678 * src/derives.c: Likewise.
2679 * src/reduce.c: (inaccessable_symbols): Using if is better style
2681 Use `#if TRACE' instead of `#if 0' for tracing code.
2683 2001-11-19 Akim Demaille <akim@epita.fr>
2685 * src/system.h (LIST_FREE, shortcpy): New.
2686 * src/LR0.c: Use them.
2687 * src/output.c (free_itemsets, free_reductions, free_shifts):
2688 Remove, replaced by LIST_FREE.
2690 2001-11-19 Akim Demaille <akim@epita.fr>
2692 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2693 (REDUCTIONS_ALLOC): New.
2694 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2697 2001-11-19 Akim Demaille <akim@epita.fr>
2699 * src/LR0.c (new_state): Complete trace code.
2700 * src/nullable.c (set_nullable): Don't translate traces.
2702 2001-11-19 Akim Demaille <akim@epita.fr>
2704 * src/print_graph.c (print_core): Better locality of variables.
2705 * src/print.c (print_core): Likewise.
2707 2001-11-19 Akim Demaille <akim@epita.fr>
2709 * src/vcg.c: You do the output, so you are responsible of the
2710 handling of VCG syntax, in particular: use quotearg.
2711 * src/print_graph.c: Don't.
2712 (print_actions): Don't output the actions as part of the nodes,
2713 since that's the job of the edges.
2714 (print_state): Don't output by hand: fill the node description,
2715 and ask for its output.
2717 2001-11-19 Akim Demaille <akim@epita.fr>
2719 * src/bison.simple (yyparse): When verbosely reporting an error,
2720 no longer put additional quotes around token names.
2721 * tests/calc.at: Adjust.
2723 2001-11-19 Akim Demaille <akim@epita.fr>
2725 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2726 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2727 * src/output.c: Adjust.
2729 2001-11-19 Akim Demaille <akim@epita.fr>
2731 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2733 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2735 2001-11-19 Akim Demaille <akim@epita.fr>
2737 * src/gram.h (rule_t): New.
2739 (rrhs, rlhs): Remove, part of state_t.
2740 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2741 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2742 * src/reader.c, src/reduce.c: Adjust.
2744 2001-11-19 Akim Demaille <akim@epita.fr>
2746 * src/reader.c (symbols_output): New, extracted from...
2747 (packsymbols): Here.
2750 2001-11-19 Akim Demaille <akim@epita.fr>
2752 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2753 (maxrhs): this new function.
2755 2001-11-19 Akim Demaille <akim@epita.fr>
2757 * src/lalr.c (F): New macro to access the variable F.
2760 2001-11-19 Akim Demaille <akim@epita.fr>
2762 * src/lalr.h (LA): New macro to access the variable LA.
2763 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2764 * src/lalr.c: Adjust.
2766 2001-11-19 Akim Demaille <akim@epita.fr>
2768 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2769 (set_state_table): handle the `lookaheads' members.
2771 2001-11-19 Akim Demaille <akim@epita.fr>
2773 * src/lalr.h (lookaheads): Removed array, whose contents is now
2775 (state_t): this structure.
2776 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2779 2001-11-19 Akim Demaille <akim@epita.fr>
2781 * src/lalr.h (consistent): Removed array, whose contents is now
2783 (state_t): this structure.
2784 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2787 2001-11-19 Akim Demaille <akim@epita.fr>
2789 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2790 contents are now members of...
2791 (state_t): this structure.
2792 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2795 2001-11-19 Akim Demaille <akim@epita.fr>
2797 * src/lalr.h (state_t): New.
2798 (state_table): Be a state_t * instead of a core **.
2799 (accessing_symbol): Remove, part of state_t.
2800 * src/lalr.c: Adjust.
2801 (set_accessing_symbol): Merge into...
2802 (set_state_table): this.
2803 * src/print_graph.c, src/conflicts.c: Adjust.
2805 2001-11-14 Akim Demaille <akim@epita.fr>
2807 * tests/calc.at, tests/output.at, tests/regression.at,
2808 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2809 now the tests are run in private dirs, therefore AC_CLEANUP and
2810 family can be simplified to 0-ary.
2811 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2812 use abs. path to find config.h.
2813 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2814 stderr, there can be way too much random noise.
2815 Instead pass -Werror to GCC and rely on the exit status.
2816 Reported by Wolfram Wagner.
2818 2001-11-14 Akim Demaille <akim@epita.fr>
2820 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2821 defined only if yyoverflow is defined, to avoid `warning: unused
2823 Reported by The Test Suite.
2825 2001-11-14 Akim Demaille <akim@epita.fr>
2827 * src/print.c: Include reduce.h.
2828 Reported by Hans Aberg.
2830 2001-11-14 Akim Demaille <akim@epita.fr>
2832 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2833 Revert a previous patch: these are really const.
2834 * src/conflicts.c (conflict_report): Additional useless pair of
2835 braces to pacify GCC's warnings for `if () if () {} else {}'.
2836 * src/lex.c (parse_percent_token): Replace equal_offset with
2839 Be sure to strdup `arg' when used, since there is no reason for
2840 token_buffer not to change.
2842 2001-11-14 Akim Demaille <akim@epita.fr>
2844 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2846 * src/main.c (main): Use them.
2847 Suggested by Hans Aberg.
2849 2001-11-12 Akim Demaille <akim@epita.fr>
2851 * src/system.h (ngettext): Now that we use ngettext, be sure to
2852 provide a default definition when NLS are not used.
2854 2001-11-12 Akim Demaille <akim@epita.fr>
2856 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2857 Use @kbd to denote user input.
2858 (Language and Grammar): ANSIfy the example.
2859 Adjust its layout for info/notinfo.
2860 (Location Tracking Calc): Output error messages to stderr.
2861 Output locations in a more GNUtically correct way.
2862 Fix a couple of Englishos.
2863 Adjust @group/@end group pairs.
2865 2001-11-12 Akim Demaille <akim@epita.fr>
2867 %expext was not functioning at all.
2869 * src/conflicts.c (expected_conflicts): Set to -1.
2870 (conflict_report): Use ngettext.
2871 (conflicts_print): Check %expect and make its violation an error.
2872 * doc/bison.texinfo (Expect Decl): Adjust.
2873 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2874 * tests/regression.at (%expect not enough, %expect right)
2875 (%expect too much): New.
2877 2001-11-12 Akim Demaille <akim@epita.fr>
2879 * tests/regression.at (Conflicts): Rename as...
2880 (Unresolved SR Conflicts): this.
2881 (Solved SR Conflicts): New.
2883 2001-11-12 Akim Demaille <akim@epita.fr>
2885 * src/reduce.c (print_results): Rename as...
2886 (reduce_output): This.
2887 Output to OUT, passed as argument, instead of output_obstack.
2888 (dump_grammar): Likewise.
2891 (reduce_grammar): No longer call reduce_output, since...
2892 * src/print.c (print_results): do it.
2893 * src/main.c (main): Call reduce_free;
2895 2001-11-12 Akim Demaille <akim@epita.fr>
2897 * src/conflicts.c (print_reductions): Accept OUT as argument.
2898 Output to it, not to output_obstack.
2899 * src/print.c (print_actions): Adjust.
2901 2001-11-12 Akim Demaille <akim@epita.fr>
2903 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2904 the result instead of using...
2905 (src_total, rrc_total, src_count, rrc_count): Remove.
2906 (any_conflicts): Remove.
2907 (print_conflicts): Split into...
2908 (conflicts_print, conflicts_output): New.
2909 * src/conflicts.h: Adjust.
2910 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2911 * src/print.c (print_grammar): Issue `\n' between two rules.
2912 * tests/regression.at (Conflicts): New.
2913 Reported by Tom Lane.
2915 2001-11-12 Akim Demaille <akim@epita.fr>
2917 * tests/regression.at (Invalid input): Remove, duplicate with
2918 ``Invalid input: 1''.
2920 2001-11-12 Akim Demaille <akim@epita.fr>
2922 * tests/torture.at (AT_DATA_STACK_TORTURE)
2923 (Exploding the Stack Size with Alloca)
2924 (Exploding the Stack Size with Malloc): New.
2926 2001-11-12 Akim Demaille <akim@epita.fr>
2928 * src/bison.simple (YYSTACK_REALLOC): New.
2929 (yyparse) [!yyoverflow]: Use it and free the old stack.
2930 Reported by Per Allansson.
2932 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2934 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2935 define CPP macro, which substitute YYSTYPE by yystype.
2936 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2937 with yyltype/YYLTYPE. This allows inclusion of the generated
2938 header within the parser if the compiler, such as GGC, accepts
2939 multiple equivalent #defines.
2942 2001-11-05 Akim Demaille <akim@epita.fr>
2944 * src/reader.c (symbols_output): New, extracted from...
2945 (packsymbols): here.
2948 2001-11-05 Akim Demaille <akim@epita.fr>
2950 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2952 2001-11-05 Akim Demaille <akim@epita.fr>
2954 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2957 2001-11-05 Akim Demaille <akim@epita.fr>
2959 * src/options.h (struct option_table_struct): set_flags is void*.
2960 * src/options.c (longopts): Support `--output' and `%output'.
2962 * src/lex.h (tok_setopt): Remove, replaced with...
2963 (tok_intopt, tok_stropt): these new guys.
2964 * src/lex.c (getopt.h): Not needed.
2965 (token_buffer, unlexed_token_buffer): Not const.
2966 (percent_table): Promote `-' over `_' in directive names.
2967 Active `%name-prefix', `file-prefix', and `output'.
2968 (parse_percent_token): Accept possible arguments to directives.
2969 Promote `-' over `_' in directive names.
2971 2001-11-04 Akim Demaille <akim@epita.fr>
2973 * doc/bison.texinfo (Decl Summary): Split the list into
2974 `directives for grammars' and `directives for bison'.
2976 Add description of `%name-prefix', `file-prefix', and `output'.
2977 Promote `-' over `_' in directive names.
2978 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2979 Simplify the description of `--name-prefix'.
2980 Promote `-' over `_' in directive names.
2981 Promote `--output' over `--output-file'.
2982 Fix the description of `--defines'.
2983 * tests/output.at: Exercise %file-prefix and %output.
2985 2001-11-02 Akim Demaille <akim@epita.fr>
2987 * doc/refcard.tex: Update.
2989 2001-11-02 Akim Demaille <akim@epita.fr>
2991 * src/symtab.h (SUNDEF): New.
2992 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2993 stand for `uninitialized', instead of 0.
2994 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2995 * src/lex.c (lex): Adjust.
2997 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2999 Let yylex return it instead of a plain 0.
3000 Reported by Dick Streefland.
3002 2001-11-02 Akim Demaille <akim@epita.fr>
3004 * tests/regression.at (Mixing %token styles): New test.
3006 2001-11-02 Akim Demaille <akim@epita.fr>
3008 * src/reader.c (parse_thong_decl): Formatting changes.
3009 (token_translations_init): New, extracted from...
3010 (packsymbols): Here.
3013 2001-11-01 Akim Demaille <akim@epita.fr>
3015 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
3016 Check that `9foo.y' produces correct cpp guards.
3017 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
3021 2001-11-01 Akim Demaille <akim@epita.fr>
3023 * tests/regression.at (Invalid input: 2): New.
3024 * src/lex.c (unlexed_token_buffer): New.
3025 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
3029 2001-11-01 Akim Demaille <akim@epita.fr>
3031 * tests/calc.at: Catch up with 1.30.
3032 * configure.in: Bump to 1.49a.
3033 Adjust to newer Autotest.
3035 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
3037 * src/conflicts.c: Move global variables rrc_total and src_total ...
3038 (print_conflicts): here.
3039 * src/output.c (output): Free global variable user_toknums.
3040 * src/lex.c (token_obstack): Become static.
3042 2001-10-18 Akim Demaille <akim@epita.fr>
3044 * tests/atlocal.in (GCC): Add.
3045 * tests/calc.at: s/m4_match/m4_bmatch/.
3046 s/m4_patsubst/m4_bpatsubst/.
3047 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
3048 * configure.in: AC_SUBST(GCC).
3050 2001-10-14 Marc Autret <autret_m@epita.fr>
3052 * src/options.c (create_long_option_table): Fix.
3054 2001-10-10 Akim Demaille <akim@epita.fr>
3056 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
3058 2001-10-04 Akim Demaille <akim@epita.fr>
3060 * src/reader.c (parse_union_decl): Push the caracters in
3061 union_obstack, not attrs_obstack.
3063 2001-10-04 Akim Demaille <akim@epita.fr>
3065 Merge in the branch 1.29.
3067 * src/reader.c (packsymbols): Use a temporary obstack for
3068 `%%tokendef', since output_stack is already used elsewhere.
3070 2001-10-02 Akim Demaille <akim@epita.fr>
3074 2001-10-02 Akim Demaille <akim@epita.fr>
3078 2001-10-02 Akim Demaille <akim@epita.fr>
3080 * tests/regression.at (Invalid CPP headers): New.
3081 From Alexander Belopolsky.
3082 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
3084 2001-10-02 Akim Demaille <akim@epita.fr>
3086 * tests/regression.at (Invalid input): New.
3087 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
3090 2001-10-02 Akim Demaille <akim@epita.fr>
3092 * tests/calc.at: Now that --debug works, the tests must be adjusted.
3094 2001-10-02 Akim Demaille <akim@epita.fr>
3096 * src/output.c (output_parser): Assert `skeleton'.
3097 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
3101 2001-10-01 Marc Autret <autret_m@epita.fr>
3103 * src/lex.h: Echo modifications.
3104 * src/lex.c (unlex): Parameter is now token_t.
3107 2001-10-01 Marc Autret <autret_m@epita.fr>
3109 * src/main.c: Include lex.h.
3112 2001-09-29 Akim Demaille <akim@epita.fr>
3114 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
3116 2001-09-28 Akim Demaille <akim@epita.fr>
3118 * tests/testsuite.at: Update to newer Autotest.
3119 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
3121 2001-09-27 Akim Demaille <akim@epita.fr>
3123 Position independent wrapper.
3125 * tests/bison: Remove.
3126 * tests/bison.in: New.
3127 * configure.in: Adjust.
3129 2001-09-27 Paul Eggert <eggert@twinsun.com>
3131 Port quotearg fixes from tar 1.13.24.
3133 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3135 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3136 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3138 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
3139 * m4/mbrtowc.m4: New file.
3140 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
3141 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
3143 2001-09-27 Akim Demaille <akim@epita.fr>
3147 2001-09-27 Akim Demaille <akim@epita.fr>
3151 2001-09-25 Akim Demaille <akim@epita.fr>
3153 * src/system.h: Include `xalloc.h'.
3154 Remove it from the C files.
3155 * src/files.c (output_files): Free the obstacks.
3156 * src/lex.c (init_lex): Rename as...
3159 * src/main.c (main): Use it.
3161 2001-09-24 Marc Autret <autret_m@epita.fr>
3163 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
3164 to output informations in fout (FILE*).
3165 (open_graph, close_graph): Likewise.
3166 (output_graph, output_edge, output_node): Likewise.
3167 * src/vcg.h: Update function prototypes.
3168 * src/print_graph.c (print_graph): Open output graph file.
3169 (print_actions): Adjust.
3170 * src/files.h: Remove extern declaration.
3171 * src/files.c: Remove graph_obstack declaration.
3172 (open_files): Remove graph_obstack initialization.
3173 (output_files): Remove graph_obstack saving.
3175 2001-09-24 Marc Autret <autret_m@epita.fr>
3177 * src/files.c (compute_output_file_names): Fix.
3179 2001-09-24 Marc Autret <autret_m@epita.fr>,
3180 Akim Demaille <akim@epita.fr>
3182 * src/reader.c (reader): Remove call to free_symtab ().
3183 * src/main.c (main): Call it here.
3185 * src/conflicts.c (initialize_conflicts): Rename as...
3186 (solve_conflicts): this.
3187 * src/print.c (print_core, print_actions, print_state)
3188 (print_grammar): Dump to a file instead a `output_obstack'.
3189 (print_results): Dump `output_obstack', and then proceed with the
3191 * src/files.c (compute_output_file_names, close_files): New.
3192 (output_files): Adjust.
3193 * src/main.c (main): Adjust.
3195 2001-09-23 Marc Autret <autret_m@epita.fr>
3197 * src/files.c (compute_header_macro): Computes header macro name
3198 from spec_defines_file when given.
3200 2001-09-23 Marc Autret <autret_m@epita.fr>
3202 * src/files.c (output_files): Add default extensions.
3204 2001-09-22 Akim Demaille <akim@epita.fr>
3206 * src/conflicts.c (finalize_conflicts): Rename as...
3207 (free_conflicts): this.
3209 2001-09-22 Akim Demaille <akim@epita.fr>
3211 * src/gram.c (gram_free): Rename back as...
3213 (output_token_translations): Free `token_translations'.
3214 * src/symtab.c (free_symtab): Free the tag field.
3216 2001-09-22 Akim Demaille <akim@epita.fr>
3218 Remove `translations' as it is always set to true.
3220 * src/gram.h: Adjust.
3221 * src/reader.c (packsymbols, parse_token_decl): Adjust
3222 * src/print.c (print_grammar): Adjust.
3223 * src/output.c (output_token_translations): Adjust.
3224 * src/lex.c (lex): Adjust.
3225 * src/gram.c: Be sure the set pointers to NULL.
3226 (dummy): Rename as...
3229 2001-09-22 Akim Demaille <akim@epita.fr>
3231 * configure.in: Invoke AM_LIB_DMALLOC.
3232 * src/system.h: Use dmalloc.
3233 * src/LR0.c: Be sure to have pointers initialized to NULL.
3234 (allocate_itemsets): Allocate kernel_items only if needed.
3236 2001-09-22 Akim Demaille <akim@epita.fr>
3238 * configure.in: Bump to 1.29b.
3239 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
3240 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
3241 need xmalloc.c in calc.y.
3244 2001-09-21 Akim Demaille <akim@epita.fr>
3247 * Makefile.maint, config/config.guess, config/config.sub,
3248 * config/missing: Update from masters.
3249 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
3251 * configure.in (ALL_LINGUAS): Add `tr'.
3253 2001-09-21 Akim Demaille <akim@epita.fr>
3255 * tests/Makefile.am (package.m4): Move to...
3256 ($(srcdir)/$(TESTSUITE)): here.
3258 2001-09-20 Akim Demaille <akim@epita.fr>
3260 * src/complain.c: No longer try to be standalone: use system.h.
3261 Don't assume __STDC__ is defined to 1. Just test if it is defined.
3262 * src/complain.h: Likewise.
3263 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
3264 Remove the unused variable `n'.
3265 From Albert Chin-A-Young.
3267 2001-09-18 Marc Autret <autret_m@epita.fr>
3269 * doc/bison.1: Update.
3270 * doc/bison.texinfo (Bison Options): Update --defines and --graph
3272 (Option Cross Key): Update.
3275 2001-09-18 Marc Autret <autret_m@epita.fr>
3277 * tests/regression.at: New test (comment in %union).
3279 2001-09-18 Marc Autret <autret_m@epita.fr>
3281 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
3283 Reported by Keith Browne.
3285 2001-09-18 Marc Autret <autret_m@epita.fr>
3287 * tests/output.at: Add tests for --defines and --graph.
3289 2001-09-18 Marc Autret <autret_m@epita.fr>
3291 * tests/output.at: Removes tests of %{header,src}_extension features.
3293 2001-09-18 Akim Demaille <akim@epita.fr>
3295 * tests/Makefile.am (package.m4): New.
3296 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
3297 (_AT_CHECK_CALC_ERROR): Likewise.
3298 Factor the `, ' part of verbose error messages.
3300 2001-09-18 Marc Autret <autret_m@epita.fr>
3302 * src/getargs.c (longopts): Declare --defines and --graph as options
3303 with optional arguments.
3304 * src/files.h: Add extern declarations.
3305 * src/files.c (spec_graph_file, spec_defines_file): New.
3306 (output_files): Update.
3307 Remove CPP-outed code.
3309 2001-09-18 Marc Autret <autret_m@epita.fr>
3311 Turn off %{source,header}_extension feature.
3313 * src/files.c (compute_exts_from_gf): Update.
3314 (compute_exts_from_src): Update.
3315 (output_files): CPP-out useless code.
3316 * src/files.h: Remove {header,source}_extension extern declarations.
3317 * src/reader.c (parse_dquoted_param): CPP-out.
3318 (parse_header_extension_decl): Remove.
3319 (parse_source_extension_decl): Remove.
3320 (read_declarations): Remove cases tok_{hdrext,srcext}.
3321 * src/lex.c (percent_table): Remove {header,source}_extension entries.
3322 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
3324 2001-09-10 Akim Demaille <akim@epita.fr>
3326 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
3327 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
3328 (AT_CHECK_OUTPUT): this.
3329 Merely check ls' exit status, its output is useless.
3331 2001-09-10 Akim Demaille <akim@epita.fr>
3333 * tests/calc.at: Use m4_match.
3334 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
3336 2001-09-10 Marc Autret <autret_m@epita.fr>,
3337 Akim Demaille <akim@epita.fr>
3339 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
3341 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
3343 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
3344 * src/lex.h: Adjust prototype.
3345 (token_t): Add `tok_undef'.
3346 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
3347 (parse_percent_token): Now returns token_t.
3348 Add default statement in switch.
3349 (lex): Separate `c' as an input variable, from the token_t result
3351 (unlexed): Is a token_t.
3353 2001-09-10 Akim Demaille <akim@epita.fr>
3355 * configure.in: Bump to 1.29a.
3357 2001-09-07 Akim Demaille <akim@epita.fr>
3361 2001-08-30 Akim Demaille <akim@epita.fr>
3363 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3364 * m4/atconfig.m4: Remove.
3365 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3367 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3368 m4_if, m4_patsubst, and m4_regexp.
3369 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3370 `input' file instead of echo.
3372 2001-08-29 Akim Demaille <akim@epita.fr>
3376 2001-08-29 Akim Demaille <akim@epita.fr>
3380 2001-08-29 Paul Eggert <eggert@twinsun.com>
3382 * src/bison.simple (yyparse): Don't take the address of an
3383 item before the start of an array, as that doesn't conform to
3386 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3388 * doc/bison.texinfo (Location Tracking Calc): New node.
3390 2001-08-29 Paul Eggert <eggert@twinsun.com>
3392 * src/output.c (output): Do not define const, as this now
3393 causes more problems than it cures.
3395 2001-08-29 Akim Demaille <akim@epita.fr>
3397 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3399 Be sure to tag the `detailmenu'.
3401 2001-08-29 Akim Demaille <akim@epita.fr>
3403 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3404 download in a tmp dir.
3406 2001-08-28 Marc Autret <autret_m@epita.fr>
3408 * config/depcomp: New file.
3410 2001-08-28 Marc Autret <autret_m@epita.fr>
3412 * doc/bison.1 (mandoc): Adjust.
3413 From Juan Manuel Guerrero.
3415 2001-08-28 Marc Autret <autret_m@epita.fr>
3417 * src/print_graph.c (print_state): Fix.
3419 2001-08-27 Marc Autret <autret_m@epita.fr>
3421 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3423 Echo modifications to the functions prototypes.
3424 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3426 2001-08-27 Marc Autret <autret_m@epita.fr>
3428 * src/vcg.c: Include `xalloc.h'.
3429 (add_colorentry): New.
3430 (add_classname): New.
3431 (add_infoname): New.
3432 * src/vcg.h: Add new prototypes.
3434 2001-08-27 Akim Demaille <akim@epita.fr>
3436 * Makefile.maint: Sync. again with CVS Autoconf.
3438 2001-08-27 Akim Demaille <akim@epita.fr>
3440 * Makefile.maint: Formatting changes.
3441 (po-update, cvs-update, update): New targets.
3444 2001-08-27 Akim Demaille <akim@epita.fr>
3446 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3447 * Makefile.maint: Sync. with CVS Autoconf.
3449 2001-08-27 Marc Autret <autret_m@epita.fr>
3451 * src/vcg.h (struct infoname_s): New.
3452 (struct colorentry_s): New.
3453 (graph_s): New fields {vertical,horizontal}_order in structure.
3454 Add `infoname' field.
3455 Add `colorentry' field;
3456 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3457 (G_HORIZONTAL_ORDER): New.
3459 (G_COLORENTRY): New.
3460 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3461 Add output of `infoname'.
3462 Add output of `colorentry'.
3464 2001-08-27 Marc Autret <autret_m@epita.fr>
3466 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3467 This one shadowed a global parameter.
3469 2001-08-24 Marc Autret <autret_m@epita.fr>
3471 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3472 instead of `unsigned'.
3473 (print_state): Do not call obstack_object_size () in obstack_grow ()
3474 to avoid macro variables shadowing.
3476 2001-08-23 Marc Autret <autret_m@epita.fr>
3478 * src/lex.c (percent_table): Typo: s/naem/name/.
3480 Normalize new options declarations.
3482 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3484 * tests/suite.at: Exercise %header_extension and %source_extension.
3486 2001-08-16 Marc Autret <autret_m@epita.fr>
3488 * src/reader.c (parse_dquoted_param): New.
3489 (parse_header_extension_decl): Use it.
3490 (parse_source_extension_decl): Likewise.
3492 2001-08-16 Marc Autret <autret_m@epita.fr>
3494 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3495 (get_xxxx_str): Use assert () instead of complain ().
3496 Remove return invokations in default cases.
3497 (get_decision_str): Modify default behaviour. Remove second argument.
3498 Echo modifications on calls.
3499 (output_graph): Fix.
3501 2001-08-16 Marc Autret <autret_m@epita.fr>
3503 * src/getargs.c (usage): Update with ``-g, --graph''.
3505 2001-08-16 Marc Autret <autret_m@epita.fr>
3507 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3508 (Option Cross Key): Likewise.
3509 * doc/bison.1: Update.
3511 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3513 * src/output.c (output_master_parser): Don't finish action_obstack.
3514 (output_parser): Don't care about the muscle action, here.
3515 (prepare): Copy the action_obstack in the action muscle.
3516 (output): Free action_obstack.
3518 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3520 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3521 will contain `%union' declaration.
3522 (parse_union_decl): Delete #line directive output.
3523 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3524 informations about %union.
3525 (parse_union_decl): Copy the union_obstack in the muscle stype.
3526 * src/bison.simple: Add new #line directive.
3527 Add typdef %%stype YYSTYPE.
3529 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3531 * src/bison.simple: Add new `#line' directive.
3533 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3535 * src/bison.simple: New `#line' directive.
3536 * src/output.c (output_parser): Support new dynamic muscle input_line.
3538 2001-09-22 Marc Autret <autret_m@epita.fr>
3540 * src/output.c (output_master_parser): New.
3541 (output_parser): Be more re-entrant.
3543 2001-09-21 Marc Autret <autret_m@epita.fr>
3545 * src/reader.c (copy_definition, parse_union_decl): Update and use
3547 (copy_action): Likewise.
3548 Use obstack_1grow ().
3549 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3551 2001-09-21 Marc Autret <autret_m@epita.fr>
3553 * src/options.c (option_table): Adjust.
3554 * src/lex.c (parse_percent_token): Fix.
3556 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3558 * src/options.c (symtab.h): Include it, need by lex.h.
3560 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3562 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3563 is now an option_table_struct*.
3564 (option_strcmp): New function option_strcmp.
3565 (parse_percent_token): Call option_strcmp.
3566 * src/getargs.c (xalloc.h, options.h): Include it.
3567 (getargs): Call create_long_option_table.
3568 (getargs): Free longopts at the end of the function.
3569 (shortopts): Move in options.c.
3570 * src/options.c (create_long_option_table): New function. Convert
3571 information from option_table to option structure.
3572 * src/reader.c (options.h): Include it.
3574 * src/Makefile.am: Adjust.
3575 * src/options.c (option_table): Create from longopts and percent_table.
3576 * src/getargs.c (longopts): Delete.
3577 * src/lex.c (struct percent_table_struct): Delete.
3578 (percent_table): Delete.
3579 (options.h): Include it.
3580 * src/options.c: Create.
3581 * src/options.h: Create.
3582 Declare enum opt_access_e.
3583 Define struct option_table_struct.
3585 2001-09-20 Marc Autret <autret_m@epita.fr>
3587 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3590 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3592 * src/bison.simple: s/%%filename/%%skeleton.
3593 * src/muscle_tab.c (getargs.h): Include it.
3594 (muscle_init): Insert new muscle skeleton.
3596 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3598 * src/output.c (output_parser): Delete unused variable actions_dumped.
3600 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3602 * src/output.c (output): Delete call to reader_output_yylsp.
3603 * src/reader.c (reader): Likewise.
3604 * src/reader.h: Delete declaration of reader_output_yylsp.
3606 2001-09-02 Marc Autret <autret_m@epita.fr>
3608 * src/reader.c: Include muscle_tab.h.
3609 (parse_union_decl): Update.
3610 (parse_macro_decl): Rename parse_muscle_decl.
3611 Update to use renamed functions and variable.
3612 (read_declarations, copy_action, read_additionnal_code, : Updated
3613 with correct variables and functions names.
3614 (packsymbols, reader): Likewise.
3616 * src/reader.h (muscle_obstack): Extern declaration update.
3618 * src/output.c: Include muscle_tab.h
3619 In all functions using macro_insert, change by using muscle_insert ().
3620 (macro_obstack): Rename muscle_obstack.
3621 Echo modifications in the whole file.
3622 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3623 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3624 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3626 * src/muscle_tab.h: Update double inclusion macros.
3627 (macro_entry_s): Rename muscle_entry_s.
3630 * src/muscle_tab.c: Include muscle_tab.h.
3631 Rename macro_tabble to muscle_table.
3632 (mhash1, mhash2, mcmp): Use muscle_entry.
3633 (macro_init): Rename muscle_init. Update.
3634 (macro_insert): Rename muscle_insert. Update.
3635 (macro_find): Rename muscle_find. Update.
3637 * src/main.c: Include muscle_tab.h.
3638 (main): Call muscle_init ().
3639 * src/Makefile.am (bison_SOURCES): Echo modifications.
3641 2001-09-02 Marc Autret <autret_m@epita.fr>
3643 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3645 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3647 2001-09-02 Marc Autret <autret_m@epita.fr>
3649 * src/macrotab.c, src/macrotab.h: Remove.
3651 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3653 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3656 2001-09-01 Marc Autret <autret_m@epita.fr>
3658 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3659 to an explicit value to activate the feature. We do it here.
3661 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3663 * src/output.c (prepare): Delete the `filename' muscule insertion.
3664 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3665 (parse_union_decl): Likewise.
3666 * src/macrotab.c (macro_init): Initialize filename by infile.
3668 2001-08-31 Marc Autret <autret_m@epita.fr>
3670 * src/bison.simple (YYLSP_NEEDED): New definition.
3671 * src/output.c (prepare): Add macro insertion of `locations_flag'
3673 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3675 * src/output.c (prepare): Delete insertion of previous muscles,
3676 and insert the `prefix' muscles.
3677 * src/macrotab.c (macro_init): Likewise.
3678 (macro_init): Initialization prefix directive by `yy'.
3679 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3680 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3681 yylval, yydebug, yyerror, yynerrs and yyparse.
3682 New directive `#define' to substitute yydebug, ... with option
3685 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3687 * src/main.c (main): Standardize.
3688 * src/output.c (output_table_data, output_parser): Likewise.
3689 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3691 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3693 * src/reader.c (read_additionnal_code): Rename %%user_code to
3695 * src/output.c (output): Rename %%declarations to %%prologue.
3696 * src/bison.simple: Echo modifications.
3698 2001-08-31 Marc Autret <autret_m@epita.fr>
3700 * src/reader.c (readgram): CleanUp.
3701 (output_token_defines): Likewise.
3702 (packsymbols): Likewise.
3704 * src/output.c (output): CPP-out useless code.
3706 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3708 * src/reader.c (reader): Delete obsolete call to function
3709 output_trailers and output_headers.
3710 * src/output.h: Remove obsolete functions prototypes of output_headers
3711 and output_trailers.
3713 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3715 * src/main.c: Include macrotab.h.
3716 * src/macrotab.h (macro_entry_s): Constify fields.
3717 Adjust functions prototypes.
3718 * src/macrotab.c (macro_insert): Constify key and value.
3719 (macro_find): Constify key.
3720 (macro_insert): Include 'xalloc.h'
3721 (macro_insert): Use XMALLOC.
3722 (macro_find): Constify return value.
3723 * src/output.c (output_table_data): Rename table to table_data.
3724 (output_parser): Constify macro_key, macro_value.
3726 2001-08-30 Marc Autret <autret_m@epita.fr>
3728 * src/reader.c (parse_skel_decl): New.
3729 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3730 * src/lex.h (token_t): New token `tok_skel'.
3731 * src/lex.c (percent_table): Add skeleton option entry.
3734 2001-08-29 Marc Autret <autret_m@epita.fr>
3736 * src/bison.simple: Add %%user_code directive at the end.
3737 * src/reader.c (read_additionnal_code): New.
3739 * src/output.c (output_program): Remove.
3742 2001-08-28 Marc Autret <autret_m@epita.fr>
3744 * src/output.c (output_actions): Clean up.
3745 (output_gram): CPP-out useless code.
3746 * src/reader.c (reader): Clean up, CPP-out useless code.
3748 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3750 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3752 * src/bison.simple: Add `%%definitions'.
3754 2001-08-28 Marc Autret <autret_m@epita.fr>
3756 * config/depcomp: New file.
3758 2001-08-27 Paul Eggert <eggert@twinsun.com>
3760 * src/bison.simple (yyparse): Don't take the address of an
3761 item before the start of an array, as that doesn't conform to
3764 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3766 * src/output.c (output): Remove the initialization of the macro
3767 obstack. It was done too late here.
3769 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3771 (reader): Initialize the macro obstack here, since we need it to grow
3772 '%define' directives.
3774 * src/reader.h: Declare the macro obstack as extern.
3776 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3778 * src/output.c (output_parser): Fix. Store single '%' characters in
3779 the output obstack instead of throwing them away.
3781 2001-08-27 Akim Demaille <akim@epita.fr>
3783 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3785 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3787 * lib/Makefile.am: Adjust.
3789 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3791 * src/bison.simple: Update and add '%%' directives.
3793 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3795 * src/reader.c (reader): Remove calls to 'output_headers' and
3796 'output_trailers'. Remove some C output.
3797 (readgram): Disable a piece of code that was writing a default
3798 definition for 'YYSTYPE'.
3799 (reader_output_yylsp): Remove.
3800 (packsymbols): Output token defintions to a macro.
3801 (copy_definition): Disable C output.
3803 * src/reader.c (parse_macro_decl): New function used to parse macro
3805 (copy_string2): Put the body of copy_string into this new function.
3806 Add a parameter to let the caller choose whether he wants to copy the
3807 string delimiters or not.
3808 (copy_string): Be a simple call to copy_string2 with the last argument
3810 (read_declarations): Add case for macro definition.
3811 (copy_identifier): New.
3812 (parse_macro_decl): Read macro identifiers using copy_identifier
3815 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3817 * src/output.c (prepare): Add prefixed names.
3818 (output_parser): Output semantic actions.
3819 (output_parser): Fix bug on '%%line' directives.
3821 * src/output.c (output_headers): Remove. The C code printed by this
3822 function should now be in the skeletons.
3823 (output_trailers): Remove.
3824 (output): Disable call to 'reader_output_yylsp'.
3825 (output_rule_data): Do not output tables to the table obstack.
3827 * src/output.c: Remove some C dedicated output.
3828 Improve the use of macro and output obstacks.
3829 (output_defines): Remove.
3831 * src/output.c (output_token_translations): Associate 'translate'
3832 table with a macro. No output to the table obstack.
3833 (output_gram): Same for 'rhs' and 'prhs'.
3834 (output_stos): Same for 'stos'.
3835 (output_rule_data): Same for 'r1' and 'r2'.
3836 (token_actions): Same for 'defact'.
3837 (goto_actions): Same for 'defgoto'.
3838 (output_base): Same for 'pact' and 'pgoto'.
3839 (output_table): Same for 'table'.
3840 (output_check): Same for 'check'.
3842 * src/output.c (output_table_data): New function.
3843 (output_short_table): Remove.
3844 (output_short_or_char_table): Remove.
3846 * src/output.c (output_parser): Replace most of the skeleton copy code
3847 with something new. Skeletons are now processed character by character
3848 rather than line by line, and Bison looks for '%%' macros. This is the
3849 first step in making Bison's output process (a lot) more flexible.
3850 (output_parser): Use the macro table.
3852 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3854 * src/main.c (main): Initialize the macro table.
3856 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3858 * src/lex.c (percent_table): Add tok_define.
3859 * src/lex.h: Add tok_define.
3861 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3863 * src/macrotab.c: New file.
3864 * src/macrotab.h: New file.
3865 * src/Makefile.am: Update.
3867 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3869 * lib/hash.c: New file.
3870 * lib/hash.h: New file.
3871 * lib/Makefile.am: Update.
3873 2001-08-15 Akim Demaille <akim@epita.fr>
3877 2001-08-15 Marc Autret <autret_m@epita.fr>
3879 * src/reader.c (readgram): Indent output macro YYSTYPE.
3880 (packsymbols): Likewise.
3881 (output_token_defines): Likewise.
3882 * src/files.c: Standardize.
3883 (compute_header_macro): New.
3884 (defines_obstack_save): New. Use compute_header_macro.
3885 (output_files): Update. Use defines_obstack_save.
3887 2001-08-15 Akim Demaille <akim@epita.fr>
3889 * doc/bison.texinfo (Table of Symbols): Document
3892 2001-08-15 Akim Demaille <akim@epita.fr>
3894 * missing: Update from CVS Automake.
3895 * config/config.guess, config/config.sub, config/texinfo.tex:
3896 Update from gnu.org.
3898 2001-08-15 Akim Demaille <akim@epita.fr>
3900 * Makefile.maint: Sync with CVS Autoconf.
3902 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3904 * doc/bison.texinfo: Include GNU Free Documentation License from
3906 * doc/fdl.texi: Add to package.
3908 2001-08-14 Marc Autret <autret_m@epita.fr>
3910 Turn on %{source,header}_extension features.
3912 * src/lex.c (percent_table): Un-CPP out header_extension and
3914 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3915 (compute_exts_from_src): Remove conditions. It restores priorities
3918 2001-08-14 Marc Autret <autret_m@epita.fr>
3920 * src/files.c (compute_base_names): Add extensions computing when
3921 `--file-prefix' used.
3922 Standardize function calls.
3924 2001-08-13 Marc Autret <autret_m@epita.fr>
3926 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3927 defining it (defined but null disables alloca).
3929 2001-08-13 Marc Autret <autret_m@epita.fr>
3931 * src/bison.simple (_yy_memcpy): CPP reformat.
3933 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3935 * tests/atconfig.in (CPPFLAGS): Fix.
3937 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3939 * doc/bison.texinfo: Include GNU General Public License from
3941 * doc/gpl.texi: Add to package.
3943 2001-08-10 Marc Autret <autret_m@epita.fr>
3945 * src/print_graph.h: Fix.
3946 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3948 2001-08-10 Akim Demaille <akim@epita.fr>
3950 * src/system.h: Provide default declarations for stpcpy, strndup,
3953 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3955 * doc/bison.texinfo (Locations): Update @$ stuff.
3957 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3959 * src/bison.simple (YYLLOC_DEFAULT): Update.
3962 2001-08-08 Marc Autret <autret_m@epita.fr>
3964 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3965 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3966 Reported by Fabrice Bauzac.
3968 2001-08-08 Marc Autret <autret_m@epita.fr>
3970 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3971 * src/vcg.c (output_node): Fix.
3972 * src/vcg.h: Cleanup.
3973 * src/print_graph.c: Add comments.
3974 (node_output_size): New global variable. Simplify the formatting of
3975 the VCG graph output.
3976 (print_actions): Unused code is now used. It notifies the final state
3977 and no action states in the VCG graph. It also give the reduce actions.
3978 The `shift and goto' edges are red and the `go to state' edges are
3980 Get the current node name and node_obstack by argument.
3981 (node_obstack): New variable.
3982 (print_state): Manage node_obstack.
3983 (print_core): Use node_obstack given by argument.
3984 A node is not only computed here but in print_actions also.
3985 (print_graph): CPP out useless code instead of commenting it.
3987 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3989 * tests/atconfig.in (CPPFLAGS): Fix.
3991 2001-08-07 Akim Demaille <akim@epita.fr>
3993 * src/print_graph.c (quote): New.
3994 (print_core): Use it.
3996 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3998 * src/vcg.c (complain.h): Include it.
3999 Unepitaize `return' invocations.
4000 [NDEBUG] (main): Remove.
4001 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
4002 * src/files.c (open_files): Initialize graph_obstack.
4003 * src/print_graph.c (print_actions): CPP out useless code.
4004 (print_core): Don't output the last `\n' in labels.
4006 * src/files.c (output_files): Output the VCG file.
4007 * src/main.c (main): Invoke print_graph ();
4009 2001-08-06 Marc Autret <autret_m@epita.fr>
4011 Automaton VCG graph output.
4012 Using option ``-g'' or long option ``--graph'', you can generate
4013 a gram_filename.vcg file containing a VCG description of the LALR (1)
4014 automaton of your grammar.
4016 * src/main.c: Call to print_graph() function.
4017 * src/getargs.h: Update.
4018 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
4019 (graph_flag): New flag.
4021 (getargs): Add case `g'.
4022 * src/files.c (graph_obstack): New obstack struct.
4023 (open_files): Initialize new obstack.
4024 (output_files): Saves graph_obstack if required.
4025 * src/files.h (graph_obstack): New extern declaration.
4026 * src/Makefile.am: Add new source files.
4028 2001-08-06 Marc Autret <autret_m@epita.fr>
4030 * src/print_graph.c, src/print_graph.h (graph): New.
4031 * src/vcg.h: New file.
4032 * src/vcg.c: New file, VCG graph handling.
4034 2001-08-06 Marc Autret <autret_m@epita.fr>
4036 Add of %source_extension and %header_extension which specify
4037 the source or/and the header output file extension.
4039 * src/files.c (compute_base_names): Remove initialisation of
4040 src_extension and header_extension.
4041 (compute_exts_from_gf): Update.
4042 (compute_exts_from_src): Update.
4043 (output_files): Update.
4044 * src/reader.c (parse_header_extension_decl): New.
4045 (parse_source_extension_decl): New.
4046 (read_declarations): New case statements for the new tokens.
4047 * src/lex.c (percent_table): Add entries for %source_extension
4048 and %header_extension.
4049 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
4051 2001-08-06 Marc Autret <autret_m@epita.fr>
4053 * configure.in: Bump to 1.28c.
4054 * doc/bison.texinfo: Texinfo thingies.
4056 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
4058 * tests/atconfig.in (CPPFLAGS): Add.
4059 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
4061 2001-08-03 Akim Demaille <akim@epita.fr>
4065 2001-08-03 Akim Demaille <akim@epita.fr>
4067 * tests/Makefile.am (check-local): Ship testsuite.
4068 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
4071 2001-08-03 Akim Demaille <akim@epita.fr>
4073 * configure.in: Try using -Wformat when compiling.
4075 2001-08-03 Akim Demaille <akim@epita.fr>
4077 * configure.in: Bump to 1.28b.
4079 2001-08-03 Akim Demaille <akim@epita.fr>
4081 * src/complain.c: Adjust strerror_r portability issues.
4083 2001-08-03 Akim Demaille <akim@epita.fr>
4087 2001-08-03 Akim Demaille <akim@epita.fr>
4089 * src/getargs.c, src/getarg.h (skeleton)): Constify.
4090 * src/lex.c (literalchar): Avoid name clashes on `buf'.
4091 * src/getargs.c: Include complain.h.
4092 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
4093 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
4095 2001-08-03 Akim Demaille <akim@epita.fr>
4097 * src/reader.c (readgram): Display hidden chars in error messages.
4099 2001-08-03 Akim Demaille <akim@epita.fr>
4101 Update to gettext 0.10.39.
4103 2001-08-03 Akim Demaille <akim@epita.fr>
4105 * lib/strspn.c: New.
4107 2001-08-01 Marc Autret <autret_m@epita.fr>
4109 * doc/bison.texinfo: Update.
4110 * doc/bison.1 (mandoc): Update.
4111 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
4112 * src/files.c: Support output files extensions computing.
4113 (src_extension): New static variable.
4114 (header_extension): New static variable.
4116 (get_extension_index): New function, gets the index of an extension
4117 filename in a string.
4118 (compute_exts_from_gf): New function, computes extensions from the
4119 grammar file extension.
4120 (compute_exts_from_src): New functions, computes extensions from the
4121 C source file extension, file given by ``-o'' option.
4122 (compute_base_names): Update.
4123 (output_files): Update.
4125 2001-08-01 Robert Anisko <anisko_r@epita.fr>
4127 * doc/bison.texi: Document @$.
4128 (Locations): New section.
4130 2001-07-18 Akim Demaille <akim@epita.fr>
4132 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
4133 * config/prev-version.txt, config/move-if-change: New.
4134 * Makefile.am: Adjust.
4136 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
4138 * src/bison.simple (yyparse): Suppress warning `comparaison
4139 between signed and unsigned'.
4141 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
4143 * src/getargs.h (raw_flag): Remove.
4144 * src/getargs.c: Die on `-r'/`--raw'.
4145 * src/lex.c (parse_percent_token): Die on `%raw'.
4146 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
4147 * tests/calc.at: Suppress test with option `--raw'.
4149 2001-07-14 Akim Demaille <akim@epita.fr>
4152 * configure.in: Require Autoconf 2.50.
4153 Update to gettext 0.10.38.
4155 2001-03-16 Akim Demaille <akim@epita.fr>
4157 * doc/bison.texinfo: ANSIfy the examples.
4159 2001-03-16 Akim Demaille <akim@epita.fr>
4161 * getargs.c (skeleton): New variable.
4162 (longopts): --skeleton is a new option.
4163 (shortopts, getargs): -S is a new option.
4164 * getargs.h: Declare skeleton.
4165 * output.c (output_parser): Use it.
4167 2001-03-16 Akim Demaille <akim@epita.fr>
4169 * m4/strerror_r.m4: New.
4170 * m4/error.m4: Run AC_FUNC_STRERROR_R.
4171 * lib/error.h, lib/error.c: Update.
4173 2001-03-16 Akim Demaille <akim@epita.fr>
4175 * src/getargs.c (longopts): Clean up.
4177 2001-02-21 Akim Demaille <akim@epita.fr>
4179 * src/reader.c (gensym): `gensym_count' is your own.
4180 Use a static buf to create the symbol name, as token_buffer is no
4183 2001-02-08 Akim Demaille <akim@epita.fr>
4185 * src/conflicts.c (conflict_report): Be sure not to append to res
4186 between two calls, which could happen if both first sprintf were
4187 skipped, but not the first cp += strlen.
4189 2001-02-08 Akim Demaille <akim@epita.fr>
4191 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
4192 New, from fileutils 4.0.37.
4193 * configure.in: Require Autoconf 2.49c. I took some time before
4194 making this decision. This is the only way out for portability
4195 issues in Bison, it would mean way too much duplicate effort to
4196 import in Bison features implemented in 2.49c since 2.13.
4197 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
4199 2001-02-02 Akim Demaille <akim@epita.fr>
4201 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
4202 * lib/xalloc.h, lib/xmalloc.c: Update.
4204 2001-01-19 Akim Demaille <akim@epita.fr>
4206 Get rid of the ad hoc handling of token_buffer in the scanner: use
4209 * src/lex.c (token_obstack): New.
4210 (init_lex): Initialize it. No longer call...
4211 (grow_token_buffer): this. Remove it.
4212 Adjust all the places which used it to use the obstack.
4214 2001-01-19 Akim Demaille <akim@epita.fr>
4216 * src/lex.h: Rename all the tokens:
4217 s/\bENDFILE\b/tok_eof/g;
4218 s/\bIDENTIFIER\b/tok_identifier/g;
4220 Let them be enums, not #define, to ease debugging.
4221 Adjust all the code.
4223 2001-01-18 Akim Demaille <akim@epita.fr>
4225 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
4226 * src/lex.c (maxtoken, grow_token_buffer): Static.
4228 2001-01-18 Akim Demaille <akim@epita.fr>
4230 Since we now use obstacks, more % directives can be enabled.
4232 * src/lex.c (percent_table): Also accept `%yacc',
4233 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
4235 Handle the actions for `%semantic_parser' and `%pure_parser' here,
4236 instead of returning a token.
4237 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
4238 * src/reader.c (read_declarations): Adjust.
4239 * src/files.c (open_files): Don't call `compute_base_names', don't
4240 compute `attrsfile' since they depend upon data which might be
4241 *in* the input file now.
4242 (output_files): Do it here.
4243 * src/output.c (output_headers): Document the fact that this patch
4244 introduces a guaranteed SEGV for semantic parsers.
4245 * doc/bison.texinfo: Document them.
4246 * tests/suite.at: Exercise these %options.
4248 2000-12-20 Akim Demaille <akim@epita.fr>
4250 Also handle the output file (--verbose) with obstacks.
4252 * files.c (foutput): Remove.
4253 (output_obstack): New.
4254 Adjust all dependencies.
4255 * src/conflicts.c: Return a string.
4256 * src/system.h (obstack_grow_string): Rename as...
4257 (obstack_sgrow): this. Be ready to work with non literals.
4258 (obstack_fgrow4): New.
4260 2000-12-20 Akim Demaille <akim@epita.fr>
4262 * src/files.c (open_files): Fix the computation of short_base_name
4263 in the case of `-o foo.tab.c'.
4265 2000-12-20 Akim Demaille <akim@epita.fr>
4267 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
4268 (copy_dollar): Now that everything uses obstacks, get rid of the
4271 2000-12-20 Akim Demaille <akim@epita.fr>
4273 * src/files.c (open_files): Actually the `.output' file is based
4274 on the short_base_name, not base_name.
4275 * tests/suite.at (Checking output file names): Adjust.
4277 2000-12-20 Akim Demaille <akim@epita.fr>
4279 * src/bison.s1: Remove, we now use directly...
4280 * src/bison.simple: this.
4281 * src/Makefile.am: Use pkgdata instead of data.
4283 2000-12-20 Akim Demaille <akim@epita.fr>
4285 * src/files.c (guard_obstack): New.
4286 (open_files): Initialize it.
4287 (output_files): Dump it...
4288 * src/files.h: Export it.
4289 * src/reader.c (copy_guard): Use it.
4291 2000-12-19 Akim Demaille <akim@epita.fr>
4293 * src/files.c (outfile, defsfile, actfile): Removed as global
4295 (open_files): Don't compute them.
4296 (output_files): Adjust.
4297 (base_name, short_base_name): Be global.
4298 Adjust dependencies.
4300 2000-12-19 Akim Demaille <akim@epita.fr>
4302 * src/files.c (strsuffix): New.
4303 (stringappend): Be just like strcat but allocate.
4304 (base_names): Eve out from open_files.
4305 Try to simplify the rather hairy computation of base_name and
4307 (open_files): Use it.
4308 * tests/suite.at (Checking output file names): New test.
4310 2000-12-19 Akim Demaille <akim@epita.fr>
4312 * src/system.h (obstack_grow_literal_string): Rename as...
4313 (obstack_grow_string): this.
4314 * src/output.c (output_parser): Recognize `%% actions' instead of
4316 * src/bison.s1: s/$/%% actions/.
4317 * src/bison.hairy: Likewise.
4319 2000-12-19 Akim Demaille <akim@epita.fr>
4321 * src/output.c (output_parser): Compute the `#line' lines when
4323 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
4324 Suggested by Hans Aberg.
4326 2000-12-19 Akim Demaille <akim@epita.fr>
4328 Let the handling of the skeleton files be local to the procedures
4331 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
4333 (fparser, open_extra_files): Remove.
4334 (open_files, output_files): Don't take care of fparser.
4335 * src/files.h: Adjust.
4336 * src/output.c (output_parser): Open and close the file to the
4338 * src/reader.c (read_declarations): When %semantic_parser, open
4341 2000-12-19 Akim Demaille <akim@epita.fr>
4343 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
4344 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
4346 2000-12-19 Akim Demaille <akim@epita.fr>
4348 * src/files.c (open_files): Yipee! We no longer need all the code
4349 looking for `/tmp' since we have no tmp file.
4351 2000-12-19 Akim Demaille <akim@epita.fr>
4353 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4355 * src/files.c (open_files): Less dependency on MSDOS etc.
4357 2000-12-14 Akim Demaille <akim@epita.fr>
4359 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4360 Provide a default definition.
4361 Use it when executing the default @ action.
4362 * src/reader.c (reader_output_yylsp): No longer include
4363 `timestamp' and `text' in the default YYLTYPE.
4365 2000-12-12 Akim Demaille <akim@epita.fr>
4367 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4368 (copy_guard): Quote the file names.
4369 Reported by Laurent Mascherpa.
4371 2000-12-12 Akim Demaille <akim@epita.fr>
4373 * src/output.c (output_headers, output_program, output): Be sure
4374 to escape special characters when outputting filenames.
4375 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4376 (output_headers): Don't depend on them, Use ACTSTR.
4378 2000-11-17 Akim Demaille <akim@epita.fr>
4380 * lib/obstack.h: Formatting changes.
4381 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4382 prevents type checking.
4383 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4384 cast the value to (void *): assigning a `foo *' to a `void *'
4386 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4387 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4390 2000-11-17 Akim Demaille <akim@epita.fr>
4392 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4394 (suite.m4, regression.m4, calc.m4): these.
4395 * tests/atgeneral.m4: Update from CVS Autoconf.
4397 2000-11-17 Akim Demaille <akim@epita.fr>
4399 * tests/regression.m4 (%union and --defines): New test,
4400 demonstrating a current bug in the obstack implementation.
4402 2000-11-17 Akim Demaille <akim@epita.fr>
4404 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4406 Use them to declare the variables which are global or local to
4409 2000-11-17 Akim Demaille <akim@epita.fr>
4411 * acconfig.h: Remove, no longer used.
4413 2000-11-07 Akim Demaille <akim@epita.fr>
4415 * src: s/Copyright (C)/Copyright/g.
4417 2000-11-07 Akim Demaille <akim@epita.fr>
4419 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4421 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4423 2000-11-07 Akim Demaille <akim@epita.fr>
4425 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4426 Merge in a single CPP if/else.
4428 2000-11-07 Akim Demaille <akim@epita.fr>
4430 * src/output.c (output): Remove useless variables.
4431 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4432 argument `data' for consistency with the prototypes.
4434 (obstack_copy, obstack_copy0): Rename the second argument as
4435 `address' for consistency. Qualify it `const'.
4436 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4437 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4438 `const' their input argument (`data' or `address').
4439 Adjust the corresponding macros to include `const' in casts.
4441 2000-11-03 Akim Demaille <akim@epita.fr>
4443 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4444 s/PFILE1/BISON_HAIRY/.
4445 Adjust dependencies.
4447 2000-11-03 Akim Demaille <akim@epita.fr>
4449 For some reason, this was not applied.
4451 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4452 `unlink': it's no longer used.
4454 2000-11-03 Akim Demaille <akim@epita.fr>
4456 * src/files.c (skeleton_find): New function, eved out of...
4457 (open_files, open_extra_files): here.
4459 2000-11-03 Akim Demaille <akim@epita.fr>
4463 * src/files.c (obstack_save): New function.
4464 (done): Rename as...
4465 (output_files): this.
4467 * src/main.c (main): Don't use `atexit' to register `done', since
4468 it no longer has to remove tmp files, just call `output_files'
4469 when there are no errors.
4471 2000-11-02 Akim Demaille <akim@epita.fr>
4473 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4474 `unlink': it's no longer used.
4475 * src/files.h: Formatting changes.
4477 2000-11-02 Akim Demaille <akim@epita.fr>
4479 Remove the last uses of mktemp and unlink/delete.
4481 * src/files.c (fdefines, ftable): Removed.
4482 (defines_ostack, table_obstack): New.
4483 Adjust dependencies of the former into uses of the latter.
4484 * src/output.c (output_short_or_char_table, output_short_table):
4485 Convert to using obstacks.
4486 * src/reader.c (copy_comment2): Accept one FILE * and two
4488 (output_token_defines, reader_output_yylsp): Use obstacks.
4489 * src/system.h (obstack_fgrow3): New.
4491 2000-11-01 Akim Demaille <akim@epita.fr>
4493 Change each use of `fattrs' into a use of `attrs_obstack'.
4495 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4496 * src/files.c (fattrs): Remove.
4497 (attrs_obstack): New.
4498 Adjust all dependencies.
4499 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4501 2000-11-01 Akim Demaille <akim@epita.fr>
4504 Change each use of `faction' into a use of `action_obstack'.
4506 * lib/obstack.h, lib/obstack.c: New files.
4507 * src/files.c (faction): Remove.
4508 (action_obstack): New.
4509 Adjust all dependencies.
4511 2000-10-20 Akim Demaille <akim@epita.fr>
4513 * lib/quote.h (PARAMS): New macro. Use it.
4515 2000-10-16 Akim Demaille <akim@epita.fr>
4517 * src/output.c (output_short_or_char_table): New function.
4518 (output_short_table, output_token_translations): Use it.
4519 (goto_actions): Use output_short_table.
4521 2000-10-16 Akim Demaille <akim@epita.fr>
4523 * src/symtab.c (bucket_new): New function.
4526 * src/output.c (output_short_table): New argument to display the
4527 comment associated with the table.
4528 Adjust dependencies.
4529 (output_gram): Use it.
4530 (output_rule_data): Nicer output layout for YYTNAME.
4532 2000-10-16 Akim Demaille <akim@epita.fr>
4534 * src/lex.c (read_typename): New function.
4536 * src/reader.c (copy_dollar): Likewise.
4538 2000-10-16 Akim Demaille <akim@epita.fr>
4540 * src/reader.c (copy_comment2): Expect the input stream to be on
4541 the `/' which is suspected to open a comment, instead of being
4542 called after `//' or `/*' was read.
4543 (copy_comment, copy_definition, parse_union_decl, copy_action)
4544 (copy_guard): Adjust.
4546 2000-10-16 Akim Demaille <akim@epita.fr>
4548 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4549 `read_signed_integer'.
4551 2000-10-16 Akim Demaille <akim@epita.fr>
4553 * src/reader.c (copy_dollar): New function.
4554 (copy_guard, copy_action): Use it.
4556 2000-10-16 Akim Demaille <akim@epita.fr>
4558 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4559 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4560 New files, from Fileutils 4.0.27.
4561 * src/main.c (printable_version): Remove.
4562 * src/lex.c, src/reader.c: Use `quote'.
4564 2000-10-04 Akim Demaille <akim@epita.fr>
4566 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4568 2000-10-04 Akim Demaille <akim@epita.fr>
4570 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4572 2000-10-04 Akim Demaille <akim@epita.fr>
4574 When a literal string is used to define two different tokens,
4575 `bison -v' segfaults.
4576 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4578 * tests/regression.m4: New file.
4579 Include the core of the sample provided by Piotr Gackiewicz.
4580 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4583 2000-10-04 Akim Demaille <akim@epita.fr>
4585 * src/reader.c (parse_expect_decl): Keep `count' within the size
4589 2000-10-02 Paul Eggert <eggert@twinsun.com>
4591 * bison.s1 (yyparse): Assign the default value
4592 unconditionally, to avoid a GCC warning and make the parser a
4595 2000-10-02 Akim Demaille <akim@epita.fr>
4597 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4600 2000-10-02 Akim Demaille <akim@epita.fr>
4602 * src/derives.c, src/print.c, src/reduce.c: To ease the
4603 translation, move some `\n' out of the translated strings.
4605 2000-10-02 Akim Demaille <akim@epita.fr>
4607 The location tracking mechanism is precious for parse error
4608 messages. Nevertheless, it is enabled only when `@n' is used in
4609 the grammar, which is a different issue (you can use it in error
4610 message, but not in the grammar per se). Therefore, there should
4611 be another means to enable it.
4613 * src/getargs.c (getargs): Support `--locations'.
4615 * src/getargs.h (locationsflag): Export it.
4616 * src/lex.c (percent_table): Support `%locations'.
4617 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4618 with `locationsflag'.
4619 * doc/bison.texinfo: Document `--locations' and `%locations'.
4621 * tests/calc.m4: Test it.
4623 For regularity of the names, replace each
4624 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4625 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4626 In addition replace each `flag' with `_flag'.
4628 2000-10-02 Akim Demaille <akim@epita.fr>
4630 Also test parse error messages, including with YYERROR_VERBOSE.
4632 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4634 Use it to check the computations.
4635 Use it to check `nonassoc' is honored.
4636 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4637 `--yyerror-verbose'.
4638 (_AT_CHECK_CALC): Adjust to this option.
4639 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4641 2000-10-02 Akim Demaille <akim@epita.fr>
4643 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4644 the latter demonstrates a flaw in the handling of non debugging
4645 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4646 was used in order to simplify:
4662 unfortunately this leads to a CPP conflict when
4663 `--name-prefix=foo' is used since it produces `#define yydebug
4666 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4667 (YYDPRINTF): New macro.
4669 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4671 Also test `--verbose', `--defines' and `--name-prefix'.
4673 2000-10-02 Akim Demaille <akim@epita.fr>
4675 Improve the readability of the produced parsers.
4677 * src/bison.s1: Formatting changes.
4678 Improve the comment related to the `$' mark.
4679 (yydefault): Don't fall through to `yyresume': `goto' there.
4680 * src/output.c (output_parser): When the `$' is met, skip the end
4682 New variable, `number_of_dollar_signs', to check there's exactly
4683 one `$' in the parser skeleton.
4685 2000-10-02 Akim Demaille <akim@epita.fr>
4687 * lib/xstrdup.c: New file, from the fileutils.
4688 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4689 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4690 instead of strlen + xmalloc + strcpy.
4691 * src/symtab.c (copys): Remove, use xstrdup instead.
4693 2000-10-02 Akim Demaille <akim@epita.fr>
4695 * src/gram.h (associativity): New enum type which replaces the
4696 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4697 `right_assoc', `left_assoc' and `non_assoc'.
4698 Adjust all dependencies.
4699 * src/reader.c: Formatting changes.
4700 (LTYPESTR): Don't define it, use it as a literal in
4701 `reader_output_yylsp'.
4702 * src/symtab.h (symbol_class): New enum type which replaces the
4703 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4704 `sunknown', `stoken and `snterm'.
4706 2000-10-02 Akim Demaille <akim@epita.fr>
4708 * src/getargs.c (fixed_outfiles): Rename as...
4709 (yaccflag): for consistency and accuracy.
4710 Adjust dependencies.
4712 2000-10-02 Akim Demaille <akim@epita.fr>
4714 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4715 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4716 difficult and introduced a lot of core dump. It turns out that
4717 Bison used an implementation of `xmalloc' based on `calloc', and
4718 at various places it does depend upon the initialization to 0. I
4719 have not tried to isolate the pertinent places, and all the former
4720 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4721 someone should address this issue.
4723 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4724 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4726 Adjust dependencies.
4727 * src/warshall.h: New file.
4730 2000-10-02 Akim Demaille <akim@epita.fr>
4732 Various anti-`extern in *.c' changes.
4734 * src/system.h: Include `assert.h'.
4736 2000-10-02 Akim Demaille <akim@epita.fr>
4738 * src/state.h (nstates, final_state, first_state, first_shift)
4739 (first_reduction): Move their exportation from here...
4740 * src/LR0.h: to here.
4741 Adjust dependencies.
4742 * src/getargs.c (statisticsflag): New variable.
4743 Add support for `--statistics'.
4744 Adjust dependencies.
4746 Remove a lot of now useless `extern' statements in most files.
4748 2000-10-02 Akim Demaille <akim@epita.fr>
4750 * src/LR0.h: New file.
4753 2000-10-02 Akim Demaille <akim@epita.fr>
4755 * src/print.h: New file.
4757 * src/print.c: Formatting and ordering changes.
4758 (verbose, terse): Replace with...
4759 (print_results): this new function.
4760 Adjust dependencies.
4762 2000-10-02 Akim Demaille <akim@epita.fr>
4764 * src/conflicts.c (conflict_report): New function.
4765 (conflict_log, verbose_conflict_log): Replace with...
4766 (print_conflicts): this function.
4767 Adjust dependencies.
4768 * src/conflicts.h: New file.
4769 Propagate its inclusion.
4771 2000-10-02 Akim Demaille <akim@epita.fr>
4773 * src/nullable.h: New file.
4774 Propagate its inclusion.
4775 * src/nullable.c: Formatting changes.
4777 2000-10-02 Akim Demaille <akim@epita.fr>
4779 * src/reduce.h: New file.
4780 Propagate its inclusion.
4781 * src/reduce.c: Topological sort and other formatting changes.
4782 (bool, TRUE, FALSE): Move their definition to...
4783 * src/system.h: here.
4785 2000-10-02 Akim Demaille <akim@epita.fr>
4787 * src/files.c: Formatting changes.
4788 (tryopen, tryclose, openfiles): Rename as...
4789 (xfopen, xfclose, open_files): this.
4790 (stringappend): static.
4791 * src/files.h: Complete the list of exported symbols.
4794 2000-10-02 Akim Demaille <akim@epita.fr>
4796 * src/reader.h: New file.
4797 Propagate its use instead of tedious list of `extern' and
4799 * src/reader.c: Formatting changes, topological sort,
4802 2000-10-02 Akim Demaille <akim@epita.fr>
4804 * src/lex.h: Prototype `lex.c' exported functions.
4805 * src/reader.c: Adjust.
4806 * src/lex.c: Formatting changes.
4807 (safegetc): Rename as...
4810 2000-10-02 Akim Demaille <akim@epita.fr>
4812 * src/lalr.h: New file.
4813 Propagate its inclusion instead of prototypes and `extern'.
4814 * src/lalr.c: Formatting changes, topological sorting etc.
4816 2000-10-02 Akim Demaille <akim@epita.fr>
4818 * src/output.c (token_actions): Introduce a temporary array,
4819 YYDEFACT, that makes it possible for this function to use
4822 2000-10-02 Akim Demaille <akim@epita.fr>
4824 `user_toknums' is output as a `short[]' in `output.c', while it is
4825 defined as a `int[]' in `reader.c'. For consistency with the
4826 other output tables, `user_toknums' is now defined as a table of
4829 * src/reader.c (user_toknums): Be a short table instead of an int
4831 Adjust dependencies.
4833 Factor the short table outputs.
4835 * src/output.c (output_short_table): New function.
4836 * src/output.c (output_gram, output_stos, output_rule_data)
4837 (output_base, output_table, output_check): Use it.
4839 2000-10-02 Akim Demaille <akim@epita.fr>
4841 * src/output.c (output): Topological sort of the functions, in
4842 order to get rid of the `static' prototypes.
4843 No longer use `register'.
4844 * src/output.h: New file.
4845 Propagate its inclusion in files explicitly prototyping functions
4848 2000-09-21 Akim Demaille <akim@epita.fr>
4850 * src/atgeneral.m4: Update from Autoconf.
4852 2000-09-21 Akim Demaille <akim@epita.fr>
4854 * src/closure.h: New file.
4855 * src/closure.c: Formatting changes, topological sort over the
4856 functions, use of closure.h.
4857 (initialize_closure, finalize_closure): Rename as...
4858 (new_closure, free_closure): these. Adjust dependencies.
4859 * src/LR0.c: Formatting changes, topological sort, use of
4861 (initialize_states): Rename as...
4863 * src/Makefile.am (noinst_HEADERS): Adjust.
4865 2000-09-20 Akim Demaille <akim@epita.fr>
4867 * src/acconfig.h: Don't protect config.h against multiple
4869 Don't define PARAMS.
4870 * src/system.h: Define PARAMS.
4871 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4872 purpose of config.h. system.h must not try to fix wrong
4873 definitions in config.h.
4875 2000-09-20 Akim Demaille <akim@epita.fr>
4877 * src/derives.h: New file.
4878 * src/main.c, src/derives.h: Use it.
4880 * src/Makefile.am (noinst_HEADERS): Adjust.
4882 2000-09-20 Akim Demaille <akim@epita.fr>
4884 * tests/atgeneral.m4: Update from Autoconf.
4885 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4886 (AT_CHECK_CALC): New macros.
4887 Use these macros to test bison with options `', `--raw',
4888 `--debug', `--yacc', `--yacc --debug'.
4890 2000-09-19 Akim Demaille <akim@epita.fr>
4892 * src/output.c: Formatting changes.
4893 * src/machine.h: Remove, leaving its contents in...
4894 * src/system.h: here.
4896 Adjust all dependencies on stdio.h and machine.h.
4897 * src/getargs.h: New file.
4898 Let all `extern' declarations about getargs.c be replaced with
4899 inclusion of `getargs.h'.
4900 * src/Makefile.am (noinst_HEADERS): Adjust.
4902 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4904 (yyerror): Returns void, not int.
4905 * doc/bison.texinfo: Formatting changes.
4907 2000-09-19 Akim Demaille <akim@epita.fr>
4909 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4912 2000-09-18 Akim Demaille <akim@epita.fr>
4914 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4915 * src/Makefile.am (INCLUDES): Don't.
4916 Be ready to fetch headers in lib/.
4918 2000-09-18 Akim Demaille <akim@epita.fr>
4920 * doc/bison.texinfo: Update the copyright.
4921 ANSIfy and GNUify the examples.
4922 Remove the old menu.
4924 2000-09-18 Akim Demaille <akim@epita.fr>
4926 First set of tests: use the `calc' example from the documentation.
4928 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4929 is defined only when YYDEBUG is.
4930 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4931 * src/files.c (tryopen, tryclose): Formatting changes.
4932 Move to the top and be static.
4933 * src/reader.c (read_signed_integer): Likewise.
4934 * tests/calc.m4: New file.
4935 * Makefile.am, suite.m4: Adjust.
4936 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4938 2000-09-18 Akim Demaille <akim@epita.fr>
4940 Add support for an Autotest test suite for Bison.
4942 * m4/m4.m4, m4/atconfig.m4: New files.
4943 * m4/Makefile.am (EXTRA_DIST): Adjust.
4944 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4946 * src/getargs.c: Display a more standard --version message.
4947 * src/reader.c (reader): Formatting changes.
4948 No longer depend upon VERSION_STRING.
4949 * configure.in: No longer use `dnl'.
4950 Set up the test suite and the new directory `tests/.
4951 (VERSION_STRING): Remove.
4953 2000-04-14 Akim Demaille <akim@epita.fr>
4955 * src/reader.c (copy_comment2): New function, same as former
4956 `copy_comment', but outputs into two FILE *.
4957 (copy_comment): Use it.
4958 (parse_union_decl): Use it.
4959 (get_type, parse_start_decl): Use the same `invalid' message.
4960 (parse_start_decl, parse_union_decl): Use the same `multiple'
4962 (parse_union_decl, copy_guard, copy_action): Use the same
4963 `unmatched' message.
4964 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4966 2000-03-31 Akim Demaille <akim@epita.fr>
4968 * src/files.c (tryopen, tryclose): Move to the top.
4971 2000-03-31 Akim Demaille <akim@epita.fr>
4973 * src/main.c (main): Don't call `done', exit does it.
4975 2000-03-31 Akim Demaille <akim@epita.fr>
4977 * allocate.c: s/return (foo)/return foo/.
4980 * output.c: Likewise.
4981 * reader.c: Likewise.
4982 * symtab.c: Likewise.
4983 * vmsgetargs.c: Likewise.
4985 2000-03-31 Akim Demaille <akim@epita.fr>
4987 Clean up the error reporting functions.
4989 * src/report.c: New file.
4990 * src/report.h: Likewise.
4991 * src/Makefile.am: Adjust.
4992 * m4/error.m4: New file.
4993 * m4/Makefile.am: Adjust.
4994 * configure.in (jm_PREREQ_ERROR): Call it.
4995 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4997 (fatal, fatals): Remove. All callers use complain.c::fatal.
4998 (warn, warni, warns, warnss, warnss): Remove. All callers use
4999 complain.c::complain.
5000 (toomany): Remove, use fatal instead.
5001 * src/files.c (done): No argument, use complain_message_count.
5002 * src/main.c (main): Register `done' to `atexit'.
5004 * src/getargs.c (usage): More `fputs', less `fprintf'.
5006 2000-03-28 Akim Demaille <akim@epita.fr>
5008 * lib/: New directory.
5009 * Makefile.am (SUBDIRS): Adjust.
5010 * configure.in: Adjust.
5011 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
5013 * src/alloca.c: Moved to lib/.
5014 * src/getopt.c: Likewise.
5015 * src/getopt1.c: Likewise.
5016 * src/getopt.h: Likewise.
5017 * src/ansi2knr.c: Likewise.
5018 * src/ansi2knr.1: Likewise.
5019 * src/Makefile.am: Adjust.
5020 * lib/Makefile.am: New file.
5022 2000-03-28 Akim Demaille <akim@epita.fr>
5024 * src/getargs.c (usage): Refresh the help message.
5026 2000-03-17 Akim Demaille <akim@epita.fr>
5028 * src/getopt1.c: Updated from textutils 2.0e
5029 * src/getopt.c: Likewise.
5030 * src/getopt.h: Likewise.
5032 2000-03-17 Akim Demaille <akim@epita.fr>
5034 * src/Makefile.am (bison.simple): Fix the awk program: quote only
5035 the file name, not the whole `#line LINE FILE'.
5037 2000-03-17 Akim Demaille <akim@epita.fr>
5039 On syntax errors, report the token on which we choked.
5041 * src/bison.s1 (yyparse): In the label yyerrlab, when
5042 YYERROR_VERBOSE, add yychar in msg.
5044 2000-03-17 Akim Demaille <akim@epita.fr>
5046 * src/reader.c (copy_at): New function.
5047 (copy_guard): Use it.
5048 (copy_action): Use it.
5050 2000-03-17 Akim Demaille <akim@epita.fr>
5052 Be kind to translators, save some useless translations.
5054 * src/main.c (banner): New function.
5055 (fatal_banner): Use it.
5056 (warn_banner): Use it.
5058 2000-03-17 Akim Demaille <akim@epita.fr>
5060 * src/reader.c (copy_definition): Use copy_string and
5061 copy_comment. Removed now unused `match', `ended',
5063 (copy_comment, copy_string): Moved, to be visible from
5066 2000-03-17 Akim Demaille <akim@epita.fr>
5068 * src/reader.c (copy_string): Declare `static inline'. No
5069 problems with inline, since it is checked by configure.
5070 (copy_comment): Likewise.
5072 2000-03-17 Akim Demaille <akim@epita.fr>
5074 * src/reader.c (packsymbols): Formatting changes.
5076 2000-03-17 Akim Demaille <akim@epita.fr>
5078 * src/reader.c (copy_comment): New function, factored out from:
5079 (copy_action): Use it. Removed now unused `match', `ended',
5081 (copy_guard): Likewise.
5083 2000-03-17 Akim Demaille <akim@epita.fr>
5085 * src/reader.c (copy_string): New function, factored out from:
5086 (copy_action): Use it.
5087 (copy_guard): Likewise.
5089 2000-03-17 Akim Demaille <akim@epita.fr>
5091 Change the handling of @s so that they behave exactly like $s.
5092 There is now a pseudo variable @$ (readble and writable), location
5093 of the lhs of the rule (by default ranging from the location of
5094 the first symbol of the rhs, to the location of the last symbol,
5095 or, if the rhs is empty, YYLLOC).
5097 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
5099 (yyparse): When providing a default semantic action, provide a
5100 default location action.
5101 (after the $): No longer change `*YYLSP', just stack YYLOC the
5102 same way you stack YYVAL.
5103 * src/reader.c (read_declarations): Use warns.
5104 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
5105 (copy_action, case '@'): Likewise.
5106 Use a standard error message, to save useless work from
5109 2000-03-17 Akim Demaille <akim@epita.fr>
5111 * src/bison.s1: Formatting and cosmetics changes.
5112 * src/reader.c: Likewise.
5113 Update the Copyright notice.
5115 2000-03-17 Akim Demaille <akim@epita.fr>
5117 * src/bison.s1 (#line): All set to `#line' only, since the
5118 Makefile now handles them.
5120 2000-03-16 Akim Demaille <akim@epita.fr>
5122 * src/output.c (output_rule_data): Output the documentation of
5124 (Copyright notice): Update.
5127 2000-03-16 Akim Demaille <akim@epita.fr>
5129 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
5130 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
5131 One `#if YYDEBUG' remains, since it uses variables which are
5132 defined only if `YYDEBUG != 0'.
5134 2000-03-16 Akim Demaille <akim@epita.fr>
5136 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
5137 and related variables so that the similarities are highlighted.
5139 2000-03-16 Akim Demaille <akim@epita.fr>
5141 * src/bison.s1: Properly indent CPP directives.
5143 2000-03-16 Akim Demaille <akim@epita.fr>
5145 * src/bison.s1: Properly indent the `alloca' CPP section.
5147 2000-03-16 Akim Demaille <akim@epita.fr>
5149 Do not hard code values of directories in `configure.in'.
5150 Update the `configure' tool chain.
5152 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
5154 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
5155 (AC_OUTPUT): Add m4/Makefile.
5156 Bump to bison 1.28a, 1.29 has never been released.
5157 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
5158 handled via src/Makefile.am.
5159 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
5160 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
5162 * Makefile.am (SUBDIRS): Add m4.
5163 (ACLOCAL_AM_FLAGS): New variable.
5164 (AUTOMAKE_OPTIONS): Add check-news.
5165 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
5166 the proper line number and file name.
5167 (DEFS): Propagate the location of bison library files and of the
5169 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
5171 * acinclude.m4: Remove, replaced by the directory m4.
5172 * m4/Makefile.am (EXTRA_DIST): New variable.
5173 * m4/gettext.m4: New file, from the fileutils.
5174 * m4/lcmessage.m4: Likewise
5175 * m4/progtest.m4: Likewise.
5176 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
5178 2000-03-10 Akim Demaille <akim@epita.fr>
5181 Formatting changes of various comments.
5182 Respect the GNU coding standards at various places.
5183 Don't use `_()' when no translation is needed.
5185 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5188 OS/2 honors TMPDIR environment variable.
5190 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5192 * doc/bison.texinfo: Tweaked spelling and grammar.
5194 Removed reference to price of printed copy.
5195 Mention BISON_SIMPLE and BISON_HAIRY.
5197 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5199 * configure.in, NEWS:
5200 Bison 1.29 released.
5202 1999-10-27 Jesse Thilo <jthilo@gnu.org>
5204 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
5205 Added reference card.
5207 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5209 * po/ru.po: Added Russian translation.
5211 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5213 * configure.in: Added Russian translation.
5215 1999-07-06 Jesse Thilo <jthilo@gnu.org>
5217 * configure.in, NEWS, README:
5218 Released version 1.28.
5220 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5223 Squashed redefinition warning on some systems.
5225 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
5226 Have configure build version string instead of relying on ANSI string
5229 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5231 * po/POTFILES.in: Got rid of version.c.
5233 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5235 * acconfig.h, configure.in:
5236 Have configure build version string instead of relying on ANSI string
5239 1999-06-08 Jesse Thilo <jthilo@gnu.org>
5242 Dropped mention of `+' for long-named options.
5244 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5246 * src/files.c: Added <unistd.h> for unlink().
5248 * src/Makefile.am, src/system.h:
5251 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5253 * README: Added a FAQ list.
5255 * configure.in, acconfig.h:
5258 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5260 * doc/FAQ, doc/Makefile.am:
5263 1999-05-19 Jesse Thilo <jthilo@gnu.org>
5265 * src/alloc.h, src/symtab.h, src/version.c:
5266 Protected inclusion of "config.h" with HAVE_CONFIG_H.
5268 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5270 * src/.cvsignore, src/Makefile.am:
5271 Reorganized: sources in `src', documentation in `doc'.
5273 * src/lex.c (literalchar):
5274 fixed the code for escaping double quotes (thanks
5277 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5279 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
5280 Adjusted paths to reflect directory reorganization.
5282 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5284 * doc/.cvsignore, doc/Makefile.am:
5285 Reorganized: sources in `src', documentation in `doc'.
5287 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5290 Updated AC_INIT file to reflect directory reorganization.
5292 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
5293 Reorganized: sources in `src', documentation in `doc'.
5295 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5298 Don't declare calloc() and realloc() if not necessary.
5300 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5302 * configure.in, acconfig.h, acinclude.m4:
5303 Don't declare calloc() and realloc() if not necessary.
5305 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5307 * po/.cvsignore: Added i18n support.
5309 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5311 * acconfig.h, configure.in, Makefile.am:
5314 1999-03-22 Jesse Thilo <jthilo@gnu.org>
5316 * src/bison.s1: Fixed #line numbers.
5318 1999-03-15 Jesse Thilo <jthilo@gnu.org>
5320 * po/es.po, po/fr.po, po/nl.po, po/de.po:
5321 Added PO files from Translation Project.
5323 1999-03-03 Jesse Thilo <jthilo@gnu.org>
5326 Added support for non-ANSI compilers (ansi2knr).
5328 1999-02-16 Jesse Thilo <jthilo@gnu.org>
5330 * configure.in: Bumped version number to 1.27.
5333 Added `bison.simple' to list of files removed by `make distclean'.
5335 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5337 * src/files.c, src/files.h:
5338 Defined locations of parser files in config.h instead of Makefile.
5340 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5342 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
5343 Defined locations of parser files in config.h instead of Makefile.
5345 1999-02-09 Jesse Thilo <jthilo@gnu.org>
5348 Removed inappropriate use of $< macro.
5350 1999-02-05 Jesse Thilo <jthilo@gnu.org>
5352 * po/Makefile.in.in, po/POTFILES.in:
5353 Add `po' directory skeleton.
5355 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5357 * README: Document help-bison list.
5359 * configure.in: Add check for mkstemp().
5361 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5363 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5364 Hush a few compiler warnings.
5367 Add tryclose(), which verifies that fclose was successful.
5368 Hush a couple of compiler warnings.
5370 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5372 * Makefile.am, OChangeLog:
5373 ChangeLog is now automatically generated. Include the old version as
5376 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5378 * 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:
5381 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5383 * doc/bison.texinfo: Fix formatting glitch.
5385 * doc/bison.texinfo: Update FSF address.
5387 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5389 * acconfig.h: Update FSF address.
5391 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5394 Don't define PACKAGE here, since config.h defines it.
5396 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5398 * src/reader.c: Update copyright date.
5401 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5402 favor of output directly to stderr (avoids buffer overruns).
5404 * src/reader.c: Some checks for premature EOF.
5406 * 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:
5407 Use prototypes if the compiler understands them.
5409 * src/files.c: Honor TMPDIR on Unix hosts.
5410 Use prototypes if the compiler understands them.
5413 Fix a couple of buffer overrun bugs.
5414 Use prototypes if the compiler understands them.
5416 * src/system.h: Include unistd.h and ctype.h.
5417 Use #ifdef instead of #if for NLS symbols.
5419 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5421 * doc/bison.texinfo:
5422 Delete comment "consider using @set for edition number, etc..." since
5423 we now are doing so.
5425 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5428 Use prototypes if the compiler understands them.
5430 * NEWS: Document 1.26 highlights.
5432 * Makefile.am: Require Automake 1.3 or later.
5435 Use prototypes if the compiler understands them.
5437 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5440 Use VERSION symbol from automake for version number.
5442 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5444 * acconfig.h, configure.in, version.cin:
5445 Use VERSION symbol from automake for version number.
5447 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5450 Distribute original version of simple parser (bison.s1), not built
5451 version (bison.simple).
5453 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5455 * doc/bison.texinfo: Add info dir entry.
5457 * doc/bison.texinfo:
5458 Let automake put version number into documentation.
5460 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5462 * src/bison.cld, src/build.com, src/vmshlp.mar:
5463 Add non-RCS files from /gd/gnu/bison.
5465 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5468 Document the BISON_HAIRY and BISON_SIMPLE variables.
5470 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5472 * src/version.c: Build version.c automatically.
5475 Fix token numbering (used to start at 258, not 257).
5477 * src/system.h: Include config.h.
5479 * src/getargs.c: Update bug report address.
5481 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5482 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5484 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5487 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5489 * configure.in, version.cin:
5490 Build version.c automatically.
5492 * AUTHORS: Add AUTHORS file.
5494 * README: Update bug report address.
5497 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5499 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5502 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5504 * doc/bison.texinfo: Clean up some formatting.
5506 1998-05-05 Richard Stallman <rms@gnu.org>
5508 * doc/bison.texinfo:
5509 Explain better why to make a pure parser.
5511 1998-01-05 Richard Stallman <rms@gnu.org>
5513 * src/files.c (openfiles):
5514 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5515 find a temporary directory, if possible. Do not unlink files while
5518 1997-08-25 Richard Stallman <rms@gnu.org>
5520 * src/reader.c (stack_offset;):
5521 Change some warni to warns.
5523 * src/lex.c (literalchar): Use warns, not warni.
5525 1997-06-28 Richard Stallman <rms@gnu.org>
5527 * src/bison.s1: Add a Bison version comment.
5529 * src/main.c (fatal, warn, berror):
5532 1997-06-28 Richard Stallman <rms@gnu.org>
5534 * Makefile.in (bison_version): New variable.
5535 (dist): Use that variable.
5536 (bison.s1): Substitute the Bison version into bison.simple.
5538 * bison.simple: Add a Bison version comment.
5540 1997-06-18 Richard Stallman <rms@gnu.org>
5542 * src/main.c (fatal, warn, berror):
5543 Make error messages standard.
5544 (toomany): Improve error message text.
5546 * 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:
5547 new.h renamed to alloc.h.
5549 1997-06-18 Richard Stallman <rms@gnu.org>
5551 * Makefile.in: new.h renamed to alloc.h.
5553 1997-05-24 Richard Stallman <rms@gnu.org>
5555 * src/lex.c (literalchar):
5556 Fix the code for escaping \, " and '.
5558 (lex): Avoid trouble when there are many chars
5559 to discard in a char literal with just several chars in it.
5561 1997-05-17 Richard Stallman <rms@gnu.org>
5564 Use malloc, if using alloca is troublesome.
5565 (YYSTACK_USE_ALLOCA): New flag macro.
5566 Define it for some systems and compilers.
5567 (YYSTACK_ALLOC): New macro.
5568 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5569 If it was malloc'd, free it.
5571 1997-05-17 Richard Stallman <rms@gnu.org>
5574 Use malloc, if using alloca is troublesome.
5575 (YYSTACK_USE_ALLOCA): New flag macro.
5576 Define it for some systems and compilers.
5577 (YYSTACK_ALLOC): New macro.
5578 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5579 If it was malloc'd, free it.
5581 1997-04-23 Richard Stallman <rms@gnu.org>
5584 (alloca) [__hpux]: Always define as __builtin_alloca.
5586 1997-04-23 Richard Stallman <rms@gnu.org>
5589 (alloca) [__hpux]: Always define as __builtin_alloca.
5591 1997-04-22 Richard Stallman <rms@gnu.org>
5594 [__hpux]: Include alloca.h (right for HPUX 10)
5595 instead of declaring alloca (right for HPUX 9).
5597 * src/bison.s1 (__yy_memcpy):
5598 Declare arg `count' as unsigned int.
5599 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5601 1997-04-22 Richard Stallman <rms@gnu.org>
5604 [__hpux]: Include alloca.h (right for HPUX 10)
5605 instead of declaring alloca (right for HPUX 9).
5607 * bison.simple (__yy_memcpy):
5608 Declare arg `count' as unsigned int.
5609 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5611 1997-01-03 Richard Stallman <rms@gnu.org>
5613 * src/allocate.c: [__STDC__ or _MSC_VER]:
5614 Declare calloc and realloc to return void *.
5616 1997-01-02 Richard Stallman <rms@gnu.org>
5619 [_MSC_VER]: Include stdlib.h and process.h.
5620 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5622 * src/main.c (main): Return FAILURE as a value.
5623 (printable_version): Declare arg as int, not char.
5625 1997-01-02 Richard Stallman <rms@gnu.org>
5627 * Makefile.in (dist):
5628 Explicitly check for symlinks, and copy them.
5630 1996-12-19 Richard Stallman <rms@gnu.org>
5633 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5635 1996-12-18 Paul Eggert <eggert@gnu.org>
5637 * src/bison.s1 (yyparse):
5638 If __GNUC__ and YYPARSE_PARAM are both defined,
5639 declare yyparse to have a void * argument.
5641 1996-12-18 Paul Eggert <eggert@gnu.org>
5643 * bison.simple (yyparse):
5644 If __GNUC__ and YYPARSE_PARAM are both defined,
5645 declare yyparse to have a void * argument.
5647 1996-12-17 Richard Stallman <rms@gnu.org>
5649 * src/reduce.c (nbits): Add some casts.
5651 1996-08-12 Richard Stallman <rms@gnu.org>
5653 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5655 1996-08-12 Richard Stallman <rms@gnu.org>
5657 * bison.simple: Test _MSDOS as well as _MSDOS_.
5659 1996-07-31 Richard Stallman <rms@gnu.org>
5662 [__sun && __i386]: Include alloca.h.
5664 1996-07-31 Richard Stallman <rms@gnu.org>
5667 [__sun && __i386]: Include alloca.h.
5669 1996-07-30 Richard Stallman <rms@gnu.org>
5671 * src/bison.s1: Comment change.
5673 * src/bison.s1: Test _MSDOS_, not MSDOS.
5675 1996-07-30 Richard Stallman <rms@gnu.org>
5677 * bison.simple: Comment change.
5679 * bison.simple: Test _MSDOS_, not MSDOS.
5681 1996-06-01 Richard Stallman <rms@gnu.org>
5683 * 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:
5684 Insert `_' macro around many string constants.
5687 Insert `_' macro around many string constants.
5689 (main): Call setlocale, bindtextdomain and textdomain.
5691 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5692 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5693 [ENABLE_NLS]: Include libintl.h.
5694 [ENABLE_NLS] (gettext): Define.
5695 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5696 (N_, PACKAGE, LOCALEDIR): New macros.
5698 1996-06-01 Richard Stallman <rms@gnu.org>
5700 * POTFILES.in: New file.
5702 * Makefile.in (allocate.o):
5703 Define target explicitly.
5705 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5706 (LDFLAGS): Set to @LDFLAGS@.
5707 (configure): Run autoconf only if preceding `cd' succeeds.
5708 (bison.s1): Redirect output to temporary file then move the
5709 temporary to the target, rather than redirecting directly to bison.s1.
5710 (clean): Remove config.status and config.log.
5711 (distclean): Don't remove config.status here.
5713 1996-05-12 Richard Stallman <rms@gnu.org>
5716 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5718 1996-05-12 Richard Stallman <rms@gnu.org>
5721 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5723 1996-05-11 Richard Stallman <rms@gnu.org>
5725 * src/bison.s1 (__yy_memcpy):
5726 Really reorder the args, as was supposedly done on Feb 14 1995.
5727 (yyparse): Calls changed accordingly.
5729 1996-05-11 Richard Stallman <rms@gnu.org>
5731 * Makefile.in (dist): Don't use $(srcdir).
5733 * bison.simple (__yy_memcpy):
5734 Really reorder the args, as was supposedly done on Feb 14 1995.
5735 (yyparse): Calls changed accordingly.
5737 1996-01-27 Richard Stallman <rms@gnu.org>
5739 * src/output.c (output_rule_data):
5740 Test YYERROR_VERBOSE in the conditional
5741 around the definition of ttyname.
5743 1995-12-29 Richard Stallman <rms@gnu.org>
5746 Fix line numbers in #line commands.
5748 1995-12-29 Richard Stallman <rms@gnu.org>
5751 Fix line numbers in #line commands.
5753 1995-12-27 Richard Stallman <rms@gnu.org>
5755 * src/bison.s1 (YYPARSE_PARAM_DECL):
5756 In C++, make it always null.
5757 (YYPARSE_PARAM_ARG): New macro.
5758 (yyparse): Use YYPARSE_PARAM_ARG.
5760 1995-12-27 Richard Stallman <rms@gnu.org>
5762 * bison.simple (YYPARSE_PARAM_DECL):
5763 In C++, make it always null.
5764 (YYPARSE_PARAM_ARG): New macro.
5765 (yyparse): Use YYPARSE_PARAM_ARG.
5767 1995-11-29 Richard Stallman <rms@gnu.org>
5769 * doc/bison.texinfo:
5770 Describe literal string tokens, %raw, %no_lines, %token_table.
5772 1995-11-29 Daniel Hagerty <hag@gnu.org>
5774 * doc/bison.texinfo: Fixed update date
5776 1995-10-16 Richard Stallman <rms@gnu.org>
5778 * src/version.c: Version 1.25.
5780 1995-10-16 Richard Stallman <rms@gnu.org>
5782 * NEWS: *** empty log message ***
5784 1995-10-16 Richard Stallman <rms@gnu.org>
5786 * doc/bison.1, doc/bison.rnh:
5789 1995-10-15 Richard Stallman <rms@gnu.org>
5791 * src/vmsgetargs.c, src/getargs.c:
5792 Added -n, -k, and -raw switches.
5793 (noparserflag, toknumflag, rawtoknumflag): New variables.
5795 * src/symtab.h (SALIAS):
5796 New #define for adding aliases to %token.
5797 (struct bucket): Added `alias' field.
5799 * src/reduce.c (reduce_grammar):
5800 Revise error message.
5801 (print_notices): Remove final `.' from error message.
5803 * src/reader.c (reader_output_yylsp):
5805 (readgram): Use `#if 0' around code that accepted %command
5806 inside grammar rules: The documentation doesn't allow it,
5807 and it will fail since the %command processors scan for the next %.
5808 (parse_token_decl): Extended the %token
5809 declaration to allow a multi-character symbol as an alias.
5810 (parse_thong_decl): New function.
5811 (read_declarations): Added %thong declarations.
5812 (read_declarations): Handle NOOP to deal with allowing
5813 % declarations as another means to specify the flags.
5814 (readgram): Allow %prec prior to semantics embedded in a rule.
5815 (skip_to_char, read_declarations, copy_definition)
5816 (parse_token_decl, parse_start_decl, parse_type_decl)
5817 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5818 (get_type_name, copy_guard, copy_action, readgram)
5819 (get_type, packsymbols): Revised most error messages.
5820 Changed `fatal' to `warnxxx' to avoid aborting for error.
5821 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5822 (read_declarations): Improve the error message for
5823 an invalid character. Do not abort.
5824 (read_declarations, copy_guard, copy_action): Use
5825 printable_version to avoid unprintable characters in printed output.
5826 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5827 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5828 Allow the type of a non-terminal can be given
5829 more than once, as long as all specifications give the same type.
5832 (output_headers, output_trailers, output, output_gram)
5833 (output_rule_data): Implement noparserflag variable.
5834 Implement toknumflag variable.
5835 (output): Call reader_output_yylsp to output LTYPESTR.
5837 * src/main.c (main):
5838 If reader sees an error, don't process the grammar.
5839 (fatals): Updated to not use VARARGS1.
5840 (printable_version, int_to_string, warn, warni, warns, warnss)
5841 (warnsss): New error reporting functions. Avoid abort for error.
5844 Added THONG and NOOP for alias processing.
5845 Added SETOPT for the new code that allows setting options with %flags.
5848 Include getopt.h. Add some extern decls.
5849 (safegetc): New function to deal with EOF gracefully.
5850 (literalchar); new function to deal with reading \ escapes.
5851 (lex): Use literalchar.
5852 (lex): Implemented "..." tokens.
5853 (literalchar, lex, parse_percent_token): Made tokenbuffer
5854 always contain the token. This includes growing the token
5855 buffer while reading an integer.
5856 (parse_percent_token): Replaced if-else statement with percent_table.
5857 (parse_percent_token): Added % declarations as another
5858 way to specify the flags -n, -l, and -r. Also added hooks for
5859 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5860 major changes to files.c.
5861 (lex) Retain in the incoming stream a character following
5863 (skip_white_space, lex): Revised most error messages
5864 and changed fatal to warn to avoid aborting.
5865 (percent_table): Added %thong declarations.
5867 * src/gram.h: Comment changes.
5869 * src/files.c (openfiles, open_extra_files, done):
5871 and actfile file. Handle noparserflag. Both for -n switch.
5873 * src/conflicts.c (resolve_sr_conflict):
5874 Remove use of alloca.
5876 1995-06-01 Jim Meyering <meyering@gnu.org>
5878 * doc/bison.texinfo: *** empty log message ***
5880 1995-05-06 Richard Stallman <rms@gnu.org>
5882 * src/bison.s1: Comment change.
5884 1995-05-06 Richard Stallman <rms@gnu.org>
5886 * bison.simple: Comment change.
5888 1995-05-03 Richard Stallman <rms@gnu.org>
5890 * src/version.c: Version now 1.24.
5892 * src/bison.s1: Change distribution terms.
5894 * src/version.c: Version now 1.23.
5896 1995-05-03 Richard Stallman <rms@gnu.org>
5898 * doc/bison.texinfo:
5899 Rewrite "Conditions for Using Bison".
5900 Update version to 1.24.
5902 1995-05-03 Richard Stallman <rms@gnu.org>
5904 * bison.simple: Change distribution terms.
5906 1995-02-23 Richard Stallman <rms@gnu.org>
5908 * src/files.c: Test __VMS_POSIX as well as VMS.
5910 1995-02-14 Jim Meyering <meyering@gnu.org>
5912 * src/bison.s1 (__yy_memcpy):
5913 Renamed from __yy_bcopy to avoid
5914 confusion. Reverse FROM and TO arguments to be consistent with
5917 1995-02-14 Jim Meyering <meyering@gnu.org>
5919 * bison.simple (__yy_memcpy):
5920 Renamed from __yy_bcopy to avoid
5921 confusion. Reverse FROM and TO arguments to be consistent with
5924 1994-11-10 David J. MacKenzie <djm@gnu.org>
5930 * Makefile.in (DISTFILES): Include NEWS.
5932 * Makefile.in (DISTFILES):
5933 Include install-sh, not install.sh.
5935 * configure.in: Update to Autoconf v2 macro names.
5937 1994-10-05 David J. MacKenzie <djm@gnu.org>
5939 * Makefile.in: fix typo
5941 * Makefile.in (prefix, exec_prefix):
5942 Let configure set them.
5944 1994-09-28 David J. MacKenzie <djm@gnu.org>
5946 * Makefile.in: Set datadir to $(prefix)/share.
5948 1994-09-15 Richard Stallman <rms@gnu.org>
5951 Update copyright notice and GPL version.
5953 1994-09-15 Richard Stallman <rms@gnu.org>
5956 Update copyright notice and GPL version.
5958 1994-07-12 Richard Stallman <rms@gnu.org>
5960 * src/reduce.c, src/reader.c:
5963 1994-05-05 David J. MacKenzie <djm@gnu.org>
5965 * Makefile.in: entered into RCS
5967 1994-03-26 Richard Stallman <rms@gnu.org>
5969 * src/bison.s1: entered into RCS
5971 1994-03-26 Richard Stallman <rms@gnu.org>
5973 * bison.simple: entered into RCS
5975 1994-03-25 Richard Stallman <rms@gnu.org>
5977 * src/main.c: entered into RCS
5979 1994-03-24 Richard Stallman <rms@gnu.org>
5981 * src/conflicts.c: entered into RCS
5983 1994-01-02 Richard Stallman <rms@gnu.org>
5985 * Makefile.in: *** empty log message ***
5987 1993-11-21 Richard Stallman <rms@gnu.org>
5989 * src/bison.s1: *** empty log message ***
5991 1993-11-21 Richard Stallman <rms@gnu.org>
5993 * doc/bison.texinfo: entered into RCS
5995 * doc/bison.texinfo: *** empty log message ***
5997 1993-11-21 Richard Stallman <rms@gnu.org>
5999 * bison.simple: *** empty log message ***
6001 1993-10-25 David J. MacKenzie <djm@gnu.org>
6003 * doc/bison.texinfo: *** empty log message ***
6005 1993-10-19 Richard Stallman <rms@gnu.org>
6007 * src/bison.s1: *** empty log message ***
6009 1993-10-19 Richard Stallman <rms@gnu.org>
6011 * bison.simple: *** empty log message ***
6013 1993-10-14 Richard Stallman <rms@gnu.org>
6015 * src/bison.s1: *** empty log message ***
6017 1993-10-14 Richard Stallman <rms@gnu.org>
6019 * bison.simple: *** empty log message ***
6021 1993-09-14 David J. MacKenzie <djm@gnu.org>
6023 * doc/bison.texinfo: *** empty log message ***
6025 1993-09-13 Noah Friedman <friedman@gnu.org>
6027 * Makefile.in: *** empty log message ***
6029 1993-09-10 Richard Stallman <rms@gnu.org>
6031 * src/conflicts.c: *** empty log message ***
6033 * src/system.h: entered into RCS
6035 1993-09-10 Richard Stallman <rms@gnu.org>
6037 * doc/bison.1: entered into RCS
6039 1993-09-06 Noah Friedman <friedman@gnu.org>
6041 * src/version.c: entered into RCS
6043 1993-09-06 Noah Friedman <friedman@gnu.org>
6045 * Makefile.in: *** empty log message ***
6047 1993-07-30 David J. MacKenzie <djm@gnu.org>
6049 * Makefile.in: *** empty log message ***
6051 1993-07-24 Richard Stallman <rms@gnu.org>
6053 * src/bison.s1: *** empty log message ***
6055 1993-07-24 Richard Stallman <rms@gnu.org>
6057 * bison.simple: *** empty log message ***
6059 1993-07-08 David J. MacKenzie <djm@gnu.org>
6061 * Makefile.in: *** empty log message ***
6063 1993-07-04 Richard Stallman <rms@gnu.org>
6065 * src/bison.s1: *** empty log message ***
6067 1993-07-04 Richard Stallman <rms@gnu.org>
6069 * bison.simple: *** empty log message ***
6071 1993-06-26 David J. MacKenzie <djm@gnu.org>
6073 * src/getargs.c: entered into RCS
6075 1993-06-26 David J. MacKenzie <djm@gnu.org>
6077 * doc/bison.texinfo: *** empty log message ***
6079 * doc/bison.1: New file.
6081 1993-06-25 Richard Stallman <rms@gnu.org>
6083 * src/getargs.c: New file.
6085 1993-06-16 Richard Stallman <rms@gnu.org>
6087 * src/bison.s1: *** empty log message ***
6089 1993-06-16 Richard Stallman <rms@gnu.org>
6091 * bison.simple: *** empty log message ***
6093 1993-06-03 Richard Stallman <rms@gnu.org>
6095 * src/bison.s1: New file.
6097 1993-06-03 Richard Stallman <rms@gnu.org>
6099 * doc/bison.texinfo: *** empty log message ***
6101 1993-06-03 Richard Stallman <rms@gnu.org>
6103 * bison.simple: New file.
6105 1993-05-19 Richard Stallman <rms@gnu.org>
6107 * doc/bison.texinfo: New file.
6109 1993-05-07 Noah Friedman <friedman@gnu.org>
6111 * Makefile.in: *** empty log message ***
6113 1993-04-28 Noah Friedman <friedman@gnu.org>
6115 * src/reader.c: *** empty log message ***
6117 1993-04-23 Noah Friedman <friedman@gnu.org>
6119 * src/alloc.h: entered into RCS
6121 1993-04-20 David J. MacKenzie <djm@gnu.org>
6123 * src/version.c: *** empty log message ***
6125 * src/files.c, src/allocate.c:
6128 * src/reader.c: *** empty log message ***
6130 * src/lex.c: entered into RCS
6132 * src/conflicts.c: New file.
6134 * src/symtab.c: entered into RCS
6136 * src/alloc.h: New file.
6138 * src/LR0.c: entered into RCS
6140 1993-04-18 Noah Friedman <friedman@gnu.org>
6142 * src/reader.c: New file.
6144 * src/version.c: *** empty log message ***
6146 1993-04-18 Noah Friedman <friedman@gnu.org>
6148 * Makefile.in: *** empty log message ***
6150 1993-04-17 Noah Friedman <friedman@gnu.org>
6152 * Makefile.in: *** empty log message ***
6154 1993-04-15 Richard Stallman <rms@gnu.org>
6156 * src/main.c, src/files.c:
6159 1993-04-15 Noah Friedman <friedman@gnu.org>
6161 * configure.in: entered into RCS
6163 * configure.in: *** empty log message ***
6165 * configure.in: New file.
6167 1993-04-14 Richard Stallman <rms@gnu.org>
6169 * Makefile.in: New file.
6171 1993-04-13 Richard Stallman <rms@gnu.org>
6173 * src/version.c: New file.
6175 1993-03-25 Richard Stallman <rms@gnu.org>
6177 * src/output.c: entered into RCS
6179 1992-09-25 Richard Stallman <rms@gnu.org>
6181 * configure.bat: entered into RCS
6183 1992-06-22 Richard Stallman <rms@gnu.org>
6185 * src/vmsgetargs.c: entered into RCS
6187 1992-06-22 Richard Stallman <rms@gnu.org>
6189 * doc/bison.rnh: entered into RCS
6191 1992-04-20 David J. MacKenzie <djm@gnu.org>
6193 * README: entered into RCS
6195 1992-01-22 Richard Stallman <rms@gnu.org>
6197 * src/machine.h: entered into RCS
6199 1991-12-21 Richard Stallman <rms@gnu.org>
6201 * src/lalr.c, src/closure.c:
6204 1991-12-20 Richard Stallman <rms@gnu.org>
6206 * src/state.h: entered into RCS
6208 1991-12-18 Richard Stallman <rms@gnu.org>
6210 * src/print.c, src/nullable.c, src/derives.c:
6213 1991-11-03 David J. MacKenzie <djm@gnu.org>
6215 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
6218 1988-09-09 Richard Stallman <rms@gnu.org>
6220 * src/bison.hairy: entered into RCS
6222 1987-12-16 Richard Stallman <rms@gnu.org>
6224 * REFERENCES: entered into RCS
6227 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6229 This file is part of GNU Autoconf.
6231 GNU Autoconf is free software; you can redistribute it and/or modify
6232 it under the terms of the GNU General Public License as published by
6233 the Free Software Foundation; either version 2, or (at your option)
6236 GNU Autoconf is distributed in the hope that it will be useful,
6237 but WITHOUT ANY WARRANTY; without even the implied warranty of
6238 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6239 GNU General Public License for more details.
6241 You should have received a copy of the GNU General Public License
6242 along with autoconf; see the file COPYING. If not, write to
6243 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6244 Boston, MA 02111-1307, USA.