]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/skeleton.h: Fix the #endif.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-05-01 Akim Demaille <akim@epita.fr>
2
3 * src/skeleton.h: Fix the #endif.
4 Reported by Magnus Fromreide.
5
62002-04-26 Paul Eggert <eggert@twinsun.com>
7
8 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9 Define if we define YYSTYPE and YYLTYPE, respectively.
10 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11
122002-04-25 Robert Anisko <robert@lrde.epita.fr>
13
14 * src/scan-skel.l: Postprocess quadrigraphs.
15
16 * src/reader.c (copy_character): New function, used to output
17 single characters while replacing `[' and `]' with quadrigraphs, to
18 avoid troubles with M4 quotes.
19 (copy_comment): Output characters with copy_character.
20 (read_additionnal_code): Likewise.
21 (copy_string2): Likewise.
22 (copy_definition): Likewise.
23
24 * tests/calc.at: Exercise M4 quoting.
25
262002-04-25 Akim Demaille <akim@epita.fr>
27
28 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
29 between `!' and the command.
30 Reported by Paul Eggert.
31
322002-04-24 Robert Anisko <robert@lrde.epita.fr>
33
34 * tests/calc.at: Exercise prologue splitting.
35
36 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
37 `b4_post_prologue' instead of `b4_prologue'.
38
39 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
40 muscles.
41 (output): Free pre_prologue_obstack and post_prologue_obstack.
42 * src/files.h, src/files.c (attrs_obstack): Remove.
43 (pre_prologue_obstack, post_prologue_obstack): New.
44 * src/reader.c (copy_definition): Add a parameter to specify the
45 obstack to fill, instead of using attrs_obstack unconditionally.
46 (read_declarations): Pass pre_prologue_obstack to copy_definition if
47 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
48
492002-04-23 Paul Eggert <eggert@twinsun.com>
50
51 * data/bison.simple: Remove unnecessary commentary and white
52 space differences from 1_29-branch.
53 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
54
55 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
56 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
57 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
58 constructors or destructors.
59
60 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
61
622002-04-23 Akim Demaille <akim@epita.fr>
63
64 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
65 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
66 location with columns.
67 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
68 All reported by Paul Eggert.
69
702002-04-22 Akim Demaille <akim@epita.fr>
71
72 * src/reduce.c (dump_grammar): Move to...
73 * src/gram.h, src/gram.c (grammar_dump): here.
74 Be sure to separate long item numbers.
75 Don't read the members of a rule's prec if its nil.
76
772002-04-22 Akim Demaille <akim@epita.fr>
78
79 * src/output.c (table_size, table_grow): New.
80 (MAXTABLE): Remove, replace uses with table_size.
81 (pack_vector): Instead of dying when the table is too big, grow it.
82
832002-04-22 Akim Demaille <akim@epita.fr>
84
85 * data/bison.simple (yyr1): Its type is that of a token number.
86 * data/bison.c++ (r1_): Likewise.
87 * tests/regression.at (Web2c Actions): Adjust.
88
892002-04-22 Akim Demaille <akim@epita.fr>
90
91 * src/reader.c (token_translations_init): 256 is now the default
92 value for the error token, i.e., it will be assigned another
93 number if the user assigned 256 to one of her tokens.
94 (reader): Don't force 256 to error.
95 * doc/bison.texinfo (Symbols): Adjust.
96 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
97 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
98 etc. instead of 10, 20, 30 (which was used to `jump' over error
99 (256) and undefined (2)).
100
1012002-04-22 Akim Demaille <akim@epita.fr>
102
103 Propagate more token_number_t.
104
105 * src/gram.h (token_number_as_item_number)
106 (item_number_as_token_number): New.
107 * src/output.c (GENERATE_OUTPUT_TABLE): New.
108 Use it to create output_item_number_table and
109 output_token_number_table.
110 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
111 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
112 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
113 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
114
1152002-04-22 Akim Demaille <akim@epita.fr>
116
117 * src/output.h, src/output.c (get_lines_number): Remove.
118
1192002-04-19 Akim Demaille <akim@epita.fr>
120
121 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
122 as Lex/Flex'.
123 (Debugging): More details about enabling the debugging features.
124 (Table of Symbols): Describe $$, $n, @$, and @n.
125 Suggested by Tim Josling.
126
1272002-04-19 Akim Demaille <akim@epita.fr>
128
129 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
130
1312002-04-10 Akim Demaille <akim@epita.fr>
132
133 * src/system.h: Rely on HAVE_LIMITS_H.
134 Suggested by Paul Eggert.
135
1362002-04-09 Akim Demaille <akim@epita.fr>
137
138 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
139 full stderr, and strip it according to the bison options, instead
140 of composing the error message from different bits.
141 This makes it easier to check for several error messages.
142 Adjust all the invocations.
143 Add an invocation exercising the error token.
144 Add an invocation demonstrating a stupid error message.
145 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
146 Adjust the tests.
147 Error message are for stderr, not stdout.
148
1492002-04-09 Akim Demaille <akim@epita.fr>
150
151 * src/gram.h, src/gram.c (error_token_number): Remove, use
152 errtoken->number.
153 * src/reader.c (reader): Don't specify the user token number (2)
154 for $undefined, as it uselessly prevents using it.
155 * src/gram.h (token_number_t): Move to...
156 * src/symtab.h: here.
157 (state_t.number): Is a token_number_t.
158 * src/print.c, src/reader.c: Use undeftoken->number instead of
159 hard coded 2.
160 (Even though this 2 is not the same as above: the number of the
161 undeftoken remains being 2, it is its user token number which
162 might not be 2).
163 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
164 `user_token_number_max'.
165 Output `undef_token_number'.
166 * data/bison.simple, data/bison.c++: Use them.
167 Be sure to map invalid yylex return values to
168 `undef_token_number'. This saves us from gratuitous SEGV.
169
170 * tests/conflicts.at (Solved SR Conflicts)
171 (Unresolved SR Conflicts): Adjust.
172 * tests/regression.at (Web2c Actions): Adjust.
173
1742002-04-08 Akim Demaille <akim@epita.fr>
175
176 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
177 Adding #line.
178 Remove the duplicate `typedefs'.
179 (RhsNumberType): Fix the declaration and various other typos.
180 Use __ofile__.
181 * data/bison.simple: Use __ofile__.
182 * src/scan-skel.l: Handle __ofile__.
183
1842002-04-08 Akim Demaille <akim@epita.fr>
185
186 * src/gram.h (item_number_t): New, the type of item numbers in
187 RITEM. Note that it must be able to code symbol numbers as
188 positive number, and the negation of rule numbers as negative
189 numbers.
190 Adjust all dependencies (pretty many).
191 * src/reduce.c (rule): Remove this `short *' pointer: use
192 item_number_t.
193 * src/system.h (MINSHORT, MAXSHORT): Remove.
194 Include `limits.h'.
195 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
196 (shortcpy): Remove.
197 (MAXTABLE): Move to...
198 * src/output.c (MAXTABLE): here.
199 (prepare_rules): Use output_int_table to output rhs.
200 * data/bison.simple, data/bison.c++: Adjust.
201 * tests/torture.at (Big triangle): Move the limit from 254 to
202 500.
203 * tests/regression.at (Web2c Actions): Ajust.
204
205 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
206 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
207 passes, but produces negative #line number, once fixed, GCC is
208 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
209 C), it passes.
210 * src/state.h (state_h): Code input lines on ints, not shorts.
211
2122002-04-08 Akim Demaille <akim@epita.fr>
213
214 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
215 and then the grammar.
216
2172002-04-08 Akim Demaille <akim@epita.fr>
218
219 * src/system.h: No longer using strndup.
220
2212002-04-07 Akim Demaille <akim@epita.fr>
222
223 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
224 * src/output.c (output_table_data): Return the longest number.
225 (prepare_tokens): Output `token_number_max').
226 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
227 New.
228 Use them to define yy_token_number_type/TokenNumberType.
229 Use this type for yytranslate.
230 * tests/torture.at (Big triangle): Push the limit from 124 to
231 253.
232 * tests/regression.at (Web2c Actions): Adjust.
233
2342002-04-07 Akim Demaille <akim@epita.fr>
235
236 * tests/torture.at (Big triangle): New.
237 (GNU AWK Grammar, GNU Cim Grammar): Move to...
238 * tests/existing.at: here.
239
2402002-04-07 Akim Demaille <akim@epita.fr>
241
242 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
243 nritems.
244 Adjust dependencies.
245
2462002-04-07 Akim Demaille <akim@epita.fr>
247
248 * src/reader.c: Normalize increments to prefix form.
249
2502002-04-07 Akim Demaille <akim@epita.fr>
251
252 * src/reader.c, symtab.c: Remove debugging code.
253
2542002-04-07 Akim Demaille <akim@epita.fr>
255
256 Rename all the `bucket's as `symbol_t'.
257
258 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
259 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
260 * src/symtab.c, src/symtab.h (bucket): Rename as...
261 (symbol_t): this.
262 (symbol_list_new, bucket_check_defined, bucket_make_alias)
263 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
264 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
265 (buckets_new, buckets_free, buckets_do): Rename as...
266 (symbol_list_new, symbol_check_defined, symbol_make_alias)
267 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
268 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
269 (symbols_new, symbols_free, symbols_do): these.
270
2712002-04-07 Akim Demaille <akim@epita.fr>
272
273 Use lib/hash for the symbol table.
274
275 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
276 EOF.
277 * src/lex.c (lex): Set the `number' member of new terminals.
278 * src/reader.c (bucket_check_defined, bucket_make_alias)
279 (bucket_check_alias_consistence, bucket_translation): New.
280 (reader, grammar_free, readgram, token_translations_init)
281 (packsymbols): Adjust.
282 (reader): Number the predefined tokens.
283 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
284 for predefined tokens.
285 * src/symtab.h (bucket): Remove all the hash table related
286 members.
287 * src/symtab.c (symtab): Replace by...
288 (bucket_table): this.
289 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
290 (buckets_new, buckets_do): New.
291
2922002-04-07 Akim Demaille <akim@epita.fr>
293
294 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
295 (start_symbol, max_user_token_number, semantic_parser)
296 (error_token_number): Initialize.
297 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
298 Initialize.
299 (reader): Don't.
300 (errtoken, eoftoken, undeftoken, axiom): Extern.
301
3022002-04-07 Akim Demaille <akim@epita.fr>
303
304 * src/gram.h (rule_s): prec and precsym are now pointers
305 to the bucket giving the priority/associativity.
306 Member `associativity' removed: useless.
307 * src/reduce.c, src/conflicts.c: Adjust.
308
3092002-04-07 Akim Demaille <akim@epita.fr>
310
311 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
312 Properly escape the symbols' TAG when outputting them.
313
3142002-04-07 Akim Demaille <akim@epita.fr>
315
316 * src/lalr.h (LA): Is a bitsetv, not bitset*.
317
3182002-04-07 Akim Demaille <akim@epita.fr>
319
320 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
321 (LArule): this, which is an array to rule_t*.
322 * src/print.c, src/conflicts.c: Adjust.
323
3242002-04-07 Akim Demaille <akim@epita.fr>
325
326 * src/gram.h (rule_t): Rename `number' as `user_number'.
327 `number' is a new member.
328 Adjust dependencies.
329 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
330
3312002-04-07 Akim Demaille <akim@epita.fr>
332
333 As a result of the previous patch, it is no longer needed
334 to reorder ritem itself.
335
336 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
337
3382002-04-07 Akim Demaille <akim@epita.fr>
339
340 Be sure never to walk through RITEMS, but use only data related to
341 the rules themselves. RITEMS should be banished.
342
343 * src/output.c (output_token_translations): Rename as...
344 (prepare_tokens): this.
345 In addition to `translate', prepare the muscles `tname' and
346 `toknum', which were handled by...
347 (output_rule_data): this.
348 Remove, and move the remainder of its outputs into...
349 (prepare_rules): this new routines, which also merges content from
350 (output_gram): this.
351 (prepare_rules): Be sure never to walk through RITEMS.
352 (output_stos): Rename as...
353 (prepare_stos): this.
354 (output): Always invoke prepare_states, after all, just don't use it
355 in the output if you don't need it.
356
3572002-04-07 Akim Demaille <akim@epita.fr>
358
359 * src/LR0.c (new_state): Display `nstates' as the name of the
360 newly created state.
361 Adjust to initialize first_state and last_state if needed.
362 Be sure to distinguish the initial from the final state.
363 (new_states): Create the itemset of the initial state, and use
364 new_state.
365 * src/closure.c (closure): Now that the initial state has its
366 items properly set, there is no need for a special case when
367 creating `ruleset'.
368
369 As a result, now the rule 0, reducing to $axiom, is visible in the
370 outputs. Adjust the test suite.
371
372 * tests/conflicts.at (Solved SR Conflicts)
373 (Unresolved SR Conflicts): Adjust.
374 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
375 * tests/conflicts.at (S/R in initial): New.
376
3772002-04-07 Akim Demaille <akim@epita.fr>
378
379 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
380 the RHS of the rules.
381 * src/output.c (output_gram): Likewise.
382
3832002-04-07 Akim Demaille <akim@epita.fr>
384
385 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
386 bucket.
387 Adjust all dependencies.
388 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
389 `number' of the buckets too.
390 * src/gram.h: Include `symtab.h'.
391 (associativity): Move to...
392 * src/symtab.h: here.
393 No longer include `gram.h'.
394
3952002-04-07 Akim Demaille <akim@epita.fr>
396
397 * src/gram.h, src/gram.c (rules_rhs_length): New.
398 (ritem_longest_rhs): Use it.
399 * src/gram.h (rule_t): `number' is a new member.
400 * src/reader.c (packgram): Set it.
401 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
402 the end of `rules', and count them out of `nrules'.
403 (reduce_output, dump_grammar): Adjust.
404 * src/print.c (print_grammar): It is no longer needed to check for
405 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
406 * tests/reduce.at (Reduced Automaton): New test.
407
4082002-04-07 Akim Demaille <akim@epita.fr>
409
410 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
411 lacking `+ 1' to nrules, Bison reported as useless a token if it
412 was used solely to set the precedence of the last rule...
413
4142002-04-07 Akim Demaille <akim@epita.fr>
415
416 * data/bison.c++, data/bison.simple: Don't output the current file
417 name in #line, to avoid useless diffs between two identical
418 outputs under different names.
419
4202002-04-07 Akim Demaille <akim@epita.fr>
421
422 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
423 Normalize loops to using `< nrules + 1', not `<= nrules'.
424
4252002-04-07 Akim Demaille <akim@epita.fr>
426
427 * TODO: Update.
428
4292002-04-07 Akim Demaille <akim@epita.fr>
430
431 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
432 bucket.value as bucket.number.
433
4342002-04-07 Akim Demaille <akim@epita.fr>
435
436 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
437 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
438 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
439 RHS, instead of being an index in RITEMS.
440
4412002-04-04 Paul Eggert <eggert@twinsun.com>
442
443 * doc/bison.texinfo: Update copyright date.
444 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
445 (Symbols): Warn about running Bison in one character set,
446 but compiling and/or running in an incompatible one.
447 Warn about character code 256, too.
448
4492002-04-03 Paul Eggert <eggert@twinsun.com>
450
451 * src/bison.data (YYSTACK_ALLOC): Depend on whether
452 YYERROR_VERBOSE is nonzero, not whether it is defined.
453
454 Merge changes from bison-1_29-branch.
455
4562002-03-20 Paul Eggert <eggert@twinsun.com>
457
458 Merge fixes from Debian bison_1.34-1.diff.
459
460 * configure.in (AC_PREREQ): 2.53.
461
4622002-03-20 Akim Demaille <akim@epita.fr>
463
464 * src/conflicts.c (log_resolution): Argument `resolution' is const.
465
4662002-03-19 Paul Eggert <eggert@twinsun.com>
467
468 * src/bison.simple (YYCOPY): New macro.
469 (YYSTACK_RELOCATE): Use it.
470 Remove Type arg; no longer needed. All callers changed.
471 (yymemcpy): Remove; no longer needed.
472
473 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
474 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
475
4762002-03-19 Akim Demaille <akim@epita.fr>
477
478 Test and fix the #line outputs.
479
480 * tests/atlocal.at (GCC): New.
481 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
482 (Prologue synch line, ,%union synch line, Postprologue synch line)
483 (Action synch line, Epilogue synch line): New tests.
484 * src/reader.c (parse_union_decl): Define the muscle stype_line.
485 * data/bison.simple, data/bison.c++: Use it.
486
4872002-03-19 Akim Demaille <akim@epita.fr>
488
489 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
490 (Solved SR Conflicts, %expect not enough, %expect right)
491 (%expect too much): Move to...
492 * tests/conflicts.at: this new file.
493
4942002-03-19 Akim Demaille <akim@epita.fr>
495
496 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
497 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
498 that we can move to enums for instance.
499 * src/output.c (token_definitions_output): Output a list of
500 `token-name, token-number' instead of the #define.
501 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
502
5032002-03-14 Akim Demaille <akim@epita.fr>
504
505 Use Gettext 0.11.1.
506
5072002-03-09 Robert Anisko <robert@lrde.epita.fr>
508
509 * data/bison.c++: Make the user able to add members to the generated
510 parser by subclassing.
511
5122002-03-05 Robert Anisko <robert@lrde.epita.fr>
513
514 * src/reader.c (read_additionnal_code): `c' should be an integer, not
515 a character.
516 Reported by Nicolas Tisserand and Nicolas Burrus.
517
5182002-03-04 Robert Anisko <robert@lrde.epita.fr>
519
520 * src/reader.c: Warn about lacking semi-colons, do not complain.
521
5222002-03-04 Robert Anisko <robert@lrde.epita.fr>
523
524 * data/bison.c++: Remove a debug line.
525
5262002-03-04 Robert Anisko <robert@lrde.epita.fr>
527
528 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
529 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
530 provide a default implementation.
531
5322002-03-04 Akim Demaille <akim@epita.fr>
533
534 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
535 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
536 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
537 * tests/semantic.at (Parsing Guards): Similarly.
538 * src/reader.at (readgram): Complain if the last rule is not ended
539 with a semi-colon.
540
5412002-03-04 Akim Demaille <akim@epita.fr>
542
543 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
544 * src/closure.c: here.
545 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
546 RTC.
547 * src/warshall.h, src/warshall.c: Remove.
548 * tests/sets.at (Broken Closure): Adjust.
549
5502002-03-04 Akim Demaille <akim@epita.fr>
551
552 * src/output.c (output_skeleton): tempdir is const.
553 bytes_read is unused.
554
5552002-03-04 Akim Demaille <akim@epita.fr>
556
557 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
558 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
559 Update.
560 From Michael Hayes.
561
5622002-03-04 Akim Demaille <akim@epita.fr>
563
564 * src/closure.c (closure): `r' is unused.
565
5662002-03-04 Akim Demaille <akim@epita.fr>
567
568 * tests/sets.at (Broken Closure): Add the ending `;'.
569 * src/reader.at (readgram): Complain if a rule is not ended with a
570 semi-colon.
571
5722002-03-04 Akim Demaille <akim@epita.fr>
573
574 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
575 (count_sr_conflicts): Use bitset_count.
576 * src/reduce.c (inaccessable_symbols): Ditto.
577 (bits_size): Remove.
578 * src/warshall.h, src/warshall.c: Convert to bitsetv.
579
5802002-03-04 Akim Demaille <akim@epita.fr>
581
582 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
583 * src/reduce.c: Remove the `bitset_zero's following the
584 `bitset_create's, as now it is performed by the latter.
585
5862002-03-04 Akim Demaille <akim@epita.fr>
587
588 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
589 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
590 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
591 latest sources from Michael.
592
5932002-03-04 Akim Demaille <akim@epita.fr>
594
595 * src/output.c (output): Don't free the grammar.
596 * src/reader.c (grammar_free): New.
597 * src/main.c (main): Call it and don't free symtab here.
598
5992002-03-04 Akim Demaille <akim@epita.fr>
600
601 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
602 before returning.
603 Reported by Benoit Perrot.
604
6052002-03-04 Akim Demaille <akim@epita.fr>
606
607 Use bitset operations when possible, not loops over bits.
608
609 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
610 bitset_or.
611 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
612 * src/reduce.c (useless_nonterminals): Formatting changes.
613 * src/warshall.c (TC): Use bitset_or.
614
6152002-03-04 Akim Demaille <akim@epita.fr>
616
617 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
618 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
619 Ditto.
620
6212002-03-04 Akim Demaille <akim@epita.fr>
622
623 * src/lalr.c (F): Now a bitset*.
624 Adjust all dependencies.
625
6262002-03-04 Akim Demaille <akim@epita.fr>
627
628 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
629 Adjust all dependencies.
630
6312002-03-04 Akim Demaille <akim@epita.fr>
632
633 * src/L0.c, src/LR0.h (nstates): Be size_t.
634 Adjust comparisons (signed vs unsigned).
635 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
636 bitset*.
637 Adjust all dependencies.
638
6392002-03-04 Akim Demaille <akim@epita.fr>
640
641 * src/closure.c (firsts): Now, also a bitset.
642 Adjust all dependencies.
643 (varsetsize): Remove, now unused.
644 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
645
6462002-03-04 Akim Demaille <akim@epita.fr>
647
648 * src/print.c: Convert to use bitset.h, not hand coded iterations
649 over ints.
650
6512002-03-04 Akim Demaille <akim@epita.fr>
652
653 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
654
6552002-03-04 Akim Demaille <akim@epita.fr>
656
657 * src/closure.c (ruleset): Be a bitset.
658 (rulesetsize): Remove.
659
6602002-03-04 Akim Demaille <akim@epita.fr>
661
662 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
663 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
664 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
665 * src/closure.c (fderives): Be an array of bitsets.
666
6672002-02-28 Robert Anisko <robert@lrde.epita.fr>
668
669 * data/bison.c++: Merge the two generated headers. Insert a copyright
670 notice in each output file.
671
6722002-02-28 Akim Demaille <akim@epita.fr>
673
674 * data/bison.c++: Copy the prologue of bison.simple to fetch
675 useful M4 definitions, such as b4_header_guard.
676
6772002-02-25 Akim Demaille <akim@epita.fr>
678
679 * src/getargs.c (version): Give the name of the authors, and use a
680 translator friendly scheme for the bgr
681 copyright notice.
682
6832002-02-25 Akim Demaille <akim@epita.fr>
684
685 * src/output.c (header_output): Remove, now handled completely via
686 M4.
687
6882002-02-25 Akim Demaille <akim@epita.fr>
689
690 * m4/m4.m4: New, from CVS Autoconf.
691 * configure.in: Invoke it.
692 * src/output.c (output_skeleton): Use its result instead of the
693 hard coded name.
694
6952002-02-25 Akim Demaille <akim@epita.fr>
696
697 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
698 Fileutils 4.1.5.
699 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
700 * src/output.c (output_skeleton): Use mkstemp to create a real
701 temporary file.
702 Move the filling of `skeleton' and its muscle to...
703 (prepare): here.
704 (output): Move the definition of the prologue muscle to...
705 (prepare): here.
706 * src/system.h (DEFAULT_TMPDIR): New.
707
7082002-02-14 Paul Eggert <eggert@twinsun.com>
709
710 Remove the support for C++ namespace cleanliness; it was
711 causing more problems than it was curing, since it didn't work
712 properly on some nonstandard C++ compilers. This can wait
713 for a proper C++ parser.
714
715 * NEWS: Document this.
716 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
717 of C++, as it's treated like C now.
718 * src/bison.simple (YYSTD): Remove.
719 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
720 Treat C++ just like Standard C instead of trying to support
721 namespace cleanliness.
722
7232002-02-14 Akim Demaille <akim@epita.fr>
724
725 * tests/regression.at (else): Adjust to Andreas' change.
726
7272002-02-14 Akim Demaille <akim@epita.fr>
728
729 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
730
7312002-02-13 Andreas Schwab <schwab@suse.de>
732
733 * src/output.c (output_rule_data): Don't output NULL, it might
734 not be defined yet.
735
7362002-02-11 Robert Anisko <robert@lrde.epita.fr>
737
738 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
739 (Copyright notice): Update.
740
7412002-02-11 Akim Demaille <akim@epita.fr>
742
743 * tests/regression.at (%nonassoc and eof): Don't include
744 nonportable headers.
745
7462002-02-08 Robert Anisko <robert@lrde.epita.fr>
747
748 * data/bison.c++: Correct error recovery. Make the user able to
749 initialize the starting location.
750
7512002-02-07 Akim Demaille <akim@epita.fr>
752
753 * tests/input.at: New.
754
7552002-02-07 Robert Anisko <robert@lrde.epita.fr>
756
757 * data/bison.c++: Replace some direct m4 expansions by constants. Be
758 more consistent when naming methods and variables. Put preprocessor
759 directives around tables only needed for debugging.
760
7612002-02-07 Robert Anisko <robert@lrde.epita.fr>
762
763 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
764 C++ parsers.
765 (yy::b4_name::parse): Use print_.
766
7672002-02-07 Robert Anisko <robert@lrde.epita.fr>
768
769 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
770
7712002-02-07 Robert Anisko <robert@lrde.epita.fr>
772
773 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
774 C++ parsers.
775 (yy::b4_name::parse): Build verbose error messages, and use error_.
776
7772002-02-06 Robert Anisko <robert@lrde.epita.fr>
778
779 * data/bison.c++: Fix m4 quoting in comments.
780
7812002-02-06 Robert Anisko <robert@lrde.epita.fr>
782
783 * data/bison.c++: Adjust the parser code. Fix some muscles that were
784 not expanded by m4.
785
7862002-02-05 Akim Demaille <akim@epita.fr>
787
788 * data/bison.c++: Adjust to the M4 back end.
789 More is certainly needed.
790
7912002-02-05 Akim Demaille <akim@epita.fr>
792
793 Give a try to M4 as a back end.
794
795 * lib/readpipe.c: New, from wdiff.
796 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
797 BISON_HAIRY.
798 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
799 specific values. Now it is m4 that performs the lookup.
800 * src/parse-skel.y: Remove.
801 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
802 * src/output.c (actions_output, guards_output)
803 (token_definitions_output): No longer keeps track of the output
804 line number, hence remove the second argument.
805 (guards_output): Check against the guard member of a rule, not the
806 action member.
807 Adjust callers.
808 (output_skeleton): Don't look for the skeleton location, let m4 do
809 that.
810 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
811 file will be used.
812 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
813 (prepare): Given that for the time being changesyntax is not
814 usable in M4, rename the muscles using `-' to `_'.
815 Define `defines_flag', `output_parser_name' and `output_header_name'.
816 * src/output.h (actions_output, guards_output)
817 (token_definitions_output): Adjust prototypes.
818 * src/scan-skel.l: Instead of scanning the skeletons, it now
819 processes the output of m4: `__oline__' and `#output'.
820 * data/bison.simple: Adjust to be used by M4(sugar).
821 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
822 to date.
823 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
824 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
825 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
826 shamelessly stolen from CVS Autoconf.
827
8282002-02-05 Akim Demaille <akim@epita.fr>
829
830 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
831 * configure.in: Check for the declarations of free and malloc.
832 * src/muscle_tab.c: Adjust.
833
8342002-02-05 Akim Demaille <akim@epita.fr>
835
836 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
837 which have no values.
838
8392002-02-05 Akim Demaille <akim@epita.fr>
840
841 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
842 * data/: here.
843
8442002-01-29 Paul Eggert <eggert@twinsun.com>
845
846 * src/bison.simple (YYSIZE_T): Do not define merely because
847 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
848 On some platforms, <alloca.h> does not declare YYSTD (size_t).
849
8502002-01-27 Akim Demaille <akim@epita.fr>
851
852 Fix `%nonassoc and eof'.
853
854 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
855 which were not properly copied! Replace
856 memcpy (res->errs, src->errs, src->nerrs);
857 with
858 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
859 !!!
860 * tests/regression.at (%nonassoc and eof): Adjust to newest
861 Autotest: `.' is not in the PATH.
862
8632002-01-27 Akim Demaille <akim@epita.fr>
864
865 * tests/sets.at (AT_EXTRACT_SETS): New.
866 (Nullable): Use it.
867 (Firsts): New.
868
8692002-01-26 Akim Demaille <akim@epita.fr>
870
871 * tests/actions.at, tests/calc.at, tests/headers.at,
872 * tests/torture.at: Adjust to the newest Autotest which no longer
873 forces `.' in the PATH.
874
8752002-01-25 Akim Demaille <akim@epita.fr>
876
877 * tests/regression.at (%nonassoc and eof): New.
878 Suggested by Robert Anisko.
879
8802002-01-24 Akim Demaille <akim@epita.fr>
881
882 Bison dumps core when trying to complain about broken input files.
883 Reported by Cris van Pelt.
884
885 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
886 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
887 into...
888 (Invalid inputs): Strengthen: exercise parse_percent_token.
889
8902002-01-24 Robert Anisko <robert.anisko@epita.fr>
891
892 * src/Makefile.am: Add bison.c++.
893 * src/bison.c++: New skeleton.
894
8952002-01-21 Paolo Bonzini <bonzini@gnu.org>
896
897 * po/it.po: New.
898
8992002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
900
901 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
902
9032002-01-20 Marc Autret <marc@gnu.org>
904
905 * src/files.c (compute_output_file_names): Fix
906
9072002-01-20 Marc Autret <marc@gnu.org>
908
909 * tests/output.at: New test.
910 * src/files.c (compute_base_names): Don't map extensions when
911 the YACC flag is set, use defaults.
912 Reported by Evgeny Stambulchik.
913
9142002-01-20 Marc Autret <marc@gnu.org>
915
916 * src/system.h: Need to define __attribute__ away for non-GCC
917 compilers as well (i.e. the vendor C compiler).
918 Suggested by Albert Chin-A-Young.
919
9202002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
921
922 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
923 canonical definition.
924 * src/system.h: Use the canonical definition for PARAMS (avoids
925 a conflict with the macro from lib/hash.h).
926
9272002-01-11 Akim Demaille <akim@epita.fr>
928
929 * configure.in: Use AC_FUNC_STRNLEN.
930 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
931
9322002-01-09 Akim Demaille <akim@epita.fr>
933
934 * src/files.c, src/files.h (output_infix): New.
935 (tab_extension): Remove.
936 (compute_base_names): Compute the former, drop the latter.
937 * src/output.c (prepare): Insert the muscles `output-infix', and
938 `output-suffix'.
939 * src/parse-skel.y (string, string.1): New.
940 (section.header): Use it.
941 (section.yacc): Remove.
942 (prefix): Remove too.
943 * src/scan-skel.l: Adjust.
944 * src/bison.simple, src/bison.hairy: Adjust.
945
9462002-01-09 Akim Demaille <akim@epita.fr>
947
948 * configure.in (WERROR_CFLAGS): Compute it.
949 * src/Makefile.am (CFLAGS): Pass it.
950 * tests/atlocal.in (CFLAGS): Idem.
951 * src/files.c: Fix a few warnings.
952 (get_extension_index): Remove, unused.
953
9542002-01-08 Akim Demaille <akim@epita.fr>
955
956 * src/getargs.c (AS_FILE_NAME): New.
957 (getargs): Use it to convert DOSish file names.
958 * src/files.c (base_name): Rename as full_base_name to avoid
959 clashes with `base_name ()'.
960 (filename_split): New.
961 (compute_base_names): N-th rewrite, using filename_split.
962
9632002-01-08 Akim Demaille <akim@epita.fr>
964
965 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
966 New, stolen from the Fileutils 4.1.
967 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
968 * configure.in: Check for the presence of memrchr, and of its
969 prototype.
970
9712002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
972
973 * lib/hash.h (__P): Added definition for this macro.
974 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
975 BUILT_SOURCES, to ensure they are generated first.
976 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
977 %error-verbose to allow bootstrapping with bison 1.30x.
978
9792002-01-06 Akim Demaille <akim@epita.fr>
980
981 * src/reader.c (parse_braces): Don't fetch the next char, the
982 convention is to fetch on entry.
983 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
984 'switch' without a following semicolon.
985 * tests/regression.at (braces parsing): New.
986
9872002-01-06 Akim Demaille <akim@epita.fr>
988
989 Bison is dead wrong in its RR conflict reports.
990
991 * tests/torture.at (GNU Cim Grammar): New.
992 * src/conflicts.c (count_rr_conflicts): Fix.
993
9942002-01-06 Akim Demaille <akim@epita.fr>
995
996 Creating package.m4 from configure.ac causes too many problems.
997
998 * tests/Makefile.am (package.m4): Create it by hand,
999 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1000
10012002-01-06 Akim Demaille <akim@epita.fr>
1002
1003 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1004 skeleton.h.
1005
10062002-01-04 Paul Eggert <eggert@twinsun.com>
1007
1008 * doc/bison.texinfo (Debugging):
1009 Remove YYSTDERR; it's no longer defined or used.
1010 Also, s/cstdio.h/cstdio/.
1011
10122002-01-03 Akim Demaille <akim@epita.fr>
1013
1014 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1015
10162002-01-03 Akim Demaille <akim@epita.fr>
1017
1018 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1019 tracing code to --trace, wait for a better --trace option, with
1020 args.
1021
10222002-01-03 Akim Demaille <akim@epita.fr>
1023
1024 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1025 The ISO C++ standard is extremely clear about it: stderr is
1026 considered a macro, not a regular symbol (see table 94 `Header
1027 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1028 Therefore std:: does not apply to it. It still does with fprintf.
1029 Also, s/cstdio.h/cstdio/.
1030
10312002-01-03 Akim Demaille <akim@epita.fr>
1032
1033 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1034 for non system headers.
1035
10362002-01-02 Akim Demaille <akim@epita.fr>
1037
1038 Equip the skeleton chain with location tracking, runtime trace,
1039 pure parser and scanner.
1040
1041 * src/parse-skel.y: Request a pure parser, locations, and prefix
1042 renaming.
1043 (%union): Having several members with the same type does not help
1044 type mismatches, simplify.
1045 (YYPRINT, yyprint): New.
1046 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1047 (skel_error): this.
1048 Handle locations.
1049 * src/scan-skel.l: Adjust to these changes.
1050 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1051 (LOCATION_PRINT, skel_control_t): New.
1052
10532001-12-30 Akim Demaille <akim@epita.fr>
1054
1055 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1056 replace `gb' with BLANKS.
1057 * src/scan-skel.l: Adjust.
1058
10592001-12-30 Akim Demaille <akim@epita.fr>
1060
1061 * src/system.h: We don't need nor want bcopy.
1062 Throw away MS-DOS crap: we don't need getpid.
1063 * configure.in: We don't need strndup. It was even causing
1064 problems: because Flex includes the headers *before* us,
1065 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1066 not visible.
1067 * lib/xstrndup.c: New.
1068 * src/scan-skel.l: Use it.
1069 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1070 * src/parse-skel.y: Use %directives instead of #defines.
1071
10722001-12-30 Akim Demaille <akim@epita.fr>
1073
1074 * src/skeleton.h: New.
1075 * src/output.c (output_parser, output_master_parser): Remove, dead
1076 code.
1077 * src/output.h (get_lines_number, actions_output, guards_output)
1078 (token_definitions_output): Prototype them.
1079 * src/parse-skel.y: Add the license notice.
1080 Include output.h and skeleton.h.
1081 (process_skeleton): Returns void, and takes a single parameter.
1082 * src/scan-skel.l: Add the license notice.
1083 Include skeleton.h.
1084 Don't use %option yylineno: it seems that then Flex imagines
1085 REJECT has been used, and therefore it won't reallocate its
1086 buffers (which makes no other sense to me than a bug). It results
1087 in warnings for `unused: yy_flex_realloc'.
1088
10892001-12-30 Robert Anisko <robert.anisko@epita.fr>
1090
1091 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1092 (MUSCLE_INSERT_PREFIX): ...to there.
1093 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1094 (MUSCLE_INSERT_PREFIX): Move from here...
1095
1096 * src/bison.hairy: Add a section directive. Put braces around muscle
1097 names. This parser skeleton is still broken, but Bison should not
1098 choke on a bad muscle 'syntax'.
1099 * src/bison.simple: Add a section directive. Put braces around muscle
1100 names.
1101
1102 * src/files.h (strsuffix, stringappend): Add declarations.
1103 (tab_extension): Add declaration.
1104 (short_base_name): Add declaration.
1105
1106 * src/files.c (strsuffix, stringappend): No longer static. These
1107 functions are used in the skeleton parser.
1108 (tab_extension): New.
1109 (compute_base_names): Use the computations done in this function
1110 to guess if the generated parsers should have '.tab' in their
1111 names.
1112 (short_base_name): No longer static.
1113
1114 * src/output.c (output_skeleton): New.
1115 (output): Disable call to output_master_parser, and give a try to
1116 a new skeleton handling system.
1117 (guards_output, actions_output): No longer static.
1118 (token_definitions_output, get_lines_number): No longer static.
1119
1120 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1121
1122 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1123 parse-skel.y.
1124
1125 * src/parse-skel.y: New file.
1126 * src/scan-skel.l: New file.
1127
11282001-12-29 Akim Demaille <akim@epita.fr>
1129
1130 %name-prefix is broken.
1131
1132 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1133 Adjust all dependencies.
1134 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1135 %name-prefix.
1136
1137 Renaming yylval but not yylloc is not consistent. Now we do.
1138
1139 * src/bison.simple: Prefix yylloc if used.
1140 * doc/bison.texinfo (Decl Summary): Document that.
1141
11422001-12-29 Akim Demaille <akim@epita.fr>
1143
1144 * doc/bison.texinfo: Promote `%long-directive' over
1145 `%long_directive'.
1146 Remove all references to fixed-output-files, yacc is enough.
1147
11482001-12-29 Akim Demaille <akim@epita.fr>
1149
1150 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1151 user prologue. These are defaults.
1152 * tests/actions.at (Mid-rule actions): Make sure the user can
1153 define YYDEBUG and YYERROR_VERBOSE.
1154
11552001-12-29 Akim Demaille <akim@epita.fr>
1156
1157 * src/output.c (header_output): Don't forget to export YYLTYPE and
1158 yylloc.
1159 * tests/headers.at (export YYLTYPE): New, make sure it does.
1160 * tests/regression.at (%union and --defines, Invalid CPP headers):
1161 Move to...
1162 * tests/headers.at: here.
1163
11642001-12-29 Akim Demaille <akim@epita.fr>
1165
1166 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1167
11682001-12-29 Akim Demaille <akim@epita.fr>
1169
1170 * tests/actions.at (Mid-rule actions): Output on a single line
1171 instead of several.
1172
11732001-12-29 Akim Demaille <akim@epita.fr>
1174
1175 * doc/bison.texinfo: Formatting changes.
1176
11772001-12-29 Akim Demaille <akim@epita.fr>
1178
1179 Don't store the token defs in a muscle, just be ready to output it
1180 on command. Now possible via `symbols'. Fixes a memory leak.
1181
1182 * src/output.c (token_definitions_output): New.
1183 (output_parser, header_output): Use it.
1184 * src/reader.c (symbols_save): Remove.
1185
11862001-12-29 Akim Demaille <akim@epita.fr>
1187
1188 * src/bison.simple: Do not provide a default for YYSTYPE and
1189 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1190 default.
1191
11922001-12-29 Akim Demaille <akim@epita.fr>
1193
1194 Mid-rule actions are simply... ignored!
1195
1196 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1197 the empty-rule associated to the dummy symbol, not to the host
1198 rule.
1199 * tests/actions.at (Mid-rule actions): New.
1200
12012001-12-29 Akim Demaille <akim@epita.fr>
1202
1203 Memory leak.
1204
1205 * src/reader.c (reader): Free grammar.
1206
12072001-12-29 Akim Demaille <akim@epita.fr>
1208
1209 Memory leak.
1210
1211 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1212 since it allocates it for each state, although only one is needed.
1213 (allocate_storage): Do it here.
1214
12152001-12-29 Akim Demaille <akim@epita.fr>
1216
1217 * src/options.h, src/options.c (create_long_option_table): Rename
1218 as...
1219 (long_option_table_new): this, with a clearer prototype.
1220 (percent_table): Remove, unused,
1221 * src/getargs.c (getargs): Adjust.
1222
12232001-12-29 Akim Demaille <akim@epita.fr>
1224
1225 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1226 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1227 as states.
1228
12292001-12-29 Akim Demaille <akim@epita.fr>
1230
1231 * src/lalr.c (build_relations): Rename `states' as `states1'.
1232 Sorry, I don't understand exactly what it is, no better name...
1233
12342001-12-29 Akim Demaille <akim@epita.fr>
1235
1236 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1237 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1238 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1239 as rules.
1240
12412001-12-29 Akim Demaille <akim@epita.fr>
1242
1243 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1244 ago.
1245
12462001-12-29 Akim Demaille <akim@epita.fr>
1247
1248 * src/reader.c, src/reader.h (user_toknums): Remove.
1249 Adjust all users to use symbols[i]->user_token_number.
1250
12512001-12-29 Akim Demaille <akim@epita.fr>
1252
1253 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1254 Adjust all users to use symbols[i]->prec or ->assoc.
1255
12562001-12-29 Akim Demaille <akim@epita.fr>
1257
1258 * src/reader.c, src/reader.h (tags): Remove.
1259 Adjust all users to use symbols[i]->tag.
1260
12612001-12-29 Akim Demaille <akim@epita.fr>
1262
1263 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1264 and rule_table.
1265 * src/reader.c (packsymbols): Fill this table.
1266 Drop sprec.
1267 * src/conflicts.c (resolve_sr_conflict): Adjust.
1268 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1269 single table.
1270 Use symbols[i]->tag instead of tags[i].
1271
12722001-12-29 Akim Demaille <akim@epita.fr>
1273
1274 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1275 In addition, put a comment in there, to replace...
1276 * tests/regression.at (%union and C comments): Remove.
1277
12782001-12-29 Akim Demaille <akim@epita.fr>
1279
1280 * tests/regression.at (Web2c Actions): Blindly move the actual
1281 output as expected output. The contents *seem* right to me, but I
1282 can't pretend reading perfectly parser tables... Nonetheless, all
1283 the other tests pass correctly, the table look OK, even though the
1284 presence of `$axiom' is to be noted: AFAICS it is useless (but
1285 harmless).
1286
12872001-12-29 Akim Demaille <akim@epita.fr>
1288
1289 * src/reader.c (readgram): Don't add the rule 0 if there were no
1290 rules read. In other words, add it _after_ having performed
1291 grammar sanity checks.
1292 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1293
12942001-12-29 Akim Demaille <akim@epita.fr>
1295
1296 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1297 visible, and some states have now a different number.
1298
12992001-12-29 Akim Demaille <akim@epita.fr>
1300
1301 * src/reader.c (readgram): Bind the initial rule's lineno to that
1302 of the first rule.
1303 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1304 (Solved SR Conflicts): Adjust rule 0's line number.
1305
13062001-12-29 Akim Demaille <akim@epita.fr>
1307
1308 Fix the `GAWK Grammar' failure.
1309
1310 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1311 the reductions of the first state which was mistakenly confused
1312 with the final state because precisely final_state was initialized
1313 to 0.
1314 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1315 now noticed by Bison.
1316 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1317 have a reduction on $default.
1318
13192001-12-29 Akim Demaille <akim@epita.fr>
1320
1321 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1322 rule line numbers.
1323 * src/closure.c (print_closure): Likewise.
1324 * src/derives.c (print_derives): Likewise.
1325 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1326 now.
1327
13282001-12-29 Akim Demaille <akim@epita.fr>
1329
1330 * src/lalr.c (lookaheads_print): New.
1331 (lalr): Call it when --trace-flag.
1332 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1333 are dumped.
1334
13352001-12-29 Akim Demaille <akim@epita.fr>
1336
1337 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1338 when walking through ritem, even via rule->rhs.
1339 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1340 (useful_production, useless_nonterminals): Likewise.
1341 (reduce_grammar_tables): Likewise, plus update nritems.
1342 * src/nullable.c (set_nullable): Likewise.
1343 * src/lalr.c (build_relations): Likewise.
1344 * tests/sets.at (Nullable): Adjust.
1345 Fortunately, now, the $axiom is no longer nullable.
1346
13472001-12-29 Akim Demaille <akim@epita.fr>
1348
1349 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1350 the 0-sentinel.
1351 * src/gram.c (ritem_longest_rhs): Likewise.
1352 * src/reduce.c (nonterminals_reduce): Likewise.
1353 * src/print_graph.c (print_graph): Likewise.
1354 * src/output.c (output_rule_data): Likewise.
1355 * src/nullable.c (set_nullable): Likewise.
1356
13572001-12-29 Akim Demaille <akim@epita.fr>
1358
1359 * src/output.c: Comment changes.
1360
13612001-12-27 Paul Eggert <eggert@twinsun.com>
1362
1363 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1364 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1365 Sparc, as they were causing more porting problems than the
1366 (minor) performance improvement was worth.
1367
1368 Also, catch up with 1.31's YYSTD.
1369
13702001-12-27 Akim Demaille <akim@epita.fr>
1371
1372 * src/output.c (output_gram): Rely on nritems, not the
1373 0-sentinel. See below.
1374 Use -1 as separator, not 0.
1375 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1376 Rely on -1 as separator in yyrhs, instead of 0.
1377 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1378 twice `Now at end of input', therefore there are two lines less to
1379 expect.
1380
13812001-12-27 Akim Demaille <akim@epita.fr>
1382
1383 * tests/regression.at (Unresolved SR Conflicts):
1384 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1385 below.
1386
13872001-12-27 Akim Demaille <akim@epita.fr>
1388
1389 * src/LR0.c (new_state): Recognize the final state by the fact it
1390 is reached by eoftoken.
1391 (insert_start_shifting_state, insert_eof_shifting_state)
1392 (insert_accepting_state, augment_automaton): Remove, since now
1393 these states are automatically computed from the initial state.
1394 (generate_states): Adjust.
1395 * src/print.c: When reporting a rule number to the user, substract
1396 1, so that the axiom rule is rule 0, and the first user rule is 1.
1397 * src/reduce.c: Likewise.
1398 * src/print_graph.c (print_core): For the time being, just as for
1399 the report, depend upon --trace-flags to dump the full set of
1400 items.
1401 * src/reader.c (readgram): Once the grammar read, insert the rule
1402 0: `$axiom: START-SYMBOL $'.
1403 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1404 number of the states has changed (the final state is no longer
1405 necessarily the last), catch up.
1406
14072001-12-27 Akim Demaille <akim@epita.fr>
1408
1409 Try to make the use of the eoftoken valid. Given that its value
1410 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1411 is used instead of > 0 where appropriate, (ii), depend upon nritems
1412 instead of the 0-sentinel.
1413
1414 * src/gram.h, src/gram.c (nritems): New.
1415 Expected to be duplication of nitems, but for the time being...
1416 * src/reader.c (packgram): Assert nritems and nitems are equal.
1417 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1418 * src/closure.c (print_closure, print_fderives): Likewise.
1419 * src/gram.c (ritem_print): Likewise.
1420 * src/print.c (print_core, print_grammar): Likewise.
1421 * src/print_graph.c: Likewise.
1422
14232001-12-27 Akim Demaille <akim@epita.fr>
1424
1425 * src/main.c (main): If there are complains after grammar
1426 reductions, then output the report anyway if requested, then die.
1427 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1428 * src/reader.c (eoftoken): New.
1429 (parse_token_decl): If the token being defined has value `0', it
1430 is the eoftoken.
1431 (packsymbols): No longer hack `tags' to insert `$' by hand.
1432 Be sure to preserve the value of the eoftoken.
1433 (reader): Make sure eoftoken is defined.
1434 Initialize nsyms to 0: now eoftoken is created just like the others.
1435 * src/print.c (print_grammar): Don't special case the eof token.
1436 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1437 lie anyway, albeit pleasant.
1438 * tests/calc.at: Exercise error messages with eoftoken.
1439 Change the grammar so that empty input is invalid.
1440 Adjust expectations.
1441 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1442
14432001-12-27 Akim Demaille <akim@epita.fr>
1444
1445 * configure.in: Check the protos of strchr ans strspn.
1446 Replace strchr if needed.
1447 * src/system.h: Provide the protos of strchr, strspn and memchr if
1448 missing.
1449 * lib/strchr.c: New.
1450 * src/reader.c (symbols_save): Use strchr.
1451
14522001-12-27 Akim Demaille <akim@epita.fr>
1453
1454 * src/print.c, src/print_graph.c (escape): New.
1455 Use it to quote the TAGS outputs.
1456 * src/print_graph.c (print_state): Now errors are in red, and
1457 reductions in green.
1458 Prefer high to wide: output the state number on a line of its own.
1459
14602001-12-27 Akim Demaille <akim@epita.fr>
1461
1462 * src/state.h, src/state.c (reductions_new): New.
1463 * src/LR0.c (set_state_table): Let all the states have a
1464 `reductions', even if reduced to 0.
1465 (save_reductions): Adjust.
1466 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1467 * src/print.c (print_reductions, print_actions): Adjust.
1468 * src/output.c (action_row): Adjust.
1469
14702001-12-27 Akim Demaille <akim@epita.fr>
1471
1472 * src/state.h, src/state.c (errs_new, errs_dup): New.
1473 * src/LR0.c (set_state_table): Let all the states have an errs,
1474 even if reduced to 0.
1475 * src/print.c (print_errs, print_reductions): Adjust.
1476 * src/output.c (output_actions, action_row): Adjust.
1477 * src/conflicts.c (resolve_sr_conflict): Adjust.
1478
14792001-12-27 Akim Demaille <akim@epita.fr>
1480
1481 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1482
14832001-12-27 Akim Demaille <akim@epita.fr>
1484
1485 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1486 * src/print.c: here.
1487 (lookaheadset, shiftset): New, used as additional storage by
1488 print_reductions.
1489 (print_results): Adjust.
1490 (print_shifts, print_gotos, print_errs): New, extracted from...
1491 (print_actions): here.
1492 * src/print_graph.c (print_actions): Remove dead code.
1493
14942001-12-27 Akim Demaille <akim@epita.fr>
1495
1496 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1497 `$n' and `@n'.
1498
14992001-12-27 Akim Demaille <akim@epita.fr>
1500
1501 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1502 (build_relations): Adjust.
1503
15042001-12-27 Akim Demaille <akim@epita.fr>
1505
1506 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1507 duplication.
1508
15092001-12-27 Akim Demaille <akim@epita.fr>
1510
1511 * src/reader.c (packgram): Catch nitems overflows.
1512
15132001-12-27 Akim Demaille <akim@epita.fr>
1514
1515 * src/files.c, src/files.h (guard_obstack): Remove.
1516 * src/output.c (output): Adjust.
1517 * src/reader.c (parse_braces): New, factoring...
1518 (copy_action, copy_guard): these two which are renamed as...
1519 (parse_action, parse_guard): these.
1520 As a voluntary consequence, using braces around guards is now
1521 mandatory.
1522
15232001-12-27 Akim Demaille <akim@epita.fr>
1524
1525 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1526 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1527 members.
1528 (symbol_list_new): Adjust.
1529 (copy_action): action_line is the first line, not the last.
1530 (copy_guard): Just as for actions, store the `action' only, not
1531 the switch/case/break flesh.
1532 Don't parse the user action that might follow the guard, let...
1533 (readgram): do it, i.e., now, there can be an action after a
1534 guard.
1535 In other words the guard is just explicitly optional.
1536 (packgram): Adjust.
1537 * src/output.c (guards_output): New.
1538 (output_parser): Call it when needed.
1539 (output): Also free the guard and attrs obstacks.
1540 * src/files.c, src/files.h (obstack_save): Remove.
1541 (output_files): Remove.
1542 As a result, if one needs the former `.act' file, using an
1543 appropriate skeleton which requires actions and guards is now
1544 required.
1545 * src/main.c (main): Adjust.
1546 * tests/semantic.at: New.
1547 * tests/regression.at: Use `input.y' as input file name.
1548 Avoid 8+3 problems by requiring input.c when the test needs the
1549 parser.
1550
15512001-12-27 Akim Demaille <akim@epita.fr>
1552
1553 * src/reader.c (symbol_list_new): Be sure to initialize all the
1554 fields.
1555
15562001-12-27 Akim Demaille <akim@epita.fr>
1557
1558 All the hacks using a final pseudo state are now useless.
1559
1560 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1561 * src/lalr.c (nLA): New.
1562 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1563 instead of lookaheadsp from the pseudo state (nstate + 1).
1564
15652001-12-27 Akim Demaille <akim@epita.fr>
1566
1567 * src/output.c (action_row, token_actions): Use a state_t instead
1568 of a integer, and nlookaheads instead of the following state's
1569 lookaheadsp.
1570
15712001-12-27 Akim Demaille <akim@epita.fr>
1572
1573 * src/conflicts.c (log_resolution, flush_shift)
1574 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1575 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1576 (conflicts_print, print_reductions): Use a state_t instead of an
1577 integer when referring to a state.
1578 As much as possible, depend upon nlookaheads, instead of the
1579 `lookaheadsp' member of the following state (since lookaheads of
1580 successive states are successive, the difference between state n + 1
1581 and n served as the number of lookaheads for state n).
1582 * src/lalr.c (add_lookback_edge): Likewise.
1583 * src/print.c (print_core, print_actions, print_state)
1584 (print_results): Likewise.
1585 * src/print_graph.c (print_core, print_actions, print_state)
1586 (print_graph): Likewise.
1587 * src/conflicts.h: Adjust.
1588
15892001-12-27 Akim Demaille <akim@epita.fr>
1590
1591 * src/bison.hairy: Formatting/comment changes.
1592 ANSIfy.
1593 Remove `register' indications.
1594 Add plenty of `static'.
1595
15962001-12-27 Akim Demaille <akim@epita.fr>
1597
1598 * src/output.c (prepare): Drop the muscle `ntbase' which
1599 duplicates ntokens.
1600 * src/bison.simple: Formatting/comment changes.
1601 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1602 is an undocumented synonym.
1603
16042001-12-22 Akim Demaille <akim@epita.fr>
1605
1606 * src/output.c (output_table_data): Change the prototype to use
1607 `int' for array ranges: some invocations do pass an int, not a
1608 short.
1609 Reported by Wayne Green.
1610
16112001-12-22 Akim Demaille <akim@epita.fr>
1612
1613 Some actions of web2c.y are improperly triggered.
1614 Reported by Mike Castle.
1615
1616 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1617 * tests/regression.at (Web2c): Rename as...
1618 (Web2c Report): this.
1619 (Web2c Actions): New.
1620
16212001-12-22 Akim Demaille <akim@epita.fr>
1622
1623 Reductions in web2c.y are improperly reported.
1624 Reported by Mike Castle.
1625
1626 * src/conflicts.c (print_reductions): Fix.
1627 * tests/regression.at (Web2c): New.
1628
16292001-12-18 Akim Demaille <akim@epita.fr>
1630
1631 Some host fail on `assert (!"foo")', which expands to
1632 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1633 Reported by Nelson Beebee.
1634
1635 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1636 `#define it_succeeded 0' and `assert (it_succeeded)'.
1637
16382001-12-17 Marc Autret <autret_m@epita.fr>
1639
1640 * src/bison.simple: Don't hard code the skeleton line and filename.
1641 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1642 New line counter 'skeleton_line' (skeleton-line muscle).
1643
16442001-12-17 Paul Eggert <eggert@twinsun.com>
1645
1646 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1647 YYDEBUG must be defined to a nonzero value.
1648
1649 * src/bison.simple (yytname): Do not assume that the user defines
1650 YYDEBUG to a properly parenthesized expression.
1651
16522001-12-17 Akim Demaille <akim@epita.fr>
1653
1654 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1655 nlookaheads is a new member.
1656 Adjust all users.
1657 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1658 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1659 state.
1660
16612001-12-17 Akim Demaille <akim@epita.fr>
1662
1663 * src/files.h, src/files.c (open_files, close_files): Remove.
1664 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1665 let...
1666 * src/reader.c (reader): Do it.
1667
16682001-12-17 Akim Demaille <akim@epita.fr>
1669
1670 * src/conflicts.c (print_reductions): Formatting changes.
1671
16722001-12-17 Akim Demaille <akim@epita.fr>
1673
1674 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1675 (flush_reduce): New.
1676 (resolve_sr_conflict): Adjust.
1677
16782001-12-17 Akim Demaille <akim@epita.fr>
1679
1680 * src/output.c (output_obstack): Be static and rename as...
1681 (format_obstack): this, to avoid any confusion with files.c's
1682 output_obstack.
1683 * src/reader.h (muscle_obstack): Move to...
1684 * src/output.h: here, since it's defined in output.c.
1685
16862001-12-17 Akim Demaille <akim@epita.fr>
1687
1688 * src/output.c (action_row, save_column, default_goto)
1689 (sort_actions, matching_state, pack_vector): Better variable
1690 locality.
1691
16922001-12-17 Akim Demaille <akim@epita.fr>
1693
1694 * src/output.c: Various formatting changes.
1695
16962001-12-17 Akim Demaille <akim@epita.fr>
1697
1698 * src/files.c (output_files): Free the output_obstack.
1699 * src/main.c (main): Call print and print_graph conditionally.
1700 * src/print.c (print): Work unconditionally.
1701 * src/print_graph.c (print_graph): Work unconditionally.
1702 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1703
17042001-12-16 Marc Autret <autret_m@epita.fr>
1705
1706 * src/output.c (actions_output): Fix. When we use %no-lines,
1707 there is one less line per action.
1708
17092001-12-16 Marc Autret <autret_m@epita.fr>
1710
1711 * src/bison.simple: Remove a useless #line directive.
1712 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1713 * src/output.c (get_lines_number): New.
1714 (output_parser): Adjust, now takes care about the lines of a
1715 output muscles.
1716 Fix line numbering.
1717 (actions_output): Computes the number of lines taken by actions.
1718 (output_master_parser): Insert new skeleton which is the name of
1719 the output parser file name.
1720
17212001-12-15 Marc Autret <autret_m@epita.fr>
1722
1723 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1724
17252001-12-15 Marc Autret <autret_m@epita.fr>
1726
1727 * src/output.c (output_gram): Keep track of the hairy one.
1728
17292001-12-15 Akim Demaille <akim@epita.fr>
1730
1731 Make `make distcheck' work.
1732
1733 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1734 system.h which uses libgettext.h.
1735
17362001-12-15 Akim Demaille <akim@epita.fr>
1737
1738 * src/nullable.c (set_nullable): Useless rules must be skipped,
1739 otherwise, since we range over their symbols, we might look at a
1740 nonterminal which no longer ``exists'', i.e., it is not counted in
1741 `nvars', hence we overflow our arrays.
1742
17432001-12-15 Akim Demaille <akim@epita.fr>
1744
1745 The header can also be produced directly, without any obstack!
1746 Yahoo!
1747
1748 * src/files.c, src/files.h (defines_obstack): Remove.
1749 (compute_header_macro): Global.
1750 (defines_obstack_save): Remove.
1751 * src/reader.c (parse_union_decl): No longer output to
1752 defines_obstack: its content can be found in the `stype' muscle
1753 anyway.
1754 (output_token_translations): Merge into...
1755 (symbols_output): this.
1756 Rename as...
1757 (symbols_save): this.
1758 (reader): Adjust.
1759 * src/output.c (header_output): New.
1760 (output): Call it.
1761
17622001-12-15 Akim Demaille <akim@epita.fr>
1763
1764 * src/reader.c (parse_union_decl): Instead of handling two obstack
1765 simultaneously, use one to define the `stype' muscle, and use the
1766 value of the latter to fill defines_obstack.
1767 (copy_comment): Remove.
1768 (copy_comment2): Work for a single obstack.
1769 Rename as...
1770 (copy_comment): this.
1771
17722001-12-15 Akim Demaille <akim@epita.fr>
1773
1774 * src/lex.c, src/lex.h (xgetc): No longer static.
1775 * src/reader.c (parse_union_decl): Revamp.
1776
17772001-12-15 Akim Demaille <akim@epita.fr>
1778
1779 Still making progress in separating Bison into (i) input, (ii)
1780 process, (iii) output: now we can directly output the parser file
1781 without using table_obstack at all.
1782
1783 * src/files.c, src/files.h (table_obstack): Bye bye.
1784 (parser_file_name): New.
1785 * src/files.c (compute_output_file_names): Compute it.
1786 * src/output.c (actions_output, output_parser)
1787 (output_master_parser): To a file instead of an obstack.
1788
17892001-12-15 Akim Demaille <akim@epita.fr>
1790
1791 Attach actions to rules, instead of pre-outputting them to
1792 actions_obstack.
1793
1794 * src/gram.h (rule_t): action and action_line are new members.
1795 * src/reader.c (symbol_list): Likewise.
1796 (copy_action): Save the actions within the rule.
1797 (packgram): Save them in rule_table.
1798 * src/output.c (actions_output): New.
1799 (output_parser): Use it on `%%actions'.
1800 (output_rule_data): Don't free rule_table.
1801 (output): Do it.
1802 (prepare): Don't save the `action' muscle.
1803 * src/bison.simple: s/%%action/%%actions/.
1804
18052001-12-15 Akim Demaille <akim@epita.fr>
1806
1807 * src/reader.c (copy_action): When --yacc, don't append a `;'
1808 to the user action: let it fail if lacking.
1809 Suggested by Arnold Robbins and Tom Tromey.
1810
18112001-12-14 Akim Demaille <akim@epita.fr>
1812
1813 * src/lex.c (literalchar): Simply return the char you decoded, non
1814 longer mess around with obstacks and int pointers.
1815 Adjust all callers.
1816
18172001-12-14 Akim Demaille <akim@epita.fr>
1818
1819 * src/lex.c (literalchar): Don't escape the special characters,
1820 just decode them, and keep them as char (before, eol was output as
1821 the 2 char string `\n' etc.).
1822 * src/output.c (output_rule_data): Use quotearg to output the
1823 token strings.
1824
18252001-12-13 Paul Eggert <eggert@twinsun.com>
1826
1827 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1828 Do not infringe on the global user namespace when using C++.
1829 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1830 All uses of `fprintf' and `stderr' changed.
1831
1832 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1833
18342001-12-13 Akim Demaille <akim@epita.fr>
1835
1836 The computation of nullable is broken: it doesn't handle empty
1837 RHS's properly.
1838
1839 * tests/torture.at (GNU AWK Grammar): New.
1840 * tests/sets.at (Nullable): New.
1841 * src/nullable.c (set_nullable): Instead of blindly looping over
1842 `ritems', loop over the rules, and then over their rhs's.
1843
1844 Work around Autotest bugs.
1845
1846 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1847 frame, because Autotest understand lines starting with a `+' as
1848 traces from the shell. Then, they are not processed properly.
1849 Admittedly an Autotest bug, but we don't have time to wait for
1850 Autotest to catch up.
1851 * tests/regression.at (Broken Closure): Adjust to the new table
1852 frames.
1853 Move to...
1854 * tests/sets.at: here.
1855
18562001-12-13 Akim Demaille <akim@epita.fr>
1857
1858 * src/closure.c (closure): Use nrules instead of playing tricks
1859 with BITS_PER_WORD.
1860
18612001-12-13 Akim Demaille <akim@epita.fr>
1862
1863 * src/print.c (print_actions): Output the handling of `$' as the
1864 traces do: shifting the token EOF. Before EOF was treated as a
1865 nonterminal.
1866 * tests/regression.at: Adjust some tests.
1867 * src/print_graph.c (print_core): Complete the set of items via
1868 closure. The next-to-final and final states are still unsatisfying,
1869 but that's to be addressed elsewhere.
1870 No longer output the rule numbers, but do output the state number.
1871 A single loop for the shifts + gotos is enough, but picked a
1872 distinct color for each.
1873 (print_graph): Initialize and finalize closure.
1874
18752001-12-13 Akim Demaille <akim@epita.fr>
1876
1877 * src/reader.c (readgram): Remove dead code, an strip useless
1878 braces.
1879 (get_type): Remove, unused.
1880
18812001-12-12 Akim Demaille <akim@epita.fr>
1882
1883 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1884 on that of lib/error.c.
1885
18862001-12-12 Akim Demaille <akim@epita.fr>
1887
1888 Some hosts don't like `/' in includes.
1889
1890 * src/system.h: Include libgettext.h without qualifying the path.
1891 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1892 $(top_srcdir).
1893
18942001-12-11 Marc Autret <autret_m@epita.fr>
1895
1896 * src/output.c (output_parser): Remove useless muscle.
1897
18982001-12-11 Marc Autret <autret_m@epita.fr>
1899
1900 * src/bison.simple: Remove #line just before %%epilogue. It
1901 is now handled in ...
1902 * src/reader.c (read_additionnal_code): Add the output of a
1903 #line for the epilogue.
1904
19052001-12-10 Marc Autret <autret_m@epita.fr>
1906
1907 * src/reader.c (copy_definition): Re-use CPP-outed code which
1908 replace precedent remove.
1909 * src/bison.simple: Remove #line before %%prologue because
1910 %%input-line is wrong at this time.
1911
19122001-12-10 Marc Autret <autret_m@epita.fr>
1913
1914 * src/reader.c (symbols_output): Clean up.
1915 * src/output.c (output_gram, output): Clean up.
1916
19172001-12-10 Akim Demaille <akim@epita.fr>
1918
1919 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1920 * src/LR0.c (set_state_table): here.
1921 * src/lalr.c (lalr): Call it.
1922
19232001-12-10 Akim Demaille <akim@epita.fr>
1924
1925 * src/state.h (shifts): Remove the `number' member: shifts are
1926 attached to state, hence no longer need to be labelled with a
1927 state number.
1928
19292001-12-10 Akim Demaille <akim@epita.fr>
1930
1931 Now that states have a complete set of members, the linked list of
1932 shifts is useless: just fill directly the state's shifts member.
1933
1934 * src/state.h (shifts): Remove the `next' member.
1935 * src/LR0.c (first_state, last_state): Remove.
1936 Adjust the callers.
1937 (augment_automaton): Don't look for the shifts that must be added
1938 a shift on EOF: it is those of the state we looked for! But now,
1939 since shifts are attached, it is no longer needed to looking
1940 merely by its id: its number.
1941
19422001-12-10 Akim Demaille <akim@epita.fr>
1943
1944 * src/LR0.c (augment_automaton): Better variable locality.
1945 Remove an impossible branch: if there is a state corresponding to
1946 the start symbol being shifted, then there is shift for the start
1947 symbol from the initial state.
1948
19492001-12-10 Akim Demaille <akim@epita.fr>
1950
1951 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1952 only when appropriate: when insert_start_shifting_state' is not
1953 invoked.
1954 * tests/regression.at (Rule Line Numbers): Adjust.
1955
19562001-12-10 Akim Demaille <akim@epita.fr>
1957
1958 * src/LR0.c (augment_automaton): Now that all states have shifts,
1959 merge the two cases addition shifts to the initial state.
1960
19612001-12-10 Akim Demaille <akim@epita.fr>
1962
1963 * src/lalr.c (set_state_table): Move to...
1964 * src/LR0.c: here.
1965 * src/lalr.c (lalr): Don't call it...
1966 * src/LR0.c (generate_states): do it.
1967 * src/LR0.h (first_state): Remove, only the table is used.
1968
19692001-12-10 Akim Demaille <akim@epita.fr>
1970
1971 * src/LR0.h (first_shift, first_reduction): Remove.
1972 * src/lalr.c: Don't use first_shift: find shifts through the
1973 states.
1974
19752001-12-10 Akim Demaille <akim@epita.fr>
1976
1977 * src/LR0.c: Attach shifts to states as soon as they are
1978 computed.
1979 * src/lalr.c (set_state_table): Instead of assigning shifts to
1980 state, just assert that the mapping was properly done.
1981
19822001-12-10 Akim Demaille <akim@epita.fr>
1983
1984 * src/LR0.c (insert_start_shift): Rename as...
1985 (insert_start_shifting_state): this.
1986 (insert_eof_shifting_state, insert_accepting_state): New.
1987 (augment_automaton): Adjust.
1988 Better locality of the variables.
1989 When looking if the start_symbol is shifted from the initial
1990 state, using `while (... symbol != start_symbol ...)' sounds
1991 better than `while (... symbol < start_symbol ...)': If fail
1992 to see how the order between symbols could be relevant!
1993
19942001-12-10 Akim Demaille <akim@epita.fr>
1995
1996 * src/getargs.h: Don't declare `spec_name_prefix' and
1997 `spec_file_prefix', declared by src/files.h.
1998 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1999 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2000 * src/output.c (prepare): Adjust.
2001 * src/reader.c (symbols_output): Likewise.
2002 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2003
20042001-12-10 Akim Demaille <akim@epita.fr>
2005
2006 * src/muscle_tab.c (muscle_init): NULL is a better default than
2007 `"0"'.
2008
20092001-12-10 Akim Demaille <akim@epita.fr>
2010
2011 * src/reader.c (reader): Calling symbols_output once is enough.
2012
20132001-12-10 Akim Demaille <akim@epita.fr>
2014
2015 Now that states have a complete set of members, the linked list of
2016 reductions is useless: just fill directly the state's reductions
2017 member.
2018
2019 * src/state.h (struct reductions): Remove member `number' and
2020 `next'.
2021 * src/LR0.c (first_reduction, last_reduction): Remove.
2022 (save_reductions): Don't link the new reductions, store them in
2023 this_state.
2024 * src/lalr.c (set_state_table): No need to attach reductions to
2025 states, it's already done.
2026 * src/output.c (output_actions): No longer free the shifts, then
2027 the reductions, then the states: free all the states and their
2028 members.
2029
20302001-12-10 Akim Demaille <akim@epita.fr>
2031
2032 * src/options.c (OPTN, DRTV, BOTH): New.
2033 (option_table): Use them.
2034
2035 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2036 the job of system.h.
2037 * src/options.c: Don't include stdio.h and xalloc.h for the same
2038 reasons.
2039
20402001-12-10 Akim Demaille <akim@epita.fr>
2041
2042 * src/output.c (output, prepare): Make sure the values of the
2043 muscles `action' and `prologue' are 0-terminated.
2044
20452001-12-10 Akim Demaille <akim@epita.fr>
2046
2047 Clean up GCC warnings.
2048
2049 * src/reader.c (copy_action): `buf' is not used.
2050 (parse_skel_decl): Be static.
2051 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2052 * src/options.h (create_long_option_table): Have a real prototype.
2053 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2054 (hash_delete_at): Return const void *.
2055 Adjust casts to preserve the const.
2056
20572001-12-10 Akim Demaille <akim@epita.fr>
2058
2059 * configure.in: Require 2.52g.
2060 M4 is not needed, but AUTOM4TE is.
2061 * m4/m4.m4: Remove.
2062 * tests/Makefile.am: Adjust.
2063
20642001-12-10 Akim Demaille <akim@epita.fr>
2065
2066 One structure for states is enough, even though theoretically
2067 there are LR(0) states and LALR(1) states.
2068
2069 * src/lalr.h (state_t): Remove.
2070 (state_table): Be state_t **, not state_t *.
2071 * src/state.h (core, CORE_ALLOC): Rename as...
2072 (state_t, STATE_ALLOC): this.
2073 Add the LALR(1) members: shifts, reductions, errs.
2074 * src/LR0.c (state_table): Rename as...
2075 (state_hash): this, to avoid name clashes with the global
2076 `state_table'.
2077 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2078 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2079
20802001-12-10 Akim Demaille <akim@epita.fr>
2081
2082 Bison dumps core on bash.y.
2083 Reported by Pascal Bart.
2084
2085 * src/warshall.c (bitmatrix_print): New.
2086 (TC): Use it.
2087 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2088 j must be the outer loop.
2089 * tests/regression.at (Broken Closure): New.
2090
20912001-12-05 Akim Demaille <akim@epita.fr>
2092
2093 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2094 its argument.
2095