1 2002-05-05 Akim Demaille <akim@epita.fr>
3 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4 (GENERATE_MUSCLE_INSERT_TABLE): this.
5 (output_int_table, output_unsigned_int_table, output_short_table)
6 (output_token_number_table, output_item_number_table): Replace with...
7 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8 (muscle_insert_short_table, muscle_insert_token_number_table)
9 (muscle_insert_item_number_table): these.
11 (prepare_tokens): Don't free `translations', since...
12 * src/reader.h, src/reader.c (grammar_free): do it.
14 * src/gram.h, src/gram.c (grammar_free): here.
15 * data/bison.simple, data/bison.c++: b4_token_number_max is now
19 2002-05-05 Akim Demaille <akim@epita.fr>
21 * src/output.c (output_unsigned_int_table): New.
22 (prepare_rules): `i' is unsigned.
23 `prhs', `rline', `r2' are unsigned int.
24 Rename muscle `rhs_number_max' as `rhs_max'.
25 Output muscles `prhs_max', `rline_max', and `r2_max'.
27 * data/bison.simple, data/bison.c++: Adjust to use these muscles
28 to compute types instead of constant types.
29 * tests/regression.at (Web2c Actions): Adjust.
32 2002-05-04 Akim Demaille <akim@epita.fr>
34 * src/symtab.h (SALIAS, SUNDEF): Rename as...
35 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
37 * src/output.c (token_definitions_output): Be sure not to output a
38 `#define 'a'' when fed with `%token 'a' "a"'.
39 * tests/regression.at (Token definitions): New.
41 2002-05-03 Paul Eggert <eggert@twinsun.com>
43 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
46 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
48 * Makefile.am (SUBDIRS): Remove intl.
49 (EXTRA_DIST): Add config/config.rpath.
51 2002-05-03 Akim Demaille <akim@epita.fr>
53 * data/bison.simple (m4_if): Don't output empty enums.
54 And actually, output valid enum definitions :(.
56 2002-05-03 Akim Demaille <akim@epita.fr>
58 * configure.bat: Remove, completely obsolete.
59 * Makefile.am (EXTRA_DIST): Adjust.
60 Don't distribute config.rpath...
61 * config/Makefile.am (EXTRA_DIST): Do it.
63 2002-05-03 Akim Demaille <akim@epita.fr>
65 * configure.in (GETTEXT_VERSION): New.
66 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
68 2002-05-03 Akim Demaille <akim@epita.fr>
70 * data/bison.simple (b4_token_enum): New.
71 (b4_token_defines): Use it to output tokens both as #define and
73 Suggested by Paul Eggert.
74 * src/output.c (token_definitions_output): Don't output spurious
77 2002-05-03 Akim Demaille <akim@epita.fr>
79 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
81 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
83 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
84 Update the stack class, give a try to deque as the default container.
86 2002-05-02 Akim Demaille <akim@epita.fr>
88 * data/bison.simple (yyparse): Do not implement @$ = @1.
89 (YYLLOC_DEFAULT): Adjust to do it.
90 * doc/bison.texinfo (Location Default Action): Fix.
92 2002-05-02 Akim Demaille <akim@epita.fr>
94 * src/reader.c (parse_braces): Merge into...
97 2002-05-02 Akim Demaille <akim@epita.fr>
99 * configure.in (ALL_LINGUAS): Remove.
100 * po/LINGUAS, hr.po: New.
102 2002-05-02 Akim Demaille <akim@epita.fr>
104 Remove the so called hairy (semantic) parsers.
106 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
107 * src/gram.h, src/gram.c (semantic_parser): Remove.
108 (rule_t): Remove the guard and guard_line members.
109 * src/lex.h (token_t): remove tok_guard.
110 * src/options.c (option_table): Remove %guard and %semantic_parser
112 * src/output.c, src/output.h (guards_output): Remove.
114 (token_definitions_output): Don't output the `T'
116 (output_skeleton): Don't output the guards.
117 * src/files.c, src/files.c (attrsfile): Remove.
118 * src/reader.c (symbol_list): Remove the guard and guard_line
121 (parse_guard): Remove.
122 * data/bison.hairy: Remove.
123 * doc/bison.texinfo (Environment Variables): Remove occurrences of
126 2002-05-02 Akim Demaille <akim@epita.fr>
128 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
129 (parse_guard): Rename the formal argument `stack_offset' as
130 `rule_length', which is more readable.
132 (copy_at, copy_dollar): Instead of outputting the hard coded
133 values of $$, $n and so forth, output invocation to b4_lhs_value,
134 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
135 Note: this patch partially drops `semantic-parser' support: it
136 always does `rule_length - n', where semantic parsers ought to
138 * data/bison.simple, data/bison.c++ (b4_lhs_value)
139 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
141 2002-05-02 Akim Demaille <akim@epita.fr>
143 * configure.in (AC_INIT): Bump to 1.49b.
144 (AM_INIT_AUTOMAKE): Short invocation.
146 2002-05-02 Akim Demaille <akim@epita.fr>
150 2002-05-01 Akim Demaille <akim@epita.fr>
152 * src/skeleton.h: Remove.
154 2002-05-01 Akim Demaille <akim@epita.fr>
156 * src/skeleton.h: Fix the #endif.
157 Reported by Magnus Fromreide.
159 2002-04-26 Paul Eggert <eggert@twinsun.com>
161 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
162 Define if we define YYSTYPE and YYLTYPE, respectively.
163 (YYCOPY): Fix [] quoting problem in the non-GCC case.
165 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
167 * src/scan-skel.l: Postprocess quadrigraphs.
169 * src/reader.c (copy_character): New function, used to output
170 single characters while replacing `[' and `]' with quadrigraphs, to
171 avoid troubles with M4 quotes.
172 (copy_comment): Output characters with copy_character.
173 (read_additionnal_code): Likewise.
174 (copy_string2): Likewise.
175 (copy_definition): Likewise.
177 * tests/calc.at: Exercise M4 quoting.
179 2002-04-25 Akim Demaille <akim@epita.fr>
181 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
182 between `!' and the command.
183 Reported by Paul Eggert.
185 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
187 * tests/calc.at: Exercise prologue splitting.
189 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
190 `b4_post_prologue' instead of `b4_prologue'.
192 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
194 (output): Free pre_prologue_obstack and post_prologue_obstack.
195 * src/files.h, src/files.c (attrs_obstack): Remove.
196 (pre_prologue_obstack, post_prologue_obstack): New.
197 * src/reader.c (copy_definition): Add a parameter to specify the
198 obstack to fill, instead of using attrs_obstack unconditionally.
199 (read_declarations): Pass pre_prologue_obstack to copy_definition if
200 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
202 2002-04-23 Paul Eggert <eggert@twinsun.com>
204 * data/bison.simple: Remove unnecessary commentary and white
205 space differences from 1_29-branch.
206 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
208 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
209 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
210 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
211 constructors or destructors.
213 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
215 2002-04-23 Akim Demaille <akim@epita.fr>
217 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
218 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
219 location with columns.
220 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
221 All reported by Paul Eggert.
223 2002-04-22 Akim Demaille <akim@epita.fr>
225 * src/reduce.c (dump_grammar): Move to...
226 * src/gram.h, src/gram.c (grammar_dump): here.
227 Be sure to separate long item numbers.
228 Don't read the members of a rule's prec if its nil.
230 2002-04-22 Akim Demaille <akim@epita.fr>
232 * src/output.c (table_size, table_grow): New.
233 (MAXTABLE): Remove, replace uses with table_size.
234 (pack_vector): Instead of dying when the table is too big, grow it.
236 2002-04-22 Akim Demaille <akim@epita.fr>
238 * data/bison.simple (yyr1): Its type is that of a token number.
239 * data/bison.c++ (r1_): Likewise.
240 * tests/regression.at (Web2c Actions): Adjust.
242 2002-04-22 Akim Demaille <akim@epita.fr>
244 * src/reader.c (token_translations_init): 256 is now the default
245 value for the error token, i.e., it will be assigned another
246 number if the user assigned 256 to one of her tokens.
247 (reader): Don't force 256 to error.
248 * doc/bison.texinfo (Symbols): Adjust.
249 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
250 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
251 etc. instead of 10, 20, 30 (which was used to `jump' over error
252 (256) and undefined (2)).
254 2002-04-22 Akim Demaille <akim@epita.fr>
256 Propagate more token_number_t.
258 * src/gram.h (token_number_as_item_number)
259 (item_number_as_token_number): New.
260 * src/output.c (GENERATE_OUTPUT_TABLE): New.
261 Use it to create output_item_number_table and
262 output_token_number_table.
263 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
264 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
265 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
266 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
268 2002-04-22 Akim Demaille <akim@epita.fr>
270 * src/output.h, src/output.c (get_lines_number): Remove.
272 2002-04-19 Akim Demaille <akim@epita.fr>
274 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
276 (Debugging): More details about enabling the debugging features.
277 (Table of Symbols): Describe $$, $n, @$, and @n.
278 Suggested by Tim Josling.
280 2002-04-19 Akim Demaille <akim@epita.fr>
282 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
284 2002-04-10 Akim Demaille <akim@epita.fr>
286 * src/system.h: Rely on HAVE_LIMITS_H.
287 Suggested by Paul Eggert.
289 2002-04-09 Akim Demaille <akim@epita.fr>
291 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
292 full stderr, and strip it according to the bison options, instead
293 of composing the error message from different bits.
294 This makes it easier to check for several error messages.
295 Adjust all the invocations.
296 Add an invocation exercising the error token.
297 Add an invocation demonstrating a stupid error message.
298 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
300 Error message are for stderr, not stdout.
302 2002-04-09 Akim Demaille <akim@epita.fr>
304 * src/gram.h, src/gram.c (error_token_number): Remove, use
306 * src/reader.c (reader): Don't specify the user token number (2)
307 for $undefined, as it uselessly prevents using it.
308 * src/gram.h (token_number_t): Move to...
309 * src/symtab.h: here.
310 (state_t.number): Is a token_number_t.
311 * src/print.c, src/reader.c: Use undeftoken->number instead of
313 (Even though this 2 is not the same as above: the number of the
314 undeftoken remains being 2, it is its user token number which
316 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
317 `user_token_number_max'.
318 Output `undef_token_number'.
319 * data/bison.simple, data/bison.c++: Use them.
320 Be sure to map invalid yylex return values to
321 `undef_token_number'. This saves us from gratuitous SEGV.
323 * tests/conflicts.at (Solved SR Conflicts)
324 (Unresolved SR Conflicts): Adjust.
325 * tests/regression.at (Web2c Actions): Adjust.
327 2002-04-08 Akim Demaille <akim@epita.fr>
329 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
331 Remove the duplicate `typedefs'.
332 (RhsNumberType): Fix the declaration and various other typos.
334 * data/bison.simple: Use __ofile__.
335 * src/scan-skel.l: Handle __ofile__.
337 2002-04-08 Akim Demaille <akim@epita.fr>
339 * src/gram.h (item_number_t): New, the type of item numbers in
340 RITEM. Note that it must be able to code symbol numbers as
341 positive number, and the negation of rule numbers as negative
343 Adjust all dependencies (pretty many).
344 * src/reduce.c (rule): Remove this `short *' pointer: use
346 * src/system.h (MINSHORT, MAXSHORT): Remove.
348 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
350 (MAXTABLE): Move to...
351 * src/output.c (MAXTABLE): here.
352 (prepare_rules): Use output_int_table to output rhs.
353 * data/bison.simple, data/bison.c++: Adjust.
354 * tests/torture.at (Big triangle): Move the limit from 254 to
356 * tests/regression.at (Web2c Actions): Ajust.
358 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
359 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
360 passes, but produces negative #line number, once fixed, GCC is
361 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
363 * src/state.h (state_h): Code input lines on ints, not shorts.
365 2002-04-08 Akim Demaille <akim@epita.fr>
367 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
368 and then the grammar.
370 2002-04-08 Akim Demaille <akim@epita.fr>
372 * src/system.h: No longer using strndup.
374 2002-04-07 Akim Demaille <akim@epita.fr>
376 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
377 * src/output.c (output_table_data): Return the longest number.
378 (prepare_tokens): Output `token_number_max').
379 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
381 Use them to define yy_token_number_type/TokenNumberType.
382 Use this type for yytranslate.
383 * tests/torture.at (Big triangle): Push the limit from 124 to
385 * tests/regression.at (Web2c Actions): Adjust.
387 2002-04-07 Akim Demaille <akim@epita.fr>
389 * tests/torture.at (Big triangle): New.
390 (GNU AWK Grammar, GNU Cim Grammar): Move to...
391 * tests/existing.at: here.
393 2002-04-07 Akim Demaille <akim@epita.fr>
395 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
399 2002-04-07 Akim Demaille <akim@epita.fr>
401 * src/reader.c: Normalize increments to prefix form.
403 2002-04-07 Akim Demaille <akim@epita.fr>
405 * src/reader.c, symtab.c: Remove debugging code.
407 2002-04-07 Akim Demaille <akim@epita.fr>
409 Rename all the `bucket's as `symbol_t'.
411 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
412 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
413 * src/symtab.c, src/symtab.h (bucket): Rename as...
415 (symbol_list_new, bucket_check_defined, bucket_make_alias)
416 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
417 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
418 (buckets_new, buckets_free, buckets_do): Rename as...
419 (symbol_list_new, symbol_check_defined, symbol_make_alias)
420 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
421 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
422 (symbols_new, symbols_free, symbols_do): these.
424 2002-04-07 Akim Demaille <akim@epita.fr>
426 Use lib/hash for the symbol table.
428 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
430 * src/lex.c (lex): Set the `number' member of new terminals.
431 * src/reader.c (bucket_check_defined, bucket_make_alias)
432 (bucket_check_alias_consistence, bucket_translation): New.
433 (reader, grammar_free, readgram, token_translations_init)
434 (packsymbols): Adjust.
435 (reader): Number the predefined tokens.
436 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
437 for predefined tokens.
438 * src/symtab.h (bucket): Remove all the hash table related
440 * src/symtab.c (symtab): Replace by...
441 (bucket_table): this.
442 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
443 (buckets_new, buckets_do): New.
445 2002-04-07 Akim Demaille <akim@epita.fr>
447 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
448 (start_symbol, max_user_token_number, semantic_parser)
449 (error_token_number): Initialize.
450 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
453 (errtoken, eoftoken, undeftoken, axiom): Extern.
455 2002-04-07 Akim Demaille <akim@epita.fr>
457 * src/gram.h (rule_s): prec and precsym are now pointers
458 to the bucket giving the priority/associativity.
459 Member `associativity' removed: useless.
460 * src/reduce.c, src/conflicts.c: Adjust.
462 2002-04-07 Akim Demaille <akim@epita.fr>
464 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
465 Properly escape the symbols' TAG when outputting them.
467 2002-04-07 Akim Demaille <akim@epita.fr>
469 * src/lalr.h (LA): Is a bitsetv, not bitset*.
471 2002-04-07 Akim Demaille <akim@epita.fr>
473 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
474 (LArule): this, which is an array to rule_t*.
475 * src/print.c, src/conflicts.c: Adjust.
477 2002-04-07 Akim Demaille <akim@epita.fr>
479 * src/gram.h (rule_t): Rename `number' as `user_number'.
480 `number' is a new member.
482 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
484 2002-04-07 Akim Demaille <akim@epita.fr>
486 As a result of the previous patch, it is no longer needed
487 to reorder ritem itself.
489 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
491 2002-04-07 Akim Demaille <akim@epita.fr>
493 Be sure never to walk through RITEMS, but use only data related to
494 the rules themselves. RITEMS should be banished.
496 * src/output.c (output_token_translations): Rename as...
497 (prepare_tokens): this.
498 In addition to `translate', prepare the muscles `tname' and
499 `toknum', which were handled by...
500 (output_rule_data): this.
501 Remove, and move the remainder of its outputs into...
502 (prepare_rules): this new routines, which also merges content from
504 (prepare_rules): Be sure never to walk through RITEMS.
505 (output_stos): Rename as...
506 (prepare_stos): this.
507 (output): Always invoke prepare_states, after all, just don't use it
508 in the output if you don't need it.
510 2002-04-07 Akim Demaille <akim@epita.fr>
512 * src/LR0.c (new_state): Display `nstates' as the name of the
514 Adjust to initialize first_state and last_state if needed.
515 Be sure to distinguish the initial from the final state.
516 (new_states): Create the itemset of the initial state, and use
518 * src/closure.c (closure): Now that the initial state has its
519 items properly set, there is no need for a special case when
522 As a result, now the rule 0, reducing to $axiom, is visible in the
523 outputs. Adjust the test suite.
525 * tests/conflicts.at (Solved SR Conflicts)
526 (Unresolved SR Conflicts): Adjust.
527 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
528 * tests/conflicts.at (S/R in initial): New.
530 2002-04-07 Akim Demaille <akim@epita.fr>
532 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
533 the RHS of the rules.
534 * src/output.c (output_gram): Likewise.
536 2002-04-07 Akim Demaille <akim@epita.fr>
538 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
540 Adjust all dependencies.
541 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
542 `number' of the buckets too.
543 * src/gram.h: Include `symtab.h'.
544 (associativity): Move to...
545 * src/symtab.h: here.
546 No longer include `gram.h'.
548 2002-04-07 Akim Demaille <akim@epita.fr>
550 * src/gram.h, src/gram.c (rules_rhs_length): New.
551 (ritem_longest_rhs): Use it.
552 * src/gram.h (rule_t): `number' is a new member.
553 * src/reader.c (packgram): Set it.
554 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
555 the end of `rules', and count them out of `nrules'.
556 (reduce_output, dump_grammar): Adjust.
557 * src/print.c (print_grammar): It is no longer needed to check for
558 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
559 * tests/reduce.at (Reduced Automaton): New test.
561 2002-04-07 Akim Demaille <akim@epita.fr>
563 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
564 lacking `+ 1' to nrules, Bison reported as useless a token if it
565 was used solely to set the precedence of the last rule...
567 2002-04-07 Akim Demaille <akim@epita.fr>
569 * data/bison.c++, data/bison.simple: Don't output the current file
570 name in #line, to avoid useless diffs between two identical
571 outputs under different names.
573 2002-04-07 Akim Demaille <akim@epita.fr>
575 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
576 Normalize loops to using `< nrules + 1', not `<= nrules'.
578 2002-04-07 Akim Demaille <akim@epita.fr>
582 2002-04-07 Akim Demaille <akim@epita.fr>
584 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
585 bucket.value as bucket.number.
587 2002-04-07 Akim Demaille <akim@epita.fr>
589 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
590 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
591 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
592 RHS, instead of being an index in RITEMS.
594 2002-04-04 Paul Eggert <eggert@twinsun.com>
596 * doc/bison.texinfo: Update copyright date.
597 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
598 (Symbols): Warn about running Bison in one character set,
599 but compiling and/or running in an incompatible one.
600 Warn about character code 256, too.
602 2002-04-03 Paul Eggert <eggert@twinsun.com>
604 * src/bison.data (YYSTACK_ALLOC): Depend on whether
605 YYERROR_VERBOSE is nonzero, not whether it is defined.
607 Merge changes from bison-1_29-branch.
609 2002-03-20 Paul Eggert <eggert@twinsun.com>
611 Merge fixes from Debian bison_1.34-1.diff.
613 * configure.in (AC_PREREQ): 2.53.
615 2002-03-20 Akim Demaille <akim@epita.fr>
617 * src/conflicts.c (log_resolution): Argument `resolution' is const.
619 2002-03-19 Paul Eggert <eggert@twinsun.com>
621 * src/bison.simple (YYCOPY): New macro.
622 (YYSTACK_RELOCATE): Use it.
623 Remove Type arg; no longer needed. All callers changed.
624 (yymemcpy): Remove; no longer needed.
626 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
627 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
629 2002-03-19 Akim Demaille <akim@epita.fr>
631 Test and fix the #line outputs.
633 * tests/atlocal.at (GCC): New.
634 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
635 (Prologue synch line, ,%union synch line, Postprologue synch line)
636 (Action synch line, Epilogue synch line): New tests.
637 * src/reader.c (parse_union_decl): Define the muscle stype_line.
638 * data/bison.simple, data/bison.c++: Use it.
640 2002-03-19 Akim Demaille <akim@epita.fr>
642 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
643 (Solved SR Conflicts, %expect not enough, %expect right)
644 (%expect too much): Move to...
645 * tests/conflicts.at: this new file.
647 2002-03-19 Akim Demaille <akim@epita.fr>
649 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
650 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
651 that we can move to enums for instance.
652 * src/output.c (token_definitions_output): Output a list of
653 `token-name, token-number' instead of the #define.
654 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
656 2002-03-14 Akim Demaille <akim@epita.fr>
660 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
662 * data/bison.c++: Make the user able to add members to the generated
663 parser by subclassing.
665 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
667 * src/reader.c (read_additionnal_code): `c' should be an integer, not
669 Reported by Nicolas Tisserand and Nicolas Burrus.
671 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
673 * src/reader.c: Warn about lacking semi-colons, do not complain.
675 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
677 * data/bison.c++: Remove a debug line.
679 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
681 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
682 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
683 provide a default implementation.
685 2002-03-04 Akim Demaille <akim@epita.fr>
687 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
688 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
689 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
690 * tests/semantic.at (Parsing Guards): Similarly.
691 * src/reader.at (readgram): Complain if the last rule is not ended
694 2002-03-04 Akim Demaille <akim@epita.fr>
696 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
697 * src/closure.c: here.
698 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
700 * src/warshall.h, src/warshall.c: Remove.
701 * tests/sets.at (Broken Closure): Adjust.
703 2002-03-04 Akim Demaille <akim@epita.fr>
705 * src/output.c (output_skeleton): tempdir is const.
706 bytes_read is unused.
708 2002-03-04 Akim Demaille <akim@epita.fr>
710 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
711 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
715 2002-03-04 Akim Demaille <akim@epita.fr>
717 * src/closure.c (closure): `r' is unused.
719 2002-03-04 Akim Demaille <akim@epita.fr>
721 * tests/sets.at (Broken Closure): Add the ending `;'.
722 * src/reader.at (readgram): Complain if a rule is not ended with a
725 2002-03-04 Akim Demaille <akim@epita.fr>
727 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
728 (count_sr_conflicts): Use bitset_count.
729 * src/reduce.c (inaccessable_symbols): Ditto.
731 * src/warshall.h, src/warshall.c: Convert to bitsetv.
733 2002-03-04 Akim Demaille <akim@epita.fr>
735 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
736 * src/reduce.c: Remove the `bitset_zero's following the
737 `bitset_create's, as now it is performed by the latter.
739 2002-03-04 Akim Demaille <akim@epita.fr>
741 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
742 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
743 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
744 latest sources from Michael.
746 2002-03-04 Akim Demaille <akim@epita.fr>
748 * src/output.c (output): Don't free the grammar.
749 * src/reader.c (grammar_free): New.
750 * src/main.c (main): Call it and don't free symtab here.
752 2002-03-04 Akim Demaille <akim@epita.fr>
754 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
756 Reported by Benoit Perrot.
758 2002-03-04 Akim Demaille <akim@epita.fr>
760 Use bitset operations when possible, not loops over bits.
762 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
764 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
765 * src/reduce.c (useless_nonterminals): Formatting changes.
766 * src/warshall.c (TC): Use bitset_or.
768 2002-03-04 Akim Demaille <akim@epita.fr>
770 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
771 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
774 2002-03-04 Akim Demaille <akim@epita.fr>
776 * src/lalr.c (F): Now a bitset*.
777 Adjust all dependencies.
779 2002-03-04 Akim Demaille <akim@epita.fr>
781 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
782 Adjust all dependencies.
784 2002-03-04 Akim Demaille <akim@epita.fr>
786 * src/L0.c, src/LR0.h (nstates): Be size_t.
787 Adjust comparisons (signed vs unsigned).
788 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
790 Adjust all dependencies.
792 2002-03-04 Akim Demaille <akim@epita.fr>
794 * src/closure.c (firsts): Now, also a bitset.
795 Adjust all dependencies.
796 (varsetsize): Remove, now unused.
797 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
799 2002-03-04 Akim Demaille <akim@epita.fr>
801 * src/print.c: Convert to use bitset.h, not hand coded iterations
804 2002-03-04 Akim Demaille <akim@epita.fr>
806 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
808 2002-03-04 Akim Demaille <akim@epita.fr>
810 * src/closure.c (ruleset): Be a bitset.
811 (rulesetsize): Remove.
813 2002-03-04 Akim Demaille <akim@epita.fr>
815 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
816 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
817 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
818 * src/closure.c (fderives): Be an array of bitsets.
820 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
822 * data/bison.c++: Merge the two generated headers. Insert a copyright
823 notice in each output file.
825 2002-02-28 Akim Demaille <akim@epita.fr>
827 * data/bison.c++: Copy the prologue of bison.simple to fetch
828 useful M4 definitions, such as b4_header_guard.
830 2002-02-25 Akim Demaille <akim@epita.fr>
832 * src/getargs.c (version): Give the name of the authors, and use a
833 translator friendly scheme for the bgr
836 2002-02-25 Akim Demaille <akim@epita.fr>
838 * src/output.c (header_output): Remove, now handled completely via
841 2002-02-25 Akim Demaille <akim@epita.fr>
843 * m4/m4.m4: New, from CVS Autoconf.
844 * configure.in: Invoke it.
845 * src/output.c (output_skeleton): Use its result instead of the
848 2002-02-25 Akim Demaille <akim@epita.fr>
850 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
852 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
853 * src/output.c (output_skeleton): Use mkstemp to create a real
855 Move the filling of `skeleton' and its muscle to...
857 (output): Move the definition of the prologue muscle to...
859 * src/system.h (DEFAULT_TMPDIR): New.
861 2002-02-14 Paul Eggert <eggert@twinsun.com>
863 Remove the support for C++ namespace cleanliness; it was
864 causing more problems than it was curing, since it didn't work
865 properly on some nonstandard C++ compilers. This can wait
866 for a proper C++ parser.
868 * NEWS: Document this.
869 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
870 of C++, as it's treated like C now.
871 * src/bison.simple (YYSTD): Remove.
872 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
873 Treat C++ just like Standard C instead of trying to support
874 namespace cleanliness.
876 2002-02-14 Akim Demaille <akim@epita.fr>
878 * tests/regression.at (else): Adjust to Andreas' change.
880 2002-02-14 Akim Demaille <akim@epita.fr>
882 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
884 2002-02-13 Andreas Schwab <schwab@suse.de>
886 * src/output.c (output_rule_data): Don't output NULL, it might
889 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
891 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
892 (Copyright notice): Update.
894 2002-02-11 Akim Demaille <akim@epita.fr>
896 * tests/regression.at (%nonassoc and eof): Don't include
899 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
901 * data/bison.c++: Correct error recovery. Make the user able to
902 initialize the starting location.
904 2002-02-07 Akim Demaille <akim@epita.fr>
906 * tests/input.at: New.
908 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
910 * data/bison.c++: Replace some direct m4 expansions by constants. Be
911 more consistent when naming methods and variables. Put preprocessor
912 directives around tables only needed for debugging.
914 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
916 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
918 (yy::b4_name::parse): Use print_.
920 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
922 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
924 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
926 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
928 (yy::b4_name::parse): Build verbose error messages, and use error_.
930 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
932 * data/bison.c++: Fix m4 quoting in comments.
934 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
936 * data/bison.c++: Adjust the parser code. Fix some muscles that were
939 2002-02-05 Akim Demaille <akim@epita.fr>
941 * data/bison.c++: Adjust to the M4 back end.
942 More is certainly needed.
944 2002-02-05 Akim Demaille <akim@epita.fr>
946 Give a try to M4 as a back end.
948 * lib/readpipe.c: New, from wdiff.
949 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
951 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
952 specific values. Now it is m4 that performs the lookup.
953 * src/parse-skel.y: Remove.
954 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
955 * src/output.c (actions_output, guards_output)
956 (token_definitions_output): No longer keeps track of the output
957 line number, hence remove the second argument.
958 (guards_output): Check against the guard member of a rule, not the
961 (output_skeleton): Don't look for the skeleton location, let m4 do
963 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
965 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
966 (prepare): Given that for the time being changesyntax is not
967 usable in M4, rename the muscles using `-' to `_'.
968 Define `defines_flag', `output_parser_name' and `output_header_name'.
969 * src/output.h (actions_output, guards_output)
970 (token_definitions_output): Adjust prototypes.
971 * src/scan-skel.l: Instead of scanning the skeletons, it now
972 processes the output of m4: `__oline__' and `#output'.
973 * data/bison.simple: Adjust to be used by M4(sugar).
974 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
976 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
977 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
978 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
979 shamelessly stolen from CVS Autoconf.
981 2002-02-05 Akim Demaille <akim@epita.fr>
983 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
984 * configure.in: Check for the declarations of free and malloc.
985 * src/muscle_tab.c: Adjust.
987 2002-02-05 Akim Demaille <akim@epita.fr>
989 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
990 which have no values.
992 2002-02-05 Akim Demaille <akim@epita.fr>
994 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
997 2002-01-29 Paul Eggert <eggert@twinsun.com>
999 * src/bison.simple (YYSIZE_T): Do not define merely because
1000 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1001 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1003 2002-01-27 Akim Demaille <akim@epita.fr>
1005 Fix `%nonassoc and eof'.
1007 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1008 which were not properly copied! Replace
1009 memcpy (res->errs, src->errs, src->nerrs);
1011 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1013 * tests/regression.at (%nonassoc and eof): Adjust to newest
1014 Autotest: `.' is not in the PATH.
1016 2002-01-27 Akim Demaille <akim@epita.fr>
1018 * tests/sets.at (AT_EXTRACT_SETS): New.
1022 2002-01-26 Akim Demaille <akim@epita.fr>
1024 * tests/actions.at, tests/calc.at, tests/headers.at,
1025 * tests/torture.at: Adjust to the newest Autotest which no longer
1026 forces `.' in the PATH.
1028 2002-01-25 Akim Demaille <akim@epita.fr>
1030 * tests/regression.at (%nonassoc and eof): New.
1031 Suggested by Robert Anisko.
1033 2002-01-24 Akim Demaille <akim@epita.fr>
1035 Bison dumps core when trying to complain about broken input files.
1036 Reported by Cris van Pelt.
1038 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1039 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1041 (Invalid inputs): Strengthen: exercise parse_percent_token.
1043 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
1045 * src/Makefile.am: Add bison.c++.
1046 * src/bison.c++: New skeleton.
1048 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
1052 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1054 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1056 2002-01-20 Marc Autret <marc@gnu.org>
1058 * src/files.c (compute_output_file_names): Fix
1060 2002-01-20 Marc Autret <marc@gnu.org>
1062 * tests/output.at: New test.
1063 * src/files.c (compute_base_names): Don't map extensions when
1064 the YACC flag is set, use defaults.
1065 Reported by Evgeny Stambulchik.
1067 2002-01-20 Marc Autret <marc@gnu.org>
1069 * src/system.h: Need to define __attribute__ away for non-GCC
1070 compilers as well (i.e. the vendor C compiler).
1071 Suggested by Albert Chin-A-Young.
1073 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1075 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1076 canonical definition.
1077 * src/system.h: Use the canonical definition for PARAMS (avoids
1078 a conflict with the macro from lib/hash.h).
1080 2002-01-11 Akim Demaille <akim@epita.fr>
1082 * configure.in: Use AC_FUNC_STRNLEN.
1083 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1085 2002-01-09 Akim Demaille <akim@epita.fr>
1087 * src/files.c, src/files.h (output_infix): New.
1088 (tab_extension): Remove.
1089 (compute_base_names): Compute the former, drop the latter.
1090 * src/output.c (prepare): Insert the muscles `output-infix', and
1092 * src/parse-skel.y (string, string.1): New.
1093 (section.header): Use it.
1094 (section.yacc): Remove.
1095 (prefix): Remove too.
1096 * src/scan-skel.l: Adjust.
1097 * src/bison.simple, src/bison.hairy: Adjust.
1099 2002-01-09 Akim Demaille <akim@epita.fr>
1101 * configure.in (WERROR_CFLAGS): Compute it.
1102 * src/Makefile.am (CFLAGS): Pass it.
1103 * tests/atlocal.in (CFLAGS): Idem.
1104 * src/files.c: Fix a few warnings.
1105 (get_extension_index): Remove, unused.
1107 2002-01-08 Akim Demaille <akim@epita.fr>
1109 * src/getargs.c (AS_FILE_NAME): New.
1110 (getargs): Use it to convert DOSish file names.
1111 * src/files.c (base_name): Rename as full_base_name to avoid
1112 clashes with `base_name ()'.
1113 (filename_split): New.
1114 (compute_base_names): N-th rewrite, using filename_split.
1116 2002-01-08 Akim Demaille <akim@epita.fr>
1118 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1119 New, stolen from the Fileutils 4.1.
1120 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1121 * configure.in: Check for the presence of memrchr, and of its
1124 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1126 * lib/hash.h (__P): Added definition for this macro.
1127 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1128 BUILT_SOURCES, to ensure they are generated first.
1129 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1130 %error-verbose to allow bootstrapping with bison 1.30x.
1132 2002-01-06 Akim Demaille <akim@epita.fr>
1134 * src/reader.c (parse_braces): Don't fetch the next char, the
1135 convention is to fetch on entry.
1136 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1137 'switch' without a following semicolon.
1138 * tests/regression.at (braces parsing): New.
1140 2002-01-06 Akim Demaille <akim@epita.fr>
1142 Bison is dead wrong in its RR conflict reports.
1144 * tests/torture.at (GNU Cim Grammar): New.
1145 * src/conflicts.c (count_rr_conflicts): Fix.
1147 2002-01-06 Akim Demaille <akim@epita.fr>
1149 Creating package.m4 from configure.ac causes too many problems.
1151 * tests/Makefile.am (package.m4): Create it by hand,
1152 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1154 2002-01-06 Akim Demaille <akim@epita.fr>
1156 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1159 2002-01-04 Paul Eggert <eggert@twinsun.com>
1161 * doc/bison.texinfo (Debugging):
1162 Remove YYSTDERR; it's no longer defined or used.
1163 Also, s/cstdio.h/cstdio/.
1165 2002-01-03 Akim Demaille <akim@epita.fr>
1167 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1169 2002-01-03 Akim Demaille <akim@epita.fr>
1171 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1172 tracing code to --trace, wait for a better --trace option, with
1175 2002-01-03 Akim Demaille <akim@epita.fr>
1177 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1178 The ISO C++ standard is extremely clear about it: stderr is
1179 considered a macro, not a regular symbol (see table 94 `Header
1180 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1181 Therefore std:: does not apply to it. It still does with fprintf.
1182 Also, s/cstdio.h/cstdio/.
1184 2002-01-03 Akim Demaille <akim@epita.fr>
1186 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1187 for non system headers.
1189 2002-01-02 Akim Demaille <akim@epita.fr>
1191 Equip the skeleton chain with location tracking, runtime trace,
1192 pure parser and scanner.
1194 * src/parse-skel.y: Request a pure parser, locations, and prefix
1196 (%union): Having several members with the same type does not help
1197 type mismatches, simplify.
1198 (YYPRINT, yyprint): New.
1199 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1202 * src/scan-skel.l: Adjust to these changes.
1203 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1204 (LOCATION_PRINT, skel_control_t): New.
1206 2001-12-30 Akim Demaille <akim@epita.fr>
1208 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1209 replace `gb' with BLANKS.
1210 * src/scan-skel.l: Adjust.
1212 2001-12-30 Akim Demaille <akim@epita.fr>
1214 * src/system.h: We don't need nor want bcopy.
1215 Throw away MS-DOS crap: we don't need getpid.
1216 * configure.in: We don't need strndup. It was even causing
1217 problems: because Flex includes the headers *before* us,
1218 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1220 * lib/xstrndup.c: New.
1221 * src/scan-skel.l: Use it.
1222 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1223 * src/parse-skel.y: Use %directives instead of #defines.
1225 2001-12-30 Akim Demaille <akim@epita.fr>
1227 * src/skeleton.h: New.
1228 * src/output.c (output_parser, output_master_parser): Remove, dead
1230 * src/output.h (get_lines_number, actions_output, guards_output)
1231 (token_definitions_output): Prototype them.
1232 * src/parse-skel.y: Add the license notice.
1233 Include output.h and skeleton.h.
1234 (process_skeleton): Returns void, and takes a single parameter.
1235 * src/scan-skel.l: Add the license notice.
1237 Don't use %option yylineno: it seems that then Flex imagines
1238 REJECT has been used, and therefore it won't reallocate its
1239 buffers (which makes no other sense to me than a bug). It results
1240 in warnings for `unused: yy_flex_realloc'.
1242 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
1244 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1245 (MUSCLE_INSERT_PREFIX): ...to there.
1246 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1247 (MUSCLE_INSERT_PREFIX): Move from here...
1249 * src/bison.hairy: Add a section directive. Put braces around muscle
1250 names. This parser skeleton is still broken, but Bison should not
1251 choke on a bad muscle 'syntax'.
1252 * src/bison.simple: Add a section directive. Put braces around muscle
1255 * src/files.h (strsuffix, stringappend): Add declarations.
1256 (tab_extension): Add declaration.
1257 (short_base_name): Add declaration.
1259 * src/files.c (strsuffix, stringappend): No longer static. These
1260 functions are used in the skeleton parser.
1261 (tab_extension): New.
1262 (compute_base_names): Use the computations done in this function
1263 to guess if the generated parsers should have '.tab' in their
1265 (short_base_name): No longer static.
1267 * src/output.c (output_skeleton): New.
1268 (output): Disable call to output_master_parser, and give a try to
1269 a new skeleton handling system.
1270 (guards_output, actions_output): No longer static.
1271 (token_definitions_output, get_lines_number): No longer static.
1273 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1275 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1278 * src/parse-skel.y: New file.
1279 * src/scan-skel.l: New file.
1281 2001-12-29 Akim Demaille <akim@epita.fr>
1283 %name-prefix is broken.
1285 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1286 Adjust all dependencies.
1287 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1290 Renaming yylval but not yylloc is not consistent. Now we do.
1292 * src/bison.simple: Prefix yylloc if used.
1293 * doc/bison.texinfo (Decl Summary): Document that.
1295 2001-12-29 Akim Demaille <akim@epita.fr>
1297 * doc/bison.texinfo: Promote `%long-directive' over
1299 Remove all references to fixed-output-files, yacc is enough.
1301 2001-12-29 Akim Demaille <akim@epita.fr>
1303 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1304 user prologue. These are defaults.
1305 * tests/actions.at (Mid-rule actions): Make sure the user can
1306 define YYDEBUG and YYERROR_VERBOSE.
1308 2001-12-29 Akim Demaille <akim@epita.fr>
1310 * src/output.c (header_output): Don't forget to export YYLTYPE and
1312 * tests/headers.at (export YYLTYPE): New, make sure it does.
1313 * tests/regression.at (%union and --defines, Invalid CPP headers):
1315 * tests/headers.at: here.
1317 2001-12-29 Akim Demaille <akim@epita.fr>
1319 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1321 2001-12-29 Akim Demaille <akim@epita.fr>
1323 * tests/actions.at (Mid-rule actions): Output on a single line
1326 2001-12-29 Akim Demaille <akim@epita.fr>
1328 * doc/bison.texinfo: Formatting changes.
1330 2001-12-29 Akim Demaille <akim@epita.fr>
1332 Don't store the token defs in a muscle, just be ready to output it
1333 on command. Now possible via `symbols'. Fixes a memory leak.
1335 * src/output.c (token_definitions_output): New.
1336 (output_parser, header_output): Use it.
1337 * src/reader.c (symbols_save): Remove.
1339 2001-12-29 Akim Demaille <akim@epita.fr>
1341 * src/bison.simple: Do not provide a default for YYSTYPE and
1342 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1345 2001-12-29 Akim Demaille <akim@epita.fr>
1347 Mid-rule actions are simply... ignored!
1349 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1350 the empty-rule associated to the dummy symbol, not to the host
1352 * tests/actions.at (Mid-rule actions): New.
1354 2001-12-29 Akim Demaille <akim@epita.fr>
1358 * src/reader.c (reader): Free grammar.
1360 2001-12-29 Akim Demaille <akim@epita.fr>
1364 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1365 since it allocates it for each state, although only one is needed.
1366 (allocate_storage): Do it here.
1368 2001-12-29 Akim Demaille <akim@epita.fr>
1370 * src/options.h, src/options.c (create_long_option_table): Rename
1372 (long_option_table_new): this, with a clearer prototype.
1373 (percent_table): Remove, unused,
1374 * src/getargs.c (getargs): Adjust.
1376 2001-12-29 Akim Demaille <akim@epita.fr>
1378 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1379 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1382 2001-12-29 Akim Demaille <akim@epita.fr>
1384 * src/lalr.c (build_relations): Rename `states' as `states1'.
1385 Sorry, I don't understand exactly what it is, no better name...
1387 2001-12-29 Akim Demaille <akim@epita.fr>
1389 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1390 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1391 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1394 2001-12-29 Akim Demaille <akim@epita.fr>
1396 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1399 2001-12-29 Akim Demaille <akim@epita.fr>
1401 * src/reader.c, src/reader.h (user_toknums): Remove.
1402 Adjust all users to use symbols[i]->user_token_number.
1404 2001-12-29 Akim Demaille <akim@epita.fr>
1406 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1407 Adjust all users to use symbols[i]->prec or ->assoc.
1409 2001-12-29 Akim Demaille <akim@epita.fr>
1411 * src/reader.c, src/reader.h (tags): Remove.
1412 Adjust all users to use symbols[i]->tag.
1414 2001-12-29 Akim Demaille <akim@epita.fr>
1416 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1418 * src/reader.c (packsymbols): Fill this table.
1420 * src/conflicts.c (resolve_sr_conflict): Adjust.
1421 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1423 Use symbols[i]->tag instead of tags[i].
1425 2001-12-29 Akim Demaille <akim@epita.fr>
1427 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1428 In addition, put a comment in there, to replace...
1429 * tests/regression.at (%union and C comments): Remove.
1431 2001-12-29 Akim Demaille <akim@epita.fr>
1433 * tests/regression.at (Web2c Actions): Blindly move the actual
1434 output as expected output. The contents *seem* right to me, but I
1435 can't pretend reading perfectly parser tables... Nonetheless, all
1436 the other tests pass correctly, the table look OK, even though the
1437 presence of `$axiom' is to be noted: AFAICS it is useless (but
1440 2001-12-29 Akim Demaille <akim@epita.fr>
1442 * src/reader.c (readgram): Don't add the rule 0 if there were no
1443 rules read. In other words, add it _after_ having performed
1444 grammar sanity checks.
1445 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1447 2001-12-29 Akim Demaille <akim@epita.fr>
1449 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1450 visible, and some states have now a different number.
1452 2001-12-29 Akim Demaille <akim@epita.fr>
1454 * src/reader.c (readgram): Bind the initial rule's lineno to that
1456 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1457 (Solved SR Conflicts): Adjust rule 0's line number.
1459 2001-12-29 Akim Demaille <akim@epita.fr>
1461 Fix the `GAWK Grammar' failure.
1463 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1464 the reductions of the first state which was mistakenly confused
1465 with the final state because precisely final_state was initialized
1467 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1468 now noticed by Bison.
1469 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1470 have a reduction on $default.
1472 2001-12-29 Akim Demaille <akim@epita.fr>
1474 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1476 * src/closure.c (print_closure): Likewise.
1477 * src/derives.c (print_derives): Likewise.
1478 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1481 2001-12-29 Akim Demaille <akim@epita.fr>
1483 * src/lalr.c (lookaheads_print): New.
1484 (lalr): Call it when --trace-flag.
1485 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1488 2001-12-29 Akim Demaille <akim@epita.fr>
1490 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1491 when walking through ritem, even via rule->rhs.
1492 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1493 (useful_production, useless_nonterminals): Likewise.
1494 (reduce_grammar_tables): Likewise, plus update nritems.
1495 * src/nullable.c (set_nullable): Likewise.
1496 * src/lalr.c (build_relations): Likewise.
1497 * tests/sets.at (Nullable): Adjust.
1498 Fortunately, now, the $axiom is no longer nullable.
1500 2001-12-29 Akim Demaille <akim@epita.fr>
1502 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1504 * src/gram.c (ritem_longest_rhs): Likewise.
1505 * src/reduce.c (nonterminals_reduce): Likewise.
1506 * src/print_graph.c (print_graph): Likewise.
1507 * src/output.c (output_rule_data): Likewise.
1508 * src/nullable.c (set_nullable): Likewise.
1510 2001-12-29 Akim Demaille <akim@epita.fr>
1512 * src/output.c: Comment changes.
1514 2001-12-27 Paul Eggert <eggert@twinsun.com>
1516 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1517 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1518 Sparc, as they were causing more porting problems than the
1519 (minor) performance improvement was worth.
1521 Also, catch up with 1.31's YYSTD.
1523 2001-12-27 Akim Demaille <akim@epita.fr>
1525 * src/output.c (output_gram): Rely on nritems, not the
1526 0-sentinel. See below.
1527 Use -1 as separator, not 0.
1528 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1529 Rely on -1 as separator in yyrhs, instead of 0.
1530 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1531 twice `Now at end of input', therefore there are two lines less to
1534 2001-12-27 Akim Demaille <akim@epita.fr>
1536 * tests/regression.at (Unresolved SR Conflicts):
1537 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1540 2001-12-27 Akim Demaille <akim@epita.fr>
1542 * src/LR0.c (new_state): Recognize the final state by the fact it
1543 is reached by eoftoken.
1544 (insert_start_shifting_state, insert_eof_shifting_state)
1545 (insert_accepting_state, augment_automaton): Remove, since now
1546 these states are automatically computed from the initial state.
1547 (generate_states): Adjust.
1548 * src/print.c: When reporting a rule number to the user, substract
1549 1, so that the axiom rule is rule 0, and the first user rule is 1.
1550 * src/reduce.c: Likewise.
1551 * src/print_graph.c (print_core): For the time being, just as for
1552 the report, depend upon --trace-flags to dump the full set of
1554 * src/reader.c (readgram): Once the grammar read, insert the rule
1555 0: `$axiom: START-SYMBOL $'.
1556 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1557 number of the states has changed (the final state is no longer
1558 necessarily the last), catch up.
1560 2001-12-27 Akim Demaille <akim@epita.fr>
1562 Try to make the use of the eoftoken valid. Given that its value
1563 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1564 is used instead of > 0 where appropriate, (ii), depend upon nritems
1565 instead of the 0-sentinel.
1567 * src/gram.h, src/gram.c (nritems): New.
1568 Expected to be duplication of nitems, but for the time being...
1569 * src/reader.c (packgram): Assert nritems and nitems are equal.
1570 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1571 * src/closure.c (print_closure, print_fderives): Likewise.
1572 * src/gram.c (ritem_print): Likewise.
1573 * src/print.c (print_core, print_grammar): Likewise.
1574 * src/print_graph.c: Likewise.
1576 2001-12-27 Akim Demaille <akim@epita.fr>
1578 * src/main.c (main): If there are complains after grammar
1579 reductions, then output the report anyway if requested, then die.
1580 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1581 * src/reader.c (eoftoken): New.
1582 (parse_token_decl): If the token being defined has value `0', it
1584 (packsymbols): No longer hack `tags' to insert `$' by hand.
1585 Be sure to preserve the value of the eoftoken.
1586 (reader): Make sure eoftoken is defined.
1587 Initialize nsyms to 0: now eoftoken is created just like the others.
1588 * src/print.c (print_grammar): Don't special case the eof token.
1589 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1590 lie anyway, albeit pleasant.
1591 * tests/calc.at: Exercise error messages with eoftoken.
1592 Change the grammar so that empty input is invalid.
1593 Adjust expectations.
1594 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1596 2001-12-27 Akim Demaille <akim@epita.fr>
1598 * configure.in: Check the protos of strchr ans strspn.
1599 Replace strchr if needed.
1600 * src/system.h: Provide the protos of strchr, strspn and memchr if
1602 * lib/strchr.c: New.
1603 * src/reader.c (symbols_save): Use strchr.
1605 2001-12-27 Akim Demaille <akim@epita.fr>
1607 * src/print.c, src/print_graph.c (escape): New.
1608 Use it to quote the TAGS outputs.
1609 * src/print_graph.c (print_state): Now errors are in red, and
1610 reductions in green.
1611 Prefer high to wide: output the state number on a line of its own.
1613 2001-12-27 Akim Demaille <akim@epita.fr>
1615 * src/state.h, src/state.c (reductions_new): New.
1616 * src/LR0.c (set_state_table): Let all the states have a
1617 `reductions', even if reduced to 0.
1618 (save_reductions): Adjust.
1619 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1620 * src/print.c (print_reductions, print_actions): Adjust.
1621 * src/output.c (action_row): Adjust.
1623 2001-12-27 Akim Demaille <akim@epita.fr>
1625 * src/state.h, src/state.c (errs_new, errs_dup): New.
1626 * src/LR0.c (set_state_table): Let all the states have an errs,
1627 even if reduced to 0.
1628 * src/print.c (print_errs, print_reductions): Adjust.
1629 * src/output.c (output_actions, action_row): Adjust.
1630 * src/conflicts.c (resolve_sr_conflict): Adjust.
1632 2001-12-27 Akim Demaille <akim@epita.fr>
1634 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1636 2001-12-27 Akim Demaille <akim@epita.fr>
1638 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1639 * src/print.c: here.
1640 (lookaheadset, shiftset): New, used as additional storage by
1642 (print_results): Adjust.
1643 (print_shifts, print_gotos, print_errs): New, extracted from...
1644 (print_actions): here.
1645 * src/print_graph.c (print_actions): Remove dead code.
1647 2001-12-27 Akim Demaille <akim@epita.fr>
1649 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1652 2001-12-27 Akim Demaille <akim@epita.fr>
1654 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1655 (build_relations): Adjust.
1657 2001-12-27 Akim Demaille <akim@epita.fr>
1659 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1662 2001-12-27 Akim Demaille <akim@epita.fr>
1664 * src/reader.c (packgram): Catch nitems overflows.
1666 2001-12-27 Akim Demaille <akim@epita.fr>
1668 * src/files.c, src/files.h (guard_obstack): Remove.
1669 * src/output.c (output): Adjust.
1670 * src/reader.c (parse_braces): New, factoring...
1671 (copy_action, copy_guard): these two which are renamed as...
1672 (parse_action, parse_guard): these.
1673 As a voluntary consequence, using braces around guards is now
1676 2001-12-27 Akim Demaille <akim@epita.fr>
1678 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1679 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1681 (symbol_list_new): Adjust.
1682 (copy_action): action_line is the first line, not the last.
1683 (copy_guard): Just as for actions, store the `action' only, not
1684 the switch/case/break flesh.
1685 Don't parse the user action that might follow the guard, let...
1686 (readgram): do it, i.e., now, there can be an action after a
1688 In other words the guard is just explicitly optional.
1690 * src/output.c (guards_output): New.
1691 (output_parser): Call it when needed.
1692 (output): Also free the guard and attrs obstacks.
1693 * src/files.c, src/files.h (obstack_save): Remove.
1694 (output_files): Remove.
1695 As a result, if one needs the former `.act' file, using an
1696 appropriate skeleton which requires actions and guards is now
1698 * src/main.c (main): Adjust.
1699 * tests/semantic.at: New.
1700 * tests/regression.at: Use `input.y' as input file name.
1701 Avoid 8+3 problems by requiring input.c when the test needs the
1704 2001-12-27 Akim Demaille <akim@epita.fr>
1706 * src/reader.c (symbol_list_new): Be sure to initialize all the
1709 2001-12-27 Akim Demaille <akim@epita.fr>
1711 All the hacks using a final pseudo state are now useless.
1713 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1714 * src/lalr.c (nLA): New.
1715 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1716 instead of lookaheadsp from the pseudo state (nstate + 1).
1718 2001-12-27 Akim Demaille <akim@epita.fr>
1720 * src/output.c (action_row, token_actions): Use a state_t instead
1721 of a integer, and nlookaheads instead of the following state's
1724 2001-12-27 Akim Demaille <akim@epita.fr>
1726 * src/conflicts.c (log_resolution, flush_shift)
1727 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1728 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1729 (conflicts_print, print_reductions): Use a state_t instead of an
1730 integer when referring to a state.
1731 As much as possible, depend upon nlookaheads, instead of the
1732 `lookaheadsp' member of the following state (since lookaheads of
1733 successive states are successive, the difference between state n + 1
1734 and n served as the number of lookaheads for state n).
1735 * src/lalr.c (add_lookback_edge): Likewise.
1736 * src/print.c (print_core, print_actions, print_state)
1737 (print_results): Likewise.
1738 * src/print_graph.c (print_core, print_actions, print_state)
1739 (print_graph): Likewise.
1740 * src/conflicts.h: Adjust.
1742 2001-12-27 Akim Demaille <akim@epita.fr>
1744 * src/bison.hairy: Formatting/comment changes.
1746 Remove `register' indications.
1747 Add plenty of `static'.
1749 2001-12-27 Akim Demaille <akim@epita.fr>
1751 * src/output.c (prepare): Drop the muscle `ntbase' which
1753 * src/bison.simple: Formatting/comment changes.
1754 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1755 is an undocumented synonym.
1757 2001-12-22 Akim Demaille <akim@epita.fr>
1759 * src/output.c (output_table_data): Change the prototype to use
1760 `int' for array ranges: some invocations do pass an int, not a
1762 Reported by Wayne Green.
1764 2001-12-22 Akim Demaille <akim@epita.fr>
1766 Some actions of web2c.y are improperly triggered.
1767 Reported by Mike Castle.
1769 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1770 * tests/regression.at (Web2c): Rename as...
1771 (Web2c Report): this.
1772 (Web2c Actions): New.
1774 2001-12-22 Akim Demaille <akim@epita.fr>
1776 Reductions in web2c.y are improperly reported.
1777 Reported by Mike Castle.
1779 * src/conflicts.c (print_reductions): Fix.
1780 * tests/regression.at (Web2c): New.
1782 2001-12-18 Akim Demaille <akim@epita.fr>
1784 Some host fail on `assert (!"foo")', which expands to
1785 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1786 Reported by Nelson Beebee.
1788 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1789 `#define it_succeeded 0' and `assert (it_succeeded)'.
1791 2001-12-17 Marc Autret <autret_m@epita.fr>
1793 * src/bison.simple: Don't hard code the skeleton line and filename.
1794 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1795 New line counter 'skeleton_line' (skeleton-line muscle).
1797 2001-12-17 Paul Eggert <eggert@twinsun.com>
1799 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1800 YYDEBUG must be defined to a nonzero value.
1802 * src/bison.simple (yytname): Do not assume that the user defines
1803 YYDEBUG to a properly parenthesized expression.
1805 2001-12-17 Akim Demaille <akim@epita.fr>
1807 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1808 nlookaheads is a new member.
1810 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1811 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1814 2001-12-17 Akim Demaille <akim@epita.fr>
1816 * src/files.h, src/files.c (open_files, close_files): Remove.
1817 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1819 * src/reader.c (reader): Do it.
1821 2001-12-17 Akim Demaille <akim@epita.fr>
1823 * src/conflicts.c (print_reductions): Formatting changes.
1825 2001-12-17 Akim Demaille <akim@epita.fr>
1827 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1828 (flush_reduce): New.
1829 (resolve_sr_conflict): Adjust.
1831 2001-12-17 Akim Demaille <akim@epita.fr>
1833 * src/output.c (output_obstack): Be static and rename as...
1834 (format_obstack): this, to avoid any confusion with files.c's
1836 * src/reader.h (muscle_obstack): Move to...
1837 * src/output.h: here, since it's defined in output.c.
1839 2001-12-17 Akim Demaille <akim@epita.fr>
1841 * src/output.c (action_row, save_column, default_goto)
1842 (sort_actions, matching_state, pack_vector): Better variable
1845 2001-12-17 Akim Demaille <akim@epita.fr>
1847 * src/output.c: Various formatting changes.
1849 2001-12-17 Akim Demaille <akim@epita.fr>
1851 * src/files.c (output_files): Free the output_obstack.
1852 * src/main.c (main): Call print and print_graph conditionally.
1853 * src/print.c (print): Work unconditionally.
1854 * src/print_graph.c (print_graph): Work unconditionally.
1855 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1857 2001-12-16 Marc Autret <autret_m@epita.fr>
1859 * src/output.c (actions_output): Fix. When we use %no-lines,
1860 there is one less line per action.
1862 2001-12-16 Marc Autret <autret_m@epita.fr>
1864 * src/bison.simple: Remove a useless #line directive.
1865 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1866 * src/output.c (get_lines_number): New.
1867 (output_parser): Adjust, now takes care about the lines of a
1870 (actions_output): Computes the number of lines taken by actions.
1871 (output_master_parser): Insert new skeleton which is the name of
1872 the output parser file name.
1874 2001-12-15 Marc Autret <autret_m@epita.fr>
1876 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1878 2001-12-15 Marc Autret <autret_m@epita.fr>
1880 * src/output.c (output_gram): Keep track of the hairy one.
1882 2001-12-15 Akim Demaille <akim@epita.fr>
1884 Make `make distcheck' work.
1886 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1887 system.h which uses libgettext.h.
1889 2001-12-15 Akim Demaille <akim@epita.fr>
1891 * src/nullable.c (set_nullable): Useless rules must be skipped,
1892 otherwise, since we range over their symbols, we might look at a
1893 nonterminal which no longer ``exists'', i.e., it is not counted in
1894 `nvars', hence we overflow our arrays.
1896 2001-12-15 Akim Demaille <akim@epita.fr>
1898 The header can also be produced directly, without any obstack!
1901 * src/files.c, src/files.h (defines_obstack): Remove.
1902 (compute_header_macro): Global.
1903 (defines_obstack_save): Remove.
1904 * src/reader.c (parse_union_decl): No longer output to
1905 defines_obstack: its content can be found in the `stype' muscle
1907 (output_token_translations): Merge into...
1908 (symbols_output): this.
1910 (symbols_save): this.
1912 * src/output.c (header_output): New.
1915 2001-12-15 Akim Demaille <akim@epita.fr>
1917 * src/reader.c (parse_union_decl): Instead of handling two obstack
1918 simultaneously, use one to define the `stype' muscle, and use the
1919 value of the latter to fill defines_obstack.
1920 (copy_comment): Remove.
1921 (copy_comment2): Work for a single obstack.
1923 (copy_comment): this.
1925 2001-12-15 Akim Demaille <akim@epita.fr>
1927 * src/lex.c, src/lex.h (xgetc): No longer static.
1928 * src/reader.c (parse_union_decl): Revamp.
1930 2001-12-15 Akim Demaille <akim@epita.fr>
1932 Still making progress in separating Bison into (i) input, (ii)
1933 process, (iii) output: now we can directly output the parser file
1934 without using table_obstack at all.
1936 * src/files.c, src/files.h (table_obstack): Bye bye.
1937 (parser_file_name): New.
1938 * src/files.c (compute_output_file_names): Compute it.
1939 * src/output.c (actions_output, output_parser)
1940 (output_master_parser): To a file instead of an obstack.
1942 2001-12-15 Akim Demaille <akim@epita.fr>
1944 Attach actions to rules, instead of pre-outputting them to
1947 * src/gram.h (rule_t): action and action_line are new members.
1948 * src/reader.c (symbol_list): Likewise.
1949 (copy_action): Save the actions within the rule.
1950 (packgram): Save them in rule_table.
1951 * src/output.c (actions_output): New.
1952 (output_parser): Use it on `%%actions'.
1953 (output_rule_data): Don't free rule_table.
1955 (prepare): Don't save the `action' muscle.
1956 * src/bison.simple: s/%%action/%%actions/.
1958 2001-12-15 Akim Demaille <akim@epita.fr>
1960 * src/reader.c (copy_action): When --yacc, don't append a `;'
1961 to the user action: let it fail if lacking.
1962 Suggested by Arnold Robbins and Tom Tromey.
1964 2001-12-14 Akim Demaille <akim@epita.fr>
1966 * src/lex.c (literalchar): Simply return the char you decoded, non
1967 longer mess around with obstacks and int pointers.
1970 2001-12-14 Akim Demaille <akim@epita.fr>
1972 * src/lex.c (literalchar): Don't escape the special characters,
1973 just decode them, and keep them as char (before, eol was output as
1974 the 2 char string `\n' etc.).
1975 * src/output.c (output_rule_data): Use quotearg to output the
1978 2001-12-13 Paul Eggert <eggert@twinsun.com>
1980 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1981 Do not infringe on the global user namespace when using C++.
1982 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1983 All uses of `fprintf' and `stderr' changed.
1985 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1987 2001-12-13 Akim Demaille <akim@epita.fr>
1989 The computation of nullable is broken: it doesn't handle empty
1992 * tests/torture.at (GNU AWK Grammar): New.
1993 * tests/sets.at (Nullable): New.
1994 * src/nullable.c (set_nullable): Instead of blindly looping over
1995 `ritems', loop over the rules, and then over their rhs's.
1997 Work around Autotest bugs.
1999 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2000 frame, because Autotest understand lines starting with a `+' as
2001 traces from the shell. Then, they are not processed properly.
2002 Admittedly an Autotest bug, but we don't have time to wait for
2003 Autotest to catch up.
2004 * tests/regression.at (Broken Closure): Adjust to the new table
2007 * tests/sets.at: here.
2009 2001-12-13 Akim Demaille <akim@epita.fr>
2011 * src/closure.c (closure): Use nrules instead of playing tricks
2014 2001-12-13 Akim Demaille <akim@epita.fr>
2016 * src/print.c (print_actions): Output the handling of `$' as the
2017 traces do: shifting the token EOF. Before EOF was treated as a
2019 * tests/regression.at: Adjust some tests.
2020 * src/print_graph.c (print_core): Complete the set of items via
2021 closure. The next-to-final and final states are still unsatisfying,
2022 but that's to be addressed elsewhere.
2023 No longer output the rule numbers, but do output the state number.
2024 A single loop for the shifts + gotos is enough, but picked a
2025 distinct color for each.
2026 (print_graph): Initialize and finalize closure.
2028 2001-12-13 Akim Demaille <akim@epita.fr>
2030 * src/reader.c (readgram): Remove dead code, an strip useless
2032 (get_type): Remove, unused.
2034 2001-12-12 Akim Demaille <akim@epita.fr>
2036 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2037 on that of lib/error.c.
2039 2001-12-12 Akim Demaille <akim@epita.fr>
2041 Some hosts don't like `/' in includes.
2043 * src/system.h: Include libgettext.h without qualifying the path.
2044 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2047 2001-12-11 Marc Autret <autret_m@epita.fr>
2049 * src/output.c (output_parser): Remove useless muscle.
2051 2001-12-11 Marc Autret <autret_m@epita.fr>
2053 * src/bison.simple: Remove #line just before %%epilogue. It
2054 is now handled in ...
2055 * src/reader.c (read_additionnal_code): Add the output of a
2056 #line for the epilogue.
2058 2001-12-10 Marc Autret <autret_m@epita.fr>
2060 * src/reader.c (copy_definition): Re-use CPP-outed code which
2061 replace precedent remove.
2062 * src/bison.simple: Remove #line before %%prologue because
2063 %%input-line is wrong at this time.
2065 2001-12-10 Marc Autret <autret_m@epita.fr>
2067 * src/reader.c (symbols_output): Clean up.
2068 * src/output.c (output_gram, output): Clean up.
2070 2001-12-10 Akim Demaille <akim@epita.fr>
2072 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2073 * src/LR0.c (set_state_table): here.
2074 * src/lalr.c (lalr): Call it.
2076 2001-12-10 Akim Demaille <akim@epita.fr>
2078 * src/state.h (shifts): Remove the `number' member: shifts are
2079 attached to state, hence no longer need to be labelled with a
2082 2001-12-10 Akim Demaille <akim@epita.fr>
2084 Now that states have a complete set of members, the linked list of
2085 shifts is useless: just fill directly the state's shifts member.
2087 * src/state.h (shifts): Remove the `next' member.
2088 * src/LR0.c (first_state, last_state): Remove.
2090 (augment_automaton): Don't look for the shifts that must be added
2091 a shift on EOF: it is those of the state we looked for! But now,
2092 since shifts are attached, it is no longer needed to looking
2093 merely by its id: its number.
2095 2001-12-10 Akim Demaille <akim@epita.fr>
2097 * src/LR0.c (augment_automaton): Better variable locality.
2098 Remove an impossible branch: if there is a state corresponding to
2099 the start symbol being shifted, then there is shift for the start
2100 symbol from the initial state.
2102 2001-12-10 Akim Demaille <akim@epita.fr>
2104 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2105 only when appropriate: when insert_start_shifting_state' is not
2107 * tests/regression.at (Rule Line Numbers): Adjust.
2109 2001-12-10 Akim Demaille <akim@epita.fr>
2111 * src/LR0.c (augment_automaton): Now that all states have shifts,
2112 merge the two cases addition shifts to the initial state.
2114 2001-12-10 Akim Demaille <akim@epita.fr>
2116 * src/lalr.c (set_state_table): Move to...
2118 * src/lalr.c (lalr): Don't call it...
2119 * src/LR0.c (generate_states): do it.
2120 * src/LR0.h (first_state): Remove, only the table is used.
2122 2001-12-10 Akim Demaille <akim@epita.fr>
2124 * src/LR0.h (first_shift, first_reduction): Remove.
2125 * src/lalr.c: Don't use first_shift: find shifts through the
2128 2001-12-10 Akim Demaille <akim@epita.fr>
2130 * src/LR0.c: Attach shifts to states as soon as they are
2132 * src/lalr.c (set_state_table): Instead of assigning shifts to
2133 state, just assert that the mapping was properly done.
2135 2001-12-10 Akim Demaille <akim@epita.fr>
2137 * src/LR0.c (insert_start_shift): Rename as...
2138 (insert_start_shifting_state): this.
2139 (insert_eof_shifting_state, insert_accepting_state): New.
2140 (augment_automaton): Adjust.
2141 Better locality of the variables.
2142 When looking if the start_symbol is shifted from the initial
2143 state, using `while (... symbol != start_symbol ...)' sounds
2144 better than `while (... symbol < start_symbol ...)': If fail
2145 to see how the order between symbols could be relevant!
2147 2001-12-10 Akim Demaille <akim@epita.fr>
2149 * src/getargs.h: Don't declare `spec_name_prefix' and
2150 `spec_file_prefix', declared by src/files.h.
2151 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2152 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2153 * src/output.c (prepare): Adjust.
2154 * src/reader.c (symbols_output): Likewise.
2155 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2157 2001-12-10 Akim Demaille <akim@epita.fr>
2159 * src/muscle_tab.c (muscle_init): NULL is a better default than
2162 2001-12-10 Akim Demaille <akim@epita.fr>
2164 * src/reader.c (reader): Calling symbols_output once is enough.
2166 2001-12-10 Akim Demaille <akim@epita.fr>
2168 Now that states have a complete set of members, the linked list of
2169 reductions is useless: just fill directly the state's reductions
2172 * src/state.h (struct reductions): Remove member `number' and
2174 * src/LR0.c (first_reduction, last_reduction): Remove.
2175 (save_reductions): Don't link the new reductions, store them in
2177 * src/lalr.c (set_state_table): No need to attach reductions to
2178 states, it's already done.
2179 * src/output.c (output_actions): No longer free the shifts, then
2180 the reductions, then the states: free all the states and their
2183 2001-12-10 Akim Demaille <akim@epita.fr>
2185 * src/options.c (OPTN, DRTV, BOTH): New.
2186 (option_table): Use them.
2188 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2189 the job of system.h.
2190 * src/options.c: Don't include stdio.h and xalloc.h for the same
2193 2001-12-10 Akim Demaille <akim@epita.fr>
2195 * src/output.c (output, prepare): Make sure the values of the
2196 muscles `action' and `prologue' are 0-terminated.
2198 2001-12-10 Akim Demaille <akim@epita.fr>
2200 Clean up GCC warnings.
2202 * src/reader.c (copy_action): `buf' is not used.
2203 (parse_skel_decl): Be static.
2204 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2205 * src/options.h (create_long_option_table): Have a real prototype.
2206 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2207 (hash_delete_at): Return const void *.
2208 Adjust casts to preserve the const.
2210 2001-12-10 Akim Demaille <akim@epita.fr>
2212 * configure.in: Require 2.52g.
2213 M4 is not needed, but AUTOM4TE is.
2215 * tests/Makefile.am: Adjust.
2217 2001-12-10 Akim Demaille <akim@epita.fr>
2219 One structure for states is enough, even though theoretically
2220 there are LR(0) states and LALR(1) states.
2222 * src/lalr.h (state_t): Remove.
2223 (state_table): Be state_t **, not state_t *.
2224 * src/state.h (core, CORE_ALLOC): Rename as...
2225 (state_t, STATE_ALLOC): this.
2226 Add the LALR(1) members: shifts, reductions, errs.
2227 * src/LR0.c (state_table): Rename as...
2228 (state_hash): this, to avoid name clashes with the global
2230 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2231 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2233 2001-12-10 Akim Demaille <akim@epita.fr>
2235 Bison dumps core on bash.y.
2236 Reported by Pascal Bart.
2238 * src/warshall.c (bitmatrix_print): New.
2240 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2241 j must be the outer loop.
2242 * tests/regression.at (Broken Closure): New.
2244 2001-12-05 Akim Demaille <akim@epita.fr>
2246 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2248 Reported by Peter Hámorský.
2250 2001-12-05 Akim Demaille <akim@epita.fr>
2252 * src/conflicts.c (err_table): Remove.
2253 (resolve_sr_conflict): Adjust.
2254 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
2256 (state_t.reductions, state_t.shifts): this.
2258 2001-12-05 Akim Demaille <akim@epita.fr>
2260 * src/reduce.c (reduce_grammar_tables): No longer disable the
2261 removal of useless rules via CPP but via `if (0)', so that the
2262 compiler still check the code is valid.
2263 For instance, it should have noticed `rline' no longer exists: use
2264 the `line' member of rule_t.
2265 * src/gram.c (dummy, rline): Remove, unused.
2267 2001-12-05 Akim Demaille <akim@epita.fr>
2269 * src/output.c (pack_vector): Use assert, not berror.
2270 * src/main.c (berror): Remove, unused.
2272 2001-12-05 Akim Demaille <akim@epita.fr>
2274 New experimental feature: if --verbose --trace output all the
2275 items of a state, not only its kernel.
2277 * src/print.c (print_core): If `trace_flag', then invoke closure
2278 before outputting the items of the state (print_core is no longer
2279 a correct name them).
2280 (print_results): Invoke new_closure/free_closure if needed.
2282 2001-12-05 Akim Demaille <akim@epita.fr>
2284 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
2285 * src/closure.c, src/closure.h (itemsetsize): Rename as...
2286 (nitemset): for consistency with the rest of the project.
2288 2001-12-05 Akim Demaille <akim@epita.fr>
2290 * src/closure.c (print_closure): Improve.
2291 (closure): Use it for printing input and output.
2293 2001-12-05 Akim Demaille <akim@epita.fr>
2295 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
2296 indexed by nonterminals.
2298 2001-12-05 Akim Demaille <akim@epita.fr>
2300 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
2302 * src/warshall.h: Remove accidental duplication of the content.
2304 2001-12-05 Akim Demaille <akim@epita.fr>
2306 * src/closure.c (set_fderives): De-obfuscate.
2308 2001-12-05 Akim Demaille <akim@epita.fr>
2310 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
2312 2001-12-05 Akim Demaille <akim@epita.fr>
2314 * src/closure.c (set_firsts): De-obfuscate.
2316 2001-12-05 Akim Demaille <akim@epita.fr>
2318 * src/output.c (action_row): De-obfuscate
2319 using the good o' techniques: arrays not pointers, variable
2320 locality, BITISSET, RESETBIT etc.
2322 2001-12-05 Akim Demaille <akim@epita.fr>
2324 Pessimize the code to simplify it: from now on, all the states
2325 have a valid SHIFTS, which NSHIFTS is possibly 0.
2327 * src/LR0.c (shifts_new): Be global and move to..
2328 * src/state.c, src/state.h: here.
2329 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
2330 * src/print_graph: Adjust.
2332 2001-12-05 Akim Demaille <akim@epita.fr>
2334 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
2335 * src/conflicts.c: Use it.
2336 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
2337 incorrectly ``simplified''.
2339 2001-12-05 Akim Demaille <akim@epita.fr>
2341 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
2342 using the good o' techniques: arrays not pointers, variable
2343 locality, BITISSET, RESETBIT etc.
2345 2001-12-05 Akim Demaille <akim@epita.fr>
2347 * src/state.h (SHIFT_SYMBOL): New.
2348 * src/conflicts.c: Use it to deobfuscate.
2350 2001-12-05 Akim Demaille <akim@epita.fr>
2352 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
2353 (print_reductions): De-obfuscate using the good o' techniques:
2354 arrays not pointers, variable locality, BITISSET.
2356 2001-12-05 Akim Demaille <akim@epita.fr>
2358 * src/conflicts.c (print_reductions): Arrays, not pointers.
2361 2001-12-05 Akim Demaille <akim@epita.fr>
2363 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2365 2001-12-05 Akim Demaille <akim@epita.fr>
2367 * src/conflicts.c (print_reductions): Improve variable locality.
2369 2001-12-05 Akim Demaille <akim@epita.fr>
2371 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2373 2001-12-05 Akim Demaille <akim@epita.fr>
2375 * src/conflicts.c (print_reductions): Improve variable locality.
2377 2001-12-05 Akim Demaille <akim@epita.fr>
2379 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
2380 * src/lalr.c: Use them.
2382 2001-12-05 Akim Demaille <akim@epita.fr>
2384 * src/LR0.c (augment_automaton): Formatting changes.
2385 Better variable locality.
2387 2001-12-05 Akim Demaille <akim@epita.fr>
2389 * src/lalr.c (matrix_print): New.
2390 (transpose): Use it.
2391 Use arrays instead of pointers.
2393 2001-12-05 Akim Demaille <akim@epita.fr>
2395 * src/lalr.c (maxrhs): Move to...
2396 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
2397 * src/lalr.c (build_relations): Adjust.
2399 2001-12-05 Akim Demaille <akim@epita.fr>
2401 * src/lalr.c (transpose): Free the memory allocated to the
2402 argument, as it is replaced by the results by the unique caller.
2403 (build_relations): Merely invoke transpose: it handles the memory
2405 Improve variable locality.
2406 Avoid variables used as mere abbreviations.
2407 (compute_lookaheads): Use arrays instead of pointers.
2409 2001-12-05 Akim Demaille <akim@epita.fr>
2411 * src/lalr.c (initialize_F): Improve variable locality.
2412 Avoid variables used as mere abbreviations.
2414 2001-12-05 Akim Demaille <akim@epita.fr>
2416 * src/derives.c (print_derives): Display the ruleno.
2417 * src/lalr.c (initialize_F, transpose): Better variable locality
2418 to improve readability.
2419 Avoid variables used as mere abbreviations.
2421 2001-12-05 Akim Demaille <akim@epita.fr>
2423 * src/lalr.c (traverse): Use arrays instead of pointers.
2425 2001-12-05 Akim Demaille <akim@epita.fr>
2427 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
2428 the handling of squeue.
2429 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2431 2001-12-05 Akim Demaille <akim@epita.fr>
2433 Because useless nonterminals are now kept alive (instead of being
2434 `destroyed'), we now sometimes examine them, and store information
2435 related to them. Hence we need to know their number, and adjust
2438 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
2440 * src/LR0.c (allocate_itemsets): The memory allocated to
2441 `symbol_count' was used for two different purpose: once to count
2442 the number of occurrences of each symbol, and later reassigned to
2443 `shift_symbol', containing the symbol that can be shifted from a
2445 Deobfuscate, i.e., allocate, use and free `symbol_count' here
2447 (new_itemsets): Allocate `shift_symbol' here.
2448 (allocate_itemsets): symbol_count includes useless nonterminals.
2450 (free_storage): Use `free', not `XFREE', for pointers that cannot
2453 2001-12-05 Akim Demaille <akim@epita.fr>
2455 * src/nullable.c (set_nullable): Deobfuscate the handling of
2457 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2459 2001-12-05 Akim Demaille <akim@epita.fr>
2461 * src/gram.c, src/gram.h (ritem_print): New.
2462 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
2463 (This useless function was defined only to work around VMS linkers
2464 that can't handle compilation units with variables only).
2465 * src/reduce.c (dump_grammar): Use it to trace the construction of
2468 2001-12-04 Paul Eggert <eggert@twinsun.com>
2470 * src/bison.simple (union yyalloc): Change member names
2471 to be the same as the stack names.
2472 (yyparse): yyptr is now union yyalloc *, not char *.
2473 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
2474 and may generate better code on some machines.
2475 (yystpcpy): Use prototype if __STDC__ is defined, not just
2476 if __cplusplus is defined.
2478 2001-11-30 Akim Demaille <akim@epita.fr>
2480 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
2481 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
2482 Gettext doesn't compile cleanly, and dies with -Werror.
2483 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
2484 Include WARNING_CFLAGS here.
2485 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
2486 before being defined.
2488 2001-11-27 Paul Eggert <eggert@twinsun.com>
2490 * lib/quotearg.h (quotearg_n, quotearg_n_style):
2491 First arg is int, not unsigned.
2492 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2493 (SIZE_MAX, UINT_MAX): New macros.
2494 (quotearg_n_options): Abort if N is negative.
2495 Avoid overflow check on hosts where size_t is 64 bits and int
2496 is 32 bits, as overflow is impossible there.
2497 Fix off-by-one typo that caused unnecessary reallocation.
2499 2001-11-29 Paul Eggert <eggert@twinsun.com>
2501 Name space cleanup in generated parser.
2503 * doc/bison.texinfo (Bison Parser): Discuss system headers
2504 and their effect on the user name space.
2507 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
2508 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
2509 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
2511 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
2512 on user names when possible.
2514 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
2515 Simplify test for whather <alloca.h> exists.
2517 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
2519 (<stdio.h>): Include if YYDEBUG.
2521 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
2522 ! defined (yyoverflow) && ! defined (yymemcpy).
2524 (yymemcpy, yyparse): Rename local variables as needed so that
2525 they all begin with 'yy'.
2527 (yystrlen, yystpcpy): New functions.
2529 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
2532 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
2533 instead of relying on string.h functions. Use YYSTACK_ALLOC
2534 and YYSTACK_FREE instead of malloc and free.
2536 2001-11-30 Akim Demaille <akim@epita.fr>
2538 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
2539 before their first uses.
2540 (YYBISON, YYPURE): Move to the top of the output.
2542 2001-11-30 Akim Demaille <akim@epita.fr>
2544 * tests/reduce.at (Useless Nonterminals): Fix.
2546 2001-11-30 Akim Demaille <akim@epita.fr>
2548 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
2549 if body instead of `;' to pacify GCC's warnings.
2551 2001-11-30 Akim Demaille <akim@epita.fr>
2553 Instead of mapping the LHS of unused rules to -1, keep the LHS
2554 valid, but flag the rules as invalid.
2556 * src/gram.h (rule_t): `useful' is a new member.
2557 * src/print.c (print_grammar): Adjust.
2558 * src/derives.c (set_derives): Likewise.
2559 * src/reader.c (packgram, reduce_output): Likewise.
2560 * src/reduce.c (reduce_grammar_tables): Likewise.
2561 * tests/reduce.at (Underivable Rules, Useless Rules): New.
2563 2001-11-30 Akim Demaille <akim@epita.fr>
2565 * src/reduce.c (reduce_output): Formatting changes.
2566 * src/print.c (print_results, print_grammar): Likewise.
2567 * tests/regression.at (Rule Line Numbers)
2568 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2570 2001-11-30 Akim Demaille <akim@epita.fr>
2572 * src/reduce.c (nonterminals_reduce): Instead of throwing away
2573 useless nonterminals, move them at the end of the symbol arrays.
2574 (reduce_output): Adjust.
2575 * tests/reduce.at (Useless Nonterminals): Adjust.
2577 2001-11-30 Akim Demaille <akim@epita.fr>
2579 * src/reduce.c: Various comment/formatting changes.
2580 (nonterminals_reduce): New, extracted from...
2581 (reduce_grammar_tables): here.
2582 (reduce_grammar): Call nonterminals_reduce.
2584 2001-11-29 Paul Eggert <eggert@twinsun.com>
2586 * src/bison.simple (YYSTACK_REALLOC): Remove.
2587 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2588 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2590 (union yyalloc): New type.
2591 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2592 an arbitrary restriction on hosts where size_t is wider than int.
2594 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2595 a parser stack overflow. Allocate just one block of memory for all
2596 three stacks, instead of allocating three blocks; this typically is
2597 faster and reduces fragmentation.
2599 Do not limit the number of items in the stack to a value that fits
2600 in 'int', as this is an arbitrary limit on hosts with 64-bit
2601 size_t and 32-bit int.
2603 2001-11-29 Marc Autret <autret_m@epita.fr>
2605 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2606 of defining YYERROR_VERBOSE.
2607 [AT_DATA]: $4 is now out of C declarations in the prologue.
2609 2001-11-28 Marc Autret <autret_m@epita.fr>
2611 * src/reader.c (parse_dquoted_param): New.
2612 (parse_skel_decl): Use it.
2613 * src/lex.h: Add its prototype.
2614 * src/lex.c (literalchar): Become not static.
2616 2001-11-28 Marc Autret <autret_m@epita.fr>
2618 * src/output.h: And put its extern declaration here.
2619 * src/output.c (error_verbose): Define here.
2620 (prepare): Echo name modification.
2621 * src/getargs.h: Clean its extern declaration.
2622 * src/getargs.c (error_verbose_flag): Remove.
2623 (getargs): Remove case 'e'.
2624 * src/options.c (option_table): 'error-verbose' is now seen as simple
2628 * src/reader.c (read_declarations): Remove case tok_include.
2629 (parse_include_decl): Remove.
2630 * src/lex.h (token_t): Remove tok_include.
2631 * src/options.c (option_table): 'include' is now a simple command line
2634 2001-11-28 Marc Autret <autret_m@epita.fr>
2636 * src/bison.simple: Adjust muscle names.
2637 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2638 * src/output.c (prepare): s/_/-/ for the muscles names.
2639 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2641 2001-11-28 Marc Autret <autret_m@epita.fr>
2643 * src/bison.simple: Fix debug.
2644 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2646 2001-11-28 Akim Demaille <akim@epita.fr>
2648 * src/LR0.c (shifts_new): New.
2649 (save_shifts, insert_start_shift, augment_automaton): Use it.
2651 2001-11-28 Akim Demaille <akim@epita.fr>
2653 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2656 2001-11-28 Akim Demaille <akim@epita.fr>
2658 * src/closure.c (closure): Instead of looping over word in array
2659 then bits in words, loop over bits in array.
2661 2001-11-28 Akim Demaille <akim@epita.fr>
2663 * src/closure.c (closure): No longer optimize the special case
2664 where all the bits of `ruleset[r]' are set to 0, to make the code
2667 2001-11-28 Akim Demaille <akim@epita.fr>
2669 * src/closure.c (closure): `r' and `c' are new variables, used to
2670 de-obfuscate accesses to RULESET and CORE.
2672 2001-11-28 Akim Demaille <akim@epita.fr>
2674 * src/reduce.c (reduce_print): Use ngettext.
2675 (dump_grammar): Improve the trace accuracy.
2677 2001-11-28 Akim Demaille <akim@epita.fr>
2679 * src/reduce.c (dump_grammar): Don't translate trace messages.
2681 2001-11-28 Akim Demaille <akim@epita.fr>
2683 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2684 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2685 as all tags are free'ed afterwards.
2688 2001-11-27 Paul Eggert <eggert@twinsun.com>
2690 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2691 use alloca when we didn't want to, and vice versa.
2693 2001-11-27 Marc Autret <autret_m@epita.fr>
2695 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2697 * src/output.c (prepare): Remove its update.
2699 2001-11-27 Marc Autret <autret_m@epita.fr>
2701 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2704 2001-11-27 Marc Autret <autret_m@epita.fr>
2706 * src/bison.simple: Remove YYERROR_VERBOSE using.
2707 Use %%error_verbose.
2708 (yyparse): Likewise.
2709 * src/output.c (prepare): Give its final value.
2710 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2711 * src/getargs.h: Add its extern declaration.
2712 * src/getargs.c (error_verbose_flag): New int.
2713 (getargs): Update to catch new case.
2714 * src/options.c (option_table): 'error-verbose' is a new option.
2715 (shortopts): Update.
2717 2001-11-27 Akim Demaille <akim@epita.fr>
2719 * src/system.h: Use intl/libgettext.h.
2720 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2722 2001-11-27 Akim Demaille <akim@epita.fr>
2724 * tests/torture.at (Exploding the Stack Size with Malloc):
2725 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2727 2001-11-27 Akim Demaille <akim@epita.fr>
2729 * src/files.c: Include error.h.
2730 Reported by Hans Aberg.
2732 2001-11-26 Marc Autret <autret_m@epita.fr>
2734 * src/reader.c (parse_include_decl): New, not yet implemented.
2735 (read_declarations): Add case tok_include.
2736 * src/getargs.h (include): Add its extern definition.
2737 * src/getargs.c (include): New const char *.
2738 (getargs): Add case '-I'.
2739 * src/options.c (option_table): Add include as command line and
2741 * src/lex.h (token_t): Add tok_include.
2743 2001-11-26 Akim Demaille <akim@epita.fr>
2745 * src/reader.c (readgram): Make sure rules for mid-rule actions
2746 have a lineno equal to that of their host rule.
2747 Reported by Hans Aberg.
2748 * tests/regression.at (Rule Line Numbers): New.
2750 2001-11-26 Akim Demaille <akim@epita.fr>
2752 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2755 2001-11-26 Akim Demaille <akim@epita.fr>
2757 * src/complain.c, src/complain.h (error): Remove, provided by
2760 2001-11-26 Akim Demaille <akim@epita.fr>
2762 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2763 issue an error message.
2764 * tests/regression.at (Invalid %directive): New.
2765 Reported by Hans Aberg.
2767 2001-11-26 Akim Demaille <akim@epita.fr>
2769 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2770 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2772 2001-11-26 Akim Demaille <akim@epita.fr>
2774 * src/conflicts.c (conflicts_print): Don't complain at all when
2775 there are no reduce/reduce conflicts, and as many shift/reduce
2776 conflicts as expected.
2777 * tests/regression.at (%expect right): Adjust.
2779 2001-11-23 Akim Demaille <akim@epita.fr>
2781 * lib/alloca.c: Update, from fileutils.
2783 2001-11-23 Akim Demaille <akim@epita.fr>
2785 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2787 2001-11-23 Akim Demaille <akim@epita.fr>
2789 * src/system.h: Include alloca.h.
2790 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2792 2001-11-23 Akim Demaille <akim@epita.fr>
2794 * src/print_graph.c (print_actions): Remove `rule', unused.
2795 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2796 pacify GCC's signed < unsigned warnings.
2797 * src/closure.c (itemsetsize): Likewise.
2798 * src/reader.c (symbol_list_new): Static.
2800 2001-11-23 Akim Demaille <akim@epita.fr>
2802 Attaching lineno to buckets is stupid, since only one copy of each
2803 symbol is kept, only the line of the first occurrence is kept too.
2805 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2806 * src/reader.c (rline_allocated): Remove, unused.
2807 (symbol_list): Have a `line' member.
2808 (symbol_list_new): New.
2810 * src/print.c (print_grammar): Output the rule line numbers.
2811 * tests/regression.at (Solved SR Conflicts)
2812 (Unresolved SR Conflicts): Adjust.
2813 Reported by Hans Aberg.
2815 2001-11-22 Marc Autret <autret_m@epita.fr>
2817 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2819 2001-11-22 Marc Autret <autret_m@epita.fr>
2821 * src/muscle_tab.c (muscle_init): Remove initialization of
2823 * src/output.c (output_master_parser): Do it here.
2825 2001-11-20 Akim Demaille <akim@epita.fr>
2828 * configure.in (ALL_LINGUAS): Adjust.
2829 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2830 longer contains strings to translate.
2832 2001-11-19 Akim Demaille <akim@epita.fr>
2834 * src/conflicts.c (conflicts_print): Add a missing \n.
2836 2001-11-19 Akim Demaille <akim@epita.fr>
2838 * src/nullable.c (nullable_print): New.
2839 (set_nullable): Call it when tracing.
2840 Better locality of variables.
2842 2001-11-19 Akim Demaille <akim@epita.fr>
2844 * src/print.c (print_actions): Better locality of variables.
2846 2001-11-19 Akim Demaille <akim@epita.fr>
2848 * src/derives.c (print_derives): Fix and enrich.
2849 * src/closure.c (print_fderives): Likewise.
2851 2001-11-19 Akim Demaille <akim@epita.fr>
2853 * src/closure.c (itemsetend): Remove, replaced with...
2856 2001-11-19 Akim Demaille <akim@epita.fr>
2858 * src/LR0.c (kernel_end): Remove, replaced with...
2861 2001-11-19 Akim Demaille <akim@epita.fr>
2863 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2866 2001-11-19 Akim Demaille <akim@epita.fr>
2868 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2870 2001-11-19 Akim Demaille <akim@epita.fr>
2872 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2874 * src/LR0.c: Likewise.
2875 (allocate_itemsets): Use arrays instead of pointers to clarify.
2877 2001-11-19 Akim Demaille <akim@epita.fr>
2879 * src/getargs.c (statistics_flag): Replace with...
2881 (longopts): Accept --trace instead of --statistics.
2882 * src/getargs.h, src/options.c: Adjust.
2883 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2884 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2886 2001-11-19 Akim Demaille <akim@epita.fr>
2888 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2889 pointers to clarify the code.
2890 (save_reductions, save_shifts): Factor common parts of alternatives.
2892 2001-11-19 Akim Demaille <akim@epita.fr>
2894 * src/LR0.c (new_state, get_state): Complete TRACE code.
2895 * src/closure.c: Include `reader.h' to get `tags', needed by the
2897 Rename the conditional DEBUG as TRACE.
2898 Output consistently TRACEs to stderr, not stdout.
2899 * src/derives.c: Likewise.
2900 * src/reduce.c: (inaccessable_symbols): Using if is better style
2902 Use `#if TRACE' instead of `#if 0' for tracing code.
2904 2001-11-19 Akim Demaille <akim@epita.fr>
2906 * src/system.h (LIST_FREE, shortcpy): New.
2907 * src/LR0.c: Use them.
2908 * src/output.c (free_itemsets, free_reductions, free_shifts):
2909 Remove, replaced by LIST_FREE.
2911 2001-11-19 Akim Demaille <akim@epita.fr>
2913 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2914 (REDUCTIONS_ALLOC): New.
2915 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2918 2001-11-19 Akim Demaille <akim@epita.fr>
2920 * src/LR0.c (new_state): Complete trace code.
2921 * src/nullable.c (set_nullable): Don't translate traces.
2923 2001-11-19 Akim Demaille <akim@epita.fr>
2925 * src/print_graph.c (print_core): Better locality of variables.
2926 * src/print.c (print_core): Likewise.
2928 2001-11-19 Akim Demaille <akim@epita.fr>
2930 * src/vcg.c: You do the output, so you are responsible of the
2931 handling of VCG syntax, in particular: use quotearg.
2932 * src/print_graph.c: Don't.
2933 (print_actions): Don't output the actions as part of the nodes,
2934 since that's the job of the edges.
2935 (print_state): Don't output by hand: fill the node description,
2936 and ask for its output.
2938 2001-11-19 Akim Demaille <akim@epita.fr>
2940 * src/bison.simple (yyparse): When verbosely reporting an error,
2941 no longer put additional quotes around token names.
2942 * tests/calc.at: Adjust.
2944 2001-11-19 Akim Demaille <akim@epita.fr>
2946 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2947 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2948 * src/output.c: Adjust.
2950 2001-11-19 Akim Demaille <akim@epita.fr>
2952 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2954 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2956 2001-11-19 Akim Demaille <akim@epita.fr>
2958 * src/gram.h (rule_t): New.
2960 (rrhs, rlhs): Remove, part of state_t.
2961 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2962 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2963 * src/reader.c, src/reduce.c: Adjust.
2965 2001-11-19 Akim Demaille <akim@epita.fr>
2967 * src/reader.c (symbols_output): New, extracted from...
2968 (packsymbols): Here.
2971 2001-11-19 Akim Demaille <akim@epita.fr>
2973 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2974 (maxrhs): this new function.
2976 2001-11-19 Akim Demaille <akim@epita.fr>
2978 * src/lalr.c (F): New macro to access the variable F.
2981 2001-11-19 Akim Demaille <akim@epita.fr>
2983 * src/lalr.h (LA): New macro to access the variable LA.
2984 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2985 * src/lalr.c: Adjust.
2987 2001-11-19 Akim Demaille <akim@epita.fr>
2989 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2990 (set_state_table): handle the `lookaheads' members.
2992 2001-11-19 Akim Demaille <akim@epita.fr>
2994 * src/lalr.h (lookaheads): Removed array, whose contents is now
2996 (state_t): this structure.
2997 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3000 2001-11-19 Akim Demaille <akim@epita.fr>
3002 * src/lalr.h (consistent): Removed array, whose contents is now
3004 (state_t): this structure.
3005 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3008 2001-11-19 Akim Demaille <akim@epita.fr>
3010 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
3011 contents are now members of...
3012 (state_t): this structure.
3013 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3016 2001-11-19 Akim Demaille <akim@epita.fr>
3018 * src/lalr.h (state_t): New.
3019 (state_table): Be a state_t * instead of a core **.
3020 (accessing_symbol): Remove, part of state_t.
3021 * src/lalr.c: Adjust.
3022 (set_accessing_symbol): Merge into...
3023 (set_state_table): this.
3024 * src/print_graph.c, src/conflicts.c: Adjust.
3026 2001-11-14 Akim Demaille <akim@epita.fr>
3028 * tests/calc.at, tests/output.at, tests/regression.at,
3029 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
3030 now the tests are run in private dirs, therefore AC_CLEANUP and
3031 family can be simplified to 0-ary.
3032 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
3033 use abs. path to find config.h.
3034 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
3035 stderr, there can be way too much random noise.
3036 Instead pass -Werror to GCC and rely on the exit status.
3037 Reported by Wolfram Wagner.
3039 2001-11-14 Akim Demaille <akim@epita.fr>
3041 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
3042 defined only if yyoverflow is defined, to avoid `warning: unused
3044 Reported by The Test Suite.
3046 2001-11-14 Akim Demaille <akim@epita.fr>
3048 * src/print.c: Include reduce.h.
3049 Reported by Hans Aberg.
3051 2001-11-14 Akim Demaille <akim@epita.fr>
3053 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
3054 Revert a previous patch: these are really const.
3055 * src/conflicts.c (conflict_report): Additional useless pair of
3056 braces to pacify GCC's warnings for `if () if () {} else {}'.
3057 * src/lex.c (parse_percent_token): Replace equal_offset with
3060 Be sure to strdup `arg' when used, since there is no reason for
3061 token_buffer not to change.
3063 2001-11-14 Akim Demaille <akim@epita.fr>
3065 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
3067 * src/main.c (main): Use them.
3068 Suggested by Hans Aberg.
3070 2001-11-12 Akim Demaille <akim@epita.fr>
3072 * src/system.h (ngettext): Now that we use ngettext, be sure to
3073 provide a default definition when NLS are not used.
3075 2001-11-12 Akim Demaille <akim@epita.fr>
3077 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
3078 Use @kbd to denote user input.
3079 (Language and Grammar): ANSIfy the example.
3080 Adjust its layout for info/notinfo.
3081 (Location Tracking Calc): Output error messages to stderr.
3082 Output locations in a more GNUtically correct way.
3083 Fix a couple of Englishos.
3084 Adjust @group/@end group pairs.
3086 2001-11-12 Akim Demaille <akim@epita.fr>
3088 %expext was not functioning at all.
3090 * src/conflicts.c (expected_conflicts): Set to -1.
3091 (conflict_report): Use ngettext.
3092 (conflicts_print): Check %expect and make its violation an error.
3093 * doc/bison.texinfo (Expect Decl): Adjust.
3094 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
3095 * tests/regression.at (%expect not enough, %expect right)
3096 (%expect too much): New.
3098 2001-11-12 Akim Demaille <akim@epita.fr>
3100 * tests/regression.at (Conflicts): Rename as...
3101 (Unresolved SR Conflicts): this.
3102 (Solved SR Conflicts): New.
3104 2001-11-12 Akim Demaille <akim@epita.fr>
3106 * src/reduce.c (print_results): Rename as...
3107 (reduce_output): This.
3108 Output to OUT, passed as argument, instead of output_obstack.
3109 (dump_grammar): Likewise.
3112 (reduce_grammar): No longer call reduce_output, since...
3113 * src/print.c (print_results): do it.
3114 * src/main.c (main): Call reduce_free;
3116 2001-11-12 Akim Demaille <akim@epita.fr>
3118 * src/conflicts.c (print_reductions): Accept OUT as argument.
3119 Output to it, not to output_obstack.
3120 * src/print.c (print_actions): Adjust.
3122 2001-11-12 Akim Demaille <akim@epita.fr>
3124 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
3125 the result instead of using...
3126 (src_total, rrc_total, src_count, rrc_count): Remove.
3127 (any_conflicts): Remove.
3128 (print_conflicts): Split into...
3129 (conflicts_print, conflicts_output): New.
3130 * src/conflicts.h: Adjust.
3131 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
3132 * src/print.c (print_grammar): Issue `\n' between two rules.
3133 * tests/regression.at (Conflicts): New.
3134 Reported by Tom Lane.
3136 2001-11-12 Akim Demaille <akim@epita.fr>
3138 * tests/regression.at (Invalid input): Remove, duplicate with
3139 ``Invalid input: 1''.
3141 2001-11-12 Akim Demaille <akim@epita.fr>
3143 * tests/torture.at (AT_DATA_STACK_TORTURE)
3144 (Exploding the Stack Size with Alloca)
3145 (Exploding the Stack Size with Malloc): New.
3147 2001-11-12 Akim Demaille <akim@epita.fr>
3149 * src/bison.simple (YYSTACK_REALLOC): New.
3150 (yyparse) [!yyoverflow]: Use it and free the old stack.
3151 Reported by Per Allansson.
3153 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
3155 * src/bison.simple: Define type yystype instead of YYSTYPE, and
3156 define CPP macro, which substitute YYSTYPE by yystype.
3157 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
3158 with yyltype/YYLTYPE. This allows inclusion of the generated
3159 header within the parser if the compiler, such as GGC, accepts
3160 multiple equivalent #defines.
3163 2001-11-05 Akim Demaille <akim@epita.fr>
3165 * src/reader.c (symbols_output): New, extracted from...
3166 (packsymbols): here.
3169 2001-11-05 Akim Demaille <akim@epita.fr>
3171 * src/lex.c (parse_percent_token): s/quotearg/quote/.
3173 2001-11-05 Akim Demaille <akim@epita.fr>
3175 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
3178 2001-11-05 Akim Demaille <akim@epita.fr>
3180 * src/options.h (struct option_table_struct): set_flags is void*.
3181 * src/options.c (longopts): Support `--output' and `%output'.
3183 * src/lex.h (tok_setopt): Remove, replaced with...
3184 (tok_intopt, tok_stropt): these new guys.
3185 * src/lex.c (getopt.h): Not needed.
3186 (token_buffer, unlexed_token_buffer): Not const.
3187 (percent_table): Promote `-' over `_' in directive names.
3188 Active `%name-prefix', `file-prefix', and `output'.
3189 (parse_percent_token): Accept possible arguments to directives.
3190 Promote `-' over `_' in directive names.
3192 2001-11-04 Akim Demaille <akim@epita.fr>
3194 * doc/bison.texinfo (Decl Summary): Split the list into
3195 `directives for grammars' and `directives for bison'.
3197 Add description of `%name-prefix', `file-prefix', and `output'.
3198 Promote `-' over `_' in directive names.
3199 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
3200 Simplify the description of `--name-prefix'.
3201 Promote `-' over `_' in directive names.
3202 Promote `--output' over `--output-file'.
3203 Fix the description of `--defines'.
3204 * tests/output.at: Exercise %file-prefix and %output.
3206 2001-11-02 Akim Demaille <akim@epita.fr>
3208 * doc/refcard.tex: Update.
3210 2001-11-02 Akim Demaille <akim@epita.fr>
3212 * src/symtab.h (SUNDEF): New.
3213 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
3214 stand for `uninitialized', instead of 0.
3215 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
3216 * src/lex.c (lex): Adjust.
3218 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
3220 Let yylex return it instead of a plain 0.
3221 Reported by Dick Streefland.
3223 2001-11-02 Akim Demaille <akim@epita.fr>
3225 * tests/regression.at (Mixing %token styles): New test.
3227 2001-11-02 Akim Demaille <akim@epita.fr>
3229 * src/reader.c (parse_thong_decl): Formatting changes.
3230 (token_translations_init): New, extracted from...
3231 (packsymbols): Here.
3234 2001-11-01 Akim Demaille <akim@epita.fr>
3236 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
3237 Check that `9foo.y' produces correct cpp guards.
3238 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
3242 2001-11-01 Akim Demaille <akim@epita.fr>
3244 * tests/regression.at (Invalid input: 2): New.
3245 * src/lex.c (unlexed_token_buffer): New.
3246 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
3250 2001-11-01 Akim Demaille <akim@epita.fr>
3252 * tests/calc.at: Catch up with 1.30.
3253 * configure.in: Bump to 1.49a.
3254 Adjust to newer Autotest.
3256 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
3258 * src/conflicts.c: Move global variables rrc_total and src_total ...
3259 (print_conflicts): here.
3260 * src/output.c (output): Free global variable user_toknums.
3261 * src/lex.c (token_obstack): Become static.
3263 2001-10-18 Akim Demaille <akim@epita.fr>
3265 * tests/atlocal.in (GCC): Add.
3266 * tests/calc.at: s/m4_match/m4_bmatch/.
3267 s/m4_patsubst/m4_bpatsubst/.
3268 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
3269 * configure.in: AC_SUBST(GCC).
3271 2001-10-14 Marc Autret <autret_m@epita.fr>
3273 * src/options.c (create_long_option_table): Fix.
3275 2001-10-10 Akim Demaille <akim@epita.fr>
3277 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
3279 2001-10-04 Akim Demaille <akim@epita.fr>
3281 * src/reader.c (parse_union_decl): Push the caracters in
3282 union_obstack, not attrs_obstack.
3284 2001-10-04 Akim Demaille <akim@epita.fr>
3286 Merge in the branch 1.29.
3288 * src/reader.c (packsymbols): Use a temporary obstack for
3289 `%%tokendef', since output_stack is already used elsewhere.
3291 2001-10-02 Akim Demaille <akim@epita.fr>
3295 2001-10-02 Akim Demaille <akim@epita.fr>
3299 2001-10-02 Akim Demaille <akim@epita.fr>
3301 * tests/regression.at (Invalid CPP headers): New.
3302 From Alexander Belopolsky.
3303 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
3305 2001-10-02 Akim Demaille <akim@epita.fr>
3307 * tests/regression.at (Invalid input): New.
3308 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
3311 2001-10-02 Akim Demaille <akim@epita.fr>
3313 * tests/calc.at: Now that --debug works, the tests must be adjusted.
3315 2001-10-02 Akim Demaille <akim@epita.fr>
3317 * src/output.c (output_parser): Assert `skeleton'.
3318 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
3322 2001-10-01 Marc Autret <autret_m@epita.fr>
3324 * src/lex.h: Echo modifications.
3325 * src/lex.c (unlex): Parameter is now token_t.
3328 2001-10-01 Marc Autret <autret_m@epita.fr>
3330 * src/main.c: Include lex.h.
3333 2001-09-29 Akim Demaille <akim@epita.fr>
3335 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
3337 2001-09-28 Akim Demaille <akim@epita.fr>
3339 * tests/testsuite.at: Update to newer Autotest.
3340 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
3342 2001-09-27 Akim Demaille <akim@epita.fr>
3344 Position independent wrapper.
3346 * tests/bison: Remove.
3347 * tests/bison.in: New.
3348 * configure.in: Adjust.
3350 2001-09-27 Paul Eggert <eggert@twinsun.com>
3352 Port quotearg fixes from tar 1.13.24.
3354 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3356 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3357 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3359 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
3360 * m4/mbrtowc.m4: New file.
3361 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
3362 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
3364 2001-09-27 Akim Demaille <akim@epita.fr>
3368 2001-09-27 Akim Demaille <akim@epita.fr>
3372 2001-09-25 Akim Demaille <akim@epita.fr>
3374 * src/system.h: Include `xalloc.h'.
3375 Remove it from the C files.
3376 * src/files.c (output_files): Free the obstacks.
3377 * src/lex.c (init_lex): Rename as...
3380 * src/main.c (main): Use it.
3382 2001-09-24 Marc Autret <autret_m@epita.fr>
3384 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
3385 to output informations in fout (FILE*).
3386 (open_graph, close_graph): Likewise.
3387 (output_graph, output_edge, output_node): Likewise.
3388 * src/vcg.h: Update function prototypes.
3389 * src/print_graph.c (print_graph): Open output graph file.
3390 (print_actions): Adjust.
3391 * src/files.h: Remove extern declaration.
3392 * src/files.c: Remove graph_obstack declaration.
3393 (open_files): Remove graph_obstack initialization.
3394 (output_files): Remove graph_obstack saving.
3396 2001-09-24 Marc Autret <autret_m@epita.fr>
3398 * src/files.c (compute_output_file_names): Fix.
3400 2001-09-24 Marc Autret <autret_m@epita.fr>,
3401 Akim Demaille <akim@epita.fr>
3403 * src/reader.c (reader): Remove call to free_symtab ().
3404 * src/main.c (main): Call it here.
3406 * src/conflicts.c (initialize_conflicts): Rename as...
3407 (solve_conflicts): this.
3408 * src/print.c (print_core, print_actions, print_state)
3409 (print_grammar): Dump to a file instead a `output_obstack'.
3410 (print_results): Dump `output_obstack', and then proceed with the
3412 * src/files.c (compute_output_file_names, close_files): New.
3413 (output_files): Adjust.
3414 * src/main.c (main): Adjust.
3416 2001-09-23 Marc Autret <autret_m@epita.fr>
3418 * src/files.c (compute_header_macro): Computes header macro name
3419 from spec_defines_file when given.
3421 2001-09-23 Marc Autret <autret_m@epita.fr>
3423 * src/files.c (output_files): Add default extensions.
3425 2001-09-22 Akim Demaille <akim@epita.fr>
3427 * src/conflicts.c (finalize_conflicts): Rename as...
3428 (free_conflicts): this.
3430 2001-09-22 Akim Demaille <akim@epita.fr>
3432 * src/gram.c (gram_free): Rename back as...
3434 (output_token_translations): Free `token_translations'.
3435 * src/symtab.c (free_symtab): Free the tag field.
3437 2001-09-22 Akim Demaille <akim@epita.fr>
3439 Remove `translations' as it is always set to true.
3441 * src/gram.h: Adjust.
3442 * src/reader.c (packsymbols, parse_token_decl): Adjust
3443 * src/print.c (print_grammar): Adjust.
3444 * src/output.c (output_token_translations): Adjust.
3445 * src/lex.c (lex): Adjust.
3446 * src/gram.c: Be sure the set pointers to NULL.
3447 (dummy): Rename as...
3450 2001-09-22 Akim Demaille <akim@epita.fr>
3452 * configure.in: Invoke AM_LIB_DMALLOC.
3453 * src/system.h: Use dmalloc.
3454 * src/LR0.c: Be sure to have pointers initialized to NULL.
3455 (allocate_itemsets): Allocate kernel_items only if needed.
3457 2001-09-22 Akim Demaille <akim@epita.fr>
3459 * configure.in: Bump to 1.29b.
3460 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
3461 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
3462 need xmalloc.c in calc.y.
3465 2001-09-21 Akim Demaille <akim@epita.fr>
3468 * Makefile.maint, config/config.guess, config/config.sub,
3469 * config/missing: Update from masters.
3470 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
3472 * configure.in (ALL_LINGUAS): Add `tr'.
3474 2001-09-21 Akim Demaille <akim@epita.fr>
3476 * tests/Makefile.am (package.m4): Move to...
3477 ($(srcdir)/$(TESTSUITE)): here.
3479 2001-09-20 Akim Demaille <akim@epita.fr>
3481 * src/complain.c: No longer try to be standalone: use system.h.
3482 Don't assume __STDC__ is defined to 1. Just test if it is defined.
3483 * src/complain.h: Likewise.
3484 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
3485 Remove the unused variable `n'.
3486 From Albert Chin-A-Young.
3488 2001-09-18 Marc Autret <autret_m@epita.fr>
3490 * doc/bison.1: Update.
3491 * doc/bison.texinfo (Bison Options): Update --defines and --graph
3493 (Option Cross Key): Update.
3496 2001-09-18 Marc Autret <autret_m@epita.fr>
3498 * tests/regression.at: New test (comment in %union).
3500 2001-09-18 Marc Autret <autret_m@epita.fr>
3502 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
3504 Reported by Keith Browne.
3506 2001-09-18 Marc Autret <autret_m@epita.fr>
3508 * tests/output.at: Add tests for --defines and --graph.
3510 2001-09-18 Marc Autret <autret_m@epita.fr>
3512 * tests/output.at: Removes tests of %{header,src}_extension features.
3514 2001-09-18 Akim Demaille <akim@epita.fr>
3516 * tests/Makefile.am (package.m4): New.
3517 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
3518 (_AT_CHECK_CALC_ERROR): Likewise.
3519 Factor the `, ' part of verbose error messages.
3521 2001-09-18 Marc Autret <autret_m@epita.fr>
3523 * src/getargs.c (longopts): Declare --defines and --graph as options
3524 with optional arguments.
3525 * src/files.h: Add extern declarations.
3526 * src/files.c (spec_graph_file, spec_defines_file): New.
3527 (output_files): Update.
3528 Remove CPP-outed code.
3530 2001-09-18 Marc Autret <autret_m@epita.fr>
3532 Turn off %{source,header}_extension feature.
3534 * src/files.c (compute_exts_from_gf): Update.
3535 (compute_exts_from_src): Update.
3536 (output_files): CPP-out useless code.
3537 * src/files.h: Remove {header,source}_extension extern declarations.
3538 * src/reader.c (parse_dquoted_param): CPP-out.
3539 (parse_header_extension_decl): Remove.
3540 (parse_source_extension_decl): Remove.
3541 (read_declarations): Remove cases tok_{hdrext,srcext}.
3542 * src/lex.c (percent_table): Remove {header,source}_extension entries.
3543 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
3545 2001-09-10 Akim Demaille <akim@epita.fr>
3547 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
3548 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
3549 (AT_CHECK_OUTPUT): this.
3550 Merely check ls' exit status, its output is useless.
3552 2001-09-10 Akim Demaille <akim@epita.fr>
3554 * tests/calc.at: Use m4_match.
3555 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
3557 2001-09-10 Marc Autret <autret_m@epita.fr>,
3558 Akim Demaille <akim@epita.fr>
3560 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
3562 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
3564 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
3565 * src/lex.h: Adjust prototype.
3566 (token_t): Add `tok_undef'.
3567 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
3568 (parse_percent_token): Now returns token_t.
3569 Add default statement in switch.
3570 (lex): Separate `c' as an input variable, from the token_t result
3572 (unlexed): Is a token_t.
3574 2001-09-10 Akim Demaille <akim@epita.fr>
3576 * configure.in: Bump to 1.29a.
3578 2001-09-07 Akim Demaille <akim@epita.fr>
3582 2001-08-30 Akim Demaille <akim@epita.fr>
3584 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3585 * m4/atconfig.m4: Remove.
3586 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3588 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3589 m4_if, m4_patsubst, and m4_regexp.
3590 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3591 `input' file instead of echo.
3593 2001-08-29 Akim Demaille <akim@epita.fr>
3597 2001-08-29 Akim Demaille <akim@epita.fr>
3601 2001-08-29 Paul Eggert <eggert@twinsun.com>
3603 * src/bison.simple (yyparse): Don't take the address of an
3604 item before the start of an array, as that doesn't conform to
3607 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3609 * doc/bison.texinfo (Location Tracking Calc): New node.
3611 2001-08-29 Paul Eggert <eggert@twinsun.com>
3613 * src/output.c (output): Do not define const, as this now
3614 causes more problems than it cures.
3616 2001-08-29 Akim Demaille <akim@epita.fr>
3618 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3620 Be sure to tag the `detailmenu'.
3622 2001-08-29 Akim Demaille <akim@epita.fr>
3624 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3625 download in a tmp dir.
3627 2001-08-28 Marc Autret <autret_m@epita.fr>
3629 * config/depcomp: New file.
3631 2001-08-28 Marc Autret <autret_m@epita.fr>
3633 * doc/bison.1 (mandoc): Adjust.
3634 From Juan Manuel Guerrero.
3636 2001-08-28 Marc Autret <autret_m@epita.fr>
3638 * src/print_graph.c (print_state): Fix.
3640 2001-08-27 Marc Autret <autret_m@epita.fr>
3642 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3644 Echo modifications to the functions prototypes.
3645 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3647 2001-08-27 Marc Autret <autret_m@epita.fr>
3649 * src/vcg.c: Include `xalloc.h'.
3650 (add_colorentry): New.
3651 (add_classname): New.
3652 (add_infoname): New.
3653 * src/vcg.h: Add new prototypes.
3655 2001-08-27 Akim Demaille <akim@epita.fr>
3657 * Makefile.maint: Sync. again with CVS Autoconf.
3659 2001-08-27 Akim Demaille <akim@epita.fr>
3661 * Makefile.maint: Formatting changes.
3662 (po-update, cvs-update, update): New targets.
3665 2001-08-27 Akim Demaille <akim@epita.fr>
3667 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3668 * Makefile.maint: Sync. with CVS Autoconf.
3670 2001-08-27 Marc Autret <autret_m@epita.fr>
3672 * src/vcg.h (struct infoname_s): New.
3673 (struct colorentry_s): New.
3674 (graph_s): New fields {vertical,horizontal}_order in structure.
3675 Add `infoname' field.
3676 Add `colorentry' field;
3677 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3678 (G_HORIZONTAL_ORDER): New.
3680 (G_COLORENTRY): New.
3681 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3682 Add output of `infoname'.
3683 Add output of `colorentry'.
3685 2001-08-27 Marc Autret <autret_m@epita.fr>
3687 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3688 This one shadowed a global parameter.
3690 2001-08-24 Marc Autret <autret_m@epita.fr>
3692 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3693 instead of `unsigned'.
3694 (print_state): Do not call obstack_object_size () in obstack_grow ()
3695 to avoid macro variables shadowing.
3697 2001-08-23 Marc Autret <autret_m@epita.fr>
3699 * src/lex.c (percent_table): Typo: s/naem/name/.
3701 Normalize new options declarations.
3703 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3705 * tests/suite.at: Exercise %header_extension and %source_extension.
3707 2001-08-16 Marc Autret <autret_m@epita.fr>
3709 * src/reader.c (parse_dquoted_param): New.
3710 (parse_header_extension_decl): Use it.
3711 (parse_source_extension_decl): Likewise.
3713 2001-08-16 Marc Autret <autret_m@epita.fr>
3715 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3716 (get_xxxx_str): Use assert () instead of complain ().
3717 Remove return invokations in default cases.
3718 (get_decision_str): Modify default behaviour. Remove second argument.
3719 Echo modifications on calls.
3720 (output_graph): Fix.
3722 2001-08-16 Marc Autret <autret_m@epita.fr>
3724 * src/getargs.c (usage): Update with ``-g, --graph''.
3726 2001-08-16 Marc Autret <autret_m@epita.fr>
3728 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3729 (Option Cross Key): Likewise.
3730 * doc/bison.1: Update.
3732 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3734 * src/output.c (output_master_parser): Don't finish action_obstack.
3735 (output_parser): Don't care about the muscle action, here.
3736 (prepare): Copy the action_obstack in the action muscle.
3737 (output): Free action_obstack.
3739 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3741 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3742 will contain `%union' declaration.
3743 (parse_union_decl): Delete #line directive output.
3744 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3745 informations about %union.
3746 (parse_union_decl): Copy the union_obstack in the muscle stype.
3747 * src/bison.simple: Add new #line directive.
3748 Add typdef %%stype YYSTYPE.
3750 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3752 * src/bison.simple: Add new `#line' directive.
3754 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3756 * src/bison.simple: New `#line' directive.
3757 * src/output.c (output_parser): Support new dynamic muscle input_line.
3759 2001-09-22 Marc Autret <autret_m@epita.fr>
3761 * src/output.c (output_master_parser): New.
3762 (output_parser): Be more re-entrant.
3764 2001-09-21 Marc Autret <autret_m@epita.fr>
3766 * src/reader.c (copy_definition, parse_union_decl): Update and use
3768 (copy_action): Likewise.
3769 Use obstack_1grow ().
3770 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3772 2001-09-21 Marc Autret <autret_m@epita.fr>
3774 * src/options.c (option_table): Adjust.
3775 * src/lex.c (parse_percent_token): Fix.
3777 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3779 * src/options.c (symtab.h): Include it, need by lex.h.
3781 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3783 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3784 is now an option_table_struct*.
3785 (option_strcmp): New function option_strcmp.
3786 (parse_percent_token): Call option_strcmp.
3787 * src/getargs.c (xalloc.h, options.h): Include it.
3788 (getargs): Call create_long_option_table.
3789 (getargs): Free longopts at the end of the function.
3790 (shortopts): Move in options.c.
3791 * src/options.c (create_long_option_table): New function. Convert
3792 information from option_table to option structure.
3793 * src/reader.c (options.h): Include it.
3795 * src/Makefile.am: Adjust.
3796 * src/options.c (option_table): Create from longopts and percent_table.
3797 * src/getargs.c (longopts): Delete.
3798 * src/lex.c (struct percent_table_struct): Delete.
3799 (percent_table): Delete.
3800 (options.h): Include it.
3801 * src/options.c: Create.
3802 * src/options.h: Create.
3803 Declare enum opt_access_e.
3804 Define struct option_table_struct.
3806 2001-09-20 Marc Autret <autret_m@epita.fr>
3808 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3811 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3813 * src/bison.simple: s/%%filename/%%skeleton.
3814 * src/muscle_tab.c (getargs.h): Include it.
3815 (muscle_init): Insert new muscle skeleton.
3817 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3819 * src/output.c (output_parser): Delete unused variable actions_dumped.
3821 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3823 * src/output.c (output): Delete call to reader_output_yylsp.
3824 * src/reader.c (reader): Likewise.
3825 * src/reader.h: Delete declaration of reader_output_yylsp.
3827 2001-09-02 Marc Autret <autret_m@epita.fr>
3829 * src/reader.c: Include muscle_tab.h.
3830 (parse_union_decl): Update.
3831 (parse_macro_decl): Rename parse_muscle_decl.
3832 Update to use renamed functions and variable.
3833 (read_declarations, copy_action, read_additionnal_code, : Updated
3834 with correct variables and functions names.
3835 (packsymbols, reader): Likewise.
3837 * src/reader.h (muscle_obstack): Extern declaration update.
3839 * src/output.c: Include muscle_tab.h
3840 In all functions using macro_insert, change by using muscle_insert ().
3841 (macro_obstack): Rename muscle_obstack.
3842 Echo modifications in the whole file.
3843 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3844 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3845 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3847 * src/muscle_tab.h: Update double inclusion macros.
3848 (macro_entry_s): Rename muscle_entry_s.
3851 * src/muscle_tab.c: Include muscle_tab.h.
3852 Rename macro_tabble to muscle_table.
3853 (mhash1, mhash2, mcmp): Use muscle_entry.
3854 (macro_init): Rename muscle_init. Update.
3855 (macro_insert): Rename muscle_insert. Update.
3856 (macro_find): Rename muscle_find. Update.
3858 * src/main.c: Include muscle_tab.h.
3859 (main): Call muscle_init ().
3860 * src/Makefile.am (bison_SOURCES): Echo modifications.
3862 2001-09-02 Marc Autret <autret_m@epita.fr>
3864 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3866 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3868 2001-09-02 Marc Autret <autret_m@epita.fr>
3870 * src/macrotab.c, src/macrotab.h: Remove.
3872 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3874 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3877 2001-09-01 Marc Autret <autret_m@epita.fr>
3879 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3880 to an explicit value to activate the feature. We do it here.
3882 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3884 * src/output.c (prepare): Delete the `filename' muscule insertion.
3885 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3886 (parse_union_decl): Likewise.
3887 * src/macrotab.c (macro_init): Initialize filename by infile.
3889 2001-08-31 Marc Autret <autret_m@epita.fr>
3891 * src/bison.simple (YYLSP_NEEDED): New definition.
3892 * src/output.c (prepare): Add macro insertion of `locations_flag'
3894 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3896 * src/output.c (prepare): Delete insertion of previous muscles,
3897 and insert the `prefix' muscles.
3898 * src/macrotab.c (macro_init): Likewise.
3899 (macro_init): Initialization prefix directive by `yy'.
3900 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3901 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3902 yylval, yydebug, yyerror, yynerrs and yyparse.
3903 New directive `#define' to substitute yydebug, ... with option
3906 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3908 * src/main.c (main): Standardize.
3909 * src/output.c (output_table_data, output_parser): Likewise.
3910 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3912 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3914 * src/reader.c (read_additionnal_code): Rename %%user_code to
3916 * src/output.c (output): Rename %%declarations to %%prologue.
3917 * src/bison.simple: Echo modifications.
3919 2001-08-31 Marc Autret <autret_m@epita.fr>
3921 * src/reader.c (readgram): CleanUp.
3922 (output_token_defines): Likewise.
3923 (packsymbols): Likewise.
3925 * src/output.c (output): CPP-out useless code.
3927 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3929 * src/reader.c (reader): Delete obsolete call to function
3930 output_trailers and output_headers.
3931 * src/output.h: Remove obsolete functions prototypes of output_headers
3932 and output_trailers.
3934 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3936 * src/main.c: Include macrotab.h.
3937 * src/macrotab.h (macro_entry_s): Constify fields.
3938 Adjust functions prototypes.
3939 * src/macrotab.c (macro_insert): Constify key and value.
3940 (macro_find): Constify key.
3941 (macro_insert): Include 'xalloc.h'
3942 (macro_insert): Use XMALLOC.
3943 (macro_find): Constify return value.
3944 * src/output.c (output_table_data): Rename table to table_data.
3945 (output_parser): Constify macro_key, macro_value.
3947 2001-08-30 Marc Autret <autret_m@epita.fr>
3949 * src/reader.c (parse_skel_decl): New.
3950 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3951 * src/lex.h (token_t): New token `tok_skel'.
3952 * src/lex.c (percent_table): Add skeleton option entry.
3955 2001-08-29 Marc Autret <autret_m@epita.fr>
3957 * src/bison.simple: Add %%user_code directive at the end.
3958 * src/reader.c (read_additionnal_code): New.
3960 * src/output.c (output_program): Remove.
3963 2001-08-28 Marc Autret <autret_m@epita.fr>
3965 * src/output.c (output_actions): Clean up.
3966 (output_gram): CPP-out useless code.
3967 * src/reader.c (reader): Clean up, CPP-out useless code.
3969 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3971 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3973 * src/bison.simple: Add `%%definitions'.
3975 2001-08-28 Marc Autret <autret_m@epita.fr>
3977 * config/depcomp: New file.
3979 2001-08-27 Paul Eggert <eggert@twinsun.com>
3981 * src/bison.simple (yyparse): Don't take the address of an
3982 item before the start of an array, as that doesn't conform to
3985 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3987 * src/output.c (output): Remove the initialization of the macro
3988 obstack. It was done too late here.
3990 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3992 (reader): Initialize the macro obstack here, since we need it to grow
3993 '%define' directives.
3995 * src/reader.h: Declare the macro obstack as extern.
3997 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3999 * src/output.c (output_parser): Fix. Store single '%' characters in
4000 the output obstack instead of throwing them away.
4002 2001-08-27 Akim Demaille <akim@epita.fr>
4004 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
4006 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4008 * lib/Makefile.am: Adjust.
4010 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4012 * src/bison.simple: Update and add '%%' directives.
4014 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4016 * src/reader.c (reader): Remove calls to 'output_headers' and
4017 'output_trailers'. Remove some C output.
4018 (readgram): Disable a piece of code that was writing a default
4019 definition for 'YYSTYPE'.
4020 (reader_output_yylsp): Remove.
4021 (packsymbols): Output token defintions to a macro.
4022 (copy_definition): Disable C output.
4024 * src/reader.c (parse_macro_decl): New function used to parse macro
4026 (copy_string2): Put the body of copy_string into this new function.
4027 Add a parameter to let the caller choose whether he wants to copy the
4028 string delimiters or not.
4029 (copy_string): Be a simple call to copy_string2 with the last argument
4031 (read_declarations): Add case for macro definition.
4032 (copy_identifier): New.
4033 (parse_macro_decl): Read macro identifiers using copy_identifier
4036 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4038 * src/output.c (prepare): Add prefixed names.
4039 (output_parser): Output semantic actions.
4040 (output_parser): Fix bug on '%%line' directives.
4042 * src/output.c (output_headers): Remove. The C code printed by this
4043 function should now be in the skeletons.
4044 (output_trailers): Remove.
4045 (output): Disable call to 'reader_output_yylsp'.
4046 (output_rule_data): Do not output tables to the table obstack.
4048 * src/output.c: Remove some C dedicated output.
4049 Improve the use of macro and output obstacks.
4050 (output_defines): Remove.
4052 * src/output.c (output_token_translations): Associate 'translate'
4053 table with a macro. No output to the table obstack.
4054 (output_gram): Same for 'rhs' and 'prhs'.
4055 (output_stos): Same for 'stos'.
4056 (output_rule_data): Same for 'r1' and 'r2'.
4057 (token_actions): Same for 'defact'.
4058 (goto_actions): Same for 'defgoto'.
4059 (output_base): Same for 'pact' and 'pgoto'.
4060 (output_table): Same for 'table'.
4061 (output_check): Same for 'check'.
4063 * src/output.c (output_table_data): New function.
4064 (output_short_table): Remove.
4065 (output_short_or_char_table): Remove.
4067 * src/output.c (output_parser): Replace most of the skeleton copy code
4068 with something new. Skeletons are now processed character by character
4069 rather than line by line, and Bison looks for '%%' macros. This is the
4070 first step in making Bison's output process (a lot) more flexible.
4071 (output_parser): Use the macro table.
4073 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4075 * src/main.c (main): Initialize the macro table.
4077 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4079 * src/lex.c (percent_table): Add tok_define.
4080 * src/lex.h: Add tok_define.
4082 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4084 * src/macrotab.c: New file.
4085 * src/macrotab.h: New file.
4086 * src/Makefile.am: Update.
4088 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4090 * lib/hash.c: New file.
4091 * lib/hash.h: New file.
4092 * lib/Makefile.am: Update.
4094 2001-08-15 Akim Demaille <akim@epita.fr>
4098 2001-08-15 Marc Autret <autret_m@epita.fr>
4100 * src/reader.c (readgram): Indent output macro YYSTYPE.
4101 (packsymbols): Likewise.
4102 (output_token_defines): Likewise.
4103 * src/files.c: Standardize.
4104 (compute_header_macro): New.
4105 (defines_obstack_save): New. Use compute_header_macro.
4106 (output_files): Update. Use defines_obstack_save.
4108 2001-08-15 Akim Demaille <akim@epita.fr>
4110 * doc/bison.texinfo (Table of Symbols): Document
4113 2001-08-15 Akim Demaille <akim@epita.fr>
4115 * missing: Update from CVS Automake.
4116 * config/config.guess, config/config.sub, config/texinfo.tex:
4117 Update from gnu.org.
4119 2001-08-15 Akim Demaille <akim@epita.fr>
4121 * Makefile.maint: Sync with CVS Autoconf.
4123 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
4125 * doc/bison.texinfo: Include GNU Free Documentation License from
4127 * doc/fdl.texi: Add to package.
4129 2001-08-14 Marc Autret <autret_m@epita.fr>
4131 Turn on %{source,header}_extension features.
4133 * src/lex.c (percent_table): Un-CPP out header_extension and
4135 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
4136 (compute_exts_from_src): Remove conditions. It restores priorities
4139 2001-08-14 Marc Autret <autret_m@epita.fr>
4141 * src/files.c (compute_base_names): Add extensions computing when
4142 `--file-prefix' used.
4143 Standardize function calls.
4145 2001-08-13 Marc Autret <autret_m@epita.fr>
4147 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
4148 defining it (defined but null disables alloca).
4150 2001-08-13 Marc Autret <autret_m@epita.fr>
4152 * src/bison.simple (_yy_memcpy): CPP reformat.
4154 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
4156 * tests/atconfig.in (CPPFLAGS): Fix.
4158 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
4160 * doc/bison.texinfo: Include GNU General Public License from
4162 * doc/gpl.texi: Add to package.
4164 2001-08-10 Marc Autret <autret_m@epita.fr>
4166 * src/print_graph.h: Fix.
4167 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
4169 2001-08-10 Akim Demaille <akim@epita.fr>
4171 * src/system.h: Provide default declarations for stpcpy, strndup,
4174 2001-08-10 Robert Anisko <anisko_r@epita.fr>
4176 * doc/bison.texinfo (Locations): Update @$ stuff.
4178 2001-08-09 Robert Anisko <anisko_r@epita.fr>
4180 * src/bison.simple (YYLLOC_DEFAULT): Update.
4183 2001-08-08 Marc Autret <autret_m@epita.fr>
4185 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
4186 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
4187 Reported by Fabrice Bauzac.
4189 2001-08-08 Marc Autret <autret_m@epita.fr>
4191 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
4192 * src/vcg.c (output_node): Fix.
4193 * src/vcg.h: Cleanup.
4194 * src/print_graph.c: Add comments.
4195 (node_output_size): New global variable. Simplify the formatting of
4196 the VCG graph output.
4197 (print_actions): Unused code is now used. It notifies the final state
4198 and no action states in the VCG graph. It also give the reduce actions.
4199 The `shift and goto' edges are red and the `go to state' edges are
4201 Get the current node name and node_obstack by argument.
4202 (node_obstack): New variable.
4203 (print_state): Manage node_obstack.
4204 (print_core): Use node_obstack given by argument.
4205 A node is not only computed here but in print_actions also.
4206 (print_graph): CPP out useless code instead of commenting it.
4208 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
4210 * tests/atconfig.in (CPPFLAGS): Fix.
4212 2001-08-07 Akim Demaille <akim@epita.fr>
4214 * src/print_graph.c (quote): New.
4215 (print_core): Use it.
4217 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
4219 * src/vcg.c (complain.h): Include it.
4220 Unepitaize `return' invocations.
4221 [NDEBUG] (main): Remove.
4222 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
4223 * src/files.c (open_files): Initialize graph_obstack.
4224 * src/print_graph.c (print_actions): CPP out useless code.
4225 (print_core): Don't output the last `\n' in labels.
4227 * src/files.c (output_files): Output the VCG file.
4228 * src/main.c (main): Invoke print_graph ();
4230 2001-08-06 Marc Autret <autret_m@epita.fr>
4232 Automaton VCG graph output.
4233 Using option ``-g'' or long option ``--graph'', you can generate
4234 a gram_filename.vcg file containing a VCG description of the LALR (1)
4235 automaton of your grammar.
4237 * src/main.c: Call to print_graph() function.
4238 * src/getargs.h: Update.
4239 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
4240 (graph_flag): New flag.
4242 (getargs): Add case `g'.
4243 * src/files.c (graph_obstack): New obstack struct.
4244 (open_files): Initialize new obstack.
4245 (output_files): Saves graph_obstack if required.
4246 * src/files.h (graph_obstack): New extern declaration.
4247 * src/Makefile.am: Add new source files.
4249 2001-08-06 Marc Autret <autret_m@epita.fr>
4251 * src/print_graph.c, src/print_graph.h (graph): New.
4252 * src/vcg.h: New file.
4253 * src/vcg.c: New file, VCG graph handling.
4255 2001-08-06 Marc Autret <autret_m@epita.fr>
4257 Add of %source_extension and %header_extension which specify
4258 the source or/and the header output file extension.
4260 * src/files.c (compute_base_names): Remove initialisation of
4261 src_extension and header_extension.
4262 (compute_exts_from_gf): Update.
4263 (compute_exts_from_src): Update.
4264 (output_files): Update.
4265 * src/reader.c (parse_header_extension_decl): New.
4266 (parse_source_extension_decl): New.
4267 (read_declarations): New case statements for the new tokens.
4268 * src/lex.c (percent_table): Add entries for %source_extension
4269 and %header_extension.
4270 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
4272 2001-08-06 Marc Autret <autret_m@epita.fr>
4274 * configure.in: Bump to 1.28c.
4275 * doc/bison.texinfo: Texinfo thingies.
4277 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
4279 * tests/atconfig.in (CPPFLAGS): Add.
4280 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
4282 2001-08-03 Akim Demaille <akim@epita.fr>
4286 2001-08-03 Akim Demaille <akim@epita.fr>
4288 * tests/Makefile.am (check-local): Ship testsuite.
4289 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
4292 2001-08-03 Akim Demaille <akim@epita.fr>
4294 * configure.in: Try using -Wformat when compiling.
4296 2001-08-03 Akim Demaille <akim@epita.fr>
4298 * configure.in: Bump to 1.28b.
4300 2001-08-03 Akim Demaille <akim@epita.fr>
4302 * src/complain.c: Adjust strerror_r portability issues.
4304 2001-08-03 Akim Demaille <akim@epita.fr>
4308 2001-08-03 Akim Demaille <akim@epita.fr>
4310 * src/getargs.c, src/getarg.h (skeleton)): Constify.
4311 * src/lex.c (literalchar): Avoid name clashes on `buf'.
4312 * src/getargs.c: Include complain.h.
4313 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
4314 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
4316 2001-08-03 Akim Demaille <akim@epita.fr>
4318 * src/reader.c (readgram): Display hidden chars in error messages.
4320 2001-08-03 Akim Demaille <akim@epita.fr>
4322 Update to gettext 0.10.39.
4324 2001-08-03 Akim Demaille <akim@epita.fr>
4326 * lib/strspn.c: New.
4328 2001-08-01 Marc Autret <autret_m@epita.fr>
4330 * doc/bison.texinfo: Update.
4331 * doc/bison.1 (mandoc): Update.
4332 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
4333 * src/files.c: Support output files extensions computing.
4334 (src_extension): New static variable.
4335 (header_extension): New static variable.
4337 (get_extension_index): New function, gets the index of an extension
4338 filename in a string.
4339 (compute_exts_from_gf): New function, computes extensions from the
4340 grammar file extension.
4341 (compute_exts_from_src): New functions, computes extensions from the
4342 C source file extension, file given by ``-o'' option.
4343 (compute_base_names): Update.
4344 (output_files): Update.
4346 2001-08-01 Robert Anisko <anisko_r@epita.fr>
4348 * doc/bison.texi: Document @$.
4349 (Locations): New section.
4351 2001-07-18 Akim Demaille <akim@epita.fr>
4353 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
4354 * config/prev-version.txt, config/move-if-change: New.
4355 * Makefile.am: Adjust.
4357 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
4359 * src/bison.simple (yyparse): Suppress warning `comparaison
4360 between signed and unsigned'.
4362 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
4364 * src/getargs.h (raw_flag): Remove.
4365 * src/getargs.c: Die on `-r'/`--raw'.
4366 * src/lex.c (parse_percent_token): Die on `%raw'.
4367 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
4368 * tests/calc.at: Suppress test with option `--raw'.
4370 2001-07-14 Akim Demaille <akim@epita.fr>
4373 * configure.in: Require Autoconf 2.50.
4374 Update to gettext 0.10.38.
4376 2001-03-16 Akim Demaille <akim@epita.fr>
4378 * doc/bison.texinfo: ANSIfy the examples.
4380 2001-03-16 Akim Demaille <akim@epita.fr>
4382 * getargs.c (skeleton): New variable.
4383 (longopts): --skeleton is a new option.
4384 (shortopts, getargs): -S is a new option.
4385 * getargs.h: Declare skeleton.
4386 * output.c (output_parser): Use it.
4388 2001-03-16 Akim Demaille <akim@epita.fr>
4390 * m4/strerror_r.m4: New.
4391 * m4/error.m4: Run AC_FUNC_STRERROR_R.
4392 * lib/error.h, lib/error.c: Update.
4394 2001-03-16 Akim Demaille <akim@epita.fr>
4396 * src/getargs.c (longopts): Clean up.
4398 2001-02-21 Akim Demaille <akim@epita.fr>
4400 * src/reader.c (gensym): `gensym_count' is your own.
4401 Use a static buf to create the symbol name, as token_buffer is no
4404 2001-02-08 Akim Demaille <akim@epita.fr>
4406 * src/conflicts.c (conflict_report): Be sure not to append to res
4407 between two calls, which could happen if both first sprintf were
4408 skipped, but not the first cp += strlen.
4410 2001-02-08 Akim Demaille <akim@epita.fr>
4412 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
4413 New, from fileutils 4.0.37.
4414 * configure.in: Require Autoconf 2.49c. I took some time before
4415 making this decision. This is the only way out for portability
4416 issues in Bison, it would mean way too much duplicate effort to
4417 import in Bison features implemented in 2.49c since 2.13.
4418 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
4420 2001-02-02 Akim Demaille <akim@epita.fr>
4422 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
4423 * lib/xalloc.h, lib/xmalloc.c: Update.
4425 2001-01-19 Akim Demaille <akim@epita.fr>
4427 Get rid of the ad hoc handling of token_buffer in the scanner: use
4430 * src/lex.c (token_obstack): New.
4431 (init_lex): Initialize it. No longer call...
4432 (grow_token_buffer): this. Remove it.
4433 Adjust all the places which used it to use the obstack.
4435 2001-01-19 Akim Demaille <akim@epita.fr>
4437 * src/lex.h: Rename all the tokens:
4438 s/\bENDFILE\b/tok_eof/g;
4439 s/\bIDENTIFIER\b/tok_identifier/g;
4441 Let them be enums, not #define, to ease debugging.
4442 Adjust all the code.
4444 2001-01-18 Akim Demaille <akim@epita.fr>
4446 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
4447 * src/lex.c (maxtoken, grow_token_buffer): Static.
4449 2001-01-18 Akim Demaille <akim@epita.fr>
4451 Since we now use obstacks, more % directives can be enabled.
4453 * src/lex.c (percent_table): Also accept `%yacc',
4454 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
4456 Handle the actions for `%semantic_parser' and `%pure_parser' here,
4457 instead of returning a token.
4458 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
4459 * src/reader.c (read_declarations): Adjust.
4460 * src/files.c (open_files): Don't call `compute_base_names', don't
4461 compute `attrsfile' since they depend upon data which might be
4462 *in* the input file now.
4463 (output_files): Do it here.
4464 * src/output.c (output_headers): Document the fact that this patch
4465 introduces a guaranteed SEGV for semantic parsers.
4466 * doc/bison.texinfo: Document them.
4467 * tests/suite.at: Exercise these %options.
4469 2000-12-20 Akim Demaille <akim@epita.fr>
4471 Also handle the output file (--verbose) with obstacks.
4473 * files.c (foutput): Remove.
4474 (output_obstack): New.
4475 Adjust all dependencies.
4476 * src/conflicts.c: Return a string.
4477 * src/system.h (obstack_grow_string): Rename as...
4478 (obstack_sgrow): this. Be ready to work with non literals.
4479 (obstack_fgrow4): New.
4481 2000-12-20 Akim Demaille <akim@epita.fr>
4483 * src/files.c (open_files): Fix the computation of short_base_name
4484 in the case of `-o foo.tab.c'.
4486 2000-12-20 Akim Demaille <akim@epita.fr>
4488 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
4489 (copy_dollar): Now that everything uses obstacks, get rid of the
4492 2000-12-20 Akim Demaille <akim@epita.fr>
4494 * src/files.c (open_files): Actually the `.output' file is based
4495 on the short_base_name, not base_name.
4496 * tests/suite.at (Checking output file names): Adjust.
4498 2000-12-20 Akim Demaille <akim@epita.fr>
4500 * src/bison.s1: Remove, we now use directly...
4501 * src/bison.simple: this.
4502 * src/Makefile.am: Use pkgdata instead of data.
4504 2000-12-20 Akim Demaille <akim@epita.fr>
4506 * src/files.c (guard_obstack): New.
4507 (open_files): Initialize it.
4508 (output_files): Dump it...
4509 * src/files.h: Export it.
4510 * src/reader.c (copy_guard): Use it.
4512 2000-12-19 Akim Demaille <akim@epita.fr>
4514 * src/files.c (outfile, defsfile, actfile): Removed as global
4516 (open_files): Don't compute them.
4517 (output_files): Adjust.
4518 (base_name, short_base_name): Be global.
4519 Adjust dependencies.
4521 2000-12-19 Akim Demaille <akim@epita.fr>
4523 * src/files.c (strsuffix): New.
4524 (stringappend): Be just like strcat but allocate.
4525 (base_names): Eve out from open_files.
4526 Try to simplify the rather hairy computation of base_name and
4528 (open_files): Use it.
4529 * tests/suite.at (Checking output file names): New test.
4531 2000-12-19 Akim Demaille <akim@epita.fr>
4533 * src/system.h (obstack_grow_literal_string): Rename as...
4534 (obstack_grow_string): this.
4535 * src/output.c (output_parser): Recognize `%% actions' instead of
4537 * src/bison.s1: s/$/%% actions/.
4538 * src/bison.hairy: Likewise.
4540 2000-12-19 Akim Demaille <akim@epita.fr>
4542 * src/output.c (output_parser): Compute the `#line' lines when
4544 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
4545 Suggested by Hans Aberg.
4547 2000-12-19 Akim Demaille <akim@epita.fr>
4549 Let the handling of the skeleton files be local to the procedures
4552 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
4554 (fparser, open_extra_files): Remove.
4555 (open_files, output_files): Don't take care of fparser.
4556 * src/files.h: Adjust.
4557 * src/output.c (output_parser): Open and close the file to the
4559 * src/reader.c (read_declarations): When %semantic_parser, open
4562 2000-12-19 Akim Demaille <akim@epita.fr>
4564 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
4565 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
4567 2000-12-19 Akim Demaille <akim@epita.fr>
4569 * src/files.c (open_files): Yipee! We no longer need all the code
4570 looking for `/tmp' since we have no tmp file.
4572 2000-12-19 Akim Demaille <akim@epita.fr>
4574 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4576 * src/files.c (open_files): Less dependency on MSDOS etc.
4578 2000-12-14 Akim Demaille <akim@epita.fr>
4580 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4581 Provide a default definition.
4582 Use it when executing the default @ action.
4583 * src/reader.c (reader_output_yylsp): No longer include
4584 `timestamp' and `text' in the default YYLTYPE.
4586 2000-12-12 Akim Demaille <akim@epita.fr>
4588 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4589 (copy_guard): Quote the file names.
4590 Reported by Laurent Mascherpa.
4592 2000-12-12 Akim Demaille <akim@epita.fr>
4594 * src/output.c (output_headers, output_program, output): Be sure
4595 to escape special characters when outputting filenames.
4596 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4597 (output_headers): Don't depend on them, Use ACTSTR.
4599 2000-11-17 Akim Demaille <akim@epita.fr>
4601 * lib/obstack.h: Formatting changes.
4602 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4603 prevents type checking.
4604 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4605 cast the value to (void *): assigning a `foo *' to a `void *'
4607 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4608 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4611 2000-11-17 Akim Demaille <akim@epita.fr>
4613 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4615 (suite.m4, regression.m4, calc.m4): these.
4616 * tests/atgeneral.m4: Update from CVS Autoconf.
4618 2000-11-17 Akim Demaille <akim@epita.fr>
4620 * tests/regression.m4 (%union and --defines): New test,
4621 demonstrating a current bug in the obstack implementation.
4623 2000-11-17 Akim Demaille <akim@epita.fr>
4625 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4627 Use them to declare the variables which are global or local to
4630 2000-11-17 Akim Demaille <akim@epita.fr>
4632 * acconfig.h: Remove, no longer used.
4634 2000-11-07 Akim Demaille <akim@epita.fr>
4636 * src: s/Copyright (C)/Copyright/g.
4638 2000-11-07 Akim Demaille <akim@epita.fr>
4640 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4642 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4644 2000-11-07 Akim Demaille <akim@epita.fr>
4646 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4647 Merge in a single CPP if/else.
4649 2000-11-07 Akim Demaille <akim@epita.fr>
4651 * src/output.c (output): Remove useless variables.
4652 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4653 argument `data' for consistency with the prototypes.
4655 (obstack_copy, obstack_copy0): Rename the second argument as
4656 `address' for consistency. Qualify it `const'.
4657 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4658 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4659 `const' their input argument (`data' or `address').
4660 Adjust the corresponding macros to include `const' in casts.
4662 2000-11-03 Akim Demaille <akim@epita.fr>
4664 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4665 s/PFILE1/BISON_HAIRY/.
4666 Adjust dependencies.
4668 2000-11-03 Akim Demaille <akim@epita.fr>
4670 For some reason, this was not applied.
4672 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4673 `unlink': it's no longer used.
4675 2000-11-03 Akim Demaille <akim@epita.fr>
4677 * src/files.c (skeleton_find): New function, eved out of...
4678 (open_files, open_extra_files): here.
4680 2000-11-03 Akim Demaille <akim@epita.fr>
4684 * src/files.c (obstack_save): New function.
4685 (done): Rename as...
4686 (output_files): this.
4688 * src/main.c (main): Don't use `atexit' to register `done', since
4689 it no longer has to remove tmp files, just call `output_files'
4690 when there are no errors.
4692 2000-11-02 Akim Demaille <akim@epita.fr>
4694 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4695 `unlink': it's no longer used.
4696 * src/files.h: Formatting changes.
4698 2000-11-02 Akim Demaille <akim@epita.fr>
4700 Remove the last uses of mktemp and unlink/delete.
4702 * src/files.c (fdefines, ftable): Removed.
4703 (defines_ostack, table_obstack): New.
4704 Adjust dependencies of the former into uses of the latter.
4705 * src/output.c (output_short_or_char_table, output_short_table):
4706 Convert to using obstacks.
4707 * src/reader.c (copy_comment2): Accept one FILE * and two
4709 (output_token_defines, reader_output_yylsp): Use obstacks.
4710 * src/system.h (obstack_fgrow3): New.
4712 2000-11-01 Akim Demaille <akim@epita.fr>
4714 Change each use of `fattrs' into a use of `attrs_obstack'.
4716 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4717 * src/files.c (fattrs): Remove.
4718 (attrs_obstack): New.
4719 Adjust all dependencies.
4720 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4722 2000-11-01 Akim Demaille <akim@epita.fr>
4725 Change each use of `faction' into a use of `action_obstack'.
4727 * lib/obstack.h, lib/obstack.c: New files.
4728 * src/files.c (faction): Remove.
4729 (action_obstack): New.
4730 Adjust all dependencies.
4732 2000-10-20 Akim Demaille <akim@epita.fr>
4734 * lib/quote.h (PARAMS): New macro. Use it.
4736 2000-10-16 Akim Demaille <akim@epita.fr>
4738 * src/output.c (output_short_or_char_table): New function.
4739 (output_short_table, output_token_translations): Use it.
4740 (goto_actions): Use output_short_table.
4742 2000-10-16 Akim Demaille <akim@epita.fr>
4744 * src/symtab.c (bucket_new): New function.
4747 * src/output.c (output_short_table): New argument to display the
4748 comment associated with the table.
4749 Adjust dependencies.
4750 (output_gram): Use it.
4751 (output_rule_data): Nicer output layout for YYTNAME.
4753 2000-10-16 Akim Demaille <akim@epita.fr>
4755 * src/lex.c (read_typename): New function.
4757 * src/reader.c (copy_dollar): Likewise.
4759 2000-10-16 Akim Demaille <akim@epita.fr>
4761 * src/reader.c (copy_comment2): Expect the input stream to be on
4762 the `/' which is suspected to open a comment, instead of being
4763 called after `//' or `/*' was read.
4764 (copy_comment, copy_definition, parse_union_decl, copy_action)
4765 (copy_guard): Adjust.
4767 2000-10-16 Akim Demaille <akim@epita.fr>
4769 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4770 `read_signed_integer'.
4772 2000-10-16 Akim Demaille <akim@epita.fr>
4774 * src/reader.c (copy_dollar): New function.
4775 (copy_guard, copy_action): Use it.
4777 2000-10-16 Akim Demaille <akim@epita.fr>
4779 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4780 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4781 New files, from Fileutils 4.0.27.
4782 * src/main.c (printable_version): Remove.
4783 * src/lex.c, src/reader.c: Use `quote'.
4785 2000-10-04 Akim Demaille <akim@epita.fr>
4787 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4789 2000-10-04 Akim Demaille <akim@epita.fr>
4791 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4793 2000-10-04 Akim Demaille <akim@epita.fr>
4795 When a literal string is used to define two different tokens,
4796 `bison -v' segfaults.
4797 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4799 * tests/regression.m4: New file.
4800 Include the core of the sample provided by Piotr Gackiewicz.
4801 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4804 2000-10-04 Akim Demaille <akim@epita.fr>
4806 * src/reader.c (parse_expect_decl): Keep `count' within the size
4810 2000-10-02 Paul Eggert <eggert@twinsun.com>
4812 * bison.s1 (yyparse): Assign the default value
4813 unconditionally, to avoid a GCC warning and make the parser a
4816 2000-10-02 Akim Demaille <akim@epita.fr>
4818 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4821 2000-10-02 Akim Demaille <akim@epita.fr>
4823 * src/derives.c, src/print.c, src/reduce.c: To ease the
4824 translation, move some `\n' out of the translated strings.
4826 2000-10-02 Akim Demaille <akim@epita.fr>
4828 The location tracking mechanism is precious for parse error
4829 messages. Nevertheless, it is enabled only when `@n' is used in
4830 the grammar, which is a different issue (you can use it in error
4831 message, but not in the grammar per se). Therefore, there should
4832 be another means to enable it.
4834 * src/getargs.c (getargs): Support `--locations'.
4836 * src/getargs.h (locationsflag): Export it.
4837 * src/lex.c (percent_table): Support `%locations'.
4838 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4839 with `locationsflag'.
4840 * doc/bison.texinfo: Document `--locations' and `%locations'.
4842 * tests/calc.m4: Test it.
4844 For regularity of the names, replace each
4845 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4846 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4847 In addition replace each `flag' with `_flag'.
4849 2000-10-02 Akim Demaille <akim@epita.fr>
4851 Also test parse error messages, including with YYERROR_VERBOSE.
4853 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4855 Use it to check the computations.
4856 Use it to check `nonassoc' is honored.
4857 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4858 `--yyerror-verbose'.
4859 (_AT_CHECK_CALC): Adjust to this option.
4860 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4862 2000-10-02 Akim Demaille <akim@epita.fr>
4864 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4865 the latter demonstrates a flaw in the handling of non debugging
4866 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4867 was used in order to simplify:
4883 unfortunately this leads to a CPP conflict when
4884 `--name-prefix=foo' is used since it produces `#define yydebug
4887 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4888 (YYDPRINTF): New macro.
4890 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4892 Also test `--verbose', `--defines' and `--name-prefix'.
4894 2000-10-02 Akim Demaille <akim@epita.fr>
4896 Improve the readability of the produced parsers.
4898 * src/bison.s1: Formatting changes.
4899 Improve the comment related to the `$' mark.
4900 (yydefault): Don't fall through to `yyresume': `goto' there.
4901 * src/output.c (output_parser): When the `$' is met, skip the end
4903 New variable, `number_of_dollar_signs', to check there's exactly
4904 one `$' in the parser skeleton.
4906 2000-10-02 Akim Demaille <akim@epita.fr>
4908 * lib/xstrdup.c: New file, from the fileutils.
4909 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4910 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4911 instead of strlen + xmalloc + strcpy.
4912 * src/symtab.c (copys): Remove, use xstrdup instead.
4914 2000-10-02 Akim Demaille <akim@epita.fr>
4916 * src/gram.h (associativity): New enum type which replaces the
4917 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4918 `right_assoc', `left_assoc' and `non_assoc'.
4919 Adjust all dependencies.
4920 * src/reader.c: Formatting changes.
4921 (LTYPESTR): Don't define it, use it as a literal in
4922 `reader_output_yylsp'.
4923 * src/symtab.h (symbol_class): New enum type which replaces the
4924 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4925 `sunknown', `stoken and `snterm'.
4927 2000-10-02 Akim Demaille <akim@epita.fr>
4929 * src/getargs.c (fixed_outfiles): Rename as...
4930 (yaccflag): for consistency and accuracy.
4931 Adjust dependencies.
4933 2000-10-02 Akim Demaille <akim@epita.fr>
4935 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4936 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4937 difficult and introduced a lot of core dump. It turns out that
4938 Bison used an implementation of `xmalloc' based on `calloc', and
4939 at various places it does depend upon the initialization to 0. I
4940 have not tried to isolate the pertinent places, and all the former
4941 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4942 someone should address this issue.
4944 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4945 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4947 Adjust dependencies.
4948 * src/warshall.h: New file.
4951 2000-10-02 Akim Demaille <akim@epita.fr>
4953 Various anti-`extern in *.c' changes.
4955 * src/system.h: Include `assert.h'.
4957 2000-10-02 Akim Demaille <akim@epita.fr>
4959 * src/state.h (nstates, final_state, first_state, first_shift)
4960 (first_reduction): Move their exportation from here...
4961 * src/LR0.h: to here.
4962 Adjust dependencies.
4963 * src/getargs.c (statisticsflag): New variable.
4964 Add support for `--statistics'.
4965 Adjust dependencies.
4967 Remove a lot of now useless `extern' statements in most files.
4969 2000-10-02 Akim Demaille <akim@epita.fr>
4971 * src/LR0.h: New file.
4974 2000-10-02 Akim Demaille <akim@epita.fr>
4976 * src/print.h: New file.
4978 * src/print.c: Formatting and ordering changes.
4979 (verbose, terse): Replace with...
4980 (print_results): this new function.
4981 Adjust dependencies.
4983 2000-10-02 Akim Demaille <akim@epita.fr>
4985 * src/conflicts.c (conflict_report): New function.
4986 (conflict_log, verbose_conflict_log): Replace with...
4987 (print_conflicts): this function.
4988 Adjust dependencies.
4989 * src/conflicts.h: New file.
4990 Propagate its inclusion.
4992 2000-10-02 Akim Demaille <akim@epita.fr>
4994 * src/nullable.h: New file.
4995 Propagate its inclusion.
4996 * src/nullable.c: Formatting changes.
4998 2000-10-02 Akim Demaille <akim@epita.fr>
5000 * src/reduce.h: New file.
5001 Propagate its inclusion.
5002 * src/reduce.c: Topological sort and other formatting changes.
5003 (bool, TRUE, FALSE): Move their definition to...
5004 * src/system.h: here.
5006 2000-10-02 Akim Demaille <akim@epita.fr>
5008 * src/files.c: Formatting changes.
5009 (tryopen, tryclose, openfiles): Rename as...
5010 (xfopen, xfclose, open_files): this.
5011 (stringappend): static.
5012 * src/files.h: Complete the list of exported symbols.
5015 2000-10-02 Akim Demaille <akim@epita.fr>
5017 * src/reader.h: New file.
5018 Propagate its use instead of tedious list of `extern' and
5020 * src/reader.c: Formatting changes, topological sort,
5023 2000-10-02 Akim Demaille <akim@epita.fr>
5025 * src/lex.h: Prototype `lex.c' exported functions.
5026 * src/reader.c: Adjust.
5027 * src/lex.c: Formatting changes.
5028 (safegetc): Rename as...
5031 2000-10-02 Akim Demaille <akim@epita.fr>
5033 * src/lalr.h: New file.
5034 Propagate its inclusion instead of prototypes and `extern'.
5035 * src/lalr.c: Formatting changes, topological sorting etc.
5037 2000-10-02 Akim Demaille <akim@epita.fr>
5039 * src/output.c (token_actions): Introduce a temporary array,
5040 YYDEFACT, that makes it possible for this function to use
5043 2000-10-02 Akim Demaille <akim@epita.fr>
5045 `user_toknums' is output as a `short[]' in `output.c', while it is
5046 defined as a `int[]' in `reader.c'. For consistency with the
5047 other output tables, `user_toknums' is now defined as a table of
5050 * src/reader.c (user_toknums): Be a short table instead of an int
5052 Adjust dependencies.
5054 Factor the short table outputs.
5056 * src/output.c (output_short_table): New function.
5057 * src/output.c (output_gram, output_stos, output_rule_data)
5058 (output_base, output_table, output_check): Use it.
5060 2000-10-02 Akim Demaille <akim@epita.fr>
5062 * src/output.c (output): Topological sort of the functions, in
5063 order to get rid of the `static' prototypes.
5064 No longer use `register'.
5065 * src/output.h: New file.
5066 Propagate its inclusion in files explicitly prototyping functions
5069 2000-09-21 Akim Demaille <akim@epita.fr>
5071 * src/atgeneral.m4: Update from Autoconf.
5073 2000-09-21 Akim Demaille <akim@epita.fr>
5075 * src/closure.h: New file.
5076 * src/closure.c: Formatting changes, topological sort over the
5077 functions, use of closure.h.
5078 (initialize_closure, finalize_closure): Rename as...
5079 (new_closure, free_closure): these. Adjust dependencies.
5080 * src/LR0.c: Formatting changes, topological sort, use of
5082 (initialize_states): Rename as...
5084 * src/Makefile.am (noinst_HEADERS): Adjust.
5086 2000-09-20 Akim Demaille <akim@epita.fr>
5088 * src/acconfig.h: Don't protect config.h against multiple
5090 Don't define PARAMS.
5091 * src/system.h: Define PARAMS.
5092 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
5093 purpose of config.h. system.h must not try to fix wrong
5094 definitions in config.h.
5096 2000-09-20 Akim Demaille <akim@epita.fr>
5098 * src/derives.h: New file.
5099 * src/main.c, src/derives.h: Use it.
5101 * src/Makefile.am (noinst_HEADERS): Adjust.
5103 2000-09-20 Akim Demaille <akim@epita.fr>
5105 * tests/atgeneral.m4: Update from Autoconf.
5106 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
5107 (AT_CHECK_CALC): New macros.
5108 Use these macros to test bison with options `', `--raw',
5109 `--debug', `--yacc', `--yacc --debug'.
5111 2000-09-19 Akim Demaille <akim@epita.fr>
5113 * src/output.c: Formatting changes.
5114 * src/machine.h: Remove, leaving its contents in...
5115 * src/system.h: here.
5117 Adjust all dependencies on stdio.h and machine.h.
5118 * src/getargs.h: New file.
5119 Let all `extern' declarations about getargs.c be replaced with
5120 inclusion of `getargs.h'.
5121 * src/Makefile.am (noinst_HEADERS): Adjust.
5123 * tests/calc.m4 (yyin): Be initialized in main, not on the global
5125 (yyerror): Returns void, not int.
5126 * doc/bison.texinfo: Formatting changes.
5128 2000-09-19 Akim Demaille <akim@epita.fr>
5130 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
5133 2000-09-18 Akim Demaille <akim@epita.fr>
5135 * configure.in: Append WARNING_CFLAGS to CFLAGS.
5136 * src/Makefile.am (INCLUDES): Don't.
5137 Be ready to fetch headers in lib/.
5139 2000-09-18 Akim Demaille <akim@epita.fr>
5141 * doc/bison.texinfo: Update the copyright.
5142 ANSIfy and GNUify the examples.
5143 Remove the old menu.
5145 2000-09-18 Akim Demaille <akim@epita.fr>
5147 First set of tests: use the `calc' example from the documentation.
5149 * src/bison.s1 (yyparse): Condition the code using `yytname' which
5150 is defined only when YYDEBUG is.
5151 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
5152 * src/files.c (tryopen, tryclose): Formatting changes.
5153 Move to the top and be static.
5154 * src/reader.c (read_signed_integer): Likewise.
5155 * tests/calc.m4: New file.
5156 * Makefile.am, suite.m4: Adjust.
5157 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
5159 2000-09-18 Akim Demaille <akim@epita.fr>
5161 Add support for an Autotest test suite for Bison.
5163 * m4/m4.m4, m4/atconfig.m4: New files.
5164 * m4/Makefile.am (EXTRA_DIST): Adjust.
5165 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
5167 * src/getargs.c: Display a more standard --version message.
5168 * src/reader.c (reader): Formatting changes.
5169 No longer depend upon VERSION_STRING.
5170 * configure.in: No longer use `dnl'.
5171 Set up the test suite and the new directory `tests/.
5172 (VERSION_STRING): Remove.
5174 2000-04-14 Akim Demaille <akim@epita.fr>
5176 * src/reader.c (copy_comment2): New function, same as former
5177 `copy_comment', but outputs into two FILE *.
5178 (copy_comment): Use it.
5179 (parse_union_decl): Use it.
5180 (get_type, parse_start_decl): Use the same `invalid' message.
5181 (parse_start_decl, parse_union_decl): Use the same `multiple'
5183 (parse_union_decl, copy_guard, copy_action): Use the same
5184 `unmatched' message.
5185 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
5187 2000-03-31 Akim Demaille <akim@epita.fr>
5189 * src/files.c (tryopen, tryclose): Move to the top.
5192 2000-03-31 Akim Demaille <akim@epita.fr>
5194 * src/main.c (main): Don't call `done', exit does it.
5196 2000-03-31 Akim Demaille <akim@epita.fr>
5198 * allocate.c: s/return (foo)/return foo/.
5201 * output.c: Likewise.
5202 * reader.c: Likewise.
5203 * symtab.c: Likewise.
5204 * vmsgetargs.c: Likewise.
5206 2000-03-31 Akim Demaille <akim@epita.fr>
5208 Clean up the error reporting functions.
5210 * src/report.c: New file.
5211 * src/report.h: Likewise.
5212 * src/Makefile.am: Adjust.
5213 * m4/error.m4: New file.
5214 * m4/Makefile.am: Adjust.
5215 * configure.in (jm_PREREQ_ERROR): Call it.
5216 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
5218 (fatal, fatals): Remove. All callers use complain.c::fatal.
5219 (warn, warni, warns, warnss, warnss): Remove. All callers use
5220 complain.c::complain.
5221 (toomany): Remove, use fatal instead.
5222 * src/files.c (done): No argument, use complain_message_count.
5223 * src/main.c (main): Register `done' to `atexit'.
5225 * src/getargs.c (usage): More `fputs', less `fprintf'.
5227 2000-03-28 Akim Demaille <akim@epita.fr>
5229 * lib/: New directory.
5230 * Makefile.am (SUBDIRS): Adjust.
5231 * configure.in: Adjust.
5232 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
5234 * src/alloca.c: Moved to lib/.
5235 * src/getopt.c: Likewise.
5236 * src/getopt1.c: Likewise.
5237 * src/getopt.h: Likewise.
5238 * src/ansi2knr.c: Likewise.
5239 * src/ansi2knr.1: Likewise.
5240 * src/Makefile.am: Adjust.
5241 * lib/Makefile.am: New file.
5243 2000-03-28 Akim Demaille <akim@epita.fr>
5245 * src/getargs.c (usage): Refresh the help message.
5247 2000-03-17 Akim Demaille <akim@epita.fr>
5249 * src/getopt1.c: Updated from textutils 2.0e
5250 * src/getopt.c: Likewise.
5251 * src/getopt.h: Likewise.
5253 2000-03-17 Akim Demaille <akim@epita.fr>
5255 * src/Makefile.am (bison.simple): Fix the awk program: quote only
5256 the file name, not the whole `#line LINE FILE'.
5258 2000-03-17 Akim Demaille <akim@epita.fr>
5260 On syntax errors, report the token on which we choked.
5262 * src/bison.s1 (yyparse): In the label yyerrlab, when
5263 YYERROR_VERBOSE, add yychar in msg.
5265 2000-03-17 Akim Demaille <akim@epita.fr>
5267 * src/reader.c (copy_at): New function.
5268 (copy_guard): Use it.
5269 (copy_action): Use it.
5271 2000-03-17 Akim Demaille <akim@epita.fr>
5273 Be kind to translators, save some useless translations.
5275 * src/main.c (banner): New function.
5276 (fatal_banner): Use it.
5277 (warn_banner): Use it.
5279 2000-03-17 Akim Demaille <akim@epita.fr>
5281 * src/reader.c (copy_definition): Use copy_string and
5282 copy_comment. Removed now unused `match', `ended',
5284 (copy_comment, copy_string): Moved, to be visible from
5287 2000-03-17 Akim Demaille <akim@epita.fr>
5289 * src/reader.c (copy_string): Declare `static inline'. No
5290 problems with inline, since it is checked by configure.
5291 (copy_comment): Likewise.
5293 2000-03-17 Akim Demaille <akim@epita.fr>
5295 * src/reader.c (packsymbols): Formatting changes.
5297 2000-03-17 Akim Demaille <akim@epita.fr>
5299 * src/reader.c (copy_comment): New function, factored out from:
5300 (copy_action): Use it. Removed now unused `match', `ended',
5302 (copy_guard): Likewise.
5304 2000-03-17 Akim Demaille <akim@epita.fr>
5306 * src/reader.c (copy_string): New function, factored out from:
5307 (copy_action): Use it.
5308 (copy_guard): Likewise.
5310 2000-03-17 Akim Demaille <akim@epita.fr>
5312 Change the handling of @s so that they behave exactly like $s.
5313 There is now a pseudo variable @$ (readble and writable), location
5314 of the lhs of the rule (by default ranging from the location of
5315 the first symbol of the rhs, to the location of the last symbol,
5316 or, if the rhs is empty, YYLLOC).
5318 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
5320 (yyparse): When providing a default semantic action, provide a
5321 default location action.
5322 (after the $): No longer change `*YYLSP', just stack YYLOC the
5323 same way you stack YYVAL.
5324 * src/reader.c (read_declarations): Use warns.
5325 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
5326 (copy_action, case '@'): Likewise.
5327 Use a standard error message, to save useless work from
5330 2000-03-17 Akim Demaille <akim@epita.fr>
5332 * src/bison.s1: Formatting and cosmetics changes.
5333 * src/reader.c: Likewise.
5334 Update the Copyright notice.
5336 2000-03-17 Akim Demaille <akim@epita.fr>
5338 * src/bison.s1 (#line): All set to `#line' only, since the
5339 Makefile now handles them.
5341 2000-03-16 Akim Demaille <akim@epita.fr>
5343 * src/output.c (output_rule_data): Output the documentation of
5345 (Copyright notice): Update.
5348 2000-03-16 Akim Demaille <akim@epita.fr>
5350 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
5351 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
5352 One `#if YYDEBUG' remains, since it uses variables which are
5353 defined only if `YYDEBUG != 0'.
5355 2000-03-16 Akim Demaille <akim@epita.fr>
5357 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
5358 and related variables so that the similarities are highlighted.
5360 2000-03-16 Akim Demaille <akim@epita.fr>
5362 * src/bison.s1: Properly indent CPP directives.
5364 2000-03-16 Akim Demaille <akim@epita.fr>
5366 * src/bison.s1: Properly indent the `alloca' CPP section.
5368 2000-03-16 Akim Demaille <akim@epita.fr>
5370 Do not hard code values of directories in `configure.in'.
5371 Update the `configure' tool chain.
5373 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
5375 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
5376 (AC_OUTPUT): Add m4/Makefile.
5377 Bump to bison 1.28a, 1.29 has never been released.
5378 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
5379 handled via src/Makefile.am.
5380 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
5381 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
5383 * Makefile.am (SUBDIRS): Add m4.
5384 (ACLOCAL_AM_FLAGS): New variable.
5385 (AUTOMAKE_OPTIONS): Add check-news.
5386 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
5387 the proper line number and file name.
5388 (DEFS): Propagate the location of bison library files and of the
5390 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
5392 * acinclude.m4: Remove, replaced by the directory m4.
5393 * m4/Makefile.am (EXTRA_DIST): New variable.
5394 * m4/gettext.m4: New file, from the fileutils.
5395 * m4/lcmessage.m4: Likewise
5396 * m4/progtest.m4: Likewise.
5397 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
5399 2000-03-10 Akim Demaille <akim@epita.fr>
5402 Formatting changes of various comments.
5403 Respect the GNU coding standards at various places.
5404 Don't use `_()' when no translation is needed.
5406 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5409 OS/2 honors TMPDIR environment variable.
5411 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5413 * doc/bison.texinfo: Tweaked spelling and grammar.
5415 Removed reference to price of printed copy.
5416 Mention BISON_SIMPLE and BISON_HAIRY.
5418 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5420 * configure.in, NEWS:
5421 Bison 1.29 released.
5423 1999-10-27 Jesse Thilo <jthilo@gnu.org>
5425 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
5426 Added reference card.
5428 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5430 * po/ru.po: Added Russian translation.
5432 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5434 * configure.in: Added Russian translation.
5436 1999-07-06 Jesse Thilo <jthilo@gnu.org>
5438 * configure.in, NEWS, README:
5439 Released version 1.28.
5441 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5444 Squashed redefinition warning on some systems.
5446 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
5447 Have configure build version string instead of relying on ANSI string
5450 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5452 * po/POTFILES.in: Got rid of version.c.
5454 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5456 * acconfig.h, configure.in:
5457 Have configure build version string instead of relying on ANSI string
5460 1999-06-08 Jesse Thilo <jthilo@gnu.org>
5463 Dropped mention of `+' for long-named options.
5465 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5467 * src/files.c: Added <unistd.h> for unlink().
5469 * src/Makefile.am, src/system.h:
5472 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5474 * README: Added a FAQ list.
5476 * configure.in, acconfig.h:
5479 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5481 * doc/FAQ, doc/Makefile.am:
5484 1999-05-19 Jesse Thilo <jthilo@gnu.org>
5486 * src/alloc.h, src/symtab.h, src/version.c:
5487 Protected inclusion of "config.h" with HAVE_CONFIG_H.
5489 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5491 * src/.cvsignore, src/Makefile.am:
5492 Reorganized: sources in `src', documentation in `doc'.
5494 * src/lex.c (literalchar):
5495 fixed the code for escaping double quotes (thanks
5498 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5500 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
5501 Adjusted paths to reflect directory reorganization.
5503 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5505 * doc/.cvsignore, doc/Makefile.am:
5506 Reorganized: sources in `src', documentation in `doc'.
5508 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5511 Updated AC_INIT file to reflect directory reorganization.
5513 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
5514 Reorganized: sources in `src', documentation in `doc'.
5516 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5519 Don't declare calloc() and realloc() if not necessary.
5521 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5523 * configure.in, acconfig.h, acinclude.m4:
5524 Don't declare calloc() and realloc() if not necessary.
5526 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5528 * po/.cvsignore: Added i18n support.
5530 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5532 * acconfig.h, configure.in, Makefile.am:
5535 1999-03-22 Jesse Thilo <jthilo@gnu.org>
5537 * src/bison.s1: Fixed #line numbers.
5539 1999-03-15 Jesse Thilo <jthilo@gnu.org>
5541 * po/es.po, po/fr.po, po/nl.po, po/de.po:
5542 Added PO files from Translation Project.
5544 1999-03-03 Jesse Thilo <jthilo@gnu.org>
5547 Added support for non-ANSI compilers (ansi2knr).
5549 1999-02-16 Jesse Thilo <jthilo@gnu.org>
5551 * configure.in: Bumped version number to 1.27.
5554 Added `bison.simple' to list of files removed by `make distclean'.
5556 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5558 * src/files.c, src/files.h:
5559 Defined locations of parser files in config.h instead of Makefile.
5561 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5563 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
5564 Defined locations of parser files in config.h instead of Makefile.
5566 1999-02-09 Jesse Thilo <jthilo@gnu.org>
5569 Removed inappropriate use of $< macro.
5571 1999-02-05 Jesse Thilo <jthilo@gnu.org>
5573 * po/Makefile.in.in, po/POTFILES.in:
5574 Add `po' directory skeleton.
5576 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5578 * README: Document help-bison list.
5580 * configure.in: Add check for mkstemp().
5582 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5584 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5585 Hush a few compiler warnings.
5588 Add tryclose(), which verifies that fclose was successful.
5589 Hush a couple of compiler warnings.
5591 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5593 * Makefile.am, OChangeLog:
5594 ChangeLog is now automatically generated. Include the old version as
5597 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5599 * 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:
5602 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5604 * doc/bison.texinfo: Fix formatting glitch.
5606 * doc/bison.texinfo: Update FSF address.
5608 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5610 * acconfig.h: Update FSF address.
5612 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5615 Don't define PACKAGE here, since config.h defines it.
5617 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5619 * src/reader.c: Update copyright date.
5622 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5623 favor of output directly to stderr (avoids buffer overruns).
5625 * src/reader.c: Some checks for premature EOF.
5627 * 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:
5628 Use prototypes if the compiler understands them.
5630 * src/files.c: Honor TMPDIR on Unix hosts.
5631 Use prototypes if the compiler understands them.
5634 Fix a couple of buffer overrun bugs.
5635 Use prototypes if the compiler understands them.
5637 * src/system.h: Include unistd.h and ctype.h.
5638 Use #ifdef instead of #if for NLS symbols.
5640 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5642 * doc/bison.texinfo:
5643 Delete comment "consider using @set for edition number, etc..." since
5644 we now are doing so.
5646 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5649 Use prototypes if the compiler understands them.
5651 * NEWS: Document 1.26 highlights.
5653 * Makefile.am: Require Automake 1.3 or later.
5656 Use prototypes if the compiler understands them.
5658 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5661 Use VERSION symbol from automake for version number.
5663 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5665 * acconfig.h, configure.in, version.cin:
5666 Use VERSION symbol from automake for version number.
5668 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5671 Distribute original version of simple parser (bison.s1), not built
5672 version (bison.simple).
5674 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5676 * doc/bison.texinfo: Add info dir entry.
5678 * doc/bison.texinfo:
5679 Let automake put version number into documentation.
5681 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5683 * src/bison.cld, src/build.com, src/vmshlp.mar:
5684 Add non-RCS files from /gd/gnu/bison.
5686 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5689 Document the BISON_HAIRY and BISON_SIMPLE variables.
5691 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5693 * src/version.c: Build version.c automatically.
5696 Fix token numbering (used to start at 258, not 257).
5698 * src/system.h: Include config.h.
5700 * src/getargs.c: Update bug report address.
5702 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5703 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5705 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5708 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5710 * configure.in, version.cin:
5711 Build version.c automatically.
5713 * AUTHORS: Add AUTHORS file.
5715 * README: Update bug report address.
5718 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5720 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5723 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5725 * doc/bison.texinfo: Clean up some formatting.
5727 1998-05-05 Richard Stallman <rms@gnu.org>
5729 * doc/bison.texinfo:
5730 Explain better why to make a pure parser.
5732 1998-01-05 Richard Stallman <rms@gnu.org>
5734 * src/files.c (openfiles):
5735 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5736 find a temporary directory, if possible. Do not unlink files while
5739 1997-08-25 Richard Stallman <rms@gnu.org>
5741 * src/reader.c (stack_offset;):
5742 Change some warni to warns.
5744 * src/lex.c (literalchar): Use warns, not warni.
5746 1997-06-28 Richard Stallman <rms@gnu.org>
5748 * src/bison.s1: Add a Bison version comment.
5750 * src/main.c (fatal, warn, berror):
5753 1997-06-28 Richard Stallman <rms@gnu.org>
5755 * Makefile.in (bison_version): New variable.
5756 (dist): Use that variable.
5757 (bison.s1): Substitute the Bison version into bison.simple.
5759 * bison.simple: Add a Bison version comment.
5761 1997-06-18 Richard Stallman <rms@gnu.org>
5763 * src/main.c (fatal, warn, berror):
5764 Make error messages standard.
5765 (toomany): Improve error message text.
5767 * 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:
5768 new.h renamed to alloc.h.
5770 1997-06-18 Richard Stallman <rms@gnu.org>
5772 * Makefile.in: new.h renamed to alloc.h.
5774 1997-05-24 Richard Stallman <rms@gnu.org>
5776 * src/lex.c (literalchar):
5777 Fix the code for escaping \, " and '.
5779 (lex): Avoid trouble when there are many chars
5780 to discard in a char literal with just several chars in it.
5782 1997-05-17 Richard Stallman <rms@gnu.org>
5785 Use malloc, if using alloca is troublesome.
5786 (YYSTACK_USE_ALLOCA): New flag macro.
5787 Define it for some systems and compilers.
5788 (YYSTACK_ALLOC): New macro.
5789 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5790 If it was malloc'd, free it.
5792 1997-05-17 Richard Stallman <rms@gnu.org>
5795 Use malloc, if using alloca is troublesome.
5796 (YYSTACK_USE_ALLOCA): New flag macro.
5797 Define it for some systems and compilers.
5798 (YYSTACK_ALLOC): New macro.
5799 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5800 If it was malloc'd, free it.
5802 1997-04-23 Richard Stallman <rms@gnu.org>
5805 (alloca) [__hpux]: Always define as __builtin_alloca.
5807 1997-04-23 Richard Stallman <rms@gnu.org>
5810 (alloca) [__hpux]: Always define as __builtin_alloca.
5812 1997-04-22 Richard Stallman <rms@gnu.org>
5815 [__hpux]: Include alloca.h (right for HPUX 10)
5816 instead of declaring alloca (right for HPUX 9).
5818 * src/bison.s1 (__yy_memcpy):
5819 Declare arg `count' as unsigned int.
5820 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5822 1997-04-22 Richard Stallman <rms@gnu.org>
5825 [__hpux]: Include alloca.h (right for HPUX 10)
5826 instead of declaring alloca (right for HPUX 9).
5828 * bison.simple (__yy_memcpy):
5829 Declare arg `count' as unsigned int.
5830 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5832 1997-01-03 Richard Stallman <rms@gnu.org>
5834 * src/allocate.c: [__STDC__ or _MSC_VER]:
5835 Declare calloc and realloc to return void *.
5837 1997-01-02 Richard Stallman <rms@gnu.org>
5840 [_MSC_VER]: Include stdlib.h and process.h.
5841 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5843 * src/main.c (main): Return FAILURE as a value.
5844 (printable_version): Declare arg as int, not char.
5846 1997-01-02 Richard Stallman <rms@gnu.org>
5848 * Makefile.in (dist):
5849 Explicitly check for symlinks, and copy them.
5851 1996-12-19 Richard Stallman <rms@gnu.org>
5854 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5856 1996-12-18 Paul Eggert <eggert@gnu.org>
5858 * src/bison.s1 (yyparse):
5859 If __GNUC__ and YYPARSE_PARAM are both defined,
5860 declare yyparse to have a void * argument.
5862 1996-12-18 Paul Eggert <eggert@gnu.org>
5864 * bison.simple (yyparse):
5865 If __GNUC__ and YYPARSE_PARAM are both defined,
5866 declare yyparse to have a void * argument.
5868 1996-12-17 Richard Stallman <rms@gnu.org>
5870 * src/reduce.c (nbits): Add some casts.
5872 1996-08-12 Richard Stallman <rms@gnu.org>
5874 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5876 1996-08-12 Richard Stallman <rms@gnu.org>
5878 * bison.simple: Test _MSDOS as well as _MSDOS_.
5880 1996-07-31 Richard Stallman <rms@gnu.org>
5883 [__sun && __i386]: Include alloca.h.
5885 1996-07-31 Richard Stallman <rms@gnu.org>
5888 [__sun && __i386]: Include alloca.h.
5890 1996-07-30 Richard Stallman <rms@gnu.org>
5892 * src/bison.s1: Comment change.
5894 * src/bison.s1: Test _MSDOS_, not MSDOS.
5896 1996-07-30 Richard Stallman <rms@gnu.org>
5898 * bison.simple: Comment change.
5900 * bison.simple: Test _MSDOS_, not MSDOS.
5902 1996-06-01 Richard Stallman <rms@gnu.org>
5904 * 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:
5905 Insert `_' macro around many string constants.
5908 Insert `_' macro around many string constants.
5910 (main): Call setlocale, bindtextdomain and textdomain.
5912 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5913 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5914 [ENABLE_NLS]: Include libintl.h.
5915 [ENABLE_NLS] (gettext): Define.
5916 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5917 (N_, PACKAGE, LOCALEDIR): New macros.
5919 1996-06-01 Richard Stallman <rms@gnu.org>
5921 * POTFILES.in: New file.
5923 * Makefile.in (allocate.o):
5924 Define target explicitly.
5926 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5927 (LDFLAGS): Set to @LDFLAGS@.
5928 (configure): Run autoconf only if preceding `cd' succeeds.
5929 (bison.s1): Redirect output to temporary file then move the
5930 temporary to the target, rather than redirecting directly to bison.s1.
5931 (clean): Remove config.status and config.log.
5932 (distclean): Don't remove config.status here.
5934 1996-05-12 Richard Stallman <rms@gnu.org>
5937 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5939 1996-05-12 Richard Stallman <rms@gnu.org>
5942 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5944 1996-05-11 Richard Stallman <rms@gnu.org>
5946 * src/bison.s1 (__yy_memcpy):
5947 Really reorder the args, as was supposedly done on Feb 14 1995.
5948 (yyparse): Calls changed accordingly.
5950 1996-05-11 Richard Stallman <rms@gnu.org>
5952 * Makefile.in (dist): Don't use $(srcdir).
5954 * bison.simple (__yy_memcpy):
5955 Really reorder the args, as was supposedly done on Feb 14 1995.
5956 (yyparse): Calls changed accordingly.
5958 1996-01-27 Richard Stallman <rms@gnu.org>
5960 * src/output.c (output_rule_data):
5961 Test YYERROR_VERBOSE in the conditional
5962 around the definition of ttyname.
5964 1995-12-29 Richard Stallman <rms@gnu.org>
5967 Fix line numbers in #line commands.
5969 1995-12-29 Richard Stallman <rms@gnu.org>
5972 Fix line numbers in #line commands.
5974 1995-12-27 Richard Stallman <rms@gnu.org>
5976 * src/bison.s1 (YYPARSE_PARAM_DECL):
5977 In C++, make it always null.
5978 (YYPARSE_PARAM_ARG): New macro.
5979 (yyparse): Use YYPARSE_PARAM_ARG.
5981 1995-12-27 Richard Stallman <rms@gnu.org>
5983 * bison.simple (YYPARSE_PARAM_DECL):
5984 In C++, make it always null.
5985 (YYPARSE_PARAM_ARG): New macro.
5986 (yyparse): Use YYPARSE_PARAM_ARG.
5988 1995-11-29 Richard Stallman <rms@gnu.org>
5990 * doc/bison.texinfo:
5991 Describe literal string tokens, %raw, %no_lines, %token_table.
5993 1995-11-29 Daniel Hagerty <hag@gnu.org>
5995 * doc/bison.texinfo: Fixed update date
5997 1995-10-16 Richard Stallman <rms@gnu.org>
5999 * src/version.c: Version 1.25.
6001 1995-10-16 Richard Stallman <rms@gnu.org>
6003 * NEWS: *** empty log message ***
6005 1995-10-16 Richard Stallman <rms@gnu.org>
6007 * doc/bison.1, doc/bison.rnh:
6010 1995-10-15 Richard Stallman <rms@gnu.org>
6012 * src/vmsgetargs.c, src/getargs.c:
6013 Added -n, -k, and -raw switches.
6014 (noparserflag, toknumflag, rawtoknumflag): New variables.
6016 * src/symtab.h (SALIAS):
6017 New #define for adding aliases to %token.
6018 (struct bucket): Added `alias' field.
6020 * src/reduce.c (reduce_grammar):
6021 Revise error message.
6022 (print_notices): Remove final `.' from error message.
6024 * src/reader.c (reader_output_yylsp):
6026 (readgram): Use `#if 0' around code that accepted %command
6027 inside grammar rules: The documentation doesn't allow it,
6028 and it will fail since the %command processors scan for the next %.
6029 (parse_token_decl): Extended the %token
6030 declaration to allow a multi-character symbol as an alias.
6031 (parse_thong_decl): New function.
6032 (read_declarations): Added %thong declarations.
6033 (read_declarations): Handle NOOP to deal with allowing
6034 % declarations as another means to specify the flags.
6035 (readgram): Allow %prec prior to semantics embedded in a rule.
6036 (skip_to_char, read_declarations, copy_definition)
6037 (parse_token_decl, parse_start_decl, parse_type_decl)
6038 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
6039 (get_type_name, copy_guard, copy_action, readgram)
6040 (get_type, packsymbols): Revised most error messages.
6041 Changed `fatal' to `warnxxx' to avoid aborting for error.
6042 Revised and use multiple warnxxx functions to avoid using VARARGS1.
6043 (read_declarations): Improve the error message for
6044 an invalid character. Do not abort.
6045 (read_declarations, copy_guard, copy_action): Use
6046 printable_version to avoid unprintable characters in printed output.
6047 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
6048 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
6049 Allow the type of a non-terminal can be given
6050 more than once, as long as all specifications give the same type.
6053 (output_headers, output_trailers, output, output_gram)
6054 (output_rule_data): Implement noparserflag variable.
6055 Implement toknumflag variable.
6056 (output): Call reader_output_yylsp to output LTYPESTR.
6058 * src/main.c (main):
6059 If reader sees an error, don't process the grammar.
6060 (fatals): Updated to not use VARARGS1.
6061 (printable_version, int_to_string, warn, warni, warns, warnss)
6062 (warnsss): New error reporting functions. Avoid abort for error.
6065 Added THONG and NOOP for alias processing.
6066 Added SETOPT for the new code that allows setting options with %flags.
6069 Include getopt.h. Add some extern decls.
6070 (safegetc): New function to deal with EOF gracefully.
6071 (literalchar); new function to deal with reading \ escapes.
6072 (lex): Use literalchar.
6073 (lex): Implemented "..." tokens.
6074 (literalchar, lex, parse_percent_token): Made tokenbuffer
6075 always contain the token. This includes growing the token
6076 buffer while reading an integer.
6077 (parse_percent_token): Replaced if-else statement with percent_table.
6078 (parse_percent_token): Added % declarations as another
6079 way to specify the flags -n, -l, and -r. Also added hooks for
6080 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
6081 major changes to files.c.
6082 (lex) Retain in the incoming stream a character following
6084 (skip_white_space, lex): Revised most error messages
6085 and changed fatal to warn to avoid aborting.
6086 (percent_table): Added %thong declarations.
6088 * src/gram.h: Comment changes.
6090 * src/files.c (openfiles, open_extra_files, done):
6092 and actfile file. Handle noparserflag. Both for -n switch.
6094 * src/conflicts.c (resolve_sr_conflict):
6095 Remove use of alloca.
6097 1995-06-01 Jim Meyering <meyering@gnu.org>
6099 * doc/bison.texinfo: *** empty log message ***
6101 1995-05-06 Richard Stallman <rms@gnu.org>
6103 * src/bison.s1: Comment change.
6105 1995-05-06 Richard Stallman <rms@gnu.org>
6107 * bison.simple: Comment change.
6109 1995-05-03 Richard Stallman <rms@gnu.org>
6111 * src/version.c: Version now 1.24.
6113 * src/bison.s1: Change distribution terms.
6115 * src/version.c: Version now 1.23.
6117 1995-05-03 Richard Stallman <rms@gnu.org>
6119 * doc/bison.texinfo:
6120 Rewrite "Conditions for Using Bison".
6121 Update version to 1.24.
6123 1995-05-03 Richard Stallman <rms@gnu.org>
6125 * bison.simple: Change distribution terms.
6127 1995-02-23 Richard Stallman <rms@gnu.org>
6129 * src/files.c: Test __VMS_POSIX as well as VMS.
6131 1995-02-14 Jim Meyering <meyering@gnu.org>
6133 * src/bison.s1 (__yy_memcpy):
6134 Renamed from __yy_bcopy to avoid
6135 confusion. Reverse FROM and TO arguments to be consistent with
6138 1995-02-14 Jim Meyering <meyering@gnu.org>
6140 * bison.simple (__yy_memcpy):
6141 Renamed from __yy_bcopy to avoid
6142 confusion. Reverse FROM and TO arguments to be consistent with
6145 1994-11-10 David J. MacKenzie <djm@gnu.org>
6151 * Makefile.in (DISTFILES): Include NEWS.
6153 * Makefile.in (DISTFILES):
6154 Include install-sh, not install.sh.
6156 * configure.in: Update to Autoconf v2 macro names.
6158 1994-10-05 David J. MacKenzie <djm@gnu.org>
6160 * Makefile.in: fix typo
6162 * Makefile.in (prefix, exec_prefix):
6163 Let configure set them.
6165 1994-09-28 David J. MacKenzie <djm@gnu.org>
6167 * Makefile.in: Set datadir to $(prefix)/share.
6169 1994-09-15 Richard Stallman <rms@gnu.org>
6172 Update copyright notice and GPL version.
6174 1994-09-15 Richard Stallman <rms@gnu.org>
6177 Update copyright notice and GPL version.
6179 1994-07-12 Richard Stallman <rms@gnu.org>
6181 * src/reduce.c, src/reader.c:
6184 1994-05-05 David J. MacKenzie <djm@gnu.org>
6186 * Makefile.in: entered into RCS
6188 1994-03-26 Richard Stallman <rms@gnu.org>
6190 * src/bison.s1: entered into RCS
6192 1994-03-26 Richard Stallman <rms@gnu.org>
6194 * bison.simple: entered into RCS
6196 1994-03-25 Richard Stallman <rms@gnu.org>
6198 * src/main.c: entered into RCS
6200 1994-03-24 Richard Stallman <rms@gnu.org>
6202 * src/conflicts.c: entered into RCS
6204 1994-01-02 Richard Stallman <rms@gnu.org>
6206 * Makefile.in: *** empty log message ***
6208 1993-11-21 Richard Stallman <rms@gnu.org>
6210 * src/bison.s1: *** empty log message ***
6212 1993-11-21 Richard Stallman <rms@gnu.org>
6214 * doc/bison.texinfo: entered into RCS
6216 * doc/bison.texinfo: *** empty log message ***
6218 1993-11-21 Richard Stallman <rms@gnu.org>
6220 * bison.simple: *** empty log message ***
6222 1993-10-25 David J. MacKenzie <djm@gnu.org>
6224 * doc/bison.texinfo: *** empty log message ***
6226 1993-10-19 Richard Stallman <rms@gnu.org>
6228 * src/bison.s1: *** empty log message ***
6230 1993-10-19 Richard Stallman <rms@gnu.org>
6232 * bison.simple: *** empty log message ***
6234 1993-10-14 Richard Stallman <rms@gnu.org>
6236 * src/bison.s1: *** empty log message ***
6238 1993-10-14 Richard Stallman <rms@gnu.org>
6240 * bison.simple: *** empty log message ***
6242 1993-09-14 David J. MacKenzie <djm@gnu.org>
6244 * doc/bison.texinfo: *** empty log message ***
6246 1993-09-13 Noah Friedman <friedman@gnu.org>
6248 * Makefile.in: *** empty log message ***
6250 1993-09-10 Richard Stallman <rms@gnu.org>
6252 * src/conflicts.c: *** empty log message ***
6254 * src/system.h: entered into RCS
6256 1993-09-10 Richard Stallman <rms@gnu.org>
6258 * doc/bison.1: entered into RCS
6260 1993-09-06 Noah Friedman <friedman@gnu.org>
6262 * src/version.c: entered into RCS
6264 1993-09-06 Noah Friedman <friedman@gnu.org>
6266 * Makefile.in: *** empty log message ***
6268 1993-07-30 David J. MacKenzie <djm@gnu.org>
6270 * Makefile.in: *** empty log message ***
6272 1993-07-24 Richard Stallman <rms@gnu.org>
6274 * src/bison.s1: *** empty log message ***
6276 1993-07-24 Richard Stallman <rms@gnu.org>
6278 * bison.simple: *** empty log message ***
6280 1993-07-08 David J. MacKenzie <djm@gnu.org>
6282 * Makefile.in: *** empty log message ***
6284 1993-07-04 Richard Stallman <rms@gnu.org>
6286 * src/bison.s1: *** empty log message ***
6288 1993-07-04 Richard Stallman <rms@gnu.org>
6290 * bison.simple: *** empty log message ***
6292 1993-06-26 David J. MacKenzie <djm@gnu.org>
6294 * src/getargs.c: entered into RCS
6296 1993-06-26 David J. MacKenzie <djm@gnu.org>
6298 * doc/bison.texinfo: *** empty log message ***
6300 * doc/bison.1: New file.
6302 1993-06-25 Richard Stallman <rms@gnu.org>
6304 * src/getargs.c: New file.
6306 1993-06-16 Richard Stallman <rms@gnu.org>
6308 * src/bison.s1: *** empty log message ***
6310 1993-06-16 Richard Stallman <rms@gnu.org>
6312 * bison.simple: *** empty log message ***
6314 1993-06-03 Richard Stallman <rms@gnu.org>
6316 * src/bison.s1: New file.
6318 1993-06-03 Richard Stallman <rms@gnu.org>
6320 * doc/bison.texinfo: *** empty log message ***
6322 1993-06-03 Richard Stallman <rms@gnu.org>
6324 * bison.simple: New file.
6326 1993-05-19 Richard Stallman <rms@gnu.org>
6328 * doc/bison.texinfo: New file.
6330 1993-05-07 Noah Friedman <friedman@gnu.org>
6332 * Makefile.in: *** empty log message ***
6334 1993-04-28 Noah Friedman <friedman@gnu.org>
6336 * src/reader.c: *** empty log message ***
6338 1993-04-23 Noah Friedman <friedman@gnu.org>
6340 * src/alloc.h: entered into RCS
6342 1993-04-20 David J. MacKenzie <djm@gnu.org>
6344 * src/version.c: *** empty log message ***
6346 * src/files.c, src/allocate.c:
6349 * src/reader.c: *** empty log message ***
6351 * src/lex.c: entered into RCS
6353 * src/conflicts.c: New file.
6355 * src/symtab.c: entered into RCS
6357 * src/alloc.h: New file.
6359 * src/LR0.c: entered into RCS
6361 1993-04-18 Noah Friedman <friedman@gnu.org>
6363 * src/reader.c: New file.
6365 * src/version.c: *** empty log message ***
6367 1993-04-18 Noah Friedman <friedman@gnu.org>
6369 * Makefile.in: *** empty log message ***
6371 1993-04-17 Noah Friedman <friedman@gnu.org>
6373 * Makefile.in: *** empty log message ***
6375 1993-04-15 Richard Stallman <rms@gnu.org>
6377 * src/main.c, src/files.c:
6380 1993-04-15 Noah Friedman <friedman@gnu.org>
6382 * configure.in: entered into RCS
6384 * configure.in: *** empty log message ***
6386 * configure.in: New file.
6388 1993-04-14 Richard Stallman <rms@gnu.org>
6390 * Makefile.in: New file.
6392 1993-04-13 Richard Stallman <rms@gnu.org>
6394 * src/version.c: New file.
6396 1993-03-25 Richard Stallman <rms@gnu.org>
6398 * src/output.c: entered into RCS
6400 1992-09-25 Richard Stallman <rms@gnu.org>
6402 * configure.bat: entered into RCS
6404 1992-06-22 Richard Stallman <rms@gnu.org>
6406 * src/vmsgetargs.c: entered into RCS
6408 1992-06-22 Richard Stallman <rms@gnu.org>
6410 * doc/bison.rnh: entered into RCS
6412 1992-04-20 David J. MacKenzie <djm@gnu.org>
6414 * README: entered into RCS
6416 1992-01-22 Richard Stallman <rms@gnu.org>
6418 * src/machine.h: entered into RCS
6420 1991-12-21 Richard Stallman <rms@gnu.org>
6422 * src/lalr.c, src/closure.c:
6425 1991-12-20 Richard Stallman <rms@gnu.org>
6427 * src/state.h: entered into RCS
6429 1991-12-18 Richard Stallman <rms@gnu.org>
6431 * src/print.c, src/nullable.c, src/derives.c:
6434 1991-11-03 David J. MacKenzie <djm@gnu.org>
6436 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
6439 1988-09-09 Richard Stallman <rms@gnu.org>
6441 * src/bison.hairy: entered into RCS
6443 1987-12-16 Richard Stallman <rms@gnu.org>
6445 * REFERENCES: entered into RCS
6448 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6450 This file is part of GNU Autoconf.
6452 GNU Autoconf is free software; you can redistribute it and/or modify
6453 it under the terms of the GNU General Public License as published by
6454 the Free Software Foundation; either version 2, or (at your option)
6457 GNU Autoconf is distributed in the hope that it will be useful,
6458 but WITHOUT ANY WARRANTY; without even the implied warranty of
6459 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6460 GNU General Public License for more details.
6462 You should have received a copy of the GNU General Public License
6463 along with autoconf; see the file COPYING. If not, write to
6464 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6465 Boston, MA 02111-1307, USA.