]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* data/bison.simple (yyr1): Its type is that of a token number.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-04-22 Akim Demaille <akim@epita.fr>
2
3 * data/bison.simple (yyr1): Its type is that of a token number.
4 * data/bison.c++ (r1_): Likewise.
5 * tests/regression.at (Web2c Actions): Adjust.
6
72002-04-22 Akim Demaille <akim@epita.fr>
8
9 * src/reader.c (token_translations_init): 256 is now the default
10 value for the error token, i.e., it will be assigned another
11 number if the user assigned 256 to one of her tokens.
12 (reader): Don't force 256 to error.
13 * doc/bison.texinfo (Symbols): Adjust.
14 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
15 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16 etc. instead of 10, 20, 30 (which was used to `jump' over error
17 (256) and undefined (2)).
18
192002-04-22 Akim Demaille <akim@epita.fr>
20
21 Propagate more token_number_t.
22
23 * src/gram.h (token_number_as_item_number)
24 (item_number_as_token_number): New.
25 * src/output.c (GENERATE_OUTPUT_TABLE): New.
26 Use it to create output_item_number_table and
27 output_token_number_table.
28 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
29 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
30 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
31 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
32
33
342002-04-22 Akim Demaille <akim@epita.fr>
35
36 * src/output.h, src/output.c (get_lines_number): Remove.
37
382002-04-19 Akim Demaille <akim@epita.fr>
39
40 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
41 as Lex/Flex'.
42 (Debugging): More details about enabling the debugging features.
43 (Table of Symbols): Describe $$, $n, @$, and @n.
44 Suggested by Tim Josling.
45
462002-04-19 Akim Demaille <akim@epita.fr>
47
48 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
49
502002-04-10 Akim Demaille <akim@epita.fr>
51
52 * src/system.h: Rely on HAVE_LIMITS_H.
53 Suggested by Paul Eggert.
54
552002-04-09 Akim Demaille <akim@epita.fr>
56
57 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
58 full stderr, and strip it according to the bison options, instead
59 of composing the error message from different bits.
60 This makes it easier to check for several error messages.
61 Adjust all the invocations.
62 Add an invocation exercising the error token.
63 Add an invocation demonstrating a stupid error message.
64 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
65 Adjust the tests.
66 Error message are for stderr, not stdout.
67
682002-04-09 Akim Demaille <akim@epita.fr>
69
70 * src/gram.h, src/gram.c (error_token_number): Remove, use
71 errtoken->number.
72 * src/reader.c (reader): Don't specify the user token number (2)
73 for $undefined, as it uselessly prevents using it.
74 * src/gram.h (token_number_t): Move to...
75 * src/symtab.h: here.
76 (state_t.number): Is a token_number_t.
77 * src/print.c, src/reader.c: Use undeftoken->number instead of
78 hard coded 2.
79 (Even though this 2 is not the same as above: the number of the
80 undeftoken remains being 2, it is its user token number which
81 might not be 2).
82 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
83 `user_token_number_max'.
84 Output `undef_token_number'.
85 * data/bison.simple, data/bison.c++: Use them.
86 Be sure to map invalid yylex return values to
87 `undef_token_number'. This saves us from gratuitous SEGV.
88
89 * tests/conflicts.at (Solved SR Conflicts)
90 (Unresolved SR Conflicts): Adjust.
91 * tests/regression.at (Web2c Actions): Adjust.
92
932002-04-08 Akim Demaille <akim@epita.fr>
94
95 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
96 Adding #line.
97 Remove the duplicate `typedefs'.
98 (RhsNumberType): Fix the declaration and various other typos.
99 Use __ofile__.
100 * data/bison.simple: Use __ofile__.
101 * src/scan-skel.l: Handle __ofile__.
102
1032002-04-08 Akim Demaille <akim@epita.fr>
104
105 * src/gram.h (item_number_t): New, the type of item numbers in
106 RITEM. Note that it must be able to code symbol numbers as
107 positive number, and the negation of rule numbers as negative
108 numbers.
109 Adjust all dependencies (pretty many).
110 * src/reduce.c (rule): Remove this `short *' pointer: use
111 item_number_t.
112 * src/system.h (MINSHORT, MAXSHORT): Remove.
113 Include `limits.h'.
114 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
115 (shortcpy): Remove.
116 (MAXTABLE): Move to...
117 * src/output.c (MAXTABLE): here.
118 (prepare_rules): Use output_int_table to output rhs.
119 * data/bison.simple, data/bison.c++: Adjust.
120 * tests/torture.at (Big triangle): Move the limit from 254 to
121 500.
122 * tests/regression.at (Web2c Actions): Ajust.
123
124 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
125 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
126 passes, but produces negative #line number, once fixed, GCC is
127 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
128 C), it passes.
129 * src/state.h (state_h): Code input lines on ints, not shorts.
130
1312002-04-08 Akim Demaille <akim@epita.fr>
132
133 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
134 and then the grammar.
135
1362002-04-08 Akim Demaille <akim@epita.fr>
137
138 * src/system.h: No longer using strndup.
139
1402002-04-07 Akim Demaille <akim@epita.fr>
141
142 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
143 * src/output.c (output_table_data): Return the longest number.
144 (prepare_tokens): Output `token_number_max').
145 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
146 New.
147 Use them to define yy_token_number_type/TokenNumberType.
148 Use this type for yytranslate.
149 * tests/torture.at (Big triangle): Push the limit from 124 to
150 253.
151 * tests/regression.at (Web2c Actions): Adjust.
152
1532002-04-07 Akim Demaille <akim@epita.fr>
154
155 * tests/torture.at (Big triangle): New.
156 (GNU AWK Grammar, GNU Cim Grammar): Move to...
157 * tests/existing.at: here.
158
1592002-04-07 Akim Demaille <akim@epita.fr>
160
161 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
162 nritems.
163 Adjust dependencies.
164
1652002-04-07 Akim Demaille <akim@epita.fr>
166
167 * src/reader.c: Normalize increments to prefix form.
168
1692002-04-07 Akim Demaille <akim@epita.fr>
170
171 * src/reader.c, symtab.c: Remove debugging code.
172
1732002-04-07 Akim Demaille <akim@epita.fr>
174
175 Rename all the `bucket's as `symbol_t'.
176
177 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
178 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
179 * src/symtab.c, src/symtab.h (bucket): Rename as...
180 (symbol_t): this.
181 (symbol_list_new, bucket_check_defined, bucket_make_alias)
182 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
183 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
184 (buckets_new, buckets_free, buckets_do): Rename as...
185 (symbol_list_new, symbol_check_defined, symbol_make_alias)
186 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
187 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
188 (symbols_new, symbols_free, symbols_do): these.
189
1902002-04-07 Akim Demaille <akim@epita.fr>
191
192 Use lib/hash for the symbol table.
193
194 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
195 EOF.
196 * src/lex.c (lex): Set the `number' member of new terminals.
197 * src/reader.c (bucket_check_defined, bucket_make_alias)
198 (bucket_check_alias_consistence, bucket_translation): New.
199 (reader, grammar_free, readgram, token_translations_init)
200 (packsymbols): Adjust.
201 (reader): Number the predefined tokens.
202 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
203 for predefined tokens.
204 * src/symtab.h (bucket): Remove all the hash table related
205 members.
206 * src/symtab.c (symtab): Replace by...
207 (bucket_table): this.
208 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
209 (buckets_new, buckets_do): New.
210
2112002-04-07 Akim Demaille <akim@epita.fr>
212
213 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
214 (start_symbol, max_user_token_number, semantic_parser)
215 (error_token_number): Initialize.
216 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
217 Initialize.
218 (reader): Don't.
219 (errtoken, eoftoken, undeftoken, axiom): Extern.
220
2212002-04-07 Akim Demaille <akim@epita.fr>
222
223 * src/gram.h (rule_s): prec and precsym are now pointers
224 to the bucket giving the priority/associativity.
225 Member `associativity' removed: useless.
226 * src/reduce.c, src/conflicts.c: Adjust.
227
2282002-04-07 Akim Demaille <akim@epita.fr>
229
230 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
231 Properly escape the symbols' TAG when outputting them.
232
2332002-04-07 Akim Demaille <akim@epita.fr>
234
235 * src/lalr.h (LA): Is a bitsetv, not bitset*.
236
2372002-04-07 Akim Demaille <akim@epita.fr>
238
239 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
240 (LArule): this, which is an array to rule_t*.
241 * src/print.c, src/conflicts.c: Adjust.
242
2432002-04-07 Akim Demaille <akim@epita.fr>
244
245 * src/gram.h (rule_t): Rename `number' as `user_number'.
246 `number' is a new member.
247 Adjust dependencies.
248 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
249
2502002-04-07 Akim Demaille <akim@epita.fr>
251
252 As a result of the previous patch, it is no longer needed
253 to reorder ritem itself.
254
255 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
256
2572002-04-07 Akim Demaille <akim@epita.fr>
258
259 Be sure never to walk through RITEMS, but use only data related to
260 the rules themselves. RITEMS should be banished.
261
262 * src/output.c (output_token_translations): Rename as...
263 (prepare_tokens): this.
264 In addition to `translate', prepare the muscles `tname' and
265 `toknum', which were handled by...
266 (output_rule_data): this.
267 Remove, and move the remainder of its outputs into...
268 (prepare_rules): this new routines, which also merges content from
269 (output_gram): this.
270 (prepare_rules): Be sure never to walk through RITEMS.
271 (output_stos): Rename as...
272 (prepare_stos): this.
273 (output): Always invoke prepare_states, after all, just don't use it
274 in the output if you don't need it.
275
2762002-04-07 Akim Demaille <akim@epita.fr>
277
278 * src/LR0.c (new_state): Display `nstates' as the name of the
279 newly created state.
280 Adjust to initialize first_state and last_state if needed.
281 Be sure to distinguish the initial from the final state.
282 (new_states): Create the itemset of the initial state, and use
283 new_state.
284 * src/closure.c (closure): Now that the initial state has its
285 items properly set, there is no need for a special case when
286 creating `ruleset'.
287
288 As a result, now the rule 0, reducing to $axiom, is visible in the
289 outputs. Adjust the test suite.
290
291 * tests/conflicts.at (Solved SR Conflicts)
292 (Unresolved SR Conflicts): Adjust.
293 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
294 * tests/conflicts.at (S/R in initial): New.
295
2962002-04-07 Akim Demaille <akim@epita.fr>
297
298 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
299 the RHS of the rules.
300 * src/output.c (output_gram): Likewise.
301
3022002-04-07 Akim Demaille <akim@epita.fr>
303
304 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
305 bucket.
306 Adjust all dependencies.
307 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
308 `number' of the buckets too.
309 * src/gram.h: Include `symtab.h'.
310 (associativity): Move to...
311 * src/symtab.h: here.
312 No longer include `gram.h'.
313
3142002-04-07 Akim Demaille <akim@epita.fr>
315
316 * src/gram.h, src/gram.c (rules_rhs_length): New.
317 (ritem_longest_rhs): Use it.
318 * src/gram.h (rule_t): `number' is a new member.
319 * src/reader.c (packgram): Set it.
320 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
321 the end of `rules', and count them out of `nrules'.
322 (reduce_output, dump_grammar): Adjust.
323 * src/print.c (print_grammar): It is no longer needed to check for
324 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
325 * tests/reduce.at (Reduced Automaton): New test.
326
3272002-04-07 Akim Demaille <akim@epita.fr>
328
329 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
330 lacking `+ 1' to nrules, Bison reported as useless a token if it
331 was used solely to set the precedence of the last rule...
332
3332002-04-07 Akim Demaille <akim@epita.fr>
334
335 * data/bison.c++, data/bison.simple: Don't output the current file
336 name in #line, to avoid useless diffs between two identical
337 outputs under different names.
338
3392002-04-07 Akim Demaille <akim@epita.fr>
340
341 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
342 Normalize loops to using `< nrules + 1', not `<= nrules'.
343
3442002-04-07 Akim Demaille <akim@epita.fr>
345
346 * TODO: Update.
347
3482002-04-07 Akim Demaille <akim@epita.fr>
349
350 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
351 bucket.value as bucket.number.
352
3532002-04-07 Akim Demaille <akim@epita.fr>
354
355 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
356 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
357 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
358 RHS, instead of being an index in RITEMS.
359
3602002-04-04 Paul Eggert <eggert@twinsun.com>
361
362 * doc/bison.texinfo: Update copyright date.
363 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
364 (Symbols): Warn about running Bison in one character set,
365 but compiling and/or running in an incompatible one.
366 Warn about character code 256, too.
367
3682002-04-03 Paul Eggert <eggert@twinsun.com>
369
370 * src/bison.data (YYSTACK_ALLOC): Depend on whether
371 YYERROR_VERBOSE is nonzero, not whether it is defined.
372
373 Merge changes from bison-1_29-branch.
374
3752002-03-20 Paul Eggert <eggert@twinsun.com>
376
377 Merge fixes from Debian bison_1.34-1.diff.
378
379 * configure.in (AC_PREREQ): 2.53.
380
3812002-03-20 Akim Demaille <akim@epita.fr>
382
383 * src/conflicts.c (log_resolution): Argument `resolution' is const.
384
3852002-03-19 Paul Eggert <eggert@twinsun.com>
386
387 * src/bison.simple (YYCOPY): New macro.
388 (YYSTACK_RELOCATE): Use it.
389 Remove Type arg; no longer needed. All callers changed.
390 (yymemcpy): Remove; no longer needed.
391
392 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
393 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
394
3952002-03-19 Akim Demaille <akim@epita.fr>
396
397 Test and fix the #line outputs.
398
399 * tests/atlocal.at (GCC): New.
400 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
401 (Prologue synch line, ,%union synch line, Postprologue synch line)
402 (Action synch line, Epilogue synch line): New tests.
403 * src/reader.c (parse_union_decl): Define the muscle stype_line.
404 * data/bison.simple, data/bison.c++: Use it.
405
4062002-03-19 Akim Demaille <akim@epita.fr>
407
408 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
409 (Solved SR Conflicts, %expect not enough, %expect right)
410 (%expect too much): Move to...
411 * tests/conflicts.at: this new file.
412
4132002-03-19 Akim Demaille <akim@epita.fr>
414
415 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
416 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
417 that we can move to enums for instance.
418 * src/output.c (token_definitions_output): Output a list of
419 `token-name, token-number' instead of the #define.
420 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
421
4222002-03-14 Akim Demaille <akim@epita.fr>
423
424 Use Gettext 0.11.1.
425
4262002-03-09 Robert Anisko <robert@lrde.epita.fr>
427
428 * data/bison.c++: Make the user able to add members to the generated
429 parser by subclassing.
430
4312002-03-05 Robert Anisko <robert@lrde.epita.fr>
432
433 * src/reader.c (read_additionnal_code): `c' should be an integer, not
434 a character.
435 Reported by Nicolas Tisserand and Nicolas Burrus.
436
4372002-03-04 Robert Anisko <robert@lrde.epita.fr>
438
439 * src/reader.c: Warn about lacking semi-colons, do not complain.
440
4412002-03-04 Robert Anisko <robert@lrde.epita.fr>
442
443 * data/bison.c++: Remove a debug line.
444
4452002-03-04 Robert Anisko <robert@lrde.epita.fr>
446
447 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
448 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
449 provide a default implementation.
450
4512002-03-04 Akim Demaille <akim@epita.fr>
452
453 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
454 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
455 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
456 * tests/semantic.at (Parsing Guards): Similarly.
457 * src/reader.at (readgram): Complain if the last rule is not ended
458 with a semi-colon.
459
4602002-03-04 Akim Demaille <akim@epita.fr>
461
462 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
463 * src/closure.c: here.
464 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
465 RTC.
466 * src/warshall.h, src/warshall.c: Remove.
467 * tests/sets.at (Broken Closure): Adjust.
468
4692002-03-04 Akim Demaille <akim@epita.fr>
470
471 * src/output.c (output_skeleton): tempdir is const.
472 bytes_read is unused.
473
4742002-03-04 Akim Demaille <akim@epita.fr>
475
476 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
477 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
478 Update.
479 From Michael Hayes.
480
4812002-03-04 Akim Demaille <akim@epita.fr>
482
483 * src/closure.c (closure): `r' is unused.
484
4852002-03-04 Akim Demaille <akim@epita.fr>
486
487 * tests/sets.at (Broken Closure): Add the ending `;'.
488 * src/reader.at (readgram): Complain if a rule is not ended with a
489 semi-colon.
490
4912002-03-04 Akim Demaille <akim@epita.fr>
492
493 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
494 (count_sr_conflicts): Use bitset_count.
495 * src/reduce.c (inaccessable_symbols): Ditto.
496 (bits_size): Remove.
497 * src/warshall.h, src/warshall.c: Convert to bitsetv.
498
4992002-03-04 Akim Demaille <akim@epita.fr>
500
501 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
502 * src/reduce.c: Remove the `bitset_zero's following the
503 `bitset_create's, as now it is performed by the latter.
504
5052002-03-04 Akim Demaille <akim@epita.fr>
506
507 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
508 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
509 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
510 latest sources from Michael.
511
5122002-03-04 Akim Demaille <akim@epita.fr>
513
514 * src/output.c (output): Don't free the grammar.
515 * src/reader.c (grammar_free): New.
516 * src/main.c (main): Call it and don't free symtab here.
517
5182002-03-04 Akim Demaille <akim@epita.fr>
519
520 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
521 before returning.
522 Reported by Benoit Perrot.
523
5242002-03-04 Akim Demaille <akim@epita.fr>
525
526 Use bitset operations when possible, not loops over bits.
527
528 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
529 bitset_or.
530 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
531 * src/reduce.c (useless_nonterminals): Formatting changes.
532 * src/warshall.c (TC): Use bitset_or.
533
5342002-03-04 Akim Demaille <akim@epita.fr>
535
536 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
537 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
538 Ditto.
539
5402002-03-04 Akim Demaille <akim@epita.fr>
541
542 * src/lalr.c (F): Now a bitset*.
543 Adjust all dependencies.
544
5452002-03-04 Akim Demaille <akim@epita.fr>
546
547 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
548 Adjust all dependencies.
549
5502002-03-04 Akim Demaille <akim@epita.fr>
551
552 * src/L0.c, src/LR0.h (nstates): Be size_t.
553 Adjust comparisons (signed vs unsigned).
554 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
555 bitset*.
556 Adjust all dependencies.
557
5582002-03-04 Akim Demaille <akim@epita.fr>
559
560 * src/closure.c (firsts): Now, also a bitset.
561 Adjust all dependencies.
562 (varsetsize): Remove, now unused.
563 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
564
5652002-03-04 Akim Demaille <akim@epita.fr>
566
567 * src/print.c: Convert to use bitset.h, not hand coded iterations
568 over ints.
569
5702002-03-04 Akim Demaille <akim@epita.fr>
571
572 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
573
5742002-03-04 Akim Demaille <akim@epita.fr>
575
576 * src/closure.c (ruleset): Be a bitset.
577 (rulesetsize): Remove.
578
5792002-03-04 Akim Demaille <akim@epita.fr>
580
581 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
582 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
583 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
584 * src/closure.c (fderives): Be an array of bitsets.
585
5862002-02-28 Robert Anisko <robert@lrde.epita.fr>
587
588 * data/bison.c++: Merge the two generated headers. Insert a copyright
589 notice in each output file.
590
5912002-02-28 Akim Demaille <akim@epita.fr>
592
593 * data/bison.c++: Copy the prologue of bison.simple to fetch
594 useful M4 definitions, such as b4_header_guard.
595
5962002-02-25 Akim Demaille <akim@epita.fr>
597
598 * src/getargs.c (version): Give the name of the authors, and use a
599 translator friendly scheme for the bgr
600 copyright notice.
601
6022002-02-25 Akim Demaille <akim@epita.fr>
603
604 * src/output.c (header_output): Remove, now handled completely via
605 M4.
606
6072002-02-25 Akim Demaille <akim@epita.fr>
608
609 * m4/m4.m4: New, from CVS Autoconf.
610 * configure.in: Invoke it.
611 * src/output.c (output_skeleton): Use its result instead of the
612 hard coded name.
613
6142002-02-25 Akim Demaille <akim@epita.fr>
615
616 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
617 Fileutils 4.1.5.
618 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
619 * src/output.c (output_skeleton): Use mkstemp to create a real
620 temporary file.
621 Move the filling of `skeleton' and its muscle to...
622 (prepare): here.
623 (output): Move the definition of the prologue muscle to...
624 (prepare): here.
625 * src/system.h (DEFAULT_TMPDIR): New.
626
6272002-02-14 Paul Eggert <eggert@twinsun.com>
628
629 Remove the support for C++ namespace cleanliness; it was
630 causing more problems than it was curing, since it didn't work
631 properly on some nonstandard C++ compilers. This can wait
632 for a proper C++ parser.
633
634 * NEWS: Document this.
635 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
636 of C++, as it's treated like C now.
637 * src/bison.simple (YYSTD): Remove.
638 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
639 Treat C++ just like Standard C instead of trying to support
640 namespace cleanliness.
641
6422002-02-14 Akim Demaille <akim@epita.fr>
643
644 * tests/regression.at (else): Adjust to Andreas' change.
645
6462002-02-14 Akim Demaille <akim@epita.fr>
647
648 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
649
6502002-02-13 Andreas Schwab <schwab@suse.de>
651
652 * src/output.c (output_rule_data): Don't output NULL, it might
653 not be defined yet.
654
6552002-02-11 Robert Anisko <robert@lrde.epita.fr>
656
657 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
658 (Copyright notice): Update.
659
6602002-02-11 Akim Demaille <akim@epita.fr>
661
662 * tests/regression.at (%nonassoc and eof): Don't include
663 nonportable headers.
664
6652002-02-08 Robert Anisko <robert@lrde.epita.fr>
666
667 * data/bison.c++: Correct error recovery. Make the user able to
668 initialize the starting location.
669
6702002-02-07 Akim Demaille <akim@epita.fr>
671
672 * tests/input.at: New.
673
6742002-02-07 Robert Anisko <robert@lrde.epita.fr>
675
676 * data/bison.c++: Replace some direct m4 expansions by constants. Be
677 more consistent when naming methods and variables. Put preprocessor
678 directives around tables only needed for debugging.
679
6802002-02-07 Robert Anisko <robert@lrde.epita.fr>
681
682 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
683 C++ parsers.
684 (yy::b4_name::parse): Use print_.
685
6862002-02-07 Robert Anisko <robert@lrde.epita.fr>
687
688 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
689
6902002-02-07 Robert Anisko <robert@lrde.epita.fr>
691
692 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
693 C++ parsers.
694 (yy::b4_name::parse): Build verbose error messages, and use error_.
695
6962002-02-06 Robert Anisko <robert@lrde.epita.fr>
697
698 * data/bison.c++: Fix m4 quoting in comments.
699
7002002-02-06 Robert Anisko <robert@lrde.epita.fr>
701
702 * data/bison.c++: Adjust the parser code. Fix some muscles that were
703 not expanded by m4.
704
7052002-02-05 Akim Demaille <akim@epita.fr>
706
707 * data/bison.c++: Adjust to the M4 back end.
708 More is certainly needed.
709
7102002-02-05 Akim Demaille <akim@epita.fr>
711
712 Give a try to M4 as a back end.
713
714 * lib/readpipe.c: New, from wdiff.
715 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
716 BISON_HAIRY.
717 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
718 specific values. Now it is m4 that performs the lookup.
719 * src/parse-skel.y: Remove.
720 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
721 * src/output.c (actions_output, guards_output)
722 (token_definitions_output): No longer keeps track of the output
723 line number, hence remove the second argument.
724 (guards_output): Check against the guard member of a rule, not the
725 action member.
726 Adjust callers.
727 (output_skeleton): Don't look for the skeleton location, let m4 do
728 that.
729 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
730 file will be used.
731 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
732 (prepare): Given that for the time being changesyntax is not
733 usable in M4, rename the muscles using `-' to `_'.
734 Define `defines_flag', `output_parser_name' and `output_header_name'.
735 * src/output.h (actions_output, guards_output)
736 (token_definitions_output): Adjust prototypes.
737 * src/scan-skel.l: Instead of scanning the skeletons, it now
738 processes the output of m4: `__oline__' and `#output'.
739 * data/bison.simple: Adjust to be used by M4(sugar).
740 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
741 to date.
742 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
743 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
744 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
745 shamelessly stolen from CVS Autoconf.
746
7472002-02-05 Akim Demaille <akim@epita.fr>
748
749 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
750 * configure.in: Check for the declarations of free and malloc.
751 * src/muscle_tab.c: Adjust.
752
7532002-02-05 Akim Demaille <akim@epita.fr>
754
755 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
756 which have no values.
757
7582002-02-05 Akim Demaille <akim@epita.fr>
759
760 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
761 * data/: here.
762
7632002-01-29 Paul Eggert <eggert@twinsun.com>
764
765 * src/bison.simple (YYSIZE_T): Do not define merely because
766 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
767 On some platforms, <alloca.h> does not declare YYSTD (size_t).
768
7692002-01-27 Akim Demaille <akim@epita.fr>
770
771 Fix `%nonassoc and eof'.
772
773 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
774 which were not properly copied! Replace
775 memcpy (res->errs, src->errs, src->nerrs);
776 with
777 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
778 !!!
779 * tests/regression.at (%nonassoc and eof): Adjust to newest
780 Autotest: `.' is not in the PATH.
781
7822002-01-27 Akim Demaille <akim@epita.fr>
783
784 * tests/sets.at (AT_EXTRACT_SETS): New.
785 (Nullable): Use it.
786 (Firsts): New.
787
7882002-01-26 Akim Demaille <akim@epita.fr>
789
790 * tests/actions.at, tests/calc.at, tests/headers.at,
791 * tests/torture.at: Adjust to the newest Autotest which no longer
792 forces `.' in the PATH.
793
7942002-01-25 Akim Demaille <akim@epita.fr>
795
796 * tests/regression.at (%nonassoc and eof): New.
797 Suggested by Robert Anisko.
798
7992002-01-24 Akim Demaille <akim@epita.fr>
800
801 Bison dumps core when trying to complain about broken input files.
802 Reported by Cris van Pelt.
803
804 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
805 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
806 into...
807 (Invalid inputs): Strengthen: exercise parse_percent_token.
808
8092002-01-24 Robert Anisko <robert.anisko@epita.fr>
810
811 * src/Makefile.am: Add bison.c++.
812 * src/bison.c++: New skeleton.
813
8142002-01-21 Paolo Bonzini <bonzini@gnu.org>
815
816 * po/it.po: New.
817
8182002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
819
820 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
821
8222002-01-20 Marc Autret <marc@gnu.org>
823
824 * src/files.c (compute_output_file_names): Fix
825
8262002-01-20 Marc Autret <marc@gnu.org>
827
828 * tests/output.at: New test.
829 * src/files.c (compute_base_names): Don't map extensions when
830 the YACC flag is set, use defaults.
831 Reported by Evgeny Stambulchik.
832
8332002-01-20 Marc Autret <marc@gnu.org>
834
835 * src/system.h: Need to define __attribute__ away for non-GCC
836 compilers as well (i.e. the vendor C compiler).
837 Suggested by Albert Chin-A-Young.
838
8392002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
840
841 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
842 canonical definition.
843 * src/system.h: Use the canonical definition for PARAMS (avoids
844 a conflict with the macro from lib/hash.h).
845
8462002-01-11 Akim Demaille <akim@epita.fr>
847
848 * configure.in: Use AC_FUNC_STRNLEN.
849 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
850
8512002-01-09 Akim Demaille <akim@epita.fr>
852
853 * src/files.c, src/files.h (output_infix): New.
854 (tab_extension): Remove.
855 (compute_base_names): Compute the former, drop the latter.
856 * src/output.c (prepare): Insert the muscles `output-infix', and
857 `output-suffix'.
858 * src/parse-skel.y (string, string.1): New.
859 (section.header): Use it.
860 (section.yacc): Remove.
861 (prefix): Remove too.
862 * src/scan-skel.l: Adjust.
863 * src/bison.simple, src/bison.hairy: Adjust.
864
8652002-01-09 Akim Demaille <akim@epita.fr>
866
867 * configure.in (WERROR_CFLAGS): Compute it.
868 * src/Makefile.am (CFLAGS): Pass it.
869 * tests/atlocal.in (CFLAGS): Idem.
870 * src/files.c: Fix a few warnings.
871 (get_extension_index): Remove, unused.
872
8732002-01-08 Akim Demaille <akim@epita.fr>
874
875 * src/getargs.c (AS_FILE_NAME): New.
876 (getargs): Use it to convert DOSish file names.
877 * src/files.c (base_name): Rename as full_base_name to avoid
878 clashes with `base_name ()'.
879 (filename_split): New.
880 (compute_base_names): N-th rewrite, using filename_split.
881
8822002-01-08 Akim Demaille <akim@epita.fr>
883
884 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
885 New, stolen from the Fileutils 4.1.
886 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
887 * configure.in: Check for the presence of memrchr, and of its
888 prototype.
889
8902002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
891
892 * lib/hash.h (__P): Added definition for this macro.
893 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
894 BUILT_SOURCES, to ensure they are generated first.
895 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
896 %error-verbose to allow bootstrapping with bison 1.30x.
897
8982002-01-06 Akim Demaille <akim@epita.fr>
899
900 * src/reader.c (parse_braces): Don't fetch the next char, the
901 convention is to fetch on entry.
902 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
903 'switch' without a following semicolon.
904 * tests/regression.at (braces parsing): New.
905
9062002-01-06 Akim Demaille <akim@epita.fr>
907
908 Bison is dead wrong in its RR conflict reports.
909
910 * tests/torture.at (GNU Cim Grammar): New.
911 * src/conflicts.c (count_rr_conflicts): Fix.
912
9132002-01-06 Akim Demaille <akim@epita.fr>
914
915 Creating package.m4 from configure.ac causes too many problems.
916
917 * tests/Makefile.am (package.m4): Create it by hand,
918 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
919
9202002-01-06 Akim Demaille <akim@epita.fr>
921
922 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
923 skeleton.h.
924
9252002-01-04 Paul Eggert <eggert@twinsun.com>
926
927 * doc/bison.texinfo (Debugging):
928 Remove YYSTDERR; it's no longer defined or used.
929 Also, s/cstdio.h/cstdio/.
930
9312002-01-03 Akim Demaille <akim@epita.fr>
932
933 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
934
9352002-01-03 Akim Demaille <akim@epita.fr>
936
937 * src/parse-skel.y (process_skeleton): Don't bind the parser's
938 tracing code to --trace, wait for a better --trace option, with
939 args.
940
9412002-01-03 Akim Demaille <akim@epita.fr>
942
943 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
944 The ISO C++ standard is extremely clear about it: stderr is
945 considered a macro, not a regular symbol (see table 94 `Header
946 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
947 Therefore std:: does not apply to it. It still does with fprintf.
948 Also, s/cstdio.h/cstdio/.
949
9502002-01-03 Akim Demaille <akim@epita.fr>
951
952 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
953 for non system headers.
954
9552002-01-02 Akim Demaille <akim@epita.fr>
956
957 Equip the skeleton chain with location tracking, runtime trace,
958 pure parser and scanner.
959
960 * src/parse-skel.y: Request a pure parser, locations, and prefix
961 renaming.
962 (%union): Having several members with the same type does not help
963 type mismatches, simplify.
964 (YYPRINT, yyprint): New.
965 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
966 (skel_error): this.
967 Handle locations.
968 * src/scan-skel.l: Adjust to these changes.
969 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
970 (LOCATION_PRINT, skel_control_t): New.
971
9722001-12-30 Akim Demaille <akim@epita.fr>
973
974 * src/parse-skel.y: Get rid of the shift/reduce conflict:
975 replace `gb' with BLANKS.
976 * src/scan-skel.l: Adjust.
977
9782001-12-30 Akim Demaille <akim@epita.fr>
979
980 * src/system.h: We don't need nor want bcopy.
981 Throw away MS-DOS crap: we don't need getpid.
982 * configure.in: We don't need strndup. It was even causing
983 problems: because Flex includes the headers *before* us,
984 _GNU_SOURCE is not defined by config.h, and therefore strndup was
985 not visible.
986 * lib/xstrndup.c: New.
987 * src/scan-skel.l: Use it.
988 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
989 * src/parse-skel.y: Use %directives instead of #defines.
990
9912001-12-30 Akim Demaille <akim@epita.fr>
992
993 * src/skeleton.h: New.
994 * src/output.c (output_parser, output_master_parser): Remove, dead
995 code.
996 * src/output.h (get_lines_number, actions_output, guards_output)
997 (token_definitions_output): Prototype them.
998 * src/parse-skel.y: Add the license notice.
999 Include output.h and skeleton.h.
1000 (process_skeleton): Returns void, and takes a single parameter.
1001 * src/scan-skel.l: Add the license notice.
1002 Include skeleton.h.
1003 Don't use %option yylineno: it seems that then Flex imagines
1004 REJECT has been used, and therefore it won't reallocate its
1005 buffers (which makes no other sense to me than a bug). It results
1006 in warnings for `unused: yy_flex_realloc'.
1007
10082001-12-30 Robert Anisko <robert.anisko@epita.fr>
1009
1010 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1011 (MUSCLE_INSERT_PREFIX): ...to there.
1012 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1013 (MUSCLE_INSERT_PREFIX): Move from here...
1014
1015 * src/bison.hairy: Add a section directive. Put braces around muscle
1016 names. This parser skeleton is still broken, but Bison should not
1017 choke on a bad muscle 'syntax'.
1018 * src/bison.simple: Add a section directive. Put braces around muscle
1019 names.
1020
1021 * src/files.h (strsuffix, stringappend): Add declarations.
1022 (tab_extension): Add declaration.
1023 (short_base_name): Add declaration.
1024
1025 * src/files.c (strsuffix, stringappend): No longer static. These
1026 functions are used in the skeleton parser.
1027 (tab_extension): New.
1028 (compute_base_names): Use the computations done in this function
1029 to guess if the generated parsers should have '.tab' in their
1030 names.
1031 (short_base_name): No longer static.
1032
1033 * src/output.c (output_skeleton): New.
1034 (output): Disable call to output_master_parser, and give a try to
1035 a new skeleton handling system.
1036 (guards_output, actions_output): No longer static.
1037 (token_definitions_output, get_lines_number): No longer static.
1038
1039 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1040
1041 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
1042 parse-skel.y.
1043
1044 * src/parse-skel.y: New file.
1045 * src/scan-skel.l: New file.
1046
10472001-12-29 Akim Demaille <akim@epita.fr>
1048
1049 %name-prefix is broken.
1050
1051 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1052 Adjust all dependencies.
1053 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1054 %name-prefix.
1055
1056 Renaming yylval but not yylloc is not consistent. Now we do.
1057
1058 * src/bison.simple: Prefix yylloc if used.
1059 * doc/bison.texinfo (Decl Summary): Document that.
1060
10612001-12-29 Akim Demaille <akim@epita.fr>
1062
1063 * doc/bison.texinfo: Promote `%long-directive' over
1064 `%long_directive'.
1065 Remove all references to fixed-output-files, yacc is enough.
1066
10672001-12-29 Akim Demaille <akim@epita.fr>
1068
1069 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1070 user prologue. These are defaults.
1071 * tests/actions.at (Mid-rule actions): Make sure the user can
1072 define YYDEBUG and YYERROR_VERBOSE.
1073
10742001-12-29 Akim Demaille <akim@epita.fr>
1075
1076 * src/output.c (header_output): Don't forget to export YYLTYPE and
1077 yylloc.
1078 * tests/headers.at (export YYLTYPE): New, make sure it does.
1079 * tests/regression.at (%union and --defines, Invalid CPP headers):
1080 Move to...
1081 * tests/headers.at: here.
1082
10832001-12-29 Akim Demaille <akim@epita.fr>
1084
1085 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1086
10872001-12-29 Akim Demaille <akim@epita.fr>
1088
1089 * tests/actions.at (Mid-rule actions): Output on a single line
1090 instead of several.
1091
10922001-12-29 Akim Demaille <akim@epita.fr>
1093
1094 * doc/bison.texinfo: Formatting changes.
1095
10962001-12-29 Akim Demaille <akim@epita.fr>
1097
1098 Don't store the token defs in a muscle, just be ready to output it
1099 on command. Now possible via `symbols'. Fixes a memory leak.
1100
1101 * src/output.c (token_definitions_output): New.
1102 (output_parser, header_output): Use it.
1103 * src/reader.c (symbols_save): Remove.
1104
11052001-12-29 Akim Demaille <akim@epita.fr>
1106
1107 * src/bison.simple: Do not provide a default for YYSTYPE and
1108 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1109 default.
1110
11112001-12-29 Akim Demaille <akim@epita.fr>
1112
1113 Mid-rule actions are simply... ignored!
1114
1115 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1116 the empty-rule associated to the dummy symbol, not to the host
1117 rule.
1118 * tests/actions.at (Mid-rule actions): New.
1119
11202001-12-29 Akim Demaille <akim@epita.fr>
1121
1122 Memory leak.
1123
1124 * src/reader.c (reader): Free grammar.
1125
11262001-12-29 Akim Demaille <akim@epita.fr>
1127
1128 Memory leak.
1129
1130 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1131 since it allocates it for each state, although only one is needed.
1132 (allocate_storage): Do it here.
1133
11342001-12-29 Akim Demaille <akim@epita.fr>
1135
1136 * src/options.h, src/options.c (create_long_option_table): Rename
1137 as...
1138 (long_option_table_new): this, with a clearer prototype.
1139 (percent_table): Remove, unused,
1140 * src/getargs.c (getargs): Adjust.
1141
11422001-12-29 Akim Demaille <akim@epita.fr>
1143
1144 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1145 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1146 as states.
1147
11482001-12-29 Akim Demaille <akim@epita.fr>
1149
1150 * src/lalr.c (build_relations): Rename `states' as `states1'.
1151 Sorry, I don't understand exactly what it is, no better name...
1152
11532001-12-29 Akim Demaille <akim@epita.fr>
1154
1155 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1156 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1157 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1158 as rules.
1159
11602001-12-29 Akim Demaille <akim@epita.fr>
1161
1162 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1163 ago.
1164
11652001-12-29 Akim Demaille <akim@epita.fr>
1166
1167 * src/reader.c, src/reader.h (user_toknums): Remove.
1168 Adjust all users to use symbols[i]->user_token_number.
1169
11702001-12-29 Akim Demaille <akim@epita.fr>
1171
1172 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1173 Adjust all users to use symbols[i]->prec or ->assoc.
1174
11752001-12-29 Akim Demaille <akim@epita.fr>
1176
1177 * src/reader.c, src/reader.h (tags): Remove.
1178 Adjust all users to use symbols[i]->tag.
1179
11802001-12-29 Akim Demaille <akim@epita.fr>
1181
1182 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1183 and rule_table.
1184 * src/reader.c (packsymbols): Fill this table.
1185 Drop sprec.
1186 * src/conflicts.c (resolve_sr_conflict): Adjust.
1187 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1188 single table.
1189 Use symbols[i]->tag instead of tags[i].
1190
11912001-12-29 Akim Demaille <akim@epita.fr>
1192
1193 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1194 In addition, put a comment in there, to replace...
1195 * tests/regression.at (%union and C comments): Remove.
1196
11972001-12-29 Akim Demaille <akim@epita.fr>
1198
1199 * tests/regression.at (Web2c Actions): Blindly move the actual
1200 output as expected output. The contents *seem* right to me, but I
1201 can't pretend reading perfectly parser tables... Nonetheless, all
1202 the other tests pass correctly, the table look OK, even though the
1203 presence of `$axiom' is to be noted: AFAICS it is useless (but
1204 harmless).
1205
12062001-12-29 Akim Demaille <akim@epita.fr>
1207
1208 * src/reader.c (readgram): Don't add the rule 0 if there were no
1209 rules read. In other words, add it _after_ having performed
1210 grammar sanity checks.
1211 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1212
12132001-12-29 Akim Demaille <akim@epita.fr>
1214
1215 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1216 visible, and some states have now a different number.
1217
12182001-12-29 Akim Demaille <akim@epita.fr>
1219
1220 * src/reader.c (readgram): Bind the initial rule's lineno to that
1221 of the first rule.
1222 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1223 (Solved SR Conflicts): Adjust rule 0's line number.
1224
12252001-12-29 Akim Demaille <akim@epita.fr>
1226
1227 Fix the `GAWK Grammar' failure.
1228
1229 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1230 the reductions of the first state which was mistakenly confused
1231 with the final state because precisely final_state was initialized
1232 to 0.
1233 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1234 now noticed by Bison.
1235 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1236 have a reduction on $default.
1237
12382001-12-29 Akim Demaille <akim@epita.fr>
1239
1240 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1241 rule line numbers.
1242 * src/closure.c (print_closure): Likewise.
1243 * src/derives.c (print_derives): Likewise.
1244 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1245 now.
1246
12472001-12-29 Akim Demaille <akim@epita.fr>
1248
1249 * src/lalr.c (lookaheads_print): New.
1250 (lalr): Call it when --trace-flag.
1251 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1252 are dumped.
1253
12542001-12-29 Akim Demaille <akim@epita.fr>
1255
1256 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1257 when walking through ritem, even via rule->rhs.
1258 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1259 (useful_production, useless_nonterminals): Likewise.
1260 (reduce_grammar_tables): Likewise, plus update nritems.
1261 * src/nullable.c (set_nullable): Likewise.
1262 * src/lalr.c (build_relations): Likewise.
1263 * tests/sets.at (Nullable): Adjust.
1264 Fortunately, now, the $axiom is no longer nullable.
1265
12662001-12-29 Akim Demaille <akim@epita.fr>
1267
1268 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1269 the 0-sentinel.
1270 * src/gram.c (ritem_longest_rhs): Likewise.
1271 * src/reduce.c (nonterminals_reduce): Likewise.
1272 * src/print_graph.c (print_graph): Likewise.
1273 * src/output.c (output_rule_data): Likewise.
1274 * src/nullable.c (set_nullable): Likewise.
1275
12762001-12-29 Akim Demaille <akim@epita.fr>
1277
1278 * src/output.c: Comment changes.
1279
12802001-12-27 Paul Eggert <eggert@twinsun.com>
1281
1282 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1283 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1284 Sparc, as they were causing more porting problems than the
1285 (minor) performance improvement was worth.
1286
1287 Also, catch up with 1.31's YYSTD.
1288
12892001-12-27 Akim Demaille <akim@epita.fr>
1290
1291 * src/output.c (output_gram): Rely on nritems, not the
1292 0-sentinel. See below.
1293 Use -1 as separator, not 0.
1294 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1295 Rely on -1 as separator in yyrhs, instead of 0.
1296 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1297 twice `Now at end of input', therefore there are two lines less to
1298 expect.
1299
13002001-12-27 Akim Demaille <akim@epita.fr>
1301
1302 * tests/regression.at (Unresolved SR Conflicts):
1303 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1304 below.
1305
13062001-12-27 Akim Demaille <akim@epita.fr>
1307
1308 * src/LR0.c (new_state): Recognize the final state by the fact it
1309 is reached by eoftoken.
1310 (insert_start_shifting_state, insert_eof_shifting_state)
1311 (insert_accepting_state, augment_automaton): Remove, since now
1312 these states are automatically computed from the initial state.
1313 (generate_states): Adjust.
1314 * src/print.c: When reporting a rule number to the user, substract
1315 1, so that the axiom rule is rule 0, and the first user rule is 1.
1316 * src/reduce.c: Likewise.
1317 * src/print_graph.c (print_core): For the time being, just as for
1318 the report, depend upon --trace-flags to dump the full set of
1319 items.
1320 * src/reader.c (readgram): Once the grammar read, insert the rule
1321 0: `$axiom: START-SYMBOL $'.
1322 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1323 number of the states has changed (the final state is no longer
1324 necessarily the last), catch up.
1325
13262001-12-27 Akim Demaille <akim@epita.fr>
1327
1328 Try to make the use of the eoftoken valid. Given that its value
1329 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1330 is used instead of > 0 where appropriate, (ii), depend upon nritems
1331 instead of the 0-sentinel.
1332
1333 * src/gram.h, src/gram.c (nritems): New.
1334 Expected to be duplication of nitems, but for the time being...
1335 * src/reader.c (packgram): Assert nritems and nitems are equal.
1336 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1337 * src/closure.c (print_closure, print_fderives): Likewise.
1338 * src/gram.c (ritem_print): Likewise.
1339 * src/print.c (print_core, print_grammar): Likewise.
1340 * src/print_graph.c: Likewise.
1341
13422001-12-27 Akim Demaille <akim@epita.fr>
1343
1344 * src/main.c (main): If there are complains after grammar
1345 reductions, then output the report anyway if requested, then die.
1346 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1347 * src/reader.c (eoftoken): New.
1348 (parse_token_decl): If the token being defined has value `0', it
1349 is the eoftoken.
1350 (packsymbols): No longer hack `tags' to insert `$' by hand.
1351 Be sure to preserve the value of the eoftoken.
1352 (reader): Make sure eoftoken is defined.
1353 Initialize nsyms to 0: now eoftoken is created just like the others.
1354 * src/print.c (print_grammar): Don't special case the eof token.
1355 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1356 lie anyway, albeit pleasant.
1357 * tests/calc.at: Exercise error messages with eoftoken.
1358 Change the grammar so that empty input is invalid.
1359 Adjust expectations.
1360 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1361
13622001-12-27 Akim Demaille <akim@epita.fr>
1363
1364 * configure.in: Check the protos of strchr ans strspn.
1365 Replace strchr if needed.
1366 * src/system.h: Provide the protos of strchr, strspn and memchr if
1367 missing.
1368 * lib/strchr.c: New.
1369 * src/reader.c (symbols_save): Use strchr.
1370
13712001-12-27 Akim Demaille <akim@epita.fr>
1372
1373 * src/print.c, src/print_graph.c (escape): New.
1374 Use it to quote the TAGS outputs.
1375 * src/print_graph.c (print_state): Now errors are in red, and
1376 reductions in green.
1377 Prefer high to wide: output the state number on a line of its own.
1378
13792001-12-27 Akim Demaille <akim@epita.fr>
1380
1381 * src/state.h, src/state.c (reductions_new): New.
1382 * src/LR0.c (set_state_table): Let all the states have a
1383 `reductions', even if reduced to 0.
1384 (save_reductions): Adjust.
1385 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1386 * src/print.c (print_reductions, print_actions): Adjust.
1387 * src/output.c (action_row): Adjust.
1388
13892001-12-27 Akim Demaille <akim@epita.fr>
1390
1391 * src/state.h, src/state.c (errs_new, errs_dup): New.
1392 * src/LR0.c (set_state_table): Let all the states have an errs,
1393 even if reduced to 0.
1394 * src/print.c (print_errs, print_reductions): Adjust.
1395 * src/output.c (output_actions, action_row): Adjust.
1396 * src/conflicts.c (resolve_sr_conflict): Adjust.
1397
13982001-12-27 Akim Demaille <akim@epita.fr>
1399
1400 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1401
14022001-12-27 Akim Demaille <akim@epita.fr>
1403
1404 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1405 * src/print.c: here.
1406 (lookaheadset, shiftset): New, used as additional storage by
1407 print_reductions.
1408 (print_results): Adjust.
1409 (print_shifts, print_gotos, print_errs): New, extracted from...
1410 (print_actions): here.
1411 * src/print_graph.c (print_actions): Remove dead code.
1412
14132001-12-27 Akim Demaille <akim@epita.fr>
1414
1415 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1416 `$n' and `@n'.
1417
14182001-12-27 Akim Demaille <akim@epita.fr>
1419
1420 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1421 (build_relations): Adjust.
1422
14232001-12-27 Akim Demaille <akim@epita.fr>
1424
1425 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1426 duplication.
1427
14282001-12-27 Akim Demaille <akim@epita.fr>
1429
1430 * src/reader.c (packgram): Catch nitems overflows.
1431
14322001-12-27 Akim Demaille <akim@epita.fr>
1433
1434 * src/files.c, src/files.h (guard_obstack): Remove.
1435 * src/output.c (output): Adjust.
1436 * src/reader.c (parse_braces): New, factoring...
1437 (copy_action, copy_guard): these two which are renamed as...
1438 (parse_action, parse_guard): these.
1439 As a voluntary consequence, using braces around guards is now
1440 mandatory.
1441
14422001-12-27 Akim Demaille <akim@epita.fr>
1443
1444 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1445 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1446 members.
1447 (symbol_list_new): Adjust.
1448 (copy_action): action_line is the first line, not the last.
1449 (copy_guard): Just as for actions, store the `action' only, not
1450 the switch/case/break flesh.
1451 Don't parse the user action that might follow the guard, let...
1452 (readgram): do it, i.e., now, there can be an action after a
1453 guard.
1454 In other words the guard is just explicitly optional.
1455 (packgram): Adjust.
1456 * src/output.c (guards_output): New.
1457 (output_parser): Call it when needed.
1458 (output): Also free the guard and attrs obstacks.
1459 * src/files.c, src/files.h (obstack_save): Remove.
1460 (output_files): Remove.
1461 As a result, if one needs the former `.act' file, using an
1462 appropriate skeleton which requires actions and guards is now
1463 required.
1464 * src/main.c (main): Adjust.
1465 * tests/semantic.at: New.
1466 * tests/regression.at: Use `input.y' as input file name.
1467 Avoid 8+3 problems by requiring input.c when the test needs the
1468 parser.
1469
14702001-12-27 Akim Demaille <akim@epita.fr>
1471
1472 * src/reader.c (symbol_list_new): Be sure to initialize all the
1473 fields.
1474
14752001-12-27 Akim Demaille <akim@epita.fr>
1476
1477 All the hacks using a final pseudo state are now useless.
1478
1479 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1480 * src/lalr.c (nLA): New.
1481 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1482 instead of lookaheadsp from the pseudo state (nstate + 1).
1483
14842001-12-27 Akim Demaille <akim@epita.fr>
1485
1486 * src/output.c (action_row, token_actions): Use a state_t instead
1487 of a integer, and nlookaheads instead of the following state's
1488 lookaheadsp.
1489
14902001-12-27 Akim Demaille <akim@epita.fr>
1491
1492 * src/conflicts.c (log_resolution, flush_shift)
1493 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1494 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1495 (conflicts_print, print_reductions): Use a state_t instead of an
1496 integer when referring to a state.
1497 As much as possible, depend upon nlookaheads, instead of the
1498 `lookaheadsp' member of the following state (since lookaheads of
1499 successive states are successive, the difference between state n + 1
1500 and n served as the number of lookaheads for state n).
1501 * src/lalr.c (add_lookback_edge): Likewise.
1502 * src/print.c (print_core, print_actions, print_state)
1503 (print_results): Likewise.
1504 * src/print_graph.c (print_core, print_actions, print_state)
1505 (print_graph): Likewise.
1506 * src/conflicts.h: Adjust.
1507
15082001-12-27 Akim Demaille <akim@epita.fr>
1509
1510 * src/bison.hairy: Formatting/comment changes.
1511 ANSIfy.
1512 Remove `register' indications.
1513 Add plenty of `static'.
1514
15152001-12-27 Akim Demaille <akim@epita.fr>
1516
1517 * src/output.c (prepare): Drop the muscle `ntbase' which
1518 duplicates ntokens.
1519 * src/bison.simple: Formatting/comment changes.
1520 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1521 is an undocumented synonym.
1522
15232001-12-22 Akim Demaille <akim@epita.fr>
1524
1525 * src/output.c (output_table_data): Change the prototype to use
1526 `int' for array ranges: some invocations do pass an int, not a
1527 short.
1528 Reported by Wayne Green.
1529
15302001-12-22 Akim Demaille <akim@epita.fr>
1531
1532 Some actions of web2c.y are improperly triggered.
1533 Reported by Mike Castle.
1534
1535 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1536 * tests/regression.at (Web2c): Rename as...
1537 (Web2c Report): this.
1538 (Web2c Actions): New.
1539
15402001-12-22 Akim Demaille <akim@epita.fr>
1541
1542 Reductions in web2c.y are improperly reported.
1543 Reported by Mike Castle.
1544
1545 * src/conflicts.c (print_reductions): Fix.
1546 * tests/regression.at (Web2c): New.
1547
15482001-12-18 Akim Demaille <akim@epita.fr>
1549
1550 Some host fail on `assert (!"foo")', which expands to
1551 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1552 Reported by Nelson Beebee.
1553
1554 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1555 `#define it_succeeded 0' and `assert (it_succeeded)'.
1556
15572001-12-17 Marc Autret <autret_m@epita.fr>
1558
1559 * src/bison.simple: Don't hard code the skeleton line and filename.
1560 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1561 New line counter 'skeleton_line' (skeleton-line muscle).
1562
15632001-12-17 Paul Eggert <eggert@twinsun.com>
1564
1565 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1566 YYDEBUG must be defined to a nonzero value.
1567
1568 * src/bison.simple (yytname): Do not assume that the user defines
1569 YYDEBUG to a properly parenthesized expression.
1570
15712001-12-17 Akim Demaille <akim@epita.fr>
1572
1573 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1574 nlookaheads is a new member.
1575 Adjust all users.
1576 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1577 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1578 state.
1579
15802001-12-17 Akim Demaille <akim@epita.fr>
1581
1582 * src/files.h, src/files.c (open_files, close_files): Remove.
1583 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1584 let...
1585 * src/reader.c (reader): Do it.
1586
15872001-12-17 Akim Demaille <akim@epita.fr>
1588
1589 * src/conflicts.c (print_reductions): Formatting changes.
1590
15912001-12-17 Akim Demaille <akim@epita.fr>
1592
1593 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1594 (flush_reduce): New.
1595 (resolve_sr_conflict): Adjust.
1596
15972001-12-17 Akim Demaille <akim@epita.fr>
1598
1599 * src/output.c (output_obstack): Be static and rename as...
1600 (format_obstack): this, to avoid any confusion with files.c's
1601 output_obstack.
1602 * src/reader.h (muscle_obstack): Move to...
1603 * src/output.h: here, since it's defined in output.c.
1604
16052001-12-17 Akim Demaille <akim@epita.fr>
1606
1607 * src/output.c (action_row, save_column, default_goto)
1608 (sort_actions, matching_state, pack_vector): Better variable
1609 locality.
1610
16112001-12-17 Akim Demaille <akim@epita.fr>
1612
1613 * src/output.c: Various formatting changes.
1614
16152001-12-17 Akim Demaille <akim@epita.fr>
1616
1617 * src/files.c (output_files): Free the output_obstack.
1618 * src/main.c (main): Call print and print_graph conditionally.
1619 * src/print.c (print): Work unconditionally.
1620 * src/print_graph.c (print_graph): Work unconditionally.
1621 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1622
16232001-12-16 Marc Autret <autret_m@epita.fr>
1624
1625 * src/output.c (actions_output): Fix. When we use %no-lines,
1626 there is one less line per action.
1627
16282001-12-16 Marc Autret <autret_m@epita.fr>
1629
1630 * src/bison.simple: Remove a useless #line directive.
1631 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1632 * src/output.c (get_lines_number): New.
1633 (output_parser): Adjust, now takes care about the lines of a
1634 output muscles.
1635 Fix line numbering.
1636 (actions_output): Computes the number of lines taken by actions.
1637 (output_master_parser): Insert new skeleton which is the name of
1638 the output parser file name.
1639
16402001-12-15 Marc Autret <autret_m@epita.fr>
1641
1642 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1643
16442001-12-15 Marc Autret <autret_m@epita.fr>
1645
1646 * src/output.c (output_gram): Keep track of the hairy one.
1647
16482001-12-15 Akim Demaille <akim@epita.fr>
1649
1650 Make `make distcheck' work.
1651
1652 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1653 system.h which uses libgettext.h.
1654
16552001-12-15 Akim Demaille <akim@epita.fr>
1656
1657 * src/nullable.c (set_nullable): Useless rules must be skipped,
1658 otherwise, since we range over their symbols, we might look at a
1659 nonterminal which no longer ``exists'', i.e., it is not counted in
1660 `nvars', hence we overflow our arrays.
1661
16622001-12-15 Akim Demaille <akim@epita.fr>
1663
1664 The header can also be produced directly, without any obstack!
1665 Yahoo!
1666
1667 * src/files.c, src/files.h (defines_obstack): Remove.
1668 (compute_header_macro): Global.
1669 (defines_obstack_save): Remove.
1670 * src/reader.c (parse_union_decl): No longer output to
1671 defines_obstack: its content can be found in the `stype' muscle
1672 anyway.
1673 (output_token_translations): Merge into...
1674 (symbols_output): this.
1675 Rename as...
1676 (symbols_save): this.
1677 (reader): Adjust.
1678 * src/output.c (header_output): New.
1679 (output): Call it.
1680
16812001-12-15 Akim Demaille <akim@epita.fr>
1682
1683 * src/reader.c (parse_union_decl): Instead of handling two obstack
1684 simultaneously, use one to define the `stype' muscle, and use the
1685 value of the latter to fill defines_obstack.
1686 (copy_comment): Remove.
1687 (copy_comment2): Work for a single obstack.
1688 Rename as...
1689 (copy_comment): this.
1690
16912001-12-15 Akim Demaille <akim@epita.fr>
1692
1693 * src/lex.c, src/lex.h (xgetc): No longer static.
1694 * src/reader.c (parse_union_decl): Revamp.
1695
16962001-12-15 Akim Demaille <akim@epita.fr>
1697
1698 Still making progress in separating Bison into (i) input, (ii)
1699 process, (iii) output: now we can directly output the parser file
1700 without using table_obstack at all.
1701
1702 * src/files.c, src/files.h (table_obstack): Bye bye.
1703 (parser_file_name): New.
1704 * src/files.c (compute_output_file_names): Compute it.
1705 * src/output.c (actions_output, output_parser)
1706 (output_master_parser): To a file instead of an obstack.
1707
17082001-12-15 Akim Demaille <akim@epita.fr>
1709
1710 Attach actions to rules, instead of pre-outputting them to
1711 actions_obstack.
1712
1713 * src/gram.h (rule_t): action and action_line are new members.
1714 * src/reader.c (symbol_list): Likewise.
1715 (copy_action): Save the actions within the rule.
1716 (packgram): Save them in rule_table.
1717 * src/output.c (actions_output): New.
1718 (output_parser): Use it on `%%actions'.
1719 (output_rule_data): Don't free rule_table.
1720 (output): Do it.
1721 (prepare): Don't save the `action' muscle.
1722 * src/bison.simple: s/%%action/%%actions/.
1723
17242001-12-15 Akim Demaille <akim@epita.fr>
1725
1726 * src/reader.c (copy_action): When --yacc, don't append a `;'
1727 to the user action: let it fail if lacking.
1728 Suggested by Arnold Robbins and Tom Tromey.
1729
17302001-12-14 Akim Demaille <akim@epita.fr>
1731
1732 * src/lex.c (literalchar): Simply return the char you decoded, non
1733 longer mess around with obstacks and int pointers.
1734 Adjust all callers.
1735
17362001-12-14 Akim Demaille <akim@epita.fr>
1737
1738 * src/lex.c (literalchar): Don't escape the special characters,
1739 just decode them, and keep them as char (before, eol was output as
1740 the 2 char string `\n' etc.).
1741 * src/output.c (output_rule_data): Use quotearg to output the
1742 token strings.
1743
17442001-12-13 Paul Eggert <eggert@twinsun.com>
1745
1746 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1747 Do not infringe on the global user namespace when using C++.
1748 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1749 All uses of `fprintf' and `stderr' changed.
1750
1751 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1752
17532001-12-13 Akim Demaille <akim@epita.fr>
1754
1755 The computation of nullable is broken: it doesn't handle empty
1756 RHS's properly.
1757
1758 * tests/torture.at (GNU AWK Grammar): New.
1759 * tests/sets.at (Nullable): New.
1760 * src/nullable.c (set_nullable): Instead of blindly looping over
1761 `ritems', loop over the rules, and then over their rhs's.
1762
1763 Work around Autotest bugs.
1764
1765 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1766 frame, because Autotest understand lines starting with a `+' as
1767 traces from the shell. Then, they are not processed properly.
1768 Admittedly an Autotest bug, but we don't have time to wait for
1769 Autotest to catch up.
1770 * tests/regression.at (Broken Closure): Adjust to the new table
1771 frames.
1772 Move to...
1773 * tests/sets.at: here.
1774
17752001-12-13 Akim Demaille <akim@epita.fr>
1776
1777 * src/closure.c (closure): Use nrules instead of playing tricks
1778 with BITS_PER_WORD.
1779
17802001-12-13 Akim Demaille <akim@epita.fr>
1781
1782 * src/print.c (print_actions): Output the handling of `$' as the
1783 traces do: shifting the token EOF. Before EOF was treated as a
1784 nonterminal.
1785 * tests/regression.at: Adjust some tests.
1786 * src/print_graph.c (print_core): Complete the set of items via
1787 closure. The next-to-final and final states are still unsatisfying,
1788 but that's to be addressed elsewhere.
1789 No longer output the rule numbers, but do output the state number.
1790 A single loop for the shifts + gotos is enough, but picked a
1791 distinct color for each.
1792 (print_graph): Initialize and finalize closure.
1793
17942001-12-13 Akim Demaille <akim@epita.fr>
1795
1796 * src/reader.c (readgram): Remove dead code, an strip useless
1797 braces.
1798 (get_type): Remove, unused.
1799
18002001-12-12 Akim Demaille <akim@epita.fr>
1801
1802 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1803 on that of lib/error.c.
1804
18052001-12-12 Akim Demaille <akim@epita.fr>
1806
1807 Some hosts don't like `/' in includes.
1808
1809 * src/system.h: Include libgettext.h without qualifying the path.
1810 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1811 $(top_srcdir).
1812
18132001-12-11 Marc Autret <autret_m@epita.fr>
1814
1815 * src/output.c (output_parser): Remove useless muscle.
1816
18172001-12-11 Marc Autret <autret_m@epita.fr>
1818
1819 * src/bison.simple: Remove #line just before %%epilogue. It
1820 is now handled in ...
1821 * src/reader.c (read_additionnal_code): Add the output of a
1822 #line for the epilogue.
1823
18242001-12-10 Marc Autret <autret_m@epita.fr>
1825
1826 * src/reader.c (copy_definition): Re-use CPP-outed code which
1827 replace precedent remove.
1828 * src/bison.simple: Remove #line before %%prologue because
1829 %%input-line is wrong at this time.
1830
18312001-12-10 Marc Autret <autret_m@epita.fr>
1832
1833 * src/reader.c (symbols_output): Clean up.
1834 * src/output.c (output_gram, output): Clean up.
1835
18362001-12-10 Akim Demaille <akim@epita.fr>
1837
1838 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1839 * src/LR0.c (set_state_table): here.
1840 * src/lalr.c (lalr): Call it.
1841
18422001-12-10 Akim Demaille <akim@epita.fr>
1843
1844 * src/state.h (shifts): Remove the `number' member: shifts are
1845 attached to state, hence no longer need to be labelled with a
1846 state number.
1847
18482001-12-10 Akim Demaille <akim@epita.fr>
1849
1850 Now that states have a complete set of members, the linked list of
1851 shifts is useless: just fill directly the state's shifts member.
1852
1853 * src/state.h (shifts): Remove the `next' member.
1854 * src/LR0.c (first_state, last_state): Remove.
1855 Adjust the callers.
1856 (augment_automaton): Don't look for the shifts that must be added
1857 a shift on EOF: it is those of the state we looked for! But now,
1858 since shifts are attached, it is no longer needed to looking
1859 merely by its id: its number.
1860
18612001-12-10 Akim Demaille <akim@epita.fr>
1862
1863 * src/LR0.c (augment_automaton): Better variable locality.
1864 Remove an impossible branch: if there is a state corresponding to
1865 the start symbol being shifted, then there is shift for the start
1866 symbol from the initial state.
1867
18682001-12-10 Akim Demaille <akim@epita.fr>
1869
1870 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1871 only when appropriate: when insert_start_shifting_state' is not
1872 invoked.
1873 * tests/regression.at (Rule Line Numbers): Adjust.
1874
18752001-12-10 Akim Demaille <akim@epita.fr>
1876
1877 * src/LR0.c (augment_automaton): Now that all states have shifts,
1878 merge the two cases addition shifts to the initial state.
1879
18802001-12-10 Akim Demaille <akim@epita.fr>
1881
1882 * src/lalr.c (set_state_table): Move to...
1883 * src/LR0.c: here.
1884 * src/lalr.c (lalr): Don't call it...
1885 * src/LR0.c (generate_states): do it.
1886 * src/LR0.h (first_state): Remove, only the table is used.
1887
18882001-12-10 Akim Demaille <akim@epita.fr>
1889
1890 * src/LR0.h (first_shift, first_reduction): Remove.
1891 * src/lalr.c: Don't use first_shift: find shifts through the
1892 states.
1893
18942001-12-10 Akim Demaille <akim@epita.fr>
1895
1896 * src/LR0.c: Attach shifts to states as soon as they are
1897 computed.
1898 * src/lalr.c (set_state_table): Instead of assigning shifts to
1899 state, just assert that the mapping was properly done.
1900
19012001-12-10 Akim Demaille <akim@epita.fr>
1902
1903 * src/LR0.c (insert_start_shift): Rename as...
1904 (insert_start_shifting_state): this.
1905 (insert_eof_shifting_state, insert_accepting_state): New.
1906 (augment_automaton): Adjust.
1907 Better locality of the variables.
1908 When looking if the start_symbol is shifted from the initial
1909 state, using `while (... symbol != start_symbol ...)' sounds
1910 better than `while (... symbol < start_symbol ...)': If fail
1911 to see how the order between symbols could be relevant!
1912
19132001-12-10 Akim Demaille <akim@epita.fr>
1914
1915 * src/getargs.h: Don't declare `spec_name_prefix' and
1916 `spec_file_prefix', declared by src/files.h.
1917 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1918 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1919 * src/output.c (prepare): Adjust.
1920 * src/reader.c (symbols_output): Likewise.
1921 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1922
19232001-12-10 Akim Demaille <akim@epita.fr>
1924
1925 * src/muscle_tab.c (muscle_init): NULL is a better default than
1926 `"0"'.
1927
19282001-12-10 Akim Demaille <akim@epita.fr>
1929
1930 * src/reader.c (reader): Calling symbols_output once is enough.
1931
19322001-12-10 Akim Demaille <akim@epita.fr>
1933
1934 Now that states have a complete set of members, the linked list of
1935 reductions is useless: just fill directly the state's reductions
1936 member.
1937
1938 * src/state.h (struct reductions): Remove member `number' and
1939 `next'.
1940 * src/LR0.c (first_reduction, last_reduction): Remove.
1941 (save_reductions): Don't link the new reductions, store them in
1942 this_state.
1943 * src/lalr.c (set_state_table): No need to attach reductions to
1944 states, it's already done.
1945 * src/output.c (output_actions): No longer free the shifts, then
1946 the reductions, then the states: free all the states and their
1947 members.
1948
19492001-12-10 Akim Demaille <akim@epita.fr>
1950
1951 * src/options.c (OPTN, DRTV, BOTH): New.
1952 (option_table): Use them.
1953
1954 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1955 the job of system.h.
1956 * src/options.c: Don't include stdio.h and xalloc.h for the same
1957 reasons.
1958
19592001-12-10 Akim Demaille <akim@epita.fr>
1960
1961 * src/output.c (output, prepare): Make sure the values of the
1962 muscles `action' and `prologue' are 0-terminated.
1963
19642001-12-10 Akim Demaille <akim@epita.fr>
1965
1966 Clean up GCC warnings.
1967
1968 * src/reader.c (copy_action): `buf' is not used.
1969 (parse_skel_decl): Be static.
1970 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1971 * src/options.h (create_long_option_table): Have a real prototype.
1972 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1973 (hash_delete_at): Return const void *.
1974 Adjust casts to preserve the const.
1975
19762001-12-10 Akim Demaille <akim@epita.fr>
1977
1978 * configure.in: Require 2.52g.
1979 M4 is not needed, but AUTOM4TE is.
1980 * m4/m4.m4: Remove.
1981 * tests/Makefile.am: Adjust.
1982
19832001-12-10 Akim Demaille <akim@epita.fr>
1984
1985 One structure for states is enough, even though theoretically
1986 there are LR(0) states and LALR(1) states.
1987
1988 * src/lalr.h (state_t): Remove.
1989 (state_table): Be state_t **, not state_t *.
1990 * src/state.h (core, CORE_ALLOC): Rename as...
1991 (state_t, STATE_ALLOC): this.
1992 Add the LALR(1) members: shifts, reductions, errs.
1993 * src/LR0.c (state_table): Rename as...
1994 (state_hash): this, to avoid name clashes with the global
1995 `state_table'.
1996 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1997 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1998
19992001-12-10 Akim Demaille <akim@epita.fr>
2000
2001 Bison dumps core on bash.y.
2002 Reported by Pascal Bart.
2003
2004 * src/warshall.c (bitmatrix_print): New.
2005 (TC): Use it.
2006 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2007 j must be the outer loop.
2008 * tests/regression.at (Broken Closure): New.
2009
20102001-12-05 Akim Demaille <akim@epita.fr>
2011
2012 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2013 its argument.
2014