]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
[bison.git] / ChangeLog
1 2002-05-05 Akim Demaille <akim@epita.fr>
2
3 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4 (GENERATE_MUSCLE_INSERT_TABLE): this.
5 (output_int_table, output_unsigned_int_table, output_short_table)
6 (output_token_number_table, output_item_number_table): Replace with...
7 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8 (muscle_insert_short_table, muscle_insert_token_number_table)
9 (muscle_insert_item_number_table): these.
10 Adjust all callers.
11 (prepare_tokens): Don't free `translations', since...
12 * src/reader.h, src/reader.c (grammar_free): do it.
13 Move to...
14 * src/gram.h, src/gram.c (grammar_free): here.
15 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16 b4_translate_max.
17
18
19 2002-05-05 Akim Demaille <akim@epita.fr>
20
21 * src/output.c (output_unsigned_int_table): New.
22 (prepare_rules): `i' is unsigned.
23 `prhs', `rline', `r2' are unsigned int.
24 Rename muscle `rhs_number_max' as `rhs_max'.
25 Output muscles `prhs_max', `rline_max', and `r2_max'.
26 Free rline and r1.
27 * data/bison.simple, data/bison.c++: Adjust to use these muscles
28 to compute types instead of constant types.
29 * tests/regression.at (Web2c Actions): Adjust.
30
31
32 2002-05-04 Akim Demaille <akim@epita.fr>
33
34 * src/symtab.h (SALIAS, SUNDEF): Rename as...
35 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
36 Adjust dependencies.
37 * src/output.c (token_definitions_output): Be sure not to output a
38 `#define 'a'' when fed with `%token 'a' "a"'.
39 * tests/regression.at (Token definitions): New.
40
41 2002-05-03 Paul Eggert <eggert@twinsun.com>
42
43 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
44 for K&R C.
45
46 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
47
48 * Makefile.am (SUBDIRS): Remove intl.
49 (EXTRA_DIST): Add config/config.rpath.
50
51 2002-05-03 Akim Demaille <akim@epita.fr>
52
53 * data/bison.simple (m4_if): Don't output empty enums.
54 And actually, output valid enum definitions :(.
55
56 2002-05-03 Akim Demaille <akim@epita.fr>
57
58 * configure.bat: Remove, completely obsolete.
59 * Makefile.am (EXTRA_DIST): Adjust.
60 Don't distribute config.rpath...
61 * config/Makefile.am (EXTRA_DIST): Do it.
62
63 2002-05-03 Akim Demaille <akim@epita.fr>
64
65 * configure.in (GETTEXT_VERSION): New.
66 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
67
68 2002-05-03 Akim Demaille <akim@epita.fr>
69
70 * data/bison.simple (b4_token_enum): New.
71 (b4_token_defines): Use it to output tokens both as #define and
72 enums.
73 Suggested by Paul Eggert.
74 * src/output.c (token_definitions_output): Don't output spurious
75 white spaces.
76
77 2002-05-03 Akim Demaille <akim@epita.fr>
78
79 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
80
81 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
82
83 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
84 Update the stack class, give a try to deque as the default container.
85
86 2002-05-02 Akim Demaille <akim@epita.fr>
87
88 * data/bison.simple (yyparse): Do not implement @$ = @1.
89 (YYLLOC_DEFAULT): Adjust to do it.
90 * doc/bison.texinfo (Location Default Action): Fix.
91
92 2002-05-02 Akim Demaille <akim@epita.fr>
93
94 * src/reader.c (parse_braces): Merge into...
95 (parse_action): this.
96
97 2002-05-02 Akim Demaille <akim@epita.fr>
98
99 * configure.in (ALL_LINGUAS): Remove.
100 * po/LINGUAS, hr.po: New.
101
102 2002-05-02 Akim Demaille <akim@epita.fr>
103
104 Remove the so called hairy (semantic) parsers.
105
106 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
107 * src/gram.h, src/gram.c (semantic_parser): Remove.
108 (rule_t): Remove the guard and guard_line members.
109 * src/lex.h (token_t): remove tok_guard.
110 * src/options.c (option_table): Remove %guard and %semantic_parser
111 support.
112 * src/output.c, src/output.h (guards_output): Remove.
113 (prepare): Adjust.
114 (token_definitions_output): Don't output the `T'
115 tokens (???).
116 (output_skeleton): Don't output the guards.
117 * src/files.c, src/files.c (attrsfile): Remove.
118 * src/reader.c (symbol_list): Remove the guard and guard_line
119 members.
120 Adjust dependencies.
121 (parse_guard): Remove.
122 * data/bison.hairy: Remove.
123 * doc/bison.texinfo (Environment Variables): Remove occurrences of
124 BISON_HAIRY.
125
126 2002-05-02 Akim Demaille <akim@epita.fr>
127
128 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
129 (parse_guard): Rename the formal argument `stack_offset' as
130 `rule_length', which is more readable.
131 Adjust callers.
132 (copy_at, copy_dollar): Instead of outputting the hard coded
133 values of $$, $n and so forth, output invocation to b4_lhs_value,
134 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
135 Note: this patch partially drops `semantic-parser' support: it
136 always does `rule_length - n', where semantic parsers ought to
137 always use `-n'.
138 * data/bison.simple, data/bison.c++ (b4_lhs_value)
139 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
140
141 2002-05-02 Akim Demaille <akim@epita.fr>
142
143 * configure.in (AC_INIT): Bump to 1.49b.
144 (AM_INIT_AUTOMAKE): Short invocation.
145
146 2002-05-02 Akim Demaille <akim@epita.fr>
147
148 Version 1.49a.
149
150 2002-05-01 Akim Demaille <akim@epita.fr>
151
152 * src/skeleton.h: Remove.
153
154 2002-05-01 Akim Demaille <akim@epita.fr>
155
156 * src/skeleton.h: Fix the #endif.
157 Reported by Magnus Fromreide.
158
159 2002-04-26 Paul Eggert <eggert@twinsun.com>
160
161 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
162 Define if we define YYSTYPE and YYLTYPE, respectively.
163 (YYCOPY): Fix [] quoting problem in the non-GCC case.
164
165 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
166
167 * src/scan-skel.l: Postprocess quadrigraphs.
168
169 * src/reader.c (copy_character): New function, used to output
170 single characters while replacing `[' and `]' with quadrigraphs, to
171 avoid troubles with M4 quotes.
172 (copy_comment): Output characters with copy_character.
173 (read_additionnal_code): Likewise.
174 (copy_string2): Likewise.
175 (copy_definition): Likewise.
176
177 * tests/calc.at: Exercise M4 quoting.
178
179 2002-04-25 Akim Demaille <akim@epita.fr>
180
181 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
182 between `!' and the command.
183 Reported by Paul Eggert.
184
185 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
186
187 * tests/calc.at: Exercise prologue splitting.
188
189 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
190 `b4_post_prologue' instead of `b4_prologue'.
191
192 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
193 muscles.
194 (output): Free pre_prologue_obstack and post_prologue_obstack.
195 * src/files.h, src/files.c (attrs_obstack): Remove.
196 (pre_prologue_obstack, post_prologue_obstack): New.
197 * src/reader.c (copy_definition): Add a parameter to specify the
198 obstack to fill, instead of using attrs_obstack unconditionally.
199 (read_declarations): Pass pre_prologue_obstack to copy_definition if
200 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
201
202 2002-04-23 Paul Eggert <eggert@twinsun.com>
203
204 * data/bison.simple: Remove unnecessary commentary and white
205 space differences from 1_29-branch.
206 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
207
208 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
209 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
210 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
211 constructors or destructors.
212
213 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
214
215 2002-04-23 Akim Demaille <akim@epita.fr>
216
217 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
218 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
219 location with columns.
220 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
221 All reported by Paul Eggert.
222
223 2002-04-22 Akim Demaille <akim@epita.fr>
224
225 * src/reduce.c (dump_grammar): Move to...
226 * src/gram.h, src/gram.c (grammar_dump): here.
227 Be sure to separate long item numbers.
228 Don't read the members of a rule's prec if its nil.
229
230 2002-04-22 Akim Demaille <akim@epita.fr>
231
232 * src/output.c (table_size, table_grow): New.
233 (MAXTABLE): Remove, replace uses with table_size.
234 (pack_vector): Instead of dying when the table is too big, grow it.
235
236 2002-04-22 Akim Demaille <akim@epita.fr>
237
238 * data/bison.simple (yyr1): Its type is that of a token number.
239 * data/bison.c++ (r1_): Likewise.
240 * tests/regression.at (Web2c Actions): Adjust.
241
242 2002-04-22 Akim Demaille <akim@epita.fr>
243
244 * src/reader.c (token_translations_init): 256 is now the default
245 value for the error token, i.e., it will be assigned another
246 number if the user assigned 256 to one of her tokens.
247 (reader): Don't force 256 to error.
248 * doc/bison.texinfo (Symbols): Adjust.
249 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
250 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
251 etc. instead of 10, 20, 30 (which was used to `jump' over error
252 (256) and undefined (2)).
253
254 2002-04-22 Akim Demaille <akim@epita.fr>
255
256 Propagate more token_number_t.
257
258 * src/gram.h (token_number_as_item_number)
259 (item_number_as_token_number): New.
260 * src/output.c (GENERATE_OUTPUT_TABLE): New.
261 Use it to create output_item_number_table and
262 output_token_number_table.
263 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
264 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
265 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
266 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
267
268 2002-04-22 Akim Demaille <akim@epita.fr>
269
270 * src/output.h, src/output.c (get_lines_number): Remove.
271
272 2002-04-19 Akim Demaille <akim@epita.fr>
273
274 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
275 as Lex/Flex'.
276 (Debugging): More details about enabling the debugging features.
277 (Table of Symbols): Describe $$, $n, @$, and @n.
278 Suggested by Tim Josling.
279
280 2002-04-19 Akim Demaille <akim@epita.fr>
281
282 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
283
284 2002-04-10 Akim Demaille <akim@epita.fr>
285
286 * src/system.h: Rely on HAVE_LIMITS_H.
287 Suggested by Paul Eggert.
288
289 2002-04-09 Akim Demaille <akim@epita.fr>
290
291 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
292 full stderr, and strip it according to the bison options, instead
293 of composing the error message from different bits.
294 This makes it easier to check for several error messages.
295 Adjust all the invocations.
296 Add an invocation exercising the error token.
297 Add an invocation demonstrating a stupid error message.
298 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
299 Adjust the tests.
300 Error message are for stderr, not stdout.
301
302 2002-04-09 Akim Demaille <akim@epita.fr>
303
304 * src/gram.h, src/gram.c (error_token_number): Remove, use
305 errtoken->number.
306 * src/reader.c (reader): Don't specify the user token number (2)
307 for $undefined, as it uselessly prevents using it.
308 * src/gram.h (token_number_t): Move to...
309 * src/symtab.h: here.
310 (state_t.number): Is a token_number_t.
311 * src/print.c, src/reader.c: Use undeftoken->number instead of
312 hard coded 2.
313 (Even though this 2 is not the same as above: the number of the
314 undeftoken remains being 2, it is its user token number which
315 might not be 2).
316 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
317 `user_token_number_max'.
318 Output `undef_token_number'.
319 * data/bison.simple, data/bison.c++: Use them.
320 Be sure to map invalid yylex return values to
321 `undef_token_number'. This saves us from gratuitous SEGV.
322
323 * tests/conflicts.at (Solved SR Conflicts)
324 (Unresolved SR Conflicts): Adjust.
325 * tests/regression.at (Web2c Actions): Adjust.
326
327 2002-04-08 Akim Demaille <akim@epita.fr>
328
329 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
330 Adding #line.
331 Remove the duplicate `typedefs'.
332 (RhsNumberType): Fix the declaration and various other typos.
333 Use __ofile__.
334 * data/bison.simple: Use __ofile__.
335 * src/scan-skel.l: Handle __ofile__.
336
337 2002-04-08 Akim Demaille <akim@epita.fr>
338
339 * src/gram.h (item_number_t): New, the type of item numbers in
340 RITEM. Note that it must be able to code symbol numbers as
341 positive number, and the negation of rule numbers as negative
342 numbers.
343 Adjust all dependencies (pretty many).
344 * src/reduce.c (rule): Remove this `short *' pointer: use
345 item_number_t.
346 * src/system.h (MINSHORT, MAXSHORT): Remove.
347 Include `limits.h'.
348 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
349 (shortcpy): Remove.
350 (MAXTABLE): Move to...
351 * src/output.c (MAXTABLE): here.
352 (prepare_rules): Use output_int_table to output rhs.
353 * data/bison.simple, data/bison.c++: Adjust.
354 * tests/torture.at (Big triangle): Move the limit from 254 to
355 500.
356 * tests/regression.at (Web2c Actions): Ajust.
357
358 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
359 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
360 passes, but produces negative #line number, once fixed, GCC is
361 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
362 C), it passes.
363 * src/state.h (state_h): Code input lines on ints, not shorts.
364
365 2002-04-08 Akim Demaille <akim@epita.fr>
366
367 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
368 and then the grammar.
369
370 2002-04-08 Akim Demaille <akim@epita.fr>
371
372 * src/system.h: No longer using strndup.
373
374 2002-04-07 Akim Demaille <akim@epita.fr>
375
376 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
377 * src/output.c (output_table_data): Return the longest number.
378 (prepare_tokens): Output `token_number_max').
379 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
380 New.
381 Use them to define yy_token_number_type/TokenNumberType.
382 Use this type for yytranslate.
383 * tests/torture.at (Big triangle): Push the limit from 124 to
384 253.
385 * tests/regression.at (Web2c Actions): Adjust.
386
387 2002-04-07 Akim Demaille <akim@epita.fr>
388
389 * tests/torture.at (Big triangle): New.
390 (GNU AWK Grammar, GNU Cim Grammar): Move to...
391 * tests/existing.at: here.
392
393 2002-04-07 Akim Demaille <akim@epita.fr>
394
395 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
396 nritems.
397 Adjust dependencies.
398
399 2002-04-07 Akim Demaille <akim@epita.fr>
400
401 * src/reader.c: Normalize increments to prefix form.
402
403 2002-04-07 Akim Demaille <akim@epita.fr>
404
405 * src/reader.c, symtab.c: Remove debugging code.
406
407 2002-04-07 Akim Demaille <akim@epita.fr>
408
409 Rename all the `bucket's as `symbol_t'.
410
411 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
412 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
413 * src/symtab.c, src/symtab.h (bucket): Rename as...
414 (symbol_t): this.
415 (symbol_list_new, bucket_check_defined, bucket_make_alias)
416 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
417 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
418 (buckets_new, buckets_free, buckets_do): Rename as...
419 (symbol_list_new, symbol_check_defined, symbol_make_alias)
420 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
421 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
422 (symbols_new, symbols_free, symbols_do): these.
423
424 2002-04-07 Akim Demaille <akim@epita.fr>
425
426 Use lib/hash for the symbol table.
427
428 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
429 EOF.
430 * src/lex.c (lex): Set the `number' member of new terminals.
431 * src/reader.c (bucket_check_defined, bucket_make_alias)
432 (bucket_check_alias_consistence, bucket_translation): New.
433 (reader, grammar_free, readgram, token_translations_init)
434 (packsymbols): Adjust.
435 (reader): Number the predefined tokens.
436 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
437 for predefined tokens.
438 * src/symtab.h (bucket): Remove all the hash table related
439 members.
440 * src/symtab.c (symtab): Replace by...
441 (bucket_table): this.
442 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
443 (buckets_new, buckets_do): New.
444
445 2002-04-07 Akim Demaille <akim@epita.fr>
446
447 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
448 (start_symbol, max_user_token_number, semantic_parser)
449 (error_token_number): Initialize.
450 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
451 Initialize.
452 (reader): Don't.
453 (errtoken, eoftoken, undeftoken, axiom): Extern.
454
455 2002-04-07 Akim Demaille <akim@epita.fr>
456
457 * src/gram.h (rule_s): prec and precsym are now pointers
458 to the bucket giving the priority/associativity.
459 Member `associativity' removed: useless.
460 * src/reduce.c, src/conflicts.c: Adjust.
461
462 2002-04-07 Akim Demaille <akim@epita.fr>
463
464 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
465 Properly escape the symbols' TAG when outputting them.
466
467 2002-04-07 Akim Demaille <akim@epita.fr>
468
469 * src/lalr.h (LA): Is a bitsetv, not bitset*.
470
471 2002-04-07 Akim Demaille <akim@epita.fr>
472
473 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
474 (LArule): this, which is an array to rule_t*.
475 * src/print.c, src/conflicts.c: Adjust.
476
477 2002-04-07 Akim Demaille <akim@epita.fr>
478
479 * src/gram.h (rule_t): Rename `number' as `user_number'.
480 `number' is a new member.
481 Adjust dependencies.
482 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
483
484 2002-04-07 Akim Demaille <akim@epita.fr>
485
486 As a result of the previous patch, it is no longer needed
487 to reorder ritem itself.
488
489 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
490
491 2002-04-07 Akim Demaille <akim@epita.fr>
492
493 Be sure never to walk through RITEMS, but use only data related to
494 the rules themselves. RITEMS should be banished.
495
496 * src/output.c (output_token_translations): Rename as...
497 (prepare_tokens): this.
498 In addition to `translate', prepare the muscles `tname' and
499 `toknum', which were handled by...
500 (output_rule_data): this.
501 Remove, and move the remainder of its outputs into...
502 (prepare_rules): this new routines, which also merges content from
503 (output_gram): this.
504 (prepare_rules): Be sure never to walk through RITEMS.
505 (output_stos): Rename as...
506 (prepare_stos): this.
507 (output): Always invoke prepare_states, after all, just don't use it
508 in the output if you don't need it.
509
510 2002-04-07 Akim Demaille <akim@epita.fr>
511
512 * src/LR0.c (new_state): Display `nstates' as the name of the
513 newly created state.
514 Adjust to initialize first_state and last_state if needed.
515 Be sure to distinguish the initial from the final state.
516 (new_states): Create the itemset of the initial state, and use
517 new_state.
518 * src/closure.c (closure): Now that the initial state has its
519 items properly set, there is no need for a special case when
520 creating `ruleset'.
521
522 As a result, now the rule 0, reducing to $axiom, is visible in the
523 outputs. Adjust the test suite.
524
525 * tests/conflicts.at (Solved SR Conflicts)
526 (Unresolved SR Conflicts): Adjust.
527 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
528 * tests/conflicts.at (S/R in initial): New.
529
530 2002-04-07 Akim Demaille <akim@epita.fr>
531
532 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
533 the RHS of the rules.
534 * src/output.c (output_gram): Likewise.
535
536 2002-04-07 Akim Demaille <akim@epita.fr>
537
538 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
539 bucket.
540 Adjust all dependencies.
541 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
542 `number' of the buckets too.
543 * src/gram.h: Include `symtab.h'.
544 (associativity): Move to...
545 * src/symtab.h: here.
546 No longer include `gram.h'.
547
548 2002-04-07 Akim Demaille <akim@epita.fr>
549
550 * src/gram.h, src/gram.c (rules_rhs_length): New.
551 (ritem_longest_rhs): Use it.
552 * src/gram.h (rule_t): `number' is a new member.
553 * src/reader.c (packgram): Set it.
554 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
555 the end of `rules', and count them out of `nrules'.
556 (reduce_output, dump_grammar): Adjust.
557 * src/print.c (print_grammar): It is no longer needed to check for
558 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
559 * tests/reduce.at (Reduced Automaton): New test.
560
561 2002-04-07 Akim Demaille <akim@epita.fr>
562
563 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
564 lacking `+ 1' to nrules, Bison reported as useless a token if it
565 was used solely to set the precedence of the last rule...
566
567 2002-04-07 Akim Demaille <akim@epita.fr>
568
569 * data/bison.c++, data/bison.simple: Don't output the current file
570 name in #line, to avoid useless diffs between two identical
571 outputs under different names.
572
573 2002-04-07 Akim Demaille <akim@epita.fr>
574
575 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
576 Normalize loops to using `< nrules + 1', not `<= nrules'.
577
578 2002-04-07 Akim Demaille <akim@epita.fr>
579
580 * TODO: Update.
581
582 2002-04-07 Akim Demaille <akim@epita.fr>
583
584 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
585 bucket.value as bucket.number.
586
587 2002-04-07 Akim Demaille <akim@epita.fr>
588
589 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
590 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
591 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
592 RHS, instead of being an index in RITEMS.
593
594 2002-04-04 Paul Eggert <eggert@twinsun.com>
595
596 * doc/bison.texinfo: Update copyright date.
597 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
598 (Symbols): Warn about running Bison in one character set,
599 but compiling and/or running in an incompatible one.
600 Warn about character code 256, too.
601
602 2002-04-03 Paul Eggert <eggert@twinsun.com>
603
604 * src/bison.data (YYSTACK_ALLOC): Depend on whether
605 YYERROR_VERBOSE is nonzero, not whether it is defined.
606
607 Merge changes from bison-1_29-branch.
608
609 2002-03-20 Paul Eggert <eggert@twinsun.com>
610
611 Merge fixes from Debian bison_1.34-1.diff.
612
613 * configure.in (AC_PREREQ): 2.53.
614
615 2002-03-20 Akim Demaille <akim@epita.fr>
616
617 * src/conflicts.c (log_resolution): Argument `resolution' is const.
618
619 2002-03-19 Paul Eggert <eggert@twinsun.com>
620
621 * src/bison.simple (YYCOPY): New macro.
622 (YYSTACK_RELOCATE): Use it.
623 Remove Type arg; no longer needed. All callers changed.
624 (yymemcpy): Remove; no longer needed.
625
626 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
627 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
628
629 2002-03-19 Akim Demaille <akim@epita.fr>
630
631 Test and fix the #line outputs.
632
633 * tests/atlocal.at (GCC): New.
634 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
635 (Prologue synch line, ,%union synch line, Postprologue synch line)
636 (Action synch line, Epilogue synch line): New tests.
637 * src/reader.c (parse_union_decl): Define the muscle stype_line.
638 * data/bison.simple, data/bison.c++: Use it.
639
640 2002-03-19 Akim Demaille <akim@epita.fr>
641
642 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
643 (Solved SR Conflicts, %expect not enough, %expect right)
644 (%expect too much): Move to...
645 * tests/conflicts.at: this new file.
646
647 2002-03-19 Akim Demaille <akim@epita.fr>
648
649 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
650 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
651 that we can move to enums for instance.
652 * src/output.c (token_definitions_output): Output a list of
653 `token-name, token-number' instead of the #define.
654 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
655
656 2002-03-14 Akim Demaille <akim@epita.fr>
657
658 Use Gettext 0.11.1.
659
660 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
661
662 * data/bison.c++: Make the user able to add members to the generated
663 parser by subclassing.
664
665 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
666
667 * src/reader.c (read_additionnal_code): `c' should be an integer, not
668 a character.
669 Reported by Nicolas Tisserand and Nicolas Burrus.
670
671 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
672
673 * src/reader.c: Warn about lacking semi-colons, do not complain.
674
675 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
676
677 * data/bison.c++: Remove a debug line.
678
679 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
680
681 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
682 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
683 provide a default implementation.
684
685 2002-03-04 Akim Demaille <akim@epita.fr>
686
687 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
688 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
689 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
690 * tests/semantic.at (Parsing Guards): Similarly.
691 * src/reader.at (readgram): Complain if the last rule is not ended
692 with a semi-colon.
693
694 2002-03-04 Akim Demaille <akim@epita.fr>
695
696 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
697 * src/closure.c: here.
698 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
699 RTC.
700 * src/warshall.h, src/warshall.c: Remove.
701 * tests/sets.at (Broken Closure): Adjust.
702
703 2002-03-04 Akim Demaille <akim@epita.fr>
704
705 * src/output.c (output_skeleton): tempdir is const.
706 bytes_read is unused.
707
708 2002-03-04 Akim Demaille <akim@epita.fr>
709
710 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
711 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
712 Update.
713 From Michael Hayes.
714
715 2002-03-04 Akim Demaille <akim@epita.fr>
716
717 * src/closure.c (closure): `r' is unused.
718
719 2002-03-04 Akim Demaille <akim@epita.fr>
720
721 * tests/sets.at (Broken Closure): Add the ending `;'.
722 * src/reader.at (readgram): Complain if a rule is not ended with a
723 semi-colon.
724
725 2002-03-04 Akim Demaille <akim@epita.fr>
726
727 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
728 (count_sr_conflicts): Use bitset_count.
729 * src/reduce.c (inaccessable_symbols): Ditto.
730 (bits_size): Remove.
731 * src/warshall.h, src/warshall.c: Convert to bitsetv.
732
733 2002-03-04 Akim Demaille <akim@epita.fr>
734
735 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
736 * src/reduce.c: Remove the `bitset_zero's following the
737 `bitset_create's, as now it is performed by the latter.
738
739 2002-03-04 Akim Demaille <akim@epita.fr>
740
741 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
742 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
743 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
744 latest sources from Michael.
745
746 2002-03-04 Akim Demaille <akim@epita.fr>
747
748 * src/output.c (output): Don't free the grammar.
749 * src/reader.c (grammar_free): New.
750 * src/main.c (main): Call it and don't free symtab here.
751
752 2002-03-04 Akim Demaille <akim@epita.fr>
753
754 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
755 before returning.
756 Reported by Benoit Perrot.
757
758 2002-03-04 Akim Demaille <akim@epita.fr>
759
760 Use bitset operations when possible, not loops over bits.
761
762 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
763 bitset_or.
764 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
765 * src/reduce.c (useless_nonterminals): Formatting changes.
766 * src/warshall.c (TC): Use bitset_or.
767
768 2002-03-04 Akim Demaille <akim@epita.fr>
769
770 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
771 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
772 Ditto.
773
774 2002-03-04 Akim Demaille <akim@epita.fr>
775
776 * src/lalr.c (F): Now a bitset*.
777 Adjust all dependencies.
778
779 2002-03-04 Akim Demaille <akim@epita.fr>
780
781 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
782 Adjust all dependencies.
783
784 2002-03-04 Akim Demaille <akim@epita.fr>
785
786 * src/L0.c, src/LR0.h (nstates): Be size_t.
787 Adjust comparisons (signed vs unsigned).
788 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
789 bitset*.
790 Adjust all dependencies.
791
792 2002-03-04 Akim Demaille <akim@epita.fr>
793
794 * src/closure.c (firsts): Now, also a bitset.
795 Adjust all dependencies.
796 (varsetsize): Remove, now unused.
797 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
798
799 2002-03-04 Akim Demaille <akim@epita.fr>
800
801 * src/print.c: Convert to use bitset.h, not hand coded iterations
802 over ints.
803
804 2002-03-04 Akim Demaille <akim@epita.fr>
805
806 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
807
808 2002-03-04 Akim Demaille <akim@epita.fr>
809
810 * src/closure.c (ruleset): Be a bitset.
811 (rulesetsize): Remove.
812
813 2002-03-04 Akim Demaille <akim@epita.fr>
814
815 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
816 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
817 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
818 * src/closure.c (fderives): Be an array of bitsets.
819
820 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
821
822 * data/bison.c++: Merge the two generated headers. Insert a copyright
823 notice in each output file.
824
825 2002-02-28 Akim Demaille <akim@epita.fr>
826
827 * data/bison.c++: Copy the prologue of bison.simple to fetch
828 useful M4 definitions, such as b4_header_guard.
829
830 2002-02-25 Akim Demaille <akim@epita.fr>
831
832 * src/getargs.c (version): Give the name of the authors, and use a
833 translator friendly scheme for the bgr
834 copyright notice.
835
836 2002-02-25 Akim Demaille <akim@epita.fr>
837
838 * src/output.c (header_output): Remove, now handled completely via
839 M4.
840
841 2002-02-25 Akim Demaille <akim@epita.fr>
842
843 * m4/m4.m4: New, from CVS Autoconf.
844 * configure.in: Invoke it.
845 * src/output.c (output_skeleton): Use its result instead of the
846 hard coded name.
847
848 2002-02-25 Akim Demaille <akim@epita.fr>
849
850 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
851 Fileutils 4.1.5.
852 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
853 * src/output.c (output_skeleton): Use mkstemp to create a real
854 temporary file.
855 Move the filling of `skeleton' and its muscle to...
856 (prepare): here.
857 (output): Move the definition of the prologue muscle to...
858 (prepare): here.
859 * src/system.h (DEFAULT_TMPDIR): New.
860
861 2002-02-14 Paul Eggert <eggert@twinsun.com>
862
863 Remove the support for C++ namespace cleanliness; it was
864 causing more problems than it was curing, since it didn't work
865 properly on some nonstandard C++ compilers. This can wait
866 for a proper C++ parser.
867
868 * NEWS: Document this.
869 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
870 of C++, as it's treated like C now.
871 * src/bison.simple (YYSTD): Remove.
872 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
873 Treat C++ just like Standard C instead of trying to support
874 namespace cleanliness.
875
876 2002-02-14 Akim Demaille <akim@epita.fr>
877
878 * tests/regression.at (else): Adjust to Andreas' change.
879
880 2002-02-14 Akim Demaille <akim@epita.fr>
881
882 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
883
884 2002-02-13 Andreas Schwab <schwab@suse.de>
885
886 * src/output.c (output_rule_data): Don't output NULL, it might
887 not be defined yet.
888
889 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
890
891 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
892 (Copyright notice): Update.
893
894 2002-02-11 Akim Demaille <akim@epita.fr>
895
896 * tests/regression.at (%nonassoc and eof): Don't include
897 nonportable headers.
898
899 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
900
901 * data/bison.c++: Correct error recovery. Make the user able to
902 initialize the starting location.
903
904 2002-02-07 Akim Demaille <akim@epita.fr>
905
906 * tests/input.at: New.
907
908 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
909
910 * data/bison.c++: Replace some direct m4 expansions by constants. Be
911 more consistent when naming methods and variables. Put preprocessor
912 directives around tables only needed for debugging.
913
914 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
915
916 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
917 C++ parsers.
918 (yy::b4_name::parse): Use print_.
919
920 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
921
922 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
923
924 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
925
926 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
927 C++ parsers.
928 (yy::b4_name::parse): Build verbose error messages, and use error_.
929
930 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
931
932 * data/bison.c++: Fix m4 quoting in comments.
933
934 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
935
936 * data/bison.c++: Adjust the parser code. Fix some muscles that were
937 not expanded by m4.
938
939 2002-02-05 Akim Demaille <akim@epita.fr>
940
941 * data/bison.c++: Adjust to the M4 back end.
942 More is certainly needed.
943
944 2002-02-05 Akim Demaille <akim@epita.fr>
945
946 Give a try to M4 as a back end.
947
948 * lib/readpipe.c: New, from wdiff.
949 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
950 BISON_HAIRY.
951 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
952 specific values. Now it is m4 that performs the lookup.
953 * src/parse-skel.y: Remove.
954 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
955 * src/output.c (actions_output, guards_output)
956 (token_definitions_output): No longer keeps track of the output
957 line number, hence remove the second argument.
958 (guards_output): Check against the guard member of a rule, not the
959 action member.
960 Adjust callers.
961 (output_skeleton): Don't look for the skeleton location, let m4 do
962 that.
963 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
964 file will be used.
965 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
966 (prepare): Given that for the time being changesyntax is not
967 usable in M4, rename the muscles using `-' to `_'.
968 Define `defines_flag', `output_parser_name' and `output_header_name'.
969 * src/output.h (actions_output, guards_output)
970 (token_definitions_output): Adjust prototypes.
971 * src/scan-skel.l: Instead of scanning the skeletons, it now
972 processes the output of m4: `__oline__' and `#output'.
973 * data/bison.simple: Adjust to be used by M4(sugar).
974 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
975 to date.
976 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
977 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
978 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
979 shamelessly stolen from CVS Autoconf.
980
981 2002-02-05 Akim Demaille <akim@epita.fr>
982
983 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
984 * configure.in: Check for the declarations of free and malloc.
985 * src/muscle_tab.c: Adjust.
986
987 2002-02-05 Akim Demaille <akim@epita.fr>
988
989 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
990 which have no values.
991
992 2002-02-05 Akim Demaille <akim@epita.fr>
993
994 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
995 * data/: here.
996
997 2002-01-29 Paul Eggert <eggert@twinsun.com>
998
999 * src/bison.simple (YYSIZE_T): Do not define merely because
1000 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1001 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1002
1003 2002-01-27 Akim Demaille <akim@epita.fr>
1004
1005 Fix `%nonassoc and eof'.
1006
1007 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1008 which were not properly copied! Replace
1009 memcpy (res->errs, src->errs, src->nerrs);
1010 with
1011 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1012 !!!
1013 * tests/regression.at (%nonassoc and eof): Adjust to newest
1014 Autotest: `.' is not in the PATH.
1015
1016 2002-01-27 Akim Demaille <akim@epita.fr>
1017
1018 * tests/sets.at (AT_EXTRACT_SETS): New.
1019 (Nullable): Use it.
1020 (Firsts): New.
1021
1022 2002-01-26 Akim Demaille <akim@epita.fr>
1023
1024 * tests/actions.at, tests/calc.at, tests/headers.at,
1025 * tests/torture.at: Adjust to the newest Autotest which no longer
1026 forces `.' in the PATH.
1027
1028 2002-01-25 Akim Demaille <akim@epita.fr>
1029
1030 * tests/regression.at (%nonassoc and eof): New.
1031 Suggested by Robert Anisko.
1032
1033 2002-01-24 Akim Demaille <akim@epita.fr>
1034
1035 Bison dumps core when trying to complain about broken input files.
1036 Reported by Cris van Pelt.
1037
1038 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1039 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1040 into...
1041 (Invalid inputs): Strengthen: exercise parse_percent_token.
1042
1043 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
1044
1045 * src/Makefile.am: Add bison.c++.
1046 * src/bison.c++: New skeleton.
1047
1048 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
1049
1050 * po/it.po: New.
1051
1052 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1053
1054 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1055
1056 2002-01-20 Marc Autret <marc@gnu.org>
1057
1058 * src/files.c (compute_output_file_names): Fix
1059
1060 2002-01-20 Marc Autret <marc@gnu.org>
1061
1062 * tests/output.at: New test.
1063 * src/files.c (compute_base_names): Don't map extensions when
1064 the YACC flag is set, use defaults.
1065 Reported by Evgeny Stambulchik.
1066
1067 2002-01-20 Marc Autret <marc@gnu.org>
1068
1069 * src/system.h: Need to define __attribute__ away for non-GCC
1070 compilers as well (i.e. the vendor C compiler).
1071 Suggested by Albert Chin-A-Young.
1072
1073 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1074
1075 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1076 canonical definition.
1077 * src/system.h: Use the canonical definition for PARAMS (avoids
1078 a conflict with the macro from lib/hash.h).
1079
1080 2002-01-11 Akim Demaille <akim@epita.fr>
1081
1082 * configure.in: Use AC_FUNC_STRNLEN.
1083 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
1084
1085 2002-01-09 Akim Demaille <akim@epita.fr>
1086
1087 * src/files.c, src/files.h (output_infix): New.
1088 (tab_extension): Remove.
1089 (compute_base_names): Compute the former, drop the latter.
1090 * src/output.c (prepare): Insert the muscles `output-infix', and
1091 `output-suffix'.
1092 * src/parse-skel.y (string, string.1): New.
1093 (section.header): Use it.
1094 (section.yacc): Remove.
1095 (prefix): Remove too.
1096 * src/scan-skel.l: Adjust.
1097 * src/bison.simple, src/bison.hairy: Adjust.
1098
1099 2002-01-09 Akim Demaille <akim@epita.fr>
1100
1101 * configure.in (WERROR_CFLAGS): Compute it.
1102 * src/Makefile.am (CFLAGS): Pass it.
1103 * tests/atlocal.in (CFLAGS): Idem.
1104 * src/files.c: Fix a few warnings.
1105 (get_extension_index): Remove, unused.
1106
1107 2002-01-08 Akim Demaille <akim@epita.fr>
1108
1109 * src/getargs.c (AS_FILE_NAME): New.
1110 (getargs): Use it to convert DOSish file names.
1111 * src/files.c (base_name): Rename as full_base_name to avoid
1112 clashes with `base_name ()'.
1113 (filename_split): New.
1114 (compute_base_names): N-th rewrite, using filename_split.
1115
1116 2002-01-08 Akim Demaille <akim@epita.fr>
1117
1118 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1119 New, stolen from the Fileutils 4.1.
1120 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1121 * configure.in: Check for the presence of memrchr, and of its
1122 prototype.
1123
1124 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1125
1126 * lib/hash.h (__P): Added definition for this macro.
1127 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1128 BUILT_SOURCES, to ensure they are generated first.
1129 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1130 %error-verbose to allow bootstrapping with bison 1.30x.
1131
1132 2002-01-06 Akim Demaille <akim@epita.fr>
1133
1134 * src/reader.c (parse_braces): Don't fetch the next char, the
1135 convention is to fetch on entry.
1136 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1137 'switch' without a following semicolon.
1138 * tests/regression.at (braces parsing): New.
1139
1140 2002-01-06 Akim Demaille <akim@epita.fr>
1141
1142 Bison is dead wrong in its RR conflict reports.
1143
1144 * tests/torture.at (GNU Cim Grammar): New.
1145 * src/conflicts.c (count_rr_conflicts): Fix.
1146
1147 2002-01-06 Akim Demaille <akim@epita.fr>
1148
1149 Creating package.m4 from configure.ac causes too many problems.
1150
1151 * tests/Makefile.am (package.m4): Create it by hand,
1152 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1153
1154 2002-01-06 Akim Demaille <akim@epita.fr>
1155
1156 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1157 skeleton.h.
1158
1159 2002-01-04 Paul Eggert <eggert@twinsun.com>
1160
1161 * doc/bison.texinfo (Debugging):
1162 Remove YYSTDERR; it's no longer defined or used.
1163 Also, s/cstdio.h/cstdio/.
1164
1165 2002-01-03 Akim Demaille <akim@epita.fr>
1166
1167 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1168
1169 2002-01-03 Akim Demaille <akim@epita.fr>
1170
1171 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1172 tracing code to --trace, wait for a better --trace option, with
1173 args.
1174
1175 2002-01-03 Akim Demaille <akim@epita.fr>
1176
1177 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1178 The ISO C++ standard is extremely clear about it: stderr is
1179 considered a macro, not a regular symbol (see table 94 `Header
1180 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1181 Therefore std:: does not apply to it. It still does with fprintf.
1182 Also, s/cstdio.h/cstdio/.
1183
1184 2002-01-03 Akim Demaille <akim@epita.fr>
1185
1186 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1187 for non system headers.
1188
1189 2002-01-02 Akim Demaille <akim@epita.fr>
1190
1191 Equip the skeleton chain with location tracking, runtime trace,
1192 pure parser and scanner.
1193
1194 * src/parse-skel.y: Request a pure parser, locations, and prefix
1195 renaming.
1196 (%union): Having several members with the same type does not help
1197 type mismatches, simplify.
1198 (YYPRINT, yyprint): New.
1199 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1200 (skel_error): this.
1201 Handle locations.
1202 * src/scan-skel.l: Adjust to these changes.
1203 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1204 (LOCATION_PRINT, skel_control_t): New.
1205
1206 2001-12-30 Akim Demaille <akim@epita.fr>
1207
1208 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1209 replace `gb' with BLANKS.
1210 * src/scan-skel.l: Adjust.
1211
1212 2001-12-30 Akim Demaille <akim@epita.fr>
1213
1214 * src/system.h: We don't need nor want bcopy.
1215 Throw away MS-DOS crap: we don't need getpid.
1216 * configure.in: We don't need strndup. It was even causing
1217 problems: because Flex includes the headers *before* us,
1218 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1219 not visible.
1220 * lib/xstrndup.c: New.
1221 * src/scan-skel.l: Use it.
1222 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1223 * src/parse-skel.y: Use %directives instead of #defines.
1224
1225 2001-12-30 Akim Demaille <akim@epita.fr>
1226
1227 * src/skeleton.h: New.
1228 * src/output.c (output_parser, output_master_parser): Remove, dead
1229 code.
1230 * src/output.h (get_lines_number, actions_output, guards_output)
1231 (token_definitions_output): Prototype them.
1232 * src/parse-skel.y: Add the license notice.
1233 Include output.h and skeleton.h.
1234 (process_skeleton): Returns void, and takes a single parameter.
1235 * src/scan-skel.l: Add the license notice.
1236 Include skeleton.h.
1237 Don't use %option yylineno: it seems that then Flex imagines
1238 REJECT has been used, and therefore it won't reallocate its
1239 buffers (which makes no other sense to me than a bug). It results
1240 in warnings for `unused: yy_flex_realloc'.
1241
1242 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
1243
1244 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1245 (MUSCLE_INSERT_PREFIX): ...to there.
1246 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1247 (MUSCLE_INSERT_PREFIX): Move from here...
1248
1249 * src/bison.hairy: Add a section directive. Put braces around muscle
1250 names. This parser skeleton is still broken, but Bison should not
1251 choke on a bad muscle 'syntax'.
1252 * src/bison.simple: Add a section directive. Put braces around muscle
1253 names.
1254
1255 * src/files.h (strsuffix, stringappend): Add declarations.
1256 (tab_extension): Add declaration.
1257 (short_base_name): Add declaration.
1258
1259 * src/files.c (strsuffix, stringappend): No longer static. These
1260 functions are used in the skeleton parser.
1261 (tab_extension): New.
1262 (compute_base_names): Use the computations done in this function
1263 to guess if the generated parsers should have '.tab' in their
1264 names.
1265 (short_base_name): No longer static.
1266
1267 * src/output.c (output_skeleton): New.
1268 (output): Disable call to output_master_parser, and give a try to
1269 a new skeleton handling system.
1270 (guards_output, actions_output): No longer static.
1271 (token_definitions_output, get_lines_number): No longer static.
1272
1273 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1274
1275 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1276 parse-skel.y.
1277
1278 * src/parse-skel.y: New file.
1279 * src/scan-skel.l: New file.
1280
1281 2001-12-29 Akim Demaille <akim@epita.fr>
1282
1283 %name-prefix is broken.
1284
1285 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1286 Adjust all dependencies.
1287 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1288 %name-prefix.
1289
1290 Renaming yylval but not yylloc is not consistent. Now we do.
1291
1292 * src/bison.simple: Prefix yylloc if used.
1293 * doc/bison.texinfo (Decl Summary): Document that.
1294
1295 2001-12-29 Akim Demaille <akim@epita.fr>
1296
1297 * doc/bison.texinfo: Promote `%long-directive' over
1298 `%long_directive'.
1299 Remove all references to fixed-output-files, yacc is enough.
1300
1301 2001-12-29 Akim Demaille <akim@epita.fr>
1302
1303 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1304 user prologue. These are defaults.
1305 * tests/actions.at (Mid-rule actions): Make sure the user can
1306 define YYDEBUG and YYERROR_VERBOSE.
1307
1308 2001-12-29 Akim Demaille <akim@epita.fr>
1309
1310 * src/output.c (header_output): Don't forget to export YYLTYPE and
1311 yylloc.
1312 * tests/headers.at (export YYLTYPE): New, make sure it does.
1313 * tests/regression.at (%union and --defines, Invalid CPP headers):
1314 Move to...
1315 * tests/headers.at: here.
1316
1317 2001-12-29 Akim Demaille <akim@epita.fr>
1318
1319 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1320
1321 2001-12-29 Akim Demaille <akim@epita.fr>
1322
1323 * tests/actions.at (Mid-rule actions): Output on a single line
1324 instead of several.
1325
1326 2001-12-29 Akim Demaille <akim@epita.fr>
1327
1328 * doc/bison.texinfo: Formatting changes.
1329
1330 2001-12-29 Akim Demaille <akim@epita.fr>
1331
1332 Don't store the token defs in a muscle, just be ready to output it
1333 on command. Now possible via `symbols'. Fixes a memory leak.
1334
1335 * src/output.c (token_definitions_output): New.
1336 (output_parser, header_output): Use it.
1337 * src/reader.c (symbols_save): Remove.
1338
1339 2001-12-29 Akim Demaille <akim@epita.fr>
1340
1341 * src/bison.simple: Do not provide a default for YYSTYPE and
1342 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1343 default.
1344
1345 2001-12-29 Akim Demaille <akim@epita.fr>
1346
1347 Mid-rule actions are simply... ignored!
1348
1349 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1350 the empty-rule associated to the dummy symbol, not to the host
1351 rule.
1352 * tests/actions.at (Mid-rule actions): New.
1353
1354 2001-12-29 Akim Demaille <akim@epita.fr>
1355
1356 Memory leak.
1357
1358 * src/reader.c (reader): Free grammar.
1359
1360 2001-12-29 Akim Demaille <akim@epita.fr>
1361
1362 Memory leak.
1363
1364 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1365 since it allocates it for each state, although only one is needed.
1366 (allocate_storage): Do it here.
1367
1368 2001-12-29 Akim Demaille <akim@epita.fr>
1369
1370 * src/options.h, src/options.c (create_long_option_table): Rename
1371 as...
1372 (long_option_table_new): this, with a clearer prototype.
1373 (percent_table): Remove, unused,
1374 * src/getargs.c (getargs): Adjust.
1375
1376 2001-12-29 Akim Demaille <akim@epita.fr>
1377
1378 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1379 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1380 as states.
1381
1382 2001-12-29 Akim Demaille <akim@epita.fr>
1383
1384 * src/lalr.c (build_relations): Rename `states' as `states1'.
1385 Sorry, I don't understand exactly what it is, no better name...
1386
1387 2001-12-29 Akim Demaille <akim@epita.fr>
1388
1389 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1390 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1391 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1392 as rules.
1393
1394 2001-12-29 Akim Demaille <akim@epita.fr>
1395
1396 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1397 ago.
1398
1399 2001-12-29 Akim Demaille <akim@epita.fr>
1400
1401 * src/reader.c, src/reader.h (user_toknums): Remove.
1402 Adjust all users to use symbols[i]->user_token_number.
1403
1404 2001-12-29 Akim Demaille <akim@epita.fr>
1405
1406 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1407 Adjust all users to use symbols[i]->prec or ->assoc.
1408
1409 2001-12-29 Akim Demaille <akim@epita.fr>
1410
1411 * src/reader.c, src/reader.h (tags): Remove.
1412 Adjust all users to use symbols[i]->tag.
1413
1414 2001-12-29 Akim Demaille <akim@epita.fr>
1415
1416 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1417 and rule_table.
1418 * src/reader.c (packsymbols): Fill this table.
1419 Drop sprec.
1420 * src/conflicts.c (resolve_sr_conflict): Adjust.
1421 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1422 single table.
1423 Use symbols[i]->tag instead of tags[i].
1424
1425 2001-12-29 Akim Demaille <akim@epita.fr>
1426
1427 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1428 In addition, put a comment in there, to replace...
1429 * tests/regression.at (%union and C comments): Remove.
1430
1431 2001-12-29 Akim Demaille <akim@epita.fr>
1432
1433 * tests/regression.at (Web2c Actions): Blindly move the actual
1434 output as expected output. The contents *seem* right to me, but I
1435 can't pretend reading perfectly parser tables... Nonetheless, all
1436 the other tests pass correctly, the table look OK, even though the
1437 presence of `$axiom' is to be noted: AFAICS it is useless (but
1438 harmless).
1439
1440 2001-12-29 Akim Demaille <akim@epita.fr>
1441
1442 * src/reader.c (readgram): Don't add the rule 0 if there were no
1443 rules read. In other words, add it _after_ having performed
1444 grammar sanity checks.
1445 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1446
1447 2001-12-29 Akim Demaille <akim@epita.fr>
1448
1449 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1450 visible, and some states have now a different number.
1451
1452 2001-12-29 Akim Demaille <akim@epita.fr>
1453
1454 * src/reader.c (readgram): Bind the initial rule's lineno to that
1455 of the first rule.
1456 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1457 (Solved SR Conflicts): Adjust rule 0's line number.
1458
1459 2001-12-29 Akim Demaille <akim@epita.fr>
1460
1461 Fix the `GAWK Grammar' failure.
1462
1463 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1464 the reductions of the first state which was mistakenly confused
1465 with the final state because precisely final_state was initialized
1466 to 0.
1467 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1468 now noticed by Bison.
1469 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1470 have a reduction on $default.
1471
1472 2001-12-29 Akim Demaille <akim@epita.fr>
1473
1474 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1475 rule line numbers.
1476 * src/closure.c (print_closure): Likewise.
1477 * src/derives.c (print_derives): Likewise.
1478 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1479 now.
1480
1481 2001-12-29 Akim Demaille <akim@epita.fr>
1482
1483 * src/lalr.c (lookaheads_print): New.
1484 (lalr): Call it when --trace-flag.
1485 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1486 are dumped.
1487
1488 2001-12-29 Akim Demaille <akim@epita.fr>
1489
1490 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1491 when walking through ritem, even via rule->rhs.
1492 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1493 (useful_production, useless_nonterminals): Likewise.
1494 (reduce_grammar_tables): Likewise, plus update nritems.
1495 * src/nullable.c (set_nullable): Likewise.
1496 * src/lalr.c (build_relations): Likewise.
1497 * tests/sets.at (Nullable): Adjust.
1498 Fortunately, now, the $axiom is no longer nullable.
1499
1500 2001-12-29 Akim Demaille <akim@epita.fr>
1501
1502 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1503 the 0-sentinel.
1504 * src/gram.c (ritem_longest_rhs): Likewise.
1505 * src/reduce.c (nonterminals_reduce): Likewise.
1506 * src/print_graph.c (print_graph): Likewise.
1507 * src/output.c (output_rule_data): Likewise.
1508 * src/nullable.c (set_nullable): Likewise.
1509
1510 2001-12-29 Akim Demaille <akim@epita.fr>
1511
1512 * src/output.c: Comment changes.
1513
1514 2001-12-27 Paul Eggert <eggert@twinsun.com>
1515
1516 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1517 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1518 Sparc, as they were causing more porting problems than the
1519 (minor) performance improvement was worth.
1520
1521 Also, catch up with 1.31's YYSTD.
1522
1523 2001-12-27 Akim Demaille <akim@epita.fr>
1524
1525 * src/output.c (output_gram): Rely on nritems, not the
1526 0-sentinel. See below.
1527 Use -1 as separator, not 0.
1528 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1529 Rely on -1 as separator in yyrhs, instead of 0.
1530 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1531 twice `Now at end of input', therefore there are two lines less to
1532 expect.
1533
1534 2001-12-27 Akim Demaille <akim@epita.fr>
1535
1536 * tests/regression.at (Unresolved SR Conflicts):
1537 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1538 below.
1539
1540 2001-12-27 Akim Demaille <akim@epita.fr>
1541
1542 * src/LR0.c (new_state): Recognize the final state by the fact it
1543 is reached by eoftoken.
1544 (insert_start_shifting_state, insert_eof_shifting_state)
1545 (insert_accepting_state, augment_automaton): Remove, since now
1546 these states are automatically computed from the initial state.
1547 (generate_states): Adjust.
1548 * src/print.c: When reporting a rule number to the user, substract
1549 1, so that the axiom rule is rule 0, and the first user rule is 1.
1550 * src/reduce.c: Likewise.
1551 * src/print_graph.c (print_core): For the time being, just as for
1552 the report, depend upon --trace-flags to dump the full set of
1553 items.
1554 * src/reader.c (readgram): Once the grammar read, insert the rule
1555 0: `$axiom: START-SYMBOL $'.
1556 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1557 number of the states has changed (the final state is no longer
1558 necessarily the last), catch up.
1559
1560 2001-12-27 Akim Demaille <akim@epita.fr>
1561
1562 Try to make the use of the eoftoken valid. Given that its value
1563 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1564 is used instead of > 0 where appropriate, (ii), depend upon nritems
1565 instead of the 0-sentinel.
1566
1567 * src/gram.h, src/gram.c (nritems): New.
1568 Expected to be duplication of nitems, but for the time being...
1569 * src/reader.c (packgram): Assert nritems and nitems are equal.
1570 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1571 * src/closure.c (print_closure, print_fderives): Likewise.
1572 * src/gram.c (ritem_print): Likewise.
1573 * src/print.c (print_core, print_grammar): Likewise.
1574 * src/print_graph.c: Likewise.
1575
1576 2001-12-27 Akim Demaille <akim@epita.fr>
1577
1578 * src/main.c (main): If there are complains after grammar
1579 reductions, then output the report anyway if requested, then die.
1580 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1581 * src/reader.c (eoftoken): New.
1582 (parse_token_decl): If the token being defined has value `0', it
1583 is the eoftoken.
1584 (packsymbols): No longer hack `tags' to insert `$' by hand.
1585 Be sure to preserve the value of the eoftoken.
1586 (reader): Make sure eoftoken is defined.
1587 Initialize nsyms to 0: now eoftoken is created just like the others.
1588 * src/print.c (print_grammar): Don't special case the eof token.
1589 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1590 lie anyway, albeit pleasant.
1591 * tests/calc.at: Exercise error messages with eoftoken.
1592 Change the grammar so that empty input is invalid.
1593 Adjust expectations.
1594 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1595
1596 2001-12-27 Akim Demaille <akim@epita.fr>
1597
1598 * configure.in: Check the protos of strchr ans strspn.
1599 Replace strchr if needed.
1600 * src/system.h: Provide the protos of strchr, strspn and memchr if
1601 missing.
1602 * lib/strchr.c: New.
1603 * src/reader.c (symbols_save): Use strchr.
1604
1605 2001-12-27 Akim Demaille <akim@epita.fr>
1606
1607 * src/print.c, src/print_graph.c (escape): New.
1608 Use it to quote the TAGS outputs.
1609 * src/print_graph.c (print_state): Now errors are in red, and
1610 reductions in green.
1611 Prefer high to wide: output the state number on a line of its own.
1612
1613 2001-12-27 Akim Demaille <akim@epita.fr>
1614
1615 * src/state.h, src/state.c (reductions_new): New.
1616 * src/LR0.c (set_state_table): Let all the states have a
1617 `reductions', even if reduced to 0.
1618 (save_reductions): Adjust.
1619 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1620 * src/print.c (print_reductions, print_actions): Adjust.
1621 * src/output.c (action_row): Adjust.
1622
1623 2001-12-27 Akim Demaille <akim@epita.fr>
1624
1625 * src/state.h, src/state.c (errs_new, errs_dup): New.
1626 * src/LR0.c (set_state_table): Let all the states have an errs,
1627 even if reduced to 0.
1628 * src/print.c (print_errs, print_reductions): Adjust.
1629 * src/output.c (output_actions, action_row): Adjust.
1630 * src/conflicts.c (resolve_sr_conflict): Adjust.
1631
1632 2001-12-27 Akim Demaille <akim@epita.fr>
1633
1634 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1635
1636 2001-12-27 Akim Demaille <akim@epita.fr>
1637
1638 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1639 * src/print.c: here.
1640 (lookaheadset, shiftset): New, used as additional storage by
1641 print_reductions.
1642 (print_results): Adjust.
1643 (print_shifts, print_gotos, print_errs): New, extracted from...
1644 (print_actions): here.
1645 * src/print_graph.c (print_actions): Remove dead code.
1646
1647 2001-12-27 Akim Demaille <akim@epita.fr>
1648
1649 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1650 `$n' and `@n'.
1651
1652 2001-12-27 Akim Demaille <akim@epita.fr>
1653
1654 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1655 (build_relations): Adjust.
1656
1657 2001-12-27 Akim Demaille <akim@epita.fr>
1658
1659 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1660 duplication.
1661
1662 2001-12-27 Akim Demaille <akim@epita.fr>
1663
1664 * src/reader.c (packgram): Catch nitems overflows.
1665
1666 2001-12-27 Akim Demaille <akim@epita.fr>
1667
1668 * src/files.c, src/files.h (guard_obstack): Remove.
1669 * src/output.c (output): Adjust.
1670 * src/reader.c (parse_braces): New, factoring...
1671 (copy_action, copy_guard): these two which are renamed as...
1672 (parse_action, parse_guard): these.
1673 As a voluntary consequence, using braces around guards is now
1674 mandatory.
1675
1676 2001-12-27 Akim Demaille <akim@epita.fr>
1677
1678 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1679 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1680 members.
1681 (symbol_list_new): Adjust.
1682 (copy_action): action_line is the first line, not the last.
1683 (copy_guard): Just as for actions, store the `action' only, not
1684 the switch/case/break flesh.
1685 Don't parse the user action that might follow the guard, let...
1686 (readgram): do it, i.e., now, there can be an action after a
1687 guard.
1688 In other words the guard is just explicitly optional.
1689 (packgram): Adjust.
1690 * src/output.c (guards_output): New.
1691 (output_parser): Call it when needed.
1692 (output): Also free the guard and attrs obstacks.
1693 * src/files.c, src/files.h (obstack_save): Remove.
1694 (output_files): Remove.
1695 As a result, if one needs the former `.act' file, using an
1696 appropriate skeleton which requires actions and guards is now
1697 required.
1698 * src/main.c (main): Adjust.
1699 * tests/semantic.at: New.
1700 * tests/regression.at: Use `input.y' as input file name.
1701 Avoid 8+3 problems by requiring input.c when the test needs the
1702 parser.
1703
1704 2001-12-27 Akim Demaille <akim@epita.fr>
1705
1706 * src/reader.c (symbol_list_new): Be sure to initialize all the
1707 fields.
1708
1709 2001-12-27 Akim Demaille <akim@epita.fr>
1710
1711 All the hacks using a final pseudo state are now useless.
1712
1713 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1714 * src/lalr.c (nLA): New.
1715 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1716 instead of lookaheadsp from the pseudo state (nstate + 1).
1717
1718 2001-12-27 Akim Demaille <akim@epita.fr>
1719
1720 * src/output.c (action_row, token_actions): Use a state_t instead
1721 of a integer, and nlookaheads instead of the following state's
1722 lookaheadsp.
1723
1724 2001-12-27 Akim Demaille <akim@epita.fr>
1725
1726 * src/conflicts.c (log_resolution, flush_shift)
1727 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1728 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1729 (conflicts_print, print_reductions): Use a state_t instead of an
1730 integer when referring to a state.
1731 As much as possible, depend upon nlookaheads, instead of the
1732 `lookaheadsp' member of the following state (since lookaheads of
1733 successive states are successive, the difference between state n + 1
1734 and n served as the number of lookaheads for state n).
1735 * src/lalr.c (add_lookback_edge): Likewise.
1736 * src/print.c (print_core, print_actions, print_state)
1737 (print_results): Likewise.
1738 * src/print_graph.c (print_core, print_actions, print_state)
1739 (print_graph): Likewise.
1740 * src/conflicts.h: Adjust.
1741
1742 2001-12-27 Akim Demaille <akim@epita.fr>
1743
1744 * src/bison.hairy: Formatting/comment changes.
1745 ANSIfy.
1746 Remove `register' indications.
1747 Add plenty of `static'.
1748
1749 2001-12-27 Akim Demaille <akim@epita.fr>
1750
1751 * src/output.c (prepare): Drop the muscle `ntbase' which
1752 duplicates ntokens.
1753 * src/bison.simple: Formatting/comment changes.
1754 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1755 is an undocumented synonym.
1756
1757 2001-12-22 Akim Demaille <akim@epita.fr>
1758
1759 * src/output.c (output_table_data): Change the prototype to use
1760 `int' for array ranges: some invocations do pass an int, not a
1761 short.
1762 Reported by Wayne Green.
1763
1764 2001-12-22 Akim Demaille <akim@epita.fr>
1765
1766 Some actions of web2c.y are improperly triggered.
1767 Reported by Mike Castle.
1768
1769 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1770 * tests/regression.at (Web2c): Rename as...
1771 (Web2c Report): this.
1772 (Web2c Actions): New.
1773
1774 2001-12-22 Akim Demaille <akim@epita.fr>
1775
1776 Reductions in web2c.y are improperly reported.
1777 Reported by Mike Castle.
1778
1779 * src/conflicts.c (print_reductions): Fix.
1780 * tests/regression.at (Web2c): New.
1781
1782 2001-12-18 Akim Demaille <akim@epita.fr>
1783
1784 Some host fail on `assert (!"foo")', which expands to
1785 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1786 Reported by Nelson Beebee.
1787
1788 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1789 `#define it_succeeded 0' and `assert (it_succeeded)'.
1790
1791 2001-12-17 Marc Autret <autret_m@epita.fr>
1792
1793 * src/bison.simple: Don't hard code the skeleton line and filename.
1794 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1795 New line counter 'skeleton_line' (skeleton-line muscle).
1796
1797 2001-12-17 Paul Eggert <eggert@twinsun.com>
1798
1799 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1800 YYDEBUG must be defined to a nonzero value.
1801
1802 * src/bison.simple (yytname): Do not assume that the user defines
1803 YYDEBUG to a properly parenthesized expression.
1804
1805 2001-12-17 Akim Demaille <akim@epita.fr>
1806
1807 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1808 nlookaheads is a new member.
1809 Adjust all users.
1810 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1811 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1812 state.
1813
1814 2001-12-17 Akim Demaille <akim@epita.fr>
1815
1816 * src/files.h, src/files.c (open_files, close_files): Remove.
1817 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1818 let...
1819 * src/reader.c (reader): Do it.
1820
1821 2001-12-17 Akim Demaille <akim@epita.fr>
1822
1823 * src/conflicts.c (print_reductions): Formatting changes.
1824
1825 2001-12-17 Akim Demaille <akim@epita.fr>
1826
1827 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1828 (flush_reduce): New.
1829 (resolve_sr_conflict): Adjust.
1830
1831 2001-12-17 Akim Demaille <akim@epita.fr>
1832
1833 * src/output.c (output_obstack): Be static and rename as...
1834 (format_obstack): this, to avoid any confusion with files.c's
1835 output_obstack.
1836 * src/reader.h (muscle_obstack): Move to...
1837 * src/output.h: here, since it's defined in output.c.
1838
1839 2001-12-17 Akim Demaille <akim@epita.fr>
1840
1841 * src/output.c (action_row, save_column, default_goto)
1842 (sort_actions, matching_state, pack_vector): Better variable
1843 locality.
1844
1845 2001-12-17 Akim Demaille <akim@epita.fr>
1846
1847 * src/output.c: Various formatting changes.
1848
1849 2001-12-17 Akim Demaille <akim@epita.fr>
1850
1851 * src/files.c (output_files): Free the output_obstack.
1852 * src/main.c (main): Call print and print_graph conditionally.
1853 * src/print.c (print): Work unconditionally.
1854 * src/print_graph.c (print_graph): Work unconditionally.
1855 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1856
1857 2001-12-16 Marc Autret <autret_m@epita.fr>
1858
1859 * src/output.c (actions_output): Fix. When we use %no-lines,
1860 there is one less line per action.
1861
1862 2001-12-16 Marc Autret <autret_m@epita.fr>
1863
1864 * src/bison.simple: Remove a useless #line directive.
1865 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1866 * src/output.c (get_lines_number): New.
1867 (output_parser): Adjust, now takes care about the lines of a
1868 output muscles.
1869 Fix line numbering.
1870 (actions_output): Computes the number of lines taken by actions.
1871 (output_master_parser): Insert new skeleton which is the name of
1872 the output parser file name.
1873
1874 2001-12-15 Marc Autret <autret_m@epita.fr>
1875
1876 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1877
1878 2001-12-15 Marc Autret <autret_m@epita.fr>
1879
1880 * src/output.c (output_gram): Keep track of the hairy one.
1881
1882 2001-12-15 Akim Demaille <akim@epita.fr>
1883
1884 Make `make distcheck' work.
1885
1886 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1887 system.h which uses libgettext.h.
1888
1889 2001-12-15 Akim Demaille <akim@epita.fr>
1890
1891 * src/nullable.c (set_nullable): Useless rules must be skipped,
1892 otherwise, since we range over their symbols, we might look at a
1893 nonterminal which no longer ``exists'', i.e., it is not counted in
1894 `nvars', hence we overflow our arrays.
1895
1896 2001-12-15 Akim Demaille <akim@epita.fr>
1897
1898 The header can also be produced directly, without any obstack!
1899 Yahoo!
1900
1901 * src/files.c, src/files.h (defines_obstack): Remove.
1902 (compute_header_macro): Global.
1903 (defines_obstack_save): Remove.
1904 * src/reader.c (parse_union_decl): No longer output to
1905 defines_obstack: its content can be found in the `stype' muscle
1906 anyway.
1907 (output_token_translations): Merge into...
1908 (symbols_output): this.
1909 Rename as...
1910 (symbols_save): this.
1911 (reader): Adjust.
1912 * src/output.c (header_output): New.
1913 (output): Call it.
1914
1915 2001-12-15 Akim Demaille <akim@epita.fr>
1916
1917 * src/reader.c (parse_union_decl): Instead of handling two obstack
1918 simultaneously, use one to define the `stype' muscle, and use the
1919 value of the latter to fill defines_obstack.
1920 (copy_comment): Remove.
1921 (copy_comment2): Work for a single obstack.
1922 Rename as...
1923 (copy_comment): this.
1924
1925 2001-12-15 Akim Demaille <akim@epita.fr>
1926
1927 * src/lex.c, src/lex.h (xgetc): No longer static.
1928 * src/reader.c (parse_union_decl): Revamp.
1929
1930 2001-12-15 Akim Demaille <akim@epita.fr>
1931
1932 Still making progress in separating Bison into (i) input, (ii)
1933 process, (iii) output: now we can directly output the parser file
1934 without using table_obstack at all.
1935
1936 * src/files.c, src/files.h (table_obstack): Bye bye.
1937 (parser_file_name): New.
1938 * src/files.c (compute_output_file_names): Compute it.
1939 * src/output.c (actions_output, output_parser)
1940 (output_master_parser): To a file instead of an obstack.
1941
1942 2001-12-15 Akim Demaille <akim@epita.fr>
1943
1944 Attach actions to rules, instead of pre-outputting them to
1945 actions_obstack.
1946
1947 * src/gram.h (rule_t): action and action_line are new members.
1948 * src/reader.c (symbol_list): Likewise.
1949 (copy_action): Save the actions within the rule.
1950 (packgram): Save them in rule_table.
1951 * src/output.c (actions_output): New.
1952 (output_parser): Use it on `%%actions'.
1953 (output_rule_data): Don't free rule_table.
1954 (output): Do it.
1955 (prepare): Don't save the `action' muscle.
1956 * src/bison.simple: s/%%action/%%actions/.
1957
1958 2001-12-15 Akim Demaille <akim@epita.fr>
1959
1960 * src/reader.c (copy_action): When --yacc, don't append a `;'
1961 to the user action: let it fail if lacking.
1962 Suggested by Arnold Robbins and Tom Tromey.
1963
1964 2001-12-14 Akim Demaille <akim@epita.fr>
1965
1966 * src/lex.c (literalchar): Simply return the char you decoded, non
1967 longer mess around with obstacks and int pointers.
1968 Adjust all callers.
1969
1970 2001-12-14 Akim Demaille <akim@epita.fr>
1971
1972 * src/lex.c (literalchar): Don't escape the special characters,
1973 just decode them, and keep them as char (before, eol was output as
1974 the 2 char string `\n' etc.).
1975 * src/output.c (output_rule_data): Use quotearg to output the
1976 token strings.
1977
1978 2001-12-13 Paul Eggert <eggert@twinsun.com>
1979
1980 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1981 Do not infringe on the global user namespace when using C++.
1982 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1983 All uses of `fprintf' and `stderr' changed.
1984
1985 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1986
1987 2001-12-13 Akim Demaille <akim@epita.fr>
1988
1989 The computation of nullable is broken: it doesn't handle empty
1990 RHS's properly.
1991
1992 * tests/torture.at (GNU AWK Grammar): New.
1993 * tests/sets.at (Nullable): New.
1994 * src/nullable.c (set_nullable): Instead of blindly looping over
1995 `ritems', loop over the rules, and then over their rhs's.
1996
1997 Work around Autotest bugs.
1998
1999 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2000 frame, because Autotest understand lines starting with a `+' as
2001 traces from the shell. Then, they are not processed properly.
2002 Admittedly an Autotest bug, but we don't have time to wait for
2003 Autotest to catch up.
2004 * tests/regression.at (Broken Closure): Adjust to the new table
2005 frames.
2006 Move to...
2007 * tests/sets.at: here.
2008
2009 2001-12-13 Akim Demaille <akim@epita.fr>
2010
2011 * src/closure.c (closure): Use nrules instead of playing tricks
2012 with BITS_PER_WORD.
2013
2014 2001-12-13 Akim Demaille <akim@epita.fr>
2015
2016 * src/print.c (print_actions): Output the handling of `$' as the
2017 traces do: shifting the token EOF. Before EOF was treated as a
2018 nonterminal.
2019 * tests/regression.at: Adjust some tests.
2020 * src/print_graph.c (print_core): Complete the set of items via
2021 closure. The next-to-final and final states are still unsatisfying,
2022 but that's to be addressed elsewhere.
2023 No longer output the rule numbers, but do output the state number.
2024 A single loop for the shifts + gotos is enough, but picked a
2025 distinct color for each.
2026 (print_graph): Initialize and finalize closure.
2027
2028 2001-12-13 Akim Demaille <akim@epita.fr>
2029
2030 * src/reader.c (readgram): Remove dead code, an strip useless
2031 braces.
2032 (get_type): Remove, unused.
2033
2034 2001-12-12 Akim Demaille <akim@epita.fr>
2035
2036 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2037 on that of lib/error.c.
2038
2039 2001-12-12 Akim Demaille <akim@epita.fr>
2040
2041 Some hosts don't like `/' in includes.
2042
2043 * src/system.h: Include libgettext.h without qualifying the path.
2044 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2045 $(top_srcdir).
2046
2047 2001-12-11 Marc Autret <autret_m@epita.fr>
2048
2049 * src/output.c (output_parser): Remove useless muscle.
2050
2051 2001-12-11 Marc Autret <autret_m@epita.fr>
2052
2053 * src/bison.simple: Remove #line just before %%epilogue. It
2054 is now handled in ...
2055 * src/reader.c (read_additionnal_code): Add the output of a
2056 #line for the epilogue.
2057
2058 2001-12-10 Marc Autret <autret_m@epita.fr>
2059
2060 * src/reader.c (copy_definition): Re-use CPP-outed code which
2061 replace precedent remove.
2062 * src/bison.simple: Remove #line before %%prologue because
2063 %%input-line is wrong at this time.
2064
2065 2001-12-10 Marc Autret <autret_m@epita.fr>
2066
2067 * src/reader.c (symbols_output): Clean up.
2068 * src/output.c (output_gram, output): Clean up.
2069
2070 2001-12-10 Akim Demaille <akim@epita.fr>
2071
2072 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2073 * src/LR0.c (set_state_table): here.
2074 * src/lalr.c (lalr): Call it.
2075
2076 2001-12-10 Akim Demaille <akim@epita.fr>
2077
2078 * src/state.h (shifts): Remove the `number' member: shifts are
2079 attached to state, hence no longer need to be labelled with a
2080 state number.
2081
2082 2001-12-10 Akim Demaille <akim@epita.fr>
2083
2084 Now that states have a complete set of members, the linked list of
2085 shifts is useless: just fill directly the state's shifts member.
2086
2087 * src/state.h (shifts): Remove the `next' member.
2088 * src/LR0.c (first_state, last_state): Remove.
2089 Adjust the callers.
2090 (augment_automaton): Don't look for the shifts that must be added
2091 a shift on EOF: it is those of the state we looked for! But now,
2092 since shifts are attached, it is no longer needed to looking
2093 merely by its id: its number.
2094
2095 2001-12-10 Akim Demaille <akim@epita.fr>
2096
2097 * src/LR0.c (augment_automaton): Better variable locality.
2098 Remove an impossible branch: if there is a state corresponding to
2099 the start symbol being shifted, then there is shift for the start
2100 symbol from the initial state.
2101
2102 2001-12-10 Akim Demaille <akim@epita.fr>
2103
2104 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2105 only when appropriate: when insert_start_shifting_state' is not
2106 invoked.
2107 * tests/regression.at (Rule Line Numbers): Adjust.
2108
2109 2001-12-10 Akim Demaille <akim@epita.fr>
2110
2111 * src/LR0.c (augment_automaton): Now that all states have shifts,
2112 merge the two cases addition shifts to the initial state.
2113
2114 2001-12-10 Akim Demaille <akim@epita.fr>
2115
2116 * src/lalr.c (set_state_table): Move to...
2117 * src/LR0.c: here.
2118 * src/lalr.c (lalr): Don't call it...
2119 * src/LR0.c (generate_states): do it.
2120 * src/LR0.h (first_state): Remove, only the table is used.
2121
2122 2001-12-10 Akim Demaille <akim@epita.fr>
2123
2124 * src/LR0.h (first_shift, first_reduction): Remove.
2125 * src/lalr.c: Don't use first_shift: find shifts through the
2126 states.
2127
2128 2001-12-10 Akim Demaille <akim@epita.fr>
2129
2130 * src/LR0.c: Attach shifts to states as soon as they are
2131 computed.
2132 * src/lalr.c (set_state_table): Instead of assigning shifts to
2133 state, just assert that the mapping was properly done.
2134
2135 2001-12-10 Akim Demaille <akim@epita.fr>
2136
2137 * src/LR0.c (insert_start_shift): Rename as...
2138 (insert_start_shifting_state): this.
2139 (insert_eof_shifting_state, insert_accepting_state): New.
2140 (augment_automaton): Adjust.
2141 Better locality of the variables.
2142 When looking if the start_symbol is shifted from the initial
2143 state, using `while (... symbol != start_symbol ...)' sounds
2144 better than `while (... symbol < start_symbol ...)': If fail
2145 to see how the order between symbols could be relevant!
2146
2147 2001-12-10 Akim Demaille <akim@epita.fr>
2148
2149 * src/getargs.h: Don't declare `spec_name_prefix' and
2150 `spec_file_prefix', declared by src/files.h.
2151 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2152 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2153 * src/output.c (prepare): Adjust.
2154 * src/reader.c (symbols_output): Likewise.
2155 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2156
2157 2001-12-10 Akim Demaille <akim@epita.fr>
2158
2159 * src/muscle_tab.c (muscle_init): NULL is a better default than
2160 `"0"'.
2161
2162 2001-12-10 Akim Demaille <akim@epita.fr>
2163
2164 * src/reader.c (reader): Calling symbols_output once is enough.
2165
2166 2001-12-10 Akim Demaille <akim@epita.fr>
2167
2168 Now that states have a complete set of members, the linked list of
2169 reductions is useless: just fill directly the state's reductions
2170 member.
2171
2172 * src/state.h (struct reductions): Remove member `number' and
2173 `next'.
2174 * src/LR0.c (first_reduction, last_reduction): Remove.
2175 (save_reductions): Don't link the new reductions, store them in
2176 this_state.
2177 * src/lalr.c (set_state_table): No need to attach reductions to
2178 states, it's already done.
2179 * src/output.c (output_actions): No longer free the shifts, then
2180 the reductions, then the states: free all the states and their
2181 members.
2182
2183 2001-12-10 Akim Demaille <akim@epita.fr>
2184
2185 * src/options.c (OPTN, DRTV, BOTH): New.
2186 (option_table): Use them.
2187
2188 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2189 the job of system.h.
2190 * src/options.c: Don't include stdio.h and xalloc.h for the same
2191 reasons.
2192
2193 2001-12-10 Akim Demaille <akim@epita.fr>
2194
2195 * src/output.c (output, prepare): Make sure the values of the
2196 muscles `action' and `prologue' are 0-terminated.
2197
2198 2001-12-10 Akim Demaille <akim@epita.fr>
2199
2200 Clean up GCC warnings.
2201
2202 * src/reader.c (copy_action): `buf' is not used.
2203 (parse_skel_decl): Be static.
2204 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2205 * src/options.h (create_long_option_table): Have a real prototype.
2206 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2207 (hash_delete_at): Return const void *.
2208 Adjust casts to preserve the const.
2209
2210 2001-12-10 Akim Demaille <akim@epita.fr>
2211
2212 * configure.in: Require 2.52g.
2213 M4 is not needed, but AUTOM4TE is.
2214 * m4/m4.m4: Remove.
2215 * tests/Makefile.am: Adjust.
2216
2217 2001-12-10 Akim Demaille <akim@epita.fr>
2218
2219 One structure for states is enough, even though theoretically
2220 there are LR(0) states and LALR(1) states.
2221
2222 * src/lalr.h (state_t): Remove.
2223 (state_table): Be state_t **, not state_t *.
2224 * src/state.h (core, CORE_ALLOC): Rename as...
2225 (state_t, STATE_ALLOC): this.
2226 Add the LALR(1) members: shifts, reductions, errs.
2227 * src/LR0.c (state_table): Rename as...
2228 (state_hash): this, to avoid name clashes with the global
2229 `state_table'.
2230 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2231 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2232
2233 2001-12-10 Akim Demaille <akim@epita.fr>
2234
2235 Bison dumps core on bash.y.
2236 Reported by Pascal Bart.
2237
2238 * src/warshall.c (bitmatrix_print): New.
2239 (TC): Use it.
2240 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2241 j must be the outer loop.
2242 * tests/regression.at (Broken Closure): New.
2243
2244 2001-12-05 Akim Demaille <akim@epita.fr>
2245
2246 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2247 its argument.
2248 Reported by Peter Hámorský.
2249
2250 2001-12-05 Akim Demaille <akim@epita.fr>
2251
2252 * src/conflicts.c (err_table): Remove.
2253 (resolve_sr_conflict): Adjust.
2254 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
2255 Rename as...
2256 (state_t.reductions, state_t.shifts): this.
2257
2258 2001-12-05 Akim Demaille <akim@epita.fr>
2259
2260 * src/reduce.c (reduce_grammar_tables): No longer disable the
2261 removal of useless rules via CPP but via `if (0)', so that the
2262 compiler still check the code is valid.
2263 For instance, it should have noticed `rline' no longer exists: use
2264 the `line' member of rule_t.
2265 * src/gram.c (dummy, rline): Remove, unused.
2266
2267 2001-12-05 Akim Demaille <akim@epita.fr>
2268
2269 * src/output.c (pack_vector): Use assert, not berror.
2270 * src/main.c (berror): Remove, unused.
2271
2272 2001-12-05 Akim Demaille <akim@epita.fr>
2273
2274 New experimental feature: if --verbose --trace output all the
2275 items of a state, not only its kernel.
2276
2277 * src/print.c (print_core): If `trace_flag', then invoke closure
2278 before outputting the items of the state (print_core is no longer
2279 a correct name them).
2280 (print_results): Invoke new_closure/free_closure if needed.
2281
2282 2001-12-05 Akim Demaille <akim@epita.fr>
2283
2284 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
2285 * src/closure.c, src/closure.h (itemsetsize): Rename as...
2286 (nitemset): for consistency with the rest of the project.
2287
2288 2001-12-05 Akim Demaille <akim@epita.fr>
2289
2290 * src/closure.c (print_closure): Improve.
2291 (closure): Use it for printing input and output.
2292
2293 2001-12-05 Akim Demaille <akim@epita.fr>
2294
2295 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
2296 indexed by nonterminals.
2297
2298 2001-12-05 Akim Demaille <akim@epita.fr>
2299
2300 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
2301 what it was!).
2302 * src/warshall.h: Remove accidental duplication of the content.
2303
2304 2001-12-05 Akim Demaille <akim@epita.fr>
2305
2306 * src/closure.c (set_fderives): De-obfuscate.
2307
2308 2001-12-05 Akim Demaille <akim@epita.fr>
2309
2310 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
2311
2312 2001-12-05 Akim Demaille <akim@epita.fr>
2313
2314 * src/closure.c (set_firsts): De-obfuscate.
2315
2316 2001-12-05 Akim Demaille <akim@epita.fr>
2317
2318 * src/output.c (action_row): De-obfuscate
2319 using the good o' techniques: arrays not pointers, variable
2320 locality, BITISSET, RESETBIT etc.
2321
2322 2001-12-05 Akim Demaille <akim@epita.fr>
2323
2324 Pessimize the code to simplify it: from now on, all the states
2325 have a valid SHIFTS, which NSHIFTS is possibly 0.
2326
2327 * src/LR0.c (shifts_new): Be global and move to..
2328 * src/state.c, src/state.h: here.
2329 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
2330 * src/print_graph: Adjust.
2331
2332 2001-12-05 Akim Demaille <akim@epita.fr>
2333
2334 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
2335 * src/conflicts.c: Use it.
2336 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
2337 incorrectly ``simplified''.
2338
2339 2001-12-05 Akim Demaille <akim@epita.fr>
2340
2341 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
2342 using the good o' techniques: arrays not pointers, variable
2343 locality, BITISSET, RESETBIT etc.
2344
2345 2001-12-05 Akim Demaille <akim@epita.fr>
2346
2347 * src/state.h (SHIFT_SYMBOL): New.
2348 * src/conflicts.c: Use it to deobfuscate.
2349
2350 2001-12-05 Akim Demaille <akim@epita.fr>
2351
2352 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
2353 (print_reductions): De-obfuscate using the good o' techniques:
2354 arrays not pointers, variable locality, BITISSET.
2355
2356 2001-12-05 Akim Demaille <akim@epita.fr>
2357
2358 * src/conflicts.c (print_reductions): Arrays, not pointers.
2359 Use BITISSET.
2360
2361 2001-12-05 Akim Demaille <akim@epita.fr>
2362
2363 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2364
2365 2001-12-05 Akim Demaille <akim@epita.fr>
2366
2367 * src/conflicts.c (print_reductions): Improve variable locality.
2368
2369 2001-12-05 Akim Demaille <akim@epita.fr>
2370
2371 * src/conflicts.c (print_reductions): Pessimize, but clarify.
2372
2373 2001-12-05 Akim Demaille <akim@epita.fr>
2374
2375 * src/conflicts.c (print_reductions): Improve variable locality.
2376
2377 2001-12-05 Akim Demaille <akim@epita.fr>
2378
2379 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
2380 * src/lalr.c: Use them.
2381
2382 2001-12-05 Akim Demaille <akim@epita.fr>
2383
2384 * src/LR0.c (augment_automaton): Formatting changes.
2385 Better variable locality.
2386
2387 2001-12-05 Akim Demaille <akim@epita.fr>
2388
2389 * src/lalr.c (matrix_print): New.
2390 (transpose): Use it.
2391 Use arrays instead of pointers.
2392
2393 2001-12-05 Akim Demaille <akim@epita.fr>
2394
2395 * src/lalr.c (maxrhs): Move to...
2396 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
2397 * src/lalr.c (build_relations): Adjust.
2398
2399 2001-12-05 Akim Demaille <akim@epita.fr>
2400
2401 * src/lalr.c (transpose): Free the memory allocated to the
2402 argument, as it is replaced by the results by the unique caller.
2403 (build_relations): Merely invoke transpose: it handles the memory
2404 deallocation.
2405 Improve variable locality.
2406 Avoid variables used as mere abbreviations.
2407 (compute_lookaheads): Use arrays instead of pointers.
2408
2409 2001-12-05 Akim Demaille <akim@epita.fr>
2410
2411 * src/lalr.c (initialize_F): Improve variable locality.
2412 Avoid variables used as mere abbreviations.
2413
2414 2001-12-05 Akim Demaille <akim@epita.fr>
2415
2416 * src/derives.c (print_derives): Display the ruleno.
2417 * src/lalr.c (initialize_F, transpose): Better variable locality
2418 to improve readability.
2419 Avoid variables used as mere abbreviations.
2420
2421 2001-12-05 Akim Demaille <akim@epita.fr>
2422
2423 * src/lalr.c (traverse): Use arrays instead of pointers.
2424
2425 2001-12-05 Akim Demaille <akim@epita.fr>
2426
2427 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
2428 the handling of squeue.
2429 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2430
2431 2001-12-05 Akim Demaille <akim@epita.fr>
2432
2433 Because useless nonterminals are now kept alive (instead of being
2434 `destroyed'), we now sometimes examine them, and store information
2435 related to them. Hence we need to know their number, and adjust
2436 memory allocations.
2437
2438 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
2439 static.
2440 * src/LR0.c (allocate_itemsets): The memory allocated to
2441 `symbol_count' was used for two different purpose: once to count
2442 the number of occurrences of each symbol, and later reassigned to
2443 `shift_symbol', containing the symbol that can be shifted from a
2444 given state.
2445 Deobfuscate, i.e., allocate, use and free `symbol_count' here
2446 only, and...
2447 (new_itemsets): Allocate `shift_symbol' here.
2448 (allocate_itemsets): symbol_count includes useless nonterminals.
2449 Make room for them.
2450 (free_storage): Use `free', not `XFREE', for pointers that cannot
2451 be null.
2452
2453 2001-12-05 Akim Demaille <akim@epita.fr>
2454
2455 * src/nullable.c (set_nullable): Deobfuscate the handling of
2456 ritem.
2457 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
2458
2459 2001-12-05 Akim Demaille <akim@epita.fr>
2460
2461 * src/gram.c, src/gram.h (ritem_print): New.
2462 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
2463 (This useless function was defined only to work around VMS linkers
2464 that can't handle compilation units with variables only).
2465 * src/reduce.c (dump_grammar): Use it to trace the construction of
2466 ritem.
2467
2468 2001-12-04 Paul Eggert <eggert@twinsun.com>
2469
2470 * src/bison.simple (union yyalloc): Change member names
2471 to be the same as the stack names.
2472 (yyparse): yyptr is now union yyalloc *, not char *.
2473 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
2474 and may generate better code on some machines.
2475 (yystpcpy): Use prototype if __STDC__ is defined, not just
2476 if __cplusplus is defined.
2477
2478 2001-11-30 Akim Demaille <akim@epita.fr>
2479
2480 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
2481 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
2482 Gettext doesn't compile cleanly, and dies with -Werror.
2483 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
2484 Include WARNING_CFLAGS here.
2485 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
2486 before being defined.
2487
2488 2001-11-27 Paul Eggert <eggert@twinsun.com>
2489
2490 * lib/quotearg.h (quotearg_n, quotearg_n_style):
2491 First arg is int, not unsigned.
2492 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2493 (SIZE_MAX, UINT_MAX): New macros.
2494 (quotearg_n_options): Abort if N is negative.
2495 Avoid overflow check on hosts where size_t is 64 bits and int
2496 is 32 bits, as overflow is impossible there.
2497 Fix off-by-one typo that caused unnecessary reallocation.
2498
2499 2001-11-29 Paul Eggert <eggert@twinsun.com>
2500
2501 Name space cleanup in generated parser.
2502
2503 * doc/bison.texinfo (Bison Parser): Discuss system headers
2504 and their effect on the user name space.
2505
2506 * src/bison.simple:
2507 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
2508 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
2509 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
2510
2511 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
2512 on user names when possible.
2513
2514 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
2515 Simplify test for whather <alloca.h> exists.
2516
2517 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
2518
2519 (<stdio.h>): Include if YYDEBUG.
2520
2521 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
2522 ! defined (yyoverflow) && ! defined (yymemcpy).
2523
2524 (yymemcpy, yyparse): Rename local variables as needed so that
2525 they all begin with 'yy'.
2526
2527 (yystrlen, yystpcpy): New functions.
2528
2529 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
2530 All uses changed.
2531
2532 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
2533 instead of relying on string.h functions. Use YYSTACK_ALLOC
2534 and YYSTACK_FREE instead of malloc and free.
2535
2536 2001-11-30 Akim Demaille <akim@epita.fr>
2537
2538 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
2539 before their first uses.
2540 (YYBISON, YYPURE): Move to the top of the output.
2541
2542 2001-11-30 Akim Demaille <akim@epita.fr>
2543
2544 * tests/reduce.at (Useless Nonterminals): Fix.
2545
2546 2001-11-30 Akim Demaille <akim@epita.fr>
2547
2548 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
2549 if body instead of `;' to pacify GCC's warnings.
2550
2551 2001-11-30 Akim Demaille <akim@epita.fr>
2552
2553 Instead of mapping the LHS of unused rules to -1, keep the LHS
2554 valid, but flag the rules as invalid.
2555
2556 * src/gram.h (rule_t): `useful' is a new member.
2557 * src/print.c (print_grammar): Adjust.
2558 * src/derives.c (set_derives): Likewise.
2559 * src/reader.c (packgram, reduce_output): Likewise.
2560 * src/reduce.c (reduce_grammar_tables): Likewise.
2561 * tests/reduce.at (Underivable Rules, Useless Rules): New.
2562
2563 2001-11-30 Akim Demaille <akim@epita.fr>
2564
2565 * src/reduce.c (reduce_output): Formatting changes.
2566 * src/print.c (print_results, print_grammar): Likewise.
2567 * tests/regression.at (Rule Line Numbers)
2568 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2569
2570 2001-11-30 Akim Demaille <akim@epita.fr>
2571
2572 * src/reduce.c (nonterminals_reduce): Instead of throwing away
2573 useless nonterminals, move them at the end of the symbol arrays.
2574 (reduce_output): Adjust.
2575 * tests/reduce.at (Useless Nonterminals): Adjust.
2576
2577 2001-11-30 Akim Demaille <akim@epita.fr>
2578
2579 * src/reduce.c: Various comment/formatting changes.
2580 (nonterminals_reduce): New, extracted from...
2581 (reduce_grammar_tables): here.
2582 (reduce_grammar): Call nonterminals_reduce.
2583
2584 2001-11-29 Paul Eggert <eggert@twinsun.com>
2585
2586 * src/bison.simple (YYSTACK_REALLOC): Remove.
2587 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2588 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2589 New macros.
2590 (union yyalloc): New type.
2591 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2592 an arbitrary restriction on hosts where size_t is wider than int.
2593
2594 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2595 a parser stack overflow. Allocate just one block of memory for all
2596 three stacks, instead of allocating three blocks; this typically is
2597 faster and reduces fragmentation.
2598
2599 Do not limit the number of items in the stack to a value that fits
2600 in 'int', as this is an arbitrary limit on hosts with 64-bit
2601 size_t and 32-bit int.
2602
2603 2001-11-29 Marc Autret <autret_m@epita.fr>
2604
2605 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2606 of defining YYERROR_VERBOSE.
2607 [AT_DATA]: $4 is now out of C declarations in the prologue.
2608
2609 2001-11-28 Marc Autret <autret_m@epita.fr>
2610
2611 * src/reader.c (parse_dquoted_param): New.
2612 (parse_skel_decl): Use it.
2613 * src/lex.h: Add its prototype.
2614 * src/lex.c (literalchar): Become not static.
2615
2616 2001-11-28 Marc Autret <autret_m@epita.fr>
2617
2618 * src/output.h: And put its extern declaration here.
2619 * src/output.c (error_verbose): Define here.
2620 (prepare): Echo name modification.
2621 * src/getargs.h: Clean its extern declaration.
2622 * src/getargs.c (error_verbose_flag): Remove.
2623 (getargs): Remove case 'e'.
2624 * src/options.c (option_table): 'error-verbose' is now seen as simple
2625 percent option.
2626 Include output.h.
2627
2628 * src/reader.c (read_declarations): Remove case tok_include.
2629 (parse_include_decl): Remove.
2630 * src/lex.h (token_t): Remove tok_include.
2631 * src/options.c (option_table): 'include' is now a simple command line
2632 option.
2633
2634 2001-11-28 Marc Autret <autret_m@epita.fr>
2635
2636 * src/bison.simple: Adjust muscle names.
2637 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2638 * src/output.c (prepare): s/_/-/ for the muscles names.
2639 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2640
2641 2001-11-28 Marc Autret <autret_m@epita.fr>
2642
2643 * src/bison.simple: Fix debug.
2644 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2645
2646 2001-11-28 Akim Demaille <akim@epita.fr>
2647
2648 * src/LR0.c (shifts_new): New.
2649 (save_shifts, insert_start_shift, augment_automaton): Use it.
2650
2651 2001-11-28 Akim Demaille <akim@epita.fr>
2652
2653 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2654 keep ruleno only.
2655
2656 2001-11-28 Akim Demaille <akim@epita.fr>
2657
2658 * src/closure.c (closure): Instead of looping over word in array
2659 then bits in words, loop over bits in array.
2660
2661 2001-11-28 Akim Demaille <akim@epita.fr>
2662
2663 * src/closure.c (closure): No longer optimize the special case
2664 where all the bits of `ruleset[r]' are set to 0, to make the code
2665 clearer.
2666
2667 2001-11-28 Akim Demaille <akim@epita.fr>
2668
2669 * src/closure.c (closure): `r' and `c' are new variables, used to
2670 de-obfuscate accesses to RULESET and CORE.
2671
2672 2001-11-28 Akim Demaille <akim@epita.fr>
2673
2674 * src/reduce.c (reduce_print): Use ngettext.
2675 (dump_grammar): Improve the trace accuracy.
2676
2677 2001-11-28 Akim Demaille <akim@epita.fr>
2678
2679 * src/reduce.c (dump_grammar): Don't translate trace messages.
2680
2681 2001-11-28 Akim Demaille <akim@epita.fr>
2682
2683 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2684 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2685 as all tags are free'ed afterwards.
2686 From Enrico Scholz.
2687
2688 2001-11-27 Paul Eggert <eggert@twinsun.com>
2689
2690 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2691 use alloca when we didn't want to, and vice versa.
2692
2693 2001-11-27 Marc Autret <autret_m@epita.fr>
2694
2695 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2696 initialization.
2697 * src/output.c (prepare): Remove its update.
2698
2699 2001-11-27 Marc Autret <autret_m@epita.fr>
2700
2701 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2702 Use %error-verbose.
2703
2704 2001-11-27 Marc Autret <autret_m@epita.fr>
2705
2706 * src/bison.simple: Remove YYERROR_VERBOSE using.
2707 Use %%error_verbose.
2708 (yyparse): Likewise.
2709 * src/output.c (prepare): Give its final value.
2710 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2711 * src/getargs.h: Add its extern declaration.
2712 * src/getargs.c (error_verbose_flag): New int.
2713 (getargs): Update to catch new case.
2714 * src/options.c (option_table): 'error-verbose' is a new option.
2715 (shortopts): Update.
2716
2717 2001-11-27 Akim Demaille <akim@epita.fr>
2718
2719 * src/system.h: Use intl/libgettext.h.
2720 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2721
2722 2001-11-27 Akim Demaille <akim@epita.fr>
2723
2724 * tests/torture.at (Exploding the Stack Size with Malloc):
2725 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2726
2727 2001-11-27 Akim Demaille <akim@epita.fr>
2728
2729 * src/files.c: Include error.h.
2730 Reported by Hans Aberg.
2731
2732 2001-11-26 Marc Autret <autret_m@epita.fr>
2733
2734 * src/reader.c (parse_include_decl): New, not yet implemented.
2735 (read_declarations): Add case tok_include.
2736 * src/getargs.h (include): Add its extern definition.
2737 * src/getargs.c (include): New const char *.
2738 (getargs): Add case '-I'.
2739 * src/options.c (option_table): Add include as command line and
2740 percent option.
2741 * src/lex.h (token_t): Add tok_include.
2742
2743 2001-11-26 Akim Demaille <akim@epita.fr>
2744
2745 * src/reader.c (readgram): Make sure rules for mid-rule actions
2746 have a lineno equal to that of their host rule.
2747 Reported by Hans Aberg.
2748 * tests/regression.at (Rule Line Numbers): New.
2749
2750 2001-11-26 Akim Demaille <akim@epita.fr>
2751
2752 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2753 size_ts.
2754
2755 2001-11-26 Akim Demaille <akim@epita.fr>
2756
2757 * src/complain.c, src/complain.h (error): Remove, provided by
2758 lib/error.[ch].
2759
2760 2001-11-26 Akim Demaille <akim@epita.fr>
2761
2762 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2763 issue an error message.
2764 * tests/regression.at (Invalid %directive): New.
2765 Reported by Hans Aberg.
2766
2767 2001-11-26 Akim Demaille <akim@epita.fr>
2768
2769 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2770 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2771
2772 2001-11-26 Akim Demaille <akim@epita.fr>
2773
2774 * src/conflicts.c (conflicts_print): Don't complain at all when
2775 there are no reduce/reduce conflicts, and as many shift/reduce
2776 conflicts as expected.
2777 * tests/regression.at (%expect right): Adjust.
2778
2779 2001-11-23 Akim Demaille <akim@epita.fr>
2780
2781 * lib/alloca.c: Update, from fileutils.
2782
2783 2001-11-23 Akim Demaille <akim@epita.fr>
2784
2785 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2786
2787 2001-11-23 Akim Demaille <akim@epita.fr>
2788
2789 * src/system.h: Include alloca.h.
2790 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2791
2792 2001-11-23 Akim Demaille <akim@epita.fr>
2793
2794 * src/print_graph.c (print_actions): Remove `rule', unused.
2795 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2796 pacify GCC's signed < unsigned warnings.
2797 * src/closure.c (itemsetsize): Likewise.
2798 * src/reader.c (symbol_list_new): Static.
2799
2800 2001-11-23 Akim Demaille <akim@epita.fr>
2801
2802 Attaching lineno to buckets is stupid, since only one copy of each
2803 symbol is kept, only the line of the first occurrence is kept too.
2804
2805 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2806 * src/reader.c (rline_allocated): Remove, unused.
2807 (symbol_list): Have a `line' member.
2808 (symbol_list_new): New.
2809 (readgram): Use it.
2810 * src/print.c (print_grammar): Output the rule line numbers.
2811 * tests/regression.at (Solved SR Conflicts)
2812 (Unresolved SR Conflicts): Adjust.
2813 Reported by Hans Aberg.
2814
2815 2001-11-22 Marc Autret <autret_m@epita.fr>
2816
2817 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2818
2819 2001-11-22 Marc Autret <autret_m@epita.fr>
2820
2821 * src/muscle_tab.c (muscle_init): Remove initialization of
2822 skeleton muscle.
2823 * src/output.c (output_master_parser): Do it here.
2824
2825 2001-11-20 Akim Demaille <akim@epita.fr>
2826
2827 * po/sv.po: New.
2828 * configure.in (ALL_LINGUAS): Adjust.
2829 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2830 longer contains strings to translate.
2831
2832 2001-11-19 Akim Demaille <akim@epita.fr>
2833
2834 * src/conflicts.c (conflicts_print): Add a missing \n.
2835
2836 2001-11-19 Akim Demaille <akim@epita.fr>
2837
2838 * src/nullable.c (nullable_print): New.
2839 (set_nullable): Call it when tracing.
2840 Better locality of variables.
2841
2842 2001-11-19 Akim Demaille <akim@epita.fr>
2843
2844 * src/print.c (print_actions): Better locality of variables.
2845
2846 2001-11-19 Akim Demaille <akim@epita.fr>
2847
2848 * src/derives.c (print_derives): Fix and enrich.
2849 * src/closure.c (print_fderives): Likewise.
2850
2851 2001-11-19 Akim Demaille <akim@epita.fr>
2852
2853 * src/closure.c (itemsetend): Remove, replaced with...
2854 (itemsetsize): new.
2855
2856 2001-11-19 Akim Demaille <akim@epita.fr>
2857
2858 * src/LR0.c (kernel_end): Remove, replaced with...
2859 (kernel_size): new.
2860
2861 2001-11-19 Akim Demaille <akim@epita.fr>
2862
2863 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2864 to clarify.
2865
2866 2001-11-19 Akim Demaille <akim@epita.fr>
2867
2868 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2869
2870 2001-11-19 Akim Demaille <akim@epita.fr>
2871
2872 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2873 trace messages.
2874 * src/LR0.c: Likewise.
2875 (allocate_itemsets): Use arrays instead of pointers to clarify.
2876
2877 2001-11-19 Akim Demaille <akim@epita.fr>
2878
2879 * src/getargs.c (statistics_flag): Replace with...
2880 (trace_flag): New.
2881 (longopts): Accept --trace instead of --statistics.
2882 * src/getargs.h, src/options.c: Adjust.
2883 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2884 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2885
2886 2001-11-19 Akim Demaille <akim@epita.fr>
2887
2888 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2889 pointers to clarify the code.
2890 (save_reductions, save_shifts): Factor common parts of alternatives.
2891
2892 2001-11-19 Akim Demaille <akim@epita.fr>
2893
2894 * src/LR0.c (new_state, get_state): Complete TRACE code.
2895 * src/closure.c: Include `reader.h' to get `tags', needed by the
2896 trace code.
2897 Rename the conditional DEBUG as TRACE.
2898 Output consistently TRACEs to stderr, not stdout.
2899 * src/derives.c: Likewise.
2900 * src/reduce.c: (inaccessable_symbols): Using if is better style
2901 than goto.
2902 Use `#if TRACE' instead of `#if 0' for tracing code.
2903
2904 2001-11-19 Akim Demaille <akim@epita.fr>
2905
2906 * src/system.h (LIST_FREE, shortcpy): New.
2907 * src/LR0.c: Use them.
2908 * src/output.c (free_itemsets, free_reductions, free_shifts):
2909 Remove, replaced by LIST_FREE.
2910
2911 2001-11-19 Akim Demaille <akim@epita.fr>
2912
2913 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2914 (REDUCTIONS_ALLOC): New.
2915 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2916 allocation.
2917
2918 2001-11-19 Akim Demaille <akim@epita.fr>
2919
2920 * src/LR0.c (new_state): Complete trace code.
2921 * src/nullable.c (set_nullable): Don't translate traces.
2922
2923 2001-11-19 Akim Demaille <akim@epita.fr>
2924
2925 * src/print_graph.c (print_core): Better locality of variables.
2926 * src/print.c (print_core): Likewise.
2927
2928 2001-11-19 Akim Demaille <akim@epita.fr>
2929
2930 * src/vcg.c: You do the output, so you are responsible of the
2931 handling of VCG syntax, in particular: use quotearg.
2932 * src/print_graph.c: Don't.
2933 (print_actions): Don't output the actions as part of the nodes,
2934 since that's the job of the edges.
2935 (print_state): Don't output by hand: fill the node description,
2936 and ask for its output.
2937
2938 2001-11-19 Akim Demaille <akim@epita.fr>
2939
2940 * src/bison.simple (yyparse): When verbosely reporting an error,
2941 no longer put additional quotes around token names.
2942 * tests/calc.at: Adjust.
2943
2944 2001-11-19 Akim Demaille <akim@epita.fr>
2945
2946 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2947 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2948 * src/output.c: Adjust.
2949
2950 2001-11-19 Akim Demaille <akim@epita.fr>
2951
2952 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2953 (rule_t): this.
2954 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2955
2956 2001-11-19 Akim Demaille <akim@epita.fr>
2957
2958 * src/gram.h (rule_t): New.
2959 (rule_table): New.
2960 (rrhs, rlhs): Remove, part of state_t.
2961 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2962 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2963 * src/reader.c, src/reduce.c: Adjust.
2964
2965 2001-11-19 Akim Demaille <akim@epita.fr>
2966
2967 * src/reader.c (symbols_output): New, extracted from...
2968 (packsymbols): Here.
2969 (reader): Call it.
2970
2971 2001-11-19 Akim Demaille <akim@epita.fr>
2972
2973 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2974 (maxrhs): this new function.
2975
2976 2001-11-19 Akim Demaille <akim@epita.fr>
2977
2978 * src/lalr.c (F): New macro to access the variable F.
2979 Adjust.
2980
2981 2001-11-19 Akim Demaille <akim@epita.fr>
2982
2983 * src/lalr.h (LA): New macro to access the variable LA.
2984 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2985 * src/lalr.c: Adjust.
2986
2987 2001-11-19 Akim Demaille <akim@epita.fr>
2988
2989 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2990 (set_state_table): handle the `lookaheads' members.
2991
2992 2001-11-19 Akim Demaille <akim@epita.fr>
2993
2994 * src/lalr.h (lookaheads): Removed array, whose contents is now
2995 a member of...
2996 (state_t): this structure.
2997 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2998 Adjust.
2999
3000 2001-11-19 Akim Demaille <akim@epita.fr>
3001
3002 * src/lalr.h (consistent): Removed array, whose contents is now
3003 a member of...
3004 (state_t): this structure.
3005 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3006 Adjust.
3007
3008 2001-11-19 Akim Demaille <akim@epita.fr>
3009
3010 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
3011 contents are now members of...
3012 (state_t): this structure.
3013 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
3014 Adjust.
3015
3016 2001-11-19 Akim Demaille <akim@epita.fr>
3017
3018 * src/lalr.h (state_t): New.
3019 (state_table): Be a state_t * instead of a core **.
3020 (accessing_symbol): Remove, part of state_t.
3021 * src/lalr.c: Adjust.
3022 (set_accessing_symbol): Merge into...
3023 (set_state_table): this.
3024 * src/print_graph.c, src/conflicts.c: Adjust.
3025
3026 2001-11-14 Akim Demaille <akim@epita.fr>
3027
3028 * tests/calc.at, tests/output.at, tests/regression.at,
3029 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
3030 now the tests are run in private dirs, therefore AC_CLEANUP and
3031 family can be simplified to 0-ary.
3032 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
3033 use abs. path to find config.h.
3034 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
3035 stderr, there can be way too much random noise.
3036 Instead pass -Werror to GCC and rely on the exit status.
3037 Reported by Wolfram Wagner.
3038
3039 2001-11-14 Akim Demaille <akim@epita.fr>
3040
3041 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
3042 defined only if yyoverflow is defined, to avoid `warning: unused
3043 variable `yyvs1''.
3044 Reported by The Test Suite.
3045
3046 2001-11-14 Akim Demaille <akim@epita.fr>
3047
3048 * src/print.c: Include reduce.h.
3049 Reported by Hans Aberg.
3050
3051 2001-11-14 Akim Demaille <akim@epita.fr>
3052
3053 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
3054 Revert a previous patch: these are really const.
3055 * src/conflicts.c (conflict_report): Additional useless pair of
3056 braces to pacify GCC's warnings for `if () if () {} else {}'.
3057 * src/lex.c (parse_percent_token): Replace equal_offset with
3058 arg_offset.
3059 arg is const.
3060 Be sure to strdup `arg' when used, since there is no reason for
3061 token_buffer not to change.
3062
3063 2001-11-14 Akim Demaille <akim@epita.fr>
3064
3065 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
3066 definition.
3067 * src/main.c (main): Use them.
3068 Suggested by Hans Aberg.
3069
3070 2001-11-12 Akim Demaille <akim@epita.fr>
3071
3072 * src/system.h (ngettext): Now that we use ngettext, be sure to
3073 provide a default definition when NLS are not used.
3074
3075 2001-11-12 Akim Demaille <akim@epita.fr>
3076
3077 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
3078 Use @kbd to denote user input.
3079 (Language and Grammar): ANSIfy the example.
3080 Adjust its layout for info/notinfo.
3081 (Location Tracking Calc): Output error messages to stderr.
3082 Output locations in a more GNUtically correct way.
3083 Fix a couple of Englishos.
3084 Adjust @group/@end group pairs.
3085
3086 2001-11-12 Akim Demaille <akim@epita.fr>
3087
3088 %expext was not functioning at all.
3089
3090 * src/conflicts.c (expected_conflicts): Set to -1.
3091 (conflict_report): Use ngettext.
3092 (conflicts_print): Check %expect and make its violation an error.
3093 * doc/bison.texinfo (Expect Decl): Adjust.
3094 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
3095 * tests/regression.at (%expect not enough, %expect right)
3096 (%expect too much): New.
3097
3098 2001-11-12 Akim Demaille <akim@epita.fr>
3099
3100 * tests/regression.at (Conflicts): Rename as...
3101 (Unresolved SR Conflicts): this.
3102 (Solved SR Conflicts): New.
3103
3104 2001-11-12 Akim Demaille <akim@epita.fr>
3105
3106 * src/reduce.c (print_results): Rename as...
3107 (reduce_output): This.
3108 Output to OUT, passed as argument, instead of output_obstack.
3109 (dump_grammar): Likewise.
3110 (reduce_free): New.
3111 Also free V1.
3112 (reduce_grammar): No longer call reduce_output, since...
3113 * src/print.c (print_results): do it.
3114 * src/main.c (main): Call reduce_free;
3115
3116 2001-11-12 Akim Demaille <akim@epita.fr>
3117
3118 * src/conflicts.c (print_reductions): Accept OUT as argument.
3119 Output to it, not to output_obstack.
3120 * src/print.c (print_actions): Adjust.
3121
3122 2001-11-12 Akim Demaille <akim@epita.fr>
3123
3124 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
3125 the result instead of using...
3126 (src_total, rrc_total, src_count, rrc_count): Remove.
3127 (any_conflicts): Remove.
3128 (print_conflicts): Split into...
3129 (conflicts_print, conflicts_output): New.
3130 * src/conflicts.h: Adjust.
3131 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
3132 * src/print.c (print_grammar): Issue `\n' between two rules.
3133 * tests/regression.at (Conflicts): New.
3134 Reported by Tom Lane.
3135
3136 2001-11-12 Akim Demaille <akim@epita.fr>
3137
3138 * tests/regression.at (Invalid input): Remove, duplicate with
3139 ``Invalid input: 1''.
3140
3141 2001-11-12 Akim Demaille <akim@epita.fr>
3142
3143 * tests/torture.at (AT_DATA_STACK_TORTURE)
3144 (Exploding the Stack Size with Alloca)
3145 (Exploding the Stack Size with Malloc): New.
3146
3147 2001-11-12 Akim Demaille <akim@epita.fr>
3148
3149 * src/bison.simple (YYSTACK_REALLOC): New.
3150 (yyparse) [!yyoverflow]: Use it and free the old stack.
3151 Reported by Per Allansson.
3152
3153 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
3154
3155 * src/bison.simple: Define type yystype instead of YYSTYPE, and
3156 define CPP macro, which substitute YYSTYPE by yystype.
3157 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
3158 with yyltype/YYLTYPE. This allows inclusion of the generated
3159 header within the parser if the compiler, such as GGC, accepts
3160 multiple equivalent #defines.
3161 From Akim.
3162
3163 2001-11-05 Akim Demaille <akim@epita.fr>
3164
3165 * src/reader.c (symbols_output): New, extracted from...
3166 (packsymbols): here.
3167 (reader): Adjust.
3168
3169 2001-11-05 Akim Demaille <akim@epita.fr>
3170
3171 * src/lex.c (parse_percent_token): s/quotearg/quote/.
3172
3173 2001-11-05 Akim Demaille <akim@epita.fr>
3174
3175 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
3176 pattern.
3177
3178 2001-11-05 Akim Demaille <akim@epita.fr>
3179
3180 * src/options.h (struct option_table_struct): set_flags is void*.
3181 * src/options.c (longopts): Support `--output' and `%output'.
3182 (usage): Adjust.
3183 * src/lex.h (tok_setopt): Remove, replaced with...
3184 (tok_intopt, tok_stropt): these new guys.
3185 * src/lex.c (getopt.h): Not needed.
3186 (token_buffer, unlexed_token_buffer): Not const.
3187 (percent_table): Promote `-' over `_' in directive names.
3188 Active `%name-prefix', `file-prefix', and `output'.
3189 (parse_percent_token): Accept possible arguments to directives.
3190 Promote `-' over `_' in directive names.
3191
3192 2001-11-04 Akim Demaille <akim@epita.fr>
3193
3194 * doc/bison.texinfo (Decl Summary): Split the list into
3195 `directives for grammars' and `directives for bison'.
3196 Sort'em.
3197 Add description of `%name-prefix', `file-prefix', and `output'.
3198 Promote `-' over `_' in directive names.
3199 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
3200 Simplify the description of `--name-prefix'.
3201 Promote `-' over `_' in directive names.
3202 Promote `--output' over `--output-file'.
3203 Fix the description of `--defines'.
3204 * tests/output.at: Exercise %file-prefix and %output.
3205
3206 2001-11-02 Akim Demaille <akim@epita.fr>
3207
3208 * doc/refcard.tex: Update.
3209
3210 2001-11-02 Akim Demaille <akim@epita.fr>
3211
3212 * src/symtab.h (SUNDEF): New.
3213 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
3214 stand for `uninitialized', instead of 0.
3215 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
3216 * src/lex.c (lex): Adjust.
3217
3218 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
3219 Number it 0.
3220 Let yylex return it instead of a plain 0.
3221 Reported by Dick Streefland.
3222
3223 2001-11-02 Akim Demaille <akim@epita.fr>
3224
3225 * tests/regression.at (Mixing %token styles): New test.
3226
3227 2001-11-02 Akim Demaille <akim@epita.fr>
3228
3229 * src/reader.c (parse_thong_decl): Formatting changes.
3230 (token_translations_init): New, extracted from...
3231 (packsymbols): Here.
3232 Adjust.
3233
3234 2001-11-01 Akim Demaille <akim@epita.fr>
3235
3236 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
3237 Check that `9foo.y' produces correct cpp guards.
3238 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
3239 guards.
3240 Reported by Wwp.
3241
3242 2001-11-01 Akim Demaille <akim@epita.fr>
3243
3244 * tests/regression.at (Invalid input: 2): New.
3245 * src/lex.c (unlexed_token_buffer): New.
3246 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
3247 too.
3248 Reported by Wwp.
3249
3250 2001-11-01 Akim Demaille <akim@epita.fr>
3251
3252 * tests/calc.at: Catch up with 1.30.
3253 * configure.in: Bump to 1.49a.
3254 Adjust to newer Autotest.
3255
3256 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
3257
3258 * src/conflicts.c: Move global variables rrc_total and src_total ...
3259 (print_conflicts): here.
3260 * src/output.c (output): Free global variable user_toknums.
3261 * src/lex.c (token_obstack): Become static.
3262
3263 2001-10-18 Akim Demaille <akim@epita.fr>
3264
3265 * tests/atlocal.in (GCC): Add.
3266 * tests/calc.at: s/m4_match/m4_bmatch/.
3267 s/m4_patsubst/m4_bpatsubst/.
3268 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
3269 * configure.in: AC_SUBST(GCC).
3270
3271 2001-10-14 Marc Autret <autret_m@epita.fr>
3272
3273 * src/options.c (create_long_option_table): Fix.
3274
3275 2001-10-10 Akim Demaille <akim@epita.fr>
3276
3277 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
3278
3279 2001-10-04 Akim Demaille <akim@epita.fr>
3280
3281 * src/reader.c (parse_union_decl): Push the caracters in
3282 union_obstack, not attrs_obstack.
3283
3284 2001-10-04 Akim Demaille <akim@epita.fr>
3285
3286 Merge in the branch 1.29.
3287
3288 * src/reader.c (packsymbols): Use a temporary obstack for
3289 `%%tokendef', since output_stack is already used elsewhere.
3290
3291 2001-10-02 Akim Demaille <akim@epita.fr>
3292
3293 Bump 1.29d.
3294
3295 2001-10-02 Akim Demaille <akim@epita.fr>
3296
3297 Version 1.29c.
3298
3299 2001-10-02 Akim Demaille <akim@epita.fr>
3300
3301 * tests/regression.at (Invalid CPP headers): New.
3302 From Alexander Belopolsky.
3303 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
3304
3305 2001-10-02 Akim Demaille <akim@epita.fr>
3306
3307 * tests/regression.at (Invalid input): New.
3308 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
3309 Reported by Shura.
3310
3311 2001-10-02 Akim Demaille <akim@epita.fr>
3312
3313 * tests/calc.at: Now that --debug works, the tests must be adjusted.
3314
3315 2001-10-02 Akim Demaille <akim@epita.fr>
3316
3317 * src/output.c (output_parser): Assert `skeleton'.
3318 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
3319 systems.
3320 From Shura.
3321
3322 2001-10-01 Marc Autret <autret_m@epita.fr>
3323
3324 * src/lex.h: Echo modifications.
3325 * src/lex.c (unlex): Parameter is now token_t.
3326 From Hans Aberg.
3327
3328 2001-10-01 Marc Autret <autret_m@epita.fr>
3329
3330 * src/main.c: Include lex.h.
3331 From Hans Aberg.
3332
3333 2001-09-29 Akim Demaille <akim@epita.fr>
3334
3335 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
3336
3337 2001-09-28 Akim Demaille <akim@epita.fr>
3338
3339 * tests/testsuite.at: Update to newer Autotest.
3340 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
3341
3342 2001-09-27 Akim Demaille <akim@epita.fr>
3343
3344 Position independent wrapper.
3345
3346 * tests/bison: Remove.
3347 * tests/bison.in: New.
3348 * configure.in: Adjust.
3349
3350 2001-09-27 Paul Eggert <eggert@twinsun.com>
3351
3352 Port quotearg fixes from tar 1.13.24.
3353
3354 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3355 tm to be declared.
3356 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
3357 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
3358
3359 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
3360 * m4/mbrtowc.m4: New file.
3361 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
3362 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
3363
3364 2001-09-27 Akim Demaille <akim@epita.fr>
3365
3366 Bump to 1.29c.
3367
3368 2001-09-27 Akim Demaille <akim@epita.fr>
3369
3370 Version 1.29b.
3371
3372 2001-09-25 Akim Demaille <akim@epita.fr>
3373
3374 * src/system.h: Include `xalloc.h'.
3375 Remove it from the C files.
3376 * src/files.c (output_files): Free the obstacks.
3377 * src/lex.c (init_lex): Rename as...
3378 (lex_init): this.
3379 (lex_free): New.
3380 * src/main.c (main): Use it.
3381
3382 2001-09-24 Marc Autret <autret_m@epita.fr>
3383
3384 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
3385 to output informations in fout (FILE*).
3386 (open_graph, close_graph): Likewise.
3387 (output_graph, output_edge, output_node): Likewise.
3388 * src/vcg.h: Update function prototypes.
3389 * src/print_graph.c (print_graph): Open output graph file.
3390 (print_actions): Adjust.
3391 * src/files.h: Remove extern declaration.
3392 * src/files.c: Remove graph_obstack declaration.
3393 (open_files): Remove graph_obstack initialization.
3394 (output_files): Remove graph_obstack saving.
3395
3396 2001-09-24 Marc Autret <autret_m@epita.fr>
3397
3398 * src/files.c (compute_output_file_names): Fix.
3399
3400 2001-09-24 Marc Autret <autret_m@epita.fr>,
3401 Akim Demaille <akim@epita.fr>
3402
3403 * src/reader.c (reader): Remove call to free_symtab ().
3404 * src/main.c (main): Call it here.
3405 Include symtab.h.
3406 * src/conflicts.c (initialize_conflicts): Rename as...
3407 (solve_conflicts): this.
3408 * src/print.c (print_core, print_actions, print_state)
3409 (print_grammar): Dump to a file instead a `output_obstack'.
3410 (print_results): Dump `output_obstack', and then proceed with the
3411 FILE *.
3412 * src/files.c (compute_output_file_names, close_files): New.
3413 (output_files): Adjust.
3414 * src/main.c (main): Adjust.
3415
3416 2001-09-23 Marc Autret <autret_m@epita.fr>
3417
3418 * src/files.c (compute_header_macro): Computes header macro name
3419 from spec_defines_file when given.
3420
3421 2001-09-23 Marc Autret <autret_m@epita.fr>
3422
3423 * src/files.c (output_files): Add default extensions.
3424
3425 2001-09-22 Akim Demaille <akim@epita.fr>
3426
3427 * src/conflicts.c (finalize_conflicts): Rename as...
3428 (free_conflicts): this.
3429
3430 2001-09-22 Akim Demaille <akim@epita.fr>
3431
3432 * src/gram.c (gram_free): Rename back as...
3433 (dummy): this.
3434 (output_token_translations): Free `token_translations'.
3435 * src/symtab.c (free_symtab): Free the tag field.
3436
3437 2001-09-22 Akim Demaille <akim@epita.fr>
3438
3439 Remove `translations' as it is always set to true.
3440
3441 * src/gram.h: Adjust.
3442 * src/reader.c (packsymbols, parse_token_decl): Adjust
3443 * src/print.c (print_grammar): Adjust.
3444 * src/output.c (output_token_translations): Adjust.
3445 * src/lex.c (lex): Adjust.
3446 * src/gram.c: Be sure the set pointers to NULL.
3447 (dummy): Rename as...
3448 (gram_free): this.
3449
3450 2001-09-22 Akim Demaille <akim@epita.fr>
3451
3452 * configure.in: Invoke AM_LIB_DMALLOC.
3453 * src/system.h: Use dmalloc.
3454 * src/LR0.c: Be sure to have pointers initialized to NULL.
3455 (allocate_itemsets): Allocate kernel_items only if needed.
3456
3457 2001-09-22 Akim Demaille <akim@epita.fr>
3458
3459 * configure.in: Bump to 1.29b.
3460 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
3461 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
3462 need xmalloc.c in calc.y.
3463 From Pascal Bart.
3464
3465 2001-09-21 Akim Demaille <akim@epita.fr>
3466
3467 Version 1.29a.
3468 * Makefile.maint, config/config.guess, config/config.sub,
3469 * config/missing: Update from masters.
3470 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
3471 upon package.m4.
3472 * configure.in (ALL_LINGUAS): Add `tr'.
3473
3474 2001-09-21 Akim Demaille <akim@epita.fr>
3475
3476 * tests/Makefile.am (package.m4): Move to...
3477 ($(srcdir)/$(TESTSUITE)): here.
3478
3479 2001-09-20 Akim Demaille <akim@epita.fr>
3480
3481 * src/complain.c: No longer try to be standalone: use system.h.
3482 Don't assume __STDC__ is defined to 1. Just test if it is defined.
3483 * src/complain.h: Likewise.
3484 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
3485 Remove the unused variable `n'.
3486 From Albert Chin-A-Young.
3487
3488 2001-09-18 Marc Autret <autret_m@epita.fr>
3489
3490 * doc/bison.1: Update.
3491 * doc/bison.texinfo (Bison Options): Update --defines and --graph
3492 descriptions.
3493 (Option Cross Key): Update.
3494 Add --graph.
3495
3496 2001-09-18 Marc Autret <autret_m@epita.fr>
3497
3498 * tests/regression.at: New test (comment in %union).
3499
3500 2001-09-18 Marc Autret <autret_m@epita.fr>
3501
3502 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
3503 do that.
3504 Reported by Keith Browne.
3505
3506 2001-09-18 Marc Autret <autret_m@epita.fr>
3507
3508 * tests/output.at: Add tests for --defines and --graph.
3509
3510 2001-09-18 Marc Autret <autret_m@epita.fr>
3511
3512 * tests/output.at: Removes tests of %{header,src}_extension features.
3513
3514 2001-09-18 Akim Demaille <akim@epita.fr>
3515
3516 * tests/Makefile.am (package.m4): New.
3517 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
3518 (_AT_CHECK_CALC_ERROR): Likewise.
3519 Factor the `, ' part of verbose error messages.
3520
3521 2001-09-18 Marc Autret <autret_m@epita.fr>
3522
3523 * src/getargs.c (longopts): Declare --defines and --graph as options
3524 with optional arguments.
3525 * src/files.h: Add extern declarations.
3526 * src/files.c (spec_graph_file, spec_defines_file): New.
3527 (output_files): Update.
3528 Remove CPP-outed code.
3529
3530 2001-09-18 Marc Autret <autret_m@epita.fr>
3531
3532 Turn off %{source,header}_extension feature.
3533
3534 * src/files.c (compute_exts_from_gf): Update.
3535 (compute_exts_from_src): Update.
3536 (output_files): CPP-out useless code.
3537 * src/files.h: Remove {header,source}_extension extern declarations.
3538 * src/reader.c (parse_dquoted_param): CPP-out.
3539 (parse_header_extension_decl): Remove.
3540 (parse_source_extension_decl): Remove.
3541 (read_declarations): Remove cases tok_{hdrext,srcext}.
3542 * src/lex.c (percent_table): Remove {header,source}_extension entries.
3543 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
3544
3545 2001-09-10 Akim Demaille <akim@epita.fr>
3546
3547 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
3548 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
3549 (AT_CHECK_OUTPUT): this.
3550 Merely check ls' exit status, its output is useless.
3551
3552 2001-09-10 Akim Demaille <akim@epita.fr>
3553
3554 * tests/calc.at: Use m4_match.
3555 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
3556
3557 2001-09-10 Marc Autret <autret_m@epita.fr>,
3558 Akim Demaille <akim@epita.fr>
3559
3560 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
3561 enum color_e.
3562 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
3563 to `normal'.
3564 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
3565 * src/lex.h: Adjust prototype.
3566 (token_t): Add `tok_undef'.
3567 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
3568 (parse_percent_token): Now returns token_t.
3569 Add default statement in switch.
3570 (lex): Separate `c' as an input variable, from the token_t result
3571 part.
3572 (unlexed): Is a token_t.
3573
3574 2001-09-10 Akim Demaille <akim@epita.fr>
3575
3576 * configure.in: Bump to 1.29a.
3577
3578 2001-09-07 Akim Demaille <akim@epita.fr>
3579
3580 Version 1.29.
3581
3582 2001-08-30 Akim Demaille <akim@epita.fr>
3583
3584 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3585 * m4/atconfig.m4: Remove.
3586 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3587 * tests/bison: New.
3588 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3589 m4_if, m4_patsubst, and m4_regexp.
3590 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3591 `input' file instead of echo.
3592
3593 2001-08-29 Akim Demaille <akim@epita.fr>
3594
3595 Bump to 1.28e.
3596
3597 2001-08-29 Akim Demaille <akim@epita.fr>
3598
3599 Version 1.28d.
3600
3601 2001-08-29 Paul Eggert <eggert@twinsun.com>
3602
3603 * src/bison.simple (yyparse): Don't take the address of an
3604 item before the start of an array, as that doesn't conform to
3605 the C Standard.
3606
3607 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3608
3609 * doc/bison.texinfo (Location Tracking Calc): New node.
3610
3611 2001-08-29 Paul Eggert <eggert@twinsun.com>
3612
3613 * src/output.c (output): Do not define const, as this now
3614 causes more problems than it cures.
3615
3616 2001-08-29 Akim Demaille <akim@epita.fr>
3617
3618 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3619 the nodes.
3620 Be sure to tag the `detailmenu'.
3621
3622 2001-08-29 Akim Demaille <akim@epita.fr>
3623
3624 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3625 download in a tmp dir.
3626
3627 2001-08-28 Marc Autret <autret_m@epita.fr>
3628
3629 * config/depcomp: New file.
3630
3631 2001-08-28 Marc Autret <autret_m@epita.fr>
3632
3633 * doc/bison.1 (mandoc): Adjust.
3634 From Juan Manuel Guerrero.
3635
3636 2001-08-28 Marc Autret <autret_m@epita.fr>
3637
3638 * src/print_graph.c (print_state): Fix.
3639
3640 2001-08-27 Marc Autret <autret_m@epita.fr>
3641
3642 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3643 char * members.
3644 Echo modifications to the functions prototypes.
3645 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3646
3647 2001-08-27 Marc Autret <autret_m@epita.fr>
3648
3649 * src/vcg.c: Include `xalloc.h'.
3650 (add_colorentry): New.
3651 (add_classname): New.
3652 (add_infoname): New.
3653 * src/vcg.h: Add new prototypes.
3654
3655 2001-08-27 Akim Demaille <akim@epita.fr>
3656
3657 * Makefile.maint: Sync. again with CVS Autoconf.
3658
3659 2001-08-27 Akim Demaille <akim@epita.fr>
3660
3661 * Makefile.maint: Formatting changes.
3662 (po-update, cvs-update, update): New targets.
3663 (AMTAR): Remove.
3664
3665 2001-08-27 Akim Demaille <akim@epita.fr>
3666
3667 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3668 * Makefile.maint: Sync. with CVS Autoconf.
3669
3670 2001-08-27 Marc Autret <autret_m@epita.fr>
3671
3672 * src/vcg.h (struct infoname_s): New.
3673 (struct colorentry_s): New.
3674 (graph_s): New fields {vertical,horizontal}_order in structure.
3675 Add `infoname' field.
3676 Add `colorentry' field;
3677 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3678 (G_HORIZONTAL_ORDER): New.
3679 (G_INFONAME): New.
3680 (G_COLORENTRY): New.
3681 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3682 Add output of `infoname'.
3683 Add output of `colorentry'.
3684
3685 2001-08-27 Marc Autret <autret_m@epita.fr>
3686
3687 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3688 This one shadowed a global parameter.
3689
3690 2001-08-24 Marc Autret <autret_m@epita.fr>
3691
3692 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3693 instead of `unsigned'.
3694 (print_state): Do not call obstack_object_size () in obstack_grow ()
3695 to avoid macro variables shadowing.
3696
3697 2001-08-23 Marc Autret <autret_m@epita.fr>
3698
3699 * src/lex.c (percent_table): Typo: s/naem/name/.
3700 Add graph option.
3701 Normalize new options declarations.
3702
3703 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3704
3705 * tests/suite.at: Exercise %header_extension and %source_extension.
3706
3707 2001-08-16 Marc Autret <autret_m@epita.fr>
3708
3709 * src/reader.c (parse_dquoted_param): New.
3710 (parse_header_extension_decl): Use it.
3711 (parse_source_extension_decl): Likewise.
3712
3713 2001-08-16 Marc Autret <autret_m@epita.fr>
3714
3715 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3716 (get_xxxx_str): Use assert () instead of complain ().
3717 Remove return invokations in default cases.
3718 (get_decision_str): Modify default behaviour. Remove second argument.
3719 Echo modifications on calls.
3720 (output_graph): Fix.
3721
3722 2001-08-16 Marc Autret <autret_m@epita.fr>
3723
3724 * src/getargs.c (usage): Update with ``-g, --graph''.
3725
3726 2001-08-16 Marc Autret <autret_m@epita.fr>
3727
3728 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3729 (Option Cross Key): Likewise.
3730 * doc/bison.1: Update.
3731
3732 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3733
3734 * src/output.c (output_master_parser): Don't finish action_obstack.
3735 (output_parser): Don't care about the muscle action, here.
3736 (prepare): Copy the action_obstack in the action muscle.
3737 (output): Free action_obstack.
3738
3739 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3740
3741 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3742 will contain `%union' declaration.
3743 (parse_union_decl): Delete #line directive output.
3744 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3745 informations about %union.
3746 (parse_union_decl): Copy the union_obstack in the muscle stype.
3747 * src/bison.simple: Add new #line directive.
3748 Add typdef %%stype YYSTYPE.
3749
3750 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3751
3752 * src/bison.simple: Add new `#line' directive.
3753
3754 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3755
3756 * src/bison.simple: New `#line' directive.
3757 * src/output.c (output_parser): Support new dynamic muscle input_line.
3758
3759 2001-09-22 Marc Autret <autret_m@epita.fr>
3760
3761 * src/output.c (output_master_parser): New.
3762 (output_parser): Be more re-entrant.
3763
3764 2001-09-21 Marc Autret <autret_m@epita.fr>
3765
3766 * src/reader.c (copy_definition, parse_union_decl): Update and use
3767 `linef' muscle.
3768 (copy_action): Likewise.
3769 Use obstack_1grow ().
3770 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3771
3772 2001-09-21 Marc Autret <autret_m@epita.fr>
3773
3774 * src/options.c (option_table): Adjust.
3775 * src/lex.c (parse_percent_token): Fix.
3776
3777 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3778
3779 * src/options.c (symtab.h): Include it, need by lex.h.
3780
3781 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3782
3783 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3784 is now an option_table_struct*.
3785 (option_strcmp): New function option_strcmp.
3786 (parse_percent_token): Call option_strcmp.
3787 * src/getargs.c (xalloc.h, options.h): Include it.
3788 (getargs): Call create_long_option_table.
3789 (getargs): Free longopts at the end of the function.
3790 (shortopts): Move in options.c.
3791 * src/options.c (create_long_option_table): New function. Convert
3792 information from option_table to option structure.
3793 * src/reader.c (options.h): Include it.
3794
3795 * src/Makefile.am: Adjust.
3796 * src/options.c (option_table): Create from longopts and percent_table.
3797 * src/getargs.c (longopts): Delete.
3798 * src/lex.c (struct percent_table_struct): Delete.
3799 (percent_table): Delete.
3800 (options.h): Include it.
3801 * src/options.c: Create.
3802 * src/options.h: Create.
3803 Declare enum opt_access_e.
3804 Define struct option_table_struct.
3805
3806 2001-09-20 Marc Autret <autret_m@epita.fr>
3807
3808 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3809 sections of Bison.
3810
3811 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3812
3813 * src/bison.simple: s/%%filename/%%skeleton.
3814 * src/muscle_tab.c (getargs.h): Include it.
3815 (muscle_init): Insert new muscle skeleton.
3816
3817 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3818
3819 * src/output.c (output_parser): Delete unused variable actions_dumped.
3820
3821 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3822
3823 * src/output.c (output): Delete call to reader_output_yylsp.
3824 * src/reader.c (reader): Likewise.
3825 * src/reader.h: Delete declaration of reader_output_yylsp.
3826
3827 2001-09-02 Marc Autret <autret_m@epita.fr>
3828
3829 * src/reader.c: Include muscle_tab.h.
3830 (parse_union_decl): Update.
3831 (parse_macro_decl): Rename parse_muscle_decl.
3832 Update to use renamed functions and variable.
3833 (read_declarations, copy_action, read_additionnal_code, : Updated
3834 with correct variables and functions names.
3835 (packsymbols, reader): Likewise.
3836
3837 * src/reader.h (muscle_obstack): Extern declaration update.
3838
3839 * src/output.c: Include muscle_tab.h
3840 In all functions using macro_insert, change by using muscle_insert ().
3841 (macro_obstack): Rename muscle_obstack.
3842 Echo modifications in the whole file.
3843 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3844 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3845 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3846
3847 * src/muscle_tab.h: Update double inclusion macros.
3848 (macro_entry_s): Rename muscle_entry_s.
3849 Update prototypes.
3850
3851 * src/muscle_tab.c: Include muscle_tab.h.
3852 Rename macro_tabble to muscle_table.
3853 (mhash1, mhash2, mcmp): Use muscle_entry.
3854 (macro_init): Rename muscle_init. Update.
3855 (macro_insert): Rename muscle_insert. Update.
3856 (macro_find): Rename muscle_find. Update.
3857
3858 * src/main.c: Include muscle_tab.h.
3859 (main): Call muscle_init ().
3860 * src/Makefile.am (bison_SOURCES): Echo modifications.
3861
3862 2001-09-02 Marc Autret <autret_m@epita.fr>
3863
3864 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3865
3866 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3867
3868 2001-09-02 Marc Autret <autret_m@epita.fr>
3869
3870 * src/macrotab.c, src/macrotab.h: Remove.
3871
3872 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3873
3874 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3875 filename.
3876
3877 2001-09-01 Marc Autret <autret_m@epita.fr>
3878
3879 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3880 to an explicit value to activate the feature. We do it here.
3881
3882 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3883
3884 * src/output.c (prepare): Delete the `filename' muscule insertion.
3885 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3886 (parse_union_decl): Likewise.
3887 * src/macrotab.c (macro_init): Initialize filename by infile.
3888
3889 2001-08-31 Marc Autret <autret_m@epita.fr>
3890
3891 * src/bison.simple (YYLSP_NEEDED): New definition.
3892 * src/output.c (prepare): Add macro insertion of `locations_flag'
3893
3894 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3895
3896 * src/output.c (prepare): Delete insertion of previous muscles,
3897 and insert the `prefix' muscles.
3898 * src/macrotab.c (macro_init): Likewise.
3899 (macro_init): Initialization prefix directive by `yy'.
3900 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3901 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3902 yylval, yydebug, yyerror, yynerrs and yyparse.
3903 New directive `#define' to substitute yydebug, ... with option
3904 name_prefix.
3905
3906 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3907
3908 * src/main.c (main): Standardize.
3909 * src/output.c (output_table_data, output_parser): Likewise.
3910 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3911
3912 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3913
3914 * src/reader.c (read_additionnal_code): Rename %%user_code to
3915 %%epilogue.
3916 * src/output.c (output): Rename %%declarations to %%prologue.
3917 * src/bison.simple: Echo modifications.
3918
3919 2001-08-31 Marc Autret <autret_m@epita.fr>
3920
3921 * src/reader.c (readgram): CleanUp.
3922 (output_token_defines): Likewise.
3923 (packsymbols): Likewise.
3924 (reader): Likewise.
3925 * src/output.c (output): CPP-out useless code.
3926
3927 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3928
3929 * src/reader.c (reader): Delete obsolete call to function
3930 output_trailers and output_headers.
3931 * src/output.h: Remove obsolete functions prototypes of output_headers
3932 and output_trailers.
3933
3934 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3935
3936 * src/main.c: Include macrotab.h.
3937 * src/macrotab.h (macro_entry_s): Constify fields.
3938 Adjust functions prototypes.
3939 * src/macrotab.c (macro_insert): Constify key and value.
3940 (macro_find): Constify key.
3941 (macro_insert): Include 'xalloc.h'
3942 (macro_insert): Use XMALLOC.
3943 (macro_find): Constify return value.
3944 * src/output.c (output_table_data): Rename table to table_data.
3945 (output_parser): Constify macro_key, macro_value.
3946
3947 2001-08-30 Marc Autret <autret_m@epita.fr>
3948
3949 * src/reader.c (parse_skel_decl): New.
3950 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3951 * src/lex.h (token_t): New token `tok_skel'.
3952 * src/lex.c (percent_table): Add skeleton option entry.
3953 Standardize.
3954
3955 2001-08-29 Marc Autret <autret_m@epita.fr>
3956
3957 * src/bison.simple: Add %%user_code directive at the end.
3958 * src/reader.c (read_additionnal_code): New.
3959 (reader): Use it.
3960 * src/output.c (output_program): Remove.
3961 (output): Update.
3962
3963 2001-08-28 Marc Autret <autret_m@epita.fr>
3964
3965 * src/output.c (output_actions): Clean up.
3966 (output_gram): CPP-out useless code.
3967 * src/reader.c (reader): Clean up, CPP-out useless code.
3968
3969 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3970
3971 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3972 directive.
3973 * src/bison.simple: Add `%%definitions'.
3974
3975 2001-08-28 Marc Autret <autret_m@epita.fr>
3976
3977 * config/depcomp: New file.
3978
3979 2001-08-27 Paul Eggert <eggert@twinsun.com>
3980
3981 * src/bison.simple (yyparse): Don't take the address of an
3982 item before the start of an array, as that doesn't conform to
3983 the C Standard.
3984
3985 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3986
3987 * src/output.c (output): Remove the initialization of the macro
3988 obstack. It was done too late here.
3989
3990 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3991 completely wrong.
3992 (reader): Initialize the macro obstack here, since we need it to grow
3993 '%define' directives.
3994
3995 * src/reader.h: Declare the macro obstack as extern.
3996
3997 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3998
3999 * src/output.c (output_parser): Fix. Store single '%' characters in
4000 the output obstack instead of throwing them away.
4001
4002 2001-08-27 Akim Demaille <akim@epita.fr>
4003
4004 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
4005
4006 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4007
4008 * lib/Makefile.am: Adjust.
4009
4010 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4011
4012 * src/bison.simple: Update and add '%%' directives.
4013
4014 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4015
4016 * src/reader.c (reader): Remove calls to 'output_headers' and
4017 'output_trailers'. Remove some C output.
4018 (readgram): Disable a piece of code that was writing a default
4019 definition for 'YYSTYPE'.
4020 (reader_output_yylsp): Remove.
4021 (packsymbols): Output token defintions to a macro.
4022 (copy_definition): Disable C output.
4023
4024 * src/reader.c (parse_macro_decl): New function used to parse macro
4025 declarations.
4026 (copy_string2): Put the body of copy_string into this new function.
4027 Add a parameter to let the caller choose whether he wants to copy the
4028 string delimiters or not.
4029 (copy_string): Be a simple call to copy_string2 with the last argument
4030 bound to true.
4031 (read_declarations): Add case for macro definition.
4032 (copy_identifier): New.
4033 (parse_macro_decl): Read macro identifiers using copy_identifier
4034 rather than lex.
4035
4036 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4037
4038 * src/output.c (prepare): Add prefixed names.
4039 (output_parser): Output semantic actions.
4040 (output_parser): Fix bug on '%%line' directives.
4041
4042 * src/output.c (output_headers): Remove. The C code printed by this
4043 function should now be in the skeletons.
4044 (output_trailers): Remove.
4045 (output): Disable call to 'reader_output_yylsp'.
4046 (output_rule_data): Do not output tables to the table obstack.
4047
4048 * src/output.c: Remove some C dedicated output.
4049 Improve the use of macro and output obstacks.
4050 (output_defines): Remove.
4051
4052 * src/output.c (output_token_translations): Associate 'translate'
4053 table with a macro. No output to the table obstack.
4054 (output_gram): Same for 'rhs' and 'prhs'.
4055 (output_stos): Same for 'stos'.
4056 (output_rule_data): Same for 'r1' and 'r2'.
4057 (token_actions): Same for 'defact'.
4058 (goto_actions): Same for 'defgoto'.
4059 (output_base): Same for 'pact' and 'pgoto'.
4060 (output_table): Same for 'table'.
4061 (output_check): Same for 'check'.
4062
4063 * src/output.c (output_table_data): New function.
4064 (output_short_table): Remove.
4065 (output_short_or_char_table): Remove.
4066
4067 * src/output.c (output_parser): Replace most of the skeleton copy code
4068 with something new. Skeletons are now processed character by character
4069 rather than line by line, and Bison looks for '%%' macros. This is the
4070 first step in making Bison's output process (a lot) more flexible.
4071 (output_parser): Use the macro table.
4072
4073 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4074
4075 * src/main.c (main): Initialize the macro table.
4076
4077 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4078
4079 * src/lex.c (percent_table): Add tok_define.
4080 * src/lex.h: Add tok_define.
4081
4082 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4083
4084 * src/macrotab.c: New file.
4085 * src/macrotab.h: New file.
4086 * src/Makefile.am: Update.
4087
4088 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
4089
4090 * lib/hash.c: New file.
4091 * lib/hash.h: New file.
4092 * lib/Makefile.am: Update.
4093
4094 2001-08-15 Akim Demaille <akim@epita.fr>
4095
4096 Version 1.28c.
4097
4098 2001-08-15 Marc Autret <autret_m@epita.fr>
4099
4100 * src/reader.c (readgram): Indent output macro YYSTYPE.
4101 (packsymbols): Likewise.
4102 (output_token_defines): Likewise.
4103 * src/files.c: Standardize.
4104 (compute_header_macro): New.
4105 (defines_obstack_save): New. Use compute_header_macro.
4106 (output_files): Update. Use defines_obstack_save.
4107
4108 2001-08-15 Akim Demaille <akim@epita.fr>
4109
4110 * doc/bison.texinfo (Table of Symbols): Document
4111 YYSTACK_USE_ALLOCA.
4112
4113 2001-08-15 Akim Demaille <akim@epita.fr>
4114
4115 * missing: Update from CVS Automake.
4116 * config/config.guess, config/config.sub, config/texinfo.tex:
4117 Update from gnu.org.
4118
4119 2001-08-15 Akim Demaille <akim@epita.fr>
4120
4121 * Makefile.maint: Sync with CVS Autoconf.
4122
4123 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
4124
4125 * doc/bison.texinfo: Include GNU Free Documentation License from
4126 `fdl.texi'.
4127 * doc/fdl.texi: Add to package.
4128
4129 2001-08-14 Marc Autret <autret_m@epita.fr>
4130
4131 Turn on %{source,header}_extension features.
4132
4133 * src/lex.c (percent_table): Un-CPP out header_extension and
4134 source_extension.
4135 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
4136 (compute_exts_from_src): Remove conditions. It restores priorities
4137 between options.
4138
4139 2001-08-14 Marc Autret <autret_m@epita.fr>
4140
4141 * src/files.c (compute_base_names): Add extensions computing when
4142 `--file-prefix' used.
4143 Standardize function calls.
4144
4145 2001-08-13 Marc Autret <autret_m@epita.fr>
4146
4147 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
4148 defining it (defined but null disables alloca).
4149
4150 2001-08-13 Marc Autret <autret_m@epita.fr>
4151
4152 * src/bison.simple (_yy_memcpy): CPP reformat.
4153
4154 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
4155
4156 * tests/atconfig.in (CPPFLAGS): Fix.
4157
4158 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
4159
4160 * doc/bison.texinfo: Include GNU General Public License from
4161 `gpl.texi'.
4162 * doc/gpl.texi: Add to package.
4163
4164 2001-08-10 Marc Autret <autret_m@epita.fr>
4165
4166 * src/print_graph.h: Fix.
4167 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
4168
4169 2001-08-10 Akim Demaille <akim@epita.fr>
4170
4171 * src/system.h: Provide default declarations for stpcpy, strndup,
4172 and strnlen.
4173
4174 2001-08-10 Robert Anisko <anisko_r@epita.fr>
4175
4176 * doc/bison.texinfo (Locations): Update @$ stuff.
4177
4178 2001-08-09 Robert Anisko <anisko_r@epita.fr>
4179
4180 * src/bison.simple (YYLLOC_DEFAULT): Update.
4181 (yyparse): Adjust.
4182
4183 2001-08-08 Marc Autret <autret_m@epita.fr>
4184
4185 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
4186 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
4187 Reported by Fabrice Bauzac.
4188
4189 2001-08-08 Marc Autret <autret_m@epita.fr>
4190
4191 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
4192 * src/vcg.c (output_node): Fix.
4193 * src/vcg.h: Cleanup.
4194 * src/print_graph.c: Add comments.
4195 (node_output_size): New global variable. Simplify the formatting of
4196 the VCG graph output.
4197 (print_actions): Unused code is now used. It notifies the final state
4198 and no action states in the VCG graph. It also give the reduce actions.
4199 The `shift and goto' edges are red and the `go to state' edges are
4200 blue.
4201 Get the current node name and node_obstack by argument.
4202 (node_obstack): New variable.
4203 (print_state): Manage node_obstack.
4204 (print_core): Use node_obstack given by argument.
4205 A node is not only computed here but in print_actions also.
4206 (print_graph): CPP out useless code instead of commenting it.
4207
4208 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
4209
4210 * tests/atconfig.in (CPPFLAGS): Fix.
4211
4212 2001-08-07 Akim Demaille <akim@epita.fr>
4213
4214 * src/print_graph.c (quote): New.
4215 (print_core): Use it.
4216
4217 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
4218
4219 * src/vcg.c (complain.h): Include it.
4220 Unepitaize `return' invocations.
4221 [NDEBUG] (main): Remove.
4222 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
4223 * src/files.c (open_files): Initialize graph_obstack.
4224 * src/print_graph.c (print_actions): CPP out useless code.
4225 (print_core): Don't output the last `\n' in labels.
4226 Use `quote'.
4227 * src/files.c (output_files): Output the VCG file.
4228 * src/main.c (main): Invoke print_graph ();
4229
4230 2001-08-06 Marc Autret <autret_m@epita.fr>
4231
4232 Automaton VCG graph output.
4233 Using option ``-g'' or long option ``--graph'', you can generate
4234 a gram_filename.vcg file containing a VCG description of the LALR (1)
4235 automaton of your grammar.
4236
4237 * src/main.c: Call to print_graph() function.
4238 * src/getargs.h: Update.
4239 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
4240 (graph_flag): New flag.
4241 (longopts): Update.
4242 (getargs): Add case `g'.
4243 * src/files.c (graph_obstack): New obstack struct.
4244 (open_files): Initialize new obstack.
4245 (output_files): Saves graph_obstack if required.
4246 * src/files.h (graph_obstack): New extern declaration.
4247 * src/Makefile.am: Add new source files.
4248
4249 2001-08-06 Marc Autret <autret_m@epita.fr>
4250
4251 * src/print_graph.c, src/print_graph.h (graph): New.
4252 * src/vcg.h: New file.
4253 * src/vcg.c: New file, VCG graph handling.
4254
4255 2001-08-06 Marc Autret <autret_m@epita.fr>
4256
4257 Add of %source_extension and %header_extension which specify
4258 the source or/and the header output file extension.
4259
4260 * src/files.c (compute_base_names): Remove initialisation of
4261 src_extension and header_extension.
4262 (compute_exts_from_gf): Update.
4263 (compute_exts_from_src): Update.
4264 (output_files): Update.
4265 * src/reader.c (parse_header_extension_decl): New.
4266 (parse_source_extension_decl): New.
4267 (read_declarations): New case statements for the new tokens.
4268 * src/lex.c (percent_table): Add entries for %source_extension
4269 and %header_extension.
4270 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
4271
4272 2001-08-06 Marc Autret <autret_m@epita.fr>
4273
4274 * configure.in: Bump to 1.28c.
4275 * doc/bison.texinfo: Texinfo thingies.
4276
4277 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
4278
4279 * tests/atconfig.in (CPPFLAGS): Add.
4280 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
4281
4282 2001-08-03 Akim Demaille <akim@epita.fr>
4283
4284 Version 1.28b.
4285
4286 2001-08-03 Akim Demaille <akim@epita.fr>
4287
4288 * tests/Makefile.am (check-local): Ship testsuite.
4289 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
4290 Include `string.h'.
4291
4292 2001-08-03 Akim Demaille <akim@epita.fr>
4293
4294 * configure.in: Try using -Wformat when compiling.
4295
4296 2001-08-03 Akim Demaille <akim@epita.fr>
4297
4298 * configure.in: Bump to 1.28b.
4299
4300 2001-08-03 Akim Demaille <akim@epita.fr>
4301
4302 * src/complain.c: Adjust strerror_r portability issues.
4303
4304 2001-08-03 Akim Demaille <akim@epita.fr>
4305
4306 Version 1.28a.
4307
4308 2001-08-03 Akim Demaille <akim@epita.fr>
4309
4310 * src/getargs.c, src/getarg.h (skeleton)): Constify.
4311 * src/lex.c (literalchar): Avoid name clashes on `buf'.
4312 * src/getargs.c: Include complain.h.
4313 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
4314 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
4315
4316 2001-08-03 Akim Demaille <akim@epita.fr>
4317
4318 * src/reader.c (readgram): Display hidden chars in error messages.
4319
4320 2001-08-03 Akim Demaille <akim@epita.fr>
4321
4322 Update to gettext 0.10.39.
4323
4324 2001-08-03 Akim Demaille <akim@epita.fr>
4325
4326 * lib/strspn.c: New.
4327
4328 2001-08-01 Marc Autret <autret_m@epita.fr>
4329
4330 * doc/bison.texinfo: Update.
4331 * doc/bison.1 (mandoc): Update.
4332 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
4333 * src/files.c: Support output files extensions computing.
4334 (src_extension): New static variable.
4335 (header_extension): New static variable.
4336 (tr): New function.
4337 (get_extension_index): New function, gets the index of an extension
4338 filename in a string.
4339 (compute_exts_from_gf): New function, computes extensions from the
4340 grammar file extension.
4341 (compute_exts_from_src): New functions, computes extensions from the
4342 C source file extension, file given by ``-o'' option.
4343 (compute_base_names): Update.
4344 (output_files): Update.
4345
4346 2001-08-01 Robert Anisko <anisko_r@epita.fr>
4347
4348 * doc/bison.texi: Document @$.
4349 (Locations): New section.
4350
4351 2001-07-18 Akim Demaille <akim@epita.fr>
4352
4353 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
4354 * config/prev-version.txt, config/move-if-change: New.
4355 * Makefile.am: Adjust.
4356
4357 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
4358
4359 * src/bison.simple (yyparse): Suppress warning `comparaison
4360 between signed and unsigned'.
4361
4362 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
4363
4364 * src/getargs.h (raw_flag): Remove.
4365 * src/getargs.c: Die on `-r'/`--raw'.
4366 * src/lex.c (parse_percent_token): Die on `%raw'.
4367 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
4368 * tests/calc.at: Suppress test with option `--raw'.
4369
4370 2001-07-14 Akim Demaille <akim@epita.fr>
4371
4372 * config/: New.
4373 * configure.in: Require Autoconf 2.50.
4374 Update to gettext 0.10.38.
4375
4376 2001-03-16 Akim Demaille <akim@epita.fr>
4377
4378 * doc/bison.texinfo: ANSIfy the examples.
4379
4380 2001-03-16 Akim Demaille <akim@epita.fr>
4381
4382 * getargs.c (skeleton): New variable.
4383 (longopts): --skeleton is a new option.
4384 (shortopts, getargs): -S is a new option.
4385 * getargs.h: Declare skeleton.
4386 * output.c (output_parser): Use it.
4387
4388 2001-03-16 Akim Demaille <akim@epita.fr>
4389
4390 * m4/strerror_r.m4: New.
4391 * m4/error.m4: Run AC_FUNC_STRERROR_R.
4392 * lib/error.h, lib/error.c: Update.
4393
4394 2001-03-16 Akim Demaille <akim@epita.fr>
4395
4396 * src/getargs.c (longopts): Clean up.
4397
4398 2001-02-21 Akim Demaille <akim@epita.fr>
4399
4400 * src/reader.c (gensym): `gensym_count' is your own.
4401 Use a static buf to create the symbol name, as token_buffer is no
4402 longer a buffer.
4403
4404 2001-02-08 Akim Demaille <akim@epita.fr>
4405
4406 * src/conflicts.c (conflict_report): Be sure not to append to res
4407 between two calls, which could happen if both first sprintf were
4408 skipped, but not the first cp += strlen.
4409
4410 2001-02-08 Akim Demaille <akim@epita.fr>
4411
4412 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
4413 New, from fileutils 4.0.37.
4414 * configure.in: Require Autoconf 2.49c. I took some time before
4415 making this decision. This is the only way out for portability
4416 issues in Bison, it would mean way too much duplicate effort to
4417 import in Bison features implemented in 2.49c since 2.13.
4418 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
4419
4420 2001-02-02 Akim Demaille <akim@epita.fr>
4421
4422 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
4423 * lib/xalloc.h, lib/xmalloc.c: Update.
4424
4425 2001-01-19 Akim Demaille <akim@epita.fr>
4426
4427 Get rid of the ad hoc handling of token_buffer in the scanner: use
4428 the obstacks.
4429
4430 * src/lex.c (token_obstack): New.
4431 (init_lex): Initialize it. No longer call...
4432 (grow_token_buffer): this. Remove it.
4433 Adjust all the places which used it to use the obstack.
4434
4435 2001-01-19 Akim Demaille <akim@epita.fr>
4436
4437 * src/lex.h: Rename all the tokens:
4438 s/\bENDFILE\b/tok_eof/g;
4439 s/\bIDENTIFIER\b/tok_identifier/g;
4440 etc.
4441 Let them be enums, not #define, to ease debugging.
4442 Adjust all the code.
4443
4444 2001-01-18 Akim Demaille <akim@epita.fr>
4445
4446 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
4447 * src/lex.c (maxtoken, grow_token_buffer): Static.
4448
4449 2001-01-18 Akim Demaille <akim@epita.fr>
4450
4451 Since we now use obstacks, more % directives can be enabled.
4452
4453 * src/lex.c (percent_table): Also accept `%yacc',
4454 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
4455 `%debug'.
4456 Handle the actions for `%semantic_parser' and `%pure_parser' here,
4457 instead of returning a token.
4458 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
4459 * src/reader.c (read_declarations): Adjust.
4460 * src/files.c (open_files): Don't call `compute_base_names', don't
4461 compute `attrsfile' since they depend upon data which might be
4462 *in* the input file now.
4463 (output_files): Do it here.
4464 * src/output.c (output_headers): Document the fact that this patch
4465 introduces a guaranteed SEGV for semantic parsers.
4466 * doc/bison.texinfo: Document them.
4467 * tests/suite.at: Exercise these %options.
4468
4469 2000-12-20 Akim Demaille <akim@epita.fr>
4470
4471 Also handle the output file (--verbose) with obstacks.
4472
4473 * files.c (foutput): Remove.
4474 (output_obstack): New.
4475 Adjust all dependencies.
4476 * src/conflicts.c: Return a string.
4477 * src/system.h (obstack_grow_string): Rename as...
4478 (obstack_sgrow): this. Be ready to work with non literals.
4479 (obstack_fgrow4): New.
4480
4481 2000-12-20 Akim Demaille <akim@epita.fr>
4482
4483 * src/files.c (open_files): Fix the computation of short_base_name
4484 in the case of `-o foo.tab.c'.
4485
4486 2000-12-20 Akim Demaille <akim@epita.fr>
4487
4488 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
4489 (copy_dollar): Now that everything uses obstacks, get rid of the
4490 FILE * parameters.
4491
4492 2000-12-20 Akim Demaille <akim@epita.fr>
4493
4494 * src/files.c (open_files): Actually the `.output' file is based
4495 on the short_base_name, not base_name.
4496 * tests/suite.at (Checking output file names): Adjust.
4497
4498 2000-12-20 Akim Demaille <akim@epita.fr>
4499
4500 * src/bison.s1: Remove, we now use directly...
4501 * src/bison.simple: this.
4502 * src/Makefile.am: Use pkgdata instead of data.
4503
4504 2000-12-20 Akim Demaille <akim@epita.fr>
4505
4506 * src/files.c (guard_obstack): New.
4507 (open_files): Initialize it.
4508 (output_files): Dump it...
4509 * src/files.h: Export it.
4510 * src/reader.c (copy_guard): Use it.
4511
4512 2000-12-19 Akim Demaille <akim@epita.fr>
4513
4514 * src/files.c (outfile, defsfile, actfile): Removed as global
4515 vars.
4516 (open_files): Don't compute them.
4517 (output_files): Adjust.
4518 (base_name, short_base_name): Be global.
4519 Adjust dependencies.
4520
4521 2000-12-19 Akim Demaille <akim@epita.fr>
4522
4523 * src/files.c (strsuffix): New.
4524 (stringappend): Be just like strcat but allocate.
4525 (base_names): Eve out from open_files.
4526 Try to simplify the rather hairy computation of base_name and
4527 short_base_name.
4528 (open_files): Use it.
4529 * tests/suite.at (Checking output file names): New test.
4530
4531 2000-12-19 Akim Demaille <akim@epita.fr>
4532
4533 * src/system.h (obstack_grow_literal_string): Rename as...
4534 (obstack_grow_string): this.
4535 * src/output.c (output_parser): Recognize `%% actions' instead of
4536 `$'.
4537 * src/bison.s1: s/$/%% actions/.
4538 * src/bison.hairy: Likewise.
4539
4540 2000-12-19 Akim Demaille <akim@epita.fr>
4541
4542 * src/output.c (output_parser): Compute the `#line' lines when
4543 there are.
4544 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
4545 Suggested by Hans Aberg.
4546
4547 2000-12-19 Akim Demaille <akim@epita.fr>
4548
4549 Let the handling of the skeleton files be local to the procedures
4550 that use it.
4551
4552 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
4553 longer static.
4554 (fparser, open_extra_files): Remove.
4555 (open_files, output_files): Don't take care of fparser.
4556 * src/files.h: Adjust.
4557 * src/output.c (output_parser): Open and close the file to the
4558 skeleton.
4559 * src/reader.c (read_declarations): When %semantic_parser, open
4560 fguard.
4561
4562 2000-12-19 Akim Demaille <akim@epita.fr>
4563
4564 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
4565 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
4566
4567 2000-12-19 Akim Demaille <akim@epita.fr>
4568
4569 * src/files.c (open_files): Yipee! We no longer need all the code
4570 looking for `/tmp' since we have no tmp file.
4571
4572 2000-12-19 Akim Demaille <akim@epita.fr>
4573
4574 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4575 New macros.
4576 * src/files.c (open_files): Less dependency on MSDOS etc.
4577
4578 2000-12-14 Akim Demaille <akim@epita.fr>
4579
4580 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4581 Provide a default definition.
4582 Use it when executing the default @ action.
4583 * src/reader.c (reader_output_yylsp): No longer include
4584 `timestamp' and `text' in the default YYLTYPE.
4585
4586 2000-12-12 Akim Demaille <akim@epita.fr>
4587
4588 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4589 (copy_guard): Quote the file names.
4590 Reported by Laurent Mascherpa.
4591
4592 2000-12-12 Akim Demaille <akim@epita.fr>
4593
4594 * src/output.c (output_headers, output_program, output): Be sure
4595 to escape special characters when outputting filenames.
4596 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4597 (output_headers): Don't depend on them, Use ACTSTR.
4598
4599 2000-11-17 Akim Demaille <akim@epita.fr>
4600
4601 * lib/obstack.h: Formatting changes.
4602 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4603 prevents type checking.
4604 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4605 cast the value to (void *): assigning a `foo *' to a `void *'
4606 variable is valid.
4607 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4608 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4609 append characters.
4610
4611 2000-11-17 Akim Demaille <akim@epita.fr>
4612
4613 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4614 as...
4615 (suite.m4, regression.m4, calc.m4): these.
4616 * tests/atgeneral.m4: Update from CVS Autoconf.
4617
4618 2000-11-17 Akim Demaille <akim@epita.fr>
4619
4620 * tests/regression.m4 (%union and --defines): New test,
4621 demonstrating a current bug in the obstack implementation.
4622
4623 2000-11-17 Akim Demaille <akim@epita.fr>
4624
4625 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4626 macros.
4627 Use them to declare the variables which are global or local to
4628 `yyparse'.
4629
4630 2000-11-17 Akim Demaille <akim@epita.fr>
4631
4632 * acconfig.h: Remove, no longer used.
4633
4634 2000-11-07 Akim Demaille <akim@epita.fr>
4635
4636 * src: s/Copyright (C)/Copyright/g.
4637
4638 2000-11-07 Akim Demaille <akim@epita.fr>
4639
4640 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4641 defining.
4642 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4643
4644 2000-11-07 Akim Demaille <akim@epita.fr>
4645
4646 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4647 Merge in a single CPP if/else.
4648
4649 2000-11-07 Akim Demaille <akim@epita.fr>
4650
4651 * src/output.c (output): Remove useless variables.
4652 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4653 argument `data' for consistency with the prototypes.
4654 Qualify it `const'.
4655 (obstack_copy, obstack_copy0): Rename the second argument as
4656 `address' for consistency. Qualify it `const'.
4657 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4658 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4659 `const' their input argument (`data' or `address').
4660 Adjust the corresponding macros to include `const' in casts.
4661
4662 2000-11-03 Akim Demaille <akim@epita.fr>
4663
4664 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4665 s/PFILE1/BISON_HAIRY/.
4666 Adjust dependencies.
4667
4668 2000-11-03 Akim Demaille <akim@epita.fr>
4669
4670 For some reason, this was not applied.
4671
4672 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4673 `unlink': it's no longer used.
4674
4675 2000-11-03 Akim Demaille <akim@epita.fr>
4676
4677 * src/files.c (skeleton_find): New function, eved out of...
4678 (open_files, open_extra_files): here.
4679
4680 2000-11-03 Akim Demaille <akim@epita.fr>
4681
4682 Don't use `atexit'.
4683
4684 * src/files.c (obstack_save): New function.
4685 (done): Rename as...
4686 (output_files): this.
4687 Use `obstack_save'.
4688 * src/main.c (main): Don't use `atexit' to register `done', since
4689 it no longer has to remove tmp files, just call `output_files'
4690 when there are no errors.
4691
4692 2000-11-02 Akim Demaille <akim@epita.fr>
4693
4694 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4695 `unlink': it's no longer used.
4696 * src/files.h: Formatting changes.
4697
4698 2000-11-02 Akim Demaille <akim@epita.fr>
4699
4700 Remove the last uses of mktemp and unlink/delete.
4701
4702 * src/files.c (fdefines, ftable): Removed.
4703 (defines_ostack, table_obstack): New.
4704 Adjust dependencies of the former into uses of the latter.
4705 * src/output.c (output_short_or_char_table, output_short_table):
4706 Convert to using obstacks.
4707 * src/reader.c (copy_comment2): Accept one FILE * and two
4708 obstacks.
4709 (output_token_defines, reader_output_yylsp): Use obstacks.
4710 * src/system.h (obstack_fgrow3): New.
4711
4712 2000-11-01 Akim Demaille <akim@epita.fr>
4713
4714 Change each use of `fattrs' into a use of `attrs_obstack'.
4715
4716 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4717 * src/files.c (fattrs): Remove.
4718 (attrs_obstack): New.
4719 Adjust all dependencies.
4720 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4721
4722 2000-11-01 Akim Demaille <akim@epita.fr>
4723
4724 Introduce obstacks.
4725 Change each use of `faction' into a use of `action_obstack'.
4726
4727 * lib/obstack.h, lib/obstack.c: New files.
4728 * src/files.c (faction): Remove.
4729 (action_obstack): New.
4730 Adjust all dependencies.
4731
4732 2000-10-20 Akim Demaille <akim@epita.fr>
4733
4734 * lib/quote.h (PARAMS): New macro. Use it.
4735
4736 2000-10-16 Akim Demaille <akim@epita.fr>
4737
4738 * src/output.c (output_short_or_char_table): New function.
4739 (output_short_table, output_token_translations): Use it.
4740 (goto_actions): Use output_short_table.
4741
4742 2000-10-16 Akim Demaille <akim@epita.fr>
4743
4744 * src/symtab.c (bucket_new): New function.
4745 (getsym): Use it.
4746
4747 * src/output.c (output_short_table): New argument to display the
4748 comment associated with the table.
4749 Adjust dependencies.
4750 (output_gram): Use it.
4751 (output_rule_data): Nicer output layout for YYTNAME.
4752
4753 2000-10-16 Akim Demaille <akim@epita.fr>
4754
4755 * src/lex.c (read_typename): New function.
4756 (lex): Use it.
4757 * src/reader.c (copy_dollar): Likewise.
4758
4759 2000-10-16 Akim Demaille <akim@epita.fr>
4760
4761 * src/reader.c (copy_comment2): Expect the input stream to be on
4762 the `/' which is suspected to open a comment, instead of being
4763 called after `//' or `/*' was read.
4764 (copy_comment, copy_definition, parse_union_decl, copy_action)
4765 (copy_guard): Adjust.
4766
4767 2000-10-16 Akim Demaille <akim@epita.fr>
4768
4769 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4770 `read_signed_integer'.
4771
4772 2000-10-16 Akim Demaille <akim@epita.fr>
4773
4774 * src/reader.c (copy_dollar): New function.
4775 (copy_guard, copy_action): Use it.
4776
4777 2000-10-16 Akim Demaille <akim@epita.fr>
4778
4779 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4780 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4781 New files, from Fileutils 4.0.27.
4782 * src/main.c (printable_version): Remove.
4783 * src/lex.c, src/reader.c: Use `quote'.
4784
4785 2000-10-04 Akim Demaille <akim@epita.fr>
4786
4787 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4788
4789 2000-10-04 Akim Demaille <akim@epita.fr>
4790
4791 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4792
4793 2000-10-04 Akim Demaille <akim@epita.fr>
4794
4795 When a literal string is used to define two different tokens,
4796 `bison -v' segfaults.
4797 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4798
4799 * tests/regression.m4: New file.
4800 Include the core of the sample provided by Piotr Gackiewicz.
4801 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4802 properly.
4803
4804 2000-10-04 Akim Demaille <akim@epita.fr>
4805
4806 * src/reader.c (parse_expect_decl): Keep `count' within the size
4807 of `buffer'.
4808 From Neil Booth.
4809
4810 2000-10-02 Paul Eggert <eggert@twinsun.com>
4811
4812 * bison.s1 (yyparse): Assign the default value
4813 unconditionally, to avoid a GCC warning and make the parser a
4814 tad smaller.
4815
4816 2000-10-02 Akim Demaille <akim@epita.fr>
4817
4818 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4819 options.
4820
4821 2000-10-02 Akim Demaille <akim@epita.fr>
4822
4823 * src/derives.c, src/print.c, src/reduce.c: To ease the
4824 translation, move some `\n' out of the translated strings.
4825
4826 2000-10-02 Akim Demaille <akim@epita.fr>
4827
4828 The location tracking mechanism is precious for parse error
4829 messages. Nevertheless, it is enabled only when `@n' is used in
4830 the grammar, which is a different issue (you can use it in error
4831 message, but not in the grammar per se). Therefore, there should
4832 be another means to enable it.
4833
4834 * src/getargs.c (getargs): Support `--locations'.
4835 (usage): Report it.
4836 * src/getargs.h (locationsflag): Export it.
4837 * src/lex.c (percent_table): Support `%locations'.
4838 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4839 with `locationsflag'.
4840 * doc/bison.texinfo: Document `--locations' and `%locations'.
4841 Sort the options.
4842 * tests/calc.m4: Test it.
4843
4844 For regularity of the names, replace each
4845 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4846 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4847 In addition replace each `flag' with `_flag'.
4848
4849 2000-10-02 Akim Demaille <akim@epita.fr>
4850
4851 Also test parse error messages, including with YYERROR_VERBOSE.
4852
4853 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4854 associative).
4855 Use it to check the computations.
4856 Use it to check `nonassoc' is honored.
4857 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4858 `--yyerror-verbose'.
4859 (_AT_CHECK_CALC): Adjust to this option.
4860 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4861
4862 2000-10-02 Akim Demaille <akim@epita.fr>
4863
4864 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4865 the latter demonstrates a flaw in the handling of non debugging
4866 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4867 was used in order to simplify:
4868
4869 #if YYDEBUG
4870 if (yydebug)
4871 {
4872 ...
4873 }
4874 #endif
4875
4876 into
4877
4878 if (yydebug)
4879 {
4880 ...
4881 }
4882
4883 unfortunately this leads to a CPP conflict when
4884 `--name-prefix=foo' is used since it produces `#define yydebug
4885 foodebug'.
4886
4887 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4888 (YYDPRINTF): New macro.
4889 Spread its use.
4890 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4891 the bison options.
4892 Also test `--verbose', `--defines' and `--name-prefix'.
4893
4894 2000-10-02 Akim Demaille <akim@epita.fr>
4895
4896 Improve the readability of the produced parsers.
4897
4898 * src/bison.s1: Formatting changes.
4899 Improve the comment related to the `$' mark.
4900 (yydefault): Don't fall through to `yyresume': `goto' there.
4901 * src/output.c (output_parser): When the `$' is met, skip the end
4902 of its line.
4903 New variable, `number_of_dollar_signs', to check there's exactly
4904 one `$' in the parser skeleton.
4905
4906 2000-10-02 Akim Demaille <akim@epita.fr>
4907
4908 * lib/xstrdup.c: New file, from the fileutils.
4909 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4910 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4911 instead of strlen + xmalloc + strcpy.
4912 * src/symtab.c (copys): Remove, use xstrdup instead.
4913
4914 2000-10-02 Akim Demaille <akim@epita.fr>
4915
4916 * src/gram.h (associativity): New enum type which replaces the
4917 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4918 `right_assoc', `left_assoc' and `non_assoc'.
4919 Adjust all dependencies.
4920 * src/reader.c: Formatting changes.
4921 (LTYPESTR): Don't define it, use it as a literal in
4922 `reader_output_yylsp'.
4923 * src/symtab.h (symbol_class): New enum type which replaces the
4924 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4925 `sunknown', `stoken and `snterm'.
4926
4927 2000-10-02 Akim Demaille <akim@epita.fr>
4928
4929 * src/getargs.c (fixed_outfiles): Rename as...
4930 (yaccflag): for consistency and accuracy.
4931 Adjust dependencies.
4932
4933 2000-10-02 Akim Demaille <akim@epita.fr>
4934
4935 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4936 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4937 difficult and introduced a lot of core dump. It turns out that
4938 Bison used an implementation of `xmalloc' based on `calloc', and
4939 at various places it does depend upon the initialization to 0. I
4940 have not tried to isolate the pertinent places, and all the former
4941 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4942 someone should address this issue.
4943
4944 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4945 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4946 files.
4947 Adjust dependencies.
4948 * src/warshall.h: New file.
4949 Propagate.
4950
4951 2000-10-02 Akim Demaille <akim@epita.fr>
4952
4953 Various anti-`extern in *.c' changes.
4954
4955 * src/system.h: Include `assert.h'.
4956
4957 2000-10-02 Akim Demaille <akim@epita.fr>
4958
4959 * src/state.h (nstates, final_state, first_state, first_shift)
4960 (first_reduction): Move their exportation from here...
4961 * src/LR0.h: to here.
4962 Adjust dependencies.
4963 * src/getargs.c (statisticsflag): New variable.
4964 Add support for `--statistics'.
4965 Adjust dependencies.
4966
4967 Remove a lot of now useless `extern' statements in most files.
4968
4969 2000-10-02 Akim Demaille <akim@epita.fr>
4970
4971 * src/LR0.h: New file.
4972 Propagate its use.
4973
4974 2000-10-02 Akim Demaille <akim@epita.fr>
4975
4976 * src/print.h: New file.
4977 Propagate its use.
4978 * src/print.c: Formatting and ordering changes.
4979 (verbose, terse): Replace with...
4980 (print_results): this new function.
4981 Adjust dependencies.
4982
4983 2000-10-02 Akim Demaille <akim@epita.fr>
4984
4985 * src/conflicts.c (conflict_report): New function.
4986 (conflict_log, verbose_conflict_log): Replace with...
4987 (print_conflicts): this function.
4988 Adjust dependencies.
4989 * src/conflicts.h: New file.
4990 Propagate its inclusion.
4991
4992 2000-10-02 Akim Demaille <akim@epita.fr>
4993
4994 * src/nullable.h: New file.
4995 Propagate its inclusion.
4996 * src/nullable.c: Formatting changes.
4997
4998 2000-10-02 Akim Demaille <akim@epita.fr>
4999
5000 * src/reduce.h: New file.
5001 Propagate its inclusion.
5002 * src/reduce.c: Topological sort and other formatting changes.
5003 (bool, TRUE, FALSE): Move their definition to...
5004 * src/system.h: here.
5005
5006 2000-10-02 Akim Demaille <akim@epita.fr>
5007
5008 * src/files.c: Formatting changes.
5009 (tryopen, tryclose, openfiles): Rename as...
5010 (xfopen, xfclose, open_files): this.
5011 (stringappend): static.
5012 * src/files.h: Complete the list of exported symbols.
5013 Propagate its use.
5014
5015 2000-10-02 Akim Demaille <akim@epita.fr>
5016
5017 * src/reader.h: New file.
5018 Propagate its use instead of tedious list of `extern' and
5019 prototypes.
5020 * src/reader.c: Formatting changes, topological sort,
5021 s/register//.
5022
5023 2000-10-02 Akim Demaille <akim@epita.fr>
5024
5025 * src/lex.h: Prototype `lex.c' exported functions.
5026 * src/reader.c: Adjust.
5027 * src/lex.c: Formatting changes.
5028 (safegetc): Rename as...
5029 (xgetc): this.
5030
5031 2000-10-02 Akim Demaille <akim@epita.fr>
5032
5033 * src/lalr.h: New file.
5034 Propagate its inclusion instead of prototypes and `extern'.
5035 * src/lalr.c: Formatting changes, topological sorting etc.
5036
5037 2000-10-02 Akim Demaille <akim@epita.fr>
5038
5039 * src/output.c (token_actions): Introduce a temporary array,
5040 YYDEFACT, that makes it possible for this function to use
5041 output_short_table.
5042
5043 2000-10-02 Akim Demaille <akim@epita.fr>
5044
5045 `user_toknums' is output as a `short[]' in `output.c', while it is
5046 defined as a `int[]' in `reader.c'. For consistency with the
5047 other output tables, `user_toknums' is now defined as a table of
5048 shorts.
5049
5050 * src/reader.c (user_toknums): Be a short table instead of an int
5051 table.
5052 Adjust dependencies.
5053
5054 Factor the short table outputs.
5055
5056 * src/output.c (output_short_table): New function.
5057 * src/output.c (output_gram, output_stos, output_rule_data)
5058 (output_base, output_table, output_check): Use it.
5059
5060 2000-10-02 Akim Demaille <akim@epita.fr>
5061
5062 * src/output.c (output): Topological sort of the functions, in
5063 order to get rid of the `static' prototypes.
5064 No longer use `register'.
5065 * src/output.h: New file.
5066 Propagate its inclusion in files explicitly prototyping functions
5067 from output.c.
5068
5069 2000-09-21 Akim Demaille <akim@epita.fr>
5070
5071 * src/atgeneral.m4: Update from Autoconf.
5072
5073 2000-09-21 Akim Demaille <akim@epita.fr>
5074
5075 * src/closure.h: New file.
5076 * src/closure.c: Formatting changes, topological sort over the
5077 functions, use of closure.h.
5078 (initialize_closure, finalize_closure): Rename as...
5079 (new_closure, free_closure): these. Adjust dependencies.
5080 * src/LR0.c: Formatting changes, topological sort, use of
5081 cloture.h.
5082 (initialize_states): Rename as...
5083 (new_states): this.
5084 * src/Makefile.am (noinst_HEADERS): Adjust.
5085
5086 2000-09-20 Akim Demaille <akim@epita.fr>
5087
5088 * src/acconfig.h: Don't protect config.h against multiple
5089 inclusion.
5090 Don't define PARAMS.
5091 * src/system.h: Define PARAMS.
5092 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
5093 purpose of config.h. system.h must not try to fix wrong
5094 definitions in config.h.
5095
5096 2000-09-20 Akim Demaille <akim@epita.fr>
5097
5098 * src/derives.h: New file.
5099 * src/main.c, src/derives.h: Use it.
5100 Formatting changes.
5101 * src/Makefile.am (noinst_HEADERS): Adjust.
5102
5103 2000-09-20 Akim Demaille <akim@epita.fr>
5104
5105 * tests/atgeneral.m4: Update from Autoconf.
5106 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
5107 (AT_CHECK_CALC): New macros.
5108 Use these macros to test bison with options `', `--raw',
5109 `--debug', `--yacc', `--yacc --debug'.
5110
5111 2000-09-19 Akim Demaille <akim@epita.fr>
5112
5113 * src/output.c: Formatting changes.
5114 * src/machine.h: Remove, leaving its contents in...
5115 * src/system.h: here.
5116 Include stdio.h.
5117 Adjust all dependencies on stdio.h and machine.h.
5118 * src/getargs.h: New file.
5119 Let all `extern' declarations about getargs.c be replaced with
5120 inclusion of `getargs.h'.
5121 * src/Makefile.am (noinst_HEADERS): Adjust.
5122
5123 * tests/calc.m4 (yyin): Be initialized in main, not on the global
5124 scope.
5125 (yyerror): Returns void, not int.
5126 * doc/bison.texinfo: Formatting changes.
5127
5128 2000-09-19 Akim Demaille <akim@epita.fr>
5129
5130 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
5131 portable.
5132
5133 2000-09-18 Akim Demaille <akim@epita.fr>
5134
5135 * configure.in: Append WARNING_CFLAGS to CFLAGS.
5136 * src/Makefile.am (INCLUDES): Don't.
5137 Be ready to fetch headers in lib/.
5138
5139 2000-09-18 Akim Demaille <akim@epita.fr>
5140
5141 * doc/bison.texinfo: Update the copyright.
5142 ANSIfy and GNUify the examples.
5143 Remove the old menu.
5144
5145 2000-09-18 Akim Demaille <akim@epita.fr>
5146
5147 First set of tests: use the `calc' example from the documentation.
5148
5149 * src/bison.s1 (yyparse): Condition the code using `yytname' which
5150 is defined only when YYDEBUG is.
5151 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
5152 * src/files.c (tryopen, tryclose): Formatting changes.
5153 Move to the top and be static.
5154 * src/reader.c (read_signed_integer): Likewise.
5155 * tests/calc.m4: New file.
5156 * Makefile.am, suite.m4: Adjust.
5157 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
5158
5159 2000-09-18 Akim Demaille <akim@epita.fr>
5160
5161 Add support for an Autotest test suite for Bison.
5162
5163 * m4/m4.m4, m4/atconfig.m4: New files.
5164 * m4/Makefile.am (EXTRA_DIST): Adjust.
5165 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
5166 files.
5167 * src/getargs.c: Display a more standard --version message.
5168 * src/reader.c (reader): Formatting changes.
5169 No longer depend upon VERSION_STRING.
5170 * configure.in: No longer use `dnl'.
5171 Set up the test suite and the new directory `tests/.
5172 (VERSION_STRING): Remove.
5173
5174 2000-04-14 Akim Demaille <akim@epita.fr>
5175
5176 * src/reader.c (copy_comment2): New function, same as former
5177 `copy_comment', but outputs into two FILE *.
5178 (copy_comment): Use it.
5179 (parse_union_decl): Use it.
5180 (get_type, parse_start_decl): Use the same `invalid' message.
5181 (parse_start_decl, parse_union_decl): Use the same `multiple'
5182 message.
5183 (parse_union_decl, copy_guard, copy_action): Use the same
5184 `unmatched' message.
5185 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
5186
5187 2000-03-31 Akim Demaille <akim@epita.fr>
5188
5189 * src/files.c (tryopen, tryclose): Move to the top.
5190 Be static.
5191
5192 2000-03-31 Akim Demaille <akim@epita.fr>
5193
5194 * src/main.c (main): Don't call `done', exit does it.
5195
5196 2000-03-31 Akim Demaille <akim@epita.fr>
5197
5198 * allocate.c: s/return (foo)/return foo/.
5199 * lalr.c: Likewise.
5200 * LR0.c: Likewise.
5201 * output.c: Likewise.
5202 * reader.c: Likewise.
5203 * symtab.c: Likewise.
5204 * vmsgetargs.c: Likewise.
5205
5206 2000-03-31 Akim Demaille <akim@epita.fr>
5207
5208 Clean up the error reporting functions.
5209
5210 * src/report.c: New file.
5211 * src/report.h: Likewise.
5212 * src/Makefile.am: Adjust.
5213 * m4/error.m4: New file.
5214 * m4/Makefile.am: Adjust.
5215 * configure.in (jm_PREREQ_ERROR): Call it.
5216 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
5217 Remove.
5218 (fatal, fatals): Remove. All callers use complain.c::fatal.
5219 (warn, warni, warns, warnss, warnss): Remove. All callers use
5220 complain.c::complain.
5221 (toomany): Remove, use fatal instead.
5222 * src/files.c (done): No argument, use complain_message_count.
5223 * src/main.c (main): Register `done' to `atexit'.
5224
5225 * src/getargs.c (usage): More `fputs', less `fprintf'.
5226
5227 2000-03-28 Akim Demaille <akim@epita.fr>
5228
5229 * lib/: New directory.
5230 * Makefile.am (SUBDIRS): Adjust.
5231 * configure.in: Adjust.
5232 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
5233 useless.
5234 * src/alloca.c: Moved to lib/.
5235 * src/getopt.c: Likewise.
5236 * src/getopt1.c: Likewise.
5237 * src/getopt.h: Likewise.
5238 * src/ansi2knr.c: Likewise.
5239 * src/ansi2knr.1: Likewise.
5240 * src/Makefile.am: Adjust.
5241 * lib/Makefile.am: New file.
5242
5243 2000-03-28 Akim Demaille <akim@epita.fr>
5244
5245 * src/getargs.c (usage): Refresh the help message.
5246
5247 2000-03-17 Akim Demaille <akim@epita.fr>
5248
5249 * src/getopt1.c: Updated from textutils 2.0e
5250 * src/getopt.c: Likewise.
5251 * src/getopt.h: Likewise.
5252
5253 2000-03-17 Akim Demaille <akim@epita.fr>
5254
5255 * src/Makefile.am (bison.simple): Fix the awk program: quote only
5256 the file name, not the whole `#line LINE FILE'.
5257
5258 2000-03-17 Akim Demaille <akim@epita.fr>
5259
5260 On syntax errors, report the token on which we choked.
5261
5262 * src/bison.s1 (yyparse): In the label yyerrlab, when
5263 YYERROR_VERBOSE, add yychar in msg.
5264
5265 2000-03-17 Akim Demaille <akim@epita.fr>
5266
5267 * src/reader.c (copy_at): New function.
5268 (copy_guard): Use it.
5269 (copy_action): Use it.
5270
5271 2000-03-17 Akim Demaille <akim@epita.fr>
5272
5273 Be kind to translators, save some useless translations.
5274
5275 * src/main.c (banner): New function.
5276 (fatal_banner): Use it.
5277 (warn_banner): Use it.
5278
5279 2000-03-17 Akim Demaille <akim@epita.fr>
5280
5281 * src/reader.c (copy_definition): Use copy_string and
5282 copy_comment. Removed now unused `match', `ended',
5283 `cplus_comment'.
5284 (copy_comment, copy_string): Moved, to be visible from
5285 copy_definition.
5286
5287 2000-03-17 Akim Demaille <akim@epita.fr>
5288
5289 * src/reader.c (copy_string): Declare `static inline'. No
5290 problems with inline, since it is checked by configure.
5291 (copy_comment): Likewise.
5292
5293 2000-03-17 Akim Demaille <akim@epita.fr>
5294
5295 * src/reader.c (packsymbols): Formatting changes.
5296
5297 2000-03-17 Akim Demaille <akim@epita.fr>
5298
5299 * src/reader.c (copy_comment): New function, factored out from:
5300 (copy_action): Use it. Removed now unused `match', `ended',
5301 `cplus_comment'.
5302 (copy_guard): Likewise.
5303
5304 2000-03-17 Akim Demaille <akim@epita.fr>
5305
5306 * src/reader.c (copy_string): New function, factored out from:
5307 (copy_action): Use it.
5308 (copy_guard): Likewise.
5309
5310 2000-03-17 Akim Demaille <akim@epita.fr>
5311
5312 Change the handling of @s so that they behave exactly like $s.
5313 There is now a pseudo variable @$ (readble and writable), location
5314 of the lhs of the rule (by default ranging from the location of
5315 the first symbol of the rhs, to the location of the last symbol,
5316 or, if the rhs is empty, YYLLOC).
5317
5318 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
5319 yyval.
5320 (yyparse): When providing a default semantic action, provide a
5321 default location action.
5322 (after the $): No longer change `*YYLSP', just stack YYLOC the
5323 same way you stack YYVAL.
5324 * src/reader.c (read_declarations): Use warns.
5325 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
5326 (copy_action, case '@'): Likewise.
5327 Use a standard error message, to save useless work from
5328 translators.
5329
5330 2000-03-17 Akim Demaille <akim@epita.fr>
5331
5332 * src/bison.s1: Formatting and cosmetics changes.
5333 * src/reader.c: Likewise.
5334 Update the Copyright notice.
5335
5336 2000-03-17 Akim Demaille <akim@epita.fr>
5337
5338 * src/bison.s1 (#line): All set to `#line' only, since the
5339 Makefile now handles them.
5340
5341 2000-03-16 Akim Demaille <akim@epita.fr>
5342
5343 * src/output.c (output_rule_data): Output the documentation of
5344 some of the tables.
5345 (Copyright notice): Update.
5346 Formatting changes.
5347
5348 2000-03-16 Akim Demaille <akim@epita.fr>
5349
5350 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
5351 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
5352 One `#if YYDEBUG' remains, since it uses variables which are
5353 defined only if `YYDEBUG != 0'.
5354
5355 2000-03-16 Akim Demaille <akim@epita.fr>
5356
5357 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
5358 and related variables so that the similarities are highlighted.
5359
5360 2000-03-16 Akim Demaille <akim@epita.fr>
5361
5362 * src/bison.s1: Properly indent CPP directives.
5363
5364 2000-03-16 Akim Demaille <akim@epita.fr>
5365
5366 * src/bison.s1: Properly indent the `alloca' CPP section.
5367
5368 2000-03-16 Akim Demaille <akim@epita.fr>
5369
5370 Do not hard code values of directories in `configure.in'.
5371 Update the `configure' tool chain.
5372
5373 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
5374 src/makefile.am.
5375 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
5376 (AC_OUTPUT): Add m4/Makefile.
5377 Bump to bison 1.28a, 1.29 has never been released.
5378 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
5379 handled via src/Makefile.am.
5380 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
5381 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
5382 autoheader.
5383 * Makefile.am (SUBDIRS): Add m4.
5384 (ACLOCAL_AM_FLAGS): New variable.
5385 (AUTOMAKE_OPTIONS): Add check-news.
5386 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
5387 the proper line number and file name.
5388 (DEFS): Propagate the location of bison library files and of the
5389 locale files.
5390 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
5391 builddir.
5392 * acinclude.m4: Remove, replaced by the directory m4.
5393 * m4/Makefile.am (EXTRA_DIST): New variable.
5394 * m4/gettext.m4: New file, from the fileutils.
5395 * m4/lcmessage.m4: Likewise
5396 * m4/progtest.m4: Likewise.
5397 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
5398
5399 2000-03-10 Akim Demaille <akim@epita.fr>
5400
5401 * src/closure.c:
5402 Formatting changes of various comments.
5403 Respect the GNU coding standards at various places.
5404 Don't use `_()' when no translation is needed.
5405
5406 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5407
5408 * src/files.c:
5409 OS/2 honors TMPDIR environment variable.
5410
5411 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5412
5413 * doc/bison.texinfo: Tweaked spelling and grammar.
5414 Updated ISBN.
5415 Removed reference to price of printed copy.
5416 Mention BISON_SIMPLE and BISON_HAIRY.
5417
5418 1999-12-13 Jesse Thilo <jthilo@gnu.org>
5419
5420 * configure.in, NEWS:
5421 Bison 1.29 released.
5422
5423 1999-10-27 Jesse Thilo <jthilo@gnu.org>
5424
5425 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
5426 Added reference card.
5427
5428 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5429
5430 * po/ru.po: Added Russian translation.
5431
5432 1999-07-26 Jesse Thilo <jthilo@gnu.org>
5433
5434 * configure.in: Added Russian translation.
5435
5436 1999-07-06 Jesse Thilo <jthilo@gnu.org>
5437
5438 * configure.in, NEWS, README:
5439 Released version 1.28.
5440
5441 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5442
5443 * src/system.h:
5444 Squashed redefinition warning on some systems.
5445
5446 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
5447 Have configure build version string instead of relying on ANSI string
5448 concatentation.
5449
5450 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5451
5452 * po/POTFILES.in: Got rid of version.c.
5453
5454 1999-06-14 Jesse Thilo <jthilo@gnu.org>
5455
5456 * acconfig.h, configure.in:
5457 Have configure build version string instead of relying on ANSI string
5458 concatentation.
5459
5460 1999-06-08 Jesse Thilo <jthilo@gnu.org>
5461
5462 * doc/bison.1:
5463 Dropped mention of `+' for long-named options.
5464
5465 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5466
5467 * src/files.c: Added <unistd.h> for unlink().
5468
5469 * src/Makefile.am, src/system.h:
5470 I18n fixes.
5471
5472 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5473
5474 * README: Added a FAQ list.
5475
5476 * configure.in, acconfig.h:
5477 I18n fixes.
5478
5479 1999-05-30 Jesse Thilo <jthilo@gnu.org>
5480
5481 * doc/FAQ, doc/Makefile.am:
5482 Added a FAQ list.
5483
5484 1999-05-19 Jesse Thilo <jthilo@gnu.org>
5485
5486 * src/alloc.h, src/symtab.h, src/version.c:
5487 Protected inclusion of "config.h" with HAVE_CONFIG_H.
5488
5489 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5490
5491 * src/.cvsignore, src/Makefile.am:
5492 Reorganized: sources in `src', documentation in `doc'.
5493
5494 * src/lex.c (literalchar):
5495 fixed the code for escaping double quotes (thanks
5496 Jonathan Czisny.)
5497
5498 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5499
5500 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
5501 Adjusted paths to reflect directory reorganization.
5502
5503 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5504
5505 * doc/.cvsignore, doc/Makefile.am:
5506 Reorganized: sources in `src', documentation in `doc'.
5507
5508 1999-04-18 Jesse Thilo <jthilo@gnu.org>
5509
5510 * configure.in:
5511 Updated AC_INIT file to reflect directory reorganization.
5512
5513 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
5514 Reorganized: sources in `src', documentation in `doc'.
5515
5516 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5517
5518 * src/allocate.c:
5519 Don't declare calloc() and realloc() if not necessary.
5520
5521 1999-04-13 Jesse Thilo <jthilo@gnu.org>
5522
5523 * configure.in, acconfig.h, acinclude.m4:
5524 Don't declare calloc() and realloc() if not necessary.
5525
5526 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5527
5528 * po/.cvsignore: Added i18n support.
5529
5530 1999-03-23 Jesse Thilo <jthilo@gnu.org>
5531
5532 * acconfig.h, configure.in, Makefile.am:
5533 Added i18n support.
5534
5535 1999-03-22 Jesse Thilo <jthilo@gnu.org>
5536
5537 * src/bison.s1: Fixed #line numbers.
5538
5539 1999-03-15 Jesse Thilo <jthilo@gnu.org>
5540
5541 * po/es.po, po/fr.po, po/nl.po, po/de.po:
5542 Added PO files from Translation Project.
5543
5544 1999-03-03 Jesse Thilo <jthilo@gnu.org>
5545
5546 * Makefile.am:
5547 Added support for non-ANSI compilers (ansi2knr).
5548
5549 1999-02-16 Jesse Thilo <jthilo@gnu.org>
5550
5551 * configure.in: Bumped version number to 1.27.
5552
5553 * Makefile.am:
5554 Added `bison.simple' to list of files removed by `make distclean'.
5555
5556 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5557
5558 * src/files.c, src/files.h:
5559 Defined locations of parser files in config.h instead of Makefile.
5560
5561 1999-02-12 Jesse Thilo <jthilo@gnu.org>
5562
5563 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
5564 Defined locations of parser files in config.h instead of Makefile.
5565
5566 1999-02-09 Jesse Thilo <jthilo@gnu.org>
5567
5568 * Makefile.am:
5569 Removed inappropriate use of $< macro.
5570
5571 1999-02-05 Jesse Thilo <jthilo@gnu.org>
5572
5573 * po/Makefile.in.in, po/POTFILES.in:
5574 Add `po' directory skeleton.
5575
5576 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5577
5578 * README: Document help-bison list.
5579
5580 * configure.in: Add check for mkstemp().
5581
5582 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5583
5584 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5585 Hush a few compiler warnings.
5586
5587 * src/files.c:
5588 Add tryclose(), which verifies that fclose was successful.
5589 Hush a couple of compiler warnings.
5590
5591 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5592
5593 * Makefile.am, OChangeLog:
5594 ChangeLog is now automatically generated. Include the old version as
5595 OChangeLog.
5596
5597 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5598
5599 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
5600 Update FSF address.
5601
5602 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5603
5604 * doc/bison.texinfo: Fix formatting glitch.
5605
5606 * doc/bison.texinfo: Update FSF address.
5607
5608 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5609
5610 * acconfig.h: Update FSF address.
5611
5612 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5613
5614 * src/system.h:
5615 Don't define PACKAGE here, since config.h defines it.
5616
5617 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5618
5619 * src/reader.c: Update copyright date.
5620
5621 * src/main.c:
5622 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5623 favor of output directly to stderr (avoids buffer overruns).
5624
5625 * src/reader.c: Some checks for premature EOF.
5626
5627 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
5628 Use prototypes if the compiler understands them.
5629
5630 * src/files.c: Honor TMPDIR on Unix hosts.
5631 Use prototypes if the compiler understands them.
5632
5633 * src/reader.c:
5634 Fix a couple of buffer overrun bugs.
5635 Use prototypes if the compiler understands them.
5636
5637 * src/system.h: Include unistd.h and ctype.h.
5638 Use #ifdef instead of #if for NLS symbols.
5639
5640 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5641
5642 * doc/bison.texinfo:
5643 Delete comment "consider using @set for edition number, etc..." since
5644 we now are doing so.
5645
5646 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5647
5648 * configure.in:
5649 Use prototypes if the compiler understands them.
5650
5651 * NEWS: Document 1.26 highlights.
5652
5653 * Makefile.am: Require Automake 1.3 or later.
5654
5655 * acconfig.h:
5656 Use prototypes if the compiler understands them.
5657
5658 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5659
5660 * src/version.c:
5661 Use VERSION symbol from automake for version number.
5662
5663 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5664
5665 * acconfig.h, configure.in, version.cin:
5666 Use VERSION symbol from automake for version number.
5667
5668 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5669
5670 * Makefile.am:
5671 Distribute original version of simple parser (bison.s1), not built
5672 version (bison.simple).
5673
5674 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5675
5676 * doc/bison.texinfo: Add info dir entry.
5677
5678 * doc/bison.texinfo:
5679 Let automake put version number into documentation.
5680
5681 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5682
5683 * src/bison.cld, src/build.com, src/vmshlp.mar:
5684 Add non-RCS files from /gd/gnu/bison.
5685
5686 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5687
5688 * doc/bison.1:
5689 Document the BISON_HAIRY and BISON_SIMPLE variables.
5690
5691 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5692
5693 * src/version.c: Build version.c automatically.
5694
5695 * src/reader.c:
5696 Fix token numbering (used to start at 258, not 257).
5697
5698 * src/system.h: Include config.h.
5699
5700 * src/getargs.c: Update bug report address.
5701
5702 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5703 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5704
5705 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5706
5707 * Makefile.am:
5708 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5709
5710 * configure.in, version.cin:
5711 Build version.c automatically.
5712
5713 * AUTHORS: Add AUTHORS file.
5714
5715 * README: Update bug report address.
5716
5717 * bison.simple:
5718 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5719
5720 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5721 Add automake stuff.
5722
5723 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5724
5725 * doc/bison.texinfo: Clean up some formatting.
5726
5727 1998-05-05 Richard Stallman <rms@gnu.org>
5728
5729 * doc/bison.texinfo:
5730 Explain better why to make a pure parser.
5731
5732 1998-01-05 Richard Stallman <rms@gnu.org>
5733
5734 * src/files.c (openfiles):
5735 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5736 find a temporary directory, if possible. Do not unlink files while
5737 they are open.
5738
5739 1997-08-25 Richard Stallman <rms@gnu.org>
5740
5741 * src/reader.c (stack_offset;):
5742 Change some warni to warns.
5743
5744 * src/lex.c (literalchar): Use warns, not warni.
5745
5746 1997-06-28 Richard Stallman <rms@gnu.org>
5747
5748 * src/bison.s1: Add a Bison version comment.
5749
5750 * src/main.c (fatal, warn, berror):
5751 Use program_name.
5752
5753 1997-06-28 Richard Stallman <rms@gnu.org>
5754
5755 * Makefile.in (bison_version): New variable.
5756 (dist): Use that variable.
5757 (bison.s1): Substitute the Bison version into bison.simple.
5758
5759 * bison.simple: Add a Bison version comment.
5760
5761 1997-06-18 Richard Stallman <rms@gnu.org>
5762
5763 * src/main.c (fatal, warn, berror):
5764 Make error messages standard.
5765 (toomany): Improve error message text.
5766
5767 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
5768 new.h renamed to alloc.h.
5769
5770 1997-06-18 Richard Stallman <rms@gnu.org>
5771
5772 * Makefile.in: new.h renamed to alloc.h.
5773
5774 1997-05-24 Richard Stallman <rms@gnu.org>
5775
5776 * src/lex.c (literalchar):
5777 Fix the code for escaping \, " and '.
5778
5779 (lex): Avoid trouble when there are many chars
5780 to discard in a char literal with just several chars in it.
5781
5782 1997-05-17 Richard Stallman <rms@gnu.org>
5783
5784 * src/bison.s1:
5785 Use malloc, if using alloca is troublesome.
5786 (YYSTACK_USE_ALLOCA): New flag macro.
5787 Define it for some systems and compilers.
5788 (YYSTACK_ALLOC): New macro.
5789 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5790 If it was malloc'd, free it.
5791
5792 1997-05-17 Richard Stallman <rms@gnu.org>
5793
5794 * bison.simple:
5795 Use malloc, if using alloca is troublesome.
5796 (YYSTACK_USE_ALLOCA): New flag macro.
5797 Define it for some systems and compilers.
5798 (YYSTACK_ALLOC): New macro.
5799 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5800 If it was malloc'd, free it.
5801
5802 1997-04-23 Richard Stallman <rms@gnu.org>
5803
5804 * src/bison.s1:
5805 (alloca) [__hpux]: Always define as __builtin_alloca.
5806
5807 1997-04-23 Richard Stallman <rms@gnu.org>
5808
5809 * bison.simple:
5810 (alloca) [__hpux]: Always define as __builtin_alloca.
5811
5812 1997-04-22 Richard Stallman <rms@gnu.org>
5813
5814 * src/bison.s1:
5815 [__hpux]: Include alloca.h (right for HPUX 10)
5816 instead of declaring alloca (right for HPUX 9).
5817
5818 * src/bison.s1 (__yy_memcpy):
5819 Declare arg `count' as unsigned int.
5820 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5821
5822 1997-04-22 Richard Stallman <rms@gnu.org>
5823
5824 * bison.simple:
5825 [__hpux]: Include alloca.h (right for HPUX 10)
5826 instead of declaring alloca (right for HPUX 9).
5827
5828 * bison.simple (__yy_memcpy):
5829 Declare arg `count' as unsigned int.
5830 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5831
5832 1997-01-03 Richard Stallman <rms@gnu.org>
5833
5834 * src/allocate.c: [__STDC__ or _MSC_VER]:
5835 Declare calloc and realloc to return void *.
5836
5837 1997-01-02 Richard Stallman <rms@gnu.org>
5838
5839 * src/system.h:
5840 [_MSC_VER]: Include stdlib.h and process.h.
5841 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5842
5843 * src/main.c (main): Return FAILURE as a value.
5844 (printable_version): Declare arg as int, not char.
5845
5846 1997-01-02 Richard Stallman <rms@gnu.org>
5847
5848 * Makefile.in (dist):
5849 Explicitly check for symlinks, and copy them.
5850
5851 1996-12-19 Richard Stallman <rms@gnu.org>
5852
5853 * src/files.c:
5854 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5855
5856 1996-12-18 Paul Eggert <eggert@gnu.org>
5857
5858 * src/bison.s1 (yyparse):
5859 If __GNUC__ and YYPARSE_PARAM are both defined,
5860 declare yyparse to have a void * argument.
5861
5862 1996-12-18 Paul Eggert <eggert@gnu.org>
5863
5864 * bison.simple (yyparse):
5865 If __GNUC__ and YYPARSE_PARAM are both defined,
5866 declare yyparse to have a void * argument.
5867
5868 1996-12-17 Richard Stallman <rms@gnu.org>
5869
5870 * src/reduce.c (nbits): Add some casts.
5871
5872 1996-08-12 Richard Stallman <rms@gnu.org>
5873
5874 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5875
5876 1996-08-12 Richard Stallman <rms@gnu.org>
5877
5878 * bison.simple: Test _MSDOS as well as _MSDOS_.
5879
5880 1996-07-31 Richard Stallman <rms@gnu.org>
5881
5882 * src/bison.s1:
5883 [__sun && __i386]: Include alloca.h.
5884
5885 1996-07-31 Richard Stallman <rms@gnu.org>
5886
5887 * bison.simple:
5888 [__sun && __i386]: Include alloca.h.
5889
5890 1996-07-30 Richard Stallman <rms@gnu.org>
5891
5892 * src/bison.s1: Comment change.
5893
5894 * src/bison.s1: Test _MSDOS_, not MSDOS.
5895
5896 1996-07-30 Richard Stallman <rms@gnu.org>
5897
5898 * bison.simple: Comment change.
5899
5900 * bison.simple: Test _MSDOS_, not MSDOS.
5901
5902 1996-06-01 Richard Stallman <rms@gnu.org>
5903
5904 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
5905 Insert `_' macro around many string constants.
5906
5907 * src/main.c:
5908 Insert `_' macro around many string constants.
5909
5910 (main): Call setlocale, bindtextdomain and textdomain.
5911
5912 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5913 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5914 [ENABLE_NLS]: Include libintl.h.
5915 [ENABLE_NLS] (gettext): Define.
5916 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5917 (N_, PACKAGE, LOCALEDIR): New macros.
5918
5919 1996-06-01 Richard Stallman <rms@gnu.org>
5920
5921 * POTFILES.in: New file.
5922
5923 * Makefile.in (allocate.o):
5924 Define target explicitly.
5925
5926 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5927 (LDFLAGS): Set to @LDFLAGS@.
5928 (configure): Run autoconf only if preceding `cd' succeeds.
5929 (bison.s1): Redirect output to temporary file then move the
5930 temporary to the target, rather than redirecting directly to bison.s1.
5931 (clean): Remove config.status and config.log.
5932 (distclean): Don't remove config.status here.
5933
5934 1996-05-12 Richard Stallman <rms@gnu.org>
5935
5936 * src/bison.s1:
5937 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5938
5939 1996-05-12 Richard Stallman <rms@gnu.org>
5940
5941 * bison.simple:
5942 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5943
5944 1996-05-11 Richard Stallman <rms@gnu.org>
5945
5946 * src/bison.s1 (__yy_memcpy):
5947 Really reorder the args, as was supposedly done on Feb 14 1995.
5948 (yyparse): Calls changed accordingly.
5949
5950 1996-05-11 Richard Stallman <rms@gnu.org>
5951
5952 * Makefile.in (dist): Don't use $(srcdir).
5953
5954 * bison.simple (__yy_memcpy):
5955 Really reorder the args, as was supposedly done on Feb 14 1995.
5956 (yyparse): Calls changed accordingly.
5957
5958 1996-01-27 Richard Stallman <rms@gnu.org>
5959
5960 * src/output.c (output_rule_data):
5961 Test YYERROR_VERBOSE in the conditional
5962 around the definition of ttyname.
5963
5964 1995-12-29 Richard Stallman <rms@gnu.org>
5965
5966 * src/bison.s1:
5967 Fix line numbers in #line commands.
5968
5969 1995-12-29 Richard Stallman <rms@gnu.org>
5970
5971 * bison.simple:
5972 Fix line numbers in #line commands.
5973
5974 1995-12-27 Richard Stallman <rms@gnu.org>
5975
5976 * src/bison.s1 (YYPARSE_PARAM_DECL):
5977 In C++, make it always null.
5978 (YYPARSE_PARAM_ARG): New macro.
5979 (yyparse): Use YYPARSE_PARAM_ARG.
5980
5981 1995-12-27 Richard Stallman <rms@gnu.org>
5982
5983 * bison.simple (YYPARSE_PARAM_DECL):
5984 In C++, make it always null.
5985 (YYPARSE_PARAM_ARG): New macro.
5986 (yyparse): Use YYPARSE_PARAM_ARG.
5987
5988 1995-11-29 Richard Stallman <rms@gnu.org>
5989
5990 * doc/bison.texinfo:
5991 Describe literal string tokens, %raw, %no_lines, %token_table.
5992
5993 1995-11-29 Daniel Hagerty <hag@gnu.org>
5994
5995 * doc/bison.texinfo: Fixed update date
5996
5997 1995-10-16 Richard Stallman <rms@gnu.org>
5998
5999 * src/version.c: Version 1.25.
6000
6001 1995-10-16 Richard Stallman <rms@gnu.org>
6002
6003 * NEWS: *** empty log message ***
6004
6005 1995-10-16 Richard Stallman <rms@gnu.org>
6006
6007 * doc/bison.1, doc/bison.rnh:
6008 Add new options.
6009
6010 1995-10-15 Richard Stallman <rms@gnu.org>
6011
6012 * src/vmsgetargs.c, src/getargs.c:
6013 Added -n, -k, and -raw switches.
6014 (noparserflag, toknumflag, rawtoknumflag): New variables.
6015
6016 * src/symtab.h (SALIAS):
6017 New #define for adding aliases to %token.
6018 (struct bucket): Added `alias' field.
6019
6020 * src/reduce.c (reduce_grammar):
6021 Revise error message.
6022 (print_notices): Remove final `.' from error message.
6023
6024 * src/reader.c (reader_output_yylsp):
6025 New function.
6026 (readgram): Use `#if 0' around code that accepted %command
6027 inside grammar rules: The documentation doesn't allow it,
6028 and it will fail since the %command processors scan for the next %.
6029 (parse_token_decl): Extended the %token
6030 declaration to allow a multi-character symbol as an alias.
6031 (parse_thong_decl): New function.
6032 (read_declarations): Added %thong declarations.
6033 (read_declarations): Handle NOOP to deal with allowing
6034 % declarations as another means to specify the flags.
6035 (readgram): Allow %prec prior to semantics embedded in a rule.
6036 (skip_to_char, read_declarations, copy_definition)
6037 (parse_token_decl, parse_start_decl, parse_type_decl)
6038 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
6039 (get_type_name, copy_guard, copy_action, readgram)
6040 (get_type, packsymbols): Revised most error messages.
6041 Changed `fatal' to `warnxxx' to avoid aborting for error.
6042 Revised and use multiple warnxxx functions to avoid using VARARGS1.
6043 (read_declarations): Improve the error message for
6044 an invalid character. Do not abort.
6045 (read_declarations, copy_guard, copy_action): Use
6046 printable_version to avoid unprintable characters in printed output.
6047 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
6048 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
6049 Allow the type of a non-terminal can be given
6050 more than once, as long as all specifications give the same type.
6051
6052 * src/output.c:
6053 (output_headers, output_trailers, output, output_gram)
6054 (output_rule_data): Implement noparserflag variable.
6055 Implement toknumflag variable.
6056 (output): Call reader_output_yylsp to output LTYPESTR.
6057
6058 * src/main.c (main):
6059 If reader sees an error, don't process the grammar.
6060 (fatals): Updated to not use VARARGS1.
6061 (printable_version, int_to_string, warn, warni, warns, warnss)
6062 (warnsss): New error reporting functions. Avoid abort for error.
6063
6064 * src/lex.h:
6065 Added THONG and NOOP for alias processing.
6066 Added SETOPT for the new code that allows setting options with %flags.
6067
6068 * src/lex.c:
6069 Include getopt.h. Add some extern decls.
6070 (safegetc): New function to deal with EOF gracefully.
6071 (literalchar); new function to deal with reading \ escapes.
6072 (lex): Use literalchar.
6073 (lex): Implemented "..." tokens.
6074 (literalchar, lex, parse_percent_token): Made tokenbuffer
6075 always contain the token. This includes growing the token
6076 buffer while reading an integer.
6077 (parse_percent_token): Replaced if-else statement with percent_table.
6078 (parse_percent_token): Added % declarations as another
6079 way to specify the flags -n, -l, and -r. Also added hooks for
6080 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
6081 major changes to files.c.
6082 (lex) Retain in the incoming stream a character following
6083 an incorrect '/'.
6084 (skip_white_space, lex): Revised most error messages
6085 and changed fatal to warn to avoid aborting.
6086 (percent_table): Added %thong declarations.
6087
6088 * src/gram.h: Comment changes.
6089
6090 * src/files.c (openfiles, open_extra_files, done):
6091 Add faction flag
6092 and actfile file. Handle noparserflag. Both for -n switch.
6093
6094 * src/conflicts.c (resolve_sr_conflict):
6095 Remove use of alloca.
6096
6097 1995-06-01 Jim Meyering <meyering@gnu.org>
6098
6099 * doc/bison.texinfo: *** empty log message ***
6100
6101 1995-05-06 Richard Stallman <rms@gnu.org>
6102
6103 * src/bison.s1: Comment change.
6104
6105 1995-05-06 Richard Stallman <rms@gnu.org>
6106
6107 * bison.simple: Comment change.
6108
6109 1995-05-03 Richard Stallman <rms@gnu.org>
6110
6111 * src/version.c: Version now 1.24.
6112
6113 * src/bison.s1: Change distribution terms.
6114
6115 * src/version.c: Version now 1.23.
6116
6117 1995-05-03 Richard Stallman <rms@gnu.org>
6118
6119 * doc/bison.texinfo:
6120 Rewrite "Conditions for Using Bison".
6121 Update version to 1.24.
6122
6123 1995-05-03 Richard Stallman <rms@gnu.org>
6124
6125 * bison.simple: Change distribution terms.
6126
6127 1995-02-23 Richard Stallman <rms@gnu.org>
6128
6129 * src/files.c: Test __VMS_POSIX as well as VMS.
6130
6131 1995-02-14 Jim Meyering <meyering@gnu.org>
6132
6133 * src/bison.s1 (__yy_memcpy):
6134 Renamed from __yy_bcopy to avoid
6135 confusion. Reverse FROM and TO arguments to be consistent with
6136 those of memcpy.
6137
6138 1995-02-14 Jim Meyering <meyering@gnu.org>
6139
6140 * bison.simple (__yy_memcpy):
6141 Renamed from __yy_bcopy to avoid
6142 confusion. Reverse FROM and TO arguments to be consistent with
6143 those of memcpy.
6144
6145 1994-11-10 David J. MacKenzie <djm@gnu.org>
6146
6147 * NEWS: reformat
6148
6149 * NEWS: New file.
6150
6151 * Makefile.in (DISTFILES): Include NEWS.
6152
6153 * Makefile.in (DISTFILES):
6154 Include install-sh, not install.sh.
6155
6156 * configure.in: Update to Autoconf v2 macro names.
6157
6158 1994-10-05 David J. MacKenzie <djm@gnu.org>
6159
6160 * Makefile.in: fix typo
6161
6162 * Makefile.in (prefix, exec_prefix):
6163 Let configure set them.
6164
6165 1994-09-28 David J. MacKenzie <djm@gnu.org>
6166
6167 * Makefile.in: Set datadir to $(prefix)/share.
6168
6169 1994-09-15 Richard Stallman <rms@gnu.org>
6170
6171 * src/bison.s1:
6172 Update copyright notice and GPL version.
6173
6174 1994-09-15 Richard Stallman <rms@gnu.org>
6175
6176 * bison.simple:
6177 Update copyright notice and GPL version.
6178
6179 1994-07-12 Richard Stallman <rms@gnu.org>
6180
6181 * src/reduce.c, src/reader.c:
6182 entered into RCS
6183
6184 1994-05-05 David J. MacKenzie <djm@gnu.org>
6185
6186 * Makefile.in: entered into RCS
6187
6188 1994-03-26 Richard Stallman <rms@gnu.org>
6189
6190 * src/bison.s1: entered into RCS
6191
6192 1994-03-26 Richard Stallman <rms@gnu.org>
6193
6194 * bison.simple: entered into RCS
6195
6196 1994-03-25 Richard Stallman <rms@gnu.org>
6197
6198 * src/main.c: entered into RCS
6199
6200 1994-03-24 Richard Stallman <rms@gnu.org>
6201
6202 * src/conflicts.c: entered into RCS
6203
6204 1994-01-02 Richard Stallman <rms@gnu.org>
6205
6206 * Makefile.in: *** empty log message ***
6207
6208 1993-11-21 Richard Stallman <rms@gnu.org>
6209
6210 * src/bison.s1: *** empty log message ***
6211
6212 1993-11-21 Richard Stallman <rms@gnu.org>
6213
6214 * doc/bison.texinfo: entered into RCS
6215
6216 * doc/bison.texinfo: *** empty log message ***
6217
6218 1993-11-21 Richard Stallman <rms@gnu.org>
6219
6220 * bison.simple: *** empty log message ***
6221
6222 1993-10-25 David J. MacKenzie <djm@gnu.org>
6223
6224 * doc/bison.texinfo: *** empty log message ***
6225
6226 1993-10-19 Richard Stallman <rms@gnu.org>
6227
6228 * src/bison.s1: *** empty log message ***
6229
6230 1993-10-19 Richard Stallman <rms@gnu.org>
6231
6232 * bison.simple: *** empty log message ***
6233
6234 1993-10-14 Richard Stallman <rms@gnu.org>
6235
6236 * src/bison.s1: *** empty log message ***
6237
6238 1993-10-14 Richard Stallman <rms@gnu.org>
6239
6240 * bison.simple: *** empty log message ***
6241
6242 1993-09-14 David J. MacKenzie <djm@gnu.org>
6243
6244 * doc/bison.texinfo: *** empty log message ***
6245
6246 1993-09-13 Noah Friedman <friedman@gnu.org>
6247
6248 * Makefile.in: *** empty log message ***
6249
6250 1993-09-10 Richard Stallman <rms@gnu.org>
6251
6252 * src/conflicts.c: *** empty log message ***
6253
6254 * src/system.h: entered into RCS
6255
6256 1993-09-10 Richard Stallman <rms@gnu.org>
6257
6258 * doc/bison.1: entered into RCS
6259
6260 1993-09-06 Noah Friedman <friedman@gnu.org>
6261
6262 * src/version.c: entered into RCS
6263
6264 1993-09-06 Noah Friedman <friedman@gnu.org>
6265
6266 * Makefile.in: *** empty log message ***
6267
6268 1993-07-30 David J. MacKenzie <djm@gnu.org>
6269
6270 * Makefile.in: *** empty log message ***
6271
6272 1993-07-24 Richard Stallman <rms@gnu.org>
6273
6274 * src/bison.s1: *** empty log message ***
6275
6276 1993-07-24 Richard Stallman <rms@gnu.org>
6277
6278 * bison.simple: *** empty log message ***
6279
6280 1993-07-08 David J. MacKenzie <djm@gnu.org>
6281
6282 * Makefile.in: *** empty log message ***
6283
6284 1993-07-04 Richard Stallman <rms@gnu.org>
6285
6286 * src/bison.s1: *** empty log message ***
6287
6288 1993-07-04 Richard Stallman <rms@gnu.org>
6289
6290 * bison.simple: *** empty log message ***
6291
6292 1993-06-26 David J. MacKenzie <djm@gnu.org>
6293
6294 * src/getargs.c: entered into RCS
6295
6296 1993-06-26 David J. MacKenzie <djm@gnu.org>
6297
6298 * doc/bison.texinfo: *** empty log message ***
6299
6300 * doc/bison.1: New file.
6301
6302 1993-06-25 Richard Stallman <rms@gnu.org>
6303
6304 * src/getargs.c: New file.
6305
6306 1993-06-16 Richard Stallman <rms@gnu.org>
6307
6308 * src/bison.s1: *** empty log message ***
6309
6310 1993-06-16 Richard Stallman <rms@gnu.org>
6311
6312 * bison.simple: *** empty log message ***
6313
6314 1993-06-03 Richard Stallman <rms@gnu.org>
6315
6316 * src/bison.s1: New file.
6317
6318 1993-06-03 Richard Stallman <rms@gnu.org>
6319
6320 * doc/bison.texinfo: *** empty log message ***
6321
6322 1993-06-03 Richard Stallman <rms@gnu.org>
6323
6324 * bison.simple: New file.
6325
6326 1993-05-19 Richard Stallman <rms@gnu.org>
6327
6328 * doc/bison.texinfo: New file.
6329
6330 1993-05-07 Noah Friedman <friedman@gnu.org>
6331
6332 * Makefile.in: *** empty log message ***
6333
6334 1993-04-28 Noah Friedman <friedman@gnu.org>
6335
6336 * src/reader.c: *** empty log message ***
6337
6338 1993-04-23 Noah Friedman <friedman@gnu.org>
6339
6340 * src/alloc.h: entered into RCS
6341
6342 1993-04-20 David J. MacKenzie <djm@gnu.org>
6343
6344 * src/version.c: *** empty log message ***
6345
6346 * src/files.c, src/allocate.c:
6347 entered into RCS
6348
6349 * src/reader.c: *** empty log message ***
6350
6351 * src/lex.c: entered into RCS
6352
6353 * src/conflicts.c: New file.
6354
6355 * src/symtab.c: entered into RCS
6356
6357 * src/alloc.h: New file.
6358
6359 * src/LR0.c: entered into RCS
6360
6361 1993-04-18 Noah Friedman <friedman@gnu.org>
6362
6363 * src/reader.c: New file.
6364
6365 * src/version.c: *** empty log message ***
6366
6367 1993-04-18 Noah Friedman <friedman@gnu.org>
6368
6369 * Makefile.in: *** empty log message ***
6370
6371 1993-04-17 Noah Friedman <friedman@gnu.org>
6372
6373 * Makefile.in: *** empty log message ***
6374
6375 1993-04-15 Richard Stallman <rms@gnu.org>
6376
6377 * src/main.c, src/files.c:
6378 New file.
6379
6380 1993-04-15 Noah Friedman <friedman@gnu.org>
6381
6382 * configure.in: entered into RCS
6383
6384 * configure.in: *** empty log message ***
6385
6386 * configure.in: New file.
6387
6388 1993-04-14 Richard Stallman <rms@gnu.org>
6389
6390 * Makefile.in: New file.
6391
6392 1993-04-13 Richard Stallman <rms@gnu.org>
6393
6394 * src/version.c: New file.
6395
6396 1993-03-25 Richard Stallman <rms@gnu.org>
6397
6398 * src/output.c: entered into RCS
6399
6400 1992-09-25 Richard Stallman <rms@gnu.org>
6401
6402 * configure.bat: entered into RCS
6403
6404 1992-06-22 Richard Stallman <rms@gnu.org>
6405
6406 * src/vmsgetargs.c: entered into RCS
6407
6408 1992-06-22 Richard Stallman <rms@gnu.org>
6409
6410 * doc/bison.rnh: entered into RCS
6411
6412 1992-04-20 David J. MacKenzie <djm@gnu.org>
6413
6414 * README: entered into RCS
6415
6416 1992-01-22 Richard Stallman <rms@gnu.org>
6417
6418 * src/machine.h: entered into RCS
6419
6420 1991-12-21 Richard Stallman <rms@gnu.org>
6421
6422 * src/lalr.c, src/closure.c:
6423 entered into RCS
6424
6425 1991-12-20 Richard Stallman <rms@gnu.org>
6426
6427 * src/state.h: entered into RCS
6428
6429 1991-12-18 Richard Stallman <rms@gnu.org>
6430
6431 * src/print.c, src/nullable.c, src/derives.c:
6432 entered into RCS
6433
6434 1991-11-03 David J. MacKenzie <djm@gnu.org>
6435
6436 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
6437 entered into RCS
6438
6439 1988-09-09 Richard Stallman <rms@gnu.org>
6440
6441 * src/bison.hairy: entered into RCS
6442
6443 1987-12-16 Richard Stallman <rms@gnu.org>
6444
6445 * REFERENCES: entered into RCS
6446 -----
6447
6448 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6449
6450 This file is part of GNU Autoconf.
6451
6452 GNU Autoconf is free software; you can redistribute it and/or modify
6453 it under the terms of the GNU General Public License as published by
6454 the Free Software Foundation; either version 2, or (at your option)
6455 any later version.
6456
6457 GNU Autoconf is distributed in the hope that it will be useful,
6458 but WITHOUT ANY WARRANTY; without even the implied warranty of
6459 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6460 GNU General Public License for more details.
6461
6462 You should have received a copy of the GNU General Public License
6463 along with autoconf; see the file COPYING. If not, write to
6464 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6465 Boston, MA 02111-1307, USA.