1 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
3 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4 Update the stack class, give a try to deque as the default container.
6 2002-05-02 Akim Demaille <akim@epita.fr>
8 * data/bison.simple (yyparse): Do not implement @$ = @1.
9 (YYLLOC_DEFAULT): Adjust to do it.
10 * doc/bison.texinfo (Location Default Action): Fix.
12 2002-05-02 Akim Demaille <akim@epita.fr>
14 * src/reader.c (parse_braces): Merge into...
17 2002-05-02 Akim Demaille <akim@epita.fr>
19 * configure.in (ALL_LINGUAS): Remove.
20 * po/LINGUAS, hr.po: New.
22 2002-05-02 Akim Demaille <akim@epita.fr>
24 Remove the so called hairy (semantic) parsers.
26 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
27 * src/gram.h, src/gram.c (semantic_parser): Remove.
28 (rule_t): Remove the guard and guard_line members.
29 * src/lex.h (token_t): remove tok_guard.
30 * src/options.c (option_table): Remove %guard and %semantic_parser
32 * src/output.c, src/output.h (guards_output): Remove.
34 (token_definitions_output): Don't output the `T'
36 (output_skeleton): Don't output the guards.
37 * src/files.c, src/files.c (attrsfile): Remove.
38 * src/reader.c (symbol_list): Remove the guard and guard_line
41 (parse_guard): Remove.
42 * data/bison.hairy: Remove.
43 * doc/bison.texinfo (Environment Variables): Remove occurrences of
46 2002-05-02 Akim Demaille <akim@epita.fr>
48 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
49 (parse_guard): Rename the formal argument `stack_offset' as
50 `rule_length', which is more readable.
52 (copy_at, copy_dollar): Instead of outputting the hard coded
53 values of $$, $n and so forth, output invocation to b4_lhs_value,
54 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
55 Note: this patch partially drops `semantic-parser' support: it
56 always does `rule_length - n', where semantic parsers ought to
58 * data/bison.simple, data/bison.c++ (b4_lhs_value)
59 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
61 2002-05-02 Akim Demaille <akim@epita.fr>
63 * configure.in (AC_INIT): Bump to 1.49b.
64 (AM_INIT_AUTOMAKE): Short invocation.
66 2002-05-02 Akim Demaille <akim@epita.fr>
70 2002-05-01 Akim Demaille <akim@epita.fr>
72 * src/skeleton.h: Remove.
74 2002-05-01 Akim Demaille <akim@epita.fr>
76 * src/skeleton.h: Fix the #endif.
77 Reported by Magnus Fromreide.
79 2002-04-26 Paul Eggert <eggert@twinsun.com>
81 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
82 Define if we define YYSTYPE and YYLTYPE, respectively.
83 (YYCOPY): Fix [] quoting problem in the non-GCC case.
85 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
87 * src/scan-skel.l: Postprocess quadrigraphs.
89 * src/reader.c (copy_character): New function, used to output
90 single characters while replacing `[' and `]' with quadrigraphs, to
91 avoid troubles with M4 quotes.
92 (copy_comment): Output characters with copy_character.
93 (read_additionnal_code): Likewise.
94 (copy_string2): Likewise.
95 (copy_definition): Likewise.
97 * tests/calc.at: Exercise M4 quoting.
99 2002-04-25 Akim Demaille <akim@epita.fr>
101 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
102 between `!' and the command.
103 Reported by Paul Eggert.
105 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
107 * tests/calc.at: Exercise prologue splitting.
109 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
110 `b4_post_prologue' instead of `b4_prologue'.
112 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
114 (output): Free pre_prologue_obstack and post_prologue_obstack.
115 * src/files.h, src/files.c (attrs_obstack): Remove.
116 (pre_prologue_obstack, post_prologue_obstack): New.
117 * src/reader.c (copy_definition): Add a parameter to specify the
118 obstack to fill, instead of using attrs_obstack unconditionally.
119 (read_declarations): Pass pre_prologue_obstack to copy_definition if
120 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
122 2002-04-23 Paul Eggert <eggert@twinsun.com>
124 * data/bison.simple: Remove unnecessary commentary and white
125 space differences from 1_29-branch.
126 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
128 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
129 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
130 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
131 constructors or destructors.
133 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
135 2002-04-23 Akim Demaille <akim@epita.fr>
137 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
138 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
139 location with columns.
140 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
141 All reported by Paul Eggert.
143 2002-04-22 Akim Demaille <akim@epita.fr>
145 * src/reduce.c (dump_grammar): Move to...
146 * src/gram.h, src/gram.c (grammar_dump): here.
147 Be sure to separate long item numbers.
148 Don't read the members of a rule's prec if its nil.
150 2002-04-22 Akim Demaille <akim@epita.fr>
152 * src/output.c (table_size, table_grow): New.
153 (MAXTABLE): Remove, replace uses with table_size.
154 (pack_vector): Instead of dying when the table is too big, grow it.
156 2002-04-22 Akim Demaille <akim@epita.fr>
158 * data/bison.simple (yyr1): Its type is that of a token number.
159 * data/bison.c++ (r1_): Likewise.
160 * tests/regression.at (Web2c Actions): Adjust.
162 2002-04-22 Akim Demaille <akim@epita.fr>
164 * src/reader.c (token_translations_init): 256 is now the default
165 value for the error token, i.e., it will be assigned another
166 number if the user assigned 256 to one of her tokens.
167 (reader): Don't force 256 to error.
168 * doc/bison.texinfo (Symbols): Adjust.
169 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
170 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
171 etc. instead of 10, 20, 30 (which was used to `jump' over error
172 (256) and undefined (2)).
174 2002-04-22 Akim Demaille <akim@epita.fr>
176 Propagate more token_number_t.
178 * src/gram.h (token_number_as_item_number)
179 (item_number_as_token_number): New.
180 * src/output.c (GENERATE_OUTPUT_TABLE): New.
181 Use it to create output_item_number_table and
182 output_token_number_table.
183 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
184 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
185 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
186 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
188 2002-04-22 Akim Demaille <akim@epita.fr>
190 * src/output.h, src/output.c (get_lines_number): Remove.
192 2002-04-19 Akim Demaille <akim@epita.fr>
194 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
196 (Debugging): More details about enabling the debugging features.
197 (Table of Symbols): Describe $$, $n, @$, and @n.
198 Suggested by Tim Josling.
200 2002-04-19 Akim Demaille <akim@epita.fr>
202 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
204 2002-04-10 Akim Demaille <akim@epita.fr>
206 * src/system.h: Rely on HAVE_LIMITS_H.
207 Suggested by Paul Eggert.
209 2002-04-09 Akim Demaille <akim@epita.fr>
211 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
212 full stderr, and strip it according to the bison options, instead
213 of composing the error message from different bits.
214 This makes it easier to check for several error messages.
215 Adjust all the invocations.
216 Add an invocation exercising the error token.
217 Add an invocation demonstrating a stupid error message.
218 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
220 Error message are for stderr, not stdout.
222 2002-04-09 Akim Demaille <akim@epita.fr>
224 * src/gram.h, src/gram.c (error_token_number): Remove, use
226 * src/reader.c (reader): Don't specify the user token number (2)
227 for $undefined, as it uselessly prevents using it.
228 * src/gram.h (token_number_t): Move to...
229 * src/symtab.h: here.
230 (state_t.number): Is a token_number_t.
231 * src/print.c, src/reader.c: Use undeftoken->number instead of
233 (Even though this 2 is not the same as above: the number of the
234 undeftoken remains being 2, it is its user token number which
236 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
237 `user_token_number_max'.
238 Output `undef_token_number'.
239 * data/bison.simple, data/bison.c++: Use them.
240 Be sure to map invalid yylex return values to
241 `undef_token_number'. This saves us from gratuitous SEGV.
243 * tests/conflicts.at (Solved SR Conflicts)
244 (Unresolved SR Conflicts): Adjust.
245 * tests/regression.at (Web2c Actions): Adjust.
247 2002-04-08 Akim Demaille <akim@epita.fr>
249 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
251 Remove the duplicate `typedefs'.
252 (RhsNumberType): Fix the declaration and various other typos.
254 * data/bison.simple: Use __ofile__.
255 * src/scan-skel.l: Handle __ofile__.
257 2002-04-08 Akim Demaille <akim@epita.fr>
259 * src/gram.h (item_number_t): New, the type of item numbers in
260 RITEM. Note that it must be able to code symbol numbers as
261 positive number, and the negation of rule numbers as negative
263 Adjust all dependencies (pretty many).
264 * src/reduce.c (rule): Remove this `short *' pointer: use
266 * src/system.h (MINSHORT, MAXSHORT): Remove.
268 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
270 (MAXTABLE): Move to...
271 * src/output.c (MAXTABLE): here.
272 (prepare_rules): Use output_int_table to output rhs.
273 * data/bison.simple, data/bison.c++: Adjust.
274 * tests/torture.at (Big triangle): Move the limit from 254 to
276 * tests/regression.at (Web2c Actions): Ajust.
278 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
279 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
280 passes, but produces negative #line number, once fixed, GCC is
281 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
283 * src/state.h (state_h): Code input lines on ints, not shorts.
285 2002-04-08 Akim Demaille <akim@epita.fr>
287 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
288 and then the grammar.
290 2002-04-08 Akim Demaille <akim@epita.fr>
292 * src/system.h: No longer using strndup.
294 2002-04-07 Akim Demaille <akim@epita.fr>
296 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
297 * src/output.c (output_table_data): Return the longest number.
298 (prepare_tokens): Output `token_number_max').
299 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
301 Use them to define yy_token_number_type/TokenNumberType.
302 Use this type for yytranslate.
303 * tests/torture.at (Big triangle): Push the limit from 124 to
305 * tests/regression.at (Web2c Actions): Adjust.
307 2002-04-07 Akim Demaille <akim@epita.fr>
309 * tests/torture.at (Big triangle): New.
310 (GNU AWK Grammar, GNU Cim Grammar): Move to...
311 * tests/existing.at: here.
313 2002-04-07 Akim Demaille <akim@epita.fr>
315 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
319 2002-04-07 Akim Demaille <akim@epita.fr>
321 * src/reader.c: Normalize increments to prefix form.
323 2002-04-07 Akim Demaille <akim@epita.fr>
325 * src/reader.c, symtab.c: Remove debugging code.
327 2002-04-07 Akim Demaille <akim@epita.fr>
329 Rename all the `bucket's as `symbol_t'.
331 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
332 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
333 * src/symtab.c, src/symtab.h (bucket): Rename as...
335 (symbol_list_new, bucket_check_defined, bucket_make_alias)
336 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
337 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
338 (buckets_new, buckets_free, buckets_do): Rename as...
339 (symbol_list_new, symbol_check_defined, symbol_make_alias)
340 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
341 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
342 (symbols_new, symbols_free, symbols_do): these.
344 2002-04-07 Akim Demaille <akim@epita.fr>
346 Use lib/hash for the symbol table.
348 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
350 * src/lex.c (lex): Set the `number' member of new terminals.
351 * src/reader.c (bucket_check_defined, bucket_make_alias)
352 (bucket_check_alias_consistence, bucket_translation): New.
353 (reader, grammar_free, readgram, token_translations_init)
354 (packsymbols): Adjust.
355 (reader): Number the predefined tokens.
356 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
357 for predefined tokens.
358 * src/symtab.h (bucket): Remove all the hash table related
360 * src/symtab.c (symtab): Replace by...
361 (bucket_table): this.
362 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
363 (buckets_new, buckets_do): New.
365 2002-04-07 Akim Demaille <akim@epita.fr>
367 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
368 (start_symbol, max_user_token_number, semantic_parser)
369 (error_token_number): Initialize.
370 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
373 (errtoken, eoftoken, undeftoken, axiom): Extern.
375 2002-04-07 Akim Demaille <akim@epita.fr>
377 * src/gram.h (rule_s): prec and precsym are now pointers
378 to the bucket giving the priority/associativity.
379 Member `associativity' removed: useless.
380 * src/reduce.c, src/conflicts.c: Adjust.
382 2002-04-07 Akim Demaille <akim@epita.fr>
384 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
385 Properly escape the symbols' TAG when outputting them.
387 2002-04-07 Akim Demaille <akim@epita.fr>
389 * src/lalr.h (LA): Is a bitsetv, not bitset*.
391 2002-04-07 Akim Demaille <akim@epita.fr>
393 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
394 (LArule): this, which is an array to rule_t*.
395 * src/print.c, src/conflicts.c: Adjust.
397 2002-04-07 Akim Demaille <akim@epita.fr>
399 * src/gram.h (rule_t): Rename `number' as `user_number'.
400 `number' is a new member.
402 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
404 2002-04-07 Akim Demaille <akim@epita.fr>
406 As a result of the previous patch, it is no longer needed
407 to reorder ritem itself.
409 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
411 2002-04-07 Akim Demaille <akim@epita.fr>
413 Be sure never to walk through RITEMS, but use only data related to
414 the rules themselves. RITEMS should be banished.
416 * src/output.c (output_token_translations): Rename as...
417 (prepare_tokens): this.
418 In addition to `translate', prepare the muscles `tname' and
419 `toknum', which were handled by...
420 (output_rule_data): this.
421 Remove, and move the remainder of its outputs into...
422 (prepare_rules): this new routines, which also merges content from
424 (prepare_rules): Be sure never to walk through RITEMS.
425 (output_stos): Rename as...
426 (prepare_stos): this.
427 (output): Always invoke prepare_states, after all, just don't use it
428 in the output if you don't need it.
430 2002-04-07 Akim Demaille <akim@epita.fr>
432 * src/LR0.c (new_state): Display `nstates' as the name of the
434 Adjust to initialize first_state and last_state if needed.
435 Be sure to distinguish the initial from the final state.
436 (new_states): Create the itemset of the initial state, and use
438 * src/closure.c (closure): Now that the initial state has its
439 items properly set, there is no need for a special case when
442 As a result, now the rule 0, reducing to $axiom, is visible in the
443 outputs. Adjust the test suite.
445 * tests/conflicts.at (Solved SR Conflicts)
446 (Unresolved SR Conflicts): Adjust.
447 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
448 * tests/conflicts.at (S/R in initial): New.
450 2002-04-07 Akim Demaille <akim@epita.fr>
452 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
453 the RHS of the rules.
454 * src/output.c (output_gram): Likewise.
456 2002-04-07 Akim Demaille <akim@epita.fr>
458 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
460 Adjust all dependencies.
461 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
462 `number' of the buckets too.
463 * src/gram.h: Include `symtab.h'.
464 (associativity): Move to...
465 * src/symtab.h: here.
466 No longer include `gram.h'.
468 2002-04-07 Akim Demaille <akim@epita.fr>
470 * src/gram.h, src/gram.c (rules_rhs_length): New.
471 (ritem_longest_rhs): Use it.
472 * src/gram.h (rule_t): `number' is a new member.
473 * src/reader.c (packgram): Set it.
474 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
475 the end of `rules', and count them out of `nrules'.
476 (reduce_output, dump_grammar): Adjust.
477 * src/print.c (print_grammar): It is no longer needed to check for
478 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
479 * tests/reduce.at (Reduced Automaton): New test.
481 2002-04-07 Akim Demaille <akim@epita.fr>
483 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
484 lacking `+ 1' to nrules, Bison reported as useless a token if it
485 was used solely to set the precedence of the last rule...
487 2002-04-07 Akim Demaille <akim@epita.fr>
489 * data/bison.c++, data/bison.simple: Don't output the current file
490 name in #line, to avoid useless diffs between two identical
491 outputs under different names.
493 2002-04-07 Akim Demaille <akim@epita.fr>
495 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
496 Normalize loops to using `< nrules + 1', not `<= nrules'.
498 2002-04-07 Akim Demaille <akim@epita.fr>
502 2002-04-07 Akim Demaille <akim@epita.fr>
504 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
505 bucket.value as bucket.number.
507 2002-04-07 Akim Demaille <akim@epita.fr>
509 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
510 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
511 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
512 RHS, instead of being an index in RITEMS.
514 2002-04-04 Paul Eggert <eggert@twinsun.com>
516 * doc/bison.texinfo: Update copyright date.
517 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
518 (Symbols): Warn about running Bison in one character set,
519 but compiling and/or running in an incompatible one.
520 Warn about character code 256, too.
522 2002-04-03 Paul Eggert <eggert@twinsun.com>
524 * src/bison.data (YYSTACK_ALLOC): Depend on whether
525 YYERROR_VERBOSE is nonzero, not whether it is defined.
527 Merge changes from bison-1_29-branch.
529 2002-03-20 Paul Eggert <eggert@twinsun.com>
531 Merge fixes from Debian bison_1.34-1.diff.
533 * configure.in (AC_PREREQ): 2.53.
535 2002-03-20 Akim Demaille <akim@epita.fr>
537 * src/conflicts.c (log_resolution): Argument `resolution' is const.
539 2002-03-19 Paul Eggert <eggert@twinsun.com>
541 * src/bison.simple (YYCOPY): New macro.
542 (YYSTACK_RELOCATE): Use it.
543 Remove Type arg; no longer needed. All callers changed.
544 (yymemcpy): Remove; no longer needed.
546 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
547 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
549 2002-03-19 Akim Demaille <akim@epita.fr>
551 Test and fix the #line outputs.
553 * tests/atlocal.at (GCC): New.
554 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
555 (Prologue synch line, ,%union synch line, Postprologue synch line)
556 (Action synch line, Epilogue synch line): New tests.
557 * src/reader.c (parse_union_decl): Define the muscle stype_line.
558 * data/bison.simple, data/bison.c++: Use it.
560 2002-03-19 Akim Demaille <akim@epita.fr>
562 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
563 (Solved SR Conflicts, %expect not enough, %expect right)
564 (%expect too much): Move to...
565 * tests/conflicts.at: this new file.
567 2002-03-19 Akim Demaille <akim@epita.fr>
569 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
570 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
571 that we can move to enums for instance.
572 * src/output.c (token_definitions_output): Output a list of
573 `token-name, token-number' instead of the #define.
574 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
576 2002-03-14 Akim Demaille <akim@epita.fr>
580 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
582 * data/bison.c++: Make the user able to add members to the generated
583 parser by subclassing.
585 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
587 * src/reader.c (read_additionnal_code): `c' should be an integer, not
589 Reported by Nicolas Tisserand and Nicolas Burrus.
591 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
593 * src/reader.c: Warn about lacking semi-colons, do not complain.
595 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
597 * data/bison.c++: Remove a debug line.
599 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
601 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
602 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
603 provide a default implementation.
605 2002-03-04 Akim Demaille <akim@epita.fr>
607 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
608 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
609 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
610 * tests/semantic.at (Parsing Guards): Similarly.
611 * src/reader.at (readgram): Complain if the last rule is not ended
614 2002-03-04 Akim Demaille <akim@epita.fr>
616 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
617 * src/closure.c: here.
618 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
620 * src/warshall.h, src/warshall.c: Remove.
621 * tests/sets.at (Broken Closure): Adjust.
623 2002-03-04 Akim Demaille <akim@epita.fr>
625 * src/output.c (output_skeleton): tempdir is const.
626 bytes_read is unused.
628 2002-03-04 Akim Demaille <akim@epita.fr>
630 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
631 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
635 2002-03-04 Akim Demaille <akim@epita.fr>
637 * src/closure.c (closure): `r' is unused.
639 2002-03-04 Akim Demaille <akim@epita.fr>
641 * tests/sets.at (Broken Closure): Add the ending `;'.
642 * src/reader.at (readgram): Complain if a rule is not ended with a
645 2002-03-04 Akim Demaille <akim@epita.fr>
647 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
648 (count_sr_conflicts): Use bitset_count.
649 * src/reduce.c (inaccessable_symbols): Ditto.
651 * src/warshall.h, src/warshall.c: Convert to bitsetv.
653 2002-03-04 Akim Demaille <akim@epita.fr>
655 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
656 * src/reduce.c: Remove the `bitset_zero's following the
657 `bitset_create's, as now it is performed by the latter.
659 2002-03-04 Akim Demaille <akim@epita.fr>
661 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
662 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
663 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
664 latest sources from Michael.
666 2002-03-04 Akim Demaille <akim@epita.fr>
668 * src/output.c (output): Don't free the grammar.
669 * src/reader.c (grammar_free): New.
670 * src/main.c (main): Call it and don't free symtab here.
672 2002-03-04 Akim Demaille <akim@epita.fr>
674 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
676 Reported by Benoit Perrot.
678 2002-03-04 Akim Demaille <akim@epita.fr>
680 Use bitset operations when possible, not loops over bits.
682 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
684 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
685 * src/reduce.c (useless_nonterminals): Formatting changes.
686 * src/warshall.c (TC): Use bitset_or.
688 2002-03-04 Akim Demaille <akim@epita.fr>
690 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
691 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
694 2002-03-04 Akim Demaille <akim@epita.fr>
696 * src/lalr.c (F): Now a bitset*.
697 Adjust all dependencies.
699 2002-03-04 Akim Demaille <akim@epita.fr>
701 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
702 Adjust all dependencies.
704 2002-03-04 Akim Demaille <akim@epita.fr>
706 * src/L0.c, src/LR0.h (nstates): Be size_t.
707 Adjust comparisons (signed vs unsigned).
708 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
710 Adjust all dependencies.
712 2002-03-04 Akim Demaille <akim@epita.fr>
714 * src/closure.c (firsts): Now, also a bitset.
715 Adjust all dependencies.
716 (varsetsize): Remove, now unused.
717 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
719 2002-03-04 Akim Demaille <akim@epita.fr>
721 * src/print.c: Convert to use bitset.h, not hand coded iterations
724 2002-03-04 Akim Demaille <akim@epita.fr>
726 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
728 2002-03-04 Akim Demaille <akim@epita.fr>
730 * src/closure.c (ruleset): Be a bitset.
731 (rulesetsize): Remove.
733 2002-03-04 Akim Demaille <akim@epita.fr>
735 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
736 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
737 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
738 * src/closure.c (fderives): Be an array of bitsets.
740 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
742 * data/bison.c++: Merge the two generated headers. Insert a copyright
743 notice in each output file.
745 2002-02-28 Akim Demaille <akim@epita.fr>
747 * data/bison.c++: Copy the prologue of bison.simple to fetch
748 useful M4 definitions, such as b4_header_guard.
750 2002-02-25 Akim Demaille <akim@epita.fr>
752 * src/getargs.c (version): Give the name of the authors, and use a
753 translator friendly scheme for the bgr
756 2002-02-25 Akim Demaille <akim@epita.fr>
758 * src/output.c (header_output): Remove, now handled completely via
761 2002-02-25 Akim Demaille <akim@epita.fr>
763 * m4/m4.m4: New, from CVS Autoconf.
764 * configure.in: Invoke it.
765 * src/output.c (output_skeleton): Use its result instead of the
768 2002-02-25 Akim Demaille <akim@epita.fr>
770 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
772 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
773 * src/output.c (output_skeleton): Use mkstemp to create a real
775 Move the filling of `skeleton' and its muscle to...
777 (output): Move the definition of the prologue muscle to...
779 * src/system.h (DEFAULT_TMPDIR): New.
781 2002-02-14 Paul Eggert <eggert@twinsun.com>
783 Remove the support for C++ namespace cleanliness; it was
784 causing more problems than it was curing, since it didn't work
785 properly on some nonstandard C++ compilers. This can wait
786 for a proper C++ parser.
788 * NEWS: Document this.
789 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
790 of C++, as it's treated like C now.
791 * src/bison.simple (YYSTD): Remove.
792 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
793 Treat C++ just like Standard C instead of trying to support
794 namespace cleanliness.
796 2002-02-14 Akim Demaille <akim@epita.fr>
798 * tests/regression.at (else): Adjust to Andreas' change.
800 2002-02-14 Akim Demaille <akim@epita.fr>
802 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
804 2002-02-13 Andreas Schwab <schwab@suse.de>
806 * src/output.c (output_rule_data): Don't output NULL, it might
809 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
811 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
812 (Copyright notice): Update.
814 2002-02-11 Akim Demaille <akim@epita.fr>
816 * tests/regression.at (%nonassoc and eof): Don't include
819 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
821 * data/bison.c++: Correct error recovery. Make the user able to
822 initialize the starting location.
824 2002-02-07 Akim Demaille <akim@epita.fr>
826 * tests/input.at: New.
828 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
830 * data/bison.c++: Replace some direct m4 expansions by constants. Be
831 more consistent when naming methods and variables. Put preprocessor
832 directives around tables only needed for debugging.
834 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
836 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
838 (yy::b4_name::parse): Use print_.
840 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
842 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
844 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
846 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
848 (yy::b4_name::parse): Build verbose error messages, and use error_.
850 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
852 * data/bison.c++: Fix m4 quoting in comments.
854 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
856 * data/bison.c++: Adjust the parser code. Fix some muscles that were
859 2002-02-05 Akim Demaille <akim@epita.fr>
861 * data/bison.c++: Adjust to the M4 back end.
862 More is certainly needed.
864 2002-02-05 Akim Demaille <akim@epita.fr>
866 Give a try to M4 as a back end.
868 * lib/readpipe.c: New, from wdiff.
869 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
871 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
872 specific values. Now it is m4 that performs the lookup.
873 * src/parse-skel.y: Remove.
874 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
875 * src/output.c (actions_output, guards_output)
876 (token_definitions_output): No longer keeps track of the output
877 line number, hence remove the second argument.
878 (guards_output): Check against the guard member of a rule, not the
881 (output_skeleton): Don't look for the skeleton location, let m4 do
883 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
885 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
886 (prepare): Given that for the time being changesyntax is not
887 usable in M4, rename the muscles using `-' to `_'.
888 Define `defines_flag', `output_parser_name' and `output_header_name'.
889 * src/output.h (actions_output, guards_output)
890 (token_definitions_output): Adjust prototypes.
891 * src/scan-skel.l: Instead of scanning the skeletons, it now
892 processes the output of m4: `__oline__' and `#output'.
893 * data/bison.simple: Adjust to be used by M4(sugar).
894 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
896 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
897 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
898 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
899 shamelessly stolen from CVS Autoconf.
901 2002-02-05 Akim Demaille <akim@epita.fr>
903 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
904 * configure.in: Check for the declarations of free and malloc.
905 * src/muscle_tab.c: Adjust.
907 2002-02-05 Akim Demaille <akim@epita.fr>
909 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
910 which have no values.
912 2002-02-05 Akim Demaille <akim@epita.fr>
914 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
917 2002-01-29 Paul Eggert <eggert@twinsun.com>
919 * src/bison.simple (YYSIZE_T): Do not define merely because
920 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
921 On some platforms, <alloca.h> does not declare YYSTD (size_t).
923 2002-01-27 Akim Demaille <akim@epita.fr>
925 Fix `%nonassoc and eof'.
927 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
928 which were not properly copied! Replace
929 memcpy (res->errs, src->errs, src->nerrs);
931 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
933 * tests/regression.at (%nonassoc and eof): Adjust to newest
934 Autotest: `.' is not in the PATH.
936 2002-01-27 Akim Demaille <akim@epita.fr>
938 * tests/sets.at (AT_EXTRACT_SETS): New.
942 2002-01-26 Akim Demaille <akim@epita.fr>
944 * tests/actions.at, tests/calc.at, tests/headers.at,
945 * tests/torture.at: Adjust to the newest Autotest which no longer
946 forces `.' in the PATH.
948 2002-01-25 Akim Demaille <akim@epita.fr>
950 * tests/regression.at (%nonassoc and eof): New.
951 Suggested by Robert Anisko.
953 2002-01-24 Akim Demaille <akim@epita.fr>
955 Bison dumps core when trying to complain about broken input files.
956 Reported by Cris van Pelt.
958 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
959 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
961 (Invalid inputs): Strengthen: exercise parse_percent_token.
963 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
965 * src/Makefile.am: Add bison.c++.
966 * src/bison.c++: New skeleton.
968 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
972 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
974 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
976 2002-01-20 Marc Autret <marc@gnu.org>
978 * src/files.c (compute_output_file_names): Fix
980 2002-01-20 Marc Autret <marc@gnu.org>
982 * tests/output.at: New test.
983 * src/files.c (compute_base_names): Don't map extensions when
984 the YACC flag is set, use defaults.
985 Reported by Evgeny Stambulchik.
987 2002-01-20 Marc Autret <marc@gnu.org>
989 * src/system.h: Need to define __attribute__ away for non-GCC
990 compilers as well (i.e. the vendor C compiler).
991 Suggested by Albert Chin-A-Young.
993 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
995 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
996 canonical definition.
997 * src/system.h: Use the canonical definition for PARAMS (avoids
998 a conflict with the macro from lib/hash.h).
1000 2002-01-11 Akim Demaille <akim@epita.fr>
1002 * configure.in: Use AC_FUNC_STRNLEN.
1003 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1005 2002-01-09 Akim Demaille <akim@epita.fr>
1007 * src/files.c, src/files.h (output_infix): New.
1008 (tab_extension): Remove.
1009 (compute_base_names): Compute the former, drop the latter.
1010 * src/output.c (prepare): Insert the muscles `output-infix', and
1012 * src/parse-skel.y (string, string.1): New.
1013 (section.header): Use it.
1014 (section.yacc): Remove.
1015 (prefix): Remove too.
1016 * src/scan-skel.l: Adjust.
1017 * src/bison.simple, src/bison.hairy: Adjust.
1019 2002-01-09 Akim Demaille <akim@epita.fr>
1021 * configure.in (WERROR_CFLAGS): Compute it.
1022 * src/Makefile.am (CFLAGS): Pass it.
1023 * tests/atlocal.in (CFLAGS): Idem.
1024 * src/files.c: Fix a few warnings.
1025 (get_extension_index): Remove, unused.
1027 2002-01-08 Akim Demaille <akim@epita.fr>
1029 * src/getargs.c (AS_FILE_NAME): New.
1030 (getargs): Use it to convert DOSish file names.
1031 * src/files.c (base_name): Rename as full_base_name to avoid
1032 clashes with `base_name ()'.
1033 (filename_split): New.
1034 (compute_base_names): N-th rewrite, using filename_split.
1036 2002-01-08 Akim Demaille <akim@epita.fr>
1038 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1039 New, stolen from the Fileutils 4.1.
1040 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1041 * configure.in: Check for the presence of memrchr, and of its
1044 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1046 * lib/hash.h (__P): Added definition for this macro.
1047 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1048 BUILT_SOURCES, to ensure they are generated first.
1049 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1050 %error-verbose to allow bootstrapping with bison 1.30x.
1052 2002-01-06 Akim Demaille <akim@epita.fr>
1054 * src/reader.c (parse_braces): Don't fetch the next char, the
1055 convention is to fetch on entry.
1056 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1057 'switch' without a following semicolon.
1058 * tests/regression.at (braces parsing): New.
1060 2002-01-06 Akim Demaille <akim@epita.fr>
1062 Bison is dead wrong in its RR conflict reports.
1064 * tests/torture.at (GNU Cim Grammar): New.
1065 * src/conflicts.c (count_rr_conflicts): Fix.
1067 2002-01-06 Akim Demaille <akim@epita.fr>
1069 Creating package.m4 from configure.ac causes too many problems.
1071 * tests/Makefile.am (package.m4): Create it by hand,
1072 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1074 2002-01-06 Akim Demaille <akim@epita.fr>
1076 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1079 2002-01-04 Paul Eggert <eggert@twinsun.com>
1081 * doc/bison.texinfo (Debugging):
1082 Remove YYSTDERR; it's no longer defined or used.
1083 Also, s/cstdio.h/cstdio/.
1085 2002-01-03 Akim Demaille <akim@epita.fr>
1087 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1089 2002-01-03 Akim Demaille <akim@epita.fr>
1091 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1092 tracing code to --trace, wait for a better --trace option, with
1095 2002-01-03 Akim Demaille <akim@epita.fr>
1097 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1098 The ISO C++ standard is extremely clear about it: stderr is
1099 considered a macro, not a regular symbol (see table 94 `Header
1100 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1101 Therefore std:: does not apply to it. It still does with fprintf.
1102 Also, s/cstdio.h/cstdio/.
1104 2002-01-03 Akim Demaille <akim@epita.fr>
1106 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1107 for non system headers.
1109 2002-01-02 Akim Demaille <akim@epita.fr>
1111 Equip the skeleton chain with location tracking, runtime trace,
1112 pure parser and scanner.
1114 * src/parse-skel.y: Request a pure parser, locations, and prefix
1116 (%union): Having several members with the same type does not help
1117 type mismatches, simplify.
1118 (YYPRINT, yyprint): New.
1119 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1122 * src/scan-skel.l: Adjust to these changes.
1123 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1124 (LOCATION_PRINT, skel_control_t): New.
1126 2001-12-30 Akim Demaille <akim@epita.fr>
1128 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1129 replace `gb' with BLANKS.
1130 * src/scan-skel.l: Adjust.
1132 2001-12-30 Akim Demaille <akim@epita.fr>
1134 * src/system.h: We don't need nor want bcopy.
1135 Throw away MS-DOS crap: we don't need getpid.
1136 * configure.in: We don't need strndup. It was even causing
1137 problems: because Flex includes the headers *before* us,
1138 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1140 * lib/xstrndup.c: New.
1141 * src/scan-skel.l: Use it.
1142 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1143 * src/parse-skel.y: Use %directives instead of #defines.
1145 2001-12-30 Akim Demaille <akim@epita.fr>
1147 * src/skeleton.h: New.
1148 * src/output.c (output_parser, output_master_parser): Remove, dead
1150 * src/output.h (get_lines_number, actions_output, guards_output)
1151 (token_definitions_output): Prototype them.
1152 * src/parse-skel.y: Add the license notice.
1153 Include output.h and skeleton.h.
1154 (process_skeleton): Returns void, and takes a single parameter.
1155 * src/scan-skel.l: Add the license notice.
1157 Don't use %option yylineno: it seems that then Flex imagines
1158 REJECT has been used, and therefore it won't reallocate its
1159 buffers (which makes no other sense to me than a bug). It results
1160 in warnings for `unused: yy_flex_realloc'.
1162 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
1164 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1165 (MUSCLE_INSERT_PREFIX): ...to there.
1166 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1167 (MUSCLE_INSERT_PREFIX): Move from here...
1169 * src/bison.hairy: Add a section directive. Put braces around muscle
1170 names. This parser skeleton is still broken, but Bison should not
1171 choke on a bad muscle 'syntax'.
1172 * src/bison.simple: Add a section directive. Put braces around muscle
1175 * src/files.h (strsuffix, stringappend): Add declarations.
1176 (tab_extension): Add declaration.
1177 (short_base_name): Add declaration.
1179 * src/files.c (strsuffix, stringappend): No longer static. These
1180 functions are used in the skeleton parser.
1181 (tab_extension): New.
1182 (compute_base_names): Use the computations done in this function
1183 to guess if the generated parsers should have '.tab' in their
1185 (short_base_name): No longer static.
1187 * src/output.c (output_skeleton): New.
1188 (output): Disable call to output_master_parser, and give a try to
1189 a new skeleton handling system.
1190 (guards_output, actions_output): No longer static.
1191 (token_definitions_output, get_lines_number): No longer static.
1193 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1195 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1198 * src/parse-skel.y: New file.
1199 * src/scan-skel.l: New file.
1201 2001-12-29 Akim Demaille <akim@epita.fr>
1203 %name-prefix is broken.
1205 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1206 Adjust all dependencies.
1207 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1210 Renaming yylval but not yylloc is not consistent. Now we do.
1212 * src/bison.simple: Prefix yylloc if used.
1213 * doc/bison.texinfo (Decl Summary): Document that.
1215 2001-12-29 Akim Demaille <akim@epita.fr>
1217 * doc/bison.texinfo: Promote `%long-directive' over
1219 Remove all references to fixed-output-files, yacc is enough.
1221 2001-12-29 Akim Demaille <akim@epita.fr>
1223 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1224 user prologue. These are defaults.
1225 * tests/actions.at (Mid-rule actions): Make sure the user can
1226 define YYDEBUG and YYERROR_VERBOSE.
1228 2001-12-29 Akim Demaille <akim@epita.fr>
1230 * src/output.c (header_output): Don't forget to export YYLTYPE and
1232 * tests/headers.at (export YYLTYPE): New, make sure it does.
1233 * tests/regression.at (%union and --defines, Invalid CPP headers):
1235 * tests/headers.at: here.
1237 2001-12-29 Akim Demaille <akim@epita.fr>
1239 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1241 2001-12-29 Akim Demaille <akim@epita.fr>
1243 * tests/actions.at (Mid-rule actions): Output on a single line
1246 2001-12-29 Akim Demaille <akim@epita.fr>
1248 * doc/bison.texinfo: Formatting changes.
1250 2001-12-29 Akim Demaille <akim@epita.fr>
1252 Don't store the token defs in a muscle, just be ready to output it
1253 on command. Now possible via `symbols'. Fixes a memory leak.
1255 * src/output.c (token_definitions_output): New.
1256 (output_parser, header_output): Use it.
1257 * src/reader.c (symbols_save): Remove.
1259 2001-12-29 Akim Demaille <akim@epita.fr>
1261 * src/bison.simple: Do not provide a default for YYSTYPE and
1262 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1265 2001-12-29 Akim Demaille <akim@epita.fr>
1267 Mid-rule actions are simply... ignored!
1269 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1270 the empty-rule associated to the dummy symbol, not to the host
1272 * tests/actions.at (Mid-rule actions): New.
1274 2001-12-29 Akim Demaille <akim@epita.fr>
1278 * src/reader.c (reader): Free grammar.
1280 2001-12-29 Akim Demaille <akim@epita.fr>
1284 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1285 since it allocates it for each state, although only one is needed.
1286 (allocate_storage): Do it here.
1288 2001-12-29 Akim Demaille <akim@epita.fr>
1290 * src/options.h, src/options.c (create_long_option_table): Rename
1292 (long_option_table_new): this, with a clearer prototype.
1293 (percent_table): Remove, unused,
1294 * src/getargs.c (getargs): Adjust.
1296 2001-12-29 Akim Demaille <akim@epita.fr>
1298 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1299 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1302 2001-12-29 Akim Demaille <akim@epita.fr>
1304 * src/lalr.c (build_relations): Rename `states' as `states1'.
1305 Sorry, I don't understand exactly what it is, no better name...
1307 2001-12-29 Akim Demaille <akim@epita.fr>
1309 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1310 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1311 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1314 2001-12-29 Akim Demaille <akim@epita.fr>
1316 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1319 2001-12-29 Akim Demaille <akim@epita.fr>
1321 * src/reader.c, src/reader.h (user_toknums): Remove.
1322 Adjust all users to use symbols[i]->user_token_number.
1324 2001-12-29 Akim Demaille <akim@epita.fr>
1326 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1327 Adjust all users to use symbols[i]->prec or ->assoc.
1329 2001-12-29 Akim Demaille <akim@epita.fr>
1331 * src/reader.c, src/reader.h (tags): Remove.
1332 Adjust all users to use symbols[i]->tag.
1334 2001-12-29 Akim Demaille <akim@epita.fr>
1336 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1338 * src/reader.c (packsymbols): Fill this table.
1340 * src/conflicts.c (resolve_sr_conflict): Adjust.
1341 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1343 Use symbols[i]->tag instead of tags[i].
1345 2001-12-29 Akim Demaille <akim@epita.fr>
1347 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1348 In addition, put a comment in there, to replace...
1349 * tests/regression.at (%union and C comments): Remove.
1351 2001-12-29 Akim Demaille <akim@epita.fr>
1353 * tests/regression.at (Web2c Actions): Blindly move the actual
1354 output as expected output. The contents *seem* right to me, but I
1355 can't pretend reading perfectly parser tables... Nonetheless, all
1356 the other tests pass correctly, the table look OK, even though the
1357 presence of `$axiom' is to be noted: AFAICS it is useless (but
1360 2001-12-29 Akim Demaille <akim@epita.fr>
1362 * src/reader.c (readgram): Don't add the rule 0 if there were no
1363 rules read. In other words, add it _after_ having performed
1364 grammar sanity checks.
1365 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1367 2001-12-29 Akim Demaille <akim@epita.fr>
1369 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1370 visible, and some states have now a different number.
1372 2001-12-29 Akim Demaille <akim@epita.fr>
1374 * src/reader.c (readgram): Bind the initial rule's lineno to that
1376 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1377 (Solved SR Conflicts): Adjust rule 0's line number.
1379 2001-12-29 Akim Demaille <akim@epita.fr>
1381 Fix the `GAWK Grammar' failure.
1383 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1384 the reductions of the first state which was mistakenly confused
1385 with the final state because precisely final_state was initialized
1387 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1388 now noticed by Bison.
1389 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1390 have a reduction on $default.
1392 2001-12-29 Akim Demaille <akim@epita.fr>
1394 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1396 * src/closure.c (print_closure): Likewise.
1397 * src/derives.c (print_derives): Likewise.
1398 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1401 2001-12-29 Akim Demaille <akim@epita.fr>
1403 * src/lalr.c (lookaheads_print): New.
1404 (lalr): Call it when --trace-flag.
1405 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1408 2001-12-29 Akim Demaille <akim@epita.fr>
1410 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1411 when walking through ritem, even via rule->rhs.
1412 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1413 (useful_production, useless_nonterminals): Likewise.
1414 (reduce_grammar_tables): Likewise, plus update nritems.
1415 * src/nullable.c (set_nullable): Likewise.
1416 * src/lalr.c (build_relations): Likewise.
1417 * tests/sets.at (Nullable): Adjust.
1418 Fortunately, now, the $axiom is no longer nullable.
1420 2001-12-29 Akim Demaille <akim@epita.fr>
1422 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1424 * src/gram.c (ritem_longest_rhs): Likewise.
1425 * src/reduce.c (nonterminals_reduce): Likewise.
1426 * src/print_graph.c (print_graph): Likewise.
1427 * src/output.c (output_rule_data): Likewise.
1428 * src/nullable.c (set_nullable): Likewise.
1430 2001-12-29 Akim Demaille <akim@epita.fr>
1432 * src/output.c: Comment changes.
1434 2001-12-27 Paul Eggert <eggert@twinsun.com>
1436 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1437 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1438 Sparc, as they were causing more porting problems than the
1439 (minor) performance improvement was worth.
1441 Also, catch up with 1.31's YYSTD.
1443 2001-12-27 Akim Demaille <akim@epita.fr>
1445 * src/output.c (output_gram): Rely on nritems, not the
1446 0-sentinel. See below.
1447 Use -1 as separator, not 0.
1448 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1449 Rely on -1 as separator in yyrhs, instead of 0.
1450 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1451 twice `Now at end of input', therefore there are two lines less to
1454 2001-12-27 Akim Demaille <akim@epita.fr>
1456 * tests/regression.at (Unresolved SR Conflicts):
1457 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1460 2001-12-27 Akim Demaille <akim@epita.fr>
1462 * src/LR0.c (new_state): Recognize the final state by the fact it
1463 is reached by eoftoken.
1464 (insert_start_shifting_state, insert_eof_shifting_state)
1465 (insert_accepting_state, augment_automaton): Remove, since now
1466 these states are automatically computed from the initial state.
1467 (generate_states): Adjust.
1468 * src/print.c: When reporting a rule number to the user, substract
1469 1, so that the axiom rule is rule 0, and the first user rule is 1.
1470 * src/reduce.c: Likewise.
1471 * src/print_graph.c (print_core): For the time being, just as for
1472 the report, depend upon --trace-flags to dump the full set of
1474 * src/reader.c (readgram): Once the grammar read, insert the rule
1475 0: `$axiom: START-SYMBOL $'.
1476 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1477 number of the states has changed (the final state is no longer
1478 necessarily the last), catch up.
1480 2001-12-27 Akim Demaille <akim@epita.fr>
1482 Try to make the use of the eoftoken valid. Given that its value
1483 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1484 is used instead of > 0 where appropriate, (ii), depend upon nritems
1485 instead of the 0-sentinel.
1487 * src/gram.h, src/gram.c (nritems): New.
1488 Expected to be duplication of nitems, but for the time being...
1489 * src/reader.c (packgram): Assert nritems and nitems are equal.
1490 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1491 * src/closure.c (print_closure, print_fderives): Likewise.
1492 * src/gram.c (ritem_print): Likewise.
1493 * src/print.c (print_core, print_grammar): Likewise.
1494 * src/print_graph.c: Likewise.
1496 2001-12-27 Akim Demaille <akim@epita.fr>
1498 * src/main.c (main): If there are complains after grammar
1499 reductions, then output the report anyway if requested, then die.
1500 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1501 * src/reader.c (eoftoken): New.
1502 (parse_token_decl): If the token being defined has value `0', it
1504 (packsymbols): No longer hack `tags' to insert `$' by hand.
1505 Be sure to preserve the value of the eoftoken.
1506 (reader): Make sure eoftoken is defined.
1507 Initialize nsyms to 0: now eoftoken is created just like the others.
1508 * src/print.c (print_grammar): Don't special case the eof token.
1509 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1510 lie anyway, albeit pleasant.
1511 * tests/calc.at: Exercise error messages with eoftoken.
1512 Change the grammar so that empty input is invalid.
1513 Adjust expectations.
1514 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1516 2001-12-27 Akim Demaille <akim@epita.fr>
1518 * configure.in: Check the protos of strchr ans strspn.
1519 Replace strchr if needed.
1520 * src/system.h: Provide the protos of strchr, strspn and memchr if
1522 * lib/strchr.c: New.
1523 * src/reader.c (symbols_save): Use strchr.
1525 2001-12-27 Akim Demaille <akim@epita.fr>
1527 * src/print.c, src/print_graph.c (escape): New.
1528 Use it to quote the TAGS outputs.
1529 * src/print_graph.c (print_state): Now errors are in red, and
1530 reductions in green.
1531 Prefer high to wide: output the state number on a line of its own.
1533 2001-12-27 Akim Demaille <akim@epita.fr>
1535 * src/state.h, src/state.c (reductions_new): New.
1536 * src/LR0.c (set_state_table): Let all the states have a
1537 `reductions', even if reduced to 0.
1538 (save_reductions): Adjust.
1539 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1540 * src/print.c (print_reductions, print_actions): Adjust.
1541 * src/output.c (action_row): Adjust.
1543 2001-12-27 Akim Demaille <akim@epita.fr>
1545 * src/state.h, src/state.c (errs_new, errs_dup): New.
1546 * src/LR0.c (set_state_table): Let all the states have an errs,
1547 even if reduced to 0.
1548 * src/print.c (print_errs, print_reductions): Adjust.
1549 * src/output.c (output_actions, action_row): Adjust.
1550 * src/conflicts.c (resolve_sr_conflict): Adjust.
1552 2001-12-27 Akim Demaille <akim@epita.fr>
1554 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1556 2001-12-27 Akim Demaille <akim@epita.fr>
1558 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1559 * src/print.c: here.
1560 (lookaheadset, shiftset): New, used as additional storage by
1562 (print_results): Adjust.
1563 (print_shifts, print_gotos, print_errs): New, extracted from...
1564 (print_actions): here.
1565 * src/print_graph.c (print_actions): Remove dead code.
1567 2001-12-27 Akim Demaille <akim@epita.fr>
1569 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1572 2001-12-27 Akim Demaille <akim@epita.fr>
1574 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1575 (build_relations): Adjust.
1577 2001-12-27 Akim Demaille <akim@epita.fr>
1579 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1582 2001-12-27 Akim Demaille <akim@epita.fr>
1584 * src/reader.c (packgram): Catch nitems overflows.
1586 2001-12-27 Akim Demaille <akim@epita.fr>
1588 * src/files.c, src/files.h (guard_obstack): Remove.
1589 * src/output.c (output): Adjust.
1590 * src/reader.c (parse_braces): New, factoring...
1591 (copy_action, copy_guard): these two which are renamed as...
1592 (parse_action, parse_guard): these.
1593 As a voluntary consequence, using braces around guards is now
1596 2001-12-27 Akim Demaille <akim@epita.fr>
1598 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1599 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1601 (symbol_list_new): Adjust.
1602 (copy_action): action_line is the first line, not the last.
1603 (copy_guard): Just as for actions, store the `action' only, not
1604 the switch/case/break flesh.
1605 Don't parse the user action that might follow the guard, let...
1606 (readgram): do it, i.e., now, there can be an action after a
1608 In other words the guard is just explicitly optional.
1610 * src/output.c (guards_output): New.
1611 (output_parser): Call it when needed.
1612 (output): Also free the guard and attrs obstacks.
1613 * src/files.c, src/files.h (obstack_save): Remove.
1614 (output_files): Remove.
1615 As a result, if one needs the former `.act' file, using an
1616 appropriate skeleton which requires actions and guards is now
1618 * src/main.c (main): Adjust.
1619 * tests/semantic.at: New.
1620 * tests/regression.at: Use `input.y' as input file name.
1621 Avoid 8+3 problems by requiring input.c when the test needs the
1624 2001-12-27 Akim Demaille <akim@epita.fr>
1626 * src/reader.c (symbol_list_new): Be sure to initialize all the
1629 2001-12-27 Akim Demaille <akim@epita.fr>
1631 All the hacks using a final pseudo state are now useless.
1633 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1634 * src/lalr.c (nLA): New.
1635 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1636 instead of lookaheadsp from the pseudo state (nstate + 1).
1638 2001-12-27 Akim Demaille <akim@epita.fr>
1640 * src/output.c (action_row, token_actions): Use a state_t instead
1641 of a integer, and nlookaheads instead of the following state's
1644 2001-12-27 Akim Demaille <akim@epita.fr>
1646 * src/conflicts.c (log_resolution, flush_shift)
1647 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1648 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1649 (conflicts_print, print_reductions): Use a state_t instead of an
1650 integer when referring to a state.
1651 As much as possible, depend upon nlookaheads, instead of the
1652 `lookaheadsp' member of the following state (since lookaheads of
1653 successive states are successive, the difference between state n + 1
1654 and n served as the number of lookaheads for state n).
1655 * src/lalr.c (add_lookback_edge): Likewise.
1656 * src/print.c (print_core, print_actions, print_state)
1657 (print_results): Likewise.
1658 * src/print_graph.c (print_core, print_actions, print_state)
1659 (print_graph): Likewise.
1660 * src/conflicts.h: Adjust.
1662 2001-12-27 Akim Demaille <akim@epita.fr>
1664 * src/bison.hairy: Formatting/comment changes.
1666 Remove `register' indications.
1667 Add plenty of `static'.
1669 2001-12-27 Akim Demaille <akim@epita.fr>
1671 * src/output.c (prepare): Drop the muscle `ntbase' which
1673 * src/bison.simple: Formatting/comment changes.
1674 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1675 is an undocumented synonym.
1677 2001-12-22 Akim Demaille <akim@epita.fr>
1679 * src/output.c (output_table_data): Change the prototype to use
1680 `int' for array ranges: some invocations do pass an int, not a
1682 Reported by Wayne Green.
1684 2001-12-22 Akim Demaille <akim@epita.fr>
1686 Some actions of web2c.y are improperly triggered.
1687 Reported by Mike Castle.
1689 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1690 * tests/regression.at (Web2c): Rename as...
1691 (Web2c Report): this.
1692 (Web2c Actions): New.
1694 2001-12-22 Akim Demaille <akim@epita.fr>
1696 Reductions in web2c.y are improperly reported.
1697 Reported by Mike Castle.
1699 * src/conflicts.c (print_reductions): Fix.
1700 * tests/regression.at (Web2c): New.
1702 2001-12-18 Akim Demaille <akim@epita.fr>
1704 Some host fail on `assert (!"foo")', which expands to
1705 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1706 Reported by Nelson Beebee.
1708 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1709 `#define it_succeeded 0' and `assert (it_succeeded)'.
1711 2001-12-17 Marc Autret <autret_m@epita.fr>
1713 * src/bison.simple: Don't hard code the skeleton line and filename.
1714 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1715 New line counter 'skeleton_line' (skeleton-line muscle).
1717 2001-12-17 Paul Eggert <eggert@twinsun.com>
1719 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1720 YYDEBUG must be defined to a nonzero value.
1722 * src/bison.simple (yytname): Do not assume that the user defines
1723 YYDEBUG to a properly parenthesized expression.
1725 2001-12-17 Akim Demaille <akim@epita.fr>
1727 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1728 nlookaheads is a new member.
1730 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1731 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1734 2001-12-17 Akim Demaille <akim@epita.fr>
1736 * src/files.h, src/files.c (open_files, close_files): Remove.
1737 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1739 * src/reader.c (reader): Do it.
1741 2001-12-17 Akim Demaille <akim@epita.fr>
1743 * src/conflicts.c (print_reductions): Formatting changes.
1745 2001-12-17 Akim Demaille <akim@epita.fr>
1747 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1748 (flush_reduce): New.
1749 (resolve_sr_conflict): Adjust.
1751 2001-12-17 Akim Demaille <akim@epita.fr>
1753 * src/output.c (output_obstack): Be static and rename as...
1754 (format_obstack): this, to avoid any confusion with files.c's
1756 * src/reader.h (muscle_obstack): Move to...
1757 * src/output.h: here, since it's defined in output.c.
1759 2001-12-17 Akim Demaille <akim@epita.fr>
1761 * src/output.c (action_row, save_column, default_goto)
1762 (sort_actions, matching_state, pack_vector): Better variable
1765 2001-12-17 Akim Demaille <akim@epita.fr>
1767 * src/output.c: Various formatting changes.
1769 2001-12-17 Akim Demaille <akim@epita.fr>
1771 * src/files.c (output_files): Free the output_obstack.
1772 * src/main.c (main): Call print and print_graph conditionally.
1773 * src/print.c (print): Work unconditionally.
1774 * src/print_graph.c (print_graph): Work unconditionally.
1775 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1777 2001-12-16 Marc Autret <autret_m@epita.fr>
1779 * src/output.c (actions_output): Fix. When we use %no-lines,
1780 there is one less line per action.
1782 2001-12-16 Marc Autret <autret_m@epita.fr>
1784 * src/bison.simple: Remove a useless #line directive.
1785 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1786 * src/output.c (get_lines_number): New.
1787 (output_parser): Adjust, now takes care about the lines of a
1790 (actions_output): Computes the number of lines taken by actions.
1791 (output_master_parser): Insert new skeleton which is the name of
1792 the output parser file name.
1794 2001-12-15 Marc Autret <autret_m@epita.fr>
1796 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1798 2001-12-15 Marc Autret <autret_m@epita.fr>
1800 * src/output.c (output_gram): Keep track of the hairy one.
1802 2001-12-15 Akim Demaille <akim@epita.fr>
1804 Make `make distcheck' work.
1806 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1807 system.h which uses libgettext.h.
1809 2001-12-15 Akim Demaille <akim@epita.fr>
1811 * src/nullable.c (set_nullable): Useless rules must be skipped,
1812 otherwise, since we range over their symbols, we might look at a
1813 nonterminal which no longer ``exists'', i.e., it is not counted in
1814 `nvars', hence we overflow our arrays.
1816 2001-12-15 Akim Demaille <akim@epita.fr>
1818 The header can also be produced directly, without any obstack!
1821 * src/files.c, src/files.h (defines_obstack): Remove.
1822 (compute_header_macro): Global.
1823 (defines_obstack_save): Remove.
1824 * src/reader.c (parse_union_decl): No longer output to
1825 defines_obstack: its content can be found in the `stype' muscle
1827 (output_token_translations): Merge into...
1828 (symbols_output): this.
1830 (symbols_save): this.
1832 * src/output.c (header_output): New.
1835 2001-12-15 Akim Demaille <akim@epita.fr>
1837 * src/reader.c (parse_union_decl): Instead of handling two obstack
1838 simultaneously, use one to define the `stype' muscle, and use the
1839 value of the latter to fill defines_obstack.
1840 (copy_comment): Remove.
1841 (copy_comment2): Work for a single obstack.
1843 (copy_comment): this.
1845 2001-12-15 Akim Demaille <akim@epita.fr>
1847 * src/lex.c, src/lex.h (xgetc): No longer static.
1848 * src/reader.c (parse_union_decl): Revamp.
1850 2001-12-15 Akim Demaille <akim@epita.fr>
1852 Still making progress in separating Bison into (i) input, (ii)
1853 process, (iii) output: now we can directly output the parser file
1854 without using table_obstack at all.
1856 * src/files.c, src/files.h (table_obstack): Bye bye.
1857 (parser_file_name): New.
1858 * src/files.c (compute_output_file_names): Compute it.
1859 * src/output.c (actions_output, output_parser)
1860 (output_master_parser): To a file instead of an obstack.
1862 2001-12-15 Akim Demaille <akim@epita.fr>
1864 Attach actions to rules, instead of pre-outputting them to
1867 * src/gram.h (rule_t): action and action_line are new members.
1868 * src/reader.c (symbol_list): Likewise.
1869 (copy_action): Save the actions within the rule.
1870 (packgram): Save them in rule_table.
1871 * src/output.c (actions_output): New.
1872 (output_parser): Use it on `%%actions'.
1873 (output_rule_data): Don't free rule_table.
1875 (prepare): Don't save the `action' muscle.
1876 * src/bison.simple: s/%%action/%%actions/.
1878 2001-12-15 Akim Demaille <akim@epita.fr>
1880 * src/reader.c (copy_action): When --yacc, don't append a `;'
1881 to the user action: let it fail if lacking.
1882 Suggested by Arnold Robbins and Tom Tromey.
1884 2001-12-14 Akim Demaille <akim@epita.fr>
1886 * src/lex.c (literalchar): Simply return the char you decoded, non
1887 longer mess around with obstacks and int pointers.
1890 2001-12-14 Akim Demaille <akim@epita.fr>
1892 * src/lex.c (literalchar): Don't escape the special characters,
1893 just decode them, and keep them as char (before, eol was output as
1894 the 2 char string `\n' etc.).
1895 * src/output.c (output_rule_data): Use quotearg to output the
1898 2001-12-13 Paul Eggert <eggert@twinsun.com>
1900 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1901 Do not infringe on the global user namespace when using C++.
1902 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1903 All uses of `fprintf' and `stderr' changed.
1905 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1907 2001-12-13 Akim Demaille <akim@epita.fr>
1909 The computation of nullable is broken: it doesn't handle empty
1912 * tests/torture.at (GNU AWK Grammar): New.
1913 * tests/sets.at (Nullable): New.
1914 * src/nullable.c (set_nullable): Instead of blindly looping over
1915 `ritems', loop over the rules, and then over their rhs's.
1917 Work around Autotest bugs.
1919 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1920 frame, because Autotest understand lines starting with a `+' as
1921 traces from the shell. Then, they are not processed properly.
1922 Admittedly an Autotest bug, but we don't have time to wait for
1923 Autotest to catch up.
1924 * tests/regression.at (Broken Closure): Adjust to the new table
1927 * tests/sets.at: here.
1929 2001-12-13 Akim Demaille <akim@epita.fr>
1931 * src/closure.c (closure): Use nrules instead of playing tricks
1934 2001-12-13 Akim Demaille <akim@epita.fr>
1936 * src/print.c (print_actions): Output the handling of `$' as the
1937 traces do: shifting the token EOF. Before EOF was treated as a
1939 * tests/regression.at: Adjust some tests.
1940 * src/print_graph.c (print_core): Complete the set of items via
1941 closure. The next-to-final and final states are still unsatisfying,
1942 but that's to be addressed elsewhere.
1943 No longer output the rule numbers, but do output the state number.
1944 A single loop for the shifts + gotos is enough, but picked a
1945 distinct color for each.
1946 (print_graph): Initialize and finalize closure.
1948 2001-12-13 Akim Demaille <akim@epita.fr>
1950 * src/reader.c (readgram): Remove dead code, an strip useless
1952 (get_type): Remove, unused.
1954 2001-12-12 Akim Demaille <akim@epita.fr>
1956 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1957 on that of lib/error.c.
1959 2001-12-12 Akim Demaille <akim@epita.fr>
1961 Some hosts don't like `/' in includes.
1963 * src/system.h: Include libgettext.h without qualifying the path.
1964 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1967 2001-12-11 Marc Autret <autret_m@epita.fr>
1969 * src/output.c (output_parser): Remove useless muscle.
1971 2001-12-11 Marc Autret <autret_m@epita.fr>
1973 * src/bison.simple: Remove #line just before %%epilogue. It
1974 is now handled in ...
1975 * src/reader.c (read_additionnal_code): Add the output of a
1976 #line for the epilogue.
1978 2001-12-10 Marc Autret <autret_m@epita.fr>
1980 * src/reader.c (copy_definition): Re-use CPP-outed code which
1981 replace precedent remove.
1982 * src/bison.simple: Remove #line before %%prologue because
1983 %%input-line is wrong at this time.
1985 2001-12-10 Marc Autret <autret_m@epita.fr>
1987 * src/reader.c (symbols_output): Clean up.
1988 * src/output.c (output_gram, output): Clean up.
1990 2001-12-10 Akim Demaille <akim@epita.fr>
1992 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1993 * src/LR0.c (set_state_table): here.
1994 * src/lalr.c (lalr): Call it.
1996 2001-12-10 Akim Demaille <akim@epita.fr>
1998 * src/state.h (shifts): Remove the `number' member: shifts are
1999 attached to state, hence no longer need to be labelled with a
2002 2001-12-10 Akim Demaille <akim@epita.fr>
2004 Now that states have a complete set of members, the linked list of
2005 shifts is useless: just fill directly the state's shifts member.
2007 * src/state.h (shifts): Remove the `next' member.
2008 * src/LR0.c (first_state, last_state): Remove.
2010 (augment_automaton): Don't look for the shifts that must be added
2011 a shift on EOF: it is those of the state we looked for! But now,
2012 since shifts are attached, it is no longer needed to looking
2013 merely by its id: its number.
2015 2001-12-10 Akim Demaille <akim@epita.fr>
2017 * src/LR0.c (augment_automaton): Better variable locality.
2018 Remove an impossible branch: if there is a state corresponding to
2019 the start symbol being shifted, then there is shift for the start
2020 symbol from the initial state.
2022 2001-12-10 Akim Demaille <akim@epita.fr>
2024 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2025 only when appropriate: when insert_start_shifting_state' is not
2027 * tests/regression.at (Rule Line Numbers): Adjust.
2029 2001-12-10 Akim Demaille <akim@epita.fr>
2031 * src/LR0.c (augment_automaton): Now that all states have shifts,
2032 merge the two cases addition shifts to the initial state.
2034 2001-12-10 Akim Demaille <akim@epita.fr>
2036 * src/lalr.c (set_state_table): Move to...
2038 * src/lalr.c (lalr): Don't call it...
2039 * src/LR0.c (generate_states): do it.
2040 * src/LR0.h (first_state): Remove, only the table is used.
2042 2001-12-10 Akim Demaille <akim@epita.fr>
2044 * src/LR0.h (first_shift, first_reduction): Remove.
2045 * src/lalr.c: Don't use first_shift: find shifts through the
2048 2001-12-10 Akim Demaille <akim@epita.fr>
2050 * src/LR0.c: Attach shifts to states as soon as they are
2052 * src/lalr.c (set_state_table): Instead of assigning shifts to
2053 state, just assert that the mapping was properly done.
2055 2001-12-10 Akim Demaille <akim@epita.fr>
2057 * src/LR0.c (insert_start_shift): Rename as...
2058 (insert_start_shifting_state): this.
2059 (insert_eof_shifting_state, insert_accepting_state): New.
2060 (augment_automaton): Adjust.
2061 Better locality of the variables.
2062 When looking if the start_symbol is shifted from the initial
2063 state, using `while (... symbol != start_symbol ...)' sounds
2064 better than `while (... symbol < start_symbol ...)': If fail
2065 to see how the order between symbols could be relevant!
2067 2001-12-10 Akim Demaille <akim@epita.fr>
2069 * src/getargs.h: Don't declare `spec_name_prefix' and
2070 `spec_file_prefix', declared by src/files.h.
2071 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2072 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2073 * src/output.c (prepare): Adjust.
2074 * src/reader.c (symbols_output): Likewise.
2075 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2077 2001-12-10 Akim Demaille <akim@epita.fr>
2079 * src/muscle_tab.c (muscle_init): NULL is a better default than
2082 2001-12-10 Akim Demaille <akim@epita.fr>
2084 * src/reader.c (reader): Calling symbols_output once is enough.
2086 2001-12-10 Akim Demaille <akim@epita.fr>
2088 Now that states have a complete set of members, the linked list of
2089 reductions is useless: just fill directly the state's reductions
2092 * src/state.h (struct reductions): Remove member `number' and
2094 * src/LR0.c (first_reduction, last_reduction): Remove.
2095 (save_reductions): Don't link the new reductions, store them in
2097 * src/lalr.c (set_state_table): No need to attach reductions to
2098 states, it's already done.
2099 * src/output.c (output_actions): No longer free the shifts, then
2100 the reductions, then the states: free all the states and their
2103 2001-12-10 Akim Demaille <akim@epita.fr>
2105 * src/options.c (OPTN, DRTV, BOTH): New.
2106 (option_table): Use them.
2108 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2109 the job of system.h.
2110 * src/options.c: Don't include stdio.h and xalloc.h for the same
2113 2001-12-10 Akim Demaille <akim@epita.fr>
2115 * src/output.c (output, prepare): Make sure the values of the
2116 muscles `action' and `prologue' are 0-terminated.
2118 2001-12-10 Akim Demaille <akim@epita.fr>
2120 Clean up GCC warnings.
2122 * src/reader.c (copy_action): `buf' is not used.
2123 (parse_skel_decl): Be static.
2124 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2125 * src/options.h (create_long_option_table): Have a real prototype.
2126 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2127 (hash_delete_at): Return const void *.
2128 Adjust casts to preserve the const.
2130 2001-12-10 Akim Demaille <akim@epita.fr>
2132 * configure.in: Require 2.52g.
2133 M4 is not needed, but AUTOM4TE is.
2135 * tests/Makefile.am: Adjust.
2137 2001-12-10 Akim Demaille <akim@epita.fr>
2139 One structure for states is enough, even though theoretically
2140 there are LR(0) states and LALR(1) states.
2142 * src/lalr.h (state_t): Remove.
2143 (state_table): Be state_t **, not state_t *.
2144 * src/state.h (core, CORE_ALLOC): Rename as...
2145 (state_t, STATE_ALLOC): this.
2146 Add the LALR(1) members: shifts, reductions, errs.
2147 * src/LR0.c (state_table): Rename as...
2148 (state_hash): this, to avoid name clashes with the global
2150 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2151 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2153 2001-12-10 Akim Demaille <akim@epita.fr>
2155 Bison dumps core on bash.y.
2156 Reported by Pascal Bart.
2158 * src/warshall.c (bitmatrix_print): New.
2160 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2161 j must be the outer loop.
2162 * tests/regression.at (Broken Closure): New.
2164 2001-12-05 Akim Demaille <akim@epita.fr>
2166 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2168 Reported by Peter Hámorský.
2170 2001-12-05 Akim Demaille <akim@epita.fr>
2172 * src/conflicts.c (err_table): Remove.
2173 (resolve_sr_conflict): Adjust.
2174 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
2176 (state_t.reductions, state_t.shifts): this.
2178 2001-12-05 Akim Demaille <akim@epita.fr>
2180 * src/reduce.c (reduce_grammar_tables): No longer disable the
2181 removal of useless rules via CPP but via `if (0)', so that the
2182 compiler still check the code is valid.
2183 For instance, it should have noticed `rline' no longer exists: use
2184 the `line' member of rule_t.
2185 * src/gram.c (dummy, rline): Remove, unused.
2187 2001-12-05 Akim Demaille <akim@epita.fr>
2189 * src/output.c (pack_vector): Use assert, not berror.
2190 * src/main.c (berror): Remove, unused.
2192 2001-12-05 Akim Demaille <akim@epita.fr>
2194 New experimental feature: if --verbose --trace output all the
2195 items of a state, not only its kernel.
2197 * src/print.c (print_core): If `trace_flag', then invoke closure
2198 before outputting the items of the state (print_core is no longer
2199 a correct name them).
2200 (print_results): Invoke new_closure/free_closure if needed.
2202 2001-12-05 Akim Demaille <akim@epita.fr>
2204 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
2205 * src/closure.c, src/closure.h (itemsetsize): Rename as...
2206 (nitemset): for consistency with the rest of the project.
2208 2001-12-05 Akim Demaille <akim@epita.fr>
2210 * src/closure.c (print_closure): Improve.
2211 (closure): Use it for printing input and output.
2213 2001-12-05 Akim Demaille <akim@epita.fr>
2215 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
2216 indexed by nonterminals.
2218 2001-12-05 Akim Demaille <akim@epita.fr>
2220 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
2222 * src/warshall.h: Remove accidental duplication of the content.
2224 2001-12-05 Akim Demaille <akim@epita.fr>
2226 * src/closure.c (set_fderives): De-obfuscate.
2228 2001-12-05 Akim Demaille <akim@epita.fr>
2230 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
2232 2001-12-05 Akim Demaille <akim@epita.fr>
2234 * src/closure.c (set_firsts): De-obfuscate.
2236 2001-12-05 Akim Demaille <akim@epita.fr>
2238 * src/output.c (action_row): De-obfuscate
2239 using the good o' techniques: arrays not pointers, variable
2240 locality, BITISSET, RESETBIT etc.
2242 2001-12-05 Akim Demaille <akim@epita.fr>
2244 Pessimize the code to simplify it: from now on, all the states
2245 have a valid SHIFTS, which NSHIFTS is possibly 0.
2247 * src/LR0.c (shifts_new): Be global and move to..
2248 * src/state.c, src/state.h: here.
2249 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
2250 * src/print_graph: Adjust.
2252 2001-12-05 Akim Demaille <akim@epita.fr>
2254 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
2255 * src/conflicts.c: Use it.
2256 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
2257 incorrectly ``simplified''.
2259 2001-12-05 Akim Demaille <akim@epita.fr>
2261 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
2262 using the good o' techniques: arrays not pointers, variable
2263 locality, BITISSET, RESETBIT etc.
2265 2001-12-05 Akim Demaille <akim@epita.fr>
2267 * src/state.h (SHIFT_SYMBOL): New.
2268 * src/conflicts.c: Use it to deobfuscate.
2270 2001-12-05 Akim Demaille <akim@epita.fr>
2272 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
2273 (print_reductions): De-obfuscate using the good o' techniques:
2274 arrays not pointers, variable locality, BITISSET.
2276 2001-12-05 Akim Demaille <akim@epita.fr>
2278 * src/conflicts.c (print_reductions): Arrays, not pointers.
2281 2001-12-05 Akim Demaille <akim@epita.fr>
2283 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2285 2001-12-05 Akim Demaille <akim@epita.fr>
2287 * src/conflicts.c (print_reductions): Improve variable locality.
2289 2001-12-05 Akim Demaille <akim@epita.fr>
2291 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2293 2001-12-05 Akim Demaille <akim@epita.fr>
2295 * src/conflicts.c (print_reductions): Improve variable locality.
2297 2001-12-05 Akim Demaille <akim@epita.fr>
2299 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
2300 * src/lalr.c: Use them.
2302 2001-12-05 Akim Demaille <akim@epita.fr>
2304 * src/LR0.c (augment_automaton): Formatting changes.
2305 Better variable locality.
2307 2001-12-05 Akim Demaille <akim@epita.fr>
2309 * src/lalr.c (matrix_print): New.
2310 (transpose): Use it.
2311 Use arrays instead of pointers.
2313 2001-12-05 Akim Demaille <akim@epita.fr>
2315 * src/lalr.c (maxrhs): Move to...
2316 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
2317 * src/lalr.c (build_relations): Adjust.
2319 2001-12-05 Akim Demaille <akim@epita.fr>
2321 * src/lalr.c (transpose): Free the memory allocated to the
2322 argument, as it is replaced by the results by the unique caller.
2323 (build_relations): Merely invoke transpose: it handles the memory
2325 Improve variable locality.
2326 Avoid variables used as mere abbreviations.
2327 (compute_lookaheads): Use arrays instead of pointers.
2329 2001-12-05 Akim Demaille <akim@epita.fr>
2331 * src/lalr.c (initialize_F): Improve variable locality.
2332 Avoid variables used as mere abbreviations.
2334 2001-12-05 Akim Demaille <akim@epita.fr>
2336 * src/derives.c (print_derives): Display the ruleno.
2337 * src/lalr.c (initialize_F, transpose): Better variable locality
2338 to improve readability.
2339 Avoid variables used as mere abbreviations.
2341 2001-12-05 Akim Demaille <akim@epita.fr>
2343 * src/lalr.c (traverse): Use arrays instead of pointers.
2345 2001-12-05 Akim Demaille <akim@epita.fr>
2347 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
2348 the handling of squeue.
2349 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2351 2001-12-05 Akim Demaille <akim@epita.fr>
2353 Because useless nonterminals are now kept alive (instead of being
2354 `destroyed'), we now sometimes examine them, and store information
2355 related to them. Hence we need to know their number, and adjust
2358 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
2360 * src/LR0.c (allocate_itemsets): The memory allocated to
2361 `symbol_count' was used for two different purpose: once to count
2362 the number of occurrences of each symbol, and later reassigned to
2363 `shift_symbol', containing the symbol that can be shifted from a
2365 Deobfuscate, i.e., allocate, use and free `symbol_count' here
2367 (new_itemsets): Allocate `shift_symbol' here.
2368 (allocate_itemsets): symbol_count includes useless nonterminals.
2370 (free_storage): Use `free', not `XFREE', for pointers that cannot
2373 2001-12-05 Akim Demaille <akim@epita.fr>
2375 * src/nullable.c (set_nullable): Deobfuscate the handling of
2377 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2379 2001-12-05 Akim Demaille <akim@epita.fr>
2381 * src/gram.c, src/gram.h (ritem_print): New.
2382 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
2383 (This useless function was defined only to work around VMS linkers
2384 that can't handle compilation units with variables only).
2385 * src/reduce.c (dump_grammar): Use it to trace the construction of
2388 2001-12-04 Paul Eggert <eggert@twinsun.com>
2390 * src/bison.simple (union yyalloc): Change member names
2391 to be the same as the stack names.
2392 (yyparse): yyptr is now union yyalloc *, not char *.
2393 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
2394 and may generate better code on some machines.
2395 (yystpcpy): Use prototype if __STDC__ is defined, not just
2396 if __cplusplus is defined.
2398 2001-11-30 Akim Demaille <akim@epita.fr>
2400 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
2401 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
2402 Gettext doesn't compile cleanly, and dies with -Werror.
2403 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
2404 Include WARNING_CFLAGS here.
2405 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
2406 before being defined.
2408 2001-11-27 Paul Eggert <eggert@twinsun.com>
2410 * lib/quotearg.h (quotearg_n, quotearg_n_style):
2411 First arg is int, not unsigned.
2412 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2413 (SIZE_MAX, UINT_MAX): New macros.
2414 (quotearg_n_options): Abort if N is negative.
2415 Avoid overflow check on hosts where size_t is 64 bits and int
2416 is 32 bits, as overflow is impossible there.
2417 Fix off-by-one typo that caused unnecessary reallocation.
2419 2001-11-29 Paul Eggert <eggert@twinsun.com>
2421 Name space cleanup in generated parser.
2423 * doc/bison.texinfo (Bison Parser): Discuss system headers
2424 and their effect on the user name space.
2427 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
2428 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
2429 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
2431 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
2432 on user names when possible.
2434 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
2435 Simplify test for whather <alloca.h> exists.
2437 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
2439 (<stdio.h>): Include if YYDEBUG.
2441 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
2442 ! defined (yyoverflow) && ! defined (yymemcpy).
2444 (yymemcpy, yyparse): Rename local variables as needed so that
2445 they all begin with 'yy'.
2447 (yystrlen, yystpcpy): New functions.
2449 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
2452 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
2453 instead of relying on string.h functions. Use YYSTACK_ALLOC
2454 and YYSTACK_FREE instead of malloc and free.
2456 2001-11-30 Akim Demaille <akim@epita.fr>
2458 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
2459 before their first uses.
2460 (YYBISON, YYPURE): Move to the top of the output.
2462 2001-11-30 Akim Demaille <akim@epita.fr>
2464 * tests/reduce.at (Useless Nonterminals): Fix.
2466 2001-11-30 Akim Demaille <akim@epita.fr>
2468 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
2469 if body instead of `;' to pacify GCC's warnings.
2471 2001-11-30 Akim Demaille <akim@epita.fr>
2473 Instead of mapping the LHS of unused rules to -1, keep the LHS
2474 valid, but flag the rules as invalid.
2476 * src/gram.h (rule_t): `useful' is a new member.
2477 * src/print.c (print_grammar): Adjust.
2478 * src/derives.c (set_derives): Likewise.
2479 * src/reader.c (packgram, reduce_output): Likewise.
2480 * src/reduce.c (reduce_grammar_tables): Likewise.
2481 * tests/reduce.at (Underivable Rules, Useless Rules): New.
2483 2001-11-30 Akim Demaille <akim@epita.fr>
2485 * src/reduce.c (reduce_output): Formatting changes.
2486 * src/print.c (print_results, print_grammar): Likewise.
2487 * tests/regression.at (Rule Line Numbers)
2488 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2490 2001-11-30 Akim Demaille <akim@epita.fr>
2492 * src/reduce.c (nonterminals_reduce): Instead of throwing away
2493 useless nonterminals, move them at the end of the symbol arrays.
2494 (reduce_output): Adjust.
2495 * tests/reduce.at (Useless Nonterminals): Adjust.
2497 2001-11-30 Akim Demaille <akim@epita.fr>
2499 * src/reduce.c: Various comment/formatting changes.
2500 (nonterminals_reduce): New, extracted from...
2501 (reduce_grammar_tables): here.
2502 (reduce_grammar): Call nonterminals_reduce.
2504 2001-11-29 Paul Eggert <eggert@twinsun.com>
2506 * src/bison.simple (YYSTACK_REALLOC): Remove.
2507 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2508 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2510 (union yyalloc): New type.
2511 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2512 an arbitrary restriction on hosts where size_t is wider than int.
2514 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2515 a parser stack overflow. Allocate just one block of memory for all
2516 three stacks, instead of allocating three blocks; this typically is
2517 faster and reduces fragmentation.
2519 Do not limit the number of items in the stack to a value that fits
2520 in 'int', as this is an arbitrary limit on hosts with 64-bit
2521 size_t and 32-bit int.
2523 2001-11-29 Marc Autret <autret_m@epita.fr>
2525 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2526 of defining YYERROR_VERBOSE.
2527 [AT_DATA]: $4 is now out of C declarations in the prologue.
2529 2001-11-28 Marc Autret <autret_m@epita.fr>
2531 * src/reader.c (parse_dquoted_param): New.
2532 (parse_skel_decl): Use it.
2533 * src/lex.h: Add its prototype.
2534 * src/lex.c (literalchar): Become not static.
2536 2001-11-28 Marc Autret <autret_m@epita.fr>
2538 * src/output.h: And put its extern declaration here.
2539 * src/output.c (error_verbose): Define here.
2540 (prepare): Echo name modification.
2541 * src/getargs.h: Clean its extern declaration.
2542 * src/getargs.c (error_verbose_flag): Remove.
2543 (getargs): Remove case 'e'.
2544 * src/options.c (option_table): 'error-verbose' is now seen as simple
2548 * src/reader.c (read_declarations): Remove case tok_include.
2549 (parse_include_decl): Remove.
2550 * src/lex.h (token_t): Remove tok_include.
2551 * src/options.c (option_table): 'include' is now a simple command line
2554 2001-11-28 Marc Autret <autret_m@epita.fr>
2556 * src/bison.simple: Adjust muscle names.
2557 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2558 * src/output.c (prepare): s/_/-/ for the muscles names.
2559 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2561 2001-11-28 Marc Autret <autret_m@epita.fr>
2563 * src/bison.simple: Fix debug.
2564 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2566 2001-11-28 Akim Demaille <akim@epita.fr>
2568 * src/LR0.c (shifts_new): New.
2569 (save_shifts, insert_start_shift, augment_automaton): Use it.
2571 2001-11-28 Akim Demaille <akim@epita.fr>
2573 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2576 2001-11-28 Akim Demaille <akim@epita.fr>
2578 * src/closure.c (closure): Instead of looping over word in array
2579 then bits in words, loop over bits in array.
2581 2001-11-28 Akim Demaille <akim@epita.fr>
2583 * src/closure.c (closure): No longer optimize the special case
2584 where all the bits of `ruleset[r]' are set to 0, to make the code
2587 2001-11-28 Akim Demaille <akim@epita.fr>
2589 * src/closure.c (closure): `r' and `c' are new variables, used to
2590 de-obfuscate accesses to RULESET and CORE.
2592 2001-11-28 Akim Demaille <akim@epita.fr>
2594 * src/reduce.c (reduce_print): Use ngettext.
2595 (dump_grammar): Improve the trace accuracy.
2597 2001-11-28 Akim Demaille <akim@epita.fr>
2599 * src/reduce.c (dump_grammar): Don't translate trace messages.
2601 2001-11-28 Akim Demaille <akim@epita.fr>
2603 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2604 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2605 as all tags are free'ed afterwards.
2608 2001-11-27 Paul Eggert <eggert@twinsun.com>
2610 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2611 use alloca when we didn't want to, and vice versa.
2613 2001-11-27 Marc Autret <autret_m@epita.fr>
2615 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2617 * src/output.c (prepare): Remove its update.
2619 2001-11-27 Marc Autret <autret_m@epita.fr>
2621 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2624 2001-11-27 Marc Autret <autret_m@epita.fr>
2626 * src/bison.simple: Remove YYERROR_VERBOSE using.
2627 Use %%error_verbose.
2628 (yyparse): Likewise.
2629 * src/output.c (prepare): Give its final value.
2630 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2631 * src/getargs.h: Add its extern declaration.
2632 * src/getargs.c (error_verbose_flag): New int.
2633 (getargs): Update to catch new case.
2634 * src/options.c (option_table): 'error-verbose' is a new option.
2635 (shortopts): Update.
2637 2001-11-27 Akim Demaille <akim@epita.fr>
2639 * src/system.h: Use intl/libgettext.h.
2640 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2642 2001-11-27 Akim Demaille <akim@epita.fr>
2644 * tests/torture.at (Exploding the Stack Size with Malloc):
2645 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2647 2001-11-27 Akim Demaille <akim@epita.fr>
2649 * src/files.c: Include error.h.
2650 Reported by Hans Aberg.
2652 2001-11-26 Marc Autret <autret_m@epita.fr>
2654 * src/reader.c (parse_include_decl): New, not yet implemented.
2655 (read_declarations): Add case tok_include.
2656 * src/getargs.h (include): Add its extern definition.
2657 * src/getargs.c (include): New const char *.
2658 (getargs): Add case '-I'.
2659 * src/options.c (option_table): Add include as command line and
2661 * src/lex.h (token_t): Add tok_include.
2663 2001-11-26 Akim Demaille <akim@epita.fr>
2665 * src/reader.c (readgram): Make sure rules for mid-rule actions
2666 have a lineno equal to that of their host rule.
2667 Reported by Hans Aberg.
2668 * tests/regression.at (Rule Line Numbers): New.
2670 2001-11-26 Akim Demaille <akim@epita.fr>
2672 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2675 2001-11-26 Akim Demaille <akim@epita.fr>
2677 * src/complain.c, src/complain.h (error): Remove, provided by
2680 2001-11-26 Akim Demaille <akim@epita.fr>
2682 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2683 issue an error message.
2684 * tests/regression.at (Invalid %directive): New.
2685 Reported by Hans Aberg.
2687 2001-11-26 Akim Demaille <akim@epita.fr>
2689 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2690 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2692 2001-11-26 Akim Demaille <akim@epita.fr>
2694 * src/conflicts.c (conflicts_print): Don't complain at all when
2695 there are no reduce/reduce conflicts, and as many shift/reduce
2696 conflicts as expected.
2697 * tests/regression.at (%expect right): Adjust.
2699 2001-11-23 Akim Demaille <akim@epita.fr>
2701 * lib/alloca.c: Update, from fileutils.
2703 2001-11-23 Akim Demaille <akim@epita.fr>
2705 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2707 2001-11-23 Akim Demaille <akim@epita.fr>
2709 * src/system.h: Include alloca.h.
2710 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2712 2001-11-23 Akim Demaille <akim@epita.fr>
2714 * src/print_graph.c (print_actions): Remove `rule', unused.
2715 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2716 pacify GCC's signed < unsigned warnings.
2717 * src/closure.c (itemsetsize): Likewise.
2718 * src/reader.c (symbol_list_new): Static.
2720 2001-11-23 Akim Demaille <akim@epita.fr>
2722 Attaching lineno to buckets is stupid, since only one copy of each
2723 symbol is kept, only the line of the first occurrence is kept too.
2725 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2726 * src/reader.c (rline_allocated): Remove, unused.
2727 (symbol_list): Have a `line' member.
2728 (symbol_list_new): New.
2730 * src/print.c (print_grammar): Output the rule line numbers.
2731 * tests/regression.at (Solved SR Conflicts)
2732 (Unresolved SR Conflicts): Adjust.
2733 Reported by Hans Aberg.
2735 2001-11-22 Marc Autret <autret_m@epita.fr>
2737 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2739 2001-11-22 Marc Autret <autret_m@epita.fr>
2741 * src/muscle_tab.c (muscle_init): Remove initialization of
2743 * src/output.c (output_master_parser): Do it here.
2745 2001-11-20 Akim Demaille <akim@epita.fr>
2748 * configure.in (ALL_LINGUAS): Adjust.
2749 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2750 longer contains strings to translate.
2752 2001-11-19 Akim Demaille <akim@epita.fr>
2754 * src/conflicts.c (conflicts_print): Add a missing \n.
2756 2001-11-19 Akim Demaille <akim@epita.fr>
2758 * src/nullable.c (nullable_print): New.
2759 (set_nullable): Call it when tracing.
2760 Better locality of variables.
2762 2001-11-19 Akim Demaille <akim@epita.fr>
2764 * src/print.c (print_actions): Better locality of variables.
2766 2001-11-19 Akim Demaille <akim@epita.fr>
2768 * src/derives.c (print_derives): Fix and enrich.
2769 * src/closure.c (print_fderives): Likewise.
2771 2001-11-19 Akim Demaille <akim@epita.fr>
2773 * src/closure.c (itemsetend): Remove, replaced with...
2776 2001-11-19 Akim Demaille <akim@epita.fr>
2778 * src/LR0.c (kernel_end): Remove, replaced with...
2781 2001-11-19 Akim Demaille <akim@epita.fr>
2783 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2786 2001-11-19 Akim Demaille <akim@epita.fr>
2788 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2790 2001-11-19 Akim Demaille <akim@epita.fr>
2792 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2794 * src/LR0.c: Likewise.
2795 (allocate_itemsets): Use arrays instead of pointers to clarify.
2797 2001-11-19 Akim Demaille <akim@epita.fr>
2799 * src/getargs.c (statistics_flag): Replace with...
2801 (longopts): Accept --trace instead of --statistics.
2802 * src/getargs.h, src/options.c: Adjust.
2803 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2804 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2806 2001-11-19 Akim Demaille <akim@epita.fr>
2808 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2809 pointers to clarify the code.
2810 (save_reductions, save_shifts): Factor common parts of alternatives.
2812 2001-11-19 Akim Demaille <akim@epita.fr>
2814 * src/LR0.c (new_state, get_state): Complete TRACE code.
2815 * src/closure.c: Include `reader.h' to get `tags', needed by the
2817 Rename the conditional DEBUG as TRACE.
2818 Output consistently TRACEs to stderr, not stdout.
2819 * src/derives.c: Likewise.
2820 * src/reduce.c: (inaccessable_symbols): Using if is better style
2822 Use `#if TRACE' instead of `#if 0' for tracing code.
2824 2001-11-19 Akim Demaille <akim@epita.fr>
2826 * src/system.h (LIST_FREE, shortcpy): New.
2827 * src/LR0.c: Use them.
2828 * src/output.c (free_itemsets, free_reductions, free_shifts):
2829 Remove, replaced by LIST_FREE.
2831 2001-11-19 Akim Demaille <akim@epita.fr>
2833 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2834 (REDUCTIONS_ALLOC): New.
2835 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2838 2001-11-19 Akim Demaille <akim@epita.fr>
2840 * src/LR0.c (new_state): Complete trace code.
2841 * src/nullable.c (set_nullable): Don't translate traces.
2843 2001-11-19 Akim Demaille <akim@epita.fr>
2845 * src/print_graph.c (print_core): Better locality of variables.
2846 * src/print.c (print_core): Likewise.
2848 2001-11-19 Akim Demaille <akim@epita.fr>
2850 * src/vcg.c: You do the output, so you are responsible of the
2851 handling of VCG syntax, in particular: use quotearg.
2852 * src/print_graph.c: Don't.
2853 (print_actions): Don't output the actions as part of the nodes,
2854 since that's the job of the edges.
2855 (print_state): Don't output by hand: fill the node description,
2856 and ask for its output.
2858 2001-11-19 Akim Demaille <akim@epita.fr>
2860 * src/bison.simple (yyparse): When verbosely reporting an error,
2861 no longer put additional quotes around token names.
2862 * tests/calc.at: Adjust.
2864 2001-11-19 Akim Demaille <akim@epita.fr>
2866 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2867 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2868 * src/output.c: Adjust.
2870 2001-11-19 Akim Demaille <akim@epita.fr>
2872 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2874 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2876 2001-11-19 Akim Demaille <akim@epita.fr>
2878 * src/gram.h (rule_t): New.
2880 (rrhs, rlhs): Remove, part of state_t.
2881 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2882 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2883 * src/reader.c, src/reduce.c: Adjust.
2885 2001-11-19 Akim Demaille <akim@epita.fr>
2887 * src/reader.c (symbols_output): New, extracted from...
2888 (packsymbols): Here.
2891 2001-11-19 Akim Demaille <akim@epita.fr>
2893 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2894 (maxrhs): this new function.
2896 2001-11-19 Akim Demaille <akim@epita.fr>
2898 * src/lalr.c (F): New macro to access the variable F.
2901 2001-11-19 Akim Demaille <akim@epita.fr>
2903 * src/lalr.h (LA): New macro to access the variable LA.
2904 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2905 * src/lalr.c: Adjust.
2907 2001-11-19 Akim Demaille <akim@epita.fr>
2909 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2910 (set_state_table): handle the `lookaheads' members.
2912 2001-11-19 Akim Demaille <akim@epita.fr>
2914 * src/lalr.h (lookaheads): Removed array, whose contents is now
2916 (state_t): this structure.
2917 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2920 2001-11-19 Akim Demaille <akim@epita.fr>
2922 * src/lalr.h (consistent): Removed array, whose contents is now
2924 (state_t): this structure.
2925 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2928 2001-11-19 Akim Demaille <akim@epita.fr>
2930 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2931 contents are now members of...
2932 (state_t): this structure.
2933 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2936 2001-11-19 Akim Demaille <akim@epita.fr>
2938 * src/lalr.h (state_t): New.
2939 (state_table): Be a state_t * instead of a core **.
2940 (accessing_symbol): Remove, part of state_t.
2941 * src/lalr.c: Adjust.
2942 (set_accessing_symbol): Merge into...
2943 (set_state_table): this.
2944 * src/print_graph.c, src/conflicts.c: Adjust.
2946 2001-11-14 Akim Demaille <akim@epita.fr>
2948 * tests/calc.at, tests/output.at, tests/regression.at,
2949 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2950 now the tests are run in private dirs, therefore AC_CLEANUP and
2951 family can be simplified to 0-ary.
2952 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2953 use abs. path to find config.h.
2954 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2955 stderr, there can be way too much random noise.
2956 Instead pass -Werror to GCC and rely on the exit status.
2957 Reported by Wolfram Wagner.
2959 2001-11-14 Akim Demaille <akim@epita.fr>
2961 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2962 defined only if yyoverflow is defined, to avoid `warning: unused
2964 Reported by The Test Suite.
2966 2001-11-14 Akim Demaille <akim@epita.fr>
2968 * src/print.c: Include reduce.h.
2969 Reported by Hans Aberg.
2971 2001-11-14 Akim Demaille <akim@epita.fr>
2973 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2974 Revert a previous patch: these are really const.
2975 * src/conflicts.c (conflict_report): Additional useless pair of
2976 braces to pacify GCC's warnings for `if () if () {} else {}'.
2977 * src/lex.c (parse_percent_token): Replace equal_offset with
2980 Be sure to strdup `arg' when used, since there is no reason for
2981 token_buffer not to change.
2983 2001-11-14 Akim Demaille <akim@epita.fr>
2985 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2987 * src/main.c (main): Use them.
2988 Suggested by Hans Aberg.
2990 2001-11-12 Akim Demaille <akim@epita.fr>
2992 * src/system.h (ngettext): Now that we use ngettext, be sure to
2993 provide a default definition when NLS are not used.
2995 2001-11-12 Akim Demaille <akim@epita.fr>
2997 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2998 Use @kbd to denote user input.
2999 (Language and Grammar): ANSIfy the example.
3000 Adjust its layout for info/notinfo.
3001 (Location Tracking Calc): Output error messages to stderr.
3002 Output locations in a more GNUtically correct way.
3003 Fix a couple of Englishos.
3004 Adjust @group/@end group pairs.
3006 2001-11-12 Akim Demaille <akim@epita.fr>
3008 %expext was not functioning at all.
3010 * src/conflicts.c (expected_conflicts): Set to -1.
3011 (conflict_report): Use ngettext.
3012 (conflicts_print): Check %expect and make its violation an error.
3013 * doc/bison.texinfo (Expect Decl): Adjust.
3014 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
3015 * tests/regression.at (%expect not enough, %expect right)
3016 (%expect too much): New.
3018 2001-11-12 Akim Demaille <akim@epita.fr>
3020 * tests/regression.at (Conflicts): Rename as...
3021 (Unresolved SR Conflicts): this.
3022 (Solved SR Conflicts): New.
3024 2001-11-12 Akim Demaille <akim@epita.fr>
3026 * src/reduce.c (print_results): Rename as...
3027 (reduce_output): This.
3028 Output to OUT, passed as argument, instead of output_obstack.
3029 (dump_grammar): Likewise.
3032 (reduce_grammar): No longer call reduce_output, since...
3033 * src/print.c (print_results): do it.
3034 * src/main.c (main): Call reduce_free;
3036 2001-11-12 Akim Demaille <akim@epita.fr>
3038 * src/conflicts.c (print_reductions): Accept OUT as argument.
3039 Output to it, not to output_obstack.
3040 * src/print.c (print_actions): Adjust.
3042 2001-11-12 Akim Demaille <akim@epita.fr>
3044 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
3045 the result instead of using...
3046 (src_total, rrc_total, src_count, rrc_count): Remove.
3047 (any_conflicts): Remove.
3048 (print_conflicts): Split into...
3049 (conflicts_print, conflicts_output): New.
3050 * src/conflicts.h: Adjust.
3051 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
3052 * src/print.c (print_grammar): Issue `\n' between two rules.
3053 * tests/regression.at (Conflicts): New.
3054 Reported by Tom Lane.
3056 2001-11-12 Akim Demaille <akim@epita.fr>
3058 * tests/regression.at (Invalid input): Remove, duplicate with
3059 ``Invalid input: 1''.
3061 2001-11-12 Akim Demaille <akim@epita.fr>
3063 * tests/torture.at (AT_DATA_STACK_TORTURE)
3064 (Exploding the Stack Size with Alloca)
3065 (Exploding the Stack Size with Malloc): New.
3067 2001-11-12 Akim Demaille <akim@epita.fr>
3069 * src/bison.simple (YYSTACK_REALLOC): New.
3070 (yyparse) [!yyoverflow]: Use it and free the old stack.
3071 Reported by Per Allansson.
3073 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
3075 * src/bison.simple: Define type yystype instead of YYSTYPE, and
3076 define CPP macro, which substitute YYSTYPE by yystype.
3077 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
3078 with yyltype/YYLTYPE. This allows inclusion of the generated
3079 header within the parser if the compiler, such as GGC, accepts
3080 multiple equivalent #defines.
3083 2001-11-05 Akim Demaille <akim@epita.fr>
3085 * src/reader.c (symbols_output): New, extracted from...
3086 (packsymbols): here.
3089 2001-11-05 Akim Demaille <akim@epita.fr>
3091 * src/lex.c (parse_percent_token): s/quotearg/quote/.
3093 2001-11-05 Akim Demaille <akim@epita.fr>
3095 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
3098 2001-11-05 Akim Demaille <akim@epita.fr>
3100 * src/options.h (struct option_table_struct): set_flags is void*.
3101 * src/options.c (longopts): Support `--output' and `%output'.
3103 * src/lex.h (tok_setopt): Remove, replaced with...
3104 (tok_intopt, tok_stropt): these new guys.
3105 * src/lex.c (getopt.h): Not needed.
3106 (token_buffer, unlexed_token_buffer): Not const.
3107 (percent_table): Promote `-' over `_' in directive names.
3108 Active `%name-prefix', `file-prefix', and `output'.
3109 (parse_percent_token): Accept possible arguments to directives.
3110 Promote `-' over `_' in directive names.
3112 2001-11-04 Akim Demaille <akim@epita.fr>
3114 * doc/bison.texinfo (Decl Summary): Split the list into
3115 `directives for grammars' and `directives for bison'.
3117 Add description of `%name-prefix', `file-prefix', and `output'.
3118 Promote `-' over `_' in directive names.
3119 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
3120 Simplify the description of `--name-prefix'.
3121 Promote `-' over `_' in directive names.
3122 Promote `--output' over `--output-file'.
3123 Fix the description of `--defines'.
3124 * tests/output.at: Exercise %file-prefix and %output.
3126 2001-11-02 Akim Demaille <akim@epita.fr>
3128 * doc/refcard.tex: Update.
3130 2001-11-02 Akim Demaille <akim@epita.fr>
3132 * src/symtab.h (SUNDEF): New.
3133 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
3134 stand for `uninitialized', instead of 0.
3135 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
3136 * src/lex.c (lex): Adjust.
3138 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
3140 Let yylex return it instead of a plain 0.
3141 Reported by Dick Streefland.
3143 2001-11-02 Akim Demaille <akim@epita.fr>
3145 * tests/regression.at (Mixing %token styles): New test.
3147 2001-11-02 Akim Demaille <akim@epita.fr>
3149 * src/reader.c (parse_thong_decl): Formatting changes.
3150 (token_translations_init): New, extracted from...
3151 (packsymbols): Here.
3154 2001-11-01 Akim Demaille <akim@epita.fr>
3156 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
3157 Check that `9foo.y' produces correct cpp guards.
3158 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
3162 2001-11-01 Akim Demaille <akim@epita.fr>
3164 * tests/regression.at (Invalid input: 2): New.
3165 * src/lex.c (unlexed_token_buffer): New.
3166 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
3170 2001-11-01 Akim Demaille <akim@epita.fr>
3172 * tests/calc.at: Catch up with 1.30.
3173 * configure.in: Bump to 1.49a.
3174 Adjust to newer Autotest.
3176 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
3178 * src/conflicts.c: Move global variables rrc_total and src_total ...
3179 (print_conflicts): here.
3180 * src/output.c (output): Free global variable user_toknums.
3181 * src/lex.c (token_obstack): Become static.
3183 2001-10-18 Akim Demaille <akim@epita.fr>
3185 * tests/atlocal.in (GCC): Add.
3186 * tests/calc.at: s/m4_match/m4_bmatch/.
3187 s/m4_patsubst/m4_bpatsubst/.
3188 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
3189 * configure.in: AC_SUBST(GCC).
3191 2001-10-14 Marc Autret <autret_m@epita.fr>
3193 * src/options.c (create_long_option_table): Fix.
3195 2001-10-10 Akim Demaille <akim@epita.fr>
3197 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
3199 2001-10-04 Akim Demaille <akim@epita.fr>
3201 * src/reader.c (parse_union_decl): Push the caracters in
3202 union_obstack, not attrs_obstack.
3204 2001-10-04 Akim Demaille <akim@epita.fr>
3206 Merge in the branch 1.29.
3208 * src/reader.c (packsymbols): Use a temporary obstack for
3209 `%%tokendef', since output_stack is already used elsewhere.
3211 2001-10-02 Akim Demaille <akim@epita.fr>
3215 2001-10-02 Akim Demaille <akim@epita.fr>
3219 2001-10-02 Akim Demaille <akim@epita.fr>
3221 * tests/regression.at (Invalid CPP headers): New.
3222 From Alexander Belopolsky.
3223 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
3225 2001-10-02 Akim Demaille <akim@epita.fr>
3227 * tests/regression.at (Invalid input): New.
3228 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
3231 2001-10-02 Akim Demaille <akim@epita.fr>
3233 * tests/calc.at: Now that --debug works, the tests must be adjusted.
3235 2001-10-02 Akim Demaille <akim@epita.fr>
3237 * src/output.c (output_parser): Assert `skeleton'.
3238 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
3242 2001-10-01 Marc Autret <autret_m@epita.fr>
3244 * src/lex.h: Echo modifications.
3245 * src/lex.c (unlex): Parameter is now token_t.
3248 2001-10-01 Marc Autret <autret_m@epita.fr>
3250 * src/main.c: Include lex.h.
3253 2001-09-29 Akim Demaille <akim@epita.fr>
3255 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
3257 2001-09-28 Akim Demaille <akim@epita.fr>
3259 * tests/testsuite.at: Update to newer Autotest.
3260 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
3262 2001-09-27 Akim Demaille <akim@epita.fr>
3264 Position independent wrapper.
3266 * tests/bison: Remove.
3267 * tests/bison.in: New.
3268 * configure.in: Adjust.
3270 2001-09-27 Paul Eggert <eggert@twinsun.com>
3272 Port quotearg fixes from tar 1.13.24.
3274 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3276 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3277 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3279 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
3280 * m4/mbrtowc.m4: New file.
3281 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
3282 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
3284 2001-09-27 Akim Demaille <akim@epita.fr>
3288 2001-09-27 Akim Demaille <akim@epita.fr>
3292 2001-09-25 Akim Demaille <akim@epita.fr>
3294 * src/system.h: Include `xalloc.h'.
3295 Remove it from the C files.
3296 * src/files.c (output_files): Free the obstacks.
3297 * src/lex.c (init_lex): Rename as...
3300 * src/main.c (main): Use it.
3302 2001-09-24 Marc Autret <autret_m@epita.fr>
3304 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
3305 to output informations in fout (FILE*).
3306 (open_graph, close_graph): Likewise.
3307 (output_graph, output_edge, output_node): Likewise.
3308 * src/vcg.h: Update function prototypes.
3309 * src/print_graph.c (print_graph): Open output graph file.
3310 (print_actions): Adjust.
3311 * src/files.h: Remove extern declaration.
3312 * src/files.c: Remove graph_obstack declaration.
3313 (open_files): Remove graph_obstack initialization.
3314 (output_files): Remove graph_obstack saving.
3316 2001-09-24 Marc Autret <autret_m@epita.fr>
3318 * src/files.c (compute_output_file_names): Fix.
3320 2001-09-24 Marc Autret <autret_m@epita.fr>,
3321 Akim Demaille <akim@epita.fr>
3323 * src/reader.c (reader): Remove call to free_symtab ().
3324 * src/main.c (main): Call it here.
3326 * src/conflicts.c (initialize_conflicts): Rename as...
3327 (solve_conflicts): this.
3328 * src/print.c (print_core, print_actions, print_state)
3329 (print_grammar): Dump to a file instead a `output_obstack'.
3330 (print_results): Dump `output_obstack', and then proceed with the
3332 * src/files.c (compute_output_file_names, close_files): New.
3333 (output_files): Adjust.
3334 * src/main.c (main): Adjust.
3336 2001-09-23 Marc Autret <autret_m@epita.fr>
3338 * src/files.c (compute_header_macro): Computes header macro name
3339 from spec_defines_file when given.
3341 2001-09-23 Marc Autret <autret_m@epita.fr>
3343 * src/files.c (output_files): Add default extensions.
3345 2001-09-22 Akim Demaille <akim@epita.fr>
3347 * src/conflicts.c (finalize_conflicts): Rename as...
3348 (free_conflicts): this.
3350 2001-09-22 Akim Demaille <akim@epita.fr>
3352 * src/gram.c (gram_free): Rename back as...
3354 (output_token_translations): Free `token_translations'.
3355 * src/symtab.c (free_symtab): Free the tag field.
3357 2001-09-22 Akim Demaille <akim@epita.fr>
3359 Remove `translations' as it is always set to true.
3361 * src/gram.h: Adjust.
3362 * src/reader.c (packsymbols, parse_token_decl): Adjust
3363 * src/print.c (print_grammar): Adjust.
3364 * src/output.c (output_token_translations): Adjust.
3365 * src/lex.c (lex): Adjust.
3366 * src/gram.c: Be sure the set pointers to NULL.
3367 (dummy): Rename as...
3370 2001-09-22 Akim Demaille <akim@epita.fr>
3372 * configure.in: Invoke AM_LIB_DMALLOC.
3373 * src/system.h: Use dmalloc.
3374 * src/LR0.c: Be sure to have pointers initialized to NULL.
3375 (allocate_itemsets): Allocate kernel_items only if needed.
3377 2001-09-22 Akim Demaille <akim@epita.fr>
3379 * configure.in: Bump to 1.29b.
3380 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
3381 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
3382 need xmalloc.c in calc.y.
3385 2001-09-21 Akim Demaille <akim@epita.fr>
3388 * Makefile.maint, config/config.guess, config/config.sub,
3389 * config/missing: Update from masters.
3390 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
3392 * configure.in (ALL_LINGUAS): Add `tr'.
3394 2001-09-21 Akim Demaille <akim@epita.fr>
3396 * tests/Makefile.am (package.m4): Move to...
3397 ($(srcdir)/$(TESTSUITE)): here.
3399 2001-09-20 Akim Demaille <akim@epita.fr>
3401 * src/complain.c: No longer try to be standalone: use system.h.
3402 Don't assume __STDC__ is defined to 1. Just test if it is defined.
3403 * src/complain.h: Likewise.
3404 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
3405 Remove the unused variable `n'.
3406 From Albert Chin-A-Young.
3408 2001-09-18 Marc Autret <autret_m@epita.fr>
3410 * doc/bison.1: Update.
3411 * doc/bison.texinfo (Bison Options): Update --defines and --graph
3413 (Option Cross Key): Update.
3416 2001-09-18 Marc Autret <autret_m@epita.fr>
3418 * tests/regression.at: New test (comment in %union).
3420 2001-09-18 Marc Autret <autret_m@epita.fr>
3422 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
3424 Reported by Keith Browne.
3426 2001-09-18 Marc Autret <autret_m@epita.fr>
3428 * tests/output.at: Add tests for --defines and --graph.
3430 2001-09-18 Marc Autret <autret_m@epita.fr>
3432 * tests/output.at: Removes tests of %{header,src}_extension features.
3434 2001-09-18 Akim Demaille <akim@epita.fr>
3436 * tests/Makefile.am (package.m4): New.
3437 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
3438 (_AT_CHECK_CALC_ERROR): Likewise.
3439 Factor the `, ' part of verbose error messages.
3441 2001-09-18 Marc Autret <autret_m@epita.fr>
3443 * src/getargs.c (longopts): Declare --defines and --graph as options
3444 with optional arguments.
3445 * src/files.h: Add extern declarations.
3446 * src/files.c (spec_graph_file, spec_defines_file): New.
3447 (output_files): Update.
3448 Remove CPP-outed code.
3450 2001-09-18 Marc Autret <autret_m@epita.fr>
3452 Turn off %{source,header}_extension feature.
3454 * src/files.c (compute_exts_from_gf): Update.
3455 (compute_exts_from_src): Update.
3456 (output_files): CPP-out useless code.
3457 * src/files.h: Remove {header,source}_extension extern declarations.
3458 * src/reader.c (parse_dquoted_param): CPP-out.
3459 (parse_header_extension_decl): Remove.
3460 (parse_source_extension_decl): Remove.
3461 (read_declarations): Remove cases tok_{hdrext,srcext}.
3462 * src/lex.c (percent_table): Remove {header,source}_extension entries.
3463 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
3465 2001-09-10 Akim Demaille <akim@epita.fr>
3467 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
3468 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
3469 (AT_CHECK_OUTPUT): this.
3470 Merely check ls' exit status, its output is useless.
3472 2001-09-10 Akim Demaille <akim@epita.fr>
3474 * tests/calc.at: Use m4_match.
3475 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
3477 2001-09-10 Marc Autret <autret_m@epita.fr>,
3478 Akim Demaille <akim@epita.fr>
3480 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
3482 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
3484 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
3485 * src/lex.h: Adjust prototype.
3486 (token_t): Add `tok_undef'.
3487 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
3488 (parse_percent_token): Now returns token_t.
3489 Add default statement in switch.
3490 (lex): Separate `c' as an input variable, from the token_t result
3492 (unlexed): Is a token_t.
3494 2001-09-10 Akim Demaille <akim@epita.fr>
3496 * configure.in: Bump to 1.29a.
3498 2001-09-07 Akim Demaille <akim@epita.fr>
3502 2001-08-30 Akim Demaille <akim@epita.fr>
3504 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3505 * m4/atconfig.m4: Remove.
3506 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3508 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3509 m4_if, m4_patsubst, and m4_regexp.
3510 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3511 `input' file instead of echo.
3513 2001-08-29 Akim Demaille <akim@epita.fr>
3517 2001-08-29 Akim Demaille <akim@epita.fr>
3521 2001-08-29 Paul Eggert <eggert@twinsun.com>
3523 * src/bison.simple (yyparse): Don't take the address of an
3524 item before the start of an array, as that doesn't conform to
3527 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3529 * doc/bison.texinfo (Location Tracking Calc): New node.
3531 2001-08-29 Paul Eggert <eggert@twinsun.com>
3533 * src/output.c (output): Do not define const, as this now
3534 causes more problems than it cures.
3536 2001-08-29 Akim Demaille <akim@epita.fr>
3538 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3540 Be sure to tag the `detailmenu'.
3542 2001-08-29 Akim Demaille <akim@epita.fr>
3544 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3545 download in a tmp dir.
3547 2001-08-28 Marc Autret <autret_m@epita.fr>
3549 * config/depcomp: New file.
3551 2001-08-28 Marc Autret <autret_m@epita.fr>
3553 * doc/bison.1 (mandoc): Adjust.
3554 From Juan Manuel Guerrero.
3556 2001-08-28 Marc Autret <autret_m@epita.fr>
3558 * src/print_graph.c (print_state): Fix.
3560 2001-08-27 Marc Autret <autret_m@epita.fr>
3562 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3564 Echo modifications to the functions prototypes.
3565 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3567 2001-08-27 Marc Autret <autret_m@epita.fr>
3569 * src/vcg.c: Include `xalloc.h'.
3570 (add_colorentry): New.
3571 (add_classname): New.
3572 (add_infoname): New.
3573 * src/vcg.h: Add new prototypes.
3575 2001-08-27 Akim Demaille <akim@epita.fr>
3577 * Makefile.maint: Sync. again with CVS Autoconf.
3579 2001-08-27 Akim Demaille <akim@epita.fr>
3581 * Makefile.maint: Formatting changes.
3582 (po-update, cvs-update, update): New targets.
3585 2001-08-27 Akim Demaille <akim@epita.fr>
3587 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3588 * Makefile.maint: Sync. with CVS Autoconf.
3590 2001-08-27 Marc Autret <autret_m@epita.fr>
3592 * src/vcg.h (struct infoname_s): New.
3593 (struct colorentry_s): New.
3594 (graph_s): New fields {vertical,horizontal}_order in structure.
3595 Add `infoname' field.
3596 Add `colorentry' field;
3597 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3598 (G_HORIZONTAL_ORDER): New.
3600 (G_COLORENTRY): New.
3601 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3602 Add output of `infoname'.
3603 Add output of `colorentry'.
3605 2001-08-27 Marc Autret <autret_m@epita.fr>
3607 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3608 This one shadowed a global parameter.
3610 2001-08-24 Marc Autret <autret_m@epita.fr>
3612 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3613 instead of `unsigned'.
3614 (print_state): Do not call obstack_object_size () in obstack_grow ()
3615 to avoid macro variables shadowing.
3617 2001-08-23 Marc Autret <autret_m@epita.fr>
3619 * src/lex.c (percent_table): Typo: s/naem/name/.
3621 Normalize new options declarations.
3623 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3625 * tests/suite.at: Exercise %header_extension and %source_extension.
3627 2001-08-16 Marc Autret <autret_m@epita.fr>
3629 * src/reader.c (parse_dquoted_param): New.
3630 (parse_header_extension_decl): Use it.
3631 (parse_source_extension_decl): Likewise.
3633 2001-08-16 Marc Autret <autret_m@epita.fr>
3635 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3636 (get_xxxx_str): Use assert () instead of complain ().
3637 Remove return invokations in default cases.
3638 (get_decision_str): Modify default behaviour. Remove second argument.
3639 Echo modifications on calls.
3640 (output_graph): Fix.
3642 2001-08-16 Marc Autret <autret_m@epita.fr>
3644 * src/getargs.c (usage): Update with ``-g, --graph''.
3646 2001-08-16 Marc Autret <autret_m@epita.fr>
3648 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3649 (Option Cross Key): Likewise.
3650 * doc/bison.1: Update.
3652 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3654 * src/output.c (output_master_parser): Don't finish action_obstack.
3655 (output_parser): Don't care about the muscle action, here.
3656 (prepare): Copy the action_obstack in the action muscle.
3657 (output): Free action_obstack.
3659 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3661 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3662 will contain `%union' declaration.
3663 (parse_union_decl): Delete #line directive output.
3664 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3665 informations about %union.
3666 (parse_union_decl): Copy the union_obstack in the muscle stype.
3667 * src/bison.simple: Add new #line directive.
3668 Add typdef %%stype YYSTYPE.
3670 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3672 * src/bison.simple: Add new `#line' directive.
3674 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3676 * src/bison.simple: New `#line' directive.
3677 * src/output.c (output_parser): Support new dynamic muscle input_line.
3679 2001-09-22 Marc Autret <autret_m@epita.fr>
3681 * src/output.c (output_master_parser): New.
3682 (output_parser): Be more re-entrant.
3684 2001-09-21 Marc Autret <autret_m@epita.fr>
3686 * src/reader.c (copy_definition, parse_union_decl): Update and use
3688 (copy_action): Likewise.
3689 Use obstack_1grow ().
3690 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3692 2001-09-21 Marc Autret <autret_m@epita.fr>
3694 * src/options.c (option_table): Adjust.
3695 * src/lex.c (parse_percent_token): Fix.
3697 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3699 * src/options.c (symtab.h): Include it, need by lex.h.
3701 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3703 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3704 is now an option_table_struct*.
3705 (option_strcmp): New function option_strcmp.
3706 (parse_percent_token): Call option_strcmp.
3707 * src/getargs.c (xalloc.h, options.h): Include it.
3708 (getargs): Call create_long_option_table.
3709 (getargs): Free longopts at the end of the function.
3710 (shortopts): Move in options.c.
3711 * src/options.c (create_long_option_table): New function. Convert
3712 information from option_table to option structure.
3713 * src/reader.c (options.h): Include it.
3715 * src/Makefile.am: Adjust.
3716 * src/options.c (option_table): Create from longopts and percent_table.
3717 * src/getargs.c (longopts): Delete.
3718 * src/lex.c (struct percent_table_struct): Delete.
3719 (percent_table): Delete.
3720 (options.h): Include it.
3721 * src/options.c: Create.
3722 * src/options.h: Create.
3723 Declare enum opt_access_e.
3724 Define struct option_table_struct.
3726 2001-09-20 Marc Autret <autret_m@epita.fr>
3728 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3731 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3733 * src/bison.simple: s/%%filename/%%skeleton.
3734 * src/muscle_tab.c (getargs.h): Include it.
3735 (muscle_init): Insert new muscle skeleton.
3737 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3739 * src/output.c (output_parser): Delete unused variable actions_dumped.
3741 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3743 * src/output.c (output): Delete call to reader_output_yylsp.
3744 * src/reader.c (reader): Likewise.
3745 * src/reader.h: Delete declaration of reader_output_yylsp.
3747 2001-09-02 Marc Autret <autret_m@epita.fr>
3749 * src/reader.c: Include muscle_tab.h.
3750 (parse_union_decl): Update.
3751 (parse_macro_decl): Rename parse_muscle_decl.
3752 Update to use renamed functions and variable.
3753 (read_declarations, copy_action, read_additionnal_code, : Updated
3754 with correct variables and functions names.
3755 (packsymbols, reader): Likewise.
3757 * src/reader.h (muscle_obstack): Extern declaration update.
3759 * src/output.c: Include muscle_tab.h
3760 In all functions using macro_insert, change by using muscle_insert ().
3761 (macro_obstack): Rename muscle_obstack.
3762 Echo modifications in the whole file.
3763 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3764 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3765 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3767 * src/muscle_tab.h: Update double inclusion macros.
3768 (macro_entry_s): Rename muscle_entry_s.
3771 * src/muscle_tab.c: Include muscle_tab.h.
3772 Rename macro_tabble to muscle_table.
3773 (mhash1, mhash2, mcmp): Use muscle_entry.
3774 (macro_init): Rename muscle_init. Update.
3775 (macro_insert): Rename muscle_insert. Update.
3776 (macro_find): Rename muscle_find. Update.
3778 * src/main.c: Include muscle_tab.h.
3779 (main): Call muscle_init ().
3780 * src/Makefile.am (bison_SOURCES): Echo modifications.
3782 2001-09-02 Marc Autret <autret_m@epita.fr>
3784 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3786 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3788 2001-09-02 Marc Autret <autret_m@epita.fr>
3790 * src/macrotab.c, src/macrotab.h: Remove.
3792 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3794 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3797 2001-09-01 Marc Autret <autret_m@epita.fr>
3799 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3800 to an explicit value to activate the feature. We do it here.
3802 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3804 * src/output.c (prepare): Delete the `filename' muscule insertion.
3805 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3806 (parse_union_decl): Likewise.
3807 * src/macrotab.c (macro_init): Initialize filename by infile.
3809 2001-08-31 Marc Autret <autret_m@epita.fr>
3811 * src/bison.simple (YYLSP_NEEDED): New definition.
3812 * src/output.c (prepare): Add macro insertion of `locations_flag'
3814 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3816 * src/output.c (prepare): Delete insertion of previous muscles,
3817 and insert the `prefix' muscles.
3818 * src/macrotab.c (macro_init): Likewise.
3819 (macro_init): Initialization prefix directive by `yy'.
3820 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3821 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3822 yylval, yydebug, yyerror, yynerrs and yyparse.
3823 New directive `#define' to substitute yydebug, ... with option
3826 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3828 * src/main.c (main): Standardize.
3829 * src/output.c (output_table_data, output_parser): Likewise.
3830 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3832 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3834 * src/reader.c (read_additionnal_code): Rename %%user_code to
3836 * src/output.c (output): Rename %%declarations to %%prologue.
3837 * src/bison.simple: Echo modifications.
3839 2001-08-31 Marc Autret <autret_m@epita.fr>
3841 * src/reader.c (readgram): CleanUp.
3842 (output_token_defines): Likewise.
3843 (packsymbols): Likewise.
3845 * src/output.c (output): CPP-out useless code.
3847 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3849 * src/reader.c (reader): Delete obsolete call to function
3850 output_trailers and output_headers.
3851 * src/output.h: Remove obsolete functions prototypes of output_headers
3852 and output_trailers.
3854 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3856 * src/main.c: Include macrotab.h.
3857 * src/macrotab.h (macro_entry_s): Constify fields.
3858 Adjust functions prototypes.
3859 * src/macrotab.c (macro_insert): Constify key and value.
3860 (macro_find): Constify key.
3861 (macro_insert): Include 'xalloc.h'
3862 (macro_insert): Use XMALLOC.
3863 (macro_find): Constify return value.
3864 * src/output.c (output_table_data): Rename table to table_data.
3865 (output_parser): Constify macro_key, macro_value.
3867 2001-08-30 Marc Autret <autret_m@epita.fr>
3869 * src/reader.c (parse_skel_decl): New.
3870 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3871 * src/lex.h (token_t): New token `tok_skel'.
3872 * src/lex.c (percent_table): Add skeleton option entry.
3875 2001-08-29 Marc Autret <autret_m@epita.fr>
3877 * src/bison.simple: Add %%user_code directive at the end.
3878 * src/reader.c (read_additionnal_code): New.
3880 * src/output.c (output_program): Remove.
3883 2001-08-28 Marc Autret <autret_m@epita.fr>
3885 * src/output.c (output_actions): Clean up.
3886 (output_gram): CPP-out useless code.
3887 * src/reader.c (reader): Clean up, CPP-out useless code.
3889 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3891 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3893 * src/bison.simple: Add `%%definitions'.
3895 2001-08-28 Marc Autret <autret_m@epita.fr>
3897 * config/depcomp: New file.
3899 2001-08-27 Paul Eggert <eggert@twinsun.com>
3901 * src/bison.simple (yyparse): Don't take the address of an
3902 item before the start of an array, as that doesn't conform to
3905 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3907 * src/output.c (output): Remove the initialization of the macro
3908 obstack. It was done too late here.
3910 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3912 (reader): Initialize the macro obstack here, since we need it to grow
3913 '%define' directives.
3915 * src/reader.h: Declare the macro obstack as extern.
3917 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3919 * src/output.c (output_parser): Fix. Store single '%' characters in
3920 the output obstack instead of throwing them away.
3922 2001-08-27 Akim Demaille <akim@epita.fr>
3924 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3926 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3928 * lib/Makefile.am: Adjust.
3930 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3932 * src/bison.simple: Update and add '%%' directives.
3934 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3936 * src/reader.c (reader): Remove calls to 'output_headers' and
3937 'output_trailers'. Remove some C output.
3938 (readgram): Disable a piece of code that was writing a default
3939 definition for 'YYSTYPE'.
3940 (reader_output_yylsp): Remove.
3941 (packsymbols): Output token defintions to a macro.
3942 (copy_definition): Disable C output.
3944 * src/reader.c (parse_macro_decl): New function used to parse macro
3946 (copy_string2): Put the body of copy_string into this new function.
3947 Add a parameter to let the caller choose whether he wants to copy the
3948 string delimiters or not.
3949 (copy_string): Be a simple call to copy_string2 with the last argument
3951 (read_declarations): Add case for macro definition.
3952 (copy_identifier): New.
3953 (parse_macro_decl): Read macro identifiers using copy_identifier
3956 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3958 * src/output.c (prepare): Add prefixed names.
3959 (output_parser): Output semantic actions.
3960 (output_parser): Fix bug on '%%line' directives.
3962 * src/output.c (output_headers): Remove. The C code printed by this
3963 function should now be in the skeletons.
3964 (output_trailers): Remove.
3965 (output): Disable call to 'reader_output_yylsp'.
3966 (output_rule_data): Do not output tables to the table obstack.
3968 * src/output.c: Remove some C dedicated output.
3969 Improve the use of macro and output obstacks.
3970 (output_defines): Remove.
3972 * src/output.c (output_token_translations): Associate 'translate'
3973 table with a macro. No output to the table obstack.
3974 (output_gram): Same for 'rhs' and 'prhs'.
3975 (output_stos): Same for 'stos'.
3976 (output_rule_data): Same for 'r1' and 'r2'.
3977 (token_actions): Same for 'defact'.
3978 (goto_actions): Same for 'defgoto'.
3979 (output_base): Same for 'pact' and 'pgoto'.
3980 (output_table): Same for 'table'.
3981 (output_check): Same for 'check'.
3983 * src/output.c (output_table_data): New function.
3984 (output_short_table): Remove.
3985 (output_short_or_char_table): Remove.
3987 * src/output.c (output_parser): Replace most of the skeleton copy code
3988 with something new. Skeletons are now processed character by character
3989 rather than line by line, and Bison looks for '%%' macros. This is the
3990 first step in making Bison's output process (a lot) more flexible.
3991 (output_parser): Use the macro table.
3993 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3995 * src/main.c (main): Initialize the macro table.
3997 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3999 * src/lex.c (percent_table): Add tok_define.
4000 * src/lex.h: Add tok_define.
4002 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4004 * src/macrotab.c: New file.
4005 * src/macrotab.h: New file.
4006 * src/Makefile.am: Update.
4008 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4010 * lib/hash.c: New file.
4011 * lib/hash.h: New file.
4012 * lib/Makefile.am: Update.
4014 2001-08-15 Akim Demaille <akim@epita.fr>
4018 2001-08-15 Marc Autret <autret_m@epita.fr>
4020 * src/reader.c (readgram): Indent output macro YYSTYPE.
4021 (packsymbols): Likewise.
4022 (output_token_defines): Likewise.
4023 * src/files.c: Standardize.
4024 (compute_header_macro): New.
4025 (defines_obstack_save): New. Use compute_header_macro.
4026 (output_files): Update. Use defines_obstack_save.
4028 2001-08-15 Akim Demaille <akim@epita.fr>
4030 * doc/bison.texinfo (Table of Symbols): Document
4033 2001-08-15 Akim Demaille <akim@epita.fr>
4035 * missing: Update from CVS Automake.
4036 * config/config.guess, config/config.sub, config/texinfo.tex:
4037 Update from gnu.org.
4039 2001-08-15 Akim Demaille <akim@epita.fr>
4041 * Makefile.maint: Sync with CVS Autoconf.
4043 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
4045 * doc/bison.texinfo: Include GNU Free Documentation License from
4047 * doc/fdl.texi: Add to package.
4049 2001-08-14 Marc Autret <autret_m@epita.fr>
4051 Turn on %{source,header}_extension features.
4053 * src/lex.c (percent_table): Un-CPP out header_extension and
4055 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
4056 (compute_exts_from_src): Remove conditions. It restores priorities
4059 2001-08-14 Marc Autret <autret_m@epita.fr>
4061 * src/files.c (compute_base_names): Add extensions computing when
4062 `--file-prefix' used.
4063 Standardize function calls.
4065 2001-08-13 Marc Autret <autret_m@epita.fr>
4067 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
4068 defining it (defined but null disables alloca).
4070 2001-08-13 Marc Autret <autret_m@epita.fr>
4072 * src/bison.simple (_yy_memcpy): CPP reformat.
4074 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
4076 * tests/atconfig.in (CPPFLAGS): Fix.
4078 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
4080 * doc/bison.texinfo: Include GNU General Public License from
4082 * doc/gpl.texi: Add to package.
4084 2001-08-10 Marc Autret <autret_m@epita.fr>
4086 * src/print_graph.h: Fix.
4087 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
4089 2001-08-10 Akim Demaille <akim@epita.fr>
4091 * src/system.h: Provide default declarations for stpcpy, strndup,
4094 2001-08-10 Robert Anisko <anisko_r@epita.fr>
4096 * doc/bison.texinfo (Locations): Update @$ stuff.
4098 2001-08-09 Robert Anisko <anisko_r@epita.fr>
4100 * src/bison.simple (YYLLOC_DEFAULT): Update.
4103 2001-08-08 Marc Autret <autret_m@epita.fr>
4105 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
4106 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
4107 Reported by Fabrice Bauzac.
4109 2001-08-08 Marc Autret <autret_m@epita.fr>
4111 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
4112 * src/vcg.c (output_node): Fix.
4113 * src/vcg.h: Cleanup.
4114 * src/print_graph.c: Add comments.
4115 (node_output_size): New global variable. Simplify the formatting of
4116 the VCG graph output.
4117 (print_actions): Unused code is now used. It notifies the final state
4118 and no action states in the VCG graph. It also give the reduce actions.
4119 The `shift and goto' edges are red and the `go to state' edges are
4121 Get the current node name and node_obstack by argument.
4122 (node_obstack): New variable.
4123 (print_state): Manage node_obstack.
4124 (print_core): Use node_obstack given by argument.
4125 A node is not only computed here but in print_actions also.
4126 (print_graph): CPP out useless code instead of commenting it.
4128 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
4130 * tests/atconfig.in (CPPFLAGS): Fix.
4132 2001-08-07 Akim Demaille <akim@epita.fr>
4134 * src/print_graph.c (quote): New.
4135 (print_core): Use it.
4137 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
4139 * src/vcg.c (complain.h): Include it.
4140 Unepitaize `return' invocations.
4141 [NDEBUG] (main): Remove.
4142 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
4143 * src/files.c (open_files): Initialize graph_obstack.
4144 * src/print_graph.c (print_actions): CPP out useless code.
4145 (print_core): Don't output the last `\n' in labels.
4147 * src/files.c (output_files): Output the VCG file.
4148 * src/main.c (main): Invoke print_graph ();
4150 2001-08-06 Marc Autret <autret_m@epita.fr>
4152 Automaton VCG graph output.
4153 Using option ``-g'' or long option ``--graph'', you can generate
4154 a gram_filename.vcg file containing a VCG description of the LALR (1)
4155 automaton of your grammar.
4157 * src/main.c: Call to print_graph() function.
4158 * src/getargs.h: Update.
4159 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
4160 (graph_flag): New flag.
4162 (getargs): Add case `g'.
4163 * src/files.c (graph_obstack): New obstack struct.
4164 (open_files): Initialize new obstack.
4165 (output_files): Saves graph_obstack if required.
4166 * src/files.h (graph_obstack): New extern declaration.
4167 * src/Makefile.am: Add new source files.
4169 2001-08-06 Marc Autret <autret_m@epita.fr>
4171 * src/print_graph.c, src/print_graph.h (graph): New.
4172 * src/vcg.h: New file.
4173 * src/vcg.c: New file, VCG graph handling.
4175 2001-08-06 Marc Autret <autret_m@epita.fr>
4177 Add of %source_extension and %header_extension which specify
4178 the source or/and the header output file extension.
4180 * src/files.c (compute_base_names): Remove initialisation of
4181 src_extension and header_extension.
4182 (compute_exts_from_gf): Update.
4183 (compute_exts_from_src): Update.
4184 (output_files): Update.
4185 * src/reader.c (parse_header_extension_decl): New.
4186 (parse_source_extension_decl): New.
4187 (read_declarations): New case statements for the new tokens.
4188 * src/lex.c (percent_table): Add entries for %source_extension
4189 and %header_extension.
4190 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
4192 2001-08-06 Marc Autret <autret_m@epita.fr>
4194 * configure.in: Bump to 1.28c.
4195 * doc/bison.texinfo: Texinfo thingies.
4197 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
4199 * tests/atconfig.in (CPPFLAGS): Add.
4200 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
4202 2001-08-03 Akim Demaille <akim@epita.fr>
4206 2001-08-03 Akim Demaille <akim@epita.fr>
4208 * tests/Makefile.am (check-local): Ship testsuite.
4209 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
4212 2001-08-03 Akim Demaille <akim@epita.fr>
4214 * configure.in: Try using -Wformat when compiling.
4216 2001-08-03 Akim Demaille <akim@epita.fr>
4218 * configure.in: Bump to 1.28b.
4220 2001-08-03 Akim Demaille <akim@epita.fr>
4222 * src/complain.c: Adjust strerror_r portability issues.
4224 2001-08-03 Akim Demaille <akim@epita.fr>
4228 2001-08-03 Akim Demaille <akim@epita.fr>
4230 * src/getargs.c, src/getarg.h (skeleton)): Constify.
4231 * src/lex.c (literalchar): Avoid name clashes on `buf'.
4232 * src/getargs.c: Include complain.h.
4233 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
4234 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
4236 2001-08-03 Akim Demaille <akim@epita.fr>
4238 * src/reader.c (readgram): Display hidden chars in error messages.
4240 2001-08-03 Akim Demaille <akim@epita.fr>
4242 Update to gettext 0.10.39.
4244 2001-08-03 Akim Demaille <akim@epita.fr>
4246 * lib/strspn.c: New.
4248 2001-08-01 Marc Autret <autret_m@epita.fr>
4250 * doc/bison.texinfo: Update.
4251 * doc/bison.1 (mandoc): Update.
4252 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
4253 * src/files.c: Support output files extensions computing.
4254 (src_extension): New static variable.
4255 (header_extension): New static variable.
4257 (get_extension_index): New function, gets the index of an extension
4258 filename in a string.
4259 (compute_exts_from_gf): New function, computes extensions from the
4260 grammar file extension.
4261 (compute_exts_from_src): New functions, computes extensions from the
4262 C source file extension, file given by ``-o'' option.
4263 (compute_base_names): Update.
4264 (output_files): Update.
4266 2001-08-01 Robert Anisko <anisko_r@epita.fr>
4268 * doc/bison.texi: Document @$.
4269 (Locations): New section.
4271 2001-07-18 Akim Demaille <akim@epita.fr>
4273 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
4274 * config/prev-version.txt, config/move-if-change: New.
4275 * Makefile.am: Adjust.
4277 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
4279 * src/bison.simple (yyparse): Suppress warning `comparaison
4280 between signed and unsigned'.
4282 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
4284 * src/getargs.h (raw_flag): Remove.
4285 * src/getargs.c: Die on `-r'/`--raw'.
4286 * src/lex.c (parse_percent_token): Die on `%raw'.
4287 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
4288 * tests/calc.at: Suppress test with option `--raw'.
4290 2001-07-14 Akim Demaille <akim@epita.fr>
4293 * configure.in: Require Autoconf 2.50.
4294 Update to gettext 0.10.38.
4296 2001-03-16 Akim Demaille <akim@epita.fr>
4298 * doc/bison.texinfo: ANSIfy the examples.
4300 2001-03-16 Akim Demaille <akim@epita.fr>
4302 * getargs.c (skeleton): New variable.
4303 (longopts): --skeleton is a new option.
4304 (shortopts, getargs): -S is a new option.
4305 * getargs.h: Declare skeleton.
4306 * output.c (output_parser): Use it.
4308 2001-03-16 Akim Demaille <akim@epita.fr>
4310 * m4/strerror_r.m4: New.
4311 * m4/error.m4: Run AC_FUNC_STRERROR_R.
4312 * lib/error.h, lib/error.c: Update.
4314 2001-03-16 Akim Demaille <akim@epita.fr>
4316 * src/getargs.c (longopts): Clean up.
4318 2001-02-21 Akim Demaille <akim@epita.fr>
4320 * src/reader.c (gensym): `gensym_count' is your own.
4321 Use a static buf to create the symbol name, as token_buffer is no
4324 2001-02-08 Akim Demaille <akim@epita.fr>
4326 * src/conflicts.c (conflict_report): Be sure not to append to res
4327 between two calls, which could happen if both first sprintf were
4328 skipped, but not the first cp += strlen.
4330 2001-02-08 Akim Demaille <akim@epita.fr>
4332 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
4333 New, from fileutils 4.0.37.
4334 * configure.in: Require Autoconf 2.49c. I took some time before
4335 making this decision. This is the only way out for portability
4336 issues in Bison, it would mean way too much duplicate effort to
4337 import in Bison features implemented in 2.49c since 2.13.
4338 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
4340 2001-02-02 Akim Demaille <akim@epita.fr>
4342 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
4343 * lib/xalloc.h, lib/xmalloc.c: Update.
4345 2001-01-19 Akim Demaille <akim@epita.fr>
4347 Get rid of the ad hoc handling of token_buffer in the scanner: use
4350 * src/lex.c (token_obstack): New.
4351 (init_lex): Initialize it. No longer call...
4352 (grow_token_buffer): this. Remove it.
4353 Adjust all the places which used it to use the obstack.
4355 2001-01-19 Akim Demaille <akim@epita.fr>
4357 * src/lex.h: Rename all the tokens:
4358 s/\bENDFILE\b/tok_eof/g;
4359 s/\bIDENTIFIER\b/tok_identifier/g;
4361 Let them be enums, not #define, to ease debugging.
4362 Adjust all the code.
4364 2001-01-18 Akim Demaille <akim@epita.fr>
4366 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
4367 * src/lex.c (maxtoken, grow_token_buffer): Static.
4369 2001-01-18 Akim Demaille <akim@epita.fr>
4371 Since we now use obstacks, more % directives can be enabled.
4373 * src/lex.c (percent_table): Also accept `%yacc',
4374 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
4376 Handle the actions for `%semantic_parser' and `%pure_parser' here,
4377 instead of returning a token.
4378 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
4379 * src/reader.c (read_declarations): Adjust.
4380 * src/files.c (open_files): Don't call `compute_base_names', don't
4381 compute `attrsfile' since they depend upon data which might be
4382 *in* the input file now.
4383 (output_files): Do it here.
4384 * src/output.c (output_headers): Document the fact that this patch
4385 introduces a guaranteed SEGV for semantic parsers.
4386 * doc/bison.texinfo: Document them.
4387 * tests/suite.at: Exercise these %options.
4389 2000-12-20 Akim Demaille <akim@epita.fr>
4391 Also handle the output file (--verbose) with obstacks.
4393 * files.c (foutput): Remove.
4394 (output_obstack): New.
4395 Adjust all dependencies.
4396 * src/conflicts.c: Return a string.
4397 * src/system.h (obstack_grow_string): Rename as...
4398 (obstack_sgrow): this. Be ready to work with non literals.
4399 (obstack_fgrow4): New.
4401 2000-12-20 Akim Demaille <akim@epita.fr>
4403 * src/files.c (open_files): Fix the computation of short_base_name
4404 in the case of `-o foo.tab.c'.
4406 2000-12-20 Akim Demaille <akim@epita.fr>
4408 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
4409 (copy_dollar): Now that everything uses obstacks, get rid of the
4412 2000-12-20 Akim Demaille <akim@epita.fr>
4414 * src/files.c (open_files): Actually the `.output' file is based
4415 on the short_base_name, not base_name.
4416 * tests/suite.at (Checking output file names): Adjust.
4418 2000-12-20 Akim Demaille <akim@epita.fr>
4420 * src/bison.s1: Remove, we now use directly...
4421 * src/bison.simple: this.
4422 * src/Makefile.am: Use pkgdata instead of data.
4424 2000-12-20 Akim Demaille <akim@epita.fr>
4426 * src/files.c (guard_obstack): New.
4427 (open_files): Initialize it.
4428 (output_files): Dump it...
4429 * src/files.h: Export it.
4430 * src/reader.c (copy_guard): Use it.
4432 2000-12-19 Akim Demaille <akim@epita.fr>
4434 * src/files.c (outfile, defsfile, actfile): Removed as global
4436 (open_files): Don't compute them.
4437 (output_files): Adjust.
4438 (base_name, short_base_name): Be global.
4439 Adjust dependencies.
4441 2000-12-19 Akim Demaille <akim@epita.fr>
4443 * src/files.c (strsuffix): New.
4444 (stringappend): Be just like strcat but allocate.
4445 (base_names): Eve out from open_files.
4446 Try to simplify the rather hairy computation of base_name and
4448 (open_files): Use it.
4449 * tests/suite.at (Checking output file names): New test.
4451 2000-12-19 Akim Demaille <akim@epita.fr>
4453 * src/system.h (obstack_grow_literal_string): Rename as...
4454 (obstack_grow_string): this.
4455 * src/output.c (output_parser): Recognize `%% actions' instead of
4457 * src/bison.s1: s/$/%% actions/.
4458 * src/bison.hairy: Likewise.
4460 2000-12-19 Akim Demaille <akim@epita.fr>
4462 * src/output.c (output_parser): Compute the `#line' lines when
4464 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
4465 Suggested by Hans Aberg.
4467 2000-12-19 Akim Demaille <akim@epita.fr>
4469 Let the handling of the skeleton files be local to the procedures
4472 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
4474 (fparser, open_extra_files): Remove.
4475 (open_files, output_files): Don't take care of fparser.
4476 * src/files.h: Adjust.
4477 * src/output.c (output_parser): Open and close the file to the
4479 * src/reader.c (read_declarations): When %semantic_parser, open
4482 2000-12-19 Akim Demaille <akim@epita.fr>
4484 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
4485 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
4487 2000-12-19 Akim Demaille <akim@epita.fr>
4489 * src/files.c (open_files): Yipee! We no longer need all the code
4490 looking for `/tmp' since we have no tmp file.
4492 2000-12-19 Akim Demaille <akim@epita.fr>
4494 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4496 * src/files.c (open_files): Less dependency on MSDOS etc.
4498 2000-12-14 Akim Demaille <akim@epita.fr>
4500 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4501 Provide a default definition.
4502 Use it when executing the default @ action.
4503 * src/reader.c (reader_output_yylsp): No longer include
4504 `timestamp' and `text' in the default YYLTYPE.
4506 2000-12-12 Akim Demaille <akim@epita.fr>
4508 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4509 (copy_guard): Quote the file names.
4510 Reported by Laurent Mascherpa.
4512 2000-12-12 Akim Demaille <akim@epita.fr>
4514 * src/output.c (output_headers, output_program, output): Be sure
4515 to escape special characters when outputting filenames.
4516 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4517 (output_headers): Don't depend on them, Use ACTSTR.
4519 2000-11-17 Akim Demaille <akim@epita.fr>
4521 * lib/obstack.h: Formatting changes.
4522 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4523 prevents type checking.
4524 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4525 cast the value to (void *): assigning a `foo *' to a `void *'
4527 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4528 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4531 2000-11-17 Akim Demaille <akim@epita.fr>
4533 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4535 (suite.m4, regression.m4, calc.m4): these.
4536 * tests/atgeneral.m4: Update from CVS Autoconf.
4538 2000-11-17 Akim Demaille <akim@epita.fr>
4540 * tests/regression.m4 (%union and --defines): New test,
4541 demonstrating a current bug in the obstack implementation.
4543 2000-11-17 Akim Demaille <akim@epita.fr>
4545 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4547 Use them to declare the variables which are global or local to
4550 2000-11-17 Akim Demaille <akim@epita.fr>
4552 * acconfig.h: Remove, no longer used.
4554 2000-11-07 Akim Demaille <akim@epita.fr>
4556 * src: s/Copyright (C)/Copyright/g.
4558 2000-11-07 Akim Demaille <akim@epita.fr>
4560 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4562 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4564 2000-11-07 Akim Demaille <akim@epita.fr>
4566 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4567 Merge in a single CPP if/else.
4569 2000-11-07 Akim Demaille <akim@epita.fr>
4571 * src/output.c (output): Remove useless variables.
4572 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4573 argument `data' for consistency with the prototypes.
4575 (obstack_copy, obstack_copy0): Rename the second argument as
4576 `address' for consistency. Qualify it `const'.
4577 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4578 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4579 `const' their input argument (`data' or `address').
4580 Adjust the corresponding macros to include `const' in casts.
4582 2000-11-03 Akim Demaille <akim@epita.fr>
4584 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4585 s/PFILE1/BISON_HAIRY/.
4586 Adjust dependencies.
4588 2000-11-03 Akim Demaille <akim@epita.fr>
4590 For some reason, this was not applied.
4592 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4593 `unlink': it's no longer used.
4595 2000-11-03 Akim Demaille <akim@epita.fr>
4597 * src/files.c (skeleton_find): New function, eved out of...
4598 (open_files, open_extra_files): here.
4600 2000-11-03 Akim Demaille <akim@epita.fr>
4604 * src/files.c (obstack_save): New function.
4605 (done): Rename as...
4606 (output_files): this.
4608 * src/main.c (main): Don't use `atexit' to register `done', since
4609 it no longer has to remove tmp files, just call `output_files'
4610 when there are no errors.
4612 2000-11-02 Akim Demaille <akim@epita.fr>
4614 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4615 `unlink': it's no longer used.
4616 * src/files.h: Formatting changes.
4618 2000-11-02 Akim Demaille <akim@epita.fr>
4620 Remove the last uses of mktemp and unlink/delete.
4622 * src/files.c (fdefines, ftable): Removed.
4623 (defines_ostack, table_obstack): New.
4624 Adjust dependencies of the former into uses of the latter.
4625 * src/output.c (output_short_or_char_table, output_short_table):
4626 Convert to using obstacks.
4627 * src/reader.c (copy_comment2): Accept one FILE * and two
4629 (output_token_defines, reader_output_yylsp): Use obstacks.
4630 * src/system.h (obstack_fgrow3): New.
4632 2000-11-01 Akim Demaille <akim@epita.fr>
4634 Change each use of `fattrs' into a use of `attrs_obstack'.
4636 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4637 * src/files.c (fattrs): Remove.
4638 (attrs_obstack): New.
4639 Adjust all dependencies.
4640 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4642 2000-11-01 Akim Demaille <akim@epita.fr>
4645 Change each use of `faction' into a use of `action_obstack'.
4647 * lib/obstack.h, lib/obstack.c: New files.
4648 * src/files.c (faction): Remove.
4649 (action_obstack): New.
4650 Adjust all dependencies.
4652 2000-10-20 Akim Demaille <akim@epita.fr>
4654 * lib/quote.h (PARAMS): New macro. Use it.
4656 2000-10-16 Akim Demaille <akim@epita.fr>
4658 * src/output.c (output_short_or_char_table): New function.
4659 (output_short_table, output_token_translations): Use it.
4660 (goto_actions): Use output_short_table.
4662 2000-10-16 Akim Demaille <akim@epita.fr>
4664 * src/symtab.c (bucket_new): New function.
4667 * src/output.c (output_short_table): New argument to display the
4668 comment associated with the table.
4669 Adjust dependencies.
4670 (output_gram): Use it.
4671 (output_rule_data): Nicer output layout for YYTNAME.
4673 2000-10-16 Akim Demaille <akim@epita.fr>
4675 * src/lex.c (read_typename): New function.
4677 * src/reader.c (copy_dollar): Likewise.
4679 2000-10-16 Akim Demaille <akim@epita.fr>
4681 * src/reader.c (copy_comment2): Expect the input stream to be on
4682 the `/' which is suspected to open a comment, instead of being
4683 called after `//' or `/*' was read.
4684 (copy_comment, copy_definition, parse_union_decl, copy_action)
4685 (copy_guard): Adjust.
4687 2000-10-16 Akim Demaille <akim@epita.fr>
4689 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4690 `read_signed_integer'.
4692 2000-10-16 Akim Demaille <akim@epita.fr>
4694 * src/reader.c (copy_dollar): New function.
4695 (copy_guard, copy_action): Use it.
4697 2000-10-16 Akim Demaille <akim@epita.fr>
4699 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4700 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4701 New files, from Fileutils 4.0.27.
4702 * src/main.c (printable_version): Remove.
4703 * src/lex.c, src/reader.c: Use `quote'.
4705 2000-10-04 Akim Demaille <akim@epita.fr>
4707 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4709 2000-10-04 Akim Demaille <akim@epita.fr>
4711 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4713 2000-10-04 Akim Demaille <akim@epita.fr>
4715 When a literal string is used to define two different tokens,
4716 `bison -v' segfaults.
4717 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4719 * tests/regression.m4: New file.
4720 Include the core of the sample provided by Piotr Gackiewicz.
4721 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4724 2000-10-04 Akim Demaille <akim@epita.fr>
4726 * src/reader.c (parse_expect_decl): Keep `count' within the size
4730 2000-10-02 Paul Eggert <eggert@twinsun.com>
4732 * bison.s1 (yyparse): Assign the default value
4733 unconditionally, to avoid a GCC warning and make the parser a
4736 2000-10-02 Akim Demaille <akim@epita.fr>
4738 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4741 2000-10-02 Akim Demaille <akim@epita.fr>
4743 * src/derives.c, src/print.c, src/reduce.c: To ease the
4744 translation, move some `\n' out of the translated strings.
4746 2000-10-02 Akim Demaille <akim@epita.fr>
4748 The location tracking mechanism is precious for parse error
4749 messages. Nevertheless, it is enabled only when `@n' is used in
4750 the grammar, which is a different issue (you can use it in error
4751 message, but not in the grammar per se). Therefore, there should
4752 be another means to enable it.
4754 * src/getargs.c (getargs): Support `--locations'.
4756 * src/getargs.h (locationsflag): Export it.
4757 * src/lex.c (percent_table): Support `%locations'.
4758 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4759 with `locationsflag'.
4760 * doc/bison.texinfo: Document `--locations' and `%locations'.
4762 * tests/calc.m4: Test it.
4764 For regularity of the names, replace each
4765 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4766 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4767 In addition replace each `flag' with `_flag'.
4769 2000-10-02 Akim Demaille <akim@epita.fr>
4771 Also test parse error messages, including with YYERROR_VERBOSE.
4773 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4775 Use it to check the computations.
4776 Use it to check `nonassoc' is honored.
4777 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4778 `--yyerror-verbose'.
4779 (_AT_CHECK_CALC): Adjust to this option.
4780 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4782 2000-10-02 Akim Demaille <akim@epita.fr>
4784 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4785 the latter demonstrates a flaw in the handling of non debugging
4786 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4787 was used in order to simplify:
4803 unfortunately this leads to a CPP conflict when
4804 `--name-prefix=foo' is used since it produces `#define yydebug
4807 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4808 (YYDPRINTF): New macro.
4810 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4812 Also test `--verbose', `--defines' and `--name-prefix'.
4814 2000-10-02 Akim Demaille <akim@epita.fr>
4816 Improve the readability of the produced parsers.
4818 * src/bison.s1: Formatting changes.
4819 Improve the comment related to the `$' mark.
4820 (yydefault): Don't fall through to `yyresume': `goto' there.
4821 * src/output.c (output_parser): When the `$' is met, skip the end
4823 New variable, `number_of_dollar_signs', to check there's exactly
4824 one `$' in the parser skeleton.
4826 2000-10-02 Akim Demaille <akim@epita.fr>
4828 * lib/xstrdup.c: New file, from the fileutils.
4829 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4830 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4831 instead of strlen + xmalloc + strcpy.
4832 * src/symtab.c (copys): Remove, use xstrdup instead.
4834 2000-10-02 Akim Demaille <akim@epita.fr>
4836 * src/gram.h (associativity): New enum type which replaces the
4837 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4838 `right_assoc', `left_assoc' and `non_assoc'.
4839 Adjust all dependencies.
4840 * src/reader.c: Formatting changes.
4841 (LTYPESTR): Don't define it, use it as a literal in
4842 `reader_output_yylsp'.
4843 * src/symtab.h (symbol_class): New enum type which replaces the
4844 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4845 `sunknown', `stoken and `snterm'.
4847 2000-10-02 Akim Demaille <akim@epita.fr>
4849 * src/getargs.c (fixed_outfiles): Rename as...
4850 (yaccflag): for consistency and accuracy.
4851 Adjust dependencies.
4853 2000-10-02 Akim Demaille <akim@epita.fr>
4855 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4856 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4857 difficult and introduced a lot of core dump. It turns out that
4858 Bison used an implementation of `xmalloc' based on `calloc', and
4859 at various places it does depend upon the initialization to 0. I
4860 have not tried to isolate the pertinent places, and all the former
4861 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4862 someone should address this issue.
4864 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4865 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4867 Adjust dependencies.
4868 * src/warshall.h: New file.
4871 2000-10-02 Akim Demaille <akim@epita.fr>
4873 Various anti-`extern in *.c' changes.
4875 * src/system.h: Include `assert.h'.
4877 2000-10-02 Akim Demaille <akim@epita.fr>
4879 * src/state.h (nstates, final_state, first_state, first_shift)
4880 (first_reduction): Move their exportation from here...
4881 * src/LR0.h: to here.
4882 Adjust dependencies.
4883 * src/getargs.c (statisticsflag): New variable.
4884 Add support for `--statistics'.
4885 Adjust dependencies.
4887 Remove a lot of now useless `extern' statements in most files.
4889 2000-10-02 Akim Demaille <akim@epita.fr>
4891 * src/LR0.h: New file.
4894 2000-10-02 Akim Demaille <akim@epita.fr>
4896 * src/print.h: New file.
4898 * src/print.c: Formatting and ordering changes.
4899 (verbose, terse): Replace with...
4900 (print_results): this new function.
4901 Adjust dependencies.
4903 2000-10-02 Akim Demaille <akim@epita.fr>
4905 * src/conflicts.c (conflict_report): New function.
4906 (conflict_log, verbose_conflict_log): Replace with...
4907 (print_conflicts): this function.
4908 Adjust dependencies.
4909 * src/conflicts.h: New file.
4910 Propagate its inclusion.
4912 2000-10-02 Akim Demaille <akim@epita.fr>
4914 * src/nullable.h: New file.
4915 Propagate its inclusion.
4916 * src/nullable.c: Formatting changes.
4918 2000-10-02 Akim Demaille <akim@epita.fr>
4920 * src/reduce.h: New file.
4921 Propagate its inclusion.
4922 * src/reduce.c: Topological sort and other formatting changes.
4923 (bool, TRUE, FALSE): Move their definition to...
4924 * src/system.h: here.
4926 2000-10-02 Akim Demaille <akim@epita.fr>
4928 * src/files.c: Formatting changes.
4929 (tryopen, tryclose, openfiles): Rename as...
4930 (xfopen, xfclose, open_files): this.
4931 (stringappend): static.
4932 * src/files.h: Complete the list of exported symbols.
4935 2000-10-02 Akim Demaille <akim@epita.fr>
4937 * src/reader.h: New file.
4938 Propagate its use instead of tedious list of `extern' and
4940 * src/reader.c: Formatting changes, topological sort,
4943 2000-10-02 Akim Demaille <akim@epita.fr>
4945 * src/lex.h: Prototype `lex.c' exported functions.
4946 * src/reader.c: Adjust.
4947 * src/lex.c: Formatting changes.
4948 (safegetc): Rename as...
4951 2000-10-02 Akim Demaille <akim@epita.fr>
4953 * src/lalr.h: New file.
4954 Propagate its inclusion instead of prototypes and `extern'.
4955 * src/lalr.c: Formatting changes, topological sorting etc.
4957 2000-10-02 Akim Demaille <akim@epita.fr>
4959 * src/output.c (token_actions): Introduce a temporary array,
4960 YYDEFACT, that makes it possible for this function to use
4963 2000-10-02 Akim Demaille <akim@epita.fr>
4965 `user_toknums' is output as a `short[]' in `output.c', while it is
4966 defined as a `int[]' in `reader.c'. For consistency with the
4967 other output tables, `user_toknums' is now defined as a table of
4970 * src/reader.c (user_toknums): Be a short table instead of an int
4972 Adjust dependencies.
4974 Factor the short table outputs.
4976 * src/output.c (output_short_table): New function.
4977 * src/output.c (output_gram, output_stos, output_rule_data)
4978 (output_base, output_table, output_check): Use it.
4980 2000-10-02 Akim Demaille <akim@epita.fr>
4982 * src/output.c (output): Topological sort of the functions, in
4983 order to get rid of the `static' prototypes.
4984 No longer use `register'.
4985 * src/output.h: New file.
4986 Propagate its inclusion in files explicitly prototyping functions
4989 2000-09-21 Akim Demaille <akim@epita.fr>
4991 * src/atgeneral.m4: Update from Autoconf.
4993 2000-09-21 Akim Demaille <akim@epita.fr>
4995 * src/closure.h: New file.
4996 * src/closure.c: Formatting changes, topological sort over the
4997 functions, use of closure.h.
4998 (initialize_closure, finalize_closure): Rename as...
4999 (new_closure, free_closure): these. Adjust dependencies.
5000 * src/LR0.c: Formatting changes, topological sort, use of
5002 (initialize_states): Rename as...
5004 * src/Makefile.am (noinst_HEADERS): Adjust.
5006 2000-09-20 Akim Demaille <akim@epita.fr>
5008 * src/acconfig.h: Don't protect config.h against multiple
5010 Don't define PARAMS.
5011 * src/system.h: Define PARAMS.
5012 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
5013 purpose of config.h. system.h must not try to fix wrong
5014 definitions in config.h.
5016 2000-09-20 Akim Demaille <akim@epita.fr>
5018 * src/derives.h: New file.
5019 * src/main.c, src/derives.h: Use it.
5021 * src/Makefile.am (noinst_HEADERS): Adjust.
5023 2000-09-20 Akim Demaille <akim@epita.fr>
5025 * tests/atgeneral.m4: Update from Autoconf.
5026 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
5027 (AT_CHECK_CALC): New macros.
5028 Use these macros to test bison with options `', `--raw',
5029 `--debug', `--yacc', `--yacc --debug'.
5031 2000-09-19 Akim Demaille <akim@epita.fr>
5033 * src/output.c: Formatting changes.
5034 * src/machine.h: Remove, leaving its contents in...
5035 * src/system.h: here.
5037 Adjust all dependencies on stdio.h and machine.h.
5038 * src/getargs.h: New file.
5039 Let all `extern' declarations about getargs.c be replaced with
5040 inclusion of `getargs.h'.
5041 * src/Makefile.am (noinst_HEADERS): Adjust.
5043 * tests/calc.m4 (yyin): Be initialized in main, not on the global
5045 (yyerror): Returns void, not int.
5046 * doc/bison.texinfo: Formatting changes.
5048 2000-09-19 Akim Demaille <akim@epita.fr>
5050 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
5053 2000-09-18 Akim Demaille <akim@epita.fr>
5055 * configure.in: Append WARNING_CFLAGS to CFLAGS.
5056 * src/Makefile.am (INCLUDES): Don't.
5057 Be ready to fetch headers in lib/.
5059 2000-09-18 Akim Demaille <akim@epita.fr>
5061 * doc/bison.texinfo: Update the copyright.
5062 ANSIfy and GNUify the examples.
5063 Remove the old menu.
5065 2000-09-18 Akim Demaille <akim@epita.fr>
5067 First set of tests: use the `calc' example from the documentation.
5069 * src/bison.s1 (yyparse): Condition the code using `yytname' which
5070 is defined only when YYDEBUG is.
5071 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
5072 * src/files.c (tryopen, tryclose): Formatting changes.
5073 Move to the top and be static.
5074 * src/reader.c (read_signed_integer): Likewise.
5075 * tests/calc.m4: New file.
5076 * Makefile.am, suite.m4: Adjust.
5077 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
5079 2000-09-18 Akim Demaille <akim@epita.fr>
5081 Add support for an Autotest test suite for Bison.
5083 * m4/m4.m4, m4/atconfig.m4: New files.
5084 * m4/Makefile.am (EXTRA_DIST): Adjust.
5085 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
5087 * src/getargs.c: Display a more standard --version message.
5088 * src/reader.c (reader): Formatting changes.
5089 No longer depend upon VERSION_STRING.
5090 * configure.in: No longer use `dnl'.
5091 Set up the test suite and the new directory `tests/.
5092 (VERSION_STRING): Remove.
5094 2000-04-14 Akim Demaille <akim@epita.fr>
5096 * src/reader.c (copy_comment2): New function, same as former
5097 `copy_comment', but outputs into two FILE *.
5098 (copy_comment): Use it.
5099 (parse_union_decl): Use it.
5100 (get_type, parse_start_decl): Use the same `invalid' message.
5101 (parse_start_decl, parse_union_decl): Use the same `multiple'
5103 (parse_union_decl, copy_guard, copy_action): Use the same
5104 `unmatched' message.
5105 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
5107 2000-03-31 Akim Demaille <akim@epita.fr>
5109 * src/files.c (tryopen, tryclose): Move to the top.
5112 2000-03-31 Akim Demaille <akim@epita.fr>
5114 * src/main.c (main): Don't call `done', exit does it.
5116 2000-03-31 Akim Demaille <akim@epita.fr>
5118 * allocate.c: s/return (foo)/return foo/.
5121 * output.c: Likewise.
5122 * reader.c: Likewise.
5123 * symtab.c: Likewise.
5124 * vmsgetargs.c: Likewise.
5126 2000-03-31 Akim Demaille <akim@epita.fr>
5128 Clean up the error reporting functions.
5130 * src/report.c: New file.
5131 * src/report.h: Likewise.
5132 * src/Makefile.am: Adjust.
5133 * m4/error.m4: New file.
5134 * m4/Makefile.am: Adjust.
5135 * configure.in (jm_PREREQ_ERROR): Call it.
5136 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
5138 (fatal, fatals): Remove. All callers use complain.c::fatal.
5139 (warn, warni, warns, warnss, warnss): Remove. All callers use
5140 complain.c::complain.
5141 (toomany): Remove, use fatal instead.
5142 * src/files.c (done): No argument, use complain_message_count.
5143 * src/main.c (main): Register `done' to `atexit'.
5145 * src/getargs.c (usage): More `fputs', less `fprintf'.
5147 2000-03-28 Akim Demaille <akim@epita.fr>
5149 * lib/: New directory.
5150 * Makefile.am (SUBDIRS): Adjust.
5151 * configure.in: Adjust.
5152 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
5154 * src/alloca.c: Moved to lib/.
5155 * src/getopt.c: Likewise.
5156 * src/getopt1.c: Likewise.
5157 * src/getopt.h: Likewise.
5158 * src/ansi2knr.c: Likewise.
5159 * src/ansi2knr.1: Likewise.
5160 * src/Makefile.am: Adjust.
5161 * lib/Makefile.am: New file.
5163 2000-03-28 Akim Demaille <akim@epita.fr>
5165 * src/getargs.c (usage): Refresh the help message.
5167 2000-03-17 Akim Demaille <akim@epita.fr>
5169 * src/getopt1.c: Updated from textutils 2.0e
5170 * src/getopt.c: Likewise.
5171 * src/getopt.h: Likewise.
5173 2000-03-17 Akim Demaille <akim@epita.fr>
5175 * src/Makefile.am (bison.simple): Fix the awk program: quote only
5176 the file name, not the whole `#line LINE FILE'.
5178 2000-03-17 Akim Demaille <akim@epita.fr>
5180 On syntax errors, report the token on which we choked.
5182 * src/bison.s1 (yyparse): In the label yyerrlab, when
5183 YYERROR_VERBOSE, add yychar in msg.
5185 2000-03-17 Akim Demaille <akim@epita.fr>
5187 * src/reader.c (copy_at): New function.
5188 (copy_guard): Use it.
5189 (copy_action): Use it.
5191 2000-03-17 Akim Demaille <akim@epita.fr>
5193 Be kind to translators, save some useless translations.
5195 * src/main.c (banner): New function.
5196 (fatal_banner): Use it.
5197 (warn_banner): Use it.
5199 2000-03-17 Akim Demaille <akim@epita.fr>
5201 * src/reader.c (copy_definition): Use copy_string and
5202 copy_comment. Removed now unused `match', `ended',
5204 (copy_comment, copy_string): Moved, to be visible from
5207 2000-03-17 Akim Demaille <akim@epita.fr>
5209 * src/reader.c (copy_string): Declare `static inline'. No
5210 problems with inline, since it is checked by configure.
5211 (copy_comment): Likewise.
5213 2000-03-17 Akim Demaille <akim@epita.fr>
5215 * src/reader.c (packsymbols): Formatting changes.
5217 2000-03-17 Akim Demaille <akim@epita.fr>
5219 * src/reader.c (copy_comment): New function, factored out from:
5220 (copy_action): Use it. Removed now unused `match', `ended',
5222 (copy_guard): Likewise.
5224 2000-03-17 Akim Demaille <akim@epita.fr>
5226 * src/reader.c (copy_string): New function, factored out from:
5227 (copy_action): Use it.
5228 (copy_guard): Likewise.
5230 2000-03-17 Akim Demaille <akim@epita.fr>
5232 Change the handling of @s so that they behave exactly like $s.
5233 There is now a pseudo variable @$ (readble and writable), location
5234 of the lhs of the rule (by default ranging from the location of
5235 the first symbol of the rhs, to the location of the last symbol,
5236 or, if the rhs is empty, YYLLOC).
5238 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
5240 (yyparse): When providing a default semantic action, provide a
5241 default location action.
5242 (after the $): No longer change `*YYLSP', just stack YYLOC the
5243 same way you stack YYVAL.
5244 * src/reader.c (read_declarations): Use warns.
5245 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
5246 (copy_action, case '@'): Likewise.
5247 Use a standard error message, to save useless work from
5250 2000-03-17 Akim Demaille <akim@epita.fr>
5252 * src/bison.s1: Formatting and cosmetics changes.
5253 * src/reader.c: Likewise.
5254 Update the Copyright notice.
5256 2000-03-17 Akim Demaille <akim@epita.fr>
5258 * src/bison.s1 (#line): All set to `#line' only, since the
5259 Makefile now handles them.
5261 2000-03-16 Akim Demaille <akim@epita.fr>
5263 * src/output.c (output_rule_data): Output the documentation of
5265 (Copyright notice): Update.
5268 2000-03-16 Akim Demaille <akim@epita.fr>
5270 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
5271 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
5272 One `#if YYDEBUG' remains, since it uses variables which are
5273 defined only if `YYDEBUG != 0'.
5275 2000-03-16 Akim Demaille <akim@epita.fr>
5277 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
5278 and related variables so that the similarities are highlighted.
5280 2000-03-16 Akim Demaille <akim@epita.fr>
5282 * src/bison.s1: Properly indent CPP directives.
5284 2000-03-16 Akim Demaille <akim@epita.fr>
5286 * src/bison.s1: Properly indent the `alloca' CPP section.
5288 2000-03-16 Akim Demaille <akim@epita.fr>
5290 Do not hard code values of directories in `configure.in'.
5291 Update the `configure' tool chain.
5293 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
5295 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
5296 (AC_OUTPUT): Add m4/Makefile.
5297 Bump to bison 1.28a, 1.29 has never been released.
5298 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
5299 handled via src/Makefile.am.
5300 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
5301 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
5303 * Makefile.am (SUBDIRS): Add m4.
5304 (ACLOCAL_AM_FLAGS): New variable.
5305 (AUTOMAKE_OPTIONS): Add check-news.
5306 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
5307 the proper line number and file name.
5308 (DEFS): Propagate the location of bison library files and of the
5310 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
5312 * acinclude.m4: Remove, replaced by the directory m4.
5313 * m4/Makefile.am (EXTRA_DIST): New variable.
5314 * m4/gettext.m4: New file, from the fileutils.
5315 * m4/lcmessage.m4: Likewise
5316 * m4/progtest.m4: Likewise.
5317 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
5319 2000-03-10 Akim Demaille <akim@epita.fr>
5322 Formatting changes of various comments.
5323 Respect the GNU coding standards at various places.
5324 Don't use `_()' when no translation is needed.
5326 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5329 OS/2 honors TMPDIR environment variable.
5331 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5333 * doc/bison.texinfo: Tweaked spelling and grammar.
5335 Removed reference to price of printed copy.
5336 Mention BISON_SIMPLE and BISON_HAIRY.
5338 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5340 * configure.in, NEWS:
5341 Bison 1.29 released.
5343 1999-10-27 Jesse Thilo <jthilo@gnu.org>
5345 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
5346 Added reference card.
5348 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5350 * po/ru.po: Added Russian translation.
5352 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5354 * configure.in: Added Russian translation.
5356 1999-07-06 Jesse Thilo <jthilo@gnu.org>
5358 * configure.in, NEWS, README:
5359 Released version 1.28.
5361 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5364 Squashed redefinition warning on some systems.
5366 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
5367 Have configure build version string instead of relying on ANSI string
5370 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5372 * po/POTFILES.in: Got rid of version.c.
5374 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5376 * acconfig.h, configure.in:
5377 Have configure build version string instead of relying on ANSI string
5380 1999-06-08 Jesse Thilo <jthilo@gnu.org>
5383 Dropped mention of `+' for long-named options.
5385 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5387 * src/files.c: Added <unistd.h> for unlink().
5389 * src/Makefile.am, src/system.h:
5392 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5394 * README: Added a FAQ list.
5396 * configure.in, acconfig.h:
5399 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5401 * doc/FAQ, doc/Makefile.am:
5404 1999-05-19 Jesse Thilo <jthilo@gnu.org>
5406 * src/alloc.h, src/symtab.h, src/version.c:
5407 Protected inclusion of "config.h" with HAVE_CONFIG_H.
5409 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5411 * src/.cvsignore, src/Makefile.am:
5412 Reorganized: sources in `src', documentation in `doc'.
5414 * src/lex.c (literalchar):
5415 fixed the code for escaping double quotes (thanks
5418 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5420 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
5421 Adjusted paths to reflect directory reorganization.
5423 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5425 * doc/.cvsignore, doc/Makefile.am:
5426 Reorganized: sources in `src', documentation in `doc'.
5428 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5431 Updated AC_INIT file to reflect directory reorganization.
5433 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
5434 Reorganized: sources in `src', documentation in `doc'.
5436 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5439 Don't declare calloc() and realloc() if not necessary.
5441 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5443 * configure.in, acconfig.h, acinclude.m4:
5444 Don't declare calloc() and realloc() if not necessary.
5446 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5448 * po/.cvsignore: Added i18n support.
5450 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5452 * acconfig.h, configure.in, Makefile.am:
5455 1999-03-22 Jesse Thilo <jthilo@gnu.org>
5457 * src/bison.s1: Fixed #line numbers.
5459 1999-03-15 Jesse Thilo <jthilo@gnu.org>
5461 * po/es.po, po/fr.po, po/nl.po, po/de.po:
5462 Added PO files from Translation Project.
5464 1999-03-03 Jesse Thilo <jthilo@gnu.org>
5467 Added support for non-ANSI compilers (ansi2knr).
5469 1999-02-16 Jesse Thilo <jthilo@gnu.org>
5471 * configure.in: Bumped version number to 1.27.
5474 Added `bison.simple' to list of files removed by `make distclean'.
5476 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5478 * src/files.c, src/files.h:
5479 Defined locations of parser files in config.h instead of Makefile.
5481 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5483 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
5484 Defined locations of parser files in config.h instead of Makefile.
5486 1999-02-09 Jesse Thilo <jthilo@gnu.org>
5489 Removed inappropriate use of $< macro.
5491 1999-02-05 Jesse Thilo <jthilo@gnu.org>
5493 * po/Makefile.in.in, po/POTFILES.in:
5494 Add `po' directory skeleton.
5496 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5498 * README: Document help-bison list.
5500 * configure.in: Add check for mkstemp().
5502 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5504 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5505 Hush a few compiler warnings.
5508 Add tryclose(), which verifies that fclose was successful.
5509 Hush a couple of compiler warnings.
5511 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5513 * Makefile.am, OChangeLog:
5514 ChangeLog is now automatically generated. Include the old version as
5517 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5519 * 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:
5522 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5524 * doc/bison.texinfo: Fix formatting glitch.
5526 * doc/bison.texinfo: Update FSF address.
5528 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5530 * acconfig.h: Update FSF address.
5532 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5535 Don't define PACKAGE here, since config.h defines it.
5537 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5539 * src/reader.c: Update copyright date.
5542 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5543 favor of output directly to stderr (avoids buffer overruns).
5545 * src/reader.c: Some checks for premature EOF.
5547 * 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:
5548 Use prototypes if the compiler understands them.
5550 * src/files.c: Honor TMPDIR on Unix hosts.
5551 Use prototypes if the compiler understands them.
5554 Fix a couple of buffer overrun bugs.
5555 Use prototypes if the compiler understands them.
5557 * src/system.h: Include unistd.h and ctype.h.
5558 Use #ifdef instead of #if for NLS symbols.
5560 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5562 * doc/bison.texinfo:
5563 Delete comment "consider using @set for edition number, etc..." since
5564 we now are doing so.
5566 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5569 Use prototypes if the compiler understands them.
5571 * NEWS: Document 1.26 highlights.
5573 * Makefile.am: Require Automake 1.3 or later.
5576 Use prototypes if the compiler understands them.
5578 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5581 Use VERSION symbol from automake for version number.
5583 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5585 * acconfig.h, configure.in, version.cin:
5586 Use VERSION symbol from automake for version number.
5588 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5591 Distribute original version of simple parser (bison.s1), not built
5592 version (bison.simple).
5594 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5596 * doc/bison.texinfo: Add info dir entry.
5598 * doc/bison.texinfo:
5599 Let automake put version number into documentation.
5601 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5603 * src/bison.cld, src/build.com, src/vmshlp.mar:
5604 Add non-RCS files from /gd/gnu/bison.
5606 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5609 Document the BISON_HAIRY and BISON_SIMPLE variables.
5611 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5613 * src/version.c: Build version.c automatically.
5616 Fix token numbering (used to start at 258, not 257).
5618 * src/system.h: Include config.h.
5620 * src/getargs.c: Update bug report address.
5622 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5623 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5625 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5628 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5630 * configure.in, version.cin:
5631 Build version.c automatically.
5633 * AUTHORS: Add AUTHORS file.
5635 * README: Update bug report address.
5638 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5640 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5643 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5645 * doc/bison.texinfo: Clean up some formatting.
5647 1998-05-05 Richard Stallman <rms@gnu.org>
5649 * doc/bison.texinfo:
5650 Explain better why to make a pure parser.
5652 1998-01-05 Richard Stallman <rms@gnu.org>
5654 * src/files.c (openfiles):
5655 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5656 find a temporary directory, if possible. Do not unlink files while
5659 1997-08-25 Richard Stallman <rms@gnu.org>
5661 * src/reader.c (stack_offset;):
5662 Change some warni to warns.
5664 * src/lex.c (literalchar): Use warns, not warni.
5666 1997-06-28 Richard Stallman <rms@gnu.org>
5668 * src/bison.s1: Add a Bison version comment.
5670 * src/main.c (fatal, warn, berror):
5673 1997-06-28 Richard Stallman <rms@gnu.org>
5675 * Makefile.in (bison_version): New variable.
5676 (dist): Use that variable.
5677 (bison.s1): Substitute the Bison version into bison.simple.
5679 * bison.simple: Add a Bison version comment.
5681 1997-06-18 Richard Stallman <rms@gnu.org>
5683 * src/main.c (fatal, warn, berror):
5684 Make error messages standard.
5685 (toomany): Improve error message text.
5687 * 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:
5688 new.h renamed to alloc.h.
5690 1997-06-18 Richard Stallman <rms@gnu.org>
5692 * Makefile.in: new.h renamed to alloc.h.
5694 1997-05-24 Richard Stallman <rms@gnu.org>
5696 * src/lex.c (literalchar):
5697 Fix the code for escaping \, " and '.
5699 (lex): Avoid trouble when there are many chars
5700 to discard in a char literal with just several chars in it.
5702 1997-05-17 Richard Stallman <rms@gnu.org>
5705 Use malloc, if using alloca is troublesome.
5706 (YYSTACK_USE_ALLOCA): New flag macro.
5707 Define it for some systems and compilers.
5708 (YYSTACK_ALLOC): New macro.
5709 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5710 If it was malloc'd, free it.
5712 1997-05-17 Richard Stallman <rms@gnu.org>
5715 Use malloc, if using alloca is troublesome.
5716 (YYSTACK_USE_ALLOCA): New flag macro.
5717 Define it for some systems and compilers.
5718 (YYSTACK_ALLOC): New macro.
5719 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5720 If it was malloc'd, free it.
5722 1997-04-23 Richard Stallman <rms@gnu.org>
5725 (alloca) [__hpux]: Always define as __builtin_alloca.
5727 1997-04-23 Richard Stallman <rms@gnu.org>
5730 (alloca) [__hpux]: Always define as __builtin_alloca.
5732 1997-04-22 Richard Stallman <rms@gnu.org>
5735 [__hpux]: Include alloca.h (right for HPUX 10)
5736 instead of declaring alloca (right for HPUX 9).
5738 * src/bison.s1 (__yy_memcpy):
5739 Declare arg `count' as unsigned int.
5740 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5742 1997-04-22 Richard Stallman <rms@gnu.org>
5745 [__hpux]: Include alloca.h (right for HPUX 10)
5746 instead of declaring alloca (right for HPUX 9).
5748 * bison.simple (__yy_memcpy):
5749 Declare arg `count' as unsigned int.
5750 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5752 1997-01-03 Richard Stallman <rms@gnu.org>
5754 * src/allocate.c: [__STDC__ or _MSC_VER]:
5755 Declare calloc and realloc to return void *.
5757 1997-01-02 Richard Stallman <rms@gnu.org>
5760 [_MSC_VER]: Include stdlib.h and process.h.
5761 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5763 * src/main.c (main): Return FAILURE as a value.
5764 (printable_version): Declare arg as int, not char.
5766 1997-01-02 Richard Stallman <rms@gnu.org>
5768 * Makefile.in (dist):
5769 Explicitly check for symlinks, and copy them.
5771 1996-12-19 Richard Stallman <rms@gnu.org>
5774 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5776 1996-12-18 Paul Eggert <eggert@gnu.org>
5778 * src/bison.s1 (yyparse):
5779 If __GNUC__ and YYPARSE_PARAM are both defined,
5780 declare yyparse to have a void * argument.
5782 1996-12-18 Paul Eggert <eggert@gnu.org>
5784 * bison.simple (yyparse):
5785 If __GNUC__ and YYPARSE_PARAM are both defined,
5786 declare yyparse to have a void * argument.
5788 1996-12-17 Richard Stallman <rms@gnu.org>
5790 * src/reduce.c (nbits): Add some casts.
5792 1996-08-12 Richard Stallman <rms@gnu.org>
5794 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5796 1996-08-12 Richard Stallman <rms@gnu.org>
5798 * bison.simple: Test _MSDOS as well as _MSDOS_.
5800 1996-07-31 Richard Stallman <rms@gnu.org>
5803 [__sun && __i386]: Include alloca.h.
5805 1996-07-31 Richard Stallman <rms@gnu.org>
5808 [__sun && __i386]: Include alloca.h.
5810 1996-07-30 Richard Stallman <rms@gnu.org>
5812 * src/bison.s1: Comment change.
5814 * src/bison.s1: Test _MSDOS_, not MSDOS.
5816 1996-07-30 Richard Stallman <rms@gnu.org>
5818 * bison.simple: Comment change.
5820 * bison.simple: Test _MSDOS_, not MSDOS.
5822 1996-06-01 Richard Stallman <rms@gnu.org>
5824 * 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:
5825 Insert `_' macro around many string constants.
5828 Insert `_' macro around many string constants.
5830 (main): Call setlocale, bindtextdomain and textdomain.
5832 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5833 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5834 [ENABLE_NLS]: Include libintl.h.
5835 [ENABLE_NLS] (gettext): Define.
5836 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5837 (N_, PACKAGE, LOCALEDIR): New macros.
5839 1996-06-01 Richard Stallman <rms@gnu.org>
5841 * POTFILES.in: New file.
5843 * Makefile.in (allocate.o):
5844 Define target explicitly.
5846 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5847 (LDFLAGS): Set to @LDFLAGS@.
5848 (configure): Run autoconf only if preceding `cd' succeeds.
5849 (bison.s1): Redirect output to temporary file then move the
5850 temporary to the target, rather than redirecting directly to bison.s1.
5851 (clean): Remove config.status and config.log.
5852 (distclean): Don't remove config.status here.
5854 1996-05-12 Richard Stallman <rms@gnu.org>
5857 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5859 1996-05-12 Richard Stallman <rms@gnu.org>
5862 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5864 1996-05-11 Richard Stallman <rms@gnu.org>
5866 * src/bison.s1 (__yy_memcpy):
5867 Really reorder the args, as was supposedly done on Feb 14 1995.
5868 (yyparse): Calls changed accordingly.
5870 1996-05-11 Richard Stallman <rms@gnu.org>
5872 * Makefile.in (dist): Don't use $(srcdir).
5874 * bison.simple (__yy_memcpy):
5875 Really reorder the args, as was supposedly done on Feb 14 1995.
5876 (yyparse): Calls changed accordingly.
5878 1996-01-27 Richard Stallman <rms@gnu.org>
5880 * src/output.c (output_rule_data):
5881 Test YYERROR_VERBOSE in the conditional
5882 around the definition of ttyname.
5884 1995-12-29 Richard Stallman <rms@gnu.org>
5887 Fix line numbers in #line commands.
5889 1995-12-29 Richard Stallman <rms@gnu.org>
5892 Fix line numbers in #line commands.
5894 1995-12-27 Richard Stallman <rms@gnu.org>
5896 * src/bison.s1 (YYPARSE_PARAM_DECL):
5897 In C++, make it always null.
5898 (YYPARSE_PARAM_ARG): New macro.
5899 (yyparse): Use YYPARSE_PARAM_ARG.
5901 1995-12-27 Richard Stallman <rms@gnu.org>
5903 * bison.simple (YYPARSE_PARAM_DECL):
5904 In C++, make it always null.
5905 (YYPARSE_PARAM_ARG): New macro.
5906 (yyparse): Use YYPARSE_PARAM_ARG.
5908 1995-11-29 Richard Stallman <rms@gnu.org>
5910 * doc/bison.texinfo:
5911 Describe literal string tokens, %raw, %no_lines, %token_table.
5913 1995-11-29 Daniel Hagerty <hag@gnu.org>
5915 * doc/bison.texinfo: Fixed update date
5917 1995-10-16 Richard Stallman <rms@gnu.org>
5919 * src/version.c: Version 1.25.
5921 1995-10-16 Richard Stallman <rms@gnu.org>
5923 * NEWS: *** empty log message ***
5925 1995-10-16 Richard Stallman <rms@gnu.org>
5927 * doc/bison.1, doc/bison.rnh:
5930 1995-10-15 Richard Stallman <rms@gnu.org>
5932 * src/vmsgetargs.c, src/getargs.c:
5933 Added -n, -k, and -raw switches.
5934 (noparserflag, toknumflag, rawtoknumflag): New variables.
5936 * src/symtab.h (SALIAS):
5937 New #define for adding aliases to %token.
5938 (struct bucket): Added `alias' field.
5940 * src/reduce.c (reduce_grammar):
5941 Revise error message.
5942 (print_notices): Remove final `.' from error message.
5944 * src/reader.c (reader_output_yylsp):
5946 (readgram): Use `#if 0' around code that accepted %command
5947 inside grammar rules: The documentation doesn't allow it,
5948 and it will fail since the %command processors scan for the next %.
5949 (parse_token_decl): Extended the %token
5950 declaration to allow a multi-character symbol as an alias.
5951 (parse_thong_decl): New function.
5952 (read_declarations): Added %thong declarations.
5953 (read_declarations): Handle NOOP to deal with allowing
5954 % declarations as another means to specify the flags.
5955 (readgram): Allow %prec prior to semantics embedded in a rule.
5956 (skip_to_char, read_declarations, copy_definition)
5957 (parse_token_decl, parse_start_decl, parse_type_decl)
5958 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5959 (get_type_name, copy_guard, copy_action, readgram)
5960 (get_type, packsymbols): Revised most error messages.
5961 Changed `fatal' to `warnxxx' to avoid aborting for error.
5962 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5963 (read_declarations): Improve the error message for
5964 an invalid character. Do not abort.
5965 (read_declarations, copy_guard, copy_action): Use
5966 printable_version to avoid unprintable characters in printed output.
5967 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5968 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5969 Allow the type of a non-terminal can be given
5970 more than once, as long as all specifications give the same type.
5973 (output_headers, output_trailers, output, output_gram)
5974 (output_rule_data): Implement noparserflag variable.
5975 Implement toknumflag variable.
5976 (output): Call reader_output_yylsp to output LTYPESTR.
5978 * src/main.c (main):
5979 If reader sees an error, don't process the grammar.
5980 (fatals): Updated to not use VARARGS1.
5981 (printable_version, int_to_string, warn, warni, warns, warnss)
5982 (warnsss): New error reporting functions. Avoid abort for error.
5985 Added THONG and NOOP for alias processing.
5986 Added SETOPT for the new code that allows setting options with %flags.
5989 Include getopt.h. Add some extern decls.
5990 (safegetc): New function to deal with EOF gracefully.
5991 (literalchar); new function to deal with reading \ escapes.
5992 (lex): Use literalchar.
5993 (lex): Implemented "..." tokens.
5994 (literalchar, lex, parse_percent_token): Made tokenbuffer
5995 always contain the token. This includes growing the token
5996 buffer while reading an integer.
5997 (parse_percent_token): Replaced if-else statement with percent_table.
5998 (parse_percent_token): Added % declarations as another
5999 way to specify the flags -n, -l, and -r. Also added hooks for
6000 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
6001 major changes to files.c.
6002 (lex) Retain in the incoming stream a character following
6004 (skip_white_space, lex): Revised most error messages
6005 and changed fatal to warn to avoid aborting.
6006 (percent_table): Added %thong declarations.
6008 * src/gram.h: Comment changes.
6010 * src/files.c (openfiles, open_extra_files, done):
6012 and actfile file. Handle noparserflag. Both for -n switch.
6014 * src/conflicts.c (resolve_sr_conflict):
6015 Remove use of alloca.
6017 1995-06-01 Jim Meyering <meyering@gnu.org>
6019 * doc/bison.texinfo: *** empty log message ***
6021 1995-05-06 Richard Stallman <rms@gnu.org>
6023 * src/bison.s1: Comment change.
6025 1995-05-06 Richard Stallman <rms@gnu.org>
6027 * bison.simple: Comment change.
6029 1995-05-03 Richard Stallman <rms@gnu.org>
6031 * src/version.c: Version now 1.24.
6033 * src/bison.s1: Change distribution terms.
6035 * src/version.c: Version now 1.23.
6037 1995-05-03 Richard Stallman <rms@gnu.org>
6039 * doc/bison.texinfo:
6040 Rewrite "Conditions for Using Bison".
6041 Update version to 1.24.
6043 1995-05-03 Richard Stallman <rms@gnu.org>
6045 * bison.simple: Change distribution terms.
6047 1995-02-23 Richard Stallman <rms@gnu.org>
6049 * src/files.c: Test __VMS_POSIX as well as VMS.
6051 1995-02-14 Jim Meyering <meyering@gnu.org>
6053 * src/bison.s1 (__yy_memcpy):
6054 Renamed from __yy_bcopy to avoid
6055 confusion. Reverse FROM and TO arguments to be consistent with
6058 1995-02-14 Jim Meyering <meyering@gnu.org>
6060 * bison.simple (__yy_memcpy):
6061 Renamed from __yy_bcopy to avoid
6062 confusion. Reverse FROM and TO arguments to be consistent with
6065 1994-11-10 David J. MacKenzie <djm@gnu.org>
6071 * Makefile.in (DISTFILES): Include NEWS.
6073 * Makefile.in (DISTFILES):
6074 Include install-sh, not install.sh.
6076 * configure.in: Update to Autoconf v2 macro names.
6078 1994-10-05 David J. MacKenzie <djm@gnu.org>
6080 * Makefile.in: fix typo
6082 * Makefile.in (prefix, exec_prefix):
6083 Let configure set them.
6085 1994-09-28 David J. MacKenzie <djm@gnu.org>
6087 * Makefile.in: Set datadir to $(prefix)/share.
6089 1994-09-15 Richard Stallman <rms@gnu.org>
6092 Update copyright notice and GPL version.
6094 1994-09-15 Richard Stallman <rms@gnu.org>
6097 Update copyright notice and GPL version.
6099 1994-07-12 Richard Stallman <rms@gnu.org>
6101 * src/reduce.c, src/reader.c:
6104 1994-05-05 David J. MacKenzie <djm@gnu.org>
6106 * Makefile.in: entered into RCS
6108 1994-03-26 Richard Stallman <rms@gnu.org>
6110 * src/bison.s1: entered into RCS
6112 1994-03-26 Richard Stallman <rms@gnu.org>
6114 * bison.simple: entered into RCS
6116 1994-03-25 Richard Stallman <rms@gnu.org>
6118 * src/main.c: entered into RCS
6120 1994-03-24 Richard Stallman <rms@gnu.org>
6122 * src/conflicts.c: entered into RCS
6124 1994-01-02 Richard Stallman <rms@gnu.org>
6126 * Makefile.in: *** empty log message ***
6128 1993-11-21 Richard Stallman <rms@gnu.org>
6130 * src/bison.s1: *** empty log message ***
6132 1993-11-21 Richard Stallman <rms@gnu.org>
6134 * doc/bison.texinfo: entered into RCS
6136 * doc/bison.texinfo: *** empty log message ***
6138 1993-11-21 Richard Stallman <rms@gnu.org>
6140 * bison.simple: *** empty log message ***
6142 1993-10-25 David J. MacKenzie <djm@gnu.org>
6144 * doc/bison.texinfo: *** empty log message ***
6146 1993-10-19 Richard Stallman <rms@gnu.org>
6148 * src/bison.s1: *** empty log message ***
6150 1993-10-19 Richard Stallman <rms@gnu.org>
6152 * bison.simple: *** empty log message ***
6154 1993-10-14 Richard Stallman <rms@gnu.org>
6156 * src/bison.s1: *** empty log message ***
6158 1993-10-14 Richard Stallman <rms@gnu.org>
6160 * bison.simple: *** empty log message ***
6162 1993-09-14 David J. MacKenzie <djm@gnu.org>
6164 * doc/bison.texinfo: *** empty log message ***
6166 1993-09-13 Noah Friedman <friedman@gnu.org>
6168 * Makefile.in: *** empty log message ***
6170 1993-09-10 Richard Stallman <rms@gnu.org>
6172 * src/conflicts.c: *** empty log message ***
6174 * src/system.h: entered into RCS
6176 1993-09-10 Richard Stallman <rms@gnu.org>
6178 * doc/bison.1: entered into RCS
6180 1993-09-06 Noah Friedman <friedman@gnu.org>
6182 * src/version.c: entered into RCS
6184 1993-09-06 Noah Friedman <friedman@gnu.org>
6186 * Makefile.in: *** empty log message ***
6188 1993-07-30 David J. MacKenzie <djm@gnu.org>
6190 * Makefile.in: *** empty log message ***
6192 1993-07-24 Richard Stallman <rms@gnu.org>
6194 * src/bison.s1: *** empty log message ***
6196 1993-07-24 Richard Stallman <rms@gnu.org>
6198 * bison.simple: *** empty log message ***
6200 1993-07-08 David J. MacKenzie <djm@gnu.org>
6202 * Makefile.in: *** empty log message ***
6204 1993-07-04 Richard Stallman <rms@gnu.org>
6206 * src/bison.s1: *** empty log message ***
6208 1993-07-04 Richard Stallman <rms@gnu.org>
6210 * bison.simple: *** empty log message ***
6212 1993-06-26 David J. MacKenzie <djm@gnu.org>
6214 * src/getargs.c: entered into RCS
6216 1993-06-26 David J. MacKenzie <djm@gnu.org>
6218 * doc/bison.texinfo: *** empty log message ***
6220 * doc/bison.1: New file.
6222 1993-06-25 Richard Stallman <rms@gnu.org>
6224 * src/getargs.c: New file.
6226 1993-06-16 Richard Stallman <rms@gnu.org>
6228 * src/bison.s1: *** empty log message ***
6230 1993-06-16 Richard Stallman <rms@gnu.org>
6232 * bison.simple: *** empty log message ***
6234 1993-06-03 Richard Stallman <rms@gnu.org>
6236 * src/bison.s1: New file.
6238 1993-06-03 Richard Stallman <rms@gnu.org>
6240 * doc/bison.texinfo: *** empty log message ***
6242 1993-06-03 Richard Stallman <rms@gnu.org>
6244 * bison.simple: New file.
6246 1993-05-19 Richard Stallman <rms@gnu.org>
6248 * doc/bison.texinfo: New file.
6250 1993-05-07 Noah Friedman <friedman@gnu.org>
6252 * Makefile.in: *** empty log message ***
6254 1993-04-28 Noah Friedman <friedman@gnu.org>
6256 * src/reader.c: *** empty log message ***
6258 1993-04-23 Noah Friedman <friedman@gnu.org>
6260 * src/alloc.h: entered into RCS
6262 1993-04-20 David J. MacKenzie <djm@gnu.org>
6264 * src/version.c: *** empty log message ***
6266 * src/files.c, src/allocate.c:
6269 * src/reader.c: *** empty log message ***
6271 * src/lex.c: entered into RCS
6273 * src/conflicts.c: New file.
6275 * src/symtab.c: entered into RCS
6277 * src/alloc.h: New file.
6279 * src/LR0.c: entered into RCS
6281 1993-04-18 Noah Friedman <friedman@gnu.org>
6283 * src/reader.c: New file.
6285 * src/version.c: *** empty log message ***
6287 1993-04-18 Noah Friedman <friedman@gnu.org>
6289 * Makefile.in: *** empty log message ***
6291 1993-04-17 Noah Friedman <friedman@gnu.org>
6293 * Makefile.in: *** empty log message ***
6295 1993-04-15 Richard Stallman <rms@gnu.org>
6297 * src/main.c, src/files.c:
6300 1993-04-15 Noah Friedman <friedman@gnu.org>
6302 * configure.in: entered into RCS
6304 * configure.in: *** empty log message ***
6306 * configure.in: New file.
6308 1993-04-14 Richard Stallman <rms@gnu.org>
6310 * Makefile.in: New file.
6312 1993-04-13 Richard Stallman <rms@gnu.org>
6314 * src/version.c: New file.
6316 1993-03-25 Richard Stallman <rms@gnu.org>
6318 * src/output.c: entered into RCS
6320 1992-09-25 Richard Stallman <rms@gnu.org>
6322 * configure.bat: entered into RCS
6324 1992-06-22 Richard Stallman <rms@gnu.org>
6326 * src/vmsgetargs.c: entered into RCS
6328 1992-06-22 Richard Stallman <rms@gnu.org>
6330 * doc/bison.rnh: entered into RCS
6332 1992-04-20 David J. MacKenzie <djm@gnu.org>
6334 * README: entered into RCS
6336 1992-01-22 Richard Stallman <rms@gnu.org>
6338 * src/machine.h: entered into RCS
6340 1991-12-21 Richard Stallman <rms@gnu.org>
6342 * src/lalr.c, src/closure.c:
6345 1991-12-20 Richard Stallman <rms@gnu.org>
6347 * src/state.h: entered into RCS
6349 1991-12-18 Richard Stallman <rms@gnu.org>
6351 * src/print.c, src/nullable.c, src/derives.c:
6354 1991-11-03 David J. MacKenzie <djm@gnu.org>
6356 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
6359 1988-09-09 Richard Stallman <rms@gnu.org>
6361 * src/bison.hairy: entered into RCS
6363 1987-12-16 Richard Stallman <rms@gnu.org>
6365 * REFERENCES: entered into RCS
6368 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6370 This file is part of GNU Autoconf.
6372 GNU Autoconf is free software; you can redistribute it and/or modify
6373 it under the terms of the GNU General Public License as published by
6374 the Free Software Foundation; either version 2, or (at your option)
6377 GNU Autoconf is distributed in the hope that it will be useful,
6378 but WITHOUT ANY WARRANTY; without even the implied warranty of
6379 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6380 GNU General Public License for more details.
6382 You should have received a copy of the GNU General Public License
6383 along with autoconf; see the file COPYING. If not, write to
6384 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6385 Boston, MA 02111-1307, USA.