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