]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/gram.h, src/gram.c (error_token_number): Remove, use
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-04-09 Akim Demaille <akim@epita.fr>
2
3 * src/gram.h, src/gram.c (error_token_number): Remove, use
4 errtoken->number.
5 * src/reader.c (reader): Don't specify the user token number (2)
6 for $undefined, as it uselessly prevents using it.
7 * src/gram.h (token_number_t): Move to...
8 * src/symtab.h: here.
9 (state_t.number): Is a token_number_t.
10 * src/print.c, src/reader.c: Use undeftoken->number instead of
11 hard coded 2.
12 (Even though this 2 is not the same as above: the number of the
13 undeftoken remains being 2, it is its user token number which
14 might not be 2).
15 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
16 `user_token_number_max'.
17 Output `undef_token_number'.
18 * data/bison.simple, data/bison.c++: Use them.
19 Be sure to map invalid yylex return values to
20 `undef_token_number'. This saves us from gratuitous SEGV.
21
22 * tests/conflicts.at (Solved SR Conflicts)
23 (Unresolved SR Conflicts): Adjust.
24 * tests/regression.at (Web2c Actions): Adjust.
25
262002-04-08 Akim Demaille <akim@epita.fr>
27
28 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
29 Adding #line.
30 Remove the duplicate `typedefs'.
31 (RhsNumberType): Fix the declaration and various other typos.
32 Use __ofile__.
33 * data/bison.simple: Use __ofile__.
34 * src/scan-skel.l: Handle __ofile__.
35
362002-04-08 Akim Demaille <akim@epita.fr>
37
38 * src/gram.h (item_number_t): New, the type of item numbers in
39 RITEM. Note that it must be able to code symbol numbers as
40 positive number, and the negation of rule numbers as negative
41 numbers.
42 Adjust all dependencies (pretty many).
43 * src/reduce.c (rule): Remove this `short *' pointer: use
44 item_number_t.
45 * src/system.h (MINSHORT, MAXSHORT): Remove.
46 Include `limits.h'.
47 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
48 (shortcpy): Remove.
49 (MAXTABLE): Move to...
50 * src/output.c (MAXTABLE): here.
51 (prepare_rules): Use output_int_table to output rhs.
52 * data/bison.simple, data/bison.c++: Adjust.
53 * tests/torture.at (Big triangle): Move the limit from 254 to
54 500.
55 * tests/regression.at (Web2c Actions): Ajust.
56
57 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
58 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
59 passes, but produces negative #line number, once fixed, GCC is
60 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
61 C), it passes.
62 * src/state.h (state_h): Code input lines on ints, not shorts.
63
642002-04-08 Akim Demaille <akim@epita.fr>
65
66 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
67 and then the grammar.
68
692002-04-08 Akim Demaille <akim@epita.fr>
70
71 * src/system.h: No longer using strndup.
72
732002-04-07 Akim Demaille <akim@epita.fr>
74
75 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
76 * src/output.c (output_table_data): Return the longest number.
77 (prepare_tokens): Output `token_number_max').
78 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
79 New.
80 Use them to define yy_token_number_type/TokenNumberType.
81 Use this type for yytranslate.
82 * tests/torture.at (Big triangle): Push the limit from 124 to
83 253.
84 * tests/regression.at (Web2c Actions): Adjust.
85
862002-04-07 Akim Demaille <akim@epita.fr>
87
88 * tests/torture.at (Big triangle): New.
89 (GNU AWK Grammar, GNU Cim Grammar): Move to...
90 * tests/existing.at: here.
91
922002-04-07 Akim Demaille <akim@epita.fr>
93
94 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
95 nritems.
96 Adjust dependencies.
97
982002-04-07 Akim Demaille <akim@epita.fr>
99
100 * src/reader.c: Normalize increments to prefix form.
101
1022002-04-07 Akim Demaille <akim@epita.fr>
103
104 * src/reader.c, symtab.c: Remove debugging code.
105
1062002-04-07 Akim Demaille <akim@epita.fr>
107
108 Rename all the `bucket's as `symbol_t'.
109
110 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
111 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
112 * src/symtab.c, src/symtab.h (bucket): Rename as...
113 (symbol_t): this.
114 (symbol_list_new, bucket_check_defined, bucket_make_alias)
115 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
116 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
117 (buckets_new, buckets_free, buckets_do): Rename as...
118 (symbol_list_new, symbol_check_defined, symbol_make_alias)
119 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
120 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
121 (symbols_new, symbols_free, symbols_do): these.
122
1232002-04-07 Akim Demaille <akim@epita.fr>
124
125 Use lib/hash for the symbol table.
126
127 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
128 EOF.
129 * src/lex.c (lex): Set the `number' member of new terminals.
130 * src/reader.c (bucket_check_defined, bucket_make_alias)
131 (bucket_check_alias_consistence, bucket_translation): New.
132 (reader, grammar_free, readgram, token_translations_init)
133 (packsymbols): Adjust.
134 (reader): Number the predefined tokens.
135 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
136 for predefined tokens.
137 * src/symtab.h (bucket): Remove all the hash table related
138 members.
139 * src/symtab.c (symtab): Replace by...
140 (bucket_table): this.
141 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
142 (buckets_new, buckets_do): New.
143
1442002-04-07 Akim Demaille <akim@epita.fr>
145
146 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
147 (start_symbol, max_user_token_number, semantic_parser)
148 (error_token_number): Initialize.
149 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
150 Initialize.
151 (reader): Don't.
152 (errtoken, eoftoken, undeftoken, axiom): Extern.
153
1542002-04-07 Akim Demaille <akim@epita.fr>
155
156 * src/gram.h (rule_s): prec and precsym are now pointers
157 to the bucket giving the priority/associativity.
158 Member `associativity' removed: useless.
159 * src/reduce.c, src/conflicts.c: Adjust.
160
1612002-04-07 Akim Demaille <akim@epita.fr>
162
163 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
164 Properly escape the symbols' TAG when outputting them.
165
1662002-04-07 Akim Demaille <akim@epita.fr>
167
168 * src/lalr.h (LA): Is a bitsetv, not bitset*.
169
1702002-04-07 Akim Demaille <akim@epita.fr>
171
172 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
173 (LArule): this, which is an array to rule_t*.
174 * src/print.c, src/conflicts.c: Adjust.
175
1762002-04-07 Akim Demaille <akim@epita.fr>
177
178 * src/gram.h (rule_t): Rename `number' as `user_number'.
179 `number' is a new member.
180 Adjust dependencies.
181 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
182
1832002-04-07 Akim Demaille <akim@epita.fr>
184
185 As a result of the previous patch, it is no longer needed
186 to reorder ritem itself.
187
188 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
189
1902002-04-07 Akim Demaille <akim@epita.fr>
191
192 Be sure never to walk through RITEMS, but use only data related to
193 the rules themselves. RITEMS should be banished.
194
195 * src/output.c (output_token_translations): Rename as...
196 (prepare_tokens): this.
197 In addition to `translate', prepare the muscles `tname' and
198 `toknum', which were handled by...
199 (output_rule_data): this.
200 Remove, and move the remainder of its outputs into...
201 (prepare_rules): this new routines, which also merges content from
202 (output_gram): this.
203 (prepare_rules): Be sure never to walk through RITEMS.
204 (output_stos): Rename as...
205 (prepare_stos): this.
206 (output): Always invoke prepare_states, after all, just don't use it
207 in the output if you don't need it.
208
2092002-04-07 Akim Demaille <akim@epita.fr>
210
211 * src/LR0.c (new_state): Display `nstates' as the name of the
212 newly created state.
213 Adjust to initialize first_state and last_state if needed.
214 Be sure to distinguish the initial from the final state.
215 (new_states): Create the itemset of the initial state, and use
216 new_state.
217 * src/closure.c (closure): Now that the initial state has its
218 items properly set, there is no need for a special case when
219 creating `ruleset'.
220
221 As a result, now the rule 0, reducing to $axiom, is visible in the
222 outputs. Adjust the test suite.
223
224 * tests/conflicts.at (Solved SR Conflicts)
225 (Unresolved SR Conflicts): Adjust.
226 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
227 * tests/conflicts.at (S/R in initial): New.
228
2292002-04-07 Akim Demaille <akim@epita.fr>
230
231 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
232 the RHS of the rules.
233 * src/output.c (output_gram): Likewise.
234
2352002-04-07 Akim Demaille <akim@epita.fr>
236
237 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
238 bucket.
239 Adjust all dependencies.
240 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
241 `number' of the buckets too.
242 * src/gram.h: Include `symtab.h'.
243 (associativity): Move to...
244 * src/symtab.h: here.
245 No longer include `gram.h'.
246
2472002-04-07 Akim Demaille <akim@epita.fr>
248
249 * src/gram.h, src/gram.c (rules_rhs_length): New.
250 (ritem_longest_rhs): Use it.
251 * src/gram.h (rule_t): `number' is a new member.
252 * src/reader.c (packgram): Set it.
253 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
254 the end of `rules', and count them out of `nrules'.
255 (reduce_output, dump_grammar): Adjust.
256 * src/print.c (print_grammar): It is no longer needed to check for
257 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
258 * tests/reduce.at (Reduced Automaton): New test.
259
2602002-04-07 Akim Demaille <akim@epita.fr>
261
262 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
263 lacking `+ 1' to nrules, Bison reported as useless a token if it
264 was used solely to set the precedence of the last rule...
265
2662002-04-07 Akim Demaille <akim@epita.fr>
267
268 * data/bison.c++, data/bison.simple: Don't output the current file
269 name in #line, to avoid useless diffs between two identical
270 outputs under different names.
271
2722002-04-07 Akim Demaille <akim@epita.fr>
273
274 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
275 Normalize loops to using `< nrules + 1', not `<= nrules'.
276
2772002-04-07 Akim Demaille <akim@epita.fr>
278
279 * TODO: Update.
280
2812002-04-07 Akim Demaille <akim@epita.fr>
282
283 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
284 bucket.value as bucket.number.
285
2862002-04-07 Akim Demaille <akim@epita.fr>
287
288 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
289 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
290 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
291 RHS, instead of being an index in RITEMS.
292
2932002-04-04 Paul Eggert <eggert@twinsun.com>
294
295 * doc/bison.texinfo: Update copyright date.
296 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
297 (Symbols): Warn about running Bison in one character set,
298 but compiling and/or running in an incompatible one.
299 Warn about character code 256, too.
300
3012002-04-03 Paul Eggert <eggert@twinsun.com>
302
303 * src/bison.data (YYSTACK_ALLOC): Depend on whether
304 YYERROR_VERBOSE is nonzero, not whether it is defined.
305
306 Merge changes from bison-1_29-branch.
307
3082002-03-20 Paul Eggert <eggert@twinsun.com>
309
310 Merge fixes from Debian bison_1.34-1.diff.
311
312 * configure.in (AC_PREREQ): 2.53.
313
3142002-03-20 Akim Demaille <akim@epita.fr>
315
316 * src/conflicts.c (log_resolution): Argument `resolution' is const.
317
3182002-03-19 Paul Eggert <eggert@twinsun.com>
319
320 * src/bison.simple (YYCOPY): New macro.
321 (YYSTACK_RELOCATE): Use it.
322 Remove Type arg; no longer needed. All callers changed.
323 (yymemcpy): Remove; no longer needed.
324
325 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
326 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
327
3282002-03-19 Akim Demaille <akim@epita.fr>
329
330 Test and fix the #line outputs.
331
332 * tests/atlocal.at (GCC): New.
333 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
334 (Prologue synch line, ,%union synch line, Postprologue synch line)
335 (Action synch line, Epilogue synch line): New tests.
336 * src/reader.c (parse_union_decl): Define the muscle stype_line.
337 * data/bison.simple, data/bison.c++: Use it.
338
3392002-03-19 Akim Demaille <akim@epita.fr>
340
341 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
342 (Solved SR Conflicts, %expect not enough, %expect right)
343 (%expect too much): Move to...
344 * tests/conflicts.at: this new file.
345
3462002-03-19 Akim Demaille <akim@epita.fr>
347
348 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
349 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
350 that we can move to enums for instance.
351 * src/output.c (token_definitions_output): Output a list of
352 `token-name, token-number' instead of the #define.
353 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
354
3552002-03-14 Akim Demaille <akim@epita.fr>
356
357 Use Gettext 0.11.1.
358
3592002-03-09 Robert Anisko <robert@lrde.epita.fr>
360
361 * data/bison.c++: Make the user able to add members to the generated
362 parser by subclassing.
363
3642002-03-05 Robert Anisko <robert@lrde.epita.fr>
365
366 * src/reader.c (read_additionnal_code): `c' should be an integer, not
367 a character.
368 Reported by Nicolas Tisserand and Nicolas Burrus.
369
3702002-03-04 Robert Anisko <robert@lrde.epita.fr>
371
372 * src/reader.c: Warn about lacking semi-colons, do not complain.
373
3742002-03-04 Robert Anisko <robert@lrde.epita.fr>
375
376 * data/bison.c++: Remove a debug line.
377
3782002-03-04 Robert Anisko <robert@lrde.epita.fr>
379
380 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
381 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
382 provide a default implementation.
383
3842002-03-04 Akim Demaille <akim@epita.fr>
385
386 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
387 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
388 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
389 * tests/semantic.at (Parsing Guards): Similarly.
390 * src/reader.at (readgram): Complain if the last rule is not ended
391 with a semi-colon.
392
3932002-03-04 Akim Demaille <akim@epita.fr>
394
395 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
396 * src/closure.c: here.
397 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
398 RTC.
399 * src/warshall.h, src/warshall.c: Remove.
400 * tests/sets.at (Broken Closure): Adjust.
401
4022002-03-04 Akim Demaille <akim@epita.fr>
403
404 * src/output.c (output_skeleton): tempdir is const.
405 bytes_read is unused.
406
4072002-03-04 Akim Demaille <akim@epita.fr>
408
409 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
410 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
411 Update.
412 From Michael Hayes.
413
4142002-03-04 Akim Demaille <akim@epita.fr>
415
416 * src/closure.c (closure): `r' is unused.
417
4182002-03-04 Akim Demaille <akim@epita.fr>
419
420 * tests/sets.at (Broken Closure): Add the ending `;'.
421 * src/reader.at (readgram): Complain if a rule is not ended with a
422 semi-colon.
423
4242002-03-04 Akim Demaille <akim@epita.fr>
425
426 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
427 (count_sr_conflicts): Use bitset_count.
428 * src/reduce.c (inaccessable_symbols): Ditto.
429 (bits_size): Remove.
430 * src/warshall.h, src/warshall.c: Convert to bitsetv.
431
4322002-03-04 Akim Demaille <akim@epita.fr>
433
434 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
435 * src/reduce.c: Remove the `bitset_zero's following the
436 `bitset_create's, as now it is performed by the latter.
437
4382002-03-04 Akim Demaille <akim@epita.fr>
439
440 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
441 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
442 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
443 latest sources from Michael.
444
4452002-03-04 Akim Demaille <akim@epita.fr>
446
447 * src/output.c (output): Don't free the grammar.
448 * src/reader.c (grammar_free): New.
449 * src/main.c (main): Call it and don't free symtab here.
450
4512002-03-04 Akim Demaille <akim@epita.fr>
452
453 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
454 before returning.
455 Reported by Benoit Perrot.
456
4572002-03-04 Akim Demaille <akim@epita.fr>
458
459 Use bitset operations when possible, not loops over bits.
460
461 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
462 bitset_or.
463 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
464 * src/reduce.c (useless_nonterminals): Formatting changes.
465 * src/warshall.c (TC): Use bitset_or.
466
4672002-03-04 Akim Demaille <akim@epita.fr>
468
469 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
470 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
471 Ditto.
472
4732002-03-04 Akim Demaille <akim@epita.fr>
474
475 * src/lalr.c (F): Now a bitset*.
476 Adjust all dependencies.
477
4782002-03-04 Akim Demaille <akim@epita.fr>
479
480 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
481 Adjust all dependencies.
482
4832002-03-04 Akim Demaille <akim@epita.fr>
484
485 * src/L0.c, src/LR0.h (nstates): Be size_t.
486 Adjust comparisons (signed vs unsigned).
487 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
488 bitset*.
489 Adjust all dependencies.
490
4912002-03-04 Akim Demaille <akim@epita.fr>
492
493 * src/closure.c (firsts): Now, also a bitset.
494 Adjust all dependencies.
495 (varsetsize): Remove, now unused.
496 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
497
4982002-03-04 Akim Demaille <akim@epita.fr>
499
500 * src/print.c: Convert to use bitset.h, not hand coded iterations
501 over ints.
502
5032002-03-04 Akim Demaille <akim@epita.fr>
504
505 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
506
5072002-03-04 Akim Demaille <akim@epita.fr>
508
509 * src/closure.c (ruleset): Be a bitset.
510 (rulesetsize): Remove.
511
5122002-03-04 Akim Demaille <akim@epita.fr>
513
514 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
515 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
516 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
517 * src/closure.c (fderives): Be an array of bitsets.
518
5192002-02-28 Robert Anisko <robert@lrde.epita.fr>
520
521 * data/bison.c++: Merge the two generated headers. Insert a copyright
522 notice in each output file.
523
5242002-02-28 Akim Demaille <akim@epita.fr>
525
526 * data/bison.c++: Copy the prologue of bison.simple to fetch
527 useful M4 definitions, such as b4_header_guard.
528
5292002-02-25 Akim Demaille <akim@epita.fr>
530
531 * src/getargs.c (version): Give the name of the authors, and use a
532 translator friendly scheme for the bgr
533 copyright notice.
534
5352002-02-25 Akim Demaille <akim@epita.fr>
536
537 * src/output.c (header_output): Remove, now handled completely via
538 M4.
539
5402002-02-25 Akim Demaille <akim@epita.fr>
541
542 * m4/m4.m4: New, from CVS Autoconf.
543 * configure.in: Invoke it.
544 * src/output.c (output_skeleton): Use its result instead of the
545 hard coded name.
546
5472002-02-25 Akim Demaille <akim@epita.fr>
548
549 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
550 Fileutils 4.1.5.
551 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
552 * src/output.c (output_skeleton): Use mkstemp to create a real
553 temporary file.
554 Move the filling of `skeleton' and its muscle to...
555 (prepare): here.
556 (output): Move the definition of the prologue muscle to...
557 (prepare): here.
558 * src/system.h (DEFAULT_TMPDIR): New.
559
5602002-02-14 Paul Eggert <eggert@twinsun.com>
561
562 Remove the support for C++ namespace cleanliness; it was
563 causing more problems than it was curing, since it didn't work
564 properly on some nonstandard C++ compilers. This can wait
565 for a proper C++ parser.
566
567 * NEWS: Document this.
568 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
569 of C++, as it's treated like C now.
570 * src/bison.simple (YYSTD): Remove.
571 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
572 Treat C++ just like Standard C instead of trying to support
573 namespace cleanliness.
574
5752002-02-14 Akim Demaille <akim@epita.fr>
576
577 * tests/regression.at (else): Adjust to Andreas' change.
578
5792002-02-14 Akim Demaille <akim@epita.fr>
580
581 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
582
5832002-02-13 Andreas Schwab <schwab@suse.de>
584
585 * src/output.c (output_rule_data): Don't output NULL, it might
586 not be defined yet.
587
5882002-02-11 Robert Anisko <robert@lrde.epita.fr>
589
590 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
591 (Copyright notice): Update.
592
5932002-02-11 Akim Demaille <akim@epita.fr>
594
595 * tests/regression.at (%nonassoc and eof): Don't include
596 nonportable headers.
597
5982002-02-08 Robert Anisko <robert@lrde.epita.fr>
599
600 * data/bison.c++: Correct error recovery. Make the user able to
601 initialize the starting location.
602
6032002-02-07 Akim Demaille <akim@epita.fr>
604
605 * tests/input.at: New.
606
6072002-02-07 Robert Anisko <robert@lrde.epita.fr>
608
609 * data/bison.c++: Replace some direct m4 expansions by constants. Be
610 more consistent when naming methods and variables. Put preprocessor
611 directives around tables only needed for debugging.
612
6132002-02-07 Robert Anisko <robert@lrde.epita.fr>
614
615 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
616 C++ parsers.
617 (yy::b4_name::parse): Use print_.
618
6192002-02-07 Robert Anisko <robert@lrde.epita.fr>
620
621 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
622
6232002-02-07 Robert Anisko <robert@lrde.epita.fr>
624
625 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
626 C++ parsers.
627 (yy::b4_name::parse): Build verbose error messages, and use error_.
628
6292002-02-06 Robert Anisko <robert@lrde.epita.fr>
630
631 * data/bison.c++: Fix m4 quoting in comments.
632
6332002-02-06 Robert Anisko <robert@lrde.epita.fr>
634
635 * data/bison.c++: Adjust the parser code. Fix some muscles that were
636 not expanded by m4.
637
6382002-02-05 Akim Demaille <akim@epita.fr>
639
640 * data/bison.c++: Adjust to the M4 back end.
641 More is certainly needed.
642
6432002-02-05 Akim Demaille <akim@epita.fr>
644
645 Give a try to M4 as a back end.
646
647 * lib/readpipe.c: New, from wdiff.
648 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
649 BISON_HAIRY.
650 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
651 specific values. Now it is m4 that performs the lookup.
652 * src/parse-skel.y: Remove.
653 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
654 * src/output.c (actions_output, guards_output)
655 (token_definitions_output): No longer keeps track of the output
656 line number, hence remove the second argument.
657 (guards_output): Check against the guard member of a rule, not the
658 action member.
659 Adjust callers.
660 (output_skeleton): Don't look for the skeleton location, let m4 do
661 that.
662 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
663 file will be used.
664 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
665 (prepare): Given that for the time being changesyntax is not
666 usable in M4, rename the muscles using `-' to `_'.
667 Define `defines_flag', `output_parser_name' and `output_header_name'.
668 * src/output.h (actions_output, guards_output)
669 (token_definitions_output): Adjust prototypes.
670 * src/scan-skel.l: Instead of scanning the skeletons, it now
671 processes the output of m4: `__oline__' and `#output'.
672 * data/bison.simple: Adjust to be used by M4(sugar).
673 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
674 to date.
675 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
676 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
677 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
678 shamelessly stolen from CVS Autoconf.
679
6802002-02-05 Akim Demaille <akim@epita.fr>
681
682 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
683 * configure.in: Check for the declarations of free and malloc.
684 * src/muscle_tab.c: Adjust.
685
6862002-02-05 Akim Demaille <akim@epita.fr>
687
688 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
689 which have no values.
690
6912002-02-05 Akim Demaille <akim@epita.fr>
692
693 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
694 * data/: here.
695
6962002-01-29 Paul Eggert <eggert@twinsun.com>
697
698 * src/bison.simple (YYSIZE_T): Do not define merely because
699 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
700 On some platforms, <alloca.h> does not declare YYSTD (size_t).
701
7022002-01-27 Akim Demaille <akim@epita.fr>
703
704 Fix `%nonassoc and eof'.
705
706 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
707 which were not properly copied! Replace
708 memcpy (res->errs, src->errs, src->nerrs);
709 with
710 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
711 !!!
712 * tests/regression.at (%nonassoc and eof): Adjust to newest
713 Autotest: `.' is not in the PATH.
714
7152002-01-27 Akim Demaille <akim@epita.fr>
716
717 * tests/sets.at (AT_EXTRACT_SETS): New.
718 (Nullable): Use it.
719 (Firsts): New.
720
7212002-01-26 Akim Demaille <akim@epita.fr>
722
723 * tests/actions.at, tests/calc.at, tests/headers.at,
724 * tests/torture.at: Adjust to the newest Autotest which no longer
725 forces `.' in the PATH.
726
7272002-01-25 Akim Demaille <akim@epita.fr>
728
729 * tests/regression.at (%nonassoc and eof): New.
730 Suggested by Robert Anisko.
731
7322002-01-24 Akim Demaille <akim@epita.fr>
733
734 Bison dumps core when trying to complain about broken input files.
735 Reported by Cris van Pelt.
736
737 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
738 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
739 into...
740 (Invalid inputs): Strengthen: exercise parse_percent_token.
741
7422002-01-24 Robert Anisko <robert.anisko@epita.fr>
743
744 * src/Makefile.am: Add bison.c++.
745 * src/bison.c++: New skeleton.
746
7472002-01-21 Paolo Bonzini <bonzini@gnu.org>
748
749 * po/it.po: New.
750
7512002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
752
753 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
754
7552002-01-20 Marc Autret <marc@gnu.org>
756
757 * src/files.c (compute_output_file_names): Fix
758
7592002-01-20 Marc Autret <marc@gnu.org>
760
761 * tests/output.at: New test.
762 * src/files.c (compute_base_names): Don't map extensions when
763 the YACC flag is set, use defaults.
764 Reported by Evgeny Stambulchik.
765
7662002-01-20 Marc Autret <marc@gnu.org>
767
768 * src/system.h: Need to define __attribute__ away for non-GCC
769 compilers as well (i.e. the vendor C compiler).
770 Suggested by Albert Chin-A-Young.
771
7722002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
773
774 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
775 canonical definition.
776 * src/system.h: Use the canonical definition for PARAMS (avoids
777 a conflict with the macro from lib/hash.h).
778
7792002-01-11 Akim Demaille <akim@epita.fr>
780
781 * configure.in: Use AC_FUNC_STRNLEN.
782 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
783
7842002-01-09 Akim Demaille <akim@epita.fr>
785
786 * src/files.c, src/files.h (output_infix): New.
787 (tab_extension): Remove.
788 (compute_base_names): Compute the former, drop the latter.
789 * src/output.c (prepare): Insert the muscles `output-infix', and
790 `output-suffix'.
791 * src/parse-skel.y (string, string.1): New.
792 (section.header): Use it.
793 (section.yacc): Remove.
794 (prefix): Remove too.
795 * src/scan-skel.l: Adjust.
796 * src/bison.simple, src/bison.hairy: Adjust.
797
7982002-01-09 Akim Demaille <akim@epita.fr>
799
800 * configure.in (WERROR_CFLAGS): Compute it.
801 * src/Makefile.am (CFLAGS): Pass it.
802 * tests/atlocal.in (CFLAGS): Idem.
803 * src/files.c: Fix a few warnings.
804 (get_extension_index): Remove, unused.
805
8062002-01-08 Akim Demaille <akim@epita.fr>
807
808 * src/getargs.c (AS_FILE_NAME): New.
809 (getargs): Use it to convert DOSish file names.
810 * src/files.c (base_name): Rename as full_base_name to avoid
811 clashes with `base_name ()'.
812 (filename_split): New.
813 (compute_base_names): N-th rewrite, using filename_split.
814
8152002-01-08 Akim Demaille <akim@epita.fr>
816
817 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
818 New, stolen from the Fileutils 4.1.
819 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
820 * configure.in: Check for the presence of memrchr, and of its
821 prototype.
822
8232002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
824
825 * lib/hash.h (__P): Added definition for this macro.
826 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
827 BUILT_SOURCES, to ensure they are generated first.
828 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
829 %error-verbose to allow bootstrapping with bison 1.30x.
830
8312002-01-06 Akim Demaille <akim@epita.fr>
832
833 * src/reader.c (parse_braces): Don't fetch the next char, the
834 convention is to fetch on entry.
835 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
836 'switch' without a following semicolon.
837 * tests/regression.at (braces parsing): New.
838
8392002-01-06 Akim Demaille <akim@epita.fr>
840
841 Bison is dead wrong in its RR conflict reports.
842
843 * tests/torture.at (GNU Cim Grammar): New.
844 * src/conflicts.c (count_rr_conflicts): Fix.
845
8462002-01-06 Akim Demaille <akim@epita.fr>
847
848 Creating package.m4 from configure.ac causes too many problems.
849
850 * tests/Makefile.am (package.m4): Create it by hand,
851 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
852
8532002-01-06 Akim Demaille <akim@epita.fr>
854
855 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
856 skeleton.h.
857
8582002-01-04 Paul Eggert <eggert@twinsun.com>
859
860 * doc/bison.texinfo (Debugging):
861 Remove YYSTDERR; it's no longer defined or used.
862 Also, s/cstdio.h/cstdio/.
863
8642002-01-03 Akim Demaille <akim@epita.fr>
865
866 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
867
8682002-01-03 Akim Demaille <akim@epita.fr>
869
870 * src/parse-skel.y (process_skeleton): Don't bind the parser's
871 tracing code to --trace, wait for a better --trace option, with
872 args.
873
8742002-01-03 Akim Demaille <akim@epita.fr>
875
876 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
877 The ISO C++ standard is extremely clear about it: stderr is
878 considered a macro, not a regular symbol (see table 94 `Header
879 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
880 Therefore std:: does not apply to it. It still does with fprintf.
881 Also, s/cstdio.h/cstdio/.
882
8832002-01-03 Akim Demaille <akim@epita.fr>
884
885 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
886 for non system headers.
887
8882002-01-02 Akim Demaille <akim@epita.fr>
889
890 Equip the skeleton chain with location tracking, runtime trace,
891 pure parser and scanner.
892
893 * src/parse-skel.y: Request a pure parser, locations, and prefix
894 renaming.
895 (%union): Having several members with the same type does not help
896 type mismatches, simplify.
897 (YYPRINT, yyprint): New.
898 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
899 (skel_error): this.
900 Handle locations.
901 * src/scan-skel.l: Adjust to these changes.
902 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
903 (LOCATION_PRINT, skel_control_t): New.
904
9052001-12-30 Akim Demaille <akim@epita.fr>
906
907 * src/parse-skel.y: Get rid of the shift/reduce conflict:
908 replace `gb' with BLANKS.
909 * src/scan-skel.l: Adjust.
910
9112001-12-30 Akim Demaille <akim@epita.fr>
912
913 * src/system.h: We don't need nor want bcopy.
914 Throw away MS-DOS crap: we don't need getpid.
915 * configure.in: We don't need strndup. It was even causing
916 problems: because Flex includes the headers *before* us,
917 _GNU_SOURCE is not defined by config.h, and therefore strndup was
918 not visible.
919 * lib/xstrndup.c: New.
920 * src/scan-skel.l: Use it.
921 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
922 * src/parse-skel.y: Use %directives instead of #defines.
923
9242001-12-30 Akim Demaille <akim@epita.fr>
925
926 * src/skeleton.h: New.
927 * src/output.c (output_parser, output_master_parser): Remove, dead
928 code.
929 * src/output.h (get_lines_number, actions_output, guards_output)
930 (token_definitions_output): Prototype them.
931 * src/parse-skel.y: Add the license notice.
932 Include output.h and skeleton.h.
933 (process_skeleton): Returns void, and takes a single parameter.
934 * src/scan-skel.l: Add the license notice.
935 Include skeleton.h.
936 Don't use %option yylineno: it seems that then Flex imagines
937 REJECT has been used, and therefore it won't reallocate its
938 buffers (which makes no other sense to me than a bug). It results
939 in warnings for `unused: yy_flex_realloc'.
940
9412001-12-30 Robert Anisko <robert.anisko@epita.fr>
942
943 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
944 (MUSCLE_INSERT_PREFIX): ...to there.
945 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
946 (MUSCLE_INSERT_PREFIX): Move from here...
947
948 * src/bison.hairy: Add a section directive. Put braces around muscle
949 names. This parser skeleton is still broken, but Bison should not
950 choke on a bad muscle 'syntax'.
951 * src/bison.simple: Add a section directive. Put braces around muscle
952 names.
953
954 * src/files.h (strsuffix, stringappend): Add declarations.
955 (tab_extension): Add declaration.
956 (short_base_name): Add declaration.
957
958 * src/files.c (strsuffix, stringappend): No longer static. These
959 functions are used in the skeleton parser.
960 (tab_extension): New.
961 (compute_base_names): Use the computations done in this function
962 to guess if the generated parsers should have '.tab' in their
963 names.
964 (short_base_name): No longer static.
965
966 * src/output.c (output_skeleton): New.
967 (output): Disable call to output_master_parser, and give a try to
968 a new skeleton handling system.
969 (guards_output, actions_output): No longer static.
970 (token_definitions_output, get_lines_number): No longer static.
971
972 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
973
974 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
975 parse-skel.y.
976
977 * src/parse-skel.y: New file.
978 * src/scan-skel.l: New file.
979
9802001-12-29 Akim Demaille <akim@epita.fr>
981
982 %name-prefix is broken.
983
984 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
985 Adjust all dependencies.
986 * tests/headers.at (export YYLTYPE): Strengthen this test: use
987 %name-prefix.
988
989 Renaming yylval but not yylloc is not consistent. Now we do.
990
991 * src/bison.simple: Prefix yylloc if used.
992 * doc/bison.texinfo (Decl Summary): Document that.
993
9942001-12-29 Akim Demaille <akim@epita.fr>
995
996 * doc/bison.texinfo: Promote `%long-directive' over
997 `%long_directive'.
998 Remove all references to fixed-output-files, yacc is enough.
999
10002001-12-29 Akim Demaille <akim@epita.fr>
1001
1002 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1003 user prologue. These are defaults.
1004 * tests/actions.at (Mid-rule actions): Make sure the user can
1005 define YYDEBUG and YYERROR_VERBOSE.
1006
10072001-12-29 Akim Demaille <akim@epita.fr>
1008
1009 * src/output.c (header_output): Don't forget to export YYLTYPE and
1010 yylloc.
1011 * tests/headers.at (export YYLTYPE): New, make sure it does.
1012 * tests/regression.at (%union and --defines, Invalid CPP headers):
1013 Move to...
1014 * tests/headers.at: here.
1015
10162001-12-29 Akim Demaille <akim@epita.fr>
1017
1018 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1019
10202001-12-29 Akim Demaille <akim@epita.fr>
1021
1022 * tests/actions.at (Mid-rule actions): Output on a single line
1023 instead of several.
1024
10252001-12-29 Akim Demaille <akim@epita.fr>
1026
1027 * doc/bison.texinfo: Formatting changes.
1028
10292001-12-29 Akim Demaille <akim@epita.fr>
1030
1031 Don't store the token defs in a muscle, just be ready to output it
1032 on command. Now possible via `symbols'. Fixes a memory leak.
1033
1034 * src/output.c (token_definitions_output): New.
1035 (output_parser, header_output): Use it.
1036 * src/reader.c (symbols_save): Remove.
1037
10382001-12-29 Akim Demaille <akim@epita.fr>
1039
1040 * src/bison.simple: Do not provide a default for YYSTYPE and
1041 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1042 default.
1043
10442001-12-29 Akim Demaille <akim@epita.fr>
1045
1046 Mid-rule actions are simply... ignored!
1047
1048 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1049 the empty-rule associated to the dummy symbol, not to the host
1050 rule.
1051 * tests/actions.at (Mid-rule actions): New.
1052
10532001-12-29 Akim Demaille <akim@epita.fr>
1054
1055 Memory leak.
1056
1057 * src/reader.c (reader): Free grammar.
1058
10592001-12-29 Akim Demaille <akim@epita.fr>
1060
1061 Memory leak.
1062
1063 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1064 since it allocates it for each state, although only one is needed.
1065 (allocate_storage): Do it here.
1066
10672001-12-29 Akim Demaille <akim@epita.fr>
1068
1069 * src/options.h, src/options.c (create_long_option_table): Rename
1070 as...
1071 (long_option_table_new): this, with a clearer prototype.
1072 (percent_table): Remove, unused,
1073 * src/getargs.c (getargs): Adjust.
1074
10752001-12-29 Akim Demaille <akim@epita.fr>
1076
1077 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1078 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1079 as states.
1080
10812001-12-29 Akim Demaille <akim@epita.fr>
1082
1083 * src/lalr.c (build_relations): Rename `states' as `states1'.
1084 Sorry, I don't understand exactly what it is, no better name...
1085
10862001-12-29 Akim Demaille <akim@epita.fr>
1087
1088 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1089 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1090 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1091 as rules.
1092
10932001-12-29 Akim Demaille <akim@epita.fr>
1094
1095 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1096 ago.
1097
10982001-12-29 Akim Demaille <akim@epita.fr>
1099
1100 * src/reader.c, src/reader.h (user_toknums): Remove.
1101 Adjust all users to use symbols[i]->user_token_number.
1102
11032001-12-29 Akim Demaille <akim@epita.fr>
1104
1105 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1106 Adjust all users to use symbols[i]->prec or ->assoc.
1107
11082001-12-29 Akim Demaille <akim@epita.fr>
1109
1110 * src/reader.c, src/reader.h (tags): Remove.
1111 Adjust all users to use symbols[i]->tag.
1112
11132001-12-29 Akim Demaille <akim@epita.fr>
1114
1115 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1116 and rule_table.
1117 * src/reader.c (packsymbols): Fill this table.
1118 Drop sprec.
1119 * src/conflicts.c (resolve_sr_conflict): Adjust.
1120 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1121 single table.
1122 Use symbols[i]->tag instead of tags[i].
1123
11242001-12-29 Akim Demaille <akim@epita.fr>
1125
1126 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1127 In addition, put a comment in there, to replace...
1128 * tests/regression.at (%union and C comments): Remove.
1129
11302001-12-29 Akim Demaille <akim@epita.fr>
1131
1132 * tests/regression.at (Web2c Actions): Blindly move the actual
1133 output as expected output. The contents *seem* right to me, but I
1134 can't pretend reading perfectly parser tables... Nonetheless, all
1135 the other tests pass correctly, the table look OK, even though the
1136 presence of `$axiom' is to be noted: AFAICS it is useless (but
1137 harmless).
1138
11392001-12-29 Akim Demaille <akim@epita.fr>
1140
1141 * src/reader.c (readgram): Don't add the rule 0 if there were no
1142 rules read. In other words, add it _after_ having performed
1143 grammar sanity checks.
1144 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1145
11462001-12-29 Akim Demaille <akim@epita.fr>
1147
1148 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1149 visible, and some states have now a different number.
1150
11512001-12-29 Akim Demaille <akim@epita.fr>
1152
1153 * src/reader.c (readgram): Bind the initial rule's lineno to that
1154 of the first rule.
1155 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1156 (Solved SR Conflicts): Adjust rule 0's line number.
1157
11582001-12-29 Akim Demaille <akim@epita.fr>
1159
1160 Fix the `GAWK Grammar' failure.
1161
1162 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1163 the reductions of the first state which was mistakenly confused
1164 with the final state because precisely final_state was initialized
1165 to 0.
1166 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1167 now noticed by Bison.
1168 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1169 have a reduction on $default.
1170
11712001-12-29 Akim Demaille <akim@epita.fr>
1172
1173 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1174 rule line numbers.
1175 * src/closure.c (print_closure): Likewise.
1176 * src/derives.c (print_derives): Likewise.
1177 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1178 now.
1179
11802001-12-29 Akim Demaille <akim@epita.fr>
1181
1182 * src/lalr.c (lookaheads_print): New.
1183 (lalr): Call it when --trace-flag.
1184 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1185 are dumped.
1186
11872001-12-29 Akim Demaille <akim@epita.fr>
1188
1189 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1190 when walking through ritem, even via rule->rhs.
1191 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1192 (useful_production, useless_nonterminals): Likewise.
1193 (reduce_grammar_tables): Likewise, plus update nritems.
1194 * src/nullable.c (set_nullable): Likewise.
1195 * src/lalr.c (build_relations): Likewise.
1196 * tests/sets.at (Nullable): Adjust.
1197 Fortunately, now, the $axiom is no longer nullable.
1198
11992001-12-29 Akim Demaille <akim@epita.fr>
1200
1201 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1202 the 0-sentinel.
1203 * src/gram.c (ritem_longest_rhs): Likewise.
1204 * src/reduce.c (nonterminals_reduce): Likewise.
1205 * src/print_graph.c (print_graph): Likewise.
1206 * src/output.c (output_rule_data): Likewise.
1207 * src/nullable.c (set_nullable): Likewise.
1208
12092001-12-29 Akim Demaille <akim@epita.fr>
1210
1211 * src/output.c: Comment changes.
1212
12132001-12-27 Paul Eggert <eggert@twinsun.com>
1214
1215 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1216 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1217 Sparc, as they were causing more porting problems than the
1218 (minor) performance improvement was worth.
1219
1220 Also, catch up with 1.31's YYSTD.
1221
12222001-12-27 Akim Demaille <akim@epita.fr>
1223
1224 * src/output.c (output_gram): Rely on nritems, not the
1225 0-sentinel. See below.
1226 Use -1 as separator, not 0.
1227 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1228 Rely on -1 as separator in yyrhs, instead of 0.
1229 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1230 twice `Now at end of input', therefore there are two lines less to
1231 expect.
1232
12332001-12-27 Akim Demaille <akim@epita.fr>
1234
1235 * tests/regression.at (Unresolved SR Conflicts):
1236 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1237 below.
1238
12392001-12-27 Akim Demaille <akim@epita.fr>
1240
1241 * src/LR0.c (new_state): Recognize the final state by the fact it
1242 is reached by eoftoken.
1243 (insert_start_shifting_state, insert_eof_shifting_state)
1244 (insert_accepting_state, augment_automaton): Remove, since now
1245 these states are automatically computed from the initial state.
1246 (generate_states): Adjust.
1247 * src/print.c: When reporting a rule number to the user, substract
1248 1, so that the axiom rule is rule 0, and the first user rule is 1.
1249 * src/reduce.c: Likewise.
1250 * src/print_graph.c (print_core): For the time being, just as for
1251 the report, depend upon --trace-flags to dump the full set of
1252 items.
1253 * src/reader.c (readgram): Once the grammar read, insert the rule
1254 0: `$axiom: START-SYMBOL $'.
1255 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1256 number of the states has changed (the final state is no longer
1257 necessarily the last), catch up.
1258
12592001-12-27 Akim Demaille <akim@epita.fr>
1260
1261 Try to make the use of the eoftoken valid. Given that its value
1262 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1263 is used instead of > 0 where appropriate, (ii), depend upon nritems
1264 instead of the 0-sentinel.
1265
1266 * src/gram.h, src/gram.c (nritems): New.
1267 Expected to be duplication of nitems, but for the time being...
1268 * src/reader.c (packgram): Assert nritems and nitems are equal.
1269 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1270 * src/closure.c (print_closure, print_fderives): Likewise.
1271 * src/gram.c (ritem_print): Likewise.
1272 * src/print.c (print_core, print_grammar): Likewise.
1273 * src/print_graph.c: Likewise.
1274
12752001-12-27 Akim Demaille <akim@epita.fr>
1276
1277 * src/main.c (main): If there are complains after grammar
1278 reductions, then output the report anyway if requested, then die.
1279 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1280 * src/reader.c (eoftoken): New.
1281 (parse_token_decl): If the token being defined has value `0', it
1282 is the eoftoken.
1283 (packsymbols): No longer hack `tags' to insert `$' by hand.
1284 Be sure to preserve the value of the eoftoken.
1285 (reader): Make sure eoftoken is defined.
1286 Initialize nsyms to 0: now eoftoken is created just like the others.
1287 * src/print.c (print_grammar): Don't special case the eof token.
1288 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1289 lie anyway, albeit pleasant.
1290 * tests/calc.at: Exercise error messages with eoftoken.
1291 Change the grammar so that empty input is invalid.
1292 Adjust expectations.
1293 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1294
12952001-12-27 Akim Demaille <akim@epita.fr>
1296
1297 * configure.in: Check the protos of strchr ans strspn.
1298 Replace strchr if needed.
1299 * src/system.h: Provide the protos of strchr, strspn and memchr if
1300 missing.
1301 * lib/strchr.c: New.
1302 * src/reader.c (symbols_save): Use strchr.
1303
13042001-12-27 Akim Demaille <akim@epita.fr>
1305
1306 * src/print.c, src/print_graph.c (escape): New.
1307 Use it to quote the TAGS outputs.
1308 * src/print_graph.c (print_state): Now errors are in red, and
1309 reductions in green.
1310 Prefer high to wide: output the state number on a line of its own.
1311
13122001-12-27 Akim Demaille <akim@epita.fr>
1313
1314 * src/state.h, src/state.c (reductions_new): New.
1315 * src/LR0.c (set_state_table): Let all the states have a
1316 `reductions', even if reduced to 0.
1317 (save_reductions): Adjust.
1318 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1319 * src/print.c (print_reductions, print_actions): Adjust.
1320 * src/output.c (action_row): Adjust.
1321
13222001-12-27 Akim Demaille <akim@epita.fr>
1323
1324 * src/state.h, src/state.c (errs_new, errs_dup): New.
1325 * src/LR0.c (set_state_table): Let all the states have an errs,
1326 even if reduced to 0.
1327 * src/print.c (print_errs, print_reductions): Adjust.
1328 * src/output.c (output_actions, action_row): Adjust.
1329 * src/conflicts.c (resolve_sr_conflict): Adjust.
1330
13312001-12-27 Akim Demaille <akim@epita.fr>
1332
1333 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1334
13352001-12-27 Akim Demaille <akim@epita.fr>
1336
1337 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1338 * src/print.c: here.
1339 (lookaheadset, shiftset): New, used as additional storage by
1340 print_reductions.
1341 (print_results): Adjust.
1342 (print_shifts, print_gotos, print_errs): New, extracted from...
1343 (print_actions): here.
1344 * src/print_graph.c (print_actions): Remove dead code.
1345
13462001-12-27 Akim Demaille <akim@epita.fr>
1347
1348 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1349 `$n' and `@n'.
1350
13512001-12-27 Akim Demaille <akim@epita.fr>
1352
1353 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1354 (build_relations): Adjust.
1355
13562001-12-27 Akim Demaille <akim@epita.fr>
1357
1358 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1359 duplication.
1360
13612001-12-27 Akim Demaille <akim@epita.fr>
1362
1363 * src/reader.c (packgram): Catch nitems overflows.
1364
13652001-12-27 Akim Demaille <akim@epita.fr>
1366
1367 * src/files.c, src/files.h (guard_obstack): Remove.
1368 * src/output.c (output): Adjust.
1369 * src/reader.c (parse_braces): New, factoring...
1370 (copy_action, copy_guard): these two which are renamed as...
1371 (parse_action, parse_guard): these.
1372 As a voluntary consequence, using braces around guards is now
1373 mandatory.
1374
13752001-12-27 Akim Demaille <akim@epita.fr>
1376
1377 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1378 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1379 members.
1380 (symbol_list_new): Adjust.
1381 (copy_action): action_line is the first line, not the last.
1382 (copy_guard): Just as for actions, store the `action' only, not
1383 the switch/case/break flesh.
1384 Don't parse the user action that might follow the guard, let...
1385 (readgram): do it, i.e., now, there can be an action after a
1386 guard.
1387 In other words the guard is just explicitly optional.
1388 (packgram): Adjust.
1389 * src/output.c (guards_output): New.
1390 (output_parser): Call it when needed.
1391 (output): Also free the guard and attrs obstacks.
1392 * src/files.c, src/files.h (obstack_save): Remove.
1393 (output_files): Remove.
1394 As a result, if one needs the former `.act' file, using an
1395 appropriate skeleton which requires actions and guards is now
1396 required.
1397 * src/main.c (main): Adjust.
1398 * tests/semantic.at: New.
1399 * tests/regression.at: Use `input.y' as input file name.
1400 Avoid 8+3 problems by requiring input.c when the test needs the
1401 parser.
1402
14032001-12-27 Akim Demaille <akim@epita.fr>
1404
1405 * src/reader.c (symbol_list_new): Be sure to initialize all the
1406 fields.
1407
14082001-12-27 Akim Demaille <akim@epita.fr>
1409
1410 All the hacks using a final pseudo state are now useless.
1411
1412 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1413 * src/lalr.c (nLA): New.
1414 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1415 instead of lookaheadsp from the pseudo state (nstate + 1).
1416
14172001-12-27 Akim Demaille <akim@epita.fr>
1418
1419 * src/output.c (action_row, token_actions): Use a state_t instead
1420 of a integer, and nlookaheads instead of the following state's
1421 lookaheadsp.
1422
14232001-12-27 Akim Demaille <akim@epita.fr>
1424
1425 * src/conflicts.c (log_resolution, flush_shift)
1426 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1427 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1428 (conflicts_print, print_reductions): Use a state_t instead of an
1429 integer when referring to a state.
1430 As much as possible, depend upon nlookaheads, instead of the
1431 `lookaheadsp' member of the following state (since lookaheads of
1432 successive states are successive, the difference between state n + 1
1433 and n served as the number of lookaheads for state n).
1434 * src/lalr.c (add_lookback_edge): Likewise.
1435 * src/print.c (print_core, print_actions, print_state)
1436 (print_results): Likewise.
1437 * src/print_graph.c (print_core, print_actions, print_state)
1438 (print_graph): Likewise.
1439 * src/conflicts.h: Adjust.
1440
14412001-12-27 Akim Demaille <akim@epita.fr>
1442
1443 * src/bison.hairy: Formatting/comment changes.
1444 ANSIfy.
1445 Remove `register' indications.
1446 Add plenty of `static'.
1447
14482001-12-27 Akim Demaille <akim@epita.fr>
1449
1450 * src/output.c (prepare): Drop the muscle `ntbase' which
1451 duplicates ntokens.
1452 * src/bison.simple: Formatting/comment changes.
1453 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1454 is an undocumented synonym.
1455
14562001-12-22 Akim Demaille <akim@epita.fr>
1457
1458 * src/output.c (output_table_data): Change the prototype to use
1459 `int' for array ranges: some invocations do pass an int, not a
1460 short.
1461 Reported by Wayne Green.
1462
14632001-12-22 Akim Demaille <akim@epita.fr>
1464
1465 Some actions of web2c.y are improperly triggered.
1466 Reported by Mike Castle.
1467
1468 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1469 * tests/regression.at (Web2c): Rename as...
1470 (Web2c Report): this.
1471 (Web2c Actions): New.
1472
14732001-12-22 Akim Demaille <akim@epita.fr>
1474
1475 Reductions in web2c.y are improperly reported.
1476 Reported by Mike Castle.
1477
1478 * src/conflicts.c (print_reductions): Fix.
1479 * tests/regression.at (Web2c): New.
1480
14812001-12-18 Akim Demaille <akim@epita.fr>
1482
1483 Some host fail on `assert (!"foo")', which expands to
1484 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1485 Reported by Nelson Beebee.
1486
1487 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1488 `#define it_succeeded 0' and `assert (it_succeeded)'.
1489
14902001-12-17 Marc Autret <autret_m@epita.fr>
1491
1492 * src/bison.simple: Don't hard code the skeleton line and filename.
1493 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1494 New line counter 'skeleton_line' (skeleton-line muscle).
1495
14962001-12-17 Paul Eggert <eggert@twinsun.com>
1497
1498 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1499 YYDEBUG must be defined to a nonzero value.
1500
1501 * src/bison.simple (yytname): Do not assume that the user defines
1502 YYDEBUG to a properly parenthesized expression.
1503
15042001-12-17 Akim Demaille <akim@epita.fr>
1505
1506 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1507 nlookaheads is a new member.
1508 Adjust all users.
1509 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1510 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1511 state.
1512
15132001-12-17 Akim Demaille <akim@epita.fr>
1514
1515 * src/files.h, src/files.c (open_files, close_files): Remove.
1516 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1517 let...
1518 * src/reader.c (reader): Do it.
1519
15202001-12-17 Akim Demaille <akim@epita.fr>
1521
1522 * src/conflicts.c (print_reductions): Formatting changes.
1523
15242001-12-17 Akim Demaille <akim@epita.fr>
1525
1526 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1527 (flush_reduce): New.
1528 (resolve_sr_conflict): Adjust.
1529
15302001-12-17 Akim Demaille <akim@epita.fr>
1531
1532 * src/output.c (output_obstack): Be static and rename as...
1533 (format_obstack): this, to avoid any confusion with files.c's
1534 output_obstack.
1535 * src/reader.h (muscle_obstack): Move to...
1536 * src/output.h: here, since it's defined in output.c.
1537
15382001-12-17 Akim Demaille <akim@epita.fr>
1539
1540 * src/output.c (action_row, save_column, default_goto)
1541 (sort_actions, matching_state, pack_vector): Better variable
1542 locality.
1543
15442001-12-17 Akim Demaille <akim@epita.fr>
1545
1546 * src/output.c: Various formatting changes.
1547
15482001-12-17 Akim Demaille <akim@epita.fr>
1549
1550 * src/files.c (output_files): Free the output_obstack.
1551 * src/main.c (main): Call print and print_graph conditionally.
1552 * src/print.c (print): Work unconditionally.
1553 * src/print_graph.c (print_graph): Work unconditionally.
1554 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1555
15562001-12-16 Marc Autret <autret_m@epita.fr>
1557
1558 * src/output.c (actions_output): Fix. When we use %no-lines,
1559 there is one less line per action.
1560
15612001-12-16 Marc Autret <autret_m@epita.fr>
1562
1563 * src/bison.simple: Remove a useless #line directive.
1564 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1565 * src/output.c (get_lines_number): New.
1566 (output_parser): Adjust, now takes care about the lines of a
1567 output muscles.
1568 Fix line numbering.
1569 (actions_output): Computes the number of lines taken by actions.
1570 (output_master_parser): Insert new skeleton which is the name of
1571 the output parser file name.
1572
15732001-12-15 Marc Autret <autret_m@epita.fr>
1574
1575 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1576
15772001-12-15 Marc Autret <autret_m@epita.fr>
1578
1579 * src/output.c (output_gram): Keep track of the hairy one.
1580
15812001-12-15 Akim Demaille <akim@epita.fr>
1582
1583 Make `make distcheck' work.
1584
1585 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1586 system.h which uses libgettext.h.
1587
15882001-12-15 Akim Demaille <akim@epita.fr>
1589
1590 * src/nullable.c (set_nullable): Useless rules must be skipped,
1591 otherwise, since we range over their symbols, we might look at a
1592 nonterminal which no longer ``exists'', i.e., it is not counted in
1593 `nvars', hence we overflow our arrays.
1594
15952001-12-15 Akim Demaille <akim@epita.fr>
1596
1597 The header can also be produced directly, without any obstack!
1598 Yahoo!
1599
1600 * src/files.c, src/files.h (defines_obstack): Remove.
1601 (compute_header_macro): Global.
1602 (defines_obstack_save): Remove.
1603 * src/reader.c (parse_union_decl): No longer output to
1604 defines_obstack: its content can be found in the `stype' muscle
1605 anyway.
1606 (output_token_translations): Merge into...
1607 (symbols_output): this.
1608 Rename as...
1609 (symbols_save): this.
1610 (reader): Adjust.
1611 * src/output.c (header_output): New.
1612 (output): Call it.
1613
16142001-12-15 Akim Demaille <akim@epita.fr>
1615
1616 * src/reader.c (parse_union_decl): Instead of handling two obstack
1617 simultaneously, use one to define the `stype' muscle, and use the
1618 value of the latter to fill defines_obstack.
1619 (copy_comment): Remove.
1620 (copy_comment2): Work for a single obstack.
1621 Rename as...
1622 (copy_comment): this.
1623
16242001-12-15 Akim Demaille <akim@epita.fr>
1625
1626 * src/lex.c, src/lex.h (xgetc): No longer static.
1627 * src/reader.c (parse_union_decl): Revamp.
1628
16292001-12-15 Akim Demaille <akim@epita.fr>
1630
1631 Still making progress in separating Bison into (i) input, (ii)
1632 process, (iii) output: now we can directly output the parser file
1633 without using table_obstack at all.
1634
1635 * src/files.c, src/files.h (table_obstack): Bye bye.
1636 (parser_file_name): New.
1637 * src/files.c (compute_output_file_names): Compute it.
1638 * src/output.c (actions_output, output_parser)
1639 (output_master_parser): To a file instead of an obstack.
1640
16412001-12-15 Akim Demaille <akim@epita.fr>
1642
1643 Attach actions to rules, instead of pre-outputting them to
1644 actions_obstack.
1645
1646 * src/gram.h (rule_t): action and action_line are new members.
1647 * src/reader.c (symbol_list): Likewise.
1648 (copy_action): Save the actions within the rule.
1649 (packgram): Save them in rule_table.
1650 * src/output.c (actions_output): New.
1651 (output_parser): Use it on `%%actions'.
1652 (output_rule_data): Don't free rule_table.
1653 (output): Do it.
1654 (prepare): Don't save the `action' muscle.
1655 * src/bison.simple: s/%%action/%%actions/.
1656
16572001-12-15 Akim Demaille <akim@epita.fr>
1658
1659 * src/reader.c (copy_action): When --yacc, don't append a `;'
1660 to the user action: let it fail if lacking.
1661 Suggested by Arnold Robbins and Tom Tromey.
1662
16632001-12-14 Akim Demaille <akim@epita.fr>
1664
1665 * src/lex.c (literalchar): Simply return the char you decoded, non
1666 longer mess around with obstacks and int pointers.
1667 Adjust all callers.
1668
16692001-12-14 Akim Demaille <akim@epita.fr>
1670
1671 * src/lex.c (literalchar): Don't escape the special characters,
1672 just decode them, and keep them as char (before, eol was output as
1673 the 2 char string `\n' etc.).
1674 * src/output.c (output_rule_data): Use quotearg to output the
1675 token strings.
1676
16772001-12-13 Paul Eggert <eggert@twinsun.com>
1678
1679 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1680 Do not infringe on the global user namespace when using C++.
1681 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1682 All uses of `fprintf' and `stderr' changed.
1683
1684 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1685
16862001-12-13 Akim Demaille <akim@epita.fr>
1687
1688 The computation of nullable is broken: it doesn't handle empty
1689 RHS's properly.
1690
1691 * tests/torture.at (GNU AWK Grammar): New.
1692 * tests/sets.at (Nullable): New.
1693 * src/nullable.c (set_nullable): Instead of blindly looping over
1694 `ritems', loop over the rules, and then over their rhs's.
1695
1696 Work around Autotest bugs.
1697
1698 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1699 frame, because Autotest understand lines starting with a `+' as
1700 traces from the shell. Then, they are not processed properly.
1701 Admittedly an Autotest bug, but we don't have time to wait for
1702 Autotest to catch up.
1703 * tests/regression.at (Broken Closure): Adjust to the new table
1704 frames.
1705 Move to...
1706 * tests/sets.at: here.
1707
17082001-12-13 Akim Demaille <akim@epita.fr>
1709
1710 * src/closure.c (closure): Use nrules instead of playing tricks
1711 with BITS_PER_WORD.
1712
17132001-12-13 Akim Demaille <akim@epita.fr>
1714
1715 * src/print.c (print_actions): Output the handling of `$' as the
1716 traces do: shifting the token EOF. Before EOF was treated as a
1717 nonterminal.
1718 * tests/regression.at: Adjust some tests.
1719 * src/print_graph.c (print_core): Complete the set of items via
1720 closure. The next-to-final and final states are still unsatisfying,
1721 but that's to be addressed elsewhere.
1722 No longer output the rule numbers, but do output the state number.
1723 A single loop for the shifts + gotos is enough, but picked a
1724 distinct color for each.
1725 (print_graph): Initialize and finalize closure.
1726
17272001-12-13 Akim Demaille <akim@epita.fr>
1728
1729 * src/reader.c (readgram): Remove dead code, an strip useless
1730 braces.
1731 (get_type): Remove, unused.
1732
17332001-12-12 Akim Demaille <akim@epita.fr>
1734
1735 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1736 on that of lib/error.c.
1737
17382001-12-12 Akim Demaille <akim@epita.fr>
1739
1740 Some hosts don't like `/' in includes.
1741
1742 * src/system.h: Include libgettext.h without qualifying the path.
1743 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1744 $(top_srcdir).
1745
17462001-12-11 Marc Autret <autret_m@epita.fr>
1747
1748 * src/output.c (output_parser): Remove useless muscle.
1749
17502001-12-11 Marc Autret <autret_m@epita.fr>
1751
1752 * src/bison.simple: Remove #line just before %%epilogue. It
1753 is now handled in ...
1754 * src/reader.c (read_additionnal_code): Add the output of a
1755 #line for the epilogue.
1756
17572001-12-10 Marc Autret <autret_m@epita.fr>
1758
1759 * src/reader.c (copy_definition): Re-use CPP-outed code which
1760 replace precedent remove.
1761 * src/bison.simple: Remove #line before %%prologue because
1762 %%input-line is wrong at this time.
1763
17642001-12-10 Marc Autret <autret_m@epita.fr>
1765
1766 * src/reader.c (symbols_output): Clean up.
1767 * src/output.c (output_gram, output): Clean up.
1768
17692001-12-10 Akim Demaille <akim@epita.fr>
1770
1771 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1772 * src/LR0.c (set_state_table): here.
1773 * src/lalr.c (lalr): Call it.
1774
17752001-12-10 Akim Demaille <akim@epita.fr>
1776
1777 * src/state.h (shifts): Remove the `number' member: shifts are
1778 attached to state, hence no longer need to be labelled with a
1779 state number.
1780
17812001-12-10 Akim Demaille <akim@epita.fr>
1782
1783 Now that states have a complete set of members, the linked list of
1784 shifts is useless: just fill directly the state's shifts member.
1785
1786 * src/state.h (shifts): Remove the `next' member.
1787 * src/LR0.c (first_state, last_state): Remove.
1788 Adjust the callers.
1789 (augment_automaton): Don't look for the shifts that must be added
1790 a shift on EOF: it is those of the state we looked for! But now,
1791 since shifts are attached, it is no longer needed to looking
1792 merely by its id: its number.
1793
17942001-12-10 Akim Demaille <akim@epita.fr>
1795
1796 * src/LR0.c (augment_automaton): Better variable locality.
1797 Remove an impossible branch: if there is a state corresponding to
1798 the start symbol being shifted, then there is shift for the start
1799 symbol from the initial state.
1800
18012001-12-10 Akim Demaille <akim@epita.fr>
1802
1803 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1804 only when appropriate: when insert_start_shifting_state' is not
1805 invoked.
1806 * tests/regression.at (Rule Line Numbers): Adjust.
1807
18082001-12-10 Akim Demaille <akim@epita.fr>
1809
1810 * src/LR0.c (augment_automaton): Now that all states have shifts,
1811 merge the two cases addition shifts to the initial state.
1812
18132001-12-10 Akim Demaille <akim@epita.fr>
1814
1815 * src/lalr.c (set_state_table): Move to...
1816 * src/LR0.c: here.
1817 * src/lalr.c (lalr): Don't call it...
1818 * src/LR0.c (generate_states): do it.
1819 * src/LR0.h (first_state): Remove, only the table is used.
1820
18212001-12-10 Akim Demaille <akim@epita.fr>
1822
1823 * src/LR0.h (first_shift, first_reduction): Remove.
1824 * src/lalr.c: Don't use first_shift: find shifts through the
1825 states.
1826
18272001-12-10 Akim Demaille <akim@epita.fr>
1828
1829 * src/LR0.c: Attach shifts to states as soon as they are
1830 computed.
1831 * src/lalr.c (set_state_table): Instead of assigning shifts to
1832 state, just assert that the mapping was properly done.
1833
18342001-12-10 Akim Demaille <akim@epita.fr>
1835
1836 * src/LR0.c (insert_start_shift): Rename as...
1837 (insert_start_shifting_state): this.
1838 (insert_eof_shifting_state, insert_accepting_state): New.
1839 (augment_automaton): Adjust.
1840 Better locality of the variables.
1841 When looking if the start_symbol is shifted from the initial
1842 state, using `while (... symbol != start_symbol ...)' sounds
1843 better than `while (... symbol < start_symbol ...)': If fail
1844 to see how the order between symbols could be relevant!
1845
18462001-12-10 Akim Demaille <akim@epita.fr>
1847
1848 * src/getargs.h: Don't declare `spec_name_prefix' and
1849 `spec_file_prefix', declared by src/files.h.
1850 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1851 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1852 * src/output.c (prepare): Adjust.
1853 * src/reader.c (symbols_output): Likewise.
1854 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1855
18562001-12-10 Akim Demaille <akim@epita.fr>
1857
1858 * src/muscle_tab.c (muscle_init): NULL is a better default than
1859 `"0"'.
1860
18612001-12-10 Akim Demaille <akim@epita.fr>
1862
1863 * src/reader.c (reader): Calling symbols_output once is enough.
1864
18652001-12-10 Akim Demaille <akim@epita.fr>
1866
1867 Now that states have a complete set of members, the linked list of
1868 reductions is useless: just fill directly the state's reductions
1869 member.
1870
1871 * src/state.h (struct reductions): Remove member `number' and
1872 `next'.
1873 * src/LR0.c (first_reduction, last_reduction): Remove.
1874 (save_reductions): Don't link the new reductions, store them in
1875 this_state.
1876 * src/lalr.c (set_state_table): No need to attach reductions to
1877 states, it's already done.
1878 * src/output.c (output_actions): No longer free the shifts, then
1879 the reductions, then the states: free all the states and their
1880 members.
1881
18822001-12-10 Akim Demaille <akim@epita.fr>
1883
1884 * src/options.c (OPTN, DRTV, BOTH): New.
1885 (option_table): Use them.
1886
1887 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1888 the job of system.h.
1889 * src/options.c: Don't include stdio.h and xalloc.h for the same
1890 reasons.
1891
18922001-12-10 Akim Demaille <akim@epita.fr>
1893
1894 * src/output.c (output, prepare): Make sure the values of the
1895 muscles `action' and `prologue' are 0-terminated.
1896
18972001-12-10 Akim Demaille <akim@epita.fr>
1898
1899 Clean up GCC warnings.
1900
1901 * src/reader.c (copy_action): `buf' is not used.
1902 (parse_skel_decl): Be static.
1903 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1904 * src/options.h (create_long_option_table): Have a real prototype.
1905 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1906 (hash_delete_at): Return const void *.
1907 Adjust casts to preserve the const.
1908
19092001-12-10 Akim Demaille <akim@epita.fr>
1910
1911 * configure.in: Require 2.52g.
1912 M4 is not needed, but AUTOM4TE is.
1913 * m4/m4.m4: Remove.
1914 * tests/Makefile.am: Adjust.
1915
19162001-12-10 Akim Demaille <akim@epita.fr>
1917
1918 One structure for states is enough, even though theoretically
1919 there are LR(0) states and LALR(1) states.
1920
1921 * src/lalr.h (state_t): Remove.
1922 (state_table): Be state_t **, not state_t *.
1923 * src/state.h (core, CORE_ALLOC): Rename as...
1924 (state_t, STATE_ALLOC): this.
1925 Add the LALR(1) members: shifts, reductions, errs.
1926 * src/LR0.c (state_table): Rename as...
1927 (state_hash): this, to avoid name clashes with the global
1928 `state_table'.
1929 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1930 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1931
19322001-12-10 Akim Demaille <akim@epita.fr>
1933
1934 Bison dumps core on bash.y.
1935 Reported by Pascal Bart.
1936
1937 * src/warshall.c (bitmatrix_print): New.
1938 (TC): Use it.
1939 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1940 j must be the outer loop.
1941 * tests/regression.at (Broken Closure): New.
1942
19432001-12-05 Akim Demaille <akim@epita.fr>
1944
1945 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1946 its argument.
1947